@_solaris/messenger-widget 0.3.9 → 0.3.10

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.
@@ -1,44 +1,44 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.wm-huav[data-v-07246775]{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;color:#fff;font-weight:700;line-height:1;border-radius:var(--wm-avr)}.wm-huav--tail[data-v-07246775]{border-radius:var(--wm-avr) var(--wm-avr) 4px var(--wm-avr)}.wm-huav img[data-v-07246775]{width:100%;height:100%;object-fit:cover;display:block}.wm-launcherWrap[data-v-525fd423]{display:flex;flex-direction:column;align-items:flex-end;gap:10px}.wm-peekStack[data-v-525fd423]{display:flex;flex-direction:column;align-items:stretch;width:286px;padding-top:2px;transition:padding-top .22s ease}.wm-peek[data-v-525fd423]{position:relative;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:16px 16px 8px;box-shadow:0 12px 30px #00000024;box-sizing:border-box;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 12px 10px 11px;min-height:56px;cursor:pointer;text-align:left;transition:transform .22s ease,margin-top .22s ease,margin-left .22s ease,margin-right .22s ease,box-shadow .22s ease,border-color .12s ease;transform-origin:top center}.wm-peek[data-v-525fd423]:hover{box-shadow:0 16px 36px #0000002e}.wm-peekStack--multi .wm-peek+.wm-peek[data-v-525fd423]{margin-top:-50px}.wm-peekStack--multi .wm-peek[data-v-525fd423]{margin-left:calc(var(--depth, 0) * 6px);margin-right:calc(var(--depth, 0) * 6px);transform:scale(calc(1 - var(--depth, 0) * .02))}.wm-peekStack--multi:hover .wm-peek+.wm-peek[data-v-525fd423],.wm-peekStack--multi:focus-within .wm-peek+.wm-peek[data-v-525fd423]{margin-top:10px}.wm-peekStack--multi:hover .wm-peek[data-v-525fd423],.wm-peekStack--multi:focus-within .wm-peek[data-v-525fd423]{margin-left:0;margin-right:0;transform:none}.wm-peek__close[data-v-525fd423]{position:absolute;top:6px;right:6px;width:18px;height:18px;border-radius:6px;border:none;background:var(--wm-g100);color:var(--wm-g500);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .12s ease,color .12s ease;z-index:2}.wm-peek__close[data-v-525fd423]:hover{background:var(--wm-g200);color:var(--wm-g900)}.wm-peek__avatar[data-v-525fd423]{position:relative;flex-shrink:0}.wm-peek__avatarBadge[data-v-525fd423]{position:absolute;right:-4px;bottom:-3px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wm-g900);color:#fff;border:2px solid var(--wm-w);font-family:var(--wm-f);font-size:9.5px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}.wm-peek__body[data-v-525fd423]{min-width:0;padding-right:14px}.wm-peek__head[data-v-525fd423]{font-family:var(--wm-f);font-size:12.5px;line-height:1.3;color:var(--wm-g700);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-peek__name[data-v-525fd423]{font-weight:600}.wm-peek__action[data-v-525fd423]{color:var(--wm-g400);font-weight:400}.wm-peek__text[data-v-525fd423]{margin:1px 0 0;font-family:var(--wm-f);font-size:12px;line-height:1.35;color:var(--wm-g500);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.wm-peek__open[data-v-525fd423]{flex-shrink:0;border:none;background:var(--wm-g900);color:#fff;font-family:var(--wm-f);font-size:12px;font-weight:600;padding:7px 13px;border-radius:999px;cursor:pointer;transition:background .12s ease,transform .12s ease}.wm-peek__open[data-v-525fd423]:hover{background:#000;transform:translateY(-1px)}.wm-peek-enter-active[data-v-525fd423]{animation:wm-peekIn-525fd423 .26s cubic-bezier(.34,1.56,.64,1) both}.wm-peek-leave-active[data-v-525fd423]{animation:wm-peekIn-525fd423 .16s ease reverse both}@keyframes wm-peekIn-525fd423{0%{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}.wm-launcher[data-v-525fd423]{position:relative;width:50px;height:50px;border-radius:50%;border:none;background:var(--wm-g900);color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 16px #00000038;transition:transform .14s ease,box-shadow .14s ease}.wm-launcher[data-v-525fd423]:hover{transform:translateY(-1px);box-shadow:0 8px 22px #00000047}.wm-launcher[data-v-525fd423]:active{transform:translateY(0)}.wm-launcher__badge[data-v-525fd423]{position:absolute;top:-3px;right:-3px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--wm-red, #B91C1C);color:#fff;border:2px solid var(--wm-w, #fff);font-family:var(--wm-f);font-size:10.5px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}.wm-aiav[data-v-8c924688]{position:relative;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}.wm-aiav__inner[data-v-8c924688]{width:100%;height:100%;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(91,95,239,.25);display:flex;align-items:center;justify-content:center;border-radius:var(--wm-avr)}.wm-aiav--tail .wm-aiav__inner[data-v-8c924688]{border-bottom-right-radius:4px}.wm-aiav__inner--glow[data-v-8c924688]{animation:wm-heroGlow 2.6s ease-in-out infinite}.wm-aiav__pulse[data-v-8c924688]{position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1.5px solid var(--wm-a);opacity:.5;pointer-events:none;border-radius:calc(var(--wm-avr) + 3px)}.wm-aiav--tail .wm-aiav__pulse[data-v-8c924688]{border-bottom-right-radius:7px}.wm-team[data-v-3659b9c1]{display:inline-flex;align-items:center;gap:6px}.wm-team__stack[data-v-3659b9c1]{display:inline-block;position:relative;height:20px}.wm-team__pill[data-v-3659b9c1]{position:absolute;top:0;width:20px;height:20px;border-radius:6px;border:2px solid var(--wm-w);display:inline-flex;align-items:center;justify-content:center;overflow:hidden;color:#fff;font-size:8px;font-weight:700;line-height:1}.wm-team__pill img[data-v-3659b9c1]{width:100%;height:100%;object-fit:cover;display:block}.wm-team__label[data-v-3659b9c1]{font-size:11px;color:var(--wm-g400);white-space:nowrap}.wm-header[data-v-d6406b84]{background:var(--wm-w);border-bottom:1px solid var(--wm-g100);padding:12px 13px;display:flex;align-items:center;gap:9px;flex-shrink:0}.wm-header__icon[data-v-d6406b84]{width:30px;height:30px;border-radius:8px;background:var(--wm-g100);border:none;display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);cursor:pointer;flex-shrink:0;transition:background .14s ease}.wm-header__icon[data-v-d6406b84]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-header__icon--active[data-v-d6406b84]{background:var(--wm-g200);color:var(--wm-g700)}.wm-header__avatar[data-v-d6406b84]{flex-shrink:0}.wm-header__fill[data-v-d6406b84]{flex:1}.wm-header__main[data-v-d6406b84]{flex:1;min-width:0}.wm-header__title[data-v-d6406b84]{font-size:13.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.wm-header__actions[data-v-d6406b84]{display:flex;gap:4px;flex-shrink:0}.wm-onb[data-v-c85f6958]{flex:1;overflow-y:auto;background:var(--wm-w);padding:20px 14px 14px;display:flex;flex-direction:column;gap:28px}.wm-onb__hero[data-v-c85f6958]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 8px 6px;gap:14px}.wm-onb__title[data-v-c85f6958]{font-size:17px;font-weight:700;color:var(--wm-g900);letter-spacing:-.03em;line-height:1.2}.wm-onb__sub[data-v-c85f6958]{font-size:12.5px;color:var(--wm-g400);line-height:1.6;white-space:pre-line}.wm-onb__section-title[data-v-c85f6958]{font-size:10px;font-weight:600;color:var(--wm-g300);letter-spacing:.08em;margin-bottom:10px;text-transform:uppercase;padding-left:2px}.wm-onb__grid[data-v-c85f6958]{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wm-onb__qlist[data-v-c85f6958]{display:flex;flex-direction:column;gap:8px}.wm-onb__card[data-v-c85f6958]{padding:14px 14px 16px;border-radius:14px;text-align:left;background:var(--wm-g50);border:1px solid var(--wm-g100);font-family:var(--wm-f);cursor:pointer;display:flex;flex-direction:column;align-items:flex-start;gap:4px;transition:background .14s ease,border-color .14s ease,transform .14s ease}.wm-onb__card[data-v-c85f6958]:hover{background:var(--wm-g100);border-color:var(--wm-g150)}.wm-onb__card[data-v-c85f6958]:active{transform:scale(.99)}.wm-onb__card--row[data-v-c85f6958]{flex-direction:row;align-items:center;gap:12px;padding:12px 14px}.wm-onb__card-icon[data-v-c85f6958]{width:32px;height:32px;border-radius:9px;background:var(--wm-w);border:1px solid var(--wm-g150);display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g700);margin-bottom:10px;flex-shrink:0}.wm-onb__card--row .wm-onb__card-icon[data-v-c85f6958]{margin-bottom:0}.wm-onb__card-body[data-v-c85f6958]{display:flex;flex-direction:column;gap:2px;min-width:0}.wm-onb__card-title[data-v-c85f6958]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;line-height:1.25}.wm-onb__card-sub[data-v-c85f6958]{font-size:11.5px;font-weight:400;color:var(--wm-g400);line-height:1.35}.wm-onb__search[data-v-c85f6958]{position:relative;margin-bottom:8px}.wm-onb__searchIcon[data-v-c85f6958]{position:absolute;top:50%;left:10px;transform:translateY(-50%);color:var(--wm-g400);display:inline-flex}.wm-onb__search input[data-v-c85f6958]{width:100%;background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:9px;padding:7px 11px 7px 30px;font-size:12px;color:var(--wm-g700);font-family:var(--wm-f);outline:none}.wm-onb__search input[data-v-c85f6958]:focus{border-color:var(--wm-g200);background:var(--wm-w)}.wm-onb__list[data-v-c85f6958]{display:flex;flex-direction:column;gap:2px}.wm-onb__thread[data-v-c85f6958]{padding:10px;border-radius:10px;text-align:left;background:transparent;border:none;font-family:var(--wm-f);cursor:pointer;display:flex;align-items:center;gap:12px;transition:background .14s ease,transform .14s ease}.wm-onb__thread[data-v-c85f6958]:hover{background:var(--wm-g50)}.wm-onb__thread[data-v-c85f6958]:active{transform:scale(.995)}.wm-onb__thread-icon[data-v-c85f6958]{position:relative;width:40px;height:40px;border-radius:11px;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(255,255,255,.04);display:inline-flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.wm-onb__thread-icon--inverted[data-v-c85f6958]{background:var(--wm-g100);border-color:var(--wm-g150);color:var(--wm-g900)}.wm-onb__thread-dot[data-v-c85f6958]{position:absolute;top:-3px;right:-3px;width:10px;height:10px;border-radius:50%;background:var(--wm-a);border:2px solid var(--wm-w);box-sizing:border-box}.wm-onb__thread-body[data-v-c85f6958]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.wm-onb__thread-title[data-v-c85f6958]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__thread-preview[data-v-c85f6958]{font-size:11.5px;font-weight:400;color:var(--wm-g400);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__thread-meta[data-v-c85f6958]{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;align-self:stretch;gap:8px;padding:2px 0;flex-shrink:0}.wm-onb__thread-time[data-v-c85f6958]{font-size:10.5px;font-weight:500;color:var(--wm-g400);white-space:nowrap}.wm-onb__thread-chev[data-v-c85f6958]{color:var(--wm-g300)}.wm-onb__empty[data-v-c85f6958]{padding:18px 10px;text-align:center;font-size:12px;color:var(--wm-g400)}.wm-onb__cta[data-v-c85f6958]{padding:0}.wm-onb__startBtn[data-v-c85f6958]{width:100%;padding:10px 12px 10px 16px;border-radius:10px;background:var(--wm-g900);color:#fff;border:none;font-size:12.5px;font-weight:600;letter-spacing:-.01em;cursor:pointer;font-family:var(--wm-f);display:flex;align-items:center;gap:9px;transition:background .14s ease}.wm-onb__startBtn[data-v-c85f6958]:hover{background:var(--wm-g700)}.wm-onb__startBtn[data-v-c85f6958]:disabled{background:var(--wm-g200);cursor:default}.wm-onb__startIcon[data-v-c85f6958]{width:22px;height:22px;border-radius:7px;background:#ffffff1f;display:inline-flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.wm-result[data-v-64a83fb8]{display:inline-flex;align-items:flex-start;gap:6px;padding:6px 10px 6px 8px;border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 14px);font-family:var(--wm-f);font-size:12px;font-weight:500;letter-spacing:-.005em;line-height:1.4;max-width:75%;min-width:0}.wm-result__icon[data-v-64a83fb8]{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:1.4em}.wm-result__body[data-v-64a83fb8]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;min-width:0;flex-shrink:1}.wm-result__label[data-v-64a83fb8]{font-weight:600}.wm-result__sep[data-v-64a83fb8]{opacity:.55}.wm-result__detail[data-v-64a83fb8]{font-weight:400;opacity:.85}.wm-result--success[data-v-64a83fb8]{background:#e3f4e7;color:#1f6e3a}.wm-result--rejected[data-v-64a83fb8]{background:var(--wm-g100);color:var(--wm-g500)}.wm-result--failure[data-v-64a83fb8]{background:var(--wm-redBg);color:var(--wm-red)}.wm-result--awaiting[data-v-64a83fb8]{background:#e0eafe;color:#2563eb}.wm-art[data-v-ca24a9c9]{width:100%;max-width:75%;min-width:0;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px);overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .2s ease both;display:flex;flex-direction:column}.wm-art__head[data-v-ca24a9c9]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px 10px;border-bottom:1px solid var(--wm-g100)}.wm-art__headMain[data-v-ca24a9c9]{min-width:0;flex:1}.wm-art__title[data-v-ca24a9c9]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-art__subtitle[data-v-ca24a9c9]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-ca24a9c9]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-ca24a9c9]{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:10px;font-weight:600;border-radius:999px;padding:2px 8px 2px 6px;letter-spacing:.02em}.wm-art__badge--neutral[data-v-ca24a9c9]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-ca24a9c9]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-ca24a9c9]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-ca24a9c9]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-ca24a9c9]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-ca24a9c9]{font-size:12.5px;color:var(--wm-g700);line-height:1.45;white-space:pre-wrap;word-break:break-word}.wm-art__field[data-v-ca24a9c9]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-ca24a9c9]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-ca24a9c9]{font-size:12.5px;color:var(--wm-g900);background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:8px;padding:7px 9px;line-height:1.35;word-break:break-word;min-height:32px;display:flex;align-items:center}.wm-art__fieldValue--multi[data-v-ca24a9c9]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-ca24a9c9]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-ca24a9c9]{margin:0;padding:0}.wm-art__image img[data-v-ca24a9c9]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-ca24a9c9]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art--formResponse[data-v-ca24a9c9]{border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 4px) var(--wm-r-bl, 14px)}.wm-art[data-v-d7369333]{width:100%;max-width:75%;min-width:0;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px);overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .2s ease both;display:flex;flex-direction:column}.wm-art__head[data-v-d7369333]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px 10px;border-bottom:1px solid var(--wm-g100)}.wm-art__headMain[data-v-d7369333]{min-width:0;flex:1}.wm-art__title[data-v-d7369333]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-art__subtitle[data-v-d7369333]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-d7369333]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-d7369333]{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:10px;font-weight:600;border-radius:999px;padding:2px 8px 2px 6px;letter-spacing:.02em}.wm-art__badge--neutral[data-v-d7369333]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-d7369333]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-d7369333]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-d7369333]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-d7369333]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-d7369333]{font-size:12.5px;color:var(--wm-g700);line-height:1.45;white-space:pre-wrap;word-break:break-word}.wm-art__field[data-v-d7369333]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-d7369333]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-d7369333]{font-size:12.5px;color:var(--wm-g900);background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:8px;padding:7px 9px;line-height:1.35;word-break:break-word;min-height:32px;display:flex;align-items:center}.wm-art__fieldValue--multi[data-v-d7369333]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-d7369333]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-d7369333]{margin:0;padding:0}.wm-art__image img[data-v-d7369333]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-d7369333]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art[data-v-8b274eb7]{width:100%;max-width:75%;min-width:0;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px);overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .2s ease both;display:flex;flex-direction:column}.wm-art__head[data-v-8b274eb7]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px 10px;border-bottom:1px solid var(--wm-g100)}.wm-art__headMain[data-v-8b274eb7]{min-width:0;flex:1}.wm-art__title[data-v-8b274eb7]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-art__subtitle[data-v-8b274eb7]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-8b274eb7]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-8b274eb7]{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:10px;font-weight:600;border-radius:999px;padding:2px 8px 2px 6px;letter-spacing:.02em}.wm-art__badge--neutral[data-v-8b274eb7]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-8b274eb7]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-8b274eb7]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-8b274eb7]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-8b274eb7]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-8b274eb7]{font-size:12.5px;color:var(--wm-g700);line-height:1.45;white-space:pre-wrap;word-break:break-word}.wm-art__field[data-v-8b274eb7]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-8b274eb7]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-8b274eb7]{font-size:12.5px;color:var(--wm-g900);background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:8px;padding:7px 9px;line-height:1.35;word-break:break-word;min-height:32px;display:flex;align-items:center}.wm-art__fieldValue--multi[data-v-8b274eb7]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-8b274eb7]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-8b274eb7]{margin:0;padding:0}.wm-art__image img[data-v-8b274eb7]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-8b274eb7]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art--ticket[data-v-8b274eb7]{min-width:240px}.wm-tk__head[data-v-8b274eb7]{display:block}.wm-tk__title[data-v-8b274eb7]{white-space:normal;text-overflow:clip;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35}.wm-tk__sub[data-v-8b274eb7]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px}.wm-tk__ref[data-v-8b274eb7]{display:inline-flex;align-items:center;gap:4px;min-width:0;font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm)}.wm-tk__ref svg[data-v-8b274eb7]{flex-shrink:0;opacity:.7}.wm-tk__badge[data-v-8b274eb7]{padding:3px 9px 3px 7px}.wm-tk__dot[data-v-8b274eb7]{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.wm-tk__text[data-v-8b274eb7]{font-size:12px;color:var(--wm-g500);line-height:1.55;white-space:pre-wrap;word-break:break-word;margin-top:9px}.wm-art--ticket .wm-art__body[data-v-8b274eb7]{background:#f8f8f6}.wm-art--ticket .wm-art__fieldValue[data-v-8b274eb7]{background:var(--wm-w)}.wm-tk__prio[data-v-8b274eb7]{flex-shrink:0;margin-right:6px}.wm-tk__prio rect[data-v-8b274eb7]{fill:var(--wm-g200)}.wm-tk__prio[data-level="1"] rect[data-v-8b274eb7]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-8b274eb7]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-8b274eb7]:nth-of-type(2),.wm-tk__prio[data-level="3"] rect[data-v-8b274eb7]{fill:var(--wm-g700)}.wm-tk__date[data-v-8b274eb7]{flex-shrink:0;margin-right:6px;color:var(--wm-g500);opacity:.8}.wm-tk__footer[data-v-8b274eb7]{display:flex;align-items:center;gap:5px;font-size:10.5px;color:var(--wm-g400);padding:7px 13px 9px;border-top:1px solid var(--wm-g100);font-family:var(--wm-fm);background:var(--wm-g50)}.wm-tk__footer svg[data-v-8b274eb7]{flex-shrink:0;opacity:.7}.wm-att[data-v-1cd1267b]{display:block;max-width:268px}.wm-att__imgWrap[data-v-1cd1267b]{display:block;border-radius:12px;overflow:hidden;border:1px solid var(--wm-g150);background:var(--wm-g50);line-height:0}.wm-att__imgWrap img[data-v-1cd1267b]{display:block;width:100%;max-height:220px;object-fit:cover}.wm-att--audio audio[data-v-1cd1267b],.wm-att--video video[data-v-1cd1267b]{width:100%;max-width:268px;border-radius:12px;background:var(--wm-g100)}.wm-att__file[data-v-1cd1267b]{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:12px;text-decoration:none;color:var(--wm-g900);transition:background .14s ease,border-color .14s ease;max-width:100%}.wm-att__file[data-v-1cd1267b]:hover{background:var(--wm-g100);border-color:var(--wm-g200)}.wm-att__icon[data-v-1cd1267b]{width:26px;height:26px;border-radius:7px;background:var(--wm-w);border:1px solid var(--wm-g150);display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);flex-shrink:0}.wm-att__main[data-v-1cd1267b]{display:flex;flex-direction:column;min-width:0}.wm-att__name[data-v-1cd1267b]{font-size:12px;font-weight:500;color:var(--wm-g900);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.wm-att__meta[data-v-1cd1267b]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-att__spin[data-v-1cd1267b]{width:12px;height:12px;border:2px solid var(--wm-g200);border-top-color:var(--wm-g500);border-radius:50%;animation:wm-spin-1cd1267b .8s linear infinite;flex-shrink:0}@keyframes wm-spin-1cd1267b{to{transform:rotate(360deg)}}.wm-bubble[data-v-5c9e9f2b]{max-width:100%;padding:9px 13px;font-size:13px;line-height:1.58;letter-spacing:-.008em;white-space:pre-wrap;word-break:break-word}.wm-bubble--user[data-v-5c9e9f2b]{background:var(--wm-g900);color:#fff}.wm-bubble--ai[data-v-5c9e9f2b],.wm-bubble--human[data-v-5c9e9f2b]{background:var(--wm-g100);color:var(--wm-g900)}.wm-bubble[data-v-5c9e9f2b] strong{font-weight:700}.wm-bubble[data-v-5c9e9f2b] em{font-style:italic}.wm-bubble[data-v-5c9e9f2b] u{text-decoration:underline;text-underline-offset:2px}.wm-bubble[data-v-5c9e9f2b] s{text-decoration:line-through;opacity:.75}.wm-bubble[data-v-5c9e9f2b] a{color:inherit;text-decoration:underline;text-underline-offset:2px}.wm-bubble[data-v-5c9e9f2b] a:hover{opacity:.8}.wm-bubble[data-v-5c9e9f2b] .wm-md-ul,.wm-bubble[data-v-5c9e9f2b] .wm-md-ol{margin:2px 0;padding-left:20px}.wm-bubble[data-v-5c9e9f2b] .wm-md-ul{list-style:disc}.wm-bubble[data-v-5c9e9f2b] .wm-md-ol{list-style:decimal}.wm-bubble[data-v-5c9e9f2b] li{margin:0;padding:0}.wm-bubble[data-v-5c9e9f2b] .wm-md-code{font-family:var(--wm-fm);font-size:12px;background:#0000000f;padding:1px 5px;border-radius:4px}.wm-bubble--user[data-v-5c9e9f2b] .wm-md-code{background:#ffffff2e}.wm-bubble[data-v-5c9e9f2b] .wm-md-pre{margin:4px 0;padding:8px 10px;background:#0000000f;border-radius:8px;overflow-x:auto;white-space:pre;font-family:var(--wm-fm);font-size:12px;line-height:1.45}.wm-bubble--user[data-v-5c9e9f2b] .wm-md-pre{background:#ffffff2e}.wm-bubble[data-v-5c9e9f2b] .wm-md-pre code{font-family:inherit;font-size:inherit;background:none;padding:0}.wm-bubble[data-v-5c9e9f2b] .wm-md-h{margin:4px 0 2px;font-weight:700;letter-spacing:-.01em;line-height:1.3}.wm-bubble[data-v-5c9e9f2b] .wm-md-h1{font-size:15px}.wm-bubble[data-v-5c9e9f2b] .wm-md-h2{font-size:14px}.wm-bubble[data-v-5c9e9f2b] .wm-md-h3,.wm-bubble[data-v-5c9e9f2b] .wm-md-h4,.wm-bubble[data-v-5c9e9f2b] .wm-md-h5,.wm-bubble[data-v-5c9e9f2b] .wm-md-h6{font-size:13px}.wm-bubble[data-v-5c9e9f2b]{border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px)}.wm-bubble--user[data-v-5c9e9f2b]{border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 4px) var(--wm-r-bl, 14px)}.wm-typing[data-v-df2447fd]{padding:11px 16px;background:var(--wm-g100);border-radius:4px 14px 14px;display:inline-flex;gap:5px;align-items:center}.wm-typing span[data-v-df2447fd]{width:5px;height:5px;border-radius:50%;background:var(--wm-g400);display:inline-block;animation:wm-typingDot 1.4s ease-in-out infinite}.wm-list[data-v-21381fcb]{flex:1;min-height:0;overflow-y:auto;padding:16px 14px calc(8px + var(--wm-float-h, 0px));display:flex;flex-direction:column;gap:12px;scrollbar-width:thin;scroll-padding-bottom:var(--wm-float-h, 0px);overflow-anchor:none}.wm-list[data-v-21381fcb]::-webkit-scrollbar{width:3px}.wm-list[data-v-21381fcb]::-webkit-scrollbar-thumb{background:var(--wm-g200);border-radius:10px}.wm-list__sep[data-v-21381fcb]{display:flex;align-items:center;gap:8px;margin:-4px 0 4px}.wm-list__line[data-v-21381fcb]{flex:1;height:1px;background:var(--wm-g100)}.wm-list__line--strong[data-v-21381fcb]{background:var(--wm-g150)}.wm-list__line--unread[data-v-21381fcb]{background:var(--wm-a);opacity:.55}.wm-list__sep-label[data-v-21381fcb]{font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);letter-spacing:.06em;white-space:nowrap}.wm-list__sep--unread[data-v-21381fcb]{margin:4px 0}.wm-list__sep-label--unread[data-v-21381fcb]{color:var(--wm-a);font-weight:600}.wm-list__sysep-label[data-v-21381fcb]{font-size:10px;color:var(--wm-g400);font-family:var(--wm-fm);letter-spacing:.06em;text-align:center;line-height:1.45;white-space:normal;overflow-wrap:anywhere;max-width:220px}.wm-list__sysep[data-v-21381fcb]{display:flex;align-items:center;justify-content:center;gap:8px;margin:4px 0}.wm-list__group[data-v-21381fcb]{display:flex;flex-direction:column;gap:3px}.wm-list__row[data-v-21381fcb]{display:flex;align-items:flex-end;gap:5px}.wm-list__row--user[data-v-21381fcb]{justify-content:flex-end}.wm-list__row.is-pending[data-v-21381fcb]{opacity:.55}.wm-list__row.is-failed[data-v-21381fcb] .wm-bubble{background:var(--wm-redBg)!important;color:var(--wm-red)!important}.wm-list__avatarSlot[data-v-21381fcb]{width:26px;flex-shrink:0;align-self:flex-end}.wm-list__body[data-v-21381fcb]{display:flex;flex-direction:column;gap:4px;max-width:75%}.wm-list__atts[data-v-21381fcb]{display:flex;flex-direction:column;gap:4px}.wm-list__atts--align-end[data-v-21381fcb]{align-items:flex-end}.wm-list__meta[data-v-21381fcb]{display:flex;align-items:baseline;gap:5px;font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);margin-left:31px;margin-top:0}.wm-list__meta--right[data-v-21381fcb]{margin-left:0;justify-content:flex-end}.fade-up[data-v-21381fcb]{animation:wm-fadeUp .2s ease both}.wm-list--silent .fade-up[data-v-21381fcb]{animation:none}.wm-list__loadMore[data-v-21381fcb]{display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 0 10px;font-size:11px;color:var(--wm-g400);font-family:var(--wm-fm);animation:wm-fadeIn-21381fcb .18s ease both}.wm-list__loadMore-spinner[data-v-21381fcb]{width:12px;height:12px;border-radius:50%;border:1.5px solid var(--wm-g200);border-top-color:var(--wm-g400);animation:wm-spin-21381fcb .8s linear infinite}.wm-list__historyEnd[data-v-21381fcb]{text-align:center;padding:4px 0 8px;font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);letter-spacing:.04em}@keyframes wm-spin-21381fcb{to{transform:rotate(360deg)}}@keyframes wm-fadeIn-21381fcb{0%{opacity:0}to{opacity:1}}.wm-compose-wrap[data-v-14fa9ec0]{position:relative}.wm-rec[data-v-14fa9ec0]{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--wm-redBg);border-top:1px solid #f1c8c8;color:var(--wm-red);font-size:12px;font-weight:500}.wm-rec__dot[data-v-14fa9ec0]{width:8px;height:8px;border-radius:50%;background:var(--wm-red);box-shadow:0 0 #b91c1c73;animation:wm-recPulse-14fa9ec0 1.6s ease-out infinite;flex-shrink:0}.wm-rec__lbl[data-v-14fa9ec0]{flex:1;font-family:var(--wm-fm)}.wm-rec__stop[data-v-14fa9ec0]{border:1px solid var(--wm-red);background:transparent;color:var(--wm-red);border-radius:8px;padding:4px 10px;font-size:11.5px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:background .14s ease,color .14s ease}.wm-rec__stop[data-v-14fa9ec0]:hover{background:var(--wm-red);color:#fff}@keyframes wm-recPulse-14fa9ec0{0%{box-shadow:0 0 #b91c1c8c}to{box-shadow:0 0 0 8px #b91c1c00}}.wm-compose[data-v-14fa9ec0]{border-top:1px solid var(--wm-g100);background:var(--wm-w);padding:10px 11px;display:flex;flex-direction:row;align-items:stretch;gap:6px;flex-shrink:0;position:relative}.wm-compose__input[data-v-14fa9ec0]{flex:1;background:var(--wm-g50);border-radius:12px;padding:10px 14px;font-size:13.5px;line-height:1.4;color:var(--wm-g900);border:1px solid transparent;outline:none;font-family:var(--wm-f);caret-color:var(--wm-a);min-width:0;box-sizing:border-box;resize:none;min-height:78px;max-height:150px;overflow-y:auto;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease}.wm-compose__input[data-v-14fa9ec0]::placeholder{color:var(--wm-g300)}.wm-compose__input[data-v-14fa9ec0]:focus{background:var(--wm-w);border-color:var(--wm-g150);box-shadow:0 0 0 3px #00000008}.wm-compose__actions[data-v-14fa9ec0]{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px;flex-shrink:0}.wm-compose__icon[data-v-14fa9ec0],.wm-compose__send[data-v-14fa9ec0]{width:28px;height:28px;border-radius:8px;border:none;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:background .14s ease,transform .14s ease}.wm-compose__icon[data-v-14fa9ec0]{background:var(--wm-g100);color:var(--wm-g500)}.wm-compose__icon[data-v-14fa9ec0]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-compose__icon.is-open[data-v-14fa9ec0]{background:var(--wm-g900);color:#fff;transform:rotate(45deg)}.wm-compose__icon[data-v-14fa9ec0]:disabled{opacity:.5;cursor:default}.wm-compose__send[data-v-14fa9ec0]{background:var(--wm-g900);color:#fff}.wm-compose__send[data-v-14fa9ec0]:hover{background:var(--wm-g700)}.wm-compose__send[data-v-14fa9ec0]:active{transform:scale(.94)}.wm-compose__send.is-empty[data-v-14fa9ec0],.wm-compose__send[data-v-14fa9ec0]:disabled{background:var(--wm-g150);color:var(--wm-g300);cursor:default}.wm-compose__overlay[data-v-14fa9ec0]{position:fixed;top:0;right:0;bottom:0;left:0;background:transparent;z-index:9}.wm-compose__menu[data-v-14fa9ec0]{position:absolute;bottom:calc(100% + 6px);right:11px;min-width:200px;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:12px;box-shadow:0 10px 32px #00000021,0 2px 6px #0000000d;padding:5px;display:flex;flex-direction:column;gap:1px;z-index:10;animation:wm-fadeUp .18s ease both}.wm-compose__menuItem[data-v-14fa9ec0]{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;border:none;background:transparent;text-align:left;color:var(--wm-g700);font-size:12.5px;font-family:var(--wm-f);cursor:pointer;transition:background .14s ease}.wm-compose__menuItem[data-v-14fa9ec0]:hover:not(:disabled){background:var(--wm-g50);color:var(--wm-g900)}.wm-compose__menuItem[data-v-14fa9ec0]:disabled{opacity:.5;cursor:default}.wm-compose__menuIcon[data-v-14fa9ec0]{width:24px;height:24px;border-radius:7px;background:var(--wm-g100);color:var(--wm-g500);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-chips[data-v-55aa529d]{display:flex;flex-direction:column;align-items:flex-end;gap:5px;padding-bottom:4px;pointer-events:none}.wm-chip[data-v-55aa529d]{pointer-events:auto;padding:7px 14px;border-radius:20px;background:var(--wm-w);border:1px solid var(--wm-g200);font-size:12px;font-weight:500;color:var(--wm-g700);font-family:var(--wm-f);cursor:pointer;line-height:1;box-shadow:0 2px 10px #00000012;white-space:nowrap;transform-origin:bottom right;animation:wm-chipIn-55aa529d .28s cubic-bezier(.22,1,.36,1) both;transition:background .14s ease,transform .1s ease}.wm-chip[data-v-55aa529d]:hover{background:var(--wm-g50)}.wm-chip[data-v-55aa529d]:active{transform:scale(.97)}@keyframes wm-chipIn-55aa529d{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.wm-approval[data-v-b1be139c]{background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 6px 28px #0000001c;overflow:hidden;animation:wm-fadeUp .2s ease both}.wm-approval__head[data-v-b1be139c]{display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--wm-g100)}.wm-approval__icon[data-v-b1be139c]{flex-shrink:0}.wm-approval__main[data-v-b1be139c]{flex:1;min-width:0}.wm-approval__title[data-v-b1be139c]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em}.wm-approval__detail[data-v-b1be139c]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-approval__actions[data-v-b1be139c]{display:flex;gap:7px;padding:9px 14px 11px}.wm-approval__btn[data-v-b1be139c]{flex:1;padding:8px 8px 8px 13px;border-radius:9px;border:none;font-size:12px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:filter .14s ease}.wm-approval__btn[data-v-b1be139c]:hover{filter:brightness(.95)}.wm-approval__btn--neutral[data-v-b1be139c]{background:var(--wm-g100);color:var(--wm-g500)}.wm-approval__btn--primary[data-v-b1be139c]{background:var(--wm-g900);color:#fff}.wm-form[data-v-64b40f76]{background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 6px 28px #0000001c;overflow:hidden;animation:wm-fadeUp .2s ease both}.wm-form__head[data-v-64b40f76]{display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--wm-g100)}.wm-form__icon[data-v-64b40f76]{flex-shrink:0}.wm-form__main[data-v-64b40f76]{flex:1;min-width:0}.wm-form__title[data-v-64b40f76]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em}.wm-form__detail[data-v-64b40f76]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-form__body[data-v-64b40f76]{display:flex;flex-direction:column;gap:10px;padding:11px 14px 12px;max-height:320px;overflow-y:auto;scrollbar-width:thin}.wm-form__body[data-v-64b40f76]::-webkit-scrollbar{width:3px}.wm-form__body[data-v-64b40f76]::-webkit-scrollbar-thumb{background:var(--wm-g200);border-radius:10px}.wm-form__field[data-v-64b40f76]{display:flex;flex-direction:column;gap:4px}.wm-form__label[data-v-64b40f76]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-form__req[data-v-64b40f76]{color:var(--wm-red);margin-left:2px}.wm-form__input[data-v-64b40f76],.wm-form__textarea[data-v-64b40f76],.wm-form__select[data-v-64b40f76]{font-family:var(--wm-f);font-size:12.5px;color:var(--wm-g900);background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:8px;padding:7px 9px;outline:none;transition:border-color .12s ease,box-shadow .12s ease}.wm-form__input[data-v-64b40f76]:focus,.wm-form__textarea[data-v-64b40f76]:focus,.wm-form__select[data-v-64b40f76]:focus{border-color:var(--wm-g500);box-shadow:0 0 0 3px #0000000a}.wm-form__input[data-v-64b40f76]:disabled,.wm-form__textarea[data-v-64b40f76]:disabled,.wm-form__select[data-v-64b40f76]:disabled{background:var(--wm-g50);color:var(--wm-g400)}.wm-form__textarea[data-v-64b40f76]{resize:vertical;min-height:56px}.wm-form__bool[data-v-64b40f76]{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--wm-g700)}.wm-form__multi[data-v-64b40f76]{display:flex;flex-direction:column;gap:5px}.wm-form__multiItem[data-v-64b40f76]{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--wm-g700)}.wm-form__err[data-v-64b40f76]{font-size:11px;color:var(--wm-red);padding:4px 8px;background:var(--wm-redBg);border-radius:6px}.wm-form__submit[data-v-64b40f76]{margin-top:2px;padding:9px;border-radius:9px;border:none;background:var(--wm-g900);color:#fff;font-size:12px;font-weight:600;cursor:pointer;font-family:var(--wm-f);display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:filter .14s ease}.wm-form__submit[data-v-64b40f76]:hover:not(:disabled){filter:brightness(.95)}.wm-form__submit[data-v-64b40f76]:disabled{opacity:.7;cursor:not-allowed}.wm-form__doneLbl[data-v-64b40f76]{margin-top:2px;padding:9px;border-radius:9px;background:var(--wm-g100);color:var(--wm-g500);font-size:12px;text-align:center}.wm-form__spinner[data-v-64b40f76]{width:12px;height:12px;border-radius:50%;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;animation:wm-spin .7s linear infinite}.wm-fb[data-v-6f45ff3b]{margin:4px 0 0;padding:16px;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:var(--wm-sh1)}.wm-fb__title[data-v-6f45ff3b]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em;margin-bottom:4px}.wm-fb__sub[data-v-6f45ff3b]{font-size:11.5px;color:var(--wm-g400);margin-bottom:14px}.wm-fb__row[data-v-6f45ff3b]{display:flex;gap:0;margin-bottom:14px}.wm-fb__opt[data-v-6f45ff3b]{display:flex;flex-direction:column;align-items:center;gap:4px;background:transparent;border:none;border-radius:10px;padding:7px 0;cursor:pointer;flex:1;min-width:0;transition:background .15s ease}.wm-fb__opt.is-selected[data-v-6f45ff3b]{background:var(--wm-g100)}.wm-fb__emoji[data-v-6f45ff3b]{font-size:22px;line-height:1}.wm-fb__label[data-v-6f45ff3b]{font-size:9.5px;color:var(--wm-g400);font-weight:400}.wm-fb__opt.is-selected .wm-fb__label[data-v-6f45ff3b]{color:var(--wm-g700);font-weight:600}.wm-fb__send[data-v-6f45ff3b]{width:100%;padding:9px;border-radius:10px;background:var(--wm-g900);color:#fff;border:none;font-size:12.5px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:background .2s ease}.wm-fb__send[data-v-6f45ff3b]:disabled{background:var(--wm-g200);color:var(--wm-g400);cursor:default}.wm-fb__done[data-v-6f45ff3b]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 0}.wm-fb__check[data-v-6f45ff3b]{width:40px;height:40px;border-radius:12px;background:var(--wm-g900);display:inline-flex;align-items:center;justify-content:center}.wm-fb__doneTitle[data-v-6f45ff3b]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em}.wm-fb__doneSub[data-v-6f45ff3b]{font-size:11.5px;color:var(--wm-g400);text-align:center;line-height:1.5}.wm-mm[data-v-3a73911b]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:25}.wm-mm__scrim[data-v-3a73911b]{position:absolute;top:0;right:0;bottom:0;left:0}.wm-mm__pop[data-v-3a73911b]{position:absolute;top:56px;right:10px;width:248px;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 14px 40px #00000029,0 2px 8px #0000000f;overflow:hidden;animation:wm-fadeUp .18s ease both;font-family:var(--wm-f)}.wm-mm__section[data-v-3a73911b]{padding:6px 4px}.wm-mm__sep[data-v-3a73911b]{height:1px;background:var(--wm-g100)}.wm-mm__item[data-v-3a73911b]{width:100%;padding:9px 12px;display:flex;align-items:center;gap:10px;background:transparent;border:none;cursor:pointer;font-family:var(--wm-f);text-align:left;color:var(--wm-g700);transition:background .14s ease;border-radius:8px}.wm-mm__item[data-v-3a73911b]:hover{background:var(--wm-g50)}.wm-mm__icon[data-v-3a73911b]{width:24px;height:24px;border-radius:7px;background:var(--wm-g100);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--wm-g500)}.wm-mm__label[data-v-3a73911b]{flex:1;font-size:12.5px;font-weight:500;letter-spacing:-.01em}.wm-mm__hint[data-v-3a73911b]{font-size:10.5px;color:var(--wm-g300);font-family:var(--wm-fm)}.wm-mm__item--danger[data-v-3a73911b]{color:#b91c1c}.wm-mm__item--danger .wm-mm__icon[data-v-3a73911b]{background:#b91c1c14;color:#b91c1c}.wm-mm__toggle[data-v-3a73911b]{width:28px;height:16px;border-radius:999px;background:var(--wm-g200);position:relative;flex-shrink:0;transition:background .14s ease;display:inline-block}.wm-mm__toggle--on[data-v-3a73911b]{background:var(--wm-g900)}.wm-mm__knob[data-v-3a73911b]{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:left .14s ease;box-shadow:0 1px 3px #0000002e}.wm-mm__toggle--on .wm-mm__knob[data-v-3a73911b]{left:14px}.wm-dialog[data-v-4f4b37c9]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:12px;box-sizing:border-box}.wm-dialog__scrim[data-v-4f4b37c9]{position:absolute;top:0;right:0;bottom:0;left:0;background:#0f0e146b;animation:wm-fadeUp .16s ease both}.wm-dialog__card[data-v-4f4b37c9]{position:relative;width:min(320px,100%);background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 14px 40px #0000002e,0 2px 8px #0000000f;overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .18s ease both}.wm-dialog__head[data-v-4f4b37c9]{padding:14px 14px 4px;display:flex;align-items:flex-start;gap:8px}.wm-dialog__title[data-v-4f4b37c9]{flex:1;font-size:13.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em}.wm-dialog__close[data-v-4f4b37c9]{width:24px;height:24px;border-radius:7px;background:var(--wm-g100);border:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);flex-shrink:0;transition:background .14s ease}.wm-dialog__close[data-v-4f4b37c9]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-dialog__body[data-v-4f4b37c9]{padding:8px 14px 6px}.wm-dialog__input[data-v-4f4b37c9]{width:100%;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:9px;padding:9px 11px;font-size:12.5px;color:var(--wm-g900);font-family:var(--wm-f);outline:none;box-sizing:border-box;transition:background .14s ease,border-color .14s ease}.wm-dialog__input[data-v-4f4b37c9]:focus{border-color:var(--wm-g300);background:var(--wm-w)}.wm-dialog__actions[data-v-4f4b37c9]{display:flex;gap:6px;padding:8px 12px 12px;justify-content:flex-end}.wm-dialog__btn[data-v-4f4b37c9]{padding:8px 12px;border-radius:9px;border:1px solid var(--wm-g150);background:var(--wm-w);color:var(--wm-g700);cursor:pointer;font-family:var(--wm-f);font-size:12px;font-weight:500;transition:background .14s ease}.wm-dialog__btn[data-v-4f4b37c9]:hover{background:var(--wm-g50)}.wm-dialog__btn--primary[data-v-4f4b37c9]{background:var(--wm-g900);color:#fff;border-color:var(--wm-g900)}.wm-dialog__btn--primary[data-v-4f4b37c9]:hover{background:var(--wm-g700)}.wm-dialog__btn--primary[data-v-4f4b37c9]:disabled{background:var(--wm-g200);color:var(--wm-g500);cursor:default;border-color:var(--wm-g200)}.wm-root[data-v-757cb387]{font-family:var(--wm-f, ui-sans-serif, system-ui, sans-serif);color:var(--wm-g900, #17161A);line-height:1.45}.wm-root--floating[data-v-757cb387],.wm-root--sheet[data-v-757cb387]{position:fixed;right:20px;bottom:20px;z-index:2147483647}.wm-root--embedded[data-v-757cb387]{position:relative;width:100%;height:100%;display:flex}.wm-panel[data-v-757cb387]{background:var(--wm-w);display:flex;flex-direction:column;overflow:hidden}.wm-panel--floating[data-v-757cb387]{position:absolute;right:0;bottom:0;width:420px;max-width:calc(100vw - 32px);height:680px;max-height:calc(100vh - 80px);border-radius:16px;box-shadow:var(--wm-shPanel);animation:wm-widgetPop .25s cubic-bezier(.34,1.56,.64,1) both}.wm-panel--sheet[data-v-757cb387]{position:fixed;top:12px;right:12px;bottom:12px;width:440px;max-width:calc(100vw - 24px);border-radius:18px;box-shadow:var(--wm-shPanel);animation:wm-sheetSlide .32s cubic-bezier(.22,1,.36,1) both}.wm-panel--embedded[data-v-757cb387]{position:relative;width:100%;height:100%;border-radius:0;box-shadow:none}.wm-state[data-v-757cb387]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 24px;gap:14px;text-align:center}.wm-loading[data-v-757cb387]{flex:1;display:flex;align-items:center;justify-content:center;background:var(--wm-w, #fff);position:relative}.wm-loading__close[data-v-757cb387]{position:absolute;top:12px;right:12px;width:30px;height:30px;border-radius:50%;border:none;background:transparent;color:var(--wm-g500, #5A5753);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.wm-loading__close[data-v-757cb387]:hover{background:var(--wm-g100, #F2F1EE);color:var(--wm-g900, #17161A)}.wm-loading__spinner[data-v-757cb387]{width:22px;height:22px;border-radius:50%;border:2px solid var(--wm-g150, #E8E6E2);border-top-color:var(--wm-g500, #5A5753);animation:wm-spin-757cb387 .7s linear infinite}@keyframes wm-spin-757cb387{to{transform:rotate(360deg)}}.wm-state__err[data-v-757cb387]{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--wm-redBg);border:1px solid #f8d7d7;border-radius:12px;max-width:320px;text-align:left}.wm-state__errIcon[data-v-757cb387]{width:28px;height:28px;border-radius:8px;background:var(--wm-red);color:#fff;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-state__errTitle[data-v-757cb387]{font-size:13px;font-weight:600;color:var(--wm-red)}.wm-state__errSub[data-v-757cb387]{font-size:11px;color:var(--wm-g500);margin-top:2px}.wm-bottom[data-v-757cb387]{position:relative;flex-shrink:0}.wm-float[data-v-757cb387]{position:absolute;left:0;right:0;bottom:100%;padding:0 12px 8px;pointer-events:none;z-index:5}.wm-float>.wm-approval[data-v-757cb387],.wm-float>.wm-fb[data-v-757cb387],.wm-float>.wm-form[data-v-757cb387]{pointer-events:auto}.wm-actionWait[data-v-757cb387]{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;min-height:98px;background:var(--wm-g50);border-top:1px solid var(--wm-g100);color:var(--wm-g500);font-size:12.5px;font-family:var(--wm-f);flex-shrink:0}.wm-actionWait__spinner[data-v-757cb387]{width:14px;height:14px;border-radius:50%;border:2px solid var(--wm-g200);border-top-color:var(--wm-g500);animation:wm-spin-757cb387 .7s linear infinite;flex-shrink:0}.wm-actionWait__lbl[data-v-757cb387]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-attached[data-v-757cb387]{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 8px;background:var(--wm-w);border-top:1px solid var(--wm-g100)}.wm-attached__chip[data-v-757cb387]{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:var(--wm-g100);border:1px solid var(--wm-g150);font-size:11px;color:var(--wm-g700)}.wm-attached__chip button[data-v-757cb387]{border:none;background:transparent;color:var(--wm-g400);cursor:pointer;padding:0;display:inline-flex}.wm-attached__chip button[data-v-757cb387]:hover{color:var(--wm-g900)}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- var Messenger=function(Ht){"use strict";/**
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.wm-huav[data-v-07246775]{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;color:#fff;font-weight:700;line-height:1;border-radius:var(--wm-avr)}.wm-huav--tail[data-v-07246775]{border-radius:var(--wm-avr) var(--wm-avr) 4px var(--wm-avr)}.wm-huav img[data-v-07246775]{width:100%;height:100%;object-fit:cover;display:block}.wm-launcherWrap[data-v-525fd423]{display:flex;flex-direction:column;align-items:flex-end;gap:10px}.wm-peekStack[data-v-525fd423]{display:flex;flex-direction:column;align-items:stretch;width:286px;padding-top:2px;transition:padding-top .22s ease}.wm-peek[data-v-525fd423]{position:relative;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:16px 16px 8px;box-shadow:0 12px 30px #00000024;box-sizing:border-box;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 12px 10px 11px;min-height:56px;cursor:pointer;text-align:left;transition:transform .22s ease,margin-top .22s ease,margin-left .22s ease,margin-right .22s ease,box-shadow .22s ease,border-color .12s ease;transform-origin:top center}.wm-peek[data-v-525fd423]:hover{box-shadow:0 16px 36px #0000002e}.wm-peekStack--multi .wm-peek+.wm-peek[data-v-525fd423]{margin-top:-50px}.wm-peekStack--multi .wm-peek[data-v-525fd423]{margin-left:calc(var(--depth, 0) * 6px);margin-right:calc(var(--depth, 0) * 6px);transform:scale(calc(1 - var(--depth, 0) * .02))}.wm-peekStack--multi:hover .wm-peek+.wm-peek[data-v-525fd423],.wm-peekStack--multi:focus-within .wm-peek+.wm-peek[data-v-525fd423]{margin-top:10px}.wm-peekStack--multi:hover .wm-peek[data-v-525fd423],.wm-peekStack--multi:focus-within .wm-peek[data-v-525fd423]{margin-left:0;margin-right:0;transform:none}.wm-peek__close[data-v-525fd423]{position:absolute;top:6px;right:6px;width:18px;height:18px;border-radius:6px;border:none;background:var(--wm-g100);color:var(--wm-g500);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .12s ease,color .12s ease;z-index:2}.wm-peek__close[data-v-525fd423]:hover{background:var(--wm-g200);color:var(--wm-g900)}.wm-peek__avatar[data-v-525fd423]{position:relative;flex-shrink:0}.wm-peek__avatarBadge[data-v-525fd423]{position:absolute;right:-4px;bottom:-3px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wm-g900);color:#fff;border:2px solid var(--wm-w);font-family:var(--wm-f);font-size:9.5px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}.wm-peek__body[data-v-525fd423]{min-width:0;padding-right:14px}.wm-peek__head[data-v-525fd423]{font-family:var(--wm-f);font-size:12.5px;line-height:1.3;color:var(--wm-g700);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-peek__name[data-v-525fd423]{font-weight:600}.wm-peek__action[data-v-525fd423]{color:var(--wm-g400);font-weight:400}.wm-peek__text[data-v-525fd423]{margin:1px 0 0;font-family:var(--wm-f);font-size:12px;line-height:1.35;color:var(--wm-g500);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.wm-peek__open[data-v-525fd423]{flex-shrink:0;border:none;background:var(--wm-g900);color:#fff;font-family:var(--wm-f);font-size:12px;font-weight:600;padding:7px 13px;border-radius:999px;cursor:pointer;transition:background .12s ease,transform .12s ease}.wm-peek__open[data-v-525fd423]:hover{background:#000;transform:translateY(-1px)}.wm-peek-enter-active[data-v-525fd423]{animation:wm-peekIn-525fd423 .26s cubic-bezier(.34,1.56,.64,1) both}.wm-peek-leave-active[data-v-525fd423]{animation:wm-peekIn-525fd423 .16s ease reverse both}@keyframes wm-peekIn-525fd423{0%{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}.wm-launcher[data-v-525fd423]{position:relative;width:50px;height:50px;border-radius:50%;border:none;background:var(--wm-g900);color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 16px #00000038;transition:transform .14s ease,box-shadow .14s ease}.wm-launcher[data-v-525fd423]:hover{transform:translateY(-1px);box-shadow:0 8px 22px #00000047}.wm-launcher[data-v-525fd423]:active{transform:translateY(0)}.wm-launcher__badge[data-v-525fd423]{position:absolute;top:-3px;right:-3px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--wm-red, #B91C1C);color:#fff;border:2px solid var(--wm-w, #fff);font-family:var(--wm-f);font-size:10.5px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}.wm-aiav[data-v-8c924688]{position:relative;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}.wm-aiav__inner[data-v-8c924688]{width:100%;height:100%;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(91,95,239,.25);display:flex;align-items:center;justify-content:center;border-radius:var(--wm-avr)}.wm-aiav--tail .wm-aiav__inner[data-v-8c924688]{border-bottom-right-radius:4px}.wm-aiav__inner--glow[data-v-8c924688]{animation:wm-heroGlow 2.6s ease-in-out infinite}.wm-aiav__pulse[data-v-8c924688]{position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1.5px solid var(--wm-a);opacity:.5;pointer-events:none;border-radius:calc(var(--wm-avr) + 3px)}.wm-aiav--tail .wm-aiav__pulse[data-v-8c924688]{border-bottom-right-radius:7px}.wm-team[data-v-3659b9c1]{display:inline-flex;align-items:center;gap:6px}.wm-team__stack[data-v-3659b9c1]{display:inline-block;position:relative;height:20px}.wm-team__pill[data-v-3659b9c1]{position:absolute;top:0;width:20px;height:20px;border-radius:6px;border:2px solid var(--wm-w);display:inline-flex;align-items:center;justify-content:center;overflow:hidden;color:#fff;font-size:8px;font-weight:700;line-height:1}.wm-team__pill img[data-v-3659b9c1]{width:100%;height:100%;object-fit:cover;display:block}.wm-team__label[data-v-3659b9c1]{font-size:11px;color:var(--wm-g400);white-space:nowrap}.wm-header[data-v-d6406b84]{background:var(--wm-w);border-bottom:1px solid var(--wm-g100);padding:12px 13px;display:flex;align-items:center;gap:9px;flex-shrink:0}.wm-header__icon[data-v-d6406b84]{width:30px;height:30px;border-radius:8px;background:var(--wm-g100);border:none;display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);cursor:pointer;flex-shrink:0;transition:background .14s ease}.wm-header__icon[data-v-d6406b84]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-header__icon--active[data-v-d6406b84]{background:var(--wm-g200);color:var(--wm-g700)}.wm-header__avatar[data-v-d6406b84]{flex-shrink:0}.wm-header__fill[data-v-d6406b84]{flex:1}.wm-header__main[data-v-d6406b84]{flex:1;min-width:0}.wm-header__title[data-v-d6406b84]{font-size:13.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.wm-header__actions[data-v-d6406b84]{display:flex;gap:4px;flex-shrink:0}.wm-onb[data-v-c85f6958]{flex:1;overflow-y:auto;background:var(--wm-w);padding:20px 14px 14px;display:flex;flex-direction:column;gap:28px}.wm-onb__hero[data-v-c85f6958]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 8px 6px;gap:14px}.wm-onb__title[data-v-c85f6958]{font-size:17px;font-weight:700;color:var(--wm-g900);letter-spacing:-.03em;line-height:1.2}.wm-onb__sub[data-v-c85f6958]{font-size:12.5px;color:var(--wm-g400);line-height:1.6;white-space:pre-line}.wm-onb__section-title[data-v-c85f6958]{font-size:10px;font-weight:600;color:var(--wm-g300);letter-spacing:.08em;margin-bottom:10px;text-transform:uppercase;padding-left:2px}.wm-onb__grid[data-v-c85f6958]{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wm-onb__qlist[data-v-c85f6958]{display:flex;flex-direction:column;gap:8px}.wm-onb__card[data-v-c85f6958]{padding:14px 14px 16px;border-radius:14px;text-align:left;background:var(--wm-g50);border:1px solid var(--wm-g100);font-family:var(--wm-f);cursor:pointer;display:flex;flex-direction:column;align-items:flex-start;gap:4px;transition:background .14s ease,border-color .14s ease,transform .14s ease}.wm-onb__card[data-v-c85f6958]:hover{background:var(--wm-g100);border-color:var(--wm-g150)}.wm-onb__card[data-v-c85f6958]:active{transform:scale(.99)}.wm-onb__card--row[data-v-c85f6958]{flex-direction:row;align-items:center;gap:12px;padding:12px 14px}.wm-onb__card-icon[data-v-c85f6958]{width:32px;height:32px;border-radius:9px;background:var(--wm-w);border:1px solid var(--wm-g150);display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g700);margin-bottom:10px;flex-shrink:0}.wm-onb__card--row .wm-onb__card-icon[data-v-c85f6958]{margin-bottom:0}.wm-onb__card-body[data-v-c85f6958]{display:flex;flex-direction:column;gap:2px;min-width:0}.wm-onb__card-title[data-v-c85f6958]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;line-height:1.25}.wm-onb__card-sub[data-v-c85f6958]{font-size:11.5px;font-weight:400;color:var(--wm-g400);line-height:1.35}.wm-onb__search[data-v-c85f6958]{position:relative;margin-bottom:8px}.wm-onb__searchIcon[data-v-c85f6958]{position:absolute;top:50%;left:10px;transform:translateY(-50%);color:var(--wm-g400);display:inline-flex}.wm-onb__search input[data-v-c85f6958]{width:100%;background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:9px;padding:7px 11px 7px 30px;font-size:12px;color:var(--wm-g700);font-family:var(--wm-f);outline:none}.wm-onb__search input[data-v-c85f6958]:focus{border-color:var(--wm-g200);background:var(--wm-w)}.wm-onb__list[data-v-c85f6958]{display:flex;flex-direction:column;gap:2px}.wm-onb__thread[data-v-c85f6958]{padding:10px;border-radius:10px;text-align:left;background:transparent;border:none;font-family:var(--wm-f);cursor:pointer;display:flex;align-items:center;gap:12px;transition:background .14s ease,transform .14s ease}.wm-onb__thread[data-v-c85f6958]:hover{background:var(--wm-g50)}.wm-onb__thread[data-v-c85f6958]:active{transform:scale(.995)}.wm-onb__thread-icon[data-v-c85f6958]{position:relative;width:40px;height:40px;border-radius:11px;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(255,255,255,.04);display:inline-flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.wm-onb__thread-icon--inverted[data-v-c85f6958]{background:var(--wm-g100);border-color:var(--wm-g150);color:var(--wm-g900)}.wm-onb__thread-dot[data-v-c85f6958]{position:absolute;top:-3px;right:-3px;width:10px;height:10px;border-radius:50%;background:var(--wm-a);border:2px solid var(--wm-w);box-sizing:border-box}.wm-onb__thread-body[data-v-c85f6958]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.wm-onb__thread-title[data-v-c85f6958]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__thread-preview[data-v-c85f6958]{font-size:11.5px;font-weight:400;color:var(--wm-g400);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__thread-meta[data-v-c85f6958]{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;align-self:stretch;gap:8px;padding:2px 0;flex-shrink:0}.wm-onb__thread-time[data-v-c85f6958]{font-size:10.5px;font-weight:500;color:var(--wm-g400);white-space:nowrap}.wm-onb__thread-chev[data-v-c85f6958]{color:var(--wm-g300)}.wm-onb__empty[data-v-c85f6958]{padding:18px 10px;text-align:center;font-size:12px;color:var(--wm-g400)}.wm-onb__cta[data-v-c85f6958]{padding:0}.wm-onb__startBtn[data-v-c85f6958]{width:100%;padding:10px 12px 10px 16px;border-radius:10px;background:var(--wm-g900);color:#fff;border:none;font-size:12.5px;font-weight:600;letter-spacing:-.01em;cursor:pointer;font-family:var(--wm-f);display:flex;align-items:center;gap:9px;transition:background .14s ease}.wm-onb__startBtn[data-v-c85f6958]:hover{background:var(--wm-g700)}.wm-onb__startBtn[data-v-c85f6958]:disabled{background:var(--wm-g200);cursor:default}.wm-onb__startIcon[data-v-c85f6958]{width:22px;height:22px;border-radius:7px;background:#ffffff1f;display:inline-flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.wm-result[data-v-64a83fb8]{display:inline-flex;align-items:flex-start;gap:6px;padding:6px 10px 6px 8px;border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 14px);font-family:var(--wm-f);font-size:12px;font-weight:500;letter-spacing:-.005em;line-height:1.4;max-width:75%;min-width:0}.wm-result__icon[data-v-64a83fb8]{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:1.4em}.wm-result__body[data-v-64a83fb8]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;min-width:0;flex-shrink:1}.wm-result__label[data-v-64a83fb8]{font-weight:600}.wm-result__sep[data-v-64a83fb8]{opacity:.55}.wm-result__detail[data-v-64a83fb8]{font-weight:400;opacity:.85}.wm-result--success[data-v-64a83fb8]{background:#e3f4e7;color:#1f6e3a}.wm-result--rejected[data-v-64a83fb8]{background:var(--wm-g100);color:var(--wm-g500)}.wm-result--failure[data-v-64a83fb8]{background:var(--wm-redBg);color:var(--wm-red)}.wm-result--awaiting[data-v-64a83fb8]{background:#e0eafe;color:#2563eb}.wm-art[data-v-ca24a9c9]{width:100%;max-width:75%;min-width:0;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px);overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .2s ease both;display:flex;flex-direction:column}.wm-art__head[data-v-ca24a9c9]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px 10px;border-bottom:1px solid var(--wm-g100)}.wm-art__headMain[data-v-ca24a9c9]{min-width:0;flex:1}.wm-art__title[data-v-ca24a9c9]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-art__subtitle[data-v-ca24a9c9]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-ca24a9c9]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-ca24a9c9]{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:10px;font-weight:600;border-radius:999px;padding:2px 8px 2px 6px;letter-spacing:.02em}.wm-art__badge--neutral[data-v-ca24a9c9]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-ca24a9c9]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-ca24a9c9]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-ca24a9c9]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-ca24a9c9]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-ca24a9c9]{font-size:12.5px;color:var(--wm-g700);line-height:1.45;white-space:pre-wrap;word-break:break-word}.wm-art__field[data-v-ca24a9c9]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-ca24a9c9]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-ca24a9c9]{font-size:12.5px;color:var(--wm-g900);background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:8px;padding:7px 9px;line-height:1.35;word-break:break-word;min-height:32px;display:flex;align-items:center}.wm-art__fieldValue--multi[data-v-ca24a9c9]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-ca24a9c9]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-ca24a9c9]{margin:0;padding:0}.wm-art__image img[data-v-ca24a9c9]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-ca24a9c9]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art--formResponse[data-v-ca24a9c9]{border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 4px) var(--wm-r-bl, 14px)}.wm-art[data-v-d7369333]{width:100%;max-width:75%;min-width:0;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px);overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .2s ease both;display:flex;flex-direction:column}.wm-art__head[data-v-d7369333]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px 10px;border-bottom:1px solid var(--wm-g100)}.wm-art__headMain[data-v-d7369333]{min-width:0;flex:1}.wm-art__title[data-v-d7369333]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-art__subtitle[data-v-d7369333]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-d7369333]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-d7369333]{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:10px;font-weight:600;border-radius:999px;padding:2px 8px 2px 6px;letter-spacing:.02em}.wm-art__badge--neutral[data-v-d7369333]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-d7369333]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-d7369333]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-d7369333]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-d7369333]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-d7369333]{font-size:12.5px;color:var(--wm-g700);line-height:1.45;white-space:pre-wrap;word-break:break-word}.wm-art__field[data-v-d7369333]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-d7369333]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-d7369333]{font-size:12.5px;color:var(--wm-g900);background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:8px;padding:7px 9px;line-height:1.35;word-break:break-word;min-height:32px;display:flex;align-items:center}.wm-art__fieldValue--multi[data-v-d7369333]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-d7369333]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-d7369333]{margin:0;padding:0}.wm-art__image img[data-v-d7369333]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-d7369333]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art[data-v-8b274eb7]{width:100%;max-width:75%;min-width:0;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px);overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .2s ease both;display:flex;flex-direction:column}.wm-art__head[data-v-8b274eb7]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px 10px;border-bottom:1px solid var(--wm-g100)}.wm-art__headMain[data-v-8b274eb7]{min-width:0;flex:1}.wm-art__title[data-v-8b274eb7]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-art__subtitle[data-v-8b274eb7]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-8b274eb7]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-8b274eb7]{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:10px;font-weight:600;border-radius:999px;padding:2px 8px 2px 6px;letter-spacing:.02em}.wm-art__badge--neutral[data-v-8b274eb7]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-8b274eb7]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-8b274eb7]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-8b274eb7]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-8b274eb7]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-8b274eb7]{font-size:12.5px;color:var(--wm-g700);line-height:1.45;white-space:pre-wrap;word-break:break-word}.wm-art__field[data-v-8b274eb7]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-8b274eb7]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-8b274eb7]{font-size:12.5px;color:var(--wm-g900);background:var(--wm-g50);border:1px solid var(--wm-g100);border-radius:8px;padding:7px 9px;line-height:1.35;word-break:break-word;min-height:32px;display:flex;align-items:center}.wm-art__fieldValue--multi[data-v-8b274eb7]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-8b274eb7]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-8b274eb7]{margin:0;padding:0}.wm-art__image img[data-v-8b274eb7]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-8b274eb7]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art--ticket[data-v-8b274eb7]{min-width:240px}.wm-tk__head[data-v-8b274eb7]{display:block}.wm-tk__title[data-v-8b274eb7]{white-space:normal;text-overflow:clip;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35}.wm-tk__sub[data-v-8b274eb7]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px}.wm-tk__ref[data-v-8b274eb7]{display:inline-flex;align-items:center;gap:4px;min-width:0;font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm)}.wm-tk__ref svg[data-v-8b274eb7]{flex-shrink:0;opacity:.7}.wm-tk__badge[data-v-8b274eb7]{padding:3px 9px 3px 7px}.wm-tk__dot[data-v-8b274eb7]{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.wm-tk__text[data-v-8b274eb7]{font-size:12px;color:var(--wm-g500);line-height:1.55;white-space:pre-wrap;word-break:break-word;margin-top:9px}.wm-art--ticket .wm-art__body[data-v-8b274eb7]{background:#f8f8f6}.wm-art--ticket .wm-art__fieldValue[data-v-8b274eb7]{background:var(--wm-w)}.wm-tk__prio[data-v-8b274eb7]{flex-shrink:0;margin-right:6px}.wm-tk__prio rect[data-v-8b274eb7]{fill:var(--wm-g200)}.wm-tk__prio[data-level="1"] rect[data-v-8b274eb7]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-8b274eb7]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-8b274eb7]:nth-of-type(2),.wm-tk__prio[data-level="3"] rect[data-v-8b274eb7]{fill:var(--wm-g700)}.wm-tk__date[data-v-8b274eb7]{flex-shrink:0;margin-right:6px;color:var(--wm-g500);opacity:.8}.wm-tk__footer[data-v-8b274eb7]{display:flex;align-items:center;gap:5px;font-size:10.5px;color:var(--wm-g400);padding:7px 13px 9px;border-top:1px solid var(--wm-g100);font-family:var(--wm-fm);background:var(--wm-g50)}.wm-tk__footer svg[data-v-8b274eb7]{flex-shrink:0;opacity:.7}.wm-att[data-v-1cd1267b]{display:block;max-width:268px}.wm-att__imgWrap[data-v-1cd1267b]{display:block;border-radius:12px;overflow:hidden;border:1px solid var(--wm-g150);background:var(--wm-g50);line-height:0}.wm-att__imgWrap img[data-v-1cd1267b]{display:block;width:100%;max-height:220px;object-fit:cover}.wm-att--audio audio[data-v-1cd1267b],.wm-att--video video[data-v-1cd1267b]{width:100%;max-width:268px;border-radius:12px;background:var(--wm-g100)}.wm-att__file[data-v-1cd1267b]{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:12px;text-decoration:none;color:var(--wm-g900);transition:background .14s ease,border-color .14s ease;max-width:100%}.wm-att__file[data-v-1cd1267b]:hover{background:var(--wm-g100);border-color:var(--wm-g200)}.wm-att__icon[data-v-1cd1267b]{width:26px;height:26px;border-radius:7px;background:var(--wm-w);border:1px solid var(--wm-g150);display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);flex-shrink:0}.wm-att__main[data-v-1cd1267b]{display:flex;flex-direction:column;min-width:0}.wm-att__name[data-v-1cd1267b]{font-size:12px;font-weight:500;color:var(--wm-g900);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.wm-att__meta[data-v-1cd1267b]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-att__spin[data-v-1cd1267b]{width:12px;height:12px;border:2px solid var(--wm-g200);border-top-color:var(--wm-g500);border-radius:50%;animation:wm-spin-1cd1267b .8s linear infinite;flex-shrink:0}@keyframes wm-spin-1cd1267b{to{transform:rotate(360deg)}}.wm-bubble[data-v-5c9e9f2b]{max-width:100%;padding:9px 13px;font-size:13px;line-height:1.58;letter-spacing:-.008em;white-space:pre-wrap;word-break:break-word}.wm-bubble--user[data-v-5c9e9f2b]{background:var(--wm-g900);color:#fff}.wm-bubble--ai[data-v-5c9e9f2b],.wm-bubble--human[data-v-5c9e9f2b]{background:var(--wm-g100);color:var(--wm-g900)}.wm-bubble[data-v-5c9e9f2b] strong{font-weight:700}.wm-bubble[data-v-5c9e9f2b] em{font-style:italic}.wm-bubble[data-v-5c9e9f2b] u{text-decoration:underline;text-underline-offset:2px}.wm-bubble[data-v-5c9e9f2b] s{text-decoration:line-through;opacity:.75}.wm-bubble[data-v-5c9e9f2b] a{color:inherit;text-decoration:underline;text-underline-offset:2px}.wm-bubble[data-v-5c9e9f2b] a:hover{opacity:.8}.wm-bubble[data-v-5c9e9f2b] .wm-md-ul,.wm-bubble[data-v-5c9e9f2b] .wm-md-ol{margin:2px 0;padding-left:20px}.wm-bubble[data-v-5c9e9f2b] .wm-md-ul{list-style:disc}.wm-bubble[data-v-5c9e9f2b] .wm-md-ol{list-style:decimal}.wm-bubble[data-v-5c9e9f2b] li{margin:0;padding:0}.wm-bubble[data-v-5c9e9f2b] .wm-md-code{font-family:var(--wm-fm);font-size:12px;background:#0000000f;padding:1px 5px;border-radius:4px}.wm-bubble--user[data-v-5c9e9f2b] .wm-md-code{background:#ffffff2e}.wm-bubble[data-v-5c9e9f2b] .wm-md-pre{margin:4px 0;padding:8px 10px;background:#0000000f;border-radius:8px;overflow-x:auto;white-space:pre;font-family:var(--wm-fm);font-size:12px;line-height:1.45}.wm-bubble--user[data-v-5c9e9f2b] .wm-md-pre{background:#ffffff2e}.wm-bubble[data-v-5c9e9f2b] .wm-md-pre code{font-family:inherit;font-size:inherit;background:none;padding:0}.wm-bubble[data-v-5c9e9f2b] .wm-md-h{margin:4px 0 2px;font-weight:700;letter-spacing:-.01em;line-height:1.3}.wm-bubble[data-v-5c9e9f2b] .wm-md-h1{font-size:15px}.wm-bubble[data-v-5c9e9f2b] .wm-md-h2{font-size:14px}.wm-bubble[data-v-5c9e9f2b] .wm-md-h3,.wm-bubble[data-v-5c9e9f2b] .wm-md-h4,.wm-bubble[data-v-5c9e9f2b] .wm-md-h5,.wm-bubble[data-v-5c9e9f2b] .wm-md-h6{font-size:13px}.wm-bubble[data-v-5c9e9f2b]{border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 14px) var(--wm-r-bl, 4px)}.wm-bubble--user[data-v-5c9e9f2b]{border-radius:var(--wm-r-tl, 14px) var(--wm-r-tr, 14px) var(--wm-r-br, 4px) var(--wm-r-bl, 14px)}.wm-typing[data-v-df2447fd]{padding:11px 16px;background:var(--wm-g100);border-radius:4px 14px 14px;display:inline-flex;gap:5px;align-items:center}.wm-typing span[data-v-df2447fd]{width:5px;height:5px;border-radius:50%;background:var(--wm-g400);display:inline-block;animation:wm-typingDot 1.4s ease-in-out infinite}.wm-list[data-v-946babe3]{flex:1;min-height:0;overflow-y:auto;padding:16px 14px calc(8px + var(--wm-float-h, 0px));display:flex;flex-direction:column;gap:12px;scrollbar-width:thin;scroll-padding-bottom:var(--wm-float-h, 0px);overflow-anchor:none}.wm-list[data-v-946babe3]::-webkit-scrollbar{width:3px}.wm-list[data-v-946babe3]::-webkit-scrollbar-thumb{background:var(--wm-g200);border-radius:10px}.wm-list__sep[data-v-946babe3]{display:flex;align-items:center;gap:8px;margin:-4px 0 4px}.wm-list__line[data-v-946babe3]{flex:1;height:1px;background:var(--wm-g100)}.wm-list__line--strong[data-v-946babe3]{background:var(--wm-g150)}.wm-list__line--unread[data-v-946babe3]{background:var(--wm-a);opacity:.55}.wm-list__sep-label[data-v-946babe3]{font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);letter-spacing:.06em;white-space:nowrap}.wm-list__sep--unread[data-v-946babe3]{margin:4px 0}.wm-list__sep-label--unread[data-v-946babe3]{color:var(--wm-a);font-weight:600}.wm-list__sysep-label[data-v-946babe3]{font-size:10px;color:var(--wm-g400);font-family:var(--wm-fm);letter-spacing:.06em;text-align:center;line-height:1.45;white-space:normal;overflow-wrap:anywhere;max-width:220px}.wm-list__sysep[data-v-946babe3]{display:flex;align-items:center;justify-content:center;gap:8px;margin:4px 0}.wm-list__group[data-v-946babe3]{display:flex;flex-direction:column;gap:3px}.wm-list__row[data-v-946babe3]{display:flex;align-items:flex-end;gap:5px}.wm-list__row--user[data-v-946babe3]{justify-content:flex-end}.wm-list__row.is-pending[data-v-946babe3]{opacity:.55}.wm-list__row.is-failed[data-v-946babe3] .wm-bubble{background:var(--wm-redBg)!important;color:var(--wm-red)!important}.wm-list__avatarSlot[data-v-946babe3]{width:26px;flex-shrink:0;align-self:flex-end}.wm-list__body[data-v-946babe3]{display:flex;flex-direction:column;gap:4px;max-width:75%}.wm-list__atts[data-v-946babe3]{display:flex;flex-direction:column;gap:4px}.wm-list__atts--align-end[data-v-946babe3]{align-items:flex-end}.wm-list__meta[data-v-946babe3]{display:flex;align-items:baseline;gap:5px;font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);margin-left:31px;margin-top:0}.wm-list__meta--right[data-v-946babe3]{margin-left:0;justify-content:flex-end}.fade-up[data-v-946babe3]{animation:wm-fadeUp .2s ease both}.wm-list--silent .fade-up[data-v-946babe3]{animation:none}.wm-list__loadMore[data-v-946babe3]{display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 0 10px;font-size:11px;color:var(--wm-g400);font-family:var(--wm-fm);animation:wm-fadeIn-946babe3 .18s ease both}.wm-list__loadMore-spinner[data-v-946babe3]{width:12px;height:12px;border-radius:50%;border:1.5px solid var(--wm-g200);border-top-color:var(--wm-g400);animation:wm-spin-946babe3 .8s linear infinite}.wm-list__historyEnd[data-v-946babe3]{text-align:center;padding:4px 0 8px;font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);letter-spacing:.04em}@keyframes wm-spin-946babe3{to{transform:rotate(360deg)}}@keyframes wm-fadeIn-946babe3{0%{opacity:0}to{opacity:1}}.wm-compose-wrap[data-v-14fa9ec0]{position:relative}.wm-rec[data-v-14fa9ec0]{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--wm-redBg);border-top:1px solid #f1c8c8;color:var(--wm-red);font-size:12px;font-weight:500}.wm-rec__dot[data-v-14fa9ec0]{width:8px;height:8px;border-radius:50%;background:var(--wm-red);box-shadow:0 0 #b91c1c73;animation:wm-recPulse-14fa9ec0 1.6s ease-out infinite;flex-shrink:0}.wm-rec__lbl[data-v-14fa9ec0]{flex:1;font-family:var(--wm-fm)}.wm-rec__stop[data-v-14fa9ec0]{border:1px solid var(--wm-red);background:transparent;color:var(--wm-red);border-radius:8px;padding:4px 10px;font-size:11.5px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:background .14s ease,color .14s ease}.wm-rec__stop[data-v-14fa9ec0]:hover{background:var(--wm-red);color:#fff}@keyframes wm-recPulse-14fa9ec0{0%{box-shadow:0 0 #b91c1c8c}to{box-shadow:0 0 0 8px #b91c1c00}}.wm-compose[data-v-14fa9ec0]{border-top:1px solid var(--wm-g100);background:var(--wm-w);padding:10px 11px;display:flex;flex-direction:row;align-items:stretch;gap:6px;flex-shrink:0;position:relative}.wm-compose__input[data-v-14fa9ec0]{flex:1;background:var(--wm-g50);border-radius:12px;padding:10px 14px;font-size:13.5px;line-height:1.4;color:var(--wm-g900);border:1px solid transparent;outline:none;font-family:var(--wm-f);caret-color:var(--wm-a);min-width:0;box-sizing:border-box;resize:none;min-height:78px;max-height:150px;overflow-y:auto;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease}.wm-compose__input[data-v-14fa9ec0]::placeholder{color:var(--wm-g300)}.wm-compose__input[data-v-14fa9ec0]:focus{background:var(--wm-w);border-color:var(--wm-g150);box-shadow:0 0 0 3px #00000008}.wm-compose__actions[data-v-14fa9ec0]{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px;flex-shrink:0}.wm-compose__icon[data-v-14fa9ec0],.wm-compose__send[data-v-14fa9ec0]{width:28px;height:28px;border-radius:8px;border:none;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:background .14s ease,transform .14s ease}.wm-compose__icon[data-v-14fa9ec0]{background:var(--wm-g100);color:var(--wm-g500)}.wm-compose__icon[data-v-14fa9ec0]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-compose__icon.is-open[data-v-14fa9ec0]{background:var(--wm-g900);color:#fff;transform:rotate(45deg)}.wm-compose__icon[data-v-14fa9ec0]:disabled{opacity:.5;cursor:default}.wm-compose__send[data-v-14fa9ec0]{background:var(--wm-g900);color:#fff}.wm-compose__send[data-v-14fa9ec0]:hover{background:var(--wm-g700)}.wm-compose__send[data-v-14fa9ec0]:active{transform:scale(.94)}.wm-compose__send.is-empty[data-v-14fa9ec0],.wm-compose__send[data-v-14fa9ec0]:disabled{background:var(--wm-g150);color:var(--wm-g300);cursor:default}.wm-compose__overlay[data-v-14fa9ec0]{position:fixed;top:0;right:0;bottom:0;left:0;background:transparent;z-index:9}.wm-compose__menu[data-v-14fa9ec0]{position:absolute;bottom:calc(100% + 6px);right:11px;min-width:200px;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:12px;box-shadow:0 10px 32px #00000021,0 2px 6px #0000000d;padding:5px;display:flex;flex-direction:column;gap:1px;z-index:10;animation:wm-fadeUp .18s ease both}.wm-compose__menuItem[data-v-14fa9ec0]{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;border:none;background:transparent;text-align:left;color:var(--wm-g700);font-size:12.5px;font-family:var(--wm-f);cursor:pointer;transition:background .14s ease}.wm-compose__menuItem[data-v-14fa9ec0]:hover:not(:disabled){background:var(--wm-g50);color:var(--wm-g900)}.wm-compose__menuItem[data-v-14fa9ec0]:disabled{opacity:.5;cursor:default}.wm-compose__menuIcon[data-v-14fa9ec0]{width:24px;height:24px;border-radius:7px;background:var(--wm-g100);color:var(--wm-g500);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-chips[data-v-55aa529d]{display:flex;flex-direction:column;align-items:flex-end;gap:5px;padding-bottom:4px;pointer-events:none}.wm-chip[data-v-55aa529d]{pointer-events:auto;padding:7px 14px;border-radius:20px;background:var(--wm-w);border:1px solid var(--wm-g200);font-size:12px;font-weight:500;color:var(--wm-g700);font-family:var(--wm-f);cursor:pointer;line-height:1;box-shadow:0 2px 10px #00000012;white-space:nowrap;transform-origin:bottom right;animation:wm-chipIn-55aa529d .28s cubic-bezier(.22,1,.36,1) both;transition:background .14s ease,transform .1s ease}.wm-chip[data-v-55aa529d]:hover{background:var(--wm-g50)}.wm-chip[data-v-55aa529d]:active{transform:scale(.97)}@keyframes wm-chipIn-55aa529d{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.wm-approval[data-v-b1be139c]{background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 6px 28px #0000001c;overflow:hidden;animation:wm-fadeUp .2s ease both}.wm-approval__head[data-v-b1be139c]{display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--wm-g100)}.wm-approval__icon[data-v-b1be139c]{flex-shrink:0}.wm-approval__main[data-v-b1be139c]{flex:1;min-width:0}.wm-approval__title[data-v-b1be139c]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em}.wm-approval__detail[data-v-b1be139c]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-approval__actions[data-v-b1be139c]{display:flex;gap:7px;padding:9px 14px 11px}.wm-approval__btn[data-v-b1be139c]{flex:1;padding:8px 8px 8px 13px;border-radius:9px;border:none;font-size:12px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:filter .14s ease}.wm-approval__btn[data-v-b1be139c]:hover{filter:brightness(.95)}.wm-approval__btn--neutral[data-v-b1be139c]{background:var(--wm-g100);color:var(--wm-g500)}.wm-approval__btn--primary[data-v-b1be139c]{background:var(--wm-g900);color:#fff}.wm-form[data-v-64b40f76]{background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 6px 28px #0000001c;overflow:hidden;animation:wm-fadeUp .2s ease both}.wm-form__head[data-v-64b40f76]{display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--wm-g100)}.wm-form__icon[data-v-64b40f76]{flex-shrink:0}.wm-form__main[data-v-64b40f76]{flex:1;min-width:0}.wm-form__title[data-v-64b40f76]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em}.wm-form__detail[data-v-64b40f76]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-form__body[data-v-64b40f76]{display:flex;flex-direction:column;gap:10px;padding:11px 14px 12px;max-height:320px;overflow-y:auto;scrollbar-width:thin}.wm-form__body[data-v-64b40f76]::-webkit-scrollbar{width:3px}.wm-form__body[data-v-64b40f76]::-webkit-scrollbar-thumb{background:var(--wm-g200);border-radius:10px}.wm-form__field[data-v-64b40f76]{display:flex;flex-direction:column;gap:4px}.wm-form__label[data-v-64b40f76]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-form__req[data-v-64b40f76]{color:var(--wm-red);margin-left:2px}.wm-form__input[data-v-64b40f76],.wm-form__textarea[data-v-64b40f76],.wm-form__select[data-v-64b40f76]{font-family:var(--wm-f);font-size:12.5px;color:var(--wm-g900);background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:8px;padding:7px 9px;outline:none;transition:border-color .12s ease,box-shadow .12s ease}.wm-form__input[data-v-64b40f76]:focus,.wm-form__textarea[data-v-64b40f76]:focus,.wm-form__select[data-v-64b40f76]:focus{border-color:var(--wm-g500);box-shadow:0 0 0 3px #0000000a}.wm-form__input[data-v-64b40f76]:disabled,.wm-form__textarea[data-v-64b40f76]:disabled,.wm-form__select[data-v-64b40f76]:disabled{background:var(--wm-g50);color:var(--wm-g400)}.wm-form__textarea[data-v-64b40f76]{resize:vertical;min-height:56px}.wm-form__bool[data-v-64b40f76]{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--wm-g700)}.wm-form__multi[data-v-64b40f76]{display:flex;flex-direction:column;gap:5px}.wm-form__multiItem[data-v-64b40f76]{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--wm-g700)}.wm-form__err[data-v-64b40f76]{font-size:11px;color:var(--wm-red);padding:4px 8px;background:var(--wm-redBg);border-radius:6px}.wm-form__submit[data-v-64b40f76]{margin-top:2px;padding:9px;border-radius:9px;border:none;background:var(--wm-g900);color:#fff;font-size:12px;font-weight:600;cursor:pointer;font-family:var(--wm-f);display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:filter .14s ease}.wm-form__submit[data-v-64b40f76]:hover:not(:disabled){filter:brightness(.95)}.wm-form__submit[data-v-64b40f76]:disabled{opacity:.7;cursor:not-allowed}.wm-form__doneLbl[data-v-64b40f76]{margin-top:2px;padding:9px;border-radius:9px;background:var(--wm-g100);color:var(--wm-g500);font-size:12px;text-align:center}.wm-form__spinner[data-v-64b40f76]{width:12px;height:12px;border-radius:50%;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;animation:wm-spin .7s linear infinite}.wm-fb[data-v-6f45ff3b]{margin:4px 0 0;padding:16px;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:var(--wm-sh1)}.wm-fb__title[data-v-6f45ff3b]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em;margin-bottom:4px}.wm-fb__sub[data-v-6f45ff3b]{font-size:11.5px;color:var(--wm-g400);margin-bottom:14px}.wm-fb__row[data-v-6f45ff3b]{display:flex;gap:0;margin-bottom:14px}.wm-fb__opt[data-v-6f45ff3b]{display:flex;flex-direction:column;align-items:center;gap:4px;background:transparent;border:none;border-radius:10px;padding:7px 0;cursor:pointer;flex:1;min-width:0;transition:background .15s ease}.wm-fb__opt.is-selected[data-v-6f45ff3b]{background:var(--wm-g100)}.wm-fb__emoji[data-v-6f45ff3b]{font-size:22px;line-height:1}.wm-fb__label[data-v-6f45ff3b]{font-size:9.5px;color:var(--wm-g400);font-weight:400}.wm-fb__opt.is-selected .wm-fb__label[data-v-6f45ff3b]{color:var(--wm-g700);font-weight:600}.wm-fb__send[data-v-6f45ff3b]{width:100%;padding:9px;border-radius:10px;background:var(--wm-g900);color:#fff;border:none;font-size:12.5px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:background .2s ease}.wm-fb__send[data-v-6f45ff3b]:disabled{background:var(--wm-g200);color:var(--wm-g400);cursor:default}.wm-fb__done[data-v-6f45ff3b]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 0}.wm-fb__check[data-v-6f45ff3b]{width:40px;height:40px;border-radius:12px;background:var(--wm-g900);display:inline-flex;align-items:center;justify-content:center}.wm-fb__doneTitle[data-v-6f45ff3b]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em}.wm-fb__doneSub[data-v-6f45ff3b]{font-size:11.5px;color:var(--wm-g400);text-align:center;line-height:1.5}.wm-mm[data-v-3a73911b]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:25}.wm-mm__scrim[data-v-3a73911b]{position:absolute;top:0;right:0;bottom:0;left:0}.wm-mm__pop[data-v-3a73911b]{position:absolute;top:56px;right:10px;width:248px;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 14px 40px #00000029,0 2px 8px #0000000f;overflow:hidden;animation:wm-fadeUp .18s ease both;font-family:var(--wm-f)}.wm-mm__section[data-v-3a73911b]{padding:6px 4px}.wm-mm__sep[data-v-3a73911b]{height:1px;background:var(--wm-g100)}.wm-mm__item[data-v-3a73911b]{width:100%;padding:9px 12px;display:flex;align-items:center;gap:10px;background:transparent;border:none;cursor:pointer;font-family:var(--wm-f);text-align:left;color:var(--wm-g700);transition:background .14s ease;border-radius:8px}.wm-mm__item[data-v-3a73911b]:hover{background:var(--wm-g50)}.wm-mm__icon[data-v-3a73911b]{width:24px;height:24px;border-radius:7px;background:var(--wm-g100);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--wm-g500)}.wm-mm__label[data-v-3a73911b]{flex:1;font-size:12.5px;font-weight:500;letter-spacing:-.01em}.wm-mm__hint[data-v-3a73911b]{font-size:10.5px;color:var(--wm-g300);font-family:var(--wm-fm)}.wm-mm__item--danger[data-v-3a73911b]{color:#b91c1c}.wm-mm__item--danger .wm-mm__icon[data-v-3a73911b]{background:#b91c1c14;color:#b91c1c}.wm-mm__toggle[data-v-3a73911b]{width:28px;height:16px;border-radius:999px;background:var(--wm-g200);position:relative;flex-shrink:0;transition:background .14s ease;display:inline-block}.wm-mm__toggle--on[data-v-3a73911b]{background:var(--wm-g900)}.wm-mm__knob[data-v-3a73911b]{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:left .14s ease;box-shadow:0 1px 3px #0000002e}.wm-mm__toggle--on .wm-mm__knob[data-v-3a73911b]{left:14px}.wm-dialog[data-v-4f4b37c9]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:12px;box-sizing:border-box}.wm-dialog__scrim[data-v-4f4b37c9]{position:absolute;top:0;right:0;bottom:0;left:0;background:#0f0e146b;animation:wm-fadeUp .16s ease both}.wm-dialog__card[data-v-4f4b37c9]{position:relative;width:min(320px,100%);background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px;box-shadow:0 14px 40px #0000002e,0 2px 8px #0000000f;overflow:hidden;font-family:var(--wm-f);animation:wm-fadeUp .18s ease both}.wm-dialog__head[data-v-4f4b37c9]{padding:14px 14px 4px;display:flex;align-items:flex-start;gap:8px}.wm-dialog__title[data-v-4f4b37c9]{flex:1;font-size:13.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em}.wm-dialog__close[data-v-4f4b37c9]{width:24px;height:24px;border-radius:7px;background:var(--wm-g100);border:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);flex-shrink:0;transition:background .14s ease}.wm-dialog__close[data-v-4f4b37c9]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-dialog__body[data-v-4f4b37c9]{padding:8px 14px 6px}.wm-dialog__input[data-v-4f4b37c9]{width:100%;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:9px;padding:9px 11px;font-size:12.5px;color:var(--wm-g900);font-family:var(--wm-f);outline:none;box-sizing:border-box;transition:background .14s ease,border-color .14s ease}.wm-dialog__input[data-v-4f4b37c9]:focus{border-color:var(--wm-g300);background:var(--wm-w)}.wm-dialog__actions[data-v-4f4b37c9]{display:flex;gap:6px;padding:8px 12px 12px;justify-content:flex-end}.wm-dialog__btn[data-v-4f4b37c9]{padding:8px 12px;border-radius:9px;border:1px solid var(--wm-g150);background:var(--wm-w);color:var(--wm-g700);cursor:pointer;font-family:var(--wm-f);font-size:12px;font-weight:500;transition:background .14s ease}.wm-dialog__btn[data-v-4f4b37c9]:hover{background:var(--wm-g50)}.wm-dialog__btn--primary[data-v-4f4b37c9]{background:var(--wm-g900);color:#fff;border-color:var(--wm-g900)}.wm-dialog__btn--primary[data-v-4f4b37c9]:hover{background:var(--wm-g700)}.wm-dialog__btn--primary[data-v-4f4b37c9]:disabled{background:var(--wm-g200);color:var(--wm-g500);cursor:default;border-color:var(--wm-g200)}.wm-root[data-v-b5eb5af4]{font-family:var(--wm-f, ui-sans-serif, system-ui, sans-serif);color:var(--wm-g900, #17161A);line-height:1.45}.wm-root--floating[data-v-b5eb5af4],.wm-root--sheet[data-v-b5eb5af4]{position:fixed;right:20px;bottom:20px;z-index:2147483647}.wm-root--embedded[data-v-b5eb5af4]{position:relative;width:100%;height:100%;display:flex}.wm-panel[data-v-b5eb5af4]{background:var(--wm-w);display:flex;flex-direction:column;overflow:hidden}.wm-panel--floating[data-v-b5eb5af4]{position:absolute;right:0;bottom:0;width:420px;max-width:calc(100vw - 32px);height:680px;max-height:calc(100vh - 80px);border-radius:16px;box-shadow:var(--wm-shPanel);animation:wm-widgetPop .25s cubic-bezier(.34,1.56,.64,1) both}.wm-panel--sheet[data-v-b5eb5af4]{position:fixed;top:12px;right:12px;bottom:12px;width:440px;max-width:calc(100vw - 24px);border-radius:18px;box-shadow:var(--wm-shPanel);animation:wm-sheetSlide .32s cubic-bezier(.22,1,.36,1) both}.wm-panel--embedded[data-v-b5eb5af4]{position:relative;width:100%;height:100%;border-radius:0;box-shadow:none}.wm-state[data-v-b5eb5af4]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 24px;gap:14px;text-align:center}.wm-loading[data-v-b5eb5af4]{flex:1;display:flex;align-items:center;justify-content:center;background:var(--wm-w, #fff);position:relative}.wm-loading__close[data-v-b5eb5af4]{position:absolute;top:12px;right:12px;width:30px;height:30px;border-radius:50%;border:none;background:transparent;color:var(--wm-g500, #5A5753);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.wm-loading__close[data-v-b5eb5af4]:hover{background:var(--wm-g100, #F2F1EE);color:var(--wm-g900, #17161A)}.wm-loading__spinner[data-v-b5eb5af4]{width:22px;height:22px;border-radius:50%;border:2px solid var(--wm-g150, #E8E6E2);border-top-color:var(--wm-g500, #5A5753);animation:wm-spin-b5eb5af4 .7s linear infinite}@keyframes wm-spin-b5eb5af4{to{transform:rotate(360deg)}}.wm-state__err[data-v-b5eb5af4]{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--wm-redBg);border:1px solid #f8d7d7;border-radius:12px;max-width:320px;text-align:left}.wm-state__errIcon[data-v-b5eb5af4]{width:28px;height:28px;border-radius:8px;background:var(--wm-red);color:#fff;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-state__errTitle[data-v-b5eb5af4]{font-size:13px;font-weight:600;color:var(--wm-red)}.wm-state__errSub[data-v-b5eb5af4]{font-size:11px;color:var(--wm-g500);margin-top:2px}.wm-bottom[data-v-b5eb5af4]{position:relative;flex-shrink:0}.wm-float[data-v-b5eb5af4]{position:absolute;left:0;right:0;bottom:100%;padding:0 12px 8px;pointer-events:none;z-index:5}.wm-float>.wm-approval[data-v-b5eb5af4],.wm-float>.wm-fb[data-v-b5eb5af4],.wm-float>.wm-form[data-v-b5eb5af4]{pointer-events:auto}.wm-actionWait[data-v-b5eb5af4]{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;min-height:98px;background:var(--wm-g50);border-top:1px solid var(--wm-g100);color:var(--wm-g500);font-size:12.5px;font-family:var(--wm-f);flex-shrink:0}.wm-actionWait__spinner[data-v-b5eb5af4]{width:14px;height:14px;border-radius:50%;border:2px solid var(--wm-g200);border-top-color:var(--wm-g500);animation:wm-spin-b5eb5af4 .7s linear infinite;flex-shrink:0}.wm-actionWait__lbl[data-v-b5eb5af4]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-attached[data-v-b5eb5af4]{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 8px;background:var(--wm-w);border-top:1px solid var(--wm-g100)}.wm-attached__chip[data-v-b5eb5af4]{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:var(--wm-g100);border:1px solid var(--wm-g150);font-size:11px;color:var(--wm-g700)}.wm-attached__chip button[data-v-b5eb5af4]{border:none;background:transparent;color:var(--wm-g400);cursor:pointer;padding:0;display:inline-flex}.wm-attached__chip button[data-v-b5eb5af4]:hover{color:var(--wm-g900)}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ var Messenger=function(Kt){"use strict";/**
3
3
  * @vue/shared v3.5.34
4
4
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
5
5
  * @license MIT
6
- **/function ss(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ce={},Ot=[],Ke=()=>{},zs=()=>!1,yn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),vn=e=>e.startsWith("onUpdate:"),ke=Object.assign,rs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},wo=Object.prototype.hasOwnProperty,oe=(e,t)=>wo.call(e,t),H=Array.isArray,It=e=>Vt(e)==="[object Map]",Bt=e=>Vt(e)==="[object Set]",Gs=e=>Vt(e)==="[object Date]",G=e=>typeof e=="function",he=e=>typeof e=="string",je=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",Ys=e=>(ae(e)||G(e))&&G(e.then)&&G(e.catch),Js=Object.prototype.toString,Vt=e=>Js.call(e),ko=e=>Vt(e).slice(8,-1),Xs=e=>Vt(e)==="[object Object]",is=e=>he(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Kt=ss(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Co=/-\w/g,Ie=bn(e=>e.replace(Co,t=>t.slice(1).toUpperCase())),So=/\B([A-Z])/g,ft=bn(e=>e.replace(So,"-$1").toLowerCase()),wn=bn(e=>e.charAt(0).toUpperCase()+e.slice(1)),os=bn(e=>e?`on${wn(e)}`:""),tt=(e,t)=>!Object.is(e,t),kn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qs=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Cn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ao=e=>{const t=he(e)?Number(e):NaN;return isNaN(t)?e:t};let Zs;const Sn=()=>Zs||(Zs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pe(e){if(H(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=he(s)?Eo(s):Pe(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(he(e)||ae(e))return e}const xo=/;(?![^(]*\))/g,To=/:([^]+)/,Mo=/\/\*[^]*?\*\//g;function Eo(e){const t={};return e.replace(Mo,"").split(xo).forEach(n=>{if(n){const s=n.split(To);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ne(e){let t="";if(he(e))t=e;else if(H(e))for(let n=0;n<e.length;n++){const s=ne(e[n]);s&&(t+=s+" ")}else if(ae(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Oo=ss("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function er(e){return!!e||e===""}function Io(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Rt(e[s],t[s]);return n}function Rt(e,t){if(e===t)return!0;let n=Gs(e),s=Gs(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=je(e),s=je(t),n||s)return e===t;if(n=H(e),s=H(t),n||s)return n&&s?Io(e,t):!1;if(n=ae(e),s=ae(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!Rt(e[o],t[o]))return!1}}return String(e)===String(t)}function as(e,t){return e.findIndex(n=>Rt(n,t))}const tr=e=>!!(e&&e.__v_isRef===!0),P=e=>he(e)?e:e==null?"":H(e)||ae(e)&&(e.toString===Js||!G(e.toString))?tr(e)?P(e.value):JSON.stringify(e,nr,2):String(e),nr=(e,t)=>tr(t)?nr(e,t.value):It(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[ls(s,i)+" =>"]=r,n),{})}:Bt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ls(n))}:je(t)?ls(t):ae(t)&&!H(t)&&!Xs(t)?String(t):t,ls=(e,t="")=>{var n;return je(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
+ **/function ss(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ue={},Rt=[],We=()=>{},Gs=()=>!1,bn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),wn=e=>e.startsWith("onUpdate:"),Ce=Object.assign,rs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Co=Object.prototype.hasOwnProperty,oe=(e,t)=>Co.call(e,t),H=Array.isArray,Lt=e=>Wt(e)==="[object Map]",Bt=e=>Wt(e)==="[object Set]",Ys=e=>Wt(e)==="[object Date]",Y=e=>typeof e=="function",pe=e=>typeof e=="string",Ue=e=>typeof e=="symbol",ae=e=>e!==null&&typeof e=="object",Js=e=>(ae(e)||Y(e))&&Y(e.then)&&Y(e.catch),Xs=Object.prototype.toString,Wt=e=>Xs.call(e),Ao=e=>Wt(e).slice(8,-1),Qs=e=>Wt(e)==="[object Object]",is=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,qt=ss(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),kn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},So=/-\w/g,Re=kn(e=>e.replace(So,t=>t.slice(1).toUpperCase())),xo=/\B([A-Z])/g,ht=kn(e=>e.replace(xo,"-$1").toLowerCase()),Cn=kn(e=>e.charAt(0).toUpperCase()+e.slice(1)),os=kn(e=>e?`on${Cn(e)}`:""),nt=(e,t)=>!Object.is(e,t),An=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Zs=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Sn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},To=e=>{const t=pe(e)?Number(e):NaN;return isNaN(t)?e:t};let er;const xn=()=>er||(er=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function De(e){if(H(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=pe(s)?Io(s):De(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(pe(e)||ae(e))return e}const Mo=/;(?![^(]*\))/g,Eo=/:([^]+)/,Oo=/\/\*[^]*?\*\//g;function Io(e){const t={};return e.replace(Oo,"").split(Mo).forEach(n=>{if(n){const s=n.split(Eo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function se(e){let t="";if(pe(e))t=e;else if(H(e))for(let n=0;n<e.length;n++){const s=se(e[n]);s&&(t+=s+" ")}else if(ae(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ro=ss("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function tr(e){return!!e||e===""}function Lo(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Nt(e[s],t[s]);return n}function Nt(e,t){if(e===t)return!0;let n=Ys(e),s=Ys(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Ue(e),s=Ue(t),n||s)return e===t;if(n=H(e),s=H(t),n||s)return n&&s?Lo(e,t):!1;if(n=ae(e),s=ae(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!Nt(e[o],t[o]))return!1}}return String(e)===String(t)}function as(e,t){return e.findIndex(n=>Nt(n,t))}const nr=e=>!!(e&&e.__v_isRef===!0),D=e=>pe(e)?e:e==null?"":H(e)||ae(e)&&(e.toString===Xs||!Y(e.toString))?nr(e)?D(e.value):JSON.stringify(e,sr,2):String(e),sr=(e,t)=>nr(t)?sr(e,t.value):Lt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[ls(s,i)+" =>"]=r,n),{})}:Bt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ls(n))}:Ue(t)?ls(t):ae(t)&&!H(t)&&!Qs(t)?String(t):t,ls=(e,t="")=>{var n;return Ue(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
7
7
  * @vue/reactivity v3.5.34
8
8
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
9
9
  * @license MIT
10
- **/let Ce;class Bo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ce&&(Ce.active?(this.parent=Ce,this.index=(Ce.scopes||(Ce.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ce;try{return Ce=this,t()}finally{Ce=n}}}on(){++this._on===1&&(this.prevScope=Ce,Ce=this)}off(){if(this._on>0&&--this._on===0){if(Ce===this)Ce=this.prevScope;else{let t=Ce;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Ro(){return Ce}let de;const cs=new WeakSet;class sr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ce&&(Ce.active?Ce.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,cs.has(this)&&(cs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ir(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ur(this),or(this);const t=de,n=Ue;de=this,Ue=!0;try{return this.fn()}finally{ar(this),de=t,Ue=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)hs(t);this.deps=this.depsTail=void 0,ur(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?cs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){fs(this)&&this.run()}get dirty(){return fs(this)}}let rr=0,Wt,qt;function ir(e,t=!1){if(e.flags|=8,t){e.next=qt,qt=e;return}e.next=Wt,Wt=e}function us(){rr++}function ds(){if(--rr>0)return;if(qt){let t=qt;for(qt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Wt;){let t=Wt;for(Wt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function or(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ar(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),hs(s),Lo(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function fs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(lr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function lr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===zt)||(e.globalVersion=zt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!fs(e))))return;e.flags|=2;const t=e.dep,n=de,s=Ue;de=e,Ue=!0;try{or(e);const r=e.fn(e._value);(t.version===0||tt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{de=n,Ue=s,ar(e),e.flags&=-3}}function hs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)hs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Lo(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ue=!0;const cr=[];function We(){cr.push(Ue),Ue=!1}function qe(){const e=cr.pop();Ue=e===void 0?!0:e}function ur(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=de;de=void 0;try{t()}finally{de=n}}}let zt=0;class No{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class dr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!de||!Ue||de===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==de)n=this.activeLink=new No(de,this),de.deps?(n.prevDep=de.depsTail,de.depsTail.nextDep=n,de.depsTail=n):de.deps=de.depsTail=n,fr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=de.depsTail,n.nextDep=void 0,de.depsTail.nextDep=n,de.depsTail=n,de.deps===n&&(de.deps=s)}return n}trigger(t){this.version++,zt++,this.notify(t)}notify(t){us();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ds()}}}function fr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)fr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ms=new WeakMap,bt=Symbol(""),ps=Symbol(""),Gt=Symbol("");function Te(e,t,n){if(Ue&&de){let s=ms.get(e);s||ms.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new dr),r.map=s,r.key=n),r.track()}}function nt(e,t,n,s,r,i){const o=ms.get(e);if(!o){zt++;return}const a=l=>{l&&l.trigger()};if(us(),t==="clear")o.forEach(a);else{const l=H(e),f=l&&is(n);if(l&&n==="length"){const c=Number(s);o.forEach((g,A)=>{(A==="length"||A===Gt||!je(A)&&A>=c)&&a(g)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),f&&a(o.get(Gt)),t){case"add":l?f&&a(o.get("length")):(a(o.get(bt)),It(e)&&a(o.get(ps)));break;case"delete":l||(a(o.get(bt)),It(e)&&a(o.get(ps)));break;case"set":It(e)&&a(o.get(bt));break}}ds()}function Lt(e){const t=ie(e);return t===e?t:(Te(t,"iterate",Gt),He(e)?t:t.map(rt))}function An(e){return Te(e=ie(e),"iterate",Gt),e}function ze(e,t){return ht(e)?Nt(wt(e)?rt(t):t):rt(t)}const $o={__proto__:null,[Symbol.iterator](){return gs(this,Symbol.iterator,e=>ze(this,e))},concat(...e){return Lt(this).concat(...e.map(t=>H(t)?Lt(t):t))},entries(){return gs(this,"entries",e=>(e[1]=ze(this,e[1]),e))},every(e,t){return st(this,"every",e,t,void 0,arguments)},filter(e,t){return st(this,"filter",e,t,n=>n.map(s=>ze(this,s)),arguments)},find(e,t){return st(this,"find",e,t,n=>ze(this,n),arguments)},findIndex(e,t){return st(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return st(this,"findLast",e,t,n=>ze(this,n),arguments)},findLastIndex(e,t){return st(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return st(this,"forEach",e,t,void 0,arguments)},includes(...e){return _s(this,"includes",e)},indexOf(...e){return _s(this,"indexOf",e)},join(e){return Lt(this).join(e)},lastIndexOf(...e){return _s(this,"lastIndexOf",e)},map(e,t){return st(this,"map",e,t,void 0,arguments)},pop(){return Yt(this,"pop")},push(...e){return Yt(this,"push",e)},reduce(e,...t){return hr(this,"reduce",e,t)},reduceRight(e,...t){return hr(this,"reduceRight",e,t)},shift(){return Yt(this,"shift")},some(e,t){return st(this,"some",e,t,void 0,arguments)},splice(...e){return Yt(this,"splice",e)},toReversed(){return Lt(this).toReversed()},toSorted(e){return Lt(this).toSorted(e)},toSpliced(...e){return Lt(this).toSpliced(...e)},unshift(...e){return Yt(this,"unshift",e)},values(){return gs(this,"values",e=>ze(this,e))}};function gs(e,t,n){const s=An(e),r=s[t]();return s!==e&&!He(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Fo=Array.prototype;function st(e,t,n,s,r,i){const o=An(e),a=o!==e&&!He(e),l=o[t];if(l!==Fo[t]){const g=l.apply(e,i);return a?rt(g):g}let f=n;o!==e&&(a?f=function(g,A){return n.call(this,ze(e,g),A,e)}:n.length>2&&(f=function(g,A){return n.call(this,g,A,e)}));const c=l.call(o,f,s);return a&&r?r(c):c}function hr(e,t,n,s){const r=An(e),i=r!==e&&!He(e);let o=n,a=!1;r!==e&&(i?(a=s.length===0,o=function(f,c,g){return a&&(a=!1,f=ze(e,f)),n.call(this,f,ze(e,c),g,e)}):n.length>3&&(o=function(f,c,g){return n.call(this,f,c,g,e)}));const l=r[t](o,...s);return a?ze(e,l):l}function _s(e,t,n){const s=ie(e);Te(s,"iterate",Gt);const r=s[t](...n);return(r===-1||r===!1)&&bs(n[0])?(n[0]=ie(n[0]),s[t](...n)):r}function Yt(e,t,n=[]){We(),us();const s=ie(e)[t].apply(e,n);return ds(),qe(),s}const Po=ss("__proto__,__v_isRef,__isVue"),mr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(je));function Do(e){je(e)||(e=String(e));const t=ie(this);return Te(t,"has",e),t.hasOwnProperty(e)}class pr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?wr:br:i?vr:yr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=H(t);if(!r){let l;if(o&&(l=$o[n]))return l;if(n==="hasOwnProperty")return Do}const a=Reflect.get(t,n,Me(t)?t:s);if((je(n)?mr.has(n):Po(n))||(r||Te(t,"get",n),i))return a;if(Me(a)){const l=o&&is(n)?a:a.value;return r&&ae(l)?vs(l):l}return ae(a)?r?vs(a):En(a):a}}class gr extends pr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=H(t)&&is(n);if(!this._isShallow){const f=ht(i);if(!He(s)&&!ht(s)&&(i=ie(i),s=ie(s)),!o&&Me(i)&&!Me(s))return f||(i.value=s),!0}const a=o?Number(n)<t.length:oe(t,n),l=Reflect.set(t,n,s,Me(t)?t:r);return t===ie(r)&&(a?tt(s,i)&&nt(t,"set",n,s):nt(t,"add",n,s)),l}deleteProperty(t,n){const s=oe(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&nt(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!je(n)||!mr.has(n))&&Te(t,"has",n),s}ownKeys(t){return Te(t,"iterate",H(t)?"length":bt),Reflect.ownKeys(t)}}class _r extends pr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const jo=new gr,Uo=new _r,Ho=new gr(!0),Vo=new _r(!0),ys=e=>e,xn=e=>Reflect.getPrototypeOf(e);function Ko(e,t,n){return function(...s){const r=this.__v_raw,i=ie(r),o=It(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,f=r[e](...s),c=n?ys:t?Nt:rt;return!t&&Te(i,"iterate",l?ps:bt),ke(Object.create(f),{next(){const{value:g,done:A}=f.next();return A?{value:g,done:A}:{value:a?[c(g[0]),c(g[1])]:c(g),done:A}}})}}function Tn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Wo(e,t){const n={get(r){const i=this.__v_raw,o=ie(i),a=ie(r);e||(tt(r,a)&&Te(o,"get",r),Te(o,"get",a));const{has:l}=xn(o),f=t?ys:e?Nt:rt;if(l.call(o,r))return f(i.get(r));if(l.call(o,a))return f(i.get(a));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Te(ie(r),"iterate",bt),r.size},has(r){const i=this.__v_raw,o=ie(i),a=ie(r);return e||(tt(r,a)&&Te(o,"has",r),Te(o,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const o=this,a=o.__v_raw,l=ie(a),f=t?ys:e?Nt:rt;return!e&&Te(l,"iterate",bt),a.forEach((c,g)=>r.call(i,f(c),f(g),o))}};return ke(n,e?{add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear")}:{add(r){const i=ie(this),o=xn(i),a=ie(r),l=!t&&!He(r)&&!ht(r)?a:r;return o.has.call(i,l)||tt(r,l)&&o.has.call(i,r)||tt(a,l)&&o.has.call(i,a)||(i.add(l),nt(i,"add",l,l)),this},set(r,i){!t&&!He(i)&&!ht(i)&&(i=ie(i));const o=ie(this),{has:a,get:l}=xn(o);let f=a.call(o,r);f||(r=ie(r),f=a.call(o,r));const c=l.call(o,r);return o.set(r,i),f?tt(i,c)&&nt(o,"set",r,i):nt(o,"add",r,i),this},delete(r){const i=ie(this),{has:o,get:a}=xn(i);let l=o.call(i,r);l||(r=ie(r),l=o.call(i,r)),a&&a.call(i,r);const f=i.delete(r);return l&&nt(i,"delete",r,void 0),f},clear(){const r=ie(this),i=r.size!==0,o=r.clear();return i&&nt(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Ko(r,e,t)}),n}function Mn(e,t){const n=Wo(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(oe(n,r)&&r in s?n:s,r,i)}const qo={get:Mn(!1,!1)},zo={get:Mn(!1,!0)},Go={get:Mn(!0,!1)},Yo={get:Mn(!0,!0)},yr=new WeakMap,vr=new WeakMap,br=new WeakMap,wr=new WeakMap;function Jo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xo(e){return e.__v_skip||!Object.isExtensible(e)?0:Jo(ko(e))}function En(e){return ht(e)?e:On(e,!1,jo,qo,yr)}function Qo(e){return On(e,!1,Ho,zo,vr)}function vs(e){return On(e,!0,Uo,Go,br)}function Rm(e){return On(e,!0,Vo,Yo,wr)}function On(e,t,n,s,r){if(!ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Xo(e);if(i===0)return e;const o=r.get(e);if(o)return o;const a=new Proxy(e,i===2?s:n);return r.set(e,a),a}function wt(e){return ht(e)?wt(e.__v_raw):!!(e&&e.__v_isReactive)}function ht(e){return!!(e&&e.__v_isReadonly)}function He(e){return!!(e&&e.__v_isShallow)}function bs(e){return e?!!e.__v_raw:!1}function ie(e){const t=e&&e.__v_raw;return t?ie(t):e}function ws(e){return!oe(e,"__v_skip")&&Object.isExtensible(e)&&Qs(e,"__v_skip",!0),e}const rt=e=>ae(e)?En(e):e,Nt=e=>ae(e)?vs(e):e;function Me(e){return e?e.__v_isRef===!0:!1}function Zo(e){return Me(e)?e.value:e}const ea={get:(e,t,n)=>t==="__v_raw"?e:Zo(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Me(r)&&!Me(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function kr(e){return wt(e)?e:new Proxy(e,ea)}class ta{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new dr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&de!==this)return ir(this,!0),!0}get value(){const t=this.dep.track();return lr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function na(e,t,n=!1){let s,r;return G(e)?s=e:(s=e.get,r=e.set),new ta(s,r,n)}const In={},Bn=new WeakMap;let kt;function sa(e,t=!1,n=kt){if(n){let s=Bn.get(n);s||Bn.set(n,s=[]),s.push(e)}}function ra(e,t,n=ce){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:a,call:l}=n,f=j=>r?j:He(j)||r===!1||r===0?it(j,1):it(j);let c,g,A,k,D=!1,O=!1;if(Me(e)?(g=()=>e.value,D=He(e)):wt(e)?(g=()=>f(e),D=!0):H(e)?(O=!0,D=e.some(j=>wt(j)||He(j)),g=()=>e.map(j=>{if(Me(j))return j.value;if(wt(j))return f(j);if(G(j))return l?l(j,2):j()})):G(e)?t?g=l?()=>l(e,2):e:g=()=>{if(A){We();try{A()}finally{qe()}}const j=kt;kt=c;try{return l?l(e,3,[k]):e(k)}finally{kt=j}}:g=Ke,t&&r){const j=g,Q=r===!0?1/0:r;g=()=>it(j(),Q)}const Y=Ro(),W=()=>{c.stop(),Y&&Y.active&&rs(Y.effects,c)};if(i&&t){const j=t;t=(...Q)=>{j(...Q),W()}}let V=O?new Array(e.length).fill(In):In;const J=j=>{if(!(!(c.flags&1)||!c.dirty&&!j))if(t){const Q=c.run();if(r||D||(O?Q.some((ge,ye)=>tt(ge,V[ye])):tt(Q,V))){A&&A();const ge=kt;kt=c;try{const ye=[Q,V===In?void 0:O&&V[0]===In?[]:V,k];V=Q,l?l(t,3,ye):t(...ye)}finally{kt=ge}}}else c.run()};return a&&a(J),c=new sr(g),c.scheduler=o?()=>o(J,!1):J,k=j=>sa(j,!1,c),A=c.onStop=()=>{const j=Bn.get(c);if(j){if(l)l(j,4);else for(const Q of j)Q();Bn.delete(c)}},t?s?J(!0):V=c.run():o?o(J.bind(null,!0),!0):c.run(),W.pause=c.pause.bind(c),W.resume=c.resume.bind(c),W.stop=W,W}function it(e,t=1/0,n){if(t<=0||!ae(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Me(e))it(e.value,t,n);else if(H(e))for(let s=0;s<e.length;s++)it(e[s],t,n);else if(Bt(e)||It(e))e.forEach(s=>{it(s,t,n)});else if(Xs(e)){for(const s in e)it(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&it(e[s],t,n)}return e}/**
10
+ **/let Ae;class Bo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ae&&(Ae.active?(this.parent=Ae,this.index=(Ae.scopes||(Ae.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ae;try{return Ae=this,t()}finally{Ae=n}}}on(){++this._on===1&&(this.prevScope=Ae,Ae=this)}off(){if(this._on>0&&--this._on===0){if(Ae===this)Ae=this.prevScope;else{let t=Ae;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function No(){return Ae}let he;const cs=new WeakSet;class rr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ae&&(Ae.active?Ae.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,cs.has(this)&&(cs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||or(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,dr(this),ar(this);const t=he,n=He;he=this,He=!0;try{return this.fn()}finally{lr(this),he=t,He=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)hs(t);this.deps=this.depsTail=void 0,dr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?cs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){fs(this)&&this.run()}get dirty(){return fs(this)}}let ir=0,zt,Gt;function or(e,t=!1){if(e.flags|=8,t){e.next=Gt,Gt=e;return}e.next=zt,zt=e}function us(){ir++}function ds(){if(--ir>0)return;if(Gt){let t=Gt;for(Gt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;zt;){let t=zt;for(zt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ar(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function lr(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),hs(s),Po(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function fs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(cr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function cr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Yt)||(e.globalVersion=Yt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!fs(e))))return;e.flags|=2;const t=e.dep,n=he,s=He;he=e,He=!0;try{ar(e);const r=e.fn(e._value);(t.version===0||nt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{he=n,He=s,lr(e),e.flags&=-3}}function hs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)hs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Po(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let He=!0;const ur=[];function qe(){ur.push(He),He=!1}function ze(){const e=ur.pop();He=e===void 0?!0:e}function dr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=he;he=void 0;try{t()}finally{he=n}}}let Yt=0;class Fo{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class fr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!he||!He||he===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==he)n=this.activeLink=new Fo(he,this),he.deps?(n.prevDep=he.depsTail,he.depsTail.nextDep=n,he.depsTail=n):he.deps=he.depsTail=n,hr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=he.depsTail,n.nextDep=void 0,he.depsTail.nextDep=n,he.depsTail=n,he.deps===n&&(he.deps=s)}return n}trigger(t){this.version++,Yt++,this.notify(t)}notify(t){us();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ds()}}}function hr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)hr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ms=new WeakMap,kt=Symbol(""),ps=Symbol(""),Jt=Symbol("");function Me(e,t,n){if(He&&he){let s=ms.get(e);s||ms.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new fr),r.map=s,r.key=n),r.track()}}function st(e,t,n,s,r,i){const o=ms.get(e);if(!o){Yt++;return}const a=l=>{l&&l.trigger()};if(us(),t==="clear")o.forEach(a);else{const l=H(e),f=l&&is(n);if(l&&n==="length"){const c=Number(s);o.forEach((g,S)=>{(S==="length"||S===Jt||!Ue(S)&&S>=c)&&a(g)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),f&&a(o.get(Jt)),t){case"add":l?f&&a(o.get("length")):(a(o.get(kt)),Lt(e)&&a(o.get(ps)));break;case"delete":l||(a(o.get(kt)),Lt(e)&&a(o.get(ps)));break;case"set":Lt(e)&&a(o.get(kt));break}}ds()}function Pt(e){const t=ie(e);return t===e?t:(Me(t,"iterate",Jt),Ve(e)?t:t.map(it))}function Tn(e){return Me(e=ie(e),"iterate",Jt),e}function Ge(e,t){return mt(e)?Ft(Ct(e)?it(t):t):it(t)}const $o={__proto__:null,[Symbol.iterator](){return gs(this,Symbol.iterator,e=>Ge(this,e))},concat(...e){return Pt(this).concat(...e.map(t=>H(t)?Pt(t):t))},entries(){return gs(this,"entries",e=>(e[1]=Ge(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,n=>n.map(s=>Ge(this,s)),arguments)},find(e,t){return rt(this,"find",e,t,n=>Ge(this,n),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,n=>Ge(this,n),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return _s(this,"includes",e)},indexOf(...e){return _s(this,"indexOf",e)},join(e){return Pt(this).join(e)},lastIndexOf(...e){return _s(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Xt(this,"pop")},push(...e){return Xt(this,"push",e)},reduce(e,...t){return mr(this,"reduce",e,t)},reduceRight(e,...t){return mr(this,"reduceRight",e,t)},shift(){return Xt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Xt(this,"splice",e)},toReversed(){return Pt(this).toReversed()},toSorted(e){return Pt(this).toSorted(e)},toSpliced(...e){return Pt(this).toSpliced(...e)},unshift(...e){return Xt(this,"unshift",e)},values(){return gs(this,"values",e=>Ge(this,e))}};function gs(e,t,n){const s=Tn(e),r=s[t]();return s!==e&&!Ve(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Do=Array.prototype;function rt(e,t,n,s,r,i){const o=Tn(e),a=o!==e&&!Ve(e),l=o[t];if(l!==Do[t]){const g=l.apply(e,i);return a?it(g):g}let f=n;o!==e&&(a?f=function(g,S){return n.call(this,Ge(e,g),S,e)}:n.length>2&&(f=function(g,S){return n.call(this,g,S,e)}));const c=l.call(o,f,s);return a&&r?r(c):c}function mr(e,t,n,s){const r=Tn(e),i=r!==e&&!Ve(e);let o=n,a=!1;r!==e&&(i?(a=s.length===0,o=function(f,c,g){return a&&(a=!1,f=Ge(e,f)),n.call(this,f,Ge(e,c),g,e)}):n.length>3&&(o=function(f,c,g){return n.call(this,f,c,g,e)}));const l=r[t](o,...s);return a?Ge(e,l):l}function _s(e,t,n){const s=ie(e);Me(s,"iterate",Jt);const r=s[t](...n);return(r===-1||r===!1)&&bs(n[0])?(n[0]=ie(n[0]),s[t](...n)):r}function Xt(e,t,n=[]){qe(),us();const s=ie(e)[t].apply(e,n);return ds(),ze(),s}const jo=ss("__proto__,__v_isRef,__isVue"),pr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ue));function Uo(e){Ue(e)||(e=String(e));const t=ie(this);return Me(t,"has",e),t.hasOwnProperty(e)}class gr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?kr:wr:i?br:vr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=H(t);if(!r){let l;if(o&&(l=$o[n]))return l;if(n==="hasOwnProperty")return Uo}const a=Reflect.get(t,n,Ee(t)?t:s);if((Ue(n)?pr.has(n):jo(n))||(r||Me(t,"get",n),i))return a;if(Ee(a)){const l=o&&is(n)?a:a.value;return r&&ae(l)?vs(l):l}return ae(a)?r?vs(a):In(a):a}}class _r extends gr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=H(t)&&is(n);if(!this._isShallow){const f=mt(i);if(!Ve(s)&&!mt(s)&&(i=ie(i),s=ie(s)),!o&&Ee(i)&&!Ee(s))return f||(i.value=s),!0}const a=o?Number(n)<t.length:oe(t,n),l=Reflect.set(t,n,s,Ee(t)?t:r);return t===ie(r)&&(a?nt(s,i)&&st(t,"set",n,s):st(t,"add",n,s)),l}deleteProperty(t,n){const s=oe(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&st(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Ue(n)||!pr.has(n))&&Me(t,"has",n),s}ownKeys(t){return Me(t,"iterate",H(t)?"length":kt),Reflect.ownKeys(t)}}class yr extends gr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Ho=new _r,Vo=new yr,Ko=new _r(!0),Wo=new yr(!0),ys=e=>e,Mn=e=>Reflect.getPrototypeOf(e);function qo(e,t,n){return function(...s){const r=this.__v_raw,i=ie(r),o=Lt(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,f=r[e](...s),c=n?ys:t?Ft:it;return!t&&Me(i,"iterate",l?ps:kt),Ce(Object.create(f),{next(){const{value:g,done:S}=f.next();return S?{value:g,done:S}:{value:a?[c(g[0]),c(g[1])]:c(g),done:S}}})}}function En(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zo(e,t){const n={get(r){const i=this.__v_raw,o=ie(i),a=ie(r);e||(nt(r,a)&&Me(o,"get",r),Me(o,"get",a));const{has:l}=Mn(o),f=t?ys:e?Ft:it;if(l.call(o,r))return f(i.get(r));if(l.call(o,a))return f(i.get(a));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Me(ie(r),"iterate",kt),r.size},has(r){const i=this.__v_raw,o=ie(i),a=ie(r);return e||(nt(r,a)&&Me(o,"has",r),Me(o,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const o=this,a=o.__v_raw,l=ie(a),f=t?ys:e?Ft:it;return!e&&Me(l,"iterate",kt),a.forEach((c,g)=>r.call(i,f(c),f(g),o))}};return Ce(n,e?{add:En("add"),set:En("set"),delete:En("delete"),clear:En("clear")}:{add(r){const i=ie(this),o=Mn(i),a=ie(r),l=!t&&!Ve(r)&&!mt(r)?a:r;return o.has.call(i,l)||nt(r,l)&&o.has.call(i,r)||nt(a,l)&&o.has.call(i,a)||(i.add(l),st(i,"add",l,l)),this},set(r,i){!t&&!Ve(i)&&!mt(i)&&(i=ie(i));const o=ie(this),{has:a,get:l}=Mn(o);let f=a.call(o,r);f||(r=ie(r),f=a.call(o,r));const c=l.call(o,r);return o.set(r,i),f?nt(i,c)&&st(o,"set",r,i):st(o,"add",r,i),this},delete(r){const i=ie(this),{has:o,get:a}=Mn(i);let l=o.call(i,r);l||(r=ie(r),l=o.call(i,r)),a&&a.call(i,r);const f=i.delete(r);return l&&st(i,"delete",r,void 0),f},clear(){const r=ie(this),i=r.size!==0,o=r.clear();return i&&st(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=qo(r,e,t)}),n}function On(e,t){const n=zo(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(oe(n,r)&&r in s?n:s,r,i)}const Go={get:On(!1,!1)},Yo={get:On(!1,!0)},Jo={get:On(!0,!1)},Xo={get:On(!0,!0)},vr=new WeakMap,br=new WeakMap,wr=new WeakMap,kr=new WeakMap;function Qo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zo(e){return e.__v_skip||!Object.isExtensible(e)?0:Qo(Ao(e))}function In(e){return mt(e)?e:Rn(e,!1,Ho,Go,vr)}function ea(e){return Rn(e,!1,Ko,Yo,br)}function vs(e){return Rn(e,!0,Vo,Jo,wr)}function Nm(e){return Rn(e,!0,Wo,Xo,kr)}function Rn(e,t,n,s,r){if(!ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Zo(e);if(i===0)return e;const o=r.get(e);if(o)return o;const a=new Proxy(e,i===2?s:n);return r.set(e,a),a}function Ct(e){return mt(e)?Ct(e.__v_raw):!!(e&&e.__v_isReactive)}function mt(e){return!!(e&&e.__v_isReadonly)}function Ve(e){return!!(e&&e.__v_isShallow)}function bs(e){return e?!!e.__v_raw:!1}function ie(e){const t=e&&e.__v_raw;return t?ie(t):e}function ws(e){return!oe(e,"__v_skip")&&Object.isExtensible(e)&&Zs(e,"__v_skip",!0),e}const it=e=>ae(e)?In(e):e,Ft=e=>ae(e)?vs(e):e;function Ee(e){return e?e.__v_isRef===!0:!1}function ta(e){return Ee(e)?e.value:e}const na={get:(e,t,n)=>t==="__v_raw"?e:ta(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Ee(r)&&!Ee(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Cr(e){return Ct(e)?e:new Proxy(e,na)}class sa{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new fr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return or(this,!0),!0}get value(){const t=this.dep.track();return cr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ra(e,t,n=!1){let s,r;return Y(e)?s=e:(s=e.get,r=e.set),new sa(s,r,n)}const Ln={},Bn=new WeakMap;let At;function ia(e,t=!1,n=At){if(n){let s=Bn.get(n);s||Bn.set(n,s=[]),s.push(e)}}function oa(e,t,n=ue){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:a,call:l}=n,f=j=>r?j:Ve(j)||r===!1||r===0?ot(j,1):ot(j);let c,g,S,k,V=!1,I=!1;if(Ee(e)?(g=()=>e.value,V=Ve(e)):Ct(e)?(g=()=>f(e),V=!0):H(e)?(I=!0,V=e.some(j=>Ct(j)||Ve(j)),g=()=>e.map(j=>{if(Ee(j))return j.value;if(Ct(j))return f(j);if(Y(j))return l?l(j,2):j()})):Y(e)?t?g=l?()=>l(e,2):e:g=()=>{if(S){qe();try{S()}finally{ze()}}const j=At;At=c;try{return l?l(e,3,[k]):e(k)}finally{At=j}}:g=We,t&&r){const j=g,te=r===!0?1/0:r;g=()=>ot(j(),te)}const J=No(),z=()=>{c.stop(),J&&J.active&&rs(J.effects,c)};if(i&&t){const j=t;t=(...te)=>{j(...te),z()}}let K=I?new Array(e.length).fill(Ln):Ln;const X=j=>{if(!(!(c.flags&1)||!c.dirty&&!j))if(t){const te=c.run();if(r||V||(I?te.some((le,we)=>nt(le,K[we])):nt(te,K))){S&&S();const le=At;At=c;try{const we=[te,K===Ln?void 0:I&&K[0]===Ln?[]:K,k];K=te,l?l(t,3,we):t(...we)}finally{At=le}}}else c.run()};return a&&a(X),c=new rr(g),c.scheduler=o?()=>o(X,!1):X,k=j=>ia(j,!1,c),S=c.onStop=()=>{const j=Bn.get(c);if(j){if(l)l(j,4);else for(const te of j)te();Bn.delete(c)}},t?s?X(!0):K=c.run():o?o(X.bind(null,!0),!0):c.run(),z.pause=c.pause.bind(c),z.resume=c.resume.bind(c),z.stop=z,z}function ot(e,t=1/0,n){if(t<=0||!ae(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ee(e))ot(e.value,t,n);else if(H(e))for(let s=0;s<e.length;s++)ot(e[s],t,n);else if(Bt(e)||Lt(e))e.forEach(s=>{ot(s,t,n)});else if(Qs(e)){for(const s in e)ot(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&ot(e[s],t,n)}return e}/**
11
11
  * @vue/runtime-core v3.5.34
12
12
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
13
13
  * @license MIT
14
- **/const Jt=[];let ks=!1;function Lm(e,...t){if(ks)return;ks=!0,We();const n=Jt.length?Jt[Jt.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=ia();if(s)$t(s,n,11,[e+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,r.map(({vnode:i})=>`at <${Bi(n,i.type)}>`).join(`
14
+ **/const Qt=[];let ks=!1;function Pm(e,...t){if(ks)return;ks=!0,qe();const n=Qt.length?Qt[Qt.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=aa();if(s)$t(s,n,11,[e+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,r.map(({vnode:i})=>`at <${Li(n,i.type)}>`).join(`
15
15
  `),r]);else{const i=[`[Vue warn]: ${e}`,...t];r.length&&i.push(`
16
- `,...oa(r)),console.warn(...i)}qe(),ks=!1}function ia(){let e=Jt[Jt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function oa(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
17
- `],...aa(n))}),t}function aa({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Bi(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...la(e.props),i]:[r+i]}function la(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Cr(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Cr(e,t,n){return he(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Me(t)?(t=Cr(e,ie(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):G(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ie(t),n?t:[`${e}=`,t])}function $t(e,t,n,s){try{return s?e(...s):e()}catch(r){Rn(r,t,n)}}function Ve(e,t,n,s){if(G(e)){const r=$t(e,t,n,s);return r&&Ys(r)&&r.catch(i=>{Rn(i,t,n)}),r}if(H(e)){const r=[];for(let i=0;i<e.length;i++)r.push(Ve(e[i],t,n,s));return r}}function Rn(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ce;if(t){let a=t.parent;const l=t.proxy,f=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let g=0;g<c.length;g++)if(c[g](e,l,f)===!1)return}a=a.parent}if(i){We(),$t(i,null,10,[e,l,f]),qe();return}}ca(e,n,r,s,o)}function ca(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const Be=[];let Ge=-1;const Ft=[];let mt=null,Pt=0;const Sr=Promise.resolve();let Ln=null;function Ar(e){const t=Ln||Sr;return e?t.then(this?e.bind(this):e):t}function ua(e){let t=Ge+1,n=Be.length;for(;t<n;){const s=t+n>>>1,r=Be[s],i=Xt(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function Cs(e){if(!(e.flags&1)){const t=Xt(e),n=Be[Be.length-1];!n||!(e.flags&2)&&t>=Xt(n)?Be.push(e):Be.splice(ua(t),0,e),e.flags|=1,xr()}}function xr(){Ln||(Ln=Sr.then(Er))}function da(e){H(e)?Ft.push(...e):mt&&e.id===-1?mt.splice(Pt+1,0,e):e.flags&1||(Ft.push(e),e.flags|=1),xr()}function Tr(e,t,n=Ge+1){for(;n<Be.length;n++){const s=Be[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Be.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Mr(e){if(Ft.length){const t=[...new Set(Ft)].sort((n,s)=>Xt(n)-Xt(s));if(Ft.length=0,mt){mt.push(...t);return}for(mt=t,Pt=0;Pt<mt.length;Pt++){const n=mt[Pt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}mt=null,Pt=0}}const Xt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Er(e){try{for(Ge=0;Ge<Be.length;Ge++){const t=Be[Ge];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),$t(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ge<Be.length;Ge++){const t=Be[Ge];t&&(t.flags&=-2)}Ge=-1,Be.length=0,Mr(),Ln=null,(Be.length||Ft.length)&&Er()}}let Se=null,Or=null;function Nn(e){const t=Se;return Se=e,Or=e&&e.type.__scopeId||null,t}function Ir(e,t=Se,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Kn(-1);const i=Nn(t);let o;try{o=e(...r)}finally{Nn(i),s._d&&Kn(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function ot(e,t){if(Se===null)return e;const n=Yn(Se),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,a,l=ce]=t[r];i&&(G(i)&&(i={mounted:i,updated:i}),i.deep&&it(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Ct(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const a=r[o];i&&(a.oldValue=i[o].value);let l=a.dir[s];l&&(We(),Ve(l,n,8,[e.el,a,e,t]),qe())}}function fa(e,t){if(Oe){let n=Oe.provides;const s=Oe.parent&&Oe.parent.provides;s===n&&(n=Oe.provides=Object.create(s)),n[e]=t}}function $n(e,t,n=!1){const s=xi();if(s||jt){let r=jt?jt._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&G(t)?t.call(s&&s.proxy):t}}const ha=Symbol.for("v-scx"),ma=()=>$n(ha);function Ss(e,t,n){return Br(e,t,n)}function Br(e,t,n=ce){const{immediate:s,deep:r,flush:i,once:o}=n,a=ke({},n),l=t&&s||!t&&i!=="post";let f;if(ln){if(i==="sync"){const k=ma();f=k.__watcherHandles||(k.__watcherHandles=[])}else if(!l){const k=()=>{};return k.stop=Ke,k.resume=Ke,k.pause=Ke,k}}const c=Oe;a.call=(k,D,O)=>Ve(k,c,D,O);let g=!1;i==="post"?a.scheduler=k=>{Ne(k,c&&c.suspense)}:i!=="sync"&&(g=!0,a.scheduler=(k,D)=>{D?k():Cs(k)}),a.augmentJob=k=>{t&&(k.flags|=4),g&&(k.flags|=2,c&&(k.id=c.uid,k.i=c))};const A=ra(e,t,a);return ln&&(f?f.push(A):l&&A()),A}function pa(e,t,n){const s=this.proxy,r=he(e)?e.includes(".")?Rr(s,e):()=>s[e]:e.bind(s,s);let i;G(t)?i=t:(i=t.handler,n=t);const o=an(this),a=Br(r,i.bind(s),n);return o(),a}function Rr(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const ga=Symbol("_vte"),Lr=e=>e.__isTeleport,Ye=Symbol("_leaveCb"),Qt=Symbol("_enterCb");function _a(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Wr(()=>{e.isMounted=!0}),qr(()=>{e.isUnmounting=!0}),e}const De=[Function,Array],Nr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:De,onEnter:De,onAfterEnter:De,onEnterCancelled:De,onBeforeLeave:De,onLeave:De,onAfterLeave:De,onLeaveCancelled:De,onBeforeAppear:De,onAppear:De,onAfterAppear:De,onAppearCancelled:De},$r=e=>{const t=e.subTree;return t.component?$r(t.component):t},ya={name:"BaseTransition",props:Nr,setup(e,{slots:t}){const n=xi(),s=_a();return()=>{const r=t.default&&jr(t.default(),!0),i=r&&r.length?Fr(r):n.subTree?$():void 0;if(!i)return;const o=ie(e),{mode:a}=o;if(s.isLeaving)return xs(i);const l=Dr(i);if(!l)return xs(i);let f=As(l,o,s,n,g=>f=g);l.type!==Ee&&Zt(l,f);let c=n.subTree&&Dr(n.subTree);if(c&&c.type!==Ee&&!At(c,l)&&$r(n).type!==Ee){let g=As(c,o,s,n);if(Zt(c,g),a==="out-in"&&l.type!==Ee)return s.isLeaving=!0,g.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete g.afterLeave,c=void 0},xs(i);a==="in-out"&&l.type!==Ee?g.delayLeave=(A,k,D)=>{const O=Pr(s,c);O[String(c.key)]=c,A[Ye]=()=>{k(),A[Ye]=void 0,delete f.delayedLeave,c=void 0},f.delayedLeave=()=>{D(),delete f.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function Fr(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ee){t=n;break}}return t}const va=ya;function Pr(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function As(e,t,n,s,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:f,onAfterEnter:c,onEnterCancelled:g,onBeforeLeave:A,onLeave:k,onAfterLeave:D,onLeaveCancelled:O,onBeforeAppear:Y,onAppear:W,onAfterAppear:V,onAppearCancelled:J}=t,j=String(e.key),Q=Pr(n,e),ge=(q,se)=>{q&&Ve(q,s,9,se)},ye=(q,se)=>{const le=se[1];ge(q,se),H(q)?q.every(h=>h.length<=1)&&le():q.length<=1&&le()},ve={mode:o,persisted:a,beforeEnter(q){let se=l;if(!n.isMounted)if(i)se=Y||l;else return;q[Ye]&&q[Ye](!0);const le=Q[j];le&&At(e,le)&&le.el[Ye]&&le.el[Ye](),ge(se,[q])},enter(q){if(Q[j]===e)return;let se=f,le=c,h=g;if(!n.isMounted)if(i)se=W||f,le=V||c,h=J||g;else return;let v=!1;q[Qt]=I=>{v||(v=!0,I?ge(h,[q]):ge(le,[q]),ve.delayedLeave&&ve.delayedLeave(),q[Qt]=void 0)};const C=q[Qt].bind(null,!1);se?ye(se,[q,C]):C()},leave(q,se){const le=String(e.key);if(q[Qt]&&q[Qt](!0),n.isUnmounting)return se();ge(A,[q]);let h=!1;q[Ye]=C=>{h||(h=!0,se(),C?ge(O,[q]):ge(D,[q]),q[Ye]=void 0,Q[le]===e&&delete Q[le])};const v=q[Ye].bind(null,!1);Q[le]=e,k?ye(k,[q,v]):v()},clone(q){const se=As(q,t,n,s,r);return r&&r(se),se}};return ve}function xs(e){if(Pn(e))return e=pt(e),e.children=null,e}function Dr(e){if(!Pn(e))return Lr(e.type)&&e.children?Fr(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&G(n.default))return n.default()}}function Zt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Zt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function jr(e,t=!1,n){let s=[],r=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===X?(o.patchFlag&128&&r++,s=s.concat(jr(o.children,t,a))):(t||o.type!==Ee)&&s.push(a!=null?pt(o,{key:a}):o)}if(r>1)for(let i=0;i<s.length;i++)s[i].patchFlag=-2;return s}function Ur(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Hr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Fn=new WeakMap;function en(e,t,n,s,r=!1){if(H(e)){e.forEach((O,Y)=>en(O,t&&(H(t)?t[Y]:t),n,s,r));return}if(Dt(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&en(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Yn(s.component):s.el,o=r?null:i,{i:a,r:l}=e,f=t&&t.r,c=a.refs===ce?a.refs={}:a.refs,g=a.setupState,A=ie(g),k=g===ce?zs:O=>Hr(c,O)?!1:oe(A,O),D=(O,Y)=>!(Y&&Hr(c,Y));if(f!=null&&f!==l){if(Vr(t),he(f))c[f]=null,k(f)&&(g[f]=null);else if(Me(f)){const O=t;D(f,O.k)&&(f.value=null),O.k&&(c[O.k]=null)}}if(G(l))$t(l,a,12,[o,c]);else{const O=he(l),Y=Me(l);if(O||Y){const W=()=>{if(e.f){const V=O?k(l)?g[l]:c[l]:D()||!e.k?l.value:c[e.k];if(r)H(V)&&rs(V,i);else if(H(V))V.includes(i)||V.push(i);else if(O)c[l]=[i],k(l)&&(g[l]=c[l]);else{const J=[i];D(l,e.k)&&(l.value=J),e.k&&(c[e.k]=J)}}else O?(c[l]=o,k(l)&&(g[l]=o)):Y&&(D(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const V=()=>{W(),Fn.delete(e)};V.id=-1,Fn.set(e,V),Ne(V,n)}else Vr(e),W()}}}function Vr(e){const t=Fn.get(e);t&&(t.flags|=8,Fn.delete(e))}Sn().requestIdleCallback,Sn().cancelIdleCallback;const Dt=e=>!!e.type.__asyncLoader,Pn=e=>e.type.__isKeepAlive;function ba(e,t){Kr(e,"a",t)}function wa(e,t){Kr(e,"da",t)}function Kr(e,t,n=Oe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Dn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Pn(r.parent.vnode)&&ka(s,t,n,r),r=r.parent}}function ka(e,t,n,s){const r=Dn(t,e,s,!0);zr(()=>{rs(s[t],r)},n)}function Dn(e,t,n=Oe,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{We();const a=an(n),l=Ve(t,n,e,o);return a(),qe(),l});return s?r.unshift(i):r.push(i),i}}const at=e=>(t,n=Oe)=>{(!ln||e==="sp")&&Dn(e,(...s)=>t(...s),n)},Ca=at("bm"),Wr=at("m"),Sa=at("bu"),Aa=at("u"),qr=at("bum"),zr=at("um"),xa=at("sp"),Ta=at("rtg"),Ma=at("rtc");function Ea(e,t=Oe){Dn("ec",e,t)}const Gr="components";function me(e,t){return Jr(Gr,e,!0,t)||e}const Yr=Symbol.for("v-ndc");function Oa(e){return he(e)?Jr(Gr,e,!1)||e:e||Yr}function Jr(e,t,n=!0,s=!1){const r=Se||Oe;if(r){const i=r.type;{const a=Ii(i,!1);if(a&&(a===t||a===Ie(t)||a===wn(Ie(t))))return i}const o=Xr(r[e]||i[e],t)||Xr(r.appContext[e],t);return!o&&s?i:o}}function Xr(e,t){return e&&(e[t]||e[Ie(t)]||e[wn(Ie(t))])}function Ae(e,t,n,s){let r;const i=n,o=H(e);if(o||he(e)){const a=o&&wt(e);let l=!1,f=!1;a&&(l=!He(e),f=ht(e),e=An(e)),r=new Array(e.length);for(let c=0,g=e.length;c<g;c++)r[c]=t(l?f?Nt(rt(e[c])):rt(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let a=0;a<e;a++)r[a]=t(a+1,a,void 0,i)}else if(ae(e))if(e[Symbol.iterator])r=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,f=a.length;l<f;l++){const c=a[l];r[l]=t(e[c],c,l,i)}}else r=[];return r}function Ia(e,t,n={},s,r){if(Se.ce||Se.parent&&Dt(Se.parent)&&Se.parent.ce){const f=Object.keys(n).length>0;return p(),pe(X,null,[_e("slot",n,s&&s())],f?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),p();const o=i&&Qr(i(n)),a=n.key||o&&o.key,l=pe(X,{key:(a&&!je(a)?a:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return i&&i._c&&(i._d=!0),l}function Qr(e){return e.some(t=>on(t)?!(t.type===Ee||t.type===X&&!Qr(t.children)):!0)?e:null}const Ts=e=>e?Mi(e)?Yn(e):Ts(e.parent):null,tn=ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ts(e.parent),$root:e=>Ts(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ni(e),$forceUpdate:e=>e.f||(e.f=()=>{Cs(e.update)}),$nextTick:e=>e.n||(e.n=Ar.bind(e.proxy)),$watch:e=>pa.bind(e)}),Ms=(e,t)=>e!==ce&&!e.__isScriptSetup&&oe(e,t),Ba={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const A=o[t];if(A!==void 0)switch(A){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Ms(s,t))return o[t]=1,s[t];if(r!==ce&&oe(r,t))return o[t]=2,r[t];if(oe(i,t))return o[t]=3,i[t];if(n!==ce&&oe(n,t))return o[t]=4,n[t];Es&&(o[t]=0)}}const f=tn[t];let c,g;if(f)return t==="$attrs"&&Te(e.attrs,"get",""),f(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==ce&&oe(n,t))return o[t]=4,n[t];if(g=l.config.globalProperties,oe(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Ms(r,t)?(r[t]=n,!0):s!==ce&&oe(s,t)?(s[t]=n,!0):oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},a){let l;return!!(n[a]||e!==ce&&a[0]!=="$"&&oe(e,a)||Ms(t,a)||oe(i,a)||oe(s,a)||oe(tn,a)||oe(r.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Zr(e){return H(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Es=!0;function Ra(e){const t=ni(e),n=e.proxy,s=e.ctx;Es=!1,t.beforeCreate&&ei(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:a,provide:l,inject:f,created:c,beforeMount:g,mounted:A,beforeUpdate:k,updated:D,activated:O,deactivated:Y,beforeDestroy:W,beforeUnmount:V,destroyed:J,unmounted:j,render:Q,renderTracked:ge,renderTriggered:ye,errorCaptured:ve,serverPrefetch:q,expose:se,inheritAttrs:le,components:h,directives:v,filters:C}=t;if(f&&La(f,s,null),o)for(const b in o){const S=o[b];G(S)&&(s[b]=S.bind(n))}if(r){const b=r.call(n,n);ae(b)&&(e.data=En(b))}if(Es=!0,i)for(const b in i){const S=i[b],B=G(S)?S.bind(n,n):G(S.get)?S.get.bind(n,n):Ke,te=!G(S)&&G(S.set)?S.set.bind(n):Ke,ee=yl({get:B,set:te});Object.defineProperty(s,b,{enumerable:!0,configurable:!0,get:()=>ee.value,set:Z=>ee.value=Z})}if(a)for(const b in a)ti(a[b],s,n,b);if(l){const b=G(l)?l.call(n):l;Reflect.ownKeys(b).forEach(S=>{fa(S,b[S])})}c&&ei(c,e,"c");function y(b,S){H(S)?S.forEach(B=>b(B.bind(n))):S&&b(S.bind(n))}if(y(Ca,g),y(Wr,A),y(Sa,k),y(Aa,D),y(ba,O),y(wa,Y),y(Ea,ve),y(Ma,ge),y(Ta,ye),y(qr,V),y(zr,j),y(xa,q),H(se))if(se.length){const b=e.exposed||(e.exposed={});se.forEach(S=>{Object.defineProperty(b,S,{get:()=>n[S],set:B=>n[S]=B,enumerable:!0})})}else e.exposed||(e.exposed={});Q&&e.render===Ke&&(e.render=Q),le!=null&&(e.inheritAttrs=le),h&&(e.components=h),v&&(e.directives=v),q&&Ur(e)}function La(e,t,n=Ke){H(e)&&(e=Os(e));for(const s in e){const r=e[s];let i;ae(r)?"default"in r?i=$n(r.from||s,r.default,!0):i=$n(r.from||s):i=$n(r),Me(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function ei(e,t,n){Ve(H(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ti(e,t,n,s){let r=s.includes(".")?Rr(n,s):()=>n[s];if(he(e)){const i=t[e];G(i)&&Ss(r,i)}else if(G(e))Ss(r,e.bind(n));else if(ae(e))if(H(e))e.forEach(i=>ti(i,t,n,s));else{const i=G(e.handler)?e.handler.bind(n):t[e.handler];G(i)&&Ss(r,i,e)}}function ni(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!r.length&&!n&&!s?l=t:(l={},r.length&&r.forEach(f=>jn(l,f,o,!0)),jn(l,t,o)),ae(t)&&i.set(t,l),l}function jn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&jn(e,i,n,!0),r&&r.forEach(o=>jn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const a=Na[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Na={data:si,props:ri,emits:ri,methods:nn,computed:nn,beforeCreate:Re,created:Re,beforeMount:Re,mounted:Re,beforeUpdate:Re,updated:Re,beforeDestroy:Re,beforeUnmount:Re,destroyed:Re,unmounted:Re,activated:Re,deactivated:Re,errorCaptured:Re,serverPrefetch:Re,components:nn,directives:nn,watch:Fa,provide:si,inject:$a};function si(e,t){return t?e?function(){return ke(G(e)?e.call(this,this):e,G(t)?t.call(this,this):t)}:t:e}function $a(e,t){return nn(Os(e),Os(t))}function Os(e){if(H(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Re(e,t){return e?[...new Set([].concat(e,t))]:t}function nn(e,t){return e?ke(Object.create(null),e,t):t}function ri(e,t){return e?H(e)&&H(t)?[...new Set([...e,...t])]:ke(Object.create(null),Zr(e),Zr(t??{})):t}function Fa(e,t){if(!e)return t;if(!t)return e;const n=ke(Object.create(null),e);for(const s in t)n[s]=Re(e[s],t[s]);return n}function ii(){return{app:null,config:{isNativeTag:zs,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Pa=0;function Da(e,t){return function(s,r=null){G(s)||(s=ke({},s)),r!=null&&!ae(r)&&(r=null);const i=ii(),o=new WeakSet,a=[];let l=!1;const f=i.app={_uid:Pa++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:bl,get config(){return i.config},set config(c){},use(c,...g){return o.has(c)||(c&&G(c.install)?(o.add(c),c.install(f,...g)):G(c)&&(o.add(c),c(f,...g))),f},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),f},component(c,g){return g?(i.components[c]=g,f):i.components[c]},directive(c,g){return g?(i.directives[c]=g,f):i.directives[c]},mount(c,g,A){if(!l){const k=f._ceVNode||_e(s,r);return k.appContext=i,A===!0?A="svg":A===!1&&(A=void 0),e(k,c,A),l=!0,f._container=c,c.__vue_app__=f,Yn(k.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Ve(a,f._instance,16),e(null,f._container),delete f._container.__vue_app__)},provide(c,g){return i.provides[c]=g,f},runWithContext(c){const g=jt;jt=f;try{return c()}finally{jt=g}}};return f}}let jt=null;const ja=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ie(t)}Modifiers`]||e[`${ft(t)}Modifiers`];function Ua(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ce;let r=n;const i=t.startsWith("update:"),o=i&&ja(s,t.slice(7));o&&(o.trim&&(r=n.map(c=>he(c)?c.trim():c)),o.number&&(r=n.map(Cn)));let a,l=s[a=os(t)]||s[a=os(Ie(t))];!l&&i&&(l=s[a=os(ft(t))]),l&&Ve(l,e,6,r);const f=s[a+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ve(f,e,6,r)}}const Ha=new WeakMap;function oi(e,t,n=!1){const s=n?Ha:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},a=!1;if(!G(e)){const l=f=>{const c=oi(f,t,!0);c&&(a=!0,ke(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(ae(e)&&s.set(e,null),null):(H(i)?i.forEach(l=>o[l]=null):ke(o,i),ae(e)&&s.set(e,o),o)}function Un(e,t){return!e||!yn(t)?!1:(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,ft(t))||oe(e,t))}function Nm(){}function ai(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:l,render:f,renderCache:c,props:g,data:A,setupState:k,ctx:D,inheritAttrs:O}=e,Y=Nn(e);let W,V;try{if(n.shapeFlag&4){const j=r||s,Q=j;W=Je(f.call(Q,j,c,g,k,A,D)),V=a}else{const j=t;W=Je(j.length>1?j(g,{attrs:a,slots:o,emit:l}):j(g,null)),V=t.props?a:Va(a)}}catch(j){sn.length=0,Rn(j,e,1),W=_e(Ee)}let J=W;if(V&&O!==!1){const j=Object.keys(V),{shapeFlag:Q}=J;j.length&&Q&7&&(i&&j.some(vn)&&(V=Ka(V,i)),J=pt(J,V,!1,!0))}return n.dirs&&(J=pt(J,null,!1,!0),J.dirs=J.dirs?J.dirs.concat(n.dirs):n.dirs),n.transition&&Zt(J,n.transition),W=J,Nn(Y),W}const Va=e=>{let t;for(const n in e)(n==="class"||n==="style"||yn(n))&&((t||(t={}))[n]=e[n]);return t},Ka=(e,t)=>{const n={};for(const s in e)(!vn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Wa(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:a,patchFlag:l}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?li(s,o,f):!!o;if(l&8){const c=t.dynamicProps;for(let g=0;g<c.length;g++){const A=c[g];if(ci(o,s,A)&&!Un(f,A))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:s===o?!1:s?o?li(s,o,f):!0:!!o;return!1}function li(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(ci(t,e,i)&&!Un(n,i))return!0}return!1}function ci(e,t,n){const s=e[n],r=t[n];return n==="style"&&ae(s)&&ae(r)?!Rt(s,r):s!==r}function qa({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const ui={},di=()=>Object.create(ui),fi=e=>Object.getPrototypeOf(e)===ui;function za(e,t,n,s=!1){const r={},i=di();e.propsDefaults=Object.create(null),hi(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Qo(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Ga(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=ie(r),[l]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let g=0;g<c.length;g++){let A=c[g];if(Un(e.emitsOptions,A))continue;const k=t[A];if(l)if(oe(i,A))k!==i[A]&&(i[A]=k,f=!0);else{const D=Ie(A);r[D]=Is(l,a,D,k,e,!1)}else k!==i[A]&&(i[A]=k,f=!0)}}}else{hi(e,t,r,i)&&(f=!0);let c;for(const g in a)(!t||!oe(t,g)&&((c=ft(g))===g||!oe(t,c)))&&(l?n&&(n[g]!==void 0||n[c]!==void 0)&&(r[g]=Is(l,a,g,void 0,e,!0)):delete r[g]);if(i!==a)for(const g in i)(!t||!oe(t,g))&&(delete i[g],f=!0)}f&&nt(e.attrs,"set","")}function hi(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Kt(l))continue;const f=t[l];let c;r&&oe(r,c=Ie(l))?!i||!i.includes(c)?n[c]=f:(a||(a={}))[c]=f:Un(e.emitsOptions,l)||(!(l in s)||f!==s[l])&&(s[l]=f,o=!0)}if(i){const l=ie(n),f=a||ce;for(let c=0;c<i.length;c++){const g=i[c];n[g]=Is(r,l,g,f[g],e,!oe(f,g))}}return o}function Is(e,t,n,s,r,i){const o=e[n];if(o!=null){const a=oe(o,"default");if(a&&s===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&G(l)){const{propsDefaults:f}=r;if(n in f)s=f[n];else{const c=an(r);s=f[n]=l.call(null,t),c()}}else s=l;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!a?s=!1:o[1]&&(s===""||s===ft(n))&&(s=!0))}return s}const Ya=new WeakMap;function mi(e,t,n=!1){const s=n?Ya:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},a=[];let l=!1;if(!G(e)){const c=g=>{l=!0;const[A,k]=mi(g,t,!0);ke(o,A),k&&a.push(...k)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return ae(e)&&s.set(e,Ot),Ot;if(H(i))for(let c=0;c<i.length;c++){const g=Ie(i[c]);pi(g)&&(o[g]=ce)}else if(i)for(const c in i){const g=Ie(c);if(pi(g)){const A=i[c],k=o[g]=H(A)||G(A)?{type:A}:ke({},A),D=k.type;let O=!1,Y=!0;if(H(D))for(let W=0;W<D.length;++W){const V=D[W],J=G(V)&&V.name;if(J==="Boolean"){O=!0;break}else J==="String"&&(Y=!1)}else O=G(D)&&D.name==="Boolean";k[0]=O,k[1]=Y,(O||oe(k,"default"))&&a.push(g)}}const f=[o,a];return ae(e)&&s.set(e,f),f}function pi(e){return e[0]!=="$"&&!Kt(e)}const Bs=e=>e==="_"||e==="_ctx"||e==="$stable",Rs=e=>H(e)?e.map(Je):[Je(e)],Ja=(e,t,n)=>{if(t._n)return t;const s=Ir((...r)=>Rs(t(...r)),n);return s._c=!1,s},gi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Bs(r))continue;const i=e[r];if(G(i))t[r]=Ja(r,i,s);else if(i!=null){const o=Rs(i);t[r]=()=>o}}},_i=(e,t)=>{const n=Rs(t);e.slots.default=()=>n},yi=(e,t,n)=>{for(const s in t)(n||!Bs(s))&&(e[s]=t[s])},Xa=(e,t,n)=>{const s=e.slots=di();if(e.vnode.shapeFlag&32){const r=t._;r?(yi(s,t,n),n&&Qs(s,"_",r,!0)):gi(t,s)}else t&&_i(e,t)},Qa=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ce;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:yi(r,t,n):(i=!t.$stable,gi(t,r)),o=t}else t&&(_i(e,t),o={default:1});if(i)for(const a in r)!Bs(a)&&o[a]==null&&delete r[a]},Ne=sl;function Za(e){return el(e)}function el(e,t){const n=Sn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:a,createComment:l,setText:f,setElementText:c,parentNode:g,nextSibling:A,setScopeId:k=Ke,insertStaticContent:D}=e,O=(d,m,w,E=null,x=null,T=null,N=void 0,L=null,R=!!m.dynamicChildren)=>{if(d===m)return;d&&!At(d,m)&&(E=ns(d),Z(d,x,T,!0),d=null),m.patchFlag===-2&&(R=!1,m.dynamicChildren=null);const{type:M,ref:K,shapeFlag:F}=m;switch(M){case Hn:Y(d,m,w,E);break;case Ee:W(d,m,w,E);break;case Vn:d==null&&V(m,w,E,N);break;case X:h(d,m,w,E,x,T,N,L,R);break;default:F&1?Q(d,m,w,E,x,T,N,L,R):F&6?v(d,m,w,E,x,T,N,L,R):(F&64||F&128)&&M.process(d,m,w,E,x,T,N,L,R,gn)}K!=null&&x?en(K,d&&d.ref,T,m||d,!m):K==null&&d&&d.ref!=null&&en(d.ref,null,T,d,!0)},Y=(d,m,w,E)=>{if(d==null)s(m.el=a(m.children),w,E);else{const x=m.el=d.el;m.children!==d.children&&f(x,m.children)}},W=(d,m,w,E)=>{d==null?s(m.el=l(m.children||""),w,E):m.el=d.el},V=(d,m,w,E)=>{[d.el,d.anchor]=D(d.children,m,w,E,d.el,d.anchor)},J=({el:d,anchor:m},w,E)=>{let x;for(;d&&d!==m;)x=A(d),s(d,w,E),d=x;s(m,w,E)},j=({el:d,anchor:m})=>{let w;for(;d&&d!==m;)w=A(d),r(d),d=w;r(m)},Q=(d,m,w,E,x,T,N,L,R)=>{if(m.type==="svg"?N="svg":m.type==="math"&&(N="mathml"),d==null)ge(m,w,E,x,T,N,L,R);else{const M=d.el&&d.el._isVueCE?d.el:null;try{M&&M._beginPatch(),q(d,m,x,T,N,L,R)}finally{M&&M._endPatch()}}},ge=(d,m,w,E,x,T,N,L)=>{let R,M;const{props:K,shapeFlag:F,transition:U,dirs:z}=d;if(R=d.el=o(d.type,T,K&&K.is,K),F&8?c(R,d.children):F&16&&ve(d.children,R,null,E,x,Ls(d,T),N,L),z&&Ct(d,null,E,"created"),ye(R,d,d.scopeId,N,E),K){for(const ue in K)ue!=="value"&&!Kt(ue)&&i(R,ue,null,K[ue],T,E);"value"in K&&i(R,"value",null,K.value,T),(M=K.onVnodeBeforeMount)&&Xe(M,E,d)}z&&Ct(d,null,E,"beforeMount");const re=tl(x,U);re&&U.beforeEnter(R),s(R,m,w),((M=K&&K.onVnodeMounted)||re||z)&&Ne(()=>{try{M&&Xe(M,E,d),re&&U.enter(R),z&&Ct(d,null,E,"mounted")}finally{}},x)},ye=(d,m,w,E,x)=>{if(w&&k(d,w),E)for(let T=0;T<E.length;T++)k(d,E[T]);if(x){let T=x.subTree;if(m===T||Ci(T.type)&&(T.ssContent===m||T.ssFallback===m)){const N=x.vnode;ye(d,N,N.scopeId,N.slotScopeIds,x.parent)}}},ve=(d,m,w,E,x,T,N,L,R=0)=>{for(let M=R;M<d.length;M++){const K=d[M]=L?lt(d[M]):Je(d[M]);O(null,K,m,w,E,x,T,N,L)}},q=(d,m,w,E,x,T,N)=>{const L=m.el=d.el;let{patchFlag:R,dynamicChildren:M,dirs:K}=m;R|=d.patchFlag&16;const F=d.props||ce,U=m.props||ce;let z;if(w&&St(w,!1),(z=U.onVnodeBeforeUpdate)&&Xe(z,w,m,d),K&&Ct(m,d,w,"beforeUpdate"),w&&St(w,!0),(F.innerHTML&&U.innerHTML==null||F.textContent&&U.textContent==null)&&c(L,""),M?se(d.dynamicChildren,M,L,w,E,Ls(m,x),T):N||S(d,m,L,null,w,E,Ls(m,x),T,!1),R>0){if(R&16)le(L,F,U,w,x);else if(R&2&&F.class!==U.class&&i(L,"class",null,U.class,x),R&4&&i(L,"style",F.style,U.style,x),R&8){const re=m.dynamicProps;for(let ue=0;ue<re.length;ue++){const fe=re[ue],we=F[fe],xe=U[fe];(xe!==we||fe==="value")&&i(L,fe,we,xe,x,w)}}R&1&&d.children!==m.children&&c(L,m.children)}else!N&&M==null&&le(L,F,U,w,x);((z=U.onVnodeUpdated)||K)&&Ne(()=>{z&&Xe(z,w,m,d),K&&Ct(m,d,w,"updated")},E)},se=(d,m,w,E,x,T,N)=>{for(let L=0;L<m.length;L++){const R=d[L],M=m[L],K=R.el&&(R.type===X||!At(R,M)||R.shapeFlag&198)?g(R.el):w;O(R,M,K,null,E,x,T,N,!0)}},le=(d,m,w,E,x)=>{if(m!==w){if(m!==ce)for(const T in m)!Kt(T)&&!(T in w)&&i(d,T,m[T],null,x,E);for(const T in w){if(Kt(T))continue;const N=w[T],L=m[T];N!==L&&T!=="value"&&i(d,T,L,N,x,E)}"value"in w&&i(d,"value",m.value,w.value,x)}},h=(d,m,w,E,x,T,N,L,R)=>{const M=m.el=d?d.el:a(""),K=m.anchor=d?d.anchor:a("");let{patchFlag:F,dynamicChildren:U,slotScopeIds:z}=m;z&&(L=L?L.concat(z):z),d==null?(s(M,w,E),s(K,w,E),ve(m.children||[],w,K,x,T,N,L,R)):F>0&&F&64&&U&&d.dynamicChildren&&d.dynamicChildren.length===U.length?(se(d.dynamicChildren,U,w,x,T,N,L),(m.key!=null||x&&m===x.subTree)&&vi(d,m,!0)):S(d,m,w,K,x,T,N,L,R)},v=(d,m,w,E,x,T,N,L,R)=>{m.slotScopeIds=L,d==null?m.shapeFlag&512?x.ctx.activate(m,w,E,N,R):C(m,w,E,x,T,N,R):I(d,m,R)},C=(d,m,w,E,x,T,N)=>{const L=d.component=ul(d,E,x);if(Pn(d)&&(L.ctx.renderer=gn),dl(L,!1,N),L.asyncDep){if(x&&x.registerDep(L,y,N),!d.el){const R=L.subTree=_e(Ee);W(null,R,m,w),d.placeholder=R.el}}else y(L,d,m,w,x,T,N)},I=(d,m,w)=>{const E=m.component=d.component;if(Wa(d,m,w))if(E.asyncDep&&!E.asyncResolved){b(E,m,w);return}else E.next=m,E.update();else m.el=d.el,E.vnode=m},y=(d,m,w,E,x,T,N)=>{const L=()=>{if(d.isMounted){let{next:F,bu:U,u:z,parent:re,vnode:ue}=d;{const Ze=bi(d);if(Ze){F&&(F.el=ue.el,b(d,F,N)),Ze.asyncDep.then(()=>{Ne(()=>{d.isUnmounted||M()},x)});return}}let fe=F,we;St(d,!1),F?(F.el=ue.el,b(d,F,N)):F=ue,U&&kn(U),(we=F.props&&F.props.onVnodeBeforeUpdate)&&Xe(we,re,F,ue),St(d,!0);const xe=ai(d),Qe=d.subTree;d.subTree=xe,O(Qe,xe,g(Qe.el),ns(Qe),d,x,T),F.el=xe.el,fe===null&&qa(d,xe.el),z&&Ne(z,x),(we=F.props&&F.props.onVnodeUpdated)&&Ne(()=>Xe(we,re,F,ue),x)}else{let F;const{el:U,props:z}=m,{bm:re,m:ue,parent:fe,root:we,type:xe}=d,Qe=Dt(m);St(d,!1),re&&kn(re),!Qe&&(F=z&&z.onVnodeBeforeMount)&&Xe(F,fe,m),St(d,!0);{we.ce&&we.ce._hasShadowRoot()&&we.ce._injectChildStyle(xe,d.parent?d.parent.type:void 0);const Ze=d.subTree=ai(d);O(null,Ze,w,E,d,x,T),m.el=Ze.el}if(ue&&Ne(ue,x),!Qe&&(F=z&&z.onVnodeMounted)){const Ze=m;Ne(()=>Xe(F,fe,Ze),x)}(m.shapeFlag&256||fe&&Dt(fe.vnode)&&fe.vnode.shapeFlag&256)&&d.a&&Ne(d.a,x),d.isMounted=!0,m=w=E=null}};d.scope.on();const R=d.effect=new sr(L);d.scope.off();const M=d.update=R.run.bind(R),K=d.job=R.runIfDirty.bind(R);K.i=d,K.id=d.uid,R.scheduler=()=>Cs(K),St(d,!0),M()},b=(d,m,w)=>{m.component=d;const E=d.vnode.props;d.vnode=m,d.next=null,Ga(d,m.props,E,w),Qa(d,m.children,w),We(),Tr(d),qe()},S=(d,m,w,E,x,T,N,L,R=!1)=>{const M=d&&d.children,K=d?d.shapeFlag:0,F=m.children,{patchFlag:U,shapeFlag:z}=m;if(U>0){if(U&128){te(M,F,w,E,x,T,N,L,R);return}else if(U&256){B(M,F,w,E,x,T,N,L,R);return}}z&8?(K&16&&pn(M,x,T),F!==M&&c(w,F)):K&16?z&16?te(M,F,w,E,x,T,N,L,R):pn(M,x,T,!0):(K&8&&c(w,""),z&16&&ve(F,w,E,x,T,N,L,R))},B=(d,m,w,E,x,T,N,L,R)=>{d=d||Ot,m=m||Ot;const M=d.length,K=m.length,F=Math.min(M,K);let U;for(U=0;U<F;U++){const z=m[U]=R?lt(m[U]):Je(m[U]);O(d[U],z,w,null,x,T,N,L,R)}M>K?pn(d,x,T,!0,!1,F):ve(m,w,E,x,T,N,L,R,F)},te=(d,m,w,E,x,T,N,L,R)=>{let M=0;const K=m.length;let F=d.length-1,U=K-1;for(;M<=F&&M<=U;){const z=d[M],re=m[M]=R?lt(m[M]):Je(m[M]);if(At(z,re))O(z,re,w,null,x,T,N,L,R);else break;M++}for(;M<=F&&M<=U;){const z=d[F],re=m[U]=R?lt(m[U]):Je(m[U]);if(At(z,re))O(z,re,w,null,x,T,N,L,R);else break;F--,U--}if(M>F){if(M<=U){const z=U+1,re=z<K?m[z].el:E;for(;M<=U;)O(null,m[M]=R?lt(m[M]):Je(m[M]),w,re,x,T,N,L,R),M++}}else if(M>U)for(;M<=F;)Z(d[M],x,T,!0),M++;else{const z=M,re=M,ue=new Map;for(M=re;M<=U;M++){const Fe=m[M]=R?lt(m[M]):Je(m[M]);Fe.key!=null&&ue.set(Fe.key,M)}let fe,we=0;const xe=U-re+1;let Qe=!1,Ze=0;const _n=new Array(xe);for(M=0;M<xe;M++)_n[M]=0;for(M=z;M<=F;M++){const Fe=d[M];if(we>=xe){Z(Fe,x,T,!0);continue}let et;if(Fe.key!=null)et=ue.get(Fe.key);else for(fe=re;fe<=U;fe++)if(_n[fe-re]===0&&At(Fe,m[fe])){et=fe;break}et===void 0?Z(Fe,x,T,!0):(_n[et-re]=M+1,et>=Ze?Ze=et:Qe=!0,O(Fe,m[et],w,null,x,T,N,L,R),we++)}const yo=Qe?nl(_n):Ot;for(fe=yo.length-1,M=xe-1;M>=0;M--){const Fe=re+M,et=m[Fe],vo=m[Fe+1],bo=Fe+1<K?vo.el||ki(vo):E;_n[M]===0?O(null,et,w,bo,x,T,N,L,R):Qe&&(fe<0||M!==yo[fe]?ee(et,w,bo,2):fe--)}}},ee=(d,m,w,E,x=null)=>{const{el:T,type:N,transition:L,children:R,shapeFlag:M}=d;if(M&6){ee(d.component.subTree,m,w,E);return}if(M&128){d.suspense.move(m,w,E);return}if(M&64){N.move(d,m,w,gn);return}if(N===X){s(T,m,w);for(let F=0;F<R.length;F++)ee(R[F],m,w,E);s(d.anchor,m,w);return}if(N===Vn){J(d,m,w);return}if(E!==2&&M&1&&L)if(E===0)L.beforeEnter(T),s(T,m,w),Ne(()=>L.enter(T),x);else{const{leave:F,delayLeave:U,afterLeave:z}=L,re=()=>{d.ctx.isUnmounted?r(T):s(T,m,w)},ue=()=>{T._isLeaving&&T[Ye](!0),F(T,()=>{re(),z&&z()})};U?U(T,re,ue):ue()}else s(T,m,w)},Z=(d,m,w,E=!1,x=!1)=>{const{type:T,props:N,ref:L,children:R,dynamicChildren:M,shapeFlag:K,patchFlag:F,dirs:U,cacheIndex:z,memo:re}=d;if(F===-2&&(x=!1),L!=null&&(We(),en(L,null,w,d,!0),qe()),z!=null&&(m.renderCache[z]=void 0),K&256){m.ctx.deactivate(d);return}const ue=K&1&&U,fe=!Dt(d);let we;if(fe&&(we=N&&N.onVnodeBeforeUnmount)&&Xe(we,m,d),K&6)Im(d.component,w,E);else{if(K&128){d.suspense.unmount(w,E);return}ue&&Ct(d,null,m,"beforeUnmount"),K&64?d.type.remove(d,m,w,gn,E):M&&!M.hasOnce&&(T!==X||F>0&&F&64)?pn(M,m,w,!1,!0):(T===X&&F&384||!x&&K&16)&&pn(R,m,w),E&&ts(d)}const xe=re!=null&&z==null;(fe&&(we=N&&N.onVnodeUnmounted)||ue||xe)&&Ne(()=>{we&&Xe(we,m,d),ue&&Ct(d,null,m,"unmounted"),xe&&(d.el=null)},w)},ts=d=>{const{type:m,el:w,anchor:E,transition:x}=d;if(m===X){Om(w,E);return}if(m===Vn){j(d);return}const T=()=>{r(w),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(d.shapeFlag&1&&x&&!x.persisted){const{leave:N,delayLeave:L}=x,R=()=>N(w,T);L?L(d.el,T,R):R()}else T()},Om=(d,m)=>{let w;for(;d!==m;)w=A(d),r(d),d=w;r(m)},Im=(d,m,w)=>{const{bum:E,scope:x,job:T,subTree:N,um:L,m:R,a:M}=d;wi(R),wi(M),E&&kn(E),x.stop(),T&&(T.flags|=8,Z(N,d,m,w)),L&&Ne(L,m),Ne(()=>{d.isUnmounted=!0},m)},pn=(d,m,w,E=!1,x=!1,T=0)=>{for(let N=T;N<d.length;N++)Z(d[N],m,w,E,x)},ns=d=>{if(d.shapeFlag&6)return ns(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const m=A(d.anchor||d.el),w=m&&m[ga];return w?A(w):m};let qs=!1;const _o=(d,m,w)=>{let E;d==null?m._vnode&&(Z(m._vnode,null,null,!0),E=m._vnode.component):O(m._vnode||null,d,m,null,null,null,w),m._vnode=d,qs||(qs=!0,Tr(E),Mr(),qs=!1)},gn={p:O,um:Z,m:ee,r:ts,mt:C,mc:ve,pc:S,pbc:se,n:ns,o:e};return{render:_o,hydrate:void 0,createApp:Da(_o)}}function Ls({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function St({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function tl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vi(e,t,n=!1){const s=e.children,r=t.children;if(H(s)&&H(r))for(let i=0;i<s.length;i++){const o=s[i];let a=r[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[i]=lt(r[i]),a.el=o.el),!n&&a.patchFlag!==-2&&vi(o,a)),a.type===Hn&&(a.patchFlag===-1&&(a=r[i]=lt(a)),a.el=o.el),a.type===Ee&&!a.el&&(a.el=o.el)}}function nl(e){const t=e.slice(),n=[0];let s,r,i,o,a;const l=e.length;for(s=0;s<l;s++){const f=e[s];if(f!==0){if(r=n[n.length-1],e[r]<f){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<f?i=a+1:o=a;f<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function bi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:bi(t)}function wi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ki(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ki(t.subTree):null}const Ci=e=>e.__isSuspense;function sl(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):da(e)}const X=Symbol.for("v-fgt"),Hn=Symbol.for("v-txt"),Ee=Symbol.for("v-cmt"),Vn=Symbol.for("v-stc"),sn=[];let $e=null;function p(e=!1){sn.push($e=e?null:[])}function rl(){sn.pop(),$e=sn[sn.length-1]||null}let rn=1;function Kn(e,t=!1){rn+=e,e<0&&$e&&t&&($e.hasOnce=!0)}function Si(e){return e.dynamicChildren=rn>0?$e||Ot:null,rl(),rn>0&&$e&&$e.push(e),e}function _(e,t,n,s,r,i){return Si(u(e,t,n,s,r,i,!0))}function pe(e,t,n,s,r){return Si(_e(e,t,n,s,r,!0))}function on(e){return e?e.__v_isVNode===!0:!1}function At(e,t){return e.type===t.type&&e.key===t.key}const Ai=({key:e})=>e??null,Wn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?he(e)||Me(e)||G(e)?{i:Se,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,r=null,i=e===X?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ai(t),ref:t&&Wn(t),scopeId:Or,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Se};return a?(Ns(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=he(n)?8:16),rn>0&&!o&&$e&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&$e.push(l),l}const _e=il;function il(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Yr)&&(e=Ee),on(e)){const a=pt(e,t,!0);return n&&Ns(a,n),rn>0&&!i&&$e&&(a.shapeFlag&6?$e[$e.indexOf(e)]=a:$e.push(a)),a.patchFlag=-2,a}if(_l(e)&&(e=e.__vccOpts),t){t=ol(t);let{class:a,style:l}=t;a&&!he(a)&&(t.class=ne(a)),ae(l)&&(bs(l)&&!H(l)&&(l=ke({},l)),t.style=Pe(l))}const o=he(e)?1:Ci(e)?128:Lr(e)?64:ae(e)?4:G(e)?2:0;return u(e,t,n,s,r,o,i,!0)}function ol(e){return e?bs(e)||fi(e)?ke({},e):e:null}function pt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:l}=e,f=t?al(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Ai(f),ref:t&&t.ref?n&&i?H(i)?i.concat(Wn(t)):[i,Wn(t)]:Wn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==X?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&pt(e.ssContent),ssFallback:e.ssFallback&&pt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Zt(c,l.clone(c)),c}function qn(e=" ",t=0){return _e(Hn,null,e,t)}function zn(e,t){const n=_e(Vn,null,e);return n.staticCount=t,n}function $(e="",t=!1){return t?(p(),pe(Ee,null,e)):_e(Ee,null,e)}function Je(e){return e==null||typeof e=="boolean"?_e(Ee):H(e)?_e(X,null,e.slice()):on(e)?lt(e):_e(Hn,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:pt(e)}function Ns(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(H(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ns(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!fi(t)?t._ctx=Se:r===3&&Se&&(Se.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else G(t)?(t={default:t,_ctx:Se},n=32):(t=String(t),s&64?(n=16,t=[qn(t)]):n=8);e.children=t,e.shapeFlag|=n}function al(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=ne([t.class,s.class]));else if(r==="style")t.style=Pe([t.style,s.style]);else if(yn(r)){const i=t[r],o=s[r];o&&i!==o&&!(H(i)&&i.includes(o))?t[r]=i?[].concat(i,o):o:o==null&&i==null&&!vn(r)&&(t[r]=o)}else r!==""&&(t[r]=s[r])}return t}function Xe(e,t,n,s=null){Ve(e,t,7,[n,s])}const ll=ii();let cl=0;function ul(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||ll,i={uid:cl++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Bo(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:mi(s,r),emitsOptions:oi(s,r),emit:null,emitted:null,propsDefaults:ce,inheritAttrs:s.inheritAttrs,ctx:ce,data:ce,props:ce,attrs:ce,slots:ce,refs:ce,setupState:ce,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Ua.bind(null,i),e.ce&&e.ce(i),i}let Oe=null;const xi=()=>Oe||Se;let Gn,$s;{const e=Sn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Gn=t("__VUE_INSTANCE_SETTERS__",n=>Oe=n),$s=t("__VUE_SSR_SETTERS__",n=>ln=n)}const an=e=>{const t=Oe;return Gn(e),e.scope.on(),()=>{e.scope.off(),Gn(t)}},Ti=()=>{Oe&&Oe.scope.off(),Gn(null)};function Mi(e){return e.vnode.shapeFlag&4}let ln=!1;function dl(e,t=!1,n=!1){t&&$s(t);const{props:s,children:r}=e.vnode,i=Mi(e);za(e,s,i,t),Xa(e,r,n||t);const o=i?fl(e,t):void 0;return t&&$s(!1),o}function fl(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ba);const{setup:s}=n;if(s){We();const r=e.setupContext=s.length>1?ml(e):null,i=an(e),o=$t(s,e,0,[e.props,r]),a=Ys(o);if(qe(),i(),(a||e.sp)&&!Dt(e)&&Ur(e),a){if(o.then(Ti,Ti),t)return o.then(l=>{Ei(e,l)}).catch(l=>{Rn(l,e,0)});e.asyncDep=o}else Ei(e,o)}else Oi(e)}function Ei(e,t,n){G(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)&&(e.setupState=kr(t)),Oi(e)}function Oi(e,t,n){const s=e.type;e.render||(e.render=s.render||Ke);{const r=an(e);We();try{Ra(e)}finally{qe(),r()}}}const hl={get(e,t){return Te(e,"get",""),e[t]}};function ml(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,hl),slots:e.slots,emit:e.emit,expose:t}}function Yn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(kr(ws(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in tn)return tn[n](e)},has(t,n){return n in t||n in tn}})):e.proxy}const pl=/(?:^|[-_])\w/g,gl=e=>e.replace(pl,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ii(e,t=!0){return G(e)?e.displayName||e.name:e.name||t&&e.__name}function Bi(e,t,n=!1){let s=Ii(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e){const r=i=>{for(const o in i)if(i[o]===t)return o};s=r(e.components)||e.parent&&r(e.parent.type.components)||r(e.appContext.components)}return s?gl(s):n?"App":"Anonymous"}function _l(e){return G(e)&&"__vccOpts"in e}const yl=(e,t)=>na(e,t,ln);function vl(e,t,n){try{Kn(-1);const s=arguments.length;return s===2?ae(t)&&!H(t)?on(t)?_e(e,null,[t]):_e(e,t):_e(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&on(n)&&(n=[n]),_e(e,t,n))}finally{Kn(1)}}const bl="3.5.34";/**
16
+ `,...la(r)),console.warn(...i)}ze(),ks=!1}function aa(){let e=Qt[Qt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function la(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
17
+ `],...ca(n))}),t}function ca({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Li(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...ua(e.props),i]:[r+i]}function ua(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Ar(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Ar(e,t,n){return pe(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ee(t)?(t=Ar(e,ie(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Y(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ie(t),n?t:[`${e}=`,t])}function $t(e,t,n,s){try{return s?e(...s):e()}catch(r){Nn(r,t,n)}}function Ke(e,t,n,s){if(Y(e)){const r=$t(e,t,n,s);return r&&Js(r)&&r.catch(i=>{Nn(i,t,n)}),r}if(H(e)){const r=[];for(let i=0;i<e.length;i++)r.push(Ke(e[i],t,n,s));return r}}function Nn(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ue;if(t){let a=t.parent;const l=t.proxy,f=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let g=0;g<c.length;g++)if(c[g](e,l,f)===!1)return}a=a.parent}if(i){qe(),$t(i,null,10,[e,l,f]),ze();return}}da(e,n,r,s,o)}function da(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const Le=[];let Ye=-1;const Dt=[];let pt=null,jt=0;const Sr=Promise.resolve();let Pn=null;function xr(e){const t=Pn||Sr;return e?t.then(this?e.bind(this):e):t}function fa(e){let t=Ye+1,n=Le.length;for(;t<n;){const s=t+n>>>1,r=Le[s],i=Zt(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function Cs(e){if(!(e.flags&1)){const t=Zt(e),n=Le[Le.length-1];!n||!(e.flags&2)&&t>=Zt(n)?Le.push(e):Le.splice(fa(t),0,e),e.flags|=1,Tr()}}function Tr(){Pn||(Pn=Sr.then(Or))}function ha(e){H(e)?Dt.push(...e):pt&&e.id===-1?pt.splice(jt+1,0,e):e.flags&1||(Dt.push(e),e.flags|=1),Tr()}function Mr(e,t,n=Ye+1){for(;n<Le.length;n++){const s=Le[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Le.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Er(e){if(Dt.length){const t=[...new Set(Dt)].sort((n,s)=>Zt(n)-Zt(s));if(Dt.length=0,pt){pt.push(...t);return}for(pt=t,jt=0;jt<pt.length;jt++){const n=pt[jt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}pt=null,jt=0}}const Zt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Or(e){try{for(Ye=0;Ye<Le.length;Ye++){const t=Le[Ye];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),$t(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ye<Le.length;Ye++){const t=Le[Ye];t&&(t.flags&=-2)}Ye=-1,Le.length=0,Er(),Pn=null,(Le.length||Dt.length)&&Or()}}let Se=null,Ir=null;function Fn(e){const t=Se;return Se=e,Ir=e&&e.type.__scopeId||null,t}function Rr(e,t=Se,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&qn(-1);const i=Fn(t);let o;try{o=e(...r)}finally{Fn(i),s._d&&qn(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function at(e,t){if(Se===null)return e;const n=Xn(Se),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,a,l=ue]=t[r];i&&(Y(i)&&(i={mounted:i,updated:i}),i.deep&&ot(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function St(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const a=r[o];i&&(a.oldValue=i[o].value);let l=a.dir[s];l&&(qe(),Ke(l,n,8,[e.el,a,e,t]),ze())}}function ma(e,t){if(Ie){let n=Ie.provides;const s=Ie.parent&&Ie.parent.provides;s===n&&(n=Ie.provides=Object.create(s)),n[e]=t}}function $n(e,t,n=!1){const s=Ti();if(s||Ht){let r=Ht?Ht._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Y(t)?t.call(s&&s.proxy):t}}const pa=Symbol.for("v-scx"),ga=()=>$n(pa);function As(e,t,n){return Lr(e,t,n)}function Lr(e,t,n=ue){const{immediate:s,deep:r,flush:i,once:o}=n,a=Ce({},n),l=t&&s||!t&&i!=="post";let f;if(un){if(i==="sync"){const k=ga();f=k.__watcherHandles||(k.__watcherHandles=[])}else if(!l){const k=()=>{};return k.stop=We,k.resume=We,k.pause=We,k}}const c=Ie;a.call=(k,V,I)=>Ke(k,c,V,I);let g=!1;i==="post"?a.scheduler=k=>{Pe(k,c&&c.suspense)}:i!=="sync"&&(g=!0,a.scheduler=(k,V)=>{V?k():Cs(k)}),a.augmentJob=k=>{t&&(k.flags|=4),g&&(k.flags|=2,c&&(k.id=c.uid,k.i=c))};const S=oa(e,t,a);return un&&(f?f.push(S):l&&S()),S}function _a(e,t,n){const s=this.proxy,r=pe(e)?e.includes(".")?Br(s,e):()=>s[e]:e.bind(s,s);let i;Y(t)?i=t:(i=t.handler,n=t);const o=cn(this),a=Lr(r,i.bind(s),n);return o(),a}function Br(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const ya=Symbol("_vte"),Nr=e=>e.__isTeleport,Je=Symbol("_leaveCb"),en=Symbol("_enterCb");function va(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return qr(()=>{e.isMounted=!0}),zr(()=>{e.isUnmounting=!0}),e}const je=[Function,Array],Pr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:je,onEnter:je,onAfterEnter:je,onEnterCancelled:je,onBeforeLeave:je,onLeave:je,onAfterLeave:je,onLeaveCancelled:je,onBeforeAppear:je,onAppear:je,onAfterAppear:je,onAppearCancelled:je},Fr=e=>{const t=e.subTree;return t.component?Fr(t.component):t},ba={name:"BaseTransition",props:Pr,setup(e,{slots:t}){const n=Ti(),s=va();return()=>{const r=t.default&&Ur(t.default(),!0),i=r&&r.length?$r(r):n.subTree?P():void 0;if(!i)return;const o=ie(e),{mode:a}=o;if(s.isLeaving)return xs(i);const l=jr(i);if(!l)return xs(i);let f=Ss(l,o,s,n,g=>f=g);l.type!==Oe&&tn(l,f);let c=n.subTree&&jr(n.subTree);if(c&&c.type!==Oe&&!Tt(c,l)&&Fr(n).type!==Oe){let g=Ss(c,o,s,n);if(tn(c,g),a==="out-in"&&l.type!==Oe)return s.isLeaving=!0,g.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete g.afterLeave,c=void 0},xs(i);a==="in-out"&&l.type!==Oe?g.delayLeave=(S,k,V)=>{const I=Dr(s,c);I[String(c.key)]=c,S[Je]=()=>{k(),S[Je]=void 0,delete f.delayedLeave,c=void 0},f.delayedLeave=()=>{V(),delete f.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function $r(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Oe){t=n;break}}return t}const wa=ba;function Dr(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Ss(e,t,n,s,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:f,onAfterEnter:c,onEnterCancelled:g,onBeforeLeave:S,onLeave:k,onAfterLeave:V,onLeaveCancelled:I,onBeforeAppear:J,onAppear:z,onAfterAppear:K,onAppearCancelled:X}=t,j=String(e.key),te=Dr(n,e),le=(q,ne)=>{q&&Ke(q,s,9,ne)},we=(q,ne)=>{const de=ne[1];le(q,ne),H(q)?q.every($=>$.length<=1)&&de():q.length<=1&&de()},be={mode:o,persisted:a,beforeEnter(q){let ne=l;if(!n.isMounted)if(i)ne=J||l;else return;q[Je]&&q[Je](!0);const de=te[j];de&&Tt(e,de)&&de.el[Je]&&de.el[Je](),le(ne,[q])},enter(q){if(te[j]===e)return;let ne=f,de=c,$=g;if(!n.isMounted)if(i)ne=z||f,de=K||c,$=X||g;else return;let p=!1;q[en]=C=>{p||(p=!0,C?le($,[q]):le(de,[q]),be.delayedLeave&&be.delayedLeave(),q[en]=void 0)};const b=q[en].bind(null,!1);ne?we(ne,[q,b]):b()},leave(q,ne){const de=String(e.key);if(q[en]&&q[en](!0),n.isUnmounting)return ne();le(S,[q]);let $=!1;q[Je]=b=>{$||($=!0,ne(),b?le(I,[q]):le(V,[q]),q[Je]=void 0,te[de]===e&&delete te[de])};const p=q[Je].bind(null,!1);te[de]=e,k?we(k,[q,p]):p()},clone(q){const ne=Ss(q,t,n,s,r);return r&&r(ne),ne}};return be}function xs(e){if(jn(e))return e=gt(e),e.children=null,e}function jr(e){if(!jn(e))return Nr(e.type)&&e.children?$r(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Y(n.default))return n.default()}}function tn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,tn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ur(e,t=!1,n){let s=[],r=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===Q?(o.patchFlag&128&&r++,s=s.concat(Ur(o.children,t,a))):(t||o.type!==Oe)&&s.push(a!=null?gt(o,{key:a}):o)}if(r>1)for(let i=0;i<s.length;i++)s[i].patchFlag=-2;return s}function Hr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Vr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Dn=new WeakMap;function nn(e,t,n,s,r=!1){if(H(e)){e.forEach((I,J)=>nn(I,t&&(H(t)?t[J]:t),n,s,r));return}if(Ut(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&nn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Xn(s.component):s.el,o=r?null:i,{i:a,r:l}=e,f=t&&t.r,c=a.refs===ue?a.refs={}:a.refs,g=a.setupState,S=ie(g),k=g===ue?Gs:I=>Vr(c,I)?!1:oe(S,I),V=(I,J)=>!(J&&Vr(c,J));if(f!=null&&f!==l){if(Kr(t),pe(f))c[f]=null,k(f)&&(g[f]=null);else if(Ee(f)){const I=t;V(f,I.k)&&(f.value=null),I.k&&(c[I.k]=null)}}if(Y(l))$t(l,a,12,[o,c]);else{const I=pe(l),J=Ee(l);if(I||J){const z=()=>{if(e.f){const K=I?k(l)?g[l]:c[l]:V()||!e.k?l.value:c[e.k];if(r)H(K)&&rs(K,i);else if(H(K))K.includes(i)||K.push(i);else if(I)c[l]=[i],k(l)&&(g[l]=c[l]);else{const X=[i];V(l,e.k)&&(l.value=X),e.k&&(c[e.k]=X)}}else I?(c[l]=o,k(l)&&(g[l]=o)):J&&(V(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const K=()=>{z(),Dn.delete(e)};K.id=-1,Dn.set(e,K),Pe(K,n)}else Kr(e),z()}}}function Kr(e){const t=Dn.get(e);t&&(t.flags|=8,Dn.delete(e))}xn().requestIdleCallback,xn().cancelIdleCallback;const Ut=e=>!!e.type.__asyncLoader,jn=e=>e.type.__isKeepAlive;function ka(e,t){Wr(e,"a",t)}function Ca(e,t){Wr(e,"da",t)}function Wr(e,t,n=Ie){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Un(t,s,n),n){let r=n.parent;for(;r&&r.parent;)jn(r.parent.vnode)&&Aa(s,t,n,r),r=r.parent}}function Aa(e,t,n,s){const r=Un(t,e,s,!0);Gr(()=>{rs(s[t],r)},n)}function Un(e,t,n=Ie,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{qe();const a=cn(n),l=Ke(t,n,e,o);return a(),ze(),l});return s?r.unshift(i):r.push(i),i}}const lt=e=>(t,n=Ie)=>{(!un||e==="sp")&&Un(e,(...s)=>t(...s),n)},Sa=lt("bm"),qr=lt("m"),xa=lt("bu"),Ta=lt("u"),zr=lt("bum"),Gr=lt("um"),Ma=lt("sp"),Ea=lt("rtg"),Oa=lt("rtc");function Ia(e,t=Ie){Un("ec",e,t)}const Yr="components";function ge(e,t){return Xr(Yr,e,!0,t)||e}const Jr=Symbol.for("v-ndc");function Ra(e){return pe(e)?Xr(Yr,e,!1)||e:e||Jr}function Xr(e,t,n=!0,s=!1){const r=Se||Ie;if(r){const i=r.type;{const a=Ri(i,!1);if(a&&(a===t||a===Re(t)||a===Cn(Re(t))))return i}const o=Qr(r[e]||i[e],t)||Qr(r.appContext[e],t);return!o&&s?i:o}}function Qr(e,t){return e&&(e[t]||e[Re(t)]||e[Cn(Re(t))])}function xe(e,t,n,s){let r;const i=n,o=H(e);if(o||pe(e)){const a=o&&Ct(e);let l=!1,f=!1;a&&(l=!Ve(e),f=mt(e),e=Tn(e)),r=new Array(e.length);for(let c=0,g=e.length;c<g;c++)r[c]=t(l?f?Ft(it(e[c])):it(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let a=0;a<e;a++)r[a]=t(a+1,a,void 0,i)}else if(ae(e))if(e[Symbol.iterator])r=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,f=a.length;l<f;l++){const c=a[l];r[l]=t(e[c],c,l,i)}}else r=[];return r}function La(e,t,n={},s,r){if(Se.ce||Se.parent&&Ut(Se.parent)&&Se.parent.ce){const f=Object.keys(n).length>0;return m(),_e(Q,null,[ye("slot",n,s&&s())],f?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),m();const o=i&&Zr(i(n)),a=n.key||o&&o.key,l=_e(Q,{key:(a&&!Ue(a)?a:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return i&&i._c&&(i._d=!0),l}function Zr(e){return e.some(t=>ln(t)?!(t.type===Oe||t.type===Q&&!Zr(t.children)):!0)?e:null}const Ts=e=>e?Ei(e)?Xn(e):Ts(e.parent):null,sn=Ce(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ts(e.parent),$root:e=>Ts(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>si(e),$forceUpdate:e=>e.f||(e.f=()=>{Cs(e.update)}),$nextTick:e=>e.n||(e.n=xr.bind(e.proxy)),$watch:e=>_a.bind(e)}),Ms=(e,t)=>e!==ue&&!e.__isScriptSetup&&oe(e,t),Ba={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const S=o[t];if(S!==void 0)switch(S){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Ms(s,t))return o[t]=1,s[t];if(r!==ue&&oe(r,t))return o[t]=2,r[t];if(oe(i,t))return o[t]=3,i[t];if(n!==ue&&oe(n,t))return o[t]=4,n[t];Es&&(o[t]=0)}}const f=sn[t];let c,g;if(f)return t==="$attrs"&&Me(e.attrs,"get",""),f(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==ue&&oe(n,t))return o[t]=4,n[t];if(g=l.config.globalProperties,oe(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Ms(r,t)?(r[t]=n,!0):s!==ue&&oe(s,t)?(s[t]=n,!0):oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},a){let l;return!!(n[a]||e!==ue&&a[0]!=="$"&&oe(e,a)||Ms(t,a)||oe(i,a)||oe(s,a)||oe(sn,a)||oe(r.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ei(e){return H(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Es=!0;function Na(e){const t=si(e),n=e.proxy,s=e.ctx;Es=!1,t.beforeCreate&&ti(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:a,provide:l,inject:f,created:c,beforeMount:g,mounted:S,beforeUpdate:k,updated:V,activated:I,deactivated:J,beforeDestroy:z,beforeUnmount:K,destroyed:X,unmounted:j,render:te,renderTracked:le,renderTriggered:we,errorCaptured:be,serverPrefetch:q,expose:ne,inheritAttrs:de,components:$,directives:p,filters:b}=t;if(f&&Pa(f,s,null),o)for(const y in o){const v=o[y];Y(v)&&(s[y]=v.bind(n))}if(r){const y=r.call(n,n);ae(y)&&(e.data=In(y))}if(Es=!0,i)for(const y in i){const v=i[y],M=Y(v)?v.bind(n,n):Y(v.get)?v.get.bind(n,n):We,L=!Y(v)&&Y(v.set)?v.set.bind(n):We,ee=bl({get:M,set:L});Object.defineProperty(s,y,{enumerable:!0,configurable:!0,get:()=>ee.value,set:Z=>ee.value=Z})}if(a)for(const y in a)ni(a[y],s,n,y);if(l){const y=Y(l)?l.call(n):l;Reflect.ownKeys(y).forEach(v=>{ma(v,y[v])})}c&&ti(c,e,"c");function O(y,v){H(v)?v.forEach(M=>y(M.bind(n))):v&&y(v.bind(n))}if(O(Sa,g),O(qr,S),O(xa,k),O(Ta,V),O(ka,I),O(Ca,J),O(Ia,be),O(Oa,le),O(Ea,we),O(zr,K),O(Gr,j),O(Ma,q),H(ne))if(ne.length){const y=e.exposed||(e.exposed={});ne.forEach(v=>{Object.defineProperty(y,v,{get:()=>n[v],set:M=>n[v]=M,enumerable:!0})})}else e.exposed||(e.exposed={});te&&e.render===We&&(e.render=te),de!=null&&(e.inheritAttrs=de),$&&(e.components=$),p&&(e.directives=p),q&&Hr(e)}function Pa(e,t,n=We){H(e)&&(e=Os(e));for(const s in e){const r=e[s];let i;ae(r)?"default"in r?i=$n(r.from||s,r.default,!0):i=$n(r.from||s):i=$n(r),Ee(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function ti(e,t,n){Ke(H(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ni(e,t,n,s){let r=s.includes(".")?Br(n,s):()=>n[s];if(pe(e)){const i=t[e];Y(i)&&As(r,i)}else if(Y(e))As(r,e.bind(n));else if(ae(e))if(H(e))e.forEach(i=>ni(i,t,n,s));else{const i=Y(e.handler)?e.handler.bind(n):t[e.handler];Y(i)&&As(r,i,e)}}function si(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!r.length&&!n&&!s?l=t:(l={},r.length&&r.forEach(f=>Hn(l,f,o,!0)),Hn(l,t,o)),ae(t)&&i.set(t,l),l}function Hn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Hn(e,i,n,!0),r&&r.forEach(o=>Hn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const a=Fa[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const Fa={data:ri,props:ii,emits:ii,methods:rn,computed:rn,beforeCreate:Be,created:Be,beforeMount:Be,mounted:Be,beforeUpdate:Be,updated:Be,beforeDestroy:Be,beforeUnmount:Be,destroyed:Be,unmounted:Be,activated:Be,deactivated:Be,errorCaptured:Be,serverPrefetch:Be,components:rn,directives:rn,watch:Da,provide:ri,inject:$a};function ri(e,t){return t?e?function(){return Ce(Y(e)?e.call(this,this):e,Y(t)?t.call(this,this):t)}:t:e}function $a(e,t){return rn(Os(e),Os(t))}function Os(e){if(H(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Be(e,t){return e?[...new Set([].concat(e,t))]:t}function rn(e,t){return e?Ce(Object.create(null),e,t):t}function ii(e,t){return e?H(e)&&H(t)?[...new Set([...e,...t])]:Ce(Object.create(null),ei(e),ei(t??{})):t}function Da(e,t){if(!e)return t;if(!t)return e;const n=Ce(Object.create(null),e);for(const s in t)n[s]=Be(e[s],t[s]);return n}function oi(){return{app:null,config:{isNativeTag:Gs,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ja=0;function Ua(e,t){return function(s,r=null){Y(s)||(s=Ce({},s)),r!=null&&!ae(r)&&(r=null);const i=oi(),o=new WeakSet,a=[];let l=!1;const f=i.app={_uid:ja++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:kl,get config(){return i.config},set config(c){},use(c,...g){return o.has(c)||(c&&Y(c.install)?(o.add(c),c.install(f,...g)):Y(c)&&(o.add(c),c(f,...g))),f},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),f},component(c,g){return g?(i.components[c]=g,f):i.components[c]},directive(c,g){return g?(i.directives[c]=g,f):i.directives[c]},mount(c,g,S){if(!l){const k=f._ceVNode||ye(s,r);return k.appContext=i,S===!0?S="svg":S===!1&&(S=void 0),e(k,c,S),l=!0,f._container=c,c.__vue_app__=f,Xn(k.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Ke(a,f._instance,16),e(null,f._container),delete f._container.__vue_app__)},provide(c,g){return i.provides[c]=g,f},runWithContext(c){const g=Ht;Ht=f;try{return c()}finally{Ht=g}}};return f}}let Ht=null;const Ha=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Re(t)}Modifiers`]||e[`${ht(t)}Modifiers`];function Va(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ue;let r=n;const i=t.startsWith("update:"),o=i&&Ha(s,t.slice(7));o&&(o.trim&&(r=n.map(c=>pe(c)?c.trim():c)),o.number&&(r=n.map(Sn)));let a,l=s[a=os(t)]||s[a=os(Re(t))];!l&&i&&(l=s[a=os(ht(t))]),l&&Ke(l,e,6,r);const f=s[a+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ke(f,e,6,r)}}const Ka=new WeakMap;function ai(e,t,n=!1){const s=n?Ka:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},a=!1;if(!Y(e)){const l=f=>{const c=ai(f,t,!0);c&&(a=!0,Ce(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(ae(e)&&s.set(e,null),null):(H(i)?i.forEach(l=>o[l]=null):Ce(o,i),ae(e)&&s.set(e,o),o)}function Vn(e,t){return!e||!bn(t)?!1:(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,ht(t))||oe(e,t))}function Fm(){}function li(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:l,render:f,renderCache:c,props:g,data:S,setupState:k,ctx:V,inheritAttrs:I}=e,J=Fn(e);let z,K;try{if(n.shapeFlag&4){const j=r||s,te=j;z=Xe(f.call(te,j,c,g,k,S,V)),K=a}else{const j=t;z=Xe(j.length>1?j(g,{attrs:a,slots:o,emit:l}):j(g,null)),K=t.props?a:Wa(a)}}catch(j){on.length=0,Nn(j,e,1),z=ye(Oe)}let X=z;if(K&&I!==!1){const j=Object.keys(K),{shapeFlag:te}=X;j.length&&te&7&&(i&&j.some(wn)&&(K=qa(K,i)),X=gt(X,K,!1,!0))}return n.dirs&&(X=gt(X,null,!1,!0),X.dirs=X.dirs?X.dirs.concat(n.dirs):n.dirs),n.transition&&tn(X,n.transition),z=X,Fn(J),z}const Wa=e=>{let t;for(const n in e)(n==="class"||n==="style"||bn(n))&&((t||(t={}))[n]=e[n]);return t},qa=(e,t)=>{const n={};for(const s in e)(!wn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function za(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:a,patchFlag:l}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?ci(s,o,f):!!o;if(l&8){const c=t.dynamicProps;for(let g=0;g<c.length;g++){const S=c[g];if(ui(o,s,S)&&!Vn(f,S))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:s===o?!1:s?o?ci(s,o,f):!0:!!o;return!1}function ci(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(ui(t,e,i)&&!Vn(n,i))return!0}return!1}function ui(e,t,n){const s=e[n],r=t[n];return n==="style"&&ae(s)&&ae(r)?!Nt(s,r):s!==r}function Ga({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const di={},fi=()=>Object.create(di),hi=e=>Object.getPrototypeOf(e)===di;function Ya(e,t,n,s=!1){const r={},i=fi();e.propsDefaults=Object.create(null),mi(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:ea(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Ja(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=ie(r),[l]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let g=0;g<c.length;g++){let S=c[g];if(Vn(e.emitsOptions,S))continue;const k=t[S];if(l)if(oe(i,S))k!==i[S]&&(i[S]=k,f=!0);else{const V=Re(S);r[V]=Is(l,a,V,k,e,!1)}else k!==i[S]&&(i[S]=k,f=!0)}}}else{mi(e,t,r,i)&&(f=!0);let c;for(const g in a)(!t||!oe(t,g)&&((c=ht(g))===g||!oe(t,c)))&&(l?n&&(n[g]!==void 0||n[c]!==void 0)&&(r[g]=Is(l,a,g,void 0,e,!0)):delete r[g]);if(i!==a)for(const g in i)(!t||!oe(t,g))&&(delete i[g],f=!0)}f&&st(e.attrs,"set","")}function mi(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(qt(l))continue;const f=t[l];let c;r&&oe(r,c=Re(l))?!i||!i.includes(c)?n[c]=f:(a||(a={}))[c]=f:Vn(e.emitsOptions,l)||(!(l in s)||f!==s[l])&&(s[l]=f,o=!0)}if(i){const l=ie(n),f=a||ue;for(let c=0;c<i.length;c++){const g=i[c];n[g]=Is(r,l,g,f[g],e,!oe(f,g))}}return o}function Is(e,t,n,s,r,i){const o=e[n];if(o!=null){const a=oe(o,"default");if(a&&s===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Y(l)){const{propsDefaults:f}=r;if(n in f)s=f[n];else{const c=cn(r);s=f[n]=l.call(null,t),c()}}else s=l;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!a?s=!1:o[1]&&(s===""||s===ht(n))&&(s=!0))}return s}const Xa=new WeakMap;function pi(e,t,n=!1){const s=n?Xa:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},a=[];let l=!1;if(!Y(e)){const c=g=>{l=!0;const[S,k]=pi(g,t,!0);Ce(o,S),k&&a.push(...k)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return ae(e)&&s.set(e,Rt),Rt;if(H(i))for(let c=0;c<i.length;c++){const g=Re(i[c]);gi(g)&&(o[g]=ue)}else if(i)for(const c in i){const g=Re(c);if(gi(g)){const S=i[c],k=o[g]=H(S)||Y(S)?{type:S}:Ce({},S),V=k.type;let I=!1,J=!0;if(H(V))for(let z=0;z<V.length;++z){const K=V[z],X=Y(K)&&K.name;if(X==="Boolean"){I=!0;break}else X==="String"&&(J=!1)}else I=Y(V)&&V.name==="Boolean";k[0]=I,k[1]=J,(I||oe(k,"default"))&&a.push(g)}}const f=[o,a];return ae(e)&&s.set(e,f),f}function gi(e){return e[0]!=="$"&&!qt(e)}const Rs=e=>e==="_"||e==="_ctx"||e==="$stable",Ls=e=>H(e)?e.map(Xe):[Xe(e)],Qa=(e,t,n)=>{if(t._n)return t;const s=Rr((...r)=>Ls(t(...r)),n);return s._c=!1,s},_i=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Rs(r))continue;const i=e[r];if(Y(i))t[r]=Qa(r,i,s);else if(i!=null){const o=Ls(i);t[r]=()=>o}}},yi=(e,t)=>{const n=Ls(t);e.slots.default=()=>n},vi=(e,t,n)=>{for(const s in t)(n||!Rs(s))&&(e[s]=t[s])},Za=(e,t,n)=>{const s=e.slots=fi();if(e.vnode.shapeFlag&32){const r=t._;r?(vi(s,t,n),n&&Zs(s,"_",r,!0)):_i(t,s)}else t&&yi(e,t)},el=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ue;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:vi(r,t,n):(i=!t.$stable,_i(t,r)),o=t}else t&&(yi(e,t),o={default:1});if(i)for(const a in r)!Rs(a)&&o[a]==null&&delete r[a]},Pe=il;function tl(e){return nl(e)}function nl(e,t){const n=xn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:a,createComment:l,setText:f,setElementText:c,parentNode:g,nextSibling:S,setScopeId:k=We,insertStaticContent:V}=e,I=(d,h,w,E=null,A=null,x=null,N=void 0,B=null,R=!!h.dynamicChildren)=>{if(d===h)return;d&&!Tt(d,h)&&(E=ns(d),Z(d,A,x,!0),d=null),h.patchFlag===-2&&(R=!1,h.dynamicChildren=null);const{type:T,ref:W,shapeFlag:F}=h;switch(T){case Kn:J(d,h,w,E);break;case Oe:z(d,h,w,E);break;case Wn:d==null&&K(h,w,E,N);break;case Q:$(d,h,w,E,A,x,N,B,R);break;default:F&1?te(d,h,w,E,A,x,N,B,R):F&6?p(d,h,w,E,A,x,N,B,R):(F&64||F&128)&&T.process(d,h,w,E,A,x,N,B,R,yn)}W!=null&&A?nn(W,d&&d.ref,x,h||d,!h):W==null&&d&&d.ref!=null&&nn(d.ref,null,x,d,!0)},J=(d,h,w,E)=>{if(d==null)s(h.el=a(h.children),w,E);else{const A=h.el=d.el;h.children!==d.children&&f(A,h.children)}},z=(d,h,w,E)=>{d==null?s(h.el=l(h.children||""),w,E):h.el=d.el},K=(d,h,w,E)=>{[d.el,d.anchor]=V(d.children,h,w,E,d.el,d.anchor)},X=({el:d,anchor:h},w,E)=>{let A;for(;d&&d!==h;)A=S(d),s(d,w,E),d=A;s(h,w,E)},j=({el:d,anchor:h})=>{let w;for(;d&&d!==h;)w=S(d),r(d),d=w;r(h)},te=(d,h,w,E,A,x,N,B,R)=>{if(h.type==="svg"?N="svg":h.type==="math"&&(N="mathml"),d==null)le(h,w,E,A,x,N,B,R);else{const T=d.el&&d.el._isVueCE?d.el:null;try{T&&T._beginPatch(),q(d,h,A,x,N,B,R)}finally{T&&T._endPatch()}}},le=(d,h,w,E,A,x,N,B)=>{let R,T;const{props:W,shapeFlag:F,transition:U,dirs:G}=d;if(R=d.el=o(d.type,x,W&&W.is,W),F&8?c(R,d.children):F&16&&be(d.children,R,null,E,A,Bs(d,x),N,B),G&&St(d,null,E,"created"),we(R,d,d.scopeId,N,E),W){for(const fe in W)fe!=="value"&&!qt(fe)&&i(R,fe,null,W[fe],x,E);"value"in W&&i(R,"value",null,W.value,x),(T=W.onVnodeBeforeMount)&&Qe(T,E,d)}G&&St(d,null,E,"beforeMount");const re=sl(A,U);re&&U.beforeEnter(R),s(R,h,w),((T=W&&W.onVnodeMounted)||re||G)&&Pe(()=>{try{T&&Qe(T,E,d),re&&U.enter(R),G&&St(d,null,E,"mounted")}finally{}},A)},we=(d,h,w,E,A)=>{if(w&&k(d,w),E)for(let x=0;x<E.length;x++)k(d,E[x]);if(A){let x=A.subTree;if(h===x||Ai(x.type)&&(x.ssContent===h||x.ssFallback===h)){const N=A.vnode;we(d,N,N.scopeId,N.slotScopeIds,A.parent)}}},be=(d,h,w,E,A,x,N,B,R=0)=>{for(let T=R;T<d.length;T++){const W=d[T]=B?ct(d[T]):Xe(d[T]);I(null,W,h,w,E,A,x,N,B)}},q=(d,h,w,E,A,x,N)=>{const B=h.el=d.el;let{patchFlag:R,dynamicChildren:T,dirs:W}=h;R|=d.patchFlag&16;const F=d.props||ue,U=h.props||ue;let G;if(w&&xt(w,!1),(G=U.onVnodeBeforeUpdate)&&Qe(G,w,h,d),W&&St(h,d,w,"beforeUpdate"),w&&xt(w,!0),(F.innerHTML&&U.innerHTML==null||F.textContent&&U.textContent==null)&&c(B,""),T?ne(d.dynamicChildren,T,B,w,E,Bs(h,A),x):N||v(d,h,B,null,w,E,Bs(h,A),x,!1),R>0){if(R&16)de(B,F,U,w,A);else if(R&2&&F.class!==U.class&&i(B,"class",null,U.class,A),R&4&&i(B,"style",F.style,U.style,A),R&8){const re=h.dynamicProps;for(let fe=0;fe<re.length;fe++){const me=re[fe],ke=F[me],Te=U[me];(Te!==ke||me==="value")&&i(B,me,ke,Te,A,w)}}R&1&&d.children!==h.children&&c(B,h.children)}else!N&&T==null&&de(B,F,U,w,A);((G=U.onVnodeUpdated)||W)&&Pe(()=>{G&&Qe(G,w,h,d),W&&St(h,d,w,"updated")},E)},ne=(d,h,w,E,A,x,N)=>{for(let B=0;B<h.length;B++){const R=d[B],T=h[B],W=R.el&&(R.type===Q||!Tt(R,T)||R.shapeFlag&198)?g(R.el):w;I(R,T,W,null,E,A,x,N,!0)}},de=(d,h,w,E,A)=>{if(h!==w){if(h!==ue)for(const x in h)!qt(x)&&!(x in w)&&i(d,x,h[x],null,A,E);for(const x in w){if(qt(x))continue;const N=w[x],B=h[x];N!==B&&x!=="value"&&i(d,x,B,N,A,E)}"value"in w&&i(d,"value",h.value,w.value,A)}},$=(d,h,w,E,A,x,N,B,R)=>{const T=h.el=d?d.el:a(""),W=h.anchor=d?d.anchor:a("");let{patchFlag:F,dynamicChildren:U,slotScopeIds:G}=h;G&&(B=B?B.concat(G):G),d==null?(s(T,w,E),s(W,w,E),be(h.children||[],w,W,A,x,N,B,R)):F>0&&F&64&&U&&d.dynamicChildren&&d.dynamicChildren.length===U.length?(ne(d.dynamicChildren,U,w,A,x,N,B),(h.key!=null||A&&h===A.subTree)&&bi(d,h,!0)):v(d,h,w,W,A,x,N,B,R)},p=(d,h,w,E,A,x,N,B,R)=>{h.slotScopeIds=B,d==null?h.shapeFlag&512?A.ctx.activate(h,w,E,N,R):b(h,w,E,A,x,N,R):C(d,h,R)},b=(d,h,w,E,A,x,N)=>{const B=d.component=fl(d,E,A);if(jn(d)&&(B.ctx.renderer=yn),hl(B,!1,N),B.asyncDep){if(A&&A.registerDep(B,O,N),!d.el){const R=B.subTree=ye(Oe);z(null,R,h,w),d.placeholder=R.el}}else O(B,d,h,w,A,x,N)},C=(d,h,w)=>{const E=h.component=d.component;if(za(d,h,w))if(E.asyncDep&&!E.asyncResolved){y(E,h,w);return}else E.next=h,E.update();else h.el=d.el,E.vnode=h},O=(d,h,w,E,A,x,N)=>{const B=()=>{if(d.isMounted){let{next:F,bu:U,u:G,parent:re,vnode:fe}=d;{const et=wi(d);if(et){F&&(F.el=fe.el,y(d,F,N)),et.asyncDep.then(()=>{Pe(()=>{d.isUnmounted||T()},A)});return}}let me=F,ke;xt(d,!1),F?(F.el=fe.el,y(d,F,N)):F=fe,U&&An(U),(ke=F.props&&F.props.onVnodeBeforeUpdate)&&Qe(ke,re,F,fe),xt(d,!0);const Te=li(d),Ze=d.subTree;d.subTree=Te,I(Ze,Te,g(Ze.el),ns(Ze),d,A,x),F.el=Te.el,me===null&&Ga(d,Te.el),G&&Pe(G,A),(ke=F.props&&F.props.onVnodeUpdated)&&Pe(()=>Qe(ke,re,F,fe),A)}else{let F;const{el:U,props:G}=h,{bm:re,m:fe,parent:me,root:ke,type:Te}=d,Ze=Ut(h);xt(d,!1),re&&An(re),!Ze&&(F=G&&G.onVnodeBeforeMount)&&Qe(F,me,h),xt(d,!0);{ke.ce&&ke.ce._hasShadowRoot()&&ke.ce._injectChildStyle(Te,d.parent?d.parent.type:void 0);const et=d.subTree=li(d);I(null,et,w,E,d,A,x),h.el=et.el}if(fe&&Pe(fe,A),!Ze&&(F=G&&G.onVnodeMounted)){const et=h;Pe(()=>Qe(F,me,et),A)}(h.shapeFlag&256||me&&Ut(me.vnode)&&me.vnode.shapeFlag&256)&&d.a&&Pe(d.a,A),d.isMounted=!0,h=w=E=null}};d.scope.on();const R=d.effect=new rr(B);d.scope.off();const T=d.update=R.run.bind(R),W=d.job=R.runIfDirty.bind(R);W.i=d,W.id=d.uid,R.scheduler=()=>Cs(W),xt(d,!0),T()},y=(d,h,w)=>{h.component=d;const E=d.vnode.props;d.vnode=h,d.next=null,Ja(d,h.props,E,w),el(d,h.children,w),qe(),Mr(d),ze()},v=(d,h,w,E,A,x,N,B,R=!1)=>{const T=d&&d.children,W=d?d.shapeFlag:0,F=h.children,{patchFlag:U,shapeFlag:G}=h;if(U>0){if(U&128){L(T,F,w,E,A,x,N,B,R);return}else if(U&256){M(T,F,w,E,A,x,N,B,R);return}}G&8?(W&16&&_n(T,A,x),F!==T&&c(w,F)):W&16?G&16?L(T,F,w,E,A,x,N,B,R):_n(T,A,x,!0):(W&8&&c(w,""),G&16&&be(F,w,E,A,x,N,B,R))},M=(d,h,w,E,A,x,N,B,R)=>{d=d||Rt,h=h||Rt;const T=d.length,W=h.length,F=Math.min(T,W);let U;for(U=0;U<F;U++){const G=h[U]=R?ct(h[U]):Xe(h[U]);I(d[U],G,w,null,A,x,N,B,R)}T>W?_n(d,A,x,!0,!1,F):be(h,w,E,A,x,N,B,R,F)},L=(d,h,w,E,A,x,N,B,R)=>{let T=0;const W=h.length;let F=d.length-1,U=W-1;for(;T<=F&&T<=U;){const G=d[T],re=h[T]=R?ct(h[T]):Xe(h[T]);if(Tt(G,re))I(G,re,w,null,A,x,N,B,R);else break;T++}for(;T<=F&&T<=U;){const G=d[F],re=h[U]=R?ct(h[U]):Xe(h[U]);if(Tt(G,re))I(G,re,w,null,A,x,N,B,R);else break;F--,U--}if(T>F){if(T<=U){const G=U+1,re=G<W?h[G].el:E;for(;T<=U;)I(null,h[T]=R?ct(h[T]):Xe(h[T]),w,re,A,x,N,B,R),T++}}else if(T>U)for(;T<=F;)Z(d[T],A,x,!0),T++;else{const G=T,re=T,fe=new Map;for(T=re;T<=U;T++){const $e=h[T]=R?ct(h[T]):Xe(h[T]);$e.key!=null&&fe.set($e.key,T)}let me,ke=0;const Te=U-re+1;let Ze=!1,et=0;const vn=new Array(Te);for(T=0;T<Te;T++)vn[T]=0;for(T=G;T<=F;T++){const $e=d[T];if(ke>=Te){Z($e,A,x,!0);continue}let tt;if($e.key!=null)tt=fe.get($e.key);else for(me=re;me<=U;me++)if(vn[me-re]===0&&Tt($e,h[me])){tt=me;break}tt===void 0?Z($e,A,x,!0):(vn[tt-re]=T+1,tt>=et?et=tt:Ze=!0,I($e,h[tt],w,null,A,x,N,B,R),ke++)}const bo=Ze?rl(vn):Rt;for(me=bo.length-1,T=Te-1;T>=0;T--){const $e=re+T,tt=h[$e],wo=h[$e+1],ko=$e+1<W?wo.el||Ci(wo):E;vn[T]===0?I(null,tt,w,ko,A,x,N,B,R):Ze&&(me<0||T!==bo[me]?ee(tt,w,ko,2):me--)}}},ee=(d,h,w,E,A=null)=>{const{el:x,type:N,transition:B,children:R,shapeFlag:T}=d;if(T&6){ee(d.component.subTree,h,w,E);return}if(T&128){d.suspense.move(h,w,E);return}if(T&64){N.move(d,h,w,yn);return}if(N===Q){s(x,h,w);for(let F=0;F<R.length;F++)ee(R[F],h,w,E);s(d.anchor,h,w);return}if(N===Wn){X(d,h,w);return}if(E!==2&&T&1&&B)if(E===0)B.beforeEnter(x),s(x,h,w),Pe(()=>B.enter(x),A);else{const{leave:F,delayLeave:U,afterLeave:G}=B,re=()=>{d.ctx.isUnmounted?r(x):s(x,h,w)},fe=()=>{x._isLeaving&&x[Je](!0),F(x,()=>{re(),G&&G()})};U?U(x,re,fe):fe()}else s(x,h,w)},Z=(d,h,w,E=!1,A=!1)=>{const{type:x,props:N,ref:B,children:R,dynamicChildren:T,shapeFlag:W,patchFlag:F,dirs:U,cacheIndex:G,memo:re}=d;if(F===-2&&(A=!1),B!=null&&(qe(),nn(B,null,w,d,!0),ze()),G!=null&&(h.renderCache[G]=void 0),W&256){h.ctx.deactivate(d);return}const fe=W&1&&U,me=!Ut(d);let ke;if(me&&(ke=N&&N.onVnodeBeforeUnmount)&&Qe(ke,h,d),W&6)Lm(d.component,w,E);else{if(W&128){d.suspense.unmount(w,E);return}fe&&St(d,null,h,"beforeUnmount"),W&64?d.type.remove(d,h,w,yn,E):T&&!T.hasOnce&&(x!==Q||F>0&&F&64)?_n(T,h,w,!1,!0):(x===Q&&F&384||!A&&W&16)&&_n(R,h,w),E&&ce(d)}const Te=re!=null&&G==null;(me&&(ke=N&&N.onVnodeUnmounted)||fe||Te)&&Pe(()=>{ke&&Qe(ke,h,d),fe&&St(d,null,h,"unmounted"),Te&&(d.el=null)},w)},ce=d=>{const{type:h,el:w,anchor:E,transition:A}=d;if(h===Q){qs(w,E);return}if(h===Wn){j(d);return}const x=()=>{r(w),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(d.shapeFlag&1&&A&&!A.persisted){const{leave:N,delayLeave:B}=A,R=()=>N(w,x);B?B(d.el,x,R):R()}else x()},qs=(d,h)=>{let w;for(;d!==h;)w=S(d),r(d),d=w;r(h)},Lm=(d,h,w)=>{const{bum:E,scope:A,job:x,subTree:N,um:B,m:R,a:T}=d;ki(R),ki(T),E&&An(E),A.stop(),x&&(x.flags|=8,Z(N,d,h,w)),B&&Pe(B,h),Pe(()=>{d.isUnmounted=!0},h)},_n=(d,h,w,E=!1,A=!1,x=0)=>{for(let N=x;N<d.length;N++)Z(d[N],h,w,E,A)},ns=d=>{if(d.shapeFlag&6)return ns(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=S(d.anchor||d.el),w=h&&h[ya];return w?S(w):h};let zs=!1;const vo=(d,h,w)=>{let E;d==null?h._vnode&&(Z(h._vnode,null,null,!0),E=h._vnode.component):I(h._vnode||null,d,h,null,null,null,w),h._vnode=d,zs||(zs=!0,Mr(E),Er(),zs=!1)},yn={p:I,um:Z,m:ee,r:ce,mt:b,mc:be,pc:v,pbc:ne,n:ns,o:e};return{render:vo,hydrate:void 0,createApp:Ua(vo)}}function Bs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function xt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function sl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function bi(e,t,n=!1){const s=e.children,r=t.children;if(H(s)&&H(r))for(let i=0;i<s.length;i++){const o=s[i];let a=r[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[i]=ct(r[i]),a.el=o.el),!n&&a.patchFlag!==-2&&bi(o,a)),a.type===Kn&&(a.patchFlag===-1&&(a=r[i]=ct(a)),a.el=o.el),a.type===Oe&&!a.el&&(a.el=o.el)}}function rl(e){const t=e.slice(),n=[0];let s,r,i,o,a;const l=e.length;for(s=0;s<l;s++){const f=e[s];if(f!==0){if(r=n[n.length-1],e[r]<f){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<f?i=a+1:o=a;f<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function wi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wi(t)}function ki(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ci(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ci(t.subTree):null}const Ai=e=>e.__isSuspense;function il(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):ha(e)}const Q=Symbol.for("v-fgt"),Kn=Symbol.for("v-txt"),Oe=Symbol.for("v-cmt"),Wn=Symbol.for("v-stc"),on=[];let Fe=null;function m(e=!1){on.push(Fe=e?null:[])}function ol(){on.pop(),Fe=on[on.length-1]||null}let an=1;function qn(e,t=!1){an+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function Si(e){return e.dynamicChildren=an>0?Fe||Rt:null,ol(),an>0&&Fe&&Fe.push(e),e}function _(e,t,n,s,r,i){return Si(u(e,t,n,s,r,i,!0))}function _e(e,t,n,s,r){return Si(ye(e,t,n,s,r,!0))}function ln(e){return e?e.__v_isVNode===!0:!1}function Tt(e,t){return e.type===t.type&&e.key===t.key}const xi=({key:e})=>e??null,zn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?pe(e)||Ee(e)||Y(e)?{i:Se,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,r=null,i=e===Q?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&xi(t),ref:t&&zn(t),scopeId:Ir,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Se};return a?(Ns(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=pe(n)?8:16),an>0&&!o&&Fe&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Fe.push(l),l}const ye=al;function al(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Jr)&&(e=Oe),ln(e)){const a=gt(e,t,!0);return n&&Ns(a,n),an>0&&!i&&Fe&&(a.shapeFlag&6?Fe[Fe.indexOf(e)]=a:Fe.push(a)),a.patchFlag=-2,a}if(vl(e)&&(e=e.__vccOpts),t){t=ll(t);let{class:a,style:l}=t;a&&!pe(a)&&(t.class=se(a)),ae(l)&&(bs(l)&&!H(l)&&(l=Ce({},l)),t.style=De(l))}const o=pe(e)?1:Ai(e)?128:Nr(e)?64:ae(e)?4:Y(e)?2:0;return u(e,t,n,s,r,o,i,!0)}function ll(e){return e?bs(e)||hi(e)?Ce({},e):e:null}function gt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:l}=e,f=t?cl(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&xi(f),ref:t&&t.ref?n&&i?H(i)?i.concat(zn(t)):[i,zn(t)]:zn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Q?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&gt(e.ssContent),ssFallback:e.ssFallback&&gt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&tn(c,l.clone(c)),c}function Gn(e=" ",t=0){return ye(Kn,null,e,t)}function Yn(e,t){const n=ye(Wn,null,e);return n.staticCount=t,n}function P(e="",t=!1){return t?(m(),_e(Oe,null,e)):ye(Oe,null,e)}function Xe(e){return e==null||typeof e=="boolean"?ye(Oe):H(e)?ye(Q,null,e.slice()):ln(e)?ct(e):ye(Kn,null,String(e))}function ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gt(e)}function Ns(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(H(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ns(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!hi(t)?t._ctx=Se:r===3&&Se&&(Se.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Y(t)?(t={default:t,_ctx:Se},n=32):(t=String(t),s&64?(n=16,t=[Gn(t)]):n=8);e.children=t,e.shapeFlag|=n}function cl(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=se([t.class,s.class]));else if(r==="style")t.style=De([t.style,s.style]);else if(bn(r)){const i=t[r],o=s[r];o&&i!==o&&!(H(i)&&i.includes(o))?t[r]=i?[].concat(i,o):o:o==null&&i==null&&!wn(r)&&(t[r]=o)}else r!==""&&(t[r]=s[r])}return t}function Qe(e,t,n,s=null){Ke(e,t,7,[n,s])}const ul=oi();let dl=0;function fl(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||ul,i={uid:dl++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Bo(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:pi(s,r),emitsOptions:ai(s,r),emit:null,emitted:null,propsDefaults:ue,inheritAttrs:s.inheritAttrs,ctx:ue,data:ue,props:ue,attrs:ue,slots:ue,refs:ue,setupState:ue,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Va.bind(null,i),e.ce&&e.ce(i),i}let Ie=null;const Ti=()=>Ie||Se;let Jn,Ps;{const e=xn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Jn=t("__VUE_INSTANCE_SETTERS__",n=>Ie=n),Ps=t("__VUE_SSR_SETTERS__",n=>un=n)}const cn=e=>{const t=Ie;return Jn(e),e.scope.on(),()=>{e.scope.off(),Jn(t)}},Mi=()=>{Ie&&Ie.scope.off(),Jn(null)};function Ei(e){return e.vnode.shapeFlag&4}let un=!1;function hl(e,t=!1,n=!1){t&&Ps(t);const{props:s,children:r}=e.vnode,i=Ei(e);Ya(e,s,i,t),Za(e,r,n||t);const o=i?ml(e,t):void 0;return t&&Ps(!1),o}function ml(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ba);const{setup:s}=n;if(s){qe();const r=e.setupContext=s.length>1?gl(e):null,i=cn(e),o=$t(s,e,0,[e.props,r]),a=Js(o);if(ze(),i(),(a||e.sp)&&!Ut(e)&&Hr(e),a){if(o.then(Mi,Mi),t)return o.then(l=>{Oi(e,l)}).catch(l=>{Nn(l,e,0)});e.asyncDep=o}else Oi(e,o)}else Ii(e)}function Oi(e,t,n){Y(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ae(t)&&(e.setupState=Cr(t)),Ii(e)}function Ii(e,t,n){const s=e.type;e.render||(e.render=s.render||We);{const r=cn(e);qe();try{Na(e)}finally{ze(),r()}}}const pl={get(e,t){return Me(e,"get",""),e[t]}};function gl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,pl),slots:e.slots,emit:e.emit,expose:t}}function Xn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Cr(ws(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in sn)return sn[n](e)},has(t,n){return n in t||n in sn}})):e.proxy}const _l=/(?:^|[-_])\w/g,yl=e=>e.replace(_l,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ri(e,t=!0){return Y(e)?e.displayName||e.name:e.name||t&&e.__name}function Li(e,t,n=!1){let s=Ri(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e){const r=i=>{for(const o in i)if(i[o]===t)return o};s=r(e.components)||e.parent&&r(e.parent.type.components)||r(e.appContext.components)}return s?yl(s):n?"App":"Anonymous"}function vl(e){return Y(e)&&"__vccOpts"in e}const bl=(e,t)=>ra(e,t,un);function wl(e,t,n){try{qn(-1);const s=arguments.length;return s===2?ae(t)&&!H(t)?ln(t)?ye(e,null,[t]):ye(e,t):ye(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ln(n)&&(n=[n]),ye(e,t,n))}finally{qn(1)}}const kl="3.5.34";/**
18
18
  * @vue/runtime-dom v3.5.34
19
19
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
20
20
  * @license MIT
21
- **/let Fs;const Ri=typeof window<"u"&&window.trustedTypes;if(Ri)try{Fs=Ri.createPolicy("vue",{createHTML:e=>e})}catch{}const Li=Fs?e=>Fs.createHTML(e):e=>e,wl="http://www.w3.org/2000/svg",kl="http://www.w3.org/1998/Math/MathML",ct=typeof document<"u"?document:null,Ni=ct&&ct.createElement("template"),Cl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?ct.createElementNS(wl,e):t==="mathml"?ct.createElementNS(kl,e):n?ct.createElement(e,{is:n}):ct.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ct.createTextNode(e),createComment:e=>ct.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ct.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Ni.innerHTML=Li(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const a=Ni.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},gt="transition",cn="animation",un=Symbol("_vtc"),$i={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Sl=ke({},Nr,$i),Al=(e=>(e.displayName="Transition",e.props=Sl,e))((e,{slots:t})=>vl(va,xl(e),t)),xt=(e,t=[])=>{H(e)?e.forEach(n=>n(...t)):e&&e(...t)},Fi=e=>e?H(e)?e.some(t=>t.length>1):e.length>1:!1;function xl(e){const t={};for(const h in e)h in $i||(t[h]=e[h]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:f=o,appearToClass:c=a,leaveFromClass:g=`${n}-leave-from`,leaveActiveClass:A=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,D=Tl(r),O=D&&D[0],Y=D&&D[1],{onBeforeEnter:W,onEnter:V,onEnterCancelled:J,onLeave:j,onLeaveCancelled:Q,onBeforeAppear:ge=W,onAppear:ye=V,onAppearCancelled:ve=J}=t,q=(h,v,C,I)=>{h._enterCancelled=I,Tt(h,v?c:a),Tt(h,v?f:o),C&&C()},se=(h,v)=>{h._isLeaving=!1,Tt(h,g),Tt(h,k),Tt(h,A),v&&v()},le=h=>(v,C)=>{const I=h?ye:V,y=()=>q(v,h,C);xt(I,[v,y]),Pi(()=>{Tt(v,h?l:i),ut(v,h?c:a),Fi(I)||Di(v,s,O,y)})};return ke(t,{onBeforeEnter(h){xt(W,[h]),ut(h,i),ut(h,o)},onBeforeAppear(h){xt(ge,[h]),ut(h,l),ut(h,f)},onEnter:le(!1),onAppear:le(!0),onLeave(h,v){h._isLeaving=!0;const C=()=>se(h,v);ut(h,g),h._enterCancelled?(ut(h,A),Hi(h)):(Hi(h),ut(h,A)),Pi(()=>{h._isLeaving&&(Tt(h,g),ut(h,k),Fi(j)||Di(h,s,Y,C))}),xt(j,[h,C])},onEnterCancelled(h){q(h,!1,void 0,!0),xt(J,[h])},onAppearCancelled(h){q(h,!0,void 0,!0),xt(ve,[h])},onLeaveCancelled(h){se(h),xt(Q,[h])}})}function Tl(e){if(e==null)return null;if(ae(e))return[Ps(e.enter),Ps(e.leave)];{const t=Ps(e);return[t,t]}}function Ps(e){return Ao(e)}function ut(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[un]||(e[un]=new Set)).add(t)}function Tt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[un];n&&(n.delete(t),n.size||(e[un]=void 0))}function Pi(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ml=0;function Di(e,t,n,s){const r=e._endId=++Ml,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=El(e,t);if(!o)return s();const f=o+"end";let c=0;const g=()=>{e.removeEventListener(f,A),i()},A=k=>{k.target===e&&++c>=l&&g()};setTimeout(()=>{c<l&&g()},a+1),e.addEventListener(f,A)}function El(e,t){const n=window.getComputedStyle(e),s=D=>(n[D]||"").split(", "),r=s(`${gt}Delay`),i=s(`${gt}Duration`),o=ji(r,i),a=s(`${cn}Delay`),l=s(`${cn}Duration`),f=ji(a,l);let c=null,g=0,A=0;t===gt?o>0&&(c=gt,g=o,A=i.length):t===cn?f>0&&(c=cn,g=f,A=l.length):(g=Math.max(o,f),c=g>0?o>f?gt:cn:null,A=c?c===gt?i.length:l.length:0);const k=c===gt&&/\b(?:transform|all)(?:,|$)/.test(s(`${gt}Property`).toString());return{type:c,timeout:g,propCount:A,hasTransform:k}}function ji(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Ui(n)+Ui(e[s])))}function Ui(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Hi(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ol(e,t,n){const s=e[un];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Vi=Symbol("_vod"),Il=Symbol("_vsh"),Bl=Symbol(""),Rl=/(?:^|;)\s*display\s*:/;function Ll(e,t,n){const s=e.style,r=he(n);let i=!1;if(n&&!r){if(t)if(he(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&dn(s,a,"")}else for(const o in t)n[o]==null&&dn(s,o,"");for(const o in n){o==="display"&&(i=!0);const a=n[o];a!=null?$l(e,o,!he(t)&&t?t[o]:void 0,a)||dn(s,o,a):dn(s,o,"")}}else if(r){if(t!==n){const o=s[Bl];o&&(n+=";"+o),s.cssText=n,i=Rl.test(n)}}else t&&e.removeAttribute("style");Vi in e&&(e[Vi]=i?s.display:"",e[Il]&&(s.display="none"))}const Ki=/\s*!important$/;function dn(e,t,n){if(H(n))n.forEach(s=>dn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Nl(e,t);Ki.test(n)?e.setProperty(ft(s),n.replace(Ki,""),"important"):e[s]=n}}const Wi=["Webkit","Moz","ms"],Ds={};function Nl(e,t){const n=Ds[t];if(n)return n;let s=Ie(t);if(s!=="filter"&&s in e)return Ds[t]=s;s=wn(s);for(let r=0;r<Wi.length;r++){const i=Wi[r]+s;if(i in e)return Ds[t]=i}return t}function $l(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&he(s)&&n===s}const qi="http://www.w3.org/1999/xlink";function zi(e,t,n,s,r,i=Oo(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(qi,t.slice(6,t.length)):e.setAttributeNS(qi,t,n):n==null||i&&!er(n)?e.removeAttribute(t):e.setAttribute(t,i?"":je(n)?String(n):n)}function Gi(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Li(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=er(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function _t(e,t,n,s){e.addEventListener(t,n,s)}function Fl(e,t,n,s){e.removeEventListener(t,n,s)}const Yi=Symbol("_vei");function Pl(e,t,n,s,r=null){const i=e[Yi]||(e[Yi]={}),o=i[t];if(s&&o)o.value=s;else{const[a,l]=Dl(t);if(s){const f=i[t]=Hl(s,r);_t(e,a,f,l)}else o&&(Fl(e,a,o,l),i[t]=void 0)}}const Ji=/(?:Once|Passive|Capture)$/;function Dl(e){let t;if(Ji.test(e)){t={};let s;for(;s=e.match(Ji);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):ft(e.slice(2)),t]}let js=0;const jl=Promise.resolve(),Ul=()=>js||(jl.then(()=>js=0),js=Date.now());function Hl(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Ve(Vl(s,n.value),t,5,[s])};return n.value=e,n.attached=Ul(),n}function Vl(e,t){if(H(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Xi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Kl=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Ol(e,s,o):t==="style"?Ll(e,n,s):yn(t)?vn(t)||Pl(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Wl(e,t,s,o))?(Gi(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zi(e,t,s,o,i,t!=="value")):e._isVueCE&&(ql(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!he(s)))?Gi(e,Ie(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),zi(e,t,s,o))};function Wl(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xi(t)&&G(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Xi(t)&&he(n)?!1:t in e}function ql(e,t){const n=e._def.props;if(!n)return!1;const s=Ie(t);return Array.isArray(n)?n.some(r=>Ie(r)===s):Object.keys(n).some(r=>Ie(r)===s)}const Ut=e=>{const t=e.props["onUpdate:modelValue"]||!1;return H(t)?n=>kn(t,n):t};function zl(e){e.target.composing=!0}function Qi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dt=Symbol("_assign");function Zi(e,t,n){return t&&(e=e.trim()),n&&(e=Cn(e)),e}const Mt={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[dt]=Ut(r);const i=s||r.props&&r.props.type==="number";_t(e,t?"change":"input",o=>{o.target.composing||e[dt](Zi(e.value,n,i))}),(n||i)&&_t(e,"change",()=>{e.value=Zi(e.value,n,i)}),t||(_t(e,"compositionstart",zl),_t(e,"compositionend",Qi),_t(e,"change",Qi))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[dt]=Ut(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Cn(e.value):e.value,l=t??"";if(a===l)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===l)||(e.value=l)}},Gl={deep:!0,created(e,t,n){e[dt]=Ut(n),_t(e,"change",()=>{const s=e._modelValue,r=fn(e),i=e.checked,o=e[dt];if(H(s)){const a=as(s,r),l=a!==-1;if(i&&!l)o(s.concat(r));else if(!i&&l){const f=[...s];f.splice(a,1),o(f)}}else if(Bt(s)){const a=new Set(s);i?a.add(r):a.delete(r),o(a)}else o(no(e,i))})},mounted:eo,beforeUpdate(e,t,n){e[dt]=Ut(n),eo(e,t,n)}};function eo(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(H(t))r=as(t,s.props.value)>-1;else if(Bt(t))r=t.has(s.props.value);else{if(t===n)return;r=Rt(t,no(e,!0))}e.checked!==r&&(e.checked=r)}const Yl={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=Bt(t);_t(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Cn(fn(o)):fn(o));e[dt](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,Ar(()=>{e._assigning=!1})}),e[dt]=Ut(s)},mounted(e,{value:t}){to(e,t)},beforeUpdate(e,t,n){e[dt]=Ut(n)},updated(e,{value:t}){e._assigning||to(e,t)}};function to(e,t){const n=e.multiple,s=H(t);if(!(n&&!s&&!Bt(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],a=fn(o);if(n)if(s){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(f=>String(f)===String(a)):o.selected=as(t,a)>-1}else o.selected=t.has(a);else if(Rt(fn(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function fn(e){return"_value"in e?e._value:e.value}function no(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Jl=["ctrl","shift","alt","meta"],Xl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Jl.some(n=>e[`${n}Key`]&&!t.includes(n))},yt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o<t.length;o++){const a=Xl[t[o]];if(a&&a(r,t))return}return e(r,...i)})},Ql={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Jn=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=ft(r.key);if(t.some(o=>o===i||Ql[o]===i))return e(r)})},Zl=ke({patchProp:Kl},Cl);let so;function ec(){return so||(so=Za(Zl))}const tc=(...e)=>{const t=ec().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=sc(s);if(!r)return;const i=t._component;!G(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,nc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function nc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sc(e){return he(e)?document.querySelector(e):e}const rc=["connected","message","message_stream","conversation_updated","config_updated","action_status"],ro="/client",ic=5*60*1e3,oc=10*60*1e3,ac=5*60*1e3;function lc(e){const t={baseUrl:cc(e.baseUrl||""),widgetId:e.widgetId||"",userId:e.userId||"",userHash:e.userHash||"",listeners:new Map,eventSource:null,connection:"idle",visibilityHandler:null,started:!1,panelOpen:!1,pollTimer:null,burstTimer:null,hiddenGraceTimer:null,lastActivityAt:null};if(!t.baseUrl||!t.widgetId||!t.userId||!t.userHash)throw new Error("[transport] baseUrl, widgetId, userId, userHash are all required");function n(y,b){return t.listeners.has(y)||t.listeners.set(y,new Set),t.listeners.get(y).add(b),()=>t.listeners.get(y).delete(b)}function s(y,b){const S=t.listeners.get(y);S&&S.forEach(B=>{try{B(b)}catch(te){console.error("[transport] listener",y,te)}})}function r(y){t.connection!==y&&(t.connection=y,s("connection",y))}function i(){return{"X-User-Id":t.userId,"X-User-Hash":t.userHash,"X-Widget-Id":t.widgetId}}async function o(y,b,S){const B=await fetch(`${t.baseUrl}${ro}${b}`,{method:y,headers:{"Content-Type":"application/json",...i()},body:S!==void 0?JSON.stringify(S):void 0});if(!B.ok){const te=await a(B),ee=new Error(`HTTP ${B.status} ${y} ${b} :: ${(te==null?void 0:te.error)||B.statusText}`);throw ee.status=B.status,ee.body=te,ee}return B.status===204?null:B.json()}async function a(y){try{return await y.json()}catch{return null}}async function l(){const[y,b]=await Promise.all([fetch(`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`).then(async S=>{if(!S.ok){const B=await a(S);throw new Error(`HTTP ${S.status} GET /widgets/:id/config :: ${(B==null?void 0:B.error)||S.statusText}`)}return S.json()}),o("GET","/customers/me")]);return{config:y,customer:(b==null?void 0:b.customer)??null}}async function f(){const y=await o("GET","/customers/me");return(y==null?void 0:y.customer)??null}async function c(y){const b=await o("PATCH","/customers/me",y);return(b==null?void 0:b.customer)??null}async function g(){const y=await o("GET","/conversations");return(y==null?void 0:y.conversations)??[]}async function A(y={}){return(await o("POST","/conversations",y)).conversation}async function k(y){return(await o("GET",`/conversations/${encodeURIComponent(y)}`)).conversation}async function D(y,b){return(await o("PATCH",`/conversations/${encodeURIComponent(y)}`,b)).conversation}async function O(y,b={}){const S=new URLSearchParams;b.before&&S.set("before",b.before),b.since&&S.set("since",b.since),b.limit&&S.set("limit",String(b.limit));const B=S.toString()?`?${S.toString()}`:"";return o("GET",`/conversations/${encodeURIComponent(y)}/messages${B}`)}async function Y(y,b){ve();const S={client_msg_id:b.client_msg_id,type:"content",text_md:b.text_md,author:{id:t.userId,type:"user"},created_at:b.created_at||new Date().toISOString()};return Array.isArray(b.attachments)&&b.attachments.length&&(S.payload={type:"content",attachments:b.attachments}),b.metadata&&typeof b.metadata=="object"&&(S.metadata=b.metadata),o("POST",`/conversations/${encodeURIComponent(y)}/messages`,S)}async function W(y,b,S){return ve(),o("POST",`/messages/${encodeURIComponent(y)}/callbacks/${encodeURIComponent(b)}`,S?{inputs:S}:{})}async function V(y){const b=y.name||"attachment",S=y.type||"application/octet-stream",B=y.size||0,te=await o("POST","/attachments",{mime_type:S,size_bytes:B,name:b}),ee=await fetch(te.upload_url,{method:"PUT",headers:{"Content-Type":S},body:y});if(!ee.ok)throw new Error(`HTTP ${ee.status} PUT signed upload`);return{type:uc(S),path:te.path,mime_type:S,size_bytes:B}}async function J(y){return o("GET",`/attachments/sign?path=${encodeURIComponent(y)}`)}function j(){const y=new URLSearchParams({userId:t.userId,userHash:t.userHash,widgetId:t.widgetId}).toString();return`${t.baseUrl}${ro}/stream?${y}`}function Q(){if(!t.eventSource&&!(typeof document<"u"&&document.hidden))try{const y=new EventSource(j());for(const b of rc)y.addEventListener(b,S=>ge(b,S.data));y.addEventListener("error",()=>s("error",new Error("SSE error"))),t.eventSource=y,r("open")}catch(y){console.error("[transport] SSE open failed",y),s("error",y)}}function ge(y,b){try{const S=JSON.parse(b),B=S&&typeof S=="object"&&"data"in S?S.data:S;s(y,B)}catch(S){console.error("[transport] bad SSE payload",y,S)}}function ye(){t.eventSource&&(t.eventSource.close(),t.eventSource=null),t.connection!=="paused"&&r("idle")}function ve(){clearTimeout(t.burstTimer),Q(),t.panelOpen||(t.burstTimer=setTimeout(()=>{t.panelOpen||ye()},oc))}function q(y){t.panelOpen=!!y,t.panelOpen?(clearTimeout(t.burstTimer),Q()):ve()}async function se(){try{const y=await g(),b=y.reduce((B,te)=>{const ee=te==null?void 0:te.last_message_at;return ee&&(!B||ee>B)?ee:B},null);b&&(!t.lastActivityAt||b>t.lastActivityAt)&&(t.lastActivityAt=b,s("activity",{conversations:y,latestAt:b}),ve())}catch(y){console.error("[transport] poll failed",y)}}function le(){h(),!(typeof document<"u"&&document.hidden)&&(t.pollTimer=setInterval(se,ic))}function h(){t.pollTimer&&(clearInterval(t.pollTimer),t.pollTimer=null)}function v(){if(document.hidden)clearTimeout(t.hiddenGraceTimer),t.hiddenGraceTimer=setTimeout(()=>{t.hiddenGraceTimer=null,document.hidden&&(h(),ye(),r("paused"))},ac);else{if(t.hiddenGraceTimer){clearTimeout(t.hiddenGraceTimer),t.hiddenGraceTimer=null;return}r("idle"),le(),t.panelOpen&&Q()}}async function C(){if(t.started)return t.lastBootstrap;t.started=!0;const y=await l();t.lastBootstrap=y;try{const b=await g();t.lastActivityAt=b.reduce((S,B)=>{const te=B==null?void 0:B.last_message_at;return te&&(!S||te>S)?te:S},null)}catch(b){console.error("[transport] initial /conversations failed",b)}return typeof document<"u"&&(t.visibilityHandler=v,document.addEventListener("visibilitychange",t.visibilityHandler)),le(),y}function I(){h(),clearTimeout(t.burstTimer),clearTimeout(t.hiddenGraceTimer),t.hiddenGraceTimer=null,ye(),t.visibilityHandler&&(document.removeEventListener("visibilitychange",t.visibilityHandler),t.visibilityHandler=null),t.started=!1}return{on:n,start:C,stop:I,setPanelOpen:q,bootstrap:l,getCustomer:f,patchCustomer:c,listConversations:g,createConversation:A,getConversation:k,patchConversation:D,listMessages:O,postMessage:Y,postCallback:W,uploadAttachment:V,signAttachment:J,get connection(){return t.connection}}}function cc(e){return e.endsWith("/")?e.slice(0,-1):e}function uc(e){return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":"file"}function dc(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(16);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(e);else for(let n=0;n<16;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=[...e].map(n=>n.toString(16).padStart(2,"0"));return t.slice(0,4).join("")+"-"+t.slice(4,6).join("")+"-"+t.slice(6,8).join("")+"-"+t.slice(8,10).join("")+"-"+t.slice(10,16).join("")}function fc(e){const t=En({ready:!1,error:null,config:null,customer:null,conversations:[],messagesByConv:{},paginationByConv:{},streamingByMsgId:{},awaitingCallback:{},runningActionsByConv:{},connection:"idle"}),n=[];n.push(e.on("connection",h=>{t.connection=h})),n.push(e.on("message",h=>{const v=h==null?void 0:h.conversation_id,C=h==null?void 0:h.message;!v||!(C!=null&&C.id)||(Q(v,C),C.client_msg_id&&delete t.streamingByMsgId[C.client_msg_id],ve(v,C.created_at))})),n.push(e.on("message_stream",h=>{const v=h==null?void 0:h.message_id,C=h==null?void 0:h.token;!v||typeof C!="string"||(t.streamingByMsgId[v]=(t.streamingByMsgId[v]||"")+C)})),n.push(e.on("conversation_updated",h=>{const v=h==null?void 0:h.conversation_id,C=h==null?void 0:h.changes;if(!v||!C)return;const I=t.conversations.findIndex(y=>y.id===v);I!==-1&&(t.conversations[I]={...t.conversations[I],...C})})),n.push(e.on("config_updated",h=>{h!=null&&h.config&&(t.config=h.config)})),n.push(e.on("action_status",h=>{const v=h==null?void 0:h.conversation_id,C=h==null?void 0:h.action_id,I=h==null?void 0:h.action_name;if(!v||!C)return;const y=t.runningActionsByConv[v]||{};h.state==="running"?(y[C]=I||C,t.runningActionsByConv[v]={...y}):h.state==="done"&&(delete y[C],t.runningActionsByConv[v]={...y})})),n.push(e.on("activity",h=>{Array.isArray(h==null?void 0:h.conversations)&&(t.conversations=h.conversations)}));async function s(){try{const h=new Promise((C,I)=>setTimeout(()=>I(new Error("bootstrap timeout (15s) — check baseUrl, CORS, and network")),15e3)),v=await Promise.race([e.start(),h]);t.config=v.config,t.customer=v.customer,t.conversations=await Promise.race([e.listConversations(),h]),t.ready=!0}catch(h){console.error("[store] start failed",h),t.error=(h==null?void 0:h.message)||String(h)}}function r(){for(const h of n)try{h()}catch{}e.stop()}async function i(h){const v=se(h);if(!v)return t.customer;try{const C=await e.patchCustomer(v);C&&(t.customer=C)}catch(C){console.error("[store] applyCustomer failed",C)}return t.customer}async function o(h={}){const v=await e.createConversation(h),C=t.conversations.findIndex(I=>I.id===v.id);return C===-1?t.conversations=[v,...t.conversations]:t.conversations[C]=v,v}const a=50;async function l(h){const v=t.paginationByConv[h];if(!(v!=null&&v.loaded||v!=null&&v.loading)){c(h,{nextCursor:null,loading:!0,loaded:!1});try{const C=await e.listMessages(h,{limit:a}),I=(C==null?void 0:C.messages)??[],y=t.messagesByConv[h]||[],b=new Set;for(const B of I)(B==null?void 0:B.id)!=null&&b.add(`id:${String(B.id)}`),B!=null&&B.client_msg_id&&b.add(`c:${B.client_msg_id}`);const S=y.filter(B=>!((B==null?void 0:B.id)!=null&&b.has(`id:${String(B.id)}`)||B!=null&&B.client_msg_id&&b.has(`c:${B.client_msg_id}`)));t.messagesByConv[h]=[...I,...S].sort(q),c(h,{nextCursor:(C==null?void 0:C.next_cursor)??null,loading:!1,loaded:!0})}catch(C){console.error("[store] openConversation failed",C),c(h,{nextCursor:null,loading:!1,loaded:!1})}}}async function f(h){var y;const v=t.paginationByConv[h];if(!v||v.loading||!v.nextCursor)return;const I=(y=(t.messagesByConv[h]||[]).find(b=>b==null?void 0:b.created_at))==null?void 0:y.created_at;if(I){c(h,{...v,loading:!0});try{const b=await e.listMessages(h,{before:I,limit:a}),S=(b==null?void 0:b.messages)??[],B=t.messagesByConv[h]||[],te=new Set;for(const Z of B)(Z==null?void 0:Z.id)!=null&&te.add(`id:${String(Z.id)}`),Z!=null&&Z.client_msg_id&&te.add(`c:${Z.client_msg_id}`);const ee=S.filter(Z=>!((Z==null?void 0:Z.id)!=null&&te.has(`id:${String(Z.id)}`)||Z!=null&&Z.client_msg_id&&te.has(`c:${Z.client_msg_id}`)));t.messagesByConv[h]=[...ee,...B],c(h,{nextCursor:(b==null?void 0:b.next_cursor)??null,loading:!1,loaded:!0})}catch(b){console.error("[store] loadMore failed",b),c(h,{...v,loading:!1})}}}function c(h,v){t.paginationByConv={...t.paginationByConv,[h]:v}}async function g(h,v){const C=await e.patchConversation(h,v),I=t.conversations.findIndex(y=>y.id===h);I!==-1&&(t.conversations[I]=C)}async function A(h,v,{attachments:C,metadata:I}={}){var ee;const y=(v||"").trim(),b=Array.isArray(C)&&C.length>0;if(!h||!y&&!b)return;const S=dc(),B=le(h),te={id:S,client_msg_id:S,conversation_id:h,type:"content",text_md:y,author:{type:"user",id:((ee=t.customer)==null?void 0:ee.external_id)||null},created_at:B,_pending:!0,...b?{payload:{type:"content",attachments:C}}:{},...I&&typeof I=="object"?{metadata:I}:{}};Q(h,te);try{await e.postMessage(h,{client_msg_id:S,text_md:y,created_at:B,...b?{attachments:C}:{},...I&&typeof I=="object"?{metadata:I}:{}})}catch(Z){console.error("[store] send failed",Z),ye(h,S,{_failed:!0,_pending:!1})}}async function k(h,v,C){h!=null&&(t.awaitingCallback[h]=!0);try{await e.postCallback(h,v,C)}catch(I){console.error("[store] callback failed",I),h!=null&&delete t.awaitingCallback[h]}}const D=new Map;async function O(h){if(!h)return null;const v=D.get(h);if(v!=null&&v.url){const C=v.expires_at?Date.parse(v.expires_at):0;if(!C||C-Date.now()>6e4)return v.url}try{const C=await e.signAttachment(h);if(C!=null&&C.signed_url)return D.set(h,{url:C.signed_url,expires_at:C.expires_at}),C.signed_url}catch(C){console.error("[store] sign attachment failed",C)}return null}async function Y(h,{rating:v,comment:C}={}){const I=t.conversations.find(S=>S.id===h),b={...(I==null?void 0:I.metadata)||{},feedback:{rating:v,comment:C||null,submitted_at:new Date().toISOString()}};await g(h,{metadata:b})}function W(h){var C,I;const v=t.messagesByConv[h]||[];for(let y=v.length-1;y>=0;y--){const b=v[y];if((b==null?void 0:b.type)==="action"&&((C=b==null?void 0:b.payload)==null?void 0:C.type)==="action"&&((I=b==null?void 0:b.payload)==null?void 0:I.state)==="pending"&&Array.isArray(b==null?void 0:b.callbacks)&&b.callbacks.length>0&&!t.awaitingCallback[b.id])return b}return null}function V(h){var C,I,y;const v=t.messagesByConv[h]||[];for(let b=v.length-1;b>=0;b--){const S=v[b];if(((C=S==null?void 0:S.author)==null?void 0:C.type)==="user"||(S==null?void 0:S.type)==="action"&&((I=S==null?void 0:S.payload)==null?void 0:I.state)==="pending")return null;const B=(y=S==null?void 0:S.metadata)==null?void 0:y.form;if(B&&Array.isArray(B.fields)&&B.fields.length>0)return{message:S,form:B}}return null}function J(h){const v=t.runningActionsByConv[h];if(!v)return null;const C=Object.keys(v);if(C.length===0)return null;const I=C[0];return{id:I,payload:{name:v[I]}}}function j(h){var C,I,y,b;const v=t.messagesByConv[h]||[];for(let S=v.length-1;S>=0;S--){const B=v[S];if(((C=B==null?void 0:B.author)==null?void 0:C.type)==="user")return[];if((B==null?void 0:B.type)==="action"&&((I=B==null?void 0:B.payload)==null?void 0:I.state)==="pending")return[];if(((y=B==null?void 0:B.author)==null?void 0:y.type)!=="agent_ia")continue;const te=(b=B==null?void 0:B.metadata)==null?void 0:b.suggested_replies;return Array.isArray(te)&&te.length?te.map(ee=>{if(typeof ee=="string"){const Z=ee.trim();return Z?{label:Z,kind:null}:null}if(ee&&typeof ee=="object"&&typeof ee.label=="string"){const Z=ee.label.trim();if(!Z)return null;const ts=ee.kind==="cta"||ee.kind==="choice"||ee.kind==="followup"?ee.kind:null;return{label:Z,kind:ts}}return null}).filter(Boolean).slice(0,4):[]}return[]}function Q(h,v){var b;const C=t.messagesByConv[h]||[];let I=-1;v!=null&&v.client_msg_id&&(I=C.findIndex(S=>(S==null?void 0:S.client_msg_id)&&S.client_msg_id===v.client_msg_id)),I===-1&&(v==null?void 0:v.id)!==void 0&&(v==null?void 0:v.id)!==null&&(I=C.findIndex(S=>ge(S==null?void 0:S.id,v.id)));let y;I===-1?y=[...C,v].sort(q):(y=C.slice(),y[I]={...C[I],...v,_pending:!1,_failed:!1}),t.messagesByConv[h]=y,(v==null?void 0:v.type)==="action"&&((b=v==null?void 0:v.payload)!=null&&b.state)&&v.payload.state!=="pending"&&(v==null?void 0:v.id)!=null&&t.awaitingCallback[v.id]&&delete t.awaitingCallback[v.id]}function ge(h,v){return h===v?!0:h==null||v==null?!1:String(h)===String(v)}function ye(h,v,C){const I=t.messagesByConv[h];if(!I)return;const y=I.findIndex(S=>S.id===v);if(y===-1)return;const b=I.slice();b[y]={...I[y],...C},t.messagesByConv[h]=b}function ve(h,v){const C=t.conversations.findIndex(y=>y.id===h);if(C===-1)return;const I=t.conversations[C];if(v&&(!I.last_message_at||v>I.last_message_at)){const y=t.conversations.slice();y[C]={...I,last_message_at:v},y.sort((b,S)=>(S.last_message_at||"").localeCompare(b.last_message_at||"")),t.conversations=y}}function q(h,v){return(h.created_at||"").localeCompare(v.created_at||"")}function se(h){if(!h||typeof h!="object")return null;const v={},C={};for(const[I,y]of Object.entries(h))y!==void 0&&(I==="name"||I==="email"?y!=null&&String(y).trim()!==""&&(v[I]=y):(I==="values"||I==="metadata")&&y&&typeof y=="object"?Object.assign(C,y):C[I]=y);return Object.keys(C).length&&(v.values=C),Object.keys(v).length?v:null}function le(h){const v=t.messagesByConv[h]||[];let C="";for(const b of v)b!=null&&b.created_at&&b.created_at>C&&(C=b.created_at);const I=new Date().toISOString();return!C||I>C?I:new Date(Date.parse(C)+1).toISOString()}return{state:t,start:s,destroy:r,applyCustomer:i,createConversation:o,openConversation:l,loadMore:f,patchConversation:g,send:A,clickCallback:k,signAttachment:O,submitFeedback:Y,getPendingApproval:W,getActionInFlight:J,getLatestSuggestions:j,getLatestForm:V,setPanelOpen:e.setPanelOpen}}const Le={w:"#ffffff",g50:"#F9F9F7",g100:"#F2F1EE",g150:"#E8E6E2",g200:"#D9D6CF",g300:"#B4B0A8",g400:"#888480",g500:"#5A5753",g700:"#2B2926",g900:"#17161A",accent:"#5B5FEF",accentLight:"#EEEFFE",green:"#22C55E",red:"#B91C1C",redBg:"#FDECEC"},Us=["#5B5FEF","#7C3AED","#DB2777","#0891B2","#D97706","#059669"];function io(e=""){return e?Us[e.charCodeAt(0)%Us.length]:Us[0]}function oo(e=""){return e.split(" ").map(t=>t[0]||"").join("").toUpperCase().slice(0,2)}function ao(e=new Date){return e.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"})}const hc=`
21
+ **/let Fs;const Bi=typeof window<"u"&&window.trustedTypes;if(Bi)try{Fs=Bi.createPolicy("vue",{createHTML:e=>e})}catch{}const Ni=Fs?e=>Fs.createHTML(e):e=>e,Cl="http://www.w3.org/2000/svg",Al="http://www.w3.org/1998/Math/MathML",ut=typeof document<"u"?document:null,Pi=ut&&ut.createElement("template"),Sl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?ut.createElementNS(Cl,e):t==="mathml"?ut.createElementNS(Al,e):n?ut.createElement(e,{is:n}):ut.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ut.createTextNode(e),createComment:e=>ut.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ut.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Pi.innerHTML=Ni(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const a=Pi.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},_t="transition",dn="animation",fn=Symbol("_vtc"),Fi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xl=Ce({},Pr,Fi),Tl=(e=>(e.displayName="Transition",e.props=xl,e))((e,{slots:t})=>wl(wa,Ml(e),t)),Mt=(e,t=[])=>{H(e)?e.forEach(n=>n(...t)):e&&e(...t)},$i=e=>e?H(e)?e.some(t=>t.length>1):e.length>1:!1;function Ml(e){const t={};for(const $ in e)$ in Fi||(t[$]=e[$]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:f=o,appearToClass:c=a,leaveFromClass:g=`${n}-leave-from`,leaveActiveClass:S=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,V=El(r),I=V&&V[0],J=V&&V[1],{onBeforeEnter:z,onEnter:K,onEnterCancelled:X,onLeave:j,onLeaveCancelled:te,onBeforeAppear:le=z,onAppear:we=K,onAppearCancelled:be=X}=t,q=($,p,b,C)=>{$._enterCancelled=C,Et($,p?c:a),Et($,p?f:o),b&&b()},ne=($,p)=>{$._isLeaving=!1,Et($,g),Et($,k),Et($,S),p&&p()},de=$=>(p,b)=>{const C=$?we:K,O=()=>q(p,$,b);Mt(C,[p,O]),Di(()=>{Et(p,$?l:i),dt(p,$?c:a),$i(C)||ji(p,s,I,O)})};return Ce(t,{onBeforeEnter($){Mt(z,[$]),dt($,i),dt($,o)},onBeforeAppear($){Mt(le,[$]),dt($,l),dt($,f)},onEnter:de(!1),onAppear:de(!0),onLeave($,p){$._isLeaving=!0;const b=()=>ne($,p);dt($,g),$._enterCancelled?(dt($,S),Vi($)):(Vi($),dt($,S)),Di(()=>{$._isLeaving&&(Et($,g),dt($,k),$i(j)||ji($,s,J,b))}),Mt(j,[$,b])},onEnterCancelled($){q($,!1,void 0,!0),Mt(X,[$])},onAppearCancelled($){q($,!0,void 0,!0),Mt(be,[$])},onLeaveCancelled($){ne($),Mt(te,[$])}})}function El(e){if(e==null)return null;if(ae(e))return[$s(e.enter),$s(e.leave)];{const t=$s(e);return[t,t]}}function $s(e){return To(e)}function dt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[fn]||(e[fn]=new Set)).add(t)}function Et(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[fn];n&&(n.delete(t),n.size||(e[fn]=void 0))}function Di(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ol=0;function ji(e,t,n,s){const r=e._endId=++Ol,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=Il(e,t);if(!o)return s();const f=o+"end";let c=0;const g=()=>{e.removeEventListener(f,S),i()},S=k=>{k.target===e&&++c>=l&&g()};setTimeout(()=>{c<l&&g()},a+1),e.addEventListener(f,S)}function Il(e,t){const n=window.getComputedStyle(e),s=V=>(n[V]||"").split(", "),r=s(`${_t}Delay`),i=s(`${_t}Duration`),o=Ui(r,i),a=s(`${dn}Delay`),l=s(`${dn}Duration`),f=Ui(a,l);let c=null,g=0,S=0;t===_t?o>0&&(c=_t,g=o,S=i.length):t===dn?f>0&&(c=dn,g=f,S=l.length):(g=Math.max(o,f),c=g>0?o>f?_t:dn:null,S=c?c===_t?i.length:l.length:0);const k=c===_t&&/\b(?:transform|all)(?:,|$)/.test(s(`${_t}Property`).toString());return{type:c,timeout:g,propCount:S,hasTransform:k}}function Ui(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Hi(n)+Hi(e[s])))}function Hi(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Vi(e){return(e?e.ownerDocument:document).body.offsetHeight}function Rl(e,t,n){const s=e[fn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ki=Symbol("_vod"),Ll=Symbol("_vsh"),Bl=Symbol(""),Nl=/(?:^|;)\s*display\s*:/;function Pl(e,t,n){const s=e.style,r=pe(n);let i=!1;if(n&&!r){if(t)if(pe(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&hn(s,a,"")}else for(const o in t)n[o]==null&&hn(s,o,"");for(const o in n){o==="display"&&(i=!0);const a=n[o];a!=null?$l(e,o,!pe(t)&&t?t[o]:void 0,a)||hn(s,o,a):hn(s,o,"")}}else if(r){if(t!==n){const o=s[Bl];o&&(n+=";"+o),s.cssText=n,i=Nl.test(n)}}else t&&e.removeAttribute("style");Ki in e&&(e[Ki]=i?s.display:"",e[Ll]&&(s.display="none"))}const Wi=/\s*!important$/;function hn(e,t,n){if(H(n))n.forEach(s=>hn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Fl(e,t);Wi.test(n)?e.setProperty(ht(s),n.replace(Wi,""),"important"):e[s]=n}}const qi=["Webkit","Moz","ms"],Ds={};function Fl(e,t){const n=Ds[t];if(n)return n;let s=Re(t);if(s!=="filter"&&s in e)return Ds[t]=s;s=Cn(s);for(let r=0;r<qi.length;r++){const i=qi[r]+s;if(i in e)return Ds[t]=i}return t}function $l(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&pe(s)&&n===s}const zi="http://www.w3.org/1999/xlink";function Gi(e,t,n,s,r,i=Ro(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(zi,t.slice(6,t.length)):e.setAttributeNS(zi,t,n):n==null||i&&!tr(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ue(n)?String(n):n)}function Yi(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Ni(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=tr(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function yt(e,t,n,s){e.addEventListener(t,n,s)}function Dl(e,t,n,s){e.removeEventListener(t,n,s)}const Ji=Symbol("_vei");function jl(e,t,n,s,r=null){const i=e[Ji]||(e[Ji]={}),o=i[t];if(s&&o)o.value=s;else{const[a,l]=Ul(t);if(s){const f=i[t]=Kl(s,r);yt(e,a,f,l)}else o&&(Dl(e,a,o,l),i[t]=void 0)}}const Xi=/(?:Once|Passive|Capture)$/;function Ul(e){let t;if(Xi.test(e)){t={};let s;for(;s=e.match(Xi);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):ht(e.slice(2)),t]}let js=0;const Hl=Promise.resolve(),Vl=()=>js||(Hl.then(()=>js=0),js=Date.now());function Kl(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Ke(Wl(s,n.value),t,5,[s])};return n.value=e,n.attached=Vl(),n}function Wl(e,t){if(H(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Qi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ql=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Rl(e,s,o):t==="style"?Pl(e,n,s):bn(t)?wn(t)||jl(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zl(e,t,s,o))?(Yi(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gi(e,t,s,o,i,t!=="value")):e._isVueCE&&(Gl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!pe(s)))?Yi(e,Re(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Gi(e,t,s,o))};function zl(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Qi(t)&&Y(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Qi(t)&&pe(n)?!1:t in e}function Gl(e,t){const n=e._def.props;if(!n)return!1;const s=Re(t);return Array.isArray(n)?n.some(r=>Re(r)===s):Object.keys(n).some(r=>Re(r)===s)}const Vt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return H(t)?n=>An(t,n):t};function Yl(e){e.target.composing=!0}function Zi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ft=Symbol("_assign");function eo(e,t,n){return t&&(e=e.trim()),n&&(e=Sn(e)),e}const Ot={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[ft]=Vt(r);const i=s||r.props&&r.props.type==="number";yt(e,t?"change":"input",o=>{o.target.composing||e[ft](eo(e.value,n,i))}),(n||i)&&yt(e,"change",()=>{e.value=eo(e.value,n,i)}),t||(yt(e,"compositionstart",Yl),yt(e,"compositionend",Zi),yt(e,"change",Zi))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[ft]=Vt(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Sn(e.value):e.value,l=t??"";if(a===l)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===l)||(e.value=l)}},Jl={deep:!0,created(e,t,n){e[ft]=Vt(n),yt(e,"change",()=>{const s=e._modelValue,r=mn(e),i=e.checked,o=e[ft];if(H(s)){const a=as(s,r),l=a!==-1;if(i&&!l)o(s.concat(r));else if(!i&&l){const f=[...s];f.splice(a,1),o(f)}}else if(Bt(s)){const a=new Set(s);i?a.add(r):a.delete(r),o(a)}else o(so(e,i))})},mounted:to,beforeUpdate(e,t,n){e[ft]=Vt(n),to(e,t,n)}};function to(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(H(t))r=as(t,s.props.value)>-1;else if(Bt(t))r=t.has(s.props.value);else{if(t===n)return;r=Nt(t,so(e,!0))}e.checked!==r&&(e.checked=r)}const Xl={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=Bt(t);yt(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Sn(mn(o)):mn(o));e[ft](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,xr(()=>{e._assigning=!1})}),e[ft]=Vt(s)},mounted(e,{value:t}){no(e,t)},beforeUpdate(e,t,n){e[ft]=Vt(n)},updated(e,{value:t}){e._assigning||no(e,t)}};function no(e,t){const n=e.multiple,s=H(t);if(!(n&&!s&&!Bt(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],a=mn(o);if(n)if(s){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(f=>String(f)===String(a)):o.selected=as(t,a)>-1}else o.selected=t.has(a);else if(Nt(mn(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function mn(e){return"_value"in e?e._value:e.value}function so(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ql=["ctrl","shift","alt","meta"],Zl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ql.some(n=>e[`${n}Key`]&&!t.includes(n))},vt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o<t.length;o++){const a=Zl[t[o]];if(a&&a(r,t))return}return e(r,...i)})},ec={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Qn=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=ht(r.key);if(t.some(o=>o===i||ec[o]===i))return e(r)})},tc=Ce({patchProp:ql},Sl);let ro;function nc(){return ro||(ro=tl(tc))}const sc=(...e)=>{const t=nc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ic(s);if(!r)return;const i=t._component;!Y(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,rc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function rc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ic(e){return pe(e)?document.querySelector(e):e}const oc=["connected","message","message_stream","conversation_updated","config_updated","action_status"],io="/client",ac=5*60*1e3,lc=10*60*1e3,cc=5*60*1e3;function uc(e){const t={baseUrl:dc(e.baseUrl||""),widgetId:e.widgetId||"",userId:e.userId||"",userHash:e.userHash||"",listeners:new Map,eventSource:null,connection:"idle",visibilityHandler:null,started:!1,panelOpen:!1,pollTimer:null,burstTimer:null,hiddenGraceTimer:null,lastActivityAt:null};if(!t.baseUrl||!t.widgetId||!t.userId||!t.userHash)throw new Error("[transport] baseUrl, widgetId, userId, userHash are all required");function n(y,v){return t.listeners.has(y)||t.listeners.set(y,new Set),t.listeners.get(y).add(v),()=>t.listeners.get(y).delete(v)}function s(y,v){const M=t.listeners.get(y);M&&M.forEach(L=>{try{L(v)}catch(ee){console.error("[transport] listener",y,ee)}})}function r(y){t.connection!==y&&(t.connection=y,s("connection",y))}function i(){return{"X-User-Id":t.userId,"X-User-Hash":t.userHash,"X-Widget-Id":t.widgetId}}async function o(y,v,M){const L=await fetch(`${t.baseUrl}${io}${v}`,{method:y,headers:{"Content-Type":"application/json",...i()},body:M!==void 0?JSON.stringify(M):void 0});if(!L.ok){const ee=await a(L),Z=new Error(`HTTP ${L.status} ${y} ${v} :: ${(ee==null?void 0:ee.error)||L.statusText}`);throw Z.status=L.status,Z.body=ee,Z}return L.status===204?null:L.json()}async function a(y){try{return await y.json()}catch{return null}}async function l(){const[y,v]=await Promise.all([fetch(`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`).then(async M=>{if(!M.ok){const L=await a(M);throw new Error(`HTTP ${M.status} GET /widgets/:id/config :: ${(L==null?void 0:L.error)||M.statusText}`)}return M.json()}),o("GET","/customers/me")]);return{config:y,customer:(v==null?void 0:v.customer)??null}}async function f(){const y=await o("GET","/customers/me");return(y==null?void 0:y.customer)??null}async function c(y){const v=await o("PATCH","/customers/me",y);return(v==null?void 0:v.customer)??null}async function g(){const y=await o("GET","/conversations");return(y==null?void 0:y.conversations)??[]}async function S(y={}){return(await o("POST","/conversations",y)).conversation}async function k(y){return(await o("GET",`/conversations/${encodeURIComponent(y)}`)).conversation}async function V(y,v){return(await o("PATCH",`/conversations/${encodeURIComponent(y)}`,v)).conversation}async function I(y,v){return(await o("PATCH",`/conversations/${encodeURIComponent(y)}/read`,{message_id:v})).conversation}async function J(y,v={}){const M=new URLSearchParams;v.before&&M.set("before",v.before),v.since&&M.set("since",v.since),v.limit&&M.set("limit",String(v.limit));const L=M.toString()?`?${M.toString()}`:"";return o("GET",`/conversations/${encodeURIComponent(y)}/messages${L}`)}async function z(y,v){q();const M={client_msg_id:v.client_msg_id,type:"content",text_md:v.text_md,author:{id:t.userId,type:"user"},created_at:v.created_at||new Date().toISOString()};return Array.isArray(v.attachments)&&v.attachments.length&&(M.payload={type:"content",attachments:v.attachments}),v.metadata&&typeof v.metadata=="object"&&(M.metadata=v.metadata),o("POST",`/conversations/${encodeURIComponent(y)}/messages`,M)}async function K(y,v,M){return q(),o("POST",`/messages/${encodeURIComponent(y)}/callbacks/${encodeURIComponent(v)}`,M?{inputs:M}:{})}async function X(y){const v=y.name||"attachment",M=y.type||"application/octet-stream",L=y.size||0,ee=await o("POST","/attachments",{mime_type:M,size_bytes:L,name:v}),Z=await fetch(ee.upload_url,{method:"PUT",headers:{"Content-Type":M},body:y});if(!Z.ok)throw new Error(`HTTP ${Z.status} PUT signed upload`);return{type:fc(M),path:ee.path,mime_type:M,size_bytes:L}}async function j(y){return o("GET",`/attachments/sign?path=${encodeURIComponent(y)}`)}function te(){const y=new URLSearchParams({userId:t.userId,userHash:t.userHash,widgetId:t.widgetId}).toString();return`${t.baseUrl}${io}/stream?${y}`}function le(){if(!t.eventSource&&!(typeof document<"u"&&document.hidden))try{const y=new EventSource(te());for(const v of oc)y.addEventListener(v,M=>we(v,M.data));y.addEventListener("error",()=>s("error",new Error("SSE error"))),t.eventSource=y,r("open")}catch(y){console.error("[transport] SSE open failed",y),s("error",y)}}function we(y,v){try{const M=JSON.parse(v),L=M&&typeof M=="object"&&"data"in M?M.data:M;s(y,L)}catch(M){console.error("[transport] bad SSE payload",y,M)}}function be(){t.eventSource&&(t.eventSource.close(),t.eventSource=null),t.connection!=="paused"&&r("idle")}function q(){clearTimeout(t.burstTimer),le(),t.panelOpen||(t.burstTimer=setTimeout(()=>{t.panelOpen||be()},lc))}function ne(y){t.panelOpen=!!y,t.panelOpen?(clearTimeout(t.burstTimer),le()):q()}async function de(){try{const y=await g(),v=y.reduce((L,ee)=>{const Z=ee==null?void 0:ee.last_message_at;return Z&&(!L||Z>L)?Z:L},null);v&&(!t.lastActivityAt||v>t.lastActivityAt)&&(t.lastActivityAt=v,s("activity",{conversations:y,latestAt:v}),q())}catch(y){console.error("[transport] poll failed",y)}}function $(){p(),!(typeof document<"u"&&document.hidden)&&(t.pollTimer=setInterval(de,ac))}function p(){t.pollTimer&&(clearInterval(t.pollTimer),t.pollTimer=null)}function b(){if(document.hidden)clearTimeout(t.hiddenGraceTimer),t.hiddenGraceTimer=setTimeout(()=>{t.hiddenGraceTimer=null,document.hidden&&(p(),be(),r("paused"))},cc);else{if(t.hiddenGraceTimer){clearTimeout(t.hiddenGraceTimer),t.hiddenGraceTimer=null;return}r("idle"),$(),t.panelOpen&&le()}}async function C(){if(t.started)return t.lastBootstrap;t.started=!0;const y=await l();t.lastBootstrap=y;try{const v=await g();t.lastActivityAt=v.reduce((M,L)=>{const ee=L==null?void 0:L.last_message_at;return ee&&(!M||ee>M)?ee:M},null)}catch(v){console.error("[transport] initial /conversations failed",v)}return typeof document<"u"&&(t.visibilityHandler=b,document.addEventListener("visibilitychange",t.visibilityHandler)),$(),y}function O(){p(),clearTimeout(t.burstTimer),clearTimeout(t.hiddenGraceTimer),t.hiddenGraceTimer=null,be(),t.visibilityHandler&&(document.removeEventListener("visibilitychange",t.visibilityHandler),t.visibilityHandler=null),t.started=!1}return{on:n,start:C,stop:O,setPanelOpen:ne,bootstrap:l,getCustomer:f,patchCustomer:c,listConversations:g,createConversation:S,getConversation:k,patchConversation:V,markConversationRead:I,listMessages:J,postMessage:z,postCallback:K,uploadAttachment:X,signAttachment:j,get connection(){return t.connection}}}function dc(e){return e.endsWith("/")?e.slice(0,-1):e}function fc(e){return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":"file"}function hc(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(16);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(e);else for(let n=0;n<16;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=[...e].map(n=>n.toString(16).padStart(2,"0"));return t.slice(0,4).join("")+"-"+t.slice(4,6).join("")+"-"+t.slice(6,8).join("")+"-"+t.slice(8,10).join("")+"-"+t.slice(10,16).join("")}function mc(e){const t=In({ready:!1,error:null,config:null,customer:null,conversations:[],messagesByConv:{},paginationByConv:{},streamingByMsgId:{},awaitingCallback:{},runningActionsByConv:{},connection:"idle"}),n=[];n.push(e.on("connection",p=>{t.connection=p})),n.push(e.on("message",p=>{const b=p==null?void 0:p.conversation_id,C=p==null?void 0:p.message;!b||!(C!=null&&C.id)||(le(b,C),C.client_msg_id&&delete t.streamingByMsgId[C.client_msg_id],q(b,C.created_at))})),n.push(e.on("message_stream",p=>{const b=p==null?void 0:p.message_id,C=p==null?void 0:p.token;!b||typeof C!="string"||(t.streamingByMsgId[b]=(t.streamingByMsgId[b]||"")+C)})),n.push(e.on("conversation_updated",p=>{const b=p==null?void 0:p.conversation_id,C=p==null?void 0:p.changes;if(!b||!C)return;const O=t.conversations.findIndex(y=>y.id===b);O!==-1&&(t.conversations[O]={...t.conversations[O],...C})})),n.push(e.on("config_updated",p=>{p!=null&&p.config&&(t.config=p.config)})),n.push(e.on("action_status",p=>{const b=p==null?void 0:p.conversation_id,C=p==null?void 0:p.action_id,O=p==null?void 0:p.action_name;if(!b||!C)return;const y=t.runningActionsByConv[b]||{};p.state==="running"?(y[C]=O||C,t.runningActionsByConv[b]={...y}):p.state==="done"&&(delete y[C],t.runningActionsByConv[b]={...y})})),n.push(e.on("activity",p=>{Array.isArray(p==null?void 0:p.conversations)&&(t.conversations=p.conversations)}));async function s(){try{const p=new Promise((C,O)=>setTimeout(()=>O(new Error("bootstrap timeout (15s) — check baseUrl, CORS, and network")),15e3)),b=await Promise.race([e.start(),p]);t.config=b.config,t.customer=b.customer,t.conversations=await Promise.race([e.listConversations(),p]),t.ready=!0}catch(p){console.error("[store] start failed",p),t.error=(p==null?void 0:p.message)||String(p)}}function r(){for(const p of n)try{p()}catch{}e.stop()}async function i(p){const b=de(p);if(!b)return t.customer;try{const C=await e.patchCustomer(b);C&&(t.customer=C)}catch(C){console.error("[store] applyCustomer failed",C)}return t.customer}async function o(p={}){const b=await e.createConversation(p),C=t.conversations.findIndex(O=>O.id===b.id);return C===-1?t.conversations=[b,...t.conversations]:t.conversations[C]=b,b}const a=50;async function l(p){const b=t.paginationByConv[p];if(!(b!=null&&b.loaded||b!=null&&b.loading)){c(p,{nextCursor:null,loading:!0,loaded:!1});try{const C=await e.listMessages(p,{limit:a}),O=(C==null?void 0:C.messages)??[],y=t.messagesByConv[p]||[],v=new Set;for(const L of O)(L==null?void 0:L.id)!=null&&v.add(`id:${String(L.id)}`),L!=null&&L.client_msg_id&&v.add(`c:${L.client_msg_id}`);const M=y.filter(L=>!((L==null?void 0:L.id)!=null&&v.has(`id:${String(L.id)}`)||L!=null&&L.client_msg_id&&v.has(`c:${L.client_msg_id}`)));t.messagesByConv[p]=[...O,...M].sort(ne),c(p,{nextCursor:(C==null?void 0:C.next_cursor)??null,loading:!1,loaded:!0})}catch(C){console.error("[store] openConversation failed",C),c(p,{nextCursor:null,loading:!1,loaded:!1})}}}async function f(p){var y;const b=t.paginationByConv[p];if(!b||b.loading||!b.nextCursor)return;const O=(y=(t.messagesByConv[p]||[]).find(v=>v==null?void 0:v.created_at))==null?void 0:y.created_at;if(O){c(p,{...b,loading:!0});try{const v=await e.listMessages(p,{before:O,limit:a}),M=(v==null?void 0:v.messages)??[],L=t.messagesByConv[p]||[],ee=new Set;for(const ce of L)(ce==null?void 0:ce.id)!=null&&ee.add(`id:${String(ce.id)}`),ce!=null&&ce.client_msg_id&&ee.add(`c:${ce.client_msg_id}`);const Z=M.filter(ce=>!((ce==null?void 0:ce.id)!=null&&ee.has(`id:${String(ce.id)}`)||ce!=null&&ce.client_msg_id&&ee.has(`c:${ce.client_msg_id}`)));t.messagesByConv[p]=[...Z,...L],c(p,{nextCursor:(v==null?void 0:v.next_cursor)??null,loading:!1,loaded:!0})}catch(v){console.error("[store] loadMore failed",v),c(p,{...b,loading:!1})}}}function c(p,b){t.paginationByConv={...t.paginationByConv,[p]:b}}async function g(p,b){const C=await e.patchConversation(p,b),O=t.conversations.findIndex(y=>y.id===p);O!==-1&&(t.conversations[O]=C)}async function S(p,b){if(!(!p||b==null))try{const C=await e.markConversationRead(p,b),O=t.conversations.findIndex(y=>y.id===p);O!==-1&&(t.conversations[O]=C)}catch(C){console.error("[store] markConversationRead failed",C)}}async function k(p,b,{attachments:C,metadata:O}={}){var Z;const y=(b||"").trim(),v=Array.isArray(C)&&C.length>0;if(!p||!y&&!v)return;const M=hc(),L=$(p),ee={id:M,client_msg_id:M,conversation_id:p,type:"content",text_md:y,author:{type:"user",id:((Z=t.customer)==null?void 0:Z.external_id)||null},created_at:L,_pending:!0,...v?{payload:{type:"content",attachments:C}}:{},...O&&typeof O=="object"?{metadata:O}:{}};le(p,ee);try{await e.postMessage(p,{client_msg_id:M,text_md:y,created_at:L,...v?{attachments:C}:{},...O&&typeof O=="object"?{metadata:O}:{}})}catch(ce){console.error("[store] send failed",ce),be(p,M,{_failed:!0,_pending:!1})}}async function V(p,b,C){p!=null&&(t.awaitingCallback[p]=!0);try{await e.postCallback(p,b,C)}catch(O){console.error("[store] callback failed",O),p!=null&&delete t.awaitingCallback[p]}}const I=new Map;async function J(p){if(!p)return null;const b=I.get(p);if(b!=null&&b.url){const C=b.expires_at?Date.parse(b.expires_at):0;if(!C||C-Date.now()>6e4)return b.url}try{const C=await e.signAttachment(p);if(C!=null&&C.signed_url)return I.set(p,{url:C.signed_url,expires_at:C.expires_at}),C.signed_url}catch(C){console.error("[store] sign attachment failed",C)}return null}async function z(p,{rating:b,comment:C}={}){const O=t.conversations.find(M=>M.id===p),v={...(O==null?void 0:O.metadata)||{},feedback:{rating:b,comment:C||null,submitted_at:new Date().toISOString()}};await g(p,{metadata:v})}function K(p){var C,O;const b=t.messagesByConv[p]||[];for(let y=b.length-1;y>=0;y--){const v=b[y];if((v==null?void 0:v.type)==="action"&&((C=v==null?void 0:v.payload)==null?void 0:C.type)==="action"&&((O=v==null?void 0:v.payload)==null?void 0:O.state)==="pending"&&Array.isArray(v==null?void 0:v.callbacks)&&v.callbacks.length>0&&!t.awaitingCallback[v.id])return v}return null}function X(p){var C,O,y;const b=t.messagesByConv[p]||[];for(let v=b.length-1;v>=0;v--){const M=b[v];if(((C=M==null?void 0:M.author)==null?void 0:C.type)==="user"||(M==null?void 0:M.type)==="action"&&((O=M==null?void 0:M.payload)==null?void 0:O.state)==="pending")return null;const L=(y=M==null?void 0:M.metadata)==null?void 0:y.form;if(L&&Array.isArray(L.fields)&&L.fields.length>0)return{message:M,form:L}}return null}function j(p){const b=t.runningActionsByConv[p];if(!b)return null;const C=Object.keys(b);if(C.length===0)return null;const O=C[0];return{id:O,payload:{name:b[O]}}}function te(p){var C,O,y,v;const b=t.messagesByConv[p]||[];for(let M=b.length-1;M>=0;M--){const L=b[M];if(((C=L==null?void 0:L.author)==null?void 0:C.type)==="user")return[];if((L==null?void 0:L.type)==="action"&&((O=L==null?void 0:L.payload)==null?void 0:O.state)==="pending")return[];if(((y=L==null?void 0:L.author)==null?void 0:y.type)!=="agent_ia")continue;const ee=(v=L==null?void 0:L.metadata)==null?void 0:v.suggested_replies;return Array.isArray(ee)&&ee.length?ee.map(Z=>{if(typeof Z=="string"){const ce=Z.trim();return ce?{label:ce,kind:null}:null}if(Z&&typeof Z=="object"&&typeof Z.label=="string"){const ce=Z.label.trim();if(!ce)return null;const qs=Z.kind==="cta"||Z.kind==="choice"||Z.kind==="followup"?Z.kind:null;return{label:ce,kind:qs}}return null}).filter(Boolean).slice(0,4):[]}return[]}function le(p,b){var v;const C=t.messagesByConv[p]||[];let O=-1;b!=null&&b.client_msg_id&&(O=C.findIndex(M=>(M==null?void 0:M.client_msg_id)&&M.client_msg_id===b.client_msg_id)),O===-1&&(b==null?void 0:b.id)!==void 0&&(b==null?void 0:b.id)!==null&&(O=C.findIndex(M=>we(M==null?void 0:M.id,b.id)));let y;O===-1?y=[...C,b].sort(ne):(y=C.slice(),y[O]={...C[O],...b,_pending:!1,_failed:!1}),t.messagesByConv[p]=y,(b==null?void 0:b.type)==="action"&&((v=b==null?void 0:b.payload)!=null&&v.state)&&b.payload.state!=="pending"&&(b==null?void 0:b.id)!=null&&t.awaitingCallback[b.id]&&delete t.awaitingCallback[b.id]}function we(p,b){return p===b?!0:p==null||b==null?!1:String(p)===String(b)}function be(p,b,C){const O=t.messagesByConv[p];if(!O)return;const y=O.findIndex(M=>M.id===b);if(y===-1)return;const v=O.slice();v[y]={...O[y],...C},t.messagesByConv[p]=v}function q(p,b){const C=t.conversations.findIndex(y=>y.id===p);if(C===-1)return;const O=t.conversations[C];if(b&&(!O.last_message_at||b>O.last_message_at)){const y=t.conversations.slice();y[C]={...O,last_message_at:b},y.sort((v,M)=>(M.last_message_at||"").localeCompare(v.last_message_at||"")),t.conversations=y}}function ne(p,b){return(p.created_at||"").localeCompare(b.created_at||"")}function de(p){if(!p||typeof p!="object")return null;const b={},C={};for(const[O,y]of Object.entries(p))y!==void 0&&(O==="name"||O==="email"?y!=null&&String(y).trim()!==""&&(b[O]=y):(O==="values"||O==="metadata")&&y&&typeof y=="object"?Object.assign(C,y):C[O]=y);return Object.keys(C).length&&(b.values=C),Object.keys(b).length?b:null}function $(p){const b=t.messagesByConv[p]||[];let C="";for(const v of b)v!=null&&v.created_at&&v.created_at>C&&(C=v.created_at);const O=new Date().toISOString();return!C||O>C?O:new Date(Date.parse(C)+1).toISOString()}return{state:t,start:s,destroy:r,applyCustomer:i,createConversation:o,openConversation:l,loadMore:f,patchConversation:g,markConversationRead:S,send:k,clickCallback:V,signAttachment:J,submitFeedback:z,getPendingApproval:K,getActionInFlight:j,getLatestSuggestions:te,getLatestForm:X,setPanelOpen:e.setPanelOpen}}const Ne={w:"#ffffff",g50:"#F9F9F7",g100:"#F2F1EE",g150:"#E8E6E2",g200:"#D9D6CF",g300:"#B4B0A8",g400:"#888480",g500:"#5A5753",g700:"#2B2926",g900:"#17161A",accent:"#5B5FEF",accentLight:"#EEEFFE",green:"#22C55E",red:"#B91C1C",redBg:"#FDECEC"},Us=["#5B5FEF","#7C3AED","#DB2777","#0891B2","#D97706","#059669"];function oo(e=""){return e?Us[e.charCodeAt(0)%Us.length]:Us[0]}function ao(e=""){return e.split(" ").map(t=>t[0]||"").join("").toUpperCase().slice(0,2)}function lo(e=new Date){return e.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"})}const pc=`
22
22
  @import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
23
23
 
24
24
  .wm-root {
25
25
  --wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
26
26
  --wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
27
- --wm-w: ${Le.w};
28
- --wm-g50: ${Le.g50};
29
- --wm-g100: ${Le.g100};
30
- --wm-g150: ${Le.g150};
31
- --wm-g200: ${Le.g200};
32
- --wm-g300: ${Le.g300};
33
- --wm-g400: ${Le.g400};
34
- --wm-g500: ${Le.g500};
35
- --wm-g700: ${Le.g700};
36
- --wm-g900: ${Le.g900};
37
- --wm-a: ${Le.accent};
38
- --wm-al: ${Le.accentLight};
39
- --wm-green: ${Le.green};
40
- --wm-red: ${Le.red};
41
- --wm-redBg: ${Le.redBg};
27
+ --wm-w: ${Ne.w};
28
+ --wm-g50: ${Ne.g50};
29
+ --wm-g100: ${Ne.g100};
30
+ --wm-g150: ${Ne.g150};
31
+ --wm-g200: ${Ne.g200};
32
+ --wm-g300: ${Ne.g300};
33
+ --wm-g400: ${Ne.g400};
34
+ --wm-g500: ${Ne.g500};
35
+ --wm-g700: ${Ne.g700};
36
+ --wm-g900: ${Ne.g900};
37
+ --wm-a: ${Ne.accent};
38
+ --wm-al: ${Ne.accentLight};
39
+ --wm-green: ${Ne.green};
40
+ --wm-red: ${Ne.red};
41
+ --wm-redBg: ${Ne.redBg};
42
42
  --wm-sh1: 0 1px 3px rgba(0,0,0,.06);
43
43
  --wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
44
44
  --wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
@@ -64,13 +64,13 @@ var Messenger=function(Ht){"use strict";/**
64
64
  0% { transform: translateX(110%); opacity: 0; }
65
65
  100% { transform: translateX(0); opacity: 1; }
66
66
  }
67
- `,lo="https://api.messenger.victorc.fr";function co(e,t){if(!Array.isArray(e==null?void 0:e.options))return t;const n=e.options.find(s=>(s==null?void 0:s.value)===t);return(n==null?void 0:n.label)||t}function uo(e,t){return Array.isArray(t)?t.map(n=>co(e,String(n))).join(", "):typeof t=="boolean"?t?"Oui":"Non":co(e,String(t))}function mc(e,t){if(!e||!t)return"";const n=Array.isArray(e.fields)?e.fields:[],s=[];for(const r of n){if(!(r!=null&&r.key)||!(r!=null&&r.label))continue;const i=t[r.key];if(i==null||i==="")continue;const o=uo(r,i);o&&s.push(`${r.label} :
67
+ `,co="https://api.messenger.victorc.fr";function uo(e,t){if(!Array.isArray(e==null?void 0:e.options))return t;const n=e.options.find(s=>(s==null?void 0:s.value)===t);return(n==null?void 0:n.label)||t}function fo(e,t){return Array.isArray(t)?t.map(n=>uo(e,String(n))).join(", "):typeof t=="boolean"?t?"Oui":"Non":uo(e,String(t))}function gc(e,t){if(!e||!t)return"";const n=Array.isArray(e.fields)?e.fields:[],s=[];for(const r of n){if(!(r!=null&&r.key)||!(r!=null&&r.label))continue;const i=t[r.key];if(i==null||i==="")continue;const o=fo(r,i);o&&s.push(`${r.label} :
68
68
  ${o}`)}return s.join(`
69
69
 
70
- `)}function pc(e,t){const n=[],s=Array.isArray(e==null?void 0:e.fields)?e.fields:[];for(const r of s){if(!(r!=null&&r.key)||!(r!=null&&r.label))continue;const i=t==null?void 0:t[r.key];if(i==null||i==="")continue;const o=uo(r,i);if(!o)continue;const a=r.type==="textarea"||typeof o=="string"&&(o.length>60||o.includes(`
71
- `));n.push({label:r.label,value:o,multiline:a})}return{kind:"form_response",data:{title:(e==null?void 0:e.title)||"Formulaire",fields:n}}}function Xn(e){var n;const t=(n=e==null?void 0:e.author)==null?void 0:n.type;return t==="agent_ia"||t==="agent_human"}function Qn(e,t){let n=(e==null?void 0:e.last_message_at)||(e==null?void 0:e.updated_at)||(e==null?void 0:e.created_at)||"";for(const s of t)s!=null&&s.created_at&&s.created_at>n&&(n=s.created_at);return n}function gc(e){var t,n;for(let s=e.length-1;s>=0;s--){const r=(n=(t=e[s])==null?void 0:t.author)==null?void 0:n.type;if(r)return r}return""}function _c(e,t){var n,s,r;for(let i=t.length-1;i>=0;i--){const o=t[i];if(!o)continue;const a=typeof o.text_md=="string"?o.text_md.trim():"";if(a)return(((n=o.author)==null?void 0:n.type)==="user"?"Vous : ":"")+a.replace(/\s+/g," ");const l=(s=o.payload)==null?void 0:s.attachments;if(Array.isArray(l)&&l.length)return"📎 Pièce jointe"}return(e==null?void 0:e.last_message_preview)||(e==null?void 0:e.preview)||((r=e==null?void 0:e.metadata)==null?void 0:r.last_preview)||""}function yc(e){return(e==null?void 0:e.name)||((e==null?void 0:e.type)==="user"?"Vous":(e==null?void 0:e.type)==="agent_human"?"Agent":(e==null?void 0:e.type)==="agent_ia"?"Assistant IA":"Système")}function vc(e,t){const n=[`# ${e.name||"Conversation"}`,e.created_at?`Créée le : ${e.created_at}`:"",""];for(const s of t){if(!s)continue;const r=(s.text_md||"").trim();if(!r)continue;const i=yc(s.author),o=s.created_at?new Date(s.created_at).toLocaleString("fr-FR"):"";n.push(`[${o}] ${i} :`),n.push(r),n.push("")}return n.join(`
72
- `)}function bc(e,t){if(!e)return;const n=vc(e,t||[]),s=new Blob([n],{type:"text/plain;charset=utf-8"});try{const r=URL.createObjectURL(s),i=document.createElement("a");i.href=r,i.download=`${(e.name||"conversation").replace(/[^a-z0-9-_]+/gi,"_")}.txt`,document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>URL.revokeObjectURL(r),1e3)}catch(r){console.error("[ww-messenger] export failed",r)}}const wc={data(){const e=typeof Notification<"u";return{notifPermission:e?Notification.permission:"denied",soundEnabled:!0,browserNotifEnabled:e&&Notification.permission==="granted",_notifUnsub:null,_audioCtx:null}},methods:{setupNotifications(){this.transport&&(this.teardownNotifications(),this._notifUnsub=this.transport.on("message",this.onIncomingNotification))},teardownNotifications(){var e,t;if(this._notifUnsub){try{this._notifUnsub()}catch{}this._notifUnsub=null}if(this._audioCtx){try{(t=(e=this._audioCtx).close)==null||t.call(e)}catch{}this._audioCtx=null}},soundStorageKey(){return`wm:notif:sound:${this.widgetId||""}:${this.userId||""}`},browserNotifStorageKey(){return`wm:notif:browser:${this.widgetId||""}:${this.userId||""}`},hydrateNotifPref(){try{if(typeof localStorage>"u")return;const e=localStorage.getItem(this.soundStorageKey());e==="0"?this.soundEnabled=!1:e==="1"&&(this.soundEnabled=!0);const t=localStorage.getItem(this.browserNotifStorageKey());t==="0"?this.browserNotifEnabled=!1:t==="1"&&(this.browserNotifEnabled=typeof Notification<"u"&&Notification.permission==="granted")}catch{}},persistSoundPref(){try{if(typeof localStorage>"u")return;localStorage.setItem(this.soundStorageKey(),this.soundEnabled?"1":"0")}catch{}},persistBrowserNotifPref(){try{if(typeof localStorage>"u")return;localStorage.setItem(this.browserNotifStorageKey(),this.browserNotifEnabled?"1":"0")}catch{}},onSoundToggle(e){this.soundEnabled=!!e,this.persistSoundPref()},async onBrowserNotifToggle(e){if(typeof Notification>"u"){this.browserNotifEnabled=!1,this.persistBrowserNotifPref();return}if(!e){this.browserNotifEnabled=!1,this.persistBrowserNotifPref();return}let t=Notification.permission;if(t==="default"){try{t=await Notification.requestPermission()}catch(n){console.warn("[ww-messenger] notif permission request failed",n),t="denied"}this.notifPermission=t}this.browserNotifEnabled=t==="granted",this.persistBrowserNotifPref()},onIncomingNotification(e){var o;if(!this.soundEnabled&&!this.browserNotifEnabled)return;const t=e==null?void 0:e.conversation_id,n=e==null?void 0:e.message;if(!t||!n||!Xn(n))return;const s=n!=null&&n.created_at?Date.parse(n.created_at):NaN;if(Number.isFinite(s)&&s<this.convOpenedAt-1e3)return;const r=typeof document<"u"&&document.hidden;this.isOpen&&!r&&((o=this.currentConv)==null?void 0:o.id)===t||(this.soundEnabled&&this.playNotificationSound(),this.browserNotifEnabled&&this.showBrowserNotification(t,n))},playNotificationSound(){if(typeof window>"u")return;const e=window.AudioContext||window.webkitAudioContext;if(e)try{this._audioCtx||(this._audioCtx=new e);const t=this._audioCtx;if(t.state==="suspended")try{t.resume()}catch{}const n=t.currentTime,s=t.createOscillator(),r=t.createGain();s.connect(r),r.connect(t.destination),s.type="sine",s.frequency.setValueAtTime(880,n),s.frequency.exponentialRampToValueAtTime(1320,n+.08),r.gain.setValueAtTime(0,n),r.gain.linearRampToValueAtTime(.12,n+.02),r.gain.exponentialRampToValueAtTime(1e-4,n+.28),s.start(n),s.stop(n+.32)}catch{}},showBrowserNotification(e,t){var o;if(typeof Notification>"u"||Notification.permission!=="granted")return;const n=this.allConversations.find(a=>a.id===e),s=(n==null?void 0:n.name)||((o=this.widget)==null?void 0:o.name)||"Nouveau message",r=typeof(t==null?void 0:t.text_md)=="string"?t.text_md.trim():"",i=r?r.slice(0,140):"Vous avez un nouveau message";try{const a=new Notification(s,{body:i,tag:`wm-${e}`,renotify:!1,silent:!0});a.onclick=()=>{try{window.focus()}catch{}this.draftConv=null,this.showOnboarding=!1,this.activeConvId=e,this.isOpen=!0,this.store&&this.store.setPanelOpen(!0);try{a.close()}catch{}}}catch(a){console.warn("[ww-messenger] notification failed",a)}}}},kc=450,Cc=50,Sc=900,Ac=12e3,xc=300,Tc={data(){return{revealedAt:{},nextRevealAt:0,revealTimers:[]}},methods:{cancelReveals(){for(const e of this.revealTimers)clearTimeout(e);this.revealTimers=[]},resetRevealQueue(){this.cancelReveals(),this.revealedAt={},this.nextRevealAt=0},scheduleReveal(e){const t=Date.now(),n=((e==null?void 0:e.text_md)||"").length,s=Math.min(Ac,Math.max(Sc,n*Cc)),i=Math.max(t+kc,this.nextRevealAt+xc)+s;this.nextRevealAt=i;const o=Math.max(0,i-t),a=e.id,l=setTimeout(()=>{this.revealedAt={...this.revealedAt,[a]:Date.now()},this.revealTimers=this.revealTimers.filter(f=>f!==l)},o);this.revealTimers.push(l)},paceMessages(e){var s;if(!Array.isArray(e)||!e.length)return;const t=Date.now(),n={...this.revealedAt};for(const r of e){if((r==null?void 0:r.id)==null||n[r.id]!==void 0)continue;if(!Xn(r)){n[r.id]=t;continue}const i=r!=null&&r.created_at?Date.parse(r.created_at):NaN;if(!Number.isFinite(i)||i<this.convOpenedAt){n[r.id]=t;continue}const o=typeof(r==null?void 0:r.text_md)=="string"&&r.text_md.trim().length>0,a=Array.isArray((s=r==null?void 0:r.payload)==null?void 0:s.attachments)&&r.payload.attachments.length>0;if(!o&&!a){n[r.id]=t;continue}n[r.id]=0,this.scheduleReveal(r)}this.revealedAt=n}}},Mc={data(){return{approvalSettled:!0,approvalSettleTimer:null,approvalLatchId:null}},methods:{resetApprovalPacing(){this.approvalSettleTimer&&(clearTimeout(this.approvalSettleTimer),this.approvalSettleTimer=null),this.approvalSettled=!0,this.approvalLatchId=null},bumpApprovalSettle(e=800){this.approvalSettled=!1,this.approvalSettleTimer&&clearTimeout(this.approvalSettleTimer),this.approvalSettleTimer=setTimeout(()=>{this.approvalSettled=!0,this.approvalSettleTimer=null},e)}}},Ec={data(){return{readState:{},readBootTs:"",unreadAnchorTs:"",unreadBoundaryTs:""}},methods:{readStorageKey(){return`wm:read:${this.widgetId||""}:${this.userId||""}`},readBootStorageKey(){return`wm:read-boot:${this.widgetId||""}:${this.userId||""}`},hydrateReadState(){try{if(typeof localStorage>"u")return;const e=localStorage.getItem(this.readStorageKey());if(e){const n=JSON.parse(e);n&&typeof n=="object"&&(this.readState=n)}let t=localStorage.getItem(this.readBootStorageKey())||"";t||(t=new Date().toISOString(),localStorage.setItem(this.readBootStorageKey(),t)),this.readBootTs=t}catch{}},persistReadState(){try{if(typeof localStorage>"u")return;localStorage.setItem(this.readStorageKey(),JSON.stringify(this.readState))}catch{}},markConvRead(e){var s,r;if(!(e!=null&&e.id)||e._draft)return;const t=((r=(s=this.s)==null?void 0:s.messagesByConv)==null?void 0:r[e.id])||[],n=Qn(e,t);n&&this.readState[e.id]!==n&&(this.readState={...this.readState,[e.id]:n},this.persistReadState())}}},be=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Oc={name:"WmHumanAvatar",props:{name:{type:String,default:""},avatarUrl:{type:String,default:null},size:{type:Number,default:26},tail:{type:Boolean,default:!1}},computed:{bg(){return this.avatarUrl?"transparent":io(this.name)},initials(){return oo(this.name)}}},Ic=["src","alt"];function Bc(e,t,n,s,r,i){return p(),_("div",{class:ne(["wm-huav",{"wm-huav--tail":n.tail}]),style:Pe({width:n.size+"px",height:n.size+"px","--wm-avr":Math.round(n.size*.32)+"px",background:i.bg})},[n.avatarUrl?(p(),_("img",{key:0,src:n.avatarUrl,alt:n.name||""},null,8,Ic)):(p(),_("span",{key:1,style:Pe({fontSize:n.size*.36+"px"})},P(i.initials),5))],6)}const Hs=be(Oc,[["render",Bc],["__scopeId","data-v-07246775"]]),Rc=3,Lc={name:"WmLauncher",components:{HumanAvatar:Hs},props:{unreadCount:{type:Number,default:0},peeks:{type:Array,default:()=>[]}},emits:["open","dismiss"],computed:{visiblePeeks(){return this.peeks.slice(0,Rc).reverse()}}},Nc={class:"wm-launcherWrap"},$c=["aria-label","onClick","onKeydown"],Fc=["onClick"],Pc={class:"wm-peek__avatar"},Dc=["aria-label"],jc={class:"wm-peek__body"},Uc={class:"wm-peek__head"},Hc={class:"wm-peek__name"},Vc={class:"wm-peek__text"},Kc=["onClick"],Wc=["aria-label"];function qc(e,t,n,s,r,i){const o=me("HumanAvatar");return p(),_("div",Nc,[_e(Al,{name:"wm-peek"},{default:Ir(()=>[i.visiblePeeks.length?(p(),_("div",{key:0,class:ne(["wm-peekStack",{"wm-peekStack--multi":i.visiblePeeks.length>1}])},[(p(!0),_(X,null,Ae(i.visiblePeeks,(a,l)=>(p(),_("div",{key:a.convId,class:"wm-peek",style:Pe({"--depth":i.visiblePeeks.length-1-l,zIndex:l+1}),role:"button",tabindex:"0","aria-label":`Ouvrir la conversation avec ${a.senderName||"l'agent"}`,onClick:f=>e.$emit("open",a.convId),onKeydown:[Jn(yt(f=>e.$emit("open",a.convId),["prevent"]),["enter"]),Jn(yt(f=>e.$emit("open",a.convId),["prevent"]),["space"])]},[u("button",{type:"button",class:"wm-peek__close","aria-label":"Ignorer",onClick:yt(f=>e.$emit("dismiss",a.convId),["stop"])},[...t[1]||(t[1]=[u("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])],8,Fc),u("div",Pc,[_e(o,{name:a.senderName,"avatar-url":a.senderAvatarUrl,size:34},null,8,["name","avatar-url"]),a.count>1?(p(),_("span",{key:0,class:"wm-peek__avatarBadge","aria-label":`${a.count} messages non lus`},P(a.count>9?"9+":a.count),9,Dc)):$("",!0)]),u("div",jc,[u("div",Uc,[u("span",Hc,P(a.senderName||"Agent"),1),t[2]||(t[2]=u("span",{class:"wm-peek__action"}," vous a répondu",-1))]),u("p",Vc,P(a.preview),1)]),u("button",{type:"button",class:"wm-peek__open",onClick:yt(f=>e.$emit("open",a.convId),["stop"])},"Ouvrir",8,Kc)],44,$c))),128))],2)):$("",!0)]),_:1}),u("button",{type:"button",class:"wm-launcher","aria-label":"Ouvrir le messenger",onClick:t[0]||(t[0]=a=>e.$emit("open"))},[t[3]||(t[3]=u("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)),n.unreadCount>0?(p(),_("span",{key:0,class:"wm-launcher__badge","aria-label":`${n.unreadCount} conversation${n.unreadCount>1?"s":""} non lue${n.unreadCount>1?"s":""}`},P(n.unreadCount>9?"9+":n.unreadCount),9,Wc)):$("",!0)])])}const zc=be(Lc,[["render",qc],["__scopeId","data-v-525fd423"]]),Gc={name:"WmAIAvatar",props:{size:{type:Number,default:26},pulse:{type:Boolean,default:!1},tail:{type:Boolean,default:!1}}},Yc={key:0,class:"wm-aiav__pulse"},Jc=["width","height"];function Xc(e,t,n,s,r,i){return p(),_("div",{class:ne(["wm-aiav",{"wm-aiav--tail":n.tail}]),style:Pe({width:n.size+"px",height:n.size+"px","--wm-avr":n.size*.32+"px"})},[n.pulse?(p(),_("div",Yc)):$("",!0),u("div",{class:ne(["wm-aiav__inner",{"wm-aiav__inner--glow":n.pulse}])},[(p(),_("svg",{width:n.size*.5,height:n.size*.5,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[...t[0]||(t[0]=[u("path",{d:"M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",fill:"white",opacity:"0.92"},null,-1),u("circle",{cx:"19",cy:"5",r:"1.5",fill:"white",opacity:"0.55"},null,-1),u("circle",{cx:"5",cy:"18",r:"1",fill:"white",opacity:"0.38"},null,-1)])],8,Jc))],2)],6)}const hn=be(Gc,[["render",Xc],["__scopeId","data-v-8c924688"]]),Qc={name:"WmTeamAvatars",props:{members:{type:Array,default:()=>[]},responseLabel:{type:String,default:""}},computed:{visible(){return Array.isArray(this.members)&&this.members.length>0},stackWidth(){return Math.min(this.members.length,3)===1?20:16+Math.min(this.members.length,3)*13}},methods:{colorFor(e){return e.avatar_url?"transparent":io(e.name||"")},initialsFor(e){return oo(e.name||"")}}},Zc={key:0,class:"wm-team"},eu=["src","alt"],tu={key:1},nu={key:0,class:"wm-team__label"};function su(e,t,n,s,r,i){return i.visible?(p(),_("div",Zc,[u("div",{class:"wm-team__stack",style:Pe({width:i.stackWidth+"px"})},[(p(!0),_(X,null,Ae(n.members.slice(0,3),(o,a)=>(p(),_("div",{key:a,class:"wm-team__pill",style:Pe({left:a*13+"px",zIndex:3-a,background:i.colorFor(o)})},[o.avatar_url?(p(),_("img",{key:0,src:o.avatar_url,alt:o.name||""},null,8,eu)):(p(),_("span",tu,P(i.initialsFor(o)),1))],4))),128))],4),n.responseLabel?(p(),_("span",nu,P(n.responseLabel),1)):$("",!0)])):$("",!0)}const ru={name:"WmHeader",components:{AIAvatar:hn,HumanAvatar:Hs,TeamAvatars:be(Qc,[["render",su],["__scopeId","data-v-3659b9c1"]])},props:{title:{type:String,default:"Nouvelle conversation"},escalated:{type:Boolean,default:!1},agentName:{type:String,default:""},agentAvatarUrl:{type:String,default:null},showBack:{type:Boolean,default:!1},teamMembers:{type:Array,default:()=>[]},responseLabel:{type:String,default:""},showClose:{type:Boolean,default:!0},showMore:{type:Boolean,default:!0},moreActive:{type:Boolean,default:!1},showIdentity:{type:Boolean,default:!0}},emits:["back","close","more"],computed:{hasTeam(){return Array.isArray(this.teamMembers)&&this.teamMembers.length>0},displayedTeamMembers(){const e=Array.isArray(this.teamMembers)?this.teamMembers:[];if(e.length<=3)return e;const t=new Date().getHours()%e.length,n=[];for(let s=0;s<3;s++)n.push(e[(t+s)%e.length]);return n}}},iu={class:"wm-header"},ou={key:1,style:{width:"30px",height:"30px","flex-shrink":"0"}},au={class:"wm-header__avatar"},lu={class:"wm-header__main"},cu={class:"wm-header__title"},uu={key:3,class:"wm-header__fill"},du={class:"wm-header__actions"};function fu(e,t,n,s,r,i){const o=me("HumanAvatar"),a=me("AIAvatar"),l=me("TeamAvatars");return p(),_("div",iu,[n.showBack?(p(),_("button",{key:0,type:"button",class:"wm-header__icon","aria-label":"Retour à l'accueil",onClick:t[0]||(t[0]=f=>e.$emit("back"))},[...t[3]||(t[3]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M19 12H5M12 5l-7 7 7 7"})],-1)])])):(p(),_("div",ou)),n.showIdentity?(p(),_(X,{key:2},[u("div",au,[n.escalated?(p(),pe(o,{key:0,name:n.agentName,"avatar-url":n.agentAvatarUrl,size:30},null,8,["name","avatar-url"])):(p(),pe(a,{key:1,size:30}))]),u("div",lu,[u("div",cu,P(n.title),1)]),i.hasTeam?(p(),pe(l,{key:0,members:i.displayedTeamMembers,"response-label":""},null,8,["members"])):$("",!0)],64)):(p(),_("div",uu)),u("div",du,[n.showMore?(p(),_("button",{key:0,type:"button",class:ne(["wm-header__icon",{"wm-header__icon--active":n.moreActive}]),"aria-label":"Plus d'options",title:"Plus d'options",onClick:t[1]||(t[1]=f=>e.$emit("more"))},[...t[4]||(t[4]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[u("circle",{cx:"12",cy:"5",r:"1.6"}),u("circle",{cx:"12",cy:"12",r:"1.6"}),u("circle",{cx:"12",cy:"19",r:"1.6"})],-1)])],2)):$("",!0),n.showClose?(p(),_("button",{key:1,type:"button",class:"wm-header__icon","aria-label":"Fermer le widget",title:"Fermer le widget",onClick:t[2]||(t[2]=f=>e.$emit("close"))},[...t[5]||(t[5]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])):$("",!0)])])}const hu=be(ru,[["render",fu],["__scopeId","data-v-d6406b84"]]),fo={book:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",changelog:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",status:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",link:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},mu={name:"WmOnboarding",components:{AIAvatar:hn},props:{welcomeMessage:{type:String,default:""},agentName:{type:String,default:""},quickLinks:{type:Array,default:()=>[]},openThreads:{type:Array,default:()=>[]},busy:{type:Boolean,default:!1}},emits:["start","select","resume"],data(){return{query:""}},computed:{heroTitle(){return this.welcomeMessage?this.welcomeMessage:this.agentName?`Bonjour, je suis ${this.agentName}`:"Bonjour, je suis votre assistant"},heroSub(){return`Posez-moi n'importe quelle question.
73
- Je réponds en quelques secondes.`},isOddQuickLinks(){return this.quickLinks.length%2===1},quickLinksLayout(){return this.isOddQuickLinks?"wm-onb__qlist":"wm-onb__grid"},filteredThreads(){const e=this.query.trim().toLowerCase();return e?this.openThreads.filter(t=>(t.title||"").toLowerCase().includes(e)||(t.preview||"").toLowerCase().includes(e)):this.openThreads}},methods:{iconPath(e){return fo[e]||fo.link},formatTs(e){if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=new Date;if(t.toDateString()===n.toDateString()){const i=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return`${i}h${o}`}if(n.getTime()-t.getTime()<7*864e5){const i=t.toLocaleDateString("fr-FR",{weekday:"short"});return i.charAt(0).toUpperCase()+i.slice(1)}return t.toLocaleDateString("fr-FR",{day:"2-digit",month:"2-digit"})}}},pu={class:"wm-onb"},gu={class:"wm-onb__hero"},_u={class:"wm-onb__title"},yu={class:"wm-onb__sub"},vu={class:"wm-onb__cta"},bu=["disabled"],wu={key:0,class:"wm-onb__section"},ku=["onClick"],Cu={class:"wm-onb__card-icon"},Su={width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Au=["d"],xu={class:"wm-onb__card-body"},Tu={class:"wm-onb__card-title"},Mu={key:0,class:"wm-onb__card-sub"},Eu={key:1,class:"wm-onb__section"},Ou={class:"wm-onb__search"},Iu={class:"wm-onb__list"},Bu=["onClick"],Ru={key:0,class:"wm-onb__thread-dot","aria-label":"Non lu"},Lu={class:"wm-onb__thread-body"},Nu={class:"wm-onb__thread-title"},$u={class:"wm-onb__thread-preview"},Fu={class:"wm-onb__thread-meta"},Pu={key:0,class:"wm-onb__thread-time"},Du={key:0,class:"wm-onb__empty"};function ju(e,t,n,s,r,i){const o=me("AIAvatar");return p(),_("div",pu,[u("div",gu,[_e(o,{size:56,pulse:!0}),u("div",_u,P(i.heroTitle),1),u("div",yu,P(i.heroSub),1)]),u("div",vu,[u("button",{type:"button",class:"wm-onb__startBtn",disabled:n.busy,onClick:t[0]||(t[0]=a=>e.$emit("start"))},[t[2]||(t[2]=u("span",{class:"wm-onb__startIcon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M12 5v14M5 12h14"})])],-1)),u("span",null,P(n.busy?"…":"Commencer une conversation"),1)],8,bu)]),n.quickLinks.length?(p(),_("div",wu,[t[3]||(t[3]=u("div",{class:"wm-onb__section-title"},"Accès rapide",-1)),u("div",{class:ne(i.quickLinksLayout)},[(p(!0),_(X,null,Ae(n.quickLinks,(a,l)=>(p(),_("button",{key:l,type:"button",class:ne(["wm-onb__card",{"wm-onb__card--row":i.isOddQuickLinks}]),onClick:f=>e.$emit("select",a)},[u("span",Cu,[(p(),_("svg",Su,[u("path",{d:i.iconPath(a.icon)},null,8,Au)]))]),u("span",xu,[u("span",Tu,P(a.label),1),a.description?(p(),_("span",Mu,P(a.description),1)):$("",!0)])],10,ku))),128))],2)])):$("",!0),n.openThreads.length?(p(),_("div",Eu,[t[7]||(t[7]=u("div",{class:"wm-onb__section-title"},"Conversations récentes",-1)),u("div",Ou,[t[4]||(t[4]=u("span",{class:"wm-onb__searchIcon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z"})])],-1)),ot(u("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>r.query=a),type:"text",placeholder:"Rechercher dans vos messages","aria-label":"Rechercher dans vos messages"},null,512),[[Mt,r.query]])]),u("div",Iu,[(p(!0),_(X,null,Ae(i.filteredThreads,a=>(p(),_("button",{key:a.id,type:"button",class:"wm-onb__thread",onClick:l=>e.$emit("resume",a)},[u("span",{class:ne(["wm-onb__thread-icon",{"wm-onb__thread-icon--inverted":!a.unread}])},[t[5]||(t[5]=u("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[u("path",{d:"M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",fill:"currentColor",opacity:"0.92"})],-1)),a.unread?(p(),_("span",Ru)):$("",!0)],2),u("span",Lu,[u("span",Nu,P(a.title),1),u("span",$u,P(a.preview),1)]),u("span",Fu,[i.formatTs(a._ts)?(p(),_("span",Pu,P(i.formatTs(a._ts)),1)):$("",!0),t[6]||(t[6]=u("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",class:"wm-onb__thread-chev","aria-hidden":"true"},[u("path",{d:"M5 12h14M13 5l7 7-7 7"})],-1))])],8,Bu))),128)),i.filteredThreads.length?$("",!0):(p(),_("div",Du," Aucun résultat pour « "+P(r.query)+" ». ",1))])])):$("",!0)])}const Uu=be(mu,[["render",ju],["__scopeId","data-v-c85f6958"]]);function Hu(e){return typeof e!="string"?"":e.replace(/`([^`]+)`/g,"$1").replace(/\*\*([^*]+)\*\*/g,"$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)","g"),"$1").replace(/__([^_]+)__/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\s+/g," ").trim()}const Vu={name:"WmActionResult",props:{state:{type:String,default:"success"},label:{type:String,required:!0},detail:{type:String,default:""}},computed:{detailText(){return Hu(this.detail)}}},Ku={class:"wm-result__icon","aria-hidden":"true"},Wu={key:0,width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.8","stroke-linecap":"round","stroke-linejoin":"round"},qu={key:1,width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.6","stroke-linecap":"round","stroke-linejoin":"round"},zu={key:2,width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},Gu={key:3,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},Yu={class:"wm-result__body"},Ju={class:"wm-result__label"},Xu={class:"wm-result__detail"};function Qu(e,t,n,s,r,i){return p(),_("div",{class:ne(["wm-result",`wm-result--${n.state}`])},[u("span",Ku,[n.state==="success"?(p(),_("svg",Wu,[...t[0]||(t[0]=[u("path",{d:"M20 6L9 17l-5-5"},null,-1)])])):n.state==="rejected"?(p(),_("svg",qu,[...t[1]||(t[1]=[u("path",{d:"M18 6L6 18M6 6l12 12"},null,-1)])])):n.state==="awaiting"?(p(),_("svg",zu,[...t[2]||(t[2]=[u("circle",{cx:"12",cy:"12",r:"10"},null,-1),u("polyline",{points:"12 7 12 12 15 14"},null,-1)])])):(p(),_("svg",Gu,[...t[3]||(t[3]=[u("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"},null,-1),u("line",{x1:"12",y1:"9",x2:"12",y2:"13"},null,-1),u("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"},null,-1)])]))]),u("span",Yu,[u("span",Ju,P(n.label),1),i.detailText?(p(),_(X,{key:0},[t[4]||(t[4]=u("span",{class:"wm-result__sep","aria-hidden":"true"}," · ",-1)),u("span",Xu,P(i.detailText),1)],64)):$("",!0)])],2)}const Zu=be(Vu,[["render",Qu],["__scopeId","data-v-64a83fb8"]]),ed={name:"WmArtifactFormResponse",props:{data:{type:Object,required:!0}},computed:{fields(){var e;return Array.isArray((e=this.data)==null?void 0:e.fields)?this.data.fields:[]}}},td={class:"wm-art wm-art--formResponse"},nd={class:"wm-art__head"},sd={class:"wm-art__title"},rd={class:"wm-art__body"},id={class:"wm-art__fieldLabel"};function od(e,t,n,s,r,i){return p(),_("div",td,[u("div",nd,[u("div",sd,P(n.data.title||"Formulaire"),1),t[0]||(t[0]=u("span",{class:"wm-art__badge wm-art__badge--success"},[u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("polyline",{points:"20 6 9 17 4 12"})]),qn(" Envoyé ")],-1))]),u("div",rd,[(p(!0),_(X,null,Ae(i.fields,(o,a)=>(p(),_("div",{key:a,class:"wm-art__field"},[u("div",id,P(o.label),1),u("div",{class:ne(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},P(o.value),3)]))),128))])])}const ad=be(ed,[["render",od],["__scopeId","data-v-ca24a9c9"]]),ld={name:"WmArtifactInfoCard",props:{data:{type:Object,required:!0}},computed:{fields(){var e;return Array.isArray((e=this.data)==null?void 0:e.fields)?this.data.fields:[]},hasBody(){var e;return!!((e=this.data)!=null&&e.body)||this.fields.length>0}}},cd={class:"wm-art wm-art--infoCard"},ud={key:0,class:"wm-art__image"},dd=["src","alt"],fd={class:"wm-art__head"},hd={class:"wm-art__headMain"},md={class:"wm-art__title"},pd={key:0,class:"wm-art__subtitle"},gd={key:1,class:"wm-art__body"},_d={key:0,class:"wm-art__text"},yd={class:"wm-art__fieldLabel"};function vd(e,t,n,s,r,i){return p(),_("div",cd,[n.data.image_url?(p(),_("figure",ud,[u("img",{src:n.data.image_url,alt:n.data.title||"",loading:"lazy"},null,8,dd)])):$("",!0),u("div",fd,[u("div",hd,[u("div",md,P(n.data.title),1),n.data.subtitle?(p(),_("div",pd,P(n.data.subtitle),1)):$("",!0)]),n.data.badge&&n.data.badge.label?(p(),_("span",{key:0,class:ne(["wm-art__badge",`wm-art__badge--${n.data.badge.tone||"neutral"}`])},P(n.data.badge.label),3)):$("",!0)]),i.hasBody?(p(),_("div",gd,[n.data.body?(p(),_("div",_d,P(n.data.body),1)):$("",!0),i.fields.length?(p(!0),_(X,{key:1},Ae(i.fields,(o,a)=>(p(),_("div",{key:a,class:"wm-art__field"},[u("div",yd,P(o.label),1),u("div",{class:ne(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},P(o.value),3)]))),128)):$("",!0)])):$("",!0)])}const bd=be(ld,[["render",vd],["__scopeId","data-v-d7369333"]]);function wd(e){if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=t.toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}),s=t.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"});return`${n} à ${s}`}const kd={name:"WmArtifactTicket",props:{data:{type:Object,required:!0}},computed:{fields(){var e;return Array.isArray((e=this.data)==null?void 0:e.fields)?this.data.fields:[]},formattedDate(){var e;return wd((e=this.data)==null?void 0:e.created_at)}},methods:{isPriority(e){return/priorit|^prio$/i.test(String(e||"").trim())},isDate(e){return/date|échéanc|echeanc|deadline|due|créé|cree/i.test(String(e||"").trim())},priorityLevel(e){const t=String(e||"").toLowerCase();return/high|haute|élev|elev|critic|critiq|urgent/.test(t)?3:/low|basse|faible|minor/.test(t)?1:2}}},Cd={class:"wm-art wm-art--ticket"},Sd={class:"wm-art__head wm-tk__head"},Ad={class:"wm-art__title wm-tk__title"},xd={class:"wm-tk__sub"},Td={class:"wm-tk__ref"},Md={key:0,class:"wm-tk__text"},Ed={key:0,class:"wm-art__body"},Od={class:"wm-art__fieldLabel"},Id=["data-level"],Bd={key:1,class:"wm-tk__date",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Rd={key:1,class:"wm-art__footer wm-tk__footer"};function Ld(e,t,n,s,r,i){return p(),_("div",Cd,[u("div",Sd,[u("div",Ad,P(n.data.title),1),u("div",xd,[u("div",Td,[t[0]||(t[0]=u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z"}),u("path",{d:"M13 5v2M13 17v2M13 11v2"})],-1)),u("span",null,P(n.data.reference),1)]),u("span",{class:ne(["wm-art__badge","wm-tk__badge",`wm-art__badge--${n.data.status.tone||"neutral"}`])},[t[1]||(t[1]=u("span",{class:"wm-tk__dot","aria-hidden":"true"},null,-1)),qn(" "+P(n.data.status.label),1)],2)]),n.data.body?(p(),_("div",Md,P(n.data.body),1)):$("",!0)]),i.fields.length?(p(),_("div",Ed,[(p(!0),_(X,null,Ae(i.fields,(o,a)=>(p(),_("div",{key:a,class:"wm-art__field"},[u("div",Od,P(o.label),1),u("div",{class:ne(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},[i.isPriority(o.label)?(p(),_("svg",{key:0,class:"wm-tk__prio","data-level":i.priorityLevel(o.value),width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[...t[2]||(t[2]=[u("rect",{x:"1",y:"8",width:"2",height:"3",rx:"0.5"},null,-1),u("rect",{x:"5",y:"5",width:"2",height:"6",rx:"0.5"},null,-1),u("rect",{x:"9",y:"2",width:"2",height:"9",rx:"0.5"},null,-1)])],8,Id)):i.isDate(o.label)?(p(),_("svg",Bd,[...t[3]||(t[3]=[u("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"},null,-1),u("path",{d:"M16 2v4M8 2v4M3 10h18"},null,-1)])])):$("",!0),u("span",null,P(o.value),1)],2)]))),128))])):$("",!0),n.data.created_at?(p(),_("div",Rd,[t[4]||(t[4]=u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),u("path",{d:"M16 2v4M8 2v4M3 10h18"})],-1)),u("span",null,P(i.formattedDate),1)])):$("",!0)])}const Nd={form_response:ad,info_card:bd,ticket:be(kd,[["render",Ld],["__scopeId","data-v-8b274eb7"]])},$d={name:"WmArtifactRenderer",props:{artifact:{type:Object,required:!0}},computed:{component(){var t;const e=(t=this.artifact)==null?void 0:t.kind;return e&&Nd[e]||null}}};function Fd(e,t,n,s,r,i){return i.component?(p(),pe(Oa(i.component),{key:0,data:n.artifact.data},null,8,["data"])):$("",!0)}const Pd=be($d,[["render",Fd]]),Dd={name:"WmAttachmentPreview",inject:{signAttachmentFn:{default:null}},props:{attachment:{type:Object,required:!0}},data(){return{url:null,loading:!1}},computed:{kind(){var n,s;const e=(n=this.attachment)==null?void 0:n.type;if(e)return e;const t=(((s=this.attachment)==null?void 0:s.mime_type)||"").toLowerCase();return t.startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"file"},displayName(){var e,t,n;return((t=(e=this.attachment)==null?void 0:e.metadata)==null?void 0:t.name)||((n=this.attachment)==null?void 0:n.name)||this.guessNameFromPath()||"Pièce jointe"},sizeLabel(){var t;const e=(t=this.attachment)==null?void 0:t.size_bytes;return e?e<1024?`${e} o`:e<1024*1024?`${(e/1024).toFixed(0)} ko`:`${(e/(1024*1024)).toFixed(1)} Mo`:""}},watch:{"attachment.path":{handler(){this.refresh()},immediate:!0}},methods:{guessNameFromPath(){var n;return((((n=this.attachment)==null?void 0:n.path)||"").split("/").pop()||"").replace(/^[0-9a-f-]{8,}-/,"")},async refresh(){var e;if(!(!((e=this.attachment)!=null&&e.path)||!this.signAttachmentFn)){this.loading=!0;try{this.url=await this.signAttachmentFn(this.attachment.path)}finally{this.loading=!1}}},onFileClick(e){this.url||e.preventDefault()}}},jd=["href"],Ud=["src","alt"],Hd=["src"],Vd=["src"],Kd=["href","download"],Wd={class:"wm-att__main"},qd={class:"wm-att__name"},zd={key:0,class:"wm-att__meta"},Gd={key:0,class:"wm-att__spin","aria-hidden":"true"};function Yd(e,t,n,s,r,i){return p(),_("div",{class:ne(["wm-att",["wm-att--"+(i.kind||"file")]])},[i.kind==="image"&&r.url?(p(),_("a",{key:0,href:r.url,target:"_blank",rel:"noopener",class:"wm-att__imgWrap"},[u("img",{src:r.url,alt:i.displayName,loading:"lazy"},null,8,Ud)],8,jd)):i.kind==="audio"&&r.url?(p(),_("audio",{key:1,src:r.url,controls:"",preload:"metadata"},null,8,Hd)):i.kind==="video"&&r.url?(p(),_("video",{key:2,src:r.url,controls:"",preload:"metadata"},null,8,Vd)):(p(),_("a",{key:3,class:"wm-att__file",href:r.url||"#",download:i.displayName,target:"_blank",rel:"noopener",onClick:t[0]||(t[0]=(...o)=>i.onFileClick&&i.onFileClick(...o))},[t[1]||(t[1]=u("span",{class:"wm-att__icon"},[u("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),u("path",{d:"M14 2v6h6"})])],-1)),u("span",Wd,[u("span",qd,P(i.displayName),1),i.sizeLabel?(p(),_("span",zd,P(i.sizeLabel),1)):$("",!0)]),r.loading?(p(),_("span",Gd)):$("",!0)],8,Kd))],2)}const Jd=be(Dd,[["render",Yd],["__scopeId","data-v-1cd1267b"]]);function Xd(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Qd(e){return/^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim())}const ho="";function Zn(e){let t=e;const n=[];return t=t.replace(/`([^`\n]+)`/g,(s,r)=>{const i=n.length;return n.push(r),`${ho}CODE${i}${ho}`}),t=t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g,(s,r,i)=>Qd(i)?`<a href="${i}" target="_blank" rel="noopener noreferrer">${r}</a>`:r),t=t.replace(/\*\*([^\n*][^\n]*?)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__([^\n_][^\n]*?)__/g,"<u>$1</u>"),t=t.replace(/~~([^\n~][^\n]*?)~~/g,"<s>$1</s>"),t=t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g,"$1<em>$2</em>"),t=t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g,"$1<em>$2</em>"),t=t.replace(/CODE(\d+)/g,(s,r)=>`<code class="wm-md-code">${n[+r]}</code>`),t}function Zd(e){if(!e)return"";const t=Xd(e).split(`
70
+ `)}function _c(e,t){const n=[],s=Array.isArray(e==null?void 0:e.fields)?e.fields:[];for(const r of s){if(!(r!=null&&r.key)||!(r!=null&&r.label))continue;const i=t==null?void 0:t[r.key];if(i==null||i==="")continue;const o=fo(r,i);if(!o)continue;const a=r.type==="textarea"||typeof o=="string"&&(o.length>60||o.includes(`
71
+ `));n.push({label:r.label,value:o,multiline:a})}return{kind:"form_response",data:{title:(e==null?void 0:e.title)||"Formulaire",fields:n}}}function Zn(e){var n;const t=(n=e==null?void 0:e.author)==null?void 0:n.type;return t==="agent_ia"||t==="agent_human"}function bt(e){if(e==null)return null;const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?t:null}function ho(e,t){let n=(e==null?void 0:e.last_message_at)||(e==null?void 0:e.updated_at)||(e==null?void 0:e.created_at)||"";for(const s of t)s!=null&&s.created_at&&s.created_at>n&&(n=s.created_at);return n}function yc(e,t){var n,s,r;for(let i=t.length-1;i>=0;i--){const o=t[i];if(!o)continue;const a=typeof o.text_md=="string"?o.text_md.trim():"";if(a)return(((n=o.author)==null?void 0:n.type)==="user"?"Vous : ":"")+a.replace(/\s+/g," ");const l=(s=o.payload)==null?void 0:s.attachments;if(Array.isArray(l)&&l.length)return"📎 Pièce jointe"}return(e==null?void 0:e.last_message_preview)||(e==null?void 0:e.preview)||((r=e==null?void 0:e.metadata)==null?void 0:r.last_preview)||""}function vc(e){return(e==null?void 0:e.name)||((e==null?void 0:e.type)==="user"?"Vous":(e==null?void 0:e.type)==="agent_human"?"Agent":(e==null?void 0:e.type)==="agent_ia"?"Assistant IA":"Système")}function bc(e,t){const n=[`# ${e.name||"Conversation"}`,e.created_at?`Créée le : ${e.created_at}`:"",""];for(const s of t){if(!s)continue;const r=(s.text_md||"").trim();if(!r)continue;const i=vc(s.author),o=s.created_at?new Date(s.created_at).toLocaleString("fr-FR"):"";n.push(`[${o}] ${i} :`),n.push(r),n.push("")}return n.join(`
72
+ `)}function wc(e,t){if(!e)return;const n=bc(e,t||[]),s=new Blob([n],{type:"text/plain;charset=utf-8"});try{const r=URL.createObjectURL(s),i=document.createElement("a");i.href=r,i.download=`${(e.name||"conversation").replace(/[^a-z0-9-_]+/gi,"_")}.txt`,document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>URL.revokeObjectURL(r),1e3)}catch(r){console.error("[ww-messenger] export failed",r)}}const kc={data(){const e=typeof Notification<"u";return{notifPermission:e?Notification.permission:"denied",soundEnabled:!0,browserNotifEnabled:e&&Notification.permission==="granted",_notifUnsub:null,_audioCtx:null}},methods:{setupNotifications(){this.transport&&(this.teardownNotifications(),this._notifUnsub=this.transport.on("message",this.onIncomingNotification))},teardownNotifications(){var e,t;if(this._notifUnsub){try{this._notifUnsub()}catch{}this._notifUnsub=null}if(this._audioCtx){try{(t=(e=this._audioCtx).close)==null||t.call(e)}catch{}this._audioCtx=null}},soundStorageKey(){return`wm:notif:sound:${this.widgetId||""}:${this.userId||""}`},browserNotifStorageKey(){return`wm:notif:browser:${this.widgetId||""}:${this.userId||""}`},hydrateNotifPref(){try{if(typeof localStorage>"u")return;const e=localStorage.getItem(this.soundStorageKey());e==="0"?this.soundEnabled=!1:e==="1"&&(this.soundEnabled=!0);const t=localStorage.getItem(this.browserNotifStorageKey());t==="0"?this.browserNotifEnabled=!1:t==="1"&&(this.browserNotifEnabled=typeof Notification<"u"&&Notification.permission==="granted")}catch{}},persistSoundPref(){try{if(typeof localStorage>"u")return;localStorage.setItem(this.soundStorageKey(),this.soundEnabled?"1":"0")}catch{}},persistBrowserNotifPref(){try{if(typeof localStorage>"u")return;localStorage.setItem(this.browserNotifStorageKey(),this.browserNotifEnabled?"1":"0")}catch{}},onSoundToggle(e){this.soundEnabled=!!e,this.persistSoundPref()},async onBrowserNotifToggle(e){if(typeof Notification>"u"){this.browserNotifEnabled=!1,this.persistBrowserNotifPref();return}if(!e){this.browserNotifEnabled=!1,this.persistBrowserNotifPref();return}let t=Notification.permission;if(t==="default"){try{t=await Notification.requestPermission()}catch(n){console.warn("[ww-messenger] notif permission request failed",n),t="denied"}this.notifPermission=t}this.browserNotifEnabled=t==="granted",this.persistBrowserNotifPref()},onIncomingNotification(e){var o;if(!this.soundEnabled&&!this.browserNotifEnabled)return;const t=e==null?void 0:e.conversation_id,n=e==null?void 0:e.message;if(!t||!n||!Zn(n))return;const s=n!=null&&n.created_at?Date.parse(n.created_at):NaN;if(Number.isFinite(s)&&s<this.convOpenedAt-1e3)return;const r=typeof document<"u"&&document.hidden;this.isOpen&&!r&&((o=this.currentConv)==null?void 0:o.id)===t||(this.soundEnabled&&this.playNotificationSound(),this.browserNotifEnabled&&this.showBrowserNotification(t,n))},playNotificationSound(){if(typeof window>"u")return;const e=window.AudioContext||window.webkitAudioContext;if(e)try{this._audioCtx||(this._audioCtx=new e);const t=this._audioCtx;if(t.state==="suspended")try{t.resume()}catch{}const n=t.currentTime,s=t.createOscillator(),r=t.createGain();s.connect(r),r.connect(t.destination),s.type="sine",s.frequency.setValueAtTime(880,n),s.frequency.exponentialRampToValueAtTime(1320,n+.08),r.gain.setValueAtTime(0,n),r.gain.linearRampToValueAtTime(.12,n+.02),r.gain.exponentialRampToValueAtTime(1e-4,n+.28),s.start(n),s.stop(n+.32)}catch{}},showBrowserNotification(e,t){var o;if(typeof Notification>"u"||Notification.permission!=="granted")return;const n=this.allConversations.find(a=>a.id===e),s=(n==null?void 0:n.name)||((o=this.widget)==null?void 0:o.name)||"Nouveau message",r=typeof(t==null?void 0:t.text_md)=="string"?t.text_md.trim():"",i=r?r.slice(0,140):"Vous avez un nouveau message";try{const a=new Notification(s,{body:i,tag:`wm-${e}`,renotify:!1,silent:!0});a.onclick=()=>{try{window.focus()}catch{}this.draftConv=null,this.showOnboarding=!1,this.activeConvId=e,this.isOpen=!0,this.store&&this.store.setPanelOpen(!0);try{a.close()}catch{}}}catch(a){console.warn("[ww-messenger] notification failed",a)}}}},Cc=450,Ac=50,Sc=900,xc=12e3,Tc=300,Mc={data(){return{revealedAt:{},nextRevealAt:0,revealTimers:[]}},methods:{cancelReveals(){for(const e of this.revealTimers)clearTimeout(e);this.revealTimers=[]},resetRevealQueue(){this.cancelReveals(),this.revealedAt={},this.nextRevealAt=0},scheduleReveal(e){const t=Date.now(),n=((e==null?void 0:e.text_md)||"").length,s=Math.min(xc,Math.max(Sc,n*Ac)),i=Math.max(t+Cc,this.nextRevealAt+Tc)+s;this.nextRevealAt=i;const o=Math.max(0,i-t),a=e.id,l=setTimeout(()=>{this.revealedAt={...this.revealedAt,[a]:Date.now()},this.revealTimers=this.revealTimers.filter(f=>f!==l)},o);this.revealTimers.push(l)},paceMessages(e){var s;if(!Array.isArray(e)||!e.length)return;const t=Date.now(),n={...this.revealedAt};for(const r of e){if((r==null?void 0:r.id)==null||n[r.id]!==void 0)continue;if(!Zn(r)){n[r.id]=t;continue}const i=r!=null&&r.created_at?Date.parse(r.created_at):NaN;if(!Number.isFinite(i)||i<this.convOpenedAt){n[r.id]=t;continue}const o=typeof(r==null?void 0:r.text_md)=="string"&&r.text_md.trim().length>0,a=Array.isArray((s=r==null?void 0:r.payload)==null?void 0:s.attachments)&&r.payload.attachments.length>0;if(!o&&!a){n[r.id]=t;continue}n[r.id]=0,this.scheduleReveal(r)}this.revealedAt=n}}},Ec={data(){return{approvalSettled:!0,approvalSettleTimer:null,approvalLatchId:null}},methods:{resetApprovalPacing(){this.approvalSettleTimer&&(clearTimeout(this.approvalSettleTimer),this.approvalSettleTimer=null),this.approvalSettled=!0,this.approvalLatchId=null},bumpApprovalSettle(e=800){this.approvalSettled=!1,this.approvalSettleTimer&&clearTimeout(this.approvalSettleTimer),this.approvalSettleTimer=setTimeout(()=>{this.approvalSettled=!0,this.approvalSettleTimer=null},e)}}},Oc=300,Ic={data(){return{unreadAnchorId:null,unreadBoundaryTs:""}},created(){this._readMarkerTimer=null,this._readMarkerPending=null},beforeUnmount(){this._readMarkerTimer&&(clearTimeout(this._readMarkerTimer),this._readMarkerTimer=null),this._readMarkerPending=null},methods:{markConvRead(e){var i,o;if(!(e!=null&&e.id)||e._draft||!this.store)return;const t=((o=(i=this.s)==null?void 0:i.messagesByConv)==null?void 0:o[e.id])||[],n=Rc(t);if(n==null)return;const s=bt(e.last_read_message_id),r=bt(n);r!=null&&(s!=null&&r<=s||(this._readMarkerPending={convId:e.id,messageId:n},!this._readMarkerTimer&&(this._readMarkerTimer=setTimeout(()=>{const a=this._readMarkerPending;this._readMarkerPending=null,this._readMarkerTimer=null,a&&this.store&&this.store.markConversationRead(a.convId,a.messageId)},Oc))))}}};function Rc(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!(!n||n._pending)&&bt(n.id)!=null)return n.id}return null}const ve=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Lc={name:"WmHumanAvatar",props:{name:{type:String,default:""},avatarUrl:{type:String,default:null},size:{type:Number,default:26},tail:{type:Boolean,default:!1}},computed:{bg(){return this.avatarUrl?"transparent":oo(this.name)},initials(){return ao(this.name)}}},Bc=["src","alt"];function Nc(e,t,n,s,r,i){return m(),_("div",{class:se(["wm-huav",{"wm-huav--tail":n.tail}]),style:De({width:n.size+"px",height:n.size+"px","--wm-avr":Math.round(n.size*.32)+"px",background:i.bg})},[n.avatarUrl?(m(),_("img",{key:0,src:n.avatarUrl,alt:n.name||""},null,8,Bc)):(m(),_("span",{key:1,style:De({fontSize:n.size*.36+"px"})},D(i.initials),5))],6)}const Hs=ve(Lc,[["render",Nc],["__scopeId","data-v-07246775"]]),Pc=3,Fc={name:"WmLauncher",components:{HumanAvatar:Hs},props:{unreadCount:{type:Number,default:0},peeks:{type:Array,default:()=>[]}},emits:["open","dismiss"],computed:{visiblePeeks(){return this.peeks.slice(0,Pc).reverse()}}},$c={class:"wm-launcherWrap"},Dc=["aria-label","onClick","onKeydown"],jc=["onClick"],Uc={class:"wm-peek__avatar"},Hc=["aria-label"],Vc={class:"wm-peek__body"},Kc={class:"wm-peek__head"},Wc={class:"wm-peek__name"},qc={class:"wm-peek__text"},zc=["onClick"],Gc=["aria-label"];function Yc(e,t,n,s,r,i){const o=ge("HumanAvatar");return m(),_("div",$c,[ye(Tl,{name:"wm-peek"},{default:Rr(()=>[i.visiblePeeks.length?(m(),_("div",{key:0,class:se(["wm-peekStack",{"wm-peekStack--multi":i.visiblePeeks.length>1}])},[(m(!0),_(Q,null,xe(i.visiblePeeks,(a,l)=>(m(),_("div",{key:a.convId,class:"wm-peek",style:De({"--depth":i.visiblePeeks.length-1-l,zIndex:l+1}),role:"button",tabindex:"0","aria-label":`Ouvrir la conversation avec ${a.senderName||"l'agent"}`,onClick:f=>e.$emit("open",a.convId),onKeydown:[Qn(vt(f=>e.$emit("open",a.convId),["prevent"]),["enter"]),Qn(vt(f=>e.$emit("open",a.convId),["prevent"]),["space"])]},[u("button",{type:"button",class:"wm-peek__close","aria-label":"Ignorer",onClick:vt(f=>e.$emit("dismiss",a.convId),["stop"])},[...t[1]||(t[1]=[u("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])],8,jc),u("div",Uc,[ye(o,{name:a.senderName,"avatar-url":a.senderAvatarUrl,size:34},null,8,["name","avatar-url"]),a.count>1?(m(),_("span",{key:0,class:"wm-peek__avatarBadge","aria-label":`${a.count} messages non lus`},D(a.count>9?"9+":a.count),9,Hc)):P("",!0)]),u("div",Vc,[u("div",Kc,[u("span",Wc,D(a.senderName||"Agent"),1),t[2]||(t[2]=u("span",{class:"wm-peek__action"}," vous a répondu",-1))]),u("p",qc,D(a.preview),1)]),u("button",{type:"button",class:"wm-peek__open",onClick:vt(f=>e.$emit("open",a.convId),["stop"])},"Ouvrir",8,zc)],44,Dc))),128))],2)):P("",!0)]),_:1}),u("button",{type:"button",class:"wm-launcher","aria-label":"Ouvrir le messenger",onClick:t[0]||(t[0]=a=>e.$emit("open"))},[t[3]||(t[3]=u("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)),n.unreadCount>0?(m(),_("span",{key:0,class:"wm-launcher__badge","aria-label":`${n.unreadCount} conversation${n.unreadCount>1?"s":""} non lue${n.unreadCount>1?"s":""}`},D(n.unreadCount>9?"9+":n.unreadCount),9,Gc)):P("",!0)])])}const Jc=ve(Fc,[["render",Yc],["__scopeId","data-v-525fd423"]]),Xc={name:"WmAIAvatar",props:{size:{type:Number,default:26},pulse:{type:Boolean,default:!1},tail:{type:Boolean,default:!1}}},Qc={key:0,class:"wm-aiav__pulse"},Zc=["width","height"];function eu(e,t,n,s,r,i){return m(),_("div",{class:se(["wm-aiav",{"wm-aiav--tail":n.tail}]),style:De({width:n.size+"px",height:n.size+"px","--wm-avr":n.size*.32+"px"})},[n.pulse?(m(),_("div",Qc)):P("",!0),u("div",{class:se(["wm-aiav__inner",{"wm-aiav__inner--glow":n.pulse}])},[(m(),_("svg",{width:n.size*.5,height:n.size*.5,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[...t[0]||(t[0]=[u("path",{d:"M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",fill:"white",opacity:"0.92"},null,-1),u("circle",{cx:"19",cy:"5",r:"1.5",fill:"white",opacity:"0.55"},null,-1),u("circle",{cx:"5",cy:"18",r:"1",fill:"white",opacity:"0.38"},null,-1)])],8,Zc))],2)],6)}const pn=ve(Xc,[["render",eu],["__scopeId","data-v-8c924688"]]),tu={name:"WmTeamAvatars",props:{members:{type:Array,default:()=>[]},responseLabel:{type:String,default:""}},computed:{visible(){return Array.isArray(this.members)&&this.members.length>0},stackWidth(){return Math.min(this.members.length,3)===1?20:16+Math.min(this.members.length,3)*13}},methods:{colorFor(e){return e.avatar_url?"transparent":oo(e.name||"")},initialsFor(e){return ao(e.name||"")}}},nu={key:0,class:"wm-team"},su=["src","alt"],ru={key:1},iu={key:0,class:"wm-team__label"};function ou(e,t,n,s,r,i){return i.visible?(m(),_("div",nu,[u("div",{class:"wm-team__stack",style:De({width:i.stackWidth+"px"})},[(m(!0),_(Q,null,xe(n.members.slice(0,3),(o,a)=>(m(),_("div",{key:a,class:"wm-team__pill",style:De({left:a*13+"px",zIndex:3-a,background:i.colorFor(o)})},[o.avatar_url?(m(),_("img",{key:0,src:o.avatar_url,alt:o.name||""},null,8,su)):(m(),_("span",ru,D(i.initialsFor(o)),1))],4))),128))],4),n.responseLabel?(m(),_("span",iu,D(n.responseLabel),1)):P("",!0)])):P("",!0)}const au={name:"WmHeader",components:{AIAvatar:pn,HumanAvatar:Hs,TeamAvatars:ve(tu,[["render",ou],["__scopeId","data-v-3659b9c1"]])},props:{title:{type:String,default:"Nouvelle conversation"},escalated:{type:Boolean,default:!1},agentName:{type:String,default:""},agentAvatarUrl:{type:String,default:null},showBack:{type:Boolean,default:!1},teamMembers:{type:Array,default:()=>[]},responseLabel:{type:String,default:""},showClose:{type:Boolean,default:!0},showMore:{type:Boolean,default:!0},moreActive:{type:Boolean,default:!1},showIdentity:{type:Boolean,default:!0}},emits:["back","close","more"],computed:{hasTeam(){return Array.isArray(this.teamMembers)&&this.teamMembers.length>0},displayedTeamMembers(){const e=Array.isArray(this.teamMembers)?this.teamMembers:[];if(e.length<=3)return e;const t=new Date().getHours()%e.length,n=[];for(let s=0;s<3;s++)n.push(e[(t+s)%e.length]);return n}}},lu={class:"wm-header"},cu={key:1,style:{width:"30px",height:"30px","flex-shrink":"0"}},uu={class:"wm-header__avatar"},du={class:"wm-header__main"},fu={class:"wm-header__title"},hu={key:3,class:"wm-header__fill"},mu={class:"wm-header__actions"};function pu(e,t,n,s,r,i){const o=ge("HumanAvatar"),a=ge("AIAvatar"),l=ge("TeamAvatars");return m(),_("div",lu,[n.showBack?(m(),_("button",{key:0,type:"button",class:"wm-header__icon","aria-label":"Retour à l'accueil",onClick:t[0]||(t[0]=f=>e.$emit("back"))},[...t[3]||(t[3]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M19 12H5M12 5l-7 7 7 7"})],-1)])])):(m(),_("div",cu)),n.showIdentity?(m(),_(Q,{key:2},[u("div",uu,[n.escalated?(m(),_e(o,{key:0,name:n.agentName,"avatar-url":n.agentAvatarUrl,size:30},null,8,["name","avatar-url"])):(m(),_e(a,{key:1,size:30}))]),u("div",du,[u("div",fu,D(n.title),1)]),i.hasTeam?(m(),_e(l,{key:0,members:i.displayedTeamMembers,"response-label":""},null,8,["members"])):P("",!0)],64)):(m(),_("div",hu)),u("div",mu,[n.showMore?(m(),_("button",{key:0,type:"button",class:se(["wm-header__icon",{"wm-header__icon--active":n.moreActive}]),"aria-label":"Plus d'options",title:"Plus d'options",onClick:t[1]||(t[1]=f=>e.$emit("more"))},[...t[4]||(t[4]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[u("circle",{cx:"12",cy:"5",r:"1.6"}),u("circle",{cx:"12",cy:"12",r:"1.6"}),u("circle",{cx:"12",cy:"19",r:"1.6"})],-1)])],2)):P("",!0),n.showClose?(m(),_("button",{key:1,type:"button",class:"wm-header__icon","aria-label":"Fermer le widget",title:"Fermer le widget",onClick:t[2]||(t[2]=f=>e.$emit("close"))},[...t[5]||(t[5]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])):P("",!0)])])}const gu=ve(au,[["render",pu],["__scopeId","data-v-d6406b84"]]),mo={book:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",changelog:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",status:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",link:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},_u={name:"WmOnboarding",components:{AIAvatar:pn},props:{welcomeMessage:{type:String,default:""},agentName:{type:String,default:""},quickLinks:{type:Array,default:()=>[]},openThreads:{type:Array,default:()=>[]},busy:{type:Boolean,default:!1}},emits:["start","select","resume"],data(){return{query:""}},computed:{heroTitle(){return this.welcomeMessage?this.welcomeMessage:this.agentName?`Bonjour, je suis ${this.agentName}`:"Bonjour, je suis votre assistant"},heroSub(){return`Posez-moi n'importe quelle question.
73
+ Je réponds en quelques secondes.`},isOddQuickLinks(){return this.quickLinks.length%2===1},quickLinksLayout(){return this.isOddQuickLinks?"wm-onb__qlist":"wm-onb__grid"},filteredThreads(){const e=this.query.trim().toLowerCase();return e?this.openThreads.filter(t=>(t.title||"").toLowerCase().includes(e)||(t.preview||"").toLowerCase().includes(e)):this.openThreads}},methods:{iconPath(e){return mo[e]||mo.link},formatTs(e){if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=new Date;if(t.toDateString()===n.toDateString()){const i=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return`${i}h${o}`}if(n.getTime()-t.getTime()<7*864e5){const i=t.toLocaleDateString("fr-FR",{weekday:"short"});return i.charAt(0).toUpperCase()+i.slice(1)}return t.toLocaleDateString("fr-FR",{day:"2-digit",month:"2-digit"})}}},yu={class:"wm-onb"},vu={class:"wm-onb__hero"},bu={class:"wm-onb__title"},wu={class:"wm-onb__sub"},ku={class:"wm-onb__cta"},Cu=["disabled"],Au={key:0,class:"wm-onb__section"},Su=["onClick"],xu={class:"wm-onb__card-icon"},Tu={width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Mu=["d"],Eu={class:"wm-onb__card-body"},Ou={class:"wm-onb__card-title"},Iu={key:0,class:"wm-onb__card-sub"},Ru={key:1,class:"wm-onb__section"},Lu={class:"wm-onb__search"},Bu={class:"wm-onb__list"},Nu=["onClick"],Pu={key:0,class:"wm-onb__thread-dot","aria-label":"Non lu"},Fu={class:"wm-onb__thread-body"},$u={class:"wm-onb__thread-title"},Du={class:"wm-onb__thread-preview"},ju={class:"wm-onb__thread-meta"},Uu={key:0,class:"wm-onb__thread-time"},Hu={key:0,class:"wm-onb__empty"};function Vu(e,t,n,s,r,i){const o=ge("AIAvatar");return m(),_("div",yu,[u("div",vu,[ye(o,{size:56,pulse:!0}),u("div",bu,D(i.heroTitle),1),u("div",wu,D(i.heroSub),1)]),u("div",ku,[u("button",{type:"button",class:"wm-onb__startBtn",disabled:n.busy,onClick:t[0]||(t[0]=a=>e.$emit("start"))},[t[2]||(t[2]=u("span",{class:"wm-onb__startIcon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M12 5v14M5 12h14"})])],-1)),u("span",null,D(n.busy?"…":"Commencer une conversation"),1)],8,Cu)]),n.quickLinks.length?(m(),_("div",Au,[t[3]||(t[3]=u("div",{class:"wm-onb__section-title"},"Accès rapide",-1)),u("div",{class:se(i.quickLinksLayout)},[(m(!0),_(Q,null,xe(n.quickLinks,(a,l)=>(m(),_("button",{key:l,type:"button",class:se(["wm-onb__card",{"wm-onb__card--row":i.isOddQuickLinks}]),onClick:f=>e.$emit("select",a)},[u("span",xu,[(m(),_("svg",Tu,[u("path",{d:i.iconPath(a.icon)},null,8,Mu)]))]),u("span",Eu,[u("span",Ou,D(a.label),1),a.description?(m(),_("span",Iu,D(a.description),1)):P("",!0)])],10,Su))),128))],2)])):P("",!0),n.openThreads.length?(m(),_("div",Ru,[t[7]||(t[7]=u("div",{class:"wm-onb__section-title"},"Conversations récentes",-1)),u("div",Lu,[t[4]||(t[4]=u("span",{class:"wm-onb__searchIcon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z"})])],-1)),at(u("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>r.query=a),type:"text",placeholder:"Rechercher dans vos messages","aria-label":"Rechercher dans vos messages"},null,512),[[Ot,r.query]])]),u("div",Bu,[(m(!0),_(Q,null,xe(i.filteredThreads,a=>(m(),_("button",{key:a.id,type:"button",class:"wm-onb__thread",onClick:l=>e.$emit("resume",a)},[u("span",{class:se(["wm-onb__thread-icon",{"wm-onb__thread-icon--inverted":!a.unread}])},[t[5]||(t[5]=u("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},[u("path",{d:"M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",fill:"currentColor",opacity:"0.92"})],-1)),a.unread?(m(),_("span",Pu)):P("",!0)],2),u("span",Fu,[u("span",$u,D(a.title),1),u("span",Du,D(a.preview),1)]),u("span",ju,[i.formatTs(a._ts)?(m(),_("span",Uu,D(i.formatTs(a._ts)),1)):P("",!0),t[6]||(t[6]=u("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",class:"wm-onb__thread-chev","aria-hidden":"true"},[u("path",{d:"M5 12h14M13 5l7 7-7 7"})],-1))])],8,Nu))),128)),i.filteredThreads.length?P("",!0):(m(),_("div",Hu," Aucun résultat pour « "+D(r.query)+" ». ",1))])])):P("",!0)])}const Ku=ve(_u,[["render",Vu],["__scopeId","data-v-c85f6958"]]);function Wu(e){return typeof e!="string"?"":e.replace(/`([^`]+)`/g,"$1").replace(/\*\*([^*]+)\*\*/g,"$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)","g"),"$1").replace(/__([^_]+)__/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\s+/g," ").trim()}const qu={name:"WmActionResult",props:{state:{type:String,default:"success"},label:{type:String,required:!0},detail:{type:String,default:""}},computed:{detailText(){return Wu(this.detail)}}},zu={class:"wm-result__icon","aria-hidden":"true"},Gu={key:0,width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.8","stroke-linecap":"round","stroke-linejoin":"round"},Yu={key:1,width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.6","stroke-linecap":"round","stroke-linejoin":"round"},Ju={key:2,width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},Xu={key:3,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},Qu={class:"wm-result__body"},Zu={class:"wm-result__label"},ed={class:"wm-result__detail"};function td(e,t,n,s,r,i){return m(),_("div",{class:se(["wm-result",`wm-result--${n.state}`])},[u("span",zu,[n.state==="success"?(m(),_("svg",Gu,[...t[0]||(t[0]=[u("path",{d:"M20 6L9 17l-5-5"},null,-1)])])):n.state==="rejected"?(m(),_("svg",Yu,[...t[1]||(t[1]=[u("path",{d:"M18 6L6 18M6 6l12 12"},null,-1)])])):n.state==="awaiting"?(m(),_("svg",Ju,[...t[2]||(t[2]=[u("circle",{cx:"12",cy:"12",r:"10"},null,-1),u("polyline",{points:"12 7 12 12 15 14"},null,-1)])])):(m(),_("svg",Xu,[...t[3]||(t[3]=[u("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"},null,-1),u("line",{x1:"12",y1:"9",x2:"12",y2:"13"},null,-1),u("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"},null,-1)])]))]),u("span",Qu,[u("span",Zu,D(n.label),1),i.detailText?(m(),_(Q,{key:0},[t[4]||(t[4]=u("span",{class:"wm-result__sep","aria-hidden":"true"}," · ",-1)),u("span",ed,D(i.detailText),1)],64)):P("",!0)])],2)}const nd=ve(qu,[["render",td],["__scopeId","data-v-64a83fb8"]]),sd={name:"WmArtifactFormResponse",props:{data:{type:Object,required:!0}},computed:{fields(){var e;return Array.isArray((e=this.data)==null?void 0:e.fields)?this.data.fields:[]}}},rd={class:"wm-art wm-art--formResponse"},id={class:"wm-art__head"},od={class:"wm-art__title"},ad={class:"wm-art__body"},ld={class:"wm-art__fieldLabel"};function cd(e,t,n,s,r,i){return m(),_("div",rd,[u("div",id,[u("div",od,D(n.data.title||"Formulaire"),1),t[0]||(t[0]=u("span",{class:"wm-art__badge wm-art__badge--success"},[u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("polyline",{points:"20 6 9 17 4 12"})]),Gn(" Envoyé ")],-1))]),u("div",ad,[(m(!0),_(Q,null,xe(i.fields,(o,a)=>(m(),_("div",{key:a,class:"wm-art__field"},[u("div",ld,D(o.label),1),u("div",{class:se(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},D(o.value),3)]))),128))])])}const ud=ve(sd,[["render",cd],["__scopeId","data-v-ca24a9c9"]]),dd={name:"WmArtifactInfoCard",props:{data:{type:Object,required:!0}},computed:{fields(){var e;return Array.isArray((e=this.data)==null?void 0:e.fields)?this.data.fields:[]},hasBody(){var e;return!!((e=this.data)!=null&&e.body)||this.fields.length>0}}},fd={class:"wm-art wm-art--infoCard"},hd={key:0,class:"wm-art__image"},md=["src","alt"],pd={class:"wm-art__head"},gd={class:"wm-art__headMain"},_d={class:"wm-art__title"},yd={key:0,class:"wm-art__subtitle"},vd={key:1,class:"wm-art__body"},bd={key:0,class:"wm-art__text"},wd={class:"wm-art__fieldLabel"};function kd(e,t,n,s,r,i){return m(),_("div",fd,[n.data.image_url?(m(),_("figure",hd,[u("img",{src:n.data.image_url,alt:n.data.title||"",loading:"lazy"},null,8,md)])):P("",!0),u("div",pd,[u("div",gd,[u("div",_d,D(n.data.title),1),n.data.subtitle?(m(),_("div",yd,D(n.data.subtitle),1)):P("",!0)]),n.data.badge&&n.data.badge.label?(m(),_("span",{key:0,class:se(["wm-art__badge",`wm-art__badge--${n.data.badge.tone||"neutral"}`])},D(n.data.badge.label),3)):P("",!0)]),i.hasBody?(m(),_("div",vd,[n.data.body?(m(),_("div",bd,D(n.data.body),1)):P("",!0),i.fields.length?(m(!0),_(Q,{key:1},xe(i.fields,(o,a)=>(m(),_("div",{key:a,class:"wm-art__field"},[u("div",wd,D(o.label),1),u("div",{class:se(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},D(o.value),3)]))),128)):P("",!0)])):P("",!0)])}const Cd=ve(dd,[["render",kd],["__scopeId","data-v-d7369333"]]);function Ad(e){if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=t.toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}),s=t.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"});return`${n} à ${s}`}const Sd={name:"WmArtifactTicket",props:{data:{type:Object,required:!0}},computed:{fields(){var e;return Array.isArray((e=this.data)==null?void 0:e.fields)?this.data.fields:[]},formattedDate(){var e;return Ad((e=this.data)==null?void 0:e.created_at)}},methods:{isPriority(e){return/priorit|^prio$/i.test(String(e||"").trim())},isDate(e){return/date|échéanc|echeanc|deadline|due|créé|cree/i.test(String(e||"").trim())},priorityLevel(e){const t=String(e||"").toLowerCase();return/high|haute|élev|elev|critic|critiq|urgent/.test(t)?3:/low|basse|faible|minor/.test(t)?1:2}}},xd={class:"wm-art wm-art--ticket"},Td={class:"wm-art__head wm-tk__head"},Md={class:"wm-art__title wm-tk__title"},Ed={class:"wm-tk__sub"},Od={class:"wm-tk__ref"},Id={key:0,class:"wm-tk__text"},Rd={key:0,class:"wm-art__body"},Ld={class:"wm-art__fieldLabel"},Bd=["data-level"],Nd={key:1,class:"wm-tk__date",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Pd={key:1,class:"wm-art__footer wm-tk__footer"};function Fd(e,t,n,s,r,i){return m(),_("div",xd,[u("div",Td,[u("div",Md,D(n.data.title),1),u("div",Ed,[u("div",Od,[t[0]||(t[0]=u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z"}),u("path",{d:"M13 5v2M13 17v2M13 11v2"})],-1)),u("span",null,D(n.data.reference),1)]),u("span",{class:se(["wm-art__badge","wm-tk__badge",`wm-art__badge--${n.data.status.tone||"neutral"}`])},[t[1]||(t[1]=u("span",{class:"wm-tk__dot","aria-hidden":"true"},null,-1)),Gn(" "+D(n.data.status.label),1)],2)]),n.data.body?(m(),_("div",Id,D(n.data.body),1)):P("",!0)]),i.fields.length?(m(),_("div",Rd,[(m(!0),_(Q,null,xe(i.fields,(o,a)=>(m(),_("div",{key:a,class:"wm-art__field"},[u("div",Ld,D(o.label),1),u("div",{class:se(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},[i.isPriority(o.label)?(m(),_("svg",{key:0,class:"wm-tk__prio","data-level":i.priorityLevel(o.value),width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[...t[2]||(t[2]=[u("rect",{x:"1",y:"8",width:"2",height:"3",rx:"0.5"},null,-1),u("rect",{x:"5",y:"5",width:"2",height:"6",rx:"0.5"},null,-1),u("rect",{x:"9",y:"2",width:"2",height:"9",rx:"0.5"},null,-1)])],8,Bd)):i.isDate(o.label)?(m(),_("svg",Nd,[...t[3]||(t[3]=[u("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"},null,-1),u("path",{d:"M16 2v4M8 2v4M3 10h18"},null,-1)])])):P("",!0),u("span",null,D(o.value),1)],2)]))),128))])):P("",!0),n.data.created_at?(m(),_("div",Pd,[t[4]||(t[4]=u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),u("path",{d:"M16 2v4M8 2v4M3 10h18"})],-1)),u("span",null,D(i.formattedDate),1)])):P("",!0)])}const $d={form_response:ud,info_card:Cd,ticket:ve(Sd,[["render",Fd],["__scopeId","data-v-8b274eb7"]])},Dd={name:"WmArtifactRenderer",props:{artifact:{type:Object,required:!0}},computed:{component(){var t;const e=(t=this.artifact)==null?void 0:t.kind;return e&&$d[e]||null}}};function jd(e,t,n,s,r,i){return i.component?(m(),_e(Ra(i.component),{key:0,data:n.artifact.data},null,8,["data"])):P("",!0)}const Ud=ve(Dd,[["render",jd]]),Hd={name:"WmAttachmentPreview",inject:{signAttachmentFn:{default:null}},props:{attachment:{type:Object,required:!0}},data(){return{url:null,loading:!1}},computed:{kind(){var n,s;const e=(n=this.attachment)==null?void 0:n.type;if(e)return e;const t=(((s=this.attachment)==null?void 0:s.mime_type)||"").toLowerCase();return t.startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"file"},displayName(){var e,t,n;return((t=(e=this.attachment)==null?void 0:e.metadata)==null?void 0:t.name)||((n=this.attachment)==null?void 0:n.name)||this.guessNameFromPath()||"Pièce jointe"},sizeLabel(){var t;const e=(t=this.attachment)==null?void 0:t.size_bytes;return e?e<1024?`${e} o`:e<1024*1024?`${(e/1024).toFixed(0)} ko`:`${(e/(1024*1024)).toFixed(1)} Mo`:""}},watch:{"attachment.path":{handler(){this.refresh()},immediate:!0}},methods:{guessNameFromPath(){var n;return((((n=this.attachment)==null?void 0:n.path)||"").split("/").pop()||"").replace(/^[0-9a-f-]{8,}-/,"")},async refresh(){var e;if(!(!((e=this.attachment)!=null&&e.path)||!this.signAttachmentFn)){this.loading=!0;try{this.url=await this.signAttachmentFn(this.attachment.path)}finally{this.loading=!1}}},onFileClick(e){this.url||e.preventDefault()}}},Vd=["href"],Kd=["src","alt"],Wd=["src"],qd=["src"],zd=["href","download"],Gd={class:"wm-att__main"},Yd={class:"wm-att__name"},Jd={key:0,class:"wm-att__meta"},Xd={key:0,class:"wm-att__spin","aria-hidden":"true"};function Qd(e,t,n,s,r,i){return m(),_("div",{class:se(["wm-att",["wm-att--"+(i.kind||"file")]])},[i.kind==="image"&&r.url?(m(),_("a",{key:0,href:r.url,target:"_blank",rel:"noopener",class:"wm-att__imgWrap"},[u("img",{src:r.url,alt:i.displayName,loading:"lazy"},null,8,Kd)],8,Vd)):i.kind==="audio"&&r.url?(m(),_("audio",{key:1,src:r.url,controls:"",preload:"metadata"},null,8,Wd)):i.kind==="video"&&r.url?(m(),_("video",{key:2,src:r.url,controls:"",preload:"metadata"},null,8,qd)):(m(),_("a",{key:3,class:"wm-att__file",href:r.url||"#",download:i.displayName,target:"_blank",rel:"noopener",onClick:t[0]||(t[0]=(...o)=>i.onFileClick&&i.onFileClick(...o))},[t[1]||(t[1]=u("span",{class:"wm-att__icon"},[u("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),u("path",{d:"M14 2v6h6"})])],-1)),u("span",Gd,[u("span",Yd,D(i.displayName),1),i.sizeLabel?(m(),_("span",Jd,D(i.sizeLabel),1)):P("",!0)]),r.loading?(m(),_("span",Xd)):P("",!0)],8,zd))],2)}const Zd=ve(Hd,[["render",Qd],["__scopeId","data-v-1cd1267b"]]);function ef(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function tf(e){return/^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim())}const po="";function es(e){let t=e;const n=[];return t=t.replace(/`([^`\n]+)`/g,(s,r)=>{const i=n.length;return n.push(r),`${po}CODE${i}${po}`}),t=t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g,(s,r,i)=>tf(i)?`<a href="${i}" target="_blank" rel="noopener noreferrer">${r}</a>`:r),t=t.replace(/\*\*([^\n*][^\n]*?)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__([^\n_][^\n]*?)__/g,"<u>$1</u>"),t=t.replace(/~~([^\n~][^\n]*?)~~/g,"<s>$1</s>"),t=t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g,"$1<em>$2</em>"),t=t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g,"$1<em>$2</em>"),t=t.replace(/CODE(\d+)/g,(s,r)=>`<code class="wm-md-code">${n[+r]}</code>`),t}function nf(e){if(!e)return"";const t=ef(e).split(`
74
74
  `),n=[];let s=0;for(;s<t.length;){const i=t[s];if(/^\s*```([\w-]*)\s*$/.exec(i)){s++;const f=[];for(;s<t.length&&!/^\s*```\s*$/.test(t[s]);)f.push(t[s]),s++;s<t.length&&s++,n.push({type:"block",html:`<pre class="wm-md-pre"><code>${f.join(`
75
- `)}</code></pre>`});continue}if(/^\s*[-*]\s+/.test(i)){const f=[];for(;s<t.length;){const g=/^\s*[-*]\s+(.*)$/.exec(t[s]);if(!g)break;f.push(g[1]),s++}const c=f.map(g=>`<li>${Zn(g)}</li>`).join("");n.push({type:"block",html:`<ul class="wm-md-ul">${c}</ul>`});continue}const a=/^\s*(\d+)\.\s+(.*)$/.exec(i);if(a){const f=parseInt(a[1],10),c=[a[2]];for(s++;s<t.length;){const k=/^\s*\d+\.\s+(.*)$/.exec(t[s]);if(!k)break;c.push(k[1]),s++}const g=c.map(k=>`<li>${Zn(k)}</li>`).join(""),A=f!==1?` start="${f}"`:"";n.push({type:"block",html:`<ol class="wm-md-ol"${A}>${g}</ol>`});continue}const l=/^(#{1,6})\s+(.*)$/.exec(i);if(l){const f=l[1].length;n.push({type:"block",html:`<h${f} class="wm-md-h wm-md-h${f}">${Zn(l[2])}</h${f}>`}),s++;continue}n.push({type:"text",html:Zn(i)}),s++}let r="";for(let i=0;i<n.length;i++){const o=n[i];r+=o.html;const a=n[i+1];a&&o.type!=="block"&&a.type!=="block"&&(r+=`
76
- `)}return r}const ef={name:"WmBubble",props:{role:{type:String,default:"ai"},text:{type:String,default:""}},computed:{rendered(){return Zd(this.text)}}},tf=["innerHTML"];function nf(e,t,n,s,r,i){return p(),_("div",{class:ne(["wm-bubble","wm-bubble--"+n.role])},[Ia(e.$slots,"default",{},()=>[u("span",{innerHTML:i.rendered},null,8,tf)])],2)}const sf=be(ef,[["render",nf],["__scopeId","data-v-5c9e9f2b"]]),rf={name:"WmTyping"},of={class:"wm-typing"};function af(e,t,n,s,r,i){return p(),_("div",of,[...t[0]||(t[0]=[u("span",{style:{"animation-delay":"0s"}},null,-1),u("span",{style:{"animation-delay":"0.2s"}},null,-1),u("span",{style:{"animation-delay":"0.4s"}},null,-1)])])}const lf=be(rf,[["render",af],["__scopeId","data-v-df2447fd"]]);function mn(e){return e?e.client_msg_id||e.id:""}const cf={transferred_to_human:"Conversation transférée à un humain",assigned:"{name} a rejoint la conversation",unassigned:"L'agent a quitté la conversation",resolved:"Conversation résolue",reopened:"Conversation rouverte",idle:"Conversation en pause"},uf=80,df=200,ff={name:"WmMessageList",components:{AIAvatar:hn,HumanAvatar:Hs,Bubble:sf,Typing:lf,ActionResult:Zu,AttachmentPreview:Jd,ArtifactRenderer:Pd},props:{messages:{type:Array,default:()=>[]},streamingActive:{type:Boolean,default:!1},dateLabel:{type:String,default:""},conversationId:{type:[String,Number],default:null},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},unreadAnchorTs:{type:String,default:""},unreadBoundaryTs:{type:String,default:""}},emits:["load-more"],data(){return{silentFades:!1,widthByKey:Object.freeze({})}},computed:{historyExhausted(){return!this.hasMore&&!this.loadingMore&&this.messages.length>=20},groups(){var n,s,r,i;const e=[];for(const o of this.messages){const a=this.roleOf(o);if(a==="system"){if(((n=o==null?void 0:o.payload)==null?void 0:n.event)==="action_admin_pending"){const c=e[e.length-1];c&&c.role==="ai"?c.messages.push(o):e.push({key:`g-${mn(o)}`,role:"ai",agentName:"",agentAvatarUrl:null,messages:[o],items:[]});continue}e.push({key:`sys-${mn(o)}`,role:a,messages:[o],items:[],systemLabel:this.systemLabel(o)});continue}const l=e[e.length-1];l&&l.role===a&&(a==="ai"||l.agentName===(((s=o==null?void 0:o.author)==null?void 0:s.name)||""))?l.messages.push(o):e.push({key:`g-${mn(o)}`,role:a,agentName:((r=o==null?void 0:o.author)==null?void 0:r.name)||"",agentAvatarUrl:((i=o==null?void 0:o.author)==null?void 0:i.avatar_url)||null,messages:[o],items:[]})}for(const o of e){if(o.role==="system")continue;const a=[];for(const l of o.messages)for(const f of this.itemsOf(l))a.push(f);o.items=a}const t=[];for(const o of e){if(o.role!=="system"&&!o.items.length)continue;const a=t[t.length-1];if(a&&a.role!=="system"&&a.role===o.role&&(o.role==="ai"||a.agentName===o.agentName)){a.messages.push(...o.messages),a.items.push(...o.items);continue}t.push(o)}return t},unreadGroupKey(){if(!this.unreadAnchorTs)return null;for(const e of this.groups){if(e.role==="user"||e.role==="system"||!e.items.length)continue;const t=e.messages[0];if(t!=null&&t.created_at&&!(t.created_at<=this.unreadAnchorTs)&&!(this.unreadBoundaryTs&&t.created_at>this.unreadBoundaryTs))return e.key}return null}},watch:{messages:{handler:"snapshotAndRestore",deep:!0},loadingMore(e){e||(this._pendingLoadMore=!1),this.silentFades=!0,clearTimeout(this._silenceTimer),e||(this._silenceTimer=setTimeout(()=>{this.silentFades=!1},250)),this.snapshotAndRestore()},streamingActive:"snapshotAndRestore"},mounted(){this._lastSeenConvId=this.conversationId,this.scrollToBottom(),this._measureFrame=null,this._ro=new ResizeObserver(()=>this.scheduleMeasure()),this.$refs.scrollEl&&this._ro.observe(this.$refs.scrollEl),this.$nextTick(()=>this.measureRows())},beforeUnmount(){var e;(e=this._ro)==null||e.disconnect(),this._measureFrame&&cancelAnimationFrame(this._measureFrame),clearTimeout(this._silenceTimer)},updated(){this.scheduleMeasure()},methods:{messageKey:mn,isAtBottom(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=uf},onScroll(){const e=this.$refs.scrollEl;e&&(this.loadingMore||!this.hasMore||this._pendingLoadMore||e.scrollTop<=df&&(this._pendingLoadMore=!0,this.$emit("load-more")))},snapshotAndRestore(){const e=this.$refs.scrollEl;if(!e||this._scrollSnap)return;const t=this._lastSeenConvId!==this.conversationId;this._lastSeenConvId=this.conversationId;const n=this.isAtBottom(e);let s=null;if(!t&&!n){const i=this.pickAnchor(e);if(i!=null&&i.el){const o=e.getBoundingClientRect().top;s={el:i.el,relY:i.el.getBoundingClientRect().top-o}}}const r={forceBottom:t,wasPinned:n,anchor:s};this._scrollSnap=r,this.$nextTick(()=>{if(this._scrollSnap=null,r.forceBottom||r.wasPinned){e.scrollTop=e.scrollHeight;return}if(!r.anchor)return;const i=()=>{var f;const o=r.anchor;if(!((f=o.el)!=null&&f.isConnected))return;const l=o.el.getBoundingClientRect().top-e.getBoundingClientRect().top-o.relY;Math.abs(l)>.5&&(e.scrollTop+=l)};i(),requestAnimationFrame(()=>{i(),requestAnimationFrame(i)})})},pickAnchor(e){const t=e.scrollTop;let n=null;for(const s of e.children)if(s.classList.contains("wm-list__group")&&(n||(n=s),s.offsetTop+s.offsetHeight>=t))return{el:s,offsetTop:s.offsetTop};return n?{el:n,offsetTop:n.offsetTop}:null},roleOf(e){var n,s;if((e==null?void 0:e.type)==="system"||((n=e==null?void 0:e.payload)==null?void 0:n.type)==="system")return"system";const t=(s=e==null?void 0:e.author)==null?void 0:s.type;return t==="user"?"user":t==="agent_human"?"human":"ai"},roleLabel(e){return e.role==="human"?e.agentName||"Agent":"Assistant IA"},itemsOf(e){var t;if(!e)return[];if(e.type==="system"&&((t=e==null?void 0:e.payload)==null?void 0:t.event)==="action_admin_pending")return[{message:e,partKey:"main",renderAs:"admin-pending",kind:{top:"bubble",bottom:"bubble"}}];if(e.type==="action"&&e.payload&&e.payload.state!=="pending"){const n=[{message:e,partKey:"main",renderAs:"action",kind:{top:"bubble",bottom:"bubble"}}];return this.actionArtifact(e)&&n.push({message:e,partKey:"artifact",renderAs:"artifact-of-action",kind:{top:"card",bottom:"card"}}),n}return this.artifactOf(e)?[{message:e,partKey:"main",renderAs:"artifact",kind:{top:"card",bottom:"card"}}]:e.text_md||this.attachmentsOf(e).length?[{message:e,partKey:"main",renderAs:"bubble",kind:{top:"bubble",bottom:"bubble"}}]:[]},cornersFor(e,t){var j,Q,ge;const n=e.items,s=(j=n[t])==null?void 0:j.kind,r=(Q=n[t-1])==null?void 0:Q.kind,i=(ge=n[t+1])==null?void 0:ge.kind,o=e.role==="user",a=14,l=4,f=r==null?void 0:r.bottom,c=i==null?void 0:i.top,g=this.widthByKey[this.rowKeyOf(e,t)],A=this.widthByKey[this.rowKeyOf(e,t-1)],k=this.widthByKey[this.rowKeyOf(e,t+1)],D=.5,O=(ye,ve,q)=>ye!=null&&g!=null?ye+D>=g:ve===q||ve==="card"&&q==="bubble";let Y=a,W=a,V=a,J=a;return o?(f&&(W=l),(c||!i)&&(V=l),f&&O(A,f,s==null?void 0:s.top)&&(Y=l),c&&O(k,c,s==null?void 0:s.bottom)&&(J=l)):(f&&(Y=l),(c||!i)&&(J=l),f&&O(A,f,s==null?void 0:s.top)&&(W=l),c&&O(k,c,s==null?void 0:s.bottom)&&(V=l)),{tl:Y,tr:W,br:V,bl:J}},cornersStyle(e,t){if(e.items.length<2)return null;const n=this.cornersFor(e,t);return{"--wm-r-tl":`${n.tl}px`,"--wm-r-tr":`${n.tr}px`,"--wm-r-br":`${n.br}px`,"--wm-r-bl":`${n.bl}px`}},rowKeyOf(e,t){var s;const n=(s=e==null?void 0:e.items)==null?void 0:s[t];return n?`${mn(n.message)}-${n.partKey}`:""},scheduleMeasure(){this._measureFrame||(this._measureFrame=requestAnimationFrame(()=>{this._measureFrame=null,this.measureRows()}))},measureRows(){const e=this.$refs.scrollEl;if(!e)return;const t={};for(const i of e.querySelectorAll(".wm-list__row[data-row-key]")){const o=i.dataset.rowKey;if(!o)continue;const a=i.querySelector(".wm-bubble, .wm-result, .wm-art, .wm-list__body");if(!a)continue;const l=a.getBoundingClientRect().width;l>0&&(t[o]=l)}const n=this.widthByKey,s=Object.keys(n),r=Object.keys(t);if(s.length===r.length){let i=!0;for(const o of r)if(Math.abs((n[o]??0)-t[o])>.5){i=!1;break}if(i)return}this.widthByKey=Object.freeze(t)},lastTimeOf(e){const t=e.items[e.items.length-1],n=(t==null?void 0:t.message)||e.messages[e.messages.length-1];if(!(n!=null&&n.created_at))return"";try{return ao(new Date(n.created_at))}catch{return""}},hasTrailingOverlay(e){if(!e.messages.length)return!1;const t=e.messages[e.messages.length-1],n=e.items[e.items.length-1];return!!t&&(n==null?void 0:n.message)!==t},attachmentsOf(e){var n;const t=(n=e==null?void 0:e.payload)==null?void 0:n.attachments;return Array.isArray(t)?t:[]},artifactOf(e){var n;const t=(n=e==null?void 0:e.metadata)==null?void 0:n.artifact;return!t||typeof t!="object"||typeof t.kind!="string"?null:t},actionLabel(e){var t;return((t=e==null?void 0:e.payload)==null?void 0:t.name)||(e==null?void 0:e.text_md)||"Action"},actionDetail(e){var n,s,r,i,o,a;const t=e==null?void 0:e.payload;return t?t.state==="success"?((n=t.success)==null?void 0:n.summary)||((r=(s=t.success)==null?void 0:s.metadata)==null?void 0:r.description)||"":t.state==="rejected"?((i=t.rejected)==null?void 0:i.reason)||"Action annulée par l'utilisateur.":t.state==="failure"&&(((o=t.failure)==null?void 0:o.summary)||((a=t.failure)==null?void 0:a.error))||"":""},actionArtifact(e){var n,s;const t=(s=(n=e==null?void 0:e.payload)==null?void 0:n.success)==null?void 0:s.artifact;return!t||typeof t!="object"||typeof t.kind!="string"?null:t},systemLabel(e){var r,i,o;const t=(r=e==null?void 0:e.payload)==null?void 0:r.event,n=cf[t]||(e==null?void 0:e.text_md)||"Mise à jour de la conversation",s=((i=e==null?void 0:e.metadata)==null?void 0:i.agent_name)||((o=e==null?void 0:e.author)==null?void 0:o.name)||"";return n.replace("{name}",s||"Un agent")},scrollToBottom(){const e=this.$refs.scrollEl;e&&(e.scrollTop=e.scrollHeight)}}},hf={key:0,class:"wm-list__loadMore",role:"status","aria-live":"polite"},mf={key:1,class:"wm-list__historyEnd"},pf={key:2,class:"wm-list__sep"},gf={class:"wm-list__sep-label"},_f={key:0,class:"wm-list__sep wm-list__sep--unread"},yf={key:0,class:"wm-list__sysep"},vf={class:"wm-list__sysep-label"},bf=["data-row-key"],wf={key:0,class:"wm-list__avatarSlot"},kf={key:5,class:"wm-list__body"},Cf={key:0},Sf={key:1,"aria-hidden":"true"},Af={key:2},xf={key:3,class:"wm-list__row wm-list__row--ai fade-up"},Tf={class:"wm-list__avatarSlot"};function Mf(e,t,n,s,r,i){const o=me("AIAvatar"),a=me("HumanAvatar"),l=me("ActionResult"),f=me("ArtifactRenderer"),c=me("Bubble"),g=me("AttachmentPreview"),A=me("Typing");return p(),_("div",{ref:"scrollEl",class:ne(["wm-list",{"wm-list--silent":r.silentFades}]),onScrollPassive:t[0]||(t[0]=(...k)=>i.onScroll&&i.onScroll(...k))},[n.loadingMore?(p(),_("div",hf,[...t[1]||(t[1]=[u("span",{class:"wm-list__loadMore-spinner","aria-hidden":"true"},null,-1),u("span",{class:"wm-list__loadMore-lbl"},"Chargement de l'historique…",-1)])])):i.historyExhausted?(p(),_("div",mf,"Début de la conversation")):$("",!0),n.dateLabel?(p(),_("div",pf,[t[2]||(t[2]=u("div",{class:"wm-list__line"},null,-1)),u("span",gf,P(n.dateLabel),1),t[3]||(t[3]=u("div",{class:"wm-list__line"},null,-1))])):$("",!0),(p(!0),_(X,null,Ae(i.groups,(k,D)=>(p(),_(X,{key:k.key},[k.key===i.unreadGroupKey?(p(),_("div",_f,[...t[4]||(t[4]=[u("div",{class:"wm-list__line wm-list__line--unread"},null,-1),u("span",{class:"wm-list__sep-label wm-list__sep-label--unread"},"Non lus",-1),u("div",{class:"wm-list__line wm-list__line--unread"},null,-1)])])):$("",!0),k.role==="system"||k.items.length?(p(),_("div",{key:1,class:ne(["wm-list__group","wm-list__group--"+k.role])},[k.role==="system"?(p(),_("div",yf,[t[5]||(t[5]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1)),u("span",vf,P(k.systemLabel),1),t[6]||(t[6]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1))])):(p(),_(X,{key:1},[(p(!0),_(X,null,Ae(k.items,(O,Y)=>(p(),_("div",{key:`${i.messageKey(O.message)}-${O.partKey}`,"data-row-key":`${i.messageKey(O.message)}-${O.partKey}`,class:ne(["wm-list__row fade-up",["wm-list__row--"+k.role,{"is-pending":O.message._pending,"is-failed":O.message._failed}]]),style:Pe(i.cornersStyle(k,Y))},[k.role!=="user"?(p(),_("div",wf,[Y===k.items.length-1?(p(),_(X,{key:0},[k.role==="ai"?(p(),pe(o,{key:0,size:26,tail:!0})):(p(),pe(a,{key:1,name:k.agentName,"avatar-url":k.agentAvatarUrl,size:26,tail:!0},null,8,["name","avatar-url"]))],64)):$("",!0)])):$("",!0),O.renderAs==="action"?(p(),pe(l,{key:1,state:O.message.payload.state,label:i.actionLabel(O.message),detail:i.actionDetail(O.message)},null,8,["state","label","detail"])):O.renderAs==="admin-pending"?(p(),pe(l,{key:2,state:"awaiting",label:"Demande d'approbation envoyée",detail:O.message.text_md||""},null,8,["detail"])):O.renderAs==="artifact-of-action"?(p(),pe(f,{key:3,artifact:i.actionArtifact(O.message)},null,8,["artifact"])):O.renderAs==="artifact"?(p(),pe(f,{key:4,artifact:i.artifactOf(O.message)},null,8,["artifact"])):(p(),_("div",kf,[O.message.text_md?(p(),pe(c,{key:0,role:k.role,text:O.message.text_md},null,8,["role","text"])):$("",!0),i.attachmentsOf(O.message).length?(p(),_("div",{key:1,class:ne(["wm-list__atts",{"wm-list__atts--align-end":k.role==="user"}])},[(p(!0),_(X,null,Ae(i.attachmentsOf(O.message),(W,V)=>(p(),pe(g,{key:`${i.messageKey(O.message)}-att-${V}`,attachment:W},null,8,["attachment"]))),128))],2)):$("",!0)]))],14,bf))),128)),(k.role!=="user"||i.lastTimeOf(k))&&!i.hasTrailingOverlay(k)?(p(),_("div",{key:0,class:ne(["wm-list__meta",{"wm-list__meta--right":k.role==="user"}])},[k.role!=="user"?(p(),_("span",Cf,P(i.roleLabel(k)),1)):$("",!0),k.role!=="user"&&i.lastTimeOf(k)?(p(),_("span",Sf,"·")):$("",!0),i.lastTimeOf(k)?(p(),_("span",Af,P(i.lastTimeOf(k)),1)):$("",!0)],2)):$("",!0)],64))],2)):$("",!0)],64))),128)),n.streamingActive?(p(),_("div",xf,[u("div",Tf,[_e(o,{size:26,tail:!0})]),_e(A)])):$("",!0)],34)}const Ef=be(ff,[["render",Mf],["__scopeId","data-v-21381fcb"]]),es=typeof navigator<"u"&&!!navigator.mediaDevices&&typeof navigator.mediaDevices.getDisplayMedia=="function",Vs=typeof window<"u"&&typeof window.MediaRecorder<"u";function Of(){return Vs&&["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm","video/mp4"].find(t=>{var n,s;return(s=(n=window.MediaRecorder).isTypeSupported)==null?void 0:s.call(n,t)})||""}function mo({audio:e}){return{video:!0,audio:!!e,selfBrowserSurface:"include",surfaceSwitching:"include",systemAudio:e?"include":"exclude"}}async function If(){if(!es)return null;let e;try{e=await navigator.mediaDevices.getDisplayMedia(mo({audio:!1}))}catch(t){return(t==null?void 0:t.name)!=="NotAllowedError"&&console.error("[media] screenshot picker",t),null}try{return await Bf(e)}catch(t){return console.error("[media] screenshot capture",t),null}finally{e.getTracks().forEach(t=>{t.stop()})}}async function Bf(e){const t=document.createElement("video");t.muted=!0,t.playsInline=!0,t.srcObject=e,await t.play(),await new Promise(a=>requestAnimationFrame(a));const n=t.videoWidth||1280,s=t.videoHeight||720,r=document.createElement("canvas");r.width=n,r.height=s,r.getContext("2d").drawImage(t,0,0,n,s);const i=await new Promise((a,l)=>{r.toBlob(f=>f?a(f):l(new Error("toBlob failed")),"image/png")}),o=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);return new File([i],`capture-${o}.png`,{type:"image/png"})}async function Rf(e={}){var f;if(!es||!Vs)return null;let t;try{t=await navigator.mediaDevices.getDisplayMedia(mo({audio:!0}))}catch(c){return(c==null?void 0:c.name)!=="NotAllowedError"&&console.error("[media] record picker",c),null}const n=Of();let s;try{s=n?new window.MediaRecorder(t,{mimeType:n}):new window.MediaRecorder(t)}catch(c){return console.error("[media] recorder init",c),t.getTracks().forEach(g=>{g.stop()}),null}const r=[];let i=null,o=!1;s.addEventListener("dataavailable",c=>{c.data&&c.data.size>0&&r.push(c.data)}),s.addEventListener("stop",()=>{var c,g;if(i&&clearInterval(i),t.getTracks().forEach(A=>{A.stop()}),r.length){const A=s.mimeType||n||"video/webm",k=new Blob(r,{type:A}),D=/mp4/.test(A)?"mp4":"webm",O=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),Y=new File([k],`ecran-${O}.${D}`,{type:A});(c=e.onfinalize)==null||c.call(e,Y)}else(g=e.oncancel)==null||g.call(e)}),t.getVideoTracks().forEach(c=>{c.addEventListener("ended",()=>a(),{once:!0})});function a(){if(!o&&(o=!0,s.state!=="inactive"))try{s.stop()}catch(c){console.error("[media] recorder stop",c)}}try{s.start(1e3)}catch(c){return console.error("[media] recorder start",c),t.getTracks().forEach(g=>{g.stop()}),null}(f=e.onstart)==null||f.call(e);const l=Date.now();return i=setInterval(()=>{var c;(c=e.ontick)==null||c.call(e,Date.now()-l)},500),{stop:a,get state(){return s.state}}}const Lf=[{action:"file",label:"Joindre un fichier",path:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"},{action:"screenshot",label:"Capture d'écran",path:"M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z M12 17a4 4 0 100-8 4 4 0 000 8z"},{action:"record",label:"Enregistrer l'écran",path:"M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"}],Nf={name:"WmComposer",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Écrivez votre message…"},disabled:{type:Boolean,default:!1},attachLabel:{type:String,default:"Joindre"}},emits:["update:modelValue","send","attach"],data(){return{local:this.modelValue,attachOpen:!1,recording:!1,recordingElapsed:0,recorder:null}},computed:{canSend(){return!this.disabled&&!!this.local.trim()},attachItems(){return Lf.map(e=>({...e,disabled:e.action==="screenshot"&&!es||e.action==="record"&&(!es||!Vs)}))},recordingElapsedLabel(){const e=Math.floor(this.recordingElapsed/1e3),t=Math.floor(e/60),n=e%60;return`${t}:${n.toString().padStart(2,"0")}`}},watch:{modelValue(e){e!==this.local&&(this.local=e,this.$nextTick(()=>this.autosize()))},local(e){this.$emit("update:modelValue",e)}},mounted(){this.autosize()},beforeUnmount(){if(this.recorder)try{this.recorder.stop()}catch{}},methods:{focus(){const e=this.$refs.inputEl;if(!(!e||this.disabled))try{e.focus({preventScroll:!0})}catch{e.focus()}},onSubmit(){if(!this.canSend)return;const e=this.local.trim();this.local="",this.$emit("send",e),this.$nextTick(()=>this.autosize())},onKeydown(e){e.key==="Enter"&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&!e.isComposing&&(e.preventDefault(),this.onSubmit())},autosize(){const e=this.$refs.inputEl;e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)},onFile(e){const t=Array.from(e.target.files||[]);for(const n of t)this.$emit("attach",n);e.target.value=""},onAttachAction(e){this.attachOpen=!1,e==="file"?this.pickFile():e==="screenshot"?this.captureScreenshot():e==="record"&&this.startRecording()},pickFile(){var e;(e=this.$refs.fileEl)==null||e.click()},async captureScreenshot(){if(this.disabled)return;const e=await If();e&&this.$emit("attach",e)},async startRecording(){if(this.recording||this.disabled)return;this.recordingElapsed=0;const e=await Rf({onstart:()=>{this.recording=!0},ontick:t=>{this.recordingElapsed=t},onfinalize:t=>{this.$emit("attach",t),this.recording=!1,this.recordingElapsed=0,this.recorder=null},oncancel:()=>{this.recording=!1,this.recordingElapsed=0,this.recorder=null}});e&&(this.recorder=e)},stopRecording(){if(this.recorder)try{this.recorder.stop()}catch(e){console.error("[composer] stop recording",e)}}}},$f={class:"wm-compose-wrap"},Ff={key:0,class:"wm-rec"},Pf={class:"wm-rec__lbl"},Df={key:1,class:"wm-compose__menu",role:"menu"},jf=["disabled","onClick"],Uf={class:"wm-compose__menuIcon"},Hf={viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},Vf=["d"],Kf=["placeholder","disabled"],Wf={class:"wm-compose__actions"},qf=["title","aria-label","disabled"],zf=["disabled"];function Gf(e,t,n,s,r,i){return p(),_("div",$f,[r.recording?(p(),_("div",Ff,[t[8]||(t[8]=u("span",{class:"wm-rec__dot","aria-hidden":"true"},null,-1)),u("span",Pf,"Enregistrement · "+P(i.recordingElapsedLabel),1),u("button",{type:"button",class:"wm-rec__stop",onClick:t[0]||(t[0]=(...o)=>i.stopRecording&&i.stopRecording(...o))},"Arrêter")])):$("",!0),u("form",{class:ne(["wm-compose",{"has-attach":r.attachOpen}]),onSubmit:t[7]||(t[7]=yt((...o)=>i.onSubmit&&i.onSubmit(...o),["prevent"]))},[u("input",{ref:"fileEl",type:"file",hidden:"",multiple:"",onChange:t[1]||(t[1]=(...o)=>i.onFile&&i.onFile(...o))},null,544),r.attachOpen?(p(),_("div",{key:0,class:"wm-compose__overlay",onClick:t[2]||(t[2]=o=>r.attachOpen=!1)})):$("",!0),r.attachOpen?(p(),_("div",Df,[(p(!0),_(X,null,Ae(i.attachItems,o=>(p(),_("button",{key:o.action,type:"button",class:"wm-compose__menuItem",disabled:o.disabled,onClick:a=>i.onAttachAction(o.action)},[u("span",Uf,[(p(),_("svg",Hf,[u("path",{d:o.path,stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Vf)]))]),u("span",null,P(o.label),1)],8,jf))),128))])):$("",!0),ot(u("textarea",{ref:"inputEl","onUpdate:modelValue":t[3]||(t[3]=o=>r.local=o),class:"wm-compose__input",rows:"3",placeholder:n.placeholder,disabled:n.disabled,onKeydown:t[4]||(t[4]=(...o)=>i.onKeydown&&i.onKeydown(...o)),onInput:t[5]||(t[5]=(...o)=>i.autosize&&i.autosize(...o))},null,40,Kf),[[Mt,r.local]]),u("div",Wf,[u("button",{type:"button",class:ne(["wm-compose__icon",{"is-open":r.attachOpen}]),title:n.attachLabel,"aria-label":n.attachLabel,disabled:r.recording,onClick:t[6]||(t[6]=o=>r.attachOpen=!r.attachOpen)},[...t[9]||(t[9]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})],-1)])],10,qf),u("button",{type:"submit",class:ne(["wm-compose__send",{"is-empty":!i.canSend}]),disabled:!i.canSend,"aria-label":"Envoyer"},[...t[10]||(t[10]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"})],-1)])],10,zf)])],34)])}const Yf=be(Nf,[["render",Gf],["__scopeId","data-v-14fa9ec0"]]),Jf={name:"WmSuggestionChips",props:{items:{type:Array,default:()=>[]},baseDelay:{type:Number,default:360},stepDelay:{type:Number,default:90}},emits:["select"],computed:{batchKey(){return this.items.map(e=>(e==null?void 0:e.label)||(e==null?void 0:e.text)||"").join("§")}}},Xf=["onClick"];function Qf(e,t,n,s,r,i){return n.items.length?(p(),_("div",{key:i.batchKey,class:"wm-chips"},[(p(!0),_(X,null,Ae(n.items,(o,a)=>(p(),_("button",{key:a,type:"button",class:"wm-chip",style:Pe({animationDelay:n.baseDelay+a*n.stepDelay+"ms"}),onClick:l=>e.$emit("select",o)},P(o.label),13,Xf))),128))])):$("",!0)}const Zf=be(Jf,[["render",Qf],["__scopeId","data-v-55aa529d"]]),eh={name:"WmApprovalCard",components:{AIAvatar:hn},props:{action:{type:String,required:!0},detail:{type:String,default:""},callbacks:{type:Array,default:()=>[]}},emits:["callback"],computed:{approveCallback(){return this.callbacks.find(e=>e.id==="approve"||e.style==="primary")||this.callbacks[0]},rejectCallback(){return this.callbacks.find(e=>e.id==="reject"||e.style==="danger"||e.style==="neutral")||(this.callbacks.length>1?this.callbacks[1]:null)},approveId(){var e;return(e=this.approveCallback)==null?void 0:e.id},rejectId(){var e;return(e=this.rejectCallback)==null?void 0:e.id},approveLabel(){var e;return((e=this.approveCallback)==null?void 0:e.label)||"Autoriser"},rejectLabel(){var e;return((e=this.rejectCallback)==null?void 0:e.label)||"Refuser"}}},th={class:"wm-approval"},nh={class:"wm-approval__head"},sh={class:"wm-approval__icon"},rh={class:"wm-approval__main"},ih={class:"wm-approval__title"},oh={key:0,class:"wm-approval__detail"},ah={class:"wm-approval__actions"};function lh(e,t,n,s,r,i){const o=me("AIAvatar");return p(),_("div",th,[u("div",nh,[u("div",sh,[_e(o,{size:24})]),u("div",rh,[u("div",ih,P(n.action),1),n.detail?(p(),_("div",oh,P(n.detail),1)):$("",!0)])]),u("div",ah,[i.rejectId?(p(),_("button",{key:0,type:"button",class:"wm-approval__btn wm-approval__btn--neutral",onClick:t[0]||(t[0]=a=>e.$emit("callback",i.rejectId))},P(i.rejectLabel),1)):$("",!0),i.approveId?(p(),_("button",{key:1,type:"button",class:"wm-approval__btn wm-approval__btn--primary",onClick:t[1]||(t[1]=a=>e.$emit("callback",i.approveId))},P(i.approveLabel),1)):$("",!0)])])}const ch=be(eh,[["render",lh],["__scopeId","data-v-b1be139c"]]);let po=0;const uh=new Set(["text","textarea","number","boolean","select","multiselect","date"]),dh={name:"WmFormCard",components:{AIAvatar:hn},props:{form:{type:Object,required:!0},readOnly:{type:Boolean,default:!1},initialValues:{type:Object,default:null}},emits:["submit"],data(){return po+=1,{_uid:po,values:{},busy:!1,error:""}},computed:{normalizedFields(){var t;return(Array.isArray((t=this.form)==null?void 0:t.fields)?this.form.fields:[]).filter(n=>!(!(n!=null&&n.key)||!(n!=null&&n.label)||!uh.has(n==null?void 0:n.type)||(n.type==="select"||n.type==="multiselect")&&(!Array.isArray(n.options)||n.options.length===0)))}},created(){this.resetValues()},methods:{resetValues(){const e=this.initialValues&&typeof this.initialValues=="object"?this.initialValues:{},t={};for(const n of this.normalizedFields){if(e[n.key]!==void 0){t[n.key]=e[n.key];continue}n.type==="boolean"?t[n.key]=!1:n.type==="multiselect"?t[n.key]=[]:t[n.key]=""}this.values=t,this.error=""},toggleMulti(e,t,n){const s=Array.isArray(this.values[e])?this.values[e].slice():[],r=s.indexOf(t);n&&r===-1?s.push(t):!n&&r!==-1&&s.splice(r,1),this.values={...this.values,[e]:s}},validate(){for(const e of this.normalizedFields){if(!e.required)continue;const t=this.values[e.key];if(e.type!=="boolean"){if(e.type==="multiselect"){if(!Array.isArray(t)||t.length===0)return`« ${e.label} » est requis.`;continue}if(t==null||t==="")return`« ${e.label} » est requis.`}}return""},async onSubmit(){if(this.readOnly||this.busy)return;const e=this.validate();if(e){this.error=e;return}this.error="",this.busy=!0;try{await this.$emit("submit",{values:this.values})}finally{this.busy=!1}}}},fh={class:"wm-form"},hh={class:"wm-form__head"},mh={class:"wm-form__icon"},ph={class:"wm-form__main"},gh={class:"wm-form__title"},_h={key:0,class:"wm-form__detail"},yh=["for"],vh={key:0,class:"wm-form__req","aria-hidden":"true"},bh=["id","onUpdate:modelValue","placeholder","required","disabled"],wh=["id","onUpdate:modelValue","placeholder","required","disabled"],kh=["id","onUpdate:modelValue","placeholder","required","disabled"],Ch=["id","onUpdate:modelValue","required","disabled"],Sh={key:4,class:"wm-form__bool"},Ah=["id","onUpdate:modelValue","disabled"],xh=["id","onUpdate:modelValue","required","disabled"],Th={value:"",disabled:""},Mh=["value"],Eh={key:6,class:"wm-form__multi"},Oh=["value","checked","disabled","onChange"],Ih={key:0,class:"wm-form__err"},Bh=["disabled"],Rh={key:0,class:"wm-form__spinner","aria-hidden":"true"},Lh={key:2,class:"wm-form__doneLbl"};function Nh(e,t,n,s,r,i){const o=me("AIAvatar");return p(),_("div",fh,[u("div",hh,[u("div",mh,[_e(o,{size:24})]),u("div",ph,[u("div",gh,P(n.form.title||"Formulaire"),1),n.form.description?(p(),_("div",_h,P(n.form.description),1)):$("",!0)])]),u("form",{class:"wm-form__body",onSubmit:t[0]||(t[0]=yt((...a)=>i.onSubmit&&i.onSubmit(...a),["prevent"]))},[(p(!0),_(X,null,Ae(i.normalizedFields,a=>(p(),_("div",{key:a.key,class:"wm-form__field"},[u("label",{for:`wm-f-${r._uid}-${a.key}`,class:"wm-form__label"},[qn(P(a.label),1),a.required?(p(),_("span",vh,"*")):$("",!0)],8,yh),a.type==="text"?ot((p(),_("input",{key:0,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"text",class:"wm-form__input",placeholder:a.placeholder||"",required:a.required,disabled:n.readOnly||r.busy},null,8,bh)),[[Mt,r.values[a.key]]]):a.type==="textarea"?ot((p(),_("textarea",{key:1,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,class:"wm-form__textarea",rows:"3",placeholder:a.placeholder||"",required:a.required,disabled:n.readOnly||r.busy},null,8,wh)),[[Mt,r.values[a.key]]]):a.type==="number"?ot((p(),_("input",{key:2,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"number",class:"wm-form__input",placeholder:a.placeholder||"",required:a.required,disabled:n.readOnly||r.busy},null,8,kh)),[[Mt,r.values[a.key],void 0,{number:!0}]]):a.type==="date"?ot((p(),_("input",{key:3,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"date",class:"wm-form__input",required:a.required,disabled:n.readOnly||r.busy},null,8,Ch)),[[Mt,r.values[a.key]]]):a.type==="boolean"?(p(),_("label",Sh,[ot(u("input",{id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"checkbox",disabled:n.readOnly||r.busy},null,8,Ah),[[Gl,r.values[a.key]]]),u("span",null,P(a.placeholder||"Oui"),1)])):a.type==="select"?ot((p(),_("select",{key:5,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,class:"wm-form__select",required:a.required,disabled:n.readOnly||r.busy},[u("option",Th,P(a.placeholder||"Choisir…"),1),(p(!0),_(X,null,Ae(a.options,l=>(p(),_("option",{key:l.value,value:l.value},P(l.label),9,Mh))),128))],8,xh)),[[Yl,r.values[a.key]]]):a.type==="multiselect"?(p(),_("div",Eh,[(p(!0),_(X,null,Ae(a.options,l=>(p(),_("label",{key:l.value,class:"wm-form__multiItem"},[u("input",{type:"checkbox",value:l.value,checked:Array.isArray(r.values[a.key])&&r.values[a.key].includes(l.value),disabled:n.readOnly||r.busy,onChange:f=>i.toggleMulti(a.key,l.value,f.target.checked)},null,40,Oh),u("span",null,P(l.label),1)]))),128))])):$("",!0)]))),128)),r.error?(p(),_("div",Ih,P(r.error),1)):$("",!0),n.readOnly?(p(),_("div",Lh,"Réponse envoyée")):(p(),_("button",{key:1,type:"submit",class:"wm-form__submit",disabled:r.busy},[r.busy?(p(),_("span",Rh)):$("",!0),u("span",null,P(r.busy?"Envoi…":n.form.submit_label||"Envoyer"),1)],8,Bh))],32)])}const $h=be(dh,[["render",Nh],["__scopeId","data-v-64b40f76"]]),Fh={name:"WmFeedback",props:{busy:{type:Boolean,default:!1},done:{type:Boolean,default:!1}},emits:["submit"],data(){return{sel:null,options:[{v:1,e:"😞",l:"Pas bien"},{v:2,e:"😐",l:"Moyen"},{v:3,e:"🙂",l:"Bien"},{v:4,e:"😄",l:"Super"},{v:5,e:"🤩",l:"Excellent"}]}},methods:{onSend(){!this.sel||this.busy||this.$emit("submit",{rating:this.sel})}}},Ph={class:"wm-fb"},Dh={class:"wm-fb__row"},jh=["onClick"],Uh={class:"wm-fb__emoji"},Hh={class:"wm-fb__label"},Vh=["disabled"],Kh={key:1,class:"wm-fb__done"};function Wh(e,t,n,s,r,i){return p(),_("div",Ph,[n.done?(p(),_("div",Kh,[...t[3]||(t[3]=[zn('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>',3)])])):(p(),_(X,{key:0},[t[1]||(t[1]=u("div",{class:"wm-fb__title"},"Comment s'est passée cette conversation ?",-1)),t[2]||(t[2]=u("div",{class:"wm-fb__sub"},"Votre avis nous aide à améliorer l'assistant.",-1)),u("div",Dh,[(p(!0),_(X,null,Ae(r.options,o=>(p(),_("button",{key:o.v,type:"button",class:ne(["wm-fb__opt",{"is-selected":r.sel===o.v}]),onClick:a=>r.sel=o.v},[u("span",Uh,P(o.e),1),u("span",Hh,P(o.l),1)],10,jh))),128))]),u("button",{type:"button",class:"wm-fb__send",disabled:!r.sel||n.busy,onClick:t[0]||(t[0]=(...o)=>i.onSend&&i.onSend(...o))},P(n.busy?"Envoi…":"Envoyer mon avis"),9,Vh)],64))])}const qh=be(Fh,[["render",Wh],["__scopeId","data-v-6f45ff3b"]]),zh={name:"WmMoreMenu",props:{canRename:{type:Boolean,default:!0},canExport:{type:Boolean,default:!0},soundEnabled:{type:Boolean,default:!0},browserNotifEnabled:{type:Boolean,default:!1},statusUrl:{type:String,default:""},helpUrl:{type:String,default:""}},emits:["close","action","sound-toggle","browser-notif-toggle"],data(){return{soundOn:this.soundEnabled,browserNotifOn:this.browserNotifEnabled}},watch:{soundEnabled(e){this.soundOn=!!e},browserNotifEnabled(e){this.browserNotifOn=!!e}},methods:{emit(e){this.$emit("action",e)},toggleSound(){this.soundOn=!this.soundOn,this.$emit("sound-toggle",this.soundOn)},toggleBrowserNotif(){this.browserNotifOn=!this.browserNotifOn,this.$emit("browser-notif-toggle",this.browserNotifOn)}}},Gh={class:"wm-mm"},Yh={class:"wm-mm__pop",role:"menu"},Jh={key:0,class:"wm-mm__section"},Xh={key:1,class:"wm-mm__sep"},Qh={class:"wm-mm__section"},Zh={class:"wm-mm__section"};function em(e,t,n,s,r,i){return p(),_("div",Gh,[u("div",{class:"wm-mm__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("div",Yh,[n.canRename||n.canExport?(p(),_("div",Jh,[n.canRename?(p(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[1]||(t[1]=o=>i.emit("rename"))},[...t[7]||(t[7]=[zn('<span class="wm-mm__icon" data-v-3a73911b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3a73911b><path d="M12 20h9" data-v-3a73911b></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-3a73911b></path></svg></span><span class="wm-mm__label" data-v-3a73911b>Modifier le titre</span>',2)])])):$("",!0),n.canExport?(p(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[2]||(t[2]=o=>i.emit("export"))},[...t[8]||(t[8]=[zn('<span class="wm-mm__icon" data-v-3a73911b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3a73911b><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-3a73911b></path></svg></span><span class="wm-mm__label" data-v-3a73911b>Exporter la transcription</span><span class="wm-mm__hint" data-v-3a73911b>.txt</span>',3)])])):$("",!0)])):$("",!0),n.canRename||n.canExport?(p(),_("div",Xh)):$("",!0),u("div",Qh,[u("button",{type:"button",class:"wm-mm__item",onClick:t[3]||(t[3]=(...o)=>i.toggleSound&&i.toggleSound(...o))},[t[10]||(t[10]=zn('<span class="wm-mm__icon" data-v-3a73911b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3a73911b><path d="M11 5L6 9H2v6h4l5 4V5z" data-v-3a73911b></path><path d="M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" data-v-3a73911b></path></svg></span><span class="wm-mm__label" data-v-3a73911b>Son</span>',2)),u("span",{class:ne(["wm-mm__toggle",{"wm-mm__toggle--on":r.soundOn}])},[...t[9]||(t[9]=[u("span",{class:"wm-mm__knob"},null,-1)])],2)]),u("button",{type:"button",class:"wm-mm__item",onClick:t[4]||(t[4]=(...o)=>i.toggleBrowserNotif&&i.toggleBrowserNotif(...o))},[t[12]||(t[12]=u("span",{class:"wm-mm__icon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0"})])],-1)),t[13]||(t[13]=u("span",{class:"wm-mm__label"},"Notifications navigateur",-1)),u("span",{class:ne(["wm-mm__toggle",{"wm-mm__toggle--on":r.browserNotifOn}])},[...t[11]||(t[11]=[u("span",{class:"wm-mm__knob"},null,-1)])],2)])]),t[16]||(t[16]=u("div",{class:"wm-mm__sep"},null,-1)),u("div",Zh,[n.statusUrl?(p(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[5]||(t[5]=o=>i.emit("status"))},[...t[14]||(t[14]=[u("span",{class:"wm-mm__icon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2"})])],-1),u("span",{class:"wm-mm__label"},"Statut des services",-1)])])):$("",!0),n.helpUrl?(p(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[6]||(t[6]=o=>i.emit("help"))},[...t[15]||(t[15]=[u("span",{class:"wm-mm__icon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z"})])],-1),u("span",{class:"wm-mm__label"},"Centre d'aide",-1)])])):$("",!0)])])])}const tm=be(zh,[["render",em],["__scopeId","data-v-3a73911b"]]),nm={name:"WmRenameDialog",props:{title:{type:String,default:"Modifier le titre"},initialValue:{type:String,default:""},placeholder:{type:String,default:"Titre de la conversation"}},emits:["close","submit"],data(){return{value:this.initialValue||""}},computed:{canSubmit(){const e=(this.value||"").trim();return!!e&&e!==(this.initialValue||"").trim()}},mounted(){this.$nextTick(()=>{const e=this.$refs.input;if(e){e.focus();try{e.select()}catch{}}})},methods:{onSubmit(){this.canSubmit&&this.$emit("submit",this.value.trim())}}},sm={class:"wm-dialog"},rm={class:"wm-dialog__card",role:"dialog","aria-modal":"true"},im={class:"wm-dialog__head"},om={class:"wm-dialog__title"},am={class:"wm-dialog__body"},lm=["placeholder"],cm={class:"wm-dialog__actions"},um=["disabled"];function dm(e,t,n,s,r,i){return p(),_("div",sm,[u("div",{class:"wm-dialog__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("div",rm,[u("div",im,[u("div",om,P(n.title),1),u("button",{type:"button",class:"wm-dialog__close","aria-label":"Fermer",onClick:t[1]||(t[1]=o=>e.$emit("close"))},[...t[7]||(t[7]=[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])]),u("div",am,[ot(u("input",{ref:"input","onUpdate:modelValue":t[2]||(t[2]=o=>r.value=o),type:"text",class:"wm-dialog__input",placeholder:n.placeholder,maxlength:120,onKeydown:[t[3]||(t[3]=Jn(yt((...o)=>i.onSubmit&&i.onSubmit(...o),["prevent"]),["enter"])),t[4]||(t[4]=Jn(yt(o=>e.$emit("close"),["prevent"]),["esc"]))]},null,40,lm),[[Mt,r.value]])]),u("div",cm,[u("button",{type:"button",class:"wm-dialog__btn",onClick:t[5]||(t[5]=o=>e.$emit("close"))},"Annuler"),u("button",{type:"button",class:"wm-dialog__btn wm-dialog__btn--primary",disabled:!i.canSubmit,onClick:t[6]||(t[6]=(...o)=>i.onSubmit&&i.onSubmit(...o))},"Enregistrer",8,um)])])])}const fm=be(nm,[["render",dm],["__scopeId","data-v-4f4b37c9"]]),go="ww-messenger-tokens",hm={name:"Messenger",components:{Launcher:zc,Header:hu,Onboarding:Uu,MessageList:Ef,Composer:Yf,SuggestionChips:Zf,ApprovalCard:ch,FormCard:$h,Feedback:qh,MoreMenu:tm,RenameDialog:fm},mixins:[wc,Tc,Mc,Ec],provide(){return{signAttachmentFn:e=>{var t,n;return((n=(t=this.store)==null?void 0:t.signAttachment)==null?void 0:n.call(t,e))||null}}},props:{baseUrl:{type:String,default:lo},widgetId:{type:String,default:""},userId:{type:String,default:""},userHash:{type:String,default:""},customer:{type:Object,default:null},displayMode:{type:String,default:"floating"},devtools:{type:Boolean,default:!1}},data(){return{transport:null,store:null,isOpen:!1,draft:"",busy:!1,bootError:null,pendingAttachments:[],feedbackBusy:!1,feedbackDone:!1,convOpenedAt:0,moreOpen:!1,renameDialogOpen:!1,draftConv:null,activeConvId:null,showOnboarding:!1,dismissedPeeks:{},floatHeight:0,floatRO:null}},computed:{isEditor(){return!!this.devtools},isEmbedded(){return this.displayMode==="embedded"},error(){var e;return this.bootError||((e=this.s)==null?void 0:e.error)||null},canBoot(){return!!(this.baseUrl&&this.widgetId&&this.userId&&this.userHash)},s(){var e;return((e=this.store)==null?void 0:e.state)||null},ready(){var e;return!!((e=this.s)!=null&&e.ready)},allConversations(){var t;const e=(t=this.s)==null?void 0:t.conversations;return Array.isArray(e)?e:[]},drawerConversations(){var s;const e=this.readState,t=this.readBootTs,n=((s=this.s)==null?void 0:s.messagesByConv)||{};return this.allConversations.map(r=>{var A;const i=n[r.id]||[],o=Qn(r,i),a=e[r.id]||t||"",l=gc(i),f=!!o&&l!=="user"&&(!a||o>a);let c=0,g=null;for(let k=i.length-1;k>=0;k--){const D=i[k];if(D){if(((A=D.author)==null?void 0:A.type)==="user"||a&&D.created_at&&D.created_at<=a)break;!g&&D.author&&(g=D.author),c++}}return f&&c===0&&(c=1),{...r,_preview:_c(r,i),_unread:f,_unreadCount:c,_lastAuthor:g}})},unreadCount(){return this.drawerConversations.filter(e=>e._unread).length},openThreads(){var t;const e=((t=this.s)==null?void 0:t.messagesByConv)||{};return this.drawerConversations.filter(n=>n.status!=="resolved").map(n=>({id:n.id,title:n.name||"Nouvelle conversation",preview:n._preview||"Nouveau message",unread:!!n._unread,_ts:Qn(n,e[n.id]||[])})).sort((n,s)=>n._ts<s._ts?1:n._ts>s._ts?-1:0)},latestUnreads(){var n;const e=((n=this.s)==null?void 0:n.messagesByConv)||{},t=[];for(const s of this.drawerConversations){if(!s._unread)continue;const r=Qn(s,e[s.id]||[]),i=s._lastAuthor,o=!i||i.type==="agent_ia",a=(i==null?void 0:i.name)||(o?this.agentName:"")||"",l=(i==null?void 0:i.avatar_url)||(o?this.agentAvatarUrl:null);t.push({convId:s.id,preview:s._preview||"Vous avez un nouveau message",ts:r,count:s._unreadCount||1,senderName:a,senderAvatarUrl:l})}return t.sort((s,r)=>s.ts<r.ts?1:s.ts>r.ts?-1:0),t},launcherPeeks(){if(this.isOpen||this.isEmbedded)return[];const e=this.dismissedPeeks||{};return this.latestUnreads.filter(t=>e[t.convId]!==t.ts)},isViewingThread(){return(this.isOpen||this.isEmbedded)&&!!this.currentConv},currentConv(){if(this.draftConv)return this.draftConv;if(this.showOnboarding)return null;const e=this.allConversations;if(!e.length)return null;if(this.activeConvId!=null){const t=e.find(n=>n.id===this.activeConvId);if(t)return t}return e[0]||null},canBack(){return!!this.currentConv},statusUrl(){var n;const e=(n=this.widget)==null?void 0:n.quick_links;if(!Array.isArray(e))return"";const t=e.find(s=>s.icon==="status"&&s.url);return(t==null?void 0:t.url)||""},helpUrl(){var n;const e=(n=this.widget)==null?void 0:n.quick_links;if(!Array.isArray(e))return"";const t=e.find(s=>(s.icon==="chat"||s.icon==="help")&&s.url);return(t==null?void 0:t.url)||""},widget(){var e,t;return((t=(e=this.s)==null?void 0:e.config)==null?void 0:t.widget)||null},widgetWelcomeMessage(){var e;return((e=this.widget)==null?void 0:e.welcome_message)||""},agentName(){var e,t,n;return((n=(t=(e=this.s)==null?void 0:e.config)==null?void 0:t.agent)==null?void 0:n.name)||""},agentAvatarUrl(){var e,t,n;return((n=(t=(e=this.s)==null?void 0:e.config)==null?void 0:t.agent)==null?void 0:n.avatar_url)||null},quickLinks(){var t;const e=(t=this.widget)==null?void 0:t.quick_links;return Array.isArray(e)?e:[]},teamMembers(){var t;const e=(t=this.widget)==null?void 0:t.team_members;return Array.isArray(e)?e:[]},responseLabel(){var e;return((e=this.widget)==null?void 0:e.response_time_label)||""},humanMessageAuthor(){var t,n,s;if(!this.currentConv)return null;const e=((t=this.s.messagesByConv)==null?void 0:t[this.currentConv.id])||[];for(let r=e.length-1;r>=0;r--)if(((s=(n=e[r])==null?void 0:n.author)==null?void 0:s.type)==="agent_human")return e[r].author;return null},humanAgentName(){var e;return((e=this.humanMessageAuthor)==null?void 0:e.name)||""},humanAgentAvatarUrl(){var e;return((e=this.humanMessageAuthor)==null?void 0:e.avatar_url)||null},isEscalated(){return!!this.humanMessageAuthor},isWaitingHuman(){var t;const e=(t=this.currentConv)==null?void 0:t.status;return e==="waiting"||e==="handled"},headerTitle(){var e,t;return((e=this.currentConv)==null?void 0:e.name)||((t=this.widget)==null?void 0:t.name)||"Nouvelle conversation"},composerPlaceholder(){return this.isEscalated&&this.humanAgentName?`Répondre à ${this.humanAgentName.split(" ")[0]}…`:this.isWaitingHuman?"Un agent prend le relais…":"Écrivez votre message…"},displayedMessages(){const e=this.currentConv;if(!e)return[];const t=this.revealedAt;return(this.s.messagesByConv[e.id]||[]).filter(n=>{var s,r,i,o,a;return(n==null?void 0:n.type)==="action"&&((s=n==null?void 0:n.payload)==null?void 0:s.state)==="pending"||Xn(n)&&!(t[n.id]>0)?!1:(n==null?void 0:n.type)==="action"||(n==null?void 0:n.type)==="system"||((r=n==null?void 0:n.payload)==null?void 0:r.type)==="system"||Array.isArray((i=n==null?void 0:n.payload)==null?void 0:i.attachments)&&n.payload.attachments.length||(o=n==null?void 0:n.metadata)!=null&&o.artifact||(a=n==null?void 0:n.metadata)!=null&&a.form?!0:typeof(n==null?void 0:n.text_md)=="string"&&n.text_md.trim().length>0})},streamingActive(){var n,s,r;const e=this.currentConv;return e?Object.keys(((n=this.s)==null?void 0:n.streamingByMsgId)||{}).length>0?!0:this.actionInFlight?!1:(((r=(s=this.s)==null?void 0:s.messagesByConv)==null?void 0:r[e.id])||[]).some(i=>Xn(i)&&!(this.revealedAt[i.id]>0)):!1},currentConvMessages(){var t,n,s;const e=(t=this.currentConv)==null?void 0:t.id;return e?((s=(n=this.s)==null?void 0:n.messagesByConv)==null?void 0:s[e])||[]:[]},pendingApproval(){return!this.currentConv||!this.store||this.actionInFlight?null:this.store.getPendingApproval(this.currentConv.id)},approvalReady(){return this.pendingApproval?this.pendingApproval.id===this.approvalLatchId?!0:!(this.streamingActive||!this.approvalSettled):!1},approvalTitle(){var e,t,n;return((t=(e=this.pendingApproval)==null?void 0:e.payload)==null?void 0:t.name)||((n=this.pendingApproval)==null?void 0:n.text_md)||"Confirmer l'action"},approvalDetail(){var s,r,i,o,a,l;const e=(i=(r=(s=this.pendingApproval)==null?void 0:s.payload)==null?void 0:r.pending)==null?void 0:i.user_explanation;if(typeof e=="string"&&e.trim())return e.trim();const t=(l=(a=(o=this.pendingApproval)==null?void 0:o.payload)==null?void 0:a.pending)==null?void 0:l.prepared_params;if(!t||typeof t!="object")return"";const n=Object.entries(t);return n.length?n.slice(0,2).map(([f,c])=>`${f}: ${c}`).join(" · "):""},actionInFlight(){var e,t;return!this.currentConv||!this.store?null:((t=(e=this.store).getActionInFlight)==null?void 0:t.call(e,this.currentConv.id))||null},actionInFlightName(){var t;const e=this.actionInFlight;return e?((t=e.payload)==null?void 0:t.name)||e.text_md||"Action":""},suggestions(){return!this.currentConv||!this.store?[]:this.streamingActive?[]:this.pendingForm?[]:this.store.getLatestSuggestions(this.currentConv.id)},pendingForm(){var e,t;return!this.currentConv||!this.store||this.pendingApproval||this.actionInFlight||this.streamingActive||!this.approvalSettled?null:((t=(e=this.store).getLatestForm)==null?void 0:t.call(e,this.currentConv.id))||null},showFeedback(){var t;const e=this.currentConv;return e?this.feedbackDone?!0:e.status!=="resolved"?!1:!((t=e.metadata)!=null&&t.feedback):!1},floatVisible(){return this.approvalReady||!!this.pendingForm||this.showFeedback||this.suggestions.length>0},dateLabel(){var n,s,r;const e=this.currentConv;let t=new Date;if(e){const o=((r=(((s=(n=this.s)==null?void 0:n.messagesByConv)==null?void 0:s[e.id])||[]).find(a=>a==null?void 0:a.created_at))==null?void 0:r.created_at)||e.created_at;if(o){const a=new Date(o);Number.isNaN(a.getTime())||(t=a)}}return`Aujourd'hui · ${ao(t)}`},paginationState(){var n,s,r;const e=(n=this.currentConv)==null?void 0:n.id,t=e?(r=(s=this.s)==null?void 0:s.paginationByConv)==null?void 0:r[e]:null;return{loading:!!(t!=null&&t.loading),hasMore:!!(t!=null&&t.nextCursor)}}},watch:{latestUnreads:{handler(e){const t=new Set(e.map(o=>o.convId)),n=this.dismissedPeeks||{},s=Object.keys(n);if(!s.length)return;const r={};let i=!1;for(const o of s)t.has(o)?r[o]=n[o]:i=!0;i&&(this.dismissedPeeks=r)},deep:!0},"currentConv.id":{handler(e){this.resetRevealQueue(),this.convOpenedAt=Date.now(),this.moreOpen=!1,this.renameDialogOpen=!1,this.resetApprovalPacing(),this.isViewingThread&&(this.unreadAnchorTs=e&&this.readState[e]||"",this.unreadBoundaryTs=e?new Date().toISOString():"")},immediate:!0},isViewingThread(e,t){var n;if(e&&!t){const s=(n=this.currentConv)==null?void 0:n.id;this.unreadAnchorTs=s&&this.readState[s]||"",this.unreadBoundaryTs=s?new Date().toISOString():""}else e||(this.unreadAnchorTs="",this.unreadBoundaryTs="")},pendingApproval:{handler(e,t){if(e&&!t){const n=e!=null&&e.created_at?Date.parse(e.created_at):NaN;if(!(Number.isFinite(n)&&n>=this.convOpenedAt)){this.resetApprovalPacing();return}this.bumpApprovalSettle(2600)}else!e&&t&&this.resetApprovalPacing()},immediate:!1},streamingActive(e,t){e!==t&&this.pendingApproval&&this.pendingApproval.id!==this.approvalLatchId&&this.bumpApprovalSettle()},approvalReady(e){e&&this.pendingApproval&&(this.approvalLatchId=this.pendingApproval.id)},floatVisible:{handler(e){this.$nextTick(()=>this.syncFloatObserver(e))},immediate:!0},currentConvMessages(e){this.paceMessages(e),(this.isOpen||this.isEmbedded)&&this.currentConv&&this.markConvRead(this.currentConv)}},async mounted(){if(typeof document<"u"&&!document.getElementById(go)){const e=document.createElement("style");e.id=go,e.textContent=hc,document.head.appendChild(e)}this.hydrateReadState(),await this.boot(),this.isEmbedded&&this.store&&await this.open()},beforeUnmount(){this.cancelReveals(),this.disconnectFloatRO(),this.resetApprovalPacing(),this.teardownNotifications(),this.store&&this.store.destroy()},methods:{async boot(){if(!this.canBoot){console.warn("[messenger] boot skipped — missing creds");return}try{this.transport=ws(lc({baseUrl:this.baseUrl,widgetId:this.widgetId,userId:this.userId,userHash:this.userHash})),this.store=ws(fc(this.transport)),this.hydrateNotifPref(),this.setupNotifications(),await this.store.start(),this.customer&&typeof this.customer=="object"&&await this.store.applyCustomer(this.customer)}catch(e){console.error("[ww-messenger] bootstrap failed",e),this.bootError=(e==null?void 0:e.message)||String(e)}},async refresh(){this.store&&this.store.destroy(),this.cancelReveals(),this.teardownNotifications(),this.convOpenedAt=0,this.transport=null,this.store=null,this.isOpen=!1,this.draft="",this.busy=!1,this.bootError=null,this.pendingAttachments=[],this.feedbackBusy=!1,this.feedbackDone=!1,this.moreOpen=!1,this.renameDialogOpen=!1,this.draftConv=null,this.activeConvId=null,this.showOnboarding=!1,await this.boot(),this.isEmbedded&&this.store&&await this.open()},syncFloatObserver(e){if(this.disconnectFloatRO(),!e){this.floatHeight=0;return}const t=this.$refs.floatEl;if(t){if(typeof ResizeObserver>"u"){this.floatHeight=Math.ceil(t.getBoundingClientRect().height+8);return}this.floatRO=new ResizeObserver(n=>{const s=n[0];if(!s)return;const r=Math.ceil(s.contentRect.height+8);r!==this.floatHeight&&(this.floatHeight=r,this.$nextTick(()=>{var i,o;(o=(i=this.$refs.messageList)==null?void 0:i.scrollToBottom)==null||o.call(i)}))}),this.floatRO.observe(t)}},disconnectFloatRO(){if(this.floatRO){try{this.floatRO.disconnect()}catch{}this.floatRO=null}},async open(){this.isOpen=!0,this.store&&this.store.setPanelOpen(!0);const e=this.currentConv;if(e&&!e._draft){this.activeConvId==null&&(this.activeConvId=e.id);try{await this.store.openConversation(e.id)}catch(t){console.error("[ww-messenger] load messages failed",t)}this.markConvRead(e)}},close(){this.isOpen=!1,this.store&&this.store.setPanelOpen(!1)},async openFromPeek(e){var n,s;const t=e||((n=this.latestUnreads[0])==null?void 0:n.convId);t&&t!==((s=this.currentConv)==null?void 0:s.id)&&(this.draftConv=null,this.activeConvId=t,this.showOnboarding=!1),await this.open()},dismissPeek(e){const t=this.latestUnreads.find(n=>n.convId===e);t&&(this.dismissedPeeks={...this.dismissedPeeks,[e]:t.ts})},startConv(){this.draftConv={id:"__draft__",_draft:!0,name:"",created_at:new Date().toISOString()},this.activeConvId=null,this.showOnboarding=!1,this.focusComposer()},async ensureRealConv(){const e=this.currentConv;if(!e)return null;if(!e._draft)return e;if(this.busy)return null;this.busy=!0;try{const t=await this.store.createConversation({});return this.draftConv=null,this.activeConvId=t.id,await this.store.openConversation(t.id),this.markConvRead(t),t}catch(t){return console.error("[ww-messenger] create conv failed",t),this.bootError=(t==null?void 0:t.message)||String(t),null}finally{this.busy=!1}},focusComposer(){this.$nextTick(()=>{var e;return(e=this.$refs.composer)==null?void 0:e.focus()})},toggleMore(){this.moreOpen=!this.moreOpen},goHome(){this.moreOpen=!1,this.draftConv=null,this.activeConvId=null,this.showOnboarding=!0},async onDrawerPick(e){if(!(e!=null&&e.id)||!this.store)return;this.draftConv=null,this.activeConvId=e.id,this.showOnboarding=!1;try{await this.store.openConversation(e.id)}catch(n){console.error("[ww-messenger] open conv failed",n)}const t=this.allConversations.find(n=>n.id===e.id);t&&this.markConvRead(t)},async onMoreAction(e){var t,n;switch(this.moreOpen=!1,e){case"rename":this.openRenameDialog();break;case"export":bc(this.currentConv,this.currentConv?(n=(t=this.s)==null?void 0:t.messagesByConv)==null?void 0:n[this.currentConv.id]:[]);break;case"status":if(this.statusUrl)try{window.open(this.statusUrl,"_blank","noopener")}catch{}break;case"help":if(this.helpUrl)try{window.open(this.helpUrl,"_blank","noopener")}catch{}break}},openRenameDialog(){const e=this.currentConv;!e||e._draft||(this.renameDialogOpen=!0)},async onRenameSubmit(e){const t=this.currentConv;if(this.renameDialogOpen=!1,!t||t._draft||!this.store)return;const n=(e||"").trim();if(!(!n||n===t.name))try{await this.store.patchConversation(t.id,{name:n})}catch(s){console.error("[ww-messenger] rename failed",s)}},async onSend(e){let t=this.currentConv;if(!t&&(this.startConv(),t=this.currentConv,!t)||t._draft&&(t=await this.ensureRealConv(),!t))return;const n=t.id,s=this.pendingAttachments.slice();this.pendingAttachments=[],this.unreadAnchorTs="",this.unreadBoundaryTs="",await this.store.send(n,e,{attachments:s.length?s:void 0})},async onSuggestion(e){const t=e==null?void 0:e.label;t&&await this.onSend(t)},async onLoadMore(){var t;const e=(t=this.currentConv)==null?void 0:t.id;!e||!this.store||await this.store.loadMore(e)},async onApprovalCallback(e){const t=this.pendingApproval;t&&await this.store.clickCallback(t.id,e)},async onFormSubmit({values:e}){const t=this.pendingForm;if(!(t!=null&&t.form))return;const n=mc(t.form,e);if(!n)return;let s=this.currentConv;s&&(s._draft&&(s=await this.ensureRealConv(),!s)||await this.store.send(s.id,n,{metadata:{artifact:pc(t.form,e)}}))},async onAttach(e){if(!(!e||!this.transport))try{const t=await this.transport.uploadAttachment(e);this.pendingAttachments.push({type:t.type||"file",path:t.path,name:e.name||"fichier",mime_type:e.type,size_bytes:e.size})}catch(t){console.error("[ww-messenger] attachment upload failed",t)}},async onQuickLink(e){if(e){if(e.url){try{window.open(e.url,"_blank","noopener")}catch{}return}this.currentConv||this.startConv(),await this.onSend(e.label)}},async onFeedback({rating:e,comment:t}){if(this.currentConv){this.feedbackBusy=!0;try{await this.store.submitFeedback(this.currentConv.id,{rating:e,comment:t}),this.feedbackDone=!0}catch(n){console.error("[ww-messenger] feedback failed",n)}finally{this.feedbackBusy=!1}}}}},mm={key:0,class:"wm-loading","aria-busy":"true","aria-live":"polite"},pm={key:0,class:"wm-state"},gm={class:"wm-state__err"},_m={class:"wm-state__errSub"},ym={class:"wm-bottom"},vm={key:0,ref:"floatEl",class:"wm-float"},bm={key:1,class:"wm-actionWait",role:"status","aria-live":"polite"},wm={class:"wm-actionWait__lbl"},km={key:2,class:"wm-attached"},Cm=["onClick"];function Sm(e,t,n,s,r,i){const o=me("Launcher"),a=me("Header"),l=me("Onboarding"),f=me("MessageList"),c=me("ApprovalCard"),g=me("FormCard"),A=me("Feedback"),k=me("SuggestionChips"),D=me("Composer"),O=me("MoreMenu"),Y=me("RenameDialog");return p(),_("div",{class:ne(["wm-root",`wm-root--${n.displayMode}`])},[!r.isOpen&&!i.isEmbedded?(p(),pe(o,{key:0,"unread-count":i.unreadCount,peeks:i.launcherPeeks,onOpen:i.openFromPeek,onDismiss:i.dismissPeek},null,8,["unread-count","peeks","onOpen","onDismiss"])):$("",!0),r.isOpen||i.isEmbedded?(p(),_("section",{key:1,class:ne(["wm-panel",`wm-panel--${n.displayMode}`]),style:Pe(r.floatHeight?{"--wm-float-h":r.floatHeight+"px"}:null),role:"dialog","aria-label":"Messenger"},[!i.ready&&!i.error?(p(),_("div",mm,[i.isEmbedded?$("",!0):(p(),_("button",{key:0,type:"button",class:"wm-loading__close","aria-label":"Réduire",onClick:t[0]||(t[0]=(...W)=>i.close&&i.close(...W))},[...t[5]||(t[5]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])),t[6]||(t[6]=u("div",{class:"wm-loading__spinner","aria-hidden":"true"},null,-1))])):(p(),_(X,{key:1},[_e(a,{title:i.headerTitle,escalated:i.isEscalated,"agent-name":i.humanAgentName,"agent-avatar-url":i.humanAgentAvatarUrl,"team-members":i.teamMembers,"response-label":i.responseLabel,"show-identity":!!i.currentConv,"show-back":i.canBack,"show-close":!i.isEmbedded,"more-active":r.moreOpen,onBack:i.goHome,onMore:i.toggleMore,onClose:i.close},null,8,["title","escalated","agent-name","agent-avatar-url","team-members","response-label","show-identity","show-back","show-close","more-active","onBack","onMore","onClose"]),i.error?(p(),_("div",pm,[u("div",gm,[t[8]||(t[8]=u("div",{class:"wm-state__errIcon"},[u("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})])],-1)),u("div",null,[t[7]||(t[7]=u("div",{class:"wm-state__errTitle"},"Connexion impossible",-1)),u("div",_m,P(i.error),1)])])])):i.currentConv?(p(),_(X,{key:2},[_e(f,{ref:"messageList",messages:i.displayedMessages,"streaming-active":i.streamingActive,"date-label":i.dateLabel,"conversation-id":i.currentConv?i.currentConv.id:null,"loading-more":i.paginationState.loading,"has-more":i.paginationState.hasMore,"unread-anchor-ts":e.unreadAnchorTs,"unread-boundary-ts":e.unreadBoundaryTs,onLoadMore:i.onLoadMore},null,8,["messages","streaming-active","date-label","conversation-id","loading-more","has-more","unread-anchor-ts","unread-boundary-ts","onLoadMore"]),u("div",ym,[i.floatVisible?(p(),_("div",vm,[i.approvalReady?(p(),pe(c,{key:0,action:i.approvalTitle,detail:i.approvalDetail,callbacks:i.pendingApproval.callbacks,onCallback:i.onApprovalCallback},null,8,["action","detail","callbacks","onCallback"])):i.pendingForm?(p(),pe(g,{key:i.pendingForm.message&&i.pendingForm.message.id,form:i.pendingForm.form,onSubmit:i.onFormSubmit},null,8,["form","onSubmit"])):i.showFeedback?(p(),pe(A,{key:2,busy:r.feedbackBusy,done:r.feedbackDone,onSubmit:i.onFeedback},null,8,["busy","done","onSubmit"])):(p(),pe(k,{key:3,items:i.suggestions,onSelect:i.onSuggestion},null,8,["items","onSelect"]))],512)):$("",!0),i.actionInFlight?(p(),_("div",bm,[t[9]||(t[9]=u("span",{class:"wm-actionWait__spinner","aria-hidden":"true"},null,-1)),u("span",wm,P(i.actionInFlightName)+" en cours, veuillez patienter…",1)])):(p(),pe(D,{key:2,ref:"composer",modelValue:r.draft,"onUpdate:modelValue":t[1]||(t[1]=W=>r.draft=W),placeholder:i.composerPlaceholder,disabled:!!i.pendingApproval,"attach-label":"Joindre un fichier",onSend:i.onSend,onAttach:i.onAttach},null,8,["modelValue","placeholder","disabled","onSend","onAttach"]))]),r.moreOpen?(p(),pe(O,{key:0,"can-rename":!!i.currentConv&&!i.currentConv._draft,"can-export":!!i.currentConv&&!i.currentConv._draft,"sound-enabled":e.soundEnabled,"browser-notif-enabled":e.browserNotifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[2]||(t[2]=W=>r.moreOpen=!1),onSoundToggle:e.onSoundToggle,onBrowserNotifToggle:e.onBrowserNotifToggle,onAction:i.onMoreAction},null,8,["can-rename","can-export","sound-enabled","browser-notif-enabled","status-url","help-url","onSoundToggle","onBrowserNotifToggle","onAction"])):$("",!0),r.renameDialogOpen&&i.currentConv&&!i.currentConv._draft?(p(),pe(Y,{key:1,"initial-value":i.currentConv.name||"",title:"Modifier le titre de la conversation",onClose:t[3]||(t[3]=W=>r.renameDialogOpen=!1),onSubmit:i.onRenameSubmit},null,8,["initial-value","onSubmit"])):$("",!0),r.pendingAttachments.length?(p(),_("div",km,[(p(!0),_(X,null,Ae(r.pendingAttachments,(W,V)=>(p(),_("div",{key:V,class:"wm-attached__chip"},[t[11]||(t[11]=u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})],-1)),u("span",null,P(W.name),1),u("button",{type:"button","aria-label":"Retirer",onClick:J=>r.pendingAttachments.splice(V,1)},[...t[10]||(t[10]=[u("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])],8,Cm)]))),128))])):$("",!0)],64)):(p(),pe(l,{key:1,"welcome-message":i.widgetWelcomeMessage,"agent-name":i.agentName,"quick-links":i.quickLinks,"open-threads":i.openThreads,busy:r.busy,onStart:i.startConv,onSelect:i.onQuickLink,onResume:i.onDrawerPick},null,8,["welcome-message","agent-name","quick-links","open-threads","busy","onStart","onSelect","onResume"])),r.moreOpen&&!i.currentConv?(p(),pe(O,{key:3,"can-rename":!1,"can-export":!1,"sound-enabled":e.soundEnabled,"browser-notif-enabled":e.browserNotifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[4]||(t[4]=W=>r.moreOpen=!1),onSoundToggle:e.onSoundToggle,onBrowserNotifToggle:e.onBrowserNotifToggle,onAction:i.onMoreAction},null,8,["sound-enabled","browser-notif-enabled","status-url","help-url","onSoundToggle","onBrowserNotifToggle","onAction"])):$("",!0)],64))],6)):$("",!0)],2)}const Am=be(hm,[["render",Sm],["__scopeId","data-v-757cb387"]]),xm="0.3.9";let vt=null,Et=null,Ks="";function Tm(e){if(e instanceof Element)return e;if(typeof e=="string"){const n=document.querySelector(e);if(n)return n}const t=document.createElement("div");return t.setAttribute("data-messenger-root",""),document.body.appendChild(t),t}function Mm(e){return{baseUrl:String(e.baseUrl||lo).trim(),widgetId:String(e.widgetId||"").trim(),userId:String(e.userId||"").trim(),userHash:String(e.userHash||"").trim(),displayMode:e.displayMode||"floating",devtools:!!e.devtools,target:e.target||null,customer:e.customer&&typeof e.customer=="object"?e.customer:null}}function Em(e={}){const t=Mm(e);if(!t.baseUrl||!t.widgetId||!t.userId||!t.userHash)return Ws(),null;const n=JSON.stringify({...t,target:typeof t.target=="string"?t.target:!!t.target});return vt&&n===Ks||(Ws(),Et=Tm(t.target),vt=tc(Am,{baseUrl:t.baseUrl,widgetId:t.widgetId,userId:t.userId,userHash:t.userHash,displayMode:t.displayMode,devtools:t.devtools,customer:t.customer}),vt.mount(Et),Ks=n),vt}function Ws(){if(vt){try{vt.unmount()}catch{}vt=null}Et&&Et.hasAttribute&&Et.hasAttribute("data-messenger-root")&&Et.remove(),Et=null,Ks=""}return Ht.destroy=Ws,Ht.init=Em,Ht.version=xm,Object.defineProperty(Ht,Symbol.toStringTag,{value:"Module"}),Ht}({});
75
+ `)}</code></pre>`});continue}if(/^\s*[-*]\s+/.test(i)){const f=[];for(;s<t.length;){const g=/^\s*[-*]\s+(.*)$/.exec(t[s]);if(!g)break;f.push(g[1]),s++}const c=f.map(g=>`<li>${es(g)}</li>`).join("");n.push({type:"block",html:`<ul class="wm-md-ul">${c}</ul>`});continue}const a=/^\s*(\d+)\.\s+(.*)$/.exec(i);if(a){const f=parseInt(a[1],10),c=[a[2]];for(s++;s<t.length;){const k=/^\s*\d+\.\s+(.*)$/.exec(t[s]);if(!k)break;c.push(k[1]),s++}const g=c.map(k=>`<li>${es(k)}</li>`).join(""),S=f!==1?` start="${f}"`:"";n.push({type:"block",html:`<ol class="wm-md-ol"${S}>${g}</ol>`});continue}const l=/^(#{1,6})\s+(.*)$/.exec(i);if(l){const f=l[1].length;n.push({type:"block",html:`<h${f} class="wm-md-h wm-md-h${f}">${es(l[2])}</h${f}>`}),s++;continue}n.push({type:"text",html:es(i)}),s++}let r="";for(let i=0;i<n.length;i++){const o=n[i];r+=o.html;const a=n[i+1];a&&o.type!=="block"&&a.type!=="block"&&(r+=`
76
+ `)}return r}const sf={name:"WmBubble",props:{role:{type:String,default:"ai"},text:{type:String,default:""}},computed:{rendered(){return nf(this.text)}}},rf=["innerHTML"];function of(e,t,n,s,r,i){return m(),_("div",{class:se(["wm-bubble","wm-bubble--"+n.role])},[La(e.$slots,"default",{},()=>[u("span",{innerHTML:i.rendered},null,8,rf)])],2)}const af=ve(sf,[["render",of],["__scopeId","data-v-5c9e9f2b"]]),lf={name:"WmTyping"},cf={class:"wm-typing"};function uf(e,t,n,s,r,i){return m(),_("div",cf,[...t[0]||(t[0]=[u("span",{style:{"animation-delay":"0s"}},null,-1),u("span",{style:{"animation-delay":"0.2s"}},null,-1),u("span",{style:{"animation-delay":"0.4s"}},null,-1)])])}const df=ve(lf,[["render",uf],["__scopeId","data-v-df2447fd"]]);function gn(e){return e?e.client_msg_id||e.id:""}const ff={transferred_to_human:"Conversation transférée à un humain",assigned:"{name} a rejoint la conversation",unassigned:"L'agent a quitté la conversation",resolved:"Conversation résolue",reopened:"Conversation rouverte",idle:"Conversation en pause"},hf=80,mf=200,pf={name:"WmMessageList",components:{AIAvatar:pn,HumanAvatar:Hs,Bubble:af,Typing:df,ActionResult:nd,AttachmentPreview:Zd,ArtifactRenderer:Ud},props:{messages:{type:Array,default:()=>[]},streamingActive:{type:Boolean,default:!1},dateLabel:{type:String,default:""},conversationId:{type:[String,Number],default:null},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},unreadAnchorId:{type:Number,default:null},unreadBoundaryTs:{type:String,default:""}},emits:["load-more"],data(){return{silentFades:!1,widthByKey:Object.freeze({})}},computed:{historyExhausted(){return!this.hasMore&&!this.loadingMore&&this.messages.length>=20},groups(){var n,s,r,i;const e=[];for(const o of this.messages){const a=this.roleOf(o);if(a==="system"){if(((n=o==null?void 0:o.payload)==null?void 0:n.event)==="action_admin_pending"){const c=e[e.length-1];c&&c.role==="ai"?c.messages.push(o):e.push({key:`g-${gn(o)}`,role:"ai",agentName:"",agentAvatarUrl:null,messages:[o],items:[]});continue}e.push({key:`sys-${gn(o)}`,role:a,messages:[o],items:[],systemLabel:this.systemLabel(o)});continue}const l=e[e.length-1];l&&l.role===a&&(a==="ai"||l.agentName===(((s=o==null?void 0:o.author)==null?void 0:s.name)||""))?l.messages.push(o):e.push({key:`g-${gn(o)}`,role:a,agentName:((r=o==null?void 0:o.author)==null?void 0:r.name)||"",agentAvatarUrl:((i=o==null?void 0:o.author)==null?void 0:i.avatar_url)||null,messages:[o],items:[]})}for(const o of e){if(o.role==="system")continue;const a=[];for(const l of o.messages)for(const f of this.itemsOf(l))a.push(f);o.items=a}const t=[];for(const o of e){if(o.role!=="system"&&!o.items.length)continue;const a=t[t.length-1];if(a&&a.role!=="system"&&a.role===o.role&&(o.role==="ai"||a.agentName===o.agentName)){a.messages.push(...o.messages),a.items.push(...o.items);continue}t.push(o)}return t},unreadGroupKey(){if(this.unreadAnchorId==null)return null;const e=this.unreadAnchorId,t=this.unreadBoundaryTs;for(const n of this.groups){if(n.role==="user"||n.role==="system"||!n.items.length)continue;const s=n.messages[0];if(!s)continue;const r=bt(s.id);if(r!=null&&!(r<=e)&&!(t&&s.created_at&&s.created_at>t))return n.key}return null}},watch:{messages:{handler:"snapshotAndRestore",deep:!0},loadingMore(e){e||(this._pendingLoadMore=!1),this.silentFades=!0,clearTimeout(this._silenceTimer),e||(this._silenceTimer=setTimeout(()=>{this.silentFades=!1},250)),this.snapshotAndRestore()},streamingActive:"snapshotAndRestore"},mounted(){this._lastSeenConvId=this.conversationId,this.scrollToBottom(),this._measureFrame=null,this._ro=new ResizeObserver(()=>this.scheduleMeasure()),this.$refs.scrollEl&&this._ro.observe(this.$refs.scrollEl),this.$nextTick(()=>this.measureRows())},beforeUnmount(){var e;(e=this._ro)==null||e.disconnect(),this._measureFrame&&cancelAnimationFrame(this._measureFrame),clearTimeout(this._silenceTimer)},updated(){this.scheduleMeasure()},methods:{messageKey:gn,isAtBottom(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=hf},onScroll(){const e=this.$refs.scrollEl;e&&(this.loadingMore||!this.hasMore||this._pendingLoadMore||e.scrollTop<=mf&&(this._pendingLoadMore=!0,this.$emit("load-more")))},snapshotAndRestore(){const e=this.$refs.scrollEl;if(!e||this._scrollSnap)return;const t=this._lastSeenConvId!==this.conversationId;this._lastSeenConvId=this.conversationId;const n=this.isAtBottom(e);let s=null;if(!t&&!n){const i=this.pickAnchor(e);if(i!=null&&i.el){const o=e.getBoundingClientRect().top;s={el:i.el,relY:i.el.getBoundingClientRect().top-o}}}const r={forceBottom:t,wasPinned:n,anchor:s};this._scrollSnap=r,this.$nextTick(()=>{if(this._scrollSnap=null,r.forceBottom||r.wasPinned){e.scrollTop=e.scrollHeight;return}if(!r.anchor)return;const i=()=>{var f;const o=r.anchor;if(!((f=o.el)!=null&&f.isConnected))return;const l=o.el.getBoundingClientRect().top-e.getBoundingClientRect().top-o.relY;Math.abs(l)>.5&&(e.scrollTop+=l)};i(),requestAnimationFrame(()=>{i(),requestAnimationFrame(i)})})},pickAnchor(e){const t=e.scrollTop;let n=null;for(const s of e.children)if(s.classList.contains("wm-list__group")&&(n||(n=s),s.offsetTop+s.offsetHeight>=t))return{el:s,offsetTop:s.offsetTop};return n?{el:n,offsetTop:n.offsetTop}:null},roleOf(e){var n,s;if((e==null?void 0:e.type)==="system"||((n=e==null?void 0:e.payload)==null?void 0:n.type)==="system")return"system";const t=(s=e==null?void 0:e.author)==null?void 0:s.type;return t==="user"?"user":t==="agent_human"?"human":"ai"},roleLabel(e){return e.role==="human"?e.agentName||"Agent":"Assistant IA"},itemsOf(e){var t;if(!e)return[];if(e.type==="system"&&((t=e==null?void 0:e.payload)==null?void 0:t.event)==="action_admin_pending")return[{message:e,partKey:"main",renderAs:"admin-pending",kind:{top:"bubble",bottom:"bubble"}}];if(e.type==="action"&&e.payload&&e.payload.state!=="pending"){const n=[{message:e,partKey:"main",renderAs:"action",kind:{top:"bubble",bottom:"bubble"}}];return this.actionArtifact(e)&&n.push({message:e,partKey:"artifact",renderAs:"artifact-of-action",kind:{top:"card",bottom:"card"}}),n}return this.artifactOf(e)?[{message:e,partKey:"main",renderAs:"artifact",kind:{top:"card",bottom:"card"}}]:e.text_md||this.attachmentsOf(e).length?[{message:e,partKey:"main",renderAs:"bubble",kind:{top:"bubble",bottom:"bubble"}}]:[]},cornersFor(e,t){var j,te,le;const n=e.items,s=(j=n[t])==null?void 0:j.kind,r=(te=n[t-1])==null?void 0:te.kind,i=(le=n[t+1])==null?void 0:le.kind,o=e.role==="user",a=14,l=4,f=r==null?void 0:r.bottom,c=i==null?void 0:i.top,g=this.widthByKey[this.rowKeyOf(e,t)],S=this.widthByKey[this.rowKeyOf(e,t-1)],k=this.widthByKey[this.rowKeyOf(e,t+1)],V=.5,I=(we,be,q)=>we!=null&&g!=null?we+V>=g:be===q||be==="card"&&q==="bubble";let J=a,z=a,K=a,X=a;return o?(f&&(z=l),(c||!i)&&(K=l),f&&I(S,f,s==null?void 0:s.top)&&(J=l),c&&I(k,c,s==null?void 0:s.bottom)&&(X=l)):(f&&(J=l),(c||!i)&&(X=l),f&&I(S,f,s==null?void 0:s.top)&&(z=l),c&&I(k,c,s==null?void 0:s.bottom)&&(K=l)),{tl:J,tr:z,br:K,bl:X}},cornersStyle(e,t){if(e.items.length<2)return null;const n=this.cornersFor(e,t);return{"--wm-r-tl":`${n.tl}px`,"--wm-r-tr":`${n.tr}px`,"--wm-r-br":`${n.br}px`,"--wm-r-bl":`${n.bl}px`}},rowKeyOf(e,t){var s;const n=(s=e==null?void 0:e.items)==null?void 0:s[t];return n?`${gn(n.message)}-${n.partKey}`:""},scheduleMeasure(){this._measureFrame||(this._measureFrame=requestAnimationFrame(()=>{this._measureFrame=null,this.measureRows()}))},measureRows(){const e=this.$refs.scrollEl;if(!e)return;const t={};for(const i of e.querySelectorAll(".wm-list__row[data-row-key]")){const o=i.dataset.rowKey;if(!o)continue;const a=i.querySelector(".wm-bubble, .wm-result, .wm-art, .wm-list__body");if(!a)continue;const l=a.getBoundingClientRect().width;l>0&&(t[o]=l)}const n=this.widthByKey,s=Object.keys(n),r=Object.keys(t);if(s.length===r.length){let i=!0;for(const o of r)if(Math.abs((n[o]??0)-t[o])>.5){i=!1;break}if(i)return}this.widthByKey=Object.freeze(t)},lastTimeOf(e){const t=e.items[e.items.length-1],n=(t==null?void 0:t.message)||e.messages[e.messages.length-1];if(!(n!=null&&n.created_at))return"";try{return lo(new Date(n.created_at))}catch{return""}},hasTrailingOverlay(e){if(!e.messages.length)return!1;const t=e.messages[e.messages.length-1],n=e.items[e.items.length-1];return!!t&&(n==null?void 0:n.message)!==t},attachmentsOf(e){var n;const t=(n=e==null?void 0:e.payload)==null?void 0:n.attachments;return Array.isArray(t)?t:[]},artifactOf(e){var n;const t=(n=e==null?void 0:e.metadata)==null?void 0:n.artifact;return!t||typeof t!="object"||typeof t.kind!="string"?null:t},actionLabel(e){var t;return((t=e==null?void 0:e.payload)==null?void 0:t.name)||(e==null?void 0:e.text_md)||"Action"},actionDetail(e){var n,s,r,i,o,a;const t=e==null?void 0:e.payload;return t?t.state==="success"?((n=t.success)==null?void 0:n.summary)||((r=(s=t.success)==null?void 0:s.metadata)==null?void 0:r.description)||"":t.state==="rejected"?((i=t.rejected)==null?void 0:i.reason)||"Action annulée par l'utilisateur.":t.state==="failure"&&(((o=t.failure)==null?void 0:o.summary)||((a=t.failure)==null?void 0:a.error))||"":""},actionArtifact(e){var n,s;const t=(s=(n=e==null?void 0:e.payload)==null?void 0:n.success)==null?void 0:s.artifact;return!t||typeof t!="object"||typeof t.kind!="string"?null:t},systemLabel(e){var r,i,o;const t=(r=e==null?void 0:e.payload)==null?void 0:r.event,n=ff[t]||(e==null?void 0:e.text_md)||"Mise à jour de la conversation",s=((i=e==null?void 0:e.metadata)==null?void 0:i.agent_name)||((o=e==null?void 0:e.author)==null?void 0:o.name)||"";return n.replace("{name}",s||"Un agent")},scrollToBottom(){const e=this.$refs.scrollEl;e&&(e.scrollTop=e.scrollHeight)}}},gf={key:0,class:"wm-list__loadMore",role:"status","aria-live":"polite"},_f={key:1,class:"wm-list__historyEnd"},yf={key:2,class:"wm-list__sep"},vf={class:"wm-list__sep-label"},bf={key:0,class:"wm-list__sep wm-list__sep--unread"},wf={key:0,class:"wm-list__sysep"},kf={class:"wm-list__sysep-label"},Cf=["data-row-key"],Af={key:0,class:"wm-list__avatarSlot"},Sf={key:5,class:"wm-list__body"},xf={key:0},Tf={key:1,"aria-hidden":"true"},Mf={key:2},Ef={key:3,class:"wm-list__row wm-list__row--ai fade-up"},Of={class:"wm-list__avatarSlot"};function If(e,t,n,s,r,i){const o=ge("AIAvatar"),a=ge("HumanAvatar"),l=ge("ActionResult"),f=ge("ArtifactRenderer"),c=ge("Bubble"),g=ge("AttachmentPreview"),S=ge("Typing");return m(),_("div",{ref:"scrollEl",class:se(["wm-list",{"wm-list--silent":r.silentFades}]),onScrollPassive:t[0]||(t[0]=(...k)=>i.onScroll&&i.onScroll(...k))},[n.loadingMore?(m(),_("div",gf,[...t[1]||(t[1]=[u("span",{class:"wm-list__loadMore-spinner","aria-hidden":"true"},null,-1),u("span",{class:"wm-list__loadMore-lbl"},"Chargement de l'historique…",-1)])])):i.historyExhausted?(m(),_("div",_f,"Début de la conversation")):P("",!0),n.dateLabel?(m(),_("div",yf,[t[2]||(t[2]=u("div",{class:"wm-list__line"},null,-1)),u("span",vf,D(n.dateLabel),1),t[3]||(t[3]=u("div",{class:"wm-list__line"},null,-1))])):P("",!0),(m(!0),_(Q,null,xe(i.groups,(k,V)=>(m(),_(Q,{key:k.key},[k.key===i.unreadGroupKey?(m(),_("div",bf,[...t[4]||(t[4]=[u("div",{class:"wm-list__line wm-list__line--unread"},null,-1),u("span",{class:"wm-list__sep-label wm-list__sep-label--unread"},"Non lus",-1),u("div",{class:"wm-list__line wm-list__line--unread"},null,-1)])])):P("",!0),k.role==="system"||k.items.length?(m(),_("div",{key:1,class:se(["wm-list__group","wm-list__group--"+k.role])},[k.role==="system"?(m(),_("div",wf,[t[5]||(t[5]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1)),u("span",kf,D(k.systemLabel),1),t[6]||(t[6]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1))])):(m(),_(Q,{key:1},[(m(!0),_(Q,null,xe(k.items,(I,J)=>(m(),_("div",{key:`${i.messageKey(I.message)}-${I.partKey}`,"data-row-key":`${i.messageKey(I.message)}-${I.partKey}`,class:se(["wm-list__row fade-up",["wm-list__row--"+k.role,{"is-pending":I.message._pending,"is-failed":I.message._failed}]]),style:De(i.cornersStyle(k,J))},[k.role!=="user"?(m(),_("div",Af,[J===k.items.length-1?(m(),_(Q,{key:0},[k.role==="ai"?(m(),_e(o,{key:0,size:26,tail:!0})):(m(),_e(a,{key:1,name:k.agentName,"avatar-url":k.agentAvatarUrl,size:26,tail:!0},null,8,["name","avatar-url"]))],64)):P("",!0)])):P("",!0),I.renderAs==="action"?(m(),_e(l,{key:1,state:I.message.payload.state,label:i.actionLabel(I.message),detail:i.actionDetail(I.message)},null,8,["state","label","detail"])):I.renderAs==="admin-pending"?(m(),_e(l,{key:2,state:"awaiting",label:"Demande d'approbation envoyée",detail:I.message.text_md||""},null,8,["detail"])):I.renderAs==="artifact-of-action"?(m(),_e(f,{key:3,artifact:i.actionArtifact(I.message)},null,8,["artifact"])):I.renderAs==="artifact"?(m(),_e(f,{key:4,artifact:i.artifactOf(I.message)},null,8,["artifact"])):(m(),_("div",Sf,[I.message.text_md?(m(),_e(c,{key:0,role:k.role,text:I.message.text_md},null,8,["role","text"])):P("",!0),i.attachmentsOf(I.message).length?(m(),_("div",{key:1,class:se(["wm-list__atts",{"wm-list__atts--align-end":k.role==="user"}])},[(m(!0),_(Q,null,xe(i.attachmentsOf(I.message),(z,K)=>(m(),_e(g,{key:`${i.messageKey(I.message)}-att-${K}`,attachment:z},null,8,["attachment"]))),128))],2)):P("",!0)]))],14,Cf))),128)),(k.role!=="user"||i.lastTimeOf(k))&&!i.hasTrailingOverlay(k)?(m(),_("div",{key:0,class:se(["wm-list__meta",{"wm-list__meta--right":k.role==="user"}])},[k.role!=="user"?(m(),_("span",xf,D(i.roleLabel(k)),1)):P("",!0),k.role!=="user"&&i.lastTimeOf(k)?(m(),_("span",Tf,"·")):P("",!0),i.lastTimeOf(k)?(m(),_("span",Mf,D(i.lastTimeOf(k)),1)):P("",!0)],2)):P("",!0)],64))],2)):P("",!0)],64))),128)),n.streamingActive?(m(),_("div",Ef,[u("div",Of,[ye(o,{size:26,tail:!0})]),ye(S)])):P("",!0)],34)}const Rf=ve(pf,[["render",If],["__scopeId","data-v-946babe3"]]),ts=typeof navigator<"u"&&!!navigator.mediaDevices&&typeof navigator.mediaDevices.getDisplayMedia=="function",Vs=typeof window<"u"&&typeof window.MediaRecorder<"u";function Lf(){return Vs&&["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm","video/mp4"].find(t=>{var n,s;return(s=(n=window.MediaRecorder).isTypeSupported)==null?void 0:s.call(n,t)})||""}function go({audio:e}){return{video:!0,audio:!!e,selfBrowserSurface:"include",surfaceSwitching:"include",systemAudio:e?"include":"exclude"}}async function Bf(){if(!ts)return null;let e;try{e=await navigator.mediaDevices.getDisplayMedia(go({audio:!1}))}catch(t){return(t==null?void 0:t.name)!=="NotAllowedError"&&console.error("[media] screenshot picker",t),null}try{return await Nf(e)}catch(t){return console.error("[media] screenshot capture",t),null}finally{e.getTracks().forEach(t=>{t.stop()})}}async function Nf(e){const t=document.createElement("video");t.muted=!0,t.playsInline=!0,t.srcObject=e,await t.play(),await new Promise(a=>requestAnimationFrame(a));const n=t.videoWidth||1280,s=t.videoHeight||720,r=document.createElement("canvas");r.width=n,r.height=s,r.getContext("2d").drawImage(t,0,0,n,s);const i=await new Promise((a,l)=>{r.toBlob(f=>f?a(f):l(new Error("toBlob failed")),"image/png")}),o=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);return new File([i],`capture-${o}.png`,{type:"image/png"})}async function Pf(e={}){var f;if(!ts||!Vs)return null;let t;try{t=await navigator.mediaDevices.getDisplayMedia(go({audio:!0}))}catch(c){return(c==null?void 0:c.name)!=="NotAllowedError"&&console.error("[media] record picker",c),null}const n=Lf();let s;try{s=n?new window.MediaRecorder(t,{mimeType:n}):new window.MediaRecorder(t)}catch(c){return console.error("[media] recorder init",c),t.getTracks().forEach(g=>{g.stop()}),null}const r=[];let i=null,o=!1;s.addEventListener("dataavailable",c=>{c.data&&c.data.size>0&&r.push(c.data)}),s.addEventListener("stop",()=>{var c,g;if(i&&clearInterval(i),t.getTracks().forEach(S=>{S.stop()}),r.length){const S=s.mimeType||n||"video/webm",k=new Blob(r,{type:S}),V=/mp4/.test(S)?"mp4":"webm",I=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),J=new File([k],`ecran-${I}.${V}`,{type:S});(c=e.onfinalize)==null||c.call(e,J)}else(g=e.oncancel)==null||g.call(e)}),t.getVideoTracks().forEach(c=>{c.addEventListener("ended",()=>a(),{once:!0})});function a(){if(!o&&(o=!0,s.state!=="inactive"))try{s.stop()}catch(c){console.error("[media] recorder stop",c)}}try{s.start(1e3)}catch(c){return console.error("[media] recorder start",c),t.getTracks().forEach(g=>{g.stop()}),null}(f=e.onstart)==null||f.call(e);const l=Date.now();return i=setInterval(()=>{var c;(c=e.ontick)==null||c.call(e,Date.now()-l)},500),{stop:a,get state(){return s.state}}}const Ff=[{action:"file",label:"Joindre un fichier",path:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"},{action:"screenshot",label:"Capture d'écran",path:"M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z M12 17a4 4 0 100-8 4 4 0 000 8z"},{action:"record",label:"Enregistrer l'écran",path:"M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"}],$f={name:"WmComposer",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Écrivez votre message…"},disabled:{type:Boolean,default:!1},attachLabel:{type:String,default:"Joindre"}},emits:["update:modelValue","send","attach"],data(){return{local:this.modelValue,attachOpen:!1,recording:!1,recordingElapsed:0,recorder:null}},computed:{canSend(){return!this.disabled&&!!this.local.trim()},attachItems(){return Ff.map(e=>({...e,disabled:e.action==="screenshot"&&!ts||e.action==="record"&&(!ts||!Vs)}))},recordingElapsedLabel(){const e=Math.floor(this.recordingElapsed/1e3),t=Math.floor(e/60),n=e%60;return`${t}:${n.toString().padStart(2,"0")}`}},watch:{modelValue(e){e!==this.local&&(this.local=e,this.$nextTick(()=>this.autosize()))},local(e){this.$emit("update:modelValue",e)}},mounted(){this.autosize()},beforeUnmount(){if(this.recorder)try{this.recorder.stop()}catch{}},methods:{focus(){const e=this.$refs.inputEl;if(!(!e||this.disabled))try{e.focus({preventScroll:!0})}catch{e.focus()}},onSubmit(){if(!this.canSend)return;const e=this.local.trim();this.local="",this.$emit("send",e),this.$nextTick(()=>this.autosize())},onKeydown(e){e.key==="Enter"&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&!e.isComposing&&(e.preventDefault(),this.onSubmit())},autosize(){const e=this.$refs.inputEl;e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)},onFile(e){const t=Array.from(e.target.files||[]);for(const n of t)this.$emit("attach",n);e.target.value=""},onAttachAction(e){this.attachOpen=!1,e==="file"?this.pickFile():e==="screenshot"?this.captureScreenshot():e==="record"&&this.startRecording()},pickFile(){var e;(e=this.$refs.fileEl)==null||e.click()},async captureScreenshot(){if(this.disabled)return;const e=await Bf();e&&this.$emit("attach",e)},async startRecording(){if(this.recording||this.disabled)return;this.recordingElapsed=0;const e=await Pf({onstart:()=>{this.recording=!0},ontick:t=>{this.recordingElapsed=t},onfinalize:t=>{this.$emit("attach",t),this.recording=!1,this.recordingElapsed=0,this.recorder=null},oncancel:()=>{this.recording=!1,this.recordingElapsed=0,this.recorder=null}});e&&(this.recorder=e)},stopRecording(){if(this.recorder)try{this.recorder.stop()}catch(e){console.error("[composer] stop recording",e)}}}},Df={class:"wm-compose-wrap"},jf={key:0,class:"wm-rec"},Uf={class:"wm-rec__lbl"},Hf={key:1,class:"wm-compose__menu",role:"menu"},Vf=["disabled","onClick"],Kf={class:"wm-compose__menuIcon"},Wf={viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},qf=["d"],zf=["placeholder","disabled"],Gf={class:"wm-compose__actions"},Yf=["title","aria-label","disabled"],Jf=["disabled"];function Xf(e,t,n,s,r,i){return m(),_("div",Df,[r.recording?(m(),_("div",jf,[t[8]||(t[8]=u("span",{class:"wm-rec__dot","aria-hidden":"true"},null,-1)),u("span",Uf,"Enregistrement · "+D(i.recordingElapsedLabel),1),u("button",{type:"button",class:"wm-rec__stop",onClick:t[0]||(t[0]=(...o)=>i.stopRecording&&i.stopRecording(...o))},"Arrêter")])):P("",!0),u("form",{class:se(["wm-compose",{"has-attach":r.attachOpen}]),onSubmit:t[7]||(t[7]=vt((...o)=>i.onSubmit&&i.onSubmit(...o),["prevent"]))},[u("input",{ref:"fileEl",type:"file",hidden:"",multiple:"",onChange:t[1]||(t[1]=(...o)=>i.onFile&&i.onFile(...o))},null,544),r.attachOpen?(m(),_("div",{key:0,class:"wm-compose__overlay",onClick:t[2]||(t[2]=o=>r.attachOpen=!1)})):P("",!0),r.attachOpen?(m(),_("div",Hf,[(m(!0),_(Q,null,xe(i.attachItems,o=>(m(),_("button",{key:o.action,type:"button",class:"wm-compose__menuItem",disabled:o.disabled,onClick:a=>i.onAttachAction(o.action)},[u("span",Kf,[(m(),_("svg",Wf,[u("path",{d:o.path,stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,qf)]))]),u("span",null,D(o.label),1)],8,Vf))),128))])):P("",!0),at(u("textarea",{ref:"inputEl","onUpdate:modelValue":t[3]||(t[3]=o=>r.local=o),class:"wm-compose__input",rows:"3",placeholder:n.placeholder,disabled:n.disabled,onKeydown:t[4]||(t[4]=(...o)=>i.onKeydown&&i.onKeydown(...o)),onInput:t[5]||(t[5]=(...o)=>i.autosize&&i.autosize(...o))},null,40,zf),[[Ot,r.local]]),u("div",Gf,[u("button",{type:"button",class:se(["wm-compose__icon",{"is-open":r.attachOpen}]),title:n.attachLabel,"aria-label":n.attachLabel,disabled:r.recording,onClick:t[6]||(t[6]=o=>r.attachOpen=!r.attachOpen)},[...t[9]||(t[9]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})],-1)])],10,Yf),u("button",{type:"submit",class:se(["wm-compose__send",{"is-empty":!i.canSend}]),disabled:!i.canSend,"aria-label":"Envoyer"},[...t[10]||(t[10]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"})],-1)])],10,Jf)])],34)])}const Qf=ve($f,[["render",Xf],["__scopeId","data-v-14fa9ec0"]]),Zf={name:"WmSuggestionChips",props:{items:{type:Array,default:()=>[]},baseDelay:{type:Number,default:360},stepDelay:{type:Number,default:90}},emits:["select"],computed:{batchKey(){return this.items.map(e=>(e==null?void 0:e.label)||(e==null?void 0:e.text)||"").join("§")}}},eh=["onClick"];function th(e,t,n,s,r,i){return n.items.length?(m(),_("div",{key:i.batchKey,class:"wm-chips"},[(m(!0),_(Q,null,xe(n.items,(o,a)=>(m(),_("button",{key:a,type:"button",class:"wm-chip",style:De({animationDelay:n.baseDelay+a*n.stepDelay+"ms"}),onClick:l=>e.$emit("select",o)},D(o.label),13,eh))),128))])):P("",!0)}const nh=ve(Zf,[["render",th],["__scopeId","data-v-55aa529d"]]),sh={name:"WmApprovalCard",components:{AIAvatar:pn},props:{action:{type:String,required:!0},detail:{type:String,default:""},callbacks:{type:Array,default:()=>[]}},emits:["callback"],computed:{approveCallback(){return this.callbacks.find(e=>e.id==="approve"||e.style==="primary")||this.callbacks[0]},rejectCallback(){return this.callbacks.find(e=>e.id==="reject"||e.style==="danger"||e.style==="neutral")||(this.callbacks.length>1?this.callbacks[1]:null)},approveId(){var e;return(e=this.approveCallback)==null?void 0:e.id},rejectId(){var e;return(e=this.rejectCallback)==null?void 0:e.id},approveLabel(){var e;return((e=this.approveCallback)==null?void 0:e.label)||"Autoriser"},rejectLabel(){var e;return((e=this.rejectCallback)==null?void 0:e.label)||"Refuser"}}},rh={class:"wm-approval"},ih={class:"wm-approval__head"},oh={class:"wm-approval__icon"},ah={class:"wm-approval__main"},lh={class:"wm-approval__title"},ch={key:0,class:"wm-approval__detail"},uh={class:"wm-approval__actions"};function dh(e,t,n,s,r,i){const o=ge("AIAvatar");return m(),_("div",rh,[u("div",ih,[u("div",oh,[ye(o,{size:24})]),u("div",ah,[u("div",lh,D(n.action),1),n.detail?(m(),_("div",ch,D(n.detail),1)):P("",!0)])]),u("div",uh,[i.rejectId?(m(),_("button",{key:0,type:"button",class:"wm-approval__btn wm-approval__btn--neutral",onClick:t[0]||(t[0]=a=>e.$emit("callback",i.rejectId))},D(i.rejectLabel),1)):P("",!0),i.approveId?(m(),_("button",{key:1,type:"button",class:"wm-approval__btn wm-approval__btn--primary",onClick:t[1]||(t[1]=a=>e.$emit("callback",i.approveId))},D(i.approveLabel),1)):P("",!0)])])}const fh=ve(sh,[["render",dh],["__scopeId","data-v-b1be139c"]]);let _o=0;const hh=new Set(["text","textarea","number","boolean","select","multiselect","date"]),mh={name:"WmFormCard",components:{AIAvatar:pn},props:{form:{type:Object,required:!0},readOnly:{type:Boolean,default:!1},initialValues:{type:Object,default:null}},emits:["submit"],data(){return _o+=1,{_uid:_o,values:{},busy:!1,error:""}},computed:{normalizedFields(){var t;return(Array.isArray((t=this.form)==null?void 0:t.fields)?this.form.fields:[]).filter(n=>!(!(n!=null&&n.key)||!(n!=null&&n.label)||!hh.has(n==null?void 0:n.type)||(n.type==="select"||n.type==="multiselect")&&(!Array.isArray(n.options)||n.options.length===0)))}},created(){this.resetValues()},methods:{resetValues(){const e=this.initialValues&&typeof this.initialValues=="object"?this.initialValues:{},t={};for(const n of this.normalizedFields){if(e[n.key]!==void 0){t[n.key]=e[n.key];continue}n.type==="boolean"?t[n.key]=!1:n.type==="multiselect"?t[n.key]=[]:t[n.key]=""}this.values=t,this.error=""},toggleMulti(e,t,n){const s=Array.isArray(this.values[e])?this.values[e].slice():[],r=s.indexOf(t);n&&r===-1?s.push(t):!n&&r!==-1&&s.splice(r,1),this.values={...this.values,[e]:s}},validate(){for(const e of this.normalizedFields){if(!e.required)continue;const t=this.values[e.key];if(e.type!=="boolean"){if(e.type==="multiselect"){if(!Array.isArray(t)||t.length===0)return`« ${e.label} » est requis.`;continue}if(t==null||t==="")return`« ${e.label} » est requis.`}}return""},async onSubmit(){if(this.readOnly||this.busy)return;const e=this.validate();if(e){this.error=e;return}this.error="",this.busy=!0;try{await this.$emit("submit",{values:this.values})}finally{this.busy=!1}}}},ph={class:"wm-form"},gh={class:"wm-form__head"},_h={class:"wm-form__icon"},yh={class:"wm-form__main"},vh={class:"wm-form__title"},bh={key:0,class:"wm-form__detail"},wh=["for"],kh={key:0,class:"wm-form__req","aria-hidden":"true"},Ch=["id","onUpdate:modelValue","placeholder","required","disabled"],Ah=["id","onUpdate:modelValue","placeholder","required","disabled"],Sh=["id","onUpdate:modelValue","placeholder","required","disabled"],xh=["id","onUpdate:modelValue","required","disabled"],Th={key:4,class:"wm-form__bool"},Mh=["id","onUpdate:modelValue","disabled"],Eh=["id","onUpdate:modelValue","required","disabled"],Oh={value:"",disabled:""},Ih=["value"],Rh={key:6,class:"wm-form__multi"},Lh=["value","checked","disabled","onChange"],Bh={key:0,class:"wm-form__err"},Nh=["disabled"],Ph={key:0,class:"wm-form__spinner","aria-hidden":"true"},Fh={key:2,class:"wm-form__doneLbl"};function $h(e,t,n,s,r,i){const o=ge("AIAvatar");return m(),_("div",ph,[u("div",gh,[u("div",_h,[ye(o,{size:24})]),u("div",yh,[u("div",vh,D(n.form.title||"Formulaire"),1),n.form.description?(m(),_("div",bh,D(n.form.description),1)):P("",!0)])]),u("form",{class:"wm-form__body",onSubmit:t[0]||(t[0]=vt((...a)=>i.onSubmit&&i.onSubmit(...a),["prevent"]))},[(m(!0),_(Q,null,xe(i.normalizedFields,a=>(m(),_("div",{key:a.key,class:"wm-form__field"},[u("label",{for:`wm-f-${r._uid}-${a.key}`,class:"wm-form__label"},[Gn(D(a.label),1),a.required?(m(),_("span",kh,"*")):P("",!0)],8,wh),a.type==="text"?at((m(),_("input",{key:0,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"text",class:"wm-form__input",placeholder:a.placeholder||"",required:a.required,disabled:n.readOnly||r.busy},null,8,Ch)),[[Ot,r.values[a.key]]]):a.type==="textarea"?at((m(),_("textarea",{key:1,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,class:"wm-form__textarea",rows:"3",placeholder:a.placeholder||"",required:a.required,disabled:n.readOnly||r.busy},null,8,Ah)),[[Ot,r.values[a.key]]]):a.type==="number"?at((m(),_("input",{key:2,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"number",class:"wm-form__input",placeholder:a.placeholder||"",required:a.required,disabled:n.readOnly||r.busy},null,8,Sh)),[[Ot,r.values[a.key],void 0,{number:!0}]]):a.type==="date"?at((m(),_("input",{key:3,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"date",class:"wm-form__input",required:a.required,disabled:n.readOnly||r.busy},null,8,xh)),[[Ot,r.values[a.key]]]):a.type==="boolean"?(m(),_("label",Th,[at(u("input",{id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,type:"checkbox",disabled:n.readOnly||r.busy},null,8,Mh),[[Jl,r.values[a.key]]]),u("span",null,D(a.placeholder||"Oui"),1)])):a.type==="select"?at((m(),_("select",{key:5,id:`wm-f-${r._uid}-${a.key}`,"onUpdate:modelValue":l=>r.values[a.key]=l,class:"wm-form__select",required:a.required,disabled:n.readOnly||r.busy},[u("option",Oh,D(a.placeholder||"Choisir…"),1),(m(!0),_(Q,null,xe(a.options,l=>(m(),_("option",{key:l.value,value:l.value},D(l.label),9,Ih))),128))],8,Eh)),[[Xl,r.values[a.key]]]):a.type==="multiselect"?(m(),_("div",Rh,[(m(!0),_(Q,null,xe(a.options,l=>(m(),_("label",{key:l.value,class:"wm-form__multiItem"},[u("input",{type:"checkbox",value:l.value,checked:Array.isArray(r.values[a.key])&&r.values[a.key].includes(l.value),disabled:n.readOnly||r.busy,onChange:f=>i.toggleMulti(a.key,l.value,f.target.checked)},null,40,Lh),u("span",null,D(l.label),1)]))),128))])):P("",!0)]))),128)),r.error?(m(),_("div",Bh,D(r.error),1)):P("",!0),n.readOnly?(m(),_("div",Fh,"Réponse envoyée")):(m(),_("button",{key:1,type:"submit",class:"wm-form__submit",disabled:r.busy},[r.busy?(m(),_("span",Ph)):P("",!0),u("span",null,D(r.busy?"Envoi…":n.form.submit_label||"Envoyer"),1)],8,Nh))],32)])}const Dh=ve(mh,[["render",$h],["__scopeId","data-v-64b40f76"]]),jh={name:"WmFeedback",props:{busy:{type:Boolean,default:!1},done:{type:Boolean,default:!1}},emits:["submit"],data(){return{sel:null,options:[{v:1,e:"😞",l:"Pas bien"},{v:2,e:"😐",l:"Moyen"},{v:3,e:"🙂",l:"Bien"},{v:4,e:"😄",l:"Super"},{v:5,e:"🤩",l:"Excellent"}]}},methods:{onSend(){!this.sel||this.busy||this.$emit("submit",{rating:this.sel})}}},Uh={class:"wm-fb"},Hh={class:"wm-fb__row"},Vh=["onClick"],Kh={class:"wm-fb__emoji"},Wh={class:"wm-fb__label"},qh=["disabled"],zh={key:1,class:"wm-fb__done"};function Gh(e,t,n,s,r,i){return m(),_("div",Uh,[n.done?(m(),_("div",zh,[...t[3]||(t[3]=[Yn('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>',3)])])):(m(),_(Q,{key:0},[t[1]||(t[1]=u("div",{class:"wm-fb__title"},"Comment s'est passée cette conversation ?",-1)),t[2]||(t[2]=u("div",{class:"wm-fb__sub"},"Votre avis nous aide à améliorer l'assistant.",-1)),u("div",Hh,[(m(!0),_(Q,null,xe(r.options,o=>(m(),_("button",{key:o.v,type:"button",class:se(["wm-fb__opt",{"is-selected":r.sel===o.v}]),onClick:a=>r.sel=o.v},[u("span",Kh,D(o.e),1),u("span",Wh,D(o.l),1)],10,Vh))),128))]),u("button",{type:"button",class:"wm-fb__send",disabled:!r.sel||n.busy,onClick:t[0]||(t[0]=(...o)=>i.onSend&&i.onSend(...o))},D(n.busy?"Envoi…":"Envoyer mon avis"),9,qh)],64))])}const Yh=ve(jh,[["render",Gh],["__scopeId","data-v-6f45ff3b"]]),Jh={name:"WmMoreMenu",props:{canRename:{type:Boolean,default:!0},canExport:{type:Boolean,default:!0},soundEnabled:{type:Boolean,default:!0},browserNotifEnabled:{type:Boolean,default:!1},statusUrl:{type:String,default:""},helpUrl:{type:String,default:""}},emits:["close","action","sound-toggle","browser-notif-toggle"],data(){return{soundOn:this.soundEnabled,browserNotifOn:this.browserNotifEnabled}},watch:{soundEnabled(e){this.soundOn=!!e},browserNotifEnabled(e){this.browserNotifOn=!!e}},methods:{emit(e){this.$emit("action",e)},toggleSound(){this.soundOn=!this.soundOn,this.$emit("sound-toggle",this.soundOn)},toggleBrowserNotif(){this.browserNotifOn=!this.browserNotifOn,this.$emit("browser-notif-toggle",this.browserNotifOn)}}},Xh={class:"wm-mm"},Qh={class:"wm-mm__pop",role:"menu"},Zh={key:0,class:"wm-mm__section"},em={key:1,class:"wm-mm__sep"},tm={class:"wm-mm__section"},nm={class:"wm-mm__section"};function sm(e,t,n,s,r,i){return m(),_("div",Xh,[u("div",{class:"wm-mm__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("div",Qh,[n.canRename||n.canExport?(m(),_("div",Zh,[n.canRename?(m(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[1]||(t[1]=o=>i.emit("rename"))},[...t[7]||(t[7]=[Yn('<span class="wm-mm__icon" data-v-3a73911b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3a73911b><path d="M12 20h9" data-v-3a73911b></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-3a73911b></path></svg></span><span class="wm-mm__label" data-v-3a73911b>Modifier le titre</span>',2)])])):P("",!0),n.canExport?(m(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[2]||(t[2]=o=>i.emit("export"))},[...t[8]||(t[8]=[Yn('<span class="wm-mm__icon" data-v-3a73911b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3a73911b><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-3a73911b></path></svg></span><span class="wm-mm__label" data-v-3a73911b>Exporter la transcription</span><span class="wm-mm__hint" data-v-3a73911b>.txt</span>',3)])])):P("",!0)])):P("",!0),n.canRename||n.canExport?(m(),_("div",em)):P("",!0),u("div",tm,[u("button",{type:"button",class:"wm-mm__item",onClick:t[3]||(t[3]=(...o)=>i.toggleSound&&i.toggleSound(...o))},[t[10]||(t[10]=Yn('<span class="wm-mm__icon" data-v-3a73911b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3a73911b><path d="M11 5L6 9H2v6h4l5 4V5z" data-v-3a73911b></path><path d="M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" data-v-3a73911b></path></svg></span><span class="wm-mm__label" data-v-3a73911b>Son</span>',2)),u("span",{class:se(["wm-mm__toggle",{"wm-mm__toggle--on":r.soundOn}])},[...t[9]||(t[9]=[u("span",{class:"wm-mm__knob"},null,-1)])],2)]),u("button",{type:"button",class:"wm-mm__item",onClick:t[4]||(t[4]=(...o)=>i.toggleBrowserNotif&&i.toggleBrowserNotif(...o))},[t[12]||(t[12]=u("span",{class:"wm-mm__icon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0"})])],-1)),t[13]||(t[13]=u("span",{class:"wm-mm__label"},"Notifications navigateur",-1)),u("span",{class:se(["wm-mm__toggle",{"wm-mm__toggle--on":r.browserNotifOn}])},[...t[11]||(t[11]=[u("span",{class:"wm-mm__knob"},null,-1)])],2)])]),t[16]||(t[16]=u("div",{class:"wm-mm__sep"},null,-1)),u("div",nm,[n.statusUrl?(m(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[5]||(t[5]=o=>i.emit("status"))},[...t[14]||(t[14]=[u("span",{class:"wm-mm__icon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2"})])],-1),u("span",{class:"wm-mm__label"},"Statut des services",-1)])])):P("",!0),n.helpUrl?(m(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[6]||(t[6]=o=>i.emit("help"))},[...t[15]||(t[15]=[u("span",{class:"wm-mm__icon"},[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z"})])],-1),u("span",{class:"wm-mm__label"},"Centre d'aide",-1)])])):P("",!0)])])])}const rm=ve(Jh,[["render",sm],["__scopeId","data-v-3a73911b"]]),im={name:"WmRenameDialog",props:{title:{type:String,default:"Modifier le titre"},initialValue:{type:String,default:""},placeholder:{type:String,default:"Titre de la conversation"}},emits:["close","submit"],data(){return{value:this.initialValue||""}},computed:{canSubmit(){const e=(this.value||"").trim();return!!e&&e!==(this.initialValue||"").trim()}},mounted(){this.$nextTick(()=>{const e=this.$refs.input;if(e){e.focus();try{e.select()}catch{}}})},methods:{onSubmit(){this.canSubmit&&this.$emit("submit",this.value.trim())}}},om={class:"wm-dialog"},am={class:"wm-dialog__card",role:"dialog","aria-modal":"true"},lm={class:"wm-dialog__head"},cm={class:"wm-dialog__title"},um={class:"wm-dialog__body"},dm=["placeholder"],fm={class:"wm-dialog__actions"},hm=["disabled"];function mm(e,t,n,s,r,i){return m(),_("div",om,[u("div",{class:"wm-dialog__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("div",am,[u("div",lm,[u("div",cm,D(n.title),1),u("button",{type:"button",class:"wm-dialog__close","aria-label":"Fermer",onClick:t[1]||(t[1]=o=>e.$emit("close"))},[...t[7]||(t[7]=[u("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])]),u("div",um,[at(u("input",{ref:"input","onUpdate:modelValue":t[2]||(t[2]=o=>r.value=o),type:"text",class:"wm-dialog__input",placeholder:n.placeholder,maxlength:120,onKeydown:[t[3]||(t[3]=Qn(vt((...o)=>i.onSubmit&&i.onSubmit(...o),["prevent"]),["enter"])),t[4]||(t[4]=Qn(vt(o=>e.$emit("close"),["prevent"]),["esc"]))]},null,40,dm),[[Ot,r.value]])]),u("div",fm,[u("button",{type:"button",class:"wm-dialog__btn",onClick:t[5]||(t[5]=o=>e.$emit("close"))},"Annuler"),u("button",{type:"button",class:"wm-dialog__btn wm-dialog__btn--primary",disabled:!i.canSubmit,onClick:t[6]||(t[6]=(...o)=>i.onSubmit&&i.onSubmit(...o))},"Enregistrer",8,hm)])])])}const pm=ve(im,[["render",mm],["__scopeId","data-v-4f4b37c9"]]),yo="ww-messenger-tokens",gm={name:"Messenger",components:{Launcher:Jc,Header:gu,Onboarding:Ku,MessageList:Rf,Composer:Qf,SuggestionChips:nh,ApprovalCard:fh,FormCard:Dh,Feedback:Yh,MoreMenu:rm,RenameDialog:pm},mixins:[kc,Mc,Ec,Ic],provide(){return{signAttachmentFn:e=>{var t,n;return((n=(t=this.store)==null?void 0:t.signAttachment)==null?void 0:n.call(t,e))||null}}},props:{baseUrl:{type:String,default:co},widgetId:{type:String,default:""},userId:{type:String,default:""},userHash:{type:String,default:""},customer:{type:Object,default:null},displayMode:{type:String,default:"floating"},devtools:{type:Boolean,default:!1}},data(){return{transport:null,store:null,isOpen:!1,draft:"",busy:!1,bootError:null,pendingAttachments:[],feedbackBusy:!1,feedbackDone:!1,convOpenedAt:0,moreOpen:!1,renameDialogOpen:!1,draftConv:null,activeConvId:null,showOnboarding:!1,dismissedPeeks:{},floatHeight:0,floatRO:null}},computed:{isEditor(){return!!this.devtools},isEmbedded(){return this.displayMode==="embedded"},error(){var e;return this.bootError||((e=this.s)==null?void 0:e.error)||null},canBoot(){return!!(this.baseUrl&&this.widgetId&&this.userId&&this.userHash)},s(){var e;return((e=this.store)==null?void 0:e.state)||null},ready(){var e;return!!((e=this.s)!=null&&e.ready)},allConversations(){var t;const e=(t=this.s)==null?void 0:t.conversations;return Array.isArray(e)?e:[]},drawerConversations(){var t;const e=((t=this.s)==null?void 0:t.messagesByConv)||{};return this.allConversations.map(n=>{var a;const s=e[n.id]||[],r=bt(n.last_read_message_id);let i=0,o=null;for(let l=s.length-1;l>=0;l--){const f=s[l];if(!f)continue;if(((a=f.author)==null?void 0:a.type)==="user")break;const c=bt(f.id);if(c!=null){if(r!=null&&c<=r)break;!o&&f.author&&(o=f.author),i++}}return{...n,_preview:yc(n,s),_unread:i>0,_unreadCount:i,_lastAuthor:o}})},unreadCount(){return this.drawerConversations.filter(e=>e._unread).length},openThreads(){var t;const e=((t=this.s)==null?void 0:t.messagesByConv)||{};return this.drawerConversations.filter(n=>n.status!=="resolved").map(n=>({id:n.id,title:n.name||"Nouvelle conversation",preview:n._preview||"Nouveau message",unread:!!n._unread,_ts:ho(n,e[n.id]||[])})).sort((n,s)=>n._ts<s._ts?1:n._ts>s._ts?-1:0)},latestUnreads(){var n;const e=((n=this.s)==null?void 0:n.messagesByConv)||{},t=[];for(const s of this.drawerConversations){if(!s._unread)continue;const r=ho(s,e[s.id]||[]),i=s._lastAuthor,o=!i||i.type==="agent_ia",a=(i==null?void 0:i.name)||(o?this.agentName:"")||"",l=(i==null?void 0:i.avatar_url)||(o?this.agentAvatarUrl:null);t.push({convId:s.id,preview:s._preview||"Vous avez un nouveau message",ts:r,count:s._unreadCount||1,senderName:a,senderAvatarUrl:l})}return t.sort((s,r)=>s.ts<r.ts?1:s.ts>r.ts?-1:0),t},launcherPeeks(){if(this.isOpen||this.isEmbedded)return[];const e=this.dismissedPeeks||{};return this.latestUnreads.filter(t=>e[t.convId]!==t.ts)},isViewingThread(){return(this.isOpen||this.isEmbedded)&&!!this.currentConv},currentConv(){if(this.draftConv)return this.draftConv;if(this.showOnboarding)return null;const e=this.allConversations;if(!e.length)return null;if(this.activeConvId!=null){const t=e.find(n=>n.id===this.activeConvId);if(t)return t}return e[0]||null},canBack(){return!!this.currentConv},statusUrl(){var n;const e=(n=this.widget)==null?void 0:n.quick_links;if(!Array.isArray(e))return"";const t=e.find(s=>s.icon==="status"&&s.url);return(t==null?void 0:t.url)||""},helpUrl(){var n;const e=(n=this.widget)==null?void 0:n.quick_links;if(!Array.isArray(e))return"";const t=e.find(s=>(s.icon==="chat"||s.icon==="help")&&s.url);return(t==null?void 0:t.url)||""},widget(){var e,t;return((t=(e=this.s)==null?void 0:e.config)==null?void 0:t.widget)||null},widgetWelcomeMessage(){var e;return((e=this.widget)==null?void 0:e.welcome_message)||""},agentName(){var e,t,n;return((n=(t=(e=this.s)==null?void 0:e.config)==null?void 0:t.agent)==null?void 0:n.name)||""},agentAvatarUrl(){var e,t,n;return((n=(t=(e=this.s)==null?void 0:e.config)==null?void 0:t.agent)==null?void 0:n.avatar_url)||null},quickLinks(){var t;const e=(t=this.widget)==null?void 0:t.quick_links;return Array.isArray(e)?e:[]},teamMembers(){var t;const e=(t=this.widget)==null?void 0:t.team_members;return Array.isArray(e)?e:[]},responseLabel(){var e;return((e=this.widget)==null?void 0:e.response_time_label)||""},humanMessageAuthor(){var t,n,s;if(!this.currentConv)return null;const e=((t=this.s.messagesByConv)==null?void 0:t[this.currentConv.id])||[];for(let r=e.length-1;r>=0;r--)if(((s=(n=e[r])==null?void 0:n.author)==null?void 0:s.type)==="agent_human")return e[r].author;return null},humanAgentName(){var e;return((e=this.humanMessageAuthor)==null?void 0:e.name)||""},humanAgentAvatarUrl(){var e;return((e=this.humanMessageAuthor)==null?void 0:e.avatar_url)||null},isEscalated(){return!!this.humanMessageAuthor},isWaitingHuman(){var t;const e=(t=this.currentConv)==null?void 0:t.status;return e==="waiting"||e==="handled"},headerTitle(){var e,t;return((e=this.currentConv)==null?void 0:e.name)||((t=this.widget)==null?void 0:t.name)||"Nouvelle conversation"},composerPlaceholder(){return this.isEscalated&&this.humanAgentName?`Répondre à ${this.humanAgentName.split(" ")[0]}…`:this.isWaitingHuman?"Un agent prend le relais…":"Écrivez votre message…"},displayedMessages(){const e=this.currentConv;if(!e)return[];const t=this.revealedAt;return(this.s.messagesByConv[e.id]||[]).filter(n=>{var s,r,i,o,a;return(n==null?void 0:n.type)==="action"&&((s=n==null?void 0:n.payload)==null?void 0:s.state)==="pending"||Zn(n)&&!(t[n.id]>0)?!1:(n==null?void 0:n.type)==="action"||(n==null?void 0:n.type)==="system"||((r=n==null?void 0:n.payload)==null?void 0:r.type)==="system"||Array.isArray((i=n==null?void 0:n.payload)==null?void 0:i.attachments)&&n.payload.attachments.length||(o=n==null?void 0:n.metadata)!=null&&o.artifact||(a=n==null?void 0:n.metadata)!=null&&a.form?!0:typeof(n==null?void 0:n.text_md)=="string"&&n.text_md.trim().length>0})},streamingActive(){var n,s,r;const e=this.currentConv;return e?Object.keys(((n=this.s)==null?void 0:n.streamingByMsgId)||{}).length>0?!0:this.actionInFlight?!1:(((r=(s=this.s)==null?void 0:s.messagesByConv)==null?void 0:r[e.id])||[]).some(i=>Zn(i)&&!(this.revealedAt[i.id]>0)):!1},currentConvMessages(){var t,n,s;const e=(t=this.currentConv)==null?void 0:t.id;return e?((s=(n=this.s)==null?void 0:n.messagesByConv)==null?void 0:s[e])||[]:[]},pendingApproval(){return!this.currentConv||!this.store||this.actionInFlight?null:this.store.getPendingApproval(this.currentConv.id)},approvalReady(){return this.pendingApproval?this.pendingApproval.id===this.approvalLatchId?!0:!(this.streamingActive||!this.approvalSettled):!1},approvalTitle(){var e,t,n;return((t=(e=this.pendingApproval)==null?void 0:e.payload)==null?void 0:t.name)||((n=this.pendingApproval)==null?void 0:n.text_md)||"Confirmer l'action"},approvalDetail(){var s,r,i,o,a,l;const e=(i=(r=(s=this.pendingApproval)==null?void 0:s.payload)==null?void 0:r.pending)==null?void 0:i.user_explanation;if(typeof e=="string"&&e.trim())return e.trim();const t=(l=(a=(o=this.pendingApproval)==null?void 0:o.payload)==null?void 0:a.pending)==null?void 0:l.prepared_params;if(!t||typeof t!="object")return"";const n=Object.entries(t);return n.length?n.slice(0,2).map(([f,c])=>`${f}: ${c}`).join(" · "):""},actionInFlight(){var e,t;return!this.currentConv||!this.store?null:((t=(e=this.store).getActionInFlight)==null?void 0:t.call(e,this.currentConv.id))||null},actionInFlightName(){var t;const e=this.actionInFlight;return e?((t=e.payload)==null?void 0:t.name)||e.text_md||"Action":""},suggestions(){return!this.currentConv||!this.store?[]:this.streamingActive?[]:this.pendingForm?[]:this.store.getLatestSuggestions(this.currentConv.id)},pendingForm(){var e,t;return!this.currentConv||!this.store||this.pendingApproval||this.actionInFlight||this.streamingActive||!this.approvalSettled?null:((t=(e=this.store).getLatestForm)==null?void 0:t.call(e,this.currentConv.id))||null},showFeedback(){var t;const e=this.currentConv;return e?this.feedbackDone?!0:e.status!=="resolved"?!1:!((t=e.metadata)!=null&&t.feedback):!1},floatVisible(){return this.approvalReady||!!this.pendingForm||this.showFeedback||this.suggestions.length>0},dateLabel(){var n,s,r;const e=this.currentConv;let t=new Date;if(e){const o=((r=(((s=(n=this.s)==null?void 0:n.messagesByConv)==null?void 0:s[e.id])||[]).find(a=>a==null?void 0:a.created_at))==null?void 0:r.created_at)||e.created_at;if(o){const a=new Date(o);Number.isNaN(a.getTime())||(t=a)}}return`Aujourd'hui · ${lo(t)}`},paginationState(){var n,s,r;const e=(n=this.currentConv)==null?void 0:n.id,t=e?(r=(s=this.s)==null?void 0:s.paginationByConv)==null?void 0:r[e]:null;return{loading:!!(t!=null&&t.loading),hasMore:!!(t!=null&&t.nextCursor)}}},watch:{latestUnreads:{handler(e){const t=new Set(e.map(o=>o.convId)),n=this.dismissedPeeks||{},s=Object.keys(n);if(!s.length)return;const r={};let i=!1;for(const o of s)t.has(o)?r[o]=n[o]:i=!0;i&&(this.dismissedPeeks=r)},deep:!0},"currentConv.id":{handler(e){var t;this.resetRevealQueue(),this.convOpenedAt=Date.now(),this.moreOpen=!1,this.renameDialogOpen=!1,this.resetApprovalPacing(),this.isViewingThread&&(this.unreadAnchorId=bt((t=this.currentConv)==null?void 0:t.last_read_message_id),this.unreadBoundaryTs=e?new Date().toISOString():"")},immediate:!0},isViewingThread(e,t){var n;e&&!t?(this.unreadAnchorId=bt((n=this.currentConv)==null?void 0:n.last_read_message_id),this.unreadBoundaryTs=new Date().toISOString()):e||(this.unreadAnchorId=null,this.unreadBoundaryTs="")},pendingApproval:{handler(e,t){if(e&&!t){const n=e!=null&&e.created_at?Date.parse(e.created_at):NaN;if(!(Number.isFinite(n)&&n>=this.convOpenedAt)){this.resetApprovalPacing();return}this.bumpApprovalSettle(2600)}else!e&&t&&this.resetApprovalPacing()},immediate:!1},streamingActive(e,t){e!==t&&this.pendingApproval&&this.pendingApproval.id!==this.approvalLatchId&&this.bumpApprovalSettle()},approvalReady(e){e&&this.pendingApproval&&(this.approvalLatchId=this.pendingApproval.id)},floatVisible:{handler(e){this.$nextTick(()=>this.syncFloatObserver(e))},immediate:!0},currentConvMessages(e){this.paceMessages(e),(this.isOpen||this.isEmbedded)&&this.currentConv&&this.markConvRead(this.currentConv)}},async mounted(){if(typeof document<"u"&&!document.getElementById(yo)){const e=document.createElement("style");e.id=yo,e.textContent=pc,document.head.appendChild(e)}await this.boot(),this.isEmbedded&&this.store&&await this.open()},beforeUnmount(){this.cancelReveals(),this.disconnectFloatRO(),this.resetApprovalPacing(),this.teardownNotifications(),this.store&&this.store.destroy()},methods:{async boot(){if(!this.canBoot){console.warn("[messenger] boot skipped — missing creds");return}try{this.transport=ws(uc({baseUrl:this.baseUrl,widgetId:this.widgetId,userId:this.userId,userHash:this.userHash})),this.store=ws(mc(this.transport)),this.hydrateNotifPref(),this.setupNotifications(),await this.store.start(),this.customer&&typeof this.customer=="object"&&await this.store.applyCustomer(this.customer)}catch(e){console.error("[ww-messenger] bootstrap failed",e),this.bootError=(e==null?void 0:e.message)||String(e)}},async refresh(){this.store&&this.store.destroy(),this.cancelReveals(),this.teardownNotifications(),this.convOpenedAt=0,this.transport=null,this.store=null,this.isOpen=!1,this.draft="",this.busy=!1,this.bootError=null,this.pendingAttachments=[],this.feedbackBusy=!1,this.feedbackDone=!1,this.moreOpen=!1,this.renameDialogOpen=!1,this.draftConv=null,this.activeConvId=null,this.showOnboarding=!1,await this.boot(),this.isEmbedded&&this.store&&await this.open()},syncFloatObserver(e){if(this.disconnectFloatRO(),!e){this.floatHeight=0;return}const t=this.$refs.floatEl;if(t){if(typeof ResizeObserver>"u"){this.floatHeight=Math.ceil(t.getBoundingClientRect().height+8);return}this.floatRO=new ResizeObserver(n=>{const s=n[0];if(!s)return;const r=Math.ceil(s.contentRect.height+8);r!==this.floatHeight&&(this.floatHeight=r,this.$nextTick(()=>{var i,o;(o=(i=this.$refs.messageList)==null?void 0:i.scrollToBottom)==null||o.call(i)}))}),this.floatRO.observe(t)}},disconnectFloatRO(){if(this.floatRO){try{this.floatRO.disconnect()}catch{}this.floatRO=null}},async open(){this.isOpen=!0,this.store&&this.store.setPanelOpen(!0);const e=this.currentConv;if(e&&!e._draft){this.activeConvId==null&&(this.activeConvId=e.id);try{await this.store.openConversation(e.id)}catch(t){console.error("[ww-messenger] load messages failed",t)}this.markConvRead(e)}},close(){this.isOpen=!1,this.store&&this.store.setPanelOpen(!1)},async openFromPeek(e){var n,s;const t=e||((n=this.latestUnreads[0])==null?void 0:n.convId);t&&t!==((s=this.currentConv)==null?void 0:s.id)&&(this.draftConv=null,this.activeConvId=t,this.showOnboarding=!1),await this.open()},dismissPeek(e){const t=this.latestUnreads.find(n=>n.convId===e);t&&(this.dismissedPeeks={...this.dismissedPeeks,[e]:t.ts})},startConv(){this.draftConv={id:"__draft__",_draft:!0,name:"",created_at:new Date().toISOString()},this.activeConvId=null,this.showOnboarding=!1,this.focusComposer()},async ensureRealConv(){const e=this.currentConv;if(!e)return null;if(!e._draft)return e;if(this.busy)return null;this.busy=!0;try{const t=await this.store.createConversation({});return this.draftConv=null,this.activeConvId=t.id,await this.store.openConversation(t.id),this.markConvRead(t),t}catch(t){return console.error("[ww-messenger] create conv failed",t),this.bootError=(t==null?void 0:t.message)||String(t),null}finally{this.busy=!1}},focusComposer(){this.$nextTick(()=>{var e;return(e=this.$refs.composer)==null?void 0:e.focus()})},toggleMore(){this.moreOpen=!this.moreOpen},goHome(){this.moreOpen=!1,this.draftConv=null,this.activeConvId=null,this.showOnboarding=!0},async onDrawerPick(e){if(!(e!=null&&e.id)||!this.store)return;this.draftConv=null,this.activeConvId=e.id,this.showOnboarding=!1;try{await this.store.openConversation(e.id)}catch(n){console.error("[ww-messenger] open conv failed",n)}const t=this.allConversations.find(n=>n.id===e.id);t&&this.markConvRead(t)},async onMoreAction(e){var t,n;switch(this.moreOpen=!1,e){case"rename":this.openRenameDialog();break;case"export":wc(this.currentConv,this.currentConv?(n=(t=this.s)==null?void 0:t.messagesByConv)==null?void 0:n[this.currentConv.id]:[]);break;case"status":if(this.statusUrl)try{window.open(this.statusUrl,"_blank","noopener")}catch{}break;case"help":if(this.helpUrl)try{window.open(this.helpUrl,"_blank","noopener")}catch{}break}},openRenameDialog(){const e=this.currentConv;!e||e._draft||(this.renameDialogOpen=!0)},async onRenameSubmit(e){const t=this.currentConv;if(this.renameDialogOpen=!1,!t||t._draft||!this.store)return;const n=(e||"").trim();if(!(!n||n===t.name))try{await this.store.patchConversation(t.id,{name:n})}catch(s){console.error("[ww-messenger] rename failed",s)}},async onSend(e){let t=this.currentConv;if(!t&&(this.startConv(),t=this.currentConv,!t)||t._draft&&(t=await this.ensureRealConv(),!t))return;const n=t.id,s=this.pendingAttachments.slice();this.pendingAttachments=[],this.unreadAnchorId=null,this.unreadBoundaryTs="",await this.store.send(n,e,{attachments:s.length?s:void 0})},async onSuggestion(e){const t=e==null?void 0:e.label;t&&await this.onSend(t)},async onLoadMore(){var t;const e=(t=this.currentConv)==null?void 0:t.id;!e||!this.store||await this.store.loadMore(e)},async onApprovalCallback(e){const t=this.pendingApproval;t&&await this.store.clickCallback(t.id,e)},async onFormSubmit({values:e}){const t=this.pendingForm;if(!(t!=null&&t.form))return;const n=gc(t.form,e);if(!n)return;let s=this.currentConv;s&&(s._draft&&(s=await this.ensureRealConv(),!s)||await this.store.send(s.id,n,{metadata:{artifact:_c(t.form,e)}}))},async onAttach(e){if(!(!e||!this.transport))try{const t=await this.transport.uploadAttachment(e);this.pendingAttachments.push({type:t.type||"file",path:t.path,name:e.name||"fichier",mime_type:e.type,size_bytes:e.size})}catch(t){console.error("[ww-messenger] attachment upload failed",t)}},async onQuickLink(e){if(e){if(e.url){try{window.open(e.url,"_blank","noopener")}catch{}return}this.currentConv||this.startConv(),await this.onSend(e.label)}},async onFeedback({rating:e,comment:t}){if(this.currentConv){this.feedbackBusy=!0;try{await this.store.submitFeedback(this.currentConv.id,{rating:e,comment:t}),this.feedbackDone=!0}catch(n){console.error("[ww-messenger] feedback failed",n)}finally{this.feedbackBusy=!1}}}}},_m={key:0,class:"wm-loading","aria-busy":"true","aria-live":"polite"},ym={key:0,class:"wm-state"},vm={class:"wm-state__err"},bm={class:"wm-state__errSub"},wm={class:"wm-bottom"},km={key:0,ref:"floatEl",class:"wm-float"},Cm={key:1,class:"wm-actionWait",role:"status","aria-live":"polite"},Am={class:"wm-actionWait__lbl"},Sm={key:2,class:"wm-attached"},xm=["onClick"];function Tm(e,t,n,s,r,i){const o=ge("Launcher"),a=ge("Header"),l=ge("Onboarding"),f=ge("MessageList"),c=ge("ApprovalCard"),g=ge("FormCard"),S=ge("Feedback"),k=ge("SuggestionChips"),V=ge("Composer"),I=ge("MoreMenu"),J=ge("RenameDialog");return m(),_("div",{class:se(["wm-root",`wm-root--${n.displayMode}`])},[!r.isOpen&&!i.isEmbedded?(m(),_e(o,{key:0,"unread-count":i.unreadCount,peeks:i.launcherPeeks,onOpen:i.openFromPeek,onDismiss:i.dismissPeek},null,8,["unread-count","peeks","onOpen","onDismiss"])):P("",!0),r.isOpen||i.isEmbedded?(m(),_("section",{key:1,class:se(["wm-panel",`wm-panel--${n.displayMode}`]),style:De(r.floatHeight?{"--wm-float-h":r.floatHeight+"px"}:null),role:"dialog","aria-label":"Messenger"},[!i.ready&&!i.error?(m(),_("div",_m,[i.isEmbedded?P("",!0):(m(),_("button",{key:0,type:"button",class:"wm-loading__close","aria-label":"Réduire",onClick:t[0]||(t[0]=(...z)=>i.close&&i.close(...z))},[...t[5]||(t[5]=[u("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])),t[6]||(t[6]=u("div",{class:"wm-loading__spinner","aria-hidden":"true"},null,-1))])):(m(),_(Q,{key:1},[ye(a,{title:i.headerTitle,escalated:i.isEscalated,"agent-name":i.humanAgentName,"agent-avatar-url":i.humanAgentAvatarUrl,"team-members":i.teamMembers,"response-label":i.responseLabel,"show-identity":!!i.currentConv,"show-back":i.canBack,"show-close":!i.isEmbedded,"more-active":r.moreOpen,onBack:i.goHome,onMore:i.toggleMore,onClose:i.close},null,8,["title","escalated","agent-name","agent-avatar-url","team-members","response-label","show-identity","show-back","show-close","more-active","onBack","onMore","onClose"]),i.error?(m(),_("div",ym,[u("div",vm,[t[8]||(t[8]=u("div",{class:"wm-state__errIcon"},[u("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})])],-1)),u("div",null,[t[7]||(t[7]=u("div",{class:"wm-state__errTitle"},"Connexion impossible",-1)),u("div",bm,D(i.error),1)])])])):i.currentConv?(m(),_(Q,{key:2},[ye(f,{ref:"messageList",messages:i.displayedMessages,"streaming-active":i.streamingActive,"date-label":i.dateLabel,"conversation-id":i.currentConv?i.currentConv.id:null,"loading-more":i.paginationState.loading,"has-more":i.paginationState.hasMore,"unread-anchor-id":e.unreadAnchorId,"unread-boundary-ts":e.unreadBoundaryTs,onLoadMore:i.onLoadMore},null,8,["messages","streaming-active","date-label","conversation-id","loading-more","has-more","unread-anchor-id","unread-boundary-ts","onLoadMore"]),u("div",wm,[i.floatVisible?(m(),_("div",km,[i.approvalReady?(m(),_e(c,{key:0,action:i.approvalTitle,detail:i.approvalDetail,callbacks:i.pendingApproval.callbacks,onCallback:i.onApprovalCallback},null,8,["action","detail","callbacks","onCallback"])):i.pendingForm?(m(),_e(g,{key:i.pendingForm.message&&i.pendingForm.message.id,form:i.pendingForm.form,onSubmit:i.onFormSubmit},null,8,["form","onSubmit"])):i.showFeedback?(m(),_e(S,{key:2,busy:r.feedbackBusy,done:r.feedbackDone,onSubmit:i.onFeedback},null,8,["busy","done","onSubmit"])):(m(),_e(k,{key:3,items:i.suggestions,onSelect:i.onSuggestion},null,8,["items","onSelect"]))],512)):P("",!0),i.actionInFlight?(m(),_("div",Cm,[t[9]||(t[9]=u("span",{class:"wm-actionWait__spinner","aria-hidden":"true"},null,-1)),u("span",Am,D(i.actionInFlightName)+" en cours, veuillez patienter…",1)])):(m(),_e(V,{key:2,ref:"composer",modelValue:r.draft,"onUpdate:modelValue":t[1]||(t[1]=z=>r.draft=z),placeholder:i.composerPlaceholder,disabled:!!i.pendingApproval,"attach-label":"Joindre un fichier",onSend:i.onSend,onAttach:i.onAttach},null,8,["modelValue","placeholder","disabled","onSend","onAttach"]))]),r.moreOpen?(m(),_e(I,{key:0,"can-rename":!!i.currentConv&&!i.currentConv._draft,"can-export":!!i.currentConv&&!i.currentConv._draft,"sound-enabled":e.soundEnabled,"browser-notif-enabled":e.browserNotifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[2]||(t[2]=z=>r.moreOpen=!1),onSoundToggle:e.onSoundToggle,onBrowserNotifToggle:e.onBrowserNotifToggle,onAction:i.onMoreAction},null,8,["can-rename","can-export","sound-enabled","browser-notif-enabled","status-url","help-url","onSoundToggle","onBrowserNotifToggle","onAction"])):P("",!0),r.renameDialogOpen&&i.currentConv&&!i.currentConv._draft?(m(),_e(J,{key:1,"initial-value":i.currentConv.name||"",title:"Modifier le titre de la conversation",onClose:t[3]||(t[3]=z=>r.renameDialogOpen=!1),onSubmit:i.onRenameSubmit},null,8,["initial-value","onSubmit"])):P("",!0),r.pendingAttachments.length?(m(),_("div",Sm,[(m(!0),_(Q,null,xe(r.pendingAttachments,(z,K)=>(m(),_("div",{key:K,class:"wm-attached__chip"},[t[11]||(t[11]=u("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})],-1)),u("span",null,D(z.name),1),u("button",{type:"button","aria-label":"Retirer",onClick:X=>r.pendingAttachments.splice(K,1)},[...t[10]||(t[10]=[u("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[u("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])],8,xm)]))),128))])):P("",!0)],64)):(m(),_e(l,{key:1,"welcome-message":i.widgetWelcomeMessage,"agent-name":i.agentName,"quick-links":i.quickLinks,"open-threads":i.openThreads,busy:r.busy,onStart:i.startConv,onSelect:i.onQuickLink,onResume:i.onDrawerPick},null,8,["welcome-message","agent-name","quick-links","open-threads","busy","onStart","onSelect","onResume"])),r.moreOpen&&!i.currentConv?(m(),_e(I,{key:3,"can-rename":!1,"can-export":!1,"sound-enabled":e.soundEnabled,"browser-notif-enabled":e.browserNotifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[4]||(t[4]=z=>r.moreOpen=!1),onSoundToggle:e.onSoundToggle,onBrowserNotifToggle:e.onBrowserNotifToggle,onAction:i.onMoreAction},null,8,["sound-enabled","browser-notif-enabled","status-url","help-url","onSoundToggle","onBrowserNotifToggle","onAction"])):P("",!0)],64))],6)):P("",!0)],2)}const Mm=ve(gm,[["render",Tm],["__scopeId","data-v-b5eb5af4"]]),Em="0.3.10";let wt=null,It=null,Ks="";function Om(e){if(e instanceof Element)return e;if(typeof e=="string"){const n=document.querySelector(e);if(n)return n}const t=document.createElement("div");return t.setAttribute("data-messenger-root",""),document.body.appendChild(t),t}function Im(e){return{baseUrl:String(e.baseUrl||co).trim(),widgetId:String(e.widgetId||"").trim(),userId:String(e.userId||"").trim(),userHash:String(e.userHash||"").trim(),displayMode:e.displayMode||"floating",devtools:!!e.devtools,target:e.target||null,customer:e.customer&&typeof e.customer=="object"?e.customer:null}}function Rm(e={}){const t=Im(e);if(!t.baseUrl||!t.widgetId||!t.userId||!t.userHash)return Ws(),null;const n=JSON.stringify({...t,target:typeof t.target=="string"?t.target:!!t.target});return wt&&n===Ks||(Ws(),It=Om(t.target),wt=sc(Mm,{baseUrl:t.baseUrl,widgetId:t.widgetId,userId:t.userId,userHash:t.userHash,displayMode:t.displayMode,devtools:t.devtools,customer:t.customer}),wt.mount(It),Ks=n),wt}function Ws(){if(wt){try{wt.unmount()}catch{}wt=null}It&&It.hasAttribute&&It.hasAttribute("data-messenger-root")&&It.remove(),It=null,Ks=""}return Kt.destroy=Ws,Kt.init=Rm,Kt.version=Em,Object.defineProperty(Kt,Symbol.toStringTag,{value:"Module"}),Kt}({});