vault backup: 2025-07-21 18:58:17

This commit is contained in:
boris committed 2025-07-21 18:58:17 +01:00
commit cbff7cef68
22 files changed
+39244

No files matched your search

+328
View File
@@ -0,0 +1,328 @@
{
"lastVersion": "3.1.18",
"aestheticStyle": "default",
"positionStyle": "top",
"menuCommands": [
{
"id": "editing-toolbar:editor-undo",
"name": "Undo editor",
"icon": "undo-glyph"
},
{
"id": "editing-toolbar:editor-redo",
"name": "Redo editor",
"icon": "redo-glyph"
},
{
"id": "editing-toolbar:toggle-format-brush",
"name": "Format Brush",
"icon": "paintbrush"
},
{
"id": "editing-toolbar:format-eraser",
"name": "Clear text formatting",
"icon": "eraser"
},
{
"id": "editing-toolbar:header2-text",
"name": "Header 2",
"icon": "header-2"
},
{
"id": "editing-toolbar:header3-text",
"name": "Header 3",
"icon": "header-3"
},
{
"id": "SubmenuCommands-header",
"name": "submenu",
"icon": "header-n",
"SubmenuCommands": [
{
"id": "editing-toolbar:header1-text",
"name": "Header 1",
"icon": "header-1"
},
{
"id": "editing-toolbar:header4-text",
"name": "Header 4",
"icon": "header-4"
},
{
"id": "editing-toolbar:header5-text",
"name": "Header 5",
"icon": "header-5"
},
{
"id": "editing-toolbar:header6-text",
"name": "Header 6",
"icon": "header-6"
}
]
},
{
"id": "editing-toolbar:toggle-bold",
"name": "Bold",
"icon": "bold-glyph"
},
{
"id": "editing-toolbar:toggle-italics",
"name": "Italics",
"icon": "italic-glyph"
},
{
"id": "editing-toolbar:toggle-strikethrough",
"name": "Strikethrough",
"icon": "strikethrough-glyph"
},
{
"id": "editing-toolbar:underline",
"name": "Underline",
"icon": "underline-glyph"
},
{
"id": "editing-toolbar:toggle-highlight",
"name": "==Highlight==",
"icon": "highlight-glyph"
},
{
"id": "SubmenuCommands-lucdf3en5",
"name": "submenu",
"icon": "edit",
"SubmenuCommands": [
{
"id": "editing-toolbar:editor-copy",
"name": "Copy",
"icon": "lucide-copy"
},
{
"id": "editing-toolbar:editor-cut",
"name": "Cut",
"icon": "lucide-scissors"
},
{
"id": "editing-toolbar:editor-paste",
"name": "Paste",
"icon": "lucide-clipboard-type"
},
{
"id": "editing-toolbar:editor:swap-line-down",
"name": "Swap line down",
"icon": "lucide-corner-right-down"
},
{
"id": "editing-toolbar:editor:swap-line-up",
"name": "Swap line up",
"icon": "lucide-corner-right-up"
}
]
},
{
"id": "editing-toolbar:editor:attach-file",
"name": "Attach file",
"icon": "lucide-paperclip"
},
{
"id": "editing-toolbar:editor:insert-table",
"name": "Insert Table",
"icon": "lucide-table"
},
{
"id": "editing-toolbar:editor:cycle-list-checklist",
"name": "Cycle list checklist",
"icon": "check-circle"
},
{
"id": "SubmenuCommands-luc8efull",
"name": "submenu",
"icon": "message-square",
"SubmenuCommands": [
{
"id": "editing-toolbar:editor:toggle-blockquote",
"name": "Blockquote",
"icon": "lucide-text-quote"
},
{
"id": "editing-toolbar:insert-callout",
"name": "Insert Callout ",
"icon": "lucide-quote"
}
]
},
{
"id": "SubmenuCommands-mdcmder",
"name": "submenu",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M464 608 l0 -568 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-80 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 568 l-232 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 80 q0 3 2.5 5.5 q2.5 2.5 5.5 2.5 l560 0 q3 0 5.5 -2.5 q2.5 -2.5 2.5 -5.5 l0 -80 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-232 0 ZM864 696 q17 0 28.5 11.5 q11.5 11.5 11.5 28.5 q0 17 -11.5 28.5 q-11.5 11.5 -28.5 11.5 q-17 0 -28.5 -11.5 q-11.5 -11.5 -11.5 -28.5 q0 -17 11.5 -28.5 q11.5 -11.5 28.5 -11.5 ZM864 640 q-40 0 -68 28 q-28 28 -28 68 q0 40 28 68 q28 28 68 28 q40 0 68 -28 q28 -28 28 -68 q0 -40 -28 -68 q-28 -28 -68 -28 ZM576 322 l0 -63 q0 -3 2 -5 l89 -70 l-89 -70 q-2 -2 -2 -5 l0 -63 q0 -4 3.5 -5.5 q3.5 -1.5 6.5 0.5 l170 133 q4 3 4.5 8.5 q0.5 5.5 -2.5 9.5 l-2 2 l-170 133 q-3 2 -6.5 0.5 q-3.5 -1.5 -3.5 -5.5 ZM256 322 l0 -63 q0 -3 -2 -5 l-89 -70 l89 -70 q2 -2 2 -5 l0 -63 q0 -4 -3.5 -5.5 q-3.5 -1.5 -6.5 0.5 l-170 133 q-4 3 -4.5 8.5 q-0.5 5.5 2.5 9.5 l2 2 l170 133 q3 2 6.5 0.5 q3.5 -1.5 3.5 -5.5 Z\"></path></g></svg>",
"SubmenuCommands": [
{
"id": "editing-toolbar:superscript",
"name": "Superscript",
"icon": "superscript-glyph"
},
{
"id": "editing-toolbar:subscript",
"name": "Subscript",
"icon": "subscript-glyph"
},
{
"id": "editing-toolbar:editor:toggle-code",
"name": "Inline code",
"icon": "code-glyph"
},
{
"id": "editing-toolbar:codeblock",
"name": "Code block",
"icon": "codeblock-glyph"
},
{
"id": "editing-toolbar:editor:insert-wikilink",
"name": "Insert wikilink [[]]",
"icon": "<svg width=\"15\" height=\"15\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M306 134 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 7 q0 -8 -5 -8 l-45 0 q-5 0 -5 8 l0 784 q0 8 5 8 l45 0 q5 0 5 -8 q0 8 1 8 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 -623 q0 8 1 8 ZM139 134 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 7 q0 -8 -5 -8 l-45 0 q-5 0 -5 8 l0 784 q0 8 5 8 l45 0 q5 0 5 -8 q0 8 1 8 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 -623 q0 8 1 8 ZM711 134 q1 0 1 -8 l0 623 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 q1 0 1 -8 q0 8 4 8 l46 0 q4 0 4 -8 l0 -784 q0 -8 -4 -8 l-46 0 q-4 0 -4 8 q0 -7 -1 -7 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 ZM878 134 q1 0 1 -8 l0 623 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 q1 0 1 -8 q0 8 5 8 l45 0 q4 0 4 -8 l0 -784 q0 -8 -4 -8 l-45 0 q-5 0 -5 8 q0 -7 -1 -7 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:editor:insert-embed",
"name": "Insert embed ![[]]",
"icon": "note-glyph"
},
{
"id": "editing-toolbar:insert-link",
"name": "Insert link []()",
"icon": "link-glyph"
},
{
"id": "editing-toolbar:hrline",
"name": "Horizontal divider",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M912 424 l0 -80 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-784 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 80 q0 3 2.5 5.5 q2.5 2.5 5.5 2.5 l784 0 q3 0 5.5 -2.5 q2.5 -2.5 2.5 -5.5 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:toggle-inline-math",
"name": "Inline math",
"icon": "lucide-sigma"
},
{
"id": "editing-toolbar:editor:insert-mathblock",
"name": "MathBlock",
"icon": "lucide-sigma-square"
}
]
},
{
"id": "SubmenuCommands-list",
"name": "submenu-list",
"icon": "bullet-list-glyph",
"SubmenuCommands": [
{
"id": "editing-toolbar:editor:toggle-checklist-status",
"name": "Checklist",
"icon": "checkbox-glyph"
},
{
"id": "editing-toolbar:renumber-ordered-list",
"name": "Renumber ordered list",
"icon": "list-restart"
},
{
"id": "editing-toolbar:toggle-numbered-list",
"name": "Numbered list",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M860 424 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM860 756 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM860 92 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM264 136 l-3 -3 l-51 -57 l56 0 q14 0 24.5 -10 q10.5 -10 11.5 -25 l0 -1 q0 -15 -10.5 -25.5 q-10.5 -10.5 -24.5 -10.5 l-137 0 q-15 0 -25 10 q-10 10 -11 24.5 q-1 14.5 9 25.5 l63 70 l49 54 q7 7 7 16.5 q0 9.5 -7.5 16.5 q-7.5 7 -18.5 7 q-11 0 -18.5 -6.5 q-7.5 -6.5 -8.5 -16.5 l0 0 q0 -15 -10.5 -25.5 q-10.5 -10.5 -25.5 -10.5 q-15 0 -25.5 10.5 q-10.5 10.5 -10.5 25.5 q0 26 13.5 47.5 q13.5 21.5 36 34.5 q22.5 13 49 13 q26.5 0 49.5 -13 q23 -13 36 -34.5 q13 -21.5 13 -47.5 q0 -20 -7.5 -37.5 q-7.5 -17.5 -21.5 -30.5 l-1 -1 ZM173 794 q11 11 25 10.5 q14 -0.5 24.5 -10.5 q10.5 -10 10.5 -25 l0 -293 q0 -15 -10 -25.5 q-10 -10.5 -25 -10.5 q-15 0 -25.5 10 q-10.5 10 -11.5 25 l0 211 q-10 -8 -23.5 -7 q-13.5 1 -22.5 11 l-1 0 q-10 11 -9.5 25.5 q0.5 14.5 10.5 24.5 l58 54 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:toggle-bullet-list",
"name": "Bullet list",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M860 424 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM860 756 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM860 92 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM176 716 l0 0 ZM112 716 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 ZM176 384 l0 0 ZM112 384 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 ZM176 52 l0 0 ZM112 52 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:undent-list",
"name": "Unindent-list",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 302 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 542 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 784 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 62 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM244 534 l-123 -122 q-8 -7 -8 -18 q0 -11 8 -18 l123 -122 q8 -7 19 -7 q11 0 18.5 7.5 q7.5 7.5 7.5 18.5 l0 242 q0 11 -7.5 18.5 q-7.5 7.5 -18.5 7.5 q-11 0 -19 -7 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:indent-list",
"name": "Indent list",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 302 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 542 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 784 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 62 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM158 534 l124 -122 q7 -7 7 -18 q0 -11 -7 -18 l-124 -122 q-7 -7 -18 -7 q-11 0 -19 7.5 q-8 7.5 -8 18.5 l0 242 q0 11 8 18.5 q8 7.5 19 7.5 q11 0 18 -7 Z\"></path></g></svg>"
}
]
},
{
"id": "SubmenuCommands-aligin",
"name": "submenu-aligin",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M724 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM724 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>",
"SubmenuCommands": [
{
"id": "editing-toolbar:justify",
"name": "<p aligin=\"justify\"></p>",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M112 736 l0 0 ZM120 736 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 331 l0 0 ZM120 331 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 128 l0 0 ZM120 128 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 533 l0 0 ZM120 533 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:left",
"name": "<p aligin=\"left\"></p>",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M572 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM572 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:center",
"name": "<center>",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M724 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM724 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
},
{
"id": "editing-toolbar:right",
"name": "<p aligin=\"right\"></p>",
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
}
]
},
{
"id": "editing-toolbar:change-font-color",
"name": "Change font color[html]",
"icon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" focusable=\"false\" fill=\"currentColor\"><g fill-rule=\"evenodd\"><path id=\"change-font-color-icon\" d=\"M3 18h18v3H3z\" style=\"fill:#2DC26B\"></path><path d=\"M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z\"></path></g></svg>"
},
{
"id": "editing-toolbar:change-background-color",
"name": "Change Backgroundcolor[html]",
"icon": "<svg width=\"18\" height=\"24\" viewBox=\"0 0 256 256\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"none\" stroke-width=\"1\" fill=\"currentColor\" fill-rule=\"evenodd\"><g ><g fill=\"currentColor\"><g transform=\"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)\" ><path d=\"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z\" fill-rule=\"nonzero\"></path><path d=\"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z\" fill-rule=\"evenodd\"></path><path d=\"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z\" fill-rule=\"nonzero\"></path></g></g><path d=\"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z\" id=\"change-background-color-icon\" style=\"fill:#FA541C\"></path></g></g></svg>"
},
{
"id": "editing-toolbar:fullscreen-focus",
"name": "Fullscreen focus mode",
"icon": "fullscreen"
},
{
"id": "editing-toolbar:workplace-fullscreen-focus",
"name": "Workplace-Fullscreen ",
"icon": "exit-fullscreen"
}
],
"followingCommands": [],
"topCommands": [],
"fixedCommands": [],
"mobileCommands": [],
"enableMultipleConfig": false,
"appendMethod": "workspace",
"shouldShowMenuOnSelect": false,
"cMenuVisibility": true,
"cMenuBottomValue": 4.25,
"cMenuNumRows": 12,
"cMenuWidth": 610,
"cMenuFontColor": "#2DC26B",
"cMenuBackgroundColor": "#d3f8b6",
"autohide": false,
"Iscentered": false,
"custom_bg1": "#FFB78B8C",
"custom_bg2": "#CDF4698C",
"custom_bg3": "#A0CCF68C",
"custom_bg4": "#F0A7D88C",
"custom_bg5": "#ADEFEF8C",
"custom_fc1": "#D83931",
"custom_fc2": "#DE7802",
"custom_fc3": "#245BDB",
"custom_fc4": "#6425D0",
"custom_fc5": "#646A73",
"isLoadOnMobile": false,
"horizontalPosition": 0,
"verticalPosition": 0,
"formatBrushes": {},
"customCommands": [],
"viewTypeSettings": {},
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
"toolbarIconColor": "var(--text-normal)",
"toolbarIconSize": 18
}
+12
View File
@@ -0,0 +1,12 @@
"use strict";var t=require("obsidian");function e(t,e,i,n){return new(i||(i=Promise))(function(o,s){function r(t){try{a(n.next(t))}catch(t){s(t)}}function l(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,l)}a((n=n.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i=["Custom","editingToolbar","editingToolbarSub","editingToolbarAdd","editingToolbarDelete","editingToolbarReload","codeblock-glyph","underline-glyph","superscript-glyph","subscript-glyph","bot-glyph","header-1","header-2","header-3","header-4","header-5","header-6","header-n","obsidian","obsidian-new","accessibility","activity","air-vent","airplay","alarm-check","alarm-clock-off","alarm-clock","alarm-minus","alarm-plus","album","alert-circle","alert-octagon","alert-triangle","align-center-horizontal","align-center-vertical","align-center","align-end-horizontal","align-end-vertical","align-horizontal-distribute-center","align-horizontal-distribute-end","align-horizontal-distribute-start","align-horizontal-justify-center","align-horizontal-justify-end","align-horizontal-justify-start","align-horizontal-space-around","align-horizontal-space-between","align-justify","align-left","align-right","align-start-horizontal","align-start-vertical","align-vertical-distribute-center","align-vertical-distribute-end","align-vertical-distribute-start","align-vertical-justify-center","align-vertical-justify-end","align-vertical-justify-start","align-vertical-space-around","align-vertical-space-between","anchor","angry","annoyed","aperture","apple","archive-restore","archive","armchair","arrow-big-down","arrow-big-left","arrow-big-right","arrow-big-up","arrow-down-circle","arrow-down-left","arrow-down-right","arrow-down","arrow-left-circle","arrow-left-right","arrow-left","arrow-right-circle","arrow-right","arrow-up-circle","arrow-up-left","arrow-up-right","arrow-up","asterisk","at-sign","award","axe","axis-3d","baby","backpack","baggage-claim","banana","banknote","bar-chart-2","bar-chart-3","bar-chart-4","bar-chart-horizontal","bar-chart","baseline","bath","battery-charging","battery-full","battery-low","battery-medium","battery","beaker","bed-double","bed-single","bed","beer","bell-minus","bell-off","bell-plus","bell-ring","bell","bike","binary","bitcoin","bluetooth-connected","bluetooth-off","bluetooth-searching","bluetooth","bold","bomb","bone","book-open","book","bookmark-minus","bookmark-plus","bookmark","bot","box-select","box","boxes","briefcase","brush","bug","building-2","building","bus","cake","calculator","calendar-check-2","calendar-check","calendar-clock","calendar-days","calendar-heart","calendar-minus","calendar-off","calendar-plus","calendar-range","calendar-search","calendar-x2","calendar-x","calendar","camera-off","camera","car","carrot","cast","check-circle-2","check-circle","check-square","check","chef-hat","cherry","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","chevrons-down-up","chevrons-down","chevrons-left-right","chevrons-left","chevrons-right-left","chevrons-right","chevrons-up-down","chevrons-up","chrome","cigarette-off","cigarette","circle-dot","circle-ellipsis","circle-slashed","circle","citrus","clapperboard","clipboard-check","clipboard-copy","clipboard-edit","clipboard-list","clipboard-signature","clipboard-type","clipboard-x","clipboard","clock-1","clock-10","clock-11","clock-12","clock-2","clock-3","clock-4","clock-5","clock-6","clock-7","clock-8","clock-9","clock","cloud-cog","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon-rain","cloud-moon","cloud-off","cloud-rain-wind","cloud-rain","cloud-snow","cloud-sun-rain","cloud-sun","cloud","cloudy","clover","code-2","code","codepen","codesandbox","coffee","cog","coins","columns","command","compass","component","contact","contrast","cookie","copy","copyleft","copyright","corner-down-left","corner-down-right","corner-left-down","corner-left-up","corner-right-down","corner-right-up","corner-up-left","corner-up-right","cpu","credit-card","croissant","crop","cross","crosshair","crown","cup-soda","curly-braces","currency","database","delete","diamond","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","dices","diff","disc","divide-circle","divide-square","divide","dollar-sign","download-cloud","download","dribbble","droplet","droplets","drumstick","edit-2","edit-3","edit","egg-fried","egg","equal-not","equal","eraser","euro","expand","external-link","eye-off","eye","facebook","factory","fast-forward","feather","figma","file-archive","file-audio-2","file-audio","file-axis-3d","file-badge-2","file-badge","file-bar-chart-2","file-bar-chart","file-box","file-check-2","file-check","file-clock","file-code","file-cog-2","file-cog","file-diff","file-digit","file-down","file-edit","file-heart","file-image","file-input","file-json-2","file-json","file-key-2","file-key","file-line-chart","file-lock-2","file-lock","Line truncated
/**!
* Sortable 1.15.6
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/(n.cMenuFontColor,n.cMenuBackgroundColor)))}()}function gl(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function fl(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?gl(Object(i),!0).forEach(function(e){vl(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):gl(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function bl(t){return bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(t)}function vl(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function yl(){return yl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},yl.apply(this,arguments)}function wl(t,e){if(null==t)return{};var i,n,o=function(t,e){if(null==t)return{};var i,n,o={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function xl(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Cl=xl(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),kl=xl(/Edge/i),Sl=xl(/firefox/i),Tl=xl(/safari/i)&&!xl(/chrome/i)&&!xl(/android/i),El=xl(/iP(ad|od|hone)/i),Ml=xl(/chrome/i)&&xl(/android/i),Al={capture:!1,passive:!1};function Dl(t,e,i){t.addEventListener(e,i,!Cl&&Al)}function Il(t,e,i){t.removeEventListener(e,i,!Cl&&Al)}function Ol(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Bl(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ql(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&Ol(t,e):Ol(t,e))||n&&t===i)return t;if(t===i)break}while(t=Bl(t))}return null}var Nl,Ll=/\s+/g;function Rl(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(Ll," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(Ll," ")}}function Pl(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function _l(t,e){var i="";if("string"==typeof t)i=t;else do{var n=Pl(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function Fl(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,s=n.length;if(i)for(;o<s;o++)i(n[o],o);return n}return[]}function Vl(){var t=document.scrollingElement;return t||document.documentElement}function Hl(t,e,i,n,o){if(t.getBoundingClientRect||t===window){var s,r,l,a,c,h,d;if(t!==window&&t.parentNode&&t!==Vl()?(r=(s=t.getBoundingClientRect()).top,l=s.left,a=s.bottom,c=s.right,h=s.height,d=s.width):(r=0,l=0,a=window.innerHeight,c=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(e||i)&&t!==window&&(o=o||t.parentNode,!Cl))do{if(o&&o.getBoundingClientRect&&("none"!==Pl(o,"transform")||i&&"static"!==Pl(o,"position"))){var u=o.getBoundingClientRect();r-=u.top+parseInt(Pl(o,"border-top-width")),l-=u.left+parseInt(Pl(o,"border-left-width")),a=r+s.height,c=l+s.width;break}}while(o=o.parentNode);if(n&&t!==window){var p=_l(o||t),m=p&&p.a,g=p&&p.d;p&&(a=(r/=g)+(h/=g),c=(l/=m)+(d/=m))}return{top:r,left:l,bottom:a,right:c,width:d,height:h}}}function zl(t,e,i){for(var n=Yl(t,!0),o=Hl(t)[e];n;){var s=Hl(n)[i];if(!("top"===i||"left"===i?o>=s:o<=s))return n;if(n===Vl())break;n=Yl(n,!1)}return!1}function $l(t,e,i,n){for(var o=0,s=0,r=t.children;s<r.length;){if("none"!==r[s].style.display&&r[s]!==Xa.ghost&&(n||r[s]!==Xa.dragged)&&ql(r[s],i.draggable,t,!1)){if(o===e)return r[s];o++}s++}return null}function Wl(t,e){for(var i=t.lastElementChild;i&&(i===Xa.ghost||"none"===Pl(i,"display")||e&&!Ol(i,e));)i=i.previousElementSibling;return i||null}function Ul(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Xa.clone||e&&!Ol(t,e)||i++;return i}function jl(t){var e=0,i=0,n=Vl();if(t)do{var o=_l(t),s=o.a,r=o.d;e+=t.scrollLeft*s,i+=t.scrollTop*r}while(t!==n&&(t=t.pareLine truncated
/*! Pickr 1.8.4 MIT | https://github.com/Simonwep/pickr */
var xc=function(t){var e={exports:{}};return t(e,e.exports),e.exports}(function(t,e){self,t.exports=(()=>{var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.d(e,{default:()=>O});var i={};function n(t,e,i,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);for(const s of e)for(const e of i)s[t](e,n,{capture:!1,...o});return Array.prototype.slice.call(arguments,1)}t.r(i),t.d(i,{adjustableInputNumbers:()=>h,createElementFromString:()=>r,createFromTemplate:()=>l,eventPath:()=>a,off:()=>s,on:()=>o,resolveElement:()=>c});const o=n.bind(null,"addEventListener"),s=n.bind(null,"removeEventListener");function r(t){const e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild}function l(t){const e=(t,e)=>{const i=t.getAttribute(e);return t.removeAttribute(e),i},i=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e(t,":obj"),s=e(t,":ref"),r=o?n[o]={}:n;s&&(n[s]=t);for(const n of Array.from(t.children)){const t=e(n,":arr"),o=i(n,t?{}:r);t&&(r[t]||(r[t]=[])).push(Object.keys(o).length?o:n)}return n};return i(r(t))}function a(t){let e=t.path||t.composedPath&&t.composedPath();if(e)return e;let i=t.target.parentElement;for(e=[t.target,i];i=i.parentElement;)e.push(i);return e.push(document,window),e}function c(t){return t instanceof Element?t:"string"==typeof t?t.split(/>>/g).reduce((t,e,i,n)=>(t=t.querySelector(e),i<n.length-1?t.shadowRoot:t),document):null}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t=>t;function i(i){const n=[.001,.01,.1][Number(i.shiftKey||2*i.ctrlKey)]*(i.deltaY<0?1:-1);let o=0,s=t.selectionStart;t.value=t.value.replace(/[\d.]+/g,(t,i)=>i<=s&&i+t.length>=s?(s=i,e(Number(t),n,o)):(o++,t)),t.focus(),t.setSelectionRange(s,s),i.preventDefault(),t.dispatchEvent(new Event("input"))}o(t,"focus",()=>o(window,"wheel",i,{passive:!1})),o(t,"blur",()=>s(window,"wheel",i))}const{min:d,max:u,floor:p,round:m}=Math;function g(t,e,i){e/=100,i/=100;const n=p(t=t/360*6),o=t-n,s=i*(1-e),r=i*(1-o*e),l=i*(1-(1-o)*e),a=n%6;return[255*[i,r,s,s,l,i][a],255*[l,i,i,r,s,s][a],255*[s,s,l,i,i,r][a]]}function f(t,e,i){return g(t,e,i).map(t=>m(t).toString(16).padStart(2,"0"))}function b(t,e,i){const n=g(t,e,i),o=n[0]/255,s=n[1]/255,r=n[2]/255,l=d(1-o,1-s,1-r);return[100*(1===l?0:(1-o-l)/(1-l)),100*(1===l?0:(1-s-l)/(1-l)),100*(1===l?0:(1-r-l)/(1-l)),100*l]}function v(t,e,i){const n=(2-(e/=100))*(i/=100)/2;return 0!==n&&(e=1===n?0:n<.5?e*i/(2*n):e*i/(2-2*n)),[t,100*e,100*n]}function y(t,e,i){const n=d(t/=255,e/=255,i/=255),o=u(t,e,i),s=o-n;let r,l;if(0===s)r=l=0;else{l=s/o;const n=((o-t)/6+s/2)/s,a=((o-e)/6+s/2)/s,c=((o-i)/6+s/2)/s;t===o?r=c-a:e===o?r=1/3+n-c:i===o&&(r=2/3+a-n),r<0?r+=1:r>1&&(r-=1)}return[360*r,100*l,100*o]}function w(t,e,i,n){return e/=100,i/=100,[...y(255*(1-d(1,(t/=100)*(1-(n/=100))+n)),255*(1-d(1,e*(1-n)+n)),255*(1-d(1,i*(1-n)+n)))]}function x(t,e,i){e/=100;const n=2*(e*=(i/=100)<.5?i:1-i)/(i+e)*100,o=100*(i+e);return[t,isNaN(n)?0:n,o]}function C(t){return y(...t.match(/.{2}/g).map(t=>parseInt(t,16)))}function k(t){t=t.match(/^[a-zA-Z]+$/)?function(t){if("black"===t.toLowerCase())return"#000";const e=document.createElement("canvas").getContext("2d");return e.fillStyle=t,"#000"===e.fillStyle?null:e.fillStyle}(t):t;const e={cmyk:/^cmyk[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)/i,rgba:/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsla:/^((hsla)|hsl)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsva:/^((hsva)|hsv)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},i=t=>t.map(t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0);let n;t:for(const o in e){if(!(n=e[o].exec(t)))continue;const s=t=>!!n[2]==("number"==typeof t);switch(o){case"cmyk":{const[,t,e,s,r]=i(n);if(t>100||e>100||s>100||r>100)break t;return{values:w(t,e,s,r),type:o}}case"rgba":{const[,,,t,e,r,l]=i(n);if(t>255||e>255||r>255||l<0||l>1||!s(l))break t;return{values:[...y(t,e,r),l],a:l,type:o}}case"hexa":{let[,t]=n;4!==t.length&&3!==t.length||(t=t.split("").map(t=>t+t).join(""));const e=t.substring(0,6);let i=t.substring(6);return i=i?parseInt(i,16)/255:void 0,{values:[...C(e),i],a:i,type:o}}case"hsla":{const[,,,t,e,r,l]=i(n);if(t>360||e>100||r>100||l<0||l>1||!s(l))break t;return{values:[...x(t,e,r),l],a:l,type:o}}case"hsva":{const[,,,t,e,r,l]=i(n);if(t>360||e>100||r>100||l<0||l>1||!s(l))break t;return{values:[t,e,r,l],a:l,type:o}}}}return{values:null,type:null}}function S(){const t=(t,e)=>function(){let i=arguments.length>0&&void 0!==arguments[0]?arguLine truncated
/* nosourcemap */
+10
View File
@@ -0,0 +1,10 @@
{
"id": "editing-toolbar",
"name": "Editing Toolbar",
"version": "3.1.18",
"minAppVersion": "0.14.0",
"description": "The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.",
"author": "Cuman",
"authorUrl": "https://github.com/cumany/obsidian-editing-toolbar",
"isDesktopOnly": false
}
File diff suppressed because it is too large. Load diff
+418
View File
@@ -0,0 +1,418 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git)
*/
var qP=Object.create;var Fo=Object.defineProperty;var YP=Object.getOwnPropertyDescriptor;var XP=Object.getOwnPropertyNames;var ZP=Object.getPrototypeOf,KP=Object.prototype.hasOwnProperty;var Uv=e=>{throw TypeError(e)};var JP=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var QP=(e,t)=>()=>(e&&(t=e(e=0)),t);var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),eR=(e,t)=>{for(var r in t)Fo(e,r,{get:t[r],enumerable:!0})},Gv=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of XP(t))!KP.call(e,i)&&i!==r&&Fo(e,i,{get:()=>t[i],enumerable:!(n=YP(t,i))||n.enumerable});return e};var Ve=(e,t,r)=>(r=e!=null?qP(ZP(e)):{},Gv(t||!e||!e.__esModule?Fo(r,"default",{value:e,enumerable:!0}):r,e)),tR=e=>Gv(Fo({},"__esModule",{value:!0}),e);var Pr=(e,t,r)=>JP(e,typeof t!="symbol"?t+"":t,r),zv=(e,t,r)=>t.has(e)||Uv("Cannot "+r);var Ht=(e,t,r)=>(zv(e,t,"read from private field"),r?r.call(e):t.get(e)),Cc=(e,t,r)=>t.has(e)?Uv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Pc=(e,t,r,n)=>(zv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var qv=F(Rc=>{"use strict";g();Rc.byteLength=nR;Rc.toByteArray=aR;Rc.fromByteArray=lR;var hn=[],Rr=[],rR=typeof Uint8Array!="undefined"?Uint8Array:Array,eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ki=0,Vv=eh.length;Ki<Vv;++Ki)hn[Ki]=eh[Ki],Rr[eh.charCodeAt(Ki)]=Ki;var Ki,Vv;Rr[45]=62;Rr[95]=63;function Wv(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function nR(e){var t=Wv(e),r=t[0],n=t[1];return(r+n)*3/4-n}function iR(e,t,r){return(t+r)*3/4-r}function aR(e){var t,r=Wv(e),n=r[0],i=r[1],a=new rR(iR(e,n,i)),s=0,o=i>0?n-4:n,l;for(l=0;l<o;l+=4)t=Rr[e.charCodeAt(l)]<<18|Rr[e.charCodeAt(l+1)]<<12|Rr[e.charCodeAt(l+2)]<<6|Rr[e.charCodeAt(l+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Rr[e.charCodeAt(l)]<<2|Rr[e.charCodeAt(l+1)]>>4,a[s++]=t&255),i===1&&(t=Rr[e.charCodeAt(l)]<<10|Rr[e.charCodeAt(l+1)]<<4|Rr[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function sR(e){return hn[e>>18&63]+hn[e>>12&63]+hn[e>>6&63]+hn[e&63]}function oR(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(sR(n));return i.join("")}function lR(e){for(var t,r=e.length,n=r%3,i=[],a=16383,s=0,o=r-n;s<o;s+=a)i.push(oR(e,s,s+a>o?o:s+a));return n===1?(t=e[r-1],i.push(hn[t>>2]+hn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(hn[t>>10]+hn[t>>4&63]+hn[t<<2&63]+"=")),i.join("")}});var Yv=F(th=>{g();th.read=function(e,t,r,n,i){var a,s,o=i*8-n-1,l=(1<<o)-1,c=l>>1,u=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-u)-1,h>>=-u,u+=o;u>0;a=a*256+e[t+f],f+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=s*256+e[t+f],f+=d,u-=8);if(a===0)a=1-c;else{if(a===l)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-c}return(h?-1:1)*s*Math.pow(2,a-n)};th.write=function(e,t,r,n,i,a){var s,o,l,c=a*8-i-1,u=(1<<c)-1,f=u>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?t+=d/l:t+=d*Math.pow(2,1-f),t*l>=2&&(s++,l/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(t*l-1)*Math.pow(2,i),s=s+f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=o&255,h+=p,o/=256,i-=8);for(s=s<<i|o,c+=i;c>0;e[r+h]=s&255,h+=p,s/=256,c-=8);e[r+h-p]|=m*128}});var uh=F(Qa=>{"use strict";g();var rh=qv(),Ka=Yv(),Xv=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Qa.Buffer=M;Qa.SlowBuffer=pR;Qa.INSPECT_MAX_BYTES=50;var Mc=2147483647;Qa.kMaxLength=Mc;M.TYPED_ARRAY_SUPPORT=cR();!M.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function cR(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}});Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}});function Nn(e){if(e>Mc)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,M.prototype),t}function M(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return sh(e)}return Qv(e,t,r)}M.poolSize=8192;function Qv(e,t,r){if(typeof e=="string")return fR(e,t);if(ArrayBuffer.isView(e))return dR(e);if(e==null)throw new TypeError("The first argument must be one of type string, Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N$(e,t){if(e){if(typeof e=="string")return Fx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fx(e,t)}}function Fx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function B$(e,t){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),o;!(n=(o=s.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function j$(e){if(Array.isArray(e))return e}var Lx=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?$/,Dx=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])?$/,Nx=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,Bx=/^rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,jx=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,Hx=/^rgba?\(\s*(\d+%)\s+(\d+%)\s+(\d+%)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,Ux=/^hsla?\(\s*(\d+)(deg|rad|grad|turn)?\s*,\s*(\d+)%\s*,\s*(\d+)%(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/;function Fl(e,t){return e.indexOf(t)>-1}function H$(e,t,r){var n=e/255,i=t/255,a=r/255,s=Math.max(n,i,a),o=Math.min(n,i,a),l=s-o,c=(s+o)/2;if(l===0)return[0,0,c*100];var u=l/(1-Math.abs(2*c-1)),f=function(){switch(s){case n:return(i-a)/l%6;case i:return(a-n)/l+2;default:return(n-i)/l+4}}();return[f*60,u*100,c*100]}function U$(e,t,r){var n=e/60,i=t/100,a=r/100,s=(1-Math.abs(2*a-1))*i,o=s*(1-Math.abs(n%2-1)),l=a-s/2,c=function(){return n<1?[s,o,0]:n<2?[o,s,0]:n<3?[0,s,o]:n<4?[0,o,s]:n<5?[o,0,s]:[s,0,o]}(),u=qt(c,3),f=u[0],d=u[1],h=u[2];return[(f+l)*255,(d+l)*255,(h+l)*255]}var G$=function(){function e(t){var r=qt(t,4),n=r[0],i=r[1],a=r[2],s=r[3];$$(this,e),this.values=[Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(a,10),255),0),s==null?1:Math.max(Math.min(parseFloat(s),255),0)]}return L$(e,[{key:"toRgbString",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return s===1?"rgb(".concat(n,", ").concat(i,", ").concat(a,")"):"rgba(".concat(n,", ").concat(i,", ").concat(a,", ").concat(s,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),n=qt(r,4),i=n[0],a=n[1],s=n[2],o=n[3];return o===1?"hsl(".concat(i,", ").concat(a,"%, ").concat(s,"%)"):"hsla(".concat(i,", ").concat(a,"%, ").concat(s,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return n=Number(n).toString(16).padStart(2,"0"),i=Number(i).toString(16).padStart(2,"0"),a=Number(a).toString(16).padStart(2,"0"),s=s<1?parseInt(s*255,10).toString(16).padStart(2,"0"):"","#".concat(n).concat(i).concat(a).concat(s)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3],o=H$(n,i,a),l=qt(o,3),c=l[0],u=l[1],f=l[2];return[c,u,f,s]}}]),e}();function Ls(e){var t=qt(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return new G$([r,n,i,a])}function Em(e){var t=qt(e,3),r=t[0],n=t[1],i=t[2];return Ls([r,n,i,1])}function Wu(e){var t=qt(e,4),r=t[0],n=t[1],i=t[2],a=t[3],s=U$(r,n,i),o=qt(s,3),l=o[0],c=o[1],u=o[2];return Ls([l,c,u,a])}function Gx(e){var t=qt(e,3),r=t[0],n=t[1],i=t[2];return Wu([r,n,i,1])}function z$(e){var t=Lx.exec(e)||Dx.exec(e),r=qt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=parseInt(n.length<2?n.repeat(2):n,16),i=parseInt(i.length<2?i.repeat(2):i,16),a=parseInt(a.length<2?a.repeat(2):a,16),s=s&&(parseInt(s.length<2?s.repeat(2):s,16)/255).toPrecision(1)||1,Ls([n,i,a,s])}function V$(e){var t=Nx.exec(e)||jx.exec(e)||Bx.exec(e)||Hx.exec(e),r=qt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=Fl(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),i=Fl(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),a=Fl(a,"%")>0?parseInt(a,10)*255/100:parseInt(a,10),s=s===void 0?1:parseFloat(s)/(Fl(s,"%")?100:1),Ls([n,i,a,s])}function W$(e){var t=Ux.exec(e),r=qt(t,6),n=r[1],i=r[2],a=r[3],s=r[4],o=r[5];return i=i||"deg",n=(0,F$.default)(parseFloat(n),i,"deg"),a=parseFloat(a),s=parseFloat(s),o=o===void 0?1:parseFloat(o)/(Fl(o,"%")?100:1),Wu([n,a,s,o])}function zx(e){return Ox.default[e]?Em(Ox.default[e]):Lx.test(e)||Dx.test(e)?z$(e):Nx.test(e)||jx.test(e)||Bx.test(e)||Hx.test(e)?V$(e):Ux.test(e)?W$(e):null}var q$={fromString:zx,fromRgb:Em,fromRgba:Ls,fromHsl:Gx,fromHsla:Wu};Yn.default=q$});var Am=F((az,qx)=>{"use strict";g();var Wx=Object.prototype.toString;qx.exports=function(t){var r=Wx.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wx.call(t.callee)==="[object Function]"),n}});var rS=F((oz,tS)=>{" Line truncated
`)>=0)return!1;return!0}function YD(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=An.call(Array(e.indent+1)," ");else return null;return{base:r,prev:An.call(Array(t+1),r)}}function Zm(e,t){if(e.length===0)return"";var r=`
`+t.prev+t.base;return r+An.call(e,","+r)+`
`+t.prev}function uf(e,t){var r=Xm(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=Ri(e,i)?t(e[i],e):""}var a=typeof zm=="function"?zm(e):[],s;if(Us){s={};for(var o=0;o<a.length;o++)s["$"+a[o]]=a[o]}for(var l in e)Ri(e,l)&&(r&&String(Number(l))===l&&l<e.length||Us&&s["$"+l]instanceof Symbol||(VE.call(/[^\w$]/,l)?n.push(t(l,e)+": "+t(e[l],e)):n.push(l+": "+t(e[l],e))));if(typeof zm=="function")for(var c=0;c<a.length;c++)WE.call(e,a[c])&&n.push("["+t(a[c])+"]: "+t(e[a[c]],e));return n}});var tg=F((RV,eA)=>{"use strict";g();var QE=tn(),Gs=br(),XD=JE(),ZD=Xn(),hf=QE("%WeakMap%",!0),pf=QE("%Map%",!0),KD=Gs("WeakMap.prototype.get",!0),JD=Gs("WeakMap.prototype.set",!0),QD=Gs("WeakMap.prototype.has",!0),eN=Gs("Map.prototype.get",!0),tN=Gs("Map.prototype.set",!0),rN=Gs("Map.prototype.has",!0),eg=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},nN=function(e,t){var r=eg(e,t);return r&&r.value},iN=function(e,t,r){var n=eg(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},aN=function(e,t){return!!eg(e,t)};eA.exports=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new ZD("Side channel does not contain "+XD(a))},get:function(a){if(hf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return KD(t,a)}else if(pf){if(r)return eN(r,a)}else if(n)return nN(n,a)},has:function(a){if(hf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return QD(t,a)}else if(pf){if(r)return rN(r,a)}else if(n)return aN(n,a);return!1},set:function(a,s){hf&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new hf),JD(t,a,s)):pf?(r||(r=new pf),tN(r,a,s)):(n||(n={key:{},next:null}),iN(n,a,s))}};return i}});var rA=F((OV,tA)=>{"use strict";g();var sN=Rm(),zl=tg()(),Zn=Xn(),rg={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");if(zl.assert(e),!rg.has(e,t))throw new Zn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=zl.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=zl.get(e);return!!r&&sN(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var n=zl.get(e);n||(n={},zl.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(rg);tA.exports=rg});var aA=F((FV,iA)=>{"use strict";g();var Vl=rA(),oN=SyntaxError,nA=typeof StopIteration=="object"?StopIteration:null;iA.exports=function(t){if(!nA)throw new oN("this environment lacks StopIteration");Vl.set(t,"[[Done]]",!1);var r={next:function(){var i=Vl.get(this,"[[Iterator]]"),a=Vl.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Vl.set(i,"[[Done]]",!0),s!==nA)throw s;return{done:!0,value:void 0}}}};return Vl.set(r,"[[Iterator]]",t),r}});var ng=F((LV,sA)=>{g();var lN={}.toString;sA.exports=Array.isArray||function(e){return lN.call(e)=="[object Array]"}});var ig=F((NV,oA)=>{"use strict";g();var cN=String.prototype.valueOf,uN=function(t){try{return cN.call(t),!0}catch(r){return!1}},fN=Object.prototype.toString,dN="[object String]",hN=Pi()();oA.exports=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:hN?uN(t):fN.call(t)===dN}});var sg=F((jV,uA)=>{"use strict";g();var ag=typeof Map=="function"&&Map.prototype?Map:null,pN=typeof Set=="function"&&Set.prototype?Set:null,mf;ag||(mf=function(t){return!1});var cA=ag?Map.prototype.has:null,lA=pN?Set.prototype.has:null;!mf&&!cA&&(mf=function(t){return!1});uA.exports=mf||function(t){if(!t||typeof t!="object")return!1;try{if(cA.call(t),lA)try{lA.call(t)}catch(r){return!0}return t instanceof ag}catch(r){}return!1}});var lg=F((UV,hA)=>{"use strict";g();var mN=typeof Map=="function"&&Map.prototype?Map:null,og=typeof Set=="function"&&Set.prototype?Set:null,gf;og||(gf=function(t){return!1});var fA=mN?Map.prototype.has:null,dA=og?Set.prototype.has:null;!gf&&!dA&&(gf=function(t){return!1});hA.exports=gf||function(t){if(!t||typeof t!="object")return!1;try{if(dA.call(t),fA)try{fA.call(t)}catch(r){return!0}return t instanceof og}catch(r){}return!1}});var AA=F((zV,wf)=>{"use strict";g();var pA=Hm(),mA=aA();Zu()()||Dl()()?(vf=Symbol.iterator,wf.exports=function(t){if(t!=null&&typeof t[vf]!="undefined")return t[vf]();if(pA(t))return Array.prototype[vf].call(t)}):(gA=ng(),vA=ig(),cg=tn(),yA=cg("%Map%",!0),wA=cg("%Set%",!0),Dr=br(),ug=Dr("Array.prototype.push"),fg=Dr("String.prototype.charCodeAt"),bA=Dr("String.prototype.slice"),_A=function(t,r){var n=t.length;if(r+1>=n)return r+1;var i=fg(t,r);if(i<55296||i>56319)return r+1;var a=fg(t,r+1);return a<56320||a>57343?r+1:r+2},yf=function(t){var r=0;return{next:function(){var Line truncated
`});Pe=!1,z=Q.length}function Re(ct,rt){var Et="="+O,Ie=ct.indexOf(Et,rt),H=c(ct.substring(ct.indexOf("=",rt)+1,Ie)).split(" ");return Y=H[0],O=H[H.length-1],Ie+Et.length-1}for(S&&(S=S.split(" "),Y=S[0],O=S[1]),ge=0;ge<T;ge++)L==P?u(Y,A,ge)?(--ge,he(),L=I):A.charAt(ge)==`
`?gt(Pe):J+=A.charAt(ge):L==I?(ge+=Y.length-1,fe=e.tags[A.charAt(ge+1)],ee=fe?A.charAt(ge+1):"_v",ee=="="?(ge=Re(A,ge),L=P):(fe&&ge++,L=N),Pe=ge):u(O,A,ge)?(Q.push({tag:ee,n:c(J),otag:Y,ctag:O,i:ee=="/"?Pe-Y.length:ge+O.length}),J="",ge+=O.length-1,L=P,ee=="{"&&(O=="}}"?ge++:l(Q[Q.length-1]))):J+=A.charAt(ge);return gt(Pe,!0),Q};function l(w){w.n.substr(w.n.length-1)==="}"&&(w.n=w.n.substring(0,w.n.length-1))}function c(w){return w.trim?w.trim():w.replace(/^\s*|\s*$/g,"")}function u(w,A,S){if(A.charAt(S)!=w.charAt(0))return!1;for(var T=1,P=w.length;T<P;T++)if(A.charAt(S+T)!=w.charAt(T))return!1;return!0}var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(w,A,S,T){var P=[],I=null,N=null,L=null;for(N=S[S.length-1];w.length>0;){if(L=w.shift(),N&&N.tag=="<"&&!(L.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[L.tag]<=e.tags.$||h(L,T))S.push(L),L.nodes=d(w,L.tag,S,T);else if(L.tag=="/"){if(S.length===0)throw new Error("Closing tag without opener: /"+L.n);if(I=S.pop(),L.n!=I.n&&!p(L.n,I.n,T))throw new Error("Nesting error: "+I.n+" vs. "+L.n);return I.end=L.i,P}else L.tag==`
`&&(L.last=w.length==0||w[0].tag==`
`);P.push(L)}if(S.length>0)throw new Error("missing closing tag: "+S.pop().n);return P}function h(w,A){for(var S=0,T=A.length;S<T;S++)if(A[S].o==w.n)return w.tag="#",!0}function p(w,A,S){for(var T=0,P=S.length;T<P;T++)if(S[T].c==w&&S[T].o==A)return!0}function m(w){var A=[];for(var S in w)A.push('"'+b(S)+'": function(c,p,t,i) {'+w[S]+"}");return"{ "+A.join(",")+" }"}function v(w){var A=[];for(var S in w.partials)A.push('"'+b(S)+'":{name:"'+b(w.partials[S].name)+'", '+v(w.partials[S])+"}");return"partials: {"+A.join(",")+"}, subs: "+m(w.subs)}e.stringify=function(w,A,S){return"{code: function (c,p,i) { "+e.wrapMain(w.code)+" },"+v(w)+"}"};var y=0;e.generate=function(w,A,S){y=0;var T={code:"",subs:{},partials:{}};return e.walk(w,T),S.asString?this.stringify(T,A,S):this.makeTemplate(T,A,S)},e.wrapMain=function(w){return'var t=this;t.b(i=i||"");'+w+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(w,A,S){var T=this.makePartials(w);return T.code=new Function("c","p","i",this.wrapMain(w.code)),new this.template(T,A,this,S)},e.makePartials=function(w){var A,S={subs:{},partials:w.partials,name:w.name};for(A in S.partials)S.partials[A]=this.makePartials(S.partials[A]);for(A in w.subs)S.subs[A]=new Function("c","p","t","i",w.subs[A]);return S};function b(w){return w.replace(a,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(i,"\\r").replace(s,"\\u2028").replace(o,"\\u2029")}function x(w){return~w.indexOf(".")?"d":"f"}function E(w,A){var S="<"+(A.prefix||""),T=S+w.n+y++;return A.partials[T]={name:w.n,partials:{}},A.code+='t.b(t.rp("'+b(T)+'",c,p,"'+(w.indent||"")+'"));',T}e.codegen={"#":function(w,A){A.code+="if(t.s(t."+x(w.n)+'("'+b(w.n)+'",c,p,1),c,p,0,'+w.i+","+w.end+',"'+w.otag+" "+w.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(w.nodes,A),A.code+="});c.pop();}"},"^":function(w,A){A.code+="if(!t.s(t."+x(w.n)+'("'+b(w.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(w.nodes,A),A.code+="};"},">":E,"<":function(w,A){var S={partials:{},code:"",subs:{},inPartial:!0};e.walk(w.nodes,S);var T=A.partials[E(w,A)];T.subs=S.subs,T.partials=S.partials},$:function(w,A){var S={subs:{},code:"",partials:A.partials,prefix:w.n};e.walk(w.nodes,S),A.subs[w.n]=S.code,A.inPartial||(A.code+='t.sub("'+b(w.n)+'",c,p,i);')},"\n":function(w,A){A.code+=k('"\\n"'+(w.last?"":" + i"))},_v:function(w,A){A.code+="t.b(t.v(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'},_t:function(w,A){A.code+=k('"'+b(w.text)+'"')},"{":_,"&":_};function _(w,A){A.code+="t.b(t.t(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'}function k(w){return"t.b("+w+");"}e.walk=function(w,A){for(var S,T=0,P=w.length;T<P;T++)S=e.codegen[w[T].tag],S&&S(w[T],A);return A},e.parse=function(w,A,S){return S=S||{},d(w,"",[],S.sectionTags||[])},e.cache={},e.cacheKey=function(w,A){return[w,!!A.asString,!!A.disableLambda,A.delimiters,!!A.modelGet].join("||")},e.compile=function(w,A){A=A||{};var S=e.cacheKey(w,A),T=this.cache[S];if(T){var P=T.partials;for(var I in P)delete P[I].instance;return T}return T=this.generate(this.parse(this.scan(w,A.delimiters),w,A),w,A),this.cache[S]=T}})(typeof A0!="undefined"?A0:Hogan)});var OC=F(k0=>{g();var qj={};(function(e){e.Template=function(d,h,p,m){d=d||{},this.r=d.code||this.r,this.c=p,this.options=m||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},e.Template.prototype={r:function(d,h,p){return""},v:u,t:c,render:function(h,p,m){return this.ri([h],p||{},m)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],m=h[p.name];if(p.instance&&p.base==m)return p.instance;if(typeof m=="string"){if(!this.c)throw new Error("No compiler available.");m=this.c.compile(m,this.options)}if(!m)return null;if(this.partials[d].base=m,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);m=r(m,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=m,m},rp:function(d,h,p,m){var v=this.ep(d,p);return v?v.ri(h,p,m):""},rs:function(d,h,p){var m=d[d.length-1];if(!f(m)){p(d,h,this);return}for(var v=0;v<m.length;v++)d.push(m[v]),p(d,h,this),d.pop()},s:function(d,h,p,m,v,y,b){var x;return f(d)&&d.length===0?!1:(typeof d=="function"&&(d=this.ms(d,h,p,m,v,y,b)),x=!!d,!m&&x&&h&&h.push(typeof d=="object"?d:h[h.length-1]),x)},d:function(d,h,p,m){var v,y=d.split("."),b=this.f(y[0],h,p,m),x=this.options.modelGet,E=null;if(d==="."&&f(h[h.length-2]))b=h[h.length-1];else for(var _=1;_<y.length;_++)v=t(y[_],b,x),v!==void 0?(E=b,b=v):b="";return m&&!b?!1:(!m&&typeof b=="function"&&(h.push(E),b=this.mv(b,h,p),h.pop()),b)},f:function(d,h,p,m){for(var v=!1,y=null,b=!1,x=this.options.modelGet,E=h.length-1;E>=0;E--)if(y=h[E],v=t(d,y,x),v!==void 0){b=!0;break}return b?(!m&&typeof v=="function"&&(v=this.mv(v,h,p)),v):m?!1:""},ls:function(d,h,p,m,v){var y=this.options.delimiters;return this.options.delimiters=v,this.b(this.ct(c(d.call(h,m)),h,p)),this.options.delimiters=y,!1},ct:function(d, Line truncated
`)}static async _entryToBuffer(t){let r=Buffer.from(t.path),n=Math.ceil((62+r.length+1)/8)*8,i=Buffer.alloc(n),a=new Fr(i),s=hs(t);return a.writeUInt32BE(s.ctimeSeconds),a.writeUInt32BE(s.ctimeNanoseconds),a.writeUInt32BE(s.mtimeSeconds),a.writeUInt32BE(s.mtimeNanoseconds),a.writeUInt32BE(s.dev),a.writeUInt32BE(s.ino),a.writeUInt32BE(s.mode),a.writeUInt32BE(s.uid),a.writeUInt32BE(s.gid),a.writeUInt32BE(s.size),a.write(t.oid,20,"hex"),a.writeUInt16BE(oO(t)),a.write(t.path,r.length,"utf8"),i}async toObject(){let t=Buffer.alloc(12),r=new Fr(t);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let n=[];for(let o of this.entries)if(n.push(e._entryToBuffer(o)),o.stages.length>1)for(let l of o.stages)l&&l!==o&&n.push(e._entryToBuffer(l));n=await Promise.all(n);let i=Buffer.concat(n),a=Buffer.concat([t,i]),s=await Vn(a);return Buffer.concat([a,Buffer.from(s,"hex")])}};function tu(e,t,r=!0,n=!0){let i=hs(e),a=hs(t);return r&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.ctimeSeconds!==a.ctimeSeconds||i.uid!==a.uid||i.gid!==a.gid||n&&i.ino!==a.ino||i.size!==a.size}var np=null,us=Symbol("IndexCache");function lO(){return{map:new Map,stats:new Map}}async function cO(e,t,r){let n=await e.lstat(t),i=await e.read(t),a=await dp.from(i);r.map.set(t,a),r.stats.set(t,n)}async function uO(e,t,r){let n=r.stats.get(t);if(n===void 0)return!0;let i=await e.lstat(t);return n===null||i===null?!1:tu(n,i)}var yt=class{static async acquire({fs:t,gitdir:r,cache:n,allowUnmerged:i=!0},a){n[us]||(n[us]=lO());let s=`${r}/index`;np===null&&(np=new el.default({maxPending:1/0}));let o,l=[];return await np.acquire(s,async()=>{await uO(t,s,n[us])&&await cO(t,s,n[us]);let c=n[us].map.get(s);if(l=c.unmergedPaths,l.length&&!i)throw new tl(l);if(o=await a(c),c._dirty){let u=await c.toObject();await t.write(s,u),n[us].stats.set(s,await t.lstat(s)),c._dirty=!1}}),o}};function ru(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>-1&&(e=e.slice(t+1)),e}function ps(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t===-1?".":t===0?"/":e.slice(0,t)}function o2(e){let t=new Map,r=function(i){if(!t.has(i)){let a={type:"tree",fullpath:i,basename:ru(i),metadata:{},children:[]};t.set(i,a),a.parent=r(ps(i)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return t.get(i)},n=function(i,a){if(!t.has(i)){let s={type:"blob",fullpath:i,basename:ru(i),metadata:a,parent:r(ps(i)),children:[]};s.parent&&s.parent.children.push(s),t.set(i,s)}return t.get(i)};r(".");for(let i of e)n(i.path,i);return t}function fO(e){switch(e){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new le(`Unexpected GitTree entry mode: ${e.toString(8)}`)}var hp=class{constructor({fs:t,gitdir:r,cache:n}){this.treePromise=yt.acquire({fs:t,gitdir:r,cache:n},async function(a){return o2(a.entries)});let i=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return i.type(this)}async mode(){return i.mode(this)}async stat(){return i.stat(this)}async content(){return i.content(this)}async oid(){return i.oid(this)}}}async readdir(t){let r=t._fullpath,i=(await this.treePromise).get(r);if(!i||i.type==="blob")return null;if(i.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=i.children.map(s=>s.fullpath);return a.sort(du),a}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let n=(await this.treePromise).get(t._fullpath);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let i=n.type==="tree"?{}:hs(n.metadata);t._type=n.type==="tree"?"tree":fO(i.mode),t._mode=i.mode,n.type==="tree"?t._stat=void 0:t._stat=i}return t._stat}async content(t){}async oid(t){if(t._oid===!1){let n=(await this.treePromise).get(t._fullpath);t._oid=n.metadata.oid}return t._oid}},hu=Symbol("GitWalkSymbol");function pu(){let e=Object.create(null);return Object.defineProperty(e,hu,{value:function({fs:t,gitdir:r,cache:n}){return new hp({fs:t,gitdir:r,cache:n})}}),Object.freeze(e),e}var Le=class e extends Se{constructor(t){super(`Could not find ${t}.`),this.code=this.name=e.code,this.data={what:t}}};Le.code="NotFoundError";var zt=class e extends Se{constructor(t,r,n,i){super(`Object ${t} ${i?`at ${i}`:""}was anticipated to be a ${n} but it is a ${r}.`),this.code=this.name=e.code,this.data={oid:t,actual:r,expected:n,filepath:i}}};zt.code="ObjectTypeError";var _i=class e extends Se{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=e.code,this.data={value:t}}};_i.code="InvalidOidError";var rl=class e extends Se{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following:
[remote "${t}"]
fetch = +refs/heads/*:refs/remotes/origin/*
`),this.code=this.name=e.code,this.data={remote:t}}};rl.code="NoRefspecError";var nu=class e{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let r=null;this.parsedConfig=t.trim().split(`
`).map(n=>{if(/^\s*#/.test(n))return{line:n,comment:!0};let i=n.indexOf(" ");if(n.startsWith("^")){let a=n.slice(1);return this.refs.set(r+"^{}",a),{line:n,ref:r,peeled:a}}else{let a=n.slice(0,i);return r=n.slice(i+1),this.refs.set(r,a),{line:n,ref:r,oid:a}}})}return this}static from(t){return new e(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join(`
`)+`
`}},iu=class e{constructor({remotePath:t,localPath:r,force:n,matchPrefix:i}){Object.assign(this,{remotePath:t,localPath:r,force:n,matchPrefix:i})}static from(t){let[r,n,i,a,s]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",l=i==="*";if(l!==(s==="*"))throw new le("Invalid refspec");return new e({remotePath:n,localPath:a,force:o,matchPrefix:l})}translate(t){if(this.matchPrefix){if(t.startsWith(this.remotePath))return this.localPath+t.replace(this.remotePath,"")}else if(t===this.remotePath)return this.localPath;return null}reverseTranslate(t){if(this.matchPrefix){if(t.startsWith(this.localPath))return this.remotePath+t.replace(this.localPath,"")}else if(t===this.localPath)return this.remotePath;return null}},pp=class e{constructor(t=[]){this.rules=t}static from(t){let r=[];for(let n of t)r.push(iu.from(n));return new e(r)}add(t){let r=iu.from(t);this.rules.push(r)}translate(t){let r=[];for(let n of this.rules)for(let i of t){let a=n.translate(i);a&&r.push([i,a])}return r}translateOne(t){let r=null;for(let n of this.rules){let i=n.translate(t);i&&(r=i)}return r}localNamespaces(){return this.rules.filter(t=>t.matchPrefix).map(t=>t.localPath.replace(/\/$/,""))}};function dO(e,t){let r=e.replace(/\^\{\}$/,""),n=t.replace(/\^\{\}$/,""),i=-(r<n)||+(r>n);return i===0?e.endsWith("^{}")?1:-1:i}var Fw=new Map;function $w(e){let t=Fw.get(e);return t||(t=hO(e),Fw.set(e,t)),t}function hO(e){return e=e.split("/./").join("/").replace(/\/{2,}/g,"/"),e==="/."?"/":e==="./"||(e.startsWith("./")&&(e=e.slice(2)),e.endsWith("/.")&&(e=e.slice(0,-2)),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e==="")?".":e}function $(...e){return $w(e.map($w).join("/"))}var pO=e=>{e=e.toLowerCase();let t=parseInt(e);return e.endsWith("k")&&(t*=1024),e.endsWith("m")&&(t*=1024*1024),e.endsWith("g")&&(t*=1024*1024*1024),t},Qo=e=>{if(e=e.trim().toLowerCase(),e==="true"||e==="yes"||e==="on")return!0;if(e==="false"||e==="no"||e==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${e}`)},Lw={core:{filemode:Qo,bare:Qo,logallrefupdates:Qo,symlinks:Qo,ignorecase:Qo,bigFileThreshold:pO}},mO=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,gO=/^[A-Za-z0-9-.]+$/,vO=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,yO=/^[A-Za-z][A-Za-z-]*$/,wO=/^(.*?)( *[#;].*)$/,bO=e=>{let t=mO.exec(e);if(t!=null){let[r,n]=t.slice(1);return[r,n]}return null},_O=e=>{let t=vO.exec(e);if(t!=null){let[r,n="true"]=t.slice(1),i=xO(n),a=SO(i);return[r,a]}return null},xO=e=>{let t=wO.exec(e);if(t==null)return e;let[r,n]=t.slice(1);return Dw(r)&&Dw(n)?`${r}${n}`:r},Dw=e=>(e.match(/(?:^|[^\\])"/g)||[]).length%2!==0,SO=e=>e.split("").reduce((t,r,n,i)=>{let a=r==='"'&&i[n-1]!=="\\",s=r==="\\"&&i[n+1]==='"';return a||s?t:t+r},""),Nw=e=>e!=null?e.toLowerCase():null,mp=(e,t,r)=>[Nw(e),t,Nw(r)].filter(n=>n!=null).join("."),Bw=e=>{let t=e.split("."),r=t.shift(),n=t.pop(),i=t.length?t.join("."):void 0;return{section:r,subsection:i,name:n,path:mp(r,i,n),sectionPath:mp(r,i,null)}},EO=(e,t)=>e.reduce((r,n,i)=>t(n)?i:r,-1),gp=class e{constructor(t){let r=null,n=null;this.parsedConfig=t?t.split(`
`).map(i=>{let a=null,s=null,o=i.trim(),l=bO(o),c=l!=null;if(c)[r,n]=l;else{let f=_O(o);f!=null&&([a,s]=f)}let u=mp(r,n,a);return{line:i,isSection:c,section:r,subsection:n,name:a,value:s,path:u}}):[]}static from(t){return new e(t)}async get(t,r=!1){let n=Bw(t).path,i=this.parsedConfig.filter(a=>a.path===n).map(({section:a,name:s,value:o})=>{let l=Lw[a]&&Lw[a][s];return l?l(o):o});return r?i:i.pop()}async getall(t){return this.get(t,!0)}async getSubsections(t){return this.parsedConfig.filter(r=>r.section===t&&r.isSection).map(r=>r.subsection)}async deleteSection(t,r){this.parsedConfig=this.parsedConfig.filter(n=>!(n.section===t&&n.subsection===r))}async append(t,r){return this.set(t,r,!0)}async set(t,r,n=!1){let{section:i,subsection:a,name:s,path:o,sectionPath:l}=Bw(t),c=EO(this.parsedConfig,u=>u.path===o);if(r==null)c!==-1&&this.parsedConfig.splice(c,1);else if(c!==-1){let u=this.parsedConfig[c],f=Object.assign({},u,{name:s,value:r,modified:!0});n?this.parsedConfig.splice(c+1,0,f):this.parsedConfig[c]=f}else{let u=this.parsedConfig.findIndex(d=>d.path===l),f={section:i,subsection:a,name:s,value:r,modified:!0,path:o};if(gO.test(i)&&yO.test(s))if(u>=0)this.parsedConfig.splice(u+1,0,f);else{let d={section:i,subsection:a,modified:!0,path:l};this.parsedConfig.push(d,f)}}}toString(){return this.parsedConfig.map(({line:t,section:r,subsection:n,name:i,value:a,modified:s=!1})=>s?i!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${i} = "${a}"`:` ${i} = ${a}`:n!=null?`[${r} "${n}"]`:`[${r}]`:t).join(`
`)}},qe=class{static async get({fs:t,gitdir:r}){let n=await t.read(`${r}/config`,{encoding:"utf8"});return gp.from(n)}static async save({fs:t,gitdir:r,config:n}){await t.write(`${r}/config`,n.toString(),{encoding:"utf8"})}},Jc=e=>[`${e}`,`refs/${e}`,`refs/tags/${e}`,`refs/heads/${e}`,`refs/remotes/${e}`,`refs/remotes/${e}/HEAD`],AO=["config","description","index","shallow","commondir"],ip;async function yi(e,t){return ip===void 0&&(ip=new el.default),ip.acquire(e,t)}var W=class e{static async updateRemoteRefs({fs:t,gitdir:r,remote:n,refs:i,symrefs:a,tags:s,refspecs:o=void 0,prune:l=!1,pruneTags:c=!1}){for(let v of i.values())if(!v.match(/[0-9a-f]{40}/))throw new _i(v);let u=await qe.get({fs:t,gitdir:r});if(!o){if(o=await u.getall(`remote.${n}.fetch`),o.length===0)throw new rl(n);o.unshift(`+HEAD:refs/remotes/${n}/HEAD`)}let f=pp.from(o),d=new Map;if(c){let v=await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"});await e.deleteRefs({fs:t,gitdir:r,refs:v.map(y=>`refs/tags/${y}`)})}if(s){for(let v of i.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await e.exists({fs:t,gitdir:r,ref:v})){let y=i.get(v);d.set(v,y)}}let h=f.translate([...i.keys()]);for(let[v,y]of h){let b=i.get(v);d.set(y,b)}let p=f.translate([...a.keys()]);for(let[v,y]of p){let b=a.get(v),x=f.translateOne(b);x&&d.set(y,`ref: ${x}`)}let m=[];if(l){for(let v of f.localNamespaces()){let y=(await e.listRefs({fs:t,gitdir:r,filepath:v})).map(b=>`${v}/${b}`);for(let b of y)d.has(b)||m.push(b)}m.length>0&&await e.deleteRefs({fs:t,gitdir:r,refs:m})}for(let[v,y]of d)await yi(v,async()=>t.write($(r,v),`${y.trim()}
`,"utf8"));return{pruned:m}}static async writeRef({fs:t,gitdir:r,ref:n,value:i}){if(!i.match(/[0-9a-f]{40}/))throw new _i(i);await yi(n,async()=>t.write($(r,n),`${i.trim()}
`,"utf8"))}static async writeSymbolicRef({fs:t,gitdir:r,ref:n,value:i}){await yi(n,async()=>t.write($(r,n),`ref: ${i.trim()}
`,"utf8"))}static async deleteRef({fs:t,gitdir:r,ref:n}){return e.deleteRefs({fs:t,gitdir:r,refs:[n]})}static async deleteRefs({fs:t,gitdir:r,refs:n}){await Promise.all(n.map(o=>t.rm($(r,o))));let i=await yi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"})),a=nu.from(i),s=a.refs.size;for(let o of n)a.refs.has(o)&&a.delete(o);a.refs.size<s&&(i=a.toString(),await yi("packed-refs",async()=>t.write(`${r}/packed-refs`,i,{encoding:"utf8"})))}static async resolve({fs:t,gitdir:r,ref:n,depth:i=void 0}){if(i!==void 0&&(i--,i===-1))return n;if(n.startsWith("ref: "))return n=n.slice(5),e.resolve({fs:t,gitdir:r,ref:n,depth:i});if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let a=await e.packedRefs({fs:t,gitdir:r}),s=Jc(n).filter(o=>!AO.includes(o));for(let o of s){let l=await yi(o,async()=>await t.read(`${r}/${o}`,{encoding:"utf8"})||a.get(o));if(l)return e.resolve({fs:t,gitdir:r,ref:l.trim(),depth:i})}throw new Le(n)}static async exists({fs:t,gitdir:r,ref:n}){try{return await e.expand({fs:t,gitdir:r,ref:n}),!0}catch(i){return!1}}static async expand({fs:t,gitdir:r,ref:n}){if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let i=await e.packedRefs({fs:t,gitdir:r}),a=Jc(n);for(let s of a)if(await yi(s,async()=>t.exists(`${r}/${s}`))||i.has(s))return s;throw new Le(n)}static async expandAgainstMap({ref:t,map:r}){let n=Jc(t);for(let i of n)if(await r.has(i))return i;throw new Le(t)}static resolveAgainstMap({ref:t,fullref:r=t,depth:n=void 0,map:i}){if(n!==void 0&&(n--,n===-1))return{fullref:r,oid:t};if(t.startsWith("ref: "))return t=t.slice(5),e.resolveAgainstMap({ref:t,fullref:r,depth:n,map:i});if(t.length===40&&/[0-9a-f]{40}/.test(t))return{fullref:r,oid:t};let a=Jc(t);for(let s of a){let o=i.get(s);if(o)return e.resolveAgainstMap({ref:o.trim(),fullref:s,depth:n,map:i})}throw new Le(t)}static async packedRefs({fs:t,gitdir:r}){let n=await yi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"}));return nu.from(n).refs}static async listRefs({fs:t,gitdir:r,filepath:n}){let i=e.packedRefs({fs:t,gitdir:r}),a=null;try{a=await t.readdirDeep(`${r}/${n}`),a=a.map(s=>s.replace(`${r}/${n}/`,""))}catch(s){a=[]}for(let s of(await i).keys())s.startsWith(n)&&(s=s.replace(n+"/",""),a.includes(s)||a.push(s));return a.sort(dO),a}static async listBranches({fs:t,gitdir:r,remote:n}){return n?e.listRefs({fs:t,gitdir:r,filepath:`refs/remotes/${n}`}):e.listRefs({fs:t,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:t,gitdir:r}){return(await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"})).filter(i=>!i.endsWith("^{}"))}};function kO(e,t){return du(jw(e),jw(t))}function jw(e){return e.mode==="040000"?e.path+"/":e.path}function l2(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new le(`Unexpected GitTree entry mode: ${e}`)}function TO(e){let t=[],r=0;for(;r<e.length;){let n=e.indexOf(32,r);if(n===-1)throw new le(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);let i=e.indexOf(0,r);if(i===-1)throw new le(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let a=e.slice(r,n).toString("utf8");a==="40000"&&(a="040000");let s=l2(a),o=e.slice(n+1,i).toString("utf8");if(o.includes("\\")||o.includes("/"))throw new ds(o);let l=e.slice(i+1,i+21).toString("hex");r=i+21,t.push({mode:a,path:o,oid:l,type:s})}return t}function CO(e){if(typeof e=="number"&&(e=e.toString(8)),e.match(/^0?4.*/))return"040000";if(e.match(/^1006.*/))return"100644";if(e.match(/^1007.*/))return"100755";if(e.match(/^120.*/))return"120000";if(e.match(/^160.*/))return"160000";throw new le(`Could not understand file mode: ${e}`)}function PO(e){return!e.oid&&e.sha&&(e.oid=e.sha),e.mode=CO(e.mode),e.type||(e.type=l2(e.mode)),e}var tr=class e{constructor(t){if(Buffer.isBuffer(t))this._entries=TO(t);else if(Array.isArray(t))this._entries=t.map(PO);else throw new le("invalid type passed to GitTree constructor");this._entries.sort(i2)}static from(t){return new e(t)}render(){return this._entries.map(t=>`${t.mode} ${t.type} ${t.oid} ${t.path}`).join(`
`)}toObject(){let t=[...this._entries];return t.sort(kO),Buffer.concat(t.map(r=>{let n=Buffer.from(r.mode.replace(/^0/,"")),i=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),s=Buffer.from([0]),o=Buffer.from(r.oid,"hex");return Buffer.concat([n,i,a,s,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let t of this._entries)yield t}},xi=class{static wrap({type:t,object:r}){return Buffer.concat([Buffer.from(`${t} ${r.byteLength.toString()}\0`),Buffer.from(r)])}static unwrap(t){let r=t.indexOf(32),n=t.indexOf(0),i=t.slice(0,r).toString("utf8"),a=t.slice(r+1,n).toString("utf8"),s=t.length-(n+1);if(parseInt(a)!==s)throw new le(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:i,object:Buffer.from(t.slice(n+1))}}};async function RO({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await e.read(`${t}/${n}`);return i?{object:i,format:"deflated",source:n}:null}function MO(e,t){let r=new Fr(e),n=Hw(r);if(n!==t.byteLength)throw new le(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${t.length} bytes`);let i=Hw(r),a,s=Gw(r,t);if(s.byteLength===i)a=s;else{a=Buffer.alloc(i);let o=new Fr(a);for(o.copy(s);!r.eof();)o.copy(Gw(r,t));let l=o.tell();if(i!==l)throw new le(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${l} bytes`)}return a}function Hw(e){let t=0,r=0,n=null;do n=e.readUInt8(),t|=(n&127)<<r,r+=7;while(n&128);return t}function Uw(e,t,r){let n=0,i=0;for(;r--;)t&1&&(n|=e.readUInt8()<<i),t>>=1,i+=8;return n}function Gw(e,t){let r=e.readUInt8(),n=128,i=15,a=112;if(r&n){let s=Uw(e,r&i,4),o=Uw(e,(r&a)>>4,3);return o===0&&(o=65536),t.slice(s,s+o)}else return e.slice(r)}function OO(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function c2(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:OO(e)}var au=class{constructor(t){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=c2(t),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(t){if(!this.eof())return this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t),this.buffer.slice(this.undoCursor,this.cursor)}async skip(t){this.eof()||(this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:t,value:r}=await this.stream.next();return t&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(t){this.undoCursor=this.cursor,this.cursor+=t,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(t){if(this._ended)return;let r=[this.buffer];for(;this.cursor+t>IO(r);){let n=await this._next();if(this._ended)break;r.push(n)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function IO(e){return e.reduce((t,r)=>t+r.length,0)}async function FO(e,t){let r=new au(e),n=await r.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new le(`Invalid PACK header '${n}'`);let i=await r.read(4);if(i=i.readUInt32BE(0),i!==2)throw new le(`Invalid packfile version: ${i}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let s=r.tell(),{type:o,length:l,ofs:c,reference:u}=await $O(r),f=new fu.default.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new le(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==l)throw new le("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await t({data:f.result,type:o,num:a,offset:s,end:h,reference:u,ofs:c})}}}}async function $O(e){let t=await e.byte(),r=t>>4&7,n=t&15;if(t&128){let s=4;do t=await e.byte(),n|=(t&127)<<s,s+=7;while(t&128)}let i,a;if(r===6){let s=0;i=0;let o=[];do t=await e.byte(),i|=(t&127)<<s,s+=7,o.push(t);while(t&128);a=Buffer.from(o)}return r===7&&(a=await e.read(2 Line truncated
`,e}function su(e){let[,t,r,n,i]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:t,email:r,timestamp:Number(n),timezoneOffset:VO(i)}}function VO(e){let[,t,r,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(t==="+"?1:-1)*(Number(r)*60+Number(n)),WO(n)}function WO(e){return e===0?e:-e}var pr=class e{constructor(t){if(typeof t=="string")this._tag=t;else if(Buffer.isBuffer(t))this._tag=t.toString("utf8");else if(typeof t=="object")this._tag=e.render(t);else throw new le("invalid type passed to GitAnnotatedTag constructor")}static from(t){return new e(t)}static render(t){return`object ${t.object}
type ${t.type}
tag ${t.tag}
tagger ${vp(t.tagger)}
${t.message}
${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
`))}message(){let t=this.withoutSignature();return t.slice(t.indexOf(`
`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let t=this.justHeaders().split(`
`),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=`
`+i.slice(1):r.push(i);let n={};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.tagger&&(n.tagger=su(n.tagger)),n.committer&&(n.committer=su(n.committer)),n}withoutSignature(){let t=zn(this._tag);return t.indexOf(`
-----BEGIN PGP SIGNATURE-----`)===-1?t:t.slice(0,t.lastIndexOf(`
-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
-----BEGIN PGP SIGNATURE-----`)===-1)return;let t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return zn(t)}payload(){return this.withoutSignature()+`
`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(t,r,n){let i=t.payload(),{signature:a}=await r({payload:i,secretKey:n});a=zn(a);let s=i+a;return e.from(s)}};function sp(e){return e.trim().split(`
`).map(t=>" "+t).join(`
`)+`
`}function qO(e){return e.split(`
`).map(t=>t.replace(/^ /,"")).join(`
`)}var rr=class e{constructor(t){if(typeof t=="string")this._commit=t;else if(Buffer.isBuffer(t))this._commit=t.toString("utf8");else if(typeof t=="object")this._commit=e.render(t);else throw new le("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:t,signature:r}){let n=e.justHeaders(t),i=e.justMessage(t),a=zn(n+`
gpgsig`+sp(r)+`
`+i);return new e(a)}static from(t){return new e(t)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return e.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return zn(t.slice(t.indexOf(`
`)+2))}static justHeaders(t){return t.slice(0,t.indexOf(`
`))}parseHeaders(){let t=e.justHeaders(this._commit).split(`
`),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=`
`+i.slice(1):r.push(i);let n={parent:[]};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.author&&(n.author=su(n.author)),n.committer&&(n.committer=su(n.committer)),n}static renderHeaders(t){let r="";if(t.tree?r+=`tree ${t.tree}
`:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
`,t.parent){if(t.parent.length===void 0)throw new le("commit 'parent' property should be an array");for(let a of t.parent)r+=`parent ${a}
`}let n=t.author;r+=`author ${vp(n)}
`;let i=t.committer||t.author;return r+=`committer ${vp(i)}
`,t.gpgsig&&(r+="gpgsig"+sp(t.gpgsig)),r}static render(t){return e.renderHeaders(t)+`
`+zn(t.message)}render(){return this._commit}withoutSignature(){let t=zn(this._commit);if(t.indexOf(`
gpgsig`)===-1)return t;let r=t.slice(0,t.indexOf(`
gpgsig`)),n=t.slice(t.indexOf(`-----END PGP SIGNATURE-----
`)+28);return zn(r+`
`+n)}isolateSignature(){let t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return qO(t)}static async sign(t,r,n){let i=t.withoutSignature(),a=e.justMessage(t._commit),{signature:s}=await r({payload:i,secretKey:n});s=zn(s);let l=e.justHeaders(t._commit)+`
gpgsig`+sp(s)+`
`+a;return e.from(l)}};async function bs({fs:e,cache:t,gitdir:r,oid:n}){if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:tr.from([]),oid:n};let{type:i,object:a}=await Ye({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,bs({fs:e,cache:t,gitdir:r,oid:n});if(i==="commit")return n=rr.from(a).parse().tree,bs({fs:e,cache:t,gitdir:r,oid:n});if(i!=="tree")throw new zt(n,i,"tree");return{tree:tr.from(a),oid:n}}var yp=class{constructor({fs:t,gitdir:r,ref:n,cache:i}){this.fs=t,this.cache=i,this.gitdir=r,this.mapPromise=(async()=>{let s=new Map,o;try{o=await W.resolve({fs:t,gitdir:r,ref:n})}catch(c){c instanceof Le&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await bs({fs:t,cache:this.cache,gitdir:r,oid:o});return l.type="tree",l.mode="40000",s.set(".",l),s})();let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,cache:i,gitdir:a}=this,s=await this.mapPromise,o=s.get(r);if(!o)throw new Error(`No obj for ${r}`);let l=o.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:c,object:u}=await Ye({fs:n,cache:i,gitdir:a,oid:l});if(c!==o.type)throw new zt(l,c,o.type);let f=tr.from(u);for(let d of f)s.set($(r,d.path),d);return f.entries().map(d=>$(r,d.path))}async type(t){if(t._type===!1){let r=await this.mapPromise,{type:n}=r.get(t._fullpath);t._type=n}return t._type}async mode(t){if(t._mode===!1){let r=await this.mapPromise,{mode:n}=r.get(t._fullpath);t._mode=a2(parseInt(n,8))}return t._mode}async stat(t){}async content(t){if(t._content===!1){let r=await this.mapPromise,{fs:n,cache:i,gitdir:a}=this,o=r.get(t._fullpath).oid,{type:l,object:c}=await Ye({fs:n,cache:i,gitdir:a,oid:o});l!=="blob"?t._content=void 0:t._content=new Uint8Array(c)}return t._content}async oid(t){if(t._oid===!1){let n=(await this.mapPromise).get(t._fullpath);t._oid=n.oid}return t._oid}};function bi({ref:e="HEAD"}={}){let t=Object.create(null);return Object.defineProperty(t,hu,{value:function({fs:r,gitdir:n,cache:i}){return new yp({fs:r,gitdir:n,ref:e,cache:i})}}),Object.freeze(t),t}var wp=class{constructor({fs:t,dir:r,gitdir:n,cache:i}){this.fs=t,this.cache=i,this.dir=r,this.gitdir=n;let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,dir:i}=this,a=await n.readdir($(i,r));return a===null?null:a.map(s=>$(r,s))}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let{fs:r,dir:n}=this,i=await r.lstat(`${n}/${t._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let a=i.isDirectory()?"tree":"blob";a==="blob"&&!i.isFile()&&!i.isSymbolicLink()&&(a="special"),t._type=a,i=hs(i),t._mode=i.mode,i.size===-1&&t._actualSize&&(i.size=t._actualSize),t._stat=i}return t._stat}async content(t){if(t._content===!1){let{fs:r,dir:n,gitdir:i}=this;if(await t.type()==="tree")t._content=void 0;else{let s=await(await qe.get({fs:r,gitdir:i})).get("core.autocrlf"),o=await r.read(`${n}/${t._fullpath}`,{autocrlf:s});t._actualSize=o.length,t._stat&&t._stat.size===-1&&(t._stat.size=t._actualSize),t._content=new Uint8Array(o)}}return t._content}async oid(t){if(t._oid===!1){let{fs:r,gitdir:n,cache:i}=this,a;await yt.acquire({fs:r,gitdir:n,cache:i},async function(s){let o=s.entriesMap.get(t._fullpath),l=await t.stat(),u=await(await qe.get({fs:r,gitdir:n})).get("core.filemode"),f=typeof process!="undefined"?process.platform!=="win32":!0;!o||tu(l,o,u,f)?await t.content()===void 0?a=void 0:(a=await Vn(xi.wrap({type:"blob",object:await t.content()})),o&&a===o.oid&&(!u||l.mode===o.mode)&&tu(l,o,u,f)&&s.insert({filepath:t._fullpath,stats:l,oid:a})):a=o.oid}),t._oid=a}return t._oid}};function mu(){let e=Object.create(null);return Object.defineProperty(e,hu,{value:function({fs:t,dir:r,gitdir:n,cache:i}){return new wp({fs:t,dir:r,gitdir:n,cache:i})}}),Object.freeze(e),e}function YO(e,t){let r=t-e;return Array.from({length:r},(n,i)=>e+i)}var f2=typeof Array.prototype.flat=="undefined"?e=>e.reduce((t,r)=>t.concat(r),[]):e=>e.flat(),bp=class{constructor(){this.value=null}consider(t){t!=null&&(this.value===null?this.value=t:t<this.value&&(this.value=t))}reset(){this.value=null}};function*XO(e){let t=new bp,r,n=[],i=e.length;for(let a=0;a<i;a++)n[a]=e[a].next().value,n[a]!==void 0&&t.consider(n[a]);if(t.value!==null)for(;;){let a=[];r=t.value,t.reset();for(let s=0;s<i;s++)n[s Line truncated
`),n=new TextEncoder().encode(n)}catch(i){}return typeof n!="string"&&(n=Buffer.from(n)),n}catch(n){return null}}async write(t,r,n={}){try{await this._writeFile(t,r,n);return}catch(i){await this.mkdir(ps(t)),await this._writeFile(t,r,n)}}async mkdir(t,r=!1){try{await this._mkdir(t);return}catch(n){if(n===null||n.code==="EEXIST")return;if(r)throw n;if(n.code==="ENOENT"){let i=ps(t);if(i==="."||i==="/"||i===t)throw n;await this.mkdir(i),await this.mkdir(t,!0)}}}async rm(t){try{await this._unlink(t)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(t,r){try{r&&r.recursive?await this._rm(t,r):await this._rmdir(t)}catch(n){if(n.code!=="ENOENT")throw n}}async readdir(t){try{let r=await this._readdir(t);return r.sort(du),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(t){let r=await this._readdir(t);return(await Promise.all(r.map(async i=>{let a=t+"/"+i;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((i,a)=>i.concat(a),[])}async lstat(t){try{return await this._lstat(t)}catch(r){if(r.code==="ENOENT")return null;throw r}}async readlink(t,r={encoding:"buffer"}){try{let n=await this._readlink(t,r);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(n){if(n.code==="ENOENT")return null;throw n}}async writelink(t,r){return this._symlink(r.toString("utf8"),t)}};function C(e,t){if(t===void 0)throw new er(e)}async function ou(e,t){return!e&&!t?!1:e&&!t||!e&&t?!0:!(await e.type()==="tree"&&await t.type()==="tree"||await e.type()===await t.type()&&await e.mode()===await t.mode()&&await e.oid()===await t.oid())}async function JO({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n="HEAD",cache:i={}}){try{C("fs",e),C("dir",t),C("gitdir",r);let a=new X(e),s=[bi({ref:n}),mu(),pu()],o=[];await yt.acquire({fs:a,gitdir:r,cache:i},async function(c){o=c.unmergedPaths});let l=await _s({fs:a,cache:i,dir:t,gitdir:r,trees:s,map:async function(c,[u,f,d]){let h=!await ou(f,d),p=o.includes(c),m=!await ou(d,u);if(h||p)return u?{path:c,mode:await u.mode(),oid:await u.oid(),type:await u.type(),content:await u.content()}:void 0;if(m)return!1;throw new ml(c)}});await yt.acquire({fs:a,gitdir:r,cache:i},async function(c){for(let u of l)if(u!==!1){if(!u){await a.rmdir(`${t}/${u.path}`,{recursive:!0}),c.delete({filepath:u.path});continue}if(u.type==="blob"){let f=new TextDecoder().decode(u.content);await a.write(`${t}/${u.path}`,f,{mode:u.mode}),c.insert({filepath:u.path,oid:u.oid,stage:0})}}})}catch(a){throw a.caller="git.abortMerge",a}}var xs=class{static async isIgnored({fs:t,dir:r,gitdir:n=$(r,".git"),filepath:i}){if(ru(i)===".git")return!0;if(i===".")return!1;let a="",s=$(n,"info","exclude");await t.exists(s)&&(a=await t.read(s,"utf8"));let o=[{gitignore:$(r,".gitignore"),filepath:i}],l=i.split("/").filter(Boolean);for(let u=1;u<l.length;u++){let f=l.slice(0,u).join("/"),d=l.slice(u).join("/");o.push({gitignore:$(r,f,".gitignore"),filepath:d})}let c=!1;for(let u of o){let f;try{f=await t.read(u.gitignore,"utf8")}catch(p){if(p.code==="NOENT")continue}let d=(0,r2.default)().add(a);d.add(f);let h=ps(u.filepath);if(h!=="."&&d.ignores(h))return!0;c?c=!d.test(u.filepath).unignored:c=d.test(u.filepath).ignored}return c}};async function QO({fs:e,gitdir:t,object:r,format:n,oid:i}){if(n!=="deflated")throw new le("GitObjectStoreLoose expects objects to write to be in deflated format");let a=`objects/${i.slice(0,2)}/${i.slice(2)}`,s=`${t}/${a}`;await e.exists(s)||await e.write(s,r)}var op=null;async function d2(e){return op===null&&(op=t6()),op?e6(e):fu.default.deflate(e)}async function e6(e){let t=new CompressionStream("deflate"),r=new Blob([e]).stream().pipeThrough(t);return new Uint8Array(await new Response(r).arrayBuffer())}function t6(){try{return new CompressionStream("deflate").writable.close(),new Blob([]).stream().cancel(),!0}catch(e){return!1}}async function mr({fs:e,gitdir:t,type:r,object:n,format:i="content",oid:a=void 0,dryRun:s=!1}){return i!=="deflated"&&(i!=="wrapped"&&(n=xi.wrap({type:r,object:n})),a=await Vn(n),n=Buffer.from(await d2(n))),s||await QO({fs:e,gitdir:t,object:n,format:"deflated",oid:a}),a}function r6(e){let t;for(;~(t=e.indexOf(92));)e[t]=47;return e}async function n6({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={},force:a=!1,parallel:s=!0}){try{C("fs",e),C("dir",t),C("gitdir",r),C("filepath",n);let o=new X(e);await yt.acquire({fs:o,gitdir:r,cache:i},async l=>xp({dir:t,gitdir:r,fs:o,filepath:n,index:l,force:a,parallel:s}))}catch(o){throw o.caller="git.add",o}}async function xp({dir:e,gitdir:t,fs:r,filepath:n,index:i,force:a,parallel:s}){n=Array.isArray(n)?n:[n];let o=n.map(async f=>{if(!a&&await xs.isIgnored({fs:r,dir:e,gitdir:t,filepath:f}))return;let d=await r.lstat($(e,f));if(!d)throw new Le(f);if(d.isDirectory()){let h=await r.readdir($(e,f));if(s){let p=h.map(m=>xp({dir:e,gitdir:t,fs:r,filepath:[$(f,m)],index:i,force:a,parallel:s}));await Promise.all(p)}else for(let p of h)await xp({dir:e,gitdir:t,fs:r,filepath:[$(f,p)],index:i,force:a,parallel:s})}else{let p=await(await qe.get({fs:r, Line truncated
`,author:l,committer:c,signingKey:u})}async function a6({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,note:s,force:o,author:l,committer:c,signingKey:u,cache:f={}}){try{C("fs",e),C("gitdir",n),C("oid",a),C("note",s),u&&C("onSign",t);let d=new X(e),h=await fa({fs:d,gitdir:n,author:l});if(!h)throw new Vt("author");let p=await Ss({fs:d,gitdir:n,author:h,committer:c});if(!p)throw new Vt("committer");return await i6({fs:new X(d),cache:f,onSign:t,gitdir:n,ref:i,oid:a,note:s,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}async function v2({fs:e,gitdir:t,remote:r,url:n,force:i}){if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let a=await qe.get({fs:e,gitdir:t});if(!i&&(await a.getSubsections("remote")).includes(r)&&n!==await a.get(`remote.${r}.url`))throw new en("remote",r);await a.set(`remote.${r}.url`,n),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await qe.save({fs:e,gitdir:t,config:a})}async function s6({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n,url:i,force:a=!1}){try{return C("fs",e),C("gitdir",r),C("remote",n),C("url",i),await v2({fs:new X(e),gitdir:r,remote:n,url:i,force:a})}catch(s){throw s.caller="git.addRemote",s}}async function o6({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!u&&await W.exists({fs:e,gitdir:n,ref:i}))throw new en("tag",i);let f=await W.resolve({fs:e,gitdir:n,ref:l||"HEAD"}),{type:d}=await Ye({fs:e,cache:t,gitdir:n,oid:f}),h=pr.from({object:f,type:d,tag:i.replace("refs/tags/",""),tagger:a,message:s,gpgsig:o});c&&(h=await pr.sign(h,r,c));let p=await mr({fs:e,gitdir:n,type:"tag",object:h.toObject()});await W.writeRef({fs:e,gitdir:n,ref:i,value:p})}async function l6({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1,cache:f={}}){try{C("fs",e),C("gitdir",n),C("ref",i),c&&C("onSign",t);let d=new X(e),h=await fa({fs:d,gitdir:n,author:a});if(!h)throw new Vt("tagger");return await o6({fs:d,cache:f,onSign:t,gitdir:n,ref:i,tagger:h,message:s,gpgsig:o,object:l,signingKey:c,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function c6({fs:e,gitdir:t,ref:r,object:n,checkout:i=!1,force:a=!1}){if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let s=`refs/heads/${r}`;if(!a&&await W.exists({fs:e,gitdir:t,ref:s}))throw new en("branch",r,!1);let o;try{o=await W.resolve({fs:e,gitdir:t,ref:n||"HEAD"})}catch(l){}o&&await W.writeRef({fs:e,gitdir:t,ref:s,value:o}),i&&await W.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function u6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,checkout:a=!1,force:s=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),await c6({fs:new X(e),gitdir:r,ref:n,object:i,checkout:a,force:s})}catch(o){throw o.caller="git.branch",o}}var y2=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);async function Tp({fs:e,cache:t,onProgress:r,onPostCheckout:n,dir:i,gitdir:a,remote:s,ref:o,filepaths:l,noCheckout:c,noUpdateHead:u,dryRun:f,force:d,track:h=!0}){let p;if(n)try{p=await W.resolve({fs:e,gitdir:a,ref:"HEAD"})}catch(v){p="0000000000000000000000000000000000000000"}let m;try{m=await W.resolve({fs:e,gitdir:a,ref:o})}catch(v){if(o==="HEAD")throw v;let y=`${s}/${o}`;if(m=await W.resolve({fs:e,gitdir:a,ref:y}),h){let b=await qe.get({fs:e,gitdir:a});await b.set(`branch.${o}.remote`,s),await b.set(`branch.${o}.merge`,`refs/heads/${o}`),await qe.save({fs:e,gitdir:a,config:b})}await W.writeRef({fs:e,gitdir:a,ref:`refs/heads/${o}`,value:m})}if(!c){let v;try{v=await f6({fs:e,cache:t,onProgress:r,dir:i,gitdir:a,ref:o,force:d,filepaths:l})}catch(_){throw _ instanceof Le&&_.data.what===m?new sl(o,m):_}let y=v.filter(([_])=>_==="conflict").map(([_,k])=>k);if(y.length>0)throw new al(y);let b=v.filter(([_])=>_==="error").map(([_,k])=>k);if(b.length>0)throw new le(b.join(", "));if(f){n&&await n({previousHead:p,newHead:m,type:l!=null&&l.length>0?"file":"branch"});return}let x=0,E=v.length;await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="delete"||k==="delete-index").map(async function([k,w]){let A=`${i}/${w}`;k==="delete"&&await e.rm(A),_.delete({filepath:w}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}))}),await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){for(let[k,w]of v)if(k==="rmdir"||k==="rmdir-index"){let A=`${i}/${w}`;try{k==="rmdir-index"&&_.delete({filepath:w}),await e.rmdir(A),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(S){if(S.code==="ENOTEMPTY")console.log(`Did not delete ${w} because directory is not empty`);else throw S}}}),await Promise.all(v.filter(([_])=>_==="mkdir"||_==="mkdir-index").map(async function([_,k]){let w=`${i}/${k}`;await e.mkdir(w),r&&await r({phase:"Updating workdir",loaded:++x,total:E})})),await yt.acquire({fs:e,gitdir:a,cache:t},async Line truncated
`).map(s=>i.add(s))}),i}static async write({fs:t,gitdir:r,oids:n}){la===null&&(la=new el.default);let i=$(r,"shallow");if(n.size>0){let a=[...n].join(`
`)+`
`;await la.acquire(i,async function(){await t.write(i,a,{encoding:"utf8"})})}else await la.acquire(i,async function(){await t.rm(i)})}};async function g6({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return e.exists(`${t}/${n}`)}async function v6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=await e.readdir($(r,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${r}/objects/pack/${s}`,l=await Ap({fs:e,cache:t,filename:o,getExternalRefDelta:i});if(l.error)throw new le(l.error);if(l.offsets.has(n))return!0}return!1}async function Qw({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=o=>Ye({fs:e,cache:t,gitdir:r,oid:o}),s=await g6({fs:e,gitdir:r,oid:n});return s||(s=await v6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a})),s}function y6(e){let i="5041434b"+"00000002"+"00000000";return e.slice(0,12).toString("hex")===i}function b2(e,t){let r=e.map(n=>n.split("=",1)[0]);return t.filter(n=>{let i=n.split("=",1)[0];return r.includes(i)})}var vu={name:"isomorphic-git",version:"1.27.1",agent:"git/isomorphic-git@1.27.1"},fs=class{constructor(){this._queue=[]}write(t){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:t})}else this._queue.push(t)}end(){if(this._ended=!0,this._waiting){let t=this._waiting;this._waiting=null,t({done:!0})}}destroy(t){this.error=t,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(t=>{this._waiting=t})}};function w6(e){let t=e.indexOf("\r"),r=e.indexOf(`
`);return t===-1&&r===-1?-1:t===-1?r+1:r===-1?t+1:r===t+1?r+1:Math.min(t,r)+1}function _2(e){let t=new fs,r="";return(async()=>(await bl(e,n=>{for(n=n.toString("utf8"),r+=n;;){let i=w6(r);if(i===-1)break;t.write(r.slice(0,i)),r=r.slice(i)}}),r.length>0&&t.write(r),t.end()))(),t}var uu=class{static demux(t){let r=We.streamReader(t),n=new fs,i=new fs,a=new fs,s=async function(){let o=await r();if(o===null)return s();if(o===!0){n.end(),a.end(),t.error?i.destroy(t.error):i.end();return}switch(o[0]){case 1:{i.write(o.slice(1));break}case 2:{a.write(o.slice(1));break}case 3:{let l=o.slice(1);a.write(l),n.end(),a.end(),i.destroy(new Error(l.toString("utf8")));return}default:n.write(o)}s()};return s(),{packetlines:n,packfile:i,progress:a}}};async function b6(e){let{packetlines:t,packfile:r,progress:n}=uu.demux(e),i=[],a=[],s=[],o=!1,l=!1;return new Promise((c,u)=>{bl(t,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new _i(h)),i.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new _i(h)),a.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");s.push({oid:h,status:p}),p||(l=!0)}else d.startsWith("NAK")?(o=!0,l=!0):(l=!0,o=!0);l&&(e.error?u(e.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))}).finally(()=>{l||(e.error?u(e.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))})})}function _6({capabilities:e=[],wants:t=[],haves:r=[],shallows:n=[],depth:i=null,since:a=null,exclude:s=[]}){let o=[];t=[...new Set(t)];let l=` ${e.join(" ")}`;for(let c of t)o.push(We.encode(`want ${c}${l}
`)),l="";for(let c of n)o.push(We.encode(`shallow ${c}
`));i!==null&&o.push(We.encode(`deepen ${i}
`)),a!==null&&o.push(We.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)}
`));for(let c of s)o.push(We.encode(`deepen-not ${c}
`));o.push(We.flush());for(let c of r)o.push(We.encode(`have ${c}
`));return o.push(We.encode(`done
`)),o}async function Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:l,ref:c,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1}){let w=c||await ha({fs:e,gitdir:l,test:!0}),A=await qe.get({fs:e,gitdir:l}),S=f||w&&await A.get(`branch.${w}.remote`)||"origin",T=d||await A.get(`remote.${S}.url`);if(typeof T=="undefined")throw new er("remote OR url");let P=u||w&&await A.get(`branch.${w}.merge`)||c||"HEAD";h===void 0&&(h=await A.get("http.corsProxy"));let I=As.getRemoteHelperFor({url:T}),N=await I.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:h,service:"git-upload-pack",url:T,headers:E,protocolVersion:1}),L=N.auth,ee=N.refs;if(ee.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!N.capabilities.has("shallow"))throw new wi("shallow","depth");if(m!==null&&!N.capabilities.has("deepen-since"))throw new wi("deepen-since","since");if(v.length>0&&!N.capabilities.has("deepen-not"))throw new wi("deepen-not","exclude");if(y===!0&&!N.capabilities.has("deepen-relative"))throw new wi("deepen-relative","relative");let{oid:fe,fullref:J}=W.resolveAgainstMap({ref:P,map:ee});for(let H of ee.keys())H===J||H==="HEAD"||H.startsWith("refs/heads/")||b&&H.startsWith("refs/tags/")||ee.delete(H);let Q=b2([...N.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${vu.agent}`]);y&&Q.push("deepen-relative");let Pe=x?[fe]:ee.values(),ge=x?[w]:await W.listRefs({fs:e,gitdir:l,filepath:"refs"}),z=[];for(let H of ge)try{H=await W.expand({fs:e,gitdir:l,ref:H});let Je=await W.resolve({fs:e,gitdir:l,ref:H});await Qw({fs:e,cache:t,gitdir:l,oid:Je})&&z.push(Je)}catch(Je){}z=[...new Set(z)];let Y=await da.read({fs:e,gitdir:l}),O=N.capabilities.has("shallow")?[...Y]:[],he=_6({capabilities:Q,wants:Pe,haves:z,shallows:O,depth:p,since:m,exclude:v}),ze=Buffer.from(await cu(he)),gt=await I.connect({http:r,onProgress:n,corsProxy:h,service:"git-upload-pack",url:T,auth:L,body:[ze],headers:E}),Re=await b6(gt.body);gt.headers&&(Re.headers=gt.headers);for(let H of Re.shallows)if(!Y.has(H))try{let{object:Je}=await Ye({fs:e,cache:t,gitdir:l,oid:H}),D=new rr(Je),q=await Promise.all(D.headers().parent.map(Ne=>Qw({fs:e,cache:t,gitdir:l,oid:Ne})));q.length===0||q.every(Ne=>Ne)||Y.add(H)}catch(Je){Y.add(H)}for(let H of Re.unshallows)Y.delete(H);if(await da.write({fs:e,gitdir:l,oids:Y}),x){let H=new Map([[J,fe]]),Je=new Map,D=10,q=J;for(;D--;){let bt=N.symrefs.get(q);if(bt===void 0)break;Je.set(q,bt),q=bt}let ve=ee.get(q);ve&&H.set(q,ve);let{pruned:Ne}=await W.updateRemoteRefs({fs:e,gitdir:l,remote:S,refs:H,symrefs:Je,tags:b,prune:_});_&&(Re.pruned=Ne)}else{let{pruned:H}=await W.updateRemoteRefs({fs:e,gitdir:l,remote:S,refs:ee,symrefs:N.symrefs,tags:b,prune:_,pruneTags:k});_&&(Re.pruned=H)}if(Re.HEAD=N.symrefs.get("HEAD"),Re.HEAD===void 0){let{oid:H}=W.resolveAgainstMap({ref:"HEAD",map:ee});for(let[Je,D]of ee.entries())if(Je!=="HEAD"&&D===H){Re.HEAD=Je;break}}let ct=J.startsWith("refs/tags")?"tag":"branch";if(Re.FETCH_HEAD={oid:fe,description:`${ct} '${ca(J)}' of ${T}`},n||i){let H=_2(Re.progress);bl(H,async Je=>{if(i&&await i(Je),n){let D=Je.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);D&&await n({phase:D[1].trim(),loaded:parseInt(D[2],10),total:parseInt(D[3],10)})}})}let rt=Buffer.from(await cu(Re.packfile));if(gt.body.error)throw gt.body.error;let Et=rt.slice(-20).toString("hex"),Ie={defaultBranch:Re.HEAD,fetchHead:Re.FETCH_HEAD.oid,fetchHeadDescription:Re.FETCH_HEAD.description};if(Re.headers&&(Ie.headers=Re.headers),_&&(Ie.pruned=Re.pruned),Et!==""&&!y6(rt)){Ie.packfile=`objects/pack/pack-${Et}.pack`;let H=$(l,Ie.packfile);await e.write(H,rt);let Je=q=>Ye({fs:e,cache:t,gitdir:l,oid:q}),D=await nl.fromPack({pack:rt,getExternalRefDelta:Je,onProgress:n});await e.write(H.replace(/\.pack$/,".idx"),await D.toBuffer())}return Ie}async function x2({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){if(await e.exists(n+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(s=>n+"/"+s);for(let s of a)await e.mkdir(s);await e.write(n+"/config",`[core]
repositoryformatversion = 0
filemode = false
bare = ${t}
`+(t?"":` logallrefupdates = true
`)+` symlinks = false
ignorecase = true
`),await e.write(n+"/HEAD",`ref: refs/heads/${i}
`)}async function x6({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPostCheckout:l,dir:c,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:m,since:v,exclude:y,relative:b,singleBranch:x,noCheckout:E,noTags:_,headers:k}){try{if(await x2({fs:e,gitdir:u}),await v2({fs:e,gitdir:u,remote:p,url:f,force:!1}),d){let S=await qe.get({fs:e,gitdir:u});await S.set("http.corsProxy",d),await qe.save({fs:e,gitdir:u,config:S})}let{defaultBranch:w,fetchHead:A}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:m,since:v,exclude:y,relative:b,singleBranch:x,headers:k,tags:!_});if(A===null)return;h=h||w,h=h.replace("refs/heads/",""),await Tp({fs:e,cache:t,onProgress:n,onPostCheckout:l,dir:c,gitdir:u,ref:h,remote:p,noCheckout:E})}catch(w){throw await e.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),w}}async function S6({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c=$(l,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:m=void 0,exclude:v=[],relative:y=!1,singleBranch:b=!1,noCheckout:x=!1,noTags:E=!1,headers:_={},cache:k={}}){try{return C("fs",e),C("http",t),C("gitdir",c),x||C("dir",l),C("url",u),await x6({fs:new X(e),cache:k,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:m,exclude:v,relative:y,singleBranch:b,noCheckout:x,noTags:E,headers:_})}catch(w){throw w.caller="git.clone",w}}async function E6({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h,cache:p={}}){try{C("fs",e),l||C("message",i),o&&C("onSign",t);let m=new X(e);return await gu({fs:m,cache:p,onSign:t,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l,dryRun:c,noUpdateBranch:u,ref:f,parent:d,tree:h})}catch(m){throw m.caller="git.commit",m}}async function A6({fs:e,dir:t,gitdir:r=$(t,".git"),fullname:n=!1,test:i=!1}){try{return C("fs",e),C("gitdir",r),await ha({fs:new X(e),gitdir:r,fullname:n,test:i})}catch(a){throw a.caller="git.currentBranch",a}}async function k6({fs:e,gitdir:t,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await W.exists({fs:e,gitdir:t,ref:r}))throw new Le(r);let i=await W.expand({fs:e,gitdir:t,ref:r}),a=await ha({fs:e,gitdir:t,fullname:!0});if(i===a){let l=await W.resolve({fs:e,gitdir:t,ref:i});await W.writeRef({fs:e,gitdir:t,ref:"HEAD",value:l})}await W.deleteRef({fs:e,gitdir:t,ref:i});let s=ca(r),o=await qe.get({fs:e,gitdir:t});await o.deleteSection("branch",s),await qe.save({fs:e,gitdir:t,config:o})}async function T6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await k6({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteBranch",i}}async function C6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{C("fs",e),C("ref",n),await W.deleteRef({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteRef",i}}async function P6({fs:e,gitdir:t,remote:r}){let n=await qe.get({fs:e,gitdir:t});await n.deleteSection("remote",r),await qe.save({fs:e,gitdir:t,config:n})}async function R6({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("remote",n),await P6({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.deleteRemote",i}}async function M6({fs:e,gitdir:t,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await W.deleteRef({fs:e,gitdir:t,ref:r})}async function O6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await M6({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteTag",i}}async function I6({fs:e,gitdir:t,oid:r}){let n=r.slice(0,2);return(await e.readdir(`${t}/objects/${n}`)).map(a=>`${n}${a}`).filter(a=>a.startsWith(r))}async function F6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=[],s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,c=await Ap({fs:e,cache:t,filename:l,getExternalRefDelta:i});if(c.error)throw new le(c.error);for(let u of c.offsets.keys())u.startsWith(n)&&a.push(u)}return a}async function $6({fs:e,cache:t,gitdir:r,oid:n}){let i=o=>Ye({fs:e,cache:t,gitdir:r,oid:o}),a=await I6({fs:e,gitdir:r,oid:n}),s=await F6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i});for(let o of s)a.indexOf(o)===-1&&a.push(o);if(a.length===1)return a[0];throw a.length>1?new il("oids",n,a):new Le(`an object matching "${n}"`)}async function L6({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await $6({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.expandOid",a}}async function D6({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("gitdir",r),C("ref",n),await W.expand({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.expandRef",i}}asyn Line truncated
`,d+=p.conflict.a.join(""),d+=`${"=".repeat(f)}
`,d+=p.conflict.b.join(""),d+=`${">".repeat(f)} ${n}
`);return{cleanMerge:h,mergedText:d}}async function B6({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),index:i,ourOid:a,baseOid:s,theirOid:o,ourName:l="ours",baseName:c="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=bi({ref:a}),m=bi({ref:s}),v=bi({ref:o}),y=[],b=[],x=[],E=[],_=await _s({fs:e,cache:t,dir:r,gitdir:n,trees:[p,m,v],map:async function(k,[w,A,S]){let T=ru(k),P=await ou(w,A),I=await ou(S,A);switch(`${P}-${I}`){case"false-false":return{mode:await A.mode(),path:T,oid:await A.oid(),type:await A.type()};case"false-true":return S?{mode:await S.mode(),path:T,oid:await S.oid(),type:await S.type()}:void 0;case"true-false":return w?{mode:await w.mode(),path:T,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&A&&S&&await w.type()==="blob"&&await A.type()==="blob"&&await S.type()==="blob")return j6({fs:e,gitdir:n,path:T,ours:w,base:A,theirs:S,ourName:l,baseName:c,theirName:u,mergeDriver:h}).then(async N=>{if(N.cleanMerge)d||i.insert({filepath:k,oid:N.mergeResult.oid,stage:0});else if(y.push(k),b.push(k),!d){let L=await A.oid(),ee=await w.oid(),fe=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:L,stage:1}),i.insert({filepath:k,oid:ee,stage:2}),i.insert({filepath:k,oid:fe,stage:3})}return N.mergeResult});if(A&&!w&&S&&await A.type()==="blob"&&await S.type()==="blob"){if(y.push(k),x.push(k),!d){let N=await A.oid(),L=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:N,stage:1}),i.insert({filepath:k,oid:L,stage:3})}return{mode:await S.mode(),oid:await S.oid(),type:"blob",path:T}}if(A&&w&&!S&&await A.type()==="blob"&&await w.type()==="blob"){if(y.push(k),E.push(k),!d){let N=await A.oid(),L=await w.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:N,stage:1}),i.insert({filepath:k,oid:L,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:T}}if(A&&!w&&!S&&await A.type()==="blob")return;throw new gs}}},reduce:y.length!==0&&(!r||d)?void 0:async(k,w)=>{let A=w.filter(Boolean);if(k&&!(k&&k.type==="tree"&&A.length===0)){if(A.length>0){let T=new tr(A).toObject(),P=await mr({fs:e,gitdir:n,type:"tree",object:T,dryRun:f});k.oid=P}return k}}});return y.length!==0?(r&&!d&&await _s({fs:e,cache:t,dir:r,gitdir:n,trees:[bi({ref:_.oid})],map:async function(k,[w]){let A=`${r}/${k}`;if(await w.type()==="blob"){let S=await w.mode(),T=new TextDecoder().decode(await w.content());await e.write(A,T,{mode:S})}return!0}}),new vs(y,b,x,E)):_.oid}async function j6({fs:e,gitdir:t,path:r,ours:n,base:i,theirs:a,ourName:s,theirName:o,baseName:l,dryRun:c,mergeDriver:u=N6}){let f="blob",d=await i.mode()===await n.mode()?await a.mode():await n.mode();if(await n.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};if(await n.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await a.oid(),type:f}};if(await a.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};let h=Buffer.from(await n.content()).toString("utf8"),p=Buffer.from(await i.content()).toString("utf8"),m=Buffer.from(await a.content()).toString("utf8"),{mergedText:v,cleanMerge:y}=await u({branches:[l,s,o],contents:[p,h,m],path:r}),b=await mr({fs:e,gitdir:t,type:"blob",object:Buffer.from(v,"utf8"),dryRun:c});return{cleanMerge:y,mergeResult:{mode:d,path:r,oid:b,type:f}}}async function S2({fs:e,cache:t,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,onSign:m,mergeDriver:v}){i===void 0&&(i=await ha({fs:e,gitdir:n,fullname:!0})),i=await W.expand({fs:e,gitdir:n,ref:i}),a=await W.expand({fs:e,gitdir:n,ref:a});let y=await W.resolve({fs:e,gitdir:n,ref:i}),b=await W.resolve({fs:e,gitdir:n,ref:a}),x=await Pp({fs:e,cache:t,gitdir:n,oids:[y,b]});if(x.length!==1)throw new gs;let E=x[0];if(E===b)return{oid:y,alreadyMerged:!0};if(s&&E===y)return!l&&!c&&await W.writeRef({fs:e,gitdir:n,ref:i,value:b}),{oid:b,fastForward:!0};{if(o)throw new ll;let _=await yt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async w=>B6({fs:e,cache:t,dir:r,gitdir:n,index:w,ourOid:y,theirOid:b,baseOid:E,ourName:ca(i),baseName:"base",theirName:ca(a),dryRun:l,abortOnConflict:u,mergeDriver:v}));if(_ instanceof vs)throw _;return f||(f=`Merge branch '${ca(a)}' into ${ca(i)}`),{oid:await gu({fs:e,cache:t,gitdir:n,message:f,ref:i,tree:_,parent:[y,b],author:d,committer:h,signingKey:p,onSign:m,dryRun:l,noUpdateBranch:c}),tree:_,mergeCommit:!0}}}async function E2({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,dir:l,gitdir:c,ref:u,url:f,remote:d,remoteRef:h,prune:p,pruneTags:m,fastForward:v,fastForwardOnly:y,corsProxy:b,singleBranch:x,headers:E,author:_,committer:k,signingKey:w}){try{if(!u){let T=await ha({fs:e,gitdir:c});if(!T)throw new er("ref");u=T}let{fetchHead:A,fetchHeadDescription:S}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailur Line truncated
`)),n.push(We.encode(`agent=${vu.agent}
`)),(r||t||e)&&n.push(We.delim()),r&&n.push(We.encode("peel")),t&&n.push(We.encode("symrefs")),e&&n.push(We.encode(`ref-prefix ${e}`)),n.push(We.flush()),n}async function dI({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2,prefix:c,symrefs:u,peelTags:f}){try{C("http",e),C("url",a);let d=await Es.discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(d.protocolVersion===1)return k2(d,c,u,f);let h=await fI({prefix:c,symrefs:u,peelTags:f}),p=await Es.connect({http:e,auth:d.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:h});return uI(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function hI({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),W.listTags({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listTags",n}}function pI(e,t){return e.committer.timestamp-t.committer.timestamp}var mI="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function e2({fs:e,cache:t,gitdir:r,oid:n,fileId:i}){if(i===mI)return;let a=n,s,o=await bs({fs:e,cache:t,gitdir:r,oid:n}),l=o.tree;return i===o.oid?s=o.path:(s=await P2({fs:e,cache:t,gitdir:r,tree:l,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function P2({fs:e,cache:t,gitdir:r,tree:n,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let l=n.entries().map(function(c){let u;return c.oid===i?(u=$(o,c.path),s.push(u)):c.type==="tree"&&(u=Ye({fs:e,cache:t,gitdir:r,oid:c.oid}).then(function({object:f}){return P2({fs:e,cache:t,gitdir:r,tree:tr.from(f),fileId:i,oid:a,filepaths:s,parentPath:$(o,c.path)})})),u});return await Promise.all(l),s}async function gI({fs:e,cache:t,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l}){let c=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),u=[],f=await da.read({fs:e,gitdir:r}),d=await W.resolve({fs:e,gitdir:r,ref:i}),h=[await lu({fs:e,cache:t,gitdir:r,oid:d})],p,m,v;function y(b){v&&n&&u.push(b)}for(;h.length>0;){let b=h.pop();if(c!==void 0&&b.commit.committer.timestamp<=c)break;if(n){let x;try{x=await wl({fs:e,cache:t,gitdir:r,oid:b.commit.tree,filepath:n}),m&&p!==x&&u.push(m),p=x,m=b,v=!0}catch(E){if(E instanceof Le){let _=l&&p;if(_&&(_=await e2({fs:e,cache:t,gitdir:r,oid:b.commit.tree,fileId:p}),_))if(Array.isArray(_)){if(m){let k=await e2({fs:e,cache:t,gitdir:r,oid:m.commit.tree,fileId:p});if(Array.isArray(k))if(_=_.filter(w=>k.indexOf(w)===-1),_.length===1)_=_[0],n=_,m&&u.push(m);else{_=!1,m&&u.push(m);break}}}else n=_,m&&u.push(m);if(!_){if(v&&p&&(u.push(m),!o))break;if(!o&&!l)throw E}m=b,v=!1}else throw E}}else u.push(b);if(a!==void 0&&u.length===a){y(b);break}if(!f.has(b.oid))for(let x of b.commit.parent){let E=await lu({fs:e,cache:t,gitdir:r,oid:x});h.map(_=>_.oid).includes(E.oid)||h.push(E)}h.length===0&&y(b),h.sort((x,E)=>pI(x.commit,E.commit))}return u}async function vI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i="HEAD",depth:a,since:s,force:o,follow:l,cache:c={}}){try{return C("fs",e),C("gitdir",r),C("ref",i),await gI({fs:new X(e),cache:c,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l})}catch(u){throw u.caller="git.log",u}}async function yI({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:m={},mergeDriver:v}){try{C("fs",e),p&&C("onSign",t);let y=new X(e),b=await fa({fs:y,gitdir:n,author:d});if(!b&&(!o||!s))throw new Vt("author");let x=await Ss({fs:y,gitdir:n,author:b,committer:h});if(!x&&(!o||!s))throw new Vt("committer");return await S2({fs:y,cache:m,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:l,noUpdateBranch:c,abortOnConflict:u,message:f,author:b,committer:x,signingKey:p,onSign:t,mergeDriver:v})}catch(y){throw y.caller="git.merge",y}}var wI={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function R2({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Ep.default,s=[];function o(u,f){let d=Buffer.from(u,f);s.push(d),a.update(d)}async function l({stype:u,object:f}){let d=wI[u],h=f.length,p=h>15?128:0,m=h&15;h=h>>>4;let v=(p|d|m).toString(16);for(o(v,"hex");p;)p=h>127?128:0,v=p|h&127,o(Sp(2,v),"hex"),h=h>>>7;o(Buffer.from(await d2(f)))}o("PACK"),o("00000002","hex"),o(Sp(8,i.length),"hex");for(let u of i){let{type:f,object:d}=await Ye({fs:e,cache:t,gitdir:n,oid:u});await l({write:o,object:d,stype:f})}let c=a.digest();return s.push(c),s}async function bI({fs:e,cache:t,gitdir:r,oids:n,write:i}){let a=await R2({fs:e,cache:t,gitdir:r,oids:n}),s=Buffer.from(await cu(a)),l=`pack-${s.slice(-20).toString("hex")}.pack`;return i?(await e.write($(r,`objects/pack/${l}`),s),{filename:l}):{filename:l,packfile:new Uint8Array(s)}}async function _I({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,write:i=!1,cache:a={}}){try{return C("fs",e),C("gitdir", Line truncated
`),i=await n();let a=r.toString("utf8").split(`
`);if(i=a.shift(),!i.startsWith("unpack "))throw new ua('unpack ok" or "unpack [error message]',i);t.ok=i==="unpack ok",t.ok||(t.error=i.slice(7)),t.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),l=s.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let u=l.slice(0,c),f=l.slice(c+1);t.refs[u]={ok:o==="ok",error:f}}return t}async function AI({capabilities:e=[],triplets:t=[]}){let r=[],n=`\0 ${e.join(" ")}`;for(let i of t)r.push(We.encode(`${i.oldoid} ${i.oid} ${i.fullRef}${n}
`)),n="";return r.push(We.flush()),r}async function kI({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:l,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={}}){let b=u||await ha({fs:e,gitdir:c});if(typeof b=="undefined")throw new er("ref");let x=await qe.get({fs:e,gitdir:c});d=d||await x.get(`branch.${b}.pushRemote`)||await x.get("remote.pushDefault")||await x.get(`branch.${b}.remote`)||"origin";let E=h||await x.get(`remote.${d}.pushurl`)||await x.get(`remote.${d}.url`);if(typeof E=="undefined")throw new er("remote OR url");let _=f||await x.get(`branch.${b}.merge`);if(typeof E=="undefined")throw new er("remoteRef");v===void 0&&(v=await x.get("http.corsProxy"));let k=await W.expand({fs:e,gitdir:c,ref:b}),w=m?"0000000000000000000000000000000000000000":await W.resolve({fs:e,gitdir:c,ref:k}),A=As.getRemoteHelperFor({url:E}),S=await A.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:v,service:"git-receive-pack",url:E,headers:y,protocolVersion:1}),T=S.auth,P;if(!_)P=k;else try{P=await W.expandAgainstMap({ref:_,map:S.refs})}catch(Y){if(Y instanceof Le)P=_.startsWith("refs/")?_:`refs/heads/${_}`;else throw Y}let I=S.refs.get(P)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:d,url:E,localRef:{ref:m?"(delete)":k,oid:w},remoteRef:{ref:P,oid:I}}))throw new ws;let N=!S.capabilities.has("no-thin"),L=new Set;if(!m){let Y=[...S.refs.values()],O=new Set;if(I!=="0000000000000000000000000000000000000000"){let he=await Pp({fs:e,cache:t,gitdir:c,oids:[w,I]});for(let ze of he)Y.push(ze);N&&(O=await fp({fs:e,cache:t,gitdir:c,oids:he}))}if(!Y.includes(w)){let he=await SI({fs:e,cache:t,gitdir:c,start:[w],finish:Y});L=await fp({fs:e,cache:t,gitdir:c,oids:he})}if(N){try{let he=await W.resolve({fs:e,gitdir:c,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:ze}=await W.resolveAgainstMap({ref:he.replace(`refs/remotes/${d}/`,""),fullref:he,map:S.refs}),gt=[ze];for(let Re of await fp({fs:e,cache:t,gitdir:c,oids:gt}))O.add(Re)}catch(he){}for(let he of O)L.delete(he)}if(w===I&&(p=!0),!p){if(k.startsWith("refs/tags")&&I!=="0000000000000000000000000000000000000000")throw new ys("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&I!=="0000000000000000000000000000000000000000"&&!await T2({fs:e,cache:t,gitdir:c,oid:w,ancestor:I,depth:-1}))throw new ys("not-fast-forward")}}let ee=b2([...S.capabilities],["report-status","side-band-64k",`agent=${vu.agent}`]),fe=await AI({capabilities:ee,triplets:[{oldoid:I,oid:w,fullRef:P}]}),J=m?[]:await R2({fs:e,cache:t,gitdir:c,oids:[...L]}),Q=await A.connect({http:r,onProgress:n,corsProxy:v,service:"git-receive-pack",url:E,auth:T,headers:y,body:[...fe,...J]}),{packfile:Pe,progress:ge}=await uu.demux(Q.body);if(i){let Y=_2(ge);bl(Y,async O=>{await i(O)})}let z=await EI(Pe);if(Q.headers&&(z.headers=Q.headers),d&&z.ok&&z.refs[P].ok&&!k.startsWith("refs/tags")){let Y=`refs/remotes/${d}/${P.replace("refs/heads","")}`;m?await W.deleteRef({fs:e,gitdir:c,ref:Y}):await W.writeRef({fs:e,gitdir:c,ref:Y,value:w})}if(z.ok&&Object.values(z.refs).every(Y=>Y.ok))return z;{let Y=Object.entries(z.refs).filter(([O,he])=>!he.ok).map(([O,he])=>`
- ${O}: ${he.error}`).join("");throw new cl(Y,z)}}async function TI({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:l,gitdir:c=$(l,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={},cache:b={}}){try{return C("fs",e),C("http",t),C("gitdir",c),await kI({fs:new X(e),cache:b,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:m,corsProxy:v,headers:y})}catch(x){throw x.caller="git.push",x}}async function M2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await Ye({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,M2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="blob")throw new zt(n,i,"blob");return{oid:n,blob:new Uint8Array(a)}}async function O2({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){return i!==void 0&&(n=await wl({fs:e,cache:t,gitdir:r,oid:n,filepath:i})),await M2({fs:e,cache:t,gitdir:r,oid:n})}async function _l({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await O2({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function CI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await lu({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readCommit",a}}async function PI({fs:e,cache:t,gitdir:r,ref:n="refs/notes/commits",oid:i}){let a=await W.resolve({gitdir:r,fs:e,ref:n}),{blob:s}=await O2({fs:e,cache:t,gitdir:r,oid:a,filepath:i});return s}async function RI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",oid:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oid",i),await PI({fs:new X(e),cache:a,gitdir:r,ref:n,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function MI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{C("fs",e),C("gitdir",r),C("oid",n);let l=new X(e);a!==void 0&&(n=await wl({fs:l,cache:o,gitdir:r,oid:n,filepath:a}));let u=await Ye({fs:l,cache:o,gitdir:r,oid:n,format:i==="parsed"?"content":i});if(u.oid=n,i==="parsed")switch(u.format="parsed",u.type){case"commit":u.object=rr.from(u.object).parse();break;case"tree":u.object=tr.from(u.object).entries();break;case"blob":s?u.object=u.object.toString(s):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=pr.from(u.object).parse();break;default:throw new zt(u.oid,u.type,"blob|commit|tag|tree")}else(u.format==="deflated"||u.format==="wrapped")&&(u.type=u.format);return u}catch(l){throw l.caller="git.readObject",l}}async function OI({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await Ye({fs:e,cache:t,gitdir:r,oid:n,format:"content"});if(i!=="tag")throw new zt(n,i,"tag");let s=pr.from(a);return{oid:n,tag:s.parse(),payload:s.payload()}}async function II({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await OI({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readTag",a}}async function FI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i=void 0,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await ks({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function $I({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n),await yt.acquire({fs:new X(e),gitdir:r,cache:i},async function(a){a.delete({filepath:n})})}catch(a){throw a.caller="git.remove",a}}async function LI({fs:e,cache:t,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l}){let c;try{c=await W.resolve({gitdir:n,fs:e,ref:i})}catch(p){if(!(p instanceof Le))throw p}let f=(await ks({fs:e,gitdir:n,oid:c||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==a);let d=await kp({fs:e,gitdir:n,tree:f});return await gu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:d,parent:c&&[c],message:`Note removed by 'isomorphic-git removeNote'
`,author:s,committer:o,signingKey:l})}async function DI({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l,cache:c={}}){try{C("fs",e),C("gitdir",n),C("oid",a);let u=new X(e),f=await fa({fs:u,gitdir:n,author:s});if(!f)throw new Vt("author");let d=await Ss({fs:u,gitdir:n,author:f,committer:o});if(!d)throw new Vt("committer");return await LI({fs:u,cache:c,onSign:t,gitdir:n,ref:i,oid:a,author:f,committer:d,signingKey:l})}catch(u){throw u.caller="git.removeNote",u}}async function NI({fs:e,gitdir:t,oldref:r,ref:n,checkout:i=!1}){if(n!==Qr.default.clean(n))throw new Wn(n,Qr.default.clean(n));if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let a=`refs/heads/${r}`,s=`refs/heads/${n}`;if(await W.exists({fs:e,gitdir:t,ref:s}))throw new en("branch",n,!1);let l=await W.resolve({fs:e,gitdir:t,ref:a,depth:1});await W.writeRef({fs:e,gitdir:t,ref:s,value:l}),await W.deleteRef({fs:e,gitdir:t,ref:a});let u=await ha({fs:e,gitdir:t,fullname:!0})===a;(i||u)&&await W.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function BI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,oldref:i,checkout:a=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oldref",i),await NI({fs:new X(e),gitdir:r,ref:n,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function I2({gitdir:e,type:t,object:r}){return Vn(xi.wrap({type:t,object:r}))}async function jI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i,cache:a={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let s=new X(e),o,l;try{o=await W.resolve({fs:s,gitdir:r,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await wl({fs:s,cache:a,gitdir:r,oid:o,filepath:n})}catch(f){o=null}let c={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},u=t&&await s.read($(t,n));u&&(l=await I2({gitdir:r,type:"blob",object:u}),o===l&&(c=await s.lstat($(t,n)))),await yt.acquire({fs:s,gitdir:r,cache:a},async function(f){f.delete({filepath:n}),o&&f.insert({filepath:n,stats:c,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function HI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,depth:i}){try{return C("fs",e),C("gitdir",r),C("ref",n),await W.resolve({fs:new X(e),gitdir:r,ref:n,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function UI({fs:e,dir:t,gitdir:r=$(t,".git"),path:n,value:i,append:a=!1}){try{C("fs",e),C("gitdir",r),C("path",n);let s=new X(e),o=await qe.get({fs:s,gitdir:r});a?await o.append(n,i):await o.set(n,i),await qe.save({fs:s,gitdir:r,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function GI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let a=new X(e);if(await xs.isIgnored({fs:a,gitdir:r,dir:t,filepath:n}))return"ignored";let o=await zI({fs:a,cache:i,gitdir:r}),l=await F2({fs:a,cache:i,gitdir:r,tree:o,path:n}),c=await yt.acquire({fs:a,gitdir:r,cache:i},async function(m){for(let v of m)if(v.path===n)return v;return null}),u=await a.lstat($(t,n)),f=l!==null,d=c!==null,h=u!==null,p=async()=>{if(d&&!tu(c,u))return c.oid;{let m=await a.read($(t,n)),v=await I2({gitdir:r,type:"blob",object:m});return d&&c.oid===v&&u.size!==-1&&yt.acquire({fs:a,gitdir:r,cache:i},async function(y){y.insert({filepath:n,stats:u,oid:v})}),v}};if(!f&&!h&&!d)return"absent";if(!f&&!h&&d)return"*absent";if(!f&&h&&!d)return"*added";if(!f&&h&&d)return await p()===c.oid?"added":"*added";if(f&&!h&&!d)return"deleted";if(f&&!h&&d)return l===c.oid,"*deleted";if(f&&h&&!d)return await p()===l?"*undeleted":"*undeletemodified";if(f&&h&&d){let m=await p();return m===l?m===c.oid?"unmodified":"*unmodified":m===c.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function F2({fs:e,cache:t,gitdir:r,tree:n,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of n)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:l}=await Ye({fs:e,cache:t,gitdir:r,oid:s.oid});if(o==="tree"){let c=tr.from(l);return F2({fs:e,cache:t,gitdir:r,tree:c,path:i})}if(o==="blob")throw new zt(s.oid,o,"blob",i.join("/"))}return null}async function zI({fs:e,cache:t,gitdir:r}){let n;try{n=await W.resolve({fs:e,gitdir:r,ref:"HEAD"})}catch(a){if(a instanceof Le)return[]}let{tree:i}=await ks({fs:e,cache:t,gitdir:r,oid:n});return i}async function VI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="HEAD",filepaths:i=["."],filter:a,cache:s={},ignored:o=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let l=new X(e);return await _s({fs:l,cache:s,dir:t,gitdir:r,trees:[bi({ref:n}),mu(),pu()],map:async function(c,[u,f,d]){if(!u&&!d&&f&&!o&&await xs.isIgnored({fs:l,dir:t,filepath:c})||!i.some(k=>y2(c,k)))return null;if(a&&!a(c))return;let[h,p,m]=await Promise.all([u&&u.type(),f&&f.type(),d&&d.type()]),v=[h,p,m].includes("blob");if((h==="tree"||h==="special")&&!v)return;if(h==="commit")return null;if((p==="tree"||p==="special")&&!v)return;if(m==="commit")return null;if((m==="tree"||m==="special")&&!v)return;let y=h==="blob"?await u.oid():void 0,b=m==="blob"?a Line truncated
`){return e.split(r).reduce((n,i)=>{let a=t?i.trim():i;return a&&n.push(a),n},[])}function Jp(e,t){return Rl(e,!0).map(r=>t(r))}function Qp(e){return(0,Fu.exists)(e,Fu.FOLDER)}function Ce(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Cb(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function $u(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Sn(e){return Array.isArray(e)?e:[e]}function Pb(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Rb(e){return Sn(e).map(String)}function Fe(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function Al(e,t){let r=[];for(let n=0,i=e.length;n<i;n++)r.push(t,e[n]);return r}function kl(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Mb(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function Np(e=0){return new Promise(t=>setTimeout(t,e))}function Bp(e){if(e!==!1)return e}var Os,ya,Ml,Lu=V({"src/lib/utils/util.ts"(){"use strict";Os="\0",ya=()=>{},Ml=Object.prototype.toString.call.bind(Object.prototype.toString)}});function En(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function em(e,t){let r=Cu(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function tm(e){return!!e&&Ml(e)==="[object Object]"}function Ob(e){return typeof e=="function"}var Ol,Mt,Ib,Pu,rm,Fb=V({"src/lib/utils/argument-filters.ts"(){"use strict";Lu(),Cl(),Ol=e=>Array.isArray(e),Mt=e=>typeof e=="string",Ib=e=>Array.isArray(e)&&e.every(Mt),Pu=e=>Mt(e)||Array.isArray(e)&&e.every(Mt),rm=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),jp,R8=V({"src/lib/utils/exit-codes.ts"(){"use strict";jp=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(jp||{})}}),Tl,M8=V({"src/lib/utils/git-output-streams.ts"(){"use strict";Tl=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new Tl(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),ce,Ei,O8=V({"src/lib/utils/line-parser.ts"(){"use strict";ce=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,a)=>this.addMatch(i,a,r(a)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},Ei=class extends ce{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function $b(...e){let t=process.cwd(),r=Object.assign($r({baseDir:t},Lb),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Lb,I8=V({"src/lib/utils/simple-git-options.ts"(){"use strict";Lb={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function nm(e,t=[]){return tm(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];return Cu(i)?r.push(i):em(i,["boolean"])?r.push(n+"="+i):r.push(n),r},t):t}function nr(e,t=0,r=!1){let n=[];for(let i=0,a=t<0?e.length:t;i<a;i++)"string|number".includes(typeof e[i])&&n.push(String(e[i]));return nm(im(e),n),r||n.push(...F8(e)),n}function F8(e){let t=typeof va(e)=="function";return En(va(e,t?1:0),Ol,[])}function im(e){let t=Ob(va(e));return En(va(e,t?1:0),tm)}function et(e,t=!0){let r=Sb(va(e));return t||Eb(r)?r:void 0}var $8=V({"src/lib/utils/task-options.ts"(){"use strict";Fb(),Lu(),Cl()}});function Hp(e,t){return e(t.stdOut,t.stdErr)}function ar(e,t,r,n=!0){return Sn(r).forEach(i=>{for(let a=Rl(i,n),s=0,o=a.length;s<o;s++){let l=(c=0)=>{if(!(s+c>=o))return a[s+c]};t.some(({parse:c})=>c(l,e))}}),e}var L8=V({"src/lib/utils/task-parser.ts"(){"use strict";Lu()}}),Db={};at(Db,{ExitCodes:()=>jp,GitOutputStreams:()=>Tl,LineParser:()=>ce,NOOP:()=>ya,NULL:()=>Os,RemoteLineParser:()=>Ei,append:()=>Ce,appendTaskOptions:()=>nm,asArray:()=>Sn,asCamelCase:()=>Pb,asFunction:()=>Sb,asNumber:()=>Fe,asStringArray:()=>Rb,bufferToString:()=>kl,callTaskParser:()=>Hp,createInstanceConfig:()=>$b,delay:()=>Np,filterArray:()=>Ol,filterFunction:()=>Ob,filterHasLength:()=>rm,filterPlainObject:()=>tm,filterPrimitives:()=>em,filterString:()=>Mt,filterStringArray:()=>Ib,filterStringOrStringArray:()=>Pu,filterType:()=>En,first:()=>kb,folderExists:()=>Qp,forEachLineWithContent:()=>Jp,getTrailingOptions:()=>nr,including:()=>Cb,isUserFunction:()=>Eb,last:()=>va,objectToString:()=>Ml,orVoid:()=>Bp,parseStringResponse:()=>ar,pick:()=>Mb,prefixedArray:()=>Al,remove:()=>$u,splitOn:()=>Ab,toLinesWithContent:()=>Rl,trailingFunctionArgument:()=>et,trailingOptionsArgument:()=>im});var oe=V({"src/lib/utils/index.ts"(){"use strict";Fb(),R8(),M8(),O8(),I8(),$8(),L8(),Lu()}}),Nb= Line truncated
`)){let l=Ab(s,`
`);o=l[0],s=l[1]}yield{file:a,key:o,value:s}}}var e_,Z8=V({"src/lib/responses/ConfigList.ts"(){"use strict";oe(),e_=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=va(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Op(e,t){return typeof e=="string"&&zp.hasOwnProperty(e)?e:t}function K8(e,t,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(a){return a}}}function J8(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return Y8(n,e)}}}function Q8(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return q8(r)}}}function eF(){return{addConfig(e,t,...r){return this._runTask(K8(e,t,r[0]===!0,Op(r[1],"local")),et(arguments))},getConfig(e,t){return this._runTask(J8(e,Op(t,void 0)),et(arguments))},listConfig(...e){return this._runTask(Q8(Op(e[0],void 0)),et(arguments))}}}var zp,t_=V({"src/lib/tasks/config.ts"(){"use strict";Z8(),oe(),zp=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(zp||{})}});function tF(e){return r_.has(e)}var Ip,r_,n_=V({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ip=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Ip||{}),r_=new Set(Object.values(Ip))}});function rF(...e){return new a_().param(...e)}function nF(e){let t=new Set,r={};return Jp(e,n=>{let[i,a,s]=n.split(Os);t.add(i),(r[i]=r[i]||[]).push({line:Fe(a),path:i,preview:s})}),{paths:t,results:r}}function iF(){return{grep(e){let t=et(arguments),r=nr(arguments);for(let i of i_)if(r.includes(i))return this._runTask(ir(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=rF().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(i){return nF(i)}},t)}}}var i_,xl,z2,a_,s_=V({"src/lib/tasks/grep.ts"(){"use strict";oe(),it(),i_=["-h"],xl=Symbol("grepQuery"),a_=class{constructor(){this[z2]=[]}*[(z2=xl,Symbol.iterator)](){for(let e of this[xl])yield e}and(...e){return e.length&&this[xl].push("--and","(",...Al(e,"-e"),")"),this}param(...e){return this[xl].push(...Al(e,"-e")),this}}}}),o_={};at(o_,{ResetMode:()=>Au,getResetMode:()=>sF,resetTask:()=>aF});function aF(e,t){let r=["reset"];return l_(e)&&r.push(`--${e}`),r.push(...t),Wt(r)}function sF(e){if(l_(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function l_(e){return c_.includes(e)}var Au,c_,u_=V({"src/lib/tasks/reset.ts"(){"use strict";it(),Au=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(Au||{}),c_=Array.from(Object.values(Au))}});function oF(){return(0,Ru.default)("simple-git")}function V2(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...i)=>{e(n,...i),r(n,...i)}:e:(n,...i)=>{e(`%s ${n}`,t,...i),r&&r(n,...i)}}function lF(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function um(e,t,r,n=oF()){let i=e&&`[${e}]`||"",a=[],s=typeof t=="string"?n.extend(t):t,o=lF(En(t,Mt),s,n);return c(r);function l(u,f){return Ce(a,um(e,o.replace(/^[^:]+/,u),f,n))}function c(u){let f=u&&`[${u}]`||"",d=s&&V2(s,f)||ya,h=V2(n,`${i} ${f}`,d);return Object.assign(s?d:h,{label:e,sibling:l,info:h,step:c})}}var f_=V({"src/lib/git-logger.ts"(){"use strict";oe(),Ru.default.formatters.L=e=>String(rm(e)?e.length:"-"),Ru.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Ml(e)}}),xu,Vp,cF=V({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";Ai(),f_(),xu=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=xu.getName(e.commands[0]),r=um(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new wr(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task" Line truncated
`).map(i$).filter(Boolean);t||r.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return n$(Su(s[0]),Su(o[0]));for(let l=0,c=Math.max(s.length,o.length);l<c;l++){let u=yx(Su(s[l]),Su(o[l]));if(u)return u}return 0});let n=t?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new mb(r,n)}}}),bx={};at(bx,{addAnnotatedTagTask:()=>l$,addTagTask:()=>o$,tagListTask:()=>s$});function s$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return wx(r,t)}}}function o$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function l$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var c$=V({"src/lib/tasks/tag.ts"(){"use strict";a$()}}),u$=T8({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(dF(),Qe(h_)),{SimpleGitApi:n}=(u4(),Qe(q_)),{Scheduler:i}=(f4(),Qe(Y_)),{configurationErrorTask:a}=(it(),Qe(Gp)),{asArray:s,filterArray:o,filterPrimitives:l,filterString:c,filterStringOrStringArray:u,filterType:f,getTrailingOptions:d,trailingFunctionArgument:h,trailingOptionsArgument:p}=(oe(),Qe(Db)),{applyPatchTask:m}=(h4(),Qe(K_)),{branchTask:v,branchLocalTask:y,deleteBranchesTask:b,deleteBranchTask:x}=(E4(),Qe(nx)),{checkIgnoreTask:E}=(T4(),Qe(sx)),{checkIsRepoTask:_}=(Hb(),Qe(Nb)),{cloneTask:k,cloneMirrorTask:w}=(R4(),Qe(ox)),{cleanWithOptionsTask:A,isCleanOptionsArray:S}=(Jb(),Qe(Zb)),{diffSummaryTask:T}=(vm(),Qe(k_)),{fetchTask:P}=($4(),Qe(ux)),{moveTask:I}=(B4(),Qe(dx)),{pullTask:N}=(H4(),Qe(hx)),{pushTagsTask:L}=(H_(),Qe(j_)),{addRemoteTask:ee,getRemotesTask:fe,listRemotesTask:J,remoteTask:Q,removeRemoteTask:Pe}=(Z4(),Qe(mx)),{getResetMode:ge,resetTask:z}=(u_(),Qe(o_)),{stashListTask:Y}=(J4(),Qe(gx)),{addSubModuleTask:O,initSubModuleTask:he,subModuleTask:ze,updateSubModuleTask:gt}=(r$(),Qe(vx)),{addAnnotatedTagTask:Re,addTagTask:ct,tagListTask:rt}=(c$(),Qe(bx)),{straightThroughBufferTask:Et,straightThroughStringTask:Ie}=(it(),Qe(Gp));function H(D,q){this._plugins=q,this._executor=new r(D.baseDir,new i(D.maxConcurrentProcesses),q),this._trimmed=D.trimmed}(H.prototype=Object.create(n.prototype)).constructor=H,H.prototype.customBinary=function(D){return this._plugins.reconfigure("binary",D),this},H.prototype.env=function(D,q){return arguments.length===1&&typeof D=="object"?this._executor.env=D:(this._executor.env=this._executor.env||{})[D]=q,this},H.prototype.stashList=function(D){return this._runTask(Y(p(arguments)||{},o(D)&&D||[]),h(arguments))};function Je(D,q,ve,Ne){return typeof ve!="string"?a(`git.${D}() requires a string 'repoPath'`):q(ve,f(Ne,c),d(arguments))}H.prototype.clone=function(){return this._runTask(Je("clone",k,...arguments),h(arguments))},H.prototype.mirror=function(){return this._runTask(Je("mirror",w,...arguments),h(arguments))},H.prototype.mv=function(D,q){return this._runTask(I(D,q),h(arguments))},H.prototype.checkoutLatestTag=function(D){var q=this;return this.pull(function(){q.tags(function(ve,Ne){q.checkout(Ne.latest,D)})})},H.prototype.pull=function(D,q,ve,Ne){return this._runTask(N(f(D,c),f(q,c),d(arguments)),h(arguments))},H.prototype.fetch=function(D,q){return this._runTask(P(f(D,c),f(q,c),d(arguments)),h(arguments))},H.prototype.silent=function(D){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},H.prototype.tags=function(D,q){return this._runTask(rt(d(arguments)),h(arguments))},H.prototype.rebase=function(){return this._runTask(Ie(["rebase",...d(arguments)]),h(arguments))},H.prototype.reset=function(D){return this._runTask(z(ge(D),d(arguments)),h(arguments))},H.prototype.revert=function(D){let q=h(arguments);return typeof D!="string"?this._runTask(a("Commit must be a string"),q):this._runTask(Ie(["revert",...d(arguments,0,!0),D]),q)},H.prototype.addTag=function(D){let q=typeof D=="string"?ct(D):a("Git.addTag requires a tag name");return this._runTask(q,h(arguments))},H.prototype.addAnnotatedTag=function(D,q){return this._runTask(Re(D,q),h(arguments))},H.prototype.deleteLocalBranch=function(D,q,ve){return this._runTask(x(D,typeof q=="boolean"?q:!1),h(arguments))},H.prototype.deleteLocalBranches=function(D,q,ve){return this._runTask(b(D,typeof q=="boolean"?q:!1),h(arguments))},H.prototype.branch=function(D,q){return this._runTask(v(d(arguments)),h(arguments))},H.prototype.branchLocal=function(D){return this._runTask(y(),h(arguments))},H.prototype.raw=function(D){let q=!Array.isArray(D),ve=[].slice.call(q?arguments:D,0);for(let bt=0;bt<ve.length&&q;bt++)if(!l(ve[bt])){ve.splice(bt,ve.length-bt);break}ve.push(...d(arguments,0,!0));var Ne=h(arguments);return ve.length?this._runTask(Ie(ve,this._trimmed),Ne):this._runTask(a("Raw: must supply one or more command to execute"),Ne)},H.prototype.submoduleAdd=function(D,q,ve){return this._runTask(O(D,q),h(arguments))},H.prototype.submoduleUpdate=function(D,q){return this._runTas Line truncated
PROMPT="$1"
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
cleanup() {
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
}
trap cleanup EXIT
echo "$PROMPT" > "$TEMP_FILE"
while [ ! -e "$TEMP_FILE.response" ]; do
if [ ! -e "$TEMP_FILE" ]; then
echo "Trigger file got removed: Abort" >&2
exit 1
fi
sleep 0.1
done
RESPONSE=$(cat "$TEMP_FILE.response")
echo "$RESPONSE"
`,Ax=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];g();var kx=require("obsidian"),I$={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0,obscure:!1},$e=class extends kx.SuggestModal{constructor(t,r){if(super(t.app),this.config={...I$,...r},this.setPlaceholder(this.config.placeholder),this.config.obscure){this.inputEl.type="password";let n=this.containerEl.querySelector(".prompt-input-container");n.addClass("git-obscure-prompt"),n.setAttr("git-is-obscured","true");let i=n==null?void 0:n.createDiv({cls:"search-input-clear-button"});i.style.marginRight="32px",i.id="git-show-password",i.addEventListener("click",()=>{n.getAttr("git-is-obscured")==="true"?(this.inputEl.type="text",n.setAttr("git-is-obscured","false")):(this.inputEl.type="password",n.setAttr("git-is-obscured","true"))})}}openAndGetResult(){return new Promise(t=>{this.resolve=t,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(t=>setTimeout(t,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(t){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[t.length>0?t:" ",...this.config.options]:[t.length>0?t:"...",...this.config.options]}renderSuggestion(t,r){this.config.obscure?r.hide():r.setText(t)}onChooseSuggestion(t,r){if(this.resolve){let n;this.config.allowEmpty&&t===" "?n="":t==="..."?n=void 0:n=t,this.resolve(n)}}};g();function Tx(e,t){let r=Object.assign({},e.lineAuthor,t.lineAuthor);return Object.assign({},e,t,{lineAuthor:r})}var $s=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};g();var cT=Ve(Vx()),uT=require("child_process"),fT=Ve(lT()),Kn=require("obsidian");var Gg=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);function nn(e,t){let r;if(t){if(t.button===0||t.button===1){let n=Kn.Keymap.isModEvent(t);r=e.workspace.getLeaf(n)}}else r=e.workspace.getLeaf(!1);return r}function Tn(e,t,r,n,i){if(t.button==2){let a=e.vault.getAbstractFileByPath(r);if(a!=null){let s=new Kn.Menu;e.workspace.trigger("file-menu",s,a,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}else{let s=new Kn.Menu;e.workspace.trigger("obsidian-git:menu",s,r,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}}}function Ii(e){throw new Error("Impossible branch: "+e)}function zg(e){return`rgb(${e.r},${e.g},${e.b})`}function dT(e){var a;let t=(a=cT.fromString(e))==null?void 0:a.toRgbaArray();if(t===void 0)return;let[r,n,i]=t;return{r,g:n,b:i}}function hT(e){return e.diff(Kn.moment.unix(0),"seconds")}function pT(e){if(e.length!==0)return e.slice().sort()[Math.floor(e.length/2)]}function mT(e,t){return(0,fT.default)(e,t,{strict:!0})}function Wl(e,t){return new Proxy(e,{get(r,n){return n==="length"?Math.min(t,r.length):r[n]}})}function gT(e,t,r){return e.length<=t?new Array(t-e.length).fill(r).join("")+e:e.substring(e.length-t)}function vT(e,t){if(t<=0)return e;let r=new Array(t).fill(" ").join(""),n=e.substring(t,e.length);return r+n}function Vg(e,t,r){return e<=t&&t<=r}function Fi(e){let[t,...r]=e.split("/");return[t,r.length===0?void 0:r.join("/")]}function Cn(e){return e.endsWith("/")?e:e.split("/").last().replace(/\.md$/,"")}function yT(e){return e===1?"1 minute":`${e} minutes`}function $B(e){let t=e.lastIndexOf(".");retu Line truncated
`):i="Too many files to list",t=t+`
Affected files:
`+i}return t}};var Ee=class extends Ys{constructor(r){super(r);this.useDefaultWindowsGitPath=!1}async setGitInstance(r=!1){var n;if(await this.isGitInstalled()){let i=this.app.vault.adapter,a=i.getBasePath(),s=a;this.plugin.settings.basePath&&(await i.exists((0,Jn.normalizePath)(this.plugin.settings.basePath))?s=De.join(a,this.plugin.settings.basePath):r||new Jn.Notice("ObsidianGit: Base path does not exist")),this.absoluteRepoPath=s,this.git=xx({baseDir:s,binary:this.plugin.localStorage.getGitPath()||(this.useDefaultWindowsGitPath?zu:void 0),config:["core.quotepath=off"],unsafe:{allowUnsafeCustomBinary:!0}});let o=this.plugin.localStorage.getPATHPaths(),l=this.plugin.localStorage.getEnvVars(),c=this.plugin.settings.gitDir;if(o.length>0){let v=process.env.PATH+":"+o.join(":");process.env.PATH=v}c&&(process.env.GIT_DIR=c);for(let v of l){let[y,b]=v.split("=");process.env[y]=b}let u="simple-git",f=",",h=((n=localStorage.debug)!=null?n:"").split(f);if(!h.includes(u)&&!h.includes(`-${u}`)&&(h.push(u),ST.default.enable(h.join(f))),await this.git.checkIsRepo()){let v=await this.git.revparse("--show-cdup"),y=(0,Yl.resolve)(s+Yl.sep+v);this.absoluteRepoPath=y,await this.git.cwd(y)}let p=De.join(a,this.app.vault.configDir,"plugins","obsidian-git"),m=De.join(p,wa);process.env.SSH_ASKPASS==null&&(process.env.SSH_ASKPASS=m),process.env.OBSIDIAN_GIT_CREDENTIALS_INPUT=De.join(p,Vu),process.env.SSH_ASKPASS==m&&this.askpass().catch(v=>this.plugin.displayError(v))}}getRelativeVaultPath(r){let i=this.app.vault.adapter.getBasePath(),a=De.join(this.absoluteRepoPath,r),s=De.relative(i,a);return Jn.Platform.isWin&&(s=s.replace(/\\/g,"/")),s}getRelativeRepoPath(r,n=!0){if(n){let a=this.plugin.app.vault.adapter.getBasePath(),s=this.absoluteRepoPath,o=De.join(a,r),l=De.relative(s,o);return Jn.Platform.isWin&&(l=l.replace(/\\/g,"/")),l}return r}async askpass(){let r=this.app.vault.adapter,n=r.getBasePath(),i=De.join(n,this.app.vault.configDir,"plugins","obsidian-git"),a=this.app.vault.configDir+"/plugins/obsidian-git/";await this.addAskPassScriptToExclude(),await _r.writeFile(De.join(i,wa),Ex),await _r.chmod(De.join(i,wa),493),this.watchAbortController=new AbortController;let{signal:s}=this.watchAbortController;try{let o=_r.watch(i,{signal:s});for await(let l of o){if(l.filename!=Vu)continue;let c=a+Vu;if(!await r.exists(c))continue;let u=await r.read(c),f;u.length>60&&(f=new Jn.Notice(u,999999));let d=await new $e(this.plugin,{allowEmpty:!0,obscure:!0,placeholder:u.length>60?"Enter a response to the message.":u}).openAndGetResult();f==null||f.hide(),await r.exists(c)&&await r.write(`${c}.response`,d!=null?d:"")}}catch(o){this.plugin.displayError(o),await _r.rm(De.join(i,wa),{force:!0}),await _r.rm(De.join(i,`${wa}.response`),{force:!0}),await new Promise(l=>setTimeout(l,5e3)),this.plugin.log("Retry watch for ask pass"),await this.askpass()}}async addAskPassScriptToExclude(){try{let r=await this.git.revparse(["--path-format=absolute","--git-path","info/exclude"]),n=De.join(this.app.vault.configDir,"plugins","obsidian-git",wa),i=this.getRelativeRepoPath(n,!0);(await _r.readFile(r,"utf-8")).split(`
`).some(l=>l.contains(i))||await _r.appendFile(r,i+`
`)}catch(r){console.error("Error while adding askpass script to exclude file:",r)}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(){this.plugin.setPluginState({gitAction:1});let r=await this.git.status();this.plugin.setPluginState({gitAction:0});let n=r.files.map(i=>{let a=this.formatPath(i);return{path:a.path,from:a.from,index:i.index==="?"?"U":i.index,workingDir:i.working_dir==="?"?"U":i.working_dir,vaultPath:this.getRelativeVaultPath(a.path)}});return{all:n,changed:n.filter(i=>i.workingDir!==" "),staged:n.filter(i=>i.index!==" "&&i.index!="U"),conflicted:r.conflicted.map(i=>this.formatPath({path:i}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let n=this.getRelativeRepoPath(r),a=["-C",De.dirname(n),"rev-parse","HEAD"],s=this.git.raw(a);return s.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),s}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((n,i,a,s)=>{if(!(s.contains("submodule")&&s.contains("foreach")))return;let o="",l=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");i.on("data",c=>{o+=c.toString("utf8")}),i.on("end",()=>{let u=o.split(`
`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return l+"/"+d[1]+Yl.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},n=>this.plugin.displayError(n))})}formatPath(r,n=!1){function i(a){if(a!=null)return a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a}return n?{from:i(r.from),path:i(r.path)}:{path:i(r.path)}}async blame(r,n,i){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let a=await this.getSubmoduleOfFile(r),s=a?["-C",a.submodule]:[],o=a?a.relativeFilepath:r;s.push("blame","--porcelain"),i&&s.push("-w");let l=`-C${Gu}`;switch(n){case"inactive":break;case"same-commit":s.push("-C",l);break;case"all-commits":s.push("-C","-C",l);break;default:Ii(n)}s.push("--",o);let c=await this.git.raw(s);return LB(c)}async isTracked(r){let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("ls-files","--",a),this.git.raw(i).then(s=>s.trim()!=="")}async commitAll({message:r}){if(this.plugin.settings.updateSubmodules){this.plugin.setPluginState({gitAction:4});let i=await this.getSubmodulePaths();for(let a of i)await this.git.cwd({path:a,root:!1}).add("-A"),await this.git.cwd({path:a,root:!1}).commit(await this.formatCommitMessage(r))}this.plugin.setPluginState({gitAction:3}),await this.git.add("-A"),this.plugin.setPluginState({gitAction:4});let n=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),n.summary.changes}async commit({message:r,amend:n}){this.plugin.setPluginState({gitAction:4});let i=(await this.git.commit(await this.formatCommitMessage(r),n?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),this.plugin.setPluginState({gitAction:0}),i}async stage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.add(["--",r]),this.plugin.setPluginState({gitAction:0})}async stageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.add(r!=null?r:"-A"),this.plugin.setPluginState({gitAction:0})}async unstageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.reset(r!=null?["--",r]:[]),this.plugin.setPluginState({gitAction:0})}async unstage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.reset(["--",r]),this.plugin.setPluginState({gitAction:0})}async discard(r){this.plugin.setPluginState({gitAction:3}),await this.isTracked(r)?await this.git.checkout(["--",r]):await this.app.vault.adapter.rmdir(this.getRelativeVaultPath(r),!0),this.plugin.setPluginState({gitAction:0})}async hashObject(r){r=this.getRelativeRepoPath(r);let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("hash-object","--",a),this.git.raw(i)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){this.plugin.setPluginState({gitAction:2});try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo(),n=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let i=await this.git.revparse([r.tracking]);if(n!==i){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{switch(this.plugin.settings.syncMethod){case"merge":await this.git.merge([r.tracking]);break;case"rebase":await this.git.rebase([r.tracking])}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,i]),await this.unstageAll({})}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`)}this.app.workspace.trigger("obsidian-git:head-change");let a=await this.git.revparse([r.current]);return(await this.git.diff([`${n}..${a}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}}async push(){this.plugin.setPluginState({gitAction:5});try{if(this.plugin.settings.updateSubmodules){let s=await this.git.env({...process.env,OBSIDIAN_GIT:1}).subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(s)}let r=await this.git.status(),n=r.tracking,i=r.current;if(!n&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let a=(await this.git.diffSummary([i,n,"-- Line truncated
`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(n){try{await this.git.branch(["--set-upstream",r])}catch(i){await this.git.push(["--set-upstream",...Fi(r)])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,n=!1,i){return n?await this.git.diff(["--cached","--",r]):i?await this.git.show([`${i}`,"--",r]):await this.git.diff(["--",r])}async diff(r,n,i){return await this.git.diff([`${n}..${i}`,"--",r])}async rawCommand(r){let n=r.split(" ");return await this.git.raw(n[0],...n.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(De.dirname(r)))return;let n=await this.git.raw(["-C",De.dirname(r),"rev-parse","--show-toplevel"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message));if(n=n.trim(),(await this.git.raw(["-C",De.dirname(r),"rev-parse","--show-superproject-working-tree"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message))).trim()==="")return;let s=this.app.vault.adapter.getFullPath(De.normalize(r)),o=De.relative(n,s);return{submodule:n,relativeFilepath:o}}async getLastCommitTime(){let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}async isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),n=await ql(r||"git",["--version"],{});if(n.error)if(Jn.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${zu}) of Git for Windows.`);let i=await ql(zu,["--version"]);if(i.error)return console.error(i.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(n.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof wr){let n=String(r.message);if(n.contains("Could not resolve host")||n.contains("Unable to resolve host")||n.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||n.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||n.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new $s(n)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(n){let i=n instanceof Error?n.message:String(n);return this.plugin.displayError(`Error checking LFS status: ${i}`),!1}}},ET={hash:"000000",isZeroCommit:!0,summary:""};function LB(e){let r=e.replace(`\r
`,`
`).split(`
`),n={commits:new Map,hashPerLine:[void 0],originalFileLineNrPerLine:[void 0],finalFileLineNrPerLine:[void 0],groupSizePerStartingLine:new Map},i=1;for(let a=0;a<r.length;){if(_T(r[a])){let s=r[a].split(" "),o=DB(s,i,n);for(a++;_T(r[a]);a++){let l=r[a].split(" ");NB(l,n,i)}BB(n.commits.get(o)),i+=1}else if(!(r[a]===""&&a===r.length-1))throw Error(`Expected non-whitespace line or EOF, but found: ${r[a]}`);a++}return n}function DB(e,t,r){let n=e[0];if(r.hashPerLine.push(n),r.originalFileLineNrPerLine.push(parseInt(e[1])),r.finalFileLineNrPerLine.push(parseInt(e[2])),e.length>=4&&r.groupSizePerStartingLine.set(t,parseInt(e[3])),parseInt(e[2])!==t)throw Error(`git-blame output is out of order: ${t} vs ${e[2]}`);return n}function NB(e,t,r){let n=e[0],i=e.slice(1).join(" "),a=t.hashPerLine[r],s=t.commits.get(a)||{hash:a,author:{},committer:{},previous:{}};switch(n){case"summary":s.summary=i;break;case"author":s.author.name=i;break;case"author-mail":s.author.email=xT(i);break;case"author-time":s.author.epochSeconds=parseInt(i);break;case"author-tz":s.author.tz=i;break;case"committer":s.committer.name=i;break;case"committer-mail":s.committer.email=xT(i);break;case"committer-time":s.committer.epochSeconds=parseInt(i);break;case"committer-tz":s.committer.tz=i;break;case"previous":s.previous.commitHash=i;break;case"filename":s.previous.filename=i;break}t.commits.set(a,s)}function BB(e){if(e.summary===void 0)throw Error(`Summary not provided for commit: ${e.hash}`);qg(e.author)&&(e.author=void 0),qg(e.committer)&&(e.committer=void 0),qg(e.previous)&&(e.previous=void 0),e.isZeroCommit=!!e.hash.match(/^0*$/)}function qg(e){return!e||Object.keys(e).length===0}function _T(e){return e.length>0&&e[0].trim()===e[0]}function xT(e){let t=e.startsWith("<")?e.substring(1):e;return t.endsWith(">")?t.substring(0,t.length-1):t}g();var aC=require("@codemirror/state");g();var NT=require("@codemirror/state"),qf=require("obsidian");g();var Xg=class{constructor(){this.eventsPerFilepath=new Map;this.startRemoveStalesSubscribersInterval()}ifFilepathDefinedTransformSubscribers(t,r){if(t)return this.ensureInitialized(t),r(this.eventsPerFilepath.get(t))}forEachSubscriber(t){this.eventsPerFilepath.forEach(r=>r.forEach(t))}ensureInitialized(t){this.eventsPerFilepath.get(t)||this.eventsPerFilepath.set(t,new Set)}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(t=>t==null?void 0:t.removeIfStale()),6e4)}clear(){window.clearInterval(this.removeStalesSubscribersTimer),this.eventsPerFilepath.clear()}},Xs=new Xg;g();var zf=require("@codemirror/state"),IT=Ve(Zg());g();var U=require("obsidian");g();g();function an(){}an.prototype={diff:function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i=="function"&&(a=i,i={});var s=this;function o(E){return E=s.postProcess(E,i),a?(setTimeout(function(){a(E)},0),!0):E}t=this.castInput(t,i),r=this.castInput(r,i),t=this.removeEmpty(this.tokenize(t,i)),r=this.removeEmpty(this.tokenize(r,i));var l=r.length,c=t.length,u=1,f=l+c;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],r,t,0,i);if(p[0].oldPos+1>=c&&m+1>=l)return o(AT(s,p[0].lastComponent,r,t,s.useLongestToken));var v=-1/0,y=1/0;function b(){for(var E=Math.max(v,-u);E<=Math.min(y,u);E+=2){var _=void 0,k=p[E-1],w=p[E+1];k&&(p[E-1]=void 0);var A=!1;if(w){var S=w.oldPos-E;A=w&&0<=S&&S<l}var T=k&&k.oldPos+1<c;if(!A&&!T){p[E]=void 0;continue}if(!T||A&&k.oldPos<w.oldPos?_=s.addToPath(w,!0,!1,0,i):_=s.addToPath(k,!1,!0,1,i),m=s.extractCommon(_,r,t,E,i),_.oldPos+1>=c&&m+1>=l)return o(AT(s,_.lastComponent,r,t,s.useLongestToken));p[E]=_,_.oldPos+1>=c&&(y=Math.min(y,E-1)),m+1>=l&&(v=Math.max(v,E+1))}u++}if(a)(function E(){setTimeout(function(){if(u>f||Date.now()>h)return a();b()||E()},0)})();else for(;u<=f&&Date.now()<=h;){var x=b();if(x)return x}},addToPath:function(t,r,n,i,a){var s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===r&&s.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,i,a){for(var s=r.length,o=n.length,l=t.oldPos,c=l-i,u=0;c+1<s&&l+1<o&&this.equals(n[l+1],r[c+1],a);)c++,l++,u++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return u&&!a.oneChangePerToken&&(t.lastComponent={count:u,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=l,c},equals:function(t,r,n){return n.comparator?n.comparator(t,r):t===r||n.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return Array.from(t)},join:function(t){return t.join("")}, Line truncated
`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var a=n[i];i%2&&!t.newlineIsToken?r[r.length-1]+=a:r.push(a)}return r};Bf.equals=function(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
`))&&(e=e.trim()),(!r.newlineIsToken||!t.includes(`
`))&&(t=t.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(e.endsWith(`
`)&&(e=e.slice(0,-1)),t.endsWith(`
`)&&(t=t.slice(0,-1))),an.prototype.equals.call(this,e,t,r)};function RT(e,t,r){return Bf.diff(e,t,r)}var GB=new an;GB.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var zB=new an;zB.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function MT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Df(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(r),!0).forEach(function(n){qB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WB(e){var t=VB(e,"string");return typeof t=="symbol"?t:t+""}function e0(e){"@babel/helpers - typeof";return e0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e0(e)}function qB(e,t,r){return t=WB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kg(e){return YB(e)||XB(e)||ZB(e)||KB()}function YB(e){if(Array.isArray(e))return t0(e)}function XB(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZB(e,t){if(e){if(typeof e=="string")return t0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t0(e,t)}}function t0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function KB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Zl=new an;Zl.useLongestToken=!0;Zl.tokenize=Bf.tokenize;Zl.castInput=function(e,t){var r=t.undefinedReplacement,n=t.stringifyReplacer,i=n===void 0?function(a,s){return typeof s=="undefined"?r:s}:n;return typeof e=="string"?e:JSON.stringify(r0(e,null,null,i),i," ")};Zl.equals=function(e,t,r){return an.prototype.equals.call(Zl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)};function r0(e,t,r,n,i){t=t||[],r=r||[],n&&(e=n(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return r[a];var s;if(Object.prototype.toString.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),r.push(s),a=0;a<e.length;a+=1)s[a]=r0(e[a],t,r,n,i);return t.pop(),r.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),e0(e)==="object"&&e!==null){t.push(e),s={},r.push(s);var o=[],l;for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&o.push(l);for(o.sort(),a=0;a<o.length;a+=1)l=o[a],s[l]=r0(e[l],t,r,n,l);t.pop(),r.pop()}else s=e;return s}var n0=new an;n0.tokenize=function(e){return e.slice()};n0.join=n0.removeEmpty=function(e){return e};function OT(e,t,r,n,i,a,s){if(s||(s={}),typeof s=="function"&&(s={callback:s}),typeof s.context=="undefined"&&(s.context=4),s.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(s.callback){var o=s,l=o.callback;RT(r,n,Df(Df({},s),{},{callback:function(f){var d=c(f);l(d)}}))}else return c(RT(r,n,s));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(A){return A.map(function(S){return" "+S})}for(var d=[],h=0,p=0,m=[],v=1,y=1,b=function(){var S=u[x],T=S.lines||QB(S.value);if(S.lines=T,S.added||S.removed){var P;if(!h){var I=u[x-1];h=v,p=y,I&&(m=s.context>0?f(I.lines.slice(-s.context)):[],h-=m.length,p-=m.length)}(P=m).push.apply(P,Kg(T.map(function(J){return(S.added?"+":"-")+J}))),S.added?y+=T.length:v+=T.length}else{if(h)if(T.length<=s.context*2&&x<u.length-2){var N;(N=m).push.apply(N,Kg(f(T)))}else{var L,ee=Math.min(T.length,s.context);(L=m).push.apply(L,Kg(f(T.slice(0,ee))));var fe={oldStart:h,oldLines:v-h+ee,newStart:p,newLines:y-p+ee,lines:m};d.push(fe),h=0,p=0,m=[]}v+=T.length,y+=T.length}},x=0;x<u.length;x++)b();for(var E=0,_=d;E<_.length;E++)for(var k=_[E],w=0;w<k.lines.length;w++)k.lines[w].endsWith(`
`)?k.lines[w]=k.lines[w].slice(0,-1):(k.lines.splice(w+1,0,"\\ No newline at end of file"),w++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:d}}}function i0(e){if(Array.isArray(e))return e.map(i0).join(`
`);var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader=="undefined"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader=="undefined"?"":" "+e.newHeader));for(var r=0;r<e.hunks.length;r++){var n=e.hunks[r];n.oldLines===0&&(n.oldStart-=1),n.newLines===0&&(n.newStart-=1),t.push("@@ -"+n.oldStart+","+n.oldLines+" +"+n.newStart+","+n.newLines+" @@"),t.push.apply(t,n.lines)}return t.join(`
`)+`
`}function JB(e,t,r,n,i,a,s){var o;if(typeof s=="function"&&(s={callback:s}),(o=s)!==null&&o!==void 0&&o.callback){var c=s,u=c.callback;OT(e,t,r,n,i,a,Df(Df({},s),{},{callback:function(d){d?u(i0(d)):u()}}))}else{var l=OT(e,t,r,n,i,a,s);return l?i0(l):void 0}}function jf(e,t,r,n,i,a){return JB(e,e,t,r,n,i,a)}function QB(e){var t=e.endsWith(`
`),r=e.split(`
`).map(function(n){return n+`
`});return t?r.pop():r.push(r.pop().slice(0,-1)),r}var Sa=require("obsidian");g();var $i=require("obsidian"),Hf=class{constructor(t,r){this.plugin=r;this.promises={};this.adapter=t.adapter,this.vault=t,this.lastBasePath=this.plugin.settings.basePath,this.promises.readFile=this.readFile.bind(this),this.promises.writeFile=this.writeFile.bind(this),this.promises.readdir=this.readdir.bind(this),this.promises.mkdir=this.mkdir.bind(this),this.promises.rmdir=this.rmdir.bind(this),this.promises.stat=this.stat.bind(this),this.promises.unlink=this.unlink.bind(this),this.promises.lstat=this.lstat.bind(this),this.promises.readlink=this.readlink.bind(this),this.promises.symlink=this.symlink.bind(this)}async readFile(t,r){var n;if(this.maybeLog("Read: "+t+JSON.stringify(r)),r=="utf8"||r.encoding=="utf8"){let i=this.vault.getAbstractFileByPath(t);return i instanceof $i.TFile?(this.maybeLog("Reuse"),this.vault.read(i)):this.adapter.read(t)}else{if(t.endsWith(this.gitDir+"/index"))return this.plugin.settings.basePath!=this.lastBasePath?(this.clearIndex(),this.lastBasePath=this.plugin.settings.basePath,this.adapter.readBinary(t)):(n=this.index)!=null?n:this.adapter.readBinary(t);let i=this.vault.getAbstractFileByPath(t);return i instanceof $i.TFile?(this.maybeLog("Reuse"),this.vault.readBinary(i)):this.adapter.readBinary(t)}}async writeFile(t,r){if(this.maybeLog("Write: "+t),typeof r=="string"){let n=this.vault.getAbstractFileByPath(t);return n instanceof $i.TFile?this.vault.modify(n,r):this.adapter.write(t,r)}else if(t.endsWith(this.gitDir+"/index"))this.index=r,this.indexmtime=Date.now();else{let n=this.vault.getAbstractFileByPath(t);return n instanceof $i.TFile?this.vault.modifyBinary(n,r):this.adapter.writeBinary(t,r)}}async readdir(t){t==="."&&(t="/");let r=await this.adapter.list(t),n=[...r.files,...r.folders],i;return t!=="/"?i=n.map(a=>(0,$i.normalizePath)(a.substring(t.length))):i=n,i}async mkdir(t){return this.adapter.mkdir(t)}async rmdir(t,r){var n,i;return this.adapter.rmdir(t,(i=(n=r==null?void 0:r.options)==null?void 0:n.recursive)!=null?i:!1)}async stat(t){if(t.endsWith(this.gitDir+"/index")){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.length,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let n=await this.adapter.stat(t);if(n==null)throw{code:"ENOENT"};return this.indexctime=n.ctime,this.indexmtime=n.mtime,{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}t==="."&&(t="/");let r=this.vault.getAbstractFileByPath(t);if(this.maybeLog("Stat: "+t),r instanceof $i.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let n=await this.adapter.stat(t);if(n)return{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:n.type==="folder"?"directory":n.type,isFile:()=>n.type==="file",isDirectory:()=>n.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(t){return this.adapter.remove(t)}async lstat(t){return this.stat(t)}async readlink(t){throw new Error(`readlink of (${t}) is not implemented.`)}async symlink(t){throw new Error(`symlink of (${t}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index"),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}maybeLog(t){}};var sn=class extends Ys{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new Hf(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir||void 0,onAuth:()=>{var r,n;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(n=this.plugin.localStorage.getPassword())!=null?n:void 0}},onAuthFailure:async()=>{new Sa.Notice("Authentication failed. Please try with different credentials");let r=await new $e(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let n=await new $e(this.plugin,{placeholder:"Specify your password/personal access token"}).openAndGetResult();if(n)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(n),{username:r,password:n}}return{cancel:!0}},http:{async request({url:r,method:n,headers:i,body:a}){let s;a&&(s=(await nj(a)).buffer);let o=await(0,Sa.requestUrl)({url:r,method:n,headers:i,body:s,throw:!1});return{url:r,method:n,headers:o.headers,body:[new Uint8Array(o.arrayBuffer)],statusCode:o.status,statusMessag Line truncated
`);return{message:l[0],author:{name:o.commit.author.name,email:o.commit.author.email},body:l.slice(1).join(`
`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(c=>({path:c.path,status:c.type,vaultPath:this.getRelativeVaultPath(c.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}async updateUpstreamBranch(r){let[n,i]=Fi(r),a=await this.branchInfo();await this.wrapFS(ie.push({...this.getRepo(),remote:n,remoteRef:i})),await this.setConfig(`branch.${a.current}.merge`,`refs/heads/${i}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,n){return this.walkDifference({walkers:[ie.TREE({ref:r}),ie.TREE({ref:n})]})}async walkDifference({walkers:r,dir:n}){return await this.wrapFS(ie.walk({...this.getRepo(),trees:r,map:async function(a,[s,o]){if(!Gg(a,n))return null;if(await(s==null?void 0:s.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let l=await(s==null?void 0:s.oid()),c=await(o==null?void 0:o.oid()),u="equal";if(l!==c&&(u="M"),l===void 0&&(u="A"),c===void 0&&(u="D"),l===void 0&&c===void 0&&(console.log("Something weird happened:"),console.log(s),console.log(o)),u!=="equal")return{path:a,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[ie.TREE({ref:"HEAD"}),ie.STAGE()],dir:r})).map(i=>({vaultPath:this.getRelativeVaultPath(i.path),path:i.path}))}async getUnstagedFiles(r="."){let n,i=window.setTimeout(()=>{n=new Sa.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let a=this.getRepo(),s=await this.wrapFS(ie.walk({...a,trees:[ie.WORKDIR(),ie.STAGE()],map:async function(o,[l,c]){if(!c&&l&&await ie.isIgnored({...a,filepath:o})||!Gg(o,r))return null;let[u,f]=await Promise.all([l&&l.type(),c&&c.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await c.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await l.oid()),p?p!==h?{path:o,deleted:!1}:null:{path:o,deleted:!0}}}));return window.clearTimeout(i),n==null||n.hide(),s}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async getDiffString(r,n=!1,i){let a=this.getRelativeVaultPath(r),s=async(c,[u])=>{if(r==c){let f=await u.oid();return(await ie.readBlob({...this.getRepo(),oid:f})).blob}};if(i){let c=await _l({...this.getRepo(),filepath:r,oid:i}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h}),u=await ie.readCommit({...this.getRepo(),oid:i}),f=await _l({...this.getRepo(),filepath:r,oid:u.commit.parent.first()}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h});return jf(a,f!=null?f:"",c!=null?c:"")}let o=(await ie.walk({...this.getRepo(),trees:[ie.STAGE()],map:s})).first(),l=new TextDecoder().decode(o);if(n){let c=await this.resolveRef("HEAD").then(f=>_l({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof ie.Errors.NotFoundError))throw f});return jf(a,c!=null?c:"",l)}else{let c;return await this.app.vault.adapter.exists(a)?c=await this.app.vault.adapter.read(a):c="",jf(a,l,c)}}async getLastCommitTime(){let r=this.getRepo(),n=await this.resolveRef("HEAD"),a=(await ie.readCommit({...r,oid:n})).commit.committer.timestamp;return new Date(a*1e3)}getFileStatusResult(r){let n=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:n[0]=="?"?"U":n[0],workingDir:n[1]=="?"?"U":n[1],path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),n=await this.getConfig("user.email");if(!r||!n)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,n=!0){if(!this.plugin.settings.disablePopups)return new Sa.Notice(r,n?this.noticeLength:void 0)}};function ej(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function tj(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:ej(e)}async function rj(e,t){let r=tj(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function nj(e){let t=0,r=[];await rj(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}var ij="https://momentjs.com/docs/#/parsing/string-format/",aj="https://publish.obsidian.md/git-doc/Line+Authoring",Uf=class extends U.PluginSettingTab{constructor(r,n){super(r,n);this.plugin=n;this.lineAuthorColorSettings=new Map}get settings(){return this.plugin.settings}display(){let{containerEl:r}=this,n=this.plugin,i;n.settings.differentIntervalCommitAndPush?i="commit":i="commit-and-sync";let a=n.gitReady;r.empty(),a||(r.createEl("p",{text:"Git is not ready. When Line truncated
If turned on, do auto ${i} every ${yT(n.settings.autoSaveInterval)} after stopping file edits.
This also prevents auto ${i} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(u=>u.setValue(n.settings.autoBackupAfterFileChange).onChange(async f=>{n.settings.autoBackupAfterFileChange=f,this.refreshDisplayWithDelay(),await n.saveSettings(),n.automaticsManager.reload("commit")})),this.mayDisableSetting(s,n.settings.setLastSaveToLastCommit),s=new U.Setting(r).setName(`Auto ${i} after latest commit`).setDesc(`If turned on, sets last auto ${i} timestamp to the latest commit timestamp. This reduces the frequency of auto ${i} when doing manual commits.`).addToggle(u=>u.setValue(n.settings.setLastSaveToLastCommit).onChange(async f=>{n.settings.setLastSaveToLastCommit=f,await n.saveSettings(),n.automaticsManager.reload("commit"),this.refreshDisplayWithDelay()})),this.mayDisableSetting(s,n.settings.autoBackupAfterFileChange),s=new U.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPushInterval"}),u.setPlaceholder(String(je.autoPushInterval)),u.onChange(async f=>{f!==""?n.settings.autoPushInterval=Number(f):n.settings.autoPushInterval=je.autoPushInterval,await n.saveSettings(),n.automaticsManager.reload("push")})}),this.mayDisableSetting(s,!n.settings.differentIntervalCommitAndPush),new U.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPullInterval"}),u.setPlaceholder(String(je.autoPullInterval)),u.onChange(async f=>{f!==""?n.settings.autoPullInterval=Number(f):n.settings.autoPullInterval=je.autoPullInterval,await n.saveSettings(),n.automaticsManager.reload("pull")})}),new U.Setting(r).setName(`Specify custom commit message on auto ${i}`).setDesc("You will get a pop up to specify your message.").addToggle(u=>u.setValue(n.settings.customMessageOnAutoBackup).onChange(async f=>{n.settings.customMessageOnAutoBackup=f,await n.saveSettings(),this.refreshDisplayWithDelay()})),s=new U.Setting(r).setName(`Commit message on auto ${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(je.autoCommitMessage).onChange(async f=>{f===""?n.settings.autoCommitMessage=je.autoCommitMessage:n.settings.autoCommitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"autoCommitMessage"})}),this.mayDisableSetting(s,n.settings.customMessageOnAutoBackup),new U.Setting(r).setName("Commit message").setHeading(),new U.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(je.commitMessage).onChange(async f=>{f===""?n.settings.commitMessage=je.commitMessage:n.settings.commitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"commitMessage"})}),new U.Setting(r).setName("Commit message script").setDesc("A script that is run using 'sh -c' to generate the commit message. May be used to generate commit messages using AI tools. Available placeholders: {{hostname}}, {{date}}.").addText(u=>{u.onChange(async f=>{f===""?n.settings.commitMessageScript=je.commitMessageScript:n.settings.commitMessageScript=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"commitMessageScript"})});let c=new U.Setting(r).setName("{{date}} placeholder format").addMomentFormat(u=>u.setDefaultFormat(n.settings.commitDateFormat).setValue(n.settings.commitDateFormat).onChange(async f=>{n.settings.commitDateFormat=f,await n.saveSettings()}));c.descEl.innerHTML=`
Specify custom date format. E.g. "${xm}. See <a href="https://momentjs.com">Moment.js</a> for more formats.`,new U.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(u=>{var f;return u.setValue((f=n.localStorage.getHostname())!=null?f:"").onChange(d=>{n.localStorage.setHostname(d)})}),new U.Setting(r).setName("Preview commit message").addButton(u=>u.setButtonText("Preview").onClick(async()=>{let f=await n.gitManager.formatCommitMessage(n.settings.commitMessage);new U.Notice(`${f}`)})),new U.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(u=>u.setValue(n.settings.listChangedFilesInMessageBody).onChange(async f=>{n.settings.listChangedFilesInMessageBody=f,await n.saveSettings()})),new U.Setting(r).setName("Pull").setHeading(),n.gitManager instanceof Ee&&new U.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(u=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};u.addOptions(f),u.setValue(n.settings.syncMethod),u.onChange(async d=>{n.settings.syncMethod=d,await n.saveSettings()})}),new U.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(u=>u.setValue(n.settings.autoPullOnBoot).onChange(async f=>{n.settings.autoPullOnBoot=f,await n.saveSettings()})),new U.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new U.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${n.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(u=>u.setValue(!n.settings.disablePush).onChange(async f=>{n.settings.disablePush=!f,this.refreshDisplayWithDelay(),await n.saveSettings()})),new U.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${n.settings.disablePush?"":"and push "}only.`).addToggle(u=>u.setValue(n.settings.pullBeforePush).onChange(async f=>{n.settings.pullBeforePush=f,this.refreshDisplayWithDelay(),await n.saveSettings()})),n.gitManager instanceof Ee&&(new U.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new U.Setting(r).setName("History view").setHeading(),new U.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(c=>{let u={hide:"Hide",full:"Full",initials:"Initials"};c.addOptions(u),c.setValue(n.settings.authorInHistoryView),c.onChange(async f=>{n.settings.authorInHistoryView=f,await n.saveSettings(),await n.refresh()})}),new U.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(c=>c.setValue(n.settings.dateInHistoryView).onChange(async u=>{n.settings.dateInHistoryView=u,await n.saveSettings(),await n.refresh()})),new U.Setting(r).setName("Source control view").setHeading(),new U.Setting(r).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(c=>c.setValue(n.settings.refreshSourceControl).onChange(async u=>{n.settings.refreshSourceControl=u,await n.saveSettings()})),new U.Setting(r).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(c=>{c.inputEl.type="number",this.setNonDefaultValue({text:c,settingsProperty:"refreshSourceControlTimer"}),c.setPlaceholder(String(je.refreshSourceControlTimer)),c.onChange(async f=>{f!==""&&Number.isInteger(Number(f))?n.settings.refreshSourceControlTimer=Math.max(Number(f),500):n.settings.refreshSourceControlTimer=je.refreshSourceControlTimer,await n.saveSettings(),n.setRefreshDebouncer()})}),new U.Setting(r).setName("Miscellaneous").setHeading(),n.gitManager instanceof Ee&&new U.Setting(r).setName("Diff view style").setDesc('Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.').addDropdown(c=>{let u={split:"Split",git_unified:"Unified"};c.addOptions(u),c.setValue(n.settings.diffStyle),c.onChange(async f=>{n.settings.diffStyle=f,await n.saveSettings()})}),new U.Setting(r).setName("Disable informative notifications").setDesc("Disable informative notifications for git operations t Line truncated
`)),c.onChange(u=>{n.localStorage.setEnvVars(u.split(`
`))})}),n.gitManager instanceof Ee&&new U.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(c=>{c.setValue(n.localStorage.getPATHPaths().join(`
`)),c.onChange(u=>{n.localStorage.setPATHPaths(u.split(`
`))})}),n.gitManager instanceof Ee&&new U.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(c=>{c.setButtonText("Reload"),c.setCta(),c.onClick(async()=>{await n.gitManager.setGitInstance()})}),new U.Setting(r).setName("Custom base path (Git repository path)").setDesc(`
Sets the relative path to the vault from which the Git binary should be executed.
Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows.
`).addText(c=>{c.setValue(n.settings.basePath),c.setPlaceholder("directory/directory-with-git-repo"),c.onChange(async u=>{n.settings.basePath=u,await n.saveSettings(),n.gitManager.updateBasePath(u||"").catch(f=>n.displayError(f))})}),new U.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(c=>{c.setValue(n.settings.gitDir),c.setPlaceholder(".git"),c.onChange(async u=>{n.settings.gitDir=u,await n.saveSettings()})}),new U.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(c=>c.setValue(n.localStorage.getPluginDisabled()).onChange(u=>{n.localStorage.setPluginDisabled(u),u?n.unloadPlugin():n.init({fromReload:!0}).catch(f=>n.displayError(f)),new U.Notice("Obsidian must be restarted for the changes to take affect.")})),new U.Setting(r).setName("Support").setHeading(),new U.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(c=>{c.buttonEl.outerHTML="<a href='https://ko-fi.com/F1F195IQ5' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>"});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new U.Notice("Debug information copied to clipboard. May contain sensitive information!")},U.Platform.isDesktopApp){let c=r.createDiv();c.setAttr("align","center"),c.setText(`Debugging and logging:
You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),U.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,n){n&&(r.setDisabled(n),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.lineAuthoringFeature.activateFeature():this.plugin.lineAuthoringFeature.deactivateFeature()}async lineAuthorSettingHandler(r,n){this.settings.lineAuthor[r]=n,await this.plugin.saveSettings(),this.plugin.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new U.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.innerHTML=`
<a href="${aj}">Feature guide and quick examples</a></br>
The commit hash, author name and authoring date can all be individually toggled.</br>Hide everything, to only show the age-colored sidebar.`,r.addToggle(n=>n.setValue(this.settings.lineAuthor.show).onChange(i=>{this.configureLineAuthorShowStatus(i),this.refreshDisplayWithDelay()})),this.settings.lineAuthor.show){let n=new U.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown(a=>{a.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),a.setValue(this.settings.lineAuthor.followMovement),a.onChange(s=>this.lineAuthorSettingHandler("followMovement",s))});if(n.descEl.innerHTML=`
By default (deactivated), each line only shows the newest commit where it was changed.
<br/>
With <i>same commit</i>, cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown.
<br/>
With <i>all commits</i>, cut-copy-paste-ing text inbetween multiple commits will be detected.
<br/>
It uses <a href="https://git-scm.com/docs/git-blame">git-blame</a> and
for matches (at least ${Gu} characters) within the same (or all) commit(s), <em>the originating</em> commit's information is shown.`,new U.Setting(this.containerEl).setName("Show commit hash").addToggle(a=>{a.setValue(this.settings.lineAuthor.showCommitHash),a.onChange(s=>this.lineAuthorSettingHandler("showCommitHash",s))}),new U.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(a=>{let s={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};a.addOptions(s),a.setValue(this.settings.lineAuthor.authorDisplay),a.onChange(async o=>this.lineAuthorSettingHandler("authorDisplay",o))}),new U.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(a=>{let s={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeFormatOptions),a.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",o),this.refreshDisplayWithDelay()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let a=new U.Setting(this.containerEl);a.setName("Custom authoring date format").addText(s=>{s.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),s.setPlaceholder("YYYY-MM-DD HH:mm"),s.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",o),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(o)})}),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(this.settings.lineAuthor.dateTimeFormatCustomString)}new U.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(a=>{let s={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeTimezone),a.onChange(async o=>this.lineAuthorSettingHandler("dateTimeTimezone",o))}).descEl.innerHTML=`
The time-zone in which the authoring date should be shown.
Either your local time-zone (default),
the author's time-zone during commit creation or
<a href="https://en.wikipedia.org/wiki/UTC%C2%B100:00">UTC\xB100:00</a>.
`;let i=new U.Setting(this.containerEl).setName("Oldest age in coloring");i.descEl.innerHTML=this.previewOldestAgeDescriptionHtml(this.settings.lineAuthor.coloringMaxAge)[0],i.addText(a=>{a.setPlaceholder("1y"),a.setValue(this.settings.lineAuthor.coloringMaxAge),a.onChange(async s=>{let[o,l]=this.previewOldestAgeDescriptionHtml(s);i.descEl.innerHTML=o,l&&(await this.lineAuthorSettingHandler("coloringMaxAge",s),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest"),new U.Setting(this.containerEl).setName("Text color").addText(a=>{a.setValue(this.settings.lineAuthor.textColorCss),a.onChange(async s=>{await this.lineAuthorSettingHandler("textColorCss",s)})}).descEl.innerHTML=`
The CSS color of the gutter text.<br/>
It is higly recommended to use
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">
CSS variables</a>
defined by themes
(e.g. <pre style="display:inline">var(--text-muted)</pre> or
<pre style="display:inline">var(--text-on-accent)</pre>,
because they automatically adapt to theme changes.<br/>
See: <a href="https://github.com/obsidian-community/obsidian-theme-template/blob/main/obsidian.css">
List of available CSS variables in Obsidian
<a/>
`,new U.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=`
Whitespace and newlines are interpreted as
part of the document and in changes
by default (hence not ignored).
This makes the last line being shown as 'changed'
when a new subsequent line is added,
even if the previously last line's text is the same.
<br>
If you don't care about purely-whitespace changes
(e.g. list nesting / quote indentation changes),
then activating this will provide more meaningful change detection.
`}}createColorSetting(r){let n=new U.Setting(this.containerEl).setName("").addText(i=>{let a=a0(r,this.settings.lineAuthor),s=a0(r,je.lineAuthor);i.setPlaceholder(zg(s)),i.setValue(zg(a)),i.onChange(async o=>{let l=dT(o);if(l!==void 0){let c=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(c,l)}this.refreshColorSettingsDesc(r,l)})});this.lineAuthorColorSettings.set(r,n),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,a0(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let n=this.lineAuthorColorSettings.get(r);if(n){let i=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";n.nameEl.innerText=`Color for ${i} commits`}}refreshColorSettingsDesc(r,n){let i=this.lineAuthorColorSettings.get(r);i&&(i.descEl.innerHTML=this.colorSettingPreviewDescHtml(r,this.settings.lineAuthor,n!==void 0))}colorSettingPreviewDescHtml(r,n,i){let a=i?s0(r,n):"rgba(127,127,127,0.3)",s=U.moment.unix(U.moment.now()/1e3).format("YYYY-MM-DD"),o=i?`abcdef Author Name ${s}`:"invalid color";return`Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and
named colors (e.g. 'black', 'purple'). Color preview: ${`<div
class="line-author-settings-preview"
style="background-color: ${a}; width: 30ch;"
>${o}</div>`}`}previewCustomDateTimeDescriptionHtml(r){let n=(0,U.moment)().format(r);return`<a href="${ij}">Format string</a> to display the authoring date.</br>Currently: ${n}`}previewOldestAgeDescriptionHtml(r){let n=Gf(r);return[`The oldest age in the line author coloring. Everything older will have the same color.
</br>Smallest valid age is "1d". Currently: ${n!==void 0?`${n.asDays()} days`:"invalid!"}`,n]}setNonDefaultValue({settingsProperty:r,text:n}){let i=this.plugin.settings[r];je[r]!==i&&n.setValue(String(i))}refreshDisplayWithDelay(r=80){setTimeout(()=>this.display(),r)}};function a0(e,t){return e==="oldest"?t.colorOld:t.colorNew}function Gf(e){let t=U.moment.duration("P"+e.toUpperCase());return t.isValid()&&t.asDays()&&t.asDays()>=1?t:void 0}function FT(e,t,r){if(!(e===void 0||t===void 0||r===void 0))return`head${e}-obj${t}-path${r}`}var $T=zf.Annotation.define();function LT(e,t,r){return r.update({annotations:$T.of({key:e,la:t,lineOffsetsFromUnsavedChanges:new Map})})}function sj(e){return e.annotation($T)}var Zs=zf.StateField.define({create:e=>{},update:(e,t)=>{var r;return(r=sj(t))!=null?r:oj(t,e)},compare:(e,t)=>(e==null?void 0:e.key)===(t==null?void 0:t.key)});function Vf(e){var a;let t=IT.sha256.create();if(!e)return t;let{la:r,key:n,lineOffsetsFromUnsavedChanges:i}=e;t.update(r==="untracked"?"t":"f"),t.update(n);for(let[s,o]of(a=i.entries())!=null?a:[])t.update([s,o]);return t}var Nr={get:void 0,save:void 0};function DT(e,t){Nr.get=e,Nr.save=t}function Wf(e){var t,r;return(r=(t=Gf(e.coloringMaxAge))==null?void 0:t.asDays())!=null?r:Gf(je.lineAuthor.coloringMaxAge).asDays()}function oj(e,t){if(t)return e.changes.empty||e.changes.iterChanges((r,n,i,a)=>{var p;let s=e.startState.doc,{newDoc:o}=e,l=s.lineAt(r).number,c=s.lineAt(n).number,u=o.lineAt(i).number,f=o.lineAt(a).number,d=c-l+1,h=f-u+1;for(let m=u;m<=f;m++){let v=(p=t.lineOffsetsFromUnsavedChanges.get(m))!=null?p:0,y=f===m,b=h-d;y&&(v+=b),t.lineOffsetsFromUnsavedChanges.set(m,v)}}),t}var o0=class{constructor(t){this.state=t;this.subscribeMe()}notifyLineAuthoring(t,r){if(this.view===void 0){console.warn(`Git: View is not defined for editor cache key. Unforeseen situation. id: ${t}`);return}let n=this.view.state,i=LT(t,r,n);this.view.dispatch(i)}updateToNewState(t){let r=this.lastSeenPath&&this.filepath!=this.lastSeenPath;return this.state=t,r&&(this.unsubscribeMe(this.lastSeenPath),this.subscribeMe()),this}removeIfStale(){this.view.destroyed&&this.unsubscribeMe(this.lastSeenPath)}subscribeMe(){this.filepath!==void 0&&(Xs.ifFilepathDefinedTransformSubscribers(this.filepath,t=>t.add(this)),this.lastSeenPath=this.filepath)}unsubscribeMe(t){Xs.ifFilepathDefinedTransformSubscribers(t,r=>r.delete(this))}get filepath(){var t,r;return(r=(t=this.state.field(qf.editorInfoField))==null?void 0:t.file)==null?void 0:r.path}get view(){return this.state.field(qf.editorEditorField)}},BT=NT.StateField.define({create:e=>new o0(e),update:(e,t)=>e.updateToNewState(t.state),compare:(e,t)=>e===t});g();function jT(){Ks=void 0,l0=[],Yf=0,Zf.clear(),Kf.clear(),Js.clear()}var Ks,Xf=()=>Ks;function HT(e,t){var i;let r=t.length;if(r<((i=Ks==null?void 0:Ks.length)!=null?i:0))return;Ks={gutter:e,length:r,text:t};let n=Nr.get();r!==n.gutterSpacingFallbackLength&&(n.gutterSpacingFallbackLength=r,Nr.save(n))}var l0=[],lj=15,Yf=0;function UT(e){l0[Yf]=e,Yf=(Yf+1)%lj}function GT(){return pT(l0)}var Zf=new Map,Kf=new Map,Js=new Set;g();var rC=require("@codemirror/state"),nC=require("@codemirror/view");g();var d0=require("@codemirror/view"),JT=Ve(Zg()),ed=require("obsidian");g();g();var Jf={x:-10,y:-10};function zT(){Jf.x===-10&&window.addEventListener("mousedown",e=>{Jf.x=e.clientX,Jf.y=e.clientY})}function VT(){for(let e of Js)if(cj(e,Jf))return e}function cj(e,t){let{x:r,y:n,width:i,height:a}=e.getBoundingClientRect();return r<=t.x&&t.x<=r+i&&n<=t.y&&t.y<=n+a}g();var Kl={};var WT="data-commit";function qT(e,t,r){if(t.hasFocus())return;let n=VT();if(!n)return;let i=fj(n);i&&(!i.isZeroCommit&&!i.isWaitingGutter&&uj(i,e),c0("showCommitHash",e),c0("authorDisplay",e),c0("dateTimeFormatOptions",e))}function uj(e,t){t.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick(n=>navigator.clipboard.writeText(e.hash)))}function c0(e,t){var l,c;let r,n,i=Kl.plugin.settings.lineAuthor,a=i[e],s=typeof a=="boolean"?a:a!=="hide",o=je.lineAuthor[e];if(e==="showCommitHash")r="Show commit hash",n=a;else if(e==="authorDisplay"){let u=(l=i.lastShownAuthorDisplay)!=null?l:o;r="Show author "+(s?a:u),n=s?"hide":u}else if(e==="dateTimeFormatOptions"){let u=(c=i.lastShownDateTimeFormatOptions)!=null?c:o;r="Show "+(s?a:u),r+=r.contains("date")?"":" date",n=s?"hide":u}else Ii(e);t.addItem(u=>u.setTitle(r).setSection("obs-git-line-author-configure").setChecked(s).onClick(f=>{var d,h;return(h=(d=Kl.plugin)==null?void 0:d.settingsTab)==null?void 0:h.lineAuthorSettingHandler(e,n)}))}function YT(e,t,r){r.setAttr(WT,JSON.stringify({hash:e.hash,isZeroCommit:e.isZeroCommit,isWaitingGutter:t}))}function fj(e){let t=e.getAttr(WT);return t?JSON.parse(t):void 0}g();function s0(e,t){return e==="oldest"?Qf(0,!1,t).color:Qf(void 0,!0,t).color}function Qf(e,t,r){let n=Wf(r),i=Date.now()/1e3,a=e!=null?e:0,o=(t?0:i-a)/60/60/24,l=Math.pow(Math.clamp(o/n,0,1),1/2.3),c=Line truncated
(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Br.setIcon)(this.iconEl,"globe"):(0,Br.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus&&this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};g();var sd=require("obsidian"),ad=class extends sd.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let n=(0,sd.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${n}: ${r}`,`${r}: ${n}`]}renderSuggestion(r,n){n.innerText=r}onChooseSuggestion(r,n){this.resolve&&this.resolve(r)}};g();var oC=require("obsidian"),Jl=class{constructor(t){this.plugin=t}saveLastAuto(t,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(t.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(t.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(t.toString())}loadLastAuto(){var t,r,n;return{backup:new Date((t=this.plugin.localStorage.getLastAutoBackup())!=null?t:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((n=this.plugin.localStorage.getLastAutoPush())!=null?n:"")}}async init(){await this.setUpAutoCommitAndSync();let t=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,t.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,t.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...t){t.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),t.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),t.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let t=await this.plugin.gitManager.getLastCommitTime();t&&this.saveLastAuto(t,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let t=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,t.backup);this.startAutoCommitAndSync(r)}}}startAutoCommitAndSync(t){let r=(t!=null?t:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?t===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,oC.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let t=await this.plugin.gitManager.getLastCommitTime();if(t){this.saveLastAuto(t,"backup");let r=this.diff(this.plugin.settings.autoSaveInterval,t);if(r>0)return this.startAutoCommitAndSync(r),!1}}return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0}):await this.plugin.commitAndSync({fromAutoBackup:!0}),!0},t=>{t!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(t){let r=(t!=null?t:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(t){let r=(t!=null?t:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastAuto(new Date,"push"),this.startAutoPush()})}clearAutoCommitAndSync(){var r;let t=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,t=!0),this.plugin.autoCommitDebouncer&&((r=this.plugin.autoCommitDebouncer)==null||r.cancel(),this.plugin.autoCommitDebouncer=void 0,t=!0),t}clearAutoPull() Line truncated
- ${a.map(o=>o.vaultPath).join(`
- `)}
Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(t){t!==void 0&&await this.plugin.app.vault.adapter.write(Fs,t);let r=!1;this.plugin.app.workspace.iterateAllLeaves(n=>{n.getDisplayText()!=""&&Fs.startsWith(n.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(Fs,"/",!0)}openDiff({aFile:t,bFile:r,aRef:n,bRef:i,event:a}){var l,c;let s=this.plugin.settings.diffStyle;eo.Platform.isMobileApp&&(s="git_unified");let o={aFile:t,bFile:r!=null?r:t,aRef:n,bRef:i};s=="split"?(l=nn(this.plugin.app,a))==null||l.setViewState({type:ki.type,active:!0,state:o}):s=="git_unified"&&((c=nn(this.plugin.app,a))==null||c.setViewState({type:Ti.type,active:!0,state:o}))}async runRawCommand(){let t=this.plugin.gitManager;if(!(t instanceof Ee))return;let n=await new $e(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();n!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let i=new eo.Notice(`Running '${n}'...`,999999);try{let a=await t.rawCommand(n);a?(i.setMessage(a),window.setTimeout(()=>i.hide(),5e3)):i.hide()}catch(a){throw i.hide(),a}})}};g();g();g();g();var He;(function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"})(He||(He={}));var pC={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},mC={LINES:"lines",WORDS:"words",NONE:"none"},gC={WORD:"word",CHAR:"char"},Ta;(function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"})(Ta||(Ta={}));g();var Sj=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],Ej=RegExp("["+Sj.join("\\")+"]","g");function vC(e){return e.replace(Ej,"\\$&")}function g0(e){return e&&e.replace(/\\/g,"/")}function yC(e){let t,r,n,i=0;for(t=0,n=e.length;t<n;t++)r=e.charCodeAt(t),i=(i<<5)-i+r,i|=0;return i}function wC(e,t){let r=e.split(".");return r.length>1?r[r.length-1]:t}function bC(e,t){return t.reduce((r,n)=>r||e.startsWith(n),!1)}var _C=["a/","b/","i/","w/","c/","o/"];function Li(e,t,r){let n=r!==void 0?[..._C,r]:_C,i=t?new RegExp(`^${vC(t)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(e)||[],s=n.find(l=>a.indexOf(l)===0);return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function Aj(e,t){return Li(e,"---",t)}function kj(e,t){return Li(e,"+++",t)}function xC(e,t={}){let r=[],n=null,i=null,a=null,s=null,o=null,l=null,c=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,m=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,b=/^copy to "?(.+)"?/,x=/^rename from "?(.+)"?/,E=/^rename to "?(.+)"?/,_=/^similarity index (\d+)%/,k=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,A=/^Binary files (.*) and (.*) differ/,S=/^GIT binary patch/,T=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,P=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,I=/^new file mode (\d{6})/,N=/^deleted file mode (\d{6}),(\d{6})/,L=e.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,`
`).split(`
`);function ee(){i!==null&&n!==null&&(n.blocks.push(i),i=null)}function fe(){n!==null&&(!n.oldName&&l!==null&&(n.oldName=l),!n.newName&&c!==null&&(n.newName=c),n.newName&&(r.push(n),n=null)),l=null,c=null}function J(){ee(),fe(),n={blocks:[],deletedLines:0,addedLines:0}}function Q(z){ee();let Y;n!==null&&((Y=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(z))?(n.isCombined=!1,a=parseInt(Y[1],10),o=parseInt(Y[2],10)):(Y=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(z))?(n.isCombined=!0,a=parseInt(Y[1],10),s=parseInt(Y[2],10),o=parseInt(Y[3],10)):(z.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),a=0,o=0,n.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:s,newStartLine:o,header:z}}function Pe(z){if(n===null||i===null||a===null||o===null)return;let Y={content:z},O=n.isCombined?["+ "," +","++"]:["+"],he=n.isCombined?["- "," -","--"]:["-"];bC(z,O)?(n.addedLines++,Y.type=He.INSERT,Y.oldNumber=void 0,Y.newNumber=o++):bC(z,he)?(n.deletedLines++,Y.type=He.DELETE,Y.oldNumber=a++,Y.newNumber=void 0):(Y.type=He.CONTEXT,Y.oldNumber=a++,Y.newNumber=o++),i.lines.push(Y)}function ge(z,Y){let O=Y;for(;O<L.length-3;){if(z.startsWith("diff"))return!1;if(L[O].startsWith(u)&&L[O+1].startsWith(f)&&L[O+2].startsWith(d))return!0;O++}return!1}return L.forEach((z,Y)=>{if(!z||z.startsWith("*"))return;let O,he=L[Y-1],ze=L[Y+1],gt=L[Y+2];if(z.startsWith("diff --git")||z.startsWith("diff --combined")){if(J(),(O=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(z))&&(l=Li(O[1],void 0,t.dstPrefix),c=Li(O[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isGitDiff=!0;return}if(z.startsWith("Binary files")&&!(n!=null&&n.isGitDiff)){if(J(),(O=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(z))&&(l=Li(O[1],void 0,t.dstPrefix),c=Li(O[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isBinary=!0;return}if((!n||!n.isGitDiff&&n&&z.startsWith(u)&&ze.startsWith(f)&&gt.startsWith(d))&&J(),n!=null&&n.isTooBig)return;if(n&&(typeof t.diffMaxChanges=="number"&&n.addedLines+n.deletedLines>t.diffMaxChanges||typeof t.diffMaxLineLength=="number"&&z.length>t.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;let ct=typeof t.diffTooBigMessage=="function"?t.diffTooBigMessage(r.length):"Diff too big to be displayed";Q(ct);return}if(z.startsWith(u)&&ze.startsWith(f)||z.startsWith(f)&&he.startsWith(u)){if(n&&!n.oldName&&z.startsWith("--- ")&&(O=Aj(z,t.srcPrefix))){n.oldName=O,n.language=wC(n.oldName,n.language);return}if(n&&!n.newName&&z.startsWith("+++ ")&&(O=kj(z,t.dstPrefix))){n.newName=O,n.language=wC(n.newName,n.language);return}}if(n&&(z.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i)){Q(z);return}if(i&&(z.startsWith("+")||z.startsWith("-")||z.startsWith(" "))){Pe(z);return}let Re=!ge(z,Y);if(n===null)throw new Error("Where is my file !!!");(O=h.exec(z))?n.oldMode=O[1]:(O=p.exec(z))?n.newMode=O[1]:(O=m.exec(z))?(n.deletedFileMode=O[1],n.isDeleted=!0):(O=v.exec(z))?(n.newFileMode=O[1],n.isNew=!0):(O=y.exec(z))?(Re&&(n.oldName=O[1]),n.isCopy=!0):(O=b.exec(z))?(Re&&(n.newName=O[1]),n.isCopy=!0):(O=x.exec(z))?(Re&&(n.oldName=O[1]),n.isRename=!0):(O=E.exec(z))?(Re&&(n.newName=O[1]),n.isRename=!0):(O=A.exec(z))?(n.isBinary=!0,n.oldName=Li(O[1],void 0,t.srcPrefix),n.newName=Li(O[2],void 0,t.dstPrefix),Q("Binary file")):S.test(z)?(n.isBinary=!0,Q(z)):(O=_.exec(z))?n.unchangedPercentage=parseInt(O[1],10):(O=k.exec(z))?n.changedPercentage=parseInt(O[1],10):(O=w.exec(z))?(n.checksumBefore=O[1],n.checksumAfter=O[2],O[3]&&(n.mode=O[3])):(O=T.exec(z))?(n.checksumBefore=[O[2],O[3]],n.checksumAfter=O[1]):(O=P.exec(z))?(n.oldMode=[O[2],O[3]],n.newMode=O[1]):(O=I.exec(z))?(n.newFileMode=O[1],n.isNew=!0):(O=N.exec(z))&&(n.deletedFileMode=O[1],n.isDeleted=!0)}),ee(),fe(),r}g();g();g();function Qn(){}Qn.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var a=this;function s(m){return i?(setTimeout(function(){i(void 0,m)},0),!0):m}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var o=r.length,l=t.length,c=1,u=o+l;n.maxEditLength&&(u=Math.min(u,n.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=o&&d+1>=l)return s([{value:this.join(r),count:r.length}]);function h(){for(var m=-1*c;m<=c;m+=2){var v=void 0,y=f[m-1],b=f[m+1],x=(b?b.newPos:0)-m;y&&(f[m-1]=void 0);var E=y&&y.newPos+1<o,_=b&&0<=x&&x<l;if(!E&&!_){f[m]=void 0;continue}if(!E||_&&y.newPos<b.newPos?(v=Pj(b),a.pushComponent(v.components,void 0,!0)):(v=y,v.newPos++,a.pushComponent(v.components,!0,void 0)),x=a.extractCommon(v,r,t,m),v.newPos+1>=o&&x+1>=l)return s(Cj(a,v.components,r,t,a.useLongestToken));f[m]=v}c++}if(i)(function m(){setTimeout(function(){if(c>u)return i();h()||m()},0)})();else for(;c<=u;){var p=h();if(p)return p}},pushCompon Line truncated
`);return this.hoganUtils.render(PC,"wrapper",{colorScheme:io(this.config.colorScheme),filesNumber:t.length,files:r})}};g();var S0=Object.assign(Object.assign({},Ca),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),rc="generic",RC="line-by-line",Uj="icon",Gj="tag",nc=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},S0),r)}render(t){let r=t.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(`
`);return this.hoganUtils.render(rc,"wrapper",{colorScheme:io(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(RC,"file-diff"),i=this.hoganUtils.template(rc,"file-path"),a=this.hoganUtils.template(Uj,"file"),s=this.hoganUtils.template(Gj,so(t));return n.render({file:t,fileHtmlId:ao(t),diffs:r,filePath:i.render({fileDiffName:Pa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(rc,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Tt})}generateFileHtml(t){let r=ro(to(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i=this.hoganUtils.render(rc,"block-header",{CSSLineClass:Tt,blockHeader:t.isTooBig?n.header:Di(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(t,t.isCombined,l,c);i+=u,i+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=jr(l.content,t.isCombined);i+=this.generateSingleLineHtml(t,{type:Tt.CONTEXT,prefix:c,content:u,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(t,t.isCombined,s,o);i+=l,i+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(`
`)}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a<t.lines.length;a++){let s=t.lines[a];(s.type!==He.INSERT&&i.length||s.type===He.CONTEXT&&n.length>0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?n(t,r):[[t,r]]}processChangedLines(t,r,n,i){let a={right:"",left:""},s=Math.max(n.length,i.length);for(let o=0;o<s;o++){let l=n[o],c=i[o],u=l!==void 0&&c!==void 0?fd(l.content,c.content,r,this.config):void 0,f=l!==void 0&&l.oldNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:Tt.DELETE_CHANGES}:Object.assign(Object.assign({},jr(l.content,r)),{type:no(l.type)})),{oldNumber:l.oldNumber,newNumber:l.newNumber}):void 0,d=c!==void 0&&c.newNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.newLine.prefix,content:u.newLine.content,type:Tt.INSERT_CHANGES}:Object.assign(Object.assign({},jr(c.content,r)),{type:no(c.type)})),{oldNumber:c.oldNumber,newNumber:c.newNumber}):void 0,{left:h,right:p}=this.generateLineHtml(t,f,d);a.left+=h,a.right+=p}return a}generateLineHtml(t,r,n){return{left:this.generateSingleLineHtml(t,r),right:this.generateSingleLineHtml(t,n)}}generateSingleLineHtml(t,r){if(r===void 0)return"";let n=this.hoganUtils.render(RC,"numbers",{oldNumber:r.oldNumber||"",newNumber:r.newNumber||""});return this.hoganUtils.render(rc,"line",{type:r.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:r.prefix===" "?"&nbsp;":r.prefix,content:r.content,lineNumber:n,line:r,file:t})}};g();var E0=Object.assign(Object.assign({},Ca),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),ic="generic",zj="side-by-side",Vj="icon",Wj="tag",ac=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},E0),r)}render(t){let r=t.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(`
`);return this.hoganUtils.render(ic,"wrapper",{colorScheme:io(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(zj,"file-diff"),i=this.hoganUtils.template(ic,"file-path"),a=this.hoganUtils.template(Vj,"file"),s=this.hoganUtils.template(Wj,so(t));return n.render({file:t,fileHtmlId:ao(t),diffs:r,filePath:i.render({fileDiffName:Pa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(ic,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Tt})}}generateFileHtml(t){let r=ro(to(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i={left:this.makeHeaderHtml(n.header,t),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(t.isCombined,l,c);i.left+=u,i.right+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=jr(l.content,t.isCombined),{left:f,right:d}=this.generateLineHtml({type:Tt.CONTEXT,prefix:c,content:u,number:l.oldNumber},{type:Tt.CONTEXT,prefix:c,content:u,number:l.newNumber});i.left+=f,i.right+=d});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(t.isCombined,s,o);i.left+=l,i.right+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).reduce((n,i)=>({left:n.left+i.left,right:n.right+i.right}),{left:"",right:""})}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a<t.lines.length;a++){let s=t.lines[a];(s.type!==He.INSERT&&i.length||s.type===He.CONTEXT&&n.length>0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?n(t,r):[[t,r]]}makeHeaderHtml(t,r){return this.hoganUtils.render(ic,"block-header",{CSSLineClass:Tt,blockHeader:r!=null&&r.isTooBig?t:Di(t),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(t,r,n){let i={right:"",left:""},a=Math.max(r.length,n.length);for(let s=0;s<a;s++){let o=r[s],l=n[s],c=o!==void 0&&l!==void 0?fd(o.content,l.content,t,this.config):void 0,u=o!==void 0&&o.oldNumber!==void 0?Object.assign(Object.assign({},c!==void 0?{prefix:c.oldLine.prefix,content:c.oldLine.content,type:Tt.DELETE_CHANGES}:Object.assign(Object.assign({},jr(o.content,t)),{type:no(o.type)})),{number:o.oldNumber}):void 0,f=l!==void 0&&l.newNumber!==void 0?Object.assign(Object.assign({},c!==void 0?{prefix:c.newLine.prefix,content:c.newLine.content,type:Tt.INSERT_CHANGES}:Object.assign(Object.assign({},jr(l.content,t)),{type:no(l.type)})),{number:l.newNumber}):void 0,{left:d,right:h}=this.generateLineHtml(u,f);i.left+=d,i.right+=h}return i}generateLineHtml(t,r){return{left:this.generateSingleHtml(t),right:this.generateSingleHtml(r)}}generateSingleHtml(t){let r="d2h-code-side-linenumber",n="d2h-code-side-line";return this.hoganUtils.render(ic,"line",{type:(t==null?void 0:t.type)||`${Tt.CONTEXT} d2h-emptyplaceholder`,lineClass:t!==void 0?r:`${r} d2h-code-side-emptyplaceholder`,contentClass:t!==void 0?n:`${n} d2h-code-side-emptyplaceholder`,prefix:(t==null?void 0:t.prefix)===" "?"&nbsp;":t==null?void 0:t.prefix,content:t==null?void 0:t.content,lineNumber:t==null?void 0:t.number})}};g();var C0=Ve(T0());g();var ut=Ve(T0()),st={};st["file-summary-line"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<li class="d2h-file-list-line">'),n.b(`
`+r),n.b(' <span class="d2h-file-name-wrapper">'),n.b(`
`+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <a href="#'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-name">'),n.b(n.v(n.f("fileName",e,t,0))),n.b("</a>"),n.b(`
`+r),n.b(' <span class="d2h-file-stats">'),n.b(`
`+r),n.b(' <span class="d2h-lines-added">'),n.b(n.v(n.f("addedLines",e,t,0))),n.b("</span>"),n.b(`
`+r),n.b(' <span class="d2h-lines-deleted">'),n.b(n.v(n.f("deletedLines",e,t,0))),n.b("</span>"),n.b(`
`+r),n.b(" </span>"),n.b(`
`+r),n.b(" </span>"),n.b(`
`+r),n.b("</li>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}});st["file-summary-wrapper"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-file-list-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-list-header">'),n.b(`
`+r),n.b(' <span class="d2h-file-list-title">Files changed ('),n.b(n.v(n.f("filesNumber",e,t,0))),n.b(")</span>"),n.b(`
`+r),n.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),n.b(`
`+r),n.b(' <a class="d2h-file-switch d2h-show">show</a>'),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <ol class="d2h-file-list">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("files",e,t,0))),n.b(`
`+r),n.b(" </ol>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});st["generic-block-header"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('"></td>'),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.s(n.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(s.t(s.f("blockHeader",i,a,0)))}),e.pop()),n.s(n.f("blockHeader",e,t,1),e,t,1,0,0,"")||n.b("&nbsp;"),n.b("</div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});st["generic-empty-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b(`
`+r),n.b(" File without changes"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});st["generic-file-path"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-file-name-wrapper">'),n.b(`
`+r),n.b(n.rp("<fileIcon0",e,t," ")),n.b(' <span class="d2h-file-name">'),n.b(n.v(n.f("fileDiffName",e,t,0))),n.b("</span>"),n.b(`
`+r),n.b(n.rp("<fileTag1",e,t," ")),n.b("</span>"),n.b(`
`+r),n.b('<label class="d2h-file-collapse">'),n.b(`
`+r),n.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),n.b(`
`+r),n.b(" Viewed"),n.b(`
`+r),n.b("</label>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}});st["generic-line"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",e,t,0))),n.b(" "),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("lineNumber",e,t,0))),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("type",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",e,t,0))),n.b('">'),n.b(`
`+r),n.s(n.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(' <span class="d2h-code-line-prefix">'),s.b(s.t(s.f("prefix",i,a,0))),s.b("</span>"),s.b(`
`+r)}),e.pop()),n.s(n.f("prefix",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-prefix">&nbsp;</span>'),n.b(`
`+r)),n.s(n.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(' <span class="d2h-code-line-ctn">'),s.b(s.t(s.f("content",i,a,0))),s.b("</span>"),s.b(`
`+r)}),e.pop()),n.s(n.f("content",e,t,1),e,t,1,0,0,"")||(n.b(' <span class="d2h-code-line-ctn"><br></span>'),n.b(`
`+r)),n.b(" </div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});st["generic-wrapper"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-wrapper '),n.b(n.v(n.f("colorScheme",e,t,0))),n.b('">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("content",e,t,0))),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});st["icon-file-added"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),n.b(`
`+r),n.b(' width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});st["icon-file-changed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});st["icon-file-deleted"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});st["icon-file-renamed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});st["icon-file"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),n.b(`
`+r),n.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});st["line-by-line-file-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-header">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-file-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("diffs",e,t,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});st["line-by-line-numbers"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div class="line-num1">'),n.b(n.v(n.f("oldNumber",e,t,0))),n.b("</div>"),n.b(`
`+r),n.b('<div class="line-num2">'),n.b(n.v(n.f("newNumber",e,t,0))),n.b("</div>"),n.fl()},partials:{},subs:{}});st["side-by-side-file-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",e,t,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",e,t,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-header">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-files-diff">'),n.b(`
`+r),n.b(' <div class="d2h-file-side-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.d("diffs.left",e,t,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-file-side-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.d("diffs.right",e,t,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});st["tag-file-added"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),n.fl()},partials:{},subs:{}});st["tag-file-changed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),n.fl()},partials:{},subs:{}});st["tag-file-deleted"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),n.fl()},partials:{},subs:{}});st["tag-file-renamed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),n.fl()},partials:{},subs:{}});var sc=class{constructor({compiledTemplates:t={},rawTemplates:r={}}){let n=Object.entries(r).reduce((i,[a,s])=>{let o=C0.compile(s,{asString:!1});return Object.assign(Object.assign({},i),{[a]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},st),t),n)}static compile(t){return C0.compile(t,{asString:!1})}render(t,r,n,i,a){let s=this.templateKey(t,r);try{return this.preCompiledTemplates[s].render(n,i,a)}catch(o){throw new Error(`Could not find template to render '${s}'`)}}template(t,r){return this.preCompiledTemplates[this.templateKey(t,r)]}templateKey(t,r){return`${t}-${r}`}};var Yj=Object.assign(Object.assign(Object.assign({},S0),E0),{outputFormat:pC.LINE_BY_LINE,drawFileList:!0});function FC(e,t={}){let r=Object.assign(Object.assign({},Yj),t),n=typeof e=="string"?xC(e,r):e,i=new sc(r),{colorScheme:a}=r,s={colorScheme:a},o=r.drawFileList?new dd(i,s).render(n):"",l=r.outputFormat==="side-by-side"?new ac(i,r).render(n):new nc(i,r).render(n);return o+l}var pd=require("obsidian");var Ra=class extends pd.ItemView{constructor(r,n){super(r);this.plugin=n;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return Ti.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return Ti.name}getIcon(){return Ti.icon}async setState(r,n){this.state=r,pd.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let n=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let i=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!n){if(this.plugin.gitManager instanceof Ee&&await this.plugin.gitManager.isTracked(this.state.bFile))n=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(`
`);else if(await this.app.vault.adapter.exists(i)){let a=await this.app.vault.adapter.read(i);n=[...`--- /dev/null
+++ ${this.state.bFile}
@@ -0,0 +1,${a.split(`
`).length} @@`.split(`
`),...a.split(`
`).map(o=>`+${o}`)].join(`
`)}}if(n){let a=this.parser.parseFromString(FC(n),"text/html").querySelector(".d2h-file-diff");this.contentEl.append(a)}else{let a=this.contentEl.createDiv({cls:"obsidian-git-center"});a.createSpan({text:"\u26A0\uFE0F",attr:{style:"font-size: 2em"}}),a.createEl("br"),a.createSpan({text:"File not found: "+this.state.bFile})}}finally{this.gettingDiff=!1}}}};g();var ho=require("obsidian");var po=require("@codemirror/commands");g();var Me=require("@codemirror/view"),Ae=require("@codemirror/state");g();var P0="\u037C",$C=typeof Symbol=="undefined"?"__"+P0:Symbol.for(P0),R0=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),LC=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{},md=class{constructor(t,r){this.rules=[];let{finish:n}=r||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function a(s,o,l,c){let u=[],f=/^@(\w+)\b/.exec(s[0]),d=f&&f[1]=="keyframes";if(f&&o==null)return l.push(s[0]+";");for(let h in o){let p=o[h];if(/&/.test(h))a(h.split(/,\s*/).map(m=>s.map(v=>m.replace(/&/,v))).reduce((m,v)=>m.concat(v)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");a(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((n&&!f&&!c?s.map(n):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in t)a(i(s),t[s],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let t=LC[$C]||1;return LC[$C]=t+1,P0+t.toString(36)}static mount(t,r,n){let i=t[R0],a=n&&n.nonce;i?a&&i.setNonce(a):i=new M0(t,a),i.mount(Array.isArray(r)?r:[r],t)}},DC=new Map,M0=class{constructor(t,r){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let a=DC.get(n);if(a)return t[R0]=a;this.sheet=new i.CSSStyleSheet,DC.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],t[R0]=this}mount(t,r){let n=this.sheet,i=0,a=0;for(let s=0;s<t.length;s++){let o=t[s],l=this.modules.indexOf(o);if(l<a&&l>-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,o),n)for(let c=0;c<o.rules.length;c++)n.insertRule(o.rules[c],i++)}else{for(;a<l;)i+=this.modules[a++].rules.length;i+=o.rules.length,a++}}if(n)r.adoptedStyleSheets.indexOf(this.sheet)<0&&(r.adoptedStyleSheets=[this.sheet,...r.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
`;this.styleTag.textContent=s;let o=r.head||r;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}};var t3=require("@codemirror/language"),Xj=require("@lezer/highlight"),ft=class e{constructor(t,r,n,i){this.fromA=t,this.toA=r,this.fromB=n,this.toB=i}offset(t,r=t){return new e(this.fromA+t,this.toA+t,this.fromB+r,this.toB+r)}};function Oa(e,t,r,n,i,a){if(e==n)return[];let s=N0(e,t,r,n,i,a),o=B0(e,t+s,r,n,i+s,a);t+=s,r-=o,i+=s,a-=o;let l=r-t,c=a-i;if(!l||!c)return[new ft(t,r,i,a)];if(l>c){let f=e.slice(t,r).indexOf(n.slice(i,a));if(f>-1)return[new ft(t,t+f,i,i),new ft(t+f+c,r,a,a)]}else if(c>l){let f=n.slice(i,a).indexOf(e.slice(t,r));if(f>-1)return[new ft(t,t,i,i+f),new ft(r,r,i+f+l,a)]}if(l==1||c==1)return[new ft(t,r,i,a)];let u=n3(e,t,r,n,i,a);if(u){let[f,d,h]=u;return Oa(e,t,f,n,i,d).concat(Oa(e,f+h,r,n,d+h,a))}return Zj(e,t,r,n,i,a)}var oc=1e9;function Zj(e,t,r,n,i,a){let s=r-t,o=a-i;if(oc<1e9&&Math.min(s,o)>oc*16)return Math.min(s,o)>oc*64?[new ft(t,r,i,a)]:NC(e,t,r,n,i,a);let l=Math.ceil((s+o)/2);O0.reset(l),I0.reset(l);let c=(h,p)=>e.charCodeAt(t+h)==n.charCodeAt(i+p),u=(h,p)=>e.charCodeAt(r-h-1)==n.charCodeAt(a-p-1),f=(s-o)%2!=0?I0:null,d=f?null:O0;for(let h=0;h<l;h++){if(h>oc)return NC(e,t,r,n,i,a);let p=O0.advance(h,s,o,l,f,!1,c)||I0.advance(h,s,o,l,d,!0,u);if(p)return Kj(e,t,r,t+p[0],n,i,a,i+p[1])}return[new ft(t,r,i,a)]}var bd=class{constructor(){this.vec=[]}reset(t){this.len=t<<1;for(let r=0;r<this.len;r++)this.vec[r]=-1;this.vec[t+1]=0,this.start=this.end=0}advance(t,r,n,i,a,s,o){for(let l=-t+this.start;l<=t-this.end;l+=2){let c=i+l,u=l==-t||l!=t&&this.vec[c-1]<this.vec[c+1]?this.vec[c+1]:this.vec[c-1]+1,f=u-l;for(;u<r&&f<n&&o(u,f);)u++,f++;if(this.vec[c]=u,u>r)this.end+=2;else if(f>n)this.start+=2;else if(a){let d=i+(r-n)-l;if(d>=0&&d<this.len&&a.vec[d]!=-1)if(s){let h=a.vec[d];if(h>=r-u)return[h,i+h-d]}else{let h=r-a.vec[d];if(u>=h)return[u,f]}}}return null}},O0=new bd,I0=new bd;function Kj(e,t,r,n,i,a,s,o){let l=!1;return!co(e,n)&&++n==r&&(l=!0),!co(i,o)&&++o==s&&(l=!0),l?[new ft(t,r,a,s)]:Oa(e,t,n,i,a,o).concat(Oa(e,n,r,i,o,s))}function r3(e,t){let r=1,n=Math.min(e,t);for(;r<n;)r=r<<1;return r}function N0(e,t,r,n,i,a){if(t==r||t==a||e.charCodeAt(t)!=n.charCodeAt(i))return 0;let s=r3(r-t,a-i);for(let o=t,l=i;;){let c=o+s,u=l+s;if(c>r||u>a||e.slice(o,c)!=n.slice(l,u)){if(s==1)return o-t-(co(e,o)?0:1);s=s>>1}else{if(c==r||u==a)return c-t;o=c,l=u}}}function B0(e,t,r,n,i,a){if(t==r||i==a||e.charCodeAt(r-1)!=n.charCodeAt(a-1))return 0;let s=r3(r-t,a-i);for(let o=r,l=a;;){let c=o-s,u=l-s;if(c<t||u<i||e.slice(c,o)!=n.slice(u,l)){if(s==1)return r-o-(co(e,o)?0:1);s=s>>1}else{if(c==t||u==i)return r-c;o=c,l=u}}}function F0(e,t,r,n,i,a,s,o){let l=n.slice(i,a),c=null;for(;;){if(c||s<o)return c;for(let u=t+s;;){co(e,u)||u++;let f=u+s;if(co(e,f)||(f+=f==u+1?1:-1),f>=r)break;let d=e.slice(u,f),h=-1;for(;(h=l.indexOf(d,h+1))!=-1;){let p=N0(e,f,r,n,i+h+d.length,a),m=B0(e,t,u,n,i,i+h),v=d.length+p+m;(!c||c[2]<v)&&(c=[u-m,i+h-m,v])}u=f}if(o<0)return c;s=s>>1}}function n3(e,t,r,n,i,a){let s=r-t,o=a-i;if(s<o){let l=n3(n,i,a,e,t,r);return l&&[l[1],l[0],l[2]]}return s<4||o*2<s?null:F0(e,t,r,n,i,a,Math.floor(s/4),-1)}function NC(e,t,r,n,i,a){let s=r-t,o=a-i,l;if(s<o){let d=F0(n,i,a,e,t,r,Math.floor(s/6),50);l=d&&[d[1],d[0],d[2]]}else l=F0(e,t,r,n,i,a,Math.floor(o/6),50);if(!l)return[new ft(t,r,i,a)];let[c,u,f]=l;return Oa(e,t,c,n,i,u).concat(Oa(e,c+f,r,n,u+f,a))}function i3(e,t){for(let r=1;r<e.length;r++){let n=e[r-1],i=e[r];n.toA>i.fromA-t&&n.toB>i.fromB-t&&(e[r-1]=new ft(n.fromA,i.toA,n.fromB,i.toB),e.splice(r--,1))}}function Jj(e,t,r){for(;;){i3(r,1);let n=!1;for(let i=0;i<r.length;i++){let a=r[i],s,o;(s=N0(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=r[i]=new ft(a.fromA+s,a.toA,a.fromB+s,a.toB)),(o=B0(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=r[i]=new ft(a.fromA,a.toA-o,a.fromB,a.toB-o));let l=a.toA-a.fromA,c=a.toB-a.fromB;if(l&&c)continue;let u=a.fromA-(i?r[i-1].toA:0),f=(i<r.length-1?r[i+1].fromA:e.length)-a.toA;if(!u||!f)continue;let d=l?e.slice(a.fromA,a.toA):t.slice(a.fromB,a.toB);u<=d.length&&e.slice(a.fromA-u,a.fromA)==d.slice(d.length-u)?(r[i]=new ft(a.fromA-u,a.toA-u,a.fromB-u,a.toB-u),n=!0):f<=d.length&&e.slice(a.toA,a.toA+f)==d.slice(0,f)&&(r[i]=new ft(a.fromA+f,a.toA+f,a.fromB+f,a.toB+f),n=!0)}if(!n)break}return r}function Qj(e,t,r){for(let n=0,i=0;i<e.length;i++){let a=e[i],s=a.toA-a.fromA,o=a.toB-a.fromB;if(s&&o||s>3||o>3){let l=i==e.length-1?t.length:e[i+1].fromA,c=a.fromA-n,u=l-a.toA,f=jC(t,a.fromA,Math.min(c,5)),d=BC(t,a.toA,Math.min(u,5)),h=a.fromA-f,p=d-a.toA;if(!s||!o){let m=Math.max(s,o),[v,y,b]=s?[t,a.fromA,a.toA]:[r,a.fromB,a.toB];h&&p&&(m>h&&t.slice(f,a.fromA)==v.slice(b-h,b)?(a=e[i]=new ft(f,f+s,a.fromB-h,a.toB-h),f=a.fromA,d=BC(t,a.toA,Math.min(l-a.toA,5))):m>p&&t.slice(a.toA,d)==v.slice(y,y+p)&&(a=e[i]=new ft(d-s,d,a.fromB+p,a.toB+p),d=a.toA,f=jC(t,a.fromA,Math.min(a.fro Line truncated
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function w3(e){if(G){let t=new Error(`effect_in_teardown
\`${e}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function b3(){if(G){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _3(e){if(G){let t=new Error(`effect_orphan
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function x3(){if(G){let e=new Error(`effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function S3(){if(G){let e=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function E3(e){if(G){let t=new Error(`props_invalid_value
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function A3(e){if(G){let t=new Error(`rune_outside_svelte
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function k3(){if(G){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function T3(){if(G){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function C3(){if(G){let e=new Error("state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state\nhttps://svelte.dev/e/state_unsafe_local_read");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function P3(){if(G){let e=new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}g();var ei=!1,ti=!1;g();g();g();var uc=null;function ri(e){let t=Error(),r=t.stack;if(r){let n=r.split(`
`),i=[`
`];for(let a=0;a<n.length;a++){let s=n[a];if(s!=="Error"){if(s.includes("validate_each_keys"))return null;s.includes("svelte/src/internal")||i.push(s)}}if(i.length===1)return null;It(t,"stack",{value:i.join(`
`)}),It(t,"name",{value:`${e}Error`})}return t}var Na=new Set;function Y0(e){Na=e}function ht(e,t){var r={f:0,v:e,reactions:null,equals:Td,version:0};return G&&ti&&(r.created=t!=null?t:ri("CreatedAt"),r.debug=null),r}function pt(e){return v7(ht(e))}function Bi(e,t=!1){var n,i;let r=ht(e);return t||(r.equals=go),ei&&pe!==null&&pe.l!==null&&((i=(n=pe.l).s)!=null?i:n.s=[]).push(r),r}function v7(e){return de!==null&&de.f&2&&(ln===null?O3([e]):ln.push(e)),e}function re(e,t){return de!==null&&ji()&&de.f&18&&(ln===null||!ln.includes(e))&&P3(),yo(e,t)}function yo(e,t){if(!e.equals(t)&&(e.v=t,e.version=Cd(),G&&ti&&(e.updated=ri("UpdatedAt")),M3(e,2048),ji()&&te!==null&&te.f&1024&&!(te.f&32)&&(Ct!==null&&Ct.includes(e)?(Zt(te,2048),wo(te)):ni===null?I3([e]):ni.push(e)),G&&Na.size>0)){let n=Array.from(Na);var r=ii;vo(!0);try{for(let i of n)i.f&1024&&Zt(i,4096),Hi(i)&&ja(i)}finally{vo(r)}Na.clear()}return t}function M3(e,t){var r=e.reactions;if(r!==null)for(var n=ji(),i=r.length,a=0;a<i;a++){var s=r[a],o=s.f;if(!(o&2048)&&!(!n&&s===te)){if(G&&o&262144){Na.add(s);continue}Zt(s,t),o&1280&&(o&2?M3(s,4096):wo(s))}}}g();g();g();var dc="font-weight: bold",hc="font-weight: normal";function F3(e,t,r){G?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,dc,hc):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function bo(e){G?console.warn(`%c[svelte] hydration_mismatch
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,dc,hc):console.warn("https://svelte.dev/e/hydration_mismatch")}function $3(){G?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,dc,hc):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function X0(e,t){G?console.warn(`%c[svelte] ownership_invalid_mutation
%c${e?`${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead`:"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
https://svelte.dev/e/ownership_invalid_mutation`,dc,hc):console.warn("https://svelte.dev/e/ownership_invalid_mutation")}function Pd(e){G?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,dc,hc):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var ae=!1;function or(e){ae=e}var ue;function tt(e){if(e===null)throw bo(),Ni;return ue=e}function Ft(){return tt($t(ue))}function B(e){if(ae){if($t(ue)!==null)throw bo(),Ni;ue=e}}function _o(e=1){if(ae){for(var t=e,r=ue;t--;)r=$t(r);ue=r}}function xo(){for(var e=0,t=ue;;){if(t.nodeType===8){var r=t.data;if(r===$a){if(e===0)return t;e-=1}else(r===mo||r===Fa)&&(e+=1)}var n=$t(t);t.remove(),t=n}}g();g();g();var y7={},w7=/at (?:.+ \()?(.+):(\d+):(\d+)\)?$/,b7=/@(.+):(\d+):(\d+)$/;function _7(){var r;let e=new Error().stack;if(!e)return null;let t=[];for(let n of e.split(`
`)){let i=(r=w7.exec(n))!=null?r:b7.exec(n);i&&t.push({file:i[1],line:+i[2],column:+i[3]})}return t}function L3(){var t;let e=(t=_7())==null?void 0:t.slice(4);if(!e)return null;for(let r=0;r<e.length;r++){let n=e[r],i=y7[n.file];if(!i){if(r===0)return null;continue}for(let a of i){if(a.end==null)return null;if(a.start.line<n.line&&a.end.line>n.line)return a.component}}return null}var x7=Symbol("ADD_OWNER");function Z0(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function D3(e,t){return e.owners===null?!0:e.owners.has(t)||e.parent!==null&&D3(e.parent,t)}function N3(e){var t,r;return(r=(t=e==null?void 0:e.owners)==null?void 0:t.values().next().value)!=null?r:N3(e.parent)}var S7=!1;function B3(e){if(S7)return;let t=L3();if(t&&!D3(e,t)){let r=N3(e);r[Yt]!==t[Yt]?X0(t[Yt],r[Yt]):X0()}}function xe(e,t=null,r){var c,u;var n=null;if(G&&ti&&(n=ri("CreatedAt")),typeof e!="object"||e===null||Sr in e)return e;let i=La(e);if(i!==U0&&i!==g3)return e;var a=new Map,s=on(e),o=ht(0);s&&a.set("length",ht(e.length,n));var l;if(G)if(l={parent:t,owners:null},r){let f=(u=(c=r.v)==null?void 0:c[Da])==null?void 0:u.owners;l.owners=f?new Set(f):null}else l.owners=t===null?pe!==null?new Set([pe.function]):null:new Set;return new Proxy(e,{defineProperty(f,d,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&k3();var p=a.get(d);return p===void 0?(p=ht(h.value,n),a.set(d,p)):re(p,xe(h.value,l)),!0},deleteProperty(f,d){var h=a.get(d);if(h===void 0)d in f&&a.set(d,ht(dt,n));else{if(s&&typeof d=="string"){var p=a.get("length"),m=Number(d);Number.isInteger(m)&&m<p.v&&re(p,m)}re(h,dt),j3(o)}return!0},get(f,d,h){var b;if(G&&d===Da)return l;if(d===Sr)return e;var p=a.get(d),m=d in f;if(p===void 0&&(!m||(b=Ur(f,d))!=null&&b.writable)&&(p=ht(xe(m?f[d]:dt,l),n),a.set(d,p)),p!==void 0){var v=R(p);if(G){var y=v==null?void 0:v[Da];y&&(y==null?void 0:y.parent)!==l&&Z0(l,y)}return v===dt?void 0:v}return Reflect.get(f,d,h)},getOwnPropertyDescriptor(f,d){var h=Reflect.getOwnPropertyDescriptor(f,d);if(h&&"value"in h){var p=a.get(d);p&&(h.value=R(p))}else if(h===void 0){var m=a.get(d),v=m==null?void 0:m.v;if(m!==void 0&&v!==dt)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(f,d){var v;if(G&&d===Da||d===Sr)return!0;var h=a.get(d),p=h!==void 0&&h.v!==dt||Reflect.has(f,d);if(h!==void 0||te!==null&&(!p||(v=Ur(f,d))!=null&&v.writable)){h===void 0&&(h=ht(p?xe(f[d],l):dt,n),a.set(d,h));var m=R(h);if(m===dt)return!1}return p},set(f,d,h,p){var w;var m=a.get(d),v=d in f;if(s&&d==="length")for(var y=h;y<m.v;y+=1){var b=a.get(y+"");b!==void 0?re(b,dt):y in f&&(b=ht(dt,n),a.set(y+"",b))}if(m===void 0?(!v||(w=Ur(f,d))!=null&&w.writable)&&(m=ht(void 0,n),re(m,xe(h,l)),a.set(d,m)):(v=m.v!==dt,re(m,xe(h,l))),G){var x=h==null?void 0:h[Da];x&&(x==null?void 0:x.parent)!==l&&Z0(l,x),B3(l)}var E=Reflect.getOwnPropertyDescriptor(f,d);if(E!=null&&E.set&&E.set.call(p,h),!v){if(s&&typeof d=="string"){var _=a.get("length"),k=Number(d);Number.isInteger(k)&&k>=_.v&&re(_,k+1)}j3(o)}return!0},ownKeys(f){R(o);var d=Reflect.ownKeys(f).filter(m=>{var v=a.get(m);return v===void 0||v.v!==dt});for(var[h,p]of a)p.v!==dt&&!(h in f)&&d.push(h);return d},setPrototypeOf(){T3()}})}function j3(e,t=1){re(e,e.v+t)}function Md(e){return e!==null&&typeof e=="object"&&Sr in e?e[Sr]:e}function H3(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,s){let o=r.call(this,a,s);if(o===-1){for(let l=s!=null?s:0;l<this.length;l+=1)if(Md(this[l])===a){Pd("array.indexOf(...)");break}}return o},e.lastIndexOf=function(a,s){let o=n.call(this,a,s!=null?s:this.length-1);if(o===-1){for(let l=0;l<=(s!=null?s:this.length-1);l+=1)if(Md(this[l])===a){Pd("array.lastIndexOf(...)");break}}return o},e.includes=function(a,s){let o=i.call(this,a,s);if(!o){for(let l=0;l<this.length;l+=1)if(Md(this[l])===a){Pd("array.includes(...)");break}}return o},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var K0,U3,G3,z3;function Od(){if(K0===void 0){K0=window,U3=document;var e=Element.prototype,t=Node.prototype;G3=Ur(t,"firstChild").get,z3=Ur(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0,G&&(e.__svelte_meta=null,H3())}}function qr(e=""){return document.createTextNode(e)}function Pt(e){return G3.call(e)}function $t(e){return z3.call(e)}function j(e,t){if(!ae)return Pt(e);var r=Pt(ue);if(r===null)r=ue.appendChild(qr());else if(t&&r.nodeType!==3){var n=qr();return r==null||r.before(n),tt(n),n}return tt(r),r}function cr(e,t){var i,a;if(!ae){var r=Pt(e);return r instanceof Comment&&r.data===""?$t(r):r}if(t&&((i=ue)==null?void 0:i.nodeType)!==3){var n=qr();return(a=ue)==null||a.before(n),tt(n),n}return ue}function Z(e,t=1,r=!1){let n=ae?ue:e;for(var i;t--;)i=n,n=$t(n);if(!ae)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var s=qr();return n Line truncated
\`${e}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var aP=0,P7=1,eP=new WeakSet,Dd=!1,Nd=aP,gc=!1,Ao=null,ii=!1,$d=!1;function vo(e){ii=e}function iv(e){$d=e}var Ga=[],ko=0,vc=[],de=null;function Rt(e){de=e}var te=null;function ot(e){te=e}var ln=null;function O3(e){ln=e}var Ct=null,Ar=0,ni=null;function I3(e){ni=e}var sP=1,ai=!1,fc=null;var pe=null;var Wr=null;function Cd(){return++sP}function ji(){return!ei||pe!==null&&pe.l===null}function Hi(e){var s,o,l,c;var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i;if(t&512){for(i=0;i<r.length;i++)((o=(s=r[i]).reactions)!=null?o:s.reactions=[]).push(e);e.f^=512}for(i=0;i<r.length;i++){var a=r[i];if(Hi(a)&&nv(a),n&&te!==null&&!ai&&!((l=a==null?void 0:a.reactions)!=null&&l.includes(e))&&((c=a.reactions)!=null?c:a.reactions=[]).push(e),a.version>e.version)return!0}}(!n||te!==null&&!ai)&&Zt(e,1024)}return!1}function tP(e,t){for(var r=t;r!==null;){if(r.f&128)try{r.fn(e);return}catch(n){r.f^=128}r=r.parent}throw Dd=!1,e}function rP(e){return(e.f&16384)===0&&(e.parent===null||(e.parent.f&128)===0)}function To(e,t,r,n){var u,f;if(Dd){if(r===null&&(Dd=!1),rP(t))throw e;return}if(r!==null&&(Dd=!0),!G||n===null||!(e instanceof Error)||eP.has(e)){tP(e,t);return}eP.add(e);let i=[],a=(u=t.fn)==null?void 0:u.name;a&&i.push(a);let s=n;for(;s!==null;){if(G){var o=(f=s.function)==null?void 0:f[Yt];if(o){let d=o.split("/").pop();i.push(d)}}s=s.p}let l=/Firefox/.test(navigator.userAgent)?" ":" ";It(e,"message",{value:e.message+`
${i.map(d=>`
${l}in ${d}`).join("")}
`}),It(e,"component_stack",{value:i});let c=e.stack;if(c){let d=c.split(`
`),h=[];for(let p=0;p<d.length;p++){let m=d[p];m.includes("svelte/src/internal")||h.push(m)}It(e,"stack",{value:h.join(`
`)})}if(tP(e,t),rP(t))throw e}function Id(e){var d,h;var t=Ct,r=Ar,n=ni,i=de,a=ai,s=ln,o=pe,l=e.f;Ct=null,Ar=0,ni=null,de=l&96?null:e,ai=!ii&&(l&256)!==0,ln=null,pe=e.ctx;try{var c=(0,e.fn)(),u=e.deps;if(Ct!==null){var f;if(Ha(e,Ar),u!==null&&Ar>0)for(u.length=Ar+Ct.length,f=0;f<Ct.length;f++)u[Ar+f]=Ct[f];else e.deps=u=Ct;if(!ai)for(f=Ar;f<u.length;f++)((h=(d=u[f]).reactions)!=null?h:d.reactions=[]).push(e)}else u!==null&&Ar<u.length&&(Ha(e,Ar),u.length=Ar);return c}finally{Ct=t,Ar=r,ni=n,de=i,ai=a,ln=s,pe=o}}function R7(e,t){let r=t.reactions;if(r!==null){var n=r.indexOf(e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&2&&(Ct===null||!Ct.includes(t))&&(Zt(t,4096),t.f&768||(t.f^=512),Ha(t,0))}function Ha(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)R7(e,r[n])}function ja(e){var t=e.f;if(!(t&16384)){Zt(e,1024);var r=te,n=pe;if(te=e,G){var i=Wr;Wr=e.component_function}try{t&16?Y3(e):uv(e),cv(e),lv(e);var a=Id(e);e.teardown=typeof a=="function"?a:null,e.version=sP,G&&vc.push(e)}catch(s){To(s,e,r,n||e.ctx)}finally{te=r,G&&(Wr=i)}}}function nP(){console.error("Last ten effects were: ",vc.slice(-10).map(e=>e.fn)),vc=[]}function oP(){if(ko>1e3){ko=0;try{x3()}catch(e){if(G&&It(e,"stack",{value:""}),Ao!==null)if(G)try{To(e,Ao,null,null)}catch(t){throw nP(),t}else To(e,Ao,null,null);else throw G&&nP(),e}}ko++}function lP(e){var t=e.length;if(t!==0){oP();var r=ii;ii=!0;try{for(var n=0;n<t;n++){var i=e[n];i.f&1024||(i.f^=1024);var a=[];cP(i,a),M7(a)}}finally{ii=r}}}function M7(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];if(!(n.f&24576))try{Hi(n)&&(ja(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?fv(n):n.fn=null))}catch(i){To(i,n,null,n.ctx)}}}function O7(){if(gc=!1,ko>1001)return;let e=Ga;Ga=[],lP(e),gc||(ko=0,Ao=null,G&&(vc=[]))}function wo(e){Nd===aP&&(gc||(gc=!0,queueMicrotask(O7))),Ao=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}Ga.push(t)}function cP(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,a=(i&32)!==0,s=a&&(i&1024)!==0,o=r.next;if(!s&&!(i&8192))if(i&8){if(a)r.f^=1024;else try{Hi(r)&&ja(r)}catch(f){To(f,r,null,r.ctx)}var l=r.first;if(l!==null){r=l;continue}}else i&4&&n.push(r);if(o===null){let f=r.parent;for(;f!==null;){if(e===f)break e;var c=f.next;if(c!==null){r=c;continue e}f=f.parent}}r=o}for(var u=0;u<n.length;u++)l=n[u],t.push(l),cP(l,t)}function Co(e){var t=Nd,r=Ga;try{oP();let i=[];Nd=P7,Ga=i,gc=!1,lP(r);var n=e==null?void 0:e();return Q3(),(Ga.length>0||i.length>0)&&Co(),ko=0,Ao=null,G&&(vc=[]),n}finally{Nd=t,Ga=r}}function R(e){var f,d;var t=e.f,r=(t&2)!==0;if(r&&t&16384){var n=rv(e);return pc(e),n}if(fc!==null&&fc.add(e),de!==null){ln!==null&&ln.includes(e)&&C3();var i=de.deps;Ct===null&&i!==null&&i[Ar]===e?Ar++:Ct===null?Ct=[e]:Ct.push(e),ni!==null&&te!==null&&te.f&1024&&!(te.f&32)&&ni.includes(e)&&(Zt(te,2048),wo(te))}else if(r&&e.deps===null)for(var a=e,s=a.parent,o=a;s!==null;)if(s.f&2){var l=s;o=l,s=l.parent}else{var c=s;(f=c.deriveds)!=null&&f.includes(o)||((d=c.deriveds)!=null?d:c.deriveds=[]).push(o);break}if(r&&(a=e,Hi(a)&&nv(a)),G&&ti&&uc!==null&&de!==null&&uc.reaction===de){if(e.debug)e.debug();else if(e.created){var u=uc.entries.get(e);u===void 0&&(u={read:[]},uc.entries.set(e,u)),u.read.push(ri("TracedAt"))}}return e.v}function Ue(e){let t=de;try{return de=null,e()}finally{de=t}}var I7=-7169;function Zt(e,t){e.f=e.f&I7|t}function Ze(e,t=!1,r){pe={p:pe,c:null,e:null,m:!1,s:e,x:null,l:null},ei&&!t&&(pe.l={s:null,u:null,r1:[],r2:ht(!1)}),G&&(pe.function=r,Wr=r)}function Ke(e){var s,o;let t=pe;if(t!==null){e!==void 0&&(t.x=e);let l=t.e;if(l!==null){var r=te,n=de;t.e=null;try{for(var i=0;i<l.length;i++){var a=l[i];ot(a.effect),Rt(a.reaction),Er(a.fn)}}finally{ot(r),Rt(n)}}pe=t.p,G&&(Wr=(o=(s=t.p)==null?void 0:s.function)!=null?o:null),t.m=!0}return e||{}}if(G){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;A3(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}g();var uP=new Map;function fP(e,t){var r=uP.get(e);r||(r=new Set,uP.set(e,r)),r.add(t)}g();g();g();g();g();g();function pv(e){ae&&Pt(e)!==null&&So(e)}var dP=!1;function mv(){dP||(dP=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(let r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Hd(e){var t=de,r=te;Rt(null),ot(null);try{return e()}finally{Rt(t),ot(r)}}function gv(e,t,r,n=r){e.addEventListener(t,()=>Hd(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),mv()}var vv=new Set,Ud=new Set;function hP(e,t,r,n){function i(a){if(n.capture||Po.call(t,a),!a.cancelBubble)return Hd(()=>r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?fr(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function kr(e,t,r,n,i){var a={captu Line truncated
`:""}${(_=t.log.author)==null?void 0:_.name}
${(0,Mv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat)}
${t.log.message}`)}),l.__click=[L9,i];var c=j(l),u=Z(c,2),f=j(u);{var d=_=>{var k=D9(),w=j(k,!0);ke(()=>Oe(w,t.log.refs.join(", "))),B(k),ne(_,k)};ye(f,_=>{t.log.refs.length>0&&_(d)})}var h=Z(f,2);{var p=_=>{var k=N9(),w=j(k,!0);ke(()=>Oe(w,a(t.log))),B(k),ne(_,k)};ye(h,_=>{var k;t.plugin.settings.authorInHistoryView!="hide"&&((k=t.log.author)!=null&&k.name)&&_(p)})}var m=Z(h,2);{var v=_=>{var k=B9(),w=j(k,!0);ke(()=>Oe(w,(0,Mv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat))),B(k),ne(_,k)};ye(m,_=>{t.plugin.settings.dateInHistoryView&&_(v)})}var y=Z(m,2),b=j(y,!0);B(y),B(u),B(l);var x=Z(l,2);{var E=_=>{var k=j9(),w=j(k);{var A=T=>{_c(T,{get hierarchy(){return R(r)},get plugin(){return t.plugin},get view(){return t.view},topLevel:!0})},S=T=>{var P=si(),I=cr(P);Cr(I,17,()=>t.log.diff.files,Tr,(N,L)=>{bc(N,{get view(){return t.view},get diff(){return R(L)}})}),ne(T,P)};ye(w,T=>{t.showTree?T(A):T(S,!1)})}B(k),dn(3,k,()=>Ln,()=>({duration:150})),ne(_,k)};ye(x,_=>{R(i)||_(E)})}B(o),B(s),ke(()=>{lt(o,"is-collapsed",R(i)),me(l,"data-tooltip-position",R(n)),lt(c,"is-collapsed",R(i)),Oe(b,t.log.message)}),ne(e,s),Ke()}mt(["click"]);function G9(e,t){t().catch(console.error)}var z9=(e,t,r,n)=>{re(t,!R(t)),(0,Iv.setIcon)(r[0],R(t)?"list":"folder"),n(n().settings.treeStructure=R(t),!0),n().saveSettings()},V9=se('<div class="tree-item nav-folder mod-root"></div>'),W9=se('<main class="git-view"><div class="nav-header"><div class="nav-buttons-container"><div id="layoutChange" class="clickable-icon nav-action-button" aria-label="Change Layout"></div> <div id="refresh" class="clickable-icon nav-action-button" data-icon="refresh-cw" aria-label="Refresh"></div></div></div> <div class="nav-files-container" style="position: relative;"><!> <div id="sentinel"></div> <div style="margin-bottom:40px"></div></div></main>'),q9={hash:"svelte-45h",code:""};function Fv(e,t){Ze(t,!0),wt(e,q9);let r=Fn(t,"plugin",15),n=pt(!1),i=xe([]),a=pt(void 0),s=pt(xe(r().settings.treeStructure)),o,l;Dt(()=>{l&&l.empty()}),o=t.view.app.workspace.on("obsidian-git:head-change",()=>void c().catch(console.error)),Dt(()=>{i.forEach(x=>(0,Iv.setIcon)(x,x.getAttr("data-icon")))}),kP(()=>{t.view.app.workspace.offref(o)}),Tv(()=>{let x=new IntersectionObserver(_=>{_[0].isIntersecting&&!R(n)&&u().catch(console.error)}),E=document.querySelector("#sentinel");return E&&x.observe(E),()=>{x.disconnect()}}),c().catch(console.error);function c(){return wc(this,void 0,void 0,function*(){var x;if(!r().gitReady){re(a,void 0);return}re(n,!0);let E=r().gitManager instanceof Ee,_;((x=R(a)===null||R(a)===void 0?void 0:R(a).length)!==null&&x!==void 0?x:0)==0?_=E?50:10:_=R(a).length,re(a,xe(yield r().gitManager.log(void 0,!1,_))),re(n,!1)})}function u(){return wc(this,void 0,void 0,function*(){var x;if(!r().gitReady||R(a)===void 0)return;re(n,!0);let _=r().gitManager instanceof Ee?50:10,k=yield r().gitManager.log(void 0,!1,_,(x=R(a).last())===null||x===void 0?void 0:x.hash);R(a).push(...k.slice(1)),re(n,!1)})}var f=W9(),d=j(f),h=j(d),p=j(h);p.__click=[z9,s,i,r],Ge(p,x=>i[0]=x,()=>i==null?void 0:i[0]);var m=Z(p,2);m.__click=[G9,c],Ge(m,x=>i[1]=x,()=>i==null?void 0:i[1]),B(h),B(d);var v=Z(d,2),y=j(v);{var b=x=>{var E=V9();Cr(E,21,()=>R(a),Tr,(_,k)=>{Ov(_,{get view(){return t.view},get showTree(){return R(s)},get log(){return R(k)},get plugin(){return r()}})}),B(E),ne(x,E)};ye(y,x=>{R(a)&&x(b)})}_o(4),B(v),B(f),ke(()=>{me(p,"data-icon",R(s)?"list":"folder"),lt(m,"loading",R(n))}),ne(e,f),Ke()}mt(["click"]);var xc=class extends PP.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return Lr.type}getDisplayText(){return Lr.name}getIcon(){return Lr.icon}onClose(){return this._view&&oi(this._view),super.onClose()}reload(){this._view&&oi(this._view),this._view=Vi(Fv,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var RP=require("obsidian"),Xd=class extends RP.FuzzySuggestModal{constructor(r,n){super(r.app);this.branches=n;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,n){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};g();var LP=require("obsidian");g();var qa=require("obsidian");g();var MP=require("obsidian"),qi=class extends MP.Modal{constructor(r,n,i){super(r);this.deletion=n;this.filename=i;this.resolve=null}myOpen(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText(`${this.deletion?"Delete":"Discard"} this file?`),r.createEl("p").setText(`Do you really want to ${this.deletion?"delete":"discard the changes of"} "${this.filename}"`);let i=r.createDiv({cls:"modal-button-container"}),a=i.createEl("button",{cls:"mod-warning",text:this.deletion?"Delete":"Discard"});a.addEventListener("click",()=>{this.resolve&&this.resolve( Line truncated
`+a),this.refresh()}handleFileMenu(r,n,i,a){if(!this.gitReady||!this.settings.showFileMenu||!n)return;let s;if(typeof n=="string"?s=n:s=n.path,i=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof we.TFile?await this.gitManager.stage(n.path,!0):await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Staged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof we.TFile?await this.gitManager.unstage(n.path,!0):await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Unstaged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(s,n instanceof we.TFolder).catch(c=>this.displayError(c))})})),i=="git-source-control"){r.addItem(l=>{l.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(c=>{this.addFileToGitignore(s,n instanceof we.TFolder).catch(u=>this.displayError(u))})});let o=this.app.vault.adapter;a==="obsidian-git:menu"&&o instanceof we.FileSystemAdapter&&(r.addItem(l=>{l.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(c=>{this.app.openWithDefaultApp(s)})}),r.addItem(l=>{l.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(c=>{window.electron.shell.showItemInFolder(DP.join(o.getBasePath(),s))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,n;this.gitReady=!1,this.lineAuthoringFeature.deactivateFeature(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(n=this.statusBar)==null||n.remove(),this.statusBar=void 0,this.branchBar=void 0,this.gitManager.unload(),this.promiseQueue.clear();for(let i of this.intervalsToClear)window.clearInterval(i);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=Tx(je,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return we.Platform.isDesktopApp}async init({fromReload:r=!1}){var n;if(this.settings.showStatusBar&&!this.statusBar){let i=this.addStatusBarItem();this.statusBar=new id(i,this),this.intervalsToClear.push(window.setInterval(()=>{var a;return(a=this.statusBar)==null?void 0:a.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Ee(this),await this.gitManager.setGitInstance()):this.gitManager=new sn(this);let i=await this.gitManager.checkRequirements();switch(i){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new we.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,this.setPluginState({gitAction:0}),we.Platform.isDesktop&&this.settings.showBranchStatusBar&&!this.branchBar){let a=this.addStatusBarItem();this.branchBar=new Jd(a,this),this.intervalsToClear.push(window.setInterval(()=>{var s;return void((s=this.branchBar)==null?void 0:s.display().catch(console.error))},6e4))}await((n=this.branchBar)==null?void 0:n.display()),this.lineAuthoringFeature.conditionallyActivateBySettings(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),await this.automaticsManager.init();break;default:this.log("Something weird happened. The 'checkRequirements' result is "+i)}}catch(i){this.displayError(i),console.error(i)}}async createNewRepo(){try{await this.gitManager.init(),new we.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let n=await new $e(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(n){let i="Vault Root",a=await new $e(this,{options:this.gitManager instanceof sn?[i]:[],placeholder:"Enter directory for clone. It needs to be empty or not existent.",allowEmpty:this.gitManager instanceof sn}).openAn Line truncated
# Additional Instructions
I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text.
\`\`\`diff
<<<<<<< HEAD
File changes in local repository
=======
File changes in remote repository
>>>>>>> origin/main
\`\`\``]),await this.tools.writeAndOpenFile(n==null?void 0:n.join(`
`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new $e(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new $e(this,{initialValue:a}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,Wg(o)),i}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),n;r.length===0&&(n=await this.editRemotes(),n==null&&(r=await this.gitManager.getRemotes()));let i=new $e(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=n!=null?n:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a);return await new $e(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult()}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new $e(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}onActiveLeafChange(r){var s,o;let n=r==null?void 0:r.view;if(!(n!=null&&n.getState().file)&&!(n instanceof Ra||n instanceof Ia))return;let i=this.app.workspace.getLeavesOfType(kt.type).first(),a=this.app.workspace.getLeavesOfType(Lr.type).first();if((s=i==null?void 0:i.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||s.removeClass("is-active"),(o=a==null?void 0:a.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof Ra||(r==null?void 0:r.view)instanceof Ia){let l=r.view.state.bFile;this.lastDiffViewState=r.view.getState();let c;i&&r.view.state.aRef=="HEAD"?c=i.view.containerEl.querySelector(`div.staged div.nav-file-title[data-path='${l}']`):i&&r.view.state.aRef==""?c=i.view.containerEl.querySelector(`div.changes div.nav-file-title[data-path='${l}']`):a&&(c=a.view.containerEl.querySelector(`div.nav-file-title[data-path='${l}']`)),c==null||c.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(r,n=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(r.toLowerCase(),n),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new we.Notice(r,5*1e3),this.log(r)}displayError(r,n=10*1e3){var a;if(r instanceof yl.UserCanceledError){new we.Notice("Aborted");return}let i;r instanceof Error?i=r:i=new Error(String(r)),this.setPluginState({gitAction:0}),this.settings.showErrorNotices&&new we.Notice(i.message,n),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),n)}log(...r){console.log(`${this.manifest.id}:`,...r)}};
/*! Bundled license information:
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
crc-32/crc32.js:
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
js-sha256/src/sha256.js:
(**
* [js-sha256]{@link https://github.com/emn178/js-sha256}
*
* @version 0.9.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
*)
feather-icons/dist/feather.js:
(*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*)
*/
/* nosourcemap */
+10
View File
@@ -0,0 +1,10 @@
{
"author": "Vinzent",
"authorUrl": "https://github.com/Vinzent03",
"id": "obsidian-git",
"name": "Git",
"description": "Integrate Git version control with automatic backup and other advanced features.",
"isDesktopOnly": false,
"fundingUrl": "https://ko-fi.com/vinzent",
"version": "2.34.0"
}
+605
View File
@@ -0,0 +1,605 @@
@keyframes loading {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.workspace-leaf-content[data-type="git-view"] .button-border {
border: 2px solid var(--interactive-accent);
border-radius: var(--radius-s);
}
.workspace-leaf-content[data-type="git-view"] .view-content {
padding: 0;
}
.workspace-leaf-content[data-type="git-history-view"] .view-content {
padding: 0;
}
.loading > svg {
animation: 2s linear infinite loading;
transform-origin: 50% 50%;
display: inline-block;
}
.obsidian-git-center {
margin: auto;
text-align: center;
width: 50%;
}
.obsidian-git-textarea {
display: block;
margin-left: auto;
margin-right: auto;
}
.obsidian-git-disabled {
opacity: 0.5;
}
.obsidian-git-center-button {
display: block;
margin: 20px auto;
}
.tooltip.mod-left {
overflow-wrap: break-word;
}
.tooltip.mod-right {
overflow-wrap: break-word;
}
.git-tools {
display: flex;
margin-left: auto;
}
.git-tools .type {
padding-left: var(--size-2-1);
display: flex;
align-items: center;
justify-content: center;
width: 11px;
}
.git-tools .type[data-type="M"] {
color: orange;
}
.git-tools .type[data-type="D"] {
color: red;
}
.git-tools .buttons {
display: flex;
}
.git-tools .buttons > * {
padding: 0 0;
height: auto;
}
.is-active .git-tools .buttons > * {
color: var(--nav-item-color-active);
}
.git-author {
color: var(--text-accent);
}
.git-date {
color: var(--text-accent);
}
.git-ref {
color: var(--text-accent);
}
.workspace-leaf-content[data-type="diff-view"] .d2h-d-none {
display: none;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-wrapper {
text-align: left;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-header {
background-color: var(--background-primary);
border-bottom: 1px solid var(--interactive-accent);
font-family: var(--font-monospace);
height: 35px;
padding: 5px 10px;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-header,
.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
font-size: 14px;
margin-left: auto;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-lines-added {
border: 1px solid #b4e2b4;
border-radius: 5px 0 0 5px;
color: #399839;
padding: 2px;
text-align: right;
vertical-align: middle;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-lines-deleted {
border: 1px solid #e9aeae;
border-radius: 0 5px 5px 0;
color: #c33;
margin-left: 1px;
padding: 2px;
text-align: left;
vertical-align: middle;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-name-wrapper {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 15px;
width: 100%;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-name {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-wrapper {
border: 1px solid var(--background-modifier-border);
border-radius: 3px;
margin-bottom: 1em;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse {
-webkit-box-pack: end;
-ms-flex-pack: end;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border: 1px solid var(--background-modifier-border);
border-radius: 3px;
cursor: pointer;
display: none;
font-size: 12px;
justify-content: flex-end;
padding: 4px 8px;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse.d2h-selected {
background-color: #c8e1ff;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse-input {
margin: 0 4px 0 0;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-diff-table {
border-collapse: collapse;
font-family: Menlo, Consolas, monospace;
font-size: 13px;
width: 100%;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-files-diff {
width: 100%;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-diff {
overflow-y: hidden;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-side-diff {
display: inline-block;
margin-bottom: -8px;
margin-right: -4px;
overflow-x: scroll;
overflow-y: hidden;
width: 50%;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line {
padding: 0 8em;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line,
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
display: inline-block;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
white-space: nowrap;
width: 100%;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
padding: 0 4.5em;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-ctn {
word-wrap: normal;
background: none;
display: inline-block;
padding: 0;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
vertical-align: middle;
white-space: pre;
width: 100%;
}
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
.theme-light
.workspace-leaf-content[data-type="diff-view"]
.d2h-code-side-line
del {
background-color: #ffb6ba;
}
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
.theme-dark
.workspace-leaf-content[data-type="diff-view"]
.d2h-code-side-line
del {
background-color: #8d232881;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del,
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins {
border-radius: 0.2em;
display: inline-block;
margin-top: -1px;
text-decoration: none;
vertical-align: middle;
}
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
.theme-light
.workspace-leaf-content[data-type="diff-view"]
.d2h-code-side-line
ins {
background-color: #97f295;
text-align: left;
}
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
.theme-dark
.workspace-leaf-content[data-type="diff-view"]
.d2h-code-side-line
ins {
background-color: #1d921996;
text-align: left;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix {
word-wrap: normal;
background: none;
display: inline;
padding: 0;
white-space: pre;
}
.workspace-leaf-content[data-type="diff-view"] .line-num1 {
float: left;
}
.workspace-leaf-content[data-type="diff-view"] .line-num1,
.workspace-leaf-content[data-type="diff-view"] .line-num2 {
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
padding: 0 0.5em;
text-overflow: ellipsis;
width: 3.5em;
}
.workspace-leaf-content[data-type="diff-view"] .line-num2 {
float: right;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber {
background-color: var(--background-primary);
border: solid var(--background-modifier-border);
border-width: 0 1px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: var(--text-muted);
cursor: pointer;
display: inline-block;
position: absolute;
text-align: right;
width: 7.5em;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber:after {
content: "\200b";
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
background-color: var(--background-primary);
border: solid var(--background-modifier-border);
border-width: 0 1px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: var(--text-muted);
cursor: pointer;
display: inline-block;
overflow: hidden;
padding: 0 0.5em;
position: absolute;
text-align: right;
text-overflow: ellipsis;
width: 4em;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-diff-tbody tr {
position: relative;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber:after {
content: "\200b";
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-emptyplaceholder,
.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
background-color: var(--background-primary);
border-color: var(--background-modifier-border);
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix,
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber,
.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
direction: rtl;
}
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-del {
background-color: #fee8e9;
border-color: #e9aeae;
}
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
background-color: #dfd;
border-color: #b4e2b4;
}
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-del {
background-color: #521b1d83;
border-color: #691d1d73;
}
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
background-color: rgba(30, 71, 30, 0.5);
border-color: #13501381;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-info {
background-color: var(--background-primary);
border-color: var(--background-modifier-border);
color: var(--text-normal);
}
.theme-light
.workspace-leaf-content[data-type="diff-view"]
.d2h-file-diff
.d2h-del.d2h-change {
background-color: #fdf2d0;
}
.theme-dark
.workspace-leaf-content[data-type="diff-view"]
.d2h-file-diff
.d2h-del.d2h-change {
background-color: #55492480;
}
.theme-light
.workspace-leaf-content[data-type="diff-view"]
.d2h-file-diff
.d2h-ins.d2h-change {
background-color: #ded;
}
.theme-dark
.workspace-leaf-content[data-type="diff-view"]
.d2h-file-diff
.d2h-ins.d2h-change {
background-color: rgba(37, 78, 37, 0.418);
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper {
margin-bottom: 10px;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a {
color: #3572b0;
text-decoration: none;
}
.workspace-leaf-content[data-type="diff-view"]
.d2h-file-list-wrapper
a:visited {
color: #3572b0;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-header {
text-align: left;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-title {
font-weight: 700;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-line {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: left;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list {
display: block;
list-style: none;
margin: 0;
padding: 0;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li {
border-bottom: 1px solid var(--background-modifier-border);
margin: 0;
padding: 5px 10px;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li:last-child {
border-bottom: none;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-file-switch {
cursor: pointer;
display: none;
font-size: 10px;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-icon {
fill: currentColor;
margin-right: 10px;
vertical-align: middle;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-deleted {
color: #c33;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-added {
color: #399839;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-changed {
color: #d0b44c;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-moved {
color: #3572b0;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-tag {
background-color: var(--background-primary);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 10px;
margin-left: 5px;
padding: 0 2px;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-deleted-tag {
border: 2px solid #c33;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-added-tag {
border: 1px solid #399839;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-changed-tag {
border: 1px solid #d0b44c;
}
.workspace-leaf-content[data-type="diff-view"] .d2h-moved-tag {
border: 1px solid #3572b0;
}
/* ====================== Line Authoring Information ====================== */
.cm-gutterElement.obs-git-blame-gutter {
/* Add background color to spacing inbetween and around the gutter for better aesthetics */
border-width: 0px 2px 0.2px 2px;
border-style: solid;
border-color: var(--background-secondary);
background-color: var(--background-secondary);
}
.cm-gutterElement.obs-git-blame-gutter > div,
.line-author-settings-preview {
/* delegate text color to settings */
color: var(--obs-git-gutter-text);
font-family: monospace;
height: 100%; /* ensure, that age-based background color occupies entire parent */
text-align: right;
padding: 0px 6px 0px 6px;
white-space: pre; /* Keep spaces and do not collapse them. */
}
@media (max-width: 800px) {
/* hide git blame gutter not to superpose text */
.cm-gutterElement.obs-git-blame-gutter {
display: none;
}
}
.git-unified-diff-view,
.git-split-diff-view .cm-deletedLine .cm-changedText {
background-color: #ee443330;
}
.git-unified-diff-view,
.git-split-diff-view .cm-insertedLine .cm-changedText {
background-color: #22bb2230;
}
/* Limits the scrollbar to the view body */
.git-view {
display: flex;
flex-direction: column;
position: relative;
height: 100%;
}
.git-obscure-prompt[git-is-obscured="true"] #git-show-password:after {
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"></path><circle cx="12" cy="12" r="3"></circle></svg>');
}
.git-obscure-prompt[git-is-obscured="false"] #git-show-password:after {
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye-off"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"></path><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"></path><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"></path><path d="m2 2 20 20"></path></svg>');
}
/* Override styling of Codemirror merge view "collapsed lines" indicator */
.git-split-diff-view .ͼ2 .cm-collapsedLines {
background: var(--interactive-normal);
border-radius: var(--radius-m);
color: var(--text-accent);
font-size: var(--font-small);
padding: var(--size-4-1) var(--size-4-1);
}
.git-split-diff-view .ͼ2 .cm-collapsedLines:hover {
background: var(--interactive-hover);
color: var(--text-accent-hover);
}
+292
View File
@@ -0,0 +1,292 @@
{
"ruleConfigs": {
"add-blank-line-after-yaml": {
"enabled": true
},
"dedupe-yaml-array-values": {
"enabled": false,
"dedupe-alias-key": true,
"dedupe-tag-key": true,
"dedupe-array-keys": true,
"ignore-keys": ""
},
"escape-yaml-special-characters": {
"enabled": false,
"try-to-escape-single-line-arrays": false
},
"force-yaml-escape": {
"enabled": false,
"force-yaml-escape-keys": ""
},
"format-tags-in-yaml": {
"enabled": false
},
"format-yaml-array": {
"enabled": false,
"alias-key": true,
"tag-key": true,
"default-array-style": "single-line",
"default-array-keys": true,
"force-single-line-array-style": "",
"force-multi-line-array-style": ""
},
"insert-yaml-attributes": {
"enabled": false,
"text-to-insert": "aliases: \ntags: "
},
"move-tags-to-yaml": {
"enabled": false,
"how-to-handle-existing-tags": "Nothing",
"tags-to-ignore": ""
},
"remove-yaml-keys": {
"enabled": false,
"yaml-keys-to-remove": ""
},
"sort-yaml-array-values": {
"enabled": false,
"sort-alias-key": true,
"sort-tag-key": true,
"sort-array-keys": true,
"ignore-keys": "",
"sort-order": "Ascending Alphabetical"
},
"yaml-key-sort": {
"enabled": false,
"yaml-key-priority-sort-order": "",
"priority-keys-at-start-of-yaml": true,
"yaml-sort-order-for-other-keys": "None"
},
"yaml-timestamp": {
"enabled": false,
"date-created": true,
"date-created-key": "date created",
"date-created-source-of-truth": "file system",
"date-modified": true,
"date-modified-key": "date modified",
"date-modified-source-of-truth": "file system",
"format": "dddd, MMMM Do YYYY, h:mm:ss a",
"convert-to-utc": false,
"update-on-file-contents-updated": "never"
},
"yaml-title": {
"enabled": false,
"title-key": "title",
"mode": "first-h1-or-filename-if-h1-missing"
},
"yaml-title-alias": {
"enabled": false,
"preserve-existing-alias-section-style": true,
"keep-alias-that-matches-the-filename": false,
"use-yaml-key-to-keep-track-of-old-filename-or-heading": true,
"alias-helper-key": "linter-yaml-title-alias"
},
"capitalize-headings": {
"enabled": true,
"style": "Title Case",
"ignore-case-words": true,
"ignore-words": "macOS, iOS, iPhone, iPad, JavaScript, TypeScript, AppleScript, I",
"lowercase-words": "a, an, the, aboard, about, abt., above, abreast, absent, across, after, against, along, aloft, alongside, amid, amidst, mid, midst, among, amongst, anti, apropos, around, round, as, aslant, astride, at, atop, ontop, bar, barring, before, B4, behind, below, beneath, neath, beside, besides, between, 'tween, beyond, but, by, chez, circa, c., ca., come, concerning, contra, counting, cum, despite, spite, down, during, effective, ere, except, excepting, excluding, failing, following, for, from, in, including, inside, into, less, like, minus, modulo, mod, near, nearer, nearest, next, notwithstanding, of, o', off, offshore, on, onto, opposite, out, outside, over, o'er, pace, past, pending, per, plus, post, pre, pro, qua, re, regarding, respecting, sans, save, saving, short, since, sub, than, through, thru, throughout, thruout, till, times, to, t', touching, toward, towards, under, underneath, unlike, until, unto, up, upon, versus, vs., v., via, vice, vis-à-vis, wanting, with, w/, w., c̄, within, w/i, without, 'thout, w/o, abroad, adrift, aft, afterward, afterwards, ahead, apart, ashore, aside, away, back, backward, backwards, beforehand, downhill, downstage, downstairs, downstream, downward, downwards, downwind, east, eastward, eastwards, forth, forward, forwards, heavenward, heavenwards, hence, henceforth, here, hereby, herein, hereof, hereto, herewith, home, homeward, homewards, indoors, inward, inwards, leftward, leftwards, north, northeast, northward, northwards, northwest, now, onward, onwards, outdoors, outward, outwards, overboard, overhead, overland, overseas, rightward, rightwards, seaward, seawards, skywards, skyward, south, southeast, southwards, southward, southwest, then, thence, thenceforth, there, thereby, therein, thereof, thereto, therewith, together, underfoot, underground, uphill, upstage, upstairs, upstream, upward, upwards, upwind, west, westward, westwards, when, whence, where, whereby, wherein, whereto, wherewith, although, because, considering, given, granted, if, lest, once, provided, providing, seeing, so, supposing, though, unless, whenever, whereas, wherever, while, whilst, ago, according to, as regards, counter to, instead of, owing to, pertaining to, at the behest of, at the expense of, at the hands of, at risk of, at the risk of, at variance with, by dint of, by means of, by virtue of, by way of, for the sake of, for sake of, for lack of, for want of, from want of, in accordance with, in addition to, in case of, in charge of, in compliance with, in conformity with, in contact with, in exchange for, in favor of, in front of, in lieu of, in light of, in the light of, in line with, in place of, in point of, in quest of, in relation to, in regard to, with regard to, in respect to, with respect to, in return for, in search of, in step with, in touch with, in terms of, in the name of, in view of, on account of, on behalf of, on grounds of, on the grounds of, on the part of, on top of, with a view to, with the exception of, à la, a la, as soon as, as well as, close to, due to, far from, in case, other than, prior to, pursuant to, regardless of, subsequent to, as long as, as much as, as far as, by the time, in as much as, inasmuch, in order to, in order that, even, provide that, if only, whether, whose, whoever, why, how, or not, whatever, what, both, and, or, not only, but also, either, neither, nor, just, rather, no sooner, such, that, yet, is, it"
},
"file-name-heading": {
"enabled": true
},
"header-increment": {
"enabled": false,
"start-at-h2": false
},
"headings-start-line": {
"enabled": true
},
"remove-trailing-punctuation-in-heading": {
"enabled": true,
"punctuation-to-remove": ".,;:!。,;:!"
},
"footnote-after-punctuation": {
"enabled": false
},
"move-footnotes-to-the-bottom": {
"enabled": false
},
"re-index-footnotes": {
"enabled": false
},
"auto-correct-common-misspellings": {
"enabled": true,
"ignore-words": "",
"skip-words-with-multiple-capitals": false,
"extra-auto-correct-files": []
},
"blockquote-style": {
"enabled": true,
"style": "space"
},
"convert-bullet-list-markers": {
"enabled": true
},
"default-language-for-code-fences": {
"enabled": true,
"default-language": ""
},
"emphasis-style": {
"enabled": false,
"style": "consistent"
},
"no-bare-urls": {
"enabled": true,
"no-bare-uris": false
},
"ordered-list-style": {
"enabled": true,
"number-style": "ascending",
"list-end-style": "."
},
"proper-ellipsis": {
"enabled": false
},
"quote-style": {
"enabled": false,
"single-quote-enabled": true,
"single-quote-style": "''",
"double-quote-enabled": true,
"double-quote-style": "\"\""
},
"remove-consecutive-list-markers": {
"enabled": false
},
"remove-empty-list-markers": {
"enabled": false
},
"remove-hyphenated-line-breaks": {
"enabled": false
},
"remove-multiple-spaces": {
"enabled": false
},
"strong-style": {
"enabled": false,
"style": "consistent"
},
"two-spaces-between-lines-with-content": {
"enabled": true,
"line-break-indicator": " "
},
"unordered-list-style": {
"enabled": true,
"list-style": "consistent"
},
"compact-yaml": {
"enabled": false,
"inner-new-lines": false
},
"consecutive-blank-lines": {
"enabled": true
},
"convert-spaces-to-tabs": {
"enabled": true,
"tabsize": 4
},
"empty-line-around-blockquotes": {
"enabled": true
},
"empty-line-around-code-fences": {
"enabled": true
},
"empty-line-around-horizontal-rules": {
"enabled": true
},
"empty-line-around-math-blocks": {
"enabled": false
},
"empty-line-around-tables": {
"enabled": true
},
"heading-blank-lines": {
"enabled": false,
"bottom": true,
"empty-line-after-yaml": true
},
"line-break-at-document-end": {
"enabled": false
},
"move-math-block-indicators-to-their-own-line": {
"enabled": false
},
"paragraph-blank-lines": {
"enabled": false
},
"remove-empty-lines-between-list-markers-and-checklists": {
"enabled": false
},
"remove-link-spacing": {
"enabled": false
},
"remove-space-around-characters": {
"enabled": false,
"include-fullwidth-forms": true,
"include-cjk-symbols-and-punctuation": true,
"include-dashes": true,
"other-symbols": ""
},
"remove-space-before-or-after-characters": {
"enabled": false,
"characters-to-remove-space-before": ",!?;:).’”]",
"characters-to-remove-space-after": "¿¡‘“(["
},
"space-after-list-markers": {
"enabled": false
},
"space-between-chinese-japanese-or-korean-and-english-or-numbers": {
"enabled": false,
"english-symbols-punctuation-before": "-+;:'\"°%$)]",
"english-symbols-punctuation-after": "-+'\"([¥$"
},
"trailing-spaces": {
"enabled": true,
"twp-space-line-break": true
},
"add-blockquote-indentation-on-paste": {
"enabled": false
},
"prevent-double-checklist-indicator-on-paste": {
"enabled": false
},
"prevent-double-list-item-indicator-on-paste": {
"enabled": false
},
"proper-ellipsis-on-paste": {
"enabled": false
},
"remove-hyphens-on-paste": {
"enabled": false
},
"remove-leading-or-trailing-whitespace-on-paste": {
"enabled": false
},
"remove-leftover-footnotes-from-quote-on-paste": {
"enabled": false
},
"remove-multiple-blank-lines-on-paste": {
"enabled": false
}
},
"lintOnSave": true,
"recordLintOnSaveLogs": false,
"displayChanged": true,
"lintOnFileChange": false,
"displayLintOnFileChangeNotice": false,
"settingsConvertedToConfigKeyValues": true,
"foldersToIgnore": [],
"filesToIgnore": [],
"linterLocale": "system-default",
"logLevel": "ERROR",
"lintCommands": [],
"customRegexes": [],
"commonStyles": {
"aliasArrayStyle": "single-line",
"tagArrayStyle": "single-line",
"minimumNumberOfDollarSignsToBeAMathBlock": 2,
"escapeCharacter": "\"",
"removeUnnecessaryEscapeCharsForMultiLineArrays": false
}
}
File diff suppressed because it is too large. Load diff
+470
View File
@@ -0,0 +1,470 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var $y=Object.create;var cs=Object.defineProperty;var $p=Object.getOwnPropertyDescriptor;var Uy=Object.getOwnPropertyNames;var jy=Object.getPrototypeOf,Vy=Object.prototype.hasOwnProperty;var gi=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),au=(e,n)=>{for(var t in n)cs(e,t,{get:n[t],enumerable:!0})},Up=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Uy(n))!Vy.call(e,r)&&r!==t&&cs(e,r,{get:()=>n[r],enumerable:!(i=$p(n,r))||i.enumerable});return e};var yi=(e,n,t)=>(t=e!=null?$y(jy(e)):{},Up(n||!e||!e.__esModule?cs(t,"default",{value:e,enumerable:!0}):t,e)),Wy=e=>Up(cs({},"__esModule",{value:!0}),e),T=(e,n,t,i)=>{for(var r=i>1?void 0:i?$p(n,t):n,s=e.length-1,o;s>=0;s--)(o=e[s])&&(r=(i?o(n,t,r):o(r))||r);return i&&r&&cs(n,t,r),r};var lu=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)};var z=(e,n,t)=>(lu(e,n,"read from private field"),t?t.call(e):n.get(e)),Ie=(e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)},Pe=(e,n,t,i)=>(lu(e,n,"write to private field"),i?i.call(e,t):n.set(e,t),t);var cu=(e,n,t,i)=>({set _(r){Pe(e,n,r,t)},get _(){return z(e,n,i)}}),ye=(e,n,t)=>(lu(e,n,"access private method"),t);var Ta=gi((Wp,xa)=>{(function(e,n){"use strict";typeof define=="function"&&define.amd?define(n):typeof xa=="object"&&xa.exports?xa.exports=n():e.log=n()})(Wp,function(){"use strict";var e=function(){},n="undefined",t=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],r={},s=null;function o(f,h){var g=f[h];if(typeof g.bind=="function")return g.bind(f);try{return Function.prototype.bind.call(g,f)}catch{return function(){return Function.prototype.apply.apply(g,[f,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(f){return f==="debug"&&(f="log"),typeof console===n?!1:f==="trace"&&t?a:console[f]!==void 0?o(console,f):console.log!==void 0?o(console,"log"):e}function c(){for(var f=this.getLevel(),h=0;h<i.length;h++){var g=i[h];this[g]=h<f?e:this.methodFactory(g,f,this.name)}if(this.log=this.debug,typeof console===n&&f<this.levels.SILENT)return"No console available for logging"}function u(f){return function(){typeof console!==n&&(c.call(this),this[f].apply(this,arguments))}}function d(f,h,g){return l(f)||u.apply(this,arguments)}function p(f,h){var g=this,b,k,A,x="loglevel";typeof f=="string"?x+=":"+f:typeof f=="symbol"&&(x=void 0);function O(N){var q=(i[N]||"silent").toUpperCase();if(!(typeof window===n||!x)){try{window.localStorage[x]=q;return}catch{}try{window.document.cookie=encodeURIComponent(x)+"="+q+";"}catch{}}}function L(){var N;if(!(typeof window===n||!x)){try{N=window.localStorage[x]}catch{}if(typeof N===n)try{var q=window.document.cookie,Y=encodeURIComponent(x),_=q.indexOf(Y+"=");_!==-1&&(N=/^([^;]+)/.exec(q.slice(_+Y.length+1))[1])}catch{}return g.levels[N]===void 0&&(N=void 0),N}}function C(){if(!(typeof window===n||!x)){try{window.localStorage.removeItem(x)}catch{}try{window.document.cookie=encodeURIComponent(x)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function M(N){var q=N;if(typeof q=="string"&&g.levels[q.toUpperCase()]!==void 0&&(q=g.levels[q.toUpperCase()]),typeof q=="number"&&q>=0&&q<=g.levels.SILENT)return q;throw new TypeError("log.setLevel() called with invalid level: "+N)}g.name=f,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=h||d,g.getLevel=function(){return A??k??b},g.setLevel=function(N,q){return A=M(N),q!==!1&&O(A),c.call(g)},g.setDefaultLevel=function(N){k=M(N),L()||g.setLevel(N,!1)},g.resetLevel=function(){A=null,C(),c.call(g)},g.enableAll=function(N){g.setLevel(g.levels.TRACE,N)},g.disableAll=function(N){g.setLevel(g.levels.SILENT,N)},g.rebuild=function(){if(s!==g&&(b=M(s.getLevel())),c.call(g),s===g)for(var N in r)r[N].rebuild()},b=M(s?s.getLevel():"WARN");var B=L();B!=null&&(A=M(B)),c.call(g)}s=new p,s.getLogger=function(h){if(typeof h!="symbol"&&typeof h!="string"||h==="")throw new TypeError("You must supply a name when creating a logger.");var g=r[h];return g||(g=r[h]=new p(h,s.methodFactory)),g};var m=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=m),s},s.getLoggers=function(){return r},s.default=s,s})});var Dm=gi((J1,Ru)=>{(function(){var e;typeof Ru<"u"?e=Ru.exports=i:e=function(){return this||(0,eval)("this")}(),e.format=i,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function t(r,s){return i.apply(null,[r].concat(s))}function i(r){for(var s=1,o=[].slice.call(arguments),a=0,l=r.length,c="",u,d=!1,p,m,f=!1,h,g=function(){return o[s++]},b=function(){for(var k="";/\d/.test(r[a]);)k+=r[a++],u=r[a];return k.length>0?parseInt(k):null};a<l;++a)if(uLine truncated
`,u),d==-1&&(d=l.length-1);var m=l.substring(u,d+1);(i.hasOwnProperty?i.hasOwnProperty(m):i[m]!==void 0)?c+=String.fromCharCode(i[m]):(p==s&&(m=l.substring(u),d=l.length),c+=String.fromCharCode(p),i[m]=p,t[p++]=m),u=d+1}return c}var s=4e4,o=r(e);s=65535;var a=r(n);return{chars1:o,chars2:a,lineArray:t}};F.prototype.diff_charsToLines_=function(e,n){for(var t=0;t<e.length;t++){for(var i=e[t][1],r=[],s=0;s<i.length;s++)r[s]=n[i.charCodeAt(s)];e[t][1]=r.join("")}};F.prototype.diff_commonPrefix=function(e,n){if(!e||!n||e.charAt(0)!=n.charAt(0))return 0;for(var t=0,i=Math.min(e.length,n.length),r=i,s=0;t<r;)e.substring(s,r)==n.substring(s,r)?(t=r,s=t):i=r,r=Math.floor((i-t)/2+t);return r};F.prototype.diff_commonSuffix=function(e,n){if(!e||!n||e.charAt(e.length-1)!=n.charAt(n.length-1))return 0;for(var t=0,i=Math.min(e.length,n.length),r=i,s=0;t<r;)e.substring(e.length-r,e.length-s)==n.substring(n.length-r,n.length-s)?(t=r,s=t):i=r,r=Math.floor((i-t)/2+t);return r};F.prototype.diff_commonOverlap_=function(e,n){var t=e.length,i=n.length;if(t==0||i==0)return 0;t>i?e=e.substring(t-i):t<i&&(n=n.substring(0,t));var r=Math.min(t,i);if(e==n)return r;for(var s=0,o=1;;){var a=e.substring(r-o),l=n.indexOf(a);if(l==-1)return s;o+=l,(l==0||e.substring(r-o)==n.substring(0,o))&&(s=o,o++)}};F.prototype.diff_halfMatch_=function(e,n){if(this.Diff_Timeout<=0)return null;var t=e.length>n.length?e:n,i=e.length>n.length?n:e;if(t.length<4||i.length*2<t.length)return null;var r=this;function s(f,h,g){for(var b=f.substring(g,g+Math.floor(f.length/4)),k=-1,A="",x,O,L,C;(k=h.indexOf(b,k+1))!=-1;){var M=r.diff_commonPrefix(f.substring(g),h.substring(k)),B=r.diff_commonSuffix(f.substring(0,g),h.substring(0,k));A.length<B+M&&(A=h.substring(k-B,k)+h.substring(k,k+M),x=f.substring(0,g-B),O=f.substring(g+M),L=h.substring(0,k-B),C=h.substring(k+M))}return A.length*2>=f.length?[x,O,L,C,A]:null}var o=s(t,i,Math.ceil(t.length/4)),a=s(t,i,Math.ceil(t.length/2)),l;if(!o&&!a)return null;a?o?l=o[4].length>a[4].length?o:a:l=a:l=o;var c,u,d,p;e.length>n.length?(c=l[0],u=l[1],d=l[2],p=l[3]):(d=l[0],p=l[1],c=l[2],u=l[3]);var m=l[4];return[c,u,d,p,m]};F.prototype.diff_cleanupSemantic=function(e){for(var n=!1,t=[],i=0,r=null,s=0,o=0,a=0,l=0,c=0;s<e.length;)e[s][0]==Z?(t[i++]=s,o=l,a=c,l=0,c=0,r=e[s][1]):(e[s][0]==de?l+=e[s][1].length:c+=e[s][1].length,r&&r.length<=Math.max(o,a)&&r.length<=Math.max(l,c)&&(e.splice(t[i-1],0,new F.Diff(le,r)),e[t[i-1]+1][0]=de,i--,i--,s=i>0?t[i-1]:-1,o=0,a=0,l=0,c=0,r=null,n=!0)),s++;for(n&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s<e.length;){if(e[s-1][0]==le&&e[s][0]==de){var u=e[s-1][1],d=e[s][1],p=this.diff_commonOverlap_(u,d),m=this.diff_commonOverlap_(d,u);p>=m?(p>=u.length/2||p>=d.length/2)&&(e.splice(s,0,new F.Diff(Z,d.substring(0,p))),e[s-1][1]=u.substring(0,u.length-p),e[s+1][1]=d.substring(p),s++):(m>=u.length/2||m>=d.length/2)&&(e.splice(s,0,new F.Diff(Z,u.substring(0,m))),e[s-1][0]=de,e[s-1][1]=d.substring(0,d.length-m),e[s+1][0]=le,e[s+1][1]=u.substring(m),s++),s++}s++}};F.prototype.diff_cleanupSemanticLossless=function(e){function n(m,f){if(!m||!f)return 6;var h=m.charAt(m.length-1),g=f.charAt(0),b=h.match(F.nonAlphaNumericRegex_),k=g.match(F.nonAlphaNumericRegex_),A=b&&h.match(F.whitespaceRegex_),x=k&&g.match(F.whitespaceRegex_),O=A&&h.match(F.linebreakRegex_),L=x&&g.match(F.linebreakRegex_),C=O&&m.match(F.blanklineEndRegex_),M=L&&f.match(F.blanklineStartRegex_);return C||M?5:O||L?4:b&&!A&&x?3:A||x?2:b||k?1:0}for(var t=1;t<e.length-1;){if(e[t-1][0]==Z&&e[t+1][0]==Z){var i=e[t-1][1],r=e[t][1],s=e[t+1][1],o=this.diff_commonSuffix(i,r);if(o){var a=r.substring(r.length-o);i=i.substring(0,i.length-o),r=a+r.substring(0,r.length-o),s=a+s}for(var l=i,c=r,u=s,d=n(i,r)+n(r,s);r.charAt(0)===s.charAt(0);){i+=r.charAt(0),r=r.substring(1)+s.charAt(0),s=s.substring(1);var p=n(i,r)+n(r,s);p>=d&&(d=p,l=i,c=r,u=s)}e[t-1][1]!=l&&(l?e[t-1][1]=l:(e.splice(t-1,1),t--),e[t][1]=c,u?e[t+1][1]=u:(e.splice(t+1,1),t--))}t++}};F.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;F.whitespaceRegex_=/\s/;F.linebreakRegex_=/[\r\n]/;F.blanklineEndRegex_=/\n\r?\n$/;F.blanklineStartRegex_=/^\r?\n\r?\n/;F.prototype.diff_cleanupEfficiency=function(e){for(var n=!1,t=[],i=0,r=null,s=0,o=!1,a=!1,l=!1,c=!1;s<e.length;)e[s][0]==Z?(e[s][1].length<this.Diff_EditCost&&(l||c)?(t[i++]=s,o=l,a=c,r=e[s][1]):(i=0,r=null),l=c=!1):(e[s][0]==le?c=!0:l=!0,r&&(o&&a&&l&&c||r.length<this.Diff_EditCost/2&&o+a+l+c==3)&&(e.splice(t[i-1],0,new F.Diff(le,r)),e[t[i-1]+1][0]=de,i--,r=null,o&&a?(l=c=!0,i=0):(i--,s=i>0?t[i-1]:-1,l=c=!1),n=!0)),s++;n&&this.diff_cleanupMerge(e)};F.prototype.diff_cleanupMerge=function(e){e.push(new F.Diff(Z,""));for(var n=0,t=0,i=0,r="",s="",o;n<e.length;)switch(e[n][0]){case de:i++,s+=e[n][1],n++;break;case le:t++,r+=e[n][1],n++;break;case Z:t+i>1?(t!==0&&i!==0&&(o=this.diff_commonPrefix(s,r),o!==0&&(n-t-i>0&&e[n-t-i-1][0]==Z?e[n-t-i-1][1]+=s.substring(0,o):(e.splice(0,0,new F.Diff(Z,s.substring(0,o))),n++),s=s.substring(o),r=r.substr Line truncated
`),i=0,r=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<t.length;){var s=t[i].match(r);if(!s)throw new Error("Invalid patch string: "+t[i]);var o=new F.patch_obj;for(n.push(o),o.start1=parseInt(s[1],10),s[2]===""?(o.start1--,o.length1=1):s[2]=="0"?o.length1=0:(o.start1--,o.length1=parseInt(s[2],10)),o.start2=parseInt(s[3],10),s[4]===""?(o.start2--,o.length2=1):s[4]=="0"?o.length2=0:(o.start2--,o.length2=parseInt(s[4],10)),i++;i<t.length;){var a=t[i].charAt(0);try{var l=decodeURI(t[i].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+l)}if(a=="-")o.diffs.push(new F.Diff(le,l));else if(a=="+")o.diffs.push(new F.Diff(de,l));else if(a==" ")o.diffs.push(new F.Diff(Z,l));else{if(a=="@")break;if(a!=="")throw new Error('Invalid patch mode "'+a+'" in: '+l)}i++}}return n};F.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0};F.patch_obj.prototype.toString=function(){var e,n;this.length1===0?e=this.start1+",0":this.length1==1?e=this.start1+1:e=this.start1+1+","+this.length1,this.length2===0?n=this.start2+",0":this.length2==1?n=this.start2+1:n=this.start2+1+","+this.length2;for(var t=["@@ -"+e+" +"+n+` @@
`],i,r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case de:i="+";break;case le:i="-";break;case Z:i=" ";break}t[r+1]=i+encodeURI(this.diffs[r][1])+`
`}return t.join("").replace(/%20/g," ")};Qr.exports=F;Qr.exports.diff_match_patch=F;Qr.exports.DIFF_DELETE=le;Qr.exports.DIFF_INSERT=de;Qr.exports.DIFF_EQUAL=Z});var by=gi((oW,yy)=>{yy.exports=CE;var EL=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xL=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],TL=["Su","Mo","Tu","We","Th","Fr","Sa"],Hc=["January","February","March","April","May","June","July","August","September","October","November","December"],OL=["ACDT","ACST","ACWT","ADT","ACT","AEDT","AEST","AFT","AKDT","AKST","ALMT","AMT","AMST","ANAT","ANAST","AQTT","ART","AST","AWDT","AWST","AZOT","AZOST","AZT","AZST","BNT","BDT","BOT","BRT","BRST","BST","BTT","B","CAST","CAT","CCT","CDT","CEDT","CEST","CET","CHADT","CHAST","CHOT","CHOST","CHsT","CHUT","CIT","CKT","CLST","CLT","COT","CST","CVT","CWST","CXT","C","DAVT","DDUT","DST","EASST","EAST","EAT","ECT","EDT","EEDT","EEST","EET","EGT","EGST","EST","E","EIT","FET","FJT","FJST","FKST","FKT","FNT","F","GALT","GAMT","GET","GFT","GILT","GMT","GST","GYT","G","HADT","HAST","HKT","HOVT","HOVST","HST","ICT","IDT","IOT","IRDT","IRKT","IRKST","IRST","IST","JST","KGT","KOST","KRAT","KRAST","KST","KUYT","LHDT","LHST","LINT","L","MAGT","MAGST","MART","MAWT","MDT","MeST","MHT","MIST","MMT","MSD","MSK","MST","MUT","MVT","MYT","NCT","NDT","NFT","N","NOVT","NOVST","NPT","NRT","NST","NT","NUT","NZDT","NZST","OMST","OMSST","ORAT","O","PDT","PET","PETT","PETST","PGT","PHT","PHOT","PKT","PMDT","PMST","PONT","PST","PWT","PYT","PYST","P","QYZT","RET","ROTT","R","SAKT","SAMT","SAST","SBT","SCT","SGT","SRT","SLT","SLST","SRET","SST","SYOT","TAHT","TFT","TJT","TKT","TLT","TMT","TOT","TRUT","TVT","T","ULAT","ULAST","UTC","UYST","UYT","UZT","U","VET","VLAT","VLAST","VOLT","VUT","V","WAKT","WAT","WAST","WDT","WEDT","WEST","WET","WFT","WGT","WGST","WIB","WIT","WITA","WST","WT","YAKT","YAKST","YAP","YEK","YEKS"],qc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CL=new RegExp(EL.join("|"),"i"),ML=new RegExp(xL.join("|"),"i"),IL=new RegExp("\\b("+TL.join("|")+")\\b","i"),BL=new RegExp(Hc.join("|"),"i"),FL=new RegExp(qc.join("|"),"i"),RL=new RegExp("\\b("+OL.join("|")+")\\b","i"),DL=/(\d+)(st|nd|rd|th)\b/i,NL=/(\d{1,4})([/.-])(\d{1,2})[/.-](\d{1,4})/,_L=/((\+|-)(12:00|11:00|10:00|09:30|09:00|08:00|07:00|06:00|05:00|04:00|03:30|03:00|02:00|01:00|00:00|01:00|02:00|03:00|03:30|04:00|04:30|05:00|05:30|05:45|06:00|06:30|07:00|08:00|08:45|09:00|09:30|10:00|10:30|11:00|12:00|12:45|13:00|14:00))$/,KL=/((\+|-)(1200|1100|1000|0930|0900|0800|0700|0600|0500|0400|0330|0300|0200|0100|0000|0100|0200|0300|0330|0400|0430|0500|0530|0545|0600|0630|0700|0800|0845|0900|0930|1000|1030|1100|1200|1245|1300|1400))$/,ts="("+["AM?","PM?"].join("|")+")",YL=new RegExp("0\\d\\:\\d{1,2}\\:\\d{1,2}(\\s*)"+ts,"i"),PL=new RegExp("0\\d\\:\\d{1,2}(\\s*)"+ts,"i"),zL=new RegExp("0\\d(\\s*)"+ts,"i"),HL=new RegExp("\\d{1,2}\\:\\d{1,2}\\:\\d{1,2}(\\s*)"+ts,"i"),qL=new RegExp("\\d{1,2}\\:\\d{1,2}(\\s*)"+ts,"i"),$L=new RegExp("\\d{1,2}(\\s*)"+ts,"i"),UL=new RegExp("\\d{1,2}"),jL=new RegExp(Hc.join("|")+"-\\d{2}","i"),VL=new RegExp(qc.join("|")+"-\\d{2}","i"),_p=new RegExp("(\\d{1,2})(\\D+)("+Hc.join("|")+"|"+qc.join("|")+")(\\2)('?\\d{2,4})"),WL=/\d{2}:\d{2}:\d{2}\.\d{3}/,GL=/\d{2}:\d{2}:\d{2}\.\d{2}/,QL=/\d{2}:\d{2}:\d{2}\.\d{1}/,ZL=/T\d{2}:\d{2}:\d{2}/,JL=/0\d:\d{2}:\d{2}/,XL=/0\d:\d{2}/,eE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}/,tE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}\.\d{3}/,nE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}\.\d{2}/,iE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]:\d{2}\.\d{1}/,rE=/\b([01]?[0-9]|2[0-3]):[0-5][0-9]/,sE=/24:00:\d{2}/,oE=/24:00:\d{2}\.\d{3}/,aE=/24:00:\d{2}\.\d{2}/,lE=/24:00:\d{2}\.\d{1}/,cE=/24:00/,uE=/\d{4}/,dE=/\d{2}/,pE=/'\d{2}/,py=/0\d/,my=/\d{1,2}/,mE=/0\d/,fE=/\d{1,2}/,hE=/^([1-9])\/([1-9]|0[1-9])$/,gE=/^([1-9])\/(1[012])$/,yE=/^(0[1-9]|[12][0-9]|3[01])\/([1-9])$/,bE=/^(0[1-9]|[12][0-9]|3[01])\/(1[012]|0[1-9])$/,kE=/^([1-9])(\D)([1-9][0-9])$/,vE=/^([1-9])(\D)([0][0-9])$/,wE=/^(0[1-9]|1[012])(\D)([1-9][0-9])$/,AE=/^(0[1-9]|1[012])(\D)([0][0-9])$/,Kp=/([/][M]|[M][/]|[MM]|[MMMM])/,fy=/(D)/,Yp=/(Y)/,hy=/\d+\D.+$/,gy=/\D+(\d+)($|Z)/,SE=/M\s*\d{1,2}\b.+$/,LE=/M\D+(0[1-9])\b.+$/,zc=/\d+\s+(H|h|k)/,EE=/\b(at)\b/i,xE=/\d{13}/,TE=/\d{10}/,OE={"/":"MDY",".":"DMY","-":"YMD"};function CE(e,n){var t=e.toString();if(n=n||{},n.preferredOrder=n.preferredOrder||OE,t=t.replace(xE,"x"),t=t.replace(TE,"X"),t=t.replace(EE,"[$1]"),t.match(_p)){let[,c,u,d,p,m]=t.match(_p),f=[];c.length===2&&c[0]==="0"||n.preferLongFormat?f.push("DD"):f.push("D"),f.push(u),d.match(Hc)?f.push("MMMM"):d.match(qc)?f.push("MMM"):f.push(d),f.push(p),m[0]==="'"?f.push("'YY"):m.length===2?f.push("YY"):(m.length,f.push("YYYY"));var i=f.join("");t=t.replace(_p,i)}t=t.replace(CL,"dddd"),t=t.replace(ML,"ddd"),t=t.replace(IL,"dd"),t=t.replace(DL,"Do"),t=t.replace(BL,"MMMM"),t=t.replace(FL,"MMM"),t=t.replace(NL,ME.bind(null,n)),t=t.replace(RL,c=>"["+c+"]"),t=t.replace(_L,"Z"),t=t.replace(KL,"ZZ"),t=t.replace(WL, Line truncated
`;t+=`${n.name} ${n.message}`,n.stack&&(t+=`
`+n.stack),ce.default.error(t),ds&&Ia(t.substring(t.indexOf("]")+2),ce.default.levels.TRACE)}function Dt(e){ce.default.info(`${Oa} ${e}`),ds&&Ia(e,ce.default.levels.INFO)}function pt(e){ce.default.debug(`${Oa} ${e}`),ds&&Ia(e,ce.default.levels.DEBUG)}function Et(e){ce.default.warn(`${Oa} ${e}`),ds&&Ia(e,ce.default.levels.WARN)}function bi(e){ce.default.getLevel()>ce.default.levels.DEBUG||du.set(e,performance.now())}function Yn(e){if(ce.default.getLevel()>ce.default.levels.DEBUG)return;du.has(e)||Et(E("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let n=performance.now()-du.get(e);pt(`${e}: ${n} `+E("logs.milliseconds-abbreviation"))}function Ia(e,n){ce.default.getLevel()<=n&&Ca.push(e)}function Gp(){Ca=[]}function pu(e){ds=e}function Ba(e){switch(e){case"INFO":{ce.default.setLevel("info");break}case"TRACE":{ce.default.setLevel("trace");break}case"DEBUG":{ce.default.setLevel("debug");break}case"SILENT":{ce.default.setLevel("silent");break}case"ERROR":{ce.default.setLevel("error");break}case"WARN":{ce.default.setLevel("warn");break}}}function Qp(e){switch(e){case ce.default.levels.INFO:return"INFO";case ce.default.levels.TRACE:return"TRACE";case ce.default.levels.DEBUG:return"DEBUG";case ce.default.levels.SILENT:return"SILENT";case ce.default.levels.ERROR:return"ERROR";case ce.default.levels.WARN:return"WARN"}}var Zp={};var Jp={};var Xp={};var em={commands:{"lint-file":{name:"Linten Sie die aktuelle Datei","error-message":"Lint-Datei-Fehler in der Datei"},"lint-file-unless-ignored":{name:"Linten Sie die aktuelle Datei, es sei denn, sie wird ignoriert"},"lint-all-files":{name:"Linten Sie alle Dateien im Vault","error-message":"Beim Linten aller Dateien Fehler in der Datei","success-message":"Alle Dateien gelinted","errors-message-singular":"Beim Linten aller Dateien gab es einen Fehler.","errors-message-plural":"Beim Linten aller Dateien gab es {NUM} Fehler.","start-message":"Dadurch werden alle Ihre Dateien ver\xE4ndert und es k\xF6nnen Fehler entstehen.","submit-button-text":"Linte alle","submit-button-notice-text":"Linte alle Dateien..."},"lint-all-files-in-folder":{name:"Linte alle Dateien im aktuellen Ordner","start-message":"Dadurch werden alle Ihre Dateien in {FOLDER_NAME} bearbeitet, einschlie\xDFlich der Dateien in den Unterordnern, was zu Fehlern f\xFChren kann.","submit-button-text":"Linte alle Dateien in {FOLDER_NAME}","submit-button-notice-text":"Linten aller Dateien in {FOLDER_NAME}...","error-message":"Beim Linten aller Dateien im Ordner gab es Fehler in der Datei","success-message":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted.","message-singular":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted und es trat ein Fehler auf.","message-plural":"Alle {FILE_COUNT}-Dateien in {FOLDER_NAME} wurden gelinted und es gab {ERROR_COUNT} Fehler."},"paste-as-plain-text":{name:"Einf\xFCgen als reiner Text und ohne \xC4nderungen"},"lint-file-pop-up-menu-text":{name:"Linte Datei"},"lint-folder-pop-up-menu-text":{name:"Linte Ordner"}},logs:{"plugin-load":"Plugin wird geladen","plugin-unload":"Plugin entladen","folder-lint":"Linting-Ordner ","linter-run":"Laufender Linter","paste-link-warning":"Abgebrochenes Einf\xFCgen des Lints, da der Inhalt der Zwischenablage ein Link ist, wodurch Konflikte mit anderen Plugins vermieden werden, die das Einf\xFCgen \xE4ndern.","see-console":"Weitere Informationen finden Sie in der Konsole.","unknown-error":"Beim Linten ist ein unbekannter Fehler aufgetreten.","moment-locale-not-found":"Beim Versuch, Moment.js locale auf {MOMENT_LOCALE} umzustellen, wurde {CURRENT_LOCALE} angezeigt","file-change-lint-message-start":"Linted","pre-rules":"Regeln vor regul\xE4ren Regeln","post-rules":"Regeln nach regul\xE4ren Regeln","rule-running":"Laufende Regeln","custom-regex":"Benutzerdefinierte Regex-Regeln","running-custom-regex":"Ausf\xFChren von benutzerdefinierten Regex","running-custom-lint-command":"Ausf\xFChren von benutzerdefinierten Lint-Befehlen","custom-lint-duplicate-warning":'Sie k\xF6nnen denselben Befehl ("{COMMAND_NAME}") nicht zweimal als benutzerdefinierte Lint-Regel ausf\xFChren.',"custom-lint-error-message":"Benutzerdefinierter Lint-Befehl","disabled-text":"ist deaktiviert","run-rule-text":"L\xE4uft","timing-key-not-found":"Der Timing-Schl\xFCssel '{TIMING_KEY}' ist in der Timing-Info-Liste nicht vorhanden, daher wurde er ignoriert","milliseconds-abbreviation":"ms","invalid-date-format-error":"Das Format des Erstellungsdatums '{DATE}' konnte nicht analysiert oder bestimmt werden, sodass das Erstellungsdatum in '{FILE_NAME}","invalid-delimiter-error-message":"Trennzeichen darf nur ein einzelnes Zeichen sein","missing-footnote-error-message":"Die Fu\xDFnote '{FOOTNOTE}' hat keinen entsprechenden Fu\xDFnotenverweis vor dem Fu\xDFnoteninhalt und kann nicht verarbeitet werden. Bitte achten Sie darauf, dass alle Fu\xDFnoten vor dem Inhalt der Fu\xDFnote einen entsprechenden Verweis haben.","too-many-footnotes-error-message":"Der Fu\xDFnotenschl\xFCssel '{FO Line truncated
`)break;r.trim()===""||r===">"?t=r+t:t="",i--}return[t,i]}function bu(e=""){let[n]=gr(e,e.length);return`
`+n.trim()}function Am(e="",n=!1,t=1){let i=bu(e),r=Hn(i,">");return(n||Pa.test(e))&&t===r||t<r?i.substring(0,i.lastIndexOf(">")):i}function tb(e,n){if(n===0)return e;let t=n,i=n;for(;t>=0;){let r=e.charAt(t);if(r.trim()!=="")break;r===`
`&&(i=t),t--}return t<0||i===0?e.substring(n+1):e.substring(0,i)+`
`+e.substring(n)}function nb(e,n,t,i=!1,r=!1){if(t===0)return e;let s=n.split(">").length-1,o=t,a=t,l=0,c=!1,u="";for(;o>=0;){let k=e.charAt(o);if(k.trim()!==""&&k!==">")break;if(k===">"){if(c)break;l++}else if(k===`
`)if(l===0||l===s||l+1===s)a=o,l=0,u===`
`&&(c=!0);else break;o--,u=k}if(o<0||a===0)return e.substring(t+1);let d=e.substring(a,t);if(d===`
`||d.startsWith(`
`))return e.substring(0,a)+`
`+e.substring(t);let m=e.lastIndexOf(`
`,a-1),f="";m===-1?f=e.substring(0,a):f=e.substring(m,a);let h,g=e.indexOf(`
`,t+1);g===-1?h=e.substring(t):h=e.substring(t,g);let b;return r?b=Am(f,i,s):Hn(f,">")!=0&&!Pa.test(f)&&(ms.test(f)||ms.test(h))?b=e.substring(a,t).trimEnd():b=bu(f),e.substring(0,a)+b+e.substring(t)}function ib(e,n){if(n===e.length-1)return e;let t=n,i=n,r=!0;for(;t<e.length;){let s=e.charAt(t);if(s.trim()!=="")break;s===`
`&&(r?r=!1:i=t),t++}return t===e.length||i===e.length-1?e.substring(0,n):e.substring(0,n)+`
`+e.substring(i)}function rb(e,n,t,i=!1,r=!1){if(t===e.length-1)return e;let s=n.split(">").length-1,o=t,a=t,l=!0,c=0,u=!1,d="",p=!0,m=e.charAt(o-1);for(;o<e.length;){let O=e.charAt(o);if(O.trim()!==""&&O!==">")break;if(O===">"){if(u)break;c++}else if(O===`
`)if(c===0||c===s||c+1===s)c=0,l?l=!1:a=o,d===`
`&&(u=!0);else break;if(o++,d=O,p&&O===`
`&&r&&m===`
`){a=o;break}p=!1}if(o===e.length||a===e.length-1)return e.substring(0,t);let f=e.substring(t,a);if(f===`
`||f.endsWith(`
`))return e.substring(0,t)+`
`+e.substring(a);let g=e.indexOf(`
`,a+1),b="";g===-1?b=e.substring(a):b=e.substring(a+1,g);let k,A=e.lastIndexOf(`
`,t-1);A===-1?k=e.substring(0,a):k=e.substring(A+1,t);let x;return r?x=Am(b,i,s):ms.test(b)||ms.test(k)?x=e.substring(t,a).trimEnd():x=bu(b),e.substring(0,t)+x+e.substring(a)}function zn(e,n,t,i=!1){let[r,s]=gr(e,n);if(r.trim()!==""){let a=Pa.test(e.substring(n,t)),l=Hn(r,">"),c=ob(e,t,l),u=rb(e,r,c,a,i);return s=sb(u,s,l),nb(u,r,s,a,i)}let o=ib(e,t);return tb(o,s)}function Sm(e,n=0){let t=3735928559^n,i=1103547991^n;for(let r=0,s;r<e.length;r++)s=e.charCodeAt(r),t=Math.imul(t^s,2654435761),i=Math.imul(i^s,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&i)+(t>>>0)}function Lm(e){return e=e.replaceAll("\\b","\b"),e=e.replaceAll("\\f","\f"),e=e.replaceAll("\\n",`
`),e=e.replaceAll("\\r","\r"),e=e.replaceAll("\\t"," "),e=e.replaceAll("\\v","\v"),e}function yr(e,n){if(n==0)return n;let t=n;for(;t>0&&e.charAt(t-1)!==`
`;)t--;return t}function Em(e,n,t,i){return i>e.length-1?e:e.slice(0,i)+e.slice(i,e.length).replace(n,t)}function Hn(e,n){let t=0;for(let i=0,r=e.length;i<r;i++){let s=e.indexOf(n,i);s>-1&&(t++,i=s)}return t}function Ya(e){let n=typeof e;return n!="string"?n==="number":!isNaN(e)&&!isNaN(parseFloat(e))}function xm(e,n){let t=[],i=-1;for(;(i=n.indexOf(e,i+1))>=0;)t.push(i);return t}function sb(e,n,t){let i=n,r=n+1,s="",o=!1,a=0;for(;r<e.length;){if(s=e.charAt(r),s.trim()!==""&&s!==">"){o=!0;break}else if(s===`
`){if(a!==t)break;a=0,i=r}else s===">"&&a++;r++}return o?i:n}function ob(e,n,t){let i=n,r=n-1,s="",o=!1,a=0;for(;r>=0;){if(s=e.charAt(r),s.trim()!==""&&s!==">"){o=!0;break}else if(s===`
`){if(a!==t)break;a=0,i=r}else s===">"&&a++;r--}return o?i:n}function br(e){let n=kr(e),t=new Map,i="",r=[],s=[];for(let o of n){i=e.substring(o.startIndex,o.endIndex),r=i.split(`
`),r.splice(0,2);for(let a of r){if(s=a.split("|"),s.length!==4){Et(E("options.custom-auto-correct.custom-row-parse-warning").replace("{ROW}",a));continue}t.set(s[1].trim().toLowerCase(),s[2].trim())}}return t}function Ue(e,n,t,i){let r=e.length,s=0,o;if(n<0?n=-n>r?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);s<i.length;)o=i.slice(s,s+1e4),o.unshift(n,0),e.splice(...o),s+=1e4,n+=1e4}function st(e,n){return e.length>0?(Ue(e,e.length,0,n),e):n}var ab=qn(/\p{P}/u),yt=qn(/[A-Za-z]/),ot=qn(/[\dA-Za-z]/),Tm=qn(/[#-'*+\--9=?A-Z^-~]/);function fs(e){return e!==null&&(e<32||e===127)}var hs=qn(/\d/),Om=qn(/[\dA-Fa-f]/),ku=qn(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function ae(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}function Cm(e){return ku(e)||ab(e)}var Mm=qn(/\s/);function qn(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function vu(e){if(e===null||ae(e)||Mm(e))return 1;if(Cm(e))return 2}function vr(e,n,t){let i=[],r=-1;for(;++r<e.length;){let s=e[r].resolveAll;s&&!i.includes(s)&&(n=s(n,t),i.push(s))}return n}var gs={name:"attention",tokenize:cb,resolveAll:lb};function lb(e,n){let t=-1,i,r,s,o,a,l,c,u;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(i=t;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[i][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;l=e[i][1].end.offset-e[i][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;let d=Object.assign({},e[i][1].end),p=Object.assign({},e[t][1].start);Im(d,-l),Im(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[i][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:p},s={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[i][1].end),end:Object.assign({},e[t][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[i][1].end=Object.assign({},o.start),e[t][1].start=Object.assign({},a.end),c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=st(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=st(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",s,n]]),c=st(c,vr(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=st(c,[["exit",s,n],["enter",a,n],["exit",a,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(u=2,c=st(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):u=0,Ue(e,i-1,t-i+3,c),t=i+c.length-u-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function cb(e,n){let t=this.parser.constructs.attentionMarkers.null,i=this.previous,r=vu(i),s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;let c=e.exit("attentionSequence"),u=vu(l),d=!u||u===2&&r||t.includes(l),p=!r||r===2&&u||t.includes(i);return c._open=!!(s===42?d:d&&(r||!p)),c._close=!!(s===42?p:p&&(u||!d)),n(l)}}function Im(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var wu={name:"autolink",tokenize:ub};function ub(e,n,t){let i=0;return r;function r(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return yt(m)?(e.consume(m),o):c(m)}function o(m){return m===43||m===45||m===46||ot(m)?(i=1,a(m)):c(m)}function a(m){return m===58?(e.consume(m),i=0,l):(m===43||m===45||m===46||ot(m))&&i++<32?(e.consume(m),a):(i=0,c(m))}function l(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),n):m===null||m===32||m===60||fs(m)?t(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),u):Tm(m)?(e.consume(m),c):t(m)}function u(m){return ot(m)?d(m):t(m)}function d(m){return m===46?(e.consume(m),i=0,u):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),n):p(m)}function p(m){if((m===45||ot(m))&&i++<63){let f=m===45?p:d;return e.consume(m),f}return t(m)}}function $(e,n,t,i){let r=i?i-1:Number.POSITIVE_INFINITY,s=0;return o;function o(l){return U(l)?(e.enter(t),a(l)):n(l)}function a(l){return U(l)&&s++<r?(e.consume(l),a):(e.exit(t),n(l))}}var rn={tokenize:db,partial:!0};function db(e,n,t){return i;function i(s){return U(s)?$(e,r,"linePrefix")(s):r(s)}function r(s){return s===null||R(s)?n(s):t(s)}}var za={name:"blockQuote",tokenize:pb,continuation:{tokenize:mb},exit:fb};function pb(e,n,t){let i=this;return r;function r(o){if(o===62){let a=i.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit(Line truncated
`;break}case-3:{o=`\r
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&r)continue;o=" ";break}default:o=String.fromCharCode(s)}r=s===-2,i.push(o)}return i.join("")}var zu={};au(zu,{attentionMarkers:()=>Gk,contentInitial:()=>qk,disable:()=>Qk,document:()=>Hk,flow:()=>Uk,flowInitial:()=>$k,insideSpan:()=>Wk,string:()=>jk,text:()=>Vk});var Hk={42:Xe,43:Xe,45:Xe,48:Xe,49:Xe,50:Xe,51:Xe,52:Xe,53:Xe,54:Xe,55:Xe,56:Xe,57:Xe,62:za},qk={91:Lu},$k={[-2]:ys,[-1]:ys,32:ys},Uk={35:xu,42:Ai,45:[Ga,Ai],60:Ou,61:Ga,95:Ai,96:$a,126:$a},jk={38:qa,92:Ha},Vk={[-5]:bs,[-4]:bs,[-3]:bs,33:Mu,38:qa,42:gs,60:[wu,Cu],91:Iu,92:[Eu,Ha],93:wi,95:gs,96:Au},Wk={null:[gs,Gm]},Gk={null:[42,95]},Qk={null:[]};function Hu(e){let t=Za([zu,...(e||{}).extensions||[]]),i={defined:[],lazy:{},constructs:t,content:r(Um),document:r(Vm),flow:r(Wm),string:r(Qm),text:r(Zm)};return i;function r(s){return o;function o(a){return ef(i,s,a)}}}function qu(e){for(;!Ua(e););return e}var tf=/[\0\t\n\r]/g;function $u(){let e=1,n="",t=!0,i;return r;function r(s,o,a){let l=[],c,u,d,p,m;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,n="",t&&(s.charCodeAt(0)===65279&&d++,t=void 0);d<s.length;){if(tf.lastIndex=d,c=tf.exec(s),p=c&&c.index!==void 0?c.index:s.length,m=s.charCodeAt(p),!c){n=s.slice(d);break}if(m===10&&d===p&&i)l.push(-3),i=void 0;else switch(i&&(l.push(-5),i=void 0),d<p&&(l.push(s.slice(d,p)),e+=p-d),m){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:i=!0,e=1}d=p+1}return a&&(i&&l.push(-5),n&&l.push(n),l.push(null)),l}}var Zk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nf(e){return e.replace(Zk,Jk)}function Jk(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let r=t.charCodeAt(1),s=r===120||r===88;return Ja(t.slice(s?2:1),s?16:10)}return wr(t)||e}function Ar(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rf(e.position):"start"in e||"end"in e?rf(e):"line"in e||"column"in e?Uu(e):""}function Uu(e){return sf(e&&e.line)+":"+sf(e&&e.column)}function rf(e){return Uu(e&&e.start)+"-"+Uu(e&&e.end)}function sf(e){return e&&typeof e=="number"?e:1}var af={}.hasOwnProperty;function ju(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Xk(t)(qu(Hu(t).document().write($u()(e,n,!0))))}function Xk(e){let n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Aa),autolinkProtocol:B,autolinkEmail:B,atxHeading:s(ka),blockQuote:s(vn),characterEscape:B,characterReference:B,codeFenced:s(Lt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Lt,o),codeText:s(nn,o),codeTextData:B,data:B,codeFlowValue:B,definition:s(Kn),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(mr),hardBreakEscape:s(va),hardBreakTrailing:s(va),htmlFlow:s(ss,o),htmlFlowData:B,htmlText:s(ss,o),htmlTextData:B,image:s(wa),label:o,link:s(Aa),listItem:s(wn),listItemValue:p,listOrdered:s(Sa,d),listUnordered:s(Sa),paragraph:s(fr),reference:S,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(ka),strong:s(La),thematicBreak:s(os)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:pe,autolinkProtocol:kn,blockQuote:l(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Ze,characterReferenceMarkerNumeric:Ze,characterReferenceValue:bn,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:m,codeFencedFenceMeta:f,codeFlowValue:N,codeIndented:l(b),codeText:l(W),codeTextData:N,data:N,definition:l(),definitionDestinationString:x,definitionLabelString:k,definitionTitleString:A,emphasis:l(),hardBreakEscape:l(Y),hardBreakTrailing:l(Y),htmlFlow:l(_),htmlFlowData:N,htmlText:l(V),htmlTextData:N,image:l(re),label:Ye,labelText:Ge,lineEnding:q,link:l(X),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Me,resourceDestinationString:w,resourceTitleString:Qe,resource:rt,setextHeading:l(M),setextHeadingLineSequence:C,setextHeadingText:L,strong:l(),thematicBreak:l()}};lf(n,(e||{}).mdastExtensions||[]);let t={};return i;function i(I){let D={type:"root",children:[]},G={stack:[D],tokenStack:[],config:n,enter:a,exit:c,buffer:o,resume:u,data:t},J=[],oe=-1;for(;++oe<I.length;)if(I[oe][1].type==="listOrdered"||I[oe][1].type==="listUnordered")if(I[oe][0]==="enter")J.push(oe);else{let Rt=J.pop();oe=r(I,Rt,oe)}for(oe=-1;++oe<I.length;){let Rt=n[I[oe][0]];af.call(Rt,I[oe][1].type)&&Rt[I[oe][1].type].call(Object.assign({sliceSerialize:I[oe][2].sliceSerialize},G),I[oe][1])}if(G.tokenStack.length>0){let Rt=G.tokenStack[G.tokenStack.length-1];(Rt[1]||of).call(G,void 0,Rt[0])}for(D.position={start:$n(I.length>0?I[0][1].start:{line:1,column:1,offset:0}),end:$n(I.length>0?I[I.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe<n.transforms.length;)D=n.transforms[oe](D)||D;return D}function r(I,D,G){let J=D-1,oe=-1,Rt=!1,hi,An,as,ls;for(;++J<=G;){let gt=I[J];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuotLine truncated
`&&(e=e.substring(0,o.end.offset)+e.substring(o.end.offset+1)),o.end.offset<e.length&&e[o.end.offset]===`
`&&(e=e.substring(0,o.end.offset)+e.substring(o.end.offset+1)),e=e.substring(0,o.start.offset)+e.substring(o.end.offset),s(e,a,o.start.offset)}for(let o of i){let a=o[1],l=a.referencePositions.length-a.footnotesReferencingKey.length;l=l>=0?l:0;let c=0;for(let u of a.footnotesReferencingKey){if(c+l>=a.referencePositions.length)throw new Error(E("logs.missing-footnote-error-message").replace("{FOOTNOTE}",u));r.set(u,a.referencePositions[l+c++])}}t=t.sort((o,a)=>r.get(o)-r.get(a)),t.length>0&&(e=e.trimEnd()+`
`);for(let o of t)e+=`
`+o;return e}function gf(e){let n=Se("footnoteDefinition",e),t=[],i=new Map,r=new Map,s=[],o=new Set,a=[],l=function(d,p,m){let f=p.match(/\[\^.*?\]/)[0];i.set(p,f);let h=o.has(f);if(h&&t.includes(p)){a.unshift(p);return}else if(h)throw new Error(E("logs.too-many-footnotes-error-message").replace("{FOOTNOTE_KEY}",f));let g;do g=d.lastIndexOf(f,m),g!==-1&&((g+p.length>d.length||d.substring(g,g+p.length)!==p)&&s.push({key:f,position:g}),m=g-1);while(g>0);o.add(f)};for(let d of n){let p=e.substring(d.start.offset,d.end.offset);t.unshift(p),l(e,p,d.start.offset)}let c=1,u=new Set;for(let d of t){if(u.has(d))continue;u.add(d);let p=i.get(d),m=`[^${c++}]`;r.set(p,m)}s.sort((d,p)=>p.position-d.position);for(let d of s){let p=r.get(d.key);e=Em(e,d.key,p,d.position)}for(let d of u){let p=i.get(d),m=r.get(p);e=e.replace(d,d.replace(p,m))}for(let d of a){let p=e.replace(`
${d}
`,`
`);e===p&&(p=e.replace(d,"")),e=p}return e}function tl(e,n,t){let i=Se(t,e);if(i.length===0)return e;let r="";if(n==="underscore")r="_";else if(n==="asterisk")r="*";else{let s=i[i.length-1];r=e.substring(s.start.offset,s.start.offset+1)}t==="strong"&&(r+=r);for(let s of i){let o=r+e.substring(s.start.offset+r.length,s.end.offset-r.length)+r;e=me(e,s.start.offset,s.end.offset,o)}return e}function yf(e,n){let t=Se("paragraph",e);if(t.length===0)return e;for(let i of t){let r=e.substring(i.start.offset,i.end.offset).split(`
`),s=r.length-1;if(!(s<1)){for(let o=0;o<s;o++){let a=r[o];mv(a,n)||(r[o]=fv(a,n))}e=me(e,i.start.offset,i.end.offset,r.join(`
`))}}return e}function mv(e,n){return!!(e.endsWith("<br>")&&n=="<br>"||e.endsWith("<br/>")&&n=="<br/>"||e.endsWith(" ")&&n==" "||!e.endsWith("\\\\")&&e.endsWith("\\")&&n=="\\")}function fv(e,n){e=e.trimEnd();let t=0;return e.endsWith("<br>")&&(t=4),e.endsWith("<br/>")&&(t=5),!e.endsWith("\\\\")&&e.endsWith("\\")&&(t=1),t&&(e=e.substring(0,e.length-t)),e.trimEnd()+n}function bf(e){let n=e.endsWith(`
`),t=Se("paragraph",e);if(t.length===0)return e;for(let i of t){let r=i.start.offset;for(r>0&&r--;r>=0&&e.charAt(r)!=`
`;)r--;r++;let s=e.substring(r,i.end.offset).split(`
`),o=s[0].trimStart();if(o.startsWith(">")||o.match(nl)||o.match(il))continue;let a=s.length,l=[],c=!1;for(let f=0;f<a;f++){let h=s[f];if(c){let g=l.length-1;l[g]+=`
`+h}else l.push(h);c=h.endsWith("<br>")||h.endsWith("<br/>")||h.endsWith(" ")||!h.endsWith("\\\\")&&h.endsWith("\\")}for(;r>0&&e.charAt(r-1)==`
`;)r--;let u=e.length,d=i.end.offset;for(d<u&&d++;d<u&&e.charAt(d)==`
`;)d++;let p=`
`;r==0&&(p="");let m=`
`;d==u&&(m=""),e=me(e,r,d,p+l.join(`
`)+m)}return n&&!e.endsWith(`
`)&&(e+=`
`),e}function kf(e){let n=Se("link",e);for(let t of n){if(t==null)continue;let i=e.substring(t.start.offset,t.end.offset);if(!i.match(Os))continue;let r=i.indexOf("]"),s=i.substring(0,1)+i.substring(1,r).trim()+i.substring(r);e=me(e,t.start.offset,t.end.offset,s)}return e}function vf(e,n){let t=Se("emphasis",e);for(let i of t){let r=e.substring(i.start.offset+1,i.end.offset-1);r=n(r),e=me(e,i.start.offset+1,i.end.offset-1,r)}return e}function wf(e,n){let t=Se("strong",e);for(let i of t){let r=e.substring(i.start.offset+2,i.end.offset-2);r=n(r),e=me(e,i.start.offset+2,i.end.offset-2,r)}return e}function Vn(e,n,t=!1){let i=pv(e,t);for(let r of i){let s=r.position.start.offset;if(r.isEmpty){for(;s<r.position.end.offset&&e.charAt(s).trim()!=="";)s++;s++}else{for(;s>0&&e.charAt(s-1).trim()==="";)s--;(s===0||e.charAt(s-1).trim()!="")&&s++}let o=e.substring(s,r.position.end.offset);Nf.test(o)&&(s+=4,o=o.substring(4)),o=n(o),e=me(e,s,r.position.end.offset,o)}return e}function Af(e){let n=Se("code",e);for(let t of n){let i=e.substring(t.start.offset,t.end.offset);!i.startsWith("```")&&!i.startsWith("~~~")||(e=zn(e,t.start.offset,t.end.offset))}return e}function Sf(e,n){let t=Se("math",e);for(let i of t)e=zn(e,i.start.offset,i.end.offset);t=Se("inlineMath",e);for(let i of t)e.substring(i.start.offset,i.end.offset).startsWith("$".repeat(n))&&(e=zn(e,i.start.offset,i.end.offset));return e}function Lf(e){let n=Se("blockquote",e);for(let t of n){let i=t.end.offset;for(;i<e.length-1&&e.charAt(i)!==`
`;)i++;e=zn(e,t.start.offset,i,!0)}return e}function Ef(e){let n=Se("thematicBreak",e);for(let t of n)e=zn(e,t.start.offset,t.end.offset);return e}function xf(e,n,t,i){let r=Se("list",e);if(!r)return e;for(let s of r){let o=s.start.offset;for(;o>0&&e.charAt(o-1)!==`
`;)o--;let a=e.substring(o,s.end.offset),l=function(p){let m=p.lastIndexOf("> ");return m!==-1&&(p=p.substring(m+2)),p=p.replaceAll(" "," "),Math.floor((p.split(" ").length-1)/2)+1},c=new Map,u=function(p,m){let f=m;for(;f>p;)c.delete(f--)},d=-1;a=a.replace(/^(( |\t|> )*)((\d+(\.|\)))|[-*+])([^\n]*)$/gm,(p,m="",f,h,g,b,k)=>{let A=n==="preserve"||i?Number(g):1,x=l(m);if(!/^\d/.test(h)){let O=x>d?x:d;return u(x,O),p}return c.has(x)?n==="ascending"?(A=c.get(x)+1,c.set(x,A)):i&&(A=c.get(x)):c.set(x,A),d>x&&u(x,d),d=x,`${m}${A}${t}${k}`}),e=me(e,o,s.end.offset,a)}return e}function Tf(e,n){let t=Se("listItem",e);if(!t)return e;let i=/^((\d+[.)])|(- \[[ x]\]))/m,r=n;if(n=="consistent"){let s=t.length-1;for(;s>=0;){let o=e.substring(t[s].start.offset,t[s].end.offset);if(s--,!o.match(i)){r=o.charAt(0);break}}if(s==-1)return e}for(let s of t){let o=e.substring(s.start.offset,s.end.offset);o.match(i)||(o=r+o.substring(1),e=me(e,s.start.offset,s.end.offset,o))}return e}function id(e,n){let t=Se("blockquote",e);for(let i of t){let r=i.end.offset;for(;r<e.length-1&&e.charAt(r)!==`
`;)r++;let s=e.substring(i.start.offset,r);s=n(s),e=me(e,i.start.offset,r,s)}return e}function Of(e,n){let t=Se("math",e),i=new RegExp("^(\\${"+n+",})(\\n*)"),r=new RegExp("(\\n*)(\\${"+n+",})([^\\$]*)$");for(let s of t){let o=e.substring(s.start.offset,s.end.offset),a=hv(o,n,s.start.offset);for(let l of a)e=pf(e,l.startIndex,l.endIndex,i,r)}t=Se("inlineMath",e);for(let s of t)e.substring(s.start.offset,s.end.offset).startsWith("$".repeat(n))&&(e=pf(e,s.start.offset,s.end.offset,i,r));return e}function hv(e,n,t){let i="$".repeat(n),r=n;for(;e.charAt(r)==="$";)i+="$",r++;let s=[],o=Hn(e,i);if(o<=1)return[];if(o===2)return s.unshift({startIndex:t,endIndex:t+e.length}),s;o===3&&s.unshift({startIndex:t,endIndex:t+e.indexOf(i,i.length)+i.length}),o%2===1&&o--;let a=t,l=i.length;for(;o>2;){let c=e.indexOf(i,l)+i.length;s.unshift({startIndex:a,endIndex:t+c}),a=t+c+1,l=c+1,o-=2}return s.unshift({startIndex:t+e.indexOf(i,l),endIndex:t+e.length}),s}function pf(e,n,t,i,r){let s=e.substring(yr(e,n),n)??"",[o]=gr(s,s.length),a=e.substring(yr(e,t),t)??"",l=e.substring(n,t),c=If.test(s.trim()),u=!1;for(l=l.replace(i,(d,p,m="")=>{let f="";return!c&&s.trim()!=""?(f+=`
`,u=!0):c&&!td.test(s)&&(f+=`
`+o,u=!0),f+=p+`
`,m===""&&c&&(f+=o),f}),l=l.replace(r,(d,p="",m,f)=>{let h=p==="";return h&&c&&td.test(a.trim())?d:h&&c?`
`+o+m+f:`
`+m+f});u&&n>0;){let d=e[n-1];if(d!==" "&&d!==" ")break;n--}return me(e,n,t,l)}function kr(e){let n=[...e.matchAll(Bf)],t=[];for(let i of n){let r=yr(e,i.index);if(r===0)continue;let s=yr(e,r-1),o=i[0],a=e.substring(r,i.index+o.length);if(gv(a,o))continue;let l=s,c=e.substring(s,r-1);if(!o.includes("|")&&!c.includes("|"))continue;c=c.replace(nd,f=>{let h=f.trim();return h===""||h==="|"||(l+=f.length-1),""});let u=o.replace(nd,"");if(c.endsWith("|")&&(c=c.slice(0,-1)),u.endsWith("|")&&(u=u.slice(0,-1)),mf(c)!==mf(u))continue;if(s!==0){let f=yr(e,s-1),h=e.substring(f,s-1);if(h.startsWith("|")||h.endsWith("|"))continue}let d=i.index+i[0].length;if(d>=e.length-1){t.push({startIndex:l,endIndex:e.length});continue}let p=e.substring(d+1).split(`
`),m=0;for(;m<p.length&&Ff.test(p[m]);)d+=p[m].length+1,m++;t.push({startIndex:l,endIndex:d})}return t.reverse()}function gv(e,n){if(e.trim()===""||n.includes("||"))return!0;let t=e.replace(n,"");return/[^\s>]/.test(t)}function mf(e){let n=!1,t=0,i=0,r="";for(let s=0;s<e.length;s++)r=e[s],r==="\\"?(t++,n=t%2==1):(t=0,r==="|"&&!n&&i++,n=!1);return i}function Cf(e){let n=0,t=[],i=[...e.matchAll(Rf)];if(!i||i.length===0)return t;let r=[...e.matchAll(Df)];return i.forEach(s=>{n=s.index;let o=!1,a=e.length-1;for(;r&&r.length!==0&&!o;)if(r[0].index<=n)r.shift();else{o=!0;let l=r[0];a=l.index+l[0].length}t.push({startIndex:n,endIndex:a}),!r||r.length}),t.reverse()}function Mf(e,n){let t=Se("code",e);for(let i of t){let r=e.substring(i.start.offset,i.end.offset);!r.startsWith("```")||r.substring(3,r.indexOf(`
`)).trim()!==""||(e=me(e,i.start.offset+3,i.start.offset+3,n))}return e}var Wn=/^([ \t]*)(#+)([ \t]+)([^\n\r]*?)([ \t]+#+)?$/gm,_f=`^XXX\\.*?
(?:((?:.|
)*?)
)?XXX(?=\\s|$)$`,je=/^---\n((?:(((?!---)(?:.|\n)*?)\n)?))---(?=\n|$)/,yv=_f.replaceAll("X","`"),bv=_f.replaceAll("X","~"),kv=`^(( |( {4})).*
)+`,sI=new RegExp(`${yv}|${bv}|${kv}`,"gm"),rl=/(!?)\[{2}([^\][\n|]+)(\|([^\][\n|]+))?(\|([^\][\n|]+))?\]{2}/g,Os=/(!?)\[([^[]*)\](\(.*\))/g,Cs=/(\s|^)(#[\p{L}\-_\d/\p{Emoji_Presentation}]+)/gu,Kf=/^%%\n[^%]*\n%%/gm,Ms=/[,\s]+/,sl=/(\. ?){2}\./g,Is="\\s*(>\\s*)*",td=/^(>( |\t)*)+\$*?$/m,If=/^\s*(>\s*)+/m,Bf=/(\|? *:?-{1,}:? *\|?)(\| *:?-{1,}:? *\|?)*( |\t)*$/gm,nd=/^(((>[ ]?)*)|([ ]{0,3}))\|/m,Ff=/[^\n]*?\|[^\n]*?(\n|$)/m,Yf=/(([a-z\-0-9]+:)\/{2,3})([^\s/?#]*[^\s")'.?!/]|[/])?(([/?#][^\s")']*[^\s")'.?!])|[/])?/gi,Li=/(?:(?:(?:[a-z]+:)?\/\/)|www\.)(?:localhost|(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?|(?:(?:[a-z0-9][-_]*)*[a-z0-9]+)(?:\.(?:[a-z0-9]-*)*[a-z0-9]+)*(?:\.(?:[a-z]{2,})))(?::\d{2,5})?(?:(?:[/?#][a-z0-9-_%/&=?$.+~!*‘(,#@]*[a-z0-9-%_/$+~!*‘(,])|[/])?/gi,oI=new RegExp("^"+Li.source+"$","si"),Pf=/<a[\s]+([^>]+)>((?:.(?!<\/a>))*.)<\/a>/g,zf=/[\p{L}\p{N}\p{Pc}\p{M}\-'’`]+/gu,Hf=/&[^\s]+;$/mi,Rf=Qf(!0),Df=Qf(!1),qf=/[“”„«»]/g,$f=/[‘’‚‹›]/g,Uf=/<%[^]*?%>/g,Ei="\\[.\\]",Nf=new RegExp(`^${Ei}`),jf=new RegExp(`^${Is}- ${Ei} `),ol=new RegExp(`^\\s*- ${Ei} `),nl=new RegExp(`^\\s*(-|\\*|\\+|\\d+[.)]|- (${Ei}))`,"m"),il=/^(\[\^[^\]]*\]) ?([,.;!:?])/gm,Pa=/^(>\s*)+\[![^\s]*\]/m,ms=/^\n?(>\s*)+((```)|(~~~))/m,rd=RegExp(/\p{L}/,"u");function at(e){return e.replace(/\$/g,"$$$$")}function sn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vf(e){let n=e.match(rl);if(n){for(let t of n)if(t.includes("|")){let i=t.indexOf("|"),r=t.substring(0,i+1)+t.substring(i+1,t.length-2).trim()+"]]";e=e.replace(t,r)}}return e}function Wf(e){let n=kr(e);if(n.length===0)return e;for(let t of n)e=zn(e,t.startIndex,t.endIndex);return e}function al(e){let n=e.match(/^#\s+(.*)/m);if(n&&n[1]){let t=n[1];return t=t.replaceAll(rl,(i,r,s,o)=>o!=null?o.replace("|",""):s),t.replaceAll(Os,"$2")}return""}function Gf(e){return[...e.matchAll(Cs)].map(n=>n[2])}function Qf(e){let n="(?:<!-{2,}|%%) *linter-{ENDING_TEXT} *(?:-{2,}>|%%)",t="";return e?t+="disable":t+="enable",new RegExp(n.replace("{ENDING_TEXT}",t),"g")}var ll=Symbol.for("yaml.alias"),cl=Symbol.for("yaml.document"),_t=Symbol.for("yaml.map"),sd=Symbol.for("yaml.pair"),kt=Symbol.for("yaml.scalar"),Ln=Symbol.for("yaml.seq"),lt=Symbol.for("yaml.node.type"),Kt=e=>!!e&&typeof e=="object"&&e[lt]===ll,Yt=e=>!!e&&typeof e=="object"&&e[lt]===cl,Pt=e=>!!e&&typeof e=="object"&&e[lt]===_t,ee=e=>!!e&&typeof e=="object"&&e[lt]===sd,Q=e=>!!e&&typeof e=="object"&&e[lt]===kt,zt=e=>!!e&&typeof e=="object"&&e[lt]===Ln;function se(e){if(e&&typeof e=="object")switch(e[lt]){case _t:case Ln:return!0}return!1}function te(e){if(e&&typeof e=="object")switch(e[lt]){case ll:case _t:case kt:case Ln:return!0}return!1}var Zf=e=>(Q(e)||se(e))&&!!e.anchor;var mt=Symbol("break visit"),Jf=Symbol("skip children"),on=Symbol("remove node");function Ht(e,n){let t=Xf(n);Yt(e)?Sr(null,e.contents,t,Object.freeze([e]))===on&&(e.contents=null):Sr(null,e,t,Object.freeze([]))}Ht.BREAK=mt;Ht.SKIP=Jf;Ht.REMOVE=on;function Sr(e,n,t,i){let r=eh(e,n,t,i);if(te(r)||ee(r))return th(e,i,r),Sr(e,r,t,i);if(typeof r!="symbol"){if(se(n)){i=Object.freeze(i.concat(n));for(let s=0;s<n.items.length;++s){let o=Sr(s,n.items[s],t,i);if(typeof o=="number")s=o-1;else{if(o===mt)return mt;o===on&&(n.items.splice(s,1),s-=1)}}}else if(ee(n)){i=Object.freeze(i.concat(n));let s=Sr("key",n.key,t,i);if(s===mt)return mt;s===on&&(n.key=null);let o=Sr("value",n.value,t,i);if(o===mt)return mt;o===on&&(n.value=null)}}return r}async function ul(e,n){let t=Xf(n);Yt(e)?await Lr(null,e.contents,t,Object.freeze([e]))===on&&(e.contents=null):await Lr(null,e,t,Object.freeze([]))}ul.BREAK=mt;ul.SKIP=Jf;ul.REMOVE=on;async function Lr(e,n,t,i){let r=await eh(e,n,t,i);if(te(r)||ee(r))return th(e,i,r),Lr(e,r,t,i);if(typeof r!="symbol"){if(se(n)){i=Object.freeze(i.concat(n));forLine truncated
`)}};an.defaultYaml={explicit:!1,version:"1.2"};an.defaultTags={"!!":"tag:yaml.org,2002:"};function dl(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(t)}return!0}function od(e){let n=new Set;return Ht(e,{Value(t,i){i.anchor&&n.add(i.anchor)}}),n}function ad(e,n){for(let t=1;;++t){let i=`${e}${t}`;if(!n.has(i))return i}}function nh(e,n){let t=[],i=new Map,r=null;return{onAnchor:s=>{t.push(s),r||(r=od(e));let o=ad(n,r);return r.add(o),o},setAnchors:()=>{for(let s of t){let o=i.get(s);if(typeof o=="object"&&o.anchor&&(Q(o.node)||se(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:i}}function Gn(e,n,t,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r){let o=i[r],a=Gn(e,i,String(r),o);a===void 0?delete i[r]:a!==o&&(i[r]=a)}else if(i instanceof Map)for(let r of Array.from(i.keys())){let s=i.get(r),o=Gn(e,i,r,s);o===void 0?i.delete(r):o!==s&&i.set(r,o)}else if(i instanceof Set)for(let r of Array.from(i)){let s=Gn(e,i,r,r);s===void 0?i.delete(r):s!==r&&(i.delete(r),i.add(s))}else for(let[r,s]of Object.entries(i)){let o=Gn(e,i,r,s);o===void 0?delete i[r]:o!==s&&(i[r]=o)}return e.call(n,t,i)}function Re(e,n,t){if(Array.isArray(e))return e.map((i,r)=>Re(i,String(r),t));if(e&&typeof e.toJSON=="function"){if(!t||!Zf(e))return e.toJSON(n,t);let i={aliasCount:0,count:1,res:void 0};t.anchors.set(e,i),t.onCreate=s=>{i.res=s,delete t.onCreate};let r=e.toJSON(n,t);return t.onCreate&&t.onCreate(r),r}return typeof e=="bigint"&&!t?.keep?Number(e):e}var Qn=class{constructor(n){Object.defineProperty(this,lt,{value:n})}clone(){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:t,maxAliasCount:i,onAnchor:r,reviver:s}={}){if(!Yt(n))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:n,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=Re(this,"",o);if(typeof r=="function")for(let{count:l,res:c}of o.anchors.values())r(c,l);return typeof s=="function"?Gn(s,{"":a},"",a):a}};var En=class extends Qn{constructor(n){super(ll),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n){let t;return Ht(n,{Node:(i,r)=>{if(r===this)return Ht.BREAK;r.anchor===this.source&&(t=r)}}),t}toJSON(n,t){if(!t)return{source:this.source};let{anchors:i,doc:r,maxAliasCount:s}=t,o=this.resolve(r);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=i.get(o);if(a||(Re(o,null,t),a=i.get(o)),!a||a.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=pl(r,o,i)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(n,t,i){let r=`*${this.source}`;if(n){if(dl(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(n.implicitKey)return`${r} `}return r}};function pl(e,n,t){if(Kt(n)){let i=n.resolve(e),r=t&&i&&t.get(i);return r?r.count*r.aliasCount:0}else if(se(n)){let i=0;for(let r of n.items){let s=pl(e,r,t);s>i&&(i=s)}return i}else if(ee(n)){let i=pl(e,n.key,t),r=pl(e,n.value,t);return Math.max(i,r)}return 1}var ml=e=>!e||typeof e!="function"&&typeof e!="object",P=class extends Qn{constructor(n){super(kt),this.value=n}toJSON(n,t){return t?.keep?this.value:Re(this.value,n,t)}toString(){return String(this.value)}};P.BLOCK_FOLDED="BLOCK_FOLDED";P.BLOCK_LITERAL="BLOCK_LITERAL";P.PLAIN="PLAIN";P.QUOTE_DOUBLE="QUOTE_DOUBLE";P.QUOTE_SINGLE="QUOTE_SINGLE";var Av="tag:yaml.org,2002:";function Sv(e,n,t){if(n){let i=t.filter(s=>s.tag===n),r=i.find(s=>!s.format)??i[0];if(!r)throw new Error(`Tag ${n} not found`);return r}return t.find(i=>i.identify?.(e)&&!i.format)}function xn(e,n,t){if(Yt(e)&&(e=e.contents),te(e))return e;if(ee(e)){let d=t.schema[_t].createNode?.(t.schema,null,t);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:r,onTagObj:s,schema:o,sourceObjects:a}=t,l;if(i&&e&&typeof e=="object"){if(l=a.get(e),l)return l.anchor||(l.anchor=r(e)),new En(l.anchor);l={anchor:null,node:null},a.set(e,l)}n?.startsWith("!!")&&(n=Av+n.slice(2));let c=Sv(e,n,o.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new P(e);return l&&(l.node=d),d}c=e instanceof Map?o[_t]:Symbol.iterator in Object(e)?o[Ln]:o[_t]}s&&(s(c),delete t.onTagObj);let u=c?.createNode?c.createNode(t.schema,e,t):typeof c?.nodeCla Line truncated
`)?Tt(t,n):t.includes(`
`)?`
`+Tt(t,n):(e.endsWith(" ")?"":" ")+t;var ld="flow",fl="block",Fs="quoted";function Rs(e,n,t="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return e;r<s&&(s=0);let l=Math.max(1+s,1+r-n.length);if(e.length<=l)return e;let c=[],u={},d=r-n.length;typeof i=="number"&&(i>r-Math.max(2,s)?c.push(0):d=r-i);let p,m,f=!1,h=-1,g=-1,b=-1;t===fl&&(h=rh(e,h,n.length),h!==-1&&(d=h+l));for(let A;A=e[h+=1];){if(t===Fs&&A==="\\"){switch(g=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}b=h}if(A===`
`)t===fl&&(h=rh(e,h,n.length)),d=h+n.length+l,p=void 0;else{if(A===" "&&m&&m!==" "&&m!==`
`&&m!==" "){let x=e[h+1];x&&x!==" "&&x!==`
`&&x!==" "&&(p=h)}if(h>=d)if(p)c.push(p),d=p+l,p=void 0;else if(t===Fs){for(;m===" "||m===" ";)m=A,A=e[h+=1],f=!0;let x=h>b+1?h-2:g-1;if(u[x])return e;c.push(x),u[x]=!0,d=x+l,p=void 0}else f=!0}m=A}if(f&&a&&a(),c.length===0)return e;o&&o();let k=e.slice(0,c[0]);for(let A=0;A<c.length;++A){let x=c[A],O=c[A+1]||e.length;x===0?k=`
${n}${e.slice(0,O)}`:(t===Fs&&u[x]&&(k+=`${e[x]}\\`),k+=`
${n}${e.slice(x+1,O)}`)}return k}function rh(e,n,t){let i=n,r=n+1,s=e[r];for(;s===" "||s===" ";)if(n<r+t)s=e[++n];else{do s=e[++n];while(s&&s!==`
`);i=n,r=n+1,s=e[r]}return i}var gl=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),yl=e=>/^(%|---|\.\.\.)/m.test(e);function Lv(e,n,t){if(!n||n<0)return!1;let i=n-t,r=e.length;if(r<=i)return!1;for(let s=0,o=0;s<r;++s)if(e[s]===`
`){if(s-o>i)return!0;if(o=s+1,r-o<=i)return!1}return!0}function Ds(e,n){let t=JSON.stringify(e);if(n.options.doubleQuotedAsJSON)return t;let{implicitKey:i}=n,r=n.options.doubleQuotedMinMultiLineLength,s=n.indent||(yl(e)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(i||t[l+2]==='"'||t.length<r)l+=1;else{for(o+=t.slice(a,l)+`
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
`,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,i?o:Rs(o,s,Fs,gl(n,!1))}function cd(e,n){if(n.options.singleQuote===!1||n.implicitKey&&e.includes(`
`)||/[ \t]\n|\n[ \t]/.test(e))return Ds(e,n);let t=n.indent||(yl(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
${t}`)+"'";return n.implicitKey?i:Rs(i,t,ld,gl(n,!1))}function Tr(e,n){let{singleQuote:t}=n.options,i;if(t===!1)i=Ds;else{let r=e.includes('"'),s=e.includes("'");r&&!s?i=cd:s&&!r?i=Ds:i=t?cd:Ds}return i(e,n)}var ud;try{ud=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{ud=/\n+(?!\n|$)/g}function hl({comment:e,type:n,value:t},i,r,s){let{blockQuote:o,commentString:a,lineWidth:l}=i.options;if(!o||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return Tr(t,i);let c=i.indent||(i.forceBlockIndent||yl(t)?" ":""),u=o==="literal"?!0:o==="folded"||n===P.BLOCK_FOLDED?!1:n===P.BLOCK_LITERAL?!0:!Lv(t,l,c.length);if(!t)return u?`|
`:`>
`;let d,p;for(p=t.length;p>0;--p){let O=t[p-1];if(O!==`
`&&O!==" "&&O!==" ")break}let m=t.substring(p),f=m.indexOf(`
`);f===-1?d="-":t===m||f!==m.length-1?(d="+",s&&s()):d="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
`&&(m=m.slice(0,-1)),m=m.replace(ud,`$&${c}`));let h=!1,g,b=-1;for(g=0;g<t.length;++g){let O=t[g];if(O===" ")h=!0;else if(O===`
`)b=g;else break}let k=t.substring(0,b<g?b+1:g);k&&(t=t.substring(k.length),k=k.replace(/\n+/g,`$&${c}`));let x=(h?c?"2":"1":"")+d;if(e&&(x+=" "+a(e.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let O=t.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),L=!1,C=gl(i,!0);o!=="folded"&&n!==P.BLOCK_FOLDED&&(C.onOverflow=()=>{L=!0});let M=Rs(`${k}${O}${m}`,c,fl,C);if(!L)return`>${x}
${c}${M}`}return t=t.replace(/\n+/g,`$&${c}`),`|${x}
${c}${k}${t}${m}`}function Ev(e,n,t,i){let{type:r,value:s}=e,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=n;if(a&&s.includes(`
`)||u&&/[[\]{},]/.test(s))return Tr(s,n);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
`)?Tr(s,n):hl(e,n,t,i);if(!a&&!u&&r!==P.PLAIN&&s.includes(`
`))return hl(e,n,t,i);if(yl(s)){if(l==="")return n.forceBlockIndent=!0,hl(e,n,t,i);if(a&&l===c)return Tr(s,n)}let d=s.replace(/\n+/g,`$&
${l}`);if(o){let p=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(d),{compat:m,tags:f}=n.doc.schema;if(f.some(p)||m?.some(p))return Tr(s,n)}return a?d:Rs(d,l,ld,gl(n,!1))}function Tn(e,n,t,i){let{implicitKey:r,inFlow:s}=n,o=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;a!==P.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=P.QUOTE_DOUBLE);let l=u=>{switch(u){case P.BLOCK_FOLDED:case P.BLOCK_LITERAL:return r||s?Tr(o.value,n):hl(o,n,t,i);case P.QUOTE_DOUBLE:return Ds(o.value,n);case P.QUOTE_SINGLE:return cd(o.value,n);case P.PLAIN:return Ev(o,n,t,i);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:d}=n.options,p=r&&u||d;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}function bl(e,n){let t=Object.assign({blockQuote:!0,commentString:ih,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,n),i;switch(t.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:i,options:t}}function xv(e,n){if(n.tag){let r=e.filter(s=>s.tag===n.tag);if(r.length>0)return r.find(s=>s.format===n.format)??r[0]}let t,i;if(Q(n)){i=n.value;let r=e.filter(s=>s.identify?.(i));if(r.length>1){let s=r.filter(o=>o.test);s.length>0&&(r=s)}t=r.find(s=>s.format===n.format)??r.find(s=>!s.format)}else i=n,t=e.find(r=>r.nodeClass&&i instanceof r.nodeClass);if(!t){let r=i?.constructor?.name??typeof i;throw new Error(`Tag not resolved for ${r} value`)}return t}function Tv(e,n,{anchors:t,doc:i}){if(!i.directives)return"";let r=[],s=(Q(e)||se(e))&&e.anchor;s&&dl(s)&&(t.add(s),r.push(`&${s}`));let o=e.tag?e.tag:n.default?null:n.tag;return o&&r.push(i.directives.tagString(o)),r.join(" ")}function On(e,n,t,i){if(ee(e))return e.toString(n,t,i);if(Kt(e)){if(n.doc.directives)return e.toString(n);if(n.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(e):n.resolvedAliases=new Set([e]),e=e.resolve(n.doc)}let r,s=te(e)?e:n.doc.createNode(e,{onTagObj:l=>r=l});r||(r=xv(n.doc.schema.tags,s));let o=Tv(s,r,n);o.length>0&&(n.indentAtStart=(n.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(s,n,t,i):Q(s)?Tn(s,n,t,i):s.toString(n,t,i);return o?Q(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
${n.indent}${a}`:a}function sh({key:e,value:n},t,i,r){let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=t,p=te(e)&&e.comment||null;if(d){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(se(e)||!te(e)&&typeof e=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let m=!d&&(!e||p&&n==null&&!t.inFlow||se(e)||(Q(e)?e.type===P.BLOCK_FOLDED||e.type===P.BLOCK_LITERAL:typeof e=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(d||!s),indent:a+l});let f=!1,h=!1,g=On(e,t,()=>f=!0,()=>h=!0);if(!m&&!t.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(s||n==null)return f&&i&&i(),g===""?"?":m?`? ${g}`:g}else if(s&&!d||n==null&&m)return g=`? ${g}`,p&&!f?g+=ln(g,t.indent,c(p)):h&&r&&r(),g;f&&(p=null),m?(p&&(g+=ln(g,t.indent,c(p))),g=`? ${g}
${a}:`):(g=`${g}:`,p&&(g+=ln(g,t.indent,c(p))));let b,k,A;te(n)?(b=!!n.spaceBefore,k=n.commentBefore,A=n.comment):(b=!1,k=null,A=null,n&&typeof n=="object"&&(n=o.createNode(n))),t.implicitKey=!1,!m&&!p&&Q(n)&&(t.indentAtStart=g.length+1),h=!1,!u&&l.length>=2&&!t.inFlow&&!m&&zt(n)&&!n.flow&&!n.tag&&!n.anchor&&(t.indent=t.indent.substring(2));let x=!1,O=On(n,t,()=>x=!0,()=>h=!0),L=" ";if(p||b||k){if(L=b?`
`:"",k){let C=c(k);L+=`
${Tt(C,t.indent)}`}O===""&&!t.inFlow?L===`
`&&(L=`
`):L+=`
${t.indent}`}else if(!m&&se(n)){let C=O[0],M=O.indexOf(`
`),B=M!==-1,N=t.inFlow??n.flow??n.items.length===0;if(B||!N){let q=!1;if(B&&(C==="&"||C==="!")){let Y=O.indexOf(" ");C==="&"&&Y!==-1&&Y<M&&O[Y+1]==="!"&&(Y=O.indexOf(" ",Y+1)),(Y===-1||M<Y)&&(q=!0)}q||(L=`
${t.indent}`)}}else(O===""||O[0]===`
`)&&(L="");return g+=L+O,t.inFlow?x&&i&&i():A&&!x?g+=ln(g,t.indent,c(A)):h&&r&&r(),g}function kl(e,n){(e==="debug"||e==="warn")&&console.warn(n)}var vl="<<",qt={identify:e=>e===vl||typeof e=="symbol"&&e.description===vl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new P(Symbol(vl)),{addToJSMap:pd}),stringify:()=>vl},oh=(e,n)=>(qt.identify(n)||Q(n)&&(!n.type||n.type===P.PLAIN)&&qt.identify(n.value))&&e?.doc.schema.tags.some(t=>t.tag===qt.tag&&t.default);function pd(e,n,t){if(t=e&&Kt(t)?t.resolve(e.doc):t,zt(t))for(let i of t.items)dd(e,n,i);else if(Array.isArray(t))for(let i of t)dd(e,n,i);else dd(e,n,t)}function dd(e,n,t){let i=e&&Kt(t)?t.resolve(e.doc):t;if(!Pt(i))throw new Error("Merge sources must be maps or map aliases");let r=i.toJSON(null,e,Map);for(let[s,o]of r)n instanceof Map?n.has(s)||n.set(s,o):n instanceof Set?n.add(s):Object.prototype.hasOwnProperty.call(n,s)||Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return n}function wl(e,n,{key:t,value:i}){if(te(t)&&t.addToJSMap)t.addToJSMap(e,n,i);else if(oh(e,t))pd(e,n,i);else{let r=Re(t,"",e);if(n instanceof Map)n.set(r,Re(i,r,e));else if(n instanceof Set)n.add(r);else{let s=Ov(t,r,e),o=Re(i,s,e);s in n?Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[s]=o}}return n}function Ov(e,n,t){if(n===null)return"";if(typeof n!="object")return String(n);if(te(e)&&t?.doc){let i=bl(t.doc,{});i.anchors=new Set;for(let s of t.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;let r=e.toString(i);if(!t.mapKeyWarned){let s=JSON.stringify(r);s.length>40&&(s=s.substring(0,36)+'..."'),kl(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return r}return JSON.stringify(n)}function Or(e,n,t){let i=xn(e,void 0,t),r=xn(n,void 0,t);return new Le(i,r)}var Le=class e{constructor(n,t=null){Object.defineProperty(this,lt,{value:sd}),this.key=n,this.value=t}clone(n){let{key:t,value:i}=this;return te(t)&&(t=t.clone(n)),te(i)&&(i=i.clone(n)),new e(t,i)}toJSON(n,t){let i=t?.mapAsMap?new Map:{};return wl(t,i,this)}toString(n,t,i){return n?.doc?sh(this,n,t,i):JSON.stringify(this)}};function Sl(e,n,t){return(n.inFlow??e.flow?Mv:Cv)(e,n,t)}function Cv({comment:e,items:n},t,{blockItemPrefix:i,flowChars:r,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null}),d=!1,p=[];for(let f=0;f<n.length;++f){let h=n[f],g=null;if(te(h))!d&&h.spaceBefore&&p.push(""),Al(t,p,h.commentBefore,d),h.comment&&(g=h.comment);else if(ee(h)){let k=te(h.key)?h.key:null;k&&(!d&&k.spaceBefore&&p.push(""),Al(t,p,k.commentBefore,d))}d=!1;let b=On(h,u,()=>g=null,()=>d=!0);g&&(b+=ln(b,s,c(g))),d&&g&&(d=!1),p.push(i+b)}let m;if(p.length===0)m=r.start+r.end;else{m=p[0];for(let f=1;f<p.length;++f){let h=p[f];m+=h?`
${l}${h}`:`
`}}return e?(m+=`
`+Tt(c(e),l),a&&a()):d&&o&&o(),m}function Mv({items:e},n,{flowChars:t,itemIndent:i}){let{indent:r,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=n;i+=s;let l=Object.assign({},n,{indent:i,inFlow:!0,type:null}),c=!1,u=0,d=[];for(let f=0;f<e.length;++f){let h=e[f],g=null;if(te(h))h.spaceBefore&&d.push(""),Al(n,d,h.commentBefore,!1),h.comment&&(g=h.comment);else if(ee(h)){let k=te(h.key)?h.key:null;k&&(k.spaceBefore&&d.push(""),Al(n,d,k.commentBefore,!1),k.comment&&(c=!0));let A=te(h.value)?h.value:null;A?(A.comment&&(g=A.comment),A.commentBefore&&(c=!0)):h.value==null&&k?.comment&&(g=k.comment)}g&&(c=!0);let b=On(h,l,()=>g=null);f<e.length-1&&(b+=","),g&&(b+=ln(b,i,a(g))),!c&&(d.length>u||b.includes(`
`))&&(c=!0),d.push(b),u=d.length}let{start:p,end:m}=t;if(d.length===0)return p+m;if(!c){let f=d.reduce((h,g)=>h+g.length+2,2);c=n.options.lineWidth>0&&f>n.options.lineWidth}if(c){let f=p;for(let h of d)f+=h?`
${s}${r}${h}`:`
`;return`${f}
${r}${m}`}else return`${p}${o}${d.join(" ")}${o}${m}`}function Al({indent:e,options:{commentString:n}},t,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){let s=Tt(n(i),e);t.push(s.trimStart())}}function Zn(e,n){let t=Q(n)?n.value:n;for(let i of e)if(ee(i)&&(i.key===n||i.key===t||Q(i.key)&&i.key.value===t))return i}var be=class extends Er{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(_t,n),this.items=[]}static from(n,t,i){let{keepUndefined:r,replacer:s}=i,o=new this(n),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||r)&&o.items.push(Or(l,c,i))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof n.sortMapEntries=="function"&&o.items.sort(n.sortMapEntries),o}add(n,t){let i;ee(n)?i=n:!n||typeof n!="object"||!("key"in n)?i=new Le(n,n?.value):i=new Le(n.key,n.value);let r=Zn(this.items,i.key),s=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${i.key} already set`);Q(r.value)&&ml(i.value)?r.value.value=i.value:r.value=i.value}else if(s){let o=this.items.findIndex(a=>s(i,a)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(n){let t=Zn(this.items,n);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(n,t){let r=Zn(this.items,n)?.value;return(!t&&Q(r)?r.value:r)??void 0}has(n){return!!Zn(this.items,n)}set(n,t){this.add(new Le(n,t),!0)}toJSON(n,t,i){let r=i?new i:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let s of this.items)wl(t,r,s);return r}toString(n,t,i){if(!n)return JSON.stringify(this);for(let r of this.items)if(!ee(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),Sl(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:i,onComment:t})}};var $t={collection:"map",default:!0,nodeClass:be,tag:"tag:yaml.org,2002:map",resolve(e,n){return Pt(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,t)=>be.from(e,n,t)};var et=class extends Er{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ln,n),this.items=[]}add(n){this.items.push(n)}delete(n){let t=Ll(n);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(n,t){let i=Ll(n);if(typeof i!="number")return;let r=this.items[i];return!t&&Q(r)?r.value:r}has(n){let t=Ll(n);return typeof t=="number"&&t<this.items.length}set(n,t){let i=Ll(n);if(typeof i!="number")throw new Error(`Expected a valid index, not ${n}.`);let r=this.items[i];Q(r)&&ml(t)?r.value=t:this.items[i]=t}toJSON(n,t){let i=[];t?.onCreate&&t.onCreate(i);let r=0;for(let s of this.items)i.push(Re(s,String(r++),t));return i}toString(n,t,i){return n?Sl(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(n,t,i){let{replacer:r}=i,s=new this(n);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof r=="function"){let l=t instanceof Set?a:String(o++);a=r.call(t,l,a)}s.items.push(xn(a,void 0,i))}}return s}};function Ll(e){let n=Q(e)?e.value:e;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}var Ut={collection:"seq",default:!0,nodeClass:et,tag:"tag:yaml.org,2002:seq",resolve(e,n){return zt(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,t)=>et.from(e,n,t)};var Jn={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,n,t,i){return n=Object.assign({actualString:!0},n),Tn(e,n,t,i)}};var xi={identify:e=>e==null,createNode:()=>new P(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new P(null),stringify:({source:e},n)=>typeof e=="string"&&xi.test.test(e)?e:n.options.nullStr};var Ns={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new P(e[0]==="t"||e[0]==="T"),stringify({source:e,value:n},t){if(e&&Ns.test.test(e)){let i=e[0]==="t"||e[0]==="T";if(n===i)return e}return n?t.options.trueStr:t.options.falseStr}};function tt({format:e,minFractionDigits:n,tag:t,value:i}){if(typeof i=="bigint")return String(i);let r=typeof i=="number"?i:Number(i);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(i);if(!e&&n&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=n-(s.length-o-1);for(;a-- >0;)s+="0"}return s}var El={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:tt},xl={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0 Line truncated
`:" ")}return Tn({comment:e,type:n,value:a},i,r,s)}};function fd(e,n){if(zt(e))for(let t=0;t<e.items.length;++t){let i=e.items[t];if(!ee(i)){if(Pt(i)){i.items.length>1&&n("Each pair must have its own sequence indicator");let r=i.items[0]||new Le(new P(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
${r.key.commentBefore}`:i.commentBefore),i.comment){let s=r.value??r.key;s.comment=s.comment?`${i.comment}
${s.comment}`:i.comment}i=r}e.items[t]=ee(i)?i:new Le(i)}}else n("Expected a sequence for this tag");return e}function hd(e,n,t){let{replacer:i}=t,r=new et(e);r.tag="tag:yaml.org,2002:pairs";let s=0;if(n&&Symbol.iterator in Object(n))for(let o of n){typeof i=="function"&&(o=i.call(n,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;r.items.push(Or(a,l,t))}return r}var Ks={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:fd,createNode:hd};var Cr=class e extends et{constructor(){super(),this.add=be.prototype.add.bind(this),this.delete=be.prototype.delete.bind(this),this.get=be.prototype.get.bind(this),this.has=be.prototype.has.bind(this),this.set=be.prototype.set.bind(this),this.tag=e.tag}toJSON(n,t){if(!t)return super.toJSON(n);let i=new Map;t?.onCreate&&t.onCreate(i);for(let r of this.items){let s,o;if(ee(r)?(s=Re(r.key,"",t),o=Re(r.value,s,t)):s=Re(r,"",t),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,o)}return i}static from(n,t,i){let r=hd(n,t,i),s=new this;return s.items=r.items,s}};Cr.tag="tag:yaml.org,2002:omap";var Ys={collection:"seq",identify:e=>e instanceof Map,nodeClass:Cr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,n){let t=fd(e,n),i=[];for(let{key:r}of t.items)Q(r)&&(i.includes(r.value)?n(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new Cr,t)},createNode:(e,n,t)=>Cr.from(e,n,t)};function dh({value:e,source:n},t){return n&&(e?gd:yd).test.test(n)?n:e?t.options.trueStr:t.options.falseStr}var gd={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new P(!0),stringify:dh},yd={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new P(!1),stringify:dh};var ph={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:tt},mh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let n=Number(e.value);return isFinite(n)?n.toExponential():tt(e)}},fh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let n=new P(parseFloat(e.replace(/_/g,""))),t=e.indexOf(".");if(t!==-1){let i=e.substring(t+1).replace(/_/g,"");i[i.length-1]==="0"&&(n.minFractionDigits=i.length)}return n},stringify:tt};var Ps=e=>typeof e=="bigint"||Number.isInteger(e);function Fl(e,n,t,{intAsBigInt:i}){let r=e[0];if((r==="-"||r==="+")&&(n+=1),e=e.substring(n).replace(/_/g,""),i){switch(t){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let o=BigInt(e);return r==="-"?BigInt(-1)*o:o}let s=parseInt(e,t);return r==="-"?-1*s:s}function bd(e,n,t){let{value:i}=e;if(Ps(i)){let r=i.toString(n);return i<0?"-"+t+r.substr(1):t+r}return tt(e)}var hh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,n,t)=>Fl(e,2,2,t),stringify:e=>bd(e,2,"0b")},gh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,n,t)=>Fl(e,1,8,t),stringify:e=>bd(e,8,"0")},yh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,n,t)=>Fl(e,0,10,t),stringify:tt},bh={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,n,t)=>Fl(e,2,16,t),stringify:e=>bd(e,16,"0x")};var Mr=class e extends be{constructor(n){super(n),this.tag=e.tag}add(n){let t;ee(n)?t=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?t=new Le(n.key,null):t=new Le(n,null),Zn(this.items,t.key)||this.items.push(t)}get(n,t){let i=Zn(this.items,n);return!t&&ee(i)?Q(i.key)?i.key.value:i.key:i}set(n,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let i=Zn(this.items,n);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new Le(n))}toJSON(n,t){return super.toJSON(n,t,Set)}toString(n,t,i){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(n,t,i){let{replacer:r}=i,s=new this(n);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof r=="function"&&(o=r.call(t,o,o)),s.items.push(Or(o,null,i));return s}};Mr.tag="tag:yaml.org,2002:set";var zs={collection:"map",identify:e=>e instanceof Line truncated
`)?(t.push("..."),t.push(Tt(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=e.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Tt(s(l),"")))}return t.join(`
`)+`
`}var jt=class e{constructor(n,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,lt,{value:cl});let r=null;typeof t=="function"||Array.isArray(t)?r=t:i===void 0&&t&&(i=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:o}=s;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new an({version:o}),this.setSchema(o,i),this.contents=n===void 0?null:this.createNode(n,r,i)}clone(){let n=Object.create(e.prototype,{[lt]:{value:cl}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=te(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){Br(this.contents)&&this.contents.add(n)}addIn(n,t){Br(this.contents)&&this.contents.addIn(n,t)}createAlias(n,t){if(!n.anchor){let i=od(this);n.anchor=!t||i.has(t)?ad(t||"a",i):t}return new En(n.anchor)}createNode(n,t,i){let r;if(typeof t=="function")n=t.call({"":n},"",n),r=t;else if(Array.isArray(t)){let g=k=>typeof k=="number"||k instanceof String||k instanceof Number,b=t.filter(g).map(String);b.length>0&&(t=t.concat(b)),r=t}else i===void 0&&t&&(i=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=i??{},{onAnchor:d,setAnchors:p,sourceObjects:m}=nh(this,o||"a"),f={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:m},h=xn(n,u,f);return a&&se(h)&&(h.flow=!0),p(),h}createPair(n,t,i={}){let r=this.createNode(n,null,i),s=this.createNode(t,null,i);return new Le(r,s)}delete(n){return Br(this.contents)?this.contents.delete(n):!1}deleteIn(n){return xr(n)?this.contents==null?!1:(this.contents=null,!0):Br(this.contents)?this.contents.deleteIn(n):!1}get(n,t){return se(this.contents)?this.contents.get(n,t):void 0}getIn(n,t){return xr(n)?!t&&Q(this.contents)?this.contents.value:this.contents:se(this.contents)?this.contents.getIn(n,t):void 0}has(n){return se(this.contents)?this.contents.has(n):!1}hasIn(n){return xr(n)?this.contents!==void 0:se(this.contents)?this.contents.hasIn(n):!1}set(n,t){this.contents==null?this.contents=Bs(this.schema,[n],t):Br(this.contents)&&this.contents.set(n,t)}setIn(n,t){xr(n)?this.contents=t:this.contents==null?this.contents=Bs(this.schema,Array.from(n),t):Br(this.contents)&&this.contents.setIn(n,t)}setSchema(n,t={}){typeof n=="number"&&(n=String(n));let i;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new an({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new an({version:n}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let r=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(i)this.schema=new Hs(Object.assign(i,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:t,mapAsMap:i,maxAliasCount:r,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!n,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=Re(this.contents,t??"",a);if(typeof s=="function")for(let{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?Gn(o,{"":l},"",l):l}toJSON(n,t){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:t})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){let t=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Sh(this,n)}};function Br(e){if(se(e))return!0;throw new Error("Expected a YAML collection as document contents")}var qs=class extends Error{constructor(n,t,i,r){super(),this.name=n,this.code=i,this.message=r,this.pos=t}},Ot=class extends qs{constructor(n,t,i){super("YAMLParseError",n,t,i)}},$s=class extends qs{constructor(n,t,i){super("YAMLWarning",n,t,i)}},wd=(e,n)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>n.linePos(a));let{line:i,col:r}=t.linePos[0];t.message+=` at line ${i}, column ${r}`;let s=r-1,o=e.substring(n.lineStarts[i-1],n.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="\u2026"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(o.substring(0,s))){let a=e.substring(n.lineStarts[i-2],n.lineStarts[i-1]);a.length>80&&(a=a.substri Line truncated
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l&&l.line===i&&l.col>r&&(a=Math.max(1,Math.min(l.col-r,80-s)));let c=" ".repeat(s)+"^".repeat(a);t.message+=`:
${o}
${c}
`}};function cn(e,{flow:n,indicator:t,next:i,offset:r,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,d="",p="",m=!1,f=!1,h=null,g=null,b=null,k=null,A=null,x=null,O=null;for(let M of e)switch(f&&(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma"&&s(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f=!1),h&&(c&&M.type!=="comment"&&M.type!=="newline"&&s(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),M.type){case"space":!n&&(t!=="doc-start"||i?.type!=="flow-collection")&&M.source.includes(" ")&&(h=M),u=!0;break;case"comment":{u||s(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=M.source.substring(1)||" ";d?d+=p+B:d=B,p="",c=!1;break}case"newline":c?d?d+=M.source:(!x||t!=="seq-item-ind")&&(l=!0):p+=M.source,c=!0,m=!0,(g||b)&&(k=M),u=!0;break;case"anchor":g&&s(M,"MULTIPLE_ANCHORS","A node can have at most one anchor"),M.source.endsWith(":")&&s(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=M,O===null&&(O=M.offset),c=!1,u=!1,f=!0;break;case"tag":{b&&s(M,"MULTIPLE_TAGS","A node can have at most one tag"),b=M,O===null&&(O=M.offset),c=!1,u=!1,f=!0;break}case t:(g||b)&&s(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`),x&&s(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${n??"collection"}`),x=M,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(n){A&&s(M,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),A=M,c=!1,u=!1;break}default:s(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),c=!1,u=!1}let L=e[e.length-1],C=L?L.offset+L.source.length:r;return f&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&s(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:x,spaceBefore:l,comment:d,hasNewline:m,anchor:g,tag:b,newlineAfterProp:k,end:C,start:O??C}}function Xn(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
`))return!0;if(e.end){for(let n of e.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(let n of e.items){for(let t of n.start)if(t.type==="newline")return!0;if(n.sep){for(let t of n.sep)if(t.type==="newline")return!0}if(Xn(n.key)||Xn(n.value))return!0}return!1;default:return!0}}function Us(e,n,t){if(n?.type==="flow-collection"){let i=n.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&Xn(n)&&t(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function _l(e,n,t){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let r=typeof i=="function"?i:(s,o)=>s===o||Q(s)&&Q(o)&&s.value===o.value;return n.some(s=>r(s.key,t))}var Lh="All mapping items must start at the same column";function Eh({composeNode:e,composeEmptyNode:n},t,i,r,s){let o=s?.nodeClass??be,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=i.offset,c=null;for(let u of i.items){let{start:d,key:p,sep:m,value:f}=u,h=cn(d,{indicator:"explicit-key-ind",next:p??m?.[0],offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0}),g=!h.found;if(g){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&r(l,"BAD_INDENT",Lh)),!h.anchor&&!h.tag&&!m){c=h.end,h.comment&&(a.comment?a.comment+=`
`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||Xn(p))&&r(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&r(l,"BAD_INDENT",Lh);t.atKey=!0;let b=h.end,k=p?e(t,p,h,r):n(t,b,d,null,h,r);t.schema.compat&&Us(i.indent,p,r),t.atKey=!1,_l(t,a.items,k)&&r(b,"DUPLICATE_KEY","Map keys must be unique");let A=cn(m??[],{indicator:"map-value-ind",next:f,offset:k.range[2],onError:r,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=A.end,A.found){g&&(f?.type==="block-map"&&!A.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<A.found.offset-1024&&r(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let x=f?e(t,f,A,r):n(t,l,m,null,A,r);t.schema.compat&&Us(i.indent,f,r),l=x.range[2];let O=new Le(k,x);t.options.keepSourceTokens&&(O.srcToken=u),a.items.push(O)}else{g&&r(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(k.comment?k.comment+=`
`+A.comment:k.comment=A.comment);let x=new Le(k);t.options.keepSourceTokens&&(x.srcToken=u),a.items.push(x)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,l,c??l],a}function xh({composeNode:e,composeEmptyNode:n},t,i,r,s){let o=s?.nodeClass??et,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=i.offset,c=null;for(let{start:u,value:d}of i.items){let p=cn(u,{indicator:"seq-item-ind",next:d,offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)d&&d.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let m=d?e(t,d,p,r):n(t,p.end,u,null,p,r);t.schema.compat&&Us(i.indent,d,r),l=m.range[2],a.items.push(m)}return a.range=[i.offset,l,c??l],a}function un(e,n,t,i){let r="";if(e){let s=!1,o="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=o+u:r=u,o="";break}case"newline":r&&(o+=l),s=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}n+=l.length}}return{comment:r,offset:n}}var Ad="Block collections are not allowed within flow collections",Sd=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Th({composeNode:e,composeEmptyNode:n},t,i,r,s){let o=i.start.source==="{",a=o?"flow map":"flow sequence",l=s?.nodeClass??(o?be:et),c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let d=i.offset+i.start.source.length;for(let g=0;g<i.items.length;++g){let b=i.items[g],{start:k,key:A,sep:x,value:O}=b,L=cn(k,{flow:a,indicator:"explicit-key-ind",next:A??x?.[0],offset:d,onError:r,parentIndent:i.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!x&&!O){g===0&&L.comma?r(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<i.items.length-1&&r(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),L.comment&&(c.comment?c.comment+=`
`+L.comment:c.comment=L.comment),d=L.end;continue}!o&&t.options.strict&&Xn(A)&&r(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)L.comma&&r(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(L.comma||r(L.start,"MISSING_CHAR",`Missing , between ${a} items`),L.comment){let C="";e:for(let M of k)switch(M.type){case"comma":case"space":break;case"comment":C=M.source.substring(1);break e;default:break e}if(C){let M=c.items[c.items.length-1];ee(M)&&(M=M.value??M.key),M.comment?M.comment+=`
`+C:M.comment=C,L.comment=L.comment.substring(C.length+1)}}if(!o&&!x&&!L.found){let C=O?e(t,O,L,r):n(t,L.end,x,null,L,r);c.items.push(C),d=C.range[2],Sd(O)&&r(C.range,"BLOCK_IN_FLOW",Ad)}else{t.atKey=!0;let C=L.end,M=A?e(t,A,L,r):n(t,C,k,null,L,r);Sd(A)&&r(M.range,"BLOCK_IN_FLOW",Ad),t.atKey=!1;let B=cn(x??[],{flow:a,indicator:"map-value-ind",next:O,offset:M.range[2],onError:r,parentIndent:i.indent,startOnNewline:!1});if(B.found){if(!o&&!L.found&&t.options.strict){if(x)for(let Y of x){if(Y===B.found)break;if(Y.type==="newline"){r(Y,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}L.start<B.found.offset-1024&&r(B.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else O&&("source"in O&&O.source&&O.source[0]===":"?r(O,"MISSING_CHAR",`Missing space after : in ${a}`):r(B.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let N=O?e(t,O,B,r):B.found?n(t,B.end,x,null,B,r):null;N?Sd(O)&&r(N.range,"BLOCK_IN_FLOW",Ad):B.comment&&(M.comment?M.comment+=`
`+B.comment:M.comment=B.comment);let q=new Le(M,N);if(t.options.keepSourceTokens&&(q.srcToken=b),o){let Y=c;_l(t,Y.items,M)&&r(C,"DUPLICATE_KEY","Map keys must be unique"),Y.items.push(q)}else{let Y=new be(t.schema);Y.flow=!0,Y.items.push(q);let _=(N??M).range;Y.range=[M.range[0],_[1],_[2]],c.items.push(Y)}d=N?N.range[2]:B.end}}let p=o?"}":"]",[m,...f]=i.end,h=d;if(m&&m.source===p)h=m.offset+m.source.length;else{let g=a[0].toUpperCase()+a.substring(1),b=u?`${g} must end with a ${p}`:`${g} in block collection must be sufficiently indented and end with a ${p}`;r(d,u?"MISSING_CHAR":"BAD_INDENT",b),m&&m.source.length!==1&&f.unshift(m)}if(f.length>0){let g=un(f,h,t.options.strict,r);g.comment&&(c.comment?c.comment+=`
`+g.comment:c.comment=g.comment),c.range=[i.offset,h,g.offset]}else c.range=[i.offset,h,h];return c}function Ld(e,n,t,i,r,s){let o=t.type==="block-map"?Eh(e,n,t,i,s):t.type==="block-seq"?xh(e,n,t,i,s):Th(e,n,t,i,s),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Oh(e,n,t,i,r){let s=i.tag,o=s?n.directives.tagName(s.source,p=>r(s,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){let{anchor:p,newlineAfterProp:m}=i,f=p&&s?p.offset>s.offset?p:s:p??s;f&&(!m||m.offset<f.offset)&&r(f,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===be.tagName&&a==="map"||o===et.tagName&&a==="seq")return Ld(e,n,t,r,o);let l=n.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!l){let p=n.schema.knownTags[o];if(p&&p.collection===a)n.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?.collection?r(s,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection}`,!0):r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ld(e,n,t,r,o)}let c=Ld(e,n,t,r,o,l),u=l.resolve?.(c,p=>r(s,"TAG_RESOLVE_FAILED",p),n.options)??c,d=te(u)?u:new P(u);return d.range=c.range,d.tag=o,l?.format&&(d.format=l.format),d}function Kl(e,n,t){let i=n.offset,r=Rv(n,e.options.strict,t);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};let s=r.mode===">"?P.BLOCK_FOLDED:P.BLOCK_LITERAL,o=n.source?Dv(n.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let g=o[h][1];if(g===""||g==="\r")a=h;else break}if(a===0){let h=r.chomp==="+"&&o.length>0?`
`.repeat(Math.max(1,o.length-1)):"",g=i+r.length;return n.source&&(g+=n.source.length),{value:h,type:s,comment:r.comment,range:[i,g,g]}}let l=n.indent+r.indent,c=n.offset+r.length,u=0;for(let h=0;h<a;++h){let[g,b]=o[h];if(b===""||b==="\r")r.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&t(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=g.length),u=h,l===0&&!e.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+b.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>l&&(a=h+1);let d="",p="",m=!1;for(let h=0;h<u;++h)d+=o[h][0].slice(l)+`
`;for(let h=u;h<a;++h){let[g,b]=o[h];c+=g.length+b.length+1;let k=b[b.length-1]==="\r";if(k&&(b=b.slice(0,-1)),b&&g.length<l){let x=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;t(c-b.length-(k?2:1),"BAD_INDENT",x),g=""}s===P.BLOCK_LITERAL?(d+=p+g.slice(l)+b,p=`
`):g.length>l||b[0]===" "?(p===" "?p=`
`:!m&&p===`
`&&(p=`
`),d+=p+g.slice(l)+b,p=`
`,m=!0):b===""?p===`
`?d+=`
`:p=`
`:(d+=p+b,p=" ",m=!1)}switch(r.chomp){case"-":break;case"+":for(let h=a;h<o.length;++h)d+=`
`+o[h][0].slice(l);d[d.length-1]!==`
`&&(d+=`
`);break;default:d+=`
`}let f=i+r.length+n.source.length;return{value:d,type:s,comment:r.comment,range:[i,f,f]}}function Rv({offset:e,props:n},t,i){if(n[0].type!=="block-scalar-header")return i(n[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=n[0],s=r[0],o=0,a="",l=-1;for(let p=1;p<r.length;++p){let m=r[p];if(!a&&(m==="-"||m==="+"))a=m;else{let f=Number(m);!o&&f?o=f:l===-1&&(l=e+p)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,u="",d=r.length;for(let p=1;p<n.length;++p){let m=n[p];switch(m.type){case"space":c=!0;case"newline":d+=m.source.length;break;case"comment":t&&!c&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=m.source.length,u=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),d+=m.source.length;break;default:{let f=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",f);let h=m.source;h&&typeof h=="string"&&(d+=h.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:d}}function Dv(e){let n=e.split(/\n( *)/),t=n[0],i=t.match(/^( *)/),s=[i?.[1]?[i[1],t.slice(i[1].length)]:["",t]];for(let o=1;o<n.length;o+=2)s.push([n[o],n[o+1]]);return s}function Yl(e,n,t){let{offset:i,type:r,source:s,end:o}=e,a,l,c=(p,m,f)=>t(i+p,m,f);switch(r){case"scalar":a=P.PLAIN,l=Nv(s,c);break;case"single-quoted-scalar":a=P.QUOTE_SINGLE,l=_v(s,c);break;case"double-quoted-scalar":a=P.QUOTE_DOUBLE,l=Kv(s,c);break;default:return t(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}let u=i+s.length,d=un(o,u,n,t);return{value:l,type:a,comment:d.comment,range:[i,u,d.offset]}}function Nv(e,n){let t="";switch(e[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${e[0]}`;break}case"@":case"`":{t=`reserved character ${e[0]}`;break}}return t&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Ch(e)}function _v(e,n){return(e[e.length-1]!=="'"||e.length===1)&&n(e.length,"MISSING_CHAR","Missing closing 'quote"),Ch(e.slice(1,-1)).replace(/''/g,"'")}function Ch(e){let n,t;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
`,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=n.exec(e);if(!i)return e;let r=i[1],s=" ",o=n.lastIndex;for(t.lastIndex=o;i=t.exec(e);)i[1]===""?s===`
`?r+=s:s=`
`:(r+=s+i[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,i=a.exec(e),r+s+(i?.[1]??"")}function Kv(e,n){let t="";for(let i=1;i<e.length-1;++i){let r=e[i];if(!(r==="\r"&&e[i+1]===`
`))if(r===`
`){let{fold:s,offset:o}=Yv(e,i);t+=s,i=o}else if(r==="\\"){let s=e[++i],o=Pv[s];if(o)t+=o;else if(s===`
`)for(s=e[i+1];s===" "||s===" ";)s=e[++i+1];else if(s==="\r"&&e[i+1]===`
`)for(s=e[++i+1];s===" "||s===" ";)s=e[++i+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];t+=zv(e,i+1,a,n),i+=a}else{let a=e.substr(i-1,2);n(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(r===" "||r===" "){let s=i,o=e[i+1];for(;o===" "||o===" ";)o=e[++i+1];o!==`
`&&!(o==="\r"&&e[i+2]===`
`)&&(t+=i>s?e.slice(s,i+1):r)}else t+=r}return(e[e.length-1]!=='"'||e.length===1)&&n(e.length,"MISSING_CHAR",'Missing closing "quote'),t}function Yv(e,n){let t="",i=e[n+1];for(;(i===" "||i===" "||i===`
`||i==="\r")&&!(i==="\r"&&e[n+2]!==`
`);)i===`
`&&(t+=`
`),n+=1,i=e[n+1];return t||(t=" "),{fold:t,offset:n}}var Pv={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function zv(e,n,t,i){let r=e.substr(n,t),o=r.length===t&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;if(isNaN(o)){let a=e.substr(n-2,t+2);return i(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function Ed(e,n,t,i){let{value:r,type:s,comment:o,range:a}=n.type==="block-scalar"?Kl(e,n,i):Yl(n,e.options.strict,i),l=t?e.directives.tagName(t.source,d=>i(t,"TAG_RESOLVE_FAILED",d)):null,c;e.options.stringKeys&&e.atKey?c=e.schema[kt]:l?c=Hv(e.schema,r,l,t,i):n.type==="scalar"?c=qv(e,r,n,i):c=e.schema[kt];let u;try{let d=c.resolve(r,p=>i(t??n,"TAG_RESOLVE_FAILED",p),e.options);u=Q(d)?d:new P(d)}catch(d){let p=d instanceof Error?d.message:String(d);i(t??n,"TAG_RESOLVE_FAILED",p),u=new P(r)}return u.range=a,u.source=r,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Hv(e,n,t,i,r){if(t==="!")return e[kt];let s=[];for(let a of e.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)s.push(a);else return a;for(let a of s)if(a.test?.test(n))return a;let o=e.knownTags[t];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),e[kt])}function qv({atKey:e,directives:n,schema:t},i,r,s){let o=t.tags.find(a=>(a.default===!0||e&&a.default==="key")&&a.test?.test(i))||t[kt];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(i))??t[kt];if(o.tag!==a.tag){let l=n.tagString(o.tag),c=n.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;s(r,"TAG_RESOLVE_FAILED",u,!0)}}return o}function Mh(e,n,t){if(n){t===null&&(t=n.length);for(let i=t-1;i>=0;--i){let r=n[i];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=n[++i];r?.type==="space";)e+=r.source.length,r=n[++i];break}}return e}var $v={composeNode:xd,composeEmptyNode:Pl};function xd(e,n,t,i){let r=e.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t,c,u=!0;switch(n.type){case"alias":c=Uv(e,n,i),(a||l)&&i(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Ed(e,n,l,i),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Oh($v,e,n,t,i),a&&(c.anchor=a.source.substring(1));break;default:{let d=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;i(n,"UNEXPECTED_TOKEN",d),c=Pl(e,n.offset,void 0,null,t,i),u=!1}}return a&&c.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!Q(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(n.type==="scalar"&&n.source===""?c.comment=o:c.commentBefore=o),e.options.keepSourceTokens&&u&&(c.srcToken=n),c}function Pl(e,n,t,i,{spaceBefore:r,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:Mh(n,t,i),indent:-1,source:""},d=Ed(e,u,a,c);return o&&(d.anchor=o.source.substring(1),d.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(d.spaceBefore=!0),s&&(d.comment=s,d.range[2]=l),d}function Uv({options:e},{offset:n,source:t,end:i},r){let s=new En(t.substring(1));s.source===""&&r(n,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&r(n+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=n+t.length,a=un(i,o,e.strict,r);return s.range=[n,o,a.offset],a.comment&&(s.comment=a.comment),s}function Ih(e,n,{offset:t,start:i,value:r,end:s},o){let a=Object.assign({_directives:n},e),l=new jt(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=cn(i,{indicator:"doc-start",next:r??s?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?xd(c,r,u,o):Pl(c,u.end,i,null,u,o);let d=l.contents.range[2],p=un(s,d,!1,o);return p.comment&&(l.comment=p.comment),l.range=[t,d,p.offset],l}function js(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:n,source:t}=e;return[n,n+(typeof t=="string"?t.length:1)]}function Bh(e){let n="",t=!1,i=!1;for(let r=0;r<e.length;++r){let s=e[r];switch(s[0]){case"#":n+=(n===""?"":i?`
`:`
`)+(s.substring(1)||" "),t=!0,i=!1;break;case"%":e[r+1]?.[0]!=="#"&&(r+=1),t=!1;break;default:t||(i=!0),t=!1}}return{comment:n,afterEmptyLine:i}}var Vs=class{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,i,r,s)=>{let o=js(t);s?this.warnings.push(new $s(o,i,r)):this.errors.push(new Ot(o,i,r))},this.directives=new an({version:n.version||"1.2"}),this.options=n}decorate(n,t){let{comment:i,afterEmptyLine:r}=Bh(this.prelude);if(i){let s=n.contents;if(t)n.comment=n.comment?`${n.comment}
${i}`:i;else if(r||n.directives.docStart||!s)n.commentBefore=i;else if(se(s)&&!s.flow&&s.items.length>0){let o=s.items[0];ee(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${i}
${a}`:i}else{let o=s.commentBefore;s.commentBefore=o?`${i}
${o}`:i}}t?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Bh(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,t=!1,i=-1){for(let r of n)yield*this.next(r);yield*this.end(t,i)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(t,i,r)=>{let s=js(n);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",i,r)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{let t=Ih(this.options,this.directives,n,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{let t=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,i=new Ot(js(n),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Ot(js(n),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let t=un(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ot(js(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){let i=Object.assign({_directives:this.directives},this.options),r=new jt(void 0,i);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}};var ql={};au(ql,{BOM:()=>Ws,DOCUMENT:()=>Gs,FLOW_END:()=>Qs,SCALAR:()=>Fr,createScalarToken:()=>Rh,isCollection:()=>Wv,isScalar:()=>Gv,prettyToken:()=>Qv,resolveAsScalar:()=>Fh,setScalarValue:()=>Dh,stringify:()=>_h,tokenType:()=>Cd,visit:()=>ei});function Fh(e,n=!0,t){if(e){let i=(r,s,o)=>{let a=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(t)t(a,s,o);else throw new Ot([a,a+1],s,o)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Yl(e,n,i);case"block-scalar":return Kl({options:{strict:n}},e,i)}}return null}function Rh(e,n){let{implicitKey:t=!1,indent:i,inFlow:r=!1,offset:s=-1,type:o="PLAIN"}=n,a=Tn({type:o,value:e},{implicitKey:t,indent:i>0?" ".repeat(i):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),l=n.end??[{type:"newline",offset:-1,indent:i,source:`
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
`),u=a.substring(0,c),d=a.substring(c+1)+`
`,p=[{type:"block-scalar-header",offset:s,indent:i,source:u}];return Nh(p,l)||p.push({type:"newline",offset:-1,indent:i,source:`
`}),{type:"block-scalar",offset:s,indent:i,props:p,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:i,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:i,source:a,end:l};default:return{type:"scalar",offset:s,indent:i,source:a,end:l}}}function Dh(e,n,t={}){let{afterKey:i=!1,implicitKey:r=!1,inFlow:s=!1,type:o}=t,a="indent"in e?e.indent:null;if(i&&typeof a=="number"&&(a+=2),!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Tn({type:o,value:n},{implicitKey:r||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":jv(e,l);break;case'"':Td(e,l,"double-quoted-scalar");break;case"'":Td(e,l,"single-quoted-scalar");break;default:Td(e,l,"scalar")}}function jv(e,n){let t=n.indexOf(`
`),i=n.substring(0,t),r=n.substring(t+1)+`
`;if(e.type==="block-scalar"){let s=e.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=i,e.source=r}else{let{offset:s}=e,o="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:i}];Nh(a,"end"in e?e.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
`});for(let l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:"block-scalar",indent:o,props:a,source:r})}}function Nh(e,n){if(n)for(let t of n)switch(t.type){case"space":case"comment":e.push(t);break;case"newline":return e.push(t),!0}return!1}function Td(e,n,t){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=t,e.source=n;break;case"block-scalar":{let i=e.props.slice(1),r=n.length;e.props[0].type==="block-scalar-header"&&(r-=e.props[0].source.length);for(let s of i)s.offset+=r;delete e.props,Object.assign(e,{type:t,source:n,end:i});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+n.length,indent:e.indent,source:`
`};delete e.items,Object.assign(e,{type:t,source:n,end:[r]});break}default:{let i="indent"in e?e.indent:-1,r="end"in e&&Array.isArray(e.end)?e.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(e))s!=="type"&&s!=="offset"&&delete e[s];Object.assign(e,{type:t,indent:i,source:n,end:r})}}}var _h=e=>"type"in e?Hl(e):zl(e);function Hl(e){switch(e.type){case"block-scalar":{let n="";for(let t of e.props)n+=Hl(t);return n+e.source}case"block-map":case"block-seq":{let n="";for(let t of e.items)n+=zl(t);return n}case"flow-collection":{let n=e.start.source;for(let t of e.items)n+=zl(t);for(let t of e.end)n+=t.source;return n}case"document":{let n=zl(e);if(e.end)for(let t of e.end)n+=t.source;return n}default:{let n=e.source;if("end"in e&&e.end)for(let t of e.end)n+=t.source;return n}}}function zl({start:e,key:n,sep:t,value:i}){let r="";for(let s of e)r+=s.source;if(n&&(r+=Hl(n)),t)for(let s of t)r+=s.source;return i&&(r+=Hl(i)),r}var Od=Symbol("break visit"),Vv=Symbol("skip children"),Kh=Symbol("remove item");function ei(e,n){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),Yh(Object.freeze([]),e,n)}ei.BREAK=Od;ei.SKIP=Vv;ei.REMOVE=Kh;ei.itemAtPath=(e,n)=>{let t=e;for(let[i,r]of n){let s=t?.[i];if(s&&"items"in s)t=s.items[r];else return}return t};ei.parentCollection=(e,n)=>{let t=ei.itemAtPath(e,n.slice(0,-1)),i=n[n.length-1][0],r=t?.[i];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function Yh(e,n,t){let i=t(n,e);if(typeof i=="symbol")return i;for(let r of["key","value"]){let s=n[r];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=Yh(Object.freeze(e.concat([[r,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Od)return Od;a===Kh&&(s.items.splice(o,1),o-=1)}}typeof i=="function"&&r==="key"&&(i=i(n,e))}}return typeof i=="function"?i(n,e):i}var Ws="\uFEFF",Gs="",Qs="",Fr="",Wv=e=>!!e&&"items"in e,Gv=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Qv(e){switch(e){case Ws:return"<BOM>";case Gs:return"<DOC>";case Qs:return"<FLOW_END>";case Fr:return"<SCALAR>";default:return JSON.stringify(e)}}function Cd(e){switch(e){case Ws:return"byte-order-mark";case Gs:return"doc-mode";case Qs:return"flow-error-end";case Fr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Vt(e){switch(e){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}var Ph=new Set("0123456789ABCDEFabcdef"),Zv=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),$l=new Set(",[]{}"),Jv=new Set(` ,[]{}
\r `),Md=e=>!e||Jv.has(e),Zs=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,t=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!t;let i=this.next??"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let n=this.pos,t=this.buffer[n];for(;t===" "||t===" ";)t=this.buffer[++n];return!t||t==="#"||t===`
`?!0:t==="\r"?this.buffer[n+1]===`
`:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let t=this.buffer[n];if(this.indentNext>0){let i=0;for(;t===" ";)t=this.buffer[++i+n];if(t==="\r"){let r=this.buffer[i+n+1];if(r===`
`||!r&&!this.atEnd)return n+i+1}return t===`
`||i>=this.indentNext||!t&&!this.atEnd?n+i:-1}if(t==="-"||t==="."){let i=this.buffer.substr(n,3);if((i==="---"||i==="...")&&Vt(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Ws&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let t=n.length,i=n.indexOf("#");for(;i!==-1;){let s=n[i-1];if(s===" "||s===" "){t=i-1;break}else i=n.indexOf("#",i+1)}for(;;){let s=n[t-1];if(s===" "||s===" ")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-t),yield*this.pushNewline(),"stream"}return yield Gs,yield*this.parseLineStart()}*parseLineStart(){let n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&Vt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Vt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[n,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&Vt(t)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let n=this.getLine();if(n===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(n[t]){case"#":yield*this.pushCount(n.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Md),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,t,i=-1;do n=yield*this.pushNewline(),n>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=yield*this.pushSpaces(!0);while(n+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&r[0]!=="#"||i===0&&(r.startsWith("---")||r.startsWith("..."))&&Vt(r[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Qs,yield*this.parseLineStart();let s=0;for(;r[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),r[s]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Md),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||Vt(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let n=this.charAt(0),t=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let i=this.buffer.substring(0,t),r=i.indexOf(`
`,this.pos);if(r!==-1){for(;r!==-1;){let s=this.continueScalar(r+1);if(s===-1)break;r=i.indexOf(`
`,s)}r!==-1&&(t=r-(i[r-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){let t=this.buffer[++n];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Vt(t)||t==="#")}*parseBlockScalar(){let n=this.pos-1,t=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":t+=1;break;case`
`:n=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(n+1);if(s===-1)break;n=this.buffer.indexOf(`
`,s)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let r=n+1;for(i=this.buffer[r];i===" ";)i=this.buffer[++r];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
`;)i=this.buffer[++r];n=r-1}else if(!this.blockScalarKeep)do{let s=n-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
`&&s>=this.pos&&s+1+t>a)n=s;else break}while(!0);return yield Fr,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let n=this.flowLevel>0,t=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){let s=this.buffer[i+1];if(Vt(s)||n&&$l.has(s))break;t=i}else if(Vt(r)){let s=this.buffer[i+1];if(r==="\r"&&(s===`
`?(i+=1,r=`
`,s=this.buffer[i+1]):t=i),s==="#"||n&&$l.has(s))break;if(r===`
`){let o=this.continueScalar(i+1);if(o===-1)break;i=Math.max(i,o-2)}}else{if(n&&$l.has(r))break;t=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield Fr,yield*this.pushToIndex(t+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,t){let i=this.buffer.slice(this.pos,n);return i?(yield i,this.pos+=i.length,i.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Md))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let n=this.flowLevel>0,t=this.charAt(1);if(Vt(t)||n&&$l.has(t))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,t=this.buffer[n];for(;!Vt(t)&&t!==">";)t=this.buffer[++n];return yield*this.pushToIndex(t===">"?n+1:n,!1)}else{let n=this.pos+1,t=this.buffer[n];for(;t;)if(Zv.has(t))t=this.buffer[++n];else if(t==="%"&&Ph.has(this.buffer[n+1])&&Ph.has(this.buffer[n+2]))t=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){let n=this.buffer[this.pos];return n===`
`?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(n){let t=this.pos-1,i;do i=this.buffer[++t];while(i===" "||n&&i===" ");let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(n){let t=this.pos,i=this.buffer[t];for(;!n(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};var Js=class{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let t=0,i=this.lineStarts.length;for(;t<i;){let s=t+i>>1;this.lineStarts[s]<n?t=s+1:i=s}if(this.lineStarts[t]===n)return{line:t+1,col:1};if(t===0)return{line:0,col:n};let r=this.lineStarts[t-1];return{line:t,col:n-r+1}}}};function Ti(e,n){for(let t=0;t<e.length;++t)if(e[t].type===n)return!0;return!1}function zh(e){for(let n=0;n<e.length;++n)switch(e[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function qh(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ul(e){switch(e.type){case"document":return e.start;case"block-map":{let n=e.items[e.items.length-1];return n.sep??n.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Rr(e){if(e.length===0)return[];let n=e.length;e:for(;--n>=0;)switch(e[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++n]?.type==="space";);return e.splice(n,e.length)}function Hh(e){if(e.start.type==="flow-seq-start")for(let n of e.items)n.sep&&!n.value&&!Ti(n.start,"explicit-key-ind")&&!Ti(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,qh(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}var Xs=class{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Zs,this.onNewLine=n}*parse(n,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(n,t))yield*this.next(i);t||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}let t=Cd(n);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{let i=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let n=this.peek(1);if(this.type==="doc-end"&&(!n||n.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){let t=n??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let i=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in i?i.indent:0:t.type==="flow-collection"&&i.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Hh(t),i.type){case"document":i.value=t;break;case"block-scalar":i.props.push(t);break;case"block-map":{let r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=i.items[i.items.length-1];r.value?i.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=i.items[i.items.length-1];!r||r.value?i.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&zh(r.start)===-1&&(t.indent===0||r.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(i.type==="document"?i.end=r.start:i.i Line truncated
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){let t=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)n.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,n.indent)){let r=n.items[n.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),n.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=n.indent){let i=!this.onKeyLine&&this.indent===n.indent,r=i&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",s=[];if(r&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>n.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(s.push(this.sourceToken),n.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(s.push(this.sourceToken),n.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ti(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(qh(t.key)&&!Ti(t.sep,"newline")){let o=Rr(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(Ti(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Rr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?n.items.push({start:s,key:null,sep:[this.sourceToken]}):Ti(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||t.value?(n.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(n);if(o){i&&o.type!=="block-seq"&&n.items.push({start:s}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){let t=n.items[n.items.length-1];switch(this.type){case"newline":if(t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,n.indent)){let r=n.items[n.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),n.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=n.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;t.value||Ti(t.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>n.indent){let i=this.startBlockValue(n);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){let t=n.items[n.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?n.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?n.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"singl Line truncated
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Ul(n),i=Rr(t);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ul(n),i=Rr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,t){return this.type!=="comment"||this.indent<=t?!1:n.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function Xv(e){let n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new Js||null,prettyErrors:n}}function jl(e,n={}){let{lineCounter:t,prettyErrors:i}=Xv(n),r=new Xs(t?.addNewLine),s=new Vs(n),o=null;for(let a of s.compose(r.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Ot(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&t&&(o.errors.forEach(wd(e,t)),o.warnings.forEach(wd(e,t))),o}function Vl(e,n,t){let i;typeof n=="function"?i=n:t===void 0&&n&&typeof n=="object"&&(t=n);let r=jl(e,t);if(!r)return null;if(r.warnings.forEach(s=>kl(r.options.logLevel,s)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},t))}function Wl(e,n,t){let i=null;if(typeof n=="function"||Array.isArray(n)?i=n:t===void 0&&n&&(t=n),typeof t=="string"&&(t=t.length),typeof t=="number"){let r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(e===void 0){let{keepUndefined:r}=t??n??{};if(!r)return}return Yt(e)&&!i?e.toString(t):new jt(e,i,t).toString(t)}var Id="tag",eo="tags",Wt=[Id,eo],tw="alias",Bd="aliases",Gt=[tw,Bd],Fd="linter-yaml-title-alias",Dr="disabled rules";function dn(e){return e.match(je)===null&&(e=`---
---
`+e),e}function Nr(e){let n=e.match(je);return n?n[1]:null}function Ee(e,n){if(!e.match(je))return e;let t=e.match(je)[0],i=n(t);return e=e.replace(t,at(i)),e}function Rd(e,n=!0){return n?new RegExp(`^([\\t ]*)${e}:[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`,"m"):new RegExp(`^${e}:[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`,"m")}function ue(e,n,t){let i=`${n}:${t}
`,r=!1,s=e.replace(Rd(n),(o,a)=>(r=!0,a+i));return r||(s=`${e}${i}`),s}function ke(e,n,t=!0){let i=e.match(Rd(n,t));if(i==null)return null;let r=i[2];return t||(r=i[1]),r}function to(e,n,t=!0){return e.replace(Rd(n,t),"")}function vt(e){if(e==null)return null;let n=Vl(e.replace(/\n(\t)+/g,`
`));return n??{}}function Uh(e){if(e==null)return null;let n=jl(e.replace(/\n(\t)+/g,`
`),{keepSourceTokens:!0});return n??null}function Dd(e){let n=new jt(e.options);n.contents=new be;let t=e.contents.srcToken;return n.contents.srcToken={offset:t.offset,type:t.type,indent:t.indent,start:t.start,end:t.end,items:[]},n}function Oi(e){if(!e||!e.contents)return"";let n=e.contents.items;return!n||n.length==0?"":ql.stringify(e.contents.srcToken)}function Te(e,n,t,i,r=!1){if(typeof e=="string"&&(e=[e]),e==null||e.length===0)return nw(n);let s=i&&(n=="multi-line"||n=="single string to multi-line"&&e.length>1);if(r||s)for(let o=0;o<e.length;o++){let a=e[o],l=_r(a);l&&(a=a.substring(1,a.length-1));let c=r&&Ya(a);l&&c||(c||l&&s)&&(e[o]=Qt(a,t,c))}switch(n){case"single string to single-line":if(e.length===1)return" "+e[0];case"single-line":return" "+$h(e);case"single string to multi-line":if(e.length===1)return" "+e[0];case"multi-line":return iw(e);case"single string space delimited":return e.length===1?" "+e[0]:" "+e.join(" ");case"single string comma delimited":return e.length===1?" "+e[0]:" "+e.join(", ");case"single-line space delimited":return e.length===1?" "+e[0]:" "+$h(e).replaceAll(", "," ")}}function nw(e){switch(e){case"single-line":case"single-line space delimited":case"multi-line":return" []";case"single string to single-line":case"single string to multi-line":case"single string space delimited":case"single string comma delimited":return" "}}function $h(e){return e==null||e.length===0?"[]":"["+e.join(", ")+"]"}function iw(e){return e==null||e.length===0?"[]":`
- `+e.join(`
- `)}function ze(e){if(e==null||e.length===0)return null;if(e=e.trimEnd(),e.startsWith("["))return e=e.substring(1),e.endsWith("]")&&(e=e.substring(0,e.length-1)),e.length===0?null:Gl(e,",").filter(t=>t!="");if(e.includes(`
`)){let n=e.split(/[ \t]*\n[ \t]*-[ \t]*/);return n.splice(0,1),n=n.filter(t=>t!=""),n==null||n.length===0?null:n}return e}function ti(e){if(e==null)return[];let n=[],t=[];Array.isArray(e)?t=e:e.includes(",")?t=Gl(e,","):t=Gl(e," ");for(let i of t)n.push(i.trim());return n}function ni(e){return typeof e=="string"?Gl(e,","):e}function Gl(e,n=","){if(e==""||e==null)return null;if(n.length>1)throw new Error(E("logs.invalid-delimiter-error-message"));let t=[],i="",r=0;for(;r<e.length;){let s=e.charAt(r);if(s===n)t.push(i.trim()),i="";else if(s==='"'||s==="'"){let o=e.indexOf(s,r+1);o!=-1?(i+=e.substring(r,o+1),r=o):i+=s}else i+=s;r++}return i.trim()!=""&&t.push(i.trim()),t}function _r(e){return e.length>1&&(e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"'))}function Qt(e,n,t=!1,i=!1){let r=rw(e,n,t);if(i)return r;try{if(Vl(r)===e)return r}catch{}let s=Wl(e,{lineWidth:-1,quotingType:n,forceQuotes:t}).slice(0,-1),o=Wl(e,{lineWidth:-1,quotingType:n=='"'?"'":'"',forceQuotes:t}).slice(0,-1);return o===e||o.length<s.length?o:s}function rw(e,n,t=!1){if(_r(e))return e;let i=e.includes("'"),r=e.includes('"'),s=e.includes(": ");return!i&&!r&&!s&&!t||i&&r?e:i?`"${e}"`:r?`'${e}'`:`${n}${e}${n}`}function jh(e){let n=ke(e,Dr);if(n==null)return[];let t=n.includes(`
`)?`${Dr}:
`:`${Dr}: `;t+=n;let r=vt(t)["disabled rules"];return r?(typeof r=="string"&&(r=[r]),r):[]}var $r=require("obsidian");function De(e){e.addClass("linter-visually-hidden")}function Ve(e){e.removeClass("linter-visually-hidden")}function ft(e,n){if(e.includes("</")){let t=document.createRange();n.append(t.createContextualFragment(e))}else n.setText(e)}var qr=require("obsidian");var Vh=require("obsidian");var Ql=class{constructor(n,t,i,r,s,o,a,l,c,u){this.containerEl=n;this.name=t;this.description=i;this.warning=r;this.addInputTooltip=s;this.refreshBtnTooltip=o;this.app=a;this.saveSettings=l;this.onAddInput=c;this.onRefresh=u}display(){this.containerEl.createDiv({cls:"setting-item-name",text:this.name});let n=this.containerEl.createDiv({cls:"setting-item-description"});ft(this.description,n.createEl("p",{cls:"custom-row-description"})),new Vh.Setting(this.containerEl).addButton(t=>{t.setIcon("plus-with-circle").setTooltip(this.addInputTooltip).onClick(()=>this.onAddInput()),t.buttonEl.addClass("clickable-icon")}).addButton(t=>{t.setIcon("reset").setTooltip(this.refreshBtnTooltip).onClick(()=>this.onRefresh()),t.buttonEl.addClass("clickable-icon")}).setClass("linter-border-bottom").setDesc(this.warning??"").descEl.addClass("mod-warning"),this.inputElDiv=this.containerEl.createDiv(),this.showInputEls()}resetInputEls(){this.inputElDiv.empty(),this.showInputEls()}};var hg=require("obsidian");var xe="top",Ne="bottom",Be="right",Oe="left",Zl="auto",ii=[xe,Ne,Be,Oe],Cn="start",Ci="end",Wh="clippingParents",Jl="viewport",Kr="popper",Gh="reference",Nd=ii.reduce(function(e,n){return e.concat([n+"-"+Cn,n+"-"+Ci])},[]),Xl=[].concat(ii,[Zl]).reduce(function(e,n){return e.concat([n,n+"-"+Cn,n+"-"+Ci])},[]),sw="beforeRead",ow="read",aw="afterRead",lw="beforeMain",cw="main",uw="afterMain",dw="beforeWrite",pw="write",mw="afterWrite",Qh=[sw,ow,aw,lw,cw,uw,dw,pw,mw];function He(e){return e?(e.nodeName||"").toLowerCase():null}function he(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var n=e.ownerDocument;return n&&n.defaultView||window}return e}function Ct(e){var n=he(e).Element;return e instanceof n||e instanceof Element}function _e(e){var n=he(e).HTMLElement;return e instanceof n||e instanceof HTMLElement}function Yr(e){if(typeof ShadowRoot>"u")return!1;var n=he(e).ShadowRoot;return e instanceof n||e instanceof ShadowRoot}function fw(e){var n=e.state;Object.keys(n.elements).forEach(function(t){var i=n.styles[t]||{},r=n.attributes[t]||{},s=n.elements[t];!_e(s)||!He(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(o){var a=r[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function hw(e){var n=e.state,t={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,t.popper),n.styles=t,n.elements.arrow&&Object.assign(n.elements.arrow.style,t.arrow),function(){Object.keys(n.elements).forEach(function(i){var r=n.elements[i],s=n.attributes[i]||{},o=Object.keys(n.styles.hasOwnProperty(i)?n.styles[i]:t[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!_e(r)||!He(r)||(Object.assign(r.style,a),Object.keys(s).forEach(function(l){r.removeAttribute(l)}))})}}var Zh={name:"applyStyles",enabled:!0,phase:"write",fn:fw,effect:hw,requires:["computeStyles"]};function qe(e){return e.split("-")[0]}var Zt=Math.max,Mi=Math.min,Mn=Math.round;function Pr(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function no(){return!/^((?!chrome|android).)*safari/i.test(Pr())}function Mt(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!1);var i=e.getBoundingClientRect(),r=1,s=1;n&&_e(e)&&(r=e.offsetWidth>0&&Mn(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Mn(i.height)/e.offsetHeight||1);var o=Ct(e)?he(e):window,a=o.visualViewport,l=!no()&&t,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/s,d=i.width/r,p=i.height/s;return{width:d,height:p,top:u,right:c+d,bottom:u+p,left:c,x:c,y:u}}function Ii(e){var n=Mt(e),t=e.offsetWidth,i=e.offsetHeight;return Math.abs(n.width-t)<=1&&(t=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:e.offsetLeft,y:e.offsetTop,width:t,height:i}}function io(e,n){var t=n.getRootNode&&n.getRootNode();if(e.contains(n))return!0;if(t&&Yr(t)){var i=n;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ct(e){return he(e).getComputedStyle(e)}function _d(e){return["table","td","th"].indexOf(He(e))>=0}function We(e){return((Ct(e)?e.ownerDocument:e.document)||window.document).documentElement}function In(e){return He(e)==="html"?e:e.assignedSlot||e.parentNode||(Yr(e)?e.host:null)||We(e)}function Jh(e){return!_e(e)||ct(e).position==="fixed"?null:e.offsetParent}function gw(e){var n=/firefox/i.test(Pr()),t=/Trident/i.test(Pr());if(t&&_e(e)){var i=ct(e);if(i.position==="fixed")return null}var r=In(e);for(Yr(r)&&(r=r.host);_e(r)&&["html","body"].indexOf(He(r))<0; Line truncated
`+e.mark.snippet),i+" "+t):i}function po(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=Rg(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}po.prototype=Object.create(Error.prototype);po.prototype.constructor=po;po.prototype.toString=function(n){return this.name+": "+Rg(this,n)};var ut=po;function Zd(e,n,t,i,r){var s="",o="",a=Math.floor(r/2)-1;return i-n>a&&(s=" ... ",n=i-a+s.length),t-i>a&&(o=" ...",t=i+a-o.length),{str:s+e.slice(n,t).replace(/\t/g,"\u2192")+o,pos:i-n+s.length}}function Jd(e,n){return Ke.repeat(" ",n-e.length)+e}function Qw(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var t=/\r?\n|\r|\0/g,i=[0],r=[],s,o=-1;s=t.exec(e.buffer);)r.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var a="",l,c,u=Math.min(e.line+n.linesAfter,r.length).toString().length,d=n.maxLength-(n.indent+u+3);for(l=1;l<=n.linesBefore&&!(o-l<0);l++)c=Zd(e.buffer,i[o-l],r[o-l],e.position-(i[o]-i[o-l]),d),a=Ke.repeat(" ",n.indent)+Jd((e.line-l+1).toString(),u)+" | "+c.str+`
`+a;for(c=Zd(e.buffer,i[o],r[o],e.position,d),a+=Ke.repeat(" ",n.indent)+Jd((e.line+1).toString(),u)+" | "+c.str+`
`,a+=Ke.repeat("-",n.indent+u+3+c.pos)+`^
`,l=1;l<=n.linesAfter&&!(o+l>=r.length);l++)c=Zd(e.buffer,i[o+l],r[o+l],e.position-(i[o]-i[o+l]),d),a+=Ke.repeat(" ",n.indent)+Jd((e.line+l+1).toString(),u)+" | "+c.str+`
`;return a.replace(/\n$/,"")}var Zw=Qw,Jw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Xw=["scalar","sequence","mapping"];function eA(e){var n={};return e!==null&&Object.keys(e).forEach(function(t){e[t].forEach(function(i){n[String(i)]=t})}),n}function tA(e,n){if(n=n||{},Object.keys(n).forEach(function(t){if(Jw.indexOf(t)===-1)throw new ut('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(t){return t},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=eA(n.styleAliases||null),Xw.indexOf(this.kind)===-1)throw new ut('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var nt=tA;function bg(e,n){var t=[];return e[n].forEach(function(i){var r=t.length;t.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(r=o)}),t[r]=i}),t}function nA(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,t;function i(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(n=0,t=arguments.length;n<t;n+=1)arguments[n].forEach(i);return e}function ep(e){return this.extend(e)}ep.prototype.extend=function(n){var t=[],i=[];if(n instanceof nt)i.push(n);else if(Array.isArray(n))i=i.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(t=t.concat(n.implicit)),n.explicit&&(i=i.concat(n.explicit));else throw new ut("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(s){if(!(s instanceof nt))throw new ut("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ut("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ut("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof nt))throw new ut("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(ep.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=bg(r,"implicit"),r.compiledExplicit=bg(r,"explicit"),r.compiledTypeMap=nA(r.compiledImplicit,r.compiledExplicit),r};var iA=ep,rA=new nt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),sA=new nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),oA=new nt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),aA=new iA({explicit:[rA,sA,oA]});function lA(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function cA(){return null}function uA(e){return e===null}var dA=new nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:lA,construct:cA,predicate:uA,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function pA(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function mA(e){return e==="true"||e==="True"||e==="TRUE"}function fA(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var hA=new nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:pA,construct:mA,predicate:fA,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function gA(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function yA(e){return 48<=e&&e<=55}function bA(e){return 48<=e&&e<=57}function kA(e){if(e===null)return!1;var n=e.length,t=0,i=!1,r;if(!n)return!1;if(r=e[t],(r==="-"||r==="+")&&(r=e[++t]),r==="0"){if(t+1===n)return!0;if(r=e[++t],r==="b"){for(t++;t<n;t++)if(r=e[t],r!=="_"){if(r!=="0"&&r!=="1")return!1;i=!0}return i&&r!=="_"}if(r==="x"){for(t++;t<n;t++)if(r=e[t],r!=="_"){if(!gA(e.charCodeAt(t)))return!1;i=!0}return i&&r!=="_"}if(r==="o"){for(t++;t<n;t++)if(r=e[t],r!=="_"){if(!yA(e.charCodeAt(t)))return!1;i=!0}return i&&r!=="_"}}if(r==="_")return!1;for(;t<n;t++)if(r=e[t],r!=="_"){if(!bA(e.charCodeAt(t)))return!1;i=!0}return!(!i||r==="_")}function vA(e){var n=e,t=1,i;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),i=n[0],(i==="-"||i==="+")&&(i==="-"&&(t=-1),n=n.slice(1),i=n[0]),n==="0")return 0;if(i==="0"){if(n[1]==="b")return t*parseInt(n. Line truncated
\r`;function KA(e){if(e===null)return!1;var n,t,i=0,r=e.length,s=sp;for(t=0;t<r;t++)if(n=s.indexOf(e.charAt(t)),!(n>64)){if(n<0)return!1;i+=6}return i%8===0}function YA(e){var n,t,i=e.replace(/[\r\n=]/g,""),r=i.length,s=sp,o=0,a=[];for(n=0;n<r;n++)n%4===0&&n&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(n));return t=r%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),new Uint8Array(a)}function PA(e){var n="",t=0,i,r,s=e.length,o=sp;for(i=0;i<s;i++)i%3===0&&i&&(n+=o[t>>18&63],n+=o[t>>12&63],n+=o[t>>6&63],n+=o[t&63]),t=(t<<8)+e[i];return r=s%3,r===0?(n+=o[t>>18&63],n+=o[t>>12&63],n+=o[t>>6&63],n+=o[t&63]):r===2?(n+=o[t>>10&63],n+=o[t>>4&63],n+=o[t<<2&63],n+=o[64]):r===1&&(n+=o[t>>2&63],n+=o[t<<4&63],n+=o[64],n+=o[64]),n}function zA(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var HA=new nt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:KA,construct:YA,predicate:zA,represent:PA}),qA=Object.prototype.hasOwnProperty,$A=Object.prototype.toString;function UA(e){if(e===null)return!0;var n=[],t,i,r,s,o,a=e;for(t=0,i=a.length;t<i;t+=1){if(r=a[t],o=!1,$A.call(r)!=="[object Object]")return!1;for(s in r)if(qA.call(r,s))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(s)===-1)n.push(s);else return!1}return!0}function jA(e){return e!==null?e:[]}var VA=new nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:UA,construct:jA}),WA=Object.prototype.toString;function GA(e){if(e===null)return!0;var n,t,i,r,s,o=e;for(s=new Array(o.length),n=0,t=o.length;n<t;n+=1){if(i=o[n],WA.call(i)!=="[object Object]"||(r=Object.keys(i),r.length!==1))return!1;s[n]=[r[0],i[r[0]]]}return!0}function QA(e){if(e===null)return[];var n,t,i,r,s,o=e;for(s=new Array(o.length),n=0,t=o.length;n<t;n+=1)i=o[n],r=Object.keys(i),s[n]=[r[0],i[r[0]]];return s}var ZA=new nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:GA,construct:QA}),JA=Object.prototype.hasOwnProperty;function XA(e){if(e===null)return!0;var n,t=e;for(n in t)if(JA.call(t,n)&&t[n]!==null)return!1;return!0}function eS(e){return e!==null?e:{}}var tS=new nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:XA,construct:eS}),_g=IA.extend({implicit:[DA,_A],explicit:[HA,VA,ZA,tS]}),ci=Object.prototype.hasOwnProperty,uc=1,Kg=2,Yg=3,dc=4,Xd=1,nS=2,kg=3,iS=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,rS=/[\x85\u2028\u2029]/,sS=/[,\[\]\{\}]/,Pg=/^(?:!|!!|![a-z\-]+!)$/i,zg=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function vg(e){return Object.prototype.toString.call(e)}function pn(e){return e===10||e===13}function Ki(e){return e===9||e===32}function ht(e){return e===9||e===32||e===10||e===13}function jr(e){return e===44||e===91||e===93||e===123||e===125}function oS(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function aS(e){return e===120?2:e===117?4:e===85?8:0}function lS(e){return 48<=e&&e<=57?e-48:-1}function wg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function cS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Hg=new Array(256),qg=new Array(256);for(_i=0;_i<256;_i++)Hg[_i]=wg(_i)?1:0,qg[_i]=wg(_i);var _i;function uS(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||_g,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function $g(e,n){var t={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return t.snippet=Zw(t),new ut(n,t)}function H(e,n){throw $g(e,n)}function pc(e,n){e.onWarning&&e.onWarning.call(null,$g(e,n))}var Ag={YAML:function(n,t,i){var r,s,o;n.version!==null&&H(n,"duplication of %YAML directive"),i.length!==1&&H(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),r===null&&H(n,"ill-formed argument of the YAML directive"),s=parseInt(r[1],10),o=parseInt(r[2],10),s!==1&&H(n,"unacceptable YAML version of the document"),n.version=i[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&pc(n,"unsupported YAML version of the document")},TAG:function(n,t,i){var r,s;i.length!==2&&H(n,"TAG directive accepts exactly two arguments"),r=i[0],s=i[1],Pg.test(r)||H(n,"ill-formed tag handle (first argument) of the TAG directive"),ci.call(n.tagMap,r)&&H(n,'there is a previously declared suffix for "'+r+'" tag handle'),zg.test(s)||H(n,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{H(n,"tag prefix is malformed: "+s)}n.tagMap[r]=s}};function li(e,n,t,i){var r,s,o,a;if(n<t){if(a=e.input.slice(n,t),i)for(r=0,s=a.length;r<s;r+=1)o=a.charCodeAt(r),o===9||32<=o&&o<=1114111||H(e,"expected valid JSON character");else iS.test(a)&&H(e,"the stream contains non-printable characters");e.result+=a}}function Sg(e,n,t,i){var r,s,o,a;for(Ke.isObject(t)||H(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(t),o=0,a=r.length;o<a;o+=1)s=r[o],ci.call(n,s)||(n[s]=t[s],i[s]=!0)}function Vr(e,n,t,i,r,s,o,a,l){var c,u;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),c=0,u=r.length;c<u;c+=1)Array.isArray(r[c])&&H(e,"nested arrays are not supported inside keys"),typeof r=="object"&&vg(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&vg(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,u=s.length;c<u;c+=1)Sg(e,n,s[c],t);else Sg(e,n,s,t);else!e.json&&!ci.call(t,r)&&ci.call(n,r)&&(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,H(e,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(n,r,{configurable:!0,enumerable:!0,writable:!0,value:s}):n[r]=s,delete t[r];return n}function op(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):H(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Fe(e,n,t){for(var i=0,r=e.input.charCodeAt(e.position);r!==0;){for(;Ki(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(n&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(pn(r))for(op(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return t!==-1&&i!==0&&e.lineIndent<t&&pc(e,"deficient indentation"),i}function hc(e){var n=e.position,t;return t=e.input.charCodeAt(n),!!((t===45||t===46)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,t=e.input.charCodeAt(n),t===0||ht(t)))}function ap(e,n){n===1?e.result+=" ":n>1&&(e.result+=Ke.repeat(`
`,n-1))}function dS(e,n,t){var i,r,s,o,a,l,c,u,d=e.kind,p=e.result,m;if(m=e.input.charCodeAt(e.position),ht(m)||jr(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(r=e.input.charCodeAt(e.position+1),ht(r)||t&&jr(r)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;m!==0;){if(m===58){if(r=e.input.charCodeAt(e.position+1),ht(r)||t&&jr(r))break}else if(m===35){if(i=e.input.charCodeAt(e.position-1),ht(i))break}else{if(e.position===e.lineStart&&hc(e)||t&&jr(m))break;if(pn(m))if(l=e.line,c=e.lineStart,u=e.lineIndent,Fe(e,!1,-1),e.lineIndent>=n){a=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=u;break}}a&&(li(e,s,o,!1),ap(e,e.line-l),s=o=e.position,a=!1),Ki(m)||(o=e.position+1),m=e.input.charCodeAt(++e.position)}return li(e,s,o,!1),e.result?!0:(e.kind=d,e.result=p,!1)}function pS(e,n){var t,i,r;if(t=e.input.charCodeAt(e.position),t!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(t=e.input.charCodeAt(e.position))!==0;)if(t===39)if(li(e,i,e.position,!0),t=e.input.charCodeAt(++e.position),t===39)i=e.position,e.position++,r=e.position;else return!0;else pn(t)?(li(e,i,r,!0),ap(e,Fe(e,!1,n)),i=r=e.position):e.position===e.lineStart&&hc(e)?H(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);H(e,"unexpected end of the stream within a single quoted scalar")}function mS(e,n){var t,i,r,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,t=i=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return li(e,t,e.position,!0),e.position++,!0;if(a===92){if(li(e,t,e.position,!0),a=e.input.charCodeAt(++e.position),pn(a))Fe(e,!1,n);else if(a<256&&Hg[a])e.result+=qg[a],e.position++;else if((o=aS(a))>0){for(r=o,s=0;r>0;r--)a=e.input.charCodeAt(++e.position),(o=oS(a))>=0?s=(s<<4)+o:H(e,"expected hexadecimal character");e.result+=cS(s),e.position++}else H(e,"unknown escape sequence");t=i=e.position}else pn(a)?(li(e,t,i,!0),ap(e,Fe(e,!1,n)),t=i=e.position):e.position===e.lineStart&&hc(e)?H(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}H(e,"unexpected end of the stream within a double quoted scalar")}function fS(e,n){var t=!0,i,r,s,o=e.tag,a,l=e.anchor,c,u,d,p,m,f=Object.create(null),h,g,b,k;if(k=e.input.charCodeAt(e.position),k===91)u=93,m=!1,a=[];else if(k===123)u=125,m=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),k=e.input.charCodeAt(++e.position);k!==0;){if(Fe(e,!0,n),k=e.input.charCodeAt(e.position),k===u)return e.position++,e.tag=o,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=a,!0;t?k===44&&H(e,"expected the node content, but found ','"):H(e,"missed comma between flow collection entries"),g=h=b=null,d=p=!1,k===63&&(c=e.input.charCodeAt(e.position+1),ht(c)&&(d=p=!0,e.position++,Fe(e,!0,n))),i=e.line,r=e.lineStart,s=e.position,Wr(e,n,uc,!1,!0),g=e.tag,h=e.result,Fe(e,!0,n),k=e.input.charCodeAt(e.position),(p||e.line===i)&&k===58&&(d=!0,k=e.input.charCodeAt(++e.position),Fe(e,!0,n),Wr(e,n,uc,!1,!0),b=e.result),m?Vr(e,a,f,g,h,b,i,r,s):d?a.push(Vr(e,null,f,g,h,b,i,r,s)):a.push(h),Fe(e,!0,n),k=e.input.charCodeAt(e.position),k===44?(t=!0,k=e.input.charCodeAt(++e.position)):t=!1}H(e,"unexpected end of the stream within a flow collection")}function hS(e,n){var t,i,r=Xd,s=!1,o=!1,a=n,l=0,c=!1,u,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Xd===r?r=d===43?kg:nS:H(e,"repeat of a chomping mode identifier");else if((u=lS(d))>=0)u===0?H(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?H(e,"repeat of an indentation width identifier"):(a=n+u-1,o=!0);else break;if(Ki(d)){do d=e.input.charCodeAt(++e.position);while(Ki(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!pn(d)&&d!==0)}for(;d!==0;){for(op(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),pn(d)){l++;continue}if(e.lineIndent<a){r===kg?e.result+=Ke.repeat(`
`,s?1+l:l):r===Xd&&s&&(e.result+=`
`);break}for(i?Ki(d)?(c=!0,e.result+=Ke.repeat(`
`,s?1+l:l)):c?(c=!1,e.result+=Ke.repeat(`
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Ke.repeat(`
`,l):e.result+=Ke.repeat(`
`,s?1+l:l),s=!0,o=!0,l=0,t=e.position;!pn(d)&&d!==0;)d=e.input.charCodeAt(++e.position);li(e,t,e.position,!1)}return!0}function Lg(e,n){var t,i=e.tag,r=e.anchor,s=[],o,a=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,H(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!ht(o))));){if(a=!0,e.position++,Fe(e,!0,-1)&&e.lineIndent<=n){s.push(null),l=e.input.charCodeAt(e.position);continue}if(t=e.line,Wr(e,n,Yg,!1,!0),s.push(e.result),Fe(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===t||e.lineIndent>n)&&l!==0)H(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return a?(e.tag=i,e.anchor=r,e.kind="sequence",e.result=s,!0):!1}function gS(e,n,t){var i,r,s,o,a,l,c=e.tag,u=e.anchor,d={},p=Object.create(null),m=null,f=null,h=null,g=!1,b=!1,k;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),k=e.input.charCodeAt(e.position);k!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,H(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(k===63||k===58)&&ht(i))k===63?(g&&(Vr(e,d,p,m,f,null,o,a,l),m=f=h=null),b=!0,g=!0,r=!0):g?(g=!1,r=!0):H(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,k=i;else{if(o=e.line,a=e.lineStart,l=e.position,!Wr(e,t,Kg,!1,!0))break;if(e.line===s){for(k=e.input.charCodeAt(e.position);Ki(k);)k=e.input.charCodeAt(++e.position);if(k===58)k=e.input.charCodeAt(++e.position),ht(k)||H(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Vr(e,d,p,m,f,null,o,a,l),m=f=h=null),b=!0,g=!1,r=!1,m=e.tag,f=e.result;else if(b)H(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=u,!0}else if(b)H(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=u,!0}if((e.line===s||e.lineIndent>n)&&(g&&(o=e.line,a=e.lineStart,l=e.position),Wr(e,n,dc,!0,r)&&(g?f=e.result:h=e.result),g||(Vr(e,d,p,m,f,h,o,a,l),m=f=h=null),Fe(e,!0,-1),k=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>n)&&k!==0)H(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return g&&Vr(e,d,p,m,f,null,o,a,l),b&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=d),b}function yS(e){var n,t=!1,i=!1,r,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&H(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(t=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",n=e.position,t){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):H(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ht(o);)o===33&&(i?H(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(n-1,e.position+1),Pg.test(r)||H(e,"named tag handle cannot contain such characters"),i=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(n,e.position),sS.test(s)&&H(e,"tag suffix cannot contain flow indicator characters")}s&&!zg.test(s)&&H(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{H(e,"tag name is malformed: "+s)}return t?e.tag=s:ci.call(e.tagMap,r)?e.tag=e.tagMap[r]+s:r==="!"?e.tag="!"+s:r==="!!"?e.tag="tag:yaml.org,2002:"+s:H(e,'undeclared tag handle "'+r+'"'),!0}function bS(e){var n,t;if(t=e.input.charCodeAt(e.position),t!==38)return!1;for(e.anchor!==null&&H(e,"duplication of an anchor property"),t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!ht(t)&&!jr(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&H(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function kS(e){var n,t,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!ht(i)&&!jr(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&H(e,"name of an alias node must contain at least one character"),t=e.input.slice(n,e.position),ci.call(e.anchorMap,t)||H(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],Fe(e,!0,-1),!0}function Wr(e,n,t,i,r){var s,o,a,l=1,c=!1,u=!1,d,p,m,f,h,g;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=a=dc===t||Yg===t,i&&Fe(e,!0,-1)&&(c=!0,e.lineIndent>n?l=1:e.lineIndent===n?l=0:e.lineIndent<n&&(l=-1)),l===1)for(;yS(e)||bS(e);)Fe(e,!0,-1)?(c=!0,a=s,e.lineIndent>n?l=1:e.lineIndent===n?l=0:e.lineIndent<n&&(l=-1)):a=!1;if(a&&(a=c||r),(l===1||dc===t)&&(uc===t||Kg===t?h=n:h=n+1,g=e.position-e.lineStart,l===1?a&&(Lg(e,g)||gS(e,g,h))||fS(e,h)?u=!0:(o&&hS(e,h)||pS(e,h)||mS(e,h)?u=!0:kS(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&H(e,"alias node should no Line truncated
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var t=new uS(e,n),i=e.indexOf("\0");for(i!==-1&&(t.position=i,H(t,"null byte is not allowed in input")),t.input+="\0";t.input.charCodeAt(t.position)===32;)t.lineIndent+=1,t.position+=1;for(;t.position<t.length-1;)vS(t);return t.documents}function wS(e,n,t){n!==null&&typeof n=="object"&&typeof t>"u"&&(t=n,n=null);var i=Ug(e,t);if(typeof n!="function")return i;for(var r=0,s=i.length;r<s;r+=1)n(i[r])}function AS(e,n){var t=Ug(e,n);if(t.length!==0){if(t.length===1)return t[0];throw new ut("expected a single document in the stream, but found more")}}var SS=wS,LS=AS,jg={loadAll:SS,load:LS},Vg=Object.prototype.toString,Wg=Object.prototype.hasOwnProperty,lp=65279,ES=9,mo=10,xS=13,TS=32,OS=33,CS=34,tp=35,MS=37,IS=38,BS=39,FS=42,Gg=44,RS=45,mc=58,DS=61,NS=62,_S=63,KS=64,Qg=91,Zg=93,YS=96,Jg=123,PS=124,Xg=125,it={};it[0]="\\0";it[7]="\\a";it[8]="\\b";it[9]="\\t";it[10]="\\n";it[11]="\\v";it[12]="\\f";it[13]="\\r";it[27]="\\e";it[34]='\\"';it[92]="\\\\";it[133]="\\N";it[160]="\\_";it[8232]="\\L";it[8233]="\\P";var zS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],HS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qS(e,n){var t,i,r,s,o,a,l;if(n===null)return{};for(t={},i=Object.keys(n),r=0,s=i.length;r<s;r+=1)o=i[r],a=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Wg.call(l.styleAliases,a)&&(a=l.styleAliases[a]),t[o]=a;return t}function $S(e){var n,t,i;if(n=e.toString(16).toUpperCase(),e<=255)t="x",i=2;else if(e<=65535)t="u",i=4;else if(e<=4294967295)t="U",i=8;else throw new ut("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+t+Ke.repeat("0",i-n.length)+n}var US=1,fo=2;function jS(e){this.schema=e.schema||_g,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ke.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qS(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?fo:US,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Eg(e,n){for(var t=Ke.repeat(" ",n),i=0,r=-1,s="",o,a=e.length;i<a;)r=e.indexOf(`
`,i),r===-1?(o=e.slice(i),i=a):(o=e.slice(i,r+1),i=r+1),o.length&&o!==`
`&&(s+=t),s+=o;return s}function np(e,n){return`
`+Ke.repeat(" ",e.indent*n)}function VS(e,n){var t,i,r;for(t=0,i=e.implicitTypes.length;t<i;t+=1)if(r=e.implicitTypes[t],r.resolve(n))return!0;return!1}function fc(e){return e===TS||e===ES}function ho(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==lp||65536<=e&&e<=1114111}function xg(e){return ho(e)&&e!==lp&&e!==xS&&e!==mo}function Tg(e,n,t){var i=xg(e),r=i&&!fc(e);return(t?i:i&&e!==Gg&&e!==Qg&&e!==Zg&&e!==Jg&&e!==Xg)&&e!==tp&&!(n===mc&&!r)||xg(n)&&!fc(n)&&e===tp||n===mc&&r}function WS(e){return ho(e)&&e!==lp&&!fc(e)&&e!==RS&&e!==_S&&e!==mc&&e!==Gg&&e!==Qg&&e!==Zg&&e!==Jg&&e!==Xg&&e!==tp&&e!==IS&&e!==FS&&e!==OS&&e!==PS&&e!==DS&&e!==NS&&e!==BS&&e!==CS&&e!==MS&&e!==KS&&e!==YS}function GS(e){return!fc(e)&&e!==mc}function uo(e,n){var t=e.charCodeAt(n),i;return t>=55296&&t<=56319&&n+1<e.length&&(i=e.charCodeAt(n+1),i>=56320&&i<=57343)?(t-55296)*1024+i-56320+65536:t}function ey(e){var n=/^\n* /;return n.test(e)}var ty=1,ip=2,ny=3,iy=4,Ur=5;function QS(e,n,t,i,r,s,o,a){var l,c=0,u=null,d=!1,p=!1,m=i!==-1,f=-1,h=WS(uo(e,0))&&GS(uo(e,e.length-1));if(n||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=uo(e,l),!ho(c))return Ur;h=h&&Tg(c,u,a),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=uo(e,l),c===mo)d=!0,m&&(p=p||l-f-1>i&&e[f+1]!==" ",f=l);else if(!ho(c))return Ur;h=h&&Tg(c,u,a),u=c}p=p||m&&l-f-1>i&&e[f+1]!==" "}return!d&&!p?h&&!o&&!r(e)?ty:s===fo?Ur:ip:t>9&&ey(e)?Ur:o?s===fo?Ur:ip:p?iy:ny}function ZS(e,n,t,i,r){e.dump=function(){if(n.length===0)return e.quotingType===fo?'""':"''";if(!e.noCompatMode&&(zS.indexOf(n)!==-1||HS.test(n)))return e.quotingType===fo?'"'+n+'"':"'"+n+"'";var s=e.indent*Math.max(1,t),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),a=i||e.flowLevel>-1&&t>=e.flowLevel;function l(c){return VS(e,c)}switch(QS(n,a,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,r)){case ty:return n;case ip:return"'"+n.replace(/'/g,"''")+"'";case ny:return"|"+Og(n,e.indent)+Cg(Eg(n,s));case iy:return">"+Og(n,e.indent)+Cg(Eg(JS(n,o),s));case Ur:return'"'+XS(n)+'"';default:throw new ut("impossible error: invalid scalar style")}}()}function Og(e,n){var t=ey(e)?String(n):"",i=e[e.length-1]===`
`,r=i&&(e[e.length-2]===`
`||e===`
`),s=r?"+":i?"":"-";return t+s+`
`}function Cg(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function JS(e,n){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
`);return c=c!==-1?c:e.length,t.lastIndex=c,Mg(e.slice(0,c),n)}(),r=e[0]===`
`||e[0]===" ",s,o;o=t.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!r&&!s&&l!==""?`
`:"")+Mg(l,n),r=s}return i}function Mg(e,n){if(e===""||e[0]===" ")return e;for(var t=/ [^ ]/g,i,r=0,s,o=0,a=0,l="";i=t.exec(e);)a=i.index,a-r>n&&(s=o>r?o:a,l+=`
`+e.slice(r,s),r=s+1),o=a;return l+=`
`,e.length-r>n&&o>r?l+=e.slice(r,o)+`
`+e.slice(o+1):l+=e.slice(r),l.slice(1)}function XS(e){for(var n="",t=0,i,r=0;r<e.length;t>=65536?r+=2:r++)t=uo(e,r),i=it[t],!i&&ho(t)?(n+=e[r],t>=65536&&(n+=e[r+1])):n+=i||$S(t);return n}function e0(e,n,t){var i="",r=e.tag,s,o,a;for(s=0,o=t.length;s<o;s+=1)a=t[s],e.replacer&&(a=e.replacer.call(t,String(s),a)),(Bn(e,n,a,!1,!1)||typeof a>"u"&&Bn(e,n,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=r,e.dump="["+i+"]"}function Ig(e,n,t,i){var r="",s=e.tag,o,a,l;for(o=0,a=t.length;o<a;o+=1)l=t[o],e.replacer&&(l=e.replacer.call(t,String(o),l)),(Bn(e,n+1,l,!0,!0,!1,!0)||typeof l>"u"&&Bn(e,n+1,null,!0,!0,!1,!0))&&((!i||r!=="")&&(r+=np(e,n)),e.dump&&mo===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=s,e.dump=r||"[]"}function t0(e,n,t){var i="",r=e.tag,s=Object.keys(t),o,a,l,c,u;for(o=0,a=s.length;o<a;o+=1)u="",i!==""&&(u+=", "),e.condenseFlow&&(u+='"'),l=s[o],c=t[l],e.replacer&&(c=e.replacer.call(t,l,c)),Bn(e,n,l,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Bn(e,n,c,!1,!1)&&(u+=e.dump,i+=u));e.tag=r,e.dump="{"+i+"}"}function n0(e,n,t,i){var r="",s=e.tag,o=Object.keys(t),a,l,c,u,d,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ut("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)p="",(!i||r!=="")&&(p+=np(e,n)),c=o[a],u=t[c],e.replacer&&(u=e.replacer.call(t,c,u)),Bn(e,n+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&mo===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=np(e,n)),Bn(e,n+1,u,!0,d)&&(e.dump&&mo===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,r+=p));e.tag=s,e.dump=r||"{}"}function Bg(e,n,t){var i,r,s,o,a,l;for(r=t?e.explicitTypes:e.implicitTypes,s=0,o=r.length;s<o;s+=1)if(a=r[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof n=="object"&&n instanceof a.instanceOf)&&(!a.predicate||a.predicate(n))){if(t?a.multi&&a.representName?e.tag=a.representName(n):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,Vg.call(a.represent)==="[object Function]")i=a.represent(n,l);else if(Wg.call(a.represent,l))i=a.represent[l](n,l);else throw new ut("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function Bn(e,n,t,i,r,s,o){e.tag=null,e.dump=t,Bg(e,t,!1)||Bg(e,t,!0);var a=Vg.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>n);var u=a==="[object Object]"||a==="[object Array]",d,p;if(u&&(d=e.duplicates.indexOf(t),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(r=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(u&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),a==="[object Object]")i&&Object.keys(e.dump).length!==0?(n0(e,n,e.dump,r),p&&(e.dump="&ref_"+d+e.dump)):(t0(e,n,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(a==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?Ig(e,n-1,e.dump,r):Ig(e,n,e.dump,r),p&&(e.dump="&ref_"+d+e.dump)):(e0(e,n,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&ZS(e,e.dump,n,s,l);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ut("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function i0(e,n){var t=[],i=[],r,s;for(rp(e,t,i),r=0,s=i.length;r<s;r+=1)n.duplicates.push(t[i[r]]);n.usedDuplicates=new Array(s)}function rp(e,n,t){var i,r,s;if(e!==null&&typeof e=="object")if(r=n.indexOf(e),r!==-1)t.indexOf(r)===-1&&t.push(r);else if(n.push(e),Array.isArray(e))for(r=0,s=e.length;r<s;r+=1)rp(e[r],n,t);else for(i=Object.keys(e),r=0,s=i.length;r<s;r+=1)rp(e[i[r]],n,t)}function r0(e,n){n=n||{};var t=new jS(n);t.noRefs||i0(e,t);var i=e;return t.replacer&&(i=t.replacer.call({"":i},"",i)),Bn(t,0,i,!0,!0)?t.dump+`
`:""}var s0=r0,o0={dump:s0};function cp(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var mP=jg.load,fP=jg.loadAll,hP=o0.dump,ry=ut;var gP=cp("safeLoad","load"),yP=cp("safeLoadAll","loadAll"),bP=cp("safeDump","dump");var Gr=class e extends Error{constructor(n,t){super(n),this.cause=t??null,this.stack=t.stack??null,Object.setPrototypeOf(this,e.prototype)}};var y={code:{replaceAction:"code",placeholder:"{CODE_BLOCK_PLACEHOLDER}"},inlineCode:{replaceAction:"inlineCode",placeholder:"{INLINE_CODE_BLOCK_PLACEHOLDER}"},image:{replaceAction:"image",placeholder:"{IMAGE_PLACEHOLDER}"},thematicBreak:{replaceAction:"thematicBreak",placeholder:"{HORIZONTAL_RULE_PLACEHOLDER}"},italics:{replaceAction:"emphasis",placeholder:"{ITALICS_PLACEHOLDER}"},bold:{replaceAction:"strong",placeholder:"{STRONG_PLACEHOLDER}"},list:{replaceAction:"list",placeholder:"{LIST_PLACEHOLDER}"},blockquote:{replaceAction:"blockquote",placeholder:"{BLOCKQUOTE_PLACEHOLDER}"},math:{replaceAction:"math",placeholder:"{MATH_PLACEHOLDER}"},inlineMath:{replaceAction:"inlineMath",placeholder:"{INLINE_MATH_PLACEHOLDER}"},html:{replaceAction:"html",placeholder:"{HTML_PLACEHOLDER}"},yaml:{replaceAction:je,placeholder:at(`---
---`)},wikiLink:{replaceAction:rl,placeholder:"{WIKI_LINK_PLACEHOLDER}"},obsidianMultiLineComments:{replaceAction:Kf,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},footnoteAtStartOfLine:{replaceAction:il,placeholder:"{FOOTNOTE_AT_START_OF_LINE_PLACEHOLDER}"},footnoteAfterATask:{replaceAction:/- \[.] (\[\^\w+\]) ?([,.;!:?])/gm,placeholder:"{FOOTNOTE_AFTER_A_TASK_PLACEHOLDER}"},url:{replaceAction:Li,placeholder:"{URL_PLACEHOLDER}"},anchorTag:{replaceAction:Pf,placeholder:"{ANCHOR_PLACEHOLDER}"},templaterCommand:{replaceAction:Uf,placeholder:"{TEMPLATER_PLACEHOLDER}"},link:{replaceAction:c0,placeholder:"{REGULAR_LINK_PLACEHOLDER}"},tag:{replaceAction:u0,placeholder:"#tag-placeholder"},table:{replaceAction:d0,placeholder:"{TABLE_PLACEHOLDER}"},customIgnore:{replaceAction:p0,placeholder:"{CUSTOM_IGNORE_PLACEHOLDER}"}};function ve(e,n,t){let i=[];for(let r of e){let s;if(typeof r.replaceAction=="string")s=a0(n,r.placeholder,r.replaceAction);else if(r.replaceAction instanceof RegExp)s=l0(n,r.placeholder,r.replaceAction);else if(typeof r.replaceAction=="function"){let o=r.replaceAction;s=o(n,r.placeholder)}n=s.newText,i.push({replacedValues:s.replacedValues,placeholder:r.placeholder})}return n=t(n),i=i.reverse(),i!=null&&i.length>0&&i.forEach(r=>{r.replacedValues.forEach(s=>{n=n.replace(new RegExp(r.placeholder,"i"),at(s))})}),n}function a0(e,n,t){let i=Se(t,e),r=[];t==="list"&&(i=m0(i));for(let s of i){let o=e.substring(s.start.offset,s.end.offset);r.push(o),e=me(e,s.start.offset,s.end.offset,n)}return r.reverse(),{newText:e,replacedValues:r}}function l0(e,n,t){let i=e.match(t),r=[];if(t.flags.includes("g")){if(e=e.replaceAll(t,n),i)for(let s of i)r.push(s)}else e=e.replace(t,n),i&&r.push(i[0]);return{newText:e,replacedValues:r}}function c0(e,n){let t=Se("link",e),i=[];for(let r of t){if(r==null)continue;let s=e.substring(r.start.offset,r.end.offset);s.match(Os)&&(i.push(s),e=me(e,r.start.offset,r.end.offset,n))}return i.reverse(),{newText:e,replacedValues:i}}function u0(e,n){let t=[];return e=e.replace(Cs,(i,r,s)=>(t.push(s),r+n)),{newText:e,replacedValues:t}}function d0(e,n){let t=kr(e),i=new Array(t.length),r=0,s=i.length;for(let o of t)i[s-1-r++]=e.substring(o.startIndex,o.endIndex),e=me(e,o.startIndex,o.endIndex,n);return{newText:e,replacedValues:i}}function p0(e,n){let t=Cf(e),i=new Array(t.length),r=0,s=i.length;for(let o of t)i[s-1-r++]=e.substring(o.startIndex,o.endIndex),e=me(e,o.startIndex,o.endIndex,n);return{newText:e,replacedValues:i}}function m0(e){if(e.length<2)return e;let n=e.pop(),t=null,i=[n];for(;e.length>0;)t=e.pop(),(n.start.offset>=t.end.offset||t.start.offset>=n.end.offset)&&(i.unshift(t),n=t);return i}var K=(o=>(o.YAML="YAML",o.HEADING="Heading",o.FOOTNOTE="Footnote",o.CONTENT="Content",o.SPACING="Spacing",o.PASTE="Paste",o))(K||{}),gc=class{constructor(n,t,i,r,s,o,a=[],l=!1,c=[],u=null){this.nameKey=n;this.descriptionKey=t;this.settingsKey=i;this.alias=r;this.type=s;this.applyAfterIgnore=o;this.options=a;this.hasSpecialExecutionOrder=l;this.ignoreTypes=c;this.ruleHeading=this.getName().toLowerCase().replaceAll(" ","-"),a.unshift(new ai("enabled",this.descriptionKey,"",!1,r,(d,p)=>{if(d&&u&&u(d,p),a.length>1)for(let m=1;m<a.length;m++)d?a[m].unhide():a[m].hide()}));for(let d of a)d.ruleAlias=r}getDefaultOptions(){let n={};for(let t of this.options)n[t.configKey]=t.defaultValue;return n}getOptions(n){return n.ruleConfigs[this.settingsKey]}getName(){return E(this.nameKey)}getDescription(){return E(this.descriptionKey)}getURL(){return"https://platers.github.io/obsidian-linter/settings/"+this.type.toLowerCase()+"-rules/#"+this.ruleHeading}enabledOptionName(){return this.options[0].configKey}apply(n,t){return ve(this.ignoreTypes,n,i=>this.applyAfterIgnore(i,t))}};var oy=Object.values(K);function yc(e){let n=Nr(e);if(n===null)return[[],!1];let t=jh(n);return t.includes("all")?[mn.map(i=>i.alias),!0]:[t,!1]}var mn=[],wt={},Yi=new Map;function ay(e){mn.push(e),wt[e.alias]=e,Yi.has(e.type)?Yi.get(e.type).push(e):Yi.set(e.type,[e])}function ly(){mn.sort((e,n)=>oy.indexOf(e.type)-oy.indexOf(n.type)||e.settingsKey.localeCompare(n.settingsKey))}function bc(e,n){let t;throw e instanceof ry?(t=e.toString(),t=E("logs.wrapper-yaml-error").replace("{ERROR_MESSAGE}",t.substring(t.indexOf(":")+1))):t=E("logs.wrapper-unknown-error").replace("{ERROR_MESSAGE}",e.message),new Gr(`"${n}" encountered an ${t}`,e)}var rs=yi(cy());function f0(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var r=i.reduce(function(a,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(u){var d,p;return(p=(d=u.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):a},[]);if(r.length){var s=new RegExp(`
[ ]{`+Math.min.apply(Math,r)+"}","g");i=i.map(function(a){return a.replace(s,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return n.forEach(function(a,l){var c=o.match(/(?:^|\n)( *)$/),u=c?c[1]:"",d=a;typeof a=="string"&&a.includes(`
`)&&(d=String(a).split(`
`).map(function(p,m){return m===0?p:""+u+p}).join(`
`)),o+=d+i[l+1]}),o}var uy=f0;var su=require("obsidian");var Zr,go,ui,dt=class dt{static getRule(){if(!z(dt,Zr).has(this.name)){let n=new this,t=new gc(n.nameKey,n.descriptionKey,n.settingsKey,n.alias,n.type,n.safeApply.bind(n),n.optionBuilders.map(i=>i.option),n.hasSpecialExecutionOrder,n.ignoreTypes,n.disableConflictingOptions);z(dt,Zr).set(this.name,t),z(dt,go).set(n.alias,n)}return z(dt,Zr).get(this.name)}static applyIfEnabledBase(n,t,i,r){let s=n.getOptions(i);if(s[n.enabledOptionName()]){bi(n.alias);let o=Object.assign({},s,r);pt(`${E("logs.run-rule-text")} ${n.getName()}`);try{let a=n.apply(t,o);return Yn(n.alias),pt(a),[a,!0]}catch(a){Yn(n.alias),bc(a,n.getName())}}else return[t,!1]}static getBuilderByName(n){return z(dt,go).get(n)}static setNoSettingControl(n,t){z(dt,ui).has(n)||z(dt,ui).set(n,[]),z(dt,ui).get(n).push(t)}static hasSettingControl(n,t){return!z(dt,ui).has(n)||!z(dt,ui).get(n).includes(t)}};Zr=new WeakMap,go=new WeakMap,ui=new WeakMap,Ie(dt,Zr,new Map),Ie(dt,go,new Map),Ie(dt,ui,new Map);var di=dt,v=class extends di{constructor(n){super(),this.alias=n.nameKey.substring(6,n.nameKey.length-5),this.settingsKey=this.alias,this.nameKey=n.nameKey,this.descriptionKey=n.descriptionKey,this.type=n.type,this.hasSpecialExecutionOrder=n.hasSpecialExecutionOrder??!1,this.disableConflictingOptions=n.disableConflictingOptions??null,n.ruleIgnoreTypes?this.ignoreTypes=[y.customIgnore,...n.ruleIgnoreTypes]:this.ignoreTypes=[y.customIgnore]}static register(n){let t=n.getRule();ay(t)}safeApply(n,t){return this.apply(n,this.buildRuleOptions(t))}buildRuleOptions(n){n=n??{};let t=new this.OptionsClass,i=Object.assign(t,n);for(let r of this.optionBuilders)r.setRuleOption(i,n);return i}static applyIfEnabled(n,t,i,r){let s=this.getRule();return i.includes(s.alias)?(pt(s.alias+" "+E("logs.disabled-text")),[n,!1]):di.applyIfEnabledBase(s,n,t,r)}static getRuleOptions(n){let t=di.getRule.bind(this)(),i=new this,r=t.getOptions(n);return i.buildRuleOptions(r)}static noSettingControl(){return(n,t)=>{let i=n.constructor.name;di.setNoSettingControl(i,t)}}};var Jr,Fn=class{constructor(n){Ie(this,Jr,void 0);this.OptionsClass=n.OptionsClass;let t=n.nameKey.split(".");t.length==1?this.configKey=t[0]:this.configKey=t[t.length-2],this.nameKey=n.nameKey,this.descriptionKey=n.descriptionKey,this.optionsKey=n.optionsKey}get defaultValue(){return new this.OptionsClass()[this.optionsKey]}get option(){return z(this,Jr)||Pe(this,Jr,this.buildOption()),z(this,Jr)}setRuleOption(n,t){let i=t[this.configKey];i!==void 0&&(n[this.optionsKey]=i)}};Jr=new WeakMap;var j=class extends Fn{constructor(n){super(n),this.onChange=n.onChange??null}buildOption(){return new ai(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue,null,this.onChange)}},kc=class extends Fn{buildOption(){return new co(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue)}},ie=class extends Fn{constructor(n){super(n),this.records=n.records.map(t=>new ac("enums."+t.value,t.description))}buildOption(){return new lc(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue,this.records)}},ge=class extends Fn{constructor(n){super(n),this.separator=n.separator??`
`,this.splitter=n.splitter??/\n/}buildOption(){return new sc(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue.join(this.separator))}setRuleOption(n,t){if(t[this.configKey]!==void 0){let i=t[this.configKey].split(this.splitter).filter(function(r){return r!=""});n[this.optionsKey]=i}}},Ce=class extends Fn{buildOption(){return new co(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue)}},vc=class extends Fn{buildOption(){return new oc(this.configKey,this.nameKey,this.descriptionKey,this.defaultValue)}},wc=class extends Fn{buildOption(){return new cc(this.configKey,this.nameKey,this.descriptionKey)}};var up=class{},pi=class extends v{constructor(){super({nameKey:"rules.add-blank-line-after-yaml.name",descriptionKey:"rules.add-blank-line-after-yaml.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return up}apply(n,t){let i=n.match(je);if(i===null)return n;let r=i[0],s=n.indexOf(r)+r.length;return s+1>=n.length||n.trimEnd()===r.trimEnd()||n.charAt(s+1)===`
`?n:n.replace(r,r+`
`)}get optionBuilders(){return[]}};pi=T([v.register],pi);var Pi=class{constructor(){this.ignoreWords=[];this.extraAutoCorrectFiles=[];this.skipWordsWithMultipleCapitals=!1;this.misspellingToCorrection=new Map}};T([v.noSettingControl()],Pi.prototype,"misspellingToCorrection",2);var zi=class extends v{constructor(){super({nameKey:"rules.auto-correct-common-misspellings.name",descriptionKey:"rules.auto-correct-common-misspellings.description",type:"Content",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[y.yaml,y.code,y.inlineCode,y.math,y.inlineMath,y.link,y.wikiLink,y.tag,y.image,y.url]})}get OptionsClass(){return Pi}apply(n,t){return n.replaceAll(zf,i=>this.replaceWordWithCorrectCasing(i,t))}replaceWordWithCorrectCasing(n,t){let i=n.toLowerCase();if(t.ignoreWords.includes(i)||t.skipWordsWithMultipleCapitals&&n.length>1&&i.substring(1)!==n.substring(1))return n;if(t.misspellingToCorrection.has(i))return this.determineCorrectedWord(n,t.misspellingToCorrection.get(i));if(t.extraAutoCorrectFiles){for(let r=0;r<t.extraAutoCorrectFiles.length;r++)if(t.extraAutoCorrectFiles[r].customReplacements instanceof Map&&t.extraAutoCorrectFiles[r].customReplacements?.has(i))return this.determineCorrectedWord(n,t.extraAutoCorrectFiles[r].customReplacements.get(i))}return n}determineCorrectedWord(n,t){return n.charAt(0)==n.charAt(0).toUpperCase()&&(t=t.charAt(0).toUpperCase()+t.substring(1)),t}get optionBuilders(){return[new ge({OptionsClass:Pi,nameKey:"rules.auto-correct-common-misspellings.ignore-words.name",descriptionKey:"rules.auto-correct-common-misspellings.ignore-words.description",optionsKey:"ignoreWords",splitter:Ms,separator:", "}),new j({OptionsClass:Pi,nameKey:"rules.auto-correct-common-misspellings.skip-words-with-multiple-capitals.name",descriptionKey:"rules.auto-correct-common-misspellings.skip-words-with-multiple-capitals.description",optionsKey:"skipWordsWithMultipleCapitals"}),new wc({OptionsClass:Pi,nameKey:"rules.auto-correct-common-misspellings.extra-auto-correct-files.name",descriptionKey:"rules.auto-correct-common-misspellings.extra-auto-correct-files.description",optionsKey:"extraAutoCorrectFiles"})]}};zi=T([v.register],zi);var Ac=class{constructor(){this.style="space"}},Hi=class extends v{constructor(){super({nameKey:"rules.blockquote-style.name",descriptionKey:"rules.blockquote-style.description",type:"Content",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[y.html,y.code,y.math]})}get OptionsClass(){return Ac}apply(n,t){return t.style==="space"?id(n,i=>this.updateBlockquoteLines(i,this.addSpaceToIndicator)):id(n,i=>this.updateBlockquoteLines(i,this.removeSpaceFromIndicator))}removeSpaceFromIndicator(n,t){return t?n.replace(/>[ \t]+>/g,">>"):n.replace(/>[ \t]+/g,">")}addSpaceToIndicator(n,t){let i=n.replace(/>([^ ]|$)/g,"> $1").replace(/>>/g,"> >");return t?i:i.replace(/>(?:[ \t]{2,}|\t+)/g,"> ")}updateBlockquoteLines(n,t){let i=0,r=0,s="",o="",a=0,l=n,c=!1;do{r=l.indexOf(`
`,i),r===-1&&(r=l.length-1,c=!0),[s,a]=gr(l,r-1);let u=a+s.length+1,d=r;c&&d++;let p=l.substring(u,d);if(p.includes(y.math.placeholder)||p.includes(y.code.placeholder)){i++;continue}let m=nl.test(p);o=t(s,m),a++,l=me(l,a,a+s.length,o),i=r+1+o.length-s.length}while(!c);return l}get optionBuilders(){return[new ie({OptionsClass:Ac,nameKey:"rules.blockquote-style.style.name",descriptionKey:"rules.blockquote-style.style.description",optionsKey:"style",records:[{value:"space",description:"> indicator is followed by a space"},{value:"no space",description:">indicator is not followed by a space"}]})]}};Hi=T([v.register],Hi);var Sc=class{};T([v.noSettingControl()],Sc.prototype,"lineContent",2);var qi=class extends v{constructor(){super({nameKey:"rules.add-blockquote-indentation-on-paste.name",descriptionKey:"rules.add-blockquote-indentation-on-paste.description",type:"Paste"})}get OptionsClass(){return Sc}apply(n,t){let i=/^(\s*)((> ?)+) .*/,r=t.lineContent.match(i);if(!r)return n;let s=r[1]??"",o=r[2]??"";return n.trim().replace(/\n/gm,`
${s}${o} `)}get optionBuilders(){return[]}};qi=T([v.register],qi);var $i=class{constructor(){this.style="Title Case";this.ignoreWords=["macOS","iOS","iPhone","iPad","JavaScript","TypeScript","AppleScript","I"];this.lowercaseWords=["a","an","the","aboard","about","abt.","above","abreast","absent","across","after","against","along","aloft","alongside","amid","amidst","mid","midst","among","amongst","anti","apropos","around","round","as","aslant","astride","at","atop","ontop","bar","barring","before","B4","behind","below","beneath","neath","beside","besides","between","'tween","beyond","but","by","chez","circa","c.","ca.","come","concerning","contra","counting","cum","despite","spite","down","during","effective","ere","except","excepting","excluding","failing","following","for","from","in","including","inside","into","less","like","minus","modulo","mod","near","nearer","nearest","next","notwithstanding","of","o'","off","offshore","on","onto","opposite","out","outside","over","o'er","pace","past","pending","per","plus","post","pre","pro","qua","re","regarding","respecting","sans","save","saving","short","since","sub","than","through","thru","throughout","thruout","till","times","to","t'","touching","toward","towards","under","underneath","unlike","until","unto","up","upon","versus","vs.","v.","via","vice","vis-\xE0-vis","wanting","with","w/","w.","c\u0304","within","w/i","without","'thout","w/o","abroad","adrift","aft","afterward","afterwards","ahead","apart","ashore","aside","away","back","backward","backwards","beforehand","downhill","downstage","downstairs","downstream","downward","downwards","downwind","east","eastward","eastwards","forth","forward","forwards","heavenward","heavenwards","hence","henceforth","here","hereby","herein","hereof","hereto","herewith","home","homeward","homewards","indoors","inward","inwards","leftward","leftwards","north","northeast","northward","northwards","northwest","now","onward","onwards","outdoors","outward","outwards","overboard","overhead","overland","overseas","rightward","rightwards","seaward","seawards","skywards","skyward","south","southeast","southwards","southward","southwest","then","thence","thenceforth","there","thereby","therein","thereof","thereto","therewith","together","underfoot","underground","uphill","upstage","upstairs","upstream","upward","upwards","upwind","west","westward","westwards","when","whence","where","whereby","wherein","whereto","wherewith","although","because","considering","given","granted","if","lest","once","provided","providing","seeing","so","supposing","though","unless","whenever","whereas","wherever","while","whilst","ago","according to","as regards","counter to","instead of","owing to","pertaining to","at the behest of","at the expense of","at the hands of","at risk of","at the risk of","at variance with","by dint of","by means of","by virtue of","by way of","for the sake of","for sake of","for lack of","for want of","from want of","in accordance with","in addition to","in case of","in charge of","in compliance with","in conformity with","in contact with","in exchange for","in favor of","in front of","in lieu of","in light of","in the light of","in line with","in place of","in point of","in quest of","in relation to","in regard to","with regard to","in respect to","with respect to","in return for","in search of","in step with","in touch with","in terms of","in the name of","in view of","on account of","on behalf of","on grounds of","on the grounds of","on the part of","on top of","with a view to","with the exception of","\xE0 la","a la","as soon as","as well as","close to","due to","far from","in case","other than","prior to","pursuant to","regardless of","subsequent to","as long as","as much as","as far as","by the time","in as much as","inasmuch","in order to","in order that","even","provide that","if only","whether","whose","whoever","why","how","or not","whatever","what","both","and","or","not only","but also","either","neither","nor","just","rather","no sooner","such","that","yet","is","it"];this.ignoreCasedWords=!0}},Ui=class extends v{constructor(){super({nameKey:"rules.capitalize-headings.name",descriptionKey:"rules.capitalize-headings.description",type:"Heading",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[y.code,y.inlineCode,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return $i}apply(n,t){return n.replace(Wn,i=>{if(t.style==="ALL CAPS")return i.toUpperCase();let r=t.style==="First letter",s=i.match(/\S+/g),o=t.ignoreWords,a=t.lowercaseWords,l=!0;for(let c=1;c<s.length;c++){if(!s[c].match(/^[\p{L}'-]{1,}[.?!,:;\d]*$/u)||s[c]==="-"||s[c]==="'")continue;if(t.ignoreCasedWords&&s[c]!==s[c].toLowerCase()||o.includes(s[c])||(s[c]=s[c].toLowerCase(),(!a.includes(s[c])&&!r||l===!0)&&(s[c]=s[c][0].toUpperCase()+s[c].slice(1))),l=!1,t.ignoreCasedWords&&r)break}return s.join(" ")})}get optionBuilders(){return[new ie({OptionsClass:$i,nameKey:"rules.capitalize-headings.style.name",descriptionKey:"rules.capitalize-headings.style. Line truncated
`),i=i.replace(/\n+---/,`
---`),t.innerNewLines&&(i=i.replaceAll(/\n{2,}/g,`
`)),i))}get optionBuilders(){return[new j({OptionsClass:Lc,nameKey:"rules.compact-yaml.inner-new-lines.name",descriptionKey:"rules.compact-yaml.inner-new-lines.description",optionsKey:"innerNewLines"})]}};yo=T([v.register],yo);var dp=class{},ji=class extends v{constructor(){super({nameKey:"rules.consecutive-blank-lines.name",descriptionKey:"rules.consecutive-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag],hasSpecialExecutionOrder:!0})}get OptionsClass(){return dp}apply(n,t){return n.replace(/(\n([\t\v\f\r \u00a0\u2000-\u200b\u2028-\u2029\u3000]+)?){2,}\n/g,`
`)}get optionBuilders(){return[]}};ji=T([v.register],ji);var pp=class{},bo=class extends v{constructor(){super({nameKey:"rules.convert-bullet-list-markers.name",descriptionKey:"rules.convert-bullet-list-markers.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return pp}apply(n,t){return n.replace(/^([^\S\n]*)([•§])([^\S\n]*)/gm,"$1-$3")}get optionBuilders(){return[]}};bo=T([v.register],bo);var Ec=class{constructor(){this.tabsize=4}},ko=class extends v{constructor(){super({nameKey:"rules.convert-spaces-to-tabs.name",descriptionKey:"rules.convert-spaces-to-tabs.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Ec}apply(n,t){let i=String(t.tabsize),r=new RegExp("^( *) {"+i+"}","gm");n=this.replaceAllRegexMatches(n,r);let s=new RegExp("^((>( | *))*(>( | )) *) {"+i+"}","gm");return n=this.replaceAllRegexMatches(n,s),n}replaceAllRegexMatches(n,t){for(;n.match(t)!=null;)n=n.replace(t,"$1 ");return n}get optionBuilders(){return[new kc({OptionsClass:Ec,nameKey:"rules.convert-spaces-to-tabs.tabsize.name",descriptionKey:"rules.convert-spaces-to-tabs.tabsize.description",optionsKey:"tabsize"})]}};ko=T([v.register],ko);var en=class{constructor(){this.aliasArrayStyle="single-line";this.dedupeAliasKey=!0;this.tagArrayStyle="single-line";this.dedupeTagKey=!0;this.dedupeArrayKeys=!0;this.ignoreDedupeArrayKeys=[];this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],en.prototype,"aliasArrayStyle",2),T([v.noSettingControl()],en.prototype,"tagArrayStyle",2),T([v.noSettingControl()],en.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],en.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var vo=class extends v{constructor(){super({nameKey:"rules.dedupe-yaml-array-values.name",descriptionKey:"rules.dedupe-yaml-array-values.description",type:"YAML"})}get OptionsClass(){return en}apply(n,t){return Ee(n,i=>{let r=vt(i.replace(`---
`,"").replace(`
---`,""));if(!r)return i;for(let s of Gt)if(t.dedupeAliasKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ni(this.getUniqueArray(ze(ke(i,s)))),t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let s of Wt)if(t.dedupeTagKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ti(this.getUniqueArray(ze(ke(i,s)))),t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(t.dedupeArrayKeys){let s=[...Gt,...Wt,...t.ignoreDedupeArrayKeys];for(let o of Object.keys(r)){if(s.includes(o)||!Array.isArray(r[o])||r[o].length!==0&&typeof r[o][0]=="object"&&r[o][0]!==null)continue;let a=ke(i,o),l="single-line";a.includes(`
`)&&(l="multi-line");let c=this.getUniqueArray(ze(a));i=ue(i,o,Te(c,l,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return i})}getUniqueArray(n){return n==null||typeof n=="string"||n.length<=1?n:[...new Set(n)]}get optionBuilders(){return[new j({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.description",optionsKey:"dedupeAliasKey"}),new j({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.description",optionsKey:"dedupeTagKey"}),new j({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.description",optionsKey:"dedupeArrayKeys"}),new ge({OptionsClass:en,nameKey:"rules.dedupe-yaml-array-values.ignore-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.ignore-keys.description",optionsKey:"ignoreDedupeArrayKeys"})]}};vo=T([v.register],vo);var xc=class{constructor(){this.defaultLanguage=""}},wo=class extends v{constructor(){super({nameKey:"rules.default-language-for-code-fences.name",descriptionKey:"rules.default-language-for-code-fences.description",type:"Content",ruleIgnoreTypes:[y.yaml,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return xc}apply(n,t){return Mf(n,t.defaultLanguage)}get optionBuilders(){return[new Ce({OptionsClass:xc,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};wo=T([v.register],wo);var Tc=class{constructor(){this.style="consistent"}},Ao=class extends v{constructor(){super({nameKey:"rules.emphasis-style.name",descriptionKey:"rules.emphasis-style.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag,y.math,y.inlineMath]})}get OptionsClass(){return Tc}apply(n,t){return tl(n,t.style,"emphasis")}get optionBuilders(){return[new ie({OptionsClass:Tc,nameKey:"rules.emphasis-style.style.name",descriptionKey:"rules.emphasis-style.style.description",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of emphasis is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure * is the emphasis indicator"},{value:"underscore",description:"Makes sure _ is the emphasis indicator"}]})]}};Ao=T([v.register],Ao);var mp=class{},So=class extends v{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return mp}apply(n,t){return Lf(n)}get optionBuilders(){return[]}};So=T([v.register],So);var fp=class{},Lo=class extends v{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return fp}apply(n,t){return Af(n)}get optionBuilders(){return[]}};Lo=T([v.register],Lo);var hp=class{},Eo=class extends v{constructor(){super({nameKey:"rules.empty-line-around-horizontal-rules.name",descriptionKey:"rules.empty-line-around-horizontal-rules.description",type:"Spacing"})}get OptionsClass(){return hp}apply(n,t){return Ef(n)}get optionBuilders(){return[]}};Eo=T([v.register],Eo);var Oc=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};T([v.noSettingControl()],Oc.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var xo=class extends v{constructor(){super({nameKey:"rules.empty-line-around-math-blocks.name",descriptionKey:"rules.empty-line-around-math-blocks.description",type:"Spacing",ruleIgnoreTypes:[y.yaml,y.code]})}get OptionsClass(){return Oc}apply(n,t){return Sf(n,t.minimumNumberOfDollarSignsToBeAMathBlock)}get optionBuilders(){return[]}};xo=T([v.register],xo);var gp=class{},To=class extends v{constructor(){super({nameKey:"rules.empty-line-around-tables.name",descriptionKey:"rules.empty-line-around-tables.description",type:"Spacing",ruleIgnoreTypes:[y.yaml,y.code,y.math,y.inlineMath,y.wikiLink,y.link]})}get OptionsClass(){return gp}apply(n,t){return Wf(n)}get optionBuilders(){return[]}};To=T([v.register],To);var Oo=class{constructor(){this.defaultEscapeCharacter='"';this.tryToEscapeSingleLineArrays=!1}};T([v.noSettingControl()],Oo.prototype,"defaultEscapeCharacter",2);var Vi=class extends v{constructor(){super({nameKey:"rules.escape-yaml-special-characters.name",descriptionKey:"rules.escape-yaml-special-characters.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Oo}apply(n,t){return Ee(n,i=>{let r=i.split(`
`),s=r.length;if(s<1)return i;for(let o=0;o<s;o++){let a=r[o].trim(),l=a.indexOf(":"),c=l<0||l+1>=a.length,u=a.startsWith("-"),d=u&&a.length<2;if(c&&d)continue;let p=1;if(!u)p+=l;else if(l!==-1&&o+1<s){let f=r[o],h=f.indexOf("-")+1;for(;h<f.length&&f.charAt(h)===" ";)h++;let g=0,b=r[o+1];for(;g<b.length&&b.charAt(g)===" ";)g++;h<=g&&(p+=l)}let m=a.substring(p).trim();if(m.startsWith("[")){if(t.tryToEscapeSingleLineArrays){if(m.length<3)continue;let f=m.substring(1,m.length-1).split(","),h=f.length;for(let g=0;g<h;g++){let b=f[g].trim();b.startsWith("[")&&(b=b.substring(1).trimStart()),b.endsWith("]")&&(b=b.substring(0,b.length-1).trimEnd()),f[g]=f[g].replace(b,Qt(b,t.defaultEscapeCharacter,!1,!0))}r[o]=r[o].replace(m,"["+f.join(",")+"]")}continue}r[o]=r[o].replace(m,Qt(m,t.defaultEscapeCharacter,!1,!0))}return r.join(`
`)})}get optionBuilders(){return[new j({OptionsClass:Oo,nameKey:"rules.escape-yaml-special-characters.try-to-escape-single-line-arrays.name",descriptionKey:"rules.escape-yaml-special-characters.try-to-escape-single-line-arrays.description",optionsKey:"tryToEscapeSingleLineArrays"})]}};Vi=T([v.register],Vi);var dy=require("obsidian");var fn=class extends dy.Modal{constructor(n,t,i,r,s){super(n),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:E("warning-text"),cls:"modal-heading"});let o=this.contentEl.createEl("p");o.id="confirm-dialog",ft(E("disabled-other-rule-notice").replace("{NAME_1}",E(t)).replace("{NAME_2}",E(i)),o),this.contentEl.createDiv("modal-button-container",a=>{a.createEl("button",{text:E("cancel-button-text")}).addEventListener("click",()=>{s(),this.close()});let l=a.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:E("ok")});l.addEventListener("click",()=>{this.close(),r()}),setTimeout(()=>{l.focus()},50)})}};var Cc=class{};T([v.noSettingControl()],Cc.prototype,"fileName",2);var Co=class extends v{constructor(){super({nameKey:"rules.file-name-heading.name",descriptionKey:"rules.file-name-heading.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag],disableConflictingOptions(n,t){let i=wt["header-increment"],r=i.options[0],s=i.options[1];n&&r.getValue()&&new fn(t,"rules.file-name-heading.name","rules.header-increment.start-at-h2.name",()=>{s.setValue(!1)},()=>{wt["file-name-heading"].options[0].setValue(!1)}).open()}})}get OptionsClass(){return Cc}apply(n,t){if(n.match(/^#\s.*/m))return n;let r=t.fileName,s=n.indexOf(`
---`);s=s==-1||!n.startsWith(`---
`)?0:s+5;let o=`# ${r}
`;return n.length<s&&(o=`
`+o),ki(n,s,o)}get optionBuilders(){return[]}};Co=T([v.register],Co);var yp=class{},Mo=class extends v{constructor(){super({nameKey:"rules.footnote-after-punctuation.name",descriptionKey:"rules.footnote-after-punctuation.description",type:"Footnote",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.yaml,y.link,y.wikiLink,y.tag,y.footnoteAtStartOfLine,y.footnoteAfterATask]})}get OptionsClass(){return yp}apply(n,t){return n.replace(/(\[\^[^\]]+\]) ?([,.;!:?])/gm,"$2$1")}get optionBuilders(){return[]}};Mo=T([v.register],Mo);var Io=class{constructor(){this.defaultEscapeCharacter='"';this.forceYamlEscape=[]}};T([v.noSettingControl()],Io.prototype,"defaultEscapeCharacter",2);var Wi=class extends v{constructor(){super({nameKey:"rules.force-yaml-escape.name",descriptionKey:"rules.force-yaml-escape.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Io}apply(n,t){return Ee(n,i=>{for(let r of t.forceYamlEscape){let s=ke(i,r);if(s!=null){if(s.includes(`
`)||s.startsWith(" [")||_r(s))continue;s=Qt(s,t.defaultEscapeCharacter,!0),i=ue(i,r," "+s)}}return i})}get optionBuilders(){return[new ge({OptionsClass:Io,nameKey:"rules.force-yaml-escape.force-yaml-escape-keys.name",descriptionKey:"rules.force-yaml-escape.force-yaml-escape-keys.description",optionsKey:"forceYamlEscape"})]}};Wi=T([v.register],Wi);var bp=class{},Gi=class extends v{constructor(){super({nameKey:"rules.format-tags-in-yaml.name",descriptionKey:"rules.format-tags-in-yaml.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return bp}apply(n,t){return Ee(n,i=>i.replace(new RegExp(`^(${eo}|${Id}):[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`,"m"),function(r){return r.replaceAll("#","")}))}get optionBuilders(){return[]}};Gi=T([v.register],Gi);var At=class{constructor(){this.aliasArrayStyle="single-line";this.formatAliasKey=!0;this.tagArrayStyle="single-line";this.formatTagKey=!0;this.defaultArrayStyle="single-line";this.formatArrayKeys=!0;this.forceSingleLineArrayStyle=[];this.forceMultiLineArrayStyle=[];this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],At.prototype,"aliasArrayStyle",2),T([v.noSettingControl()],At.prototype,"tagArrayStyle",2),T([v.noSettingControl()],At.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],At.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var Bo=class extends v{constructor(){super({nameKey:"rules.format-yaml-array.name",descriptionKey:"rules.format-yaml-array.description",type:"YAML"})}get OptionsClass(){return At}apply(n,t){return Ee(n,i=>{let r=vt(i.replace(`---
`,"").replace(`
---`,""));if(!r)return i;for(let s of Gt)if(t.formatAliasKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ni(ze(ke(i,s))),t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let s of Wt)if(t.formatTagKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ti(ze(ke(i,s))),t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(t.formatArrayKeys){let s=[...Gt,...Wt,...t.forceMultiLineArrayStyle,...t.forceSingleLineArrayStyle];for(let o of Object.keys(r))s.includes(o)||!Array.isArray(r[o])||r[o].length!==0&&typeof r[o][0]=="object"&&r[o][0]!==null||(i=ue(i,o,Te(ze(ke(i,o)),t.defaultArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let s of t.forceSingleLineArrayStyle)Object.keys(r).includes(s)&&(i=ue(i,s,Te(ze(ke(i,s)),"single-line",t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let s of t.forceMultiLineArrayStyle)Object.keys(r).includes(s)&&(i=ue(i,s,Te(ze(ke(i,s)),"multi-line",t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays)));return i})}get optionBuilders(){return[new j({OptionsClass:At,nameKey:"rules.format-yaml-array.alias-key.name",descriptionKey:"rules.format-yaml-array.alias-key.description",optionsKey:"formatAliasKey"}),new j({OptionsClass:At,nameKey:"rules.format-yaml-array.tag-key.name",descriptionKey:"rules.format-yaml-array.tag-key.description",optionsKey:"formatTagKey"}),new ie({OptionsClass:At,nameKey:"rules.format-yaml-array.default-array-style.name",descriptionKey:"rules.format-yaml-array.default-array-style.description",optionsKey:"defaultArrayStyle",records:[{value:"multi-line",description:"```key:\\n - value```"},{value:"single-line",description:"```key: [value]```"}]}),new j({OptionsClass:At,nameKey:"rules.format-yaml-array.default-array-keys.name",descriptionKey:"rules.format-yaml-array.default-array-keys.description",optionsKey:"formatArrayKeys"}),new ge({OptionsClass:At,nameKey:"rules.format-yaml-array.force-single-line-array-style.name",descriptionKey:"rules.format-yaml-array.force-single-line-array-style.description",optionsKey:"forceSingleLineArrayStyle"}),new ge({OptionsClass:At,nameKey:"rules.format-yaml-array.force-multi-line-array-style.name",descriptionKey:"rules.format-yaml-array.force-multi-line-array-style.description",optionsKey:"forceMultiLineArrayStyle"})]}};Bo=T([v.register],Bo);var Mc=class{constructor(){this.startAtH2=!1}},Fo=class extends v{constructor(){super({nameKey:"rules.header-increment.name",descriptionKey:"rules.header-increment.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Mc}apply(n,t){let i=0,r=t.startAtH2?2:1,s=[],o=[0,0,0,0,0,0],a=o.length;return n.replace(Wn,(l,c="",u="",d="",p="",m="")=>{let f=u.length;if(f=f<=a?f:a,o[f-1]>=0&&f<i){let h=o.length;for(;s.length!==0&&f<=s[s.length-1];)h=s.pop();s.length===0?h=0:h--;for(let g=o.length-1;g>=h;g--)o[g]=0}if(o[f-1]<=0){let h=i,g=s.length+r;g=g<=a?g:a;for(let b=h;b<f-1;b++)o[b]=g-1;s.push(f),o[f-1]=g}return i=f,c+"#".repeat(o[f-1])+d+p+m})}get optionBuilders(){return[new j({OptionsClass:Mc,nameKey:"rules.header-increment.start-at-h2.name",descriptionKey:"rules.header-increment.start-at-h2.description",optionsKey:"startAtH2",onChange(n,t){let i=wt["file-name-heading"].options[0];n&&i.getValue()&&new fn(t,"rules.header-increment.start-at-h2.name","rules.file-name-heading.name",()=>{i.setValue(!1)},()=>{wt["header-increment"].options[1].setValue(!1)}).open()}})]}};Fo=T([v.register],Fo);var Do=class{constructor(){this.bottom=!0;this.emptyLineAfterYaml=!0}},Ro=class extends v{constructor(){super({nameKey:"rules.heading-blank-lines.name",descriptionKey:"rules.heading-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink]})}get OptionsClass(){return Do}apply(n,t){return t.bottom?(n=n.replace(/^(#+\s.*)/gm,`
$1
`),n=n.replace(/\n+(#+\s.*)/g,`
$1`),n=n.replace(/(^#+\s.*)\n+/gm,`$1
`)):n=n.replace(/^([^#\n][^\n]+)\n+(#+\s.*)/gm,`$1
$2`),n=n.replace(/^\n+(#+\s.*)/,"$1"),n=n.replace(/(#+\s.*)\n+$/,"$1"),t.emptyLineAfterYaml||(n=n.replace(new RegExp("("+je.source+")\\n+(#+\\s.*)"),`$1
$5`)),n}get optionBuilders(){return[new j({OptionsClass:Do,nameKey:"rules.heading-blank-lines.bottom.name",descriptionKey:"rules.heading-blank-lines.bottom.description",optionsKey:"bottom"}),new j({OptionsClass:Do,nameKey:"rules.heading-blank-lines.empty-line-after-yaml.name",descriptionKey:"rules.heading-blank-lines.empty-line-after-yaml.description",optionsKey:"emptyLineAfterYaml"})]}};Ro=T([v.register],Ro);var kp=class{},No=class extends v{constructor(){super({nameKey:"rules.headings-start-line.name",descriptionKey:"rules.headings-start-line.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml]})}get OptionsClass(){return kp}apply(n,t){return n.replaceAll(Wn,i=>i.trimStart())}get optionBuilders(){return[]}};No=T([v.register],No);var Ic=class{constructor(){this.textToInsert=["aliases: ","tags: "]}},_o=class extends v{constructor(){super({nameKey:"rules.insert-yaml-attributes.name",descriptionKey:"rules.insert-yaml-attributes.description",type:"YAML"})}get OptionsClass(){return Ic}apply(n,t){return n=dn(n),Ee(n,i=>{let r=t.textToInsert.reverse(),s=vt(i.match(je)[1]);for(let o of r){let a=o.split(":")[0];Object.prototype.hasOwnProperty.call(s,a)||(i=i.replace(/^---\n/,at(`---
${o}
`)))}return i})}get optionBuilders(){return[new ge({OptionsClass:Ic,nameKey:"rules.insert-yaml-attributes.text-to-insert.name",descriptionKey:"rules.insert-yaml-attributes.text-to-insert.description",optionsKey:"textToInsert"})]}};_o=T([v.register],_o);var vp=class{},Ko=class extends v{constructor(){super({nameKey:"rules.line-break-at-document-end.name",descriptionKey:"rules.line-break-at-document-end.description",type:"Spacing"})}get OptionsClass(){return vp}apply(n,t){return n.length===0||(n=n.replace(/\n+$/g,""),n+=`
`),n}get optionBuilders(){return[]}};Ko=T([v.register],Ko);var wp=class{},Yo=class extends v{constructor(){super({nameKey:"rules.move-footnotes-to-the-bottom.name",descriptionKey:"rules.move-footnotes-to-the-bottom.description",type:"Footnote",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.yaml]})}get OptionsClass(){return wp}apply(n,t){return hf(n)}get optionBuilders(){return[]}};Yo=T([v.register],Yo);var Bc=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};T([v.noSettingControl()],Bc.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Qi=class extends v{constructor(){super({nameKey:"rules.move-math-block-indicators-to-their-own-line.name",descriptionKey:"rules.move-math-block-indicators-to-their-own-line.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.inlineCode],hasSpecialExecutionOrder:!0})}get OptionsClass(){return Bc}apply(n,t){return Of(n,t.minimumNumberOfDollarSignsToBeAMathBlock)}get optionBuilders(){return[]}};Qi=T([v.register],Qi);var mi=class{constructor(){this.tagArrayStyle="single-line";this.howToHandleExistingTags="Nothing";this.tagsToIgnore=[];this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],mi.prototype,"tagArrayStyle",2),T([v.noSettingControl()],mi.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],mi.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var Po=class extends v{constructor(){super({nameKey:"rules.move-tags-to-yaml.name",descriptionKey:"rules.move-tags-to-yaml.description",type:"YAML",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.html,y.wikiLink,y.link]})}get OptionsClass(){return mi}apply(n,t){let i;return ve([y.yaml],n,r=>(i=Gf(r),r)),i.length===0||(n=dn(n),n=Ee(n,r=>{r=r.replace(`---
`,"").replace("---","");let s=[],o=eo;for(let c of Wt){let u=ke(r,c);if(u!=null){s=ti(ze(u)),o=c;break}}let a=new Set;if(typeof s=="string")a.add(s),s=[s];else if(s!=null)for(let c of s)a.add(c);else s=[];for(let c of i){let u=c.trim().substring(1);!a.has(u)&&!t.tagsToIgnore.includes(u)&&(a.add(u),s.push(u))}return`---
${ue(r,o,Te(s,t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),n=ve([y.yaml],n,r=>(t.howToHandleExistingTags!=="Nothing"&&(r=r.replace(Cs,s=>{let o=s.indexOf("#"),a=s.substring(o+1);return t.tagsToIgnore.includes(a)?s:t.howToHandleExistingTags==="Remove hashtag"?s.substring(0,o)+a:""})),r)),n=n.replace(/(\n---)( |\t)+/,"$1")),n}get optionBuilders(){return[new ie({OptionsClass:mi,nameKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.name",descriptionKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.description",optionsKey:"howToHandleExistingTags",records:[{value:"Nothing",description:"Leaves tags in the body of the file alone"},{value:"Remove hashtag",description:"Removes `#` from tags in content body after moving them to the YAML frontmatter"},{value:"Remove whole tag",description:"Removes the whole tag in content body after moving them to the YAML frontmatter. _Note that this removes the first space prior to the tag as well_"}]}),new ge({OptionsClass:mi,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};Po=T([v.register],Po);var Rc=class{constructor(){this.noBareURIs=!1}},Fc="'\"\u2018\u2019\u201C\u201D`[]",V0=["http","ftp","https","smtp"],zo=class extends v{constructor(){super({nameKey:"rules.no-bare-urls.name",descriptionKey:"rules.no-bare-urls.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag,y.image,y.inlineCode,y.anchorTag,y.html]})}get OptionsClass(){return Rc}apply(n,t){let i=n.match(Li);if(i&&(n=this.handleMatches(n,i,!1)),t.noBareURIs){let r=n.match(Yf);r&&(n=this.handleMatches(n,r,!0))}return n}handleMatches(n,t,i){let r=0,s=t.length;for(let o=0;o<s;o++){let a=t[o],l=n.indexOf(a,r),c=l+a.length;a.charAt(0)==="<"&&(a=a.substring(1),l++),a.charAt(a.length-1)===">"&&(a=a.substring(0,a.length-1),c--);let u=l===0?void 0:n.charAt(l-1),d=c>=n.length?void 0:n.charAt(c),p=Hn(a,"(");if(p!=0&&p!=Hn(a,")")&&d==")"?(a+=d,c++,d=c>=n.length?void 0:n.charAt(c)):p==0&&a.endsWith(")")&&(d=")",c--,a=a.substring(0,a.length-1)),this.skipMatch(u,d,a,i)){r=l+a.length;continue}if(u!=null&&u==="<"&&d!=null&&d===">"){let m=l-1;for(;m>0&&n.charAt(m-1)==="<";)m--;let f=c;for(;f<n.length-1&&n.charAt(f+1)===">";)f++;n=me(n,m,f+1,"<"+a+">"),r=l+a.length;continue}n=me(n,l,l+a.length,"<"+a+">"),r=l+a.length+2}return n}skipMatch(n,t,i,r){let s=n!=null&&Fc.includes(n)||Fc.includes(i.charAt(0)),o=t!=null&&Fc.includes(t)||Fc.includes(i.charAt(i.length-1));return s&&o?!0:r?V0.includes(i.substring(0,i.indexOf(":"))):!1}get optionBuilders(){return[new j({OptionsClass:Rc,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};zo=T([v.register],zo);var es=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Ho=class extends v{constructor(){super({nameKey:"rules.ordered-list-style.name",descriptionKey:"rules.ordered-list-style.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.tag]})}get OptionsClass(){return es}apply(n,t){return xf(n,t.numberStyle,t.listEndStyle,t.preserveStart)}get optionBuilders(){return[new ie({OptionsClass:es,nameKey:"rules.ordered-list-style.number-style.name",descriptionKey:"rules.ordered-list-style.number-style.description",optionsKey:"numberStyle",records:[{value:"ascending",description:"Makes sure ordered list items are ascending (i.e. 1, 2, 3, etc.)"},{value:"lazy",description:"Makes sure ordered list item indicators all are the same"},{value:"preserve",description:"Preserves ordered list item indicators as they are"}]}),new ie({OptionsClass:es,nameKey:"rules.ordered-list-style.list-end-style.name",descriptionKey:"rules.ordered-list-style.list-end-style.description",optionsKey:"listEndStyle",records:[{value:".",description:"Makes sure ordered list items indicators end in '.' (i.e `1.`)"},{value:")",description:"Makes sure ordered list item indicators end in ')' (i.e. `1)`)"}]}),new j({OptionsClass:es,nameKey:"rules.ordered-list-style.preserve-start.name",descriptionKey:"rules.ordered-list-style.preserve-start.description",optionsKey:"preserveStart"})]}};Ho=T([v.register],Ho);var Ap=class{},qo=class extends v{constructor(){super({nameKey:"rules.paragraph-blank-lines.name",descriptionKey:"rules.paragraph-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[y.obsidianMultiLineComments,y.yaml,y.table],disableConflictingOptions(n,t){let i=wt["two-spaces-between-lines-with-content"].options[0];n&&i.getValue()&&new fn(t,"rules.paragraph-blank-lines.name","rules.two-spaces-between-lines-with-content.name",()=>{i.setValue(!1)},()=>{wt["paragraph-blank-lines"].options[0].setValue(!1)}).open()}})}get OptionsClass(){return Ap}apply(n,t){return bf(n)}get optionBuilders(){return[]}};qo=T([v.register],qo);var $o=class{};T([v.noSettingControl()],$o.prototype,"lineContent",2),T([v.noSettingControl()],$o.Line truncated
{2,}${i}$`,"gm"),s,o=t;do s=o.match(r),o=o.replaceAll(r,`$1
$4`);while(s);return o}}get OptionsClass(){return Tp}apply(t,i){let r=`(( |\\t)*- ${Ei}( |\\t)+.+)`;t=this.replaceEmptyLinesBetweenList(t,r),t=this.replaceEmptyLinesBetweenList(t,"(( |\\t)*\\d+\\.( |\\t)+.+)"),t=this.replaceEmptyLinesBetweenList(t,"(( |\\t)*\\+( |\\t)+.+)");let a=`(( |\\t)*-(?! ${Ei})( |\\t)+.+)`;return t=this.replaceEmptyLinesBetweenList(t,a),this.replaceEmptyLinesBetweenList(t,"(( |\\t)*\\*( |\\t)+.+)")}get optionBuilders(){return[]}};Qo=T([v.register],Qo);var Op=class{},Zo=class extends v{constructor(){super({nameKey:"rules.remove-empty-list-markers.name",descriptionKey:"rules.remove-empty-list-markers.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Op}apply(n,t){let i=new RegExp(`^${Is}(-|\\*|\\+|\\d+[.)]|- (\\[(.)\\]))\\s*?$`,"gm");return n=n.replace(new RegExp(i.source+"\\n","gm"),""),n=n.replace(new RegExp("\\n"+i.source,"gm"),""),n.replace(i,"")}get optionBuilders(){return[]}};Zo=T([v.register],Zo);var Cp=class{},Jo=class extends v{constructor(){super({nameKey:"rules.remove-hyphenated-line-breaks.name",descriptionKey:"rules.remove-hyphenated-line-breaks.description",type:"Content",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Cp}apply(n,t){return n.replace(/\b[-‐] \b/g,"")}get optionBuilders(){return[]}};Jo=T([v.register],Jo);var Mp=class{},tr=class extends v{constructor(){super({nameKey:"rules.remove-hyphens-on-paste.name",descriptionKey:"rules.remove-hyphens-on-paste.description",type:"Paste"})}get OptionsClass(){return Mp}apply(n,t){return n.replace(/([^\s-])[-‐]\s+\n?(?=\w)/g,"$1")}get optionBuilders(){return[]}};tr=T([v.register],tr);var Ip=class{},nr=class extends v{constructor(){super({nameKey:"rules.remove-leading-or-trailing-whitespace-on-paste.name",descriptionKey:"rules.remove-leading-or-trailing-whitespace-on-paste.description",type:"Paste"})}get OptionsClass(){return Ip}apply(n,t){return n.replace(/^[\n ]+|\s+$/g,"")}get optionBuilders(){return[]}};nr=T([v.register],nr);var Bp=class{},ir=class extends v{constructor(){super({nameKey:"rules.remove-leftover-footnotes-from-quote-on-paste.name",descriptionKey:"rules.remove-leftover-footnotes-from-quote-on-paste.description",ruleIgnoreTypes:[y.wikiLink,y.link,y.image],type:"Paste"})}get OptionsClass(){return Bp}apply(n,t){return n.replace(/(\D)[.,]\d+/g,"$1")}get optionBuilders(){return[]}};ir=T([v.register],ir);var Fp=class{},Xo=class extends v{constructor(){super({nameKey:"rules.remove-link-spacing.name",descriptionKey:"rules.remove-link-spacing.description",type:"Spacing"})}get OptionsClass(){return Fp}apply(n,t){return n=kf(n),Vf(n)}get optionBuilders(){return[]}};Xo=T([v.register],Xo);var Rp=class{},rr=class extends v{constructor(){super({nameKey:"rules.remove-multiple-blank-lines-on-paste.name",descriptionKey:"rules.remove-multiple-blank-lines-on-paste.description",type:"Paste"})}get OptionsClass(){return Rp}apply(n,t){return n.replace(/\n{3,}/g,`
`)}get optionBuilders(){return[]}};rr=T([v.register],rr);var Dp=class{},ea=class extends v{constructor(){super({nameKey:"rules.remove-multiple-spaces.name",descriptionKey:"rules.remove-multiple-spaces.description",type:"Content",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.inlineMath,y.yaml,y.link,y.wikiLink,y.tag,y.table]})}get OptionsClass(){return Dp}apply(n,t){return n=ve([y.list],n,i=>i.replace(/(?!^>)([^\s])( ){2,}([^\s])/gm,"$1 $3")),n=Vn(n,i=>i.replace(/([^\s])( ){2,}([^\s])/gm,"$1 $3")),n}get optionBuilders(){return[]}};ea=T([v.register],ea);var sr=class{constructor(){this.includeFullwidthForms=!0;this.includeCJKSymbolsAndPunctuation=!0;this.includeDashes=!0;this.otherSymbols=""}},ta=class extends v{constructor(){super({nameKey:"rules.remove-space-around-characters.name",descriptionKey:"rules.remove-space-around-characters.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.inlineCode,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return sr}apply(n,t){let i="";if(t.includeFullwidthForms&&(i+="\uFF01-\uFF5E"),t.includeCJKSymbolsAndPunctuation&&(i+="\u3000-\u303F"),t.includeDashes&&(i+="\u2013\u2014"),i+=sn(t.otherSymbols),!i)return n;let r=new RegExp(`([ ])+([${i}])`,"g"),s=new RegExp(`([${i}])([ ])+`,"g"),o=function(l){return l.replace(r,"$2").replace(s,"$1")},a=ve([y.list],n,o);return a=Vn(a,o),a}get optionBuilders(){return[new j({nameKey:"rules.remove-space-around-characters.include-fullwidth-forms.name",descriptionKey:"rules.remove-space-around-characters.include-fullwidth-forms.description",OptionsClass:sr,optionsKey:"includeFullwidthForms"}),new j({nameKey:"rules.remove-space-around-characters.include-cjk-symbols-and-punctuation.name",descriptionKey:"rules.remove-space-around-characters.include-cjk-symbols-and-punctuation.description",OptionsClass:sr,optionsKey:"includeCJKSymbolsAndPunctuation"}),new j({nameKey:"rules.remove-space-around-characters.include-dashes.name",descriptionKey:"rules.remove-space-around-characters.include-dashes.description",OptionsClass:sr,optionsKey:"includeDashes"}),new Ce({nameKey:"rules.remove-space-around-characters.other-symbols.name",descriptionKey:"rules.remove-space-around-characters.other-symbols.description",OptionsClass:sr,optionsKey:"otherSymbols"})]}};ta=T([v.register],ta);var ia=class{constructor(){this.charactersToRemoveSpacesBefore=",!?;:).\u2019\u201D]";this.charactersToRemoveSpacesAfter="\xBF\xA1\u2018\u201C(["}},na=class extends v{constructor(){super({nameKey:"rules.remove-space-before-or-after-characters.name",descriptionKey:"rules.remove-space-before-or-after-characters.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return ia}apply(n,t){let i=sn(t.charactersToRemoveSpacesBefore),r=sn(t.charactersToRemoveSpacesAfter);if(!i&&!r)return n;let s=new RegExp(`([ ])+([${i}])`,"g"),o=new RegExp(`([${r}])([ ])+`,"g"),a=function(c){return c.replace(s,"$2").replace(o,"$1")},l=ve([y.list,y.html],n,a);return l=Vn(l,a),l}get optionBuilders(){return[new Ce({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.description",OptionsClass:ia,optionsKey:"charactersToRemoveSpacesBefore"}),new Ce({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.description",OptionsClass:ia,optionsKey:"charactersToRemoveSpacesAfter"})]}};na=T([v.register],na);var Dc=class{constructor(){this.punctuationToRemove=".,;:!\u3002\uFF0C\uFF1B\uFF1A\uFF01"}},ra=class extends v{constructor(){super({nameKey:"rules.remove-trailing-punctuation-in-heading.name",descriptionKey:"rules.remove-trailing-punctuation-in-heading.description",type:"Heading",ruleIgnoreTypes:[y.code,y.math,y.yaml]})}get OptionsClass(){return Dc}apply(n,t){return n.replaceAll(Wn,(i,r="",s="",o="",a="",l="")=>{if(a==""||a.match(Hf))return i;let c=a.trimEnd(),u=c.charAt(c.length-1);return t.punctuationToRemove.includes(u)?r+s+o+a.substring(0,c.length-1)+a.substring(c.length)+l:i})}get optionBuilders(){return[new Ce({OptionsClass:Dc,nameKey:"rules.remove-trailing-punctuation-in-heading.punctuation-to-remove.name",descriptionKey:"rules.remove-trailing-punctuation-in-heading.punctuation-to-remove.description",optionsKey:"punctuationToRemove"})]}};ra=T([v.register],ra);var Nc=class{constructor(){this.yamlKeysToRemove=[]}},sa=class extends v{constructor(){super({nameKey:"rules.remove-yaml-keys.name",descriptionKey:"rules.remove-yaml-keys.description",type:"YAML"})}get OptionsClass(){return Nc}apply(n,t){let i=t.yamlKeysToRemove;if(i.length===0)return n;let r=Nr(n);if(r===null)return n;let s=r;for(let o of i){let a=o.trim();a.endsWith(":")&&(a=a.substring(0,a.length-1)),s=to(s,a)}return n.replace(r,s)}get optionBuilders(){return[new ge({OptionsClass:Nc,nameKey:"rules.remove-yaml- Line truncated
`,"").replace(`
---`,""));if(!r)return i;for(let s of Gt)if(t.sortAliasKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ni(this.sortArray(ze(ke(i,s)),t.sortOrder)),t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let s of Wt)if(t.sortTagKey&&Object.keys(r).includes(s)){i=ue(i,s,Te(ti(this.sortArray(ze(ke(i,s)),t.sortOrder)),t.tagArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(t.sortArrayKeys){let s=[...Gt,...Wt,...t.ignoreSortArrayKeys];for(let o of Object.keys(r)){if(s.includes(o)||!Array.isArray(r[o])||r[o].length!==0&&typeof r[o][0]=="object"&&r[o][0]!==null)continue;let a=ke(i,o),l="single-line";a.includes(`
`)&&(l="multi-line");let c=this.sortArray(ze(a),t.sortOrder);i=ue(i,o,Te(c,l,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return i})}sortArray(n,t){return n==null||typeof n=="string"||n.length<=1||(n.sort(function(i,r){let s=i.toLowerCase().localeCompare(r.toLowerCase());return s===0?i.localeCompare(r):s}),t==="Ascending Alphabetical")||n.reverse(),n}get optionBuilders(){return[new j({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-alias-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-alias-key.description",optionsKey:"sortAliasKey"}),new j({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-tag-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-tag-key.description",optionsKey:"sortTagKey"}),new j({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-array-keys.name",descriptionKey:"rules.sort-yaml-array-values.sort-array-keys.description",optionsKey:"sortArrayKeys"}),new ge({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.ignore-keys.name",descriptionKey:"rules.sort-yaml-array-values.ignore-keys.description",optionsKey:"ignoreSortArrayKeys"}),new ie({OptionsClass:Bt,nameKey:"rules.sort-yaml-array-values.sort-order.name",descriptionKey:"rules.sort-yaml-array-values.sort-order.description",optionsKey:"sortOrder",records:[{value:"Ascending Alphabetical",description:"Sorts the array values from a to z"},{value:"Descending Alphabetical",description:"Sorts the array values from z to a"}]})]}};oa=T([v.register],oa);var Np=class{},aa=class extends v{constructor(){super({nameKey:"rules.space-after-list-markers.name",descriptionKey:"rules.space-after-list-markers.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.math,y.yaml,y.link,y.wikiLink,y.tag]})}get OptionsClass(){return Np}apply(n,t){return n=n.replace(/^(\s*\d+\.|\s*[-+*])[^\S\r\n]+/gm,"$1 "),n.replace(/^(\s*\d+\.|\s*[-+*]\s+\[[ xX]\])[^\S\r\n]+/gm,"$1 ")}get optionBuilders(){return[]}};aa=T([v.register],aa);var ca=class{constructor(){this.englishNonLetterCharactersAfterCJKCharacters=`-+'"([\xA5$`;this.englishNonLetterCharactersBeforeCJKCharacters=`-+;:'"\xB0%$)]`}},la=class extends v{constructor(){super({nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.description",type:"Spacing",ruleIgnoreTypes:[y.code,y.inlineCode,y.yaml,y.image,y.link,y.wikiLink,y.tag,y.math,y.inlineMath,y.html]})}get OptionsClass(){return ca}apply(n,t){let i=this.buildHeadRegex(t.englishNonLetterCharactersAfterCJKCharacters),r=this.buildTailRegex(t.englishNonLetterCharactersBeforeCJKCharacters),s=`${y.link.placeholder}|${y.inlineMath.placeholder}|${y.inlineCode.placeholder}|${y.wikiLink.placeholder}`.replaceAll("{","\\{").replaceAll("}","\\}"),o=new RegExp(`(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})( *)(${s})`,"gmu"),a=new RegExp(`(${s})( *)(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})`,"gmu"),l=function(u){return u.replace(i,"$1 $3").replace(r,"$1 $3")},c=ve([y.italics,y.bold],n,l);return c=c.replace(o,"$1 $3").replace(a,"$1 $3"),c=vf(c,l),c=wf(c,l),c}buildHeadRegex(n){n&&n!==""&&(n=n.replaceAll(/\s/g,""));let t="";return n&&n.length!=0&&(t=`|[${sn(n)}]`),new RegExp(`(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})( *)(\\[[^[]*\\]\\(.*\\)|\`[^\`]*\`|\\w+${t}|\\*[^*])`,"gmu")}buildTailRegex(n){n&&n!==""&&(n=n.replaceAll(/\s/g,""));let t="";return n&&n.length!=0&&(t=`|[${sn(n)}]`),new RegExp(`(\\[[^[]*\\]\\(.*\\)|\`[^\`]*\`|\\w+${t}|[^*]\\*)( *)(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})`,"gmu")}get optionBuilders(){return[new Ce({OptionsClass:ca,nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.description",optionsKey:"englishNonLetterCharactersBeforeCJKCharacters"}),new Ce({OptionsClass:ca,nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-after.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-after.description",optionsKey:"englishNonLetterCharactersAfterCJKCharacters"})]}};la=T([v.register],la);var _c=class{constructor(){this.style="consistent"}},ua=class extends v{constructor(){super({nameKey:"rules.strong-style.name",descriptionKey:"rules.strong-style.description",type:"Content",ruleIgnoreTypes:[y.code,y.yaml,y.link,y.wikiLink,y.tag,y.math,y.inlineMath]})}get OptionsClass(){return _c}apply(n,t){return tl(n,t.style,"strong")}get optionBuilders(){return[new ie({OptionsClass:_c,nameKey:"rules.strong-style.style.name",descriptionKey:"rules.strong-style.style.description",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of strong is the style that will be usedLine truncated
${t.dateCreatedKey}: [^
]+
`,s=`
${t.dateCreatedKey}:[ ]*
`,o=new RegExp(s),a=new RegExp(r),l=(0,Ft.moment)(t.fileCreatedTime);l.locale(t.locale);let c=t.convertToUTC?l.utc().format(t.format):l.format(t.format),u=`
${t.dateCreatedKey}: ${c}`,d=a.test(n);if(!d&&o.test(n))n=n.replace(o,at(u)+`
`),i=!0;else if(d){if(d){let p=this.getYAMLTimestampString(n,a,t.dateCreatedKey),m=(0,Pp.default)(p);if(t.dateCreatedSourceOfTruth=="frontmatter"&&t.format!==m){let f=this.parseValueToCurrentFormatIfPossible(p,t.format,t.locale,t.convertToUTC);if(f==null)throw new Error(E("logs.invalid-date-format-error").replace("{DATE}",p).replace("{FILE_NAME}",t.fileName));let h=t.convertToUTC?f.utc().format(t.format):f.format(t.format);if(h!==p){let g=`
${t.dateCreatedKey}: ${h}`;n=n.replace(a,at(g)+`
`),i=!0}}else if(t.dateCreatedSourceOfTruth!="frontmatter"){let f=(0,Ft.moment)(p,t.format,t.locale,!0);(f==null||!f.isValid())&&(n=n.replace(a,at(u)+`
`),i=!0)}}}else{let p=n.indexOf(`
---`);n=ki(n,p,`
${t.dateCreatedKey}: ${c}`),i=!0}return[n,i]}handleDateModifiedValue(n,t,i){let r=`
${i.dateModifiedKey}: [^
]+
`,s=`
${i.dateModifiedKey}:[ ]*
`,o=new RegExp(s),a=new RegExp(r),l=(0,Ft.moment)(i.fileModifiedTime);l.locale(i.locale);let c=i.convertToUTC?i.currentTime.utc().format(i.format):i.currentTime.format(i.format),u=`
${i.dateModifiedKey}: ${c}`,d=a.test(n);if(d){let p=(0,Ft.moment)(this.getYAMLTimestampString(n,a,i.dateModifiedKey),i.format,i.locale,!0);(t||p==null||!p.isValid()||i.dateModifiedSourceOfTruth!="user or Linter edits"&&this.getTimeDifferenceInSeconds(p,l,i)>5)&&(n=n.replace(a,at(u)+`
`))}else if(o.test(n))n=n.replace(o,at(u)+`
`);else if(!d){let p=n.indexOf(`
---`);n=ki(n,p,u)}return n}parseValueToCurrentFormatIfPossible(n,t,i,r){if(n==null)return null;let s=r?Ft.moment.utc(n,t,i,!0):(0,Ft.moment)(n,t,i,!0);if(s!=null&&s.isValid())return s;let o=(0,Pp.default)(n);if(o!=null){let a=r?Ft.moment.utc(n,o):(0,Ft.moment)(n,o);a.locale(i);let l=r?a.utc().format(t):a.format(t);return r?Ft.moment.utc(l,t,i,!0):(0,Ft.moment)(l,t,i,!0)}return null}getYAMLTimestampString(n,t,i){return n.match(t)[0].replace(i+":","").trim()}getTimeDifferenceInSeconds(n,t,i){let r=(0,Ft.moment)(t.format(i.format),i.format,i.locale,!0);return Math.abs(n.diff(r,"seconds"))}get optionBuilders(){return[new j({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-created.name",descriptionKey:"rules.yaml-timestamp.date-created.description",optionsKey:"dateCreated"}),new Ce({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-created-key.name",descriptionKey:"rules.yaml-timestamp.date-created-key.description",optionsKey:"dateCreatedKey"}),new ie({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-created-source-of-truth.name",descriptionKey:"rules.yaml-timestamp.date-created-source-of-truth.description",optionsKey:"dateCreatedSourceOfTruth",records:[{value:"file system",description:"The file system date created value is used to set the value of date created in the frontmatter"},{value:"frontmatter",description:"When a value is present in the frontmatter for date created, this value is used as the value for the date created"}]}),new j({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-modified.name",descriptionKey:"rules.yaml-timestamp.date-modified.description",optionsKey:"dateModified"}),new Ce({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-modified-key.name",descriptionKey:"rules.yaml-timestamp.date-modified-key.description",optionsKey:"dateModifiedKey"}),new ie({OptionsClass:$e,nameKey:"rules.yaml-timestamp.date-modified-source-of-truth.name",descriptionKey:"rules.yaml-timestamp.date-modified-source-of-truth.description",optionsKey:"dateModifiedSourceOfTruth",records:[{value:"file system",description:"The file system date modified value is used to set the value of date modified in the frontmatter"},{value:"user or Linter edits",description:"When a value is present in the frontmatter for date modified, date modified is kept as is unless the Linter makes a change to a note or the user edits a note with the setting `{NAME}` set to something other than `{NEVER}`.".replace("{NAME}",E("rules.yaml-timestamp.update-on-file-contents-updated.name")).replace("{NEVER}",E("enums.never"))}]}),new vc({OptionsClass:$e,nameKey:"rules.yaml-timestamp.format.name",descriptionKey:"rules.yaml-timestamp.format.description",optionsKey:"format"}),new j({OptionsClass:$e,nameKey:"rules.yaml-timestamp.convert-to-utc.name",descriptionKey:"rules.yaml-timestamp.convert-to-utc.description",optionsKey:"convertToUTC"}),new ie({OptionsClass:$e,nameKey:"rules.yaml-timestamp.update-on-file-contents-updated.name",descriptionKey:"rules.yaml-timestamp.update-on-file-contents-updated.description",optionsKey:"timestampUpdateOnFileContentUpdated",records:[{value:"never",description:"never"},{value:"after 5 seconds",description:"after 5 seconds"},{value:"after 10 seconds",description:"after 10 seconds"},{value:"after 15 seconds",description:"after 15 seconds"},{value:"after 30 seconds",description:"after 30 seconds"},{value:"after 1 minute",description:"after 1 minute"}]})]}};Dn=T([v.register],Dn);var tn=class{constructor(){this.preserveExistingAliasesSectionStyle=!0;this.keepAliasThatMatchesTheFilename=!1;this.useYamlKeyToKeepTrackOfOldFilenameOrHeading=!0;this.aliasHelperKey=Fd;this.aliasArrayStyle="multi-line";this.defaultEscapeCharacter='"';this.removeUnnecessaryEscapeCharsForMultiLineArrays=!1}};T([v.noSettingControl()],tn.prototype,"aliasArrayStyle",2),T([v.noSettingControl()],tn.prototype,"fileName",2),T([v.noSettingControl()],tn.prototype,"defaultEscapeCharacter",2),T([v.noSettingControl()],tn.prototype,"removeUnnecessaryEscapeCharsForMultiLineArrays",2);var lr=class extends v{constructor(){super({nameKey:"rules.yaml-title-alias.name",descriptionKey:"rules.yaml-title-alias.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return tn}apply(n,t){n=dn(n);let[i,r]=this.getTitleInfo(n,t.fileName,t.aliasArrayStyle,t.defaultEscapeCharacter),s=null,o=n.match(je)[1],a=!t.keepAliasThatMatchesTheFilename&&i===t.fileName,l=o.replace(`---
`,"").replace(`
---`,""),c=vt(o),u=t.aliasHelperKey??Fd;u.endsWith(":")&&(u=u.substring(0,u.length-1)),s=c[u]??null,s!=null&&(s=s+"",s=Qt(s,t.defaultEscapeCharacter,this.forceEscape(s,t.aliasArrayStyle)));let d=null,p=Object.keys(c);for(let m of Gt)if(p.includes(m)){d=m;break}if(d!=null){let m=ke(l,d),f="multi-line",h=m==="",g=!1;!m.includes(`
`)&&!(m==="[]"&&t.aliasArrayStyle==="multi-line")&&(m.match(/^\[.*\]/)===null?(f="single string to single-line",g=!0):f="single-line");let b=ni(ze(m)),k=this.getNewAliasValue(b,a,r,s);k===""?l=to(l,d):t.preserveExistingAliasesSectionStyle?!h&&(g&&r==k||!g||b==k)?l=ue(l,d,Te(k,f,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=ue(l,d,Te(k,t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=ue(l,d,Te(k,t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else a||(l=ue(l,Bd,Te(r,t.aliasArrayStyle,t.defaultEscapeCharacter,t.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!t.useYamlKeyToKeepTrackOfOldFilenameOrHeading||a?l=to(l,u):l=ue(l,u,` ${r}`),n=n.replace(`---
${o}---`,`---
${l}---`),n}getTitleInfo(n,t,i,r){let s=ve([y.code,y.math,y.yaml,y.tag],n,al);s=s||t;let o=Qt(s,r,this.forceEscape(s,i));return[s,o]}forceEscape(n,t){return Ya(n)||n.includes(",")&&(t==="single-line"||t==="single string to single-line"||t==="single string comma delimited")}getNewAliasValue(n,t,i,r){if(n==null)return t?"":i;if(typeof n=="string")t?n===i&&(n=""):r===n?n=i:n=[i,n];else if(r!==null){let s=n.indexOf(r);s===-1&&_r(r)&&(s=n.indexOf(r.substring(1,r.length-1))),s!==-1?t?n.splice(s,1):n[s]=i:n=[i,...n]}else{let s=n.indexOf(i);s!==-1?t&&n.splice(s,1):t||(n=[i,...n])}return n===""||n.length===0?"":n}get optionBuilders(){return[new j({OptionsClass:tn,nameKey:"rules.yaml-title-alias.preserve-existing-alias-section-style.name",descriptionKey:"rules.yaml-title-alias.preserve-existing-alias-section-style.description",optionsKey:"preserveExistingAliasesSectionStyle"}),new j({OptionsClass:tn,nameKey:"rules.yaml-title-alias.keep-alias-that-matches-the-filename.name",descriptionKey:"rules.yaml-title-alias.keep-alias-that-matches-the-filename.description",optionsKey:"keepAliasThatMatchesTheFilename"}),new j({OptionsClass:tn,nameKey:"rules.yaml-title-alias.use-yaml-key-to-keep-track-of-old-filename-or-heading.name",descriptionKey:"rules.yaml-title-alias.use-yaml-key-to-keep-track-of-old-filename-or-heading.description",optionsKey:"useYamlKeyToKeepTrackOfOldFilenameOrHeading"}),new Ce({OptionsClass:tn,nameKey:"rules.yaml-title-alias.alias-helper-key.name",descriptionKey:"rules.yaml-title-alias.alias-helper-key.description",optionsKey:"aliasHelperKey"})]}};lr=T([v.register],lr);var cr=class{constructor(){this.defaultEscapeCharacter='"';this.titleKey="title";this.mode="first-h1-or-filename-if-h1-missing"}};T([v.noSettingControl()],cr.prototype,"fileName",2),T([v.noSettingControl()],cr.prototype,"defaultEscapeCharacter",2);var ur=class extends v{constructor(){super({nameKey:"rules.yaml-title.name",descriptionKey:"rules.yaml-title.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return cr}apply(n,t){n=dn(n);let i="";switch(t.mode){case"filename":i=t.fileName;break;case"first-h1":i=this.getFirstH1Header(n);break;default:i=this.getFirstH1Header(n),i=i||t.fileName}return i=Qt(i,t.defaultEscapeCharacter),Ee(n,r=>{let s=`
${t.titleKey}.*
`,o=new RegExp(s);if(o.test(r))r=r.replace(o,at(`
${t.titleKey}: ${i}
`));else{let a=r.indexOf(`
---`);r=ki(r,a,`
${t.titleKey}: ${i}`)}return r})}getFirstH1Header(n){return ve([y.code,y.math,y.yaml,y.tag],n,al)}get optionBuilders(){return[new Ce({OptionsClass:cr,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new ie({OptionsClass:cr,nameKey:"rules.yaml-title.mode.name",descriptionKey:"rules.yaml-title.mode.description",optionsKey:"mode",records:[{value:"first-h1-or-filename-if-h1-missing",description:"Uses the first H1 in the file or the filename of the file if there is not H1"},{value:"filename",description:"Uses the filename as the title"},{value:"first-h1",description:"Uses the first H1 in the file as the title"}]})]}};ur=T([v.register],ur);var NE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-cog">
<circle cx="6" cy="13" r="3"/>
<path d="m9.7 14.4-.9-.3"/>
<path d="m3.2 11.9-.9-.3"/>
<path d="m4.6 16.7.3-.9"/>
<path d="m7.6 16.7-.4-1"/>
<path d="m4.8 10.3-.4-1"/>
<path d="m2.3 14.6 1-.4"/>
<path d="m8.7 11.8 1-.4"/>
<path d="m7.4 9.3-.3.9"/>
<path d="M14 2v6h6"/>
<path d="M4 5.5V4a2 2 0 0 1 2-2h8.5L20 7.5V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-1.5"/>
</svg>`,_E=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-cog">
<circle cx="18" cy="18" r="3"/>
<path d="M10.5 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v3.5"/>
<path d="m21.7 19.4-.9-.3"/>
<path d="m15.2 16.9-.9-.3"/>
<path d="m16.6 21.7.3-.9"/>
<path d="m19.1 15.2.3-.9"/>
<path d="m19.6 21.7-.4-1"/>
<path d="m16.8 15.3-.4-1"/>
<path d="m14.3 19.6 1-.4"/>
<path d="m20.7 16.8 1-.4"/>
</svg>`,KE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server-cog">
<circle cx="12" cy="12" r="3"/><path d="M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5"/>
<path d="M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5"/>
<path d="M6 6h.01"/><path d="M6 18h.01"/>
<path d="m15.7 13.4-.9-.3"/>
<path d="m9.2 10.9-.9-.3"/>
<path d="m10.6 15.7.3-.9"/>
<path d="m13.6 15.7-.4-1"/>
<path d="m10.8 9.3-.4-1"/>
<path d="m8.3 13.6 1-.4"/>
<path d="m14.7 10.8 1-.4"/>
<path d="m13.4 8.3-.3.9"/>
</svg>`,YE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pilcrow">
<path d="M13 4v16"/>
<path d="M17 4v16"/>
<path d="M19 4H9.5a4.5 4.5 0 0 0 0 9H13"/>
</svg>`,PE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-function-square">
<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/>
<path d="M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3"/>
<path d="M9 11.2h5.7"/>
</svg>`,zE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gantt-chart-square">
<rect width="18" height="18" x="3" y="3" rx="2"/>
<path d="M9 8h7"/>
<path d="M8 12h6"/>
<path d="M11 16h5"/>
</svg>`,HE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clipboard-list">
<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/>
<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>
<path d="M12 11h4"/>
<path d="M12 16h4"/>
<path d="M8 11h.01"/>
<path d="M8 16h.01"/>
</svg>`,qE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-plus">
<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"/>
<path d="M9 10h6"/>
<path d="M12 7v6"/>
</svg>`,$E=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-heading-1">
<path d="M4 12h8"/>
<path d="M4 18V6"/>
<path d="M12 18V6"/>
<path d="m17 12 3-2v8"/>
</svg>`,UE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-superscript">
<path d="m4 19 8-8"/>
<path d="m12 19-8-8"/>
<path d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06"/>
</svg>`,jE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-code-2">
<path d="M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v4"/>
<polyline points="14 2 14 8 20 8"/>
<path d="m9 18 3-3-3-3"/>
<path d="m5 12-3 3 3 3"/>
</svg>`,VE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/>
<circle cx="12" cy="12" r="3"/>
</svg>`,WE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bug-play">
<path d="m8 2 1.88 1.88"/>
<path d="M14.12 3.88 16 2"/>
<path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"/>
<path d="M18 11a4 4 0 0 0-4-4h-4a4 4 0 0 0-4 4v3a6.1 6.1 0 0 0 2 4.5"/>
<path d="M6.53 9C4.6 8.8 3 7.1 3 5"/>
<path d="M6 13H2"/>
<path d="M3 21c0-2.1 1.7-3.9 3.8-4"/>
<path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"/>
<path d="m12 12 8 5-8 5Z"/>
</svg>`,GE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clipboard">
<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/>
<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>
</svg>`,QE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check">
<polyline points="20 6 9 17 4 12"/>
</svg>`,ZE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-x">
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/>
<path d="M14 2v4a2 2 0 0 0 2 2h4"/>
<path d="m14.5 12.5-5 5"/>
<path d="m9.5 12.5 5 5"/>
</svg>`,JE=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-x">
<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>
<path d="m9.5 10.5 5 5"/>
<path d="m14.5 10.5-5 5"/>
</svg>`,we={folder:{id:"lint-folder",source:_E},ignoreFolder:{id:"lint-ignore-folder",source:JE},file:{id:"lint-file",source:NE},ignoreFile:{id:"lint-ignored-file",source:ZE},vault:{id:"lint-vault",source:KE},whitespace:{id:"lint-whitespace",source:YE},math:{id:"lint-math",source:PE},content:{id:"lint-content",source:zE},paste:{id:"lint-paste",source:HE},custom:{id:"lint-custom",source:qE},heading:{id:"lint-heading",source:$E},footer:{id:"lint-footer",source:UE},yaml:{id:"lint-yaml",source:jE},general:{id:"lint-general",source:VE},debug:{id:"lint-debug",source:WE},clipboard:{id:"linter-clipboard",source:GE},success:{id:"linter-success",source:QE}};var ns=require("obsidian");var $c=class{constructor(){this.disabledRules=[]}lintText(n){this.skipFile=!1;let t=n.oldText;if([this.disabledRules,this.skipFile]=yc(t),this.skipFile)return t;bi(E("logs.rule-running"));let i=E("logs.pre-rules");bi(i);let r=this.runBeforeRegularRules(n);Yn(i);let s=!1;for(let l of n.settings.ruleConfigs["auto-correct-common-misspellings"]["extra-auto-correct-files"]??[])if(l.filePath!=""){s=!0;break}let o=E("logs.disabled-text");for(let l of mn){if(this.disabledRules.includes(l.alias)){pt(l.alias+" "+o);continue}else if(l.hasSpecialExecutionOrder||l.type==="Paste")continue;if(l.alias==="auto-correct-common-misspellings"&&s){let c=!1;for(let u of n.settings.ruleConfigs["auto-correct-common-misspellings"]["extra-auto-correct-files"]??[])if(u.filePath==n.fileInfo.path){c=!0;break}if(c){pt(l.alias+" "+o);continue}}[r]=di.applyIfEnabledBase(l,r,n.settings,{fileCreatedTime:n.fileInfo.createdAtFormatted,fileModifiedTime:n.fileInfo.modifiedAtFormatted,fileName:n.fileInfo.name,locale:n.momentLocale,minimumNumberOfDollarSignsToBeAMathBlock:n.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock,aliasArrayStyle:n.settings.commonStyles.aliasArrayStyle,tagArrayStyle:n.settings.commonStyles.tagArrayStyle,defaultEscapeCharacter:n.settings.commonStyles.escapeCharacter,removeUnnecessaryEscapeCharsForMultiLineArrays:n.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays})}let a=E("logs.custom-regex");return bi(a),r=this.runCustomRegexReplacement(n.settings.customRegexes,r),Yn(a),n.oldText=r,this.runAfterRegularRules(t,n)}runBeforeRegularRules(n){let t=n.oldText;return[t]=Gi.applyIfEnabled(t,n.settings,this.disabledRules),[t]=Vi.applyIfEnabled(t,n.settings,this.disabledRules,{defaultEscapeCharacter:n.settings.commonStyles.escapeCharacter}),[t]=Qi.applyIfEnabled(t,n.settings,this.disabledRules,{minimumNumberOfDollarSignsToBeAMathBlock:n.settings.commonStyles.minimumNumberOfDollarSignsToBeAMathBlock}),[t]=zi.applyIfEnabled(t,n.settings,this.disabledRules,{misspellingToCorrection:n.defaultMisspellings}),t}runAfterRegularRules(n,t){let i=t.oldText,r=E("logs.post-rules");bi(r),[i]=Ui.applyIfEnabled(i,t.settings,this.disabledRules),[i]=ur.applyIfEnabled(i,t.settings,this.disabledRules,{fileName:t.fileInfo.name,defaultEscapeCharacter:t.settings.commonStyles.escapeCharacter}),[i]=lr.applyIfEnabled(i,t.settings,this.disabledRules,{fileName:t.fileInfo.name,aliasArrayStyle:t.settings.commonStyles.aliasArrayStyle,defaultEscapeCharacter:t.settings.commonStyles.escapeCharacter,removeUnnecessaryEscapeCharsForMultiLineArrays:t.settings.commonStyles.removeUnnecessaryEscapeCharsForMultiLineArrays}),[i]=Hi.applyIfEnabled(i,t.settings,this.disabledRules),[i]=Wi.applyIfEnabled(i,t.settings,this.disabledRules,{defaultEscapeCharacter:t.settings.commonStyles.escapeCharacter}),[i]=or.applyIfEnabled(i,t.settings,this.disabledRules),[i]=ji.applyIfEnabled(i,t.settings,this.disabledRules);let s=i.match(je);s!=null&&([i]=pi.applyIfEnabled(i,t.settings,this.disabledRules));let o=t.getCurrentTime(),a;[i,a]=Dn.applyIfEnabled(i,t.settings,this.disabledRules,{fileCreatedTime:t.fileInfo.createdAtFormatted,fileModifiedTime:t.fileInfo.modifiedAtFormatted,currentTime:o,alreadyModified:n!=i,locale:t.momentLocale}),s===null&&([i]=pi.applyIfEnabled(i,t.settings,this.disabledRules));let l=Dn.getRuleOptions(t.settings);return o=t.getCurrentTime(),l.convertToUTC&&(o=o.utc()),[i]=ar.applyIfEnabled(i,t.settings,this.disabledRules,{currentTimeFormatted:o.format(l.format.trimEnd()),yamlTimestampDateModifiedEnabled:a&&l.dateModified,dateModifiedKey:l.dateModifiedKey}),Yn(r),Yn(E("logs.rule-running")),i}runCustomCommands(n,t){if(this.skipFile)return;pt(E("logs.running-custom-lint-command"));let i=new Set;for(let r of n)if(!(!r.id||!r.enabled)){if(i.has(r.id)){Et(E("logs.custom-lint-duplicate-warning").replace("{COMMAND_NAME}",r.name));continue}try{i.add(r.id),t.executeCommandById(r.id)}catch(s){bc(s,`${E("logs.custom-lint-error-message")} ${r.id}`)}}}runCustomRegexReplacement(n,t){return ve([y.customIgnore],t,i=>{pt(E("logs.running-custom-regex"));let r=i,s=i;for(let o of n){let a=o.find===void 0||o.find==""||o.find===null,l=o.replace===void 0||o.replace===null;if(a||l||!o.enabled)continue;let c=o.label;c&&c.trim()!=""&&(c+=`:
`),c+=`/${o.find}/${o.flags}/${o.replace}/`,pt(c);let u=new RegExp(`${o.find}`,o.flags);r=r.replace(u,Lm(o.replace)),s!=r&&pt(r),s=r}return r})}runPasteLint(n,t,i){let r=i.oldText;return[r]=tr.applyIfEnabled(r,i.settings,[]),[r]=rr.applyIfEnabled(r,i.settings,[]),[r]=ir.applyIfEnabled(r,i.settings,[]),[r]=Xi.applyIfEnabled(r,i.settings,[]),[r]=nr.applyIfEnabled(r,i.settings,[]),[r]=Zi.applyIfEnabled(r,i.settings,[],{lineContent:n,selectedText:t}),[r]=Ji.applyIfEnabled(r,i.settings,[],{lineContent:n,selectedText:t}),[r]=qi.applyIfEnabled(r,i.settings,[],{lineContent:n}),r}runYAMLTimestampByItself(n){let t=n.oldText,i=n.getCurrentTime();return[t]=Dn.applyIfEnabled(t,n.settings,this.disabledRules,{fileCreatedTime:n.fileInfo.createdAtFormatted,fileModifiedTime:n.fileInfo.modifiedAtFormatted,currentTime:i,alreadyModified:!0,locale:n.momentLocale}),t}};function dr(e,n=null,t,i,r){let s=n&&n.stat.ctime!==0?(0,ns.moment)(n.stat.ctime):(0,ns.moment)();s.locale(t);let o=n?(0,ns.moment)(n.stat.mtime):(0,ns.moment)();o.locale(t);let a=o.format(),l=s.format();return{oldText:e,fileInfo:{name:n?n.basename:"",createdAtFormatted:l,modifiedAtFormatted:a,path:n?n.path:""},settings:i,momentLocale:t,getCurrentTime:()=>{let c=(0,ns.moment)();return c.locale(t),c},defaultMisspellings:r}}var Uc=require("obsidian");var fa=class extends Uc.Modal{constructor(n,t,i,r,s,o=!1){super(n),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:E("warning-text"),cls:"modal-heading"}),o&&this.contentEl.createEl("p",{text:E("custom-command-warning"),cls:"modal-warn"}),this.contentEl.createEl("p",{text:t+" "+E("file-backup-text")}).id="confirm-dialog",this.contentEl.createDiv("modal-button-container",a=>{a.createEl("button",{text:E("cancel-button-text")}).addEventListener("click",()=>this.close());let l=a.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:i});l.addEventListener("click",async c=>{new Uc.Notice(r),this.close(),await s()}),setTimeout(()=>{l.focus()},50)})}};var ba=require("obsidian");var jc=require("obsidian");var XE={General:we.general.id,Custom:we.custom.id,YAML:we.yaml.id,Heading:we.heading.id,Footnote:we.footer.id,Content:we.content.id,Spacing:we.whitespace.id,Paste:we.paste.id,Debug:we.debug.id},ex={General:"tabs.names.general",Custom:"tabs.names.custom",YAML:"tabs.names.yaml",Heading:"tabs.names.heading",Footnote:"tabs.names.footnote",Content:"tabs.names.content",Spacing:"tabs.names.spacing",Paste:"tabs.names.paste",Debug:"tabs.names.debug"},hn=class{constructor(n,t,i,r,s){this.name=i;this.isMobile=r;this.plugin=s;this.searchSettingInfo=[];this.navButton=n.createDiv("linter-navigation-item");let o="linter-desktop";r&&(o="linter-mobile"),this.navButton.addClass(o),(0,jc.setIcon)(this.navButton.createSpan({cls:"linter-navigation-item-icon"}),XE[i]);let a=E(ex[i]);this.navButton.createSpan().setText(a),this.contentEl=t.createDiv("linter-tab-settings"),this.contentEl.id=i.toLowerCase().replace(" ","-"),this.headingEl=new jc.Setting(this.contentEl).setName(a).setHeading().nameEl,De(this.headingEl)}addSettingSearchInfo(n,t="",i="",r=null,s=null){this.searchSettingInfo.push({containerEl:n,name:t.toLowerCase(),description:i.toLowerCase(),options:r,alias:s})}addSettingSearchInfoForGeneralSettings(n){this.searchSettingInfo.push({containerEl:n.containerEl,name:n.name.toLowerCase(),description:n.description.toLowerCase(),options:null,alias:null})}updateTabDisplayMode(n,t="the status is still the same"){switch(n?(this.navButton.addClass("linter-navigation-item-selected"),Ve(this.contentEl)):(this.navButton.removeClass("linter-navigation-item-selected"),De(this.contentEl)),t){case"entering search mode by focusing on the search input box":Ve(this.contentEl),Ve(this.headingEl);for(let i of this.searchSettingInfo)Ve(i.containerEl);break;case"leaving search mode by selecting a tab":De(this.headingEl);for(let i of this.searchSettingInfo)Ve(i.containerEl);break}}};var Cy=require("obsidian");var Ay=require("obsidian");var fi=class{constructor(n,t,i,r,s,o=null){this.containerEl=n;this.keyToUpdate=r;this.plugin=s;this.beforeSave=o;this.name=E(t),this.description=E(i)}async saveValue(n){let t=this.keyToUpdate.split(".");t.length===2?this.plugin.settings[t[0]][t[1]]=n:this.plugin.settings[this.keyToUpdate]=n,this.beforeSave&&this.beforeSave(),await this.plugin.saveSettings()}getDefaultValue(){let n=this.keyToUpdate.split(".");return n.length===2?ma[n[0]][n[1]]:ma[this.keyToUpdate]}getString(){return us(this.plugin.settings,this.keyToUpdate)??this.getDefaultValue()}getBoolean(){return Vp(this.plugin.settings,this.keyToUpdate)??this.getDefaultValue()}getNumber(){return jp(this.plugin.settings,this.keyToUpdate)??this.getDefaultValue()}parseNameAndDescription(){ft(this.name,this.setting.nameEl),ft(this.description,this.setting.descEl),this.setting.descEl.addClass("linter-no-padding-top")}};var Nn=class extends fi{constructor(t,i,r,s,o,a,l=null){super(t,i,r,s,o,l);this.dropdownRecords=a;this.display()}display(){this.setting=ne Line truncated
`," "));let b=this.contentEl.createDiv(),k=new Gc(b,this.plugin.settings.filesToIgnore,this.app,()=>{this.plugin.saveSettings()});this.addSettingSearchInfo(b,k.name,k.description.replaceAll(`
`," "))}};var My=require("obsidian"),Zc=class extends hn{constructor(t,i,r,s,o,a){super(t,i,r,o,a);this.rules=s;this.display()}display(){for(let t of this.rules){let i=this.contentEl.createDiv();i.id=t.alias,new My.Setting(i).setHeading().nameEl.createEl("a",{href:t.getURL(),text:t.getName()});let r=[],s=!0,o=!1;for(let a of t.options)a.display(i,this.plugin.settings,this.plugin),r.push(a.getSearchInfo()),s?(s=!1,a instanceof ai&&(o=!this.plugin.settings.ruleConfigs[a.ruleAlias][a.configKey])):o&&a.hide();this.addSettingSearchInfo(i,t.getName().toLowerCase(),t.getDescription().toLowerCase(),r,i.id)}}};var Iy=require("obsidian");var ga=class extends si{constructor(t,i,r=[]){super(t,i);this.app=t;this.inputEl=i;this.valuesToExclude=r}getSuggestions(t){let i=this.app.commands.listCommands();if(!i)return[];let r=i.filter(a=>{for(let l of this.valuesToExclude)if(l.id==a.id&&!(this.inputEl.hasAttribute("commandId")&&this.inputEl.getAttribute("commandId")==a.id))return!1;return!0}),s=[],o=t.toLowerCase();return r.forEach(a=>{(a.id.contains(o)||a.name.toLowerCase().contains(o))&&s.push(a)}),s}renderSuggestion(t,i){i.setText(t.name)}selectSuggestion(t){this.inputEl.value=t.name,this.inputEl.setAttribute("commandId",t.id),this.inputEl.trigger("input"),this.close()}};var Jc=class extends yn{constructor(t,i,r,s){super(t,E("options.custom-command.name"),E("options.custom-command.description"),E("options.custom-command.warning"),E("options.custom-command.add-input-button-text"),r,s,()=>{let o={id:"",name:"",enabled:!0};this.lintCommands.push(o),this.saveSettings(),this.addCommand(o,this.lintCommands.length-1,!0)});this.lintCommands=i;this.display()}showInputEls(){this.lintCommands.forEach((t,i)=>{this.addCommand(t,i)})}addCommand(t,i,r=!1){new Iy.Setting(this.inputElDiv).addSearch(s=>{new ga(this.app,s.inputEl,this.lintCommands),s.setPlaceholder(E("options.custom-command.command-search-placeholder-text")).setValue(t.name).onChange(o=>{let a={id:s.inputEl.getAttribute("commandId"),name:o,enabled:t.enabled};a.name&&a.id?(this.lintCommands[i]=a,this.saveSettings()):!a.name&&!a.id&&(this.lintCommands[i]=a,this.saveSettings())}),s.inputEl.setAttr("tabIndex",i),s.inputEl.addClass("linter-custom-command"),r&&s.inputEl.focus()}).addExtraButton(s=>{s.setIcon("up-chevron-glyph").setTooltip(E("options.custom-command.move-up-tooltip")).onClick(()=>{this.arrayMove(i,i-1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(s=>{s.setIcon("down-chevron-glyph").setTooltip(E("options.custom-command.move-down-tooltip")).onClick(()=>{this.arrayMove(i,i+1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(s=>{s.setIcon("trash").setTooltip(E("options.custom-command.delete-tooltip")).onClick(()=>{this.lintCommands.splice(i,1),this.saveSettings(),this.resetInputEls()})}).addToggle(s=>{s.setValue(t.enabled).onChange(o=>{t.enabled=o})})}arrayMove(t,i){if(i<0||i===this.lintCommands.length)return;let r=this.lintCommands[t];this.lintCommands[t]=this.lintCommands[i],this.lintCommands[i]=r}};var zp=require("obsidian");var nx="gm",Xc=class extends yn{constructor(t,i,r,s){super(t,E("options.custom-replace.name"),E("options.custom-replace.description"),E("options.custom-replace.warning"),E("options.custom-replace.add-input-button-text"),r,s,()=>{let o={label:"",find:"",replace:"",flags:nx,enabled:!0};this.regexes.push(o),this.saveSettings(),this.addRegex(o,this.regexes.length-1,!0)});this.regexes=i;this.display(),this.inputElDiv.addClass("linter-custom-regex-replacement-container")}showInputEls(){this.regexes.forEach((t,i)=>{this.addRegex(t,i)})}addRegex(t,i,r=!1){let s=this.inputElDiv.createDiv({cls:"linter-custom-regex-replacement"}),o=s.createDiv(),a=new zp.Setting(o).addText(u=>{u.setPlaceholder(E("options.custom-replace.label-placeholder-text")).setValue(t.label).onChange(d=>{this.regexes[i].label=d,this.saveSettings()}),u.inputEl.setAttr("inputIndex",i),u.inputEl.addClass("linter-custom-regex-replacement-label-input"),r&&u.inputEl.focus()});a.controlEl.addClass("linter-custom-regex-replacement-label"),a.descEl.remove(),a.infoEl.remove(),a.nameEl.remove();let l=s.createDiv();new zp.Setting(l).addText(u=>{u.setPlaceholder(E("options.custom-replace.regex-to-find-placeholder-text")).setValue(t.find).onChange(d=>{this.regexes[i].find=d,this.saveSettings()}),u.inputEl.addClass("linter-custom-regex-replacement-normal-input")}).addText(u=>{u.setPlaceholder(E("options.custom-replace.flags-placeholder-text")).setValue(t.flags).onChange(d=>{this.regexes[i].flags=d,this.saveSettings()}),u.inputEl.addClass("linter-custom-regex-replacement-flags")}).addText(u=>{u.setPlaceholder(E("options.custom-replace.regex-to-replace-placeholder-text")).setValue(t.replace).onChange(d=>{this.regexes[i].replace=d,this.saveSettings()}),u.inputEl.addClass("linter-custom-regex-replacement-normal-input")}).addExtraButton(u=>{u.setIcon("up-chevron-glyph").setTooltip(E("options.custom-replace.move-up-tooltip")).onClick(()=>{this.arrayMove(i,i-1),this.saveSettings() Line truncated
`," ")+i.warning.replaceAll(`
`," "));let r=this.contentEl.createDiv(),s=new Xc(r,this.plugin.settings.customRegexes,this.app,()=>{this.plugin.saveSettings()});this.addSettingSearchInfo(r,s.name,s.description.replaceAll(`
`," ")+s.warning.replaceAll(`
`," "))}};var By=require("obsidian");var tu=class{constructor(n,t,i,r){this.containerEl=n;this.searchZeroState=t;this.tabNameToTab=i;this.onFocus=r;this.searchSettingInfo=new Map;for(let[s,o]of i)this.searchSettingInfo.set(s,o.searchSettingInfo);this.display()}display(){let n=new By.Setting(this.containerEl);n.settingEl.addClass("linter-no-border"),n.addSearch(t=>{this.search=t}),this.search.setPlaceholder(E("tabs.default-search-bar-text")),this.search.inputEl.onfocus=()=>{this.onFocus()},this.search.onChange(t=>{this.searchSettings(t.toLowerCase())})}searchSettings(n){let t=new Set,i=function(r,s){Ve(r),t.has(s)||t.add(s)};for(let[r,s]of this.searchSettingInfo)for(let o of s)if(n.trim()===""||o.alias?.includes(n)||o.description.includes(n)||o.name.includes(n))i(o.containerEl,r);else if(o.options)for(let a of o.options){if(a.description.toLowerCase().includes(n)||a.name.toLowerCase().includes(n)){i(o.containerEl,r);break}else if(a.options){for(let l of a.options)if(l.description.toLowerCase().includes(n)||l.value.toLowerCase().includes(n)){i(o.containerEl,r);break}}De(o.containerEl)}else De(o.containerEl);for(let[r,s]of this.tabNameToTab)t.has(r)?Ve(s.headingEl):De(s.headingEl);t.size===0?Ve(this.searchZeroState):De(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var Fy=yi(Ta());var is=require("obsidian");var ya=class{constructor(n,t,i,r=!0){this.containerEl=n;this.name=t;this.description=i;this.disabled=r;this.display()}display(){this.settingEl=this.containerEl.createDiv();let n=this.settingEl.createDiv("setting-item-info");this.nameEl=n.createDiv("setting-item-name"),this.nameEl.setText(this.name),this.descEl=n.createDiv("setting-item-description"),this.descEl.setText(this.description),this.inputContainerEl=this.settingEl.createDiv("full-width-textbox-input-wrapper"),this.inputContainerEl.onmouseover=()=>{this.getInput().trim()!=""&&this.copyEl.removeClass("linter-visually-hidden")},this.inputContainerEl.onmouseleave=()=>{this.copyEl.addClass("linter-visually-hidden")},this.inputEl=this.inputContainerEl.createEl("textarea",{cls:"full-width"}),this.inputEl.spellcheck=!1,this.inputEl.disabled=this.disabled,this.copyEl=this.inputContainerEl.createDiv({cls:"settings-copy-button linter-visually-hidden ",attr:{"aria-label":E("copy-aria-label")}}),this.copyIconEl=this.copyEl.createSpan(),(0,is.setIcon)(this.copyIconEl,"linter-clipboard"),this.copyIconEl.onclick=()=>{this.handleCopy(this.copyIconEl)}}getInput(){return this.inputEl.value}handleCopy(n){navigator.clipboard.writeText(this.getInput()).then(()=>{(0,is.setIcon)(n,"linter-success"),setTimeout(()=>{(0,is.setIcon)(n,"linter-clipboard")},1500)},t=>{new is.Notice(`${E("notice-text.copy-to-clipboard-failed")+t}`,0)})}hide(){De(this.settingEl)}unhide(){Ve(this.settingEl)}};var ix=Object.keys(Fy.default.levels),nu=class extends hn{constructor(n,t,i,r){super(n,t,"Debug",i,r),this.display()}display(){let n=this.contentEl.createDiv(),t={isForEnum:!0,values:ix,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new Nn(n,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,t,async()=>{Ba(this.plugin.settings.logLevel)})),n=this.contentEl.createDiv();let i=E("tabs.debug.linter-config.name"),r=E("tabs.debug.linter-config.description");new ya(n,i,r).inputEl.setText(JSON.stringify(this.plugin.settings,null,2)),this.addSettingSearchInfo(n,i,r);let o=null;n=this.contentEl.createDiv();let a=new gn(n,"tabs.debug.log-collection.name","tabs.debug.log-collection.description","recordLintOnSaveLogs",this.plugin,l=>{l?o.unhide():o.hide()});this.addSettingSearchInfoForGeneralSettings(a),n=this.contentEl.createDiv(),i=E("tabs.debug.linter-logs.name"),r=E("tabs.debug.linter-logs.description"),o=new ya(n,i,""),o.inputEl.setText(Ca.join(`
`)),ft(r,o.descEl),a.getBoolean()||o.hide(),this.addSettingSearchInfo(n,i,r)}};var iu=class extends ba.PluginSettingTab{constructor(t,i){super(t,i);this.plugin=i;this.tabNameToTab=new Map;this.selectedTab="General"}display(){let{containerEl:t}=this;t.empty();let i=t.createDiv("linter-setting-title");ba.Platform.isMobile?i.addClass("linter-mobile"):i.createEl("h1").setText(E("linter-title")),this.navContainer=t.createEl("nav",{cls:"linter-setting-header"}),this.tabNavEl=this.navContainer.createDiv("linter-setting-tab-group"),this.settingsContentEl=t.createDiv("linter-setting-content"),this.addTabs(ba.Platform.isMobile),this.createSearchZeroState(),this.generateSearchBar(i),this.selectedTab==""&&this.tabSearcher.focusOnInput()}addTabs(t){this.addTab(new Qc(this.tabNavEl,this.settingsContentEl,t,this.plugin,this.app));for(let i of Object.values(K))this.addTab(new Zc(this.tabNavEl,this.settingsContentEl,i,Yi.get(i),t,this.plugin));this.addTab(new eu(this.tabNavEl,this.settingsContentEl,t,this.app,this.plugin)),this.addTab(new nu(this.tabNavEl,this.settingsContentEl,t,this.plugin))}generateSearchBar(t){this.tabSearcher=new tu(t,this.searchZeroState,this.tabNameToTab,()=>{for(let i of this.tabNameToTab.values()){i.updateTabDisplayMode(!1,"entering search mode by focusing on the search input box");let r=this.tabSearcher.search.getValue();this.selectedTab==""&&r.trim()!=""&&this.tabSearcher.searchSettings(r.toLowerCase()),this.selectedTab=""}})}createSearchZeroState(){this.searchZeroState=this.settingsContentEl.createDiv({cls:"search-zero-state"}),De(this.searchZeroState),this.searchZeroState.createEl("p",{text:E("empty-search-results-text")})}addTab(t){t.navButton.onclick=()=>{this.onTabClick(t.name)},t.updateTabDisplayMode(this.selectedTab===t.name,"the status is still the same"),this.tabNameToTab.set(t.name,t)}onTabClick(t){if(this.selectedTab!==t){if(this.selectedTab=="")for(let[i,r]of this.tabNameToTab)r.updateTabDisplayMode(i===t,"leaving search mode by selecting a tab");else De(this.searchZeroState),this.tabNameToTab.get(t).updateTabDisplayMode(!0),this.tabNameToTab.get(this.selectedTab).updateTabDisplayMode(!1);this.selectedTab=t}}};var Dy=require("obsidian");var rx=/^---\n/gm,Ry=`${Dr}:`,ru=class extends Dy.EditorSuggest{constructor(t){super(t.app);this.plugin=t;this.inline=!1;let i=E("all-rules-option");this.ruleInfo=[{displayName:i,name:i.toLowerCase(),alias:"all"}];for(let r of mn){let s=r.getName();this.ruleInfo.push({displayName:s,name:s.toLowerCase(),alias:r.alias})}}onTrigger(t,i,r){let s=i.getLine(t.line).toLowerCase();if(s.startsWith(Ry)||this.disabledRulesIsEndOfStartOfFileToCursor(i.getRange({line:0,ch:0},t))){this.inline=s.startsWith(Ry);let a=i.getLine(t.line).substring(0,t.ch),l=a.match(/(\S+)$/)?.first().replaceAll("[","").replaceAll("]","");if(l)return{end:t,start:{ch:a.lastIndexOf(l),line:t.line},query:l}}return null}getSuggestions(t){let[i,r]=yc(t.editor.getValue());if(r)return[];let s=t.query.toLowerCase();return this.ruleInfo.filter(a=>(a.name.contains(s)||a.alias.contains(s))&&!i.includes(a.alias))}renderSuggestion(t,i){i.addClass("mod-complex");let r=i.createDiv({cls:"suggestion-content"});r.createDiv({cls:"suggestion-title"}).setText(`${t.displayName}`),r.createDiv({cls:"suggestion-note"}).setText(`${t.alias}`)}selectSuggestion(t){if(this.context){let i=t.alias;this.inline?i=`${i},`:i=`${i}
-`,this.context.editor.replaceRange(`${i} `,this.context.start,this.context.end)}}disabledRulesIsEndOfStartOfFileToCursor(t){if(!t||!t.length||t.match(rx)?.length!=1)return!1;let i=ke(t+`
`,Dr)?.trimEnd();return i===null?!1:t.trimEnd().endsWith(i)}};var Hy=yi(Yy()),qy=yi(Ta());var pr=require("obsidian");var qp="default-misspellings.md",Hp=`https://raw.githubusercontent.com/platers/obsidian-linter/refs/heads/master/src/utils/${qp}`;async function Py(e,n){let t=e.app,i=e.manifest.dir??"",r=(0,pr.normalizePath)(i+"/"+qp);if(await t.vault.adapter.exists(r))return;let s=new pr.Notice(E("rules.auto-correct-common-misspellings.default-install")),o;try{o=await(0,pr.requestUrl)(Hp)}catch(a){Ma(E("rules.auto-correct-common-misspellings.default-install-failed").replace("{URL}",Hp),a)}if(!o||o.status!==200){let a=E("rules.auto-correct-common-misspellings.default-install-failed").replace("{URL}",Hp)+E("logs.see-console");await n(a);return}await t.vault.adapter.exists(i)||await t.vault.adapter.mkdir(i),await t.vault.adapter.writeBinary(r,o.arrayBuffer),s.hide()}async function zy(e){let n=e.app,t=e.manifest.dir??"",i=(0,pr.normalizePath)(t+"/"+qp);return await n.vault.adapter.exists(i)?await n.vault.adapter.read(i):(Et(E("rules.auto-correct-common-misspellings.defaults-missing").replace("{FILE}",i)),"")}var sx={en:"en-gb",zh:"zh-cn","zh-TW":"zh-tw",ru:"ru",ko:"ko",it:"it",id:"id",ro:"ro","pt-BR":"pt-br",cz:"cs",da:"da",de:"de",es:"es",fr:"fr",no:"nn",pl:"pl",pt:"pt",tr:"tr",hi:"hi",nl:"nl",ar:"ar",ja:"ja"},_n=0,ou=class extends ne.Plugin{constructor(){super(...arguments);this.eventRefs=[];this.isEnabled=!0;this.rulesRunner=new $c;this.overridePaste=!1;this.hasCustomCommands=!1;this.customCommandsLock=new Hy.default;this.originalSaveCallback=null;this.editorLintFiles=[];this.fileLintFiles=new Set;this.customCommandsCallback=null;this.currentlyOpeningSidebar=!1;this.activeFileChangeDebouncer=new Map;this.defaultAutoCorrectMisspellings=new Map;this.hasLoadedMisspellingFiles=!1}async onload(){ly(),Ra(window.localStorage.getItem("language")),Dt(E("logs.plugin-load")),this.isEnabled=!0;for(let t in we){let i=we[t];(0,ne.addIcon)(i.id,i.source)}await this.loadSettings(),this.addCommands(),this.registerEventsAndSaveCallback(),this.registerEditorSuggest(new ru(this)),this.settingsTab=new iu(this.app,this),this.addSettingTab(this.settingsTab)}async onunload(){Dt(E("logs.plugin-unload")),this.isEnabled=!1;for(let i of this.eventRefs)this.app.workspace.offref(i);let t=this.app.commands?.commands?.["editor:save-file"];t&&t.callback&&this.originalSaveCallback&&(t.callback=this.originalSaveCallback)}async loadSettings(){let t=await this.loadData();this.settings=Object.assign({},ma,t),typeof this.settings.logLevel=="number"&&(this.settings.logLevel=Qp(this.settings.logLevel)),Ba(this.settings.logLevel),await this.setOrUpdateMomentInstance(),this.updatePasteOverrideStatus(),this.updateHasCustomCommandStatus()}async saveSettings(){this.hasLoadedMisspellingFiles||await this.loadAutoCorrectFiles(!1),await this.saveData(this.settings),this.updatePasteOverrideStatus(),this.updateHasCustomCommandStatus()}addCommands(){let t=this;this.addCommand({id:"lint-file",name:E("commands.lint-file.name"),editorCheckCallback(i,r,s){if(i)return t.isMarkdownFile(s.file)&&r.cm!=null;t.runLinterEditor(r)},icon:we.file.id}),this.addCommand({id:"lint-file-unless-ignored",name:E("commands.lint-file-unless-ignored.name"),editorCheckCallback(i,r,s){if(i)return t.isMarkdownFile(s.file);!t.shouldIgnoreFile(s.file)&&r.cm&&t.runLinterEditor(r)},icon:we.file.id}),this.addCommand({id:"lint-all-files",name:E("commands.lint-all-files.name"),icon:we.vault.id,callback:()=>{let i=E("commands.lint-all-files.start-message"),r=E("commands.lint-all-files.submit-button-text"),s=E("commands.lint-all-files.submit-button-notice-text");new fa(this.app,i,r,s,()=>this.runLinterAllFiles(this.app),this.settings.lintCommands&&this.settings.lintCommands.length>0).open()}}),this.addCommand({id:"lint-all-files-in-folder",name:E("commands.lint-all-files-in-folder.name"),icon:we.folder.id,editorCheckCallback:(i,r,s)=>{if(i)return s&&s.file&&s.file instanceof ne.TFile&&s.file.parent?!s.file.parent.isRoot():!1;this.createFolderLintModal(s.file.parent)}}),this.addCommand({id:"paste-as-plain-text",name:E("commands.paste-as-plain-text.name"),editorCheckCallback:(i,r)=>{if(i)return this.overridePaste;this.pasteAsPlainText(r)}}),this.addCommand({id:"ignore-folder",name:E("commands.ignore-folder.name"),icon:we.ignoreFolder.id,editorCheckCallback:(i,r,s)=>{if(i)return s&&s.file&&s.file instanceof ne.TFile&&s.file.parent?!s.file.parent.isRoot()&&!this.settings.foldersToIgnore.includes(s.file.parent.path):!1;this.addFolderToIgnoreList(s.file.parent)}}),this.addCommand({id:"ignore-file",name:E("commands.ignore-file.name"),editorCheckCallback(i,r,s){if(i&&s.file)return t.isMarkdownFile(s.file)&&!t.shouldIgnoreFile(s.file);this.addFileToIgnoreList(s.file)},icon:we.ignoreFile.id})}registerEventsAndSaveCallback(){let t=this.app.workspace.on("editor-paste",(s,o)=>{s.defaultPrevented||!this.overridePaste||this.modifyPasteEvent(s,o)});this.registerEvent(t),this.eventRefs.push(t),t=this.app.worksp Line truncated
`+r),new ne.Notice(r),this.settings.ruleConfigs["auto-correct-common-misspellings"].enabled=!1,await this.saveSettings()}),!!this.settings.ruleConfigs["auto-correct-common-misspellings"].enabled)){this.defaultAutoCorrectMisspellings=br(Pn(await zy(this)));for(let r of this.settings.ruleConfigs["auto-correct-common-misspellings"]["extra-auto-correct-files"]??[])if(r.filePath!=""){let s=this.getFileFromPath(r.filePath);s&&(r.customReplacements=br(Pn(await this.app.vault.cachedRead(s))))}this.hasLoadedMisspellingFiles=!0}}onMenuOpenCallback(t,i,r){i instanceof ne.TFile&&this.isMarkdownFile(i)?this.shouldIgnoreFile(i)||(t.addItem(s=>{s.setIcon(we.file.id).setTitle(E("commands.lint-file-pop-up-menu-text.name")).onClick(()=>{let o=this.app.workspace.getActiveFile(),a=this.getEditor();o===i&&a&&a.cm?this.runLinterEditor(a):this.runLinterFile(i)})}),t.addItem(s=>{s.setIcon(we.ignoreFile.id).setTitle(E("commands.ignore-file-pop-up-menu-text.name")).onClick(()=>{this.addFileToIgnoreList(i)})})):i instanceof ne.TFolder&&(this.settings.foldersToIgnore.includes(i.path)||(t.addItem(s=>{s.setTitle(E("commands.lint-folder-pop-up-menu-text.name")).setIcon(we.folder.id).onClick(()=>this.createFolderLintModal(i))}),t.addItem(s=>{s.setTitle(E("commands.ignore-folder-pop-up-menu-text.name")).setIcon(we.ignoreFolder.id).onClick(()=>void this.addFolderToIgnoreList(i))})))}async onActiveLeafChange(){if(!this.isEnabled||this.currentlyOpeningSidebar)return;let t=this.app.workspace.getActiveFile(),i=this.lastActiveFile==null?!1:await this.app.vault.adapter.exists(this.lastActiveFile.path);if(!this.settings.lintOnFileChange||!i||this.lastActiveFile===t||!this.isMarkdownFile(this.lastActiveFile)||this.shouldIgnoreFile(this.lastActiveFile)){this.lastActiveFile=t;return}try{await this.runLinterFile(this.lastActiveFile,!0)}catch(r){this.handleLintError(this.lastActiveFile,r,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}finally{this.lastActiveFile=t}}shouldIgnoreFile(t){for(let i of this.settings.foldersToIgnore)if(i.length>0&&t.path.startsWith((0,ne.normalizePath)(i)+"/"))return!0;for(let i of this.settings.filesToIgnore){if(!i.match)continue;if(new RegExp(`${i.match}`,i.flags).test(t.path))return!0}return!1}isMarkdownFile(t){return t&&t.extension==="md"}async runLinterFile(t,i=!1){let r=Pn(await this.app.vault.read(t)),s=this.rulesRunner.lintText(dr(r,t,this.momentLocale,this.settings,this.defaultAutoCorrectMisspellings));if(r!=s){if(await this.app.vault.modify(t,s),i){let o=E("logs.file-change-lint-message-start")+" "+this.lastActiveFile.path;this.settings.displayLintOnFileChangeNotice&&new ne.Notice(o),Dt(o)}this.fileLintFiles.add(t);return}await this.runCustomCommandsInSidebar(t)}async runLinterAllFiles(t){let i=0;if(await Promise.all(t.vault.getMarkdownFiles().map(async r=>{if(!this.shouldIgnoreFile(r))try{await this.runLinterFile(r)}catch(s){this.handleLintError(r,s,E("commands.lint-all-files.error-message")+" '{FILE_PATH}'"),i+=1}})),i===0)new ne.Notice(E("commands.lint-all-files.success-message"),_n);else{let r=i===1?E("commands.lint-all-files.errors-message-singular"):E("commands.lint-all-files.errors-message-plural").replace("{NUM}",i.toString());new ne.Notice(r,_n)}}async runLinterAllFilesInFolder(t){Dt(E("logs.folder-lint")+t.name);let i=0,r=0,s=this.getAllFilesInFolder(t);if(await Promise.all(s.map(async o=>{if(!this.shouldIgnoreFile(o)){try{await this.runLinterFile(o)}catch(a){this.handleLintError(o,a,E("commands.lint-all-files-in-folder.error-message")+" '{FILE_PATH}'"),i+=1}r++}})),i===0)new ne.Notice(E("commands.lint-all-files-in-folder.success-message").replace("{NUM}",r.toString()).replace("{FOLDER_NAME}",t.name),_n);else{let o=i===1?E("commands.lint-all-files-in-folder.message-singular").replace("{NUM}",r.toString()).replace("{FOLDER_NAME}",t.name):E("commands.lint-all-files-in-folder.message-plural").replace("{FILE_COUNT}",r.toString()).replace("{FOLDER_NAME}",t.name).replace("{ERROR_COUNT}",i.toString());new ne.Notice(o,_n)}}createFolderLintModal(t){let i=E("commands.lint-all-files-in-folder.start-message").replace("{FOLDER_NAME}",t.name),r=E("commands.lint-all-files-in-folder.submit-button-text").replace("{FOLDER_NAME}",t.name),s=E("commands.lint-all-files-in-folder.submit-button-notice-text").replace("{FOLDER_NAME}",t.name);new fa(this.app,i,r,s,()=>this.runLinterAllFilesInFolder(t),this.settings.lintCommands&&this.settings.lintCommands.length>0).open()}async runLinterEditor(t){pu(this.settings.recordLintOnSaveLogs),Gp(),Dt(E("logs.linter-run"));let i=this.app.workspace.getActiveFile(),r=t.getValue(),s;try{s=this.rulesRunner.lintText(dr(r,i,this.momentLocale,this.settings,this.defaultAutoCorrectMisspellings))}catch(c){this.handleLintError(i,c,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1);return}let o=this.updateEditor(r,s,t),a=o.map(c=>c[0]==rs.default.DIFF_INSERT?c[1].length:0).reduce((c,u)=>c+u,0),l=o.map(c=>c[0]==rs.default.DIFF_DELETE?c[1].length:0).reduce((c,u)=>c+u,0);this.displayCh Line truncated
`+E("disabled-conflicting-rule-notice").replace("{NAME_1}",E("rules.header-increment.start-at-h2.name")).replace("{NAME_2}",E("rules.file-name-heading.name"))),this.settings.ruleConfigs["paragraph-blank-lines"]&&this.settings.ruleConfigs["paragraph-blank-lines"].enabled&&this.settings.ruleConfigs["two-spaces-between-lines-with-content"]&&this.settings.ruleConfigs["two-spaces-between-lines-with-content"].enabled&&(this.settings.ruleConfigs["paragraph-blank-lines"].enabled=!1,t=!0,r&&(i+=`
`),r=!0,i+=`
`+E("disabled-conflicting-rule-notice").replace("{NAME_1}",E("rules.paragraph-blank-lines.name")).replace("{NAME_2}",E("rules.two-spaces-between-lines-with-content.name"))),r&&new ne.Notice(i,_n);for(let s of mn){let o=s.getDefaultOptions();if(!this.settings.ruleConfigs[s.alias]){this.settings.ruleConfigs[s.alias]=o,t=!0;continue}if(s.alias=="space-between-chinese-japanese-or-korean-and-english-or-numbers")"english-symbols-punctuation-before"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["english-symbols-punctuation-before"]=o["english-symbols-punctuation-before"],t=!0),"english-symbols-punctuation-after"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["english-symbols-punctuation-after"]=o["english-symbols-punctuation-after"],t=!0);else if(s.alias=="yaml-timestamp"){let a=s.getDefaultOptions();"force-retention-of-create-value"in this.settings.ruleConfigs[s.alias]&&("date-created-source-of-truth"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["force-retention-of-create-value"]?this.settings.ruleConfigs[s.alias]["date-created-source-of-truth"]="frontmatter":this.settings.ruleConfigs[s.alias]["date-created-source-of-truth"]=a["date-created-source-of-truth"]),delete this.settings.ruleConfigs[s.alias]["force-retention-of-create-value"],t=!0),"date-modified-source-of-truth"in this.settings.ruleConfigs[s.alias]||(this.settings.ruleConfigs[s.alias]["date-modified-source-of-truth"]=a["date-modified-source-of-truth"],t=!0)}for(let a of Object.keys(o))Object.hasOwn(this.settings.ruleConfigs[s.alias],a)||(this.settings.ruleConfigs[s.alias][a]=o[a],t=!0)}for(let s of this.settings.customRegexes)Object.hasOwn(s,"enabled")||(s.enabled=!0,t=!0);for(let s of this.settings.lintCommands)Object.hasOwn(s,"enabled")||(s.enabled=!0,t=!0);t&&await this.saveSettings()}createDebouncedFileUpdate(){let t=5e3;switch(this.settings.ruleConfigs["yaml-timestamp"]["update-on-file-contents-updated"]??"never"){case"after 10 seconds":t=1e4;break;case"after 15 seconds":t=15e3;break;case"after 30 seconds":t=3e4;break;case"after 1 minute":t=6e4;break}return(0,ne.debounce)(async(i,r)=>{if(!this.activeFileChangeDebouncer.has(i.path)){Et(E("logs.file-change-yaml-lint-warning"));return}let s=this.activeFileChangeDebouncer.get(i.path);s.isRunning=!0;let o=r.getValue(),a=await this.app.vault.cachedRead(i),l=o===a,c="";if(l){c=o;let u=c;if(c!=s.originalText){Dt(E("logs.file-change-yaml-lint-run"));try{u=this.rulesRunner.runYAMLTimestampByItself(dr(c,i,this.momentLocale,this.settings,null))}catch(d){this.handleLintError(i,d,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1);return}this.updateEditor(c,u,r)}else Dt(E("logs.file-change-yaml-lint-skipped"))}else c=a,c!=s.originalText?(Dt(E("logs.file-change-yaml-lint-run")),await this.app.vault.process(i,u=>{Dt(E("logs.file-change-yaml-lint-run"));try{return this.rulesRunner.runYAMLTimestampByItself(dr(c,i,this.momentLocale,this.settings,null))}catch(d){return this.handleLintError(i,d,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1),u}})):Dt(E("logs.file-change-yaml-lint-skipped"));this.activeFileChangeDebouncer.delete(i.path),s.isRunning=!1},t,!0)}updateEditor(t,i,r){let o=new rs.default.diff_match_patch().diff_main(t,i),a="";return o.forEach(l=>{let[c,u]=l;if(c==rs.default.DIFF_INSERT)r.cm.dispatch({changes:[{from:r.posToOffset(this.endOfDocument(a)),insert:u}],filter:!1}),a+=u;else if(c==rs.default.DIFF_DELETE){let d=this.endOfDocument(a),p=a;p+=u;let m=this.endOfDocument(p);r.cm.dispatch({changes:[{from:r.posToOffset(d),to:r.posToOffset(m),insert:""}],filter:!1})}else a+=u}),o}displayChangedMessage(t,i){if(this.settings.displayChanged){let r=uy`
${t} ${E("notice-text.characters-added")}
${i} ${E("notice-text.characters-removed")}
`;new ne.Notice(r)}}handleLintError(t,i,r,s=!0){let o=r.replace("{FILE_PATH}",t.path),a=E("logs.see-console");i instanceof Gr?s?new ne.Notice(`${o} ${i.message}.
${a}`,_n):new ne.Notice(`${i.message}.
${a}`,_n):new ne.Notice(`${E("logs.unknown-error")} ${a}`,_n),Ma(o,i)}async modifyPasteEvent(t,i){if(!i)return;let r=t.clipboardData.getData("text/plain");if(!r)return;let s=r.trim();if(Li.test(s)){Et(E("logs.paste-link-warning"));return}if(t.stopPropagation(),t.preventDefault(),!t.defaultPrevented)return;let o=this.app.vault.getConfig("autoConvertHtml"),a=t.clipboardData.getData("text/html"),l=a&&o?(0,ne.htmlToMarkdown)(a):r,c=i.listSelections();if(c.length===1){let u=c[0];l=this.rulesRunner.runPasteLint(this.getLineContent(i,u),i.getSelection()??"",dr(l,null,this.momentLocale,this.settings,null)),i.replaceSelection(l)}else this.handleMultiCursorPaste(i,c,l)}handleMultiCursorPaste(t,i,r){let s=this.convertContentIntoProperPasteContent(i,r),o=[];i.forEach((a,l)=>{r=this.rulesRunner.runPasteLint(this.getLineContent(t,a),t.getRange(a.anchor,a.head)??"",dr(s[l],null,this.momentLocale,this.settings,null)),o.push({text:r,from:a.anchor,to:a.head})}),t.transaction({changes:o})}convertContentIntoProperPasteContent(t,i){let r=i.split(`
`),s=[];if(r.length%t.length!==0)for(let o=0;o<t.length;o++)s.push(i);else{let o=r.length/t.length,a="";for(let l=0;l<r.length;l++)a+=r[l],(l+1===t.length||(l+1)%o===0)&&(s.push(a),a="")}return s}async pasteAsPlainText(t){let i=await navigator.clipboard.readText();if(!i){new ne.Notice(E("notice-text.empty-clipboard"),_n);return}t.replaceSelection(i)}setCustomCommandCallback(t){(0,qy.warn)(E("logs.custom-command-callback-warning")),this.customCommandsCallback=t}async runCustomCommandsInSidebar(t){if(!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands)return;let i=this.app.workspace.getRightLeaf(!1),r=this.getEditor();await this.customCommandsLock.acquire("command",async()=>{this.currentlyOpeningSidebar=!0,await i.openFile(t),this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands),this.customCommandsCallback&&await this.customCommandsCallback(t)}),i.detach(),r&&r.focus(),this.currentlyOpeningSidebar=!1}async runCustomCommands(t){!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands||(await this.customCommandsLock.acquire("command",async()=>{try{this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands)}catch(i){this.handleLintError(t,i,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}this.customCommandsCallback&&await this.customCommandsCallback(t)}),this.updateFileDebouncerText(t,Pn(await this.app.vault.read(t))))}getEditor(){let t=this.app.workspace.getActiveViewOfType(ne.MarkdownView);return t?t.editor:null}getLineContent(t,i){return t.getLine(i.anchor.line)}async moveConfigValuesToKeyBasedFormat(){Ra("en");let t=!1;for(let i of mn){let r=E("rules."+i.alias+".name"),s=this.settings.ruleConfigs[r];if(s!=null){let o=E("rules."+i.alias+".description"),a={enabled:s[o]??!1};for(let l of i.options){if(l.configKey==="enabled")continue;let c=E("rules."+i.alias+"."+l.configKey+".name");a[l.configKey]=s[c]??l.defaultValue}this.settings.ruleConfigs[i.alias]=a,delete this.settings.ruleConfigs[r],t=!0}}return this.settings.settingsConvertedToConfigKeyValues=!0,await this.saveSettings(),Ra(window.localStorage.getItem("language")),t}getAllFilesInFolder(t){let i=[],r=[t];for(let s of r)for(let o of s.children)o instanceof ne.TFile&&this.isMarkdownFile(o)?i.push(o):o instanceof ne.TFolder&&r.push(o);return i}updatePasteOverrideStatus(){for(let t of Yi.get("Paste"))if(t.getOptions(this.settings)?.enabled){this.overridePaste=!0;return}this.overridePaste=!1}updateHasCustomCommandStatus(){for(let t of this.settings.lintCommands)if(t.id&&t.id.trim()!=""&&t.enabled){this.hasCustomCommands=!0;return}this.hasCustomCommands=!1}endOfDocument(t){let i=t.split(`
`);return{line:i.length-1,ch:i[i.length-1].length}}getFileFromPath(t){let i=this.app.vault.getAbstractFileByPath((0,ne.normalizePath)(t));return i instanceof ne.TFile?i:null}updateFileDebouncerText(t,i){this.activeFileChangeDebouncer.has(t.path)&&(this.activeFileChangeDebouncer.get(t.path).originalText=i)}async addFileToIgnoreList(t){this.settings.filesToIgnore.push({match:"^"+sn(t.path)+"$",flags:"",label:""}),await this.saveSettings()}async addFolderToIgnoreList(t){this.settings.foldersToIgnore.push(t.path),await this.saveSettings()}};
/*! Bundled license information:
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/
/* nosourcemap */
+11
View File
@@ -0,0 +1,11 @@
{
"id": "obsidian-linter",
"name": "Linter",
"version": "1.29.0",
"minAppVersion": "1.5.7",
"description": "Formats and styles your notes. It can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular markdown contents like list, italics, and bold styles; and more with the use of custom rule options as well.",
"author": "Victor Tao",
"authorUrl": "https://github.com/platers",
"helpUrl": "https://platers.github.io/obsidian-linter/",
"isDesktopOnly": false
}
+1
View File
@@ -0,0 +1 @@
.linter-navigation-item{align-items:center;background-color:var(--background-primary-secondary-alt);border:1px solid var(--background-modifier-border);border-radius:100px;border-radius:8px 8px 2px 2px;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:700;gap:4px;height:32px;overflow:hidden;padding:4px 6px;transition:color .25s ease-in-out,padding .25s ease-in-out,background-color .35s cubic-bezier(.45,.25,.83,.67),max-width .35s cubic-bezier(.57,.04,.58,1);white-space:nowrap}@media screen and (max-width:1325px){.linter-navigation-item.linter-desktop{max-width:32px}}@media screen and (max-width:800px){.linter-navigation-item.linter-mobile{max-width:32px}}.linter-navigation-item-icon,.linter-warning{padding-top:5px}.linter-navigation-item:hover{border-color:var(--interactive-accent-hover);border-bottom:0}.linter-navigation-item-selected{background-color:var(--interactive-accent)!important;border:1px solid var(--background-modifier-border);border-bottom:0;border-radius:8px 8px 2px 2px;color:var(--text-on-accent);max-width:100%!important;padding:4px 9px!important;transition:color .25s ease-in-out,padding .25s ease-in-out,background-color .35s cubic-bezier(.45,.25,.83,.67),max-width .45s cubic-bezier(.57,.04,.58,1) .2s}.linter{transition:transform .4s 0s}.linter-setting-title{align-items:baseline;display:flex;gap:30px;justify-content:space-between}.linter-setting-title.linter-mobile{justify-content:space-around}.linter-setting-title h1{font-weight:900;margin-bottom:12px;margin-top:6px}.linter-setting-header{margin-bottom:24px;overflow-x:auto;overflow-y:hidden}.linter-setting-header .linter-setting-tab-group{align-items:flex-end;display:flex;flex-wrap:wrap;width:100%}.linter-setting-tab-group{border-bottom:2px solid var(--background-modifier-border);margin-top:6px;padding-left:2px;padding-right:2px}.linter-setting-header .linter-tab-settings{border-left:2px solid transparent;border-right:2px solid transparent;cursor:pointer;font-weight:600;padding:6px 12px;white-space:nowrap}.linter-setting-header .linter-tab-settings:first-child{margin-left:6px}.linter-setting-header .linter-tab-settings.linter-tab-settings-active{border:2px solid var(--background-modifier-border);border-bottom-color:var(--background-primary);border-radius:2px;transform:translateY(2px)}.linter-navigation-item:not(.linter-navigation-item-selected)>span:nth-child(2),.linter-visually-hidden{border:0;clip:rect(0 0 0 0);clip-path:rect(0 0 0 0);height:auto;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}textarea.full-width{margin-bottom:.8em;margin-top:.8em;min-height:10em;width:100%}.full-width-textbox-input-wrapper{position:relative}.settings-copy-button{margin:0 0 0 auto;padding:4px;position:absolute;right:.8em;top:.8em}.settings-copy-button svg.linter-clipboard path{fill:var(--text-faint)}.settings-copy-button svg.linter-success path{fill:var(--interactive-success)}.settings-copy-button:active,.settings-copy-button:hover{cursor:pointer}.settings-copy-button:active svg path,.settings-copy-button:hover svg path{fill:var(--text-accent-hover);transition:all .3s ease}.settings-copy-button:focus{outline:0}.linter-custom-regex-replacement-container div:last-child{border:none}.linter-custom-regex-replacement{border:none;border-bottom:var(--hr-thickness) solid;border-color:var(--hr-color);margin-bottom:15px}.linter-custom-regex-replacement-row2{flex-wrap:wrap}.linter-custom-regex-replacement-normal-input{width:40%}.linter-custom-regex-replacement-flags{width:15%}.linter-custom-regex-replacement-label{flex-direction:row-reverse}.linter-custom-regex-replacement-label-input{width:50%}.linter-files-to-ignore-container div:last-child{border:none}.linter-files-to-ignore{border:none;border-bottom:var(--hr-thickness) solid;border-color:var(--hr-color);margin-bottom:15px}.linter-files-to-ignore-normal-input{width:40%}.linter-files-to-ignore-flags{width:15%}.linter-no-border{border:none}.linter-border-bottom{border-bottom:1px solid var(--background-modifier-border);border-top:0;margin-bottom:.75em}.linter-no-padding-top{padding-top:0}.custom-row-description{margin-top:0}.modal-warn,.search-zero-state{font-weight:700}.modal-heading,.search-zero-state{text-align:center}
+42
View File
@@ -0,0 +1,42 @@
{
"useCache": true,
"hideExcluded": false,
"recencyBoost": "0",
"downrankedFoldersFilters": [],
"ignoreDiacritics": true,
"ignoreArabicDiacritics": false,
"indexedFileTypes": [],
"displayTitle": "",
"PDFIndexing": false,
"officeIndexing": false,
"imagesIndexing": false,
"aiImageIndexing": false,
"unsupportedFilesIndexing": "default",
"splitCamelCase": false,
"openInNewPane": false,
"vimLikeNavigationShortcut": false,
"ribbonIcon": true,
"showExcerpt": true,
"maxEmbeds": 5,
"renderLineReturnInExcerpts": true,
"showCreateButton": false,
"highlight": true,
"showPreviousQueryResults": true,
"simpleSearch": false,
"tokenizeUrls": false,
"fuzziness": "1",
"weightBasename": 10,
"weightDirectory": 7,
"weightH1": 6,
"weightH2": 5,
"weightH3": 4,
"weightUnmarkedTags": 2,
"weightCustomProperties": [],
"httpApiEnabled": false,
"httpApiPort": "51361",
"httpApiNotice": true,
"welcomeMessage": "1.21.0",
"verboseLogging": false,
"DANGER_httpHost": null,
"DANGER_forceSaveCache": false
}
+170
View File
@@ -0,0 +1,170 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var sI=Object.create;var Du=Object.defineProperty;var oI=Object.getOwnPropertyDescriptor;var uI=Object.getOwnPropertyNames;var cI=Object.getPrototypeOf,lI=Object.prototype.hasOwnProperty;var fI=(e,t,r)=>t in e?Du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var Pi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nn=(e,t)=>{for(var r in t)Du(e,r,{get:t[r],enumerable:!0})},F_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uI(t))!lI.call(e,i)&&i!==r&&Du(e,i,{get:()=>t[i],enumerable:!(n=oI(t,i))||n.enumerable});return e};var ln=(e,t,r)=>(r=e!=null?sI(cI(e)):{},F_(t||!e||!e.__esModule?Du(r,"default",{value:e,enumerable:!0}):r,e)),B_=e=>F_(Du({},"__esModule",{value:!0}),e);var ql=(e,t,r)=>(fI(e,typeof t!="symbol"?t+"":t,r),r),dp=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var Mi=(e,t,r)=>(dp(e,t,"read from private field"),r?r.call(e):t.get(e)),ku=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},hp=(e,t,r,n)=>(dp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var $_=(e,t,r)=>(dp(e,t,"access private method"),r);var H_,U_=v(()=>{H_="5"});var Wn=v(()=>{U_();typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(H_)});var va,is,as,Fi,Pt,Ht,V_,q_,bt=v(()=>{va="[",is="[!",as="]",Fi={},Pt=Symbol(),Ht=Symbol("filename"),V_=Symbol("hmr"),q_="http://www.w3.org/1999/xhtml"});var zl,z_=v(()=>{zl=!0});var Y_,se,K_=v(()=>{Y_=globalThis.process?.env?.NODE_ENV,se=Y_&&!Y_.toLowerCase().startsWith("prod")});var j_=v(()=>{});var mt=v(()=>{z_();K_();j_()});var xr,ss,Ru,W_,Nt=v(()=>{xr=Symbol("$state"),ss=Symbol("$state metadata"),Ru=Symbol("legacy props"),W_=Symbol("")});function xa(e){return typeof e=="function"}function X_(e){return e()}function os(e){for(var t=0;t<e.length;t++)e[t]()}var fn,G_,Lu,pp,Kt,Kr,Yl,mp,Q_,Ta,Ut,it=v(()=>{fn=Array.isArray,G_=Array.prototype.indexOf,Lu=Array.from,pp=Object.keys,Kt=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,Yl=Object.getOwnPropertyDescriptors,mp=Object.prototype,Q_=Array.prototype,Ta=Object.getPrototypeOf;Ut=()=>{}});function Z_(){var e=Pu;Pu=[],os(e)}function J_(){var e=Mu;Mu=[],os(e)}function dn(e){Pu.length===0&&queueMicrotask(Z_),Pu.push(e)}function eb(e){Mu.length===0&&dI(J_),Mu.push(e)}function gp(){Pu.length>0&&Z_(),Mu.length>0&&J_()}var dI,Pu,Mu,On=v(()=>{it();dI=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback,Pu=[],Mu=[]});function Kl(e){return e===this.v}function Js(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function eo(e){return!Js(e,this.v)}var us=v(()=>{});function _p(){if(se){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function tb(){if(se){let e=new Error(`derived_references_self
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function rb(e){if(se){let t=new Error(`effect_in_teardown
\`${e}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function nb(){if(se){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ib(e){if(se){let t=new Error(`effect_orphan
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function ab(){if(se){let e=new Error(`effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function sb(){if(se){let e=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function ob(e){if(se){let t=new Error(`props_invalid_value
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function ub(e){if(se){let t=new Error(`rune_outside_svelte
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function cb(){if(se){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function lb(){if(se){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fb(){if(se){let e=new Error("state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state\nhttps://svelte.dev/e/state_unsafe_local_read");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function db(){if(se){let e=new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var hn=v(()=>{mt()});function hb(){mi=!0}var mi,gi,Bi=v(()=>{mi=!1,gi=!1});var bp=v(()=>{mt()});var Fu=v(()=>{mt();bp();it()});function $i(e){let t=Error(),r=t.stack;if(r){let n=r.split(`
`),i=[`
`];for(let a=0;a<n.length;a++){let o=n[a];if(o!=="Error"){if(o.includes("validate_each_keys"))return null;o.includes("svelte/src/internal")||i.push(o)}}if(i.length===1)return null;Kt(t,"stack",{value:i.join(`
`)}),Kt(t,"name",{value:`${e}Error`})}return t}var Bu,to=v(()=>{bt();Fu();it();Nt();He();Ge();Bu=null});function xp(e){cs=e}function Mt(e,t){var r={f:0,v:e,reactions:null,equals:Kl,rv:0,wv:0};return se&&gi&&(r.created=t??$i("CreatedAt"),r.debug=null),r}function Xn(e){return mb(Mt(e))}function _i(e,t=!1){let r=Mt(e);return t||(r.equals=eo),mi&&Pe!==null&&Pe.l!==null&&(Pe.l.s??=[]).push(r),r}function ft(e,t=!1){return mb(_i(e,t))}function mb(e){return $e!==null&&!gn&&$e.f&2&&(Gn===null?_b([e]):Gn.push(e)),e}function oe(e,t){return $e!==null&&!gn&&bi()&&$e.f&18&&(Gn===null||!Gn.includes(e))&&db(),no(e,t)}function no(e,t){if(!e.equals(t)){var r=e.v;if(fs?ro.set(e,t):ro.set(e,r),e.v=t,e.wv=Hu(),se&&gi&&(e.updated=$i("UpdatedAt"),Oe!=null&&(e.trace_need_increase=!0,e.trace_v??=r)),gb(e,2048),bi()&&Oe!==null&&Oe.f&1024&&!(Oe.f&96)&&(pn===null?bb([e]):pn.push(e)),se&&cs.size>0){let n=Array.from(cs);for(let i of n)i.f&1024&&Ar(i,4096),Ui(i)&&ds(i);cs.clear()}}return t}function gb(e,t){var r=e.reactions;if(r!==null)for(var n=bi(),i=r.length,a=0;a<i;a++){var o=r[a],l=o.f;if(!(l&2048)&&!(!n&&o===Oe)){if(se&&l&262144){cs.add(o);continue}Ar(o,t),l&1280&&(l&2?gb(o,4096):io(o))}}}var cs,ro,yr=v(()=>{mt();Ge();us();Nt();hn();Bi();to();Ot();cs=new Set,ro=new Map});function kn(e){var t=2050,r=$e!==null&&$e.f&2?$e:null;Oe===null||r!==null&&r.f&256?t|=256:Oe.f|=1048576;let n={ctx:Pe,deps:null,effects:null,equals:Kl,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??Oe};return se&&gi&&(n.created=$i("CreatedAt")),n}function Br(e){let t=kn(e);return t.equals=eo,t}function jl(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)lr(t[r])}}function hI(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t;t=t.parent}return null}function pI(e){var t,r=Oe;if(Wt(hI(e)),se){let n=cs;xp(new Set);try{yp.includes(e)&&tb(),yp.push(e),jl(e),t=Wl(e)}finally{Wt(r),xp(n),yp.pop()}}else try{jl(e),t=Wl(e)}finally{Wt(r)}return t}function wp(e){var t=pI(e),r=(Vi||e.f&256)&&e.deps!==null?4096:1024;Ar(e,r),e.equals(t)||(e.v=t,e.wv=Hu())}var yp,hs=v(()=>{mt();Nt();Ge();us();hn();He();yr();to();Bi();Ot();yp=[]});function Eb(e,t,r){se?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,ao,so):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function vb(e){se?console.warn(`%c[svelte] hydration_html_changed
%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
https://svelte.dev/e/hydration_html_changed`,ao,so):console.warn("https://svelte.dev/e/hydration_html_changed")}function ps(e){se?console.warn(`%c[svelte] hydration_mismatch
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,ao,so):console.warn("https://svelte.dev/e/hydration_mismatch")}function Tb(){se?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,ao,so):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Sp(e,t){se?console.warn(`%c[svelte] ownership_invalid_mutation
%c${e?`${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead`:"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
https://svelte.dev/e/ownership_invalid_mutation`,ao,so):console.warn("https://svelte.dev/e/ownership_invalid_mutation")}function Gl(e){se?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,ao,so):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var ao,so,Wr=v(()=>{mt();ao="font-weight: bold",so="font-weight: normal"});function $r(e){ge=e}function wt(e){if(e===null)throw ps(),Fi;return De=e}function Vt(){return wt(fr(De))}function Te(e){if(ge){if(fr(De)!==null)throw ps(),Fi;De=e}}function wr(e=1){if(ge){for(var t=e,r=De;t--;)r=fr(r);De=r}}function oo(){for(var e=0,t=De;;){if(t.nodeType===8){var r=t.data;if(r===as){if(e===0)return t;e-=1}else(r===va||r===is)&&(e+=1)}var n=fr(t);t.remove(),t=n}}var ge,De,Et=v(()=>{bt();Wr();Gr();ge=!1});function er(e,t=null,r){var n=null;if(se&&gi&&(n=$i("CreatedAt")),typeof e!="object"||e===null||xr in e)return e;let i=Ta(e);if(i!==mp&&i!==Q_)return e;var a=new Map,o=fn(e),l=Mt(0);o&&a.set("length",Mt(e.length,n));var d;if(se)if(d={parent:t,owners:null},r){let p=r.v?.[ss]?.owners;d.owners=p?new Set(p):null}else d.owners=t===null?Pe!==null?new Set([Pe.function]):null:new Set;return new Proxy(e,{defineProperty(p,g,E){(!("value"in E)||E.configurable===!1||E.enumerable===!1||E.writable===!1)&&cb();var _=a.get(g);return _===void 0?(_=Mt(E.value,n),a.set(g,_)):oe(_,er(E.value,d)),!0},deleteProperty(p,g){var E=a.get(g);if(E===void 0)g in p&&a.set(g,Mt(Pt,n));else{if(o&&typeof g=="string"){var _=a.get("length"),y=Number(g);Number.isInteger(y)&&y<_.v&&oe(_,y)}oe(E,Pt),xb(l)}return!0},get(p,g,E){if(se&&g===ss)return d;if(g===xr)return e;var _=a.get(g),y=g in p;if(_===void 0&&(!y||Kr(p,g)?.writable)&&(_=Mt(er(y?p[g]:Pt,d),n),a.set(g,_)),_!==void 0){var C=q(_);if(se){var k=C?.[ss];k&&k?.parent!==d&&Cp(d,k)}return C===Pt?void 0:C}return Reflect.get(p,g,E)},getOwnPropertyDescriptor(p,g){var E=Reflect.getOwnPropertyDescriptor(p,g);if(E&&"value"in E){var _=a.get(g);_&&(E.value=q(_))}else if(E===void 0){var y=a.get(g),C=y?.v;if(y!==void 0&&C!==Pt)return{enumerable:!0,configurable:!0,value:C,writable:!0}}return E},has(p,g){if(se&&g===ss||g===xr)return!0;var E=a.get(g),_=E!==void 0&&E.v!==Pt||Reflect.has(p,g);if(E!==void 0||Oe!==null&&(!_||Kr(p,g)?.writable)){E===void 0&&(E=Mt(_?er(p[g],d):Pt,n),a.set(g,E));var y=q(E);if(y===Pt)return!1}return _},set(p,g,E,_){var y=a.get(g),C=g in p;if(o&&g==="length")for(var k=E;k<y.v;k+=1){var P=a.get(k+"");P!==void 0?oe(P,Pt):k in p&&(P=Mt(Pt,n),a.set(k+"",P))}if(y===void 0?(!C||Kr(p,g)?.writable)&&(y=Mt(void 0,n),oe(y,er(E,d)),a.set(g,y)):(C=y.v!==Pt,oe(y,er(E,d))),se){var N=E?.[ss];N&&N?.parent!==d&&Cp(d,N),yb(d)}var L=Reflect.getOwnPropertyDescriptor(p,g);if(L?.set&&L.set.call(_,E),!C){if(o&&typeof g=="string"){var H=a.get("length"),R=Number(g);Number.isInteger(R)&&R>=H.v&&oe(H,R+1)}xb(l)}return!0},ownKeys(p){q(l);var g=Reflect.ownKeys(p).filter(y=>{var C=a.get(y);return C===void 0||C.v!==Pt});for(var[E,_]of a)_.v!==Pt&&!(E in p)&&g.push(E);return g},setPrototypeOf(){lb()}})}function xb(e,t=1){oe(e,e.v+t)}function Ql(e){return e!==null&&typeof e=="object"&&xr in e?e[xr]:e}var uo=v(()=>{mt();Ge();Ot();it();Uu();yr();Nt();bt();hn();to();Bi()});function Ab(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,o){let l=r.call(this,a,o);if(l===-1){for(let d=o??0;d<this.length;d+=1)if(Ql(this[d])===a){Gl("array.indexOf(...)");break}}return l},e.lastIndexOf=function(a,o){let l=n.call(this,a,o??this.length-1);if(l===-1){for(let d=0;d<=(o??this.length-1);d+=1)if(Ql(this[d])===a){Gl("array.lastIndexOf(...)");break}}return l},e.includes=function(a,o){let l=i.call(this,a,o);if(!l){for(let d=0;d<this.length;d+=1)if(Ql(this[d])===a){Gl("array.includes(...)");break}}return l},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var Ip=v(()=>{Wr();uo()});function Xl(){if(Np===void 0){Np=window,wb=document,Vu=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype;Sb=Kr(t,"firstChild").get,Cb=Kr(t,"nextSibling").get,e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0,Text.prototype.__t=void 0,se&&(e.__svelte_meta=null,Ab())}}function Qr(e=""){return document.createTextNode(e)}function qt(e){return Sb.call(e)}function fr(e){return Cb.call(e)}function xe(e,t){if(!ge)return qt(e);var r=qt(De);if(r===null)r=De.appendChild(Qr());else if(t&&r.nodeType!==3){var n=Qr();return r?.before(n),wt(n),n}return wt(r),r}function Sr(e,t){if(!ge){var r=qt(e);return r instanceof Comment&&r.data===""?fr(r):r}if(t&&De?.nodeType!==3){var n=Qr();return De?.before(n),wt(n),n}return De}function Ye(e,t=1,r=!1){let n=ge?De:e;for(var i;t--;)i=n,n=fr(n);if(!ge)return n;var a=n?.nodeType;if(r&&a!==3){var o=Qr();return n===null?i?.after(o):n.before(o),wt(o),o}return wt(n),n}function qu(e){e.textContent=""}var Np,wb,Vu,Sb,Cb,Gr=v(()=>{Et();mt();Ip();it()});function kp(e){fs=e}function tr(e){$e=e}function Wt(e){Oe=e}function _b(e){Gn=e}function bb(e){pn=e}function Hu(){return++Rb}function Ui(e){var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i,a,o=( Line truncated
${i.map(g=>`
${d}in ${g}`).join("")}
`}),Kt(e,"component_stack",{value:i});let p=e.stack;if(p){let g=p.split(`
`),E=[];for(let _=0;_<g.length;_++){let y=g[_];y.includes("svelte/src/internal")||E.push(y)}Kt(e,"stack",{value:E.join(`
`)})}if(Nb(e,t),Ob(t))throw e}function Lb(e,t,r=!0){var n=e.reactions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];a.f&2?Lb(a,t,!1):t===a&&(r?Ar(a,2048):a.f&1024&&Ar(a,4096),io(a))}}function Wl(e){var t=Hr,r=bn,n=pn,i=$e,a=Vi,o=Gn,l=Pe,d=gn,p=e.f;Hr=null,bn=0,pn=null,Vi=(p&256)!==0&&(gn||!ms||$e===null),$e=p&96?null:e,Gn=null,Wu(e.ctx),gn=!1,tf++;try{var g=(0,e.fn)(),E=e.deps;if(Hr!==null){var _;if(ju(e,bn),E!==null&&bn>0)for(E.length=bn+Hr.length,_=0;_<Hr.length;_++)E[bn+_]=Hr[_];else e.deps=E=Hr;if(!Vi)for(_=bn;_<E.length;_++)(E[_].reactions??=[]).push(e)}else E!==null&&bn<E.length&&(ju(e,bn),E.length=bn);if(bi()&&pn!==null&&!gn&&E!==null&&!(e.f&6146))for(_=0;_<pn.length;_++)Lb(pn[_],e);return i!==null&&(tf++,pn!==null&&(n===null?n=pn:n.push(...pn))),g}finally{Hr=t,bn=r,pn=n,$e=i,Vi=a,Gn=o,Wu(l),gn=d}}function mI(e,t){let r=t.reactions;if(r!==null){var n=G_.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&2&&(Hr===null||!Hr.includes(t))&&(Ar(t,4096),t.f&768||(t.f^=512),jl(t),ju(t,0))}function ju(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)mI(e,r[n])}function ds(e){var t=e.f;if(!(t&16384)){Ar(e,1024);var r=Oe,n=Pe,i=ms;if(Oe=e,ms=!0,se){var a=Xr;Gu(e.component_function)}try{t&16?Pb(e):Lp(e),Rp(e);var o=Wl(e);e.teardown=typeof o=="function"?o:null,e.wv=Rb;var l=e.deps;if(se&&gi&&e.f&2048&&l!==null)for(let p=0;p<l.length;p++){var d=l[p];d.trace_need_increase&&(d.wv=Hu(),d.trace_need_increase=void 0,d.trace_v=void 0)}se&&ef.push(e)}catch(p){lo(p,e,r,n||e.ctx)}finally{ms=i,Oe=r,se&&Gu(a)}}}function Db(){console.error("Last ten effects were: ",ef.slice(-10).map(e=>e.fn)),ef=[]}function gI(){try{ab()}catch(e){if(se&&Kt(e,"stack",{value:""}),zu!==null)if(se)try{lo(e,zu,null,null)}catch(t){throw Db(),t}else lo(e,zu,null,null);else throw se&&Db(),e}}function Op(){var e=ms;try{var t=0;for(ms=!0;Yu.length>0;){t++>1e3&&gI();var r=Yu,n=r.length;Yu=[];for(var i=0;i<n;i++){var a=bI(r[i]);_I(a)}}}finally{Ku=!1,ms=e,zu=null,se&&(ef=[]),ro.clear()}}function _I(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];if(!(n.f&24576))try{Ui(n)&&(ds(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pp(n):n.fn=null))}catch(i){lo(i,n,null,n.ctx)}}}function io(e){Ku||(Ku=!0,queueMicrotask(Op));for(var t=zu=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}Yu.push(t)}function bI(e){for(var t=[],r=e;r!==null;){var n=r.f,i=(n&96)!==0,a=i&&(n&1024)!==0;if(!a&&!(n&8192)){if(n&4)t.push(r);else if(i)r.f^=1024;else{var o=$e;try{$e=r,Ui(r)&&ds(r)}catch(p){lo(p,r,null,r.ctx)}finally{$e=o}}var l=r.first;if(l!==null){r=l;continue}}var d=r.parent;for(r=r.next;r===null&&d!==null;)r=d.next,d=d.parent}return t}function fo(e){var t;for(e&&(Ku=!0,Op(),t=e()),gp();Yu.length>0;)Ku=!0,Op(),gp();return t}async function Ei(){await Promise.resolve(),fo()}function q(e){var t=e.f,r=(t&2)!==0;if($u!==null&&$u.add(e),$e!==null&&!gn){Gn!==null&&Gn.includes(e)&&fb();var n=$e.deps;e.rv<tf&&(e.rv=tf,Hr===null&&n!==null&&n[bn]===e?bn++:Hr===null?Hr=[e]:(!Vi||!Hr.includes(e))&&Hr.push(e))}else if(r&&e.deps===null&&e.effects===null){var i=e,a=i.parent;a!==null&&!(a.f&256)&&(i.f^=256)}if(r&&(i=e,Ui(i)&&wp(i)),se&&gi&&Bu!==null&&$e!==null&&Bu.reaction===$e){if(e.debug)e.debug();else if(e.created){var o=Bu.entries.get(e);o===void 0&&(o={read:[]},Bu.entries.set(e,o)),o.read.push($i("TracedAt"))}}return fs&&ro.has(e)?ro.get(e):e.v}function at(e){var t=gn;try{return gn=!0,e()}finally{gn=t}}function Ar(e,t){e.f=e.f&EI|t}function vt(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(xr in e)rf(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&xr in r&&rf(r)}}}function rf(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{rf(e[n],t)}catch{}let r=Ta(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let n=Yl(r);for(let i in n){let a=n[i].get;if(a)try{a.call(e)}catch{}}}}}var Ib,Zl,Ku,zu,ms,fs,Yu,ef,$e,gn,Oe,Gn,Hr,bn,pn,Rb,tf,Vi,$u,EI,Ge=v(()=>{mt();it();He();Nt();On();yr();hs();hn();bt();Bi();to();Ot();Gr();Ib=new WeakSet,Zl=!1,Ku=!1,zu=null,ms=!1,fs=!1;Yu=[],ef=[],$e=null,gn=!1;Oe=null;Gn=null;Hr=null,bn=0,pn=null;Rb=1,tf=0,Vi=!1,$u=null;EI=-7169});function Fp(e){Oe===null&&$e===null&&ib(e),$e!==null&&$e.f&256&&Oe===null&&nb(),fs&&rb(e)}function vI(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function gs(e,t,r,n=!0){var i=Oe;if(se)for(;i!==null&&i.f&262144;)i=i.parent;var a={ctx:Pe,deps:null,nodes_start:null,nodes_end:null,f:e|2048,first:null,fn:t,last:null,next:null,parent:i,prev:null,teardown:null,transitions:null,wv:0};if(se&&(a.component_function=Xr),r)try{ds(a),a.f|=32768}catch(d){throw lr(a),d}else t!==null&&io(a);var o=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!o&&n&&(i!==nu Line truncated
`)){let n=xI.exec(r)??yI.exec(r);n&&t.push({file:n[1],line:+n[2],column:+n[3]})}return t}function $b(){let e=AI()?.slice(4);if(!e)return null;for(let t=0;t<e.length;t++){let r=e[t],n=TI[r.file];if(!n){if(t===0)return null;continue}for(let i of n){if(i.end==null)return null;if(i.start.line<r.line&&i.end.line>r.line)return i.component}}return null}function Cp(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function Hb(e,t){return e.owners===null?!0:e.owners.has(t)||Ht in t&&[...e.owners].some(r=>r[Ht]===t[Ht])||e.parent!==null&&Hb(e.parent,t)}function Ub(e){return e?.owners?.values().next().value??Ub(e.parent)}function yb(e){if(SI)return;let t=$b();if(t&&!Hb(e,t)){let r=Ub(e);r[Ht]!==t[Ht]?Sp(t[Ht],r[Ht]):Sp()}}var TI,xI,yI,wI,SI,Uu=v(()=>{Nt();He();Ot();it();Wr();bt();TI={},xI=/at (?:.+ \()?(.+):(\d+):(\d+)\)?$/,yI=/@(.+):(\d+):(\d+)$/;wI=Symbol("ADD_OWNER");SI=!1});function po(e){if(se){let t=new Error(`lifecycle_outside_component
\`${e}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var mo=v(()=>{mt()});function Wu(e){Pe=e}function Gu(e){Xr=e}function dr(e,t=!1,r){var n=Pe={p:Pe,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};mi&&!t&&(Pe.l={s:null,u:null,r1:[],r2:Mt(!1)}),Cr(()=>{n.d=!0}),se&&(Pe.function=r,Xr=r)}function hr(e){let t=Pe;if(t!==null){e!==void 0&&(t.x=e);let o=t.e;if(o!==null){var r=Oe,n=$e;t.e=null;try{for(var i=0;i<o.length;i++){var a=o[i];Wt(a.effect),tr(a.reaction),Gt(a.fn)}}finally{Wt(r),tr(n)}}Pe=t.p,se&&(Xr=t.p?.function??null),t.m=!0}return e||{}}function bi(){return!mi||Pe!==null&&Pe.l===null}var Pe,Xr,Ot=v(()=>{mt();Uu();mo();yr();Ge();He();Bi();Pe=null;Xr=null});function Vb(e){e=e.replace(NI,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}function qb(e){return DI.includes(e)}function $p(e){return e?.replace(/\//g,"/\u200B")}var NI,OI,hB,DI,_s=v(()=>{NI=/\r/g;OI=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"],hB=[...OI,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"],DI=["touchstart","touchmove"]});var zb=v(()=>{_s();Ge();Wr()});var Hp=v(()=>{});var Yb=v(()=>{bt();Et()});function of(){Kb||(Kb=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}var Kb,uf=v(()=>{Et();Gr();On();Kb=!1});function go(e){var t=$e,r=Oe;tr(null),Wt(null);try{return e()}finally{tr(t),Wt(r)}}function Up(e,t,r,n=r){e.addEventListener(t,()=>go(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),of()}var Ti=v(()=>{He();Ge();uf()});function Wb(e,t,r,n={}){function i(a){if(n.capture||_o.call(t,a),!a.cancelBubble)return go(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?dn(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function pr(e,t,r,n,i){var a={capture:n,passive:i},o=Wb(e,t,r,a);(t===document.body||t===window||t===document)&&Cr(()=>{t.removeEventListener(e,o,a)})}function _o(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],a=i[0]||e.target,o=0,l=e.__root;if(l){var d=i.indexOf(l);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var p=i.indexOf(t);if(p===-1)return;d<=p&&(o=d)}if(a=i[o]||e.target,a!==t){Kt(e,"currentTarget",{configurable:!0,get(){return a||r}});var g=$e,E=Oe;tr(null),Wt(null);try{for(var _,y=[];a!==null;){var C=a.assignedSlot||a.parentNode||a.host||null;try{var k=a["__"+n];if(k!=null&&(!a.disabled||e.target===a))if(fn(k)){var[P,...N]=k;P.apply(a,[e,...N])}else k.call(a,e)}catch(L){_?y.push(L):_=L}if(e.cancelBubble||C===t||C===null)break;a=C}if(_){for(let L of y)queueMicrotask(()=>{throw L});throw _}}finally{e.__root=t,delete e.currentTarget,tr(g),Wt(E)}}}var jb,Vp,Xu=v(()=>{He();it();Et();On();bt();Wr();Ge();Ti();jb=new Set,Vp=new Set});function Gb(){kI=void 0}var kI,qp=v(()=>{Et();Gr();He();Nt();bt()});function Zu(e){var t=document.createElement("template");return t.innerHTML=e,t.content}var cf=v(()=>{});function Zr(e,t){var r=Oe;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Le(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("<!>");return()=>{if(ge)return Zr(De,null),De;i===void 0&&(i=Zu(a?e:"<!>"+e),r||(i=qt(i)));var o=n||Vu?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=qt(o),d=o.lastChild;Zr(l,d)}else Zr(o,o);return o}}function Ju(e=""){if(!ge){var t=Qr(e+"");return Zr(t,t),t}var r=De;return r.nodeType!==3&&(r.before(r=Qr()),wt(r)),Zr(r,r),r}function qi(){if(ge)return Zr(De,null),De;var e=document.createDocumentFragment(),t=document.createComment(""),r=Qr();return e.append(t,r),Zr(t,r),e}function we(e,t){if(ge){Oe.nodes_end=De,Vt();return}e!==null&&e.before(t)}var bs=v(()=>{Et();Gr();cf();Ge();bt()});function ir(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Es(e,t){return Qb(e,t)}function Yp(e,t){Xl(),t.intro=t.intro??!1;let r=t.target,n=ge,i=De;try{for(var a=qt(r);a&&(a.nodeType!==8||a.data!==va);)a=fr(a);if(!a)throw Fi;$r(!0),wt(a),Vt();let o=Qb(e,{...t,anchor:a});if(De===null||De.nodeType!==8||De.data!==as)throw ps(),Fi;return $r(!1),o}catch(o){if(o===Fi)return t.recover===!1&&sb(),Xl(),qu(r),$r(!1),Es(e,t);throw o}finally{$r(n),wt(i),Gb()}}function Qb(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:o=!0}){Xl();var l=new Set,d=E=>{for(var _=0;_<E.length;_++){var y=E[_];if(!l.has(y)){l.add(y);var C=qb(y);t.addEventListener(y,_o,{passive:C});v Line truncated
\r\f\xA0\v\uFEFF`]});function Yi(e,t,r,n,i,a){var o=e.__className;if(ge||o!==r){var l=EE(r,n,a);(!ge||l!==e.getAttribute("class"))&&(l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l)),e.__className=r}else if(a&&i!==a)for(var d in a){var p=!!a[d];(i==null||p!==!!i[d])&&e.classList.toggle(d,p)}return a}var Xp=v(()=>{nc();Et()});function Zp(e,t={},r,n){for(var i in r){var a=r[i];t[i]!==a&&(r[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,n))}}function ic(e,t,r,n){var i=e.__style;if(ge||i!==t){var a=vE(t,n);(!ge||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}else n&&(Array.isArray(n)?(Zp(e,r?.[0],n[0]),Zp(e,r?.[1],n[1],"important")):Zp(e,r,n));return n}var Jp=v(()=>{nc();Et()});function tm(e){if(ge){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;Ki(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;Ki(e,"checked",null),e.checked=i}}};e.__on_r=r,eb(r),of()}}function Ki(e,t,r,n){var i=GI(e);if(ge&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||XI(e,t,r??"");return}i[t]!==(i[t]=r)&&(t==="loading"&&(e[W_]=r),r==null?e.removeAttribute(t):typeof r!="string"&&QI(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function GI(e){return e.__attributes??={[jI]:e.nodeName.includes("-"),[WI]:e.namespaceURI===q_}}function QI(e){var t=TE.get(e.nodeName);if(t)return t;TE.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=Yl(n);for(var a in r)r[a].set&&t.push(a);n=Ta(n)}return t}function XI(e,t,r){se&&(t==="srcset"&&ZI(e,r)||em(e.getAttribute(t)??"",r)||Eb(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function em(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function xE(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function ZI(e,t){var r=xE(e.srcset),n=xE(t);return n.length===r.length&&n.every(([i,a],o)=>a===r[o][1]&&(em(r[o][0],i)||em(i,r[o][0])))}var YI,KI,jI,WI,TE,yE=v(()=>{mt();Et();it();Xu();uf();Wr();Nt();On();_s();Ge();nc();Xp();Jp();bt();YI=Symbol("class"),KI=Symbol("style"),jI=Symbol("is custom element"),WI=Symbol("is html");TE=new Map});var JI,ei,rm=v(()=>{it();mt();JI=zl?()=>performance.now():()=>Date.now(),ei={tick:e=>(zl?requestAnimationFrame:Ut)(e),now:()=>JI(),tasks:new Set}});function AE(){let e=ei.now();ei.tasks.forEach(t=>{t.c(e)||(ei.tasks.delete(t),t.f())}),ei.tasks.size!==0&&ei.tick(AE)}function wE(e){let t;return ei.tasks.size===0&&ei.tick(AE),{promise:new Promise(r=>{ei.tasks.add(t={c:e,f:r})}),abort(){ei.tasks.delete(t)}}}var SE=v(()=>{rm()});function df(e,t){go(()=>{e.dispatchEvent(new CustomEvent(t))})}function n3(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;let t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function CE(e){let t={},r=e.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let o=n3(i.trim());t[o]=a.trim()}return t}function im(e,t,r,n){var i=(e&1)!==0,a=(e&2)!==0,o=i&&a,l=(e&4)!==0,d=o?"both":i?"in":"out",p,g=t.inert,E=t.style.overflow,_,y;function C(){var H=$e,R=Oe;tr(null),Wt(null);try{return p??=r()(t,n?.()??{},{direction:d})}finally{tr(H),Wt(R)}}var k={is_global:l,in(){if(t.inert=g,!i){y?.abort(),y?.reset?.();return}a||_?.abort(),df(t,"introstart"),_=nm(t,C(),y,1,()=>{df(t,"introend"),_?.abort(),_=p=void 0,t.style.overflow=E})},out(H){if(!a){H?.(),p=void 0;return}t.inert=!0,df(t,"outrostart"),y=nm(t,C(),_,0,()=>{df(t,"outroend"),H?.()})},stop:()=>{_?.abort(),y?.abort()}},P=Oe;if((P.transitions??=[]).push(k),i&&lf){var N=l;if(!N){for(var L=P.parent;L&&L.f&65536;)for(;(L=L.parent)&&!(L.f&16););N=!L||(L.f&32768)!==0}N&&Gt(()=>{at(()=>k.in())})}}function nm(e,t,r,n,i){var a=n===1;if(xa(t)){var o,l=!1;return dn(()=>{if(!l){var P=t({direction:a?"in":"out"});o=nm(e,P,r,n,i)}}),{abort:()=>{l=!0,o?.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(r?.deactivate(),!t?.duration)return i(),{abort:Ut,deactivate:Ut,reset:Ut,t:()=>n};let{delay:d=0,css:p,tick:g,easing:E=i3}=t;var _=[];if(a&&r===void 0&&(g&&g(0,1),p)){var y=CE(p(0,1));_.push(y,y)}var C=()=>1-n,k=e.animate(_,{duration:d});return k.onfinish=()=>{var P=r?.t()??1-n;r?.abort();var N=n-P,L=t.duration*Math.abs(N),H=[];if(L>0){var R=!1;if(p)for(var B=Math.ceil(L/16.666666666666668),V=0;V<=B;V+=1){var X=P+N*E(V/B),ce=CE(p(X,1-X));H.push(ce),R||=ce.overflow==="hidden"}R&&(e.style.overflow="hidden"),C=()=>{var ve=k.currentTime;return P+N*E(ve/L)},g&&wE(()=>{if(k.playState!=="running")return!1;var ve=C();return g(ve,1-ve),!0})}k=e.animate(H,{duration:L,fill:"forwards"}),k.onfinish=()=>{C=()=>n,g?.(n,1-n),i()}},{abort:()=>{k&&(k.cancel(),k.effect=null,k.onfinish=Ut)},deactivate:()=>{i=Ut},reset:()=>{n===0&&g?.(1,0)},t:()=>C()}}var i3,IE=v(()=>{it();He();Ge();SE();vs();ff();bt();Nt();On();Ti();i3=e=>e});var NE=v(()=>{Ti()});function om( Line truncated
${n?`\u{1F44D} You have installed <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a>, Omnisearch can use it to index PDFs and images contents.
<br />Text extraction only works on desktop, but the cache can be synchronized with your mobile device.`:'\u26A0\uFE0F Omnisearch requires <a href="https://github.com/scambier/obsidian-text-extractor">Text Extractor</a> to index PDFs and images.'}
${i?'<br/>\u{1F44D} You have installed <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a>, Omnisearch can use it to index images contents with ai.':'<br/>\u26A0\uFE0F Omnisearch requires <a href="https://github.com/Swaggeroo/obsidian-ai-image-analyzer">AI Image Analyzer</a> to index images with ai.'}`)),new Ji.Setting(r).setName(`PDFs content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(ar("Omnisearch will use Text Extractor to index the content of your PDFs.")).addToggle(p=>p.setValue(t.PDFIndexing).onChange(async g=>{await a.clearCache(),t.PDFIndexing=g,await ke(e)})).setDisabled(!n),new Ji.Setting(r).setName(`Images OCR indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(ar("Omnisearch will use Text Extractor to OCR your images and index their content.")).addToggle(p=>p.setValue(t.imagesIndexing).onChange(async g=>{await a.clearCache(),t.imagesIndexing=g,await ke(e)})).setDisabled(!n);let l=new DocumentFragment;l.createSpan({},p=>{p.innerHTML='Omnisearch will use Text Extractor to index the content of your office documents (currently <pre style="display:inline">.docx</pre> and <pre style="display:inline">.xlsx</pre>).'}),new Ji.Setting(r).setName(`Documents content indexing ${n?"":"\u26A0\uFE0F Disabled"}`).setDesc(l).addToggle(p=>p.setValue(t.officeIndexing).onChange(async g=>{await a.clearCache(),t.officeIndexing=g,await ke(e)})).setDisabled(!n);let d=new DocumentFragment;d.createSpan({},p=>{p.innerHTML="Omnisearch will use AI Image Analyzer to index the content of your images with ai."}),new Ji.Setting(r).setName(`Images AI indexing ${i?"":"\u26A0\uFE0F Disabled"}`).setDesc(d).addToggle(p=>p.setValue(t.aiImageIndexing).onChange(async g=>{await a.clearCache(),t.aiImageIndexing=g,await ke(e)})).setDisabled(!i),new Ji.Setting(r).setName("Index paths of unsupported files").setDesc(ar(`
Omnisearch can index file<strong>names</strong> of "unsupported" files, such as e.g. <pre style="display:inline">.mp4</pre>
or non-extracted PDFs & images.<br/>
"Obsidian setting" will respect the value of "Files & Links > Detect all file extensions".`)).addDropdown(p=>{p.addOptions({yes:"Yes",no:"No",default:"Obsidian setting"}).setValue(t.unsupportedFilesIndexing).onChange(async g=>{await o(),t.unsupportedFilesIndexing=g,await ke(e)})}),new Ji.Setting(r).setName("Set frontmatter property key as title").setDesc(ar(`If you have a custom property in your notes that you want to use as the title in search results. If you set this to '#heading', then use the first heading from a file as the title.<br>
Leave empty to disable.`)).addText(p=>{p.setValue(t.displayTitle).onChange(async g=>{await o(),t.displayTitle=g,await ke(e)})}),new Ji.Setting(r).setName("Additional TEXT files to index").setDesc(ar(`In addition to standard <code>md</code> files, Omnisearch can also index other <strong style="color: var(--text-accent)">PLAINTEXT</strong> files.<br/>
Add extensions separated by a space, without the dot. Example: "<code>txt org csv</code>".<br />
\u26A0\uFE0F <span style="color: var(--text-accent)">Using extensions of non-plaintext files (like .pptx) WILL cause crashes,
because Omnisearch will try to index their content.</span>`)).addText(p=>{p.setValue(t.indexedFileTypes.join(" ")).setPlaceholder("Example: txt org csv").onChange(async g=>{await a.clearCache(),t.indexedFileTypes=g.split(" "),await ke(e)})})}var Ji,Ey=v(()=>{Ji=require("obsidian");mr();mr();Oc()});function vy(e,t,r){let n=e.database;new rn.Setting(r).setName("Behavior").setHeading(),new rn.Setting(r).setName("Save index to cache").setDesc("Enable caching to speed up indexing time. In rare cases, the cache write may cause a crash in Obsidian. This option will disable itself if it happens.").addToggle(i=>i.setValue(t.useCache).onChange(async a=>{t.useCache=a,await ke(e)})),new rn.Setting(r).setName("Show previous query results").setDesc("Re-executes the previous query when opening Omnisearch.").addToggle(i=>i.setValue(t.showPreviousQueryResults).onChange(async a=>{t.showPreviousQueryResults=a,await ke(e)})),new rn.Setting(r).setName(`Respect Obsidian's "Excluded Files"`).setDesc(`By default, files that are in Obsidian's "Options > Files & Links > Excluded Files" list are downranked in results.
Enable this option to completely hide them.`).addToggle(i=>i.setValue(t.hideExcluded).onChange(async a=>{t.hideExcluded=a,await ke(e)})),new rn.Setting(r).setName("Folders to downrank in search results").setDesc("Folders to downrank in search results. Files in these folders will be downranked in results. They will still be indexed for tags, unlike excluded files. Folders should be comma delimited.").addText(i=>{i.setValue(t.downrankedFoldersFilters.join(",")).setPlaceholder("Example: src,p2/dir").onChange(async a=>{let o=a.split(",");o=o.map(l=>l.trim()),t.downrankedFoldersFilters=o,await ke(e)})}),new rn.Setting(r).setName("Split CamelCaseWords").setDesc(ar(`Enable this if you want to be able to search for CamelCaseWords as separate words.<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${yo}`)).addToggle(i=>i.setValue(t.splitCamelCase).onChange(async a=>{await n.clearCache(),t.splitCamelCase=a,await ke(e)})),new rn.Setting(r).setName("Simpler search").setDesc(`Enable this if Obsidian often freezes while making searches.
Words shorter than 3 characters won't be used as prefixes; this can reduce search delay but will return fewer results.`).addToggle(i=>i.setValue(t.simpleSearch).onChange(async a=>{t.simpleSearch=a,await ke(e)})),rn.Platform.isIosApp||new rn.Setting(r).setName("Tokenize URLs").setDesc(`Enable this if you want to be able to search for URLs as separate words.
This setting has a strong impact on indexing performance, and can crash Obsidian under certain conditions.`).addToggle(i=>i.setValue(t.tokenizeUrls).onChange(async a=>{t.tokenizeUrls=a,await ke(e)})),new rn.Setting(r).setName("Open in new pane").setDesc("Open and create files in a new pane instead of the current pane.").addToggle(i=>i.setValue(t.openInNewPane).onChange(async a=>{t.openInNewPane=a,await ke(e)})),new rn.Setting(r).setName("Set Vim like navigation keys").setDesc(`Navigate down the results with ${vn()} + J/N, or navigate up with ${vn()} + K/P.`).addToggle(i=>i.setValue(t.vimLikeNavigationShortcut).onChange(async a=>{t.vimLikeNavigationShortcut=a,await ke(e)})),new rn.Setting(r).setName("Fuzziness").setDesc("Define the level of fuzziness for the search. The higher the fuzziness, the more results you'll get.").addDropdown(i=>i.addOptions({0:"Exact match",1:"Not too fuzzy",2:"Fuzzy enough"}).setValue(t.fuzziness).onChange(async a=>{["0","1","2"].includes(a)||(a="2"),t.fuzziness=a,await ke(e)}))}var rn,Ty=v(()=>{rn=require("obsidian");mr();mr();Nr()});function xy(e,t,r){new Ma.Setting(r).setName("User Interface").setHeading(),new Ma.Setting(r).setName("Show ribbon button").setDesc("Add a button on the sidebar to open the Vault search modal.").addToggle(n=>n.setValue(t.ribbonIcon).onChange(async i=>{t.ribbonIcon=i,await ke(e),i?e.addRibbonButton():e.removeRibbonButton()})),new Ma.Setting(r).setName("Show excerpts").setDesc("Shows the contextual part of the note that matches the search. Disable this to only show filenames in results.").addToggle(n=>n.setValue(t.showExcerpt).onChange(async i=>{Fa.set(i)})),new Ma.Setting(r).setName("Show embed references").setDesc(ar(`Some results are <a href="https://help.obsidian.md/Linking+notes+and+files/Embed+files">embedded</a> in other notes.<br>
This setting controls the maximum number of embeds to show in the search results. Set to 0 to disable.<br>
Also works with Text Extractor for embedded images and documents.`)).addSlider(n=>{n.setLimits(0,10,1).setValue(t.maxEmbeds).setDynamicTooltip().onChange(async i=>{t.maxEmbeds=i,await ke(e)})}),new Ma.Setting(r).setName("Render line return in excerpts").setDesc("Activate this option to render line returns in result excerpts.").addToggle(n=>n.setValue(t.renderLineReturnInExcerpts).onChange(async i=>{t.renderLineReturnInExcerpts=i,await ke(e)})),new Ma.Setting(r).setName('Show "Create note" button').setDesc(ar(`Shows a button next to the search input, to create a note.
Acts the same as the <code>shift \u21B5</code> shortcut, can be useful for mobile device users.`)).addToggle(n=>n.setValue(t.showCreateButton).onChange(async i=>{t.showCreateButton=i,await ke(e)})),new Ma.Setting(r).setName("Highlight matching words in results").setDesc("Will highlight matching results when enabled. See README for more customization options.").addToggle(n=>n.setValue(t.highlight).onChange(async i=>{t.highlight=i,await ke(e)}))}var Ma,yy=v(()=>{Ma=require("obsidian");Ao();mr();mr()});function wy(e,t,r,n){function i(o,l){o.setLimits(1,10,.5).setValue(t[l]).setDynamicTooltip().onChange(async d=>{t[l]=d,await ke(e)})}let a=Dc(e.app);new Fn.Setting(r).setName("Results weighting").setHeading(),new Fn.Setting(r).setName(`File name & declared aliases (default: ${a.weightBasename})`).addSlider(o=>i(o,"weightBasename")),new Fn.Setting(r).setName(`File directory (default: ${a.weightDirectory})`).addSlider(o=>i(o,"weightDirectory")),new Fn.Setting(r).setName(`Headings level 1 (default: ${a.weightH1})`).addSlider(o=>i(o,"weightH1")),new Fn.Setting(r).setName(`Headings level 2 (default: ${a.weightH2})`).addSlider(o=>i(o,"weightH2")),new Fn.Setting(r).setName(`Headings level 3 (default: ${a.weightH3})`).addSlider(o=>i(o,"weightH3")),new Fn.Setting(r).setName(`Tags (default: ${a.weightUnmarkedTags})`).addSlider(o=>i(o,"weightUnmarkedTags")),new Fn.Setting(r).setName("Header properties fields").setDesc('You can set custom weights for values of header properties (e.g. "keywords"). Weights under 1.0 will downrank the results.');for(let o=0;o<t.weightCustomProperties.length;o++){let l=t.weightCustomProperties[o],d=new Fn.Setting(r).setName((o+1).toString()+".");d.settingEl.style.paddingLeft="2em",d.addText(p=>{p.setPlaceholder("Property name").setValue(l.name).onChange(async g=>{l.name=g,await ke(e)})}).addSlider(p=>{p.setLimits(.1,5,.1).setValue(l.weight).setDynamicTooltip().onChange(async g=>{l.weight=g,await ke(e)})}).addButton(p=>{p.setButtonText("Remove"),p.onClick(async()=>{t.weightCustomProperties.splice(o,1),await ke(e),n()})})}new Fn.Setting(r).addButton(o=>{o.setButtonText("Add a new property"),o.onClick(l=>{t.weightCustomProperties.push({name:"",weight:1}),n()})}),new Fn.Setting(r).setName("Recency boost (experimental)").setDesc("Files that have been modified more recently than [selected cutoff] are given a higher rank.").addDropdown(o=>o.addOptions({["0"]:"Disabled",["1"]:"24 hours",["2"]:"7 days",["3"]:"30 days"}).setValue(t.recencyBoost).onChange(async l=>{t.recencyBoost=l,await ke(e)}))}var Fn,Sy=v(()=>{Fn=require("obsidian");Ao();mr();en()});function Cy(e,t,r){Ds.Platform.isMobile||(new Ds.Setting(r).setName("API Access Through HTTP").setHeading().setDesc(ar('Omnisearch can be used through a simple HTTP server (<a href="https://publish.obsidian.md/omnisearch/Public+API+%26+URL+Scheme#HTTP+Server">more information</a>).')),new Ds.Setting(r).setName("Enable the HTTP server").addToggle(n=>n.setValue(t.httpApiEnabled).onChange(async i=>{t.httpApiEnabled=i,i?e.apiHttpServer.listen(t.httpApiPort):e.apiHttpServer.close(),await ke(e)})),new Ds.Setting(r).setName("HTTP Port").addText(n=>{n.setValue(t.httpApiPort).setPlaceholder("51361").onChange(async i=>{parseInt(i)>65535&&(i=t.httpApiPort,n.setValue(t.httpApiPort)),t.httpApiPort=i,t.httpApiEnabled&&(e.apiHttpServer.close(),e.apiHttpServer.listen(t.httpApiPort)),await ke(e)})}),new Ds.Setting(r).setName("Show a notification when the server starts").setDesc("Will display a notification if the server is enabled, at Obsidian startup.").addToggle(n=>n.setValue(t.httpApiNotice).onChange(async i=>{t.httpApiNotice=i,await ke(e)})))}var Ds,Iy=v(()=>{Ds=require("obsidian");mr();mr()});function Ny(e,t,r){let n=e.database;new wi.Setting(r).setName("Danger Zone").setHeading(),new wi.Setting(r).setName("Ignore diacritics").setDesc(ar(`Normalize diacritics in search terms. Words like "br\xFBl\xE9e" or "\u017Elu\u0165ou\u010Dk\xFD" will be indexed as "brulee" and "zlutoucky".<br/>
\u26A0\uFE0F <span style="color: var(--text-accent)">You probably should <strong>NOT</strong> disable this.</span><br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Changing this setting will clear the cache.</span><br>
${yo}`)).addToggle(a=>a.setValue(t.ignoreDiacritics).onChange(async o=>{await n.clearCache(),t.ignoreDiacritics=o,await ke(e)})),new wi.Setting(r).setName("Ignore Arabic diacritics (beta)").addToggle(a=>a.setValue(t.ignoreArabicDiacritics).onChange(async o=>{await n.clearCache(),t.ignoreArabicDiacritics=o,await ke(e)}));let i=new DocumentFragment;i.createSpan({},a=>{a.innerHTML=`Disable Omnisearch on this device only.<br>
${yo}`}),new wi.Setting(r).setName("Disable on this device").setDesc(i).addToggle(a=>a.setValue(If(e.app)).onChange(async o=>{o?(e.app.saveLocalStorage(Ss,"1"),new wi.Notice("Omnisearch - Disabled. Please restart Obsidian.")):(e.app.saveLocalStorage(Ss),new wi.Notice("Omnisearch - Enabled. Please restart Obsidian."))})),new wi.Setting(r).setName("Force save the cache").setDesc(ar(`Omnisearch has a security feature that automatically disables cache writing if it cannot fully perform the operation.<br>
Use this option to force the cache to be saved, even if it causes a crash.<br>
\u26A0\uFE0F <span style="color: var(--text-accent)">Enabling this setting could lead to crash loops</span>`)).addToggle(a=>a.setValue(t.DANGER_forceSaveCache).onChange(async o=>{t.DANGER_forceSaveCache=o,await ke(e)})),Qi()&&new wi.Setting(r).setName("Clear cache data").setDesc(ar(`Erase all Omnisearch cache data.
Use this if Omnisearch results are inconsistent, missing, or appear outdated.<br>
${yo}`)).addButton(a=>{a.setButtonText("Clear cache"),a.onClick(async()=>{await n.clearCache()})})}var wi,Oy=v(()=>{wi=require("obsidian");mr();mr();mr();en()});function Dc(e){return{useCache:!0,hideExcluded:!1,recencyBoost:"0",downrankedFoldersFilters:[],ignoreDiacritics:!0,ignoreArabicDiacritics:!1,indexedFileTypes:[],displayTitle:"",PDFIndexing:!1,officeIndexing:!1,imagesIndexing:!1,aiImageIndexing:!1,unsupportedFilesIndexing:"default",splitCamelCase:!1,openInNewPane:!1,vimLikeNavigationShortcut:e.vault.getConfig("vimMode"),ribbonIcon:!0,showExcerpt:!0,maxEmbeds:5,renderLineReturnInExcerpts:!0,showCreateButton:!1,highlight:!0,showPreviousQueryResults:!0,simpleSearch:!1,tokenizeUrls:!1,fuzziness:"1",weightBasename:10,weightDirectory:7,weightH1:6,weightH2:5,weightH3:4,weightUnmarkedTags:2,weightCustomProperties:[],httpApiEnabled:!1,httpApiPort:"51361",httpApiNotice:!0,welcomeMessage:"",verboseLogging:!1,DANGER_httpHost:null,DANGER_forceSaveCache:!1}}async function Dy(e){return Or=Object.assign({},Dc(e.app),await e.loadData()),Fa.set(Or.showExcerpt),wm(Or.verboseLogging),Or}var kc,Fa,nd,Or,Ao=v(()=>{kc=require("obsidian");bm();en();Nr();Ey();mr();Ty();yy();Sy();Iy();Oy();Fa=xo(!1),nd=class extends kc.PluginSettingTab{constructor(r){super(r.app,r);this.plugin=r,Fa.subscribe(async n=>{Or.showExcerpt=n,await ke(this.plugin)})}display(){let{containerEl:r}=this,n=this.plugin.database;if(r.empty(),this.app.loadLocalStorage(Ss)=="1"){let a=r.createEl("span");a.innerHTML='<strong style="color: var(--text-accent)">\u26A0\uFE0F OMNISEARCH IS DISABLED \u26A0\uFE0F</strong>'}r.createEl("h1",{text:"Omnisearch"});let i=r.createDiv();i.innerHTML=`
<iframe sandbox="allow-top-navigation-by-user-activation" src="https://github.com/sponsors/scambier/button" title="Sponsor scambier" height="35" width="116" style="border: 0;"></iframe>
<a href='https://ko-fi.com/B0B6LQ2C' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
`,by(this.plugin,Or,r),r.createEl("hr"),vy(this.plugin,Or,r),r.createEl("hr"),xy(this.plugin,Or,r),r.createEl("hr"),wy(this.plugin,Or,r,this.display),r.createEl("hr"),Cy(this.plugin,Or,r),r.createEl("hr"),Ny(this.plugin,Or,r),r.createEl("hr"),new kc.Setting(r).setName("Debugging").setHeading(),new kc.Setting(r).setName("Enable verbose logging").setDesc('Adds a LOT of logs for debugging purposes. You also need to enable "Verbose" logging in the console to see these logs.').addToggle(a=>a.setValue(Or.verboseLogging).onChange(async o=>{Or.verboseLogging=o,wm(o),await ke(this.plugin)}))}}});function i0(e){var t=g6();we(e,t)}var g6,ky=v(()=>{Wn();yi();Pn();g6=Le('<span class="suggestion-flair" aria-label="Not created yet, select to create"><svg viewBox="0 0 100 100" class="add-note-glyph" width="16" height="16"><path fill="currentColor" stroke="currentColor" d="M23.3,6.7c-3.7,0-6.7,3-6.7,6.7v73.3c0,3.7,3,6.7,6.7,6.7h28.4c-3.2-4.8-5.1-10.5-5.1-16.7c0-16.6,13.4-30,30-30 c2.3,0,4.5,0.3,6.7,0.8V31.7c0-0.9-0.3-1.7-1-2.4L60.7,7.6c-0.6-0.6-1.5-1-2.4-1L23.3,6.7z M56.7,13L77,33.3H60 c-1.8,0-3.3-1.5-3.3-3.3L56.7,13z M76.7,53.3c-12.9,0-23.3,10.4-23.3,23.3S63.8,100,76.7,100S100,89.6,100,76.7 S89.6,53.3,76.7,53.3z M76.7,63.3c1.8,0,3.3,1.5,3.3,3.3v6.7h6.7c1.8,0,3.3,1.5,3.3,3.3c0,1.8-1.5,3.3-3.3,3.3H80v6.7 c0,1.8-1.5,3.3-3.3,3.3c-1.8,0-3.3-1.5-3.3-3.3V80h-6.7c-1.8,0-3.3-1.5-3.3-3.3s1.5-3.3,3.3-3.3h6.7v-6.7 C73.3,64.8,74.8,63.3,76.7,63.3L76.7,63.3z"></path></svg></span>')});function Rc(e,t){let r=ze(t,"id",8),n=ze(t,"selected",8,!1),i=ze(t,"glyph",8,!1),a=ze(t,"cssClass",8,"");var o=_6();let l;var d=xe(o);{var p=E=>{i0(E,{})};tt(d,E=>{i()&&E(p)})}var g=Ye(d,2);zi(g,t,"default",{},null),Te(o),rr(E=>{Ki(o,"data-result-id",r()),l=Yi(o,1,`suggestion-item omnisearch-result ${a()??""}`,null,l,E)},[()=>({"is-selected":n()})],Br),pr("mousemove",o,function(E){Jr.call(this,t,E)}),pr("click",o,function(E){Jr.call(this,t,E)}),pr("keypress",o,function(E){Jr.call(this,t,E)}),pr("auxclick",o,function(E){Jr.call(this,t,E)}),we(e,o)}var _6,a0=v(()=>{Wn();yi();Pn();ky();_6=Le("<div><!> <!></div>")});function ad(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}var Ry,id,s0=v(()=>{en();Nr();Ry=require("obsidian");Oc();id=class{constructor(t){this.plugin=t}highlightText(t,r){let n=`suggestion-highlight omnisearch-highlight ${this.plugin.settings.highlight?"omnisearch-default-highlight":""}`;if(!r.length)return t;try{return t.replace(new RegExp(`(${r.map(i=>Nc(i.match)).join("|")})`,"giu"),`<span class="${n}">$1</span>`)}catch(i){return console.error("Omnisearch - Error in highlightText()",i),t}}stringsToRegex(t){if(!t.length)return/^$/g;t.sort((n,i)=>i.length-n.length);let r=`(${t.map(n=>`\\b${Nc(n)}\\b|${Nc(n)}`).join("|")})`;return new RegExp(`${r}`,"gui")}getMatches(t,r,n){r=r.map(ad);let i=this.stringsToRegex(r),a=t;this.plugin.settings.ignoreDiacritics&&(t=Wi(t,this.plugin.settings.ignoreArabicDiacritics));let o=new Date().getTime(),l=null,d=[],p=0;for(;(l=i.exec(t))!==null;){if(++p>=100||new Date().getTime()-o>50){Gi("Stopped getMatches at",p,"results");break}let g=l.index,E=g+l[0].length,_=a.substring(g,E).trim();_&&l.index>=0&&d.push({match:_,offset:l.index})}if(n&&(n.query.text.length>1||n.getExactTerms().length>0)){let g=t.indexOf(n.getBestStringForExcerpt());g>-1&&d.find(E=>E.offset===g)&&d.unshift({offset:g,match:n.getBestStringForExcerpt()})}return d}makeExcerpt(t,r){let n=this.plugin.settings;try{let i=r??-1,a=Math.max(0,i-iv),o=Math.min(t.length,i+uc);if(i>-1?t=(a>0?"\u2026":"")+t.slice(a,o).trim()+(o<t.length-1?"\u2026":""):t=t.slice(0,uc),n.renderLineReturnInExcerpts){let l=new RegExp(/(?:\r\n|\r|\n)/g);t=t.split(l).filter(p=>p).join(`
`);let d=t.lastIndexOf(`
`,i-a);d>0&&(t=t.slice(d))}return t=ad(t),n.renderLineReturnInExcerpts&&(t=t.trim().replaceAll(`
`,"<br>")),t}catch(i){return new Ry.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(i),""}}}});async function Ly(e){let t=e.app;if(!t.plugins.getPlugin("obsidian-icon-folder"))return{};let n=`${t.vault.configDir}/plugins/obsidian-icon-folder/data.json`;try{let i=await t.vault.adapter.read(n),a=JSON.parse(i),o={};for(let l in a){let d=(0,Vo.normalizePath)(l);o[d]=a[l]}return o}catch(i){return Gi("Failed to read data.json:",i),{}}}async function Py(e){let t={Li:"lucide-icons"},r="icons",n=e.app,i=n.plugins.getPlugin("obsidian-icon-folder");if(i){r=i.settings?.iconPacksPath||"icons";let o=`${n.vault.configDir}/${r}`;try{let l=await n.vault.adapter.list(o);if(l.folders&&l.folders.length>0)for(let d of l.folders){let p=d.split("/"),g=p[p.length-1],E=b6(g);t[E]=g}}catch(l){Gi("Failed to list icon packs:",l)}}return{prefixToIconPack:t,iconsPath:r}}function b6(e){if(e.includes("-")){let t=e.split("-"),r=t[0].charAt(0).toUpperCase();for(let n=1;n<t.length;n++)r+=t[n].charAt(0).toLowerCase();return r}return e.charAt(0).toUpperCase()+e.charAt(1).toLowerCase()}function o0(e,t){let r=(0,Vo.normalizePath)(e),n=t[r];if(n){if(typeof n=="string")return n;if(typeof n=="object"&&n.iconName)return n.iconName}return null}function E6(e){let t=e.match(/^[A-Z][a-z]*/);if(t){let r=t[0],n=e.substring(r.length);return{prefix:r,name:n}}else return{prefix:"",name:e}}async function u0(e,t,r,n){let i=E6(e),{prefix:a,name:o}=i;if(!a)return`<span class="omnisearch-result__icon--emoji">${ad(o)}</span>`;let l=n[a];if(!l)return Gi(`No icon pack found for prefix: ${a}`),null;if(l==="lucide-icons"){let d=o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p=(0,Vo.getIcon)(d);return p?p.outerHTML:(Gi(`Lucide icon not found: ${d}`),null)}else{if(!r)return Gi("Icons path is not set. Cannot load icon SVG."),null;let d=`${t.app.vault.configDir}/${r}/${l}/${o}.svg`;try{return await t.app.vault.adapter.read(d)}catch(p){return Gi(`Failed to load icon SVG for ${e} at ${d}:`,p),null}}}function c0(e,t){let r="file";Mn(e)?r="image":ti(e)?r="file-text":(Ai(e)||fc(e))&&(r="layout-dashboard");let n=(0,Vo.getIcon)(r);return n?n.outerHTML:""}var Vo,My=v(()=>{Vo=require("obsidian");Nr();s0()});function l0(e,t){dr(t,!1);let[r,n]=oc(),i=()=>sc(Fa,"$showExcerpt",r),a=ft(),o=ft(),l=ft(),d=ft(),p=ze(t,"selected",8,!1),g=ze(t,"note",8),E=ze(t,"plugin",8),_=ft(null),y=ft(""),C=ft(""),k={},P=ft(null),N=ft(null),L={},H,R=ft(!1);As(async()=>{k=await Ly(E());let qe=await Py(E());L=qe.prefixToIconPack,H=qe.iconsPath,oe(R,!0)});async function B(){let qe=o0(q(C),k);qe?oe(P,await u0(qe,E(),H,L)):oe(P,c0("folder",E()));let St=o0(g().path,k);St?oe(N,await u0(St,E(),H,L)):oe(N,c0(g().path,E()))}function V(qe,St){return qe.innerHTML=St,{update(Dt){qe.innerHTML=Dt},destroy(){qe.innerHTML=""}}}let X=null,ce=null,ve=ft(null);Qt(()=>(vt(g()),q(R),lc),()=>{g()&&g().path&&q(R)&&(async()=>(oe(y,g().displayTitle||g().basename),oe(C,lc(g().path)),await B()))()}),Qt(()=>(Mn,vt(g()),vt(E()),oi.TFile),()=>{if(oe(_,null),Mn(g().path)){let qe=E().app.vault.getAbstractFileByPath(g().path);qe instanceof oi.TFile&&oe(_,E().app.vault.getResourcePath(qe))}}),Qt(()=>(vt(g()),lc,oi.setIcon,Mn,ti,Ai,fc,q(ve)),()=>{oe(y,g().displayTitle||g().basename),oe(C,lc(g().path)),X&&(0,oi.setIcon)(X,"folder-open"),ce&&(Mn(g().path)?(0,oi.setIcon)(ce,"image"):ti(g().path)?(0,oi.setIcon)(ce,"file-text"):Ai(g().path)||fc(g().path)?(0,oi.setIcon)(ce,"layout-dashboard"):(0,oi.setIcon)(ce,"file")),q(ve)&&(0,oi.setIcon)(q(ve),"corner-down-right")}),Qt(()=>(vt(E()),q(y),vt(g())),()=>{oe(a,E().textProcessor.getMatches(q(y),g().foundWords))}),Qt(()=>(vt(E()),q(C),vt(g())),()=>{oe(o,E().textProcessor.getMatches(q(C),g().foundWords))}),Qt(()=>(vt(E()),vt(g())),()=>{oe(l,E().textProcessor.makeExcerpt(g().content,g().matches[0]?.offset??-1))}),Qt(()=>{},()=>{oe(d,!1)}),Jn(),En();let Re=Br(()=>g().isEmbed?"omnisearch-result__embed":"");Rc(e,{get glyph(){return q(d)},get id(){return g().path},get cssClass(){return` ${q(Re)??""}`},get selected(){return p()},$$events:{auxclick(qe){Jr.call(this,t,qe)},click(qe){Jr.call(this,t,qe)},mousemove(qe){Jr.call(this,t,qe)}},children:(qe,St)=>{var Dt=N6(),Se=xe(Dt),et=xe(Se),je=xe(et);{var lt=rt=>{var ct=v6();ys(ct,Xt=>oe(ve,Xt),()=>q(ve)),we(rt,ct)},F=rt=>{var ct=qi(),Xt=Sr(ct);{var Er=Pr=>{var zr=T6();wa(zr,(Ct,$t)=>V?.(Ct,$t),()=>q(N)),we(Pr,zr)};tt(Xt,Pr=>{q(N)&&Pr(Er)})}we(rt,ct)};tt(je,rt=>{g().isEmbed?rt(lt):rt(F,!1)})}var K=Ye(je,2),te=xe(K);Ts(te,()=>E().textProcessor.highlightText(q(y),q(a)),!1,!1),Te(K);var fe=Ye(K,2);{var Fe=rt=>{var ct=x6(),Xt=xe(ct);Te(ct),rr(Er=>ir(Xt,`.${Er??""}`),[()=>Cs(g().path)],Br),we(rt,ct)};tt(fe,rt=>{g().displayTitle||rt(Fe)})}var Je=Ye(fe,2);{var Ue=rt=>{var ct=y6(),Xt=xe(ct);Te(ct),rr(()=>ir(Xt,`${g().matches.length??""}\xA0${(g().matches.length>1?"matches":"match")??""}`)),we(rt,ct)};tt(Je,rt=>{g().matches.length>0&&rt(Ue)})}Te(et),Te(Se);var ot=Ye(SLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Je=!0,Ue=!1,ot;return{s:function(){te=te.call(F)},n:function(){var _t=te.next();return Je=_t.done,_t},e:function(_t){Ue=!0,ot=_t},f:function(){try{!Je&&te.return!=null&&te.return()}finally{if(Ue)throw ot}}}}function p(F,K){if(F){if(typeof F=="string")return g(F,K);var te=Object.prototype.toString.call(F).slice(8,-1);if(te==="Object"&&F.constructor&&(te=F.constructor.name),te==="Map"||te==="Set")return Array.from(F);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return g(F,K)}}function g(F,K){(K==null||K>F.length)&&(K=F.length);for(var te=0,fe=new Array(K);te<K;te++)fe[te]=F[te];return fe}function E(F,K){if(!(F instanceof K))throw new TypeError("Cannot call a class as a function")}function _(F,K){for(var te=0;te<K.length;te++){var fe=K[te];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(F,fe.key,fe)}}function y(F,K,te){return K&&_(F.prototype,K),te&&_(F,te),Object.defineProperty(F,"prototype",{writable:!1}),F}function C(F,K,te){return K in F?Object.defineProperty(F,K,{value:te,enumerable:!0,configurable:!0,writable:!0}):F[K]=te,F}function k(F,K,te){P(F,K),K.set(F,te)}function P(F,K){if(K.has(F))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(F,K){var te=R(F,K,"get");return L(F,te)}function L(F,K){return K.get?K.get.call(F):K.value}function H(F,K,te){var fe=R(F,K,"set");return B(F,fe,te),te}function R(F,K,te){if(!K.has(F))throw new TypeError("attempted to "+te+" private field on non-instance");return K.get(F)}function B(F,K,te){if(K.set)K.set.call(F,te);else{if(!K.writable)throw new TypeError("attempted to set read only private field");K.value=te}}var V=typeof Symbol<"u"?Symbol.toStringTag:"@@toStringTag",X=new WeakMap,ce=new WeakMap,ve=function(){function F(K){var te=K.executor,fe=te===void 0?function(){}:te,Fe=K.internals,Je=Fe===void 0?lt():Fe,Ue=K.promise,ot=Ue===void 0?new Promise(function(ut,_t){return fe(ut,_t,function(qr){Je.onCancelList.push(qr)})}):Ue;E(this,F),k(this,X,{writable:!0,value:void 0}),k(this,ce,{writable:!0,value:void 0}),C(this,V,"CancelablePromise"),this.cancel=this.cancel.bind(this),H(this,X,Je),H(this,ce,ot||new Promise(function(ut,_t){return fe(ut,_t,function(qr){Je.onCancelList.push(qr)})}))}return y(F,[{key:"then",value:function(te,fe){return et(N(this,ce).then(Se(te,N(this,X)),Se(fe,N(this,X))),N(this,X))}},{key:"catch",value:function(te){return et(N(this,ce).catch(Se(te,N(this,X))),N(this,X))}},{key:"finally",value:function(te,fe){var Fe=this;return fe&&N(this,X).onCancelList.push(te),et(N(this,ce).finally(Se(function(){if(te)return fe&&(N(Fe,X).onCancelList=N(Fe,X).onCancelList.filter(function(Je){return Je!==te})),te()},N(this,X))),N(this,X))}},{key:"cancel",value:function(){N(this,X).isCanceled=!0;var te=N(this,X).onCancelList;N(this,X).onCancelList=[];var fe=d(te),Fe;try{for(fe.s();!(Fe=fe.n()).done;){var Je=Fe.value;if(typeof Je=="function")try{Je()}catch(Ue){console.error(Ue)}}}catch(Ue){fe.e(Ue)}finally{fe.f()}}},{key:"isCanceled",value:function(){return N(this,X).isCanceled===!0}}]),F}(),Re=function(F){t(te,F);var K=n(te);function te(fe){return E(this,te),K.call(this,{executor:fe})}return y(te)}(ve);e.CancelablePromise=Re,C(Re,"all",function(K){return je(K,Promise.all(K))}),C(Re,"allSettled",function(K){return je(K,Promise.allSettled(K))}),C(Re,"any",function(K){return je(K,Promise.any(K))}),C(Re,"race",function(K){return je(K,Promise.race(K))}),C(Re,"resolve",function(K){return St(Promise.resolve(K))}),C(Re,"reject",function(K){return St(Promise.reject(K))}),C(Re,"isCancelable",Dt);var qe=Re;e.default=qe;function St(F){return et(F,lt())}function Dt(F){return F instanceof Re||F instanceof ve}function Se(F,K){if(F)return function(te){if(!K.isCanceled){var fe=F(te);return Dt(fe)&&K.onCancelList.push(fe.cancel),fe}return te}}function et(F,K){return new ve({internals:K,promise:F})}function je(F,K){var te=lt();return te.onCancelList.push(function(){var fe=d(F),Fe;try{for(fe.s();!(Fe=fe.n()).done;){var Je=Fe.value;Dt(Je)&&Je.cancel()}}catch(Ue){fe.e(Ue)}finally{fe.f()}}),new ve({internals:te,promise:K})}function lt(){return{isCanceled:!1,onCancelList:[]}}})});function qy(e,{delay:t=0,duration:r=400,easing:n=O6}={}){let i=+getComputedStyle(e).opacity;return{delay:t,duration:r,easing:n,css:a=>`opacity: ${a*i}`}}var O6,zy=v(()=>{mt();Wr();O6=e=>e});function cd(e,t){dr(t,!1);let r=ze(t,"placeholder",8,null),n=ze(t,"placeholderProps",8,null),i="svelte-lazy-placeholder";En();var a=qi(),o=Sr(a);{var l=d=>{var p=k6();Yi(p,1,xs(i));var g=xe(p);{var E=y=>{var C=D6(),k=xe(C,!0);Te(C),rr(()=>ir(k,r())),we(y,C)},_=(y,C)=>{{var k=P=>{var N=qi(),L=Sr(N);Gp(L,r,(H,R)=>{R(H,mm(n))}),we(P,N)};tt(y,P=>{["function","object"].includes(typeof r())&&P(k)},C)}};tt(g,y=>{typeof r()=="string"?y(E):y(_,!1)})}Te(p),we(d,p)};tt(o,d=>{r()&&d(l)})}we(e,a),hr()}var D6,k6,Yy=v(()=>{Wn();yi() Line truncated
characters.</span>`,1),U6=Le("We found 0 results for your search here. <!>",1),V6=Le('<!> <div style="text-align: center;"><!></div>',1),q6=Le('<!> <!> <!> <div class="prompt-instructions"><div class="prompt-instruction"><span class="prompt-instruction-command">\u2191\u2193</span><span>to navigate</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to cycle history</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Tab</span> <span>to switch to In-File Search</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"></span> <span>to open in a new split</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to open in the background</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to create in a new pane</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to insert a link</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command"> </span> <span>to toggle excerpts</span></div> <div class="prompt-instruction"><span class="prompt-instruction-command">Esc</span><span>to close</span></div></div>',1)});function m0(e,t){dr(t,!1);let r=ft(),n=ze(t,"plugin",8),i=ze(t,"offset",8),a=ze(t,"note",8),o=ze(t,"index",8,0),l=ze(t,"selected",8,!1);Qt(()=>(vt(n()),vt(a()),vt(i())),()=>{oe(r,n().textProcessor.makeExcerpt(a()?.content??"",i()))}),Jn(),En();let d=Br(()=>o().toString());Rc(e,{get id(){return q(d)},get selected(){return l()},$$events:{auxclick(p){Jr.call(this,t,p)},click(p){Jr.call(this,t,p)},mousemove(p){Jr.call(this,t,p)}},children:(p,g)=>{var E=z6(),_=xe(E);Ts(_,()=>n().textProcessor.highlightText(q(r),a().matches),!1,!1),Te(E),we(p,E)},$$slots:{default:!0}}),hr()}var z6,Qy=v(()=>{Wn();yi();Pn();a0();z6=Le('<div class="omnisearch-result__body"><!></div>')});function g0(e,t){dr(t,!1);let r=ze(t,"plugin",8),n=ze(t,"modal",8),i=ze(t,"parent",8,null),a=ze(t,"singleFilePath",8,""),o=ze(t,"previousQuery",8),l=ft(),d=ft([]),p=ft(0),g=ft(),E=ft();As(()=>{Me.enable("infile"),Me.on("infile","enter",N),Me.on("infile","open-in-new-pane",P),Me.on("infile","arrow-up",()=>C(-1)),Me.on("infile","arrow-down",()=>C(1)),Me.on("infile","tab",L)}),mf(()=>{Me.disable("infile")});function _(Se){let et=[],je=-1,lt=0;for(;++lt<100;){let F=y(Se,je,uc);if(!F.length)break;je=F.last().offset,et.push(F)}return et}function y(Se,et,je){let lt=Se.find(F=>F.offset>et);return lt?Se.filter(F=>F.offset>et&&F.offset<=lt.offset+je):[]}function C(Se){oe(p,wf(q(p)+Se,q(d).length)),k()}async function k(){await Ei(),document.querySelector(`[data-result-id="${q(p)}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function P(){return N(!0)}async function N(Se=!1){if(q(g)){n().close(),i()&&i().close();let et=r().textProcessor.stringsToRegex(q(g).foundWords);et.exec(q(g).content),await Cf(r().app,q(g),et.lastIndex,Se);let je=r().app.workspace.getActiveViewOfType(ld.MarkdownView);if(!je)return;let lt=q(d)[q(p)]??0,F=je.editor.offsetToPos(lt);F.ch=0,je.editor.setCursor(F),je.editor.scrollIntoView({from:{line:F.line-10,ch:0},to:{line:F.line+10,ch:0}})}}function L(){new ta(r(),q(l)??o()).open(),n().close()}Qt(()=>vt(o()),()=>{oe(l,o()??"")}),Qt(()=>(q(l),q(E),ea,vt(r()),vt(a())),()=>{(async()=>(q(l)&&(oe(E,new ea(q(l),{ignoreDiacritics:r().settings.ignoreDiacritics,ignoreArabicDiacritics:r().settings.ignoreArabicDiacritics})),oe(g,(await r().searchEngine.getSuggestions(q(E),{singleFilePath:a()}))[0]??null)),oe(p,0),await k()))()}),Qt(()=>(q(g),q(E)),()=>{if(q(g)){let Se=_(q(g).matches),et=q(E).getExactTerms();et.length&&(Se=Se.filter(je=>et.every(lt=>je.some(F=>F.match.includes(lt))))),oe(d,Se.map(je=>Math.round(je.first().offset)))}}),Jn(),En();var H=Q6(),R=Sr(H);mc(R,{get plugin(){return r()},placeholder:"Omnisearch - File",get initialValue(){return o()},$$events:{input:Se=>oe(l,Se.detail)},children:(Se,et)=>{var je=K6(),lt=xe(je);{var F=K=>{var te=Y6();pr("click",te,L),we(K,te)};tt(lt,K=>{ld.Platform.isMobile&&K(F)})}Te(je),we(Se,je)},$$slots:{default:!0}});var B=Ye(R,2);gc(B,{children:(Se,et)=>{var je=qi(),lt=Sr(je);{var F=te=>{var fe=qi(),Fe=Sr(fe);rc(Fe,1,()=>q(d),tc,(Je,Ue,ot)=>{let ut=Br(()=>ot===q(p));m0(Je,{get plugin(){return r()},get offset(){return q(Ue)},get note(){return q(g)},index:ot,get selected(){return q(ut)},$$events:{mousemove:_t=>oe(p,ot),click:_t=>N(_t.ctrlKey),auxclick:_t=>{_t.button==1&&N(!0)}}})}),we(te,fe)},K=te=>{var fe=j6();we(te,fe)};tt(lt,te=>{q(d).length&&q(g)?te(F):te(K,!1)})}we(Se,je)},$$Line truncated
`)}function zr(s,u,f,h){this.failures=u,this.failedKeys=h,this.successCount=f,this.message=Pr(s,u)}C(zr).from(Er);function Ct(s,u){this.name="BulkError",this.failures=Object.keys(u).map(function(f){return u[f]}),this.failuresByPos=u,this.message=Pr(s,this.failures)}C(Ct).from(Er);var $t=ct.reduce(function(s,u){return s[u]=u+"Error",s},{}),Di=Er,me=ct.reduce(function(s,u){var f=u+"Error";function h(m,b){this.name=f,m?typeof m=="string"?(this.message="".concat(m).concat(b?`
`+b:""),this.inner=b||null):typeof m=="object"&&(this.message="".concat(m.name," ").concat(m.message),this.inner=m):(this.message=Xt[u]||f,this.inner=null)}return C(h).from(Di),s[u]=h,s},{});me.Syntax=SyntaxError,me.Type=TypeError,me.Range=RangeError;var gu=rt.reduce(function(s,u){return s[u+"Error"]=me[u],s},{});function Ih(s,u){if(!s||s instanceof Er||s instanceof TypeError||s instanceof SyntaxError||!s.name||!gu[s.name])return s;var f=new gu[s.name](u||s.message,s);return"stack"in s&&y(f,"stack",{get:function(){return this.inner.stack}}),f}var ca=ct.reduce(function(s,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(s[u+"Error"]=me[u]),s},{});ca.ModifyError=zr,ca.DexieError=Er,ca.BulkError=Ct;function nt(){}function Qa(s){return s}function _u(s,u){return s==null||s===Qa?u:function(f){return u(s(f))}}function fi(s,u){return function(){s.apply(this,arguments),u.apply(this,arguments)}}function Nh(s,u){return s===nt?u:function(){var f=s.apply(this,arguments);f!==void 0&&(arguments[0]=f);var h=this.onsuccess,m=this.onerror;this.onsuccess=null,this.onerror=null;var b=u.apply(this,arguments);return h&&(this.onsuccess=this.onsuccess?fi(h,this.onsuccess):h),m&&(this.onerror=this.onerror?fi(m,this.onerror):m),b!==void 0?b:f}}function bu(s,u){return s===nt?u:function(){s.apply(this,arguments);var f=this.onsuccess,h=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),f&&(this.onsuccess=this.onsuccess?fi(f,this.onsuccess):f),h&&(this.onerror=this.onerror?fi(h,this.onerror):h)}}function bl(s,u){return s===nt?u:function(f){var h=s.apply(this,arguments);l(f,h);var m=this.onsuccess,b=this.onerror;this.onsuccess=null,this.onerror=null;var T=u.apply(this,arguments);return m&&(this.onsuccess=this.onsuccess?fi(m,this.onsuccess):m),b&&(this.onerror=this.onerror?fi(b,this.onerror):b),h===void 0?T===void 0?void 0:T:l(h,T)}}function Oh(s,u){return s===nt?u:function(){return u.apply(this,arguments)===!1?!1:s.apply(this,arguments)}}function Ks(s,u){return s===nt?u:function(){var f=s.apply(this,arguments);if(f&&typeof f.then=="function"){for(var h=this,m=arguments.length,b=new Array(m);m--;)b[m]=arguments[m];return f.then(function(){return u.apply(h,b)})}return u.apply(this,arguments)}}var on=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function El(s,u){on=s}var Ne={},kt=100,Rt=typeof Promise>"u"?[]:function(){var s=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[s,d(s),s];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,d(u),s]}(),ur=Rt[0],Sn=Rt[1],ki=Rt[2],Eu=Sn&&Sn.then,cr=ur&&ur.constructor,Zt=!!ki;function la(){queueMicrotask(jS)}var Cn=function(s,u){vu.push([s,u]),Kn&&(la(),Kn=!1)},Yn=!0,Kn=!0,un=[],Xa=[],Dh=Qa,fa={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nt,pgp:!1,env:{},finalize:nt},be=fa,vu=[],Za=0,vl=[];function de(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=be;if(typeof s!="function"){if(s!==Ne)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Rh(this,this._value);return}this._state=null,this._value=null,++u.ref,s_(this,s)}var kh={get:function(){var s=be,u=Al;function f(h,m){var b=this,T=!s.global&&(s!==be||u!==Al),A=T&&!ha(),S=new de(function(O,$){Lh(b,new a_(c_(h,s,T,A),c_(m,s,T,A),O,$,s))});return this._consoleTask&&(S._consoleTask=this._consoleTask),S}return f.prototype=Ne,f},set:function(s){y(this,"then",s&&s.prototype===Ne?kh:{get:function(){return s},set:kh.set})}};E(de.prototype,{then:kh,_then:function(s,u){Lh(this,new a_(null,null,s,u,be))},catch:function(s){if(arguments.length===1)return this.then(null,s);var u=arguments[0],f=arguments[1];return typeof u=="function"?this.then(null,function(h){return h instanceof u?f(h):Tl(h)}):this.then(null,function(h){return h&&h.name===u?f(h):Tl(h)})},finally:function(s){return this.then(function(u){return de.resolve(s()).then(function(){return u})},function(u){return de.resolve(s()).then(function(){return Tl(u)})})},timeout:function(s,u){var f=this;return s<1/0?new de(function(h,m){var b=setTimeout(function(){return m(new me.Timeout(u))},s);f.then(h,m).finally(clearTimeout.bind(null,b))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&y(de.prototype,Symbol.toStringTag,"Dexie.Promise"),fa.env=u_();function a_(s,u,f,h,m){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof u=="function"?u:null,this.resolve=f,this.reject=h,this.psd=m}E(de,{all:function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u,f){s.length===0&&u([]);var h=s.length;s.forEach(function(m,b){return de.resolve(m).then(function(T){s[b]=T,--h||u(s)},f)})})},resolve:function(s){if(s instanceof de)return s;if(s&&typeof s.then=="function")return new de(function(f,h){s.then(f,h)});var u=new de(Ne,!0,s);return u},reject:Tl,race:function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u,f){s.map(function(h){return de Line truncated
`).map(i=>{let a=i.match(/^\s+/);if(a===null)return i;let[o]=a;return o.length>=n.length?i.slice(n.length):i}).join(`
`)}var Rs=class{options;rules;lexer;constructor(t){this.options=t||Tt.defaults}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:vd(n,`
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=gR(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=vd(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=r[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
$1`);n=vd(n.replace(/^ *>[ \t]?/gm,""),`
`);let i=this.lexer.state.top;this.lexer.state.top=!0;let a=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:r[0],tokens:a,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),l="",d="",p=!1;for(;t;){let g=!1;if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let E=r[2].split(`
`,1)[0].replace(/^\t+/,N=>" ".repeat(3*N.length)),_=t.split(`
`,1)[0],y=0;this.options.pedantic?(y=2,d=E.trimStart()):(y=r[2].search(/[^ ]/),y=y>4?1:y,d=E.slice(y),y+=r[1].length);let C=!1;if(!E&&/^ *$/.test(_)&&(l+=_+`
`,t=t.substring(_.length+1),g=!0),!g){let N=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),L=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),H=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),R=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){let B=t.split(`
`,1)[0];if(_=B,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),H.test(_)||R.test(_)||N.test(_)||L.test(t))break;if(_.search(/[^ ]/)>=y||!_.trim())d+=`
`+_.slice(y);else{if(C||E.search(/[^ ]/)>=4||H.test(E)||R.test(E)||L.test(E))break;d+=`
`+_}!C&&!_.trim()&&(C=!0),l+=B+`
`,t=t.substring(B.length+1),E=_.slice(y)}}a.loose||(p?a.loose=!0:/\n *\n *$/.test(l)&&(p=!0));let k=null,P;this.options.gfm&&(k=/^\[[ xX]\] /.exec(d),k&&(P=k[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:l,task:!!k,checked:P,loose:!1,text:d,tokens:[]}),a.raw+=l}a.items[a.items.length-1].raw=l.trimEnd(),a.items[a.items.length-1].text=d.trimEnd(),a.raw=a.raw.trimEnd();for(let g=0;g<a.items.length;g++)if(this.lexer.state.top=!1,a.items[g].tokens=this.lexer.blockTokens(a.items[g].text,[]),!a.loose){let E=a.items[g].tokens.filter(y=>y.type==="space"),_=E.length>0&&E.some(y=>/\n.*\n/.test(y.raw));a.loose=_}if(a.loose)for(let g=0;g<a.items.length;g++)a.items[g].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(/\s+/g," "),i=r[2]?r[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!/[:|]/.test(r[2]))return;let n=bA(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(`
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)/^ *-+: *$/.test(l)?o.align.push("right"):/^ *:-+: *$/.test(l)?o.align.push("center"):/^ *:-+ *$/.test(l)?o.align.push("left"):o.align.push(null);for(let l of n)o.header.push({text:l,tokens:this.lexer.inline(l)});for(let l of a)o.rows.push(bA(l,o.header.length).map(d=>({text:d,tokens:this.lexer.inline(d)})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:xn(r[1])}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^<a /i.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;let o=vd(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=mR(r[2],"()");if(o>-1){let d=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,d).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),EA(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return EA(n,a,n[0],this.lexer)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let o=[...i[0]].length-1,l,d,p=o,g=0,E=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(E.lastIndex=0,r=r.slice(-1*t.length+o);(i=E.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=[...l].length,i[3]||i[4]){p+=d;continue}else if((i[5]||i[6])&&o%3&&!((o+d)%3)){g+=d;continue}if(p-=d,p>0)continue;d=Math.min(d,d+p+g);let _=[...i[0]][0].length,y=t.slice(0,o+i.index+_+d);if(Math.min(o,d)%2){let k=y.slice(1,-1);return{type:"em",raw:y,text:k,tokens:this.lexer.inlineTokens(k)}}let C=y.slice(2,-2);return{type:"strong",raw:y,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=xn(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=xn(r[1]),i="mailto:"+n):(n=xn(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=xn(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=xn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=xn(r[0]),{type:"text",raw:r[0],text:n}}}},_R=/^(?: *(?:\n|$))+/,bR=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,ER=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,AA=/(?:[*+-]|\d{1,9}[.)])/,wA=dt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,AA).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),k0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,TR=/^[^\n]+/,R0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xR=dt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",R0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yR=dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,AA).getRegex(),wd="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|h[1-6]|heaLine truncated
]`).replace("lheading",wA).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},CA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,IA=/^( {2,}|\\)\n(?!\s*$)/,NR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Hc="\\p{P}\\p{S}",OR=dt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Hc).getRegex(),DR=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,kR=dt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Hc).getRegex(),RR=dt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Hc).getRegex(),LR=dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Hc).getRegex(),PR=dt(/\\([punct])/,"gu").replace(/punct/g,Hc).getRegex(),MR=dt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),FR=dt(L0).replace("(?:-->|$)","-->").getRegex(),BR=dt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",FR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xd=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$R=dt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",xd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),NA=dt(/^!?\[(label)\]\[(ref)\]/).replace("label",xd).replace("ref",R0).getRegex(),OA=dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",R0).getRegex(),HR=dt("reflink|nolink(?!\\()","g").replace("reflink",NA).replace("nolink",OA).getRegex(),M0={_backpedal:Bc,anyPunctuation:PR,autolink:MR,blockSkip:DR,br:IA,code:IR,del:Bc,emStrongLDelim:kR,emStrongRDelimAst:RR,emStrongRDelimUnd:LR,escape:CA,link:$R,nolink:OA,punctuation:OR,reflink:NA,reflinkSearch:HR,tag:BR,text:NR,url:Bc},UR={...M0,link:dt(/^!?\[(label)\]\((.*?)\)/).replace("label",xd).getRegex(),reflink:dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xd).getRegex()},D0={...M0,escape:dt(CA).replace("])","~|])").getRegex(),url:dt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},VR={...D0,br:dt(IA).replace("{2,}","*").getRegex(),text:dt(D0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Td={normal:P0,gfm:SR,pedantic:CR},Fc={normal:M0,gfm:D0,breaks:VR,pedantic:UR},yn=class{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Tt.defaults,this.options.tokenizer=this.options.tokenizer||new Rs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={block:Td.normal,inline:Fc.normal};this.options.pedantic?(r.block=Td.pedantic,r.inline=Fc.pedantic):this.options.gfm&&(r.block=Td.gfm,this.options.breaks?r.inline=Fc.breaks:r.inline=Fc.gfm),this.tokenizer.rules=r}static get rules(){return{block:Td,inline:Fc}}static lex(t,r){return new yn(r).lex(t)}static lexInline(t,r){return new yn(r).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,d,p)=>d+" ".repeat(p.length));let n,i,a,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(n=l.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=`
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+n.raw,i.text+=`
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,d=t.slice(1),p;this.options.extensions.startBlock.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(l=Math.min(l,p))}),l<1/0&&l>=0&&(a=t.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){i=r[r.length-1],o&&i.type==="paragraph"?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n),o=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&i.type==="text"?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,i,a,o=t,l,d,p;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)g.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(d||(p=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(g=>(n=g.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,o,p)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let g=1/0,E=t.slice(1),_;this.options.extensions.startInline.forEach(y=>{_=y.call({lexer:this},E),typeof _=="number"&&_>=0&&(g=Math.min(g,_))}),g<1/0&&g>=0&&(a=t.substring(0,g+1))}if(n=this.tokenizer.inlineText(a)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(p=n.raw.slice(-1)),d=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ls=class{options;constructor(t){this.options=t||Tt.defaults}code(t,r,n){let i=(r||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="language-'+xn(i)+'">'+(n?t:xn(t,!0))+`</code></pre>
`:"<pre><code>"+(n?t:xn(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
${t}</blockquote>
`}html(t,r){return t}heading(t,r,n){return`<h${r}>${t}</h${r}>
`}hr(){return`<hr>
`}list(t,r,n){let i=r?"ol":"ul",a=r&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
`+t+"</"+i+`>
`}listitem(t,r,n){return`<li>${t}</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
`}table(t,r){return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+r+`</table>
`}tablerow(t){return`<tr>
${t}</tr>
`}tablecell(t,r){let n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+t+`</${n}>
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,r,n){let i=_A(t);if(i===null)return n;t=i;let a='<a href="'+t+'"';return r&&(a+=' title="'+r+'"'),a+=">"+n+"</a>",a}image(t,r,n){let i=_A(t);if(i===null)return n;t=i;let a=`<img src="${t}" alt="${n}"`;return r&&(a+=` title="${r}"`),a+=">",a}text(t){return t}},Yo=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,r,n){return""+n}image(t,r,n){return""+n}br(){return""}},An=class{options;renderer;textRenderer;constructor(t){this.options=t||Tt.defaults,this.options.renderer=this.options.renderer||new Ls,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Yo}static parse(t,r){return new An(r).parse(t)}static parseInline(t,r){return new An(r).parseInline(t)}parse(t,r=!0){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){n+=l||"";continue}}switch(a.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{let o=a;n+=this.renderer.heading(this.parseInline(o.tokens),o.depth,hR(this.parseInline(o.tokens,this.textRenderer)));continue}case"code":{let o=a;n+=this.renderer.code(o.text,o.lang,!!o.escaped);continue}case"table":{let o=a,l="",d="";for(let g=0;g<o.header.length;g++)d+=this.renderer.tablecell(this.parseInline(o.header[g].tokens),{header:!0,align:o.align[g]});l+=this.renderer.tablerow(d);let p="";for(let g=0;g<o.rows.length;g++){let E=o.rows[g];d="";for(let _=0;_<E.length;_++)d+=this.renderer.tablecell(this.parseInline(E[_].tokens),{header:!1,align:o.align[_]});p+=this.renderer.tablerow(d)}n+=this.renderer.table(l,p);continue}case"blockquote":{let o=a,l=this.parse(o.tokens);n+=this.renderer.blockquote(l);continue}case"list":{let o=a,l=o.ordered,d=o.start,p=o.loose,g="";for(let E=0;E<o.items.length;E++){let _=o.items[E],y=_.checked,C=_.task,k="";if(_.task){let P=this.renderer.checkbox(!!y);p?_.tokens.length>0&&_.tokens[0].type==="paragraph"?(_.tokens[0].text=P+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type==="text"&&(_.tokens[0].tokens[0].text=P+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:P+" "}):k+=P+" "}k+=this.parse(_.tokens,p),g+=this.renderer.listitem(k,C,!!y)}n+=this.renderer.list(g,l,d);continue}case"html":{let o=a;n+=this.renderer.html(o.text,o.block);continue}case"paragraph":{let o=a;n+=this.renderer.paragraph(this.parseInline(o.tokens));continue}case"text":{let o=a,l=o.tokens?this.parseInline(o.tokens):o.text;for(;i+1<t.length&&t[i+1].type==="text";)o=t[++i],l+=`
`+(o.tokens?this.parseInline(o.tokens):o.text);n+=r?this.renderer.paragraph(l):l;continue}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,r){r=r||this.renderer;let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=o||"";continue}}switch(a.type){case"escape":{let o=a;n+=r.text(o.text);break}case"html":{let o=a;n+=r.html(o.text);break}case"link":{let o=a;n+=r.link(o.href,o.title,this.parseInline(o.tokens,r));break}case"image":{let o=a;n+=r.image(o.href,o.title,o.text);break}case"strong":{let o=a;n+=r.strong(this.parseInline(o.tokens,r));break}case"em":{let o=a;n+=r.em(this.parseInline(o.tokens,r));break}case"codespan":{let o=a;n+=r.codespan(o.text);break}case"br":{n+=r.br();break}case"del":{let o=a;n+=r.del(this.parseInline(o.tokens,r));break}case"text":{let o=a;n+=r.text(o.text);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},Ba=class{options;constructor(t){this.options=t||Tt.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}};ql(Ba,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var yd=class{defaults=Ad();options=this.setOptions;parse=this.#e(yn.lex,An.parse);parseInline=this.#e(yn.lexInline,An.parseInline);Parser=An;Renderer=Ls;TextRenderer=Yo;Lexer=yn;Tokenizer=Rs;Hooks=Ba;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(let i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":{let a=i;for(let o of a.header)n=n.concat(this.walkTokens(o.tokens,r));for(let o of a.rows)for(let l of o)n=n.concat(this.walkTokens(l.tokens,r));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,r));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);n=n.concat(this.walkTokens(l,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...l){let d=a.renderer.apply(this,l);return d===!1&&(d=o.apply(this,l)),d}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Ls(this.defaults);for(let o in n.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(o==="options")continue;let l=o,d=n.renderer[l],p=a[l];a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Rs(this.defaults);for(let o in n.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,d=n.tokenizer[l],p=a[l];a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Ba;for(let o in n.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;let l=o,d=n.hooks[l],p=a[l];Ba.passThroughHooks.has(o)?a[l]=g=>{if(this.defaults.async)return Promise.resolve(d.call(a,g)).then(_=>p.call(a,_));let E=d.call(a,g);return p.call(a,E)}:a[l]=(...g)=>{let E=d.apply(a,g);return E===!1&&(E=p.apply(a,g)),E}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(l){let d=[];return d.push(o.call(this,l)),a&&(d=d.concat(a.call(this,l))),d}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return yn.lex(t,r??this.defaults)}parser(t,r){return An.parse(t,r??this.defaults)}#e(t,r){return(n,i)=>{let a={...i},o={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);let l=this.#t(!!o.silent,!!o.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined o Line truncated
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+xn(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Ps=new yd;function st(e,t){return Ps.parse(e,t)}st.options=st.setOptions=function(e){return Ps.setOptions(e),st.defaults=Ps.defaults,TA(st.defaults),st};st.getDefaults=Ad;st.defaults=Tt.defaults;st.use=function(...e){return Ps.use(...e),st.defaults=Ps.defaults,TA(st.defaults),st};st.walkTokens=function(e,t){return Ps.walkTokens(e,t)};st.parseInline=Ps.parseInline;st.Parser=An;st.parser=An.parse;st.Renderer=Ls;st.TextRenderer=Yo;st.Lexer=yn;st.lexer=yn.lex;st.Tokenizer=Rs;st.Hooks=Ba;st.parse=st;var qR=st.options,zR=st.setOptions,YR=st.use,KR=st.walkTokens,jR=st.parseInline,WR=st,GR=An.parse,QR=yn.lex;Tt.Hooks=Ba;Tt.Lexer=yn;Tt.Marked=yd;Tt.Parser=An;Tt.Renderer=Ls;Tt.TextRenderer=Yo;Tt.Tokenizer=Rs;Tt.getDefaults=Ad;Tt.lexer=QR;Tt.marked=st;Tt.options=qR;Tt.parse=WR;Tt.parseInline=jR;Tt.parser=GR;Tt.setOptions=zR;Tt.use=YR;Tt.walkTokens=KR});function kA(e){return e.type===Ze.Tag||e.type===Ze.Script||e.type===Ze.Style}var Ze,RA,LA,PA,MA,FA,BA,$A,HA,UA,Ko=v(()=>{(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(Ze||(Ze={}));RA=Ze.Root,LA=Ze.Text,PA=Ze.Directive,MA=Ze.Comment,FA=Ze.Script,BA=Ze.Style,$A=Ze.Tag,HA=Ze.CDATA,UA=Ze.Doctype});function _e(e){return kA(e)}function jo(e){return e.type===Ze.CDATA}function nn(e){return e.type===Ze.Text}function $s(e){return e.type===Ze.Comment}function Cd(e){return e.type===Ze.Directive}function Bn(e){return e.type===Ze.Root}function ht(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Wo(e,t=!1){let r;if(nn(e))r=new Ni(e.data);else if($s(e))r=new Ms(e.data);else if(_e(e)){let n=t?F0(e.children):[],i=new Bs(e.name,{...e.attribs},n);n.forEach(a=>a.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=i}else if(jo(e)){let n=t?F0(e.children):[],i=new qc(n);n.forEach(a=>a.parent=i),r=i}else if(Bn(e)){let n=t?F0(e.children):[],i=new wn(n);n.forEach(a=>a.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),r=i}else if(Cd(e)){let n=new Fs(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function F0(e){let t=e.map(r=>Wo(r,!0));for(let r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}var Sd,Uc,Ni,Ms,Fs,Vc,qc,wn,Bs,B0=v(()=>{Ko();Sd=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Wo(this,t)}},Uc=class extends Sd{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},Ni=class extends Uc{constructor(){super(...arguments),this.type=Ze.Text}get nodeType(){return 3}},Ms=class extends Uc{constructor(){super(...arguments),this.type=Ze.Comment}get nodeType(){return 8}},Fs=class extends Uc{constructor(t,r){super(r),this.name=t,this.type=Ze.Directive}get nodeType(){return 1}},Vc=class extends Sd{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},qc=class extends Vc{constructor(){super(...arguments),this.type=Ze.CDATA}get nodeType(){return 4}},wn=class extends Vc{constructor(){super(...arguments),this.type=Ze.Root}get nodeType(){return 9}},Bs=class extends Vc{constructor(t,r,n=[],i=t==="script"?Ze.Script:t==="style"?Ze.Style:Ze.Tag){super(n),this.name=t,this.attribs=r,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,n;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}}});var qA,Go,_r=v(()=>{Ko();B0();B0();qA={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},Go=class{constructor(t,r,n){this.dom=[],this.root=new wn(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(n=r,r=qA),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??qA,this.elementCB=n??null}onparserinit(t){this.parser=t} Line truncated
`:Dd(e.children):jo(e)?Dd(e.children):nn(e)?e.data:""}function ra(e){return Array.isArray(e)?e.map(ra).join(""):ht(e)&&!$s(e)?ra(e.children):nn(e)?e.data:""}function Kc(e){return Array.isArray(e)?e.map(Kc).join(""):ht(e)&&(e.type===Ze.Tag||jo(e))?Kc(e.children):nn(e)?e.data:""}var Q0=v(()=>{_r();G0();Ko()});function tu(e){return ht(e)?e.children:[]}function o2(e){return e.parent||null}function X0(e){let t=o2(e);if(t!=null)return tu(t);let r=[e],{prev:n,next:i}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;i!=null;)r.push(i),{next:i}=i;return r}function _L(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function bL(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function EL(e){return e.name}function kd(e){let{next:t}=e;for(;t!==null&&!_e(t);)({next:t}=t);return t}function Rd(e){let{prev:t}=e;for(;t!==null&&!_e(t);)({prev:t}=t);return t}var u2=v(()=>{_r()});function na(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function vL(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let i=t.parent=e.parent;if(i){let a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}}function TL(e,t){if(na(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function xL(e,t){na(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let i=r.children;i.splice(i.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function yL(e,t){if(na(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function AL(e,t){na(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}var c2=v(()=>{});function ru(e,t,r=!0,n=1/0){return Ld(e,Array.isArray(t)?t:[t],r,n)}function Ld(e,t,r,n){let i=[],a=[Array.isArray(t)?t:[t]],o=[0];for(;;){if(o[0]>=a[0].length){if(o.length===1)return i;a.shift(),o.shift();continue}let l=a[0][o[0]++];if(e(l)&&(i.push(l),--n<=0))return i;r&&ht(l)&&l.children.length>0&&(o.unshift(0),a.unshift(l.children))}}function wL(e,t){return t.find(e)}function Pd(e,t,r=!0){let n=Array.isArray(t)?t:[t];for(let i=0;i<n.length;i++){let a=n[i];if(_e(a)&&e(a))return a;if(r&&ht(a)&&a.children.length>0){let o=Pd(e,a.children,!0);if(o)return o}}return null}function l2(e,t){return(Array.isArray(t)?t:[t]).some(r=>_e(r)&&e(r)||ht(r)&&l2(e,r.children))}function SL(e,t){let r=[],n=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=n[0].length){if(n.length===1)return r;n.shift(),i.shift();continue}let a=n[0][i[0]++];_e(a)&&e(a)&&r.push(a),ht(a)&&a.children.length>0&&(i.unshift(0),n.unshift(a.children))}}var Z0=v(()=>{_r()});function J0(e,t){return typeof t=="function"?r=>_e(r)&&t(r.attribs[e]):r=>_e(r)&&r.attribs[e]===t}function CL(e,t){return r=>e(r)||t(r)}function f2(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(Md,r)?Md[r](n):J0(r,n)});return t.length===0?null:t.reduce(CL)}function IL(e,t){let r=f2(e);return r?r(t):!0}function NL(e,t,r,n=1/0){let i=f2(e);return i?ru(i,t,r,n):[]}function OL(e,t,r=!0){return Array.isArray(t)||(t=[t]),Pd(J0("id",e),t,r)}function Hs(e,t,r=!0,n=1/0){return ru(Md.tag_name(e),t,r,n)}function DL(e,t,r=!0,n=1/0){return ru(J0("class",e),t,r,n)}function kL(e,t,r=!0,n=1/0){return ru(Md.tag_type(e),t,r,n)}var Md,eg=v(()=>{_r();Z0();Md={tag_name(e){return typeof e=="function"?t=>_e(t)&&e(t.name):e==="*"?_e:t=>_e(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>nn(t)&&e(t.data):t=>nn(t)&&t.data===e}}});function RL(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}function d2(e,t){let r=[],n=[];if(e===t)return 0;let i=ht(e)?e:e.parent;for(;i;)r.unshift(i),i=i.parent;for(i=ht(t)?t:t.parent;i;)n.unshift(i),i=i.parent;let a=Math.min(r.length,n.length),o=0;for(;o<a&&r[o]===n[o];)o++;if(o===0)return $n.DISCONNECTED;let l=r[o-1],d=l.children,p=r[o],g=n[o];return d.indexOf(p)>d.indexOf(g)?l===t?$n.FOLLOWING|$n.CONTAINED_BY:$n.FOLLOWING:l===e?$n.PRECEDING|$n.CONTAINS:$n.PRECEDING}function Ua(e){return e=e.filter((t,r,n)=>!n.includes(t,r+1)),e.sort((t,r)=>{let n=d2(t,r);return n&$n.PRECEDING?-1:n&$n.FOLLOWING?1:0}),e}var $n,h2=v(()=>{_r();(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})($n||($n={}))});function tg(e){let t=Fd(BL,e);return t?t.name==="feed"?LL(t):PL(t):null}function LL(e){var t;let r=e.children,n={type:"atom",items:Hs("entry",r).map(o=>{var l;let{children:d}=o,p={media:p2(d)};an(p,"id","id",d),an(p,"title","title",d);let g=(l=Fd Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}});function Eg(e,t){return e===Un.default.falseFunc?Un.default.falseFunc:r=>t.isTag(r)&&e(r)}function vg(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function _g(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var Un,bg,gg,Vd,qd=v(()=>{Un=ln(za(),1);dg();bg={};gg=(e,t,r,n,i)=>{let a=i(t,_g(r),n);return a===Un.default.trueFunc?e:a===Un.default.falseFunc?Un.default.falseFunc:o=>a(o)&&e(o)},Vd={is:gg,matches:gg,where:gg,not(e,t,r,n,i){let a=i(t,_g(r),n);return a===Un.default.falseFunc?e:a===Un.default.trueFunc?Un.default.falseFunc:o=>!a(o)&&e(o)},has(e,t,r,n,i){let{adapter:a}=r,o=_g(r);o.relativeSelector=!0;let l=t.some(g=>g.some(Jc))?[bg]:void 0,d=i(t,o,l);if(d===Un.default.falseFunc)return Un.default.falseFunc;let p=Eg(d,a);if(l&&d!==Un.default.trueFunc){let{shouldTestNextSiblings:g=!1}=d;return E=>{if(!e(E))return!1;l[0]=E;let _=a.getChildren(E),y=g?[..._,...vg(E,a)]:_;return a.existsOne(p,y)}}return g=>e(g)&&a.existsOne(p,a.getChildren(g))}}});function j2(e,t,r,n,i){var a;let{name:o,data:l}=t;if(Array.isArray(l)){if(!(o in Vd))throw new Error(`Unknown pseudo-class :${o}(${l})`);return Vd[o](e,l,r,n,i)}let d=(a=r.pseudos)===null||a===void 0?void 0:a[o],p=typeof d=="string"?d:Ud[o];if(typeof p=="string"){if(l!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let g=ia(p);return Vd.is(e,g,r,n,i)}if(typeof d=="function")return mg(d,o,l,1),g=>d(g,l)&&e(g);if(o in uu)return uu[o](e,l,r,n);if(o in tl){let g=tl[o];return mg(g,o,l,2),E=>g(E,r,l)&&e(E)}throw new Error(`Unknown pseudo-class :${o}`)}var Tg=v(()=>{su();z2();Y2();K2();qd()});function xg(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function W2(e,t,r,n,i){let{adapter:a,equals:o}=r;switch(t.type){case Ee.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Ee.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Ee.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),M2[t.action](e,t,r)}case Ee.Pseudo:return j2(e,t,r,n,i);case Ee.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:l}=t;return(!r.xmlMode||r.lowerCaseTags)&&(l=l.toLowerCase()),function(p){return a.getName(p)===l&&e(p)}}case Ee.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(p){let g=p;for(;g=xg(g,a);)if(e(g))return!0;return!1};let l=new WeakSet;return function(p){let g=p;for(;g=xg(g,a);)if(!l.has(g)){if(a.isTag(g)&&e(g))return!0;l.add(g)}return!1}}case"_flexibleDescendant":return function(d){let p=d;do if(e(p))return!0;while(p=xg(p,a));return!1};case Ee.Parent:return function(d){return a.getChildren(d).some(p=>a.isTag(p)&&e(p))};case Ee.Child:return function(d){let p=a.getParent(d);return p!=null&&a.isTag(p)&&e(p)};case Ee.Sibling:return function(d){let p=a.getSiblings(d);for(let g=0;g<p.length;g++){let E=p[g];if(o(d,E))break;if(a.isTag(E)&&e(E))return!0}return!1};case Ee.Adjacent:return a.prevElementSibling?function(d){let p=a.prevElementSibling(d);return p!=null&&e(p)}:function(d){let p=a.getSiblings(d),g;for(let E=0;E<p.length;E++){let _=p[E];if(o(d,_))break;a.isTag(_)&&(g=_)}return!!g&&e(g)};case Ee.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}var G2=v(()=>{F2();Tg();su()});function Q2(e,t,r){let n=zd(e,t,r);return Eg(n,t.adapter)}function zd(e,t,r){let n=typeof e=="string"?ia(e):e;return Yd(n,t,r)}function X2(e){return e.type===Ee.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(X2)))}function pP(e,{adapter:t},r){let n=!!r?.every(i=>{let a=t.isTag(i)&&t.getParent(i);return i===bg||a&&t.isTag(a)});for(let i of e){if(!(i.length>0&&Jc(i[0])&&i[0].type!==Ee.Descendant))if(n&&!i.some(X2))i.unshift(fP);else continue;i.unshift(hP)}}function Yd(e,t,r){var n;e.forEach(fg),r=(n=t.context)!==null&&n!==void 0?n:r;let i=Array.isArray(r),a=r&&(Arra Line truncated
`)})):{name:i,value:a.replace(Ew,`\r
`)}}).toArray()}var bw,w4,Ew,vw=v(()=>{_r();bw="input,select,textarea,keygen",w4=/%20/g,Ew=/\r?\n/g});var Ug={};Nn(Ug,{extract:()=>N4});function I4(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function N4(e){let t={};for(let r in e){let n=e[r],i=Array.isArray(n),{selector:a,value:o}=I4(i?n[0]:n),l=typeof o=="function"?o:typeof o=="string"?d=>this._make(d).prop(o):d=>this._make(d).extract(o);if(i)t[r]=this._findBySelector(a,Number.POSITIVE_INFINITY).map((d,p)=>l(p,r,t)).get();else{let d=this._findBySelector(a,1);t[r]=d.length>0?l(d[0],r,t):void 0}}return t}var Tw=v(()=>{});var ja,xw=v(()=>{C2();lw();pw();_w();vw();Tw();ja=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let i=0;i<t.length;i++)this[i]=t[i];this.length=t.length}}};ja.prototype.cheerio="[cheerio object]";ja.prototype.splice=Array.prototype.splice;ja.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(ja.prototype,ug,Mg,Bg,$g,Hg,Ug)});function yw(e,t){return function r(n,i,a=!0){if(n==null)throw new Error("cheerio.load() expects a string");let o=jc(i),l=e(n,o,a,null);class d extends ja{_make(E,_){let y=p(E,_);return y.prevObject=this,y}_parse(E,_,y,C){return e(E,_,y,C)}_render(E){return t(E,this.options)}}function p(g,E,_=l,y){if(g&&Hn(g))return g;let C=jc(y,o),k=typeof _=="string"?[e(_,C,!1,null)]:"length"in _?_:[_],P=Hn(k)?k:new d(k,null,C);if(P._root=P,!g)return new d(void 0,P,C);let N=typeof g=="string"&&Gc(g)?e(g,C,!1,null).children:O4(g)?[g]:Array.isArray(g)?g:void 0,L=new d(N,P,C);if(N)return L;if(typeof g!="string")throw new TypeError("Unexpected type of selector");let H=g,R=E?typeof E=="string"?Gc(E)?new d([e(E,C,!1,null)],P,C):(H=`${E} ${H}`,P):Hn(E)?E:new d(Array.isArray(E)?E:[E],P,C):P;return R?R.find(H):L}return Object.assign(p,ig,{load:r,_root:l,_options:o,fn:d.prototype,prototype:d.prototype}),p}}function O4(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}var Aw=v(()=>{rg();nu();xw();iu()});function Xd(e){return e>=55296&&e<=57343}function ww(e){return e>=56320&&e<=57343}function Sw(e,t){return(e-55296)*1024+9216+t}function Zd(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Jd(e){return e>=64976&&e<=65007||D4.has(e)}var D4,xt,x,Vr,eh=v(()=>{D4=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),xt="\uFFFD";(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(x||(x={}));Vr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"}});var Y,il=v(()=>{(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeVal Line truncated
`)}else if(dc(t))try{let g=JSON.parse(await r.vault.cachedRead(n)),E=[],_=y=>{for(let C in y)typeof y[C]=="object"?_(y[C]):C==="content"&&E.push(y[C])};_(g),i=E.join(`\r
`)}catch(g){console.error("Omnisearch: Error while parsing Dataloom file",t),console.error(g)}else Mn(t)&&(this.plugin.settings.imagesIndexing&&a?.canFileBeExtracted(t)||this.plugin.settings.aiImageIndexing&&o?.canBeAnalyzed(n))?(this.plugin.settings.imagesIndexing&&a?.canFileBeExtracted(t)&&(i=await a.extractText(n)),this.plugin.settings.aiImageIndexing&&o?.canBeAnalyzed(n)&&(i=await o.analyzeImage(n)+(i??""))):ti(t)&&this.plugin.settings.PDFIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):fv(t)&&this.plugin.settings.officeIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):this.plugin.notesIndexer.isFilenameIndexable(t)&&(i=n.path);i==null&&(console.warn(`Omnisearch: ${i} content for file`,n.path),i="");let l=r.metadataCache.getFileCache(n);if(l){let g=gv(this.plugin.app,n,l);for(let E of g.filter(_=>!this.documents.has(_))){let _=this.plugin.notesIndexer.generateIndexableNonexistingDocument(E,n.path)}if(l.frontmatter?.["excalidraw-plugin"]){let E=l.sections?.filter(_=>_.type==="comment")??[];for(let{start:_,end:y}of E.map(C=>C.position))i=i.substring(0,_.offset-1)+i.substring(y.offset)}}let d;this.plugin.settings.displayTitle==="#heading"?d=l?.headings?.find(g=>g.level===1)?.heading??"":d=l?.frontmatter?.[this.plugin.settings.displayTitle]??"";let p=lv(l);return{basename:n.basename,displayTitle:d,content:i,cleanedContent:uv(Wi(i)),path:n.path,mtime:n.stat.mtime,tags:p,unmarkedTags:p.map(g=>g.replace("#","")),aliases:cv(l).join(""),headings1:l?Af(l,1).join(" "):"",headings2:l?Af(l,2).join(" "):"",headings3:l?Af(l,3).join(" "):""}}};Nr();_c();Nr();var yh=class{constructor(t){this.plugin=t;this.notesToReindex=new Set}flagNoteForReindex(t){this.notesToReindex.add(t)}async refreshIndex(){for(let r of this.notesToReindex)Ke("Updating file",r.path),await this.plugin.documentsRepository.addDocument(r.path);let t=[...this.notesToReindex].map(r=>r.path);t.length&&(this.plugin.searchEngine.removeFromPaths(t),await this.plugin.searchEngine.addFromPaths(t),this.notesToReindex.clear())}isFileIndexable(t){return this.isFilenameIndexable(t)||this.isContentIndexable(t)}isContentIndexable(t){let r=this.plugin.settings,n=!!this.plugin.getTextExtractor(),i=!!this.plugin.getAIImageAnalyzer(),a=n&&r.PDFIndexing,o=n&&r.imagesIndexing,l=i&&r.aiImageIndexing;return this.isFilePlaintext(t)||Ai(t)||dc(t)||a&&ti(t)||o&&Mn(t)||l&&Mn(t)}isFilenameIndexable(t){return this.canIndexUnsupportedFiles()||this.isFilePlaintext(t)||Ai(t)||dc(t)}canIndexUnsupportedFiles(){return this.plugin.settings.unsupportedFilesIndexing==="yes"||this.plugin.settings.unsupportedFilesIndexing==="default"&&!!this.plugin.app.vault.getConfig("showUnsupportedFiles")}generateIndexableNonexistingDocument(t,r){return t=Nm(t),{path:t+(t.endsWith(".md")?"":".md"),basename:t,displayTitle:"",mtime:0,content:"",cleanedContent:"",tags:[],unmarkedTags:[],aliases:"",headings1:"",headings2:"",headings3:"",doesNotExist:!0,parent:r}}isFilePlaintext(t){return[...this.plugin.settings.indexedFileTypes,"md"].some(r=>t.endsWith(`.${r}`))}};s0();var wh=require("obsidian");Nr();var Ah=class{constructor(t){this.plugin=t;this.embeds=new Map}addEmbed(t,r){this.embeds.has(t)||this.embeds.set(t,new Set),this.embeds.get(t).add(r)}removeFile(t){this.embeds.delete(t),this.refreshEmbedsForNote(t)}renameFile(t,r){this.embeds.has(t)&&(this.embeds.set(r,this.embeds.get(t)),this.embeds.delete(t)),this.embeds.forEach((n,i)=>{n.has(t)&&(n.delete(t),n.add(r))})}refreshEmbedsForNote(t){this.embeds.forEach((r,n)=>{r.has(t)&&r.delete(t)}),this.addEmbedsForNote(t)}getEmbeds(t){return this.embeds.has(t)?[...this.embeds.get(t)]:[]}async writeToCache(){Ke("Writing embeds to cache");let t=this.plugin.database,r=[];for(let[n,i]of this.embeds)r.push({embedded:n,referencedBy:[...i]});await t.embeds.clear(),await t.embeds.bulkAdd(r)}async loadFromCache(){try{let t=this.plugin.database;if(!t.embeds){Ke("No embeds in cache");return}Ke("Loading embeds from cache");let r=await t.embeds.toArray();for(let{embedded:n,referencedBy:i}of r)for(let a of i)this.addEmbed(n,a)}catch{this.plugin.database.clearCache(),console.error("Omnisearch - Error while loading embeds cache"),new wh.Notice("Omnisearch - There was an error while loading the cache. Please restart Obsidian.")}}addEmbedsForNote(t){let r=(this.plugin.app.metadataCache.getCache(t)?.embeds??[]).map(n=>this.plugin.app.metadataCache.getFirstLinkpathDest((0,wh.getLinkpath)(n.link),t)).filter(n=>!!n);for(let n of r)this.addEmbed(n.path,t)}};var Sh=class{constructor(t){this.plugin=t;this.nextQueryIsEmpty=!1}async addToHistory(t){if(!t){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let r=this.plugin.database,n=await r.searchHistory.toArray();n=n.filter(i=>i.query!==t).reverse(),n.unshift({query:t}),n=n.slice(0,10),await r.searchHistory.clear(),await r.searchHistory.bulkAdd(n)}async getHistory(){let t=(await this.plugin.database.searchHistory.toArray()).reverse().map(r=>r.query);return this.nextQueryIsEmpty&&t.unshift(""),t}};var Ch=class Line truncated
/*! Bundled license information:
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
search-query-parser/lib/search-query-parser.js:
(*!
* search-query-parser.js
* Copyright(c) 2014-2019
* MIT Licensed
*)
dexie/dist/dexie.js:
(*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** *)
*/
/* nosourcemap */
+14
View File
@@ -0,0 +1,14 @@
{
"id": "omnisearch",
"name": "Omnisearch",
"version": "1.27.1",
"minAppVersion": "1.7.2",
"description": "A search engine that just works",
"author": "Simon Cambier",
"authorUrl": "https://github.com/scambier/obsidian-omnisearch",
"fundingUrl": {
"Github": "https://github.com/sponsors/scambier",
"Ko-fi": "https://ko-fi.com/scambier"
},
"isDesktopOnly": false
}
+135
View File
@@ -0,0 +1,135 @@
.omnisearch-modal {
}
.omnisearch-result {
white-space: normal;
display: flex;
flex-direction: row;
/* justify-content: space-between; */
flex-wrap: nowrap;
}
.omnisearch-result__title-container {
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 5px;
flex-wrap: wrap;
}
.omnisearch-result__title {
white-space: pre-wrap;
align-items: center;
display: flex;
gap: 5px;
}
.omnisearch-result__title > span {
}
.omnisearch-result__folder-path {
font-size: 0.75rem;
align-items: center;
display: flex;
gap: 5px;
color: var(--text-muted);
}
.omnisearch-result__extension {
font-size: 0.7rem;
color: var(--text-muted);
}
.omnisearch-result__counter {
font-size: 0.7rem;
color: var(--text-muted);
}
.omnisearch-result__body {
white-space: normal;
font-size: small;
word-wrap: normal;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
color: var(--text-muted);
margin-inline-start: 0.5em;
}
.omnisearch-result__embed {
margin-left: 1em;
}
.omnisearch-result__image-container {
flex-basis: 20%;
text-align: end;
}
.omnisearch-highlight {
}
.omnisearch-default-highlight {
text-decoration: underline;
text-decoration-color: var(--text-highlight-bg);
text-decoration-thickness: 3px;
text-underline-offset: -1px;
text-decoration-skip-ink: none;
}
.omnisearch-input-container {
display: flex;
align-items: center;
flex-direction: row;
gap: 5px;
}
.omnisearch-result__icon {
display: inline-block;
vertical-align: middle;
width: 16px;
height: 16px;
margin-right: 4px;
}
.omnisearch-result__icon svg {
width: 100%;
height: 100%;
}
.omnisearch-result__icon--emoji {
font-size: 16px;
vertical-align: middle;
margin-right: 4px;
}
@media only screen and (max-width: 600px) {
.omnisearch-input-container {
flex-direction: column;
}
.omnisearch-input-container__buttons {
display: flex;
flex-direction: row;
width: 100%;
padding: 0 1em 0 1em;
gap: 1em;
}
.omnisearch-input-container__buttons > button {
flex-grow: 1;
}
}
@media only screen and (min-width: 600px) {
.omnisearch-input-container__buttons {
margin-inline-end: 1em;
}
}
.omnisearch-input-field {
position: relative;
flex-grow: 1;
}