@gnai/message-content-renderer 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -48,10 +48,10 @@ export declare interface ProductItem {
|
|
|
48
48
|
id?: string;
|
|
49
49
|
main_image_url?: string;
|
|
50
50
|
title?: string;
|
|
51
|
-
|
|
51
|
+
description?: string;
|
|
52
52
|
skus?: Array<Record<string, string>>;
|
|
53
53
|
material_urls?: string[];
|
|
54
|
-
|
|
54
|
+
detail_url?: string;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export declare interface UserMessageContent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;inset:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff;border-radius:4px}.vjs-tree-node.is-highlight .vjs-tree-node-actions,.vjs-tree-node:hover .vjs-tree-node-actions{display:block}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node .vjs-tree-node-actions{display:none;position:absolute;right:0;top:0;padding:0 4px;background-color:#e6f7ff;border-radius:4px}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item{cursor:pointer}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item:hover{color:#1890ff}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark .vjs-tree-node-actions,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.image-viewer[data-v-92c159ee]{position:fixed;inset:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:2000;padding:32px;cursor:zoom-out}.close-button[data-v-92c159ee]{position:fixed;top:24px;right:24px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;border-radius:50%;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);z-index:2001}.close-button[data-v-92c159ee]:hover{background:#000c;transform:scale(1.1)}.close-button svg[data-v-92c159ee]{width:24px;height:24px}.viewer-content[data-v-92c159ee]{max-width:90%;max-height:90%;display:flex;align-items:center;justify-content:center;cursor:default}.viewer-content img[data-v-92c159ee]{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px;box-shadow:0 8px 32px #00000080}.viewer-enter-active[data-v-92c159ee],.viewer-leave-active[data-v-92c159ee]{transition:opacity .2s cubic-bezier(.4,0,.2,1)}.viewer-enter-from[data-v-92c159ee],.viewer-leave-to[data-v-92c159ee]{opacity:0}@media(max-width:768px){.image-viewer[data-v-92c159ee]{padding:16px}.close-button[data-v-92c159ee]{top:16px;right:16px;width:40px;height:40px}.close-button svg[data-v-92c159ee]{width:20px;height:20px}.viewer-content img[data-v-92c159ee]{border-radius:6px}}.content-text[data-v-d4935523]{font-size:15px;line-height:1.6;color:#1d1d1f;background:#fff;border-radius:10px;padding:10px 14px;display:inline-block;max-width:100%;word-break:break-all}.content-text.is-plain[data-v-d4935523]{white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p{margin:0 0 8px;white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p:last-child{margin-bottom:0}.content-text[data-v-d4935523] code{background:#fff;padding:2px 6px;border-radius:4px;font-family:Courier New,monospace;font-size:14px;color:#000}.content-text[data-v-d4935523] pre{background:#fff;padding:16px;border-radius:10px;overflow-x:auto;margin:8px 0}.content-text[data-v-d4935523] pre code{background:none;padding:0;color:#000}.content-text[data-v-d4935523] a{color:#007aff;text-decoration:none}.content-text[data-v-d4935523] a:hover{text-decoration:underline}.content-text[data-v-d4935523] ul,.content-text[data-v-d4935523] ol{margin:8px 0;padding-left:32px}.content-text[data-v-d4935523] blockquote{border-left:4px solid #d2d2d7;padding-left:16px;margin:8px 0;color:#6e6e73}.content-text.role-user[data-v-d4935523]{background:#007aff;color:#fff}.content-text.role-user[data-v-d4935523] a{color:#fff}.content-text.role-user[data-v-d4935523] code,.content-text.role-user[data-v-d4935523] pre{background:#2f4f4f}.content-file[data-v-4b1d629c]{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border:1px solid #d2d2d7;border-radius:10px;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.content-file[data-v-4b1d629c]:hover{background:#f5f5f7;border-color:#007aff}.content-file .file-icon[data-v-4b1d629c]{width:20px;height:20px;color:#6e6e73}.content-file .file-name[data-v-4b1d629c]{font-size:14px;color:#1d1d1f;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-file .download-icon[data-v-4b1d629c]{width:16px;height:16px;color:#007aff}.html-preview-wrapper[data-v-4b1d629c]{width:360px;height:640px;position:relative;overflow:hidden;border-radius:12px;box-shadow:0 2px 8px #0000001a;background:#f5f5f7}.html-preview-wrapper .share-icon[data-v-4b1d629c]{position:absolute;top:10px;right:10px;font-size:24px;color:#6e6e73;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.html-preview-wrapper .share-icon[data-v-4b1d629c]:hover{color:#0056b3}.html-preview-wrapper .html-iframe[data-v-4b1d629c]{width:100%;height:100%;border:none}.html-preview-wrapper .html-loading[data-v-4b1d629c]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#f5f5f7}.html-preview-wrapper .html-loading .loading-spinner[data-v-4b1d629c]{width:40px;height:40px;border:3px solid #e0e0e0;border-top-color:#007aff;border-radius:50%;animation:spin-4b1d629c 1s linear infinite}.html-preview-wrapper .html-loading .loading-text[data-v-4b1d629c]{font-size:14px;color:#6e6e73}@keyframes spin-4b1d629c{to{transform:rotate(360deg)}}@media(max-width:768px){.content-file .file-name[data-v-4b1d629c]{max-width:150px}.html-preview-wrapper[data-v-4b1d629c]{width:280px;height:426px}}.message-image[data-v-24952cda]{display:block;max-width:300px;width:auto;height:220px;border-radius:10px;object-fit:cover;cursor:pointer;transition:transform .2s cubic-bezier(.4,0,.2,1)}.message-image[data-v-24952cda]:hover{transform:scale(1.02)}.message-image.is-full-width[data-v-24952cda]{width:100%;max-width:100%}@media(max-width:768px){.message-image[data-v-24952cda]{max-width:200px;height:180px}}.message-video[data-v-be6bb72d]{display:block;max-width:100%;max-height:220px;border-radius:10px}.message-video.is-full-width[data-v-be6bb72d]{width:100%}@media(max-width:768px){.message-video[data-v-be6bb72d]{max-height:180px}}.message-audio[data-v-c0d42074]{max-width:100%;height:40px}.sample-questions[data-v-124204f2]{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.sample-question-btn[data-v-124204f2]{padding:6px 12px;background-color:#fff;border:1px solid #dbeafe;border-radius:12px;font-size:12px;cursor:pointer;transition:all .2s;color:#2563eb;word-break:break-all}.sample-question-btn[data-v-124204f2]:hover{background:#d4e7ff;border-color:#007aff}.question-text[data-v-124204f2]{white-space:pre-wrap;word-break:break-word}.message-product-content[data-v-d422a849]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.product-card[data-v-d422a849]{display:flex;flex-direction:column;gap:12px;padding:16px;background:#fff;border-radius:10px;box-shadow:0 1px 2px #0000000a;max-width:100%;width:100%}.product-main-image[data-v-d422a849]{width:100%;max-width:300px;aspect-ratio:1 / 1;border-radius:6px;overflow:hidden;cursor:pointer}.product-image[data-v-d422a849]{width:100%;height:100%;object-fit:cover;transition:transform .2s cubic-bezier(.4,0,.2,1)}.product-image[data-v-d422a849]:hover{transform:scale(1.02)}.product-title[data-v-d422a849]{font-size:16px;font-weight:600;color:#1d1d1f;line-height:1.5}.product-description[data-v-d422a849]{font-size:14px;color:#6e6e73;line-height:1.6}.product-skus[data-v-d422a849]{display:flex;flex-direction:column;gap:6px}.product-sku-item[data-v-d422a849]{font-size:13px;color:#6e6e73;padding:6px 10px;background:#f5f5f7;border-radius:6px;word-break:break-all}.product-materials[data-v-d422a849]{display:flex;flex-direction:column;gap:8px;width:100%}.product-material-item[data-v-d422a849]{display:inline-block}.product-detail-link[data-v-d422a849]{margin-top:4px}.detail-link[data-v-d422a849]{font-size:14px;color:#007aff;text-decoration:none;word-break:break-all}.detail-link[data-v-d422a849]:hover{text-decoration:underline}@media(max-width:768px){.product-card[data-v-d422a849]{padding:12px;gap:10px}.product-main-image[data-v-d422a849]{max-width:100%}.product-title[data-v-d422a849]{font-size:15px}.product-description[data-v-d422a849]{font-size:13px}}.message-content-renderer[data-v-8521a9ed]{display:inline-flex;max-width:100%;position:relative}.renderer-actions[data-v-8521a9ed]{position:absolute;top:-30px;display:inline-flex;gap:4px;padding:4px 6px;border-radius:var(--radius-md);border:1px solid var(--color-border-light);background:var(--color-bg-secondary);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:opacity var(--transition-fast),transform var(--transition-fast);transform:translateY(-4px);word-break:keep-all}.renderer-actions.actions-user[data-v-8521a9ed]{right:0}.renderer-actions.actions-assistant[data-v-8521a9ed]{left:0}.renderer-action-btn[data-v-8521a9ed]{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:12px;color:var(--color-text-secondary);border-radius:var(--radius-sm);transition:background var(--transition-fast),color var(--transition-fast)}.renderer-action-btn[data-v-8521a9ed]:hover{background:var(--color-bg);color:var(--color-text-primary)}.renderer-action-btn.danger[data-v-8521a9ed]:hover{color:var(--color-error)}.renderer-action-btn svg[data-v-8521a9ed]{width:14px;height:14px}.content-user-message[data-v-8521a9ed]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.files-grid[data-v-8521a9ed]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:8px}.role-user .content-user-message[data-v-8521a9ed],.role-user .files-grid[data-v-8521a9ed]{align-items:flex-end}.content-medialib .json-viewer[data-v-8521a9ed]{background:#fff;padding:16px;border-radius:10px;font-size:13px;max-height:400px;overflow:auto}.content-welcome[data-v-8521a9ed]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.welcome-media[data-v-8521a9ed]{display:inline-flex;max-width:100%}@media(max-width:768px){.renderer-actions[data-v-8521a9ed]{display:none}}
|
|
1
|
+
.vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;inset:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff;border-radius:4px}.vjs-tree-node.is-highlight .vjs-tree-node-actions,.vjs-tree-node:hover .vjs-tree-node-actions{display:block}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node .vjs-tree-node-actions{display:none;position:absolute;right:0;top:0;padding:0 4px;background-color:#e6f7ff;border-radius:4px}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item{cursor:pointer}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item:hover{color:#1890ff}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark .vjs-tree-node-actions,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.image-viewer[data-v-92c159ee]{position:fixed;inset:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:2000;padding:32px;cursor:zoom-out}.close-button[data-v-92c159ee]{position:fixed;top:24px;right:24px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;border-radius:50%;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);z-index:2001}.close-button[data-v-92c159ee]:hover{background:#000c;transform:scale(1.1)}.close-button svg[data-v-92c159ee]{width:24px;height:24px}.viewer-content[data-v-92c159ee]{max-width:90%;max-height:90%;display:flex;align-items:center;justify-content:center;cursor:default}.viewer-content img[data-v-92c159ee]{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px;box-shadow:0 8px 32px #00000080}.viewer-enter-active[data-v-92c159ee],.viewer-leave-active[data-v-92c159ee]{transition:opacity .2s cubic-bezier(.4,0,.2,1)}.viewer-enter-from[data-v-92c159ee],.viewer-leave-to[data-v-92c159ee]{opacity:0}@media(max-width:768px){.image-viewer[data-v-92c159ee]{padding:16px}.close-button[data-v-92c159ee]{top:16px;right:16px;width:40px;height:40px}.close-button svg[data-v-92c159ee]{width:20px;height:20px}.viewer-content img[data-v-92c159ee]{border-radius:6px}}.content-text[data-v-d4935523]{font-size:15px;line-height:1.6;color:#1d1d1f;background:#fff;border-radius:10px;padding:10px 14px;display:inline-block;max-width:100%;word-break:break-all}.content-text.is-plain[data-v-d4935523]{white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p{margin:0 0 8px;white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p:last-child{margin-bottom:0}.content-text[data-v-d4935523] code{background:#fff;padding:2px 6px;border-radius:4px;font-family:Courier New,monospace;font-size:14px;color:#000}.content-text[data-v-d4935523] pre{background:#fff;padding:16px;border-radius:10px;overflow-x:auto;margin:8px 0}.content-text[data-v-d4935523] pre code{background:none;padding:0;color:#000}.content-text[data-v-d4935523] a{color:#007aff;text-decoration:none}.content-text[data-v-d4935523] a:hover{text-decoration:underline}.content-text[data-v-d4935523] ul,.content-text[data-v-d4935523] ol{margin:8px 0;padding-left:32px}.content-text[data-v-d4935523] blockquote{border-left:4px solid #d2d2d7;padding-left:16px;margin:8px 0;color:#6e6e73}.content-text.role-user[data-v-d4935523]{background:#007aff;color:#fff}.content-text.role-user[data-v-d4935523] a{color:#fff}.content-text.role-user[data-v-d4935523] code,.content-text.role-user[data-v-d4935523] pre{background:#2f4f4f}.content-file[data-v-4b1d629c]{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border:1px solid #d2d2d7;border-radius:10px;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.content-file[data-v-4b1d629c]:hover{background:#f5f5f7;border-color:#007aff}.content-file .file-icon[data-v-4b1d629c]{width:20px;height:20px;color:#6e6e73}.content-file .file-name[data-v-4b1d629c]{font-size:14px;color:#1d1d1f;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-file .download-icon[data-v-4b1d629c]{width:16px;height:16px;color:#007aff}.html-preview-wrapper[data-v-4b1d629c]{width:360px;height:640px;position:relative;overflow:hidden;border-radius:12px;box-shadow:0 2px 8px #0000001a;background:#f5f5f7}.html-preview-wrapper .share-icon[data-v-4b1d629c]{position:absolute;top:10px;right:10px;font-size:24px;color:#6e6e73;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.html-preview-wrapper .share-icon[data-v-4b1d629c]:hover{color:#0056b3}.html-preview-wrapper .html-iframe[data-v-4b1d629c]{width:100%;height:100%;border:none}.html-preview-wrapper .html-loading[data-v-4b1d629c]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#f5f5f7}.html-preview-wrapper .html-loading .loading-spinner[data-v-4b1d629c]{width:40px;height:40px;border:3px solid #e0e0e0;border-top-color:#007aff;border-radius:50%;animation:spin-4b1d629c 1s linear infinite}.html-preview-wrapper .html-loading .loading-text[data-v-4b1d629c]{font-size:14px;color:#6e6e73}@keyframes spin-4b1d629c{to{transform:rotate(360deg)}}@media(max-width:768px){.content-file .file-name[data-v-4b1d629c]{max-width:150px}.html-preview-wrapper[data-v-4b1d629c]{width:280px;height:426px}}.message-image[data-v-24952cda]{display:block;max-width:300px;width:auto;height:220px;border-radius:10px;object-fit:cover;cursor:pointer;transition:transform .2s cubic-bezier(.4,0,.2,1)}.message-image[data-v-24952cda]:hover{transform:scale(1.02)}.message-image.is-full-width[data-v-24952cda]{width:100%;max-width:100%}@media(max-width:768px){.message-image[data-v-24952cda]{max-width:200px;height:180px}}.message-video[data-v-be6bb72d]{display:block;max-width:100%;max-height:220px;border-radius:10px}.message-video.is-full-width[data-v-be6bb72d]{width:100%}@media(max-width:768px){.message-video[data-v-be6bb72d]{max-height:180px}}.message-audio[data-v-c0d42074]{max-width:100%;height:40px}.sample-questions[data-v-124204f2]{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.sample-question-btn[data-v-124204f2]{padding:6px 12px;background-color:#fff;border:1px solid #dbeafe;border-radius:12px;font-size:12px;cursor:pointer;transition:all .2s;color:#2563eb;word-break:break-all}.sample-question-btn[data-v-124204f2]:hover{background:#d4e7ff;border-color:#007aff}.question-text[data-v-124204f2]{white-space:pre-wrap;word-break:break-word}.message-product-content[data-v-b831ed4e]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.product-card[data-v-b831ed4e]{display:flex;flex-direction:column;gap:12px;padding:16px;background:#fff;border-radius:10px;box-shadow:0 1px 2px #0000000a;max-width:100%;width:100%}.product-main-image[data-v-b831ed4e]{width:100%;max-width:300px;aspect-ratio:1 / 1;border-radius:6px;overflow:hidden;cursor:pointer}.product-image[data-v-b831ed4e]{width:100%;height:100%;object-fit:cover;transition:transform .2s cubic-bezier(.4,0,.2,1)}.product-image[data-v-b831ed4e]:hover{transform:scale(1.02)}.product-title[data-v-b831ed4e]{font-size:16px;font-weight:600;color:#1d1d1f;line-height:1.5}.product-description[data-v-b831ed4e]{font-size:14px;color:#6e6e73;line-height:1.6}.product-skus[data-v-b831ed4e]{display:flex;flex-direction:column;gap:6px}.product-sku-item[data-v-b831ed4e]{font-size:13px;color:#6e6e73;padding:6px 10px;background:#f5f5f7;border-radius:6px;word-break:break-all}.product-materials[data-v-b831ed4e]{display:flex;flex-direction:column;gap:8px;width:100%}.product-material-item[data-v-b831ed4e]{display:inline-block}.product-detail-link[data-v-b831ed4e]{margin-top:4px}.detail-link[data-v-b831ed4e]{font-size:14px;color:#007aff;text-decoration:none;word-break:break-all}.detail-link[data-v-b831ed4e]:hover{text-decoration:underline}@media(max-width:768px){.product-card[data-v-b831ed4e]{padding:12px;gap:10px}.product-main-image[data-v-b831ed4e]{max-width:100%}.product-title[data-v-b831ed4e]{font-size:15px}.product-description[data-v-b831ed4e]{font-size:13px}}.message-content-renderer[data-v-8521a9ed]{display:inline-flex;max-width:100%;position:relative}.renderer-actions[data-v-8521a9ed]{position:absolute;top:-30px;display:inline-flex;gap:4px;padding:4px 6px;border-radius:var(--radius-md);border:1px solid var(--color-border-light);background:var(--color-bg-secondary);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:opacity var(--transition-fast),transform var(--transition-fast);transform:translateY(-4px);word-break:keep-all}.renderer-actions.actions-user[data-v-8521a9ed]{right:0}.renderer-actions.actions-assistant[data-v-8521a9ed]{left:0}.renderer-action-btn[data-v-8521a9ed]{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:12px;color:var(--color-text-secondary);border-radius:var(--radius-sm);transition:background var(--transition-fast),color var(--transition-fast)}.renderer-action-btn[data-v-8521a9ed]:hover{background:var(--color-bg);color:var(--color-text-primary)}.renderer-action-btn.danger[data-v-8521a9ed]:hover{color:var(--color-error)}.renderer-action-btn svg[data-v-8521a9ed]{width:14px;height:14px}.content-user-message[data-v-8521a9ed]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.files-grid[data-v-8521a9ed]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:8px}.role-user .content-user-message[data-v-8521a9ed],.role-user .files-grid[data-v-8521a9ed]{align-items:flex-end}.content-medialib .json-viewer[data-v-8521a9ed]{background:#fff;padding:16px;border-radius:10px;font-size:13px;max-height:400px;overflow:auto}.content-welcome[data-v-8521a9ed]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.welcome-media[data-v-8521a9ed]{display:inline-flex;max-width:100%}@media(max-width:768px){.renderer-actions[data-v-8521a9ed]{display:none}}
|
|
@@ -5124,7 +5124,7 @@ const Ec = ["src", "alt"], Fc = /* @__PURE__ */ du({
|
|
|
5124
5124
|
}, null, 8, Gc)
|
|
5125
5125
|
])) : G("", !0),
|
|
5126
5126
|
s.title ? (F(), P("div", Wc, Au(s.title), 1)) : G("", !0),
|
|
5127
|
-
s.
|
|
5127
|
+
s.description ? (F(), P("div", Qc, Au(s.description), 1)) : G("", !0),
|
|
5128
5128
|
s.skus && s.skus.length > 0 ? (F(), P("div", Jc, [
|
|
5129
5129
|
(F(!0), P(Su, null, Iu(s.skus, (f, m) => (F(), P("div", {
|
|
5130
5130
|
key: m,
|
|
@@ -5147,18 +5147,18 @@ const Ec = ["src", "alt"], Fc = /* @__PURE__ */ du({
|
|
|
5147
5147
|
}, null, 8, ["src"])) : G("", !0)
|
|
5148
5148
|
]))), 128))
|
|
5149
5149
|
])) : G("", !0),
|
|
5150
|
-
s.
|
|
5150
|
+
s.detail_url ? (F(), P("div", Yc, [
|
|
5151
5151
|
uu("a", {
|
|
5152
|
-
href: s.
|
|
5152
|
+
href: s.detail_url,
|
|
5153
5153
|
target: "_blank",
|
|
5154
5154
|
rel: "noopener noreferrer",
|
|
5155
5155
|
class: "detail-link"
|
|
5156
|
-
}, Au(s.
|
|
5156
|
+
}, Au(s.detail_url), 9, Xc)
|
|
5157
5157
|
])) : G("", !0)
|
|
5158
5158
|
]))), 128))
|
|
5159
5159
|
]));
|
|
5160
5160
|
}
|
|
5161
|
-
}), ei = /* @__PURE__ */ mu(ui, [["__scopeId", "data-v-
|
|
5161
|
+
}), ei = /* @__PURE__ */ mu(ui, [["__scopeId", "data-v-b831ed4e"]]), ti = {
|
|
5162
5162
|
key: 2,
|
|
5163
5163
|
class: "content-user-message"
|
|
5164
5164
|
}, ni = {
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
`),e=e.replace(K0,"�"),u.src=e}function X0(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function ur(u){const e=u.tokens;for(let t=0,n=e.length;t<n;t++){const r=e[t];r.type==="inline"&&u.md.inline.parse(r.content,u.md,u.env,r.children)}}function er(u){return/^<a[>\s]/i.test(u)}function tr(u){return/^<\/a\s*>/i.test(u)}function nr(u){const e=u.tokens;if(u.md.options.linkify)for(let t=0,n=e.length;t<n;t++){if(e[t].type!=="inline"||!u.md.linkify.pretest(e[t].content))continue;let r=e[t].children,o=0;for(let c=r.length-1;c>=0;c--){const i=r[c];if(i.type==="link_close"){for(c--;r[c].level!==i.level&&r[c].type!=="link_open";)c--;continue}if(i.type==="html_inline"&&(er(i.content)&&o>0&&o--,tr(i.content)&&o++),!(o>0)&&i.type==="text"&&u.md.linkify.test(i.content)){const a=i.content;let l=u.md.linkify.match(a);const f=[];let d=i.level,x=0;l.length>0&&l[0].index===0&&c>0&&r[c-1].type==="text_special"&&(l=l.slice(1));for(let b=0;b<l.length;b++){const h=l[b].url,v=u.md.normalizeLink(h);if(!u.md.validateLink(v))continue;let k=l[b].text;l[b].schema?l[b].schema==="mailto:"&&!/^mailto:/i.test(k)?k=u.md.normalizeLinkText("mailto:"+k).replace(/^mailto:/,""):k=u.md.normalizeLinkText(k):k=u.md.normalizeLinkText("http://"+k).replace(/^http:\/\//,"");const S=l[b].index;if(S>x){const C=new u.Token("text","",0);C.content=a.slice(x,S),C.level=d,f.push(C)}const E=new u.Token("link_open","a",1);E.attrs=[["href",v]],E.level=d++,E.markup="linkify",E.info="auto",f.push(E);const F=new u.Token("text","",0);F.content=k,F.level=d,f.push(F);const p=new u.Token("link_close","a",-1);p.level=--d,p.markup="linkify",p.info="auto",f.push(p),x=l[b].lastIndex}if(x<a.length){const b=new u.Token("text","",0);b.content=a.slice(x),b.level=d,f.push(b)}e[t].children=r=gt(r,c,f)}}}}const yt=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,rr=/\((c|tm|r)\)/i,or=/\((c|tm|r)\)/ig,cr={c:"©",r:"®",tm:"™"};function ir(u,e){return cr[e.toLowerCase()]}function ar(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&(n.content=n.content.replace(or,ir)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function lr(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&yt.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function sr(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(rr.test(u.tokens[e].content)&&ar(u.tokens[e].children),yt.test(u.tokens[e].content)&&lr(u.tokens[e].children))}const fr=/['"]/,Ct=/['"]/g,vt="’";function Wu(u,e,t){return u.slice(0,e)+t+u.slice(e+1)}function dr(u,e){let t;const n=[];for(let r=0;r<u.length;r++){const o=u[r],c=u[r].level;for(t=n.length-1;t>=0&&!(n[t].level<=c);t--);if(n.length=t+1,o.type!=="text")continue;let i=o.content,a=0,l=i.length;u:for(;a<l;){Ct.lastIndex=a;const f=Ct.exec(i);if(!f)break;let d=!0,x=!0;a=f.index+1;const b=f[0]==="'";let h=32;if(f.index-1>=0)h=i.charCodeAt(f.index-1);else for(t=r-1;t>=0&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t--)if(u[t].content){h=u[t].content.charCodeAt(u[t].content.length-1);break}let v=32;if(a<l)v=i.charCodeAt(a);else for(t=r+1;t<u.length&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t++)if(u[t].content){v=u[t].content.charCodeAt(0);break}const k=Nu(h)||Bu(String.fromCharCode(h)),S=Nu(v)||Bu(String.fromCharCode(v)),E=Su(h),F=Su(v);if(F?d=!1:S&&(E||k||(d=!1)),E?x=!1:k&&(F||S||(x=!1)),v===34&&f[0]==='"'&&h>=48&&h<=57&&(x=d=!1),d&&x&&(d=k,x=S),!d&&!x){b&&(o.content=Wu(o.content,f.index,vt));continue}if(x)for(t=n.length-1;t>=0;t--){let p=n[t];if(n[t].level<c)break;if(p.single===b&&n[t].level===c){p=n[t];let C,m;b?(C=e.md.options.quotes[2],m=e.md.options.quotes[3]):(C=e.md.options.quotes[0],m=e.md.options.quotes[1]),o.content=Wu(o.content,f.index,m),u[p.token].content=Wu(u[p.token].content,p.pos,C),a+=m.length-1,p.token===r&&(a+=C.length-1),i=o.content,l=i.length,n.length=t;continue u}}d?n.push({token:r,pos:f.index,single:b,level:c}):x&&b&&(o.content=Wu(o.content,f.index,vt))}}}function hr(u){if(u.md.options.typographer)for(let e=u.tokens.length-1;e>=0;e--)u.tokens[e].type!=="inline"||!fr.test(u.tokens[e].content)||dr(u.tokens[e].children,u)}function pr(u){let e,t;const n=u.tokens,r=n.length;for(let o=0;o<r;o++){if(n[o].type!=="inline")continue;const c=n[o].children,i=c.length;for(e=0;e<i;e++)c[e].type==="text_special"&&(c[e].type="text");for(e=t=0;e<i;e++)c[e].type==="text"&&e+1<i&&c[e+1].type==="text"?c[e+1].content=c[e].content+c[e+1].content:(e!==t&&(c[t]=c[e]),t++);e!==t&&(c.length=t)}}const _e=[["normalize",Y0],["block",X0],["inline",ur],["linkify",nr],["replacements",sr],["smartquotes",hr],["text_join",pr]];function ke(){this.ruler=new J;for(let u=0;u<_e.length;u++)this.ruler.push(_e[u][0],_e[u][1])}ke.prototype.process=function(u){const e=this.ruler.getRules("");for(let t=0,n=e.length;t<n;t++)e[t](u)},ke.prototype.State=kt;function ru(u,e,t,n){this.src=u,this.md=e,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let o=0,c=0,i=0,a=0,l=r.length,f=!1;c<l;c++){const d=r.charCodeAt(c);if(!f)if(q(d)){i++,d===9?a+=4-a%4:a++;continue}else f=!0;(d===10||c===l-1)&&(d!==10&&c++,this.bMarks.push(o),this.eMarks.push(c),this.tShift.push(i),this.sCount.push(a),this.bsCount.push(0),f=!1,i=0,a=0,o=c+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}ru.prototype.push=function(u,e,t){const n=new eu(u,e,t);return n.block=!0,t<0&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},ru.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},ru.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},ru.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const n=this.src.charCodeAt(e);if(!q(n))break}return e},ru.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!q(this.src.charCodeAt(--e)))return e+1;return e},ru.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},ru.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},ru.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const o=new Array(t-e);for(let c=0,i=e;i<t;i++,c++){let a=0;const l=this.bMarks[i];let f=l,d;for(i+1<t||r?d=this.eMarks[i]+1:d=this.eMarks[i];f<d&&a<n;){const x=this.src.charCodeAt(f);if(q(x))x===9?a+=4-(a+this.bsCount[i])%4:a++;else if(f-l<this.tShift[i])a++;else break;f++}a>n?o[c]=new Array(a-n+1).join(" ")+this.src.slice(f,d):o[c]=this.src.slice(f,d)}return o.join("")},ru.prototype.Token=eu;const br=65536;function ye(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];return u.src.slice(t,n)}function Et(u){const e=[],t=u.length;let n=0,r=u.charCodeAt(n),o=!1,c=0,i="";for(;n<t;)r===124&&(o?(i+=u.substring(c,n-1),c=n):(e.push(i+u.substring(c,n)),i="",c=n+1)),o=r===92,n++,r=u.charCodeAt(n);return e.push(i+u.substring(c)),e}function mr(u,e,t,n){if(e+2>t)return!1;let r=e+1;if(u.sCount[r]<u.blkIndent||u.sCount[r]-u.blkIndent>=4)return!1;let o=u.bMarks[r]+u.tShift[r];if(o>=u.eMarks[r])return!1;const c=u.src.charCodeAt(o++);if(c!==124&&c!==45&&c!==58||o>=u.eMarks[r])return!1;const i=u.src.charCodeAt(o++);if(i!==124&&i!==45&&i!==58&&!q(i)||c===45&&q(i))return!1;for(;o<u.eMarks[r];){const p=u.src.charCodeAt(o);if(p!==124&&p!==45&&p!==58&&!q(p))return!1;o++}let a=ye(u,e+1),l=a.split("|");const f=[];for(let p=0;p<l.length;p++){const C=l[p].trim();if(!C){if(p===0||p===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?f.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?f.push("left"):f.push("")}if(a=ye(u,e).trim(),a.indexOf("|")===-1||u.sCount[e]-u.blkIndent>=4)return!1;l=Et(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==f.length)return!1;if(n)return!0;const x=u.parentType;u.parentType="table";const b=u.md.block.ruler.getRules("blockquote"),h=u.push("table_open","table",1),v=[e,0];h.map=v;const k=u.push("thead_open","thead",1);k.map=[e,e+1];const S=u.push("tr_open","tr",1);S.map=[e,e+1];for(let p=0;p<l.length;p++){const C=u.push("th_open","th",1);f[p]&&(C.attrs=[["style","text-align:"+f[p]]]);const m=u.push("inline","",0);m.content=l[p].trim(),m.children=[],u.push("th_close","th",-1)}u.push("tr_close","tr",-1),u.push("thead_close","thead",-1);let E,F=0;for(r=e+2;r<t&&!(u.sCount[r]<u.blkIndent);r++){let p=!1;for(let m=0,_=b.length;m<_;m++)if(b[m](u,r,t,!0)){p=!0;break}if(p||(a=ye(u,r).trim(),!a)||u.sCount[r]-u.blkIndent>=4||(l=Et(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),F+=d-l.length,F>br))break;if(r===e+2){const m=u.push("tbody_open","tbody",1);m.map=E=[e+2,0]}const C=u.push("tr_open","tr",1);C.map=[r,r+1];for(let m=0;m<d;m++){const _=u.push("td_open","td",1);f[m]&&(_.attrs=[["style","text-align:"+f[m]]]);const D=u.push("inline","",0);D.content=l[m]?l[m].trim():"",D.children=[],u.push("td_close","td",-1)}u.push("tr_close","tr",-1)}return E&&(u.push("tbody_close","tbody",-1),E[1]=r),u.push("table_close","table",-1),v[1]=r,u.parentType=x,u.line=r,!0}function xr(u,e,t){if(u.sCount[e]-u.blkIndent<4)return!1;let n=e+1,r=n;for(;n<t;){if(u.isEmpty(n)){n++;continue}if(u.sCount[n]-u.blkIndent>=4){n++,r=n;continue}break}u.line=r;const o=u.push("code_block","code",0);return o.content=u.getLines(e,r,4+u.blkIndent,!1)+`
|
|
16
16
|
`,o.map=[e,u.line],!0}function gr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||r+3>o)return!1;const c=u.src.charCodeAt(r);if(c!==126&&c!==96)return!1;let i=r;r=u.skipChars(r,c);let a=r-i;if(a<3)return!1;const l=u.src.slice(i,r),f=u.src.slice(r,o);if(c===96&&f.indexOf(String.fromCharCode(c))>=0)return!1;if(n)return!0;let d=e,x=!1;for(;d++,!(d>=t||(r=i=u.bMarks[d]+u.tShift[d],o=u.eMarks[d],r<o&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(r)===c&&!(u.sCount[d]-u.blkIndent>=4)&&(r=u.skipChars(r,c),!(r-i<a)&&(r=u.skipSpaces(r),!(r<o)))){x=!0;break}a=u.sCount[e],u.line=d+(x?1:0);const b=u.push("fence","code",0);return b.info=f,b.content=u.getLines(e+1,d,a,!0),b.markup=l,b.map=[e,u.line],!0}function _r(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];const c=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==62)return!1;if(n)return!0;const i=[],a=[],l=[],f=[],d=u.md.block.ruler.getRules("blockquote"),x=u.parentType;u.parentType="blockquote";let b=!1,h;for(h=e;h<t;h++){const F=u.sCount[h]<u.blkIndent;if(r=u.bMarks[h]+u.tShift[h],o=u.eMarks[h],r>=o)break;if(u.src.charCodeAt(r++)===62&&!F){let C=u.sCount[h]+1,m,_;u.src.charCodeAt(r)===32?(r++,C++,_=!1,m=!0):u.src.charCodeAt(r)===9?(m=!0,(u.bsCount[h]+C)%4===3?(r++,C++,_=!1):_=!0):m=!1;let D=C;for(i.push(u.bMarks[h]),u.bMarks[h]=r;r<o;){const L=u.src.charCodeAt(r);if(q(L))L===9?D+=4-(D+u.bsCount[h]+(_?1:0))%4:D++;else break;r++}b=r>=o,a.push(u.bsCount[h]),u.bsCount[h]=u.sCount[h]+1+(m?1:0),l.push(u.sCount[h]),u.sCount[h]=D-C,f.push(u.tShift[h]),u.tShift[h]=r-u.bMarks[h];continue}if(b)break;let p=!1;for(let C=0,m=d.length;C<m;C++)if(d[C](u,h,t,!0)){p=!0;break}if(p){u.lineMax=h,u.blkIndent!==0&&(i.push(u.bMarks[h]),a.push(u.bsCount[h]),f.push(u.tShift[h]),l.push(u.sCount[h]),u.sCount[h]-=u.blkIndent);break}i.push(u.bMarks[h]),a.push(u.bsCount[h]),f.push(u.tShift[h]),l.push(u.sCount[h]),u.sCount[h]=-1}const v=u.blkIndent;u.blkIndent=0;const k=u.push("blockquote_open","blockquote",1);k.markup=">";const S=[e,0];k.map=S,u.md.block.tokenize(u,e,h);const E=u.push("blockquote_close","blockquote",-1);E.markup=">",u.lineMax=c,u.parentType=x,S[1]=u.line;for(let F=0;F<f.length;F++)u.bMarks[F+e]=i[F],u.tShift[F+e]=f[F],u.sCount[F+e]=l[F],u.bsCount[F+e]=a[F];return u.blkIndent=v,!0}function kr(u,e,t,n){const r=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let o=u.bMarks[e]+u.tShift[e];const c=u.src.charCodeAt(o++);if(c!==42&&c!==45&&c!==95)return!1;let i=1;for(;o<r;){const l=u.src.charCodeAt(o++);if(l!==c&&!q(l))return!1;l===c&&i++}if(i<3)return!1;if(n)return!0;u.line=e+1;const a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(i+1).join(String.fromCharCode(c)),!0}function Dt(u,e){const t=u.eMarks[e];let n=u.bMarks[e]+u.tShift[e];const r=u.src.charCodeAt(n++);if(r!==42&&r!==45&&r!==43)return-1;if(n<t){const o=u.src.charCodeAt(n);if(!q(o))return-1}return n}function Ft(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];let r=t;if(r+1>=n)return-1;let o=u.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=n)return-1;if(o=u.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<n&&(o=u.src.charCodeAt(r),!q(o))?-1:r}function yr(u,e){const t=u.level+2;for(let n=e+2,r=u.tokens.length-2;n<r;n++)u.tokens[n].level===t&&u.tokens[n].type==="paragraph_open"&&(u.tokens[n+2].hidden=!0,u.tokens[n].hidden=!0,n+=2)}function Cr(u,e,t,n){let r,o,c,i,a=e,l=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let f=!1;n&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(f=!0);let d,x,b;if((b=Ft(u,a))>=0){if(d=!0,c=u.bMarks[a]+u.tShift[a],x=Number(u.src.slice(c,b-1)),f&&x!==1)return!1}else if((b=Dt(u,a))>=0)d=!1;else return!1;if(f&&u.skipSpaces(b)>=u.eMarks[a])return!1;if(n)return!0;const h=u.src.charCodeAt(b-1),v=u.tokens.length;d?(i=u.push("ordered_list_open","ol",1),x!==1&&(i.attrs=[["start",x]])):i=u.push("bullet_list_open","ul",1);const k=[a,0];i.map=k,i.markup=String.fromCharCode(h);let S=!1;const E=u.md.block.ruler.getRules("list"),F=u.parentType;for(u.parentType="list";a<t;){o=b,r=u.eMarks[a];const p=u.sCount[a]+b-(u.bMarks[a]+u.tShift[a]);let C=p;for(;o<r;){const V=u.src.charCodeAt(o);if(V===9)C+=4-(C+u.bsCount[a])%4;else if(V===32)C++;else break;o++}const m=o;let _;m>=r?_=1:_=C-p,_>4&&(_=1);const D=p+_;i=u.push("list_item_open","li",1),i.markup=String.fromCharCode(h);const L=[a,0];i.map=L,d&&(i.info=u.src.slice(c,b-1));const I=u.tight,j=u.tShift[a],z=u.sCount[a],$=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=D,u.tight=!0,u.tShift[a]=m-u.bMarks[a],u.sCount[a]=C,m>=r&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,t):u.md.block.tokenize(u,a,t,!0),(!u.tight||S)&&(l=!1),S=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=$,u.tShift[a]=j,u.sCount[a]=z,u.tight=I,i=u.push("list_item_close","li",-1),i.markup=String.fromCharCode(h),a=u.line,L[1]=a,a>=t||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let W=!1;for(let V=0,R=E.length;V<R;V++)if(E[V](u,a,t,!0)){W=!0;break}if(W)break;if(d){if(b=Ft(u,a),b<0)break;c=u.bMarks[a]+u.tShift[a]}else if(b=Dt(u,a),b<0)break;if(h!==u.src.charCodeAt(b-1))break}return d?i=u.push("ordered_list_close","ol",-1):i=u.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(h),k[1]=a,u.line=a,u.parentType=F,l&&yr(u,v),!0}function vr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e],c=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==91)return!1;function i(E){const F=u.lineMax;if(E>=F||u.isEmpty(E))return null;let p=!1;if(u.sCount[E]-u.blkIndent>3&&(p=!0),u.sCount[E]<0&&(p=!0),!p){const _=u.md.block.ruler.getRules("reference"),D=u.parentType;u.parentType="reference";let L=!1;for(let I=0,j=_.length;I<j;I++)if(_[I](u,E,F,!0)){L=!0;break}if(u.parentType=D,L)return null}const C=u.bMarks[E]+u.tShift[E],m=u.eMarks[E];return u.src.slice(C,m+1)}let a=u.src.slice(r,o+1);o=a.length;let l=-1;for(r=1;r<o;r++){const E=a.charCodeAt(r);if(E===91)return!1;if(E===93){l=r;break}else if(E===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(E===92&&(r++,r<o&&a.charCodeAt(r)===10)){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}}if(l<0||a.charCodeAt(l+1)!==58)return!1;for(r=l+2;r<o;r++){const E=a.charCodeAt(r);if(E===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(!q(E))break}const f=u.md.helpers.parseLinkDestination(a,r,o);if(!f.ok)return!1;const d=u.md.normalizeLink(f.str);if(!u.md.validateLink(d))return!1;r=f.pos;const x=r,b=c,h=r;for(;r<o;r++){const E=a.charCodeAt(r);if(E===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(!q(E))break}let v=u.md.helpers.parseLinkTitle(a,r,o);for(;v.can_continue;){const E=i(c);if(E===null)break;a+=E,r=o,o=a.length,c++,v=u.md.helpers.parseLinkTitle(a,r,o,v)}let k;for(r<o&&h!==r&&v.ok?(k=v.str,r=v.pos):(k="",r=x,c=b);r<o;){const E=a.charCodeAt(r);if(!q(E))break;r++}if(r<o&&a.charCodeAt(r)!==10&&k)for(k="",r=x,c=b;r<o;){const E=a.charCodeAt(r);if(!q(E))break;r++}if(r<o&&a.charCodeAt(r)!==10)return!1;const S=Gu(a.slice(1,l));return S?(n||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[S]>"u"&&(u.env.references[S]={title:k,href:d}),u.line=c),!0):!1}const Er=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Dr="[a-zA-Z_:][a-zA-Z0-9:._-]*",Fr="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",At="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+Dr+"(?:\\s*=\\s*"+Fr+")?)")+"*\\s*\\/?>",wt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ar="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",wr="<[?][\\s\\S]*?[?]>",Sr="<![A-Za-z][^>]*>",Br="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Nr=new RegExp("^(?:"+At+"|"+wt+"|"+Ar+"|"+wr+"|"+Sr+"|"+Br+")"),Tr=new RegExp("^(?:"+At+"|"+wt+")"),Cu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Er.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Tr.source+"\\s*$"),/^$/,!1]];function Ir(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(r)!==60)return!1;let c=u.src.slice(r,o),i=0;for(;i<Cu.length&&!Cu[i][0].test(c);i++);if(i===Cu.length)return!1;if(n)return Cu[i][2];let a=e+1;if(!Cu[i][1].test(c)){for(;a<t&&!(u.sCount[a]<u.blkIndent);a++)if(r=u.bMarks[a]+u.tShift[a],o=u.eMarks[a],c=u.src.slice(r,o),Cu[i][1].test(c)){c.length!==0&&a++;break}}u.line=a;const l=u.push("html_block","",0);return l.map=[e,a],l.content=u.getLines(e,a,u.blkIndent,!0),!0}function Lr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let c=u.src.charCodeAt(r);if(c!==35||r>=o)return!1;let i=1;for(c=u.src.charCodeAt(++r);c===35&&r<o&&i<=6;)i++,c=u.src.charCodeAt(++r);if(i>6||r<o&&!q(c))return!1;if(n)return!0;o=u.skipSpacesBack(o,r);const a=u.skipCharsBack(o,35,r);a>r&&q(u.src.charCodeAt(a-1))&&(o=a),u.line=e+1;const l=u.push("heading_open","h"+String(i),1);l.markup="########".slice(0,i),l.map=[e,u.line];const f=u.push("inline","",0);f.content=u.src.slice(r,o).trim(),f.map=[e,u.line],f.children=[];const d=u.push("heading_close","h"+String(i),-1);return d.markup="########".slice(0,i),!0}function Mr(u,e,t){const n=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;const r=u.parentType;u.parentType="paragraph";let o=0,c,i=e+1;for(;i<t&&!u.isEmpty(i);i++){if(u.sCount[i]-u.blkIndent>3)continue;if(u.sCount[i]>=u.blkIndent){let b=u.bMarks[i]+u.tShift[i];const h=u.eMarks[i];if(b<h&&(c=u.src.charCodeAt(b),(c===45||c===61)&&(b=u.skipChars(b,c),b=u.skipSpaces(b),b>=h))){o=c===61?1:2;break}}if(u.sCount[i]<0)continue;let x=!1;for(let b=0,h=n.length;b<h;b++)if(n[b](u,i,t,!0)){x=!0;break}if(x)break}if(!o)return!1;const a=u.getLines(e,i,u.blkIndent,!1).trim();u.line=i+1;const l=u.push("heading_open","h"+String(o),1);l.markup=String.fromCharCode(c),l.map=[e,u.line];const f=u.push("inline","",0);f.content=a,f.map=[e,u.line-1],f.children=[];const d=u.push("heading_close","h"+String(o),-1);return d.markup=String.fromCharCode(c),u.parentType=r,!0}function Or(u,e,t){const n=u.md.block.ruler.getRules("paragraph"),r=u.parentType;let o=e+1;for(u.parentType="paragraph";o<t&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3||u.sCount[o]<0)continue;let l=!1;for(let f=0,d=n.length;f<d;f++)if(n[f](u,o,t,!0)){l=!0;break}if(l)break}const c=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o;const i=u.push("paragraph_open","p",1);i.map=[e,u.line];const a=u.push("inline","",0);return a.content=c,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=r,!0}const Qu=[["table",mr,["paragraph","reference"]],["code",xr],["fence",gr,["paragraph","reference","blockquote","list"]],["blockquote",_r,["paragraph","reference","blockquote","list"]],["hr",kr,["paragraph","reference","blockquote","list"]],["list",Cr,["paragraph","reference","blockquote"]],["reference",vr],["html_block",Ir,["paragraph","reference","blockquote"]],["heading",Lr,["paragraph","reference","blockquote"]],["lheading",Mr],["paragraph",Or]];function Ju(){this.ruler=new J;for(let u=0;u<Qu.length;u++)this.ruler.push(Qu[u][0],Qu[u][1],{alt:(Qu[u][2]||[]).slice()})}Ju.prototype.tokenize=function(u,e,t){const n=this.ruler.getRules(""),r=n.length,o=u.md.options.maxNesting;let c=e,i=!1;for(;c<t&&(u.line=c=u.skipEmptyLines(c),!(c>=t||u.sCount[c]<u.blkIndent));){if(u.level>=o){u.line=t;break}const a=u.line;let l=!1;for(let f=0;f<r;f++)if(l=n[f](u,c,t,!1),l){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");u.tight=!i,u.isEmpty(u.line-1)&&(i=!0),c=u.line,c<t&&u.isEmpty(c)&&(i=!0,c++,u.line=c)}},Ju.prototype.parse=function(u,e,t,n){if(!u)return;const r=new this.State(u,e,t,n);this.tokenize(r,r.line,r.lineMax)},Ju.prototype.State=ru;function Tu(u,e,t,n){this.src=u,this.env=t,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Tu.prototype.pushPending=function(){const u=new eu("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u},Tu.prototype.push=function(u,e,t){this.pending&&this.pushPending();const n=new eu(u,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(r),n},Tu.prototype.scanDelims=function(u,e){const t=this.posMax,n=this.src.charCodeAt(u),r=u>0?this.src.charCodeAt(u-1):32;let o=u;for(;o<t&&this.src.charCodeAt(o)===n;)o++;const c=o-u,i=o<t?this.src.charCodeAt(o):32,a=Nu(r)||Bu(String.fromCharCode(r)),l=Nu(i)||Bu(String.fromCharCode(i)),f=Su(r),d=Su(i),x=!d&&(!l||f||a),b=!f&&(!a||d||l);return{can_open:x&&(e||!b||a),can_close:b&&(e||!x||l),length:c}},Tu.prototype.Token=eu;function Pr(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function jr(u,e){let t=u.pos;for(;t<u.posMax&&!Pr(u.src.charCodeAt(t));)t++;return t===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,t)),u.pos=t,!0)}const zr=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Rr(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;const t=u.pos,n=u.posMax;if(t+3>n||u.src.charCodeAt(t)!==58||u.src.charCodeAt(t+1)!==47||u.src.charCodeAt(t+2)!==47)return!1;const r=u.pending.match(zr);if(!r)return!1;const o=r[1],c=u.md.linkify.matchAtStart(u.src.slice(t-o.length));if(!c)return!1;let i=c.url;if(i.length<=o.length)return!1;i=i.replace(/\*+$/,"");const a=u.md.normalizeLink(i);if(!u.md.validateLink(a))return!1;if(!e){u.pending=u.pending.slice(0,-o.length);const l=u.push("link_open","a",1);l.attrs=[["href",a]],l.markup="linkify",l.info="auto";const f=u.push("text","",0);f.content=u.md.normalizeLinkText(i);const d=u.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return u.pos+=i.length-o.length,!0}function qr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==10)return!1;const n=u.pending.length-1,r=u.posMax;if(!e)if(n>=0&&u.pending.charCodeAt(n)===32)if(n>=1&&u.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&u.pending.charCodeAt(o-1)===32;)o--;u.pending=u.pending.slice(0,o),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(t++;t<r&&q(u.src.charCodeAt(t));)t++;return u.pos=t,!0}const Ce=[];for(let u=0;u<256;u++)Ce.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){Ce[u.charCodeAt(0)]=1});function Vr(u,e){let t=u.pos;const n=u.posMax;if(u.src.charCodeAt(t)!==92||(t++,t>=n))return!1;let r=u.src.charCodeAt(t);if(r===10){for(e||u.push("hardbreak","br",0),t++;t<n&&(r=u.src.charCodeAt(t),!!q(r));)t++;return u.pos=t,!0}let o=u.src[t];if(r>=55296&&r<=56319&&t+1<n){const i=u.src.charCodeAt(t+1);i>=56320&&i<=57343&&(o+=u.src[t+1],t++)}const c="\\"+o;if(!e){const i=u.push("text_special","",0);r<256&&Ce[r]!==0?i.content=o:i.content=c,i.markup=c,i.info="escape"}return u.pos=t+1,!0}function $r(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=u.posMax;for(;t<o&&u.src.charCodeAt(t)===96;)t++;const c=u.src.slice(r,t),i=c.length;if(u.backticksScanned&&(u.backticks[i]||0)<=r)return e||(u.pending+=c),u.pos+=i,!0;let a=t,l;for(;(l=u.src.indexOf("`",a))!==-1;){for(a=l+1;a<o&&u.src.charCodeAt(a)===96;)a++;const f=a-l;if(f===i){if(!e){const d=u.push("code_inline","code",0);d.markup=c,d.content=u.src.slice(t,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[f]=l}return u.backticksScanned=!0,e||(u.pending+=c),u.pos+=i,!0}function Hr(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==126)return!1;const r=u.scanDelims(u.pos,!0);let o=r.length;const c=String.fromCharCode(n);if(o<2)return!1;let i;o%2&&(i=u.push("text","",0),i.content=c,o--);for(let a=0;a<o;a+=2)i=u.push("text","",0),i.content=c+c,u.delimiters.push({marker:n,length:0,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return u.pos+=r.length,!0}function St(u,e){let t;const n=[],r=e.length;for(let o=0;o<r;o++){const c=e[o];if(c.marker!==126||c.end===-1)continue;const i=e[c.end];t=u.tokens[c.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=u.tokens[i.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",u.tokens[i.token-1].type==="text"&&u.tokens[i.token-1].content==="~"&&n.push(i.token-1)}for(;n.length;){const o=n.pop();let c=o+1;for(;c<u.tokens.length&&u.tokens[c].type==="s_close";)c++;c--,o!==c&&(t=u.tokens[c],u.tokens[c]=u.tokens[o],u.tokens[o]=t)}}function Ur(u){const e=u.tokens_meta,t=u.tokens_meta.length;St(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&St(u,e[n].delimiters)}const Bt={tokenize:Hr,postProcess:Ur};function Zr(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==95&&n!==42)return!1;const r=u.scanDelims(u.pos,n===42);for(let o=0;o<r.length;o++){const c=u.push("text","",0);c.content=String.fromCharCode(n),u.delimiters.push({marker:n,length:r.length,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return u.pos+=r.length,!0}function Nt(u,e){const t=e.length;for(let n=t-1;n>=0;n--){const r=e[n];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],c=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),a=u.tokens[r.token];a.type=c?"strong_open":"em_open",a.tag=c?"strong":"em",a.nesting=1,a.markup=c?i+i:i,a.content="";const l=u.tokens[o.token];l.type=c?"strong_close":"em_close",l.tag=c?"strong":"em",l.nesting=-1,l.markup=c?i+i:i,l.content="",c&&(u.tokens[e[n-1].token].content="",u.tokens[e[r.end+1].token].content="",n--)}}function Gr(u){const e=u.tokens_meta,t=u.tokens_meta.length;Nt(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&Nt(u,e[n].delimiters)}const Tt={tokenize:Zr,postProcess:Gr};function Wr(u,e){let t,n,r,o,c="",i="",a=u.pos,l=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;const f=u.pos,d=u.posMax,x=u.pos+1,b=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(b<0)return!1;let h=b+1;if(h<d&&u.src.charCodeAt(h)===40){for(l=!1,h++;h<d&&(t=u.src.charCodeAt(h),!(!q(t)&&t!==10));h++);if(h>=d)return!1;if(a=h,r=u.md.helpers.parseLinkDestination(u.src,h,u.posMax),r.ok){for(c=u.md.normalizeLink(r.str),u.md.validateLink(c)?h=r.pos:c="",a=h;h<d&&(t=u.src.charCodeAt(h),!(!q(t)&&t!==10));h++);if(r=u.md.helpers.parseLinkTitle(u.src,h,u.posMax),h<d&&a!==h&&r.ok)for(i=r.str,h=r.pos;h<d&&(t=u.src.charCodeAt(h),!(!q(t)&&t!==10));h++);}(h>=d||u.src.charCodeAt(h)!==41)&&(l=!0),h++}if(l){if(typeof u.env.references>"u")return!1;if(h<d&&u.src.charCodeAt(h)===91?(a=h+1,h=u.md.helpers.parseLinkLabel(u,h),h>=0?n=u.src.slice(a,h++):h=b+1):h=b+1,n||(n=u.src.slice(x,b)),o=u.env.references[Gu(n)],!o)return u.pos=f,!1;c=o.href,i=o.title}if(!e){u.pos=x,u.posMax=b;const v=u.push("link_open","a",1),k=[["href",c]];v.attrs=k,i&&k.push(["title",i]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=h,u.posMax=d,!0}function Qr(u,e){let t,n,r,o,c,i,a,l,f="";const d=u.pos,x=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;const b=u.pos+2,h=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(h<0)return!1;if(o=h+1,o<x&&u.src.charCodeAt(o)===40){for(o++;o<x&&(t=u.src.charCodeAt(o),!(!q(t)&&t!==10));o++);if(o>=x)return!1;for(l=o,i=u.md.helpers.parseLinkDestination(u.src,o,u.posMax),i.ok&&(f=u.md.normalizeLink(i.str),u.md.validateLink(f)?o=i.pos:f=""),l=o;o<x&&(t=u.src.charCodeAt(o),!(!q(t)&&t!==10));o++);if(i=u.md.helpers.parseLinkTitle(u.src,o,u.posMax),o<x&&l!==o&&i.ok)for(a=i.str,o=i.pos;o<x&&(t=u.src.charCodeAt(o),!(!q(t)&&t!==10));o++);else a="";if(o>=x||u.src.charCodeAt(o)!==41)return u.pos=d,!1;o++}else{if(typeof u.env.references>"u")return!1;if(o<x&&u.src.charCodeAt(o)===91?(l=o+1,o=u.md.helpers.parseLinkLabel(u,o),o>=0?r=u.src.slice(l,o++):o=h+1):o=h+1,r||(r=u.src.slice(b,h)),c=u.env.references[Gu(r)],!c)return u.pos=d,!1;f=c.href,a=c.title}if(!e){n=u.src.slice(b,h);const v=[];u.md.inline.parse(n,u.md,u.env,v);const k=u.push("image","img",0),S=[["src",f],["alt",""]];k.attrs=S,k.children=v,k.content=n,a&&S.push(["title",a])}return u.pos=o,u.posMax=x,!0}const Jr=/^([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])?)*)$/,Kr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Yr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==60)return!1;const n=u.pos,r=u.posMax;for(;;){if(++t>=r)return!1;const c=u.src.charCodeAt(t);if(c===60)return!1;if(c===62)break}const o=u.src.slice(n+1,t);if(Kr.test(o)){const c=u.md.normalizeLink(o);if(!u.md.validateLink(c))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",c]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}if(Jr.test(o)){const c=u.md.normalizeLink("mailto:"+o);if(!u.md.validateLink(c))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",c]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}return!1}function Xr(u){return/^<a[>\s]/i.test(u)}function uo(u){return/^<\/a\s*>/i.test(u)}function eo(u){const e=u|32;return e>=97&&e<=122}function to(u,e){if(!u.md.options.html)return!1;const t=u.posMax,n=u.pos;if(u.src.charCodeAt(n)!==60||n+2>=t)return!1;const r=u.src.charCodeAt(n+1);if(r!==33&&r!==63&&r!==47&&!eo(r))return!1;const o=u.src.slice(n).match(Nr);if(!o)return!1;if(!e){const c=u.push("html_inline","",0);c.content=o[0],Xr(c.content)&&u.linkLevel++,uo(c.content)&&u.linkLevel--}return u.pos+=o[0].length,!0}const no=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ro=/^&([a-z][a-z0-9]{1,31});/i;function oo(u,e){const t=u.pos,n=u.posMax;if(u.src.charCodeAt(t)!==38||t+1>=n)return!1;if(u.src.charCodeAt(t+1)===35){const o=u.src.slice(t).match(no);if(o){if(!e){const c=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),i=u.push("text_special","",0);i.content=ge(c)?Zu(c):Zu(65533),i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}else{const o=u.src.slice(t).match(ro);if(o){const c=xt(o[0]);if(c!==o[0]){if(!e){const i=u.push("text_special","",0);i.content=c,i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}}return!1}function It(u){const e={},t=u.length;if(!t)return;let n=0,r=-2;const o=[];for(let c=0;c<t;c++){const i=u[c];if(o.push(0),(u[n].marker!==i.marker||r!==i.token-1)&&(n=c),r=i.token,i.length=i.length||0,!i.close)continue;e.hasOwnProperty(i.marker)||(e[i.marker]=[-1,-1,-1,-1,-1,-1]);const a=e[i.marker][(i.open?3:0)+i.length%3];let l=n-o[n]-1,f=l;for(;l>a;l-=o[l]+1){const d=u[l];if(d.marker===i.marker&&d.open&&d.end<0){let x=!1;if((d.close||i.open)&&(d.length+i.length)%3===0&&(d.length%3!==0||i.length%3!==0)&&(x=!0),!x){const b=l>0&&!u[l-1].open?o[l-1]+1:0;o[c]=c-l+b,o[l]=b,i.open=!1,d.end=c,d.close=!1,f=-1,r=-2;break}}}f!==-1&&(e[i.marker][(i.open?3:0)+(i.length||0)%3]=f)}}function co(u){const e=u.tokens_meta,t=u.tokens_meta.length;It(u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&It(e[n].delimiters)}function io(u){let e,t,n=0;const r=u.tokens,o=u.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&n--,r[e].level=n,r[e].nesting>0&&n++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const ve=[["text",jr],["linkify",Rr],["newline",qr],["escape",Vr],["backticks",$r],["strikethrough",Bt.tokenize],["emphasis",Tt.tokenize],["link",Wr],["image",Qr],["autolink",Yr],["html_inline",to],["entity",oo]],Ee=[["balance_pairs",co],["strikethrough",Bt.postProcess],["emphasis",Tt.postProcess],["fragments_join",io]];function Iu(){this.ruler=new J;for(let u=0;u<ve.length;u++)this.ruler.push(ve[u][0],ve[u][1]);this.ruler2=new J;for(let u=0;u<Ee.length;u++)this.ruler2.push(Ee[u][0],Ee[u][1])}Iu.prototype.skipToken=function(u){const e=u.pos,t=this.ruler.getRules(""),n=t.length,r=u.md.options.maxNesting,o=u.cache;if(typeof o[e]<"u"){u.pos=o[e];return}let c=!1;if(u.level<r){for(let i=0;i<n;i++)if(u.level++,c=t[i](u,!0),u.level--,c){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;c||u.pos++,o[e]=u.pos},Iu.prototype.tokenize=function(u){const e=this.ruler.getRules(""),t=e.length,n=u.posMax,r=u.md.options.maxNesting;for(;u.pos<n;){const o=u.pos;let c=!1;if(u.level<r){for(let i=0;i<t;i++)if(c=e[i](u,!1),c){if(o>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(c){if(u.pos>=n)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()},Iu.prototype.parse=function(u,e,t,n){const r=new this.State(u,e,t,n);this.tokenize(r);const o=this.ruler2.getRules(""),c=o.length;for(let i=0;i<c;i++)o[i](r)},Iu.prototype.State=Tu;function ao(u){const e={};u=u||{},e.src_Any=dt.source,e.src_Cc=ht.source,e.src_Z=bt.source,e.src_P=pe.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function De(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){u[n]=t[n]})}),u}function Ku(u){return Object.prototype.toString.call(u)}function lo(u){return Ku(u)==="[object String]"}function so(u){return Ku(u)==="[object Object]"}function fo(u){return Ku(u)==="[object RegExp]"}function Lt(u){return Ku(u)==="[object Function]"}function ho(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Mt={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function po(u){return Object.keys(u||{}).reduce(function(e,t){return e||Mt.hasOwnProperty(t)},!1)}const bo={"http:":{validate:function(u,e,t){const n=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){const n=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){const n=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},mo="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",xo="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function go(u){u.__index__=-1,u.__text_cache__=""}function _o(u){return function(e,t){const n=e.slice(t);return u.test(n)?n.match(u)[0].length:0}}function Ot(){return function(u,e){e.normalize(u)}}function Yu(u){const e=u.re=ao(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(mo),t.push(e.src_xn),e.src_tlds=t.join("|");function n(i){return i.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const r=[];u.__compiled__={};function o(i,a){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+a)}Object.keys(u.__schemas__).forEach(function(i){const a=u.__schemas__[i];if(a===null)return;const l={validate:null,link:null};if(u.__compiled__[i]=l,so(a)){fo(a.validate)?l.validate=_o(a.validate):Lt(a.validate)?l.validate=a.validate:o(i,a),Lt(a.normalize)?l.normalize=a.normalize:a.normalize?o(i,a):l.normalize=Ot();return}if(lo(a)){r.push(i);return}o(i,a)}),r.forEach(function(i){u.__compiled__[u.__schemas__[i]]&&(u.__compiled__[i].validate=u.__compiled__[u.__schemas__[i]].validate,u.__compiled__[i].normalize=u.__compiled__[u.__schemas__[i]].normalize)}),u.__compiled__[""]={validate:null,normalize:Ot()};const c=Object.keys(u.__compiled__).filter(function(i){return i.length>0&&u.__compiled__[i]}).map(ho).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),go(u)}function ko(u,e){const t=u.__index__,n=u.__last_index__,r=u.__text_cache__.slice(t,n);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=r,this.text=r,this.url=r}function Fe(u,e){const t=new ko(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function K(u,e){if(!(this instanceof K))return new K(u,e);e||po(u)&&(e=u,u={}),this.__opts__=De({},Mt,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=De({},bo,u),this.__compiled__={},this.__tlds__=xo,this.__tlds_replaced__=!1,this.re={},Yu(this)}K.prototype.add=function(e,t){return this.__schemas__[e]=t,Yu(this),this},K.prototype.set=function(e){return this.__opts__=De(this.__opts__,e),this},K.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,o,c,i,a,l,f;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(t=a.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],a.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(c=n.index+n[1].length,(this.__index__<0||c<this.__index__)&&(this.__schema__="",this.__index__=c,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=e.indexOf("@"),f>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(c=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||c<this.__index__||c===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=c,this.__last_index__=i))),this.__index__>=0},K.prototype.pretest=function(e){return this.re.pretest.test(e)},K.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},K.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(Fe(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(Fe(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},K.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,Fe(this,0)):null},K.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,r,o){return n!==o[r-1]}).reverse(),Yu(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Yu(this),this)},K.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},K.prototype.onCompile=function(){};const vu=2147483647,ou=36,Ae=1,Lu=26,yo=38,Co=700,Pt=72,jt=128,zt="-",vo=/^xn--/,Eo=/[^\0-\x7F]/,Do=/[\x2E\u3002\uFF0E\uFF61]/g,Fo={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},we=ou-Ae,cu=Math.floor,Se=String.fromCharCode;function pu(u){throw new RangeError(Fo[u])}function Ao(u,e){const t=[];let n=u.length;for(;n--;)t[n]=e(u[n]);return t}function Rt(u,e){const t=u.split("@");let n="";t.length>1&&(n=t[0]+"@",u=t[1]),u=u.replace(Do,".");const r=u.split("."),o=Ao(r,e).join(".");return n+o}function qt(u){const e=[];let t=0;const n=u.length;for(;t<n;){const r=u.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){const o=u.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const wo=u=>String.fromCodePoint(...u),So=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:ou},Vt=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},$t=function(u,e,t){let n=0;for(u=t?cu(u/Co):u>>1,u+=cu(u/e);u>we*Lu>>1;n+=ou)u=cu(u/we);return cu(n+(we+1)*u/(u+yo))},Ht=function(u){const e=[],t=u.length;let n=0,r=jt,o=Pt,c=u.lastIndexOf(zt);c<0&&(c=0);for(let i=0;i<c;++i)u.charCodeAt(i)>=128&&pu("not-basic"),e.push(u.charCodeAt(i));for(let i=c>0?c+1:0;i<t;){const a=n;for(let f=1,d=ou;;d+=ou){i>=t&&pu("invalid-input");const x=So(u.charCodeAt(i++));x>=ou&&pu("invalid-input"),x>cu((vu-n)/f)&&pu("overflow"),n+=x*f;const b=d<=o?Ae:d>=o+Lu?Lu:d-o;if(x<b)break;const h=ou-b;f>cu(vu/h)&&pu("overflow"),f*=h}const l=e.length+1;o=$t(n-a,l,a==0),cu(n/l)>vu-r&&pu("overflow"),r+=cu(n/l),n%=l,e.splice(n++,0,r)}return String.fromCodePoint(...e)},Ut=function(u){const e=[];u=qt(u);const t=u.length;let n=jt,r=0,o=Pt;for(const a of u)a<128&&e.push(Se(a));const c=e.length;let i=c;for(c&&e.push(zt);i<t;){let a=vu;for(const f of u)f>=n&&f<a&&(a=f);const l=i+1;a-n>cu((vu-r)/l)&&pu("overflow"),r+=(a-n)*l,n=a;for(const f of u)if(f<n&&++r>vu&&pu("overflow"),f===n){let d=r;for(let x=ou;;x+=ou){const b=x<=o?Ae:x>=o+Lu?Lu:x-o;if(d<b)break;const h=d-b,v=ou-b;e.push(Se(Vt(b+h%v,0))),d=cu(h/v)}e.push(Se(Vt(d,0))),o=$t(r,l,i===c),r=0,++i}++r,++n}return e.join("")},Zt={version:"2.3.1",ucs2:{decode:qt,encode:wo},decode:Ht,encode:Ut,toASCII:function(u){return Rt(u,function(e){return Eo.test(e)?"xn--"+Ut(e):e})},toUnicode:function(u){return Rt(u,function(e){return vo.test(e)?Ht(e.slice(4).toLowerCase()):e})}},Bo={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},No=/^(vbscript|javascript|file|data):/,To=/^data:image\/(gif|png|jpeg|webp);/;function Io(u){const e=u.trim().toLowerCase();return No.test(e)?To.test(e):!0}const Gt=["http:","https:","mailto:"];function Lo(u){const e=he(u,!0);if(e.hostname&&(!e.protocol||Gt.indexOf(e.protocol)>=0))try{e.hostname=Zt.toASCII(e.hostname)}catch{}return wu(de(e))}function Mo(u){const e=he(u,!0);if(e.hostname&&(!e.protocol||Gt.indexOf(e.protocol)>=0))try{e.hostname=Zt.toUnicode(e.hostname)}catch{}return _u(de(e),_u.defaultChars+"%")}function X(u,e){if(!(this instanceof X))return new X(u,e);e||xe(u)||(e=u||{},u="default"),this.inline=new Iu,this.block=new Ju,this.core=new ke,this.renderer=new yu,this.linkify=new K,this.validateLink=Io,this.normalizeLink=Lo,this.normalizeLinkText=Mo,this.utils=U0,this.helpers=Uu({},Q0),this.options={},this.configure(u),e&&this.set(e)}X.prototype.set=function(u){return Uu(this.options,u),this},X.prototype.configure=function(u){const e=this;if(xe(u)){const t=u;if(u=Bo[t],!u)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(t){u.components[t].rules&&e[t].ruler.enableOnly(u.components[t].rules),u.components[t].rules2&&e[t].ruler2.enableOnly(u.components[t].rules2)}),this},X.prototype.enable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},X.prototype.disable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},X.prototype.use=function(u){const e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this},X.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");const t=new this.core.State(u,this,e);return this.core.process(t),t.tokens},X.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)},X.prototype.parseInline=function(u,e){const t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},X.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};var Oo={207:(u,e,t)=>{u.exports=t(452)},452:u=>{var e=(function(t){var n,r=Object.prototype,o=r.hasOwnProperty,c=typeof Symbol=="function"?Symbol:{},i=c.iterator||"@@iterator",a=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(y,g,T){return Object.defineProperty(y,g,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[g]}try{f({},"")}catch{f=function(g,T,M){return g[T]=M}}function d(y,g,T,M){var N=g&&g.prototype instanceof E?g:E,U=Object.create(N.prototype),w=new W(M||[]);return U._invoke=(function(B,P,O){var H=b;return function(Q,xu){if(H===v)throw new Error("Generator is already running");if(H===k){if(Q==="throw")throw xu;return R()}for(O.method=Q,O.arg=xu;;){var Pu=O.delegate;if(Pu){var Eu=j(Pu,O);if(Eu){if(Eu===S)continue;return Eu}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(H===b)throw H=k,O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);H=v;var uu=x(B,P,O);if(uu.type==="normal"){if(H=O.done?k:h,uu.arg===S)continue;return{value:uu.arg,done:O.done}}uu.type==="throw"&&(H=k,O.method="throw",O.arg=uu.arg)}}})(y,T,w),U}function x(y,g,T){try{return{type:"normal",arg:y.call(g,T)}}catch(M){return{type:"throw",arg:M}}}t.wrap=d;var b="suspendedStart",h="suspendedYield",v="executing",k="completed",S={};function E(){}function F(){}function p(){}var C={};f(C,i,(function(){return this}));var m=Object.getPrototypeOf,_=m&&m(m(V([])));_&&_!==r&&o.call(_,i)&&(C=_);var D=p.prototype=E.prototype=Object.create(C);function L(y){["next","throw","return"].forEach((function(g){f(y,g,(function(T){return this._invoke(g,T)}))}))}function I(y,g){function T(N,U,w,B){var P=x(y[N],y,U);if(P.type!=="throw"){var O=P.arg,H=O.value;return H&&typeof H=="object"&&o.call(H,"__await")?g.resolve(H.__await).then((function(Q){T("next",Q,w,B)}),(function(Q){T("throw",Q,w,B)})):g.resolve(H).then((function(Q){O.value=Q,w(O)}),(function(Q){return T("throw",Q,w,B)}))}B(P.arg)}var M;this._invoke=function(N,U){function w(){return new g((function(B,P){T(N,U,B,P)}))}return M=M?M.then(w,w):w()}}function j(y,g){var T=y.iterator[g.method];if(T===n){if(g.delegate=null,g.method==="throw"){if(y.iterator.return&&(g.method="return",g.arg=n,j(y,g),g.method==="throw"))return S;g.method="throw",g.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var M=x(T,y.iterator,g.arg);if(M.type==="throw")return g.method="throw",g.arg=M.arg,g.delegate=null,S;var N=M.arg;return N?N.done?(g[y.resultName]=N.value,g.next=y.nextLoc,g.method!=="return"&&(g.method="next",g.arg=n),g.delegate=null,S):N:(g.method="throw",g.arg=new TypeError("iterator result is not an object"),g.delegate=null,S)}function z(y){var g={tryLoc:y[0]};1 in y&&(g.catchLoc=y[1]),2 in y&&(g.finallyLoc=y[2],g.afterLoc=y[3]),this.tryEntries.push(g)}function $(y){var g=y.completion||{};g.type="normal",delete g.arg,y.completion=g}function W(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(z,this),this.reset(!0)}function V(y){if(y){var g=y[i];if(g)return g.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,M=function N(){for(;++T<y.length;)if(o.call(y,T))return N.value=y[T],N.done=!1,N;return N.value=n,N.done=!0,N};return M.next=M}}return{next:R}}function R(){return{value:n,done:!0}}return F.prototype=p,f(D,"constructor",p),f(p,"constructor",F),F.displayName=f(p,l,"GeneratorFunction"),t.isGeneratorFunction=function(y){var g=typeof y=="function"&&y.constructor;return!!g&&(g===F||(g.displayName||g.name)==="GeneratorFunction")},t.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,p):(y.__proto__=p,f(y,l,"GeneratorFunction")),y.prototype=Object.create(D),y},t.awrap=function(y){return{__await:y}},L(I.prototype),f(I.prototype,a,(function(){return this})),t.AsyncIterator=I,t.async=function(y,g,T,M,N){N===void 0&&(N=Promise);var U=new I(d(y,g,T,M),N);return t.isGeneratorFunction(g)?U:U.next().then((function(w){return w.done?w.value:U.next()}))},L(D),f(D,l,"Generator"),f(D,i,(function(){return this})),f(D,"toString",(function(){return"[object Generator]"})),t.keys=function(y){var g=[];for(var T in y)g.push(T);return g.reverse(),function M(){for(;g.length;){var N=g.pop();if(N in y)return M.value=N,M.done=!1,M}return M.done=!0,M}},t.values=V,W.prototype={constructor:W,reset:function(y){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach($),!y)for(var g in this)g.charAt(0)==="t"&&o.call(this,g)&&!isNaN(+g.slice(1))&&(this[g]=n)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var g=this;function T(P,O){return U.type="throw",U.arg=y,g.next=P,O&&(g.method="next",g.arg=n),!!O}for(var M=this.tryEntries.length-1;M>=0;--M){var N=this.tryEntries[M],U=N.completion;if(N.tryLoc==="root")return T("end");if(N.tryLoc<=this.prev){var w=o.call(N,"catchLoc"),B=o.call(N,"finallyLoc");if(w&&B){if(this.prev<N.catchLoc)return T(N.catchLoc,!0);if(this.prev<N.finallyLoc)return T(N.finallyLoc)}else if(w){if(this.prev<N.catchLoc)return T(N.catchLoc,!0)}else{if(!B)throw new Error("try statement without catch or finally");if(this.prev<N.finallyLoc)return T(N.finallyLoc)}}}},abrupt:function(y,g){for(var T=this.tryEntries.length-1;T>=0;--T){var M=this.tryEntries[T];if(M.tryLoc<=this.prev&&o.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var N=M;break}}N&&(y==="break"||y==="continue")&&N.tryLoc<=g&&g<=N.finallyLoc&&(N=null);var U=N?N.completion:{};return U.type=y,U.arg=g,N?(this.method="next",this.next=N.finallyLoc,S):this.complete(U)},complete:function(y,g){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&g&&(this.next=g),S},finish:function(y){for(var g=this.tryEntries.length-1;g>=0;--g){var T=this.tryEntries[g];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),$(T),S}},catch:function(y){for(var g=this.tryEntries.length-1;g>=0;--g){var T=this.tryEntries[g];if(T.tryLoc===y){var M=T.completion;if(M.type==="throw"){var N=M.arg;$(T)}return N}}throw new Error("illegal catch attempt")},delegateYield:function(y,g,T){return this.delegate={iterator:V(y),resultName:g,nextLoc:T},this.method==="next"&&(this.arg=n),S}},t})(u.exports);try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},Wt={};function tu(u){var e=Wt[u];if(e!==void 0)return e.exports;var t=Wt[u]={exports:{}};return Oo[u](t,t.exports,tu),t.exports}tu.n=u=>{var e=u&&u.__esModule?()=>u.default:()=>u;return tu.d(e,{a:e}),e},tu.d=(u,e)=>{for(var t in e)tu.o(e,t)&&!tu.o(u,t)&&Object.defineProperty(u,t,{enumerable:!0,get:e[t]})},tu.o=(u,e)=>Object.prototype.hasOwnProperty.call(u,e);var Qt={};function Be(u,e){(e==null||e>u.length)&&(e=u.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=u[t];return n}function Jt(u,e){if(u){if(typeof u=="string")return Be(u,e);var t=Object.prototype.toString.call(u).slice(8,-1);return t==="Object"&&u.constructor&&(t=u.constructor.name),t==="Map"||t==="Set"?Array.from(u):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Be(u,e):void 0}}function Xu(u){return(function(e){if(Array.isArray(e))return Be(e)})(u)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(u)||Jt(u)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
17
17
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Mu(u,e,t){return e in u?Object.defineProperty(u,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):u[e]=t,u}tu.d(Qt,{A:()=>Vo});const A=(Kt={Fragment:()=>au.Fragment,computed:()=>au.computed,createTextVNode:()=>au.createTextVNode,createVNode:()=>au.createVNode,defineComponent:()=>au.defineComponent,reactive:()=>au.reactive,ref:()=>au.ref,watch:()=>au.watch,watchEffect:()=>au.watchEffect},Ne={},tu.d(Ne,Kt),Ne),Po=(0,A.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var u=this.data,e=this.onClick;return(0,A.createVNode)("span",{class:"vjs-tree-brackets",onClick:e},[u])}}),jo=(0,A.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(u,e){var t=e.emit;return{uiType:(0,A.computed)((function(){return u.isMultiple?"checkbox":"radio"})),model:(0,A.computed)({get:function(){return u.checked},set:function(n){return t("update:modelValue",n)}})}},render:function(){var u=this.uiType,e=this.model,t=this.$emit;return(0,A.createVNode)("label",{class:["vjs-check-controller",e?"is-checked":""],onClick:function(n){return n.stopPropagation()}},[(0,A.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(u)},null),(0,A.createVNode)("input",{checked:e,class:"vjs-check-controller-original is-".concat(u),type:u,onChange:function(){return t("change",e)}},null)])}}),zo=(0,A.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var u=this.nodeType,e=this.onClick,t=u==="objectStart"||u==="arrayStart";return t||u==="objectCollapsed"||u==="arrayCollapsed"?(0,A.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(t?"open":"close"),onClick:e},[(0,A.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,A.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var Kt,Ne;function Te(u){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(u)}function Yt(u){return Object.prototype.toString.call(u).slice(8,-1).toLowerCase()}function bu(u){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(arguments.length>3?arguments[3]:void 0)||{},r=n.key,o=n.index,c=n.type,i=c===void 0?"content":c,a=n.showComma,l=a!==void 0&&a,f=n.length,d=f===void 0?1:f,x=Yt(u);if(x==="array"){var b=Xt(u.map((function(k,S,E){return bu(k,"".concat(e,"[").concat(S,"]"),t+1,{index:S,showComma:S!==E.length-1,length:d,type:i})})));return[bu("[",e,t,{showComma:!1,key:r,length:u.length,type:"arrayStart"})[0]].concat(b,bu("]",e,t,{showComma:l,length:u.length,type:"arrayEnd"})[0])}if(x==="object"){var h=Object.keys(u),v=Xt(h.map((function(k,S,E){return bu(u[k],/^[a-zA-Z_]\w*$/.test(k)?"".concat(e,".").concat(k):"".concat(e,'["').concat(k,'"]'),t+1,{key:k,showComma:S!==E.length-1,length:d,type:i})})));return[bu("{",e,t,{showComma:!1,key:r,index:o,length:h.length,type:"objectStart"})[0]].concat(v,bu("}",e,t,{showComma:l,length:h.length,type:"objectEnd"})[0])}return[{content:u,level:t,key:r,index:o,path:e,showComma:l,length:d,type:i}]}function Xt(u){if(typeof Array.prototype.flat=="function")return u.flat();for(var e=Xu(u),t=[];e.length;){var n=e.shift();Array.isArray(n)?e.unshift.apply(e,Xu(n)):t.push(n)}return t}function Ie(u){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(u==null)return u;if(u instanceof Date)return new Date(u);if(u instanceof RegExp)return new RegExp(u);if(Te(u)!=="object")return u;if(e.get(u))return e.get(u);if(Array.isArray(u)){var t=u.map((function(o){return Ie(o,e)}));return e.set(u,t),t}var n={};for(var r in u)n[r]=Ie(u[r],e);return e.set(u,n),n}function un(u,e,t,n,r,o,c){try{var i=u[o](c),a=i.value}catch(l){return void t(l)}i.done?e(a):Promise.resolve(a).then(n,r)}var Ro=tu(207),en=tu.n(Ro);function tn(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable}))),t.push.apply(t,n)}return t}function nn(u){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tn(Object(t),!0).forEach((function(n){Mu(u,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):tn(Object(t)).forEach((function(n){Object.defineProperty(u,n,Object.getOwnPropertyDescriptor(t,n))}))}return u}var rn={data:{type:[String,Number,Boolean,Array,Object],default:null},rootPath:{type:String,default:"root"},indent:{type:Number,default:2},showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,renderNodeActions:{type:[Boolean,Function],default:void 0},selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},theme:{type:String,default:"light"},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onNodeMouseover:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}};const qo=(0,A.defineComponent)({name:"TreeNode",props:nn(nn({},rn),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(u,e){var t=e.emit,n=(0,A.computed)((function(){return Yt(u.node.content)})),r=(0,A.computed)((function(){return"vjs-value vjs-value-".concat(n.value)})),o=(0,A.computed)((function(){return u.showDoubleQuotes?'"'.concat(u.node.key,'"'):u.node.key})),c=(0,A.computed)((function(){return u.selectableType==="multiple"})),i=(0,A.computed)((function(){return u.selectableType==="single"})),a=(0,A.computed)((function(){return u.nodeSelectable(u.node)&&(c.value||i.value)})),l=(0,A.reactive)({editing:!1}),f=function(m){var _,D,L=(D=(_=m.target)===null||_===void 0?void 0:_.value)==="null"?null:D==="undefined"?void 0:D==="true"||D!=="false"&&(D[0]+D[D.length-1]==='""'||D[0]+D[D.length-1]==="''"?D.slice(1,-1):typeof Number(D)=="number"&&!isNaN(Number(D))||D==="NaN"?Number(D):D);t("valueChange",L,u.node.path)},d=(0,A.computed)((function(){var m,_=(m=u.node)===null||m===void 0?void 0:m.content;return _===null?_="null":_===void 0&&(_="undefined"),n.value==="string"?'"'.concat(_,'"'):_+""})),x=function(){var m=u.renderNodeValue;return m?m({node:u.node,defaultValue:d.value}):d.value},b=function(){t("bracketsClick",!u.collapsed,u.node)},h=function(){t("iconClick",!u.collapsed,u.node)},v=function(){t("selectedChange",u.node)},k=function(){t("nodeClick",u.node),a.value&&u.selectOnClickNode&&t("selectedChange",u.node)},S=function(){t("nodeMouseover",u.node)},E=function(m){if(u.editable&&!l.editing){l.editing=!0;var _=function D(L){var I;L.target!==m.target&&((I=L.target)===null||I===void 0?void 0:I.parentElement)!==m.target&&(l.editing=!1,document.removeEventListener("click",D))};document.removeEventListener("click",_),document.addEventListener("click",_)}},F=(function(){var m=(0,A.ref)(!1),_=(function(){var D,L=(D=en().mark((function I(j){return en().wrap((function(z){for(;;)switch(z.prev=z.next){case 0:return z.prev=0,z.next=3,navigator.clipboard.writeText(j);case 3:m.value=!0,setTimeout((function(){m.value=!1}),300),z.next=10;break;case 7:z.prev=7,z.t0=z.catch(0),console.error("[vue-json-pretty] Copy failed: ",z.t0);case 10:case"end":return z.stop()}}),I,null,[[0,7]])})),function(){var I=this,j=arguments;return new Promise((function(z,$){var W=D.apply(I,j);function V(y){un(W,z,$,V,R,"next",y)}function R(y){un(W,z,$,V,R,"throw",y)}V(void 0)}))});return function(I){return L.apply(this,arguments)}})();return{copy:_}})().copy,p=function(){var m=u.node,_=m.key,D=m.path,L=u.rootPath,I=new Function("data","return data".concat(D.slice(L.length)))(u.data),j=JSON.stringify(_?Mu({},_,I):I,null,2);F(j)},C=function(){var m=u.renderNodeActions;if(!m)return null;var _={copy:p};return typeof m=="function"?m({node:u.node,defaultActions:_}):(0,A.createVNode)("span",{onClick:p,class:"vjs-tree-node-actions-item"},[(0,A.createTextVNode)("copy")])};return function(){var m,_=u.node;return(0,A.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":u.showSelectController,"has-carets":u.showIcon,"is-highlight":u.highlightSelectedNode&&u.checked,dark:u.theme==="dark"},onClick:k,onMouseover:S,style:u.style},[u.showLineNumber&&(0,A.createVNode)("span",{class:"vjs-node-index"},[_.id+1]),u.showSelectController&&a.value&&_.type!=="objectEnd"&&_.type!=="arrayEnd"&&(0,A.createVNode)(jo,{isMultiple:c.value,checked:u.checked,onChange:v},null),(0,A.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(_.level)).map((function(D,L){return(0,A.createVNode)("div",{key:L,class:{"vjs-indent-unit":!0,"has-line":u.showLine}},[Array.from(Array(u.indent)).map((function(){return(0,A.createVNode)(A.Fragment,null,[(0,A.createTextVNode)(" ")])}))])})),u.showIcon&&(0,A.createVNode)(zo,{nodeType:_.type,onClick:h},null)]),_.key&&(0,A.createVNode)("span",{class:"vjs-key"},[(m=u.renderNodeKey,m?m({node:u.node,defaultKey:o.value||""}):o.value),(0,A.createVNode)("span",{class:"vjs-colon"},[":".concat(u.showKeyValueSpace?" ":"")])]),(0,A.createVNode)("span",null,[_.type!=="content"&&_.content?(0,A.createVNode)(Po,{data:_.content.toString(),onClick:b},null):(0,A.createVNode)("span",{class:r.value,onClick:!u.editable||u.editableTrigger&&u.editableTrigger!=="click"?void 0:E,onDblclick:u.editable&&u.editableTrigger==="dblclick"?E:void 0},[u.editable&&l.editing?(0,A.createVNode)("input",{value:d.value,onChange:f,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):x()]),_.showComma&&(0,A.createVNode)("span",null,[","]),u.showLength&&u.collapsed&&(0,A.createVNode)("span",{class:"vjs-comment"},[(0,A.createTextVNode)(" // "),_.length,(0,A.createTextVNode)(" items ")])]),u.renderNodeActions&&(0,A.createVNode)("span",{class:"vjs-tree-node-actions"},[C()])])}}});function on(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable}))),t.push.apply(t,n)}return t}function Y(u){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?on(Object(t),!0).forEach((function(n){Mu(u,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):on(Object(t)).forEach((function(n){Object.defineProperty(u,n,Object.getOwnPropertyDescriptor(t,n))}))}return u}const Vo=(0,A.defineComponent)({name:"Tree",props:Y(Y({},rn),{},{collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function},theme:{type:String,default:"light"}}),slots:["renderNodeKey","renderNodeValue","renderNodeActions"],emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(u,e){var t=e.emit,n=e.slots,r=(0,A.ref)(),o=(0,A.computed)((function(){return bu(u.data,u.rootPath)})),c=function(p,C){return o.value.reduce((function(m,_){var D,L=_.level>=p||_.length>=C,I=(D=u.pathCollapsible)===null||D===void 0?void 0:D.call(u,_);return _.type!=="objectStart"&&_.type!=="arrayStart"||!L&&!I?m:Y(Y({},m),{},Mu({},_.path,1))}),{})},i=(0,A.reactive)({translateY:0,visibleData:null,hiddenPaths:c(u.deep,u.collapsedNodeLength)}),a=(0,A.computed)((function(){for(var p=null,C=[],m=o.value.length,_=0;_<m;_++){var D=Y(Y({},o.value[_]),{},{id:_}),L=i.hiddenPaths[D.path];if(p&&p.path===D.path){var I=p.type==="objectStart",j=Y(Y(Y({},D),p),{},{showComma:D.showComma,content:I?"{...}":"[...]",type:I?"objectCollapsed":"arrayCollapsed"});p=null,C.push(j)}else{if(L&&!p){p=D;continue}if(p)continue;C.push(D)}}return C})),l=(0,A.computed)((function(){var p=u.selectedValue;return p&&u.selectableType==="multiple"&&Array.isArray(p)?p:[p]})),f=(0,A.computed)((function(){return!u.selectableType||u.selectOnClickNode||u.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."})),d=function(){var p=a.value;if(u.virtual){var C,m=u.height/u.itemHeight,_=((C=r.value)===null||C===void 0?void 0:C.scrollTop)||0,D=Math.floor(_/u.itemHeight),L=D<0?0:D+m>p.length?p.length-m:D;L<0&&(L=0);var I=L+m;i.translateY=L*u.itemHeight,i.visibleData=p.filter((function(j,z){return z>=L&&z<I}))}else i.visibleData=p},x=function(){d()},b=function(p){var C,m,_=p.path,D=u.selectableType;if(D==="multiple"){var L=l.value.findIndex((function($){return $===_})),I=Xu(l.value);L!==-1?I.splice(L,1):I.push(_),t("update:selectedValue",I),t("selectedChange",I,Xu(l.value))}else if(D==="single"&&l.value[0]!==_){var j=(C=l.value,m=1,(function($){if(Array.isArray($))return $})(C)||(function($,W){var V=$==null?null:typeof Symbol<"u"&&$[Symbol.iterator]||$["@@iterator"];if(V!=null){var R,y,g=[],T=!0,M=!1;try{for(V=V.call($);!(T=(R=V.next()).done)&&(g.push(R.value),!W||g.length!==W);T=!0);}catch(N){M=!0,y=N}finally{try{T||V.return==null||V.return()}finally{if(M)throw y}}return g}})(C,m)||Jt(C,m)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})())[0],z=_;t("update:selectedValue",z),t("selectedChange",z,j)}},h=function(p){t("nodeClick",p)},v=function(p){t("nodeMouseover",p)},k=function(p,C){if(p)i.hiddenPaths=Y(Y({},i.hiddenPaths),{},Mu({},C,1));else{var m=Y({},i.hiddenPaths);delete m[C],i.hiddenPaths=m}},S=function(p,C){u.collapsedOnClickBrackets&&k(p,C.path),t("bracketsClick",p,C)},E=function(p,C){k(p,C.path),t("iconClick",p,C)},F=function(p,C){var m=Ie(u.data),_=u.rootPath;new Function("data","val","data".concat(C.slice(_.length),"=val"))(m,p),t("update:data",m)};return(0,A.watchEffect)((function(){f.value&&(function(p){throw new Error("[VueJSONPretty] ".concat(p))})(f.value)})),(0,A.watchEffect)((function(){a.value&&d()})),(0,A.watch)((function(){return u.deep}),(function(p){p&&(i.hiddenPaths=c(p,u.collapsedNodeLength))})),(0,A.watch)((function(){return u.collapsedNodeLength}),(function(p){p&&(i.hiddenPaths=c(u.deep,p))})),function(){var p,C,m,_,D=(p=u.renderNodeKey)!==null&&p!==void 0?p:n.renderNodeKey,L=(C=u.renderNodeValue)!==null&&C!==void 0?C:n.renderNodeValue,I=(m=(_=u.renderNodeActions)!==null&&_!==void 0?_:n.renderNodeActions)!==null&&m!==void 0&&m,j=i.visibleData&&i.visibleData.map((function(z){return(0,A.createVNode)(qo,{key:z.id,data:u.data,rootPath:u.rootPath,indent:u.indent,node:z,collapsed:!!i.hiddenPaths[z.path],theme:u.theme,showDoubleQuotes:u.showDoubleQuotes,showLength:u.showLength,checked:l.value.includes(z.path),selectableType:u.selectableType,showLine:u.showLine,showLineNumber:u.showLineNumber,showSelectController:u.showSelectController,selectOnClickNode:u.selectOnClickNode,nodeSelectable:u.nodeSelectable,highlightSelectedNode:u.highlightSelectedNode,editable:u.editable,editableTrigger:u.editableTrigger,showIcon:u.showIcon,showKeyValueSpace:u.showKeyValueSpace,renderNodeKey:D,renderNodeValue:L,renderNodeActions:I,onNodeClick:h,onNodeMouseover:v,onBracketsClick:S,onIconClick:E,onSelectedChange:b,onValueChange:F,style:u.itemHeight&&u.itemHeight!==20?{lineHeight:"".concat(u.itemHeight,"px")}:{}},null)}));return(0,A.createVNode)("div",{ref:r,class:{"vjs-tree":!0,"is-virtual":u.virtual,dark:u.theme==="dark"},onScroll:u.virtual?x:void 0,style:u.showLineNumber?Y({paddingLeft:"".concat(12*Number(o.value.length.toString().length),"px")},u.style):u.style},[u.virtual?(0,A.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(u.height,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(a.value.length*u.itemHeight,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(i.translateY,"px)")}},[j])])]):j])}}});var $o=Qt.A;const Ho=["src","alt"],Uo=s.defineComponent({__name:"ImageViewer",props:{show:{type:Boolean},imageUrl:{},alt:{}},emits:["close"],setup(u){return(e,t)=>(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,{name:"viewer"},{default:s.withCtx(()=>[u.show?(s.openBlock(),s.createElementBlock("div",{key:0,class:"image-viewer",onClick:t[2]||(t[2]=n=>e.$emit("close"))},[s.createElementVNode("div",{class:"close-button",onClick:t[0]||(t[0]=s.withModifiers(n=>e.$emit("close"),["stop"]))},[s.createVNode(s.unref(su),{icon:"mdi:close"})]),s.createElementVNode("div",{class:"viewer-content",onClick:t[1]||(t[1]=s.withModifiers(()=>{},["stop"]))},[s.createElementVNode("img",{src:u.imageUrl,alt:u.alt},null,8,Ho)])])):s.createCommentVNode("",!0)]),_:1})]))}}),lu=(u,e)=>{const t=u.__vccOpts||u;for(const[n,r]of e)t[n]=r;return t},cn=lu(Uo,[["__scopeId","data-v-92c159ee"]]),Zo=["innerHTML"],Le=lu(s.defineComponent({__name:"MessageTextContent",props:{html:{},role:{},plain:{type:Boolean,default:!1}},setup(u){const e=u,t=s.computed(()=>e.role?`role-${e.role}`:""),n=s.computed(()=>e.plain);return(r,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["content-text",[t.value,{"is-plain":n.value}]]),innerHTML:u.html},null,10,Zo))}}),[["__scopeId","data-v-d4935523"]]),Go={key:0,class:"html-preview-wrapper"},Wo={key:0,class:"html-loading"},Qo=["src"],Jo={class:"file-name"},ue=lu(s.defineComponent({__name:"MessageFileContent",props:{name:{},url:{},allowShareMedialibHtml:{type:Boolean}},emits:["click"],setup(u){const e=u,t=s.computed(()=>e.url.toLowerCase().endsWith(".html")??!1),n=s.ref(!0);function r(){n.value=!1}return s.watch(()=>e.url,()=>{n.value=!0}),(o,c)=>t.value?(s.openBlock(),s.createElementBlock("div",Go,[n.value?(s.openBlock(),s.createElementBlock("div",Wo,[...c[2]||(c[2]=[s.createElementVNode("div",{class:"loading-spinner"},null,-1),s.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])])):s.createCommentVNode("",!0),u.allowShareMedialibHtml?(s.openBlock(),s.createElementBlock("div",{key:1,class:"share-icon",onClick:c[0]||(c[0]=i=>o.$emit("click"))},[s.createVNode(s.unref(su),{icon:"mdi:open-in-new"})])):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("iframe",{src:u.url,class:"html-iframe",frameborder:"0",onLoad:r},null,40,Qo),[[s.vShow,!n.value]])])):(s.openBlock(),s.createElementBlock("div",{key:1,class:"content-file",onClick:c[1]||(c[1]=i=>o.$emit("click"))},[s.createVNode(s.unref(su),{icon:"mdi:file-document-outline",class:"file-icon"}),s.createElementVNode("span",Jo,s.toDisplayString(u.name),1),s.createVNode(s.unref(su),{icon:"mdi:download",class:"download-icon"})]))}}),[["__scopeId","data-v-4b1d629c"]]),Ko=["src"],Ou=lu(s.defineComponent({__name:"MessageImageContent",props:{src:{},fullWidth:{type:Boolean}},emits:["click"],setup(u){return(e,t)=>(s.openBlock(),s.createElementBlock("img",{src:u.src,alt:"图片",class:s.normalizeClass(["message-image",{"is-full-width":u.fullWidth}]),onClick:t[0]||(t[0]=n=>e.$emit("click"))},null,10,Ko))}}),[["__scopeId","data-v-24952cda"]]),Yo=["src"],ee=lu(s.defineComponent({__name:"MessageVideoContent",props:{src:{},fullWidth:{type:Boolean}},setup(u){return(e,t)=>(s.openBlock(),s.createElementBlock("video",{controls:"",src:u.src,class:s.normalizeClass(["message-video",{"is-full-width":u.fullWidth}])}," 您的浏览器不支持视频播放 ",10,Yo))}}),[["__scopeId","data-v-be6bb72d"]]),Xo=["src"],te=lu(s.defineComponent({__name:"MessageAudioContent",props:{src:{}},setup(u){return(e,t)=>(s.openBlock(),s.createElementBlock("audio",{controls:"",src:u.src,class:"message-audio"}," 您的浏览器不支持音频播放 ",8,Xo))}}),[["__scopeId","data-v-c0d42074"]]),uc={class:"sample-questions"},ec=["onClick"],tc=lu(s.defineComponent({__name:"MessageSampleQuestions",props:{questions:{}},emits:["click"],setup(u,{emit:e}){const t=e;function n(r){t("click",r)}return(r,o)=>(s.openBlock(),s.createElementBlock("div",uc,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.questions,(c,i)=>(s.openBlock(),s.createElementBlock("span",{key:i,class:"sample-question-btn",onClick:a=>n(c)},s.toDisplayString(c),9,ec))),128))]))}}),[["__scopeId","data-v-124204f2"]]),nc={class:"message-product-content"},rc={key:0,class:"product-main-image"},oc=["src","onClick"],cc={key:1,class:"product-title"},ic={key:2,class:"product-description"},ac={key:3,class:"product-skus"},lc={key:4,class:"product-materials"},sc={key:5,class:"product-detail-link"},fc=["href"],dc=lu(s.defineComponent({__name:"MessageProductContent",props:{products:{}},emits:["imageClick"],setup(u,{emit:e}){const t=e;function n(i){return mu(i)}function r(i){return JSON.stringify(i)}function o(i){t("imageClick",i)}function c(i){t("imageClick",i)}return(i,a)=>(s.openBlock(),s.createElementBlock("div",nc,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.products,(l,f)=>(s.openBlock(),s.createElementBlock("div",{key:l.id||f,class:"product-card"},[l.main_image_url?(s.openBlock(),s.createElementBlock("div",rc,[s.createElementVNode("img",{src:l.main_image_url,alt:"商品图片",class:"product-image",onClick:d=>o(l.main_image_url)},null,8,oc)])):s.createCommentVNode("",!0),l.title?(s.openBlock(),s.createElementBlock("div",cc,s.toDisplayString(l.title),1)):s.createCommentVNode("",!0),l.decription?(s.openBlock(),s.createElementBlock("div",ic,s.toDisplayString(l.decription),1)):s.createCommentVNode("",!0),l.skus&&l.skus.length>0?(s.openBlock(),s.createElementBlock("div",ac,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.skus,(d,x)=>(s.openBlock(),s.createElementBlock("div",{key:x,class:"product-sku-item"},s.toDisplayString(r(d)),1))),128))])):s.createCommentVNode("",!0),l.material_urls&&l.material_urls.length>0?(s.openBlock(),s.createElementBlock("div",lc,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.material_urls,(d,x)=>(s.openBlock(),s.createElementBlock("div",{key:x,class:"product-material-item"},[n(d)==="image"?(s.openBlock(),s.createBlock(Ou,{key:0,src:d,onClick:b=>c(d)},null,8,["src","onClick"])):n(d)==="video"?(s.openBlock(),s.createBlock(ee,{key:1,src:d,"full-width":!0},null,8,["src"])):s.createCommentVNode("",!0)]))),128))])):s.createCommentVNode("",!0),l.detatil_url?(s.openBlock(),s.createElementBlock("div",sc,[s.createElementVNode("a",{href:l.detatil_url,target:"_blank",rel:"noopener noreferrer",class:"detail-link"},s.toDisplayString(l.detatil_url),9,fc)])):s.createCommentVNode("",!0)]))),128))]))}}),[["__scopeId","data-v-d422a849"]]),hc={key:2,class:"content-user-message"},pc={key:1,class:"files-grid"},bc={key:6,class:"content-medialib"},mc={key:7,class:"content-welcome"},xc={key:1,class:"welcome-media"},gc=lu(s.defineComponent({__name:"MessageContentRenderer",props:{content:{},role:{},showActions:{type:Boolean},allowRegenerate:{type:Boolean},allowShareMedialibHtml:{type:Boolean}},emits:["copy","regenerate","delete","sampleQuestionClick"],setup(u,{emit:e}){const t=u,n=e,r=s.computed(()=>t.role?`role-${t.role}`:""),o=s.computed(()=>t.role?`actions-${t.role}`:""),c=s.computed(()=>t.showActions!==!1&&!!t.role),i=s.computed(()=>t.role==="assistant"&&t.allowRegenerate!==!1),a=s.computed(()=>{const w=t.content;if(typeof w=="string"){try{const B=JSON.parse(w);if(B&&typeof B=="object"&&"type"in B)return B}catch{}return{type:"text",content:w}}return w});function l(w){return!("type"in w)}const f=new X({html:!0,linkify:!0,typographer:!0,breaks:!0}),d=f.renderer.rules.link_open??((w,B,P,O,H)=>H.renderToken(w,B,P));f.renderer.rules.link_open=(w,B,P,O,H)=>{const Q=w[B];if(!Q)return d(w,B,P,O,H);const xu=Q.attrs??(Q.attrs=[]),Pu=Q.attrIndex("target");if(Pu<0)xu.push(["target","_blank"]);else{const uu=xu[Pu];uu&&(uu[1]="_blank")}const Eu=Q.attrIndex("rel");if(Eu<0)xu.push(["rel","noopener noreferrer"]);else{const uu=xu[Eu];if(uu){const _c=uu[1]||"",Me=new Set(_c.split(/\s+/).filter(Boolean));Me.add("noopener"),Me.add("noreferrer"),uu[1]=Array.from(Me).join(" ")}}return d(w,B,P,O,H)};const x=s.computed(()=>!l(a.value)&&a.value.type==="text"?f.render(a.value.content):"");function b(w){return w?f.renderInline(w):""}const h=s.ref(!1),v=s.ref("");function k(){const w=a.value;if(l(w)){const B=[];return Array.isArray(w.texts)&&B.push(...w.texts.filter(Boolean)),B.join(`
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})())[0],z=_;t("update:selectedValue",z),t("selectedChange",z,j)}},h=function(p){t("nodeClick",p)},v=function(p){t("nodeMouseover",p)},k=function(p,C){if(p)i.hiddenPaths=Y(Y({},i.hiddenPaths),{},Mu({},C,1));else{var m=Y({},i.hiddenPaths);delete m[C],i.hiddenPaths=m}},S=function(p,C){u.collapsedOnClickBrackets&&k(p,C.path),t("bracketsClick",p,C)},E=function(p,C){k(p,C.path),t("iconClick",p,C)},F=function(p,C){var m=Ie(u.data),_=u.rootPath;new Function("data","val","data".concat(C.slice(_.length),"=val"))(m,p),t("update:data",m)};return(0,A.watchEffect)((function(){f.value&&(function(p){throw new Error("[VueJSONPretty] ".concat(p))})(f.value)})),(0,A.watchEffect)((function(){a.value&&d()})),(0,A.watch)((function(){return u.deep}),(function(p){p&&(i.hiddenPaths=c(p,u.collapsedNodeLength))})),(0,A.watch)((function(){return u.collapsedNodeLength}),(function(p){p&&(i.hiddenPaths=c(u.deep,p))})),function(){var p,C,m,_,D=(p=u.renderNodeKey)!==null&&p!==void 0?p:n.renderNodeKey,L=(C=u.renderNodeValue)!==null&&C!==void 0?C:n.renderNodeValue,I=(m=(_=u.renderNodeActions)!==null&&_!==void 0?_:n.renderNodeActions)!==null&&m!==void 0&&m,j=i.visibleData&&i.visibleData.map((function(z){return(0,A.createVNode)(qo,{key:z.id,data:u.data,rootPath:u.rootPath,indent:u.indent,node:z,collapsed:!!i.hiddenPaths[z.path],theme:u.theme,showDoubleQuotes:u.showDoubleQuotes,showLength:u.showLength,checked:l.value.includes(z.path),selectableType:u.selectableType,showLine:u.showLine,showLineNumber:u.showLineNumber,showSelectController:u.showSelectController,selectOnClickNode:u.selectOnClickNode,nodeSelectable:u.nodeSelectable,highlightSelectedNode:u.highlightSelectedNode,editable:u.editable,editableTrigger:u.editableTrigger,showIcon:u.showIcon,showKeyValueSpace:u.showKeyValueSpace,renderNodeKey:D,renderNodeValue:L,renderNodeActions:I,onNodeClick:h,onNodeMouseover:v,onBracketsClick:S,onIconClick:E,onSelectedChange:b,onValueChange:F,style:u.itemHeight&&u.itemHeight!==20?{lineHeight:"".concat(u.itemHeight,"px")}:{}},null)}));return(0,A.createVNode)("div",{ref:r,class:{"vjs-tree":!0,"is-virtual":u.virtual,dark:u.theme==="dark"},onScroll:u.virtual?x:void 0,style:u.showLineNumber?Y({paddingLeft:"".concat(12*Number(o.value.length.toString().length),"px")},u.style):u.style},[u.virtual?(0,A.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(u.height,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(a.value.length*u.itemHeight,"px")}},[(0,A.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(i.translateY,"px)")}},[j])])]):j])}}});var $o=Qt.A;const Ho=["src","alt"],Uo=s.defineComponent({__name:"ImageViewer",props:{show:{type:Boolean},imageUrl:{},alt:{}},emits:["close"],setup(u){return(e,t)=>(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,{name:"viewer"},{default:s.withCtx(()=>[u.show?(s.openBlock(),s.createElementBlock("div",{key:0,class:"image-viewer",onClick:t[2]||(t[2]=n=>e.$emit("close"))},[s.createElementVNode("div",{class:"close-button",onClick:t[0]||(t[0]=s.withModifiers(n=>e.$emit("close"),["stop"]))},[s.createVNode(s.unref(su),{icon:"mdi:close"})]),s.createElementVNode("div",{class:"viewer-content",onClick:t[1]||(t[1]=s.withModifiers(()=>{},["stop"]))},[s.createElementVNode("img",{src:u.imageUrl,alt:u.alt},null,8,Ho)])])):s.createCommentVNode("",!0)]),_:1})]))}}),lu=(u,e)=>{const t=u.__vccOpts||u;for(const[n,r]of e)t[n]=r;return t},cn=lu(Uo,[["__scopeId","data-v-92c159ee"]]),Zo=["innerHTML"],Le=lu(s.defineComponent({__name:"MessageTextContent",props:{html:{},role:{},plain:{type:Boolean,default:!1}},setup(u){const e=u,t=s.computed(()=>e.role?`role-${e.role}`:""),n=s.computed(()=>e.plain);return(r,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["content-text",[t.value,{"is-plain":n.value}]]),innerHTML:u.html},null,10,Zo))}}),[["__scopeId","data-v-d4935523"]]),Go={key:0,class:"html-preview-wrapper"},Wo={key:0,class:"html-loading"},Qo=["src"],Jo={class:"file-name"},ue=lu(s.defineComponent({__name:"MessageFileContent",props:{name:{},url:{},allowShareMedialibHtml:{type:Boolean}},emits:["click"],setup(u){const e=u,t=s.computed(()=>e.url.toLowerCase().endsWith(".html")??!1),n=s.ref(!0);function r(){n.value=!1}return s.watch(()=>e.url,()=>{n.value=!0}),(o,c)=>t.value?(s.openBlock(),s.createElementBlock("div",Go,[n.value?(s.openBlock(),s.createElementBlock("div",Wo,[...c[2]||(c[2]=[s.createElementVNode("div",{class:"loading-spinner"},null,-1),s.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])])):s.createCommentVNode("",!0),u.allowShareMedialibHtml?(s.openBlock(),s.createElementBlock("div",{key:1,class:"share-icon",onClick:c[0]||(c[0]=i=>o.$emit("click"))},[s.createVNode(s.unref(su),{icon:"mdi:open-in-new"})])):s.createCommentVNode("",!0),s.withDirectives(s.createElementVNode("iframe",{src:u.url,class:"html-iframe",frameborder:"0",onLoad:r},null,40,Qo),[[s.vShow,!n.value]])])):(s.openBlock(),s.createElementBlock("div",{key:1,class:"content-file",onClick:c[1]||(c[1]=i=>o.$emit("click"))},[s.createVNode(s.unref(su),{icon:"mdi:file-document-outline",class:"file-icon"}),s.createElementVNode("span",Jo,s.toDisplayString(u.name),1),s.createVNode(s.unref(su),{icon:"mdi:download",class:"download-icon"})]))}}),[["__scopeId","data-v-4b1d629c"]]),Ko=["src"],Ou=lu(s.defineComponent({__name:"MessageImageContent",props:{src:{},fullWidth:{type:Boolean}},emits:["click"],setup(u){return(e,t)=>(s.openBlock(),s.createElementBlock("img",{src:u.src,alt:"图片",class:s.normalizeClass(["message-image",{"is-full-width":u.fullWidth}]),onClick:t[0]||(t[0]=n=>e.$emit("click"))},null,10,Ko))}}),[["__scopeId","data-v-24952cda"]]),Yo=["src"],ee=lu(s.defineComponent({__name:"MessageVideoContent",props:{src:{},fullWidth:{type:Boolean}},setup(u){return(e,t)=>(s.openBlock(),s.createElementBlock("video",{controls:"",src:u.src,class:s.normalizeClass(["message-video",{"is-full-width":u.fullWidth}])}," 您的浏览器不支持视频播放 ",10,Yo))}}),[["__scopeId","data-v-be6bb72d"]]),Xo=["src"],te=lu(s.defineComponent({__name:"MessageAudioContent",props:{src:{}},setup(u){return(e,t)=>(s.openBlock(),s.createElementBlock("audio",{controls:"",src:u.src,class:"message-audio"}," 您的浏览器不支持音频播放 ",8,Xo))}}),[["__scopeId","data-v-c0d42074"]]),uc={class:"sample-questions"},ec=["onClick"],tc=lu(s.defineComponent({__name:"MessageSampleQuestions",props:{questions:{}},emits:["click"],setup(u,{emit:e}){const t=e;function n(r){t("click",r)}return(r,o)=>(s.openBlock(),s.createElementBlock("div",uc,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.questions,(c,i)=>(s.openBlock(),s.createElementBlock("span",{key:i,class:"sample-question-btn",onClick:a=>n(c)},s.toDisplayString(c),9,ec))),128))]))}}),[["__scopeId","data-v-124204f2"]]),nc={class:"message-product-content"},rc={key:0,class:"product-main-image"},oc=["src","onClick"],cc={key:1,class:"product-title"},ic={key:2,class:"product-description"},ac={key:3,class:"product-skus"},lc={key:4,class:"product-materials"},sc={key:5,class:"product-detail-link"},fc=["href"],dc=lu(s.defineComponent({__name:"MessageProductContent",props:{products:{}},emits:["imageClick"],setup(u,{emit:e}){const t=e;function n(i){return mu(i)}function r(i){return JSON.stringify(i)}function o(i){t("imageClick",i)}function c(i){t("imageClick",i)}return(i,a)=>(s.openBlock(),s.createElementBlock("div",nc,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.products,(l,f)=>(s.openBlock(),s.createElementBlock("div",{key:l.id||f,class:"product-card"},[l.main_image_url?(s.openBlock(),s.createElementBlock("div",rc,[s.createElementVNode("img",{src:l.main_image_url,alt:"商品图片",class:"product-image",onClick:d=>o(l.main_image_url)},null,8,oc)])):s.createCommentVNode("",!0),l.title?(s.openBlock(),s.createElementBlock("div",cc,s.toDisplayString(l.title),1)):s.createCommentVNode("",!0),l.description?(s.openBlock(),s.createElementBlock("div",ic,s.toDisplayString(l.description),1)):s.createCommentVNode("",!0),l.skus&&l.skus.length>0?(s.openBlock(),s.createElementBlock("div",ac,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.skus,(d,x)=>(s.openBlock(),s.createElementBlock("div",{key:x,class:"product-sku-item"},s.toDisplayString(r(d)),1))),128))])):s.createCommentVNode("",!0),l.material_urls&&l.material_urls.length>0?(s.openBlock(),s.createElementBlock("div",lc,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.material_urls,(d,x)=>(s.openBlock(),s.createElementBlock("div",{key:x,class:"product-material-item"},[n(d)==="image"?(s.openBlock(),s.createBlock(Ou,{key:0,src:d,onClick:b=>c(d)},null,8,["src","onClick"])):n(d)==="video"?(s.openBlock(),s.createBlock(ee,{key:1,src:d,"full-width":!0},null,8,["src"])):s.createCommentVNode("",!0)]))),128))])):s.createCommentVNode("",!0),l.detail_url?(s.openBlock(),s.createElementBlock("div",sc,[s.createElementVNode("a",{href:l.detail_url,target:"_blank",rel:"noopener noreferrer",class:"detail-link"},s.toDisplayString(l.detail_url),9,fc)])):s.createCommentVNode("",!0)]))),128))]))}}),[["__scopeId","data-v-b831ed4e"]]),hc={key:2,class:"content-user-message"},pc={key:1,class:"files-grid"},bc={key:6,class:"content-medialib"},mc={key:7,class:"content-welcome"},xc={key:1,class:"welcome-media"},gc=lu(s.defineComponent({__name:"MessageContentRenderer",props:{content:{},role:{},showActions:{type:Boolean},allowRegenerate:{type:Boolean},allowShareMedialibHtml:{type:Boolean}},emits:["copy","regenerate","delete","sampleQuestionClick"],setup(u,{emit:e}){const t=u,n=e,r=s.computed(()=>t.role?`role-${t.role}`:""),o=s.computed(()=>t.role?`actions-${t.role}`:""),c=s.computed(()=>t.showActions!==!1&&!!t.role),i=s.computed(()=>t.role==="assistant"&&t.allowRegenerate!==!1),a=s.computed(()=>{const w=t.content;if(typeof w=="string"){try{const B=JSON.parse(w);if(B&&typeof B=="object"&&"type"in B)return B}catch{}return{type:"text",content:w}}return w});function l(w){return!("type"in w)}const f=new X({html:!0,linkify:!0,typographer:!0,breaks:!0}),d=f.renderer.rules.link_open??((w,B,P,O,H)=>H.renderToken(w,B,P));f.renderer.rules.link_open=(w,B,P,O,H)=>{const Q=w[B];if(!Q)return d(w,B,P,O,H);const xu=Q.attrs??(Q.attrs=[]),Pu=Q.attrIndex("target");if(Pu<0)xu.push(["target","_blank"]);else{const uu=xu[Pu];uu&&(uu[1]="_blank")}const Eu=Q.attrIndex("rel");if(Eu<0)xu.push(["rel","noopener noreferrer"]);else{const uu=xu[Eu];if(uu){const _c=uu[1]||"",Me=new Set(_c.split(/\s+/).filter(Boolean));Me.add("noopener"),Me.add("noreferrer"),uu[1]=Array.from(Me).join(" ")}}return d(w,B,P,O,H)};const x=s.computed(()=>!l(a.value)&&a.value.type==="text"?f.render(a.value.content):"");function b(w){return w?f.renderInline(w):""}const h=s.ref(!1),v=s.ref("");function k(){const w=a.value;if(l(w)){const B=[];return Array.isArray(w.texts)&&B.push(...w.texts.filter(Boolean)),B.join(`
|
|
19
19
|
|
|
20
20
|
`).trim()}return w.type==="text"?w.content:""}const S=s.computed(()=>k().length>0);async function E(){const w=k();if(w)try{await navigator.clipboard.writeText(w)}catch(B){console.error("Failed to copy content",B)}n("copy")}function F(){n("regenerate")}function p(){n("delete")}function C(){l(a.value)||(a.value.type==="image"?(v.value=a.value.content,h.value=!0):a.value.type==="medialib"&&W.value==="image"&&(v.value=j.value,h.value=!0))}function m(w){v.value=w,h.value=!0}function _(w){try{const O=new URL(w).pathname.split("/");return O[O.length-1]||"未知文件"}catch{return"未知文件"}}function D(){l(a.value)||window.open(a.value.content,"_blank")}function L(w){window.open(w,"_blank")}const I=s.computed(()=>{if(!l(a.value)&&a.value.type==="medialib")try{return JSON.parse(a.value.content)}catch{return null}return null}),j=s.computed(()=>I.value?.file_url||""),z=s.computed(()=>I.value?.file_url?.toLowerCase().endsWith(".html")??!1),$=s.computed(()=>I.value?.file_name||_(j.value)),W=s.computed(()=>{if(!j.value)return"json";const w=j.value.toLowerCase();return mu(w)});function V(){j.value&&window.open(j.value,"_blank")}const R=s.computed(()=>{if(!l(a.value)&&a.value.type==="welcome")try{return JSON.parse(a.value.content)}catch{return null}return null}),y=s.computed(()=>R.value?.welcome_message?f.render(R.value.welcome_message):""),g=s.computed(()=>R.value?.media_attachment?mu(R.value.media_attachment):"file");function T(){R.value?.media_attachment&&(v.value=R.value.media_attachment,h.value=!0)}function M(w){n("sampleQuestionClick",w)}const N=s.computed(()=>{if(!l(a.value)&&a.value.type==="product")try{const w=a.value.content;if(!w)return console.warn("Product content is empty"),[];let B;try{B=JSON.parse(w)}catch(P){return console.error("Failed to parse product content string:",P,w),[]}if(Array.isArray(B))return B;if(B&&typeof B=="object"&&B.type==="product"&&B.content){if(typeof B.content=="string")try{const P=JSON.parse(B.content);if(Array.isArray(P))return P}catch(P){console.error("Failed to parse nested product content:",P,B.content)}if(Array.isArray(B.content))return B.content}return console.warn("Product content is not a valid array:",B),[]}catch(w){return console.error("Failed to parse product content:",w,a.value),[]}return[]});function U(w){v.value=w,h.value=!0}return(w,B)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["message-content-renderer",r.value])},[c.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["renderer-actions",o.value])},[S.value?(s.openBlock(),s.createElementBlock("button",{key:0,type:"button",class:"renderer-action-btn",onClick:E},[s.createVNode(s.unref(su),{icon:"mdi:content-copy"}),B[2]||(B[2]=s.createElementVNode("span",null,"复制",-1))])):s.createCommentVNode("",!0),z.value?(s.openBlock(),s.createElementBlock("button",{key:1,type:"button",class:"renderer-action-btn",onClick:V},[s.createVNode(s.unref(su),{icon:"mdi:share-outline"}),B[3]||(B[3]=s.createElementVNode("span",null,"打开网页",-1))])):s.createCommentVNode("",!0),i.value?(s.openBlock(),s.createElementBlock("button",{key:2,type:"button",class:"renderer-action-btn",onClick:F},[s.createVNode(s.unref(su),{icon:"mdi:refresh"}),B[4]||(B[4]=s.createElementVNode("span",null,"重新生成",-1))])):s.createCommentVNode("",!0),s.createElementVNode("button",{type:"button",class:"renderer-action-btn danger",onClick:p},[s.createVNode(s.unref(su),{icon:"mdi:delete-outline"}),B[5]||(B[5]=s.createElementVNode("span",null,"删除",-1))])],2)):s.createCommentVNode("",!0),!l(a.value)&&a.value.type==="text"?(s.openBlock(),s.createBlock(Le,{key:1,html:x.value,role:u.role},null,8,["html","role"])):l(a.value)?(s.openBlock(),s.createElementBlock("div",hc,[a.value.texts&&a.value.texts.length>0?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(a.value.texts,(P,O)=>(s.openBlock(),s.createBlock(Le,{key:`text-${O}`,html:b(String(P??"")),role:u.role,plain:""},null,8,["html","role"]))),128)):s.createCommentVNode("",!0),a.value.files&&a.value.files.length>0?(s.openBlock(),s.createElementBlock("div",pc,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value.files,(P,O)=>(s.openBlock(),s.createElementBlock("div",{key:`file-${O}`},[s.unref(mu)(P)==="image"?(s.openBlock(),s.createBlock(Ou,{key:0,src:P,"full-width":!0,onClick:H=>m(P)},null,8,["src","onClick"])):s.unref(mu)(P)==="video"?(s.openBlock(),s.createBlock(ee,{key:1,src:P,"full-width":!0},null,8,["src"])):s.unref(mu)(P)==="audio"?(s.openBlock(),s.createBlock(te,{key:2,src:P},null,8,["src"])):(s.openBlock(),s.createBlock(ue,{key:3,name:_(P),url:P,onClick:H=>L(P)},null,8,["name","url","onClick"]))]))),128))])):s.createCommentVNode("",!0)])):!l(a.value)&&a.value.type==="file"?(s.openBlock(),s.createBlock(ue,{key:3,name:_(a.value.content),url:a.value.content,onClick:D},null,8,["name","url"])):!l(a.value)&&a.value.type==="image"?(s.openBlock(),s.createBlock(Ou,{key:4,src:a.value.content,onClick:C},null,8,["src"])):!l(a.value)&&a.value.type==="voice"?(s.openBlock(),s.createBlock(te,{key:5,src:a.value.content},null,8,["src"])):!l(a.value)&&a.value.type==="medialib"?(s.openBlock(),s.createElementBlock("div",bc,[W.value==="video"?(s.openBlock(),s.createBlock(ee,{key:0,src:j.value,"full-width":!0},null,8,["src"])):W.value==="image"?(s.openBlock(),s.createBlock(Ou,{key:1,src:j.value,onClick:C},null,8,["src"])):W.value==="audio"?(s.openBlock(),s.createBlock(te,{key:2,src:j.value},null,8,["src"])):W.value==="file"?(s.openBlock(),s.createBlock(ue,{key:3,name:$.value,url:j.value,"allow-share-medialib-html":u.allowShareMedialibHtml,onClick:V},null,8,["name","url","allow-share-medialib-html"])):(s.openBlock(),s.createBlock(s.unref($o),{key:4,data:I.value,deep:3,class:"json-viewer"},null,8,["data"]))])):!l(a.value)&&a.value.type==="welcome"?(s.openBlock(),s.createElementBlock("div",mc,[R.value?.welcome_message?(s.openBlock(),s.createBlock(Le,{key:0,html:y.value,role:u.role},null,8,["html","role"])):s.createCommentVNode("",!0),R.value?.media_attachment?(s.openBlock(),s.createElementBlock("div",xc,[g.value==="image"?(s.openBlock(),s.createBlock(Ou,{key:0,src:R.value.media_attachment,onClick:T},null,8,["src"])):g.value==="video"?(s.openBlock(),s.createBlock(ee,{key:1,src:R.value.media_attachment,"full-width":!0},null,8,["src"])):g.value==="audio"?(s.openBlock(),s.createBlock(te,{key:2,src:R.value.media_attachment},null,8,["src"])):(s.openBlock(),s.createBlock(ue,{key:3,name:_(R.value.media_attachment),url:R.value.media_attachment,onClick:B[0]||(B[0]=P=>L(R.value.media_attachment))},null,8,["name","url"]))])):s.createCommentVNode("",!0),R.value?.sample_questions&&R.value.sample_questions.length>0?(s.openBlock(),s.createBlock(tc,{key:2,questions:R.value.sample_questions,onClick:M},null,8,["questions"])):s.createCommentVNode("",!0)])):!l(a.value)&&a.value.type==="product"&&N.value.length>0?(s.openBlock(),s.createBlock(dc,{key:8,products:N.value,onImageClick:U},null,8,["products"])):s.createCommentVNode("",!0),s.createVNode(cn,{show:h.value,"image-url":v.value,onClose:B[1]||(B[1]=P=>h.value=!1)},null,8,["show","image-url"])],2))}}),[["__scopeId","data-v-8521a9ed"]]);function mu(u){if(!u)return"file";const e=u.toLowerCase();return e.match(/\.(mp4|webm|ogg|mov|avi|wmv|flv|mkv)$/)?"video":e.match(/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/)?"image":e.match(/\.(mp3|wav|ogg|aac|flac|m4a)$/)?"audio":"file"}iu.ImageViewer=cn,iu.MessageContentRenderer=gc,iu.getFileTypeFromUrl=mu,Object.defineProperty(iu,Symbol.toStringTag,{value:"Module"})}));
|