@_solaris/messenger-widget 0.2.20 → 0.2.21

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,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.wm-launcherWrap[data-v-fabef371]{display:flex;flex-direction:column;align-items:flex-end;gap:10px}.wm-peek[data-v-fabef371]{position:relative;max-width:248px;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px 14px 6px;padding:11px 30px 11px 13px;box-shadow:0 10px 30px #00000029;cursor:pointer;text-align:left;transition:transform .14s ease,box-shadow .14s ease}.wm-peek[data-v-fabef371]:hover{transform:translateY(-1px);box-shadow:0 14px 34px #0003}.wm-peek__text[data-v-fabef371]{margin:0;font-family:var(--wm-f);font-size:12.5px;line-height:1.42;color:var(--wm-g700);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.wm-peek__close[data-v-fabef371]{position:absolute;top:6px;right:6px;width:20px;height:20px;border-radius:6px;border:none;background:transparent;color:var(--wm-g400);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .12s ease,color .12s ease}.wm-peek__close[data-v-fabef371]:hover{background:var(--wm-g100);color:var(--wm-g700)}.wm-peek-enter-active[data-v-fabef371]{animation:wm-peekIn-fabef371 .26s cubic-bezier(.34,1.56,.64,1) both}.wm-peek-leave-active[data-v-fabef371]{animation:wm-peekIn-fabef371 .16s ease reverse both}@keyframes wm-peekIn-fabef371{0%{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}.wm-launcher[data-v-fabef371]{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-fabef371]:hover{transform:translateY(-1px);box-shadow:0 8px 22px #00000047}.wm-launcher[data-v-fabef371]:active{transform:translateY(0)}.wm-launcher__badge[data-v-fabef371]{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-huav[data-v-a772b179]{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) var(--wm-avr) 4px var(--wm-avr)}.wm-huav img[data-v-a772b179]{width:100%;height:100%;object-fit:cover;display:block}.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-b5f5f6a9]{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-b5f5f6a9]{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-b5f5f6a9]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-header__icon--active[data-v-b5f5f6a9]{background:var(--wm-g200);color:var(--wm-g700)}.wm-header__avatar[data-v-b5f5f6a9]{flex-shrink:0}.wm-header__fill[data-v-b5f5f6a9]{flex:1}.wm-header__main[data-v-b5f5f6a9]{flex:1;min-width:0}.wm-header__title[data-v-b5f5f6a9]{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__sub[data-v-b5f5f6a9]{margin-top:3px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.wm-header__status[data-v-b5f5f6a9]{display:inline-flex;align-items:center;gap:5px;min-height:20px;font-size:11px;color:var(--wm-g400)}.wm-header__dot[data-v-b5f5f6a9]{width:5px;height:5px;border-radius:50%;background:var(--wm-green);flex-shrink:0}.wm-header__actions[data-v-b5f5f6a9]{display:flex;gap:4px;flex-shrink:0}.wm-onb[data-v-bd89bc8f]{flex:1;overflow-y:auto;background:var(--wm-w);padding:20px 14px 14px;display:flex;flex-direction:column;gap:18px}.wm-onb__hero[data-v-bd89bc8f]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 8px 6px;gap:14px}.wm-onb__title[data-v-bd89bc8f]{font-size:17px;font-weight:700;color:var(--wm-g900);letter-spacing:-.03em;line-height:1.2}.wm-onb__sub[data-v-bd89bc8f]{font-size:12.5px;color:var(--wm-g400);line-height:1.6;white-space:pre-line}.wm-onb__section-title[data-v-bd89bc8f]{font-size:10px;font-weight:600;color:var(--wm-g300);letter-spacing:.06em;margin-bottom:8px;text-transform:uppercase;padding-left:2px}.wm-onb__links[data-v-bd89bc8f]{display:flex;flex-direction:column;gap:5px}.wm-onb__link[data-v-bd89bc8f]{padding:10px 13px;border-radius:10px;text-align:left;background:var(--wm-w);border:1px solid var(--wm-g150);font-size:13px;font-weight:500;color:var(--wm-g700);font-family:var(--wm-f);cursor:pointer;display:flex;align-items:center;gap:10px;box-shadow:var(--wm-sh1);transition:background .14s ease,border-color .14s ease}.wm-onb__link[data-v-bd89bc8f]:hover{background:var(--wm-g50);border-color:var(--wm-g200)}.wm-onb__link-icon[data-v-bd89bc8f]{width:28px;height:28px;border-radius:8px;background:var(--wm-g100);display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);flex-shrink:0}.wm-onb__link-label[data-v-bd89bc8f]{flex:1}.wm-onb__link-chev[data-v-bd89bc8f]{color:var(--wm-g300);flex-shrink:0}.wm-onb__resume-icon[data-v-bd89bc8f]{position:relative;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(91,95,239,.18);color:#fff}.wm-onb__resume-dot[data-v-bd89bc8f]{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__resume-body[data-v-bd89bc8f]{flex:1;min-width:0;display:flex;flex-direction:column}.wm-onb__resume-title[data-v-bd89bc8f]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__resume-preview[data-v-bd89bc8f]{font-size:11.5px;font-weight:400;color:var(--wm-g400);margin-top:2px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__cta[data-v-bd89bc8f]{margin-top:auto;padding-top:8px}.wm-onb__startBtn[data-v-bd89bc8f]{width:100%;padding:11px 11px 11px 16px;border-radius:10px;background:var(--wm-g900);color:#fff;border:none;font-size:13px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:background .14s ease}.wm-onb__startBtn[data-v-bd89bc8f]:hover{background:var(--wm-g700)}.wm-onb__startBtn[data-v-bd89bc8f]:disabled{background:var(--wm-g200);cursor:default}.wm-result[data-v-7f90dad6]{display:inline-flex;align-items:center;gap:6px;padding:4px 10px 4px 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-7f90dad6]{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-result__label[data-v-7f90dad6]{font-weight:600;white-space:nowrap;flex-shrink:0}.wm-result__sep[data-v-7f90dad6]{opacity:.55;flex-shrink:0}.wm-result__detail[data-v-7f90dad6]{font-weight:400;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex-shrink:1}.wm-result--success[data-v-7f90dad6]{background:#e3f4e7;color:#1f6e3a}.wm-result--rejected[data-v-7f90dad6]{background:var(--wm-g100);color:var(--wm-g500)}.wm-result--failure[data-v-7f90dad6]{background:var(--wm-redBg);color:var(--wm-red)}.wm-result--awaiting[data-v-7f90dad6]{background:#e0eafe;color:#2563eb}.wm-art[data-v-812bda8b]{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-812bda8b]{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-812bda8b]{min-width:0;flex:1}.wm-art__title[data-v-812bda8b]{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-812bda8b]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-812bda8b]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-812bda8b]{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-812bda8b]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-812bda8b]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-812bda8b]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-812bda8b]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-812bda8b]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-812bda8b]{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-812bda8b]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-812bda8b]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-812bda8b]{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-812bda8b]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-812bda8b]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-812bda8b]{margin:0;padding:0}.wm-art__image img[data-v-812bda8b]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-812bda8b]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.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-97001af0]{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-97001af0]{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-97001af0]{min-width:0;flex:1}.wm-art__title[data-v-97001af0]{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-97001af0]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-97001af0]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-97001af0]{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-97001af0]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-97001af0]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-97001af0]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-97001af0]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-97001af0]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-97001af0]{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-97001af0]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-97001af0]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-97001af0]{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-97001af0]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-97001af0]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-97001af0]{margin:0;padding:0}.wm-art__image img[data-v-97001af0]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-97001af0]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art--ticket[data-v-97001af0]{min-width:240px}.wm-tk__head[data-v-97001af0]{display:block}.wm-tk__title[data-v-97001af0]{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-97001af0]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px}.wm-tk__ref[data-v-97001af0]{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-97001af0]{flex-shrink:0;opacity:.7}.wm-tk__badge[data-v-97001af0]{padding:3px 9px 3px 7px}.wm-tk__dot[data-v-97001af0]{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.wm-tk__text[data-v-97001af0]{font-size:12px;color:var(--wm-g500);line-height:1.55;white-space:pre-wrap;word-break:break-word;margin-top:9px}.wm-tk__prio[data-v-97001af0]{flex-shrink:0;margin-right:6px}.wm-tk__prio rect[data-v-97001af0]{fill:var(--wm-g200)}.wm-tk__prio[data-level="1"] rect[data-v-97001af0]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-97001af0]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-97001af0]:nth-of-type(2),.wm-tk__prio[data-level="3"] rect[data-v-97001af0]{fill:var(--wm-g700)}.wm-tk__footer[data-v-97001af0]{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-97001af0]{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-0e60114e]{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-0e60114e]::-webkit-scrollbar{width:3px}.wm-list[data-v-0e60114e]::-webkit-scrollbar-thumb{background:var(--wm-g200);border-radius:10px}.wm-list__sep[data-v-0e60114e]{display:flex;align-items:center;gap:8px;margin:-4px 0 4px}.wm-list__line[data-v-0e60114e]{flex:1;height:1px;background:var(--wm-g100)}.wm-list__line--strong[data-v-0e60114e]{background:var(--wm-g150)}.wm-list__line--unread[data-v-0e60114e]{background:var(--wm-a);opacity:.55}.wm-list__sep--unread[data-v-0e60114e]{margin:4px 0}.wm-list__sep-label--unread[data-v-0e60114e]{color:var(--wm-a);font-weight:600}.wm-list__sep-label[data-v-0e60114e]{font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);letter-spacing:.06em;white-space:nowrap}.wm-list__sysep-label[data-v-0e60114e]{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-0e60114e]{display:flex;align-items:center;justify-content:center;gap:8px;margin:4px 0}.wm-list__group[data-v-0e60114e]{display:flex;flex-direction:column;gap:3px}.wm-list__row[data-v-0e60114e]{display:flex;align-items:flex-end;gap:5px}.wm-list__row--user[data-v-0e60114e]{justify-content:flex-end}.wm-list__row.is-pending[data-v-0e60114e]{opacity:.55}.wm-list__row.is-failed[data-v-0e60114e] .wm-bubble{background:var(--wm-redBg)!important;color:var(--wm-red)!important}.wm-list__avatarSlot[data-v-0e60114e]{width:26px;flex-shrink:0;align-self:flex-end}.wm-list__body[data-v-0e60114e]{display:flex;flex-direction:column;gap:4px;max-width:75%}.wm-list__atts[data-v-0e60114e]{display:flex;flex-direction:column;gap:4px}.wm-list__atts--align-end[data-v-0e60114e]{align-items:flex-end}.wm-list__meta[data-v-0e60114e]{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-0e60114e]{margin-left:0;justify-content:flex-end}.fade-up[data-v-0e60114e]{animation:wm-fadeUp .2s ease both}.wm-list--silent .fade-up[data-v-0e60114e]{animation:none}.wm-list__loadMore[data-v-0e60114e]{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-0e60114e .18s ease both}.wm-list__loadMore-spinner[data-v-0e60114e]{width:12px;height:12px;border-radius:50%;border:1.5px solid var(--wm-g200);border-top-color:var(--wm-g400);animation:wm-spin-0e60114e .8s linear infinite}.wm-list__historyEnd[data-v-0e60114e]{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-0e60114e{to{transform:rotate(360deg)}}@keyframes wm-fadeIn-0e60114e{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-hd[data-v-1259e822]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:30}.wm-hd__scrim[data-v-1259e822]{position:absolute;top:0;right:0;bottom:0;left:0;background:#0f0e1452;animation:wm-fadeUp .18s ease both}.wm-hd__panel[data-v-1259e822]{position:absolute;top:0;right:0;bottom:0;width:min(312px,100%);background:var(--wm-w);display:flex;flex-direction:column;box-shadow:-8px 0 32px #0000002e;animation:wm-drawerSlide-1259e822 .22s cubic-bezier(.32,.72,0,1) both}@keyframes wm-drawerSlide-1259e822{0%{transform:translate(100%)}to{transform:translate(0)}}.wm-hd__head[data-v-1259e822]{padding:14px 14px 10px;border-bottom:1px solid var(--wm-g100);display:flex;align-items:flex-start;gap:8px;flex-shrink:0}.wm-hd__heading[data-v-1259e822]{flex:1;min-width:0}.wm-hd__title[data-v-1259e822]{font-size:13.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em}.wm-hd__sub[data-v-1259e822]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-hd__close[data-v-1259e822]{width:28px;height:28px;border-radius:8px;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-hd__close[data-v-1259e822]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-hd__top[data-v-1259e822]{padding:10px 12px 6px;flex-shrink:0}.wm-hd__new[data-v-1259e822]{width:100%;padding:10px 12px 10px 16px;border-radius:10px;background:var(--wm-g900);border:none;display:flex;align-items:center;gap:9px;cursor:pointer;font-family:var(--wm-f);color:#fff;font-size:12.5px;font-weight:600;letter-spacing:-.01em;transition:background .14s ease}.wm-hd__new[data-v-1259e822]:hover{background:var(--wm-g700)}.wm-hd__newIcon[data-v-1259e822]{width:22px;height:22px;border-radius:7px;background:#ffffff1f;display:inline-flex;align-items:center;justify-content:center;color:#fff}.wm-hd__search[data-v-1259e822]{position:relative;margin:10px 2px 2px}.wm-hd__searchIcon[data-v-1259e822]{position:absolute;top:50%;left:10px;transform:translateY(-50%);color:var(--wm-g400);display:inline-flex}.wm-hd__search input[data-v-1259e822]{width:100%;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:9px;padding:7px 11px 7px 30px;font-size:12px;color:var(--wm-g700);font-family:var(--wm-f);outline:none}.wm-hd__search input[data-v-1259e822]:focus{border-color:var(--wm-g200);background:var(--wm-w)}.wm-hd__list[data-v-1259e822]{flex:1;overflow-y:auto;padding:8px 4px 16px}.wm-hd__group[data-v-1259e822]{margin-bottom:14px}.wm-hd__groupLabel[data-v-1259e822]{font-size:10px;font-weight:600;color:var(--wm-g300);letter-spacing:.07em;text-transform:uppercase;padding:0 12px 6px;font-family:var(--wm-fm)}.wm-hd__rows[data-v-1259e822]{display:flex;flex-direction:column;gap:2px}.wm-hd__row[data-v-1259e822]{display:flex;gap:10px;align-items:center;padding:10px 12px;border-radius:10px;background:transparent;border:none;text-align:left;cursor:pointer;width:100%;font-family:var(--wm-f);transition:background .14s ease}.wm-hd__row[data-v-1259e822]:hover{background:var(--wm-g50)}.wm-hd__row--active[data-v-1259e822]{background:var(--wm-g100)}.wm-hd__rowIcon[data-v-1259e822]{position:relative;width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(91,95,239,.18);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-hd__rowBody[data-v-1259e822]{flex:1;min-width:0}.wm-hd__rowTop[data-v-1259e822]{display:flex;align-items:center;gap:6px}.wm-hd__rowTitle[data-v-1259e822]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-hd__rowDot[data-v-1259e822]{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-hd__rowPreview[data-v-1259e822]{font-size:11.5px;color:var(--wm-g400);margin-top:2px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-hd__row--unread .wm-hd__rowTitle[data-v-1259e822]{color:var(--wm-g900)}.wm-hd__row--unread .wm-hd__rowPreview[data-v-1259e822]{color:var(--wm-g700);font-weight:500}.wm-hd__empty[data-v-1259e822]{padding:28px 16px;text-align:center;font-size:12px;color:var(--wm-g400)}.wm-mm[data-v-c1bb81d2]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:25}.wm-mm__scrim[data-v-c1bb81d2]{position:absolute;top:0;right:0;bottom:0;left:0}.wm-mm__pop[data-v-c1bb81d2]{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-c1bb81d2]{padding:6px 4px}.wm-mm__sep[data-v-c1bb81d2]{height:1px;background:var(--wm-g100)}.wm-mm__item[data-v-c1bb81d2]{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-c1bb81d2]:hover{background:var(--wm-g50)}.wm-mm__icon[data-v-c1bb81d2]{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-c1bb81d2]{flex:1;font-size:12.5px;font-weight:500;letter-spacing:-.01em}.wm-mm__hint[data-v-c1bb81d2]{font-size:10.5px;color:var(--wm-g300);font-family:var(--wm-fm)}.wm-mm__item--danger[data-v-c1bb81d2]{color:#b91c1c}.wm-mm__item--danger .wm-mm__icon[data-v-c1bb81d2]{background:#b91c1c14;color:#b91c1c}.wm-mm__toggle[data-v-c1bb81d2]{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-c1bb81d2]{background:var(--wm-g900)}.wm-mm__knob[data-v-c1bb81d2]{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-c1bb81d2]{left:14px}.wm-root[data-v-8264e504]{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-8264e504],.wm-root--sheet[data-v-8264e504]{position:fixed;right:20px;bottom:20px;z-index:2147483647}.wm-root--embedded[data-v-8264e504]{position:relative;width:100%;height:100%;display:flex}.wm-panel[data-v-8264e504]{background:var(--wm-w);display:flex;flex-direction:column;overflow:hidden}.wm-panel--floating[data-v-8264e504]{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-8264e504]{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-8264e504]{position:relative;width:100%;height:100%;border-radius:0;box-shadow:none}.wm-state[data-v-8264e504]{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-8264e504]{flex:1;display:flex;align-items:center;justify-content:center;background:var(--wm-w, #fff);position:relative}.wm-loading__close[data-v-8264e504]{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-8264e504]:hover{background:var(--wm-g100, #F2F1EE);color:var(--wm-g900, #17161A)}.wm-loading__spinner[data-v-8264e504]{width:22px;height:22px;border-radius:50%;border:2px solid var(--wm-g150, #E8E6E2);border-top-color:var(--wm-g500, #5A5753);animation:wm-spin-8264e504 .7s linear infinite}@keyframes wm-spin-8264e504{to{transform:rotate(360deg)}}.wm-state__err[data-v-8264e504]{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-8264e504]{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-8264e504]{font-size:13px;font-weight:600;color:var(--wm-red)}.wm-state__errSub[data-v-8264e504]{font-size:11px;color:var(--wm-g500);margin-top:2px}.wm-bottom[data-v-8264e504]{position:relative;flex-shrink:0}.wm-float[data-v-8264e504]{position:absolute;left:0;right:0;bottom:100%;padding:0 12px 8px;pointer-events:none;z-index:5}.wm-float>.wm-approval[data-v-8264e504],.wm-float>.wm-fb[data-v-8264e504],.wm-float>.wm-form[data-v-8264e504]{pointer-events:auto}.wm-actionWait[data-v-8264e504]{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-8264e504]{width:14px;height:14px;border-radius:50%;border:2px solid var(--wm-g200);border-top-color:var(--wm-g500);animation:wm-spin-8264e504 .7s linear infinite;flex-shrink:0}.wm-actionWait__lbl[data-v-8264e504]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-attached[data-v-8264e504]{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-8264e504]{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-8264e504]{border:none;background:transparent;color:var(--wm-g400);cursor:pointer;padding:0;display:inline-flex}.wm-attached__chip button[data-v-8264e504]:hover{color:var(--wm-g900)}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.wm-launcherWrap[data-v-fabef371]{display:flex;flex-direction:column;align-items:flex-end;gap:10px}.wm-peek[data-v-fabef371]{position:relative;max-width:248px;background:var(--wm-w);border:1px solid var(--wm-g150);border-radius:14px 14px 6px;padding:11px 30px 11px 13px;box-shadow:0 10px 30px #00000029;cursor:pointer;text-align:left;transition:transform .14s ease,box-shadow .14s ease}.wm-peek[data-v-fabef371]:hover{transform:translateY(-1px);box-shadow:0 14px 34px #0003}.wm-peek__text[data-v-fabef371]{margin:0;font-family:var(--wm-f);font-size:12.5px;line-height:1.42;color:var(--wm-g700);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.wm-peek__close[data-v-fabef371]{position:absolute;top:6px;right:6px;width:20px;height:20px;border-radius:6px;border:none;background:transparent;color:var(--wm-g400);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .12s ease,color .12s ease}.wm-peek__close[data-v-fabef371]:hover{background:var(--wm-g100);color:var(--wm-g700)}.wm-peek-enter-active[data-v-fabef371]{animation:wm-peekIn-fabef371 .26s cubic-bezier(.34,1.56,.64,1) both}.wm-peek-leave-active[data-v-fabef371]{animation:wm-peekIn-fabef371 .16s ease reverse both}@keyframes wm-peekIn-fabef371{0%{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}.wm-launcher[data-v-fabef371]{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-fabef371]:hover{transform:translateY(-1px);box-shadow:0 8px 22px #00000047}.wm-launcher[data-v-fabef371]:active{transform:translateY(0)}.wm-launcher__badge[data-v-fabef371]{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-huav[data-v-a772b179]{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) var(--wm-avr) 4px var(--wm-avr)}.wm-huav img[data-v-a772b179]{width:100%;height:100%;object-fit:cover;display:block}.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-b5f5f6a9]{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-b5f5f6a9]{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-b5f5f6a9]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-header__icon--active[data-v-b5f5f6a9]{background:var(--wm-g200);color:var(--wm-g700)}.wm-header__avatar[data-v-b5f5f6a9]{flex-shrink:0}.wm-header__fill[data-v-b5f5f6a9]{flex:1}.wm-header__main[data-v-b5f5f6a9]{flex:1;min-width:0}.wm-header__title[data-v-b5f5f6a9]{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__sub[data-v-b5f5f6a9]{margin-top:3px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.wm-header__status[data-v-b5f5f6a9]{display:inline-flex;align-items:center;gap:5px;min-height:20px;font-size:11px;color:var(--wm-g400)}.wm-header__dot[data-v-b5f5f6a9]{width:5px;height:5px;border-radius:50%;background:var(--wm-green);flex-shrink:0}.wm-header__actions[data-v-b5f5f6a9]{display:flex;gap:4px;flex-shrink:0}.wm-onb[data-v-bd89bc8f]{flex:1;overflow-y:auto;background:var(--wm-w);padding:20px 14px 14px;display:flex;flex-direction:column;gap:18px}.wm-onb__hero[data-v-bd89bc8f]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 8px 6px;gap:14px}.wm-onb__title[data-v-bd89bc8f]{font-size:17px;font-weight:700;color:var(--wm-g900);letter-spacing:-.03em;line-height:1.2}.wm-onb__sub[data-v-bd89bc8f]{font-size:12.5px;color:var(--wm-g400);line-height:1.6;white-space:pre-line}.wm-onb__section-title[data-v-bd89bc8f]{font-size:10px;font-weight:600;color:var(--wm-g300);letter-spacing:.06em;margin-bottom:8px;text-transform:uppercase;padding-left:2px}.wm-onb__links[data-v-bd89bc8f]{display:flex;flex-direction:column;gap:5px}.wm-onb__link[data-v-bd89bc8f]{padding:10px 13px;border-radius:10px;text-align:left;background:var(--wm-w);border:1px solid var(--wm-g150);font-size:13px;font-weight:500;color:var(--wm-g700);font-family:var(--wm-f);cursor:pointer;display:flex;align-items:center;gap:10px;box-shadow:var(--wm-sh1);transition:background .14s ease,border-color .14s ease}.wm-onb__link[data-v-bd89bc8f]:hover{background:var(--wm-g50);border-color:var(--wm-g200)}.wm-onb__link-icon[data-v-bd89bc8f]{width:28px;height:28px;border-radius:8px;background:var(--wm-g100);display:inline-flex;align-items:center;justify-content:center;color:var(--wm-g500);flex-shrink:0}.wm-onb__link-label[data-v-bd89bc8f]{flex:1}.wm-onb__link-chev[data-v-bd89bc8f]{color:var(--wm-g300);flex-shrink:0}.wm-onb__resume-icon[data-v-bd89bc8f]{position:relative;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(91,95,239,.18);color:#fff}.wm-onb__resume-dot[data-v-bd89bc8f]{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__resume-body[data-v-bd89bc8f]{flex:1;min-width:0;display:flex;flex-direction:column}.wm-onb__resume-title[data-v-bd89bc8f]{font-size:13px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__resume-preview[data-v-bd89bc8f]{font-size:11.5px;font-weight:400;color:var(--wm-g400);margin-top:2px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-onb__cta[data-v-bd89bc8f]{margin-top:auto;padding-top:8px}.wm-onb__startBtn[data-v-bd89bc8f]{width:100%;padding:11px 11px 11px 16px;border-radius:10px;background:var(--wm-g900);color:#fff;border:none;font-size:13px;font-weight:600;cursor:pointer;font-family:var(--wm-f);transition:background .14s ease}.wm-onb__startBtn[data-v-bd89bc8f]:hover{background:var(--wm-g700)}.wm-onb__startBtn[data-v-bd89bc8f]:disabled{background:var(--wm-g200);cursor:default}.wm-result[data-v-7f90dad6]{display:inline-flex;align-items:center;gap:6px;padding:4px 10px 4px 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-7f90dad6]{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-result__label[data-v-7f90dad6]{font-weight:600;white-space:nowrap;flex-shrink:0}.wm-result__sep[data-v-7f90dad6]{opacity:.55;flex-shrink:0}.wm-result__detail[data-v-7f90dad6]{font-weight:400;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex-shrink:1}.wm-result--success[data-v-7f90dad6]{background:#e3f4e7;color:#1f6e3a}.wm-result--rejected[data-v-7f90dad6]{background:var(--wm-g100);color:var(--wm-g500)}.wm-result--failure[data-v-7f90dad6]{background:var(--wm-redBg);color:var(--wm-red)}.wm-result--awaiting[data-v-7f90dad6]{background:#e0eafe;color:#2563eb}.wm-art[data-v-812bda8b]{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-812bda8b]{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-812bda8b]{min-width:0;flex:1}.wm-art__title[data-v-812bda8b]{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-812bda8b]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-812bda8b]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-812bda8b]{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-812bda8b]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-812bda8b]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-812bda8b]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-812bda8b]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-812bda8b]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-812bda8b]{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-812bda8b]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-812bda8b]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-812bda8b]{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-812bda8b]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-812bda8b]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-812bda8b]{margin:0;padding:0}.wm-art__image img[data-v-812bda8b]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-812bda8b]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.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-97001af0]{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-97001af0]{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-97001af0]{min-width:0;flex:1}.wm-art__title[data-v-97001af0]{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-97001af0]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-art__reference[data-v-97001af0]{font-size:10.5px;color:var(--wm-g400);font-family:var(--wm-fm);margin-top:1px}.wm-art__badge[data-v-97001af0]{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-97001af0]{background:var(--wm-g100);color:var(--wm-g500)}.wm-art__badge--success[data-v-97001af0]{background:#e7f7ee;color:#1f8a4d}.wm-art__badge--warning[data-v-97001af0]{background:#fff4e0;color:#a35b00}.wm-art__badge--danger[data-v-97001af0]{background:var(--wm-redBg);color:var(--wm-red)}.wm-art__body[data-v-97001af0]{display:flex;flex-direction:column;gap:9px;padding:11px 13px 12px}.wm-art__text[data-v-97001af0]{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-97001af0]{display:flex;flex-direction:column;gap:4px}.wm-art__fieldLabel[data-v-97001af0]{font-size:11px;font-weight:600;color:var(--wm-g700)}.wm-art__fieldValue[data-v-97001af0]{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-97001af0]{display:block;white-space:pre-wrap;min-height:48px}.wm-art__divider[data-v-97001af0]{height:1px;background:var(--wm-g100)}.wm-art__image[data-v-97001af0]{margin:0;padding:0}.wm-art__image img[data-v-97001af0]{display:block;width:100%;height:auto;background:var(--wm-g100)}.wm-art__image figcaption[data-v-97001af0]{font-size:11px;color:var(--wm-g400);padding:6px 13px 10px}.wm-art--ticket[data-v-97001af0]{min-width:240px}.wm-tk__head[data-v-97001af0]{display:block}.wm-tk__title[data-v-97001af0]{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-97001af0]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px}.wm-tk__ref[data-v-97001af0]{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-97001af0]{flex-shrink:0;opacity:.7}.wm-tk__badge[data-v-97001af0]{padding:3px 9px 3px 7px}.wm-tk__dot[data-v-97001af0]{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.wm-tk__text[data-v-97001af0]{font-size:12px;color:var(--wm-g500);line-height:1.55;white-space:pre-wrap;word-break:break-word;margin-top:9px}.wm-tk__prio[data-v-97001af0]{flex-shrink:0;margin-right:6px}.wm-tk__prio rect[data-v-97001af0]{fill:var(--wm-g200)}.wm-tk__prio[data-level="1"] rect[data-v-97001af0]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-97001af0]:nth-of-type(1),.wm-tk__prio[data-level="2"] rect[data-v-97001af0]:nth-of-type(2),.wm-tk__prio[data-level="3"] rect[data-v-97001af0]{fill:var(--wm-g700)}.wm-tk__footer[data-v-97001af0]{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-97001af0]{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-0e691378]{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-0e691378]::-webkit-scrollbar{width:3px}.wm-list[data-v-0e691378]::-webkit-scrollbar-thumb{background:var(--wm-g200);border-radius:10px}.wm-list__sep[data-v-0e691378]{display:flex;align-items:center;gap:8px;margin:-4px 0 4px}.wm-list__line[data-v-0e691378]{flex:1;height:1px;background:var(--wm-g100)}.wm-list__line--strong[data-v-0e691378]{background:var(--wm-g150)}.wm-list__line--unread[data-v-0e691378]{background:var(--wm-a);opacity:.55}.wm-list__sep--unread[data-v-0e691378]{margin:4px 0}.wm-list__sep-label--unread[data-v-0e691378]{color:var(--wm-a);font-weight:600}.wm-list__sep-label[data-v-0e691378]{font-size:10px;color:var(--wm-g300);font-family:var(--wm-fm);letter-spacing:.06em;white-space:nowrap}.wm-list__sysep-label[data-v-0e691378]{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-0e691378]{display:flex;align-items:center;justify-content:center;gap:8px;margin:4px 0}.wm-list__group[data-v-0e691378]{display:flex;flex-direction:column;gap:3px}.wm-list__row[data-v-0e691378]{display:flex;align-items:flex-end;gap:5px}.wm-list__row--user[data-v-0e691378]{justify-content:flex-end}.wm-list__row.is-pending[data-v-0e691378]{opacity:.55}.wm-list__row.is-failed[data-v-0e691378] .wm-bubble{background:var(--wm-redBg)!important;color:var(--wm-red)!important}.wm-list__avatarSlot[data-v-0e691378]{width:26px;flex-shrink:0;align-self:flex-end}.wm-list__body[data-v-0e691378]{display:flex;flex-direction:column;gap:4px;max-width:75%}.wm-list__atts[data-v-0e691378]{display:flex;flex-direction:column;gap:4px}.wm-list__atts--align-end[data-v-0e691378]{align-items:flex-end}.wm-list__meta[data-v-0e691378]{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-0e691378]{margin-left:0;justify-content:flex-end}.fade-up[data-v-0e691378]{animation:wm-fadeUp .2s ease both}.wm-list--silent .fade-up[data-v-0e691378]{animation:none}.wm-list__loadMore[data-v-0e691378]{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-0e691378 .18s ease both}.wm-list__loadMore-spinner[data-v-0e691378]{width:12px;height:12px;border-radius:50%;border:1.5px solid var(--wm-g200);border-top-color:var(--wm-g400);animation:wm-spin-0e691378 .8s linear infinite}.wm-list__historyEnd[data-v-0e691378]{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-0e691378{to{transform:rotate(360deg)}}@keyframes wm-fadeIn-0e691378{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-hd[data-v-1259e822]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:30}.wm-hd__scrim[data-v-1259e822]{position:absolute;top:0;right:0;bottom:0;left:0;background:#0f0e1452;animation:wm-fadeUp .18s ease both}.wm-hd__panel[data-v-1259e822]{position:absolute;top:0;right:0;bottom:0;width:min(312px,100%);background:var(--wm-w);display:flex;flex-direction:column;box-shadow:-8px 0 32px #0000002e;animation:wm-drawerSlide-1259e822 .22s cubic-bezier(.32,.72,0,1) both}@keyframes wm-drawerSlide-1259e822{0%{transform:translate(100%)}to{transform:translate(0)}}.wm-hd__head[data-v-1259e822]{padding:14px 14px 10px;border-bottom:1px solid var(--wm-g100);display:flex;align-items:flex-start;gap:8px;flex-shrink:0}.wm-hd__heading[data-v-1259e822]{flex:1;min-width:0}.wm-hd__title[data-v-1259e822]{font-size:13.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.02em}.wm-hd__sub[data-v-1259e822]{font-size:11px;color:var(--wm-g400);margin-top:1px}.wm-hd__close[data-v-1259e822]{width:28px;height:28px;border-radius:8px;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-hd__close[data-v-1259e822]:hover{background:var(--wm-g150);color:var(--wm-g700)}.wm-hd__top[data-v-1259e822]{padding:10px 12px 6px;flex-shrink:0}.wm-hd__new[data-v-1259e822]{width:100%;padding:10px 12px 10px 16px;border-radius:10px;background:var(--wm-g900);border:none;display:flex;align-items:center;gap:9px;cursor:pointer;font-family:var(--wm-f);color:#fff;font-size:12.5px;font-weight:600;letter-spacing:-.01em;transition:background .14s ease}.wm-hd__new[data-v-1259e822]:hover{background:var(--wm-g700)}.wm-hd__newIcon[data-v-1259e822]{width:22px;height:22px;border-radius:7px;background:#ffffff1f;display:inline-flex;align-items:center;justify-content:center;color:#fff}.wm-hd__search[data-v-1259e822]{position:relative;margin:10px 2px 2px}.wm-hd__searchIcon[data-v-1259e822]{position:absolute;top:50%;left:10px;transform:translateY(-50%);color:var(--wm-g400);display:inline-flex}.wm-hd__search input[data-v-1259e822]{width:100%;background:var(--wm-g50);border:1px solid var(--wm-g150);border-radius:9px;padding:7px 11px 7px 30px;font-size:12px;color:var(--wm-g700);font-family:var(--wm-f);outline:none}.wm-hd__search input[data-v-1259e822]:focus{border-color:var(--wm-g200);background:var(--wm-w)}.wm-hd__list[data-v-1259e822]{flex:1;overflow-y:auto;padding:8px 4px 16px}.wm-hd__group[data-v-1259e822]{margin-bottom:14px}.wm-hd__groupLabel[data-v-1259e822]{font-size:10px;font-weight:600;color:var(--wm-g300);letter-spacing:.07em;text-transform:uppercase;padding:0 12px 6px;font-family:var(--wm-fm)}.wm-hd__rows[data-v-1259e822]{display:flex;flex-direction:column;gap:2px}.wm-hd__row[data-v-1259e822]{display:flex;gap:10px;align-items:center;padding:10px 12px;border-radius:10px;background:transparent;border:none;text-align:left;cursor:pointer;width:100%;font-family:var(--wm-f);transition:background .14s ease}.wm-hd__row[data-v-1259e822]:hover{background:var(--wm-g50)}.wm-hd__row--active[data-v-1259e822]{background:var(--wm-g100)}.wm-hd__rowIcon[data-v-1259e822]{position:relative;width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#1a1825,#0f0e14);border:1px solid rgba(91,95,239,.18);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.wm-hd__rowBody[data-v-1259e822]{flex:1;min-width:0}.wm-hd__rowTop[data-v-1259e822]{display:flex;align-items:center;gap:6px}.wm-hd__rowTitle[data-v-1259e822]{font-size:12.5px;font-weight:600;color:var(--wm-g900);letter-spacing:-.01em;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-hd__rowDot[data-v-1259e822]{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-hd__rowPreview[data-v-1259e822]{font-size:11.5px;color:var(--wm-g400);margin-top:2px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wm-hd__row--unread .wm-hd__rowTitle[data-v-1259e822]{color:var(--wm-g900)}.wm-hd__row--unread .wm-hd__rowPreview[data-v-1259e822]{color:var(--wm-g700);font-weight:500}.wm-hd__empty[data-v-1259e822]{padding:28px 16px;text-align:center;font-size:12px;color:var(--wm-g400)}.wm-mm[data-v-c1bb81d2]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:25}.wm-mm__scrim[data-v-c1bb81d2]{position:absolute;top:0;right:0;bottom:0;left:0}.wm-mm__pop[data-v-c1bb81d2]{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-c1bb81d2]{padding:6px 4px}.wm-mm__sep[data-v-c1bb81d2]{height:1px;background:var(--wm-g100)}.wm-mm__item[data-v-c1bb81d2]{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-c1bb81d2]:hover{background:var(--wm-g50)}.wm-mm__icon[data-v-c1bb81d2]{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-c1bb81d2]{flex:1;font-size:12.5px;font-weight:500;letter-spacing:-.01em}.wm-mm__hint[data-v-c1bb81d2]{font-size:10.5px;color:var(--wm-g300);font-family:var(--wm-fm)}.wm-mm__item--danger[data-v-c1bb81d2]{color:#b91c1c}.wm-mm__item--danger .wm-mm__icon[data-v-c1bb81d2]{background:#b91c1c14;color:#b91c1c}.wm-mm__toggle[data-v-c1bb81d2]{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-c1bb81d2]{background:var(--wm-g900)}.wm-mm__knob[data-v-c1bb81d2]{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-c1bb81d2]{left:14px}.wm-root[data-v-8264e504]{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-8264e504],.wm-root--sheet[data-v-8264e504]{position:fixed;right:20px;bottom:20px;z-index:2147483647}.wm-root--embedded[data-v-8264e504]{position:relative;width:100%;height:100%;display:flex}.wm-panel[data-v-8264e504]{background:var(--wm-w);display:flex;flex-direction:column;overflow:hidden}.wm-panel--floating[data-v-8264e504]{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-8264e504]{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-8264e504]{position:relative;width:100%;height:100%;border-radius:0;box-shadow:none}.wm-state[data-v-8264e504]{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-8264e504]{flex:1;display:flex;align-items:center;justify-content:center;background:var(--wm-w, #fff);position:relative}.wm-loading__close[data-v-8264e504]{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-8264e504]:hover{background:var(--wm-g100, #F2F1EE);color:var(--wm-g900, #17161A)}.wm-loading__spinner[data-v-8264e504]{width:22px;height:22px;border-radius:50%;border:2px solid var(--wm-g150, #E8E6E2);border-top-color:var(--wm-g500, #5A5753);animation:wm-spin-8264e504 .7s linear infinite}@keyframes wm-spin-8264e504{to{transform:rotate(360deg)}}.wm-state__err[data-v-8264e504]{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-8264e504]{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-8264e504]{font-size:13px;font-weight:600;color:var(--wm-red)}.wm-state__errSub[data-v-8264e504]{font-size:11px;color:var(--wm-g500);margin-top:2px}.wm-bottom[data-v-8264e504]{position:relative;flex-shrink:0}.wm-float[data-v-8264e504]{position:absolute;left:0;right:0;bottom:100%;padding:0 12px 8px;pointer-events:none;z-index:5}.wm-float>.wm-approval[data-v-8264e504],.wm-float>.wm-fb[data-v-8264e504],.wm-float>.wm-form[data-v-8264e504]{pointer-events:auto}.wm-actionWait[data-v-8264e504]{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-8264e504]{width:14px;height:14px;border-radius:50%;border:2px solid var(--wm-g200);border-top-color:var(--wm-g500);animation:wm-spin-8264e504 .7s linear infinite;flex-shrink:0}.wm-actionWait__lbl[data-v-8264e504]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wm-attached[data-v-8264e504]{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-8264e504]{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-8264e504]{border:none;background:transparent;color:var(--wm-g400);cursor:pointer;padding:0;display:inline-flex}.wm-attached__chip button[data-v-8264e504]:hover{color:var(--wm-g900)}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  var Messenger=function(Ut){"use strict";/**
3
3
  * @vue/shared v3.5.34
4
4
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -68,9 +68,9 @@ var Messenger=function(Ut){"use strict";/**
68
68
  Je réponds en quelques secondes.`}},methods:{iconPath(e){return ao[e]||ao.link}}},Vc={class:"wm-onb"},Wc={class:"wm-onb__hero"},Kc={class:"wm-onb__title"},zc={class:"wm-onb__sub"},qc={key:0,class:"wm-onb__section"},Gc={class:"wm-onb__links"},Yc=["onClick"],Jc={class:"wm-onb__resume-body"},Xc={class:"wm-onb__resume-title"},Qc={class:"wm-onb__resume-preview"},Zc={key:1,class:"wm-onb__section"},eu={class:"wm-onb__links"},tu=["onClick"],nu={class:"wm-onb__link-icon"},su={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"},ru=["d"],iu={class:"wm-onb__link-label"},ou={class:"wm-onb__cta"},lu=["disabled"];function au(e,t,n,s,r,i){const o=me("AIAvatar");return m(),_("div",Vc,[u("div",Wc,[ge(o,{size:56,pulse:!0}),u("div",Kc,P(i.heroTitle),1),u("div",zc,P(i.heroSub),1)]),n.unreadThreads.length?(m(),_("div",qc,[t[3]||(t[3]=u("div",{class:"wm-onb__section-title"},"Messages non lus",-1)),u("div",Gc,[(m(!0),_(Y,null,Ce(n.unreadThreads,l=>(m(),_("button",{key:l.id,type:"button",class:"wm-onb__link wm-onb__resume",onClick:a=>e.$emit("resume",l)},[t[1]||(t[1]=u("span",{class:"wm-onb__link-icon wm-onb__resume-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:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})]),u("span",{class:"wm-onb__resume-dot","aria-label":"Non lu"})],-1)),u("span",Jc,[u("span",Xc,P(l.title),1),u("span",Qc,P(l.preview),1)]),t[2]||(t[2]=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",class:"wm-onb__link-chev","aria-hidden":"true"},[u("path",{d:"M9 18l6-6-6-6"})],-1))],8,Yc))),128))])])):$("",!0),n.quickLinks.length?(m(),_("div",Zc,[t[5]||(t[5]=u("div",{class:"wm-onb__section-title"},"Accès rapide",-1)),u("div",eu,[(m(!0),_(Y,null,Ce(n.quickLinks,(l,a)=>(m(),_("button",{key:a,type:"button",class:"wm-onb__link",onClick:f=>e.$emit("select",l)},[u("span",nu,[(m(),_("svg",su,[u("path",{d:i.iconPath(l.icon)},null,8,ru)]))]),u("span",iu,P(l.label),1),t[4]||(t[4]=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",class:"wm-onb__link-chev","aria-hidden":"true"},[u("path",{d:"M9 18l6-6-6-6"})],-1))],8,tu))),128))])])):$("",!0),u("div",ou,[u("button",{type:"button",class:"wm-onb__startBtn",disabled:n.busy,onClick:t[0]||(t[0]=l=>e.$emit("start"))},P(n.busy?"…":"Commencer une conversation"),9,lu)])])}const cu=_e(Uc,[["render",au],["__scopeId","data-v-bd89bc8f"]]);function uu(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 du={name:"WmActionResult",props:{state:{type:String,default:"success"},label:{type:String,required:!0},detail:{type:String,default:""}},computed:{detailText(){return uu(this.detail)}}},fu={class:"wm-result__icon","aria-hidden":"true"},hu={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"},pu={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"},mu={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"},_u={class:"wm-result__label"},vu={class:"wm-result__detail"};function yu(e,t,n,s,r,i){return m(),_("div",{class:ce(["wm-result",`wm-result--${n.state}`])},[u("span",fu,[n.state==="success"?(m(),_("svg",hu,[...t[0]||(t[0]=[u("path",{d:"M20 6L9 17l-5-5"},null,-1)])])):n.state==="rejected"?(m(),_("svg",pu,[...t[1]||(t[1]=[u("path",{d:"M18 6L6 18M6 6l12 12"},null,-1)])])):n.state==="awaiting"?(m(),_("svg",mu,[...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",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",_u,P(n.label),1),i.detailText?(m(),_(Y,{key:0},[t[4]||(t[4]=u("span",{class:"wm-result__sep","aria-hidden":"true"},"·",-1)),u("span",vu,P(i.detailText),1)],64)):$("",!0)],2)}const bu=_e(du,[["render",yu],["__scopeId","data-v-7f90dad6"]]),wu={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:[]}}},ku={class:"wm-art wm-art--formResponse"},Cu={class:"wm-art__head"},Au={class:"wm-art__title"},Su={class:"wm-art__body"},xu={class:"wm-art__fieldLabel"};function Tu(e,t,n,s,r,i){return m(),_("div",ku,[u("div",Cu,[u("div",Au,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"})]),ln(" Envoyé ")],-1))]),u("div",Su,[(m(!0),_(Y,null,Ce(i.fields,(o,l)=>(m(),_("div",{key:l,class:"wm-art__field"},[u("div",xu,P(o.label),1),u("div",{class:ce(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},P(o.value),3)]))),128))])])}const Mu=_e(wu,[["render",Tu],["__scopeId","data-v-812bda8b"]]),Eu={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}}},Ou={class:"wm-art wm-art--infoCard"},Iu={key:0,class:"wm-art__image"},Lu=["src","alt"],Ru={class:"wm-art__head"},Fu={class:"wm-art__headMain"},Bu={class:"wm-art__title"},$u={key:0,class:"wm-art__subtitle"},Pu={key:1,class:"wm-art__body"},Du={key:0,class:"wm-art__text"},ju={class:"wm-art__fieldLabel"};function Nu(e,t,n,s,r,i){return m(),_("div",Ou,[n.data.image_url?(m(),_("figure",Iu,[u("img",{src:n.data.image_url,alt:n.data.title||"",loading:"lazy"},null,8,Lu)])):$("",!0),u("div",Ru,[u("div",Fu,[u("div",Bu,P(n.data.title),1),n.data.subtitle?(m(),_("div",$u,P(n.data.subtitle),1)):$("",!0)]),n.data.badge&&n.data.badge.label?(m(),_("span",{key:0,class:ce(["wm-art__badge",`wm-art__badge--${n.data.badge.tone||"neutral"}`])},P(n.data.badge.label),3)):$("",!0)]),i.hasBody?(m(),_("div",Pu,[n.data.body?(m(),_("div",Du,P(n.data.body),1)):$("",!0),i.fields.length?(m(!0),_(Y,{key:1},Ce(i.fields,(o,l)=>(m(),_("div",{key:l,class:"wm-art__field"},[u("div",ju,P(o.label),1),u("div",{class:ce(["wm-art__fieldValue",{"wm-art__fieldValue--multi":o.multiline}])},P(o.value),3)]))),128)):$("",!0)])):$("",!0)])}const Hu=_e(Eu,[["render",Nu],["__scopeId","data-v-d7369333"]]);function Uu(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 Vu={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 Uu((e=this.data)==null?void 0:e.created_at)}},methods:{isPriority(e){return/priorit|^prio$/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}}},Wu={class:"wm-art wm-art--ticket"},Ku={class:"wm-art__head wm-tk__head"},zu={class:"wm-art__title wm-tk__title"},qu={class:"wm-tk__sub"},Gu={class:"wm-tk__ref"},Yu={key:0,class:"wm-tk__text"},Ju={key:0,class:"wm-art__body"},Xu={class:"wm-art__fieldLabel"},Qu=["data-level"],Zu={key:1,class:"wm-art__footer wm-tk__footer"};function ed(e,t,n,s,r,i){return m(),_("div",Wu,[u("div",Ku,[u("div",zu,P(n.data.title),1),u("div",qu,[u("div",Gu,[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:ce(["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)),ln(" "+P(n.data.status.label),1)],2)]),n.data.body?(m(),_("div",Yu,P(n.data.body),1)):$("",!0)]),i.fields.length?(m(),_("div",Ju,[(m(!0),_(Y,null,Ce(i.fields,(o,l)=>(m(),_("div",{key:l,class:"wm-art__field"},[u("div",Xu,P(o.label),1),u("div",{class:ce(["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,Qu)):$("",!0),u("span",null,P(o.value),1)],2)]))),128))])):$("",!0),n.data.created_at?(m(),_("div",Zu,[t[3]||(t[3]=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 td={form_response:Mu,info_card:Hu,ticket:_e(Vu,[["render",ed],["__scopeId","data-v-97001af0"]])},nd={name:"WmArtifactRenderer",props:{artifact:{type:Object,required:!0}},computed:{component(){var t;const e=(t=this.artifact)==null?void 0:t.kind;return e&&td[e]||null}}};function sd(e,t,n,s,r,i){return i.component?(m(),pe(Tl(i.component),{key:0,data:n.artifact.data},null,8,["data"])):$("",!0)}const rd=_e(nd,[["render",sd]]),id={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()}}},od=["href"],ld=["src","alt"],ad=["src"],cd=["src"],ud=["href","download"],dd={class:"wm-att__main"},fd={class:"wm-att__name"},hd={key:0,class:"wm-att__meta"},pd={key:0,class:"wm-att__spin","aria-hidden":"true"};function md(e,t,n,s,r,i){return m(),_("div",{class:ce(["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,ld)],8,od)):i.kind==="audio"&&r.url?(m(),_("audio",{key:1,src:r.url,controls:"",preload:"metadata"},null,8,ad)):i.kind==="video"&&r.url?(m(),_("video",{key:2,src:r.url,controls:"",preload:"metadata"},null,8,cd)):(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",dd,[u("span",fd,P(i.displayName),1),i.sizeLabel?(m(),_("span",hd,P(i.sizeLabel),1)):$("",!0)]),r.loading?(m(),_("span",pd)):$("",!0)],8,ud))],2)}const gd=_e(id,[["render",md],["__scopeId","data-v-1cd1267b"]]);function _d(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function vd(e){return/^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim())}const co="";function Yn(e){let t=e;const n=[];return t=t.replace(/`([^`\n]+)`/g,(s,r)=>{const i=n.length;return n.push(r),`${co}CODE${i}${co}`}),t=t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g,(s,r,i)=>vd(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 yd(e){if(!e)return"";const t=_d(e).split(`
69
69
  `),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(`
70
70
  `)}</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>${Yn(g)}</li>`).join("");n.push({type:"block",html:`<ul class="wm-md-ul">${c}</ul>`});continue}const l=/^\s*(\d+)\.\s+(.*)$/.exec(i);if(l){const f=parseInt(l[1],10),c=[l[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>${Yn(k)}</li>`).join(""),S=f!==1?` start="${f}"`:"";n.push({type:"block",html:`<ol class="wm-md-ol"${S}>${g}</ol>`});continue}const a=/^(#{1,6})\s+(.*)$/.exec(i);if(a){const f=a[1].length;n.push({type:"block",html:`<h${f} class="wm-md-h wm-md-h${f}">${Yn(a[2])}</h${f}>`}),s++;continue}n.push({type:"text",html:Yn(i)}),s++}let r="";for(let i=0;i<n.length;i++){const o=n[i];r+=o.html;const l=n[i+1];l&&o.type!=="block"&&l.type!=="block"&&(r+=`
71
- `)}return r}const bd={name:"WmBubble",props:{role:{type:String,default:"ai"},text:{type:String,default:""}},computed:{rendered(){return yd(this.text)}}},wd=["innerHTML"];function kd(e,t,n,s,r,i){return m(),_("div",{class:ce(["wm-bubble","wm-bubble--"+n.role])},[Ml(e.$slots,"default",{},()=>[u("span",{innerHTML:i.rendered},null,8,wd)])],2)}const Cd=_e(bd,[["render",kd],["__scopeId","data-v-5c9e9f2b"]]),Ad={name:"WmTyping"},Sd={class:"wm-typing"};function xd(e,t,n,s,r,i){return m(),_("div",Sd,[...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 Td=_e(Ad,[["render",xd],["__scopeId","data-v-df2447fd"]]);function Jn(e){return e?e.client_msg_id||e.id:""}const Md={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"},Ed=80,Od=200,Id={name:"WmMessageList",components:{AIAvatar:mn,HumanAvatar:lo,Bubble:Cd,Typing:Td,ActionResult:bu,AttachmentPreview:gd,ArtifactRenderer:rd},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:""}},emits:["load-more"],data(){return{silentFades:!1}},computed:{historyExhausted(){return!this.hasMore&&!this.loadingMore&&this.messages.length>=20},groups(){var t,n,s,r;const e=[];for(const i of this.messages){const o=this.roleOf(i);if(o==="system"){if(((t=i==null?void 0:i.payload)==null?void 0:t.event)==="action_admin_pending"){const f=e[e.length-1];f&&f.role==="ai"?f.messages.push(i):e.push({key:`g-${Jn(i)}`,role:"ai",agentName:"",agentAvatarUrl:null,messages:[i],items:[]});continue}e.push({key:`sys-${Jn(i)}`,role:o,messages:[i],items:[],systemLabel:this.systemLabel(i)});continue}const l=e[e.length-1];l&&l.role===o&&(o==="ai"||l.agentName===(((n=i==null?void 0:i.author)==null?void 0:n.name)||""))?l.messages.push(i):e.push({key:`g-${Jn(i)}`,role:o,agentName:((s=i==null?void 0:i.author)==null?void 0:s.name)||"",agentAvatarUrl:((r=i==null?void 0:i.author)==null?void 0:r.avatar_url)||null,messages:[i],items:[]})}for(const i of e){if(i.role==="system")continue;const o=[];for(const l of i.messages)for(const a of this.itemsOf(l))o.push(a);i.items=o}return e},unreadGroupKey(){if(!this.unreadAnchorTs)return null;for(const e of this.groups){if(e.role==="user"||e.role==="system")continue;const t=e.messages[0];if(t!=null&&t.created_at&&t.created_at>this.unreadAnchorTs)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()},methods:{messageKey:Jn,isAtBottom(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=Ed},onScroll(){const e=this.$refs.scrollEl;e&&(this.loadingMore||!this.hasMore||this._pendingLoadMore||e.scrollTop<=Od&&(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 a=o.el.getBoundingClientRect().top-e.getBoundingClientRect().top-o.relY;Math.abs(a)>.5&&(e.scrollTop+=a)};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,K,W;const n=e.items,s=(J=n[t])==null?void 0:J.kind,r=(K=n[t-1])==null?void 0:K.kind,i=(W=n[t+1])==null?void 0:W.kind,o=e.role==="user",l=14,a=4,f=r==null?void 0:r.bottom,c=i==null?void 0:i.top,g=(X,j)=>X==="card"&&j==="bubble";let S=l,k=l,N=l,O=l;return o?(f&&(k=a),(c||!i)&&(N=a),f&&g(f,s==null?void 0:s.top)&&(S=a),c&&g(c,s==null?void 0:s.bottom)&&(O=a)):(f&&(S=a),(c||!i)&&(O=a),f&&g(f,s==null?void 0:s.top)&&(k=a),c&&g(c,s==null?void 0:s.bottom)&&(N=a)),{tl:S,tr:k,br:N,bl:O}},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`}},lastTimeOf(e){const t=e.messages[e.messages.length-1];if(!(t!=null&&t.created_at))return"";try{return io(new Date(t.created_at))}catch{return""}},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,l;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)||((l=t.failure)==null?void 0:l.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=Md[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)}}},Ld={key:0,class:"wm-list__loadMore",role:"status","aria-live":"polite"},Rd={key:1,class:"wm-list__historyEnd"},Fd={key:2,class:"wm-list__sep"},Bd={class:"wm-list__sep-label"},$d={key:0,class:"wm-list__sep wm-list__sep--unread"},Pd={key:0,class:"wm-list__sysep"},Dd={class:"wm-list__sysep-label"},jd={key:0,class:"wm-list__avatarSlot"},Nd={key:5,class:"wm-list__body"},Hd={key:0},Ud={key:1,"aria-hidden":"true"},Vd={key:2},Wd={key:3,class:"wm-list__row wm-list__row--ai fade-up"},Kd={class:"wm-list__avatarSlot"};function zd(e,t,n,s,r,i){const o=me("AIAvatar"),l=me("HumanAvatar"),a=me("ActionResult"),f=me("ArtifactRenderer"),c=me("Bubble"),g=me("AttachmentPreview"),S=me("Typing");return m(),_("div",{ref:"scrollEl",class:ce(["wm-list",{"wm-list--silent":r.silentFades}]),onScrollPassive:t[0]||(t[0]=(...k)=>i.onScroll&&i.onScroll(...k))},[n.loadingMore?(m(),_("div",Ld,[...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",Rd,"Début de la conversation")):$("",!0),n.dateLabel?(m(),_("div",Fd,[t[2]||(t[2]=u("div",{class:"wm-list__line"},null,-1)),u("span",Bd,P(n.dateLabel),1),t[3]||(t[3]=u("div",{class:"wm-list__line"},null,-1))])):$("",!0),(m(!0),_(Y,null,Ce(i.groups,(k,N)=>(m(),_(Y,{key:k.key},[k.key===i.unreadGroupKey?(m(),_("div",$d,[...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),u("div",{class:ce(["wm-list__group","wm-list__group--"+k.role])},[k.role==="system"?(m(),_("div",Pd,[t[5]||(t[5]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1)),u("span",Dd,P(k.systemLabel),1),t[6]||(t[6]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1))])):(m(),_(Y,{key:1},[(m(!0),_(Y,null,Ce(k.items,(O,J)=>(m(),_("div",{key:`${i.messageKey(O.message)}-${O.partKey}`,class:ce(["wm-list__row fade-up",["wm-list__row--"+k.role,{"is-pending":O.message._pending,"is-failed":O.message._failed}]]),style:Ne(i.cornersStyle(k,J))},[k.role!=="user"?(m(),_("div",jd,[J===k.items.length-1?(m(),_(Y,{key:0},[k.role==="ai"?(m(),pe(o,{key:0,size:26,tail:!0})):(m(),pe(l,{key:1,name:k.agentName,"avatar-url":k.agentAvatarUrl,size:26},null,8,["name","avatar-url"]))],64)):$("",!0)])):$("",!0),O.renderAs==="action"?(m(),pe(a,{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"?(m(),pe(a,{key:2,state:"awaiting",label:"Demande d'approbation envoyée",detail:O.message.text_md||""},null,8,["detail"])):O.renderAs==="artifact-of-action"?(m(),pe(f,{key:3,artifact:i.actionArtifact(O.message)},null,8,["artifact"])):O.renderAs==="artifact"?(m(),pe(f,{key:4,artifact:i.artifactOf(O.message)},null,8,["artifact"])):(m(),_("div",Nd,[O.message.text_md?(m(),pe(c,{key:0,role:k.role,text:O.message.text_md},null,8,["role","text"])):$("",!0),i.attachmentsOf(O.message).length?(m(),_("div",{key:1,class:ce(["wm-list__atts",{"wm-list__atts--align-end":k.role==="user"}])},[(m(!0),_(Y,null,Ce(i.attachmentsOf(O.message),(K,W)=>(m(),pe(g,{key:`${i.messageKey(O.message)}-att-${W}`,attachment:K},null,8,["attachment"]))),128))],2)):$("",!0)]))],6))),128)),k.role!=="user"||i.lastTimeOf(k)?(m(),_("div",{key:0,class:ce(["wm-list__meta",{"wm-list__meta--right":k.role==="user"}])},[k.role!=="user"?(m(),_("span",Hd,P(i.roleLabel(k)),1)):$("",!0),k.role!=="user"&&i.lastTimeOf(k)?(m(),_("span",Ud,"·")):$("",!0),i.lastTimeOf(k)?(m(),_("span",Vd,P(i.lastTimeOf(k)),1)):$("",!0)],2)):$("",!0)],64))],2)],64))),128)),n.streamingActive?(m(),_("div",Wd,[u("div",Kd,[ge(o,{size:26,tail:!0})]),ge(S)])):$("",!0)],34)}const qd=_e(Id,[["render",zd],["__scopeId","data-v-0e60114e"]]),Xn=typeof navigator<"u"&&!!navigator.mediaDevices&&typeof navigator.mediaDevices.getDisplayMedia=="function",Ns=typeof window<"u"&&typeof window.MediaRecorder<"u";function Gd(){return Ns&&["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 uo({audio:e}){return{video:!0,audio:!!e,selfBrowserSurface:"include",surfaceSwitching:"include",systemAudio:e?"include":"exclude"}}async function Yd(){if(!Xn)return null;let e;try{e=await navigator.mediaDevices.getDisplayMedia(uo({audio:!1}))}catch(t){return(t==null?void 0:t.name)!=="NotAllowedError"&&console.error("[media] screenshot picker",t),null}try{return await Jd(e)}catch(t){return console.error("[media] screenshot capture",t),null}finally{e.getTracks().forEach(t=>{t.stop()})}}async function Jd(e){const t=document.createElement("video");t.muted=!0,t.playsInline=!0,t.srcObject=e,await t.play(),await new Promise(l=>requestAnimationFrame(l));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((l,a)=>{r.toBlob(f=>f?l(f):a(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 Xd(e={}){var f;if(!Xn||!Ns)return null;let t;try{t=await navigator.mediaDevices.getDisplayMedia(uo({audio:!0}))}catch(c){return(c==null?void 0:c.name)!=="NotAllowedError"&&console.error("[media] record picker",c),null}const n=Gd();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}),N=/mp4/.test(S)?"mp4":"webm",O=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),J=new File([k],`ecran-${O}.${N}`,{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",()=>l(),{once:!0})});function l(){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 a=Date.now();return i=setInterval(()=>{var c;(c=e.ontick)==null||c.call(e,Date.now()-a)},500),{stop:l,get state(){return s.state}}}const Qd=[{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"}],Zd={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 Qd.map(e=>({...e,disabled:e.action==="screenshot"&&!Xn||e.action==="record"&&(!Xn||!Ns)}))},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 Yd();e&&this.$emit("attach",e)},async startRecording(){if(this.recording||this.disabled)return;this.recordingElapsed=0;const e=await Xd({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)}}}},ef={class:"wm-compose-wrap"},tf={key:0,class:"wm-rec"},nf={class:"wm-rec__lbl"},sf={key:1,class:"wm-compose__menu",role:"menu"},rf=["disabled","onClick"],of={class:"wm-compose__menuIcon"},lf={viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},af=["d"],cf=["placeholder","disabled"],uf={class:"wm-compose__actions"},df=["title","aria-label","disabled"],ff=["disabled"];function hf(e,t,n,s,r,i){return m(),_("div",ef,[r.recording?(m(),_("div",tf,[t[8]||(t[8]=u("span",{class:"wm-rec__dot","aria-hidden":"true"},null,-1)),u("span",nf,"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:ce(["wm-compose",{"has-attach":r.attachOpen}]),onSubmit:t[7]||(t[7]=pn((...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)})):$("",!0),r.attachOpen?(m(),_("div",sf,[(m(!0),_(Y,null,Ce(i.attachItems,o=>(m(),_("button",{key:o.action,type:"button",class:"wm-compose__menuItem",disabled:o.disabled,onClick:l=>i.onAttachAction(o.action)},[u("span",of,[(m(),_("svg",lf,[u("path",{d:o.path,stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,af)]))]),u("span",null,P(o.label),1)],8,rf))),128))])):$("",!0),pt(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,cf),[[Ht,r.local]]),u("div",uf,[u("button",{type:"button",class:ce(["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,df),u("button",{type:"submit",class:ce(["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,ff)])],34)])}const pf=_e(Zd,[["render",hf],["__scopeId","data-v-14fa9ec0"]]),mf={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("§")}}},gf=["onClick"];function _f(e,t,n,s,r,i){return n.items.length?(m(),_("div",{key:i.batchKey,class:"wm-chips"},[(m(!0),_(Y,null,Ce(n.items,(o,l)=>(m(),_("button",{key:l,type:"button",class:"wm-chip",style:Ne({animationDelay:n.baseDelay+l*n.stepDelay+"ms"}),onClick:a=>e.$emit("select",o)},P(o.label),13,gf))),128))])):$("",!0)}const vf=_e(mf,[["render",_f],["__scopeId","data-v-55aa529d"]]),yf={name:"WmApprovalCard",components:{AIAvatar:mn},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"}}},bf={class:"wm-approval"},wf={class:"wm-approval__head"},kf={class:"wm-approval__icon"},Cf={class:"wm-approval__main"},Af={class:"wm-approval__title"},Sf={key:0,class:"wm-approval__detail"},xf={class:"wm-approval__actions"};function Tf(e,t,n,s,r,i){const o=me("AIAvatar");return m(),_("div",bf,[u("div",wf,[u("div",kf,[ge(o,{size:24})]),u("div",Cf,[u("div",Af,P(n.action),1),n.detail?(m(),_("div",Sf,P(n.detail),1)):$("",!0)])]),u("div",xf,[i.rejectId?(m(),_("button",{key:0,type:"button",class:"wm-approval__btn wm-approval__btn--neutral",onClick:t[0]||(t[0]=l=>e.$emit("callback",i.rejectId))},P(i.rejectLabel),1)):$("",!0),i.approveId?(m(),_("button",{key:1,type:"button",class:"wm-approval__btn wm-approval__btn--primary",onClick:t[1]||(t[1]=l=>e.$emit("callback",i.approveId))},P(i.approveLabel),1)):$("",!0)])])}const Mf=_e(yf,[["render",Tf],["__scopeId","data-v-b1be139c"]]);let fo=0;const Ef=new Set(["text","textarea","number","boolean","select","multiselect","date"]),Of={name:"WmFormCard",components:{AIAvatar:mn},props:{form:{type:Object,required:!0},readOnly:{type:Boolean,default:!1},initialValues:{type:Object,default:null}},emits:["submit"],data(){return fo+=1,{_uid:fo,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)||!Ef.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}}}},If={class:"wm-form"},Lf={class:"wm-form__head"},Rf={class:"wm-form__icon"},Ff={class:"wm-form__main"},Bf={class:"wm-form__title"},$f={key:0,class:"wm-form__detail"},Pf=["for"],Df={key:0,class:"wm-form__req","aria-hidden":"true"},jf=["id","onUpdate:modelValue","placeholder","required","disabled"],Nf=["id","onUpdate:modelValue","placeholder","required","disabled"],Hf=["id","onUpdate:modelValue","placeholder","required","disabled"],Uf=["id","onUpdate:modelValue","required","disabled"],Vf={key:4,class:"wm-form__bool"},Wf=["id","onUpdate:modelValue","disabled"],Kf=["id","onUpdate:modelValue","required","disabled"],zf={value:"",disabled:""},qf=["value"],Gf={key:6,class:"wm-form__multi"},Yf=["value","checked","disabled","onChange"],Jf={key:0,class:"wm-form__err"},Xf=["disabled"],Qf={key:0,class:"wm-form__spinner","aria-hidden":"true"},Zf={key:2,class:"wm-form__doneLbl"};function eh(e,t,n,s,r,i){const o=me("AIAvatar");return m(),_("div",If,[u("div",Lf,[u("div",Rf,[ge(o,{size:24})]),u("div",Ff,[u("div",Bf,P(n.form.title||"Formulaire"),1),n.form.description?(m(),_("div",$f,P(n.form.description),1)):$("",!0)])]),u("form",{class:"wm-form__body",onSubmit:t[0]||(t[0]=pn((...l)=>i.onSubmit&&i.onSubmit(...l),["prevent"]))},[(m(!0),_(Y,null,Ce(i.normalizedFields,l=>(m(),_("div",{key:l.key,class:"wm-form__field"},[u("label",{for:`wm-f-${r._uid}-${l.key}`,class:"wm-form__label"},[ln(P(l.label),1),l.required?(m(),_("span",Df,"*")):$("",!0)],8,Pf),l.type==="text"?pt((m(),_("input",{key:0,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"text",class:"wm-form__input",placeholder:l.placeholder||"",required:l.required,disabled:n.readOnly||r.busy},null,8,jf)),[[Ht,r.values[l.key]]]):l.type==="textarea"?pt((m(),_("textarea",{key:1,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,class:"wm-form__textarea",rows:"3",placeholder:l.placeholder||"",required:l.required,disabled:n.readOnly||r.busy},null,8,Nf)),[[Ht,r.values[l.key]]]):l.type==="number"?pt((m(),_("input",{key:2,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"number",class:"wm-form__input",placeholder:l.placeholder||"",required:l.required,disabled:n.readOnly||r.busy},null,8,Hf)),[[Ht,r.values[l.key],void 0,{number:!0}]]):l.type==="date"?pt((m(),_("input",{key:3,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"date",class:"wm-form__input",required:l.required,disabled:n.readOnly||r.busy},null,8,Uf)),[[Ht,r.values[l.key]]]):l.type==="boolean"?(m(),_("label",Vf,[pt(u("input",{id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"checkbox",disabled:n.readOnly||r.busy},null,8,Wf),[[Ka,r.values[l.key]]]),u("span",null,P(l.placeholder||"Oui"),1)])):l.type==="select"?pt((m(),_("select",{key:5,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,class:"wm-form__select",required:l.required,disabled:n.readOnly||r.busy},[u("option",zf,P(l.placeholder||"Choisir…"),1),(m(!0),_(Y,null,Ce(l.options,a=>(m(),_("option",{key:a.value,value:a.value},P(a.label),9,qf))),128))],8,Kf)),[[za,r.values[l.key]]]):l.type==="multiselect"?(m(),_("div",Gf,[(m(!0),_(Y,null,Ce(l.options,a=>(m(),_("label",{key:a.value,class:"wm-form__multiItem"},[u("input",{type:"checkbox",value:a.value,checked:Array.isArray(r.values[l.key])&&r.values[l.key].includes(a.value),disabled:n.readOnly||r.busy,onChange:f=>i.toggleMulti(l.key,a.value,f.target.checked)},null,40,Yf),u("span",null,P(a.label),1)]))),128))])):$("",!0)]))),128)),r.error?(m(),_("div",Jf,P(r.error),1)):$("",!0),n.readOnly?(m(),_("div",Zf,"Réponse envoyée")):(m(),_("button",{key:1,type:"submit",class:"wm-form__submit",disabled:r.busy},[r.busy?(m(),_("span",Qf)):$("",!0),u("span",null,P(r.busy?"Envoi…":n.form.submit_label||"Envoyer"),1)],8,Xf))],32)])}const th=_e(Of,[["render",eh],["__scopeId","data-v-64b40f76"]]),nh={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})}}},sh={class:"wm-fb"},rh={class:"wm-fb__row"},ih=["onClick"],oh={class:"wm-fb__emoji"},lh={class:"wm-fb__label"},ah=["disabled"],ch={key:1,class:"wm-fb__done"};function uh(e,t,n,s,r,i){return m(),_("div",sh,[n.done?(m(),_("div",ch,[...t[3]||(t[3]=[Ls('<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(),_(Y,{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",rh,[(m(!0),_(Y,null,Ce(r.options,o=>(m(),_("button",{key:o.v,type:"button",class:ce(["wm-fb__opt",{"is-selected":r.sel===o.v}]),onClick:l=>r.sel=o.v},[u("span",oh,P(o.e),1),u("span",lh,P(o.l),1)],10,ih))),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,ah)],64))])}const dh=_e(nh,[["render",uh],["__scopeId","data-v-6f45ff3b"]]);function fh(e){const t=new Date(e);return t.setHours(0,0,0,0),t}const hh={name:"WmHistoryDrawer",props:{conversations:{type:Array,default:()=>[]},activeId:{type:[String,Number],default:null}},emits:["close","new","pick"],data(){return{query:""}},computed:{normalized(){return(Array.isArray(this.conversations)?this.conversations.slice():[]).map(t=>{var r;const n=t.last_message_at||t.updated_at||t.created_at||null,s=n?Date.parse(n):0;return{id:t.id,raw:t,title:t.name||"Nouvelle conversation",preview:t._preview||t.last_message_preview||t.preview||((r=t.metadata)==null?void 0:r.last_preview)||"",unread:!!t._unread,stamp:s}}).sort((t,n)=>n.stamp-t.stamp)},filtered(){const e=this.query.trim().toLowerCase();return e?this.normalized.filter(t=>(t.title||"").toLowerCase().includes(e)||(t.preview||"").toLowerCase().includes(e)):this.normalized},groups(){const t=fh(new Date).getTime(),n=t-6*864e5,s=[],r=[],i=[];for(const o of this.filtered){if(!o.stamp){i.push(o);continue}o.stamp>=t?s.push(o):o.stamp>=n?r.push(o):i.push(o)}return[{key:"today",label:"Aujourd'hui",items:s},{key:"week",label:"Cette semaine",items:r},{key:"older",label:"Plus ancien",items:i}]},hasAny(){return this.filtered.length>0}}},ph={class:"wm-hd"},mh={class:"wm-hd__panel",role:"dialog","aria-label":"Vos discussions"},gh={class:"wm-hd__head"},_h={class:"wm-hd__top"},vh={class:"wm-hd__search"},yh={class:"wm-hd__list"},bh={key:0,class:"wm-hd__group"},wh={class:"wm-hd__groupLabel"},kh={class:"wm-hd__rows"},Ch=["onClick"],Ah={class:"wm-hd__rowIcon"},Sh={key:0,class:"wm-hd__rowDot","aria-label":"Message non lu"},xh={class:"wm-hd__rowBody"},Th={class:"wm-hd__rowTop"},Mh={class:"wm-hd__rowTitle"},Eh={class:"wm-hd__rowPreview"},Oh={key:0,class:"wm-hd__empty"};function Ih(e,t,n,s,r,i){return m(),_("div",ph,[u("div",{class:"wm-hd__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("aside",mh,[u("div",gh,[t[5]||(t[5]=u("div",{class:"wm-hd__heading"},[u("div",{class:"wm-hd__title"},"Vos discussions"),u("div",{class:"wm-hd__sub"},"Reprenez là où vous en étiez.")],-1)),u("button",{type:"button",class:"wm-hd__close","aria-label":"Fermer",onClick:t[1]||(t[1]=o=>e.$emit("close"))},[...t[4]||(t[4]=[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",_h,[u("button",{type:"button",class:"wm-hd__new",onClick:t[2]||(t[2]=o=>e.$emit("new"))},[...t[6]||(t[6]=[u("span",{class:"wm-hd__newIcon"},[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émarrer un nouveau fil",-1)])]),u("div",vh,[t[7]||(t[7]=u("span",{class:"wm-hd__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)),pt(u("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>r.query=o),type:"text",placeholder:"Rechercher dans vos messages","aria-label":"Rechercher dans vos messages"},null,512),[[Ht,r.query]])])]),u("div",yh,[(m(!0),_(Y,null,Ce(i.groups,o=>(m(),_(Y,{key:o.key},[o.items.length?(m(),_("div",bh,[u("div",wh,P(o.label),1),u("div",kh,[(m(!0),_(Y,null,Ce(o.items,l=>(m(),_("button",{key:l.id,type:"button",class:ce(["wm-hd__row",{"wm-hd__row--active":l.id===n.activeId,"wm-hd__row--unread":l.unread}]),onClick:a=>e.$emit("pick",l)},[u("div",Ah,[t[8]||(t[8]=u("svg",{width:"11",height:"11",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:"white",opacity:"0.92"})],-1)),l.unread?(m(),_("span",Sh)):$("",!0)]),u("div",xh,[u("div",Th,[u("span",Mh,P(l.title),1)]),u("div",Eh,P(l.preview||"Aucun message"),1)])],10,Ch))),128))])])):$("",!0)],64))),128)),i.hasAny?$("",!0):(m(),_("div",Oh," Aucun fil pour le moment. "))])])])}const Lh=_e(hh,[["render",Ih],["__scopeId","data-v-1259e822"]]),Rh={name:"WmMoreMenu",props:{canRename:{type:Boolean,default:!0},canClear:{type:Boolean,default:!0},canExport:{type:Boolean,default:!0},notifEnabled:{type:Boolean,default:!0},statusUrl:{type:String,default:""},helpUrl:{type:String,default:""}},emits:["close","action","notif-toggle"],data(){return{notifOn:this.notifEnabled}},watch:{notifEnabled(e){this.notifOn=!!e}},methods:{emit(e){this.$emit("action",e)},toggleNotif(){this.notifOn=!this.notifOn,this.$emit("notif-toggle",this.notifOn)}}},Fh={class:"wm-mm"},Bh={class:"wm-mm__pop",role:"menu"},$h={class:"wm-mm__section"},Ph={class:"wm-mm__section"},Dh={class:"wm-mm__section"};function jh(e,t,n,s,r,i){return m(),_("div",Fh,[u("div",{class:"wm-mm__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("div",Bh,[u("div",$h,[u("button",{type:"button",class:"wm-mm__item",onClick:t[1]||(t[1]=o=>i.emit("history"))},[...t[8]||(t[8]=[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:"M3 3v5h5M3.05 13A9 9 0 1 0 6 5.3L3 8M12 7v5l4 2"})])],-1),u("span",{class:"wm-mm__label"},"Historique des discussions",-1)])]),n.canRename?(m(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[2]||(t[2]=o=>i.emit("rename"))},[...t[9]||(t[9]=[Ls('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M12 20h9" data-v-c1bb81d2></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-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Renommer le fil</span>',2)])])):$("",!0),n.canClear?(m(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[3]||(t[3]=o=>i.emit("clear"))},[...t[10]||(t[10]=[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:"M4 7h16M10 11v6M14 11v6M5 7l1 13a2 2 0 002 2h8a2 2 0 002-2l1-13M9 7V4a1 1 0 011-1h4a1 1 0 011 1v3"})])],-1),u("span",{class:"wm-mm__label"},"Effacer ce fil",-1)])])):$("",!0),n.canExport?(m(),_("button",{key:2,type:"button",class:"wm-mm__item",onClick:t[4]||(t[4]=o=>i.emit("export"))},[...t[11]||(t[11]=[Ls('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Exporter la transcription</span><span class="wm-mm__hint" data-v-c1bb81d2>.txt</span>',3)])])):$("",!0)]),t[17]||(t[17]=u("div",{class:"wm-mm__sep"},null,-1)),u("div",Ph,[u("button",{type:"button",class:"wm-mm__item",onClick:t[5]||(t[5]=(...o)=>i.toggleNotif&&i.toggleNotif(...o))},[t[13]||(t[13]=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[14]||(t[14]=u("span",{class:"wm-mm__label"},"Notifications",-1)),u("span",{class:ce(["wm-mm__toggle",{"wm-mm__toggle--on":r.notifOn}])},[...t[12]||(t[12]=[u("span",{class:"wm-mm__knob"},null,-1)])],2)])]),t[18]||(t[18]=u("div",{class:"wm-mm__sep"},null,-1)),u("div",Dh,[n.statusUrl?(m(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[6]||(t[6]=o=>i.emit("status"))},[...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:"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?(m(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[7]||(t[7]=o=>i.emit("help"))},[...t[16]||(t[16]=[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 Nh=_e(Rh,[["render",jh],["__scopeId","data-v-c1bb81d2"]]),ho="ww-messenger-tokens";function Hs(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 Hh(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;let o;if(Array.isArray(i)){if(o=i.map(l=>Qn(r,String(l))).join(", "),!o)continue}else typeof i=="boolean"?o=i?"Oui":"Non":o=Qn(r,String(i));s.push(`${r.label} :
71
+ `)}return r}const bd={name:"WmBubble",props:{role:{type:String,default:"ai"},text:{type:String,default:""}},computed:{rendered(){return yd(this.text)}}},wd=["innerHTML"];function kd(e,t,n,s,r,i){return m(),_("div",{class:ce(["wm-bubble","wm-bubble--"+n.role])},[Ml(e.$slots,"default",{},()=>[u("span",{innerHTML:i.rendered},null,8,wd)])],2)}const Cd=_e(bd,[["render",kd],["__scopeId","data-v-5c9e9f2b"]]),Ad={name:"WmTyping"},Sd={class:"wm-typing"};function xd(e,t,n,s,r,i){return m(),_("div",Sd,[...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 Td=_e(Ad,[["render",xd],["__scopeId","data-v-df2447fd"]]);function Jn(e){return e?e.client_msg_id||e.id:""}const Md={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"},Ed=80,Od=200,Id={name:"WmMessageList",components:{AIAvatar:mn,HumanAvatar:lo,Bubble:Cd,Typing:Td,ActionResult:bu,AttachmentPreview:gd,ArtifactRenderer:rd},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:""}},emits:["load-more"],data(){return{silentFades:!1}},computed:{historyExhausted(){return!this.hasMore&&!this.loadingMore&&this.messages.length>=20},groups(){var t,n,s,r;const e=[];for(const i of this.messages){const o=this.roleOf(i);if(o==="system"){if(((t=i==null?void 0:i.payload)==null?void 0:t.event)==="action_admin_pending"){const f=e[e.length-1];f&&f.role==="ai"?f.messages.push(i):e.push({key:`g-${Jn(i)}`,role:"ai",agentName:"",agentAvatarUrl:null,messages:[i],items:[]});continue}e.push({key:`sys-${Jn(i)}`,role:o,messages:[i],items:[],systemLabel:this.systemLabel(i)});continue}const l=e[e.length-1];l&&l.role===o&&(o==="ai"||l.agentName===(((n=i==null?void 0:i.author)==null?void 0:n.name)||""))?l.messages.push(i):e.push({key:`g-${Jn(i)}`,role:o,agentName:((s=i==null?void 0:i.author)==null?void 0:s.name)||"",agentAvatarUrl:((r=i==null?void 0:i.author)==null?void 0:r.avatar_url)||null,messages:[i],items:[]})}for(const i of e){if(i.role==="system")continue;const o=[];for(const l of i.messages)for(const a of this.itemsOf(l))o.push(a);i.items=o}return e},unreadGroupKey(){if(!this.unreadAnchorTs)return null;for(const e of this.groups){if(e.role==="user"||e.role==="system")continue;const t=e.messages[0];if(t!=null&&t.created_at&&t.created_at>this.unreadAnchorTs)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()},methods:{messageKey:Jn,isAtBottom(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=Ed},onScroll(){const e=this.$refs.scrollEl;e&&(this.loadingMore||!this.hasMore||this._pendingLoadMore||e.scrollTop<=Od&&(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 a=o.el.getBoundingClientRect().top-e.getBoundingClientRect().top-o.relY;Math.abs(a)>.5&&(e.scrollTop+=a)};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,K,W;const n=e.items,s=(J=n[t])==null?void 0:J.kind,r=(K=n[t-1])==null?void 0:K.kind,i=(W=n[t+1])==null?void 0:W.kind,o=e.role==="user",l=14,a=4,f=r==null?void 0:r.bottom,c=i==null?void 0:i.top,g=(X,j)=>X===j||X==="card"&&j==="bubble";let S=l,k=l,N=l,O=l;return o?(f&&(k=a),(c||!i)&&(N=a),f&&g(f,s==null?void 0:s.top)&&(S=a),c&&g(c,s==null?void 0:s.bottom)&&(O=a)):(f&&(S=a),(c||!i)&&(O=a),f&&g(f,s==null?void 0:s.top)&&(k=a),c&&g(c,s==null?void 0:s.bottom)&&(N=a)),{tl:S,tr:k,br:N,bl:O}},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`}},lastTimeOf(e){const t=e.messages[e.messages.length-1];if(!(t!=null&&t.created_at))return"";try{return io(new Date(t.created_at))}catch{return""}},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,l;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)||((l=t.failure)==null?void 0:l.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=Md[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)}}},Ld={key:0,class:"wm-list__loadMore",role:"status","aria-live":"polite"},Rd={key:1,class:"wm-list__historyEnd"},Fd={key:2,class:"wm-list__sep"},Bd={class:"wm-list__sep-label"},$d={key:0,class:"wm-list__sep wm-list__sep--unread"},Pd={key:0,class:"wm-list__sysep"},Dd={class:"wm-list__sysep-label"},jd={key:0,class:"wm-list__avatarSlot"},Nd={key:5,class:"wm-list__body"},Hd={key:0},Ud={key:1,"aria-hidden":"true"},Vd={key:2},Wd={key:3,class:"wm-list__row wm-list__row--ai fade-up"},Kd={class:"wm-list__avatarSlot"};function zd(e,t,n,s,r,i){const o=me("AIAvatar"),l=me("HumanAvatar"),a=me("ActionResult"),f=me("ArtifactRenderer"),c=me("Bubble"),g=me("AttachmentPreview"),S=me("Typing");return m(),_("div",{ref:"scrollEl",class:ce(["wm-list",{"wm-list--silent":r.silentFades}]),onScrollPassive:t[0]||(t[0]=(...k)=>i.onScroll&&i.onScroll(...k))},[n.loadingMore?(m(),_("div",Ld,[...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",Rd,"Début de la conversation")):$("",!0),n.dateLabel?(m(),_("div",Fd,[t[2]||(t[2]=u("div",{class:"wm-list__line"},null,-1)),u("span",Bd,P(n.dateLabel),1),t[3]||(t[3]=u("div",{class:"wm-list__line"},null,-1))])):$("",!0),(m(!0),_(Y,null,Ce(i.groups,(k,N)=>(m(),_(Y,{key:k.key},[k.key===i.unreadGroupKey?(m(),_("div",$d,[...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),u("div",{class:ce(["wm-list__group","wm-list__group--"+k.role])},[k.role==="system"?(m(),_("div",Pd,[t[5]||(t[5]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1)),u("span",Dd,P(k.systemLabel),1),t[6]||(t[6]=u("div",{class:"wm-list__line wm-list__line--strong"},null,-1))])):(m(),_(Y,{key:1},[(m(!0),_(Y,null,Ce(k.items,(O,J)=>(m(),_("div",{key:`${i.messageKey(O.message)}-${O.partKey}`,class:ce(["wm-list__row fade-up",["wm-list__row--"+k.role,{"is-pending":O.message._pending,"is-failed":O.message._failed}]]),style:Ne(i.cornersStyle(k,J))},[k.role!=="user"?(m(),_("div",jd,[J===k.items.length-1?(m(),_(Y,{key:0},[k.role==="ai"?(m(),pe(o,{key:0,size:26,tail:!0})):(m(),pe(l,{key:1,name:k.agentName,"avatar-url":k.agentAvatarUrl,size:26},null,8,["name","avatar-url"]))],64)):$("",!0)])):$("",!0),O.renderAs==="action"?(m(),pe(a,{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"?(m(),pe(a,{key:2,state:"awaiting",label:"Demande d'approbation envoyée",detail:O.message.text_md||""},null,8,["detail"])):O.renderAs==="artifact-of-action"?(m(),pe(f,{key:3,artifact:i.actionArtifact(O.message)},null,8,["artifact"])):O.renderAs==="artifact"?(m(),pe(f,{key:4,artifact:i.artifactOf(O.message)},null,8,["artifact"])):(m(),_("div",Nd,[O.message.text_md?(m(),pe(c,{key:0,role:k.role,text:O.message.text_md},null,8,["role","text"])):$("",!0),i.attachmentsOf(O.message).length?(m(),_("div",{key:1,class:ce(["wm-list__atts",{"wm-list__atts--align-end":k.role==="user"}])},[(m(!0),_(Y,null,Ce(i.attachmentsOf(O.message),(K,W)=>(m(),pe(g,{key:`${i.messageKey(O.message)}-att-${W}`,attachment:K},null,8,["attachment"]))),128))],2)):$("",!0)]))],6))),128)),k.role!=="user"||i.lastTimeOf(k)?(m(),_("div",{key:0,class:ce(["wm-list__meta",{"wm-list__meta--right":k.role==="user"}])},[k.role!=="user"?(m(),_("span",Hd,P(i.roleLabel(k)),1)):$("",!0),k.role!=="user"&&i.lastTimeOf(k)?(m(),_("span",Ud,"·")):$("",!0),i.lastTimeOf(k)?(m(),_("span",Vd,P(i.lastTimeOf(k)),1)):$("",!0)],2)):$("",!0)],64))],2)],64))),128)),n.streamingActive?(m(),_("div",Wd,[u("div",Kd,[ge(o,{size:26,tail:!0})]),ge(S)])):$("",!0)],34)}const qd=_e(Id,[["render",zd],["__scopeId","data-v-0e691378"]]),Xn=typeof navigator<"u"&&!!navigator.mediaDevices&&typeof navigator.mediaDevices.getDisplayMedia=="function",Ns=typeof window<"u"&&typeof window.MediaRecorder<"u";function Gd(){return Ns&&["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 uo({audio:e}){return{video:!0,audio:!!e,selfBrowserSurface:"include",surfaceSwitching:"include",systemAudio:e?"include":"exclude"}}async function Yd(){if(!Xn)return null;let e;try{e=await navigator.mediaDevices.getDisplayMedia(uo({audio:!1}))}catch(t){return(t==null?void 0:t.name)!=="NotAllowedError"&&console.error("[media] screenshot picker",t),null}try{return await Jd(e)}catch(t){return console.error("[media] screenshot capture",t),null}finally{e.getTracks().forEach(t=>{t.stop()})}}async function Jd(e){const t=document.createElement("video");t.muted=!0,t.playsInline=!0,t.srcObject=e,await t.play(),await new Promise(l=>requestAnimationFrame(l));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((l,a)=>{r.toBlob(f=>f?l(f):a(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 Xd(e={}){var f;if(!Xn||!Ns)return null;let t;try{t=await navigator.mediaDevices.getDisplayMedia(uo({audio:!0}))}catch(c){return(c==null?void 0:c.name)!=="NotAllowedError"&&console.error("[media] record picker",c),null}const n=Gd();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}),N=/mp4/.test(S)?"mp4":"webm",O=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),J=new File([k],`ecran-${O}.${N}`,{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",()=>l(),{once:!0})});function l(){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 a=Date.now();return i=setInterval(()=>{var c;(c=e.ontick)==null||c.call(e,Date.now()-a)},500),{stop:l,get state(){return s.state}}}const Qd=[{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"}],Zd={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 Qd.map(e=>({...e,disabled:e.action==="screenshot"&&!Xn||e.action==="record"&&(!Xn||!Ns)}))},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 Yd();e&&this.$emit("attach",e)},async startRecording(){if(this.recording||this.disabled)return;this.recordingElapsed=0;const e=await Xd({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)}}}},ef={class:"wm-compose-wrap"},tf={key:0,class:"wm-rec"},nf={class:"wm-rec__lbl"},sf={key:1,class:"wm-compose__menu",role:"menu"},rf=["disabled","onClick"],of={class:"wm-compose__menuIcon"},lf={viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},af=["d"],cf=["placeholder","disabled"],uf={class:"wm-compose__actions"},df=["title","aria-label","disabled"],ff=["disabled"];function hf(e,t,n,s,r,i){return m(),_("div",ef,[r.recording?(m(),_("div",tf,[t[8]||(t[8]=u("span",{class:"wm-rec__dot","aria-hidden":"true"},null,-1)),u("span",nf,"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:ce(["wm-compose",{"has-attach":r.attachOpen}]),onSubmit:t[7]||(t[7]=pn((...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)})):$("",!0),r.attachOpen?(m(),_("div",sf,[(m(!0),_(Y,null,Ce(i.attachItems,o=>(m(),_("button",{key:o.action,type:"button",class:"wm-compose__menuItem",disabled:o.disabled,onClick:l=>i.onAttachAction(o.action)},[u("span",of,[(m(),_("svg",lf,[u("path",{d:o.path,stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,af)]))]),u("span",null,P(o.label),1)],8,rf))),128))])):$("",!0),pt(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,cf),[[Ht,r.local]]),u("div",uf,[u("button",{type:"button",class:ce(["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,df),u("button",{type:"submit",class:ce(["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,ff)])],34)])}const pf=_e(Zd,[["render",hf],["__scopeId","data-v-14fa9ec0"]]),mf={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("§")}}},gf=["onClick"];function _f(e,t,n,s,r,i){return n.items.length?(m(),_("div",{key:i.batchKey,class:"wm-chips"},[(m(!0),_(Y,null,Ce(n.items,(o,l)=>(m(),_("button",{key:l,type:"button",class:"wm-chip",style:Ne({animationDelay:n.baseDelay+l*n.stepDelay+"ms"}),onClick:a=>e.$emit("select",o)},P(o.label),13,gf))),128))])):$("",!0)}const vf=_e(mf,[["render",_f],["__scopeId","data-v-55aa529d"]]),yf={name:"WmApprovalCard",components:{AIAvatar:mn},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"}}},bf={class:"wm-approval"},wf={class:"wm-approval__head"},kf={class:"wm-approval__icon"},Cf={class:"wm-approval__main"},Af={class:"wm-approval__title"},Sf={key:0,class:"wm-approval__detail"},xf={class:"wm-approval__actions"};function Tf(e,t,n,s,r,i){const o=me("AIAvatar");return m(),_("div",bf,[u("div",wf,[u("div",kf,[ge(o,{size:24})]),u("div",Cf,[u("div",Af,P(n.action),1),n.detail?(m(),_("div",Sf,P(n.detail),1)):$("",!0)])]),u("div",xf,[i.rejectId?(m(),_("button",{key:0,type:"button",class:"wm-approval__btn wm-approval__btn--neutral",onClick:t[0]||(t[0]=l=>e.$emit("callback",i.rejectId))},P(i.rejectLabel),1)):$("",!0),i.approveId?(m(),_("button",{key:1,type:"button",class:"wm-approval__btn wm-approval__btn--primary",onClick:t[1]||(t[1]=l=>e.$emit("callback",i.approveId))},P(i.approveLabel),1)):$("",!0)])])}const Mf=_e(yf,[["render",Tf],["__scopeId","data-v-b1be139c"]]);let fo=0;const Ef=new Set(["text","textarea","number","boolean","select","multiselect","date"]),Of={name:"WmFormCard",components:{AIAvatar:mn},props:{form:{type:Object,required:!0},readOnly:{type:Boolean,default:!1},initialValues:{type:Object,default:null}},emits:["submit"],data(){return fo+=1,{_uid:fo,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)||!Ef.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}}}},If={class:"wm-form"},Lf={class:"wm-form__head"},Rf={class:"wm-form__icon"},Ff={class:"wm-form__main"},Bf={class:"wm-form__title"},$f={key:0,class:"wm-form__detail"},Pf=["for"],Df={key:0,class:"wm-form__req","aria-hidden":"true"},jf=["id","onUpdate:modelValue","placeholder","required","disabled"],Nf=["id","onUpdate:modelValue","placeholder","required","disabled"],Hf=["id","onUpdate:modelValue","placeholder","required","disabled"],Uf=["id","onUpdate:modelValue","required","disabled"],Vf={key:4,class:"wm-form__bool"},Wf=["id","onUpdate:modelValue","disabled"],Kf=["id","onUpdate:modelValue","required","disabled"],zf={value:"",disabled:""},qf=["value"],Gf={key:6,class:"wm-form__multi"},Yf=["value","checked","disabled","onChange"],Jf={key:0,class:"wm-form__err"},Xf=["disabled"],Qf={key:0,class:"wm-form__spinner","aria-hidden":"true"},Zf={key:2,class:"wm-form__doneLbl"};function eh(e,t,n,s,r,i){const o=me("AIAvatar");return m(),_("div",If,[u("div",Lf,[u("div",Rf,[ge(o,{size:24})]),u("div",Ff,[u("div",Bf,P(n.form.title||"Formulaire"),1),n.form.description?(m(),_("div",$f,P(n.form.description),1)):$("",!0)])]),u("form",{class:"wm-form__body",onSubmit:t[0]||(t[0]=pn((...l)=>i.onSubmit&&i.onSubmit(...l),["prevent"]))},[(m(!0),_(Y,null,Ce(i.normalizedFields,l=>(m(),_("div",{key:l.key,class:"wm-form__field"},[u("label",{for:`wm-f-${r._uid}-${l.key}`,class:"wm-form__label"},[ln(P(l.label),1),l.required?(m(),_("span",Df,"*")):$("",!0)],8,Pf),l.type==="text"?pt((m(),_("input",{key:0,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"text",class:"wm-form__input",placeholder:l.placeholder||"",required:l.required,disabled:n.readOnly||r.busy},null,8,jf)),[[Ht,r.values[l.key]]]):l.type==="textarea"?pt((m(),_("textarea",{key:1,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,class:"wm-form__textarea",rows:"3",placeholder:l.placeholder||"",required:l.required,disabled:n.readOnly||r.busy},null,8,Nf)),[[Ht,r.values[l.key]]]):l.type==="number"?pt((m(),_("input",{key:2,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"number",class:"wm-form__input",placeholder:l.placeholder||"",required:l.required,disabled:n.readOnly||r.busy},null,8,Hf)),[[Ht,r.values[l.key],void 0,{number:!0}]]):l.type==="date"?pt((m(),_("input",{key:3,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"date",class:"wm-form__input",required:l.required,disabled:n.readOnly||r.busy},null,8,Uf)),[[Ht,r.values[l.key]]]):l.type==="boolean"?(m(),_("label",Vf,[pt(u("input",{id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,type:"checkbox",disabled:n.readOnly||r.busy},null,8,Wf),[[Ka,r.values[l.key]]]),u("span",null,P(l.placeholder||"Oui"),1)])):l.type==="select"?pt((m(),_("select",{key:5,id:`wm-f-${r._uid}-${l.key}`,"onUpdate:modelValue":a=>r.values[l.key]=a,class:"wm-form__select",required:l.required,disabled:n.readOnly||r.busy},[u("option",zf,P(l.placeholder||"Choisir…"),1),(m(!0),_(Y,null,Ce(l.options,a=>(m(),_("option",{key:a.value,value:a.value},P(a.label),9,qf))),128))],8,Kf)),[[za,r.values[l.key]]]):l.type==="multiselect"?(m(),_("div",Gf,[(m(!0),_(Y,null,Ce(l.options,a=>(m(),_("label",{key:a.value,class:"wm-form__multiItem"},[u("input",{type:"checkbox",value:a.value,checked:Array.isArray(r.values[l.key])&&r.values[l.key].includes(a.value),disabled:n.readOnly||r.busy,onChange:f=>i.toggleMulti(l.key,a.value,f.target.checked)},null,40,Yf),u("span",null,P(a.label),1)]))),128))])):$("",!0)]))),128)),r.error?(m(),_("div",Jf,P(r.error),1)):$("",!0),n.readOnly?(m(),_("div",Zf,"Réponse envoyée")):(m(),_("button",{key:1,type:"submit",class:"wm-form__submit",disabled:r.busy},[r.busy?(m(),_("span",Qf)):$("",!0),u("span",null,P(r.busy?"Envoi…":n.form.submit_label||"Envoyer"),1)],8,Xf))],32)])}const th=_e(Of,[["render",eh],["__scopeId","data-v-64b40f76"]]),nh={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})}}},sh={class:"wm-fb"},rh={class:"wm-fb__row"},ih=["onClick"],oh={class:"wm-fb__emoji"},lh={class:"wm-fb__label"},ah=["disabled"],ch={key:1,class:"wm-fb__done"};function uh(e,t,n,s,r,i){return m(),_("div",sh,[n.done?(m(),_("div",ch,[...t[3]||(t[3]=[Ls('<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(),_(Y,{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",rh,[(m(!0),_(Y,null,Ce(r.options,o=>(m(),_("button",{key:o.v,type:"button",class:ce(["wm-fb__opt",{"is-selected":r.sel===o.v}]),onClick:l=>r.sel=o.v},[u("span",oh,P(o.e),1),u("span",lh,P(o.l),1)],10,ih))),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,ah)],64))])}const dh=_e(nh,[["render",uh],["__scopeId","data-v-6f45ff3b"]]);function fh(e){const t=new Date(e);return t.setHours(0,0,0,0),t}const hh={name:"WmHistoryDrawer",props:{conversations:{type:Array,default:()=>[]},activeId:{type:[String,Number],default:null}},emits:["close","new","pick"],data(){return{query:""}},computed:{normalized(){return(Array.isArray(this.conversations)?this.conversations.slice():[]).map(t=>{var r;const n=t.last_message_at||t.updated_at||t.created_at||null,s=n?Date.parse(n):0;return{id:t.id,raw:t,title:t.name||"Nouvelle conversation",preview:t._preview||t.last_message_preview||t.preview||((r=t.metadata)==null?void 0:r.last_preview)||"",unread:!!t._unread,stamp:s}}).sort((t,n)=>n.stamp-t.stamp)},filtered(){const e=this.query.trim().toLowerCase();return e?this.normalized.filter(t=>(t.title||"").toLowerCase().includes(e)||(t.preview||"").toLowerCase().includes(e)):this.normalized},groups(){const t=fh(new Date).getTime(),n=t-6*864e5,s=[],r=[],i=[];for(const o of this.filtered){if(!o.stamp){i.push(o);continue}o.stamp>=t?s.push(o):o.stamp>=n?r.push(o):i.push(o)}return[{key:"today",label:"Aujourd'hui",items:s},{key:"week",label:"Cette semaine",items:r},{key:"older",label:"Plus ancien",items:i}]},hasAny(){return this.filtered.length>0}}},ph={class:"wm-hd"},mh={class:"wm-hd__panel",role:"dialog","aria-label":"Vos discussions"},gh={class:"wm-hd__head"},_h={class:"wm-hd__top"},vh={class:"wm-hd__search"},yh={class:"wm-hd__list"},bh={key:0,class:"wm-hd__group"},wh={class:"wm-hd__groupLabel"},kh={class:"wm-hd__rows"},Ch=["onClick"],Ah={class:"wm-hd__rowIcon"},Sh={key:0,class:"wm-hd__rowDot","aria-label":"Message non lu"},xh={class:"wm-hd__rowBody"},Th={class:"wm-hd__rowTop"},Mh={class:"wm-hd__rowTitle"},Eh={class:"wm-hd__rowPreview"},Oh={key:0,class:"wm-hd__empty"};function Ih(e,t,n,s,r,i){return m(),_("div",ph,[u("div",{class:"wm-hd__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("aside",mh,[u("div",gh,[t[5]||(t[5]=u("div",{class:"wm-hd__heading"},[u("div",{class:"wm-hd__title"},"Vos discussions"),u("div",{class:"wm-hd__sub"},"Reprenez là où vous en étiez.")],-1)),u("button",{type:"button",class:"wm-hd__close","aria-label":"Fermer",onClick:t[1]||(t[1]=o=>e.$emit("close"))},[...t[4]||(t[4]=[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",_h,[u("button",{type:"button",class:"wm-hd__new",onClick:t[2]||(t[2]=o=>e.$emit("new"))},[...t[6]||(t[6]=[u("span",{class:"wm-hd__newIcon"},[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émarrer un nouveau fil",-1)])]),u("div",vh,[t[7]||(t[7]=u("span",{class:"wm-hd__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)),pt(u("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>r.query=o),type:"text",placeholder:"Rechercher dans vos messages","aria-label":"Rechercher dans vos messages"},null,512),[[Ht,r.query]])])]),u("div",yh,[(m(!0),_(Y,null,Ce(i.groups,o=>(m(),_(Y,{key:o.key},[o.items.length?(m(),_("div",bh,[u("div",wh,P(o.label),1),u("div",kh,[(m(!0),_(Y,null,Ce(o.items,l=>(m(),_("button",{key:l.id,type:"button",class:ce(["wm-hd__row",{"wm-hd__row--active":l.id===n.activeId,"wm-hd__row--unread":l.unread}]),onClick:a=>e.$emit("pick",l)},[u("div",Ah,[t[8]||(t[8]=u("svg",{width:"11",height:"11",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:"white",opacity:"0.92"})],-1)),l.unread?(m(),_("span",Sh)):$("",!0)]),u("div",xh,[u("div",Th,[u("span",Mh,P(l.title),1)]),u("div",Eh,P(l.preview||"Aucun message"),1)])],10,Ch))),128))])])):$("",!0)],64))),128)),i.hasAny?$("",!0):(m(),_("div",Oh," Aucun fil pour le moment. "))])])])}const Lh=_e(hh,[["render",Ih],["__scopeId","data-v-1259e822"]]),Rh={name:"WmMoreMenu",props:{canRename:{type:Boolean,default:!0},canClear:{type:Boolean,default:!0},canExport:{type:Boolean,default:!0},notifEnabled:{type:Boolean,default:!0},statusUrl:{type:String,default:""},helpUrl:{type:String,default:""}},emits:["close","action","notif-toggle"],data(){return{notifOn:this.notifEnabled}},watch:{notifEnabled(e){this.notifOn=!!e}},methods:{emit(e){this.$emit("action",e)},toggleNotif(){this.notifOn=!this.notifOn,this.$emit("notif-toggle",this.notifOn)}}},Fh={class:"wm-mm"},Bh={class:"wm-mm__pop",role:"menu"},$h={class:"wm-mm__section"},Ph={class:"wm-mm__section"},Dh={class:"wm-mm__section"};function jh(e,t,n,s,r,i){return m(),_("div",Fh,[u("div",{class:"wm-mm__scrim",onClick:t[0]||(t[0]=o=>e.$emit("close"))}),u("div",Bh,[u("div",$h,[u("button",{type:"button",class:"wm-mm__item",onClick:t[1]||(t[1]=o=>i.emit("history"))},[...t[8]||(t[8]=[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:"M3 3v5h5M3.05 13A9 9 0 1 0 6 5.3L3 8M12 7v5l4 2"})])],-1),u("span",{class:"wm-mm__label"},"Historique des discussions",-1)])]),n.canRename?(m(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[2]||(t[2]=o=>i.emit("rename"))},[...t[9]||(t[9]=[Ls('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M12 20h9" data-v-c1bb81d2></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-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Renommer le fil</span>',2)])])):$("",!0),n.canClear?(m(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[3]||(t[3]=o=>i.emit("clear"))},[...t[10]||(t[10]=[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:"M4 7h16M10 11v6M14 11v6M5 7l1 13a2 2 0 002 2h8a2 2 0 002-2l1-13M9 7V4a1 1 0 011-1h4a1 1 0 011 1v3"})])],-1),u("span",{class:"wm-mm__label"},"Effacer ce fil",-1)])])):$("",!0),n.canExport?(m(),_("button",{key:2,type:"button",class:"wm-mm__item",onClick:t[4]||(t[4]=o=>i.emit("export"))},[...t[11]||(t[11]=[Ls('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Exporter la transcription</span><span class="wm-mm__hint" data-v-c1bb81d2>.txt</span>',3)])])):$("",!0)]),t[17]||(t[17]=u("div",{class:"wm-mm__sep"},null,-1)),u("div",Ph,[u("button",{type:"button",class:"wm-mm__item",onClick:t[5]||(t[5]=(...o)=>i.toggleNotif&&i.toggleNotif(...o))},[t[13]||(t[13]=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[14]||(t[14]=u("span",{class:"wm-mm__label"},"Notifications",-1)),u("span",{class:ce(["wm-mm__toggle",{"wm-mm__toggle--on":r.notifOn}])},[...t[12]||(t[12]=[u("span",{class:"wm-mm__knob"},null,-1)])],2)])]),t[18]||(t[18]=u("div",{class:"wm-mm__sep"},null,-1)),u("div",Dh,[n.statusUrl?(m(),_("button",{key:0,type:"button",class:"wm-mm__item",onClick:t[6]||(t[6]=o=>i.emit("status"))},[...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:"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?(m(),_("button",{key:1,type:"button",class:"wm-mm__item",onClick:t[7]||(t[7]=o=>i.emit("help"))},[...t[16]||(t[16]=[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 Nh=_e(Rh,[["render",jh],["__scopeId","data-v-c1bb81d2"]]),ho="ww-messenger-tokens";function Hs(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 Hh(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;let o;if(Array.isArray(i)){if(o=i.map(l=>Qn(r,String(l))).join(", "),!o)continue}else typeof i=="boolean"?o=i?"Oui":"Non":o=Qn(r,String(i));s.push(`${r.label} :
72
72
  ${o}`)}return s.join(`
73
73
 
74
74
  `)}function Qn(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 Uh(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;let o;if(Array.isArray(i)){if(o=i.map(a=>Qn(r,String(a))).join(", "),!o)continue}else typeof i=="boolean"?o=i?"Oui":"Non":o=Qn(r,String(i));const l=r.type==="textarea"||typeof o=="string"&&(o.length>60||o.includes(`
75
75
  `));n.push({label:r.label,value:o,multiline:l})}return{kind:"form_response",data:{title:(e==null?void 0:e.title)||"Formulaire",fields:n}}}const Vh=450,Wh=50,Kh=900,zh=12e3,qh=300,Gh={name:"Messenger",components:{Launcher:gc,Header:Hc,Onboarding:cu,MessageList:qd,Composer:pf,SuggestionChips:vf,ApprovalCard:Mf,FormCard:th,Feedback:dh,HistoryDrawer:Lh,MoreMenu:Nh},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:oo},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,revealedAt:{},nextRevealAt:0,revealTimers:[],convOpenedAt:0,historyOpen:!1,moreOpen:!1,activeConvId:null,showOnboarding:!1,notifEnabled:!0,labelDismissed:!1,readState:{},unreadAnchorTs:"",floatHeight:0,floatRO:null,approvalSettled:!0,approvalSettleTimer:null,approvalLatchId: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 n;const e=this.readState,t=((n=this.s)==null?void 0:n.messagesByConv)||{};return this.allConversations.map(s=>{const r=t[s.id]||[],i=this.convLastActivity(s,r),o=e[s.id]||"",l=this.lastMessageAuthorType(r),a=!!i&&l!=="user"&&(!o||i>o);return{...s,_preview:this.convPreview(s,r),_unread:a}})},unreadCount(){return this.drawerConversations.filter(e=>e._unread).length},unreadThreads(){var t;const e=((t=this.s)==null?void 0:t.messagesByConv)||{};return this.drawerConversations.filter(n=>n._unread).map(n=>({id:n.id,title:n.name||"Nouvelle conversation",preview:n._preview||"Nouveau message",_ts:this.convLastActivity(n,e[n.id]||[])})).sort((n,s)=>n._ts<s._ts?1:n._ts>s._ts?-1:0).slice(0,3)},latestUnread(){var n;const e=((n=this.s)==null?void 0:n.messagesByConv)||{};let t=null;for(const s of this.drawerConversations){if(!s._unread)continue;const r=this.convLastActivity(s,e[s.id]||[]);(!t||r>t.ts)&&(t={convId:s.id,preview:s._preview,ts:r})}return t},launcherPeek(){if(this.isOpen||this.isEmbedded||this.labelDismissed)return"";const e=this.latestUnread;return e?e.preview||"Vous avez un nouveau message":""},isViewingThread(){return(this.isOpen||this.isEmbedded)&&!this.historyOpen&&!!this.currentConv},currentConv(){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=r=>{var i,o,l,a;return(r==null?void 0:r.type)==="action"||(r==null?void 0:r.type)==="system"||((i=r==null?void 0:r.payload)==null?void 0:i.type)==="system"||Array.isArray((o=r==null?void 0:r.payload)==null?void 0:o.attachments)&&r.payload.attachments.length||(l=r==null?void 0:r.metadata)!=null&&l.artifact||(a=r==null?void 0:r.metadata)!=null&&a.form?!0:typeof(r==null?void 0:r.text_md)=="string"&&r.text_md.trim().length>0},n=r=>{var i;return(r==null?void 0:r.type)==="action"&&((i=r==null?void 0:r.payload)==null?void 0:i.state)==="pending"},s=this.revealedAt;return(this.s.messagesByConv[e.id]||[]).filter(r=>!n(r)).filter(r=>Hs(r)?s[r.id]>0:!0).filter(t)},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=>Hs(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,l,a;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=(a=(l=(o=this.pendingApproval)==null?void 0:o.payload)==null?void 0:l.pending)==null?void 0:a.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(l=>l==null?void 0:l.created_at))==null?void 0:r.created_at)||e.created_at;if(o){const l=new Date(o);Number.isNaN(l.getTime())||(t=l)}}return`Aujourd'hui · ${io(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:{latestUnread:{handler(e,t){if(!e){this.labelDismissed=!1;return}(!t||e.convId!==t.convId||e.ts>t.ts)&&(this.labelDismissed=!1)},deep:!0},"currentConv.id":{handler(e){this.cancelReveals(),this.revealedAt={},this.nextRevealAt=0,this.convOpenedAt=Date.now(),this.moreOpen=!1,this.resetApprovalPacing(),this.isViewingThread&&(this.unreadAnchorTs=e&&this.readState[e]||"")},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]||""}else e||(this.unreadAnchorTs="")},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){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(!Hs(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,l=Array.isArray((s=r==null?void 0:r.payload)==null?void 0:s.attachments)&&r.payload.attachments.length>0;if(!o&&!l){n[r.id]=t;continue}n[r.id]=0,this.scheduleReveal(r)}this.revealedAt=n,(this.isOpen||this.isEmbedded)&&!this.historyOpen&&this.currentConv&&this.markConvRead(this.currentConv)}},async mounted(){if(console.log("[messenger] mounted",{isEditor:this.isEditor,canBoot:this.canBoot,hasBaseUrl:!!this.baseUrl,hasWidgetId:!!this.widgetId,hasUserId:!!this.userId,hasUserHash:!!this.userHash}),typeof document<"u"&&!document.getElementById(ho)){const e=document.createElement("style");e.id=ho,e.textContent=uc,document.head.appendChild(e)}this.hydrateReadState(),await this.boot(),this.isEmbedded&&this.store&&await this.open()},beforeUnmount(){this.cancelReveals(),this.disconnectFloatRO(),this.resetApprovalPacing(),this.store&&this.store.destroy()},methods:{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}},convLastActivity(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},lastMessageAuthorType(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""},convPreview(e,t){var n,s,r;for(let i=t.length-1;i>=0;i--){const o=t[i];if(!o)continue;const l=typeof o.text_md=="string"?o.text_md.trim():"";if(l)return(((n=o.author)==null?void 0:n.type)==="user"?"Vous : ":"")+l.replace(/\s+/g," ");const a=(s=o.payload)==null?void 0:s.attachments;if(Array.isArray(a)&&a.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)||""},readStorageKey(){const e=this.widgetId||"",t=this.userId||"";return`wm:read:${e}:${t}`},hydrateReadState(){try{if(typeof localStorage>"u")return;const e=localStorage.getItem(this.readStorageKey());if(!e)return;const t=JSON.parse(e);t&&typeof t=="object"&&(this.readState=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))return;const t=((r=(s=this.s)==null?void 0:s.messagesByConv)==null?void 0:r[e.id])||[],n=this.convLastActivity(e,t);n&&this.readState[e.id]!==n&&(this.readState={...this.readState,[e.id]:n},this.persistReadState())},cancelReveals(){for(const e of this.revealTimers)try{clearTimeout(e)}catch{}this.revealTimers=[]},resetApprovalPacing(){if(this.approvalSettleTimer){try{clearTimeout(this.approvalSettleTimer)}catch{}this.approvalSettleTimer=null}this.approvalSettled=!0,this.approvalLatchId=null},bumpApprovalSettle(e=800){if(this.approvalSettled=!1,this.approvalSettleTimer)try{clearTimeout(this.approvalSettleTimer)}catch{}this.approvalSettleTimer=setTimeout(()=>{this.approvalSettled=!0,this.approvalSettleTimer=null},e)},scheduleReveal(e){const t=Date.now(),n=((e==null?void 0:e.text_md)||"").length,s=Math.min(zh,Math.max(Kh,n*Wh)),i=Math.max(t+Vh,this.nextRevealAt+qh)+s;this.nextRevealAt=i;const o=Math.max(0,i-t),l=e.id,a=setTimeout(()=>{this.revealedAt={...this.revealedAt,[l]:Date.now()},this.revealTimers=this.revealTimers.filter(c=>c!==a)},o);this.revealTimers.push(a);const f=setTimeout(()=>{this.revealedAt[l]>0||(this.revealedAt={...this.revealedAt,[l]:Date.now()}),this.revealTimers=this.revealTimers.filter(c=>c!==f)},o+4e3);this.revealTimers.push(f)},async boot(){if(!this.canBoot){console.warn("[messenger] boot skipped — missing creds",{baseUrl:this.baseUrl,widgetId:this.widgetId,userId:this.userId,hasUserHash:!!this.userHash});return}try{console.log("[messenger] boot start",{baseUrl:this.baseUrl,widgetId:this.widgetId,userId:this.userId}),this.transport=vs(ic({baseUrl:this.baseUrl,widgetId:this.widgetId,userId:this.userId,userHash:this.userHash})),this.store=vs(cc(this.transport)),await this.store.start(),this.customer&&typeof this.customer=="object"&&await this.store.applyCustomer(this.customer),console.log("[ww-messenger] boot done",{ready:this.store.state.ready,error:this.store.state.error})}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.revealedAt={},this.nextRevealAt=0,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.historyOpen=!1,this.moreOpen=!1,this.activeConvId=null,this.showOnboarding=!1,await this.boot(),this.isEmbedded&&this.store&&await this.open()},async openFromPeek(){var t,n;const e=(t=this.latestUnread)==null?void 0:t.convId;e&&e!==((n=this.currentConv)==null?void 0:n.id)&&(this.activeConvId=e,this.showOnboarding=!1),await this.open()},async open(){if(this.isOpen=!0,this.store&&this.store.setPanelOpen(!0),this.currentConv){try{await this.store.openConversation(this.currentConv.id)}catch(e){console.error("[ww-messenger] load messages failed",e)}this.markConvRead(this.currentConv)}},close(){this.isOpen=!1,this.store&&this.store.setPanelOpen(!1)},async startConv(){if(!this.busy){this.busy=!0;try{const e=await this.store.createConversation({});this.activeConvId=e.id,this.showOnboarding=!1,await this.store.openConversation(e.id),this.markConvRead(e),this.focusComposer()}catch(e){console.error("[ww-messenger] create conv failed",e),this.bootError=(e==null?void 0:e.message)||String(e)}finally{this.busy=!1}}},focusComposer(){this.$nextTick(()=>{var e;return(e=this.$refs.composer)==null?void 0:e.focus()})},toggleMore(){this.historyOpen=!1,this.moreOpen=!this.moreOpen},goHome(){this.historyOpen=!1,this.moreOpen=!1,this.activeConvId=null,this.showOnboarding=!0},async onDrawerPick(e){if(!(e!=null&&e.id)||!this.store)return;this.historyOpen=!1,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 onDrawerNew(){this.historyOpen=!1,await this.startConv()},onNotifToggle(e){this.notifEnabled=!!e},async onMoreAction(e){switch(this.moreOpen=!1,e){case"history":this.historyOpen=!0;break;case"rename":await this.renameCurrentConv();break;case"clear":await this.clearCurrentConv();break;case"export":this.exportCurrentConv();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}},async renameCurrentConv(){const e=this.currentConv;if(!e||!this.store)return;let t;try{t=typeof window<"u"&&typeof window.prompt=="function"?window.prompt("Nouveau nom du fil",e.name||""):null}catch{t=null}if(t==null)return;const n=t.trim();if(!(!n||n===e.name))try{await this.store.patchConversation(e.id,{name:n})}catch(s){console.error("[ww-messenger] rename failed",s)}},async clearCurrentConv(){var n;const e=this.currentConv;!e||!this.store||!(!(typeof window<"u"&&typeof window.confirm=="function")||window.confirm("Effacer ce fil de votre côté ? Cette action ne supprime pas les messages côté agent."))||((n=this.s)!=null&&n.messagesByConv&&(this.s.messagesByConv[e.id]=[]),this.activeConvId=null,this.showOnboarding=!0)},exportCurrentConv(){var r,i,o,l,a,f;const e=this.currentConv;if(!e)return;const t=(((i=(r=this.s)==null?void 0:r.messagesByConv)==null?void 0:i[e.id])||[]).slice(),n=[`# ${e.name||"Conversation"}`,e.created_at?`Créée le : ${e.created_at}`:"",""];for(const c of t){if(!c)continue;const g=((o=c.author)==null?void 0:o.name)||(((l=c.author)==null?void 0:l.type)==="user"?"Vous":((a=c.author)==null?void 0:a.type)==="agent_human"?"Agent":((f=c.author)==null?void 0:f.type)==="agent_ia"?"Assistant IA":"Système"),S=c.created_at?new Date(c.created_at).toLocaleString("fr-FR"):"",k=(c.text_md||"").trim();k&&(n.push(`[${S}] ${g} :`),n.push(k),n.push(""))}const s=new Blob([n.join(`
76
- `)],{type:"text/plain;charset=utf-8"});try{const c=URL.createObjectURL(s),g=document.createElement("a");g.href=c,g.download=`${(e.name||"conversation").replace(/[^a-z0-9-_]+/gi,"_")}.txt`,document.body.appendChild(g),g.click(),document.body.removeChild(g),setTimeout(()=>URL.revokeObjectURL(c),1e3)}catch(c){console.error("[ww-messenger] export failed",c)}},async onSend(e){const t=this.currentConv;if(!t&&(await this.startConv(),!this.currentConv))return;const n=(this.currentConv||t).id,s=this.pendingAttachments.slice();this.pendingAttachments=[],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=Hh(t.form,e);if(!n)return;const s=this.currentConv;s&&await this.store.send(s.id,n,{metadata:{artifact:Uh(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}await this.startConv(),this.currentConv&&await this.store.send(this.currentConv.id,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}}}}},Yh={key:0,class:"wm-loading","aria-busy":"true","aria-live":"polite"},Jh={key:0,class:"wm-state"},Xh={class:"wm-state__err"},Qh={class:"wm-state__errSub"},Zh={class:"wm-bottom"},ep={key:0,ref:"floatEl",class:"wm-float"},tp={key:1,class:"wm-actionWait",role:"status","aria-live":"polite"},np={class:"wm-actionWait__lbl"},sp={key:1,class:"wm-attached"},rp=["onClick"];function ip(e,t,n,s,r,i){const o=me("Launcher"),l=me("Header"),a=me("Onboarding"),f=me("MessageList"),c=me("ApprovalCard"),g=me("FormCard"),S=me("Feedback"),k=me("SuggestionChips"),N=me("Composer"),O=me("MoreMenu"),J=me("HistoryDrawer");return m(),_("div",{class:ce(["wm-root",`wm-root--${n.displayMode}`])},[!r.isOpen&&!i.isEmbedded?(m(),pe(o,{key:0,"unread-count":i.unreadCount,peek:i.launcherPeek,onOpen:i.openFromPeek,onDismiss:t[0]||(t[0]=K=>r.labelDismissed=!0)},null,8,["unread-count","peek","onOpen"])):$("",!0),r.isOpen||i.isEmbedded?(m(),_("section",{key:1,class:ce(["wm-panel",`wm-panel--${n.displayMode}`]),style:Ne(r.floatHeight?{"--wm-float-h":r.floatHeight+"px"}:null),role:"dialog","aria-label":"Messenger"},[!i.ready&&!i.error?(m(),_("div",Yh,[i.isEmbedded?$("",!0):(m(),_("button",{key:0,type:"button",class:"wm-loading__close","aria-label":"Réduire",onClick:t[1]||(t[1]=(...K)=>i.close&&i.close(...K))},[...t[6]||(t[6]=[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[7]||(t[7]=u("div",{class:"wm-loading__spinner","aria-hidden":"true"},null,-1))])):(m(),_(Y,{key:1},[ge(l,{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",Jh,[u("div",Xh,[t[9]||(t[9]=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[8]||(t[8]=u("div",{class:"wm-state__errTitle"},"Connexion impossible",-1)),u("div",Qh,P(i.error),1)])])])):i.currentConv?(m(),_(Y,{key:2},[ge(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":r.unreadAnchorTs,onLoadMore:i.onLoadMore},null,8,["messages","streaming-active","date-label","conversation-id","loading-more","has-more","unread-anchor-ts","onLoadMore"]),u("div",Zh,[i.floatVisible?(m(),_("div",ep,[i.approvalReady?(m(),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?(m(),pe(g,{key:i.pendingForm.message&&i.pendingForm.message.id,form:i.pendingForm.form,onSubmit:i.onFormSubmit},null,8,["form","onSubmit"])):i.showFeedback?(m(),pe(S,{key:2,busy:r.feedbackBusy,done:r.feedbackDone,onSubmit:i.onFeedback},null,8,["busy","done","onSubmit"])):(m(),pe(k,{key:3,items:i.suggestions,onSelect:i.onSuggestion},null,8,["items","onSelect"]))],512)):$("",!0),i.actionInFlight?(m(),_("div",tp,[t[10]||(t[10]=u("span",{class:"wm-actionWait__spinner","aria-hidden":"true"},null,-1)),u("span",np,P(i.actionInFlightName)+" en cours, veuillez patienter…",1)])):(m(),pe(N,{key:2,ref:"composer",modelValue:r.draft,"onUpdate:modelValue":t[2]||(t[2]=K=>r.draft=K),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(),pe(O,{key:0,"can-rename":!!i.currentConv,"can-clear":!!i.currentConv,"can-export":!!i.currentConv,"notif-enabled":r.notifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[3]||(t[3]=K=>r.moreOpen=!1),onNotifToggle:i.onNotifToggle,onAction:i.onMoreAction},null,8,["can-rename","can-clear","can-export","notif-enabled","status-url","help-url","onNotifToggle","onAction"])):$("",!0),r.pendingAttachments.length?(m(),_("div",sp,[(m(!0),_(Y,null,Ce(r.pendingAttachments,(K,W)=>(m(),_("div",{key:W,class:"wm-attached__chip"},[t[12]||(t[12]=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(K.name),1),u("button",{type:"button","aria-label":"Retirer",onClick:X=>r.pendingAttachments.splice(W,1)},[...t[11]||(t[11]=[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,rp)]))),128))])):$("",!0)],64)):(m(),pe(a,{key:1,"welcome-message":i.widgetWelcomeMessage,"agent-name":i.agentName,"quick-links":i.quickLinks,"unread-threads":i.unreadThreads,busy:r.busy,onStart:i.startConv,onSelect:i.onQuickLink,onResume:i.onDrawerPick},null,8,["welcome-message","agent-name","quick-links","unread-threads","busy","onStart","onSelect","onResume"])),r.historyOpen?(m(),pe(J,{key:3,conversations:i.drawerConversations,"active-id":i.currentConv?i.currentConv.id:null,onClose:t[4]||(t[4]=K=>r.historyOpen=!1),onNew:i.onDrawerNew,onPick:i.onDrawerPick},null,8,["conversations","active-id","onNew","onPick"])):$("",!0),r.moreOpen&&!i.currentConv?(m(),pe(O,{key:4,"can-rename":!1,"can-clear":!1,"can-export":!1,"notif-enabled":r.notifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[5]||(t[5]=K=>r.moreOpen=!1),onNotifToggle:i.onNotifToggle,onAction:i.onMoreAction},null,8,["notif-enabled","status-url","help-url","onNotifToggle","onAction"])):$("",!0)],64))],6)):$("",!0)],2)}const op=_e(Gh,[["render",ip],["__scopeId","data-v-8264e504"]]),lp="0.2.20";let vt=null,Tt=null,Us="";function ap(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 cp(e){return{baseUrl:String(e.baseUrl||oo).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 up(e={}){const t=cp(e);if(!t.baseUrl||!t.widgetId||!t.userId||!t.userHash)return Vs(),null;const n=JSON.stringify({...t,target:typeof t.target=="string"?t.target:!!t.target});return vt&&n===Us||(Vs(),Tt=ap(t.target),vt=Qa(op,{baseUrl:t.baseUrl,widgetId:t.widgetId,userId:t.userId,userHash:t.userHash,displayMode:t.displayMode,devtools:t.devtools,customer:t.customer}),vt.mount(Tt),Us=n),vt}function Vs(){if(vt){try{vt.unmount()}catch{}vt=null}Tt&&Tt.hasAttribute&&Tt.hasAttribute("data-messenger-root")&&Tt.remove(),Tt=null,Us=""}return Ut.destroy=Vs,Ut.init=up,Ut.version=lp,Object.defineProperty(Ut,Symbol.toStringTag,{value:"Module"}),Ut}({});
76
+ `)],{type:"text/plain;charset=utf-8"});try{const c=URL.createObjectURL(s),g=document.createElement("a");g.href=c,g.download=`${(e.name||"conversation").replace(/[^a-z0-9-_]+/gi,"_")}.txt`,document.body.appendChild(g),g.click(),document.body.removeChild(g),setTimeout(()=>URL.revokeObjectURL(c),1e3)}catch(c){console.error("[ww-messenger] export failed",c)}},async onSend(e){const t=this.currentConv;if(!t&&(await this.startConv(),!this.currentConv))return;const n=(this.currentConv||t).id,s=this.pendingAttachments.slice();this.pendingAttachments=[],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=Hh(t.form,e);if(!n)return;const s=this.currentConv;s&&await this.store.send(s.id,n,{metadata:{artifact:Uh(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}await this.startConv(),this.currentConv&&await this.store.send(this.currentConv.id,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}}}}},Yh={key:0,class:"wm-loading","aria-busy":"true","aria-live":"polite"},Jh={key:0,class:"wm-state"},Xh={class:"wm-state__err"},Qh={class:"wm-state__errSub"},Zh={class:"wm-bottom"},ep={key:0,ref:"floatEl",class:"wm-float"},tp={key:1,class:"wm-actionWait",role:"status","aria-live":"polite"},np={class:"wm-actionWait__lbl"},sp={key:1,class:"wm-attached"},rp=["onClick"];function ip(e,t,n,s,r,i){const o=me("Launcher"),l=me("Header"),a=me("Onboarding"),f=me("MessageList"),c=me("ApprovalCard"),g=me("FormCard"),S=me("Feedback"),k=me("SuggestionChips"),N=me("Composer"),O=me("MoreMenu"),J=me("HistoryDrawer");return m(),_("div",{class:ce(["wm-root",`wm-root--${n.displayMode}`])},[!r.isOpen&&!i.isEmbedded?(m(),pe(o,{key:0,"unread-count":i.unreadCount,peek:i.launcherPeek,onOpen:i.openFromPeek,onDismiss:t[0]||(t[0]=K=>r.labelDismissed=!0)},null,8,["unread-count","peek","onOpen"])):$("",!0),r.isOpen||i.isEmbedded?(m(),_("section",{key:1,class:ce(["wm-panel",`wm-panel--${n.displayMode}`]),style:Ne(r.floatHeight?{"--wm-float-h":r.floatHeight+"px"}:null),role:"dialog","aria-label":"Messenger"},[!i.ready&&!i.error?(m(),_("div",Yh,[i.isEmbedded?$("",!0):(m(),_("button",{key:0,type:"button",class:"wm-loading__close","aria-label":"Réduire",onClick:t[1]||(t[1]=(...K)=>i.close&&i.close(...K))},[...t[6]||(t[6]=[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[7]||(t[7]=u("div",{class:"wm-loading__spinner","aria-hidden":"true"},null,-1))])):(m(),_(Y,{key:1},[ge(l,{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",Jh,[u("div",Xh,[t[9]||(t[9]=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[8]||(t[8]=u("div",{class:"wm-state__errTitle"},"Connexion impossible",-1)),u("div",Qh,P(i.error),1)])])])):i.currentConv?(m(),_(Y,{key:2},[ge(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":r.unreadAnchorTs,onLoadMore:i.onLoadMore},null,8,["messages","streaming-active","date-label","conversation-id","loading-more","has-more","unread-anchor-ts","onLoadMore"]),u("div",Zh,[i.floatVisible?(m(),_("div",ep,[i.approvalReady?(m(),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?(m(),pe(g,{key:i.pendingForm.message&&i.pendingForm.message.id,form:i.pendingForm.form,onSubmit:i.onFormSubmit},null,8,["form","onSubmit"])):i.showFeedback?(m(),pe(S,{key:2,busy:r.feedbackBusy,done:r.feedbackDone,onSubmit:i.onFeedback},null,8,["busy","done","onSubmit"])):(m(),pe(k,{key:3,items:i.suggestions,onSelect:i.onSuggestion},null,8,["items","onSelect"]))],512)):$("",!0),i.actionInFlight?(m(),_("div",tp,[t[10]||(t[10]=u("span",{class:"wm-actionWait__spinner","aria-hidden":"true"},null,-1)),u("span",np,P(i.actionInFlightName)+" en cours, veuillez patienter…",1)])):(m(),pe(N,{key:2,ref:"composer",modelValue:r.draft,"onUpdate:modelValue":t[2]||(t[2]=K=>r.draft=K),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(),pe(O,{key:0,"can-rename":!!i.currentConv,"can-clear":!!i.currentConv,"can-export":!!i.currentConv,"notif-enabled":r.notifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[3]||(t[3]=K=>r.moreOpen=!1),onNotifToggle:i.onNotifToggle,onAction:i.onMoreAction},null,8,["can-rename","can-clear","can-export","notif-enabled","status-url","help-url","onNotifToggle","onAction"])):$("",!0),r.pendingAttachments.length?(m(),_("div",sp,[(m(!0),_(Y,null,Ce(r.pendingAttachments,(K,W)=>(m(),_("div",{key:W,class:"wm-attached__chip"},[t[12]||(t[12]=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(K.name),1),u("button",{type:"button","aria-label":"Retirer",onClick:X=>r.pendingAttachments.splice(W,1)},[...t[11]||(t[11]=[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,rp)]))),128))])):$("",!0)],64)):(m(),pe(a,{key:1,"welcome-message":i.widgetWelcomeMessage,"agent-name":i.agentName,"quick-links":i.quickLinks,"unread-threads":i.unreadThreads,busy:r.busy,onStart:i.startConv,onSelect:i.onQuickLink,onResume:i.onDrawerPick},null,8,["welcome-message","agent-name","quick-links","unread-threads","busy","onStart","onSelect","onResume"])),r.historyOpen?(m(),pe(J,{key:3,conversations:i.drawerConversations,"active-id":i.currentConv?i.currentConv.id:null,onClose:t[4]||(t[4]=K=>r.historyOpen=!1),onNew:i.onDrawerNew,onPick:i.onDrawerPick},null,8,["conversations","active-id","onNew","onPick"])):$("",!0),r.moreOpen&&!i.currentConv?(m(),pe(O,{key:4,"can-rename":!1,"can-clear":!1,"can-export":!1,"notif-enabled":r.notifEnabled,"status-url":i.statusUrl,"help-url":i.helpUrl,onClose:t[5]||(t[5]=K=>r.moreOpen=!1),onNotifToggle:i.onNotifToggle,onAction:i.onMoreAction},null,8,["notif-enabled","status-url","help-url","onNotifToggle","onAction"])):$("",!0)],64))],6)):$("",!0)],2)}const op=_e(Gh,[["render",ip],["__scopeId","data-v-8264e504"]]),lp="0.2.21";let vt=null,Tt=null,Us="";function ap(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 cp(e){return{baseUrl:String(e.baseUrl||oo).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 up(e={}){const t=cp(e);if(!t.baseUrl||!t.widgetId||!t.userId||!t.userHash)return Vs(),null;const n=JSON.stringify({...t,target:typeof t.target=="string"?t.target:!!t.target});return vt&&n===Us||(Vs(),Tt=ap(t.target),vt=Qa(op,{baseUrl:t.baseUrl,widgetId:t.widgetId,userId:t.userId,userHash:t.userHash,displayMode:t.displayMode,devtools:t.devtools,customer:t.customer}),vt.mount(Tt),Us=n),vt}function Vs(){if(vt){try{vt.unmount()}catch{}vt=null}Tt&&Tt.hasAttribute&&Tt.hasAttribute("data-messenger-root")&&Tt.remove(),Tt=null,Us=""}return Ut.destroy=Vs,Ut.init=up,Ut.version=lp,Object.defineProperty(Ut,Symbol.toStringTag,{value:"Module"}),Ut}({});