@mulmocast/slide 0.6.2 → 0.6.3

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 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/actions/preview.ts"],"names":[],"mappings":";AAoCA,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,MAAqB,GAAG,IAAI,CAiFpE"}
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/actions/preview.ts"],"names":[],"mappings":";AAqCA,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,MAAqB,GAAG,IAAI,CAuFpE"}
@@ -8,6 +8,7 @@ const __filename = fileURLToPath(import.meta.url);
8
8
  const __dirname = path.dirname(__filename);
9
9
  import { saveBeatText, transcribeAudio, parseRequestBody, } from "../utils/audio-save.js";
10
10
  import { findBundles, getMimeType, isValidFile, createFileStream } from "../utils/bundle-server.js";
11
+ import { handleChatRequest } from "../utils/chat-api.js";
11
12
  // Load .env file
12
13
  dotenv.config({ quiet: true });
13
14
  const DEFAULT_PORT = 3000;
@@ -60,6 +61,11 @@ export function startPreviewServer(port = DEFAULT_PORT) {
60
61
  res.end(JSON.stringify(result));
61
62
  return;
62
63
  }
64
+ // API endpoint for chat completion
65
+ if (pathname === "/api/chat" && req.method === "POST") {
66
+ await handleChatRequest(req, res);
67
+ return;
68
+ }
63
69
  // API endpoint for transcribing audio
64
70
  if (pathname === "/api/transcribe" && req.method === "POST") {
65
71
  const body = await parseRequestBody(req);
@@ -1 +1 @@
1
- {"version":3,"file":"preview.js","sourceRoot":"","sources":["../../src/actions/preview.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"preview.js","sourceRoot":"","sources":["../../src/actions/preview.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ import type { IncomingMessage, ServerResponse } from "http";
2
+ export declare function handleChatRequest(req: IncomingMessage, res: ServerResponse): Promise<void>;
3
+ //# sourceMappingURL=chat-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-api.d.ts","sourceRoot":"","sources":["../../src/utils/chat-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAW5D,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiEhG"}
@@ -0,0 +1,65 @@
1
+ import { parseRequestBody } from "./audio-save.js";
2
+ const OPENAI_CHAT_URL = "https://api.openai.com/v1/chat/completions";
3
+ const DEFAULT_MODEL = "gpt-4o-mini";
4
+ export async function handleChatRequest(req, res) {
5
+ const apiKey = process.env.OPENAI_API_KEY;
6
+ if (!apiKey) {
7
+ res.writeHead(500, { "Content-Type": "application/json" });
8
+ res.end(JSON.stringify({ error: "OPENAI_API_KEY environment variable is required" }));
9
+ return;
10
+ }
11
+ const body = await parseRequestBody(req);
12
+ if (!body?.messages) {
13
+ res.writeHead(400, { "Content-Type": "application/json" });
14
+ res.end(JSON.stringify({ error: "Invalid request body: messages required" }));
15
+ return;
16
+ }
17
+ try {
18
+ const response = await fetch(OPENAI_CHAT_URL, {
19
+ method: "POST",
20
+ headers: {
21
+ "Content-Type": "application/json",
22
+ Authorization: `Bearer ${apiKey}`,
23
+ },
24
+ body: JSON.stringify({
25
+ model: body.model ?? DEFAULT_MODEL,
26
+ messages: body.messages,
27
+ stream: true,
28
+ }),
29
+ });
30
+ if (!response.ok) {
31
+ const errorText = await response.text();
32
+ res.writeHead(response.status, { "Content-Type": "application/json" });
33
+ res.end(errorText);
34
+ return;
35
+ }
36
+ res.writeHead(200, {
37
+ "Content-Type": "text/event-stream",
38
+ "Cache-Control": "no-cache",
39
+ Connection: "keep-alive",
40
+ });
41
+ const reader = response.body?.getReader();
42
+ if (!reader) {
43
+ res.end();
44
+ return;
45
+ }
46
+ const decoder = new TextDecoder();
47
+ for (;;) {
48
+ const { done, value } = await reader.read();
49
+ if (done)
50
+ break;
51
+ res.write(decoder.decode(value, { stream: true }));
52
+ }
53
+ res.end();
54
+ }
55
+ catch (error) {
56
+ if (!res.headersSent) {
57
+ res.writeHead(500, { "Content-Type": "application/json" });
58
+ res.end(JSON.stringify({ error: error instanceof Error ? error.message : "Chat request failed" }));
59
+ }
60
+ else {
61
+ res.end();
62
+ }
63
+ }
64
+ }
65
+ //# sourceMappingURL=chat-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-api.js","sourceRoot":"","sources":["../../src/utils/chat-api.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,19 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function s(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(r){if(r.ep)return;r.ep=!0;const o=s(r);fetch(r.href,o)}})();function nn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const se={},Ct=[],Ye=()=>{},ar=()=>!1,xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),rn=e=>e.startsWith("onUpdate:"),ge=Object.assign,on=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},bo=Object.prototype.hasOwnProperty,Q=(e,t)=>bo.call(e,t),H=Array.isArray,Et=e=>Yt(e)==="[object Map]",_s=e=>Yt(e)==="[object Set]",En=e=>Yt(e)==="[object Date]",B=e=>typeof e=="function",ce=e=>typeof e=="string",He=e=>typeof e=="symbol",ee=e=>e!==null&&typeof e=="object",ur=e=>(ee(e)||B(e))&&B(e.then)&&B(e.catch),cr=Object.prototype.toString,Yt=e=>cr.call(e),yo=e=>Yt(e).slice(8,-1),fr=e=>Yt(e)==="[object Object]",ln=e=>ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nt=nn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ws=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},xo=/-\w/g,pt=ws(e=>e.replace(xo,t=>t.slice(1).toUpperCase())),_o=/\B([A-Z])/g,_t=ws(e=>e.replace(_o,"-$1").toLowerCase()),dr=ws(e=>e.charAt(0).toUpperCase()+e.slice(1)),js=ws(e=>e?`on${dr(e)}`:""),dt=(e,t)=>!Object.is(e,t),os=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},pr=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ss=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pn;const Ts=()=>Pn||(Pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Cs(e){if(H(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=ce(n)?Co(n):Cs(n);if(r)for(const o in r)t[o]=r[o]}return t}else if(ce(e)||ee(e))return e}const wo=/;(?![^(]*\))/g,So=/:([^]+)/,To=/\/\*[^]*?\*\//g;function Co(e){const t={};return e.replace(To,"").split(wo).forEach(s=>{if(s){const n=s.split(So);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Fe(e){let t="";if(ce(e))t=e;else if(H(e))for(let s=0;s<e.length;s++){const n=Fe(e[s]);n&&(t+=n+" ")}else if(ee(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}function An(e){if(!e)return null;let{class:t,style:s}=e;return t&&!ce(t)&&(e.class=Fe(t)),s&&(e.style=Cs(s)),e}const Eo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Po=nn(Eo);function hr(e){return!!e||e===""}function Ao(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Xt(e[n],t[n]);return s}function Xt(e,t){if(e===t)return!0;let s=En(e),n=En(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=He(e),n=He(t),s||n)return e===t;if(s=H(e),n=H(t),s||n)return s&&n?Ao(e,t):!1;if(s=ee(e),n=ee(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!Xt(e[i],t[i]))return!1}}return String(e)===String(t)}function Mo(e,t){return e.findIndex(s=>Xt(s,t))}const gr=e=>!!(e&&e.__v_isRef===!0),de=e=>ce(e)?e:e==null?"":H(e)||ee(e)&&(e.toString===cr||!B(e.toString))?gr(e)?de(e.value):JSON.stringify(e,vr,2):String(e),vr=(e,t)=>gr(t)?vr(e,t.value):Et(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],o)=>(s[Is(n,o)+" =>"]=r,s),{})}:_s(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Is(s))}:He(t)?Is(t):ee(t)&&!H(t)&&!fr(t)?String(t):t,Is=(e,t="")=>{var s;return He(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ae;class Oo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ae,!t&&Ae&&(this.index=(Ae.scopes||(Ae.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ae;try{return Ae=this,t()}finally{Ae=s}}}on(){++this._on===1&&(this.prevScope=Ae,Ae=this)}off(){this._on>0&&--this._on===0&&(Ae=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Ro(){return Ae}let oe;const ks=new WeakSet;class mr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ae&&Ae.active&&Ae.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ks.has(this)&&(ks.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Mn(this),xr(this);const t=oe,s=De;oe=this,De=!0;try{return this.fn()}finally{_r(this),oe=t,De=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)cn(t);this.deps=this.depsTail=void 0,Mn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ks.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ws(this)&&this.run()}get dirty(){return Ws(this)}}let br=0,Ht,Vt;function yr(e,t=!1){if(e.flags|=8,t){e.next=Vt,Vt=e;return}e.next=Ht,Ht=e}function an(){br++}function un(){if(--br>0)return;if(Vt){let t=Vt;for(Vt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Ht;){let t=Ht;for(Ht=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function xr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _r(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),cn(n),Lo(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function Ws(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(wr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function wr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qt)||(e.globalVersion=qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ws(e))))return;e.flags|=2;const t=e.dep,s=oe,n=De;oe=e,De=!0;try{xr(e);const r=e.fn(e._value);(t.version===0||dt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{oe=s,De=n,_r(e),e.flags&=-3}}function cn(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)cn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Lo(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let De=!0;const Sr=[];function ot(){Sr.push(De),De=!1}function it(){const e=Sr.pop();De=e===void 0?!0:e}function Mn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=oe;oe=void 0;try{t()}finally{oe=s}}}let qt=0;class jo{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class fn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!oe||!De||oe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==oe)s=this.activeLink=new jo(oe,this),oe.deps?(s.prevDep=oe.depsTail,oe.depsTail.nextDep=s,oe.depsTail=s):oe.deps=oe.depsTail=s,Tr(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=oe.depsTail,s.nextDep=void 0,oe.depsTail.nextDep=s,oe.depsTail=s,oe.deps===s&&(oe.deps=n)}return s}trigger(t){this.version++,qt++,this.notify(t)}notify(t){an();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{un()}}}function Tr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Tr(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const qs=new WeakMap,yt=Symbol(""),zs=Symbol(""),zt=Symbol("");function be(e,t,s){if(De&&oe){let n=qs.get(e);n||qs.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new fn),r.map=n,r.key=s),r.track()}}function nt(e,t,s,n,r,o){const i=qs.get(e);if(!i){qt++;return}const l=a=>{a&&a.trigger()};if(an(),t==="clear")i.forEach(l);else{const a=H(e),d=a&&ln(s);if(a&&s==="length"){const c=Number(n);i.forEach((p,y)=>{(y==="length"||y===zt||!He(y)&&y>=c)&&l(p)})}else switch((s!==void 0||i.has(void 0))&&l(i.get(s)),d&&l(i.get(zt)),t){case"add":a?d&&l(i.get("length")):(l(i.get(yt)),Et(e)&&l(i.get(zs)));break;case"delete":a||(l(i.get(yt)),Et(e)&&l(i.get(zs)));break;case"set":Et(e)&&l(i.get(yt));break}}un()}function wt(e){const t=G(e);return t===e?t:(be(t,"iterate",zt),ke(e)?t:t.map(Ve))}function Es(e){return be(e=G(e),"iterate",zt),e}function ct(e,t){return lt(e)?Rt(xt(e)?Ve(t):t):Ve(t)}const Io={__proto__:null,[Symbol.iterator](){return $s(this,Symbol.iterator,e=>ct(this,e))},concat(...e){return wt(this).concat(...e.map(t=>H(t)?wt(t):t))},entries(){return $s(this,"entries",e=>(e[1]=ct(this,e[1]),e))},every(e,t){return et(this,"every",e,t,void 0,arguments)},filter(e,t){return et(this,"filter",e,t,s=>s.map(n=>ct(this,n)),arguments)},find(e,t){return et(this,"find",e,t,s=>ct(this,s),arguments)},findIndex(e,t){return et(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return et(this,"findLast",e,t,s=>ct(this,s),arguments)},findLastIndex(e,t){return et(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return et(this,"forEach",e,t,void 0,arguments)},includes(...e){return Fs(this,"includes",e)},indexOf(...e){return Fs(this,"indexOf",e)},join(e){return wt(this).join(e)},lastIndexOf(...e){return Fs(this,"lastIndexOf",e)},map(e,t){return et(this,"map",e,t,void 0,arguments)},pop(){return kt(this,"pop")},push(...e){return kt(this,"push",e)},reduce(e,...t){return On(this,"reduce",e,t)},reduceRight(e,...t){return On(this,"reduceRight",e,t)},shift(){return kt(this,"shift")},some(e,t){return et(this,"some",e,t,void 0,arguments)},splice(...e){return kt(this,"splice",e)},toReversed(){return wt(this).toReversed()},toSorted(e){return wt(this).toSorted(e)},toSpliced(...e){return wt(this).toSpliced(...e)},unshift(...e){return kt(this,"unshift",e)},values(){return $s(this,"values",e=>ct(this,e))}};function $s(e,t,s){const n=Es(e),r=n[t]();return n!==e&&!ke(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=s(o.value)),o}),r}const ko=Array.prototype;function et(e,t,s,n,r,o){const i=Es(e),l=i!==e&&!ke(e),a=i[t];if(a!==ko[t]){const p=a.apply(e,o);return l?Ve(p):p}let d=s;i!==e&&(l?d=function(p,y){return s.call(this,ct(e,p),y,e)}:s.length>2&&(d=function(p,y){return s.call(this,p,y,e)}));const c=a.call(i,d,n);return l&&r?r(c):c}function On(e,t,s,n){const r=Es(e);let o=s;return r!==e&&(ke(e)?s.length>3&&(o=function(i,l,a){return s.call(this,i,l,a,e)}):o=function(i,l,a){return s.call(this,i,ct(e,l),a,e)}),r[t](o,...n)}function Fs(e,t,s){const n=G(e);be(n,"iterate",zt);const r=n[t](...s);return(r===-1||r===!1)&&gn(s[0])?(s[0]=G(s[0]),n[t](...s)):r}function kt(e,t,s=[]){ot(),an();const n=G(e)[t].apply(e,s);return un(),it(),n}const $o=nn("__proto__,__v_isRef,__isVue"),Cr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(He));function Fo(e){He(e)||(e=String(e));const t=G(this);return be(t,"has",e),t.hasOwnProperty(e)}class Er{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(r?o?zo:Or:o?Mr:Ar).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=H(t);if(!r){let a;if(i&&(a=Io[s]))return a;if(s==="hasOwnProperty")return Fo}const l=Reflect.get(t,s,xe(t)?t:n);if((He(s)?Cr.has(s):$o(s))||(r||be(t,"get",s),o))return l;if(xe(l)){const a=i&&ln(s)?l:l.value;return r&&ee(a)?Gs(a):a}return ee(l)?r?Gs(l):pn(l):l}}class Pr extends Er{constructor(t=!1){super(!1,t)}set(t,s,n,r){let o=t[s];const i=H(t)&&ln(s);if(!this._isShallow){const d=lt(o);if(!ke(n)&&!lt(n)&&(o=G(o),n=G(n)),!i&&xe(o)&&!xe(n))return d||(o.value=n),!0}const l=i?Number(s)<t.length:Q(t,s),a=Reflect.set(t,s,n,xe(t)?t:r);return t===G(r)&&(l?dt(n,o)&&nt(t,"set",s,n):nt(t,"add",s,n)),a}deleteProperty(t,s){const n=Q(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&nt(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!He(s)||!Cr.has(s))&&be(t,"has",s),n}ownKeys(t){return be(t,"iterate",H(t)?"length":yt),Reflect.ownKeys(t)}}class Do extends Er{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const No=new Pr,Ho=new Do,Vo=new Pr(!0);const Js=e=>e,ss=e=>Reflect.getPrototypeOf(e);function Uo(e,t,s){return function(...n){const r=this.__v_raw,o=G(r),i=Et(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,d=r[e](...n),c=s?Js:t?Rt:Ve;return!t&&be(o,"iterate",a?zs:yt),ge(Object.create(d),{next(){const{value:p,done:y}=d.next();return y?{value:p,done:y}:{value:l?[c(p[0]),c(p[1])]:c(p),done:y}}})}}function ns(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Bo(e,t){const s={get(r){const o=this.__v_raw,i=G(o),l=G(r);e||(dt(r,l)&&be(i,"get",r),be(i,"get",l));const{has:a}=ss(i),d=t?Js:e?Rt:Ve;if(a.call(i,r))return d(o.get(r));if(a.call(i,l))return d(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&be(G(r),"iterate",yt),r.size},has(r){const o=this.__v_raw,i=G(o),l=G(r);return e||(dt(r,l)&&be(i,"has",r),be(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=G(l),d=t?Js:e?Rt:Ve;return!e&&be(a,"iterate",yt),l.forEach((c,p)=>r.call(o,d(c),d(p),i))}};return ge(s,e?{add:ns("add"),set:ns("set"),delete:ns("delete"),clear:ns("clear")}:{add(r){!t&&!ke(r)&&!lt(r)&&(r=G(r));const o=G(this);return ss(o).has.call(o,r)||(o.add(r),nt(o,"add",r,r)),this},set(r,o){!t&&!ke(o)&&!lt(o)&&(o=G(o));const i=G(this),{has:l,get:a}=ss(i);let d=l.call(i,r);d||(r=G(r),d=l.call(i,r));const c=a.call(i,r);return i.set(r,o),d?dt(o,c)&&nt(i,"set",r,o):nt(i,"add",r,o),this},delete(r){const o=G(this),{has:i,get:l}=ss(o);let a=i.call(o,r);a||(r=G(r),a=i.call(o,r)),l&&l.call(o,r);const d=o.delete(r);return a&&nt(o,"delete",r,void 0),d},clear(){const r=G(this),o=r.size!==0,i=r.clear();return o&&nt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Uo(r,e,t)}),s}function dn(e,t){const s=Bo(e,t);return(n,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(Q(s,r)&&r in n?s:n,r,o)}const Ko={get:dn(!1,!1)},Wo={get:dn(!1,!0)},qo={get:dn(!0,!1)};const Ar=new WeakMap,Mr=new WeakMap,Or=new WeakMap,zo=new WeakMap;function Jo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Go(e){return e.__v_skip||!Object.isExtensible(e)?0:Jo(yo(e))}function pn(e){return lt(e)?e:hn(e,!1,No,Ko,Ar)}function Qo(e){return hn(e,!1,Vo,Wo,Mr)}function Gs(e){return hn(e,!0,Ho,qo,Or)}function hn(e,t,s,n,r){if(!ee(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Go(e);if(o===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,o===2?n:s);return r.set(e,l),l}function xt(e){return lt(e)?xt(e.__v_raw):!!(e&&e.__v_isReactive)}function lt(e){return!!(e&&e.__v_isReadonly)}function ke(e){return!!(e&&e.__v_isShallow)}function gn(e){return e?!!e.__v_raw:!1}function G(e){const t=e&&e.__v_raw;return t?G(t):e}function Yo(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&pr(e,"__v_skip",!0),e}const Ve=e=>ee(e)?pn(e):e,Rt=e=>ee(e)?Gs(e):e;function xe(e){return e?e.__v_isRef===!0:!1}function W(e){return Xo(e,!1)}function Xo(e,t){return xe(e)?e:new Zo(e,t)}class Zo{constructor(t,s){this.dep=new fn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:G(t),this._value=s?t:Ve(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||ke(t)||lt(t);t=n?t:G(t),dt(t,s)&&(this._rawValue=t,this._value=n?t:Ve(t),this.dep.trigger())}}function vn(e){return xe(e)?e.value:e}const ei={get:(e,t,s)=>t==="__v_raw"?e:vn(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return xe(r)&&!xe(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function Rr(e){return xt(e)?e:new Proxy(e,ei)}class ti{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new fn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&oe!==this)return yr(this,!0),!0}get value(){const t=this.dep.track();return wr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function si(e,t,s=!1){let n,r;return B(e)?n=e:(n=e.get,r=e.set),new ti(n,r,s)}const rs={},us=new WeakMap;let mt;function ni(e,t=!1,s=mt){if(s){let n=us.get(s);n||us.set(s,n=[]),n.push(e)}}function ri(e,t,s=se){const{immediate:n,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=s,d=w=>r?w:ke(w)||r===!1||r===0?rt(w,1):rt(w);let c,p,y,C,O=!1,E=!1;if(xe(e)?(p=()=>e.value,O=ke(e)):xt(e)?(p=()=>d(e),O=!0):H(e)?(E=!0,O=e.some(w=>xt(w)||ke(w)),p=()=>e.map(w=>{if(xe(w))return w.value;if(xt(w))return d(w);if(B(w))return a?a(w,2):w()})):B(e)?t?p=a?()=>a(e,2):e:p=()=>{if(y){ot();try{y()}finally{it()}}const w=mt;mt=c;try{return a?a(e,3,[C]):e(C)}finally{mt=w}}:p=Ye,t&&r){const w=p,D=r===!0?1/0:r;p=()=>rt(w(),D)}const F=Ro(),V=()=>{c.stop(),F&&F.active&&on(F.effects,c)};if(o&&t){const w=t;t=(...D)=>{w(...D),V()}}let N=E?new Array(e.length).fill(rs):rs;const z=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(t){const D=c.run();if(r||O||(E?D.some((X,ie)=>dt(X,N[ie])):dt(D,N))){y&&y();const X=mt;mt=c;try{const ie=[D,N===rs?void 0:E&&N[0]===rs?[]:N,C];N=D,a?a(t,3,ie):t(...ie)}finally{mt=X}}}else c.run()};return l&&l(z),c=new mr(p),c.scheduler=i?()=>i(z,!1):z,C=w=>ni(w,!1,c),y=c.onStop=()=>{const w=us.get(c);if(w){if(a)a(w,4);else for(const D of w)D();us.delete(c)}},t?n?z(!0):N=c.run():i?i(z.bind(null,!0),!0):c.run(),V.pause=c.pause.bind(c),V.resume=c.resume.bind(c),V.stop=V,V}function rt(e,t=1/0,s){if(t<=0||!ee(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,xe(e))rt(e.value,t,s);else if(H(e))for(let n=0;n<e.length;n++)rt(e[n],t,s);else if(_s(e)||Et(e))e.forEach(n=>{rt(n,t,s)});else if(fr(e)){for(const n in e)rt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&rt(e[n],t,s)}return e}function Zt(e,t,s,n){try{return n?e(...n):e()}catch(r){Ps(r,t,s)}}function Xe(e,t,s,n){if(B(e)){const r=Zt(e,t,s,n);return r&&ur(r)&&r.catch(o=>{Ps(o,t,s)}),r}if(H(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Xe(e[o],t,s,n));return r}}function Ps(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||se;if(t){let l=t.parent;const a=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const c=l.ec;if(c){for(let p=0;p<c.length;p++)if(c[p](e,a,d)===!1)return}l=l.parent}if(o){ot(),Zt(o,null,10,[e,a,d]),it();return}}oi(e,s,r,n,i)}function oi(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const we=[];let Je=-1;const Pt=[];let ft=null,St=0;const Lr=Promise.resolve();let cs=null;function fs(e){const t=cs||Lr;return e?t.then(this?e.bind(this):e):t}function ii(e){let t=Je+1,s=we.length;for(;t<s;){const n=t+s>>>1,r=we[n],o=Jt(r);o<e||o===e&&r.flags&2?t=n+1:s=n}return t}function mn(e){if(!(e.flags&1)){const t=Jt(e),s=we[we.length-1];!s||!(e.flags&2)&&t>=Jt(s)?we.push(e):we.splice(ii(t),0,e),e.flags|=1,jr()}}function jr(){cs||(cs=Lr.then(kr))}function li(e){H(e)?Pt.push(...e):ft&&e.id===-1?ft.splice(St+1,0,e):e.flags&1||(Pt.push(e),e.flags|=1),jr()}function Rn(e,t,s=Je+1){for(;s<we.length;s++){const n=we[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;we.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Ir(e){if(Pt.length){const t=[...new Set(Pt)].sort((s,n)=>Jt(s)-Jt(n));if(Pt.length=0,ft){ft.push(...t);return}for(ft=t,St=0;St<ft.length;St++){const s=ft[St];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}ft=null,St=0}}const Jt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function kr(e){try{for(Je=0;Je<we.length;Je++){const t=we[Je];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Zt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Je<we.length;Je++){const t=we[Je];t&&(t.flags&=-2)}Je=-1,we.length=0,Ir(),cs=null,(we.length||Pt.length)&&kr()}}let ye=null,$r=null;function ds(e){const t=ye;return ye=e,$r=e&&e.type.__scopeId||null,t}function ai(e,t=ye,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&Un(-1);const o=ds(t);let i;try{i=e(...r)}finally{ds(o),n._d&&Un(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function Tt(e,t){if(ye===null)return e;const s=Ls(ye),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=se]=t[r];o&&(B(o)&&(o={mounted:o,updated:o}),o.deep&&rt(i),n.push({dir:o,instance:s,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function gt(e,t,s,n){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let a=l.dir[n];a&&(ot(),Xe(a,s,8,[e.el,l,e,t]),it())}}function ui(e,t){if(Se){let s=Se.provides;const n=Se.parent&&Se.parent.provides;n===s&&(s=Se.provides=Object.create(n)),s[e]=t}}function is(e,t,s=!1){const n=il();if(n||Mt){let r=Mt?Mt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&B(t)?t.call(n&&n.proxy):t}}const ci=Symbol.for("v-scx"),fi=()=>is(ci);function Re(e,t,s){return Fr(e,t,s)}function Fr(e,t,s=se){const{immediate:n,deep:r,flush:o,once:i}=s,l=ge({},s),a=t&&n||!t&&o!=="post";let d;if(Qt){if(o==="sync"){const C=fi();d=C.__watcherHandles||(C.__watcherHandles=[])}else if(!a){const C=()=>{};return C.stop=Ye,C.resume=Ye,C.pause=Ye,C}}const c=Se;l.call=(C,O,E)=>Xe(C,c,O,E);let p=!1;o==="post"?l.scheduler=C=>{Pe(C,c&&c.suspense)}:o!=="sync"&&(p=!0,l.scheduler=(C,O)=>{O?C():mn(C)}),l.augmentJob=C=>{t&&(C.flags|=4),p&&(C.flags|=2,c&&(C.id=c.uid,C.i=c))};const y=ri(e,t,l);return Qt&&(d?d.push(y):a&&y()),y}function di(e,t,s){const n=this.proxy,r=ce(e)?e.includes(".")?Dr(n,e):()=>n[e]:e.bind(n,n);let o;B(t)?o=t:(o=t.handler,s=t);const i=ts(this),l=Fr(r,o.bind(n),s);return i(),l}function Dr(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const pi=Symbol("_vte"),hi=e=>e.__isTeleport,gi=Symbol("_leaveCb");function bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function es(e,t){return B(e)?ge({name:e.name},t,{setup:e}):e}function Nr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ln(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ps=new WeakMap;function Ut(e,t,s,n,r=!1){if(H(e)){e.forEach((E,F)=>Ut(E,t&&(H(t)?t[F]:t),s,n,r));return}if(At(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ut(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Ls(n.component):n.el,i=r?null:o,{i:l,r:a}=e,d=t&&t.r,c=l.refs===se?l.refs={}:l.refs,p=l.setupState,y=G(p),C=p===se?ar:E=>Ln(c,E)?!1:Q(y,E),O=(E,F)=>!(F&&Ln(c,F));if(d!=null&&d!==a){if(jn(t),ce(d))c[d]=null,C(d)&&(p[d]=null);else if(xe(d)){const E=t;O(d,E.k)&&(d.value=null),E.k&&(c[E.k]=null)}}if(B(a))Zt(a,l,12,[i,c]);else{const E=ce(a),F=xe(a);if(E||F){const V=()=>{if(e.f){const N=E?C(a)?p[a]:c[a]:O()||!e.k?a.value:c[e.k];if(r)H(N)&&on(N,o);else if(H(N))N.includes(o)||N.push(o);else if(E)c[a]=[o],C(a)&&(p[a]=c[a]);else{const z=[o];O(a,e.k)&&(a.value=z),e.k&&(c[e.k]=z)}}else E?(c[a]=i,C(a)&&(p[a]=i)):F&&(O(a,e.k)&&(a.value=i),e.k&&(c[e.k]=i))};if(i){const N=()=>{V(),ps.delete(e)};N.id=-1,ps.set(e,N),Pe(N,s)}else jn(e),V()}}}function jn(e){const t=ps.get(e);t&&(t.flags|=8,ps.delete(e))}Ts().requestIdleCallback;Ts().cancelIdleCallback;const At=e=>!!e.type.__asyncLoader,Hr=e=>e.type.__isKeepAlive;function vi(e,t){Vr(e,"a",t)}function mi(e,t){Vr(e,"da",t)}function Vr(e,t,s=Se){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(As(t,n,s),s){let r=s.parent;for(;r&&r.parent;)Hr(r.parent.vnode)&&bi(n,t,s,r),r=r.parent}}function bi(e,t,s,n){const r=As(t,e,n,!0);Ms(()=>{on(n[t],r)},s)}function As(e,t,s=Se,n=!1){if(s){const r=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ot();const l=ts(s),a=Xe(t,s,e,i);return l(),it(),a});return n?r.unshift(o):r.push(o),o}}const ut=e=>(t,s=Se)=>{(!Qt||e==="sp")&&As(e,(...n)=>t(...n),s)},yi=ut("bm"),hs=ut("m"),xi=ut("bu"),_i=ut("u"),wi=ut("bum"),Ms=ut("um"),Si=ut("sp"),Ti=ut("rtg"),Ci=ut("rtc");function Ei(e,t=Se){As("ec",e,t)}const Pi=Symbol.for("v-ndc");function Bt(e,t,s,n){let r;const o=s,i=H(e);if(i||ce(e)){const l=i&&xt(e);let a=!1,d=!1;l&&(a=!ke(e),d=lt(e),e=Es(e)),r=new Array(e.length);for(let c=0,p=e.length;c<p;c++)r[c]=t(a?d?Rt(Ve(e[c])):Ve(e[c]):e[c],c,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o)}else if(ee(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,d=l.length;a<d;a++){const c=l[a];r[a]=t(e[c],c,a,o)}}else r=[];return r}function Ai(e,t,s={},n,r){if(ye.ce||ye.parent&&At(ye.parent)&&ye.parent.ce){const d=Object.keys(s).length>0;return L(),Lt(he,null,[Ne("slot",s,n&&n())],d?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),L();const i=o&&Ur(o(s)),l=s.key||i&&i.key,a=Lt(he,{key:(l&&!He(l)?l:`_${t}`)+(!i&&n?"_fb":"")},i||(n?n():[]),i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),a}function Ur(e){return e.some(t=>_n(t)?!(t.type===at||t.type===he&&!Ur(t.children)):!0)?e:null}const Qs=e=>e?uo(e)?Ls(e):Qs(e.parent):null,Kt=ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qs(e.parent),$root:e=>Qs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Kr(e),$forceUpdate:e=>e.f||(e.f=()=>{mn(e.update)}),$nextTick:e=>e.n||(e.n=fs.bind(e.proxy)),$watch:e=>di.bind(e)}),Ds=(e,t)=>e!==se&&!e.__isScriptSetup&&Q(e,t),Mi={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const y=i[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return o[t]}else{if(Ds(n,t))return i[t]=1,n[t];if(r!==se&&Q(r,t))return i[t]=2,r[t];if(Q(o,t))return i[t]=3,o[t];if(s!==se&&Q(s,t))return i[t]=4,s[t];Ys&&(i[t]=0)}}const d=Kt[t];let c,p;if(d)return t==="$attrs"&&be(e.attrs,"get",""),d(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(s!==se&&Q(s,t))return i[t]=4,s[t];if(p=a.config.globalProperties,Q(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:o}=e;return Ds(r,t)?(r[t]=s,!0):n!==se&&Q(n,t)?(n[t]=s,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:o,type:i}},l){let a;return!!(s[l]||e!==se&&l[0]!=="$"&&Q(e,l)||Ds(t,l)||Q(o,l)||Q(n,l)||Q(Kt,l)||Q(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Q(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function In(e){return H(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Ys=!0;function Oi(e){const t=Kr(e),s=e.proxy,n=e.ctx;Ys=!1,t.beforeCreate&&kn(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:d,created:c,beforeMount:p,mounted:y,beforeUpdate:C,updated:O,activated:E,deactivated:F,beforeDestroy:V,beforeUnmount:N,destroyed:z,unmounted:w,render:D,renderTracked:X,renderTriggered:ie,errorCaptured:Z,serverPrefetch:Me,expose:ve,inheritAttrs:me,components:j,directives:K,filters:fe}=t;if(d&&Ri(d,n,null),i)for(const te in i){const J=i[te];B(J)&&(n[te]=J.bind(s))}if(r){const te=r.call(s,s);ee(te)&&(e.data=pn(te))}if(Ys=!0,o)for(const te in o){const J=o[te],$e=B(J)?J.bind(s,s):B(J.get)?J.get.bind(s,s):Ye,Ue=!B(J)&&B(J.set)?J.set.bind(s):Ye,Ie=ue({get:$e,set:Ue});Object.defineProperty(n,te,{enumerable:!0,configurable:!0,get:()=>Ie.value,set:ae=>Ie.value=ae})}if(l)for(const te in l)Br(l[te],n,s,te);if(a){const te=B(a)?a.call(s):a;Reflect.ownKeys(te).forEach(J=>{ui(J,te[J])})}c&&kn(c,e,"c");function le(te,J){H(J)?J.forEach($e=>te($e.bind(s))):J&&te(J.bind(s))}if(le(yi,p),le(hs,y),le(xi,C),le(_i,O),le(vi,E),le(mi,F),le(Ei,Z),le(Ci,X),le(Ti,ie),le(wi,N),le(Ms,w),le(Si,Me),H(ve))if(ve.length){const te=e.exposed||(e.exposed={});ve.forEach(J=>{Object.defineProperty(te,J,{get:()=>s[J],set:$e=>s[J]=$e,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===Ye&&(e.render=D),me!=null&&(e.inheritAttrs=me),j&&(e.components=j),K&&(e.directives=K),Me&&Nr(e)}function Ri(e,t,s=Ye){H(e)&&(e=Xs(e));for(const n in e){const r=e[n];let o;ee(r)?"default"in r?o=is(r.from||n,r.default,!0):o=is(r.from||n):o=is(r),xe(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[n]=o}}function kn(e,t,s){Xe(H(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Br(e,t,s,n){let r=n.includes(".")?Dr(s,n):()=>s[n];if(ce(e)){const o=t[e];B(o)&&Re(r,o)}else if(B(e))Re(r,e.bind(s));else if(ee(e))if(H(e))e.forEach(o=>Br(o,t,s,n));else{const o=B(e.handler)?e.handler.bind(s):t[e.handler];B(o)&&Re(r,o,e)}}function Kr(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!s&&!n?a=t:(a={},r.length&&r.forEach(d=>gs(a,d,i,!0)),gs(a,t,i)),ee(t)&&o.set(t,a),a}function gs(e,t,s,n=!1){const{mixins:r,extends:o}=t;o&&gs(e,o,s,!0),r&&r.forEach(i=>gs(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const l=Li[i]||s&&s[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Li={data:$n,props:Fn,emits:Fn,methods:Dt,computed:Dt,beforeCreate:_e,created:_e,beforeMount:_e,mounted:_e,beforeUpdate:_e,updated:_e,beforeDestroy:_e,beforeUnmount:_e,destroyed:_e,unmounted:_e,activated:_e,deactivated:_e,errorCaptured:_e,serverPrefetch:_e,components:Dt,directives:Dt,watch:Ii,provide:$n,inject:ji};function $n(e,t){return t?e?function(){return ge(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function ji(e,t){return Dt(Xs(e),Xs(t))}function Xs(e){if(H(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function _e(e,t){return e?[...new Set([].concat(e,t))]:t}function Dt(e,t){return e?ge(Object.create(null),e,t):t}function Fn(e,t){return e?H(e)&&H(t)?[...new Set([...e,...t])]:ge(Object.create(null),In(e),In(t??{})):t}function Ii(e,t){if(!e)return t;if(!t)return e;const s=ge(Object.create(null),e);for(const n in t)s[n]=_e(e[n],t[n]);return s}function Wr(){return{app:null,config:{isNativeTag:ar,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ki=0;function $i(e,t){return function(n,r=null){B(n)||(n=ge({},n)),r!=null&&!ee(r)&&(r=null);const o=Wr(),i=new WeakSet,l=[];let a=!1;const d=o.app={_uid:ki++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:dl,get config(){return o.config},set config(c){},use(c,...p){return i.has(c)||(c&&B(c.install)?(i.add(c),c.install(d,...p)):B(c)&&(i.add(c),c(d,...p))),d},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),d},component(c,p){return p?(o.components[c]=p,d):o.components[c]},directive(c,p){return p?(o.directives[c]=p,d):o.directives[c]},mount(c,p,y){if(!a){const C=d._ceVNode||Ne(n,r);return C.appContext=o,y===!0?y="svg":y===!1&&(y=void 0),e(C,c,y),a=!0,d._container=c,c.__vue_app__=d,Ls(C.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Xe(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,p){return o.provides[c]=p,d},runWithContext(c){const p=Mt;Mt=d;try{return c()}finally{Mt=p}}};return d}}let Mt=null;const Fi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${pt(t)}Modifiers`]||e[`${_t(t)}Modifiers`];function Di(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||se;let r=s;const o=t.startsWith("update:"),i=o&&Fi(n,t.slice(7));i&&(i.trim&&(r=s.map(c=>ce(c)?c.trim():c)),i.number&&(r=s.map(Ss)));let l,a=n[l=js(t)]||n[l=js(pt(t))];!a&&o&&(a=n[l=js(_t(t))]),a&&Xe(a,e,6,r);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Xe(d,e,6,r)}}const Ni=new WeakMap;function qr(e,t,s=!1){const n=s?Ni:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!B(e)){const a=d=>{const c=qr(d,t,!0);c&&(l=!0,ge(i,c))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(ee(e)&&n.set(e,null),null):(H(o)?o.forEach(a=>i[a]=null):ge(i,o),ee(e)&&n.set(e,i),i)}function Os(e,t){return!e||!xs(t)?!1:(t=t.slice(2).replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,_t(t))||Q(e,t))}function Dn(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:d,renderCache:c,props:p,data:y,setupState:C,ctx:O,inheritAttrs:E}=e,F=ds(e);let V,N;try{if(s.shapeFlag&4){const w=r||n,D=w;V=Qe(d.call(D,w,c,p,C,y,O)),N=l}else{const w=t;V=Qe(w.length>1?w(p,{attrs:l,slots:i,emit:a}):w(p,null)),N=t.props?l:Hi(l)}}catch(w){Wt.length=0,Ps(w,e,1),V=Ne(at)}let z=V;if(N&&E!==!1){const w=Object.keys(N),{shapeFlag:D}=z;w.length&&D&7&&(o&&w.some(rn)&&(N=Vi(N,o)),z=jt(z,N,!1,!0))}return s.dirs&&(z=jt(z,null,!1,!0),z.dirs=z.dirs?z.dirs.concat(s.dirs):s.dirs),s.transition&&bn(z,s.transition),V=z,ds(F),V}const Hi=e=>{let t;for(const s in e)(s==="class"||s==="style"||xs(s))&&((t||(t={}))[s]=e[s]);return t},Vi=(e,t)=>{const s={};for(const n in e)(!rn(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ui(e,t,s){const{props:n,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?Nn(n,i,d):!!i;if(a&8){const c=t.dynamicProps;for(let p=0;p<c.length;p++){const y=c[p];if(zr(i,n,y)&&!Os(d,y))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:n===i?!1:n?i?Nn(n,i,d):!0:!!i;return!1}function Nn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const o=n[r];if(zr(t,e,o)&&!Os(s,o))return!0}return!1}function zr(e,t,s){const n=e[s],r=t[s];return s==="style"&&ee(n)&&ee(r)?!Xt(n,r):n!==r}function Bi({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Jr={},Gr=()=>Object.create(Jr),Qr=e=>Object.getPrototypeOf(e)===Jr;function Ki(e,t,s,n=!1){const r={},o=Gr();e.propsDefaults=Object.create(null),Yr(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);s?e.props=n?r:Qo(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Wi(e,t,s,n){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=G(r),[a]=e.propsOptions;let d=!1;if((n||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let p=0;p<c.length;p++){let y=c[p];if(Os(e.emitsOptions,y))continue;const C=t[y];if(a)if(Q(o,y))C!==o[y]&&(o[y]=C,d=!0);else{const O=pt(y);r[O]=Zs(a,l,O,C,e,!1)}else C!==o[y]&&(o[y]=C,d=!0)}}}else{Yr(e,t,r,o)&&(d=!0);let c;for(const p in l)(!t||!Q(t,p)&&((c=_t(p))===p||!Q(t,c)))&&(a?s&&(s[p]!==void 0||s[c]!==void 0)&&(r[p]=Zs(a,l,p,void 0,e,!0)):delete r[p]);if(o!==l)for(const p in o)(!t||!Q(t,p))&&(delete o[p],d=!0)}d&&nt(e.attrs,"set","")}function Yr(e,t,s,n){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Nt(a))continue;const d=t[a];let c;r&&Q(r,c=pt(a))?!o||!o.includes(c)?s[c]=d:(l||(l={}))[c]=d:Os(e.emitsOptions,a)||(!(a in n)||d!==n[a])&&(n[a]=d,i=!0)}if(o){const a=G(s),d=l||se;for(let c=0;c<o.length;c++){const p=o[c];s[p]=Zs(r,a,p,d[p],e,!Q(d,p))}}return i}function Zs(e,t,s,n,r,o){const i=e[s];if(i!=null){const l=Q(i,"default");if(l&&n===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&B(a)){const{propsDefaults:d}=r;if(s in d)n=d[s];else{const c=ts(r);n=d[s]=a.call(null,t),c()}}else n=a;r.ce&&r.ce._setProp(s,n)}i[0]&&(o&&!l?n=!1:i[1]&&(n===""||n===_t(s))&&(n=!0))}return n}const qi=new WeakMap;function Xr(e,t,s=!1){const n=s?qi:t.propsCache,r=n.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!B(e)){const c=p=>{a=!0;const[y,C]=Xr(p,t,!0);ge(i,y),C&&l.push(...C)};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!a)return ee(e)&&n.set(e,Ct),Ct;if(H(o))for(let c=0;c<o.length;c++){const p=pt(o[c]);Hn(p)&&(i[p]=se)}else if(o)for(const c in o){const p=pt(c);if(Hn(p)){const y=o[c],C=i[p]=H(y)||B(y)?{type:y}:ge({},y),O=C.type;let E=!1,F=!0;if(H(O))for(let V=0;V<O.length;++V){const N=O[V],z=B(N)&&N.name;if(z==="Boolean"){E=!0;break}else z==="String"&&(F=!1)}else E=B(O)&&O.name==="Boolean";C[0]=E,C[1]=F,(E||Q(C,"default"))&&l.push(p)}}const d=[i,l];return ee(e)&&n.set(e,d),d}function Hn(e){return e[0]!=="$"&&!Nt(e)}const yn=e=>e==="_"||e==="_ctx"||e==="$stable",xn=e=>H(e)?e.map(Qe):[Qe(e)],zi=(e,t,s)=>{if(t._n)return t;const n=ai((...r)=>xn(t(...r)),s);return n._c=!1,n},Zr=(e,t,s)=>{const n=e._ctx;for(const r in e){if(yn(r))continue;const o=e[r];if(B(o))t[r]=zi(r,o,n);else if(o!=null){const i=xn(o);t[r]=()=>i}}},eo=(e,t)=>{const s=xn(t);e.slots.default=()=>s},to=(e,t,s)=>{for(const n in t)(s||!yn(n))&&(e[n]=t[n])},Ji=(e,t,s)=>{const n=e.slots=Gr();if(e.vnode.shapeFlag&32){const r=t._;r?(to(n,t,s),s&&pr(n,"_",r,!0)):Zr(t,n)}else t&&eo(e,t)},Gi=(e,t,s)=>{const{vnode:n,slots:r}=e;let o=!0,i=se;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:to(r,t,s):(o=!t.$stable,Zr(t,r)),i=t}else t&&(eo(e,t),i={default:1});if(o)for(const l in r)!yn(l)&&i[l]==null&&delete r[l]},Pe=el;function Qi(e){return Yi(e)}function Yi(e,t){const s=Ts();s.__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:d,setElementText:c,parentNode:p,nextSibling:y,setScopeId:C=Ye,insertStaticContent:O}=e,E=(u,f,h,x=null,g=null,v=null,P=void 0,S=null,_=!!f.dynamicChildren)=>{if(u===f)return;u&&!$t(u,f)&&(x=Te(u),ae(u,g,v,!0),u=null),f.patchFlag===-2&&(_=!1,f.dynamicChildren=null);const{type:m,ref:$,shapeFlag:M}=f;switch(m){case Rs:F(u,f,h,x);break;case at:V(u,f,h,x);break;case Hs:u==null&&N(f,h,x,P);break;case he:j(u,f,h,x,g,v,P,S,_);break;default:M&1?D(u,f,h,x,g,v,P,S,_):M&6?K(u,f,h,x,g,v,P,S,_):(M&64||M&128)&&m.process(u,f,h,x,g,v,P,S,_,Be)}$!=null&&g?Ut($,u&&u.ref,v,f||u,!f):$==null&&u&&u.ref!=null&&Ut(u.ref,null,v,u,!0)},F=(u,f,h,x)=>{if(u==null)n(f.el=l(f.children),h,x);else{const g=f.el=u.el;f.children!==u.children&&d(g,f.children)}},V=(u,f,h,x)=>{u==null?n(f.el=a(f.children||""),h,x):f.el=u.el},N=(u,f,h,x)=>{[u.el,u.anchor]=O(u.children,f,h,x,u.el,u.anchor)},z=({el:u,anchor:f},h,x)=>{let g;for(;u&&u!==f;)g=y(u),n(u,h,x),u=g;n(f,h,x)},w=({el:u,anchor:f})=>{let h;for(;u&&u!==f;)h=y(u),r(u),u=h;r(f)},D=(u,f,h,x,g,v,P,S,_)=>{if(f.type==="svg"?P="svg":f.type==="math"&&(P="mathml"),u==null)X(f,h,x,g,v,P,S,_);else{const m=u.el&&u.el._isVueCE?u.el:null;try{m&&m._beginPatch(),Me(u,f,g,v,P,S,_)}finally{m&&m._endPatch()}}},X=(u,f,h,x,g,v,P,S)=>{let _,m;const{props:$,shapeFlag:M,transition:I,dirs:U}=u;if(_=u.el=i(u.type,v,$&&$.is,$),M&8?c(_,u.children):M&16&&Z(u.children,_,null,x,g,Ns(u,v),P,S),U&&gt(u,null,x,"created"),ie(_,u,u.scopeId,P,x),$){for(const re in $)re!=="value"&&!Nt(re)&&o(_,re,null,$[re],v,x);"value"in $&&o(_,"value",null,$.value,v),(m=$.onVnodeBeforeMount)&&ze(m,x,u)}U&&gt(u,null,x,"beforeMount");const q=Xi(g,I);q&&I.beforeEnter(_),n(_,f,h),((m=$&&$.onVnodeMounted)||q||U)&&Pe(()=>{m&&ze(m,x,u),q&&I.enter(_),U&&gt(u,null,x,"mounted")},g)},ie=(u,f,h,x,g)=>{if(h&&C(u,h),x)for(let v=0;v<x.length;v++)C(u,x[v]);if(g){let v=g.subTree;if(f===v||oo(v.type)&&(v.ssContent===f||v.ssFallback===f)){const P=g.vnode;ie(u,P,P.scopeId,P.slotScopeIds,g.parent)}}},Z=(u,f,h,x,g,v,P,S,_=0)=>{for(let m=_;m<u.length;m++){const $=u[m]=S?st(u[m]):Qe(u[m]);E(null,$,f,h,x,g,v,P,S)}},Me=(u,f,h,x,g,v,P)=>{const S=f.el=u.el;let{patchFlag:_,dynamicChildren:m,dirs:$}=f;_|=u.patchFlag&16;const M=u.props||se,I=f.props||se;let U;if(h&&vt(h,!1),(U=I.onVnodeBeforeUpdate)&&ze(U,h,f,u),$&&gt(f,u,h,"beforeUpdate"),h&&vt(h,!0),(M.innerHTML&&I.innerHTML==null||M.textContent&&I.textContent==null)&&c(S,""),m?ve(u.dynamicChildren,m,S,h,x,Ns(f,g),v):P||J(u,f,S,null,h,x,Ns(f,g),v,!1),_>0){if(_&16)me(S,M,I,h,g);else if(_&2&&M.class!==I.class&&o(S,"class",null,I.class,g),_&4&&o(S,"style",M.style,I.style,g),_&8){const q=f.dynamicProps;for(let re=0;re<q.length;re++){const Y=q[re],Ce=M[Y],Ee=I[Y];(Ee!==Ce||Y==="value")&&o(S,Y,Ce,Ee,g,h)}}_&1&&u.children!==f.children&&c(S,f.children)}else!P&&m==null&&me(S,M,I,h,g);((U=I.onVnodeUpdated)||$)&&Pe(()=>{U&&ze(U,h,f,u),$&&gt(f,u,h,"updated")},x)},ve=(u,f,h,x,g,v,P)=>{for(let S=0;S<f.length;S++){const _=u[S],m=f[S],$=_.el&&(_.type===he||!$t(_,m)||_.shapeFlag&198)?p(_.el):h;E(_,m,$,null,x,g,v,P,!0)}},me=(u,f,h,x,g)=>{if(f!==h){if(f!==se)for(const v in f)!Nt(v)&&!(v in h)&&o(u,v,f[v],null,g,x);for(const v in h){if(Nt(v))continue;const P=h[v],S=f[v];P!==S&&v!=="value"&&o(u,v,S,P,g,x)}"value"in h&&o(u,"value",f.value,h.value,g)}},j=(u,f,h,x,g,v,P,S,_)=>{const m=f.el=u?u.el:l(""),$=f.anchor=u?u.anchor:l("");let{patchFlag:M,dynamicChildren:I,slotScopeIds:U}=f;U&&(S=S?S.concat(U):U),u==null?(n(m,h,x),n($,h,x),Z(f.children||[],h,$,g,v,P,S,_)):M>0&&M&64&&I&&u.dynamicChildren&&u.dynamicChildren.length===I.length?(ve(u.dynamicChildren,I,h,g,v,P,S),(f.key!=null||g&&f===g.subTree)&&so(u,f,!0)):J(u,f,h,$,g,v,P,S,_)},K=(u,f,h,x,g,v,P,S,_)=>{f.slotScopeIds=S,u==null?f.shapeFlag&512?g.ctx.activate(f,h,x,P,_):fe(f,h,x,g,v,P,_):je(u,f,_)},fe=(u,f,h,x,g,v,P)=>{const S=u.component=ol(u,x,g);if(Hr(u)&&(S.ctx.renderer=Be),ll(S,!1,P),S.asyncDep){if(g&&g.registerDep(S,le,P),!u.el){const _=S.subTree=Ne(at);V(null,_,f,h),u.placeholder=_.el}}else le(S,u,f,h,g,v,P)},je=(u,f,h)=>{const x=f.component=u.component;if(Ui(u,f,h))if(x.asyncDep&&!x.asyncResolved){te(x,f,h);return}else x.next=f,x.update();else f.el=u.el,x.vnode=f},le=(u,f,h,x,g,v,P)=>{const S=()=>{if(u.isMounted){let{next:M,bu:I,u:U,parent:q,vnode:re}=u;{const We=no(u);if(We){M&&(M.el=re.el,te(u,M,P)),We.asyncDep.then(()=>{Pe(()=>{u.isUnmounted||m()},g)});return}}let Y=M,Ce;vt(u,!1),M?(M.el=re.el,te(u,M,P)):M=re,I&&os(I),(Ce=M.props&&M.props.onVnodeBeforeUpdate)&&ze(Ce,q,M,re),vt(u,!0);const Ee=Dn(u),Ke=u.subTree;u.subTree=Ee,E(Ke,Ee,p(Ke.el),Te(Ke),u,g,v),M.el=Ee.el,Y===null&&Bi(u,Ee.el),U&&Pe(U,g),(Ce=M.props&&M.props.onVnodeUpdated)&&Pe(()=>ze(Ce,q,M,re),g)}else{let M;const{el:I,props:U}=f,{bm:q,m:re,parent:Y,root:Ce,type:Ee}=u,Ke=At(f);vt(u,!1),q&&os(q),!Ke&&(M=U&&U.onVnodeBeforeMount)&&ze(M,Y,f),vt(u,!0);{Ce.ce&&Ce.ce._hasShadowRoot()&&Ce.ce._injectChildStyle(Ee);const We=u.subTree=Dn(u);E(null,We,h,x,u,g,v),f.el=We.el}if(re&&Pe(re,g),!Ke&&(M=U&&U.onVnodeMounted)){const We=f;Pe(()=>ze(M,Y,We),g)}(f.shapeFlag&256||Y&&At(Y.vnode)&&Y.vnode.shapeFlag&256)&&u.a&&Pe(u.a,g),u.isMounted=!0,f=h=x=null}};u.scope.on();const _=u.effect=new mr(S);u.scope.off();const m=u.update=_.run.bind(_),$=u.job=_.runIfDirty.bind(_);$.i=u,$.id=u.uid,_.scheduler=()=>mn($),vt(u,!0),m()},te=(u,f,h)=>{f.component=u;const x=u.vnode.props;u.vnode=f,u.next=null,Wi(u,f.props,x,h),Gi(u,f.children,h),ot(),Rn(u),it()},J=(u,f,h,x,g,v,P,S,_=!1)=>{const m=u&&u.children,$=u?u.shapeFlag:0,M=f.children,{patchFlag:I,shapeFlag:U}=f;if(I>0){if(I&128){Ue(m,M,h,x,g,v,P,S,_);return}else if(I&256){$e(m,M,h,x,g,v,P,S,_);return}}U&8?($&16&&ne(m,g,v),M!==m&&c(h,M)):$&16?U&16?Ue(m,M,h,x,g,v,P,S,_):ne(m,g,v,!0):($&8&&c(h,""),U&16&&Z(M,h,x,g,v,P,S,_))},$e=(u,f,h,x,g,v,P,S,_)=>{u=u||Ct,f=f||Ct;const m=u.length,$=f.length,M=Math.min(m,$);let I;for(I=0;I<M;I++){const U=f[I]=_?st(f[I]):Qe(f[I]);E(u[I],U,h,null,g,v,P,S,_)}m>$?ne(u,g,v,!0,!1,M):Z(f,h,x,g,v,P,S,_,M)},Ue=(u,f,h,x,g,v,P,S,_)=>{let m=0;const $=f.length;let M=u.length-1,I=$-1;for(;m<=M&&m<=I;){const U=u[m],q=f[m]=_?st(f[m]):Qe(f[m]);if($t(U,q))E(U,q,h,null,g,v,P,S,_);else break;m++}for(;m<=M&&m<=I;){const U=u[M],q=f[I]=_?st(f[I]):Qe(f[I]);if($t(U,q))E(U,q,h,null,g,v,P,S,_);else break;M--,I--}if(m>M){if(m<=I){const U=I+1,q=U<$?f[U].el:x;for(;m<=I;)E(null,f[m]=_?st(f[m]):Qe(f[m]),h,q,g,v,P,S,_),m++}}else if(m>I)for(;m<=M;)ae(u[m],g,v,!0),m++;else{const U=m,q=m,re=new Map;for(m=q;m<=I;m++){const Oe=f[m]=_?st(f[m]):Qe(f[m]);Oe.key!=null&&re.set(Oe.key,m)}let Y,Ce=0;const Ee=I-q+1;let Ke=!1,We=0;const It=new Array(Ee);for(m=0;m<Ee;m++)It[m]=0;for(m=U;m<=M;m++){const Oe=u[m];if(Ce>=Ee){ae(Oe,g,v,!0);continue}let qe;if(Oe.key!=null)qe=re.get(Oe.key);else for(Y=q;Y<=I;Y++)if(It[Y-q]===0&&$t(Oe,f[Y])){qe=Y;break}qe===void 0?ae(Oe,g,v,!0):(It[qe-q]=m+1,qe>=We?We=qe:Ke=!0,E(Oe,f[qe],h,null,g,v,P,S,_),Ce++)}const Sn=Ke?Zi(It):Ct;for(Y=Sn.length-1,m=Ee-1;m>=0;m--){const Oe=q+m,qe=f[Oe],Tn=f[Oe+1],Cn=Oe+1<$?Tn.el||ro(Tn):x;It[m]===0?E(null,qe,h,Cn,g,v,P,S,_):Ke&&(Y<0||m!==Sn[Y]?Ie(qe,h,Cn,2):Y--)}}},Ie=(u,f,h,x,g=null)=>{const{el:v,type:P,transition:S,children:_,shapeFlag:m}=u;if(m&6){Ie(u.component.subTree,f,h,x);return}if(m&128){u.suspense.move(f,h,x);return}if(m&64){P.move(u,f,h,Be);return}if(P===he){n(v,f,h);for(let M=0;M<_.length;M++)Ie(_[M],f,h,x);n(u.anchor,f,h);return}if(P===Hs){z(u,f,h);return}if(x!==2&&m&1&&S)if(x===0)S.beforeEnter(v),n(v,f,h),Pe(()=>S.enter(v),g);else{const{leave:M,delayLeave:I,afterLeave:U}=S,q=()=>{u.ctx.isUnmounted?r(v):n(v,f,h)},re=()=>{v._isLeaving&&v[gi](!0),M(v,()=>{q(),U&&U()})};I?I(v,q,re):re()}else n(v,f,h)},ae=(u,f,h,x=!1,g=!1)=>{const{type:v,props:P,ref:S,children:_,dynamicChildren:m,shapeFlag:$,patchFlag:M,dirs:I,cacheIndex:U}=u;if(M===-2&&(g=!1),S!=null&&(ot(),Ut(S,null,h,u,!0),it()),U!=null&&(f.renderCache[U]=void 0),$&256){f.ctx.deactivate(u);return}const q=$&1&&I,re=!At(u);let Y;if(re&&(Y=P&&P.onVnodeBeforeUnmount)&&ze(Y,f,u),$&6)R(u.component,h,x);else{if($&128){u.suspense.unmount(h,x);return}q&&gt(u,null,f,"beforeUnmount"),$&64?u.type.remove(u,f,h,Be,x):m&&!m.hasOnce&&(v!==he||M>0&&M&64)?ne(m,f,h,!1,!0):(v===he&&M&384||!g&&$&16)&&ne(_,f,h),x&&A(u)}(re&&(Y=P&&P.onVnodeUnmounted)||q)&&Pe(()=>{Y&&ze(Y,f,u),q&&gt(u,null,f,"unmounted")},h)},A=u=>{const{type:f,el:h,anchor:x,transition:g}=u;if(f===he){b(h,x);return}if(f===Hs){w(u);return}const v=()=>{r(h),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(u.shapeFlag&1&&g&&!g.persisted){const{leave:P,delayLeave:S}=g,_=()=>P(h,v);S?S(u.el,v,_):_()}else v()},b=(u,f)=>{let h;for(;u!==f;)h=y(u),r(u),u=h;r(f)},R=(u,f,h)=>{const{bum:x,scope:g,job:v,subTree:P,um:S,m:_,a:m}=u;Vn(_),Vn(m),x&&os(x),g.stop(),v&&(v.flags|=8,ae(P,u,f,h)),S&&Pe(S,f),Pe(()=>{u.isUnmounted=!0},f)},ne=(u,f,h,x=!1,g=!1,v=0)=>{for(let P=v;P<u.length;P++)ae(u[P],f,h,x,g)},Te=u=>{if(u.shapeFlag&6)return Te(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=y(u.anchor||u.el),h=f&&f[pi];return h?y(h):f};let Ze=!1;const ht=(u,f,h)=>{let x;u==null?f._vnode&&(ae(f._vnode,null,null,!0),x=f._vnode.component):E(f._vnode||null,u,f,null,null,null,h),f._vnode=u,Ze||(Ze=!0,Rn(x),Ir(),Ze=!1)},Be={p:E,um:ae,m:Ie,r:A,mt:fe,mc:Z,pc:J,pbc:ve,n:Te,o:e};return{render:ht,hydrate:void 0,createApp:$i(ht)}}function Ns({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function vt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Xi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function so(e,t,s=!1){const n=e.children,r=t.children;if(H(n)&&H(r))for(let o=0;o<n.length;o++){const i=n[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=st(r[o]),l.el=i.el),!s&&l.patchFlag!==-2&&so(i,l)),l.type===Rs&&(l.patchFlag===-1&&(l=r[o]=st(l)),l.el=i.el),l.type===at&&!l.el&&(l.el=i.el)}}function Zi(e){const t=e.slice(),s=[0];let n,r,o,i,l;const a=e.length;for(n=0;n<a;n++){const d=e[n];if(d!==0){if(r=s[s.length-1],e[r]<d){t[n]=r,s.push(n);continue}for(o=0,i=s.length-1;o<i;)l=o+i>>1,e[s[l]]<d?o=l+1:i=l;d<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,i=s[o-1];o-- >0;)s[o]=i,i=t[i];return s}function no(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:no(t)}function Vn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ro(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ro(t.subTree):null}const oo=e=>e.__isSuspense;function el(e,t){t&&t.pendingBranch?H(e)?t.effects.push(...e):t.effects.push(e):li(e)}const he=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Hs=Symbol.for("v-stc"),Wt=[];let Le=null;function L(e=!1){Wt.push(Le=e?null:[])}function tl(){Wt.pop(),Le=Wt[Wt.length-1]||null}let Gt=1;function Un(e,t=!1){Gt+=e,e<0&&Le&&t&&(Le.hasOnce=!0)}function io(e){return e.dynamicChildren=Gt>0?Le||Ct:null,tl(),Gt>0&&Le&&Le.push(e),e}function k(e,t,s,n,r,o){return io(T(e,t,s,n,r,o,!0))}function Lt(e,t,s,n,r){return io(Ne(e,t,s,n,r,!0))}function _n(e){return e?e.__v_isVNode===!0:!1}function $t(e,t){return e.type===t.type&&e.key===t.key}const lo=({key:e})=>e??null,ls=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ce(e)||xe(e)||B(e)?{i:ye,r:e,k:t,f:!!s}:e:null);function T(e,t=null,s=null,n=0,r=null,o=e===he?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lo(t),ref:t&&ls(t),scopeId:$r,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ye};return l?(wn(a,s),o&128&&e.normalize(a)):s&&(a.shapeFlag|=ce(s)?8:16),Gt>0&&!i&&Le&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Le.push(a),a}const Ne=sl;function sl(e,t=null,s=null,n=0,r=null,o=!1){if((!e||e===Pi)&&(e=at),_n(e)){const l=jt(e,t,!0);return s&&wn(l,s),Gt>0&&!o&&Le&&(l.shapeFlag&6?Le[Le.indexOf(e)]=l:Le.push(l)),l.patchFlag=-2,l}if(fl(e)&&(e=e.__vccOpts),t){t=ao(t);let{class:l,style:a}=t;l&&!ce(l)&&(t.class=Fe(l)),ee(a)&&(gn(a)&&!H(a)&&(a=ge({},a)),t.style=Cs(a))}const i=ce(e)?1:oo(e)?128:hi(e)?64:ee(e)?4:B(e)?2:0;return T(e,t,s,n,r,i,o,!0)}function ao(e){return e?gn(e)||Qr(e)?ge({},e):e:null}function jt(e,t,s=!1,n=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,d=t?en(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&lo(d),ref:t&&t.ref?s&&o?H(o)?o.concat(ls(t)):[o,ls(t)]:ls(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==he?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&jt(e.ssContent),ssFallback:e.ssFallback&&jt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&bn(c,a.clone(c)),c}function Ge(e=" ",t=0){return Ne(Rs,null,e,t)}function pe(e="",t=!1){return t?(L(),Lt(at,null,e)):Ne(at,null,e)}function Qe(e){return e==null||typeof e=="boolean"?Ne(at):H(e)?Ne(he,null,e.slice()):_n(e)?st(e):Ne(Rs,null,String(e))}function st(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:jt(e)}function wn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(H(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),wn(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Qr(t)?t._ctx=ye:r===3&&ye&&(ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else B(t)?(t={default:t,_ctx:ye},s=32):(t=String(t),n&64?(s=16,t=[Ge(t)]):s=8);e.children=t,e.shapeFlag|=s}function en(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=Fe([t.class,n.class]));else if(r==="style")t.style=Cs([t.style,n.style]);else if(xs(r)){const o=t[r],i=n[r];i&&o!==i&&!(H(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=n[r])}return t}function ze(e,t,s,n=null){Xe(e,t,7,[s,n])}const nl=Wr();let rl=0;function ol(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||nl,o={uid:rl++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Oo(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Xr(n,r),emitsOptions:qr(n,r),emit:null,emitted:null,propsDefaults:se,inheritAttrs:n.inheritAttrs,ctx:se,data:se,props:se,attrs:se,slots:se,refs:se,setupState:se,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Di.bind(null,o),e.ce&&e.ce(o),o}let Se=null;const il=()=>Se||ye;let vs,tn;{const e=Ts(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};vs=t("__VUE_INSTANCE_SETTERS__",s=>Se=s),tn=t("__VUE_SSR_SETTERS__",s=>Qt=s)}const ts=e=>{const t=Se;return vs(e),e.scope.on(),()=>{e.scope.off(),vs(t)}},Bn=()=>{Se&&Se.scope.off(),vs(null)};function uo(e){return e.vnode.shapeFlag&4}let Qt=!1;function ll(e,t=!1,s=!1){t&&tn(t);const{props:n,children:r}=e.vnode,o=uo(e);Ki(e,n,o,t),Ji(e,r,s||t);const i=o?al(e,t):void 0;return t&&tn(!1),i}function al(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Mi);const{setup:n}=s;if(n){ot();const r=e.setupContext=n.length>1?cl(e):null,o=ts(e),i=Zt(n,e,0,[e.props,r]),l=ur(i);if(it(),o(),(l||e.sp)&&!At(e)&&Nr(e),l){if(i.then(Bn,Bn),t)return i.then(a=>{Kn(e,a)}).catch(a=>{Ps(a,e,0)});e.asyncDep=i}else Kn(e,i)}else co(e)}function Kn(e,t,s){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ee(t)&&(e.setupState=Rr(t)),co(e)}function co(e,t,s){const n=e.type;e.render||(e.render=n.render||Ye);{const r=ts(e);ot();try{Oi(e)}finally{it(),r()}}}const ul={get(e,t){return be(e,"get",""),e[t]}};function cl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,ul),slots:e.slots,emit:e.emit,expose:t}}function Ls(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Rr(Yo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Kt)return Kt[s](e)},has(t,s){return s in t||s in Kt}})):e.proxy}function fl(e){return B(e)&&"__vccOpts"in e}const ue=(e,t)=>si(e,t,Qt),dl="3.5.28";let sn;const Wn=typeof window<"u"&&window.trustedTypes;if(Wn)try{sn=Wn.createPolicy("vue",{createHTML:e=>e})}catch{}const fo=sn?e=>sn.createHTML(e):e=>e,pl="http://www.w3.org/2000/svg",hl="http://www.w3.org/1998/Math/MathML",tt=typeof document<"u"?document:null,qn=tt&&tt.createElement("template"),gl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?tt.createElementNS(pl,e):t==="mathml"?tt.createElementNS(hl,e):s?tt.createElement(e,{is:s}):tt.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>tt.createTextNode(e),createComment:e=>tt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>tt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,o){const i=s?s.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===o||!(r=r.nextSibling)););else{qn.innerHTML=fo(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=qn.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},vl=Symbol("_vtc");function ml(e,t,s){const n=e[vl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const ms=Symbol("_vod"),po=Symbol("_vsh"),ho={name:"show",beforeMount(e,{value:t},{transition:s}){e[ms]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Ft(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Ft(e,!0),n.enter(e)):n.leave(e,()=>{Ft(e,!1)}):Ft(e,t))},beforeUnmount(e,{value:t}){Ft(e,t)}};function Ft(e,t){e.style.display=t?e[ms]:"none",e[po]=!t}const bl=Symbol(""),yl=/(?:^|;)\s*display\s*:/;function xl(e,t,s){const n=e.style,r=ce(s);let o=!1;if(s&&!r){if(t)if(ce(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();s[l]==null&&as(n,l,"")}else for(const i in t)s[i]==null&&as(n,i,"");for(const i in s)i==="display"&&(o=!0),as(n,i,s[i])}else if(r){if(t!==s){const i=n[bl];i&&(s+=";"+i),n.cssText=s,o=yl.test(s)}}else t&&e.removeAttribute("style");ms in e&&(e[ms]=o?n.display:"",e[po]&&(n.display="none"))}const zn=/\s*!important$/;function as(e,t,s){if(H(s))s.forEach(n=>as(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=_l(e,t);zn.test(s)?e.setProperty(_t(n),s.replace(zn,""),"important"):e[n]=s}}const Jn=["Webkit","Moz","ms"],Vs={};function _l(e,t){const s=Vs[t];if(s)return s;let n=pt(t);if(n!=="filter"&&n in e)return Vs[t]=n;n=dr(n);for(let r=0;r<Jn.length;r++){const o=Jn[r]+n;if(o in e)return Vs[t]=o}return t}const Gn="http://www.w3.org/1999/xlink";function Qn(e,t,s,n,r,o=Po(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Gn,t.slice(6,t.length)):e.setAttributeNS(Gn,t,s):s==null||o&&!hr(s)?e.removeAttribute(t):e.setAttribute(t,o?"":He(s)?String(s):s)}function Yn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?fo(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(l!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=hr(s):s==null&&l==="string"?(s="",i=!0):l==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(r||t)}function bt(e,t,s,n){e.addEventListener(t,s,n)}function wl(e,t,s,n){e.removeEventListener(t,s,n)}const Xn=Symbol("_vei");function Sl(e,t,s,n,r=null){const o=e[Xn]||(e[Xn]={}),i=o[t];if(n&&i)i.value=n;else{const[l,a]=Tl(t);if(n){const d=o[t]=Pl(n,r);bt(e,l,d,a)}else i&&(wl(e,l,i,a),o[t]=void 0)}}const Zn=/(?:Once|Passive|Capture)$/;function Tl(e){let t;if(Zn.test(e)){t={};let n;for(;n=e.match(Zn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):_t(e.slice(2)),t]}let Us=0;const Cl=Promise.resolve(),El=()=>Us||(Cl.then(()=>Us=0),Us=Date.now());function Pl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Xe(Al(n,s.value),t,5,[n])};return s.value=e,s.attached=El(),s}function Al(e,t){if(H(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const er=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ml=(e,t,s,n,r,o)=>{const i=r==="svg";t==="class"?ml(e,n,i):t==="style"?xl(e,s,n):xs(t)?rn(t)||Sl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ol(e,t,n,i))?(Yn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qn(e,t,n,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ce(n))?Yn(e,pt(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Qn(e,t,n,i))};function Ol(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&er(t)&&B(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return er(t)&&ce(s)?!1:t in e}const bs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return H(t)?s=>os(t,s):t};function Rl(e){e.target.composing=!0}function tr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ot=Symbol("_assign");function sr(e,t,s){return t&&(e=e.trim()),s&&(e=Ss(e)),e}const go={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[Ot]=bs(r);const o=n||r.props&&r.props.type==="number";bt(e,t?"change":"input",i=>{i.target.composing||e[Ot](sr(e.value,s,o))}),(s||o)&&bt(e,"change",()=>{e.value=sr(e.value,s,o)}),t||(bt(e,"compositionstart",Rl),bt(e,"compositionend",tr),bt(e,"change",tr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:o}},i){if(e[Ot]=bs(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ss(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===a)||(e.value=a))}},nr={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=_s(t);bt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?Ss(ys(i)):ys(i));e[Ot](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,fs(()=>{e._assigning=!1})}),e[Ot]=bs(n)},mounted(e,{value:t}){rr(e,t)},beforeUpdate(e,t,s){e[Ot]=bs(s)},updated(e,{value:t}){e._assigning||rr(e,t)}};function rr(e,t){const s=e.multiple,n=H(t);if(!(s&&!n&&!_s(t))){for(let r=0,o=e.options.length;r<o;r++){const i=e.options[r],l=ys(i);if(s)if(n){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(d=>String(d)===String(l)):i.selected=Mo(t,l)>-1}else i.selected=t.has(l);else if(Xt(ys(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ys(e){return"_value"in e?e._value:e.value}const Ll=ge({patchProp:Ml},gl);let or;function jl(){return or||(or=Qi(Ll))}const Il=((...e)=>{const t=jl().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=$l(n);if(!r)return;const o=t._component;!B(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=s(r,!1,kl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function kl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $l(e){return ce(e)?document.querySelector(e):e}const Bs=async e=>await new Promise(t=>setTimeout(t,e)),Fl=(e,t)=>{const s=n=>n instanceof Error?n:new Error("Aborted");return new Promise((n,r)=>{if(t.aborted){r(s(t.reason));return}const o=()=>{clearTimeout(i),r(s(t.reason))},i=setTimeout(()=>{t.removeEventListener("abort",o),n()},e);t.addEventListener("abort",o,{once:!0})})},Dl={class:"items-center justify-center w-full"},Nl={key:0,class:"group relative"},Hl=["src"],Vl={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},Ul={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},Bl={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},Kl={key:1,class:"group relative inline-block"},Wl=["src","controls"],ql=["src"],zl={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},Jl={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},Gl={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},Ql={key:2,class:"group relative inline-block"},Yl=["src"],Xl=["src"],Zl={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},ea={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},ta={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},sa={key:3,class:"group relative inline-block"},na=["src"],ra={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},oa={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},ia={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},la={key:4},aa={key:5,class:"mt-4 px-6 py-4 text-left"},ua={class:"text-lg leading-relaxed font-sans text-gray-800"},ca={key:0,class:"text-base leading-relaxed font-sans text-gray-400 mt-3 italic"},fa="https://github.com/receptron/mulmocast-cli/blob/main/assets/images/mulmocast_credit.png?raw=true",da=es({__name:"mulmo_player",props:{index:{},videoWithAudioSource:{default:void 0},soundEffectSource:{default:void 0},videoSource:{default:void 0},imageSource:{default:void 0},audioSource:{default:void 0},text:{default:void 0},originalText:{default:void 0},duration:{default:void 0},defaultLang:{default:void 0},currentLang:{default:void 0},playbackSpeed:{default:1}},emits:["play","pause","ended"],setup(e,{expose:t,emit:s}){const n=e,r=s,o=W(),i=W(),l=W(),a=W(),d=W(!1),c=()=>{i.value&&l.value&&!isNaN(i.value.duration)&&!isNaN(l.value.duration)&&(d.value=l.value.duration>i.value.duration+1)},p=()=>{if(i.value){if(n.soundEffectSource){i.value.volume=1;return}n.videoSource&&(n.audioSource&&n.currentLang&&n.defaultLang&&n.currentLang!==n.defaultLang?i.value.volume=.2:i.value.volume=0)}},y=()=>{const A=n.playbackSpeed??1;o.value&&(o.value.playbackRate=A),i.value&&(i.value.playbackRate=A),l.value&&(l.value.playbackRate=A),a.value&&(a.value.playbackRate=A)};Re([()=>n.currentLang,()=>n.defaultLang,()=>n.videoSource,()=>n.audioSource],()=>{p()}),Re(()=>n.playbackSpeed,()=>{y()}),Re(i,A=>{A&&(p(),y())}),Re([o,l,a],()=>{y()}),hs(()=>{p(),y()});const C=W(!1),O=W(!1),E=ue(()=>K.value||O.value);let F=null;const V=()=>{F&&(F.abort(),F=null)},N=()=>{K.value=!0,l.value&&i.value&&!l.value.ended&&(l.value.currentTime=i.value.currentTime,l.value.play().catch(()=>{})),r("play")},z=A=>{O.value||i.value?.ended&&l.value&&!l.value.ended||(document.hidden||(K.value=!1),!i.value?.ended&&l?.value&&l.value?.pause(),ve(A))},w=()=>{C.value||(!l.value||l.value.ended)&&me()},D=()=>{C.value||(!i.value||i.value.ended)&&me()},X=()=>{if(!i.value||!l.value)return;const A=Math.min(l.value.currentTime,i.value.duration);Math.abs(i.value.currentTime-A)>.5&&(i.value.currentTime=A)},ie=()=>{K.value=!0,i.value&&!i.value.ended&&i.value.play().catch(()=>{}),r("play")},Z=()=>{O.value||l.value?.ended||(document.hidden||(K.value=!1),i.value&&!i.value.ended&&i.value.pause(),r("pause"))},Me=()=>{K.value=!0,r("play")},ve=A=>{if(O.value)return;document.hidden||(K.value=!1);const b=A.target;b.duration!==b.currentTime&&r("pause")},me=()=>{C.value||(C.value=!0,K.value=!1,r("ended"))},j=()=>{o.value?.pause(),i.value?.pause(),l.value?.pause(),a.value?.pause()},K=W(!1);let fe=null;const je=async()=>{if(O.value=!1,C.value=!1,K.value=!0,o.value&&(y(),o.value.play().catch(()=>{})),i.value&&(p(),y(),i.value.play().catch(()=>{}),l.value&&(l.value.currentTime=i.value.currentTime,l.value.play().catch(()=>{}))),a.value&&(y(),a.value.play().catch(()=>{})),!o.value&&!i.value&&!a.value)try{V(),F=new AbortController,await Fl((n.duration??0)*1e3,F.signal),F=null,C.value||(K.value=!1,C.value=!0,r("ended"))}catch{}},le=()=>{O.value=!0,K.value=!1,C.value=!0,V(),o.value?.pause(),i.value?.pause(),l.value?.pause(),a.value?.pause()},te=()=>{!l.value||!i.value||l.value.ended||Math.abs(l.value.currentTime-i.value.currentTime)>.5&&(l.value.currentTime=i.value.currentTime)},J=A=>{A?.paused&&!A.ended&&A.play().catch(()=>{})},$e=(A,b)=>{b.paused&&!b.ended&&(A.ended||(b.currentTime=A.currentTime),b.play().catch(()=>{}))},Ue=()=>{K.value&&(J(o.value),i.value&&l.value?(J(i.value),$e(i.value,l.value)):J(i.value),J(a.value))},Ie=()=>{document.hidden&&K.value?fe||(fe=setInterval(Ue,500)):document.hidden||fe&&(clearInterval(fe),fe=null)},ae=()=>{document.hidden&&K.value&&setTimeout(Ue,50)};return hs(()=>{document.addEventListener("visibilitychange",Ie),o.value?.addEventListener("pause",ae),i.value?.addEventListener("pause",ae),a.value?.addEventListener("pause",ae),l.value?.addEventListener("pause",ae)}),Ms(()=>{document.removeEventListener("visibilitychange",Ie),o.value?.removeEventListener("pause",ae),i.value?.removeEventListener("pause",ae),a.value?.removeEventListener("pause",ae),l.value?.removeEventListener("pause",ae),fe&&(clearInterval(fe),fe=null),V()}),t({play:je,stop:le}),(A,b)=>(L(),k("div",Dl,[e.videoWithAudioSource?(L(),k("div",Nl,[T("video",{ref_key:"videoWithAudioRef",ref:o,src:e.videoWithAudioSource,class:"mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",controls:!0,playsinline:"true",onPlay:Me,onPause:ve,onEnded:me},null,40,Hl),T("div",Vl,[T("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:b[0]||(b[0]=R=>E.value?j():je())},[E.value?(L(),k("svg",Bl,[...b[5]||(b[5]=[T("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(L(),k("svg",Ul,[...b[4]||(b[4]=[T("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):e.soundEffectSource||e.videoSource?(L(),k("div",Kl,[T("video",{ref_key:"videoRef",ref:i,class:"mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",src:e.soundEffectSource||e.videoSource,controls:!d.value,playsinline:"true",onPlay:N,onPause:z,onEnded:w,onSeeked:te,onLoadedmetadata:c},null,40,Wl),e.audioSource?(L(),k("audio",{key:0,ref_key:"audioSyncRef",ref:l,src:e.audioSource,controls:!0,class:Fe(d.value?"mulmocast-audio absolute bottom-0 left-0 w-full":"hidden"),onEnded:D,onSeeked:X,onPlay:ie,onPause:Z,onLoadedmetadata:c},null,42,ql)):pe("",!0),T("div",zl,[T("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:b[1]||(b[1]=R=>E.value?j():je())},[E.value?(L(),k("svg",Gl,[...b[7]||(b[7]=[T("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(L(),k("svg",Jl,[...b[6]||(b[6]=[T("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):e.audioSource?(L(),k("div",Ql,[e.imageSource?(L(),k("img",{key:0,src:e.imageSource,class:"mx-auto h-auto max-h-[80vh] w-auto object-contain",alt:"Background"},null,8,Yl)):(L(),k("img",{key:1,src:fa,class:"mx-auto h-auto max-h-[80vh] w-auto object-contain",alt:"Background"})),T("audio",{ref_key:"audioRef",ref:a,class:"mulmocast-audio absolute inset-0 w-full h-full",src:e.audioSource,controls:!0,onPlay:Me,onPause:ve,onEnded:me},null,40,Xl),T("div",Zl,[T("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:b[2]||(b[2]=R=>E.value?j():je())},[E.value?(L(),k("svg",ta,[...b[9]||(b[9]=[T("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(L(),k("svg",ea,[...b[8]||(b[8]=[T("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):e.imageSource?(L(),k("div",sa,[T("img",{src:e.imageSource,class:"max-w-full max-h-full object-contain"},null,8,na),T("div",ra,[T("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:b[3]||(b[3]=R=>E.value?j():je())},[E.value?(L(),k("svg",ia,[...b[11]||(b[11]=[T("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(L(),k("svg",oa,[...b[10]||(b[10]=[T("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):(L(),k("div",la,"No media available")),e.text?(L(),k("div",aa,[T("p",ua,de(e.text),1),e.originalText&&e.originalText!==e.text?(L(),k("p",ca,de(e.originalText),1)):pe("",!0)])):pe("",!0)]))}}),vo=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},Ks=vo(da,[["__scopeId","data-v-843621f0"]]),pa=["value"],ha=["value"],ga=es({__name:"select_language",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=["en","ja"],n={en:"English",ja:"日本語"},r=t,o=i=>{const l=i.target;r("update:modelValue",l.value)};return(i,l)=>(L(),k("select",{value:e.modelValue,class:"px-4 py-2 bg-white border-2 border-gray-300 rounded-lg shadow-sm hover:border-indigo-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 focus:outline-none transition-colors cursor-pointer text-base font-medium text-gray-700",onChange:o},[(L(),k(he,null,Bt(s,a=>T("option",{key:a,value:a},de(n[a]||a),9,ha)),64))],40,pa))}}),va={class:"w-full overflow-hidden"},ma={class:"max-w-7xl mx-auto px-4"},ba={class:"grid grid-cols-[auto,1fr,auto] gap-x-4 gap-y-4 max-sm:grid-cols-2"},ya=["disabled"],xa={class:"col-start-2 row-start-1 min-w-0 max-sm:col-span-2 max-sm:col-start-1"},_a=["disabled"],wa={key:0,class:"mulmo-text-box col-start-2 row-start-2 min-w-0 mt-1 rounded-lg px-6 py-4 text-left max-sm:col-span-2 max-sm:col-start-1 max-sm:row-start-3"},Sa={class:"mulmo-text-primary text-lg leading-relaxed font-sans"},Ta={key:0,class:"mulmo-text-secondary text-base leading-relaxed font-sans mt-3 italic"},Ca=["src"],Ea=es({__name:"mulmo_viewer",props:{dataSet:{default:void 0},basePath:{},initPage:{default:void 0},audioLang:{default:"en"},textLang:{default:"en"},playbackSpeed:{default:1}},emits:["updatedPage","update:audioLang","update:textLang","allCompleted"],setup(e,{expose:t,emit:s}){const n=e,r=s,o=n.dataSet?.beats?.length??0,i=W(n.initPage??0),l=W(!0),a=W(),d=W(),c=ue({get:()=>n.audioLang,set:j=>r("update:audioLang",j||"en")}),p=ue({get:()=>n.textLang,set:j=>r("update:textLang",j||"en")});let y=0;Re(()=>n.audioLang,async(j,K)=>{if(j!==K&&F.value){y++;const fe=y;if(a.value?.stop(),await Bs(500),fe!==y)return;a.value&&(F.value=!0,await a.value.play())}}),Re(()=>n.textLang,async(j,K)=>{j!==K&&F.value&&(await Bs(100),a.value&&await a.value.play())}),Re(d,j=>{j&&(j.volume=.3)});const C=ue(()=>n.dataSet?.beats[i.value]),O=j=>j?n.basePath+"/"+j:"",E=ue(()=>O(n.dataSet?.bgmSource)),F=W(!1),V=()=>{F.value=!0,d.value&&(d.value.volume=.3,d.value.play())},N=()=>{F.value=!1,d.value&&d.value.pause()},z=async()=>{y++;const j=y;a.value?.stop(),await Bs(500),j===y&&a.value&&a.value.play()},w=j=>{i.value!==j&&(i.value=j,F.value&&l.value&&z())},D=j=>{const K=i.value+j;return K>-1&&K<o?(w(K),r("updatedPage",K),!0):!1},X=()=>{l.value&&D(1)||(F.value=!1,d.value&&d.value.pause(),r("allCompleted"))},ie={onPlay:V,onPause:N,onEnded:X},Z=ue(()=>{const j=C.value,K=j?.audioSources?.[c.value],fe=j?.multiLinguals?.[p.value]??j?.text??"",je=n.dataSet?.lang?j?.multiLinguals?.[n.dataSet.lang]??j?.text??"":"";return{videoWithAudioSource:O(j?.videoWithAudioSource),videoSource:O(j?.videoSource),soundEffectSource:O(j?.soundEffectSource),audioSource:O(K),imageSource:O(j?.imageSource),index:i.value,text:fe,originalText:je,duration:j?.duration,defaultLang:n.dataSet?.lang,currentLang:c.value,playbackSpeed:n.playbackSpeed,...ie}}),Me=ue(()=>n.dataSet?.beats[i.value+1]),ve=ue(()=>{if(i.value+1>=o)return null;const j=Me.value;return{videoWithAudioSource:O(j?.videoWithAudioSource),videoSource:O(j?.videoSource),soundEffectSource:O(j?.soundEffectSource),audioSource:O(j?.audioSources?.[c.value]),imageSource:O(j?.imageSource),index:i.value+1,text:j?.multiLinguals?.[p.value]??j?.text??"",duration:j?.duration}}),me=ue(()=>({MulmoPlayer:Ks,pageProps:Z.value,currentPage:i.value,pageCount:o,pageMove:D,isPlaying:F.value,audioLang:c,textLang:p,SelectLanguage:ga,mediaPlayerRef:a,handlePlay:V,handlePause:N,handleEnded:X}));return t({updatePage:w}),(j,K)=>(L(),k(he,null,[Ai(j.$slots,"default",An(ao(me.value)),()=>[T("div",va,[T("div",ma,[T("div",ba,[T("button",{class:"col-start-1 row-start-1 justify-self-start w-auto px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50 self-center max-sm:row-start-2",disabled:i.value===0,onClick:K[0]||(K[0]=fe=>D(-1))}," Prev ",8,ya),T("div",xa,[Ne(Ks,en({ref_key:"mediaPlayer",ref:a},{...Z.value,text:"",originalText:""}),null,16)]),T("button",{class:"col-start-3 row-start-1 justify-self-end w-auto px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50 self-center max-sm:col-start-2 max-sm:row-start-2",disabled:i.value>=vn(o)-1,onClick:K[1]||(K[1]=fe=>D(1))}," Next ",8,_a),Z.value.text?(L(),k("div",wa,[T("p",Sa,de(Z.value.text),1),Z.value.originalText&&Z.value.originalText!==Z.value.text?(L(),k("p",Ta,de(Z.value.originalText),1)):pe("",!0)])):pe("",!0)])])])]),ve.value?Tt((L(),Lt(Ks,An(en({key:0},ve.value)),null,16)),[[ho,!1]]):pe("",!0),E.value?(L(),k("audio",{key:1,ref_key:"bgmRef",ref:d,src:E.value},null,8,Ca)):pe("",!0)],64))}}),Pa=vo(Ea,[["__scopeId","data-v-46289647"]]),Aa=`You are answering questions based on the content provided.
2
+ - Answer based ONLY on the information in the provided content
3
+ - If the answer cannot be found in the content, say so clearly
4
+ - Be concise and direct in your answers
5
+ - Do not make up information that is not in the content
6
+ - You may reference previous conversation when answering follow-up questions
7
+ - If references are available and the user asks for more details, mention which reference could provide more information
8
+ - When you suggest fetching a reference for more details, include [SUGGEST_FETCH: <url>] in your response`,Ma=(e,t)=>{const s=[],n=e.text||"";if(!n.trim())return"";s.push(`[${t}] ${n}`);const r=e.meta;return r&&(r.tags&&r.tags.length>0&&s.push(` Tags: ${r.tags.join(", ")}`),r.context&&s.push(` Context: ${r.context}`),r.keywords&&r.keywords.length>0&&s.push(` Keywords: ${r.keywords.join(", ")}`),r.expectedQuestions&&r.expectedQuestions.length>0&&s.push(` Can answer: ${r.expectedQuestions.join("; ")}`)),s.join(`
9
+ `)},Oa=e=>{const t=e.scriptMeta;if(!t)return"";const s=[];return t.background&&s.push(`Background: ${t.background}`),t.audience&&s.push(`Target audience: ${t.audience}`),t.prerequisites&&t.prerequisites.length>0&&s.push(`Prerequisites: ${t.prerequisites.join(", ")}`),t.goals&&t.goals.length>0&&s.push(`Goals: ${t.goals.join("; ")}`),t.keywords&&t.keywords.length>0&&s.push(`Keywords: ${t.keywords.join(", ")}`),t.references&&t.references.length>0&&(s.push("References:"),t.references.forEach(n=>{const r=n.title||n.url,o=n.description?` - ${n.description}`:"";s.push(` - [${n.type||"web"}] ${r}: ${n.url}${o}`)})),t.faq&&t.faq.length>0&&(s.push("FAQ:"),t.faq.forEach(n=>{s.push(` Q: ${n.question}`),s.push(` A: ${n.answer}`)})),t.author&&s.push(`Author: ${t.author}`),s.length>0?s.join(`
10
+ `):""},Ra=e=>{const t=[];t.push(`# Script: ${e.title}`),t.push(`Language: ${e.lang}`),t.push("");const s=Oa(e);s&&(t.push("## About this content"),t.push(s),t.push(""));const n=new Map;return e.beats.forEach((r,o)=>{const i=Ma(r,o);if(!i)return;const l=r.meta?.section||"main";n.has(l)||n.set(l,[]),n.get(l).push(i)}),n.forEach((r,o)=>{t.push(`## Section: ${o}`),r.forEach(i=>t.push(i)),t.push("")}),t.join(`
11
+ `)},La="/api/chat",ja="gpt-4o-mini",ir=3e4;function lr(e){if(!e.startsWith("data: "))return null;const t=e.slice(6);if(t==="[DONE]")return null;try{return JSON.parse(t).choices?.[0]?.delta?.content??null}catch{return null}}async function Ia(e,t,s){const n=new AbortController;let r=setTimeout(()=>n.abort(),ir);function o(){clearTimeout(r),r=setTimeout(()=>n.abort(),ir)}const i=t.signal?AbortSignal.any([t.signal,n.signal]):n.signal;try{const l=await fetch(La,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:t.model??ja,messages:e}),signal:i});if(!l.ok){const y=await l.text();throw new Error(`Chat API error (${l.status}): ${y}`)}if(!l.body)throw new Error("Response body is null");const a=l.body.getReader(),d=new TextDecoder,c=[];let p="";for(;;){const{done:y,value:C}=await a.read();if(y)break;p+=d.decode(C,{stream:!0});const O=p.split(`
12
+ `);p=O.pop()??"",O.forEach(E=>{const F=lr(E.trim());F&&(c.push(F),s(F),o())})}if(p.trim()){const y=lr(p.trim());y&&(c.push(y),s(y))}return c.join("")}finally{clearTimeout(r)}}const ka={class:"fixed right-0 top-0 h-full w-96 bg-gray-800 border-l border-gray-700 flex flex-col z-50 shadow-2xl"},$a={class:"flex items-center justify-between px-4 py-3 border-b border-gray-700"},Fa={class:"flex gap-2"},Da=["disabled"],Na={key:0,class:"text-center text-gray-500 text-sm mt-8"},Ha={key:1,class:"flex justify-start"},Va={class:"max-w-[85%] px-3 py-2 rounded-lg text-sm bg-gray-700 text-gray-200 whitespace-pre-wrap break-words"},Ua={key:2,class:"flex justify-start"},Ba={key:3,class:"p-2 bg-red-900/50 text-red-300 rounded text-xs"},Ka={class:"border-t border-gray-700 p-3"},Wa={class:"flex gap-2"},qa=["disabled"],za={class:"flex flex-col gap-1"},Ja=["disabled"],Ga=24e3,Qa=es({__name:"QAChat",props:{viewData:{},currentPage:{},bundleId:{}},emits:["close"],setup(e,{emit:t}){const s=e,n=t,r=W(""),o=W([]),i=W(!1),l=W(""),a=W(null),d=W(null),c=W(null),p=new Map;Re(()=>s.bundleId,(w,D)=>{D&&(l.value&&o.value.push({role:"assistant",content:l.value}),p.set(D,[...o.value])),a.value?.abort(),i.value=!1,l.value="",c.value=null,o.value=p.get(w)??[],E()});function y(w){let D=0;const X=[];for(let ie=w.length-1;ie>=0&&(D+=w[ie].content.length,!(D>Ga));ie--)X.unshift(w[ie]);return X}const C=ue(()=>{const w=Ra(s.viewData);return{role:"system",content:`${Aa}
13
+
14
+ ---
15
+
16
+ ${w}
17
+
18
+ The user is currently viewing beat ${s.currentPage}.`}}),O=ue(()=>o.value.filter(w=>w.role!=="system"));function E(){fs(()=>{d.value&&(d.value.scrollTop=d.value.scrollHeight)})}Re(l,E);async function F(){const w=r.value.trim();if(!w||i.value)return;c.value=null;const D={role:"user",content:w};r.value="",await fs(),o.value.push(D),E(),i.value=!0,l.value="";const X=new AbortController;a.value=X;const ie=[C.value,...y(o.value)];try{const Z=await Ia(ie,{signal:X.signal},Me=>{l.value+=Me});o.value.push({role:"assistant",content:Z})}catch(Z){Z instanceof DOMException&&Z.name==="AbortError"?l.value&&o.value.push({role:"assistant",content:l.value}):c.value=Z instanceof Error?Z.message:"Failed to get response"}finally{i.value=!1,l.value="",a.value=null,E()}}function V(){a.value?.abort()}function N(){o.value=[],l.value="",c.value=null,p.delete(s.bundleId)}function z(w){w.isComposing||w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),F())}return Ms(()=>{a.value?.abort()}),(w,D)=>(L(),k("div",ka,[T("div",$a,[D[2]||(D[2]=T("h2",{class:"text-sm font-semibold text-white"},"Q&A Chat",-1)),T("div",Fa,[T("button",{onClick:N,disabled:o.value.length===0&&!i.value,class:"px-2 py-1 text-xs rounded cursor-pointer transition-colors border-none bg-gray-700 text-gray-300 hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed"}," Clear ",8,Da),T("button",{onClick:D[0]||(D[0]=X=>n("close")),class:"px-2 py-1 text-xs rounded cursor-pointer transition-colors border-none bg-gray-700 text-gray-300 hover:bg-gray-600"}," Close ")])]),T("div",{ref_key:"messagesContainer",ref:d,class:"flex-1 overflow-y-auto p-4 space-y-3"},[O.value.length===0&&!i.value?(L(),k("div",Na," Ask a question about this presentation. ")):pe("",!0),(L(!0),k(he,null,Bt(O.value,(X,ie)=>(L(),k("div",{key:ie,class:Fe(["flex",X.role==="user"?"justify-end":"justify-start"])},[T("div",{class:Fe(["max-w-[85%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap break-words",X.role==="user"?"bg-blue-600 text-white":"bg-gray-700 text-gray-200"])},de(X.content),3)],2))),128)),i.value&&l.value?(L(),k("div",Ha,[T("div",Va,[Ge(de(l.value)+" ",1),D[3]||(D[3]=T("span",{class:"animate-pulse"},"|",-1))])])):pe("",!0),i.value&&!l.value?(L(),k("div",Ua,[...D[4]||(D[4]=[T("div",{class:"px-3 py-2 rounded-lg text-sm bg-gray-700 text-gray-400"},[T("span",{class:"animate-pulse"},"Thinking...")],-1)])])):pe("",!0),c.value?(L(),k("div",Ba,de(c.value),1)):pe("",!0)],512),T("div",Ka,[T("div",Wa,[Tt(T("textarea",{"onUpdate:modelValue":D[1]||(D[1]=X=>r.value=X),onKeydown:z,disabled:i.value,rows:"2",class:"flex-1 bg-gray-700 border border-gray-600 text-white px-3 py-2 rounded text-sm resize-none focus:outline-none focus:border-blue-500 disabled:opacity-50",placeholder:"Ask about this presentation..."},null,40,qa),[[go,r.value]]),T("div",za,[i.value?(L(),k("button",{key:1,onClick:V,class:"px-3 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-red-600 text-white hover:bg-red-700"}," Stop ")):(L(),k("button",{key:0,onClick:F,disabled:!r.value.trim(),class:"px-3 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed"}," Send ",8,Ja))])])])]))}}),Ya={class:"min-h-screen flex flex-col bg-gray-900 text-white"},Xa={class:"bg-gray-800 border-b border-gray-700"},Za={class:"flex items-center gap-6 px-6 py-3"},eu={key:0,class:"flex gap-2 flex-wrap"},tu=["onClick"],su={key:0,class:"flex items-center gap-6 px-6 py-2 bg-gray-750 border-t border-gray-700"},nu={class:"flex items-center gap-2 text-sm text-gray-300"},ru=["disabled"],ou=["value"],iu={class:"flex items-center gap-2 text-sm text-gray-300"},lu=["disabled"],au=["value"],uu={key:0,class:"text-center p-8 text-gray-400"},cu={key:1,class:"text-center p-8 text-red-400"},fu={key:2,class:"text-center p-8 text-gray-500"},du={key:3,class:"w-full max-w-5xl mx-auto"},pu={key:0,class:"mb-4 p-4 bg-gray-800 rounded-lg"},hu={class:"flex items-center gap-4 mb-4"},gu={class:"text-sm text-gray-300"},vu={class:"text-white font-medium"},mu={class:"text-sm text-gray-400"},bu={class:"text-sm text-gray-400"},yu={key:0,class:"mb-4 p-2 bg-red-900 text-red-200 rounded text-sm"},xu={class:"flex items-center gap-4 mb-4"},_u=["disabled"],wu={key:2,class:"w-56 px-6 py-2 text-sm text-gray-400 flex items-center justify-center"},Su=["disabled"],Tu=["disabled"],Cu=["disabled"],Eu={class:"mt-2"},Pu={class:"text-white [--mulmo-text-bg:#1f2937] [--mulmo-text-secondary:#bbb]"},Au=es({__name:"App",setup(e){const t=W([]),s=W(null),n=W(!0),r=W(null),o=W(null),i=W(0),l=W("en"),a=W("en"),d=W(!1),c=W(!1),p=W(!1),y=W(null),C=W([]),O=W(new Map),E=W(new Map),F=W(!1),V=W(null),N=W(!1),z=ue(()=>(o.value?.beats?.length??0)>0),w=ue(()=>{if(o.value?.lang)return o.value.lang;const A=o.value?.beats?.[0]?.audioSources;if(A){const b=Object.keys(A);return b.includes("ja")?"ja":b.find(R=>R!=="en")||b[0]||"en"}return"en"}),D=ue({get:()=>{if(E.value.has(i.value))return E.value.get(i.value)||"";const A=o.value?.beats?.[i.value];return A&&(A.multiLinguals?.[w.value]||A.text)||""},set:A=>{E.value.set(i.value,A)}}),X=ue(()=>o.value?.beats?.[0]?.audioSources?Object.keys(o.value.beats[0].audioSources):["en"]),ie=ue(()=>o.value?.beats?.[0]?.multiLinguals?Object.keys(o.value.beats[0].multiLinguals):["en"]),Z=ue(()=>s.value?`/bundles/${s.value}`:"");hs(async()=>{try{const A=await fetch("/api/bundles");if(!A.ok)throw new Error("Failed to load bundles");t.value=await A.json(),t.value.length>0&&(s.value=t.value[0].path)}catch(A){r.value=A instanceof Error?A.message:"Unknown error"}finally{n.value=!1}}),Re(s,async A=>{if(!A){o.value=null;return}try{const b=await fetch(`/bundles/${A}/mulmo_view.json`);if(!b.ok)throw new Error("Failed to load bundle data");o.value=await b.json(),i.value=0;const R=o.value?.beats?.[0]?.audioSources?Object.keys(o.value.beats[0].audioSources):["en"],ne=o.value?.beats?.[0]?.multiLinguals?Object.keys(o.value.beats[0].multiLinguals):["en"];R.includes(l.value)||(l.value=R[0]||"en"),ne.includes(a.value)||(a.value=ne[0]||"en")}catch(b){r.value=b instanceof Error?b.message:"Unknown error",o.value=null}});function Me(A){s.value=A}function ve(A){i.value=A}const me=ue(()=>o.value?.beats?.length||0),j=ue(()=>O.value.size),K=ue(()=>E.value.size);async function fe(){if(d.value)await le(),d.value=!1;else{V.value=null;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(b=>b.stop()),d.value=!0,O.value=new Map,E.value=new Map}catch(A){V.value=A instanceof Error?A.message:"Failed to access microphone"}}}async function je(){if(!c.value){V.value=null,C.value=[];try{const A=await navigator.mediaDevices.getUserMedia({audio:!0}),b=new MediaRecorder(A,{mimeType:"audio/webm"});b.ondataavailable=R=>{R.data.size>0&&C.value.push(R.data)},b.onstop=()=>{const R=new Blob(C.value,{type:"audio/webm"});O.value.set(i.value,R),A.getTracks().forEach(ne=>ne.stop())},y.value=b,b.start(),c.value=!0}catch(A){V.value=A instanceof Error?A.message:"Failed to start recording"}}}async function le(){if(!c.value||!y.value)return;const A=i.value;return new Promise(b=>{y.value?(y.value.onstop=async()=>{const R=new Blob(C.value,{type:"audio/webm"});O.value.set(A,R),y.value?.stream.getTracks().forEach(ne=>ne.stop()),c.value=!1,y.value=null,await te(A,R),b()},y.value.stop()):b()})}async function te(A,b){p.value=!0,V.value=null;try{const R=await Ue(b),Te=await(await fetch("/api/transcribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audioBase64:R,lang:w.value})})).json();if(Te.success&&Te.text){const Ze=D.value,ht=Ze?`${Ze}
19
+ ${Te.text}`:Te.text;E.value.set(A,ht)}else V.value=Te.error||"Transcription failed"}catch(R){V.value=R instanceof Error?R.message:"Transcription failed"}finally{p.value=!1}}async function J(){await le(),i.value<me.value-1&&i.value++}async function $e(){await le(),i.value>0&&i.value--}function Ue(A){return new Promise((b,R)=>{const ne=new FileReader;ne.onloadend=()=>{const Te=ne.result.split(",")[1];b(Te)},ne.onerror=R,ne.readAsDataURL(A)})}async function Ie(){if(!(!s.value||O.value.size===0&&E.value.size===0)){F.value=!0,V.value=null;try{const A=new Set;O.value.forEach((R,ne)=>A.add(ne)),E.value.forEach((R,ne)=>A.add(ne));for(const R of A){const ne=o.value?.beats?.[R],Te=ne?.multiLinguals?.[w.value]||ne?.text||"",Ze=E.value.get(R)??Te;if(O.value.has(R)){const ht=O.value.get(R),Be=await Ue(ht),u=await(await fetch("/api/save-beat-text",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bundlePath:s.value,beatIndex:R,langKey:w.value,audioBase64:Be,text:Ze})})).json();if(!u.success)throw new Error(u.error||`Failed to save beat ${R+1}`)}else{const Be=await(await fetch("/api/save-beat-text",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bundlePath:s.value,beatIndex:R,langKey:w.value,text:Ze})})).json();if(!Be.success)throw new Error(Be.error||`Failed to save text for beat ${R+1}`)}}const b=await fetch(`/bundles/${s.value}/mulmo_view.json`);b.ok&&(o.value=await b.json()),d.value=!1,O.value=new Map,E.value=new Map,l.value=w.value,a.value=w.value}catch(A){V.value=A instanceof Error?A.message:"Failed to save recordings"}finally{F.value=!1}}}function ae(){O.value=new Map,E.value=new Map,d.value=!1}return(A,b)=>(L(),k("div",Ya,[T("header",Xa,[T("div",Za,[b[7]||(b[7]=T("h1",{class:"text-lg font-semibold whitespace-nowrap"},"MulmoViewer Preview",-1)),t.value.length>0?(L(),k("nav",eu,[(L(!0),k(he,null,Bt(t.value,R=>(L(),k("button",{key:R.path,class:Fe(["px-3 py-1.5 rounded text-sm cursor-pointer transition-colors border-none",s.value===R.path?"bg-blue-600 text-white":"bg-gray-700 text-gray-300 hover:bg-gray-600"]),onClick:ne=>Me(R.path)},de(R.name),11,tu))),128))])):pe("",!0)]),o.value?(L(),k("div",su,[T("label",nu,[b[8]||(b[8]=Ge(" Audio: ",-1)),Tt(T("select",{"onUpdate:modelValue":b[0]||(b[0]=R=>l.value=R),class:"bg-gray-700 border border-gray-600 text-white px-2 py-1 rounded text-sm cursor-pointer hover:bg-gray-600",disabled:d.value},[(L(!0),k(he,null,Bt(X.value,R=>(L(),k("option",{key:R,value:R},de(R.toUpperCase()),9,ou))),128))],8,ru),[[nr,l.value]])]),T("label",iu,[b[9]||(b[9]=Ge(" Text: ",-1)),Tt(T("select",{"onUpdate:modelValue":b[1]||(b[1]=R=>a.value=R),class:"bg-gray-700 border border-gray-600 text-white px-2 py-1 rounded text-sm cursor-pointer hover:bg-gray-600",disabled:d.value},[(L(!0),k(he,null,Bt(ie.value,R=>(L(),k("option",{key:R,value:R},de(R.toUpperCase()),9,au))),128))],8,lu),[[nr,a.value]])]),b[10]||(b[10]=T("div",{class:"flex-1"},null,-1)),z.value?(L(),k("button",{key:0,onClick:b[2]||(b[2]=R=>N.value=!N.value),class:Fe(["px-3 py-1.5 rounded text-sm cursor-pointer transition-colors border-none",N.value?"bg-purple-600 text-white hover:bg-purple-700":"bg-purple-500 text-white hover:bg-purple-600"])}," Q&A Chat ",2)):pe("",!0),T("button",{onClick:fe,class:Fe(["px-3 py-1.5 rounded text-sm cursor-pointer transition-colors border-none",d.value?"bg-red-600 text-white hover:bg-red-700":"bg-green-600 text-white hover:bg-green-700"])},de(d.value?"Exit Edit Mode":"Edit Mode"),3)])):pe("",!0)]),T("main",{class:Fe(["flex-1 flex items-start justify-center p-4 transition-[margin]",N.value?"mr-96":""])},[n.value?(L(),k("div",uu,"Loading bundles...")):r.value?(L(),k("div",cu,de(r.value),1)):t.value.length===0?(L(),k("div",fu,[...b[11]||(b[11]=[Ge(" No bundles found in output/ directory. ",-1),T("p",{class:"mt-2"},[Ge(" Run "),T("code",{class:"bg-gray-800 px-2 py-1 rounded font-mono text-sm"},"yarn run cli bundle <file>"),Ge(" to generate a bundle. ")],-1)])])):o.value?(L(),k("div",du,[d.value?(L(),k("div",pu,[T("div",hu,[T("span",gu,[b[12]||(b[12]=Ge(" Lang: ",-1)),T("span",vu,de(w.value.toUpperCase()),1)]),T("span",mu," Beat "+de(i.value+1)+" / "+de(me.value),1),T("span",bu," Edited: "+de(K.value),1)]),V.value?(L(),k("div",yu,de(V.value),1)):pe("",!0),T("div",xu,[T("button",{onClick:$e,disabled:i.value===0||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none disabled:opacity-50 disabled:cursor-not-allowed bg-gray-600 text-white hover:bg-gray-500"}," Prev ",8,_u),!c.value&&!p.value?(L(),k("button",{key:0,onClick:je,class:"w-56 px-6 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-red-600 text-white hover:bg-red-700 flex items-center justify-center gap-2"},[...b[13]||(b[13]=[T("span",{class:"w-3 h-3 bg-white rounded-full"},null,-1),Ge(" Voice Input ",-1)])])):c.value?(L(),k("button",{key:1,onClick:le,class:"w-56 px-6 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-gray-600 text-white hover:bg-gray-500 flex items-center justify-center gap-2"},[...b[14]||(b[14]=[T("span",{class:"w-3 h-3 bg-red-500 rounded-sm animate-pulse"},null,-1),Ge(" Stop ",-1)])])):(L(),k("span",wu," Transcribing... ")),T("button",{onClick:J,disabled:i.value>=me.value-1||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none disabled:opacity-50 disabled:cursor-not-allowed bg-gray-600 text-white hover:bg-gray-500"}," Next ",8,Su),b[15]||(b[15]=T("div",{class:"flex-1"},null,-1)),T("button",{onClick:ae,disabled:F.value||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-gray-600 text-white hover:bg-gray-500"}," Discard ",8,Tu),T("button",{onClick:Ie,disabled:j.value===0&&K.value===0||F.value||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none disabled:opacity-50 disabled:cursor-not-allowed bg-blue-600 text-white hover:bg-blue-700"},de(F.value?"Saving...":`Save All (${K.value})`),9,Cu)]),T("div",Eu,[b[16]||(b[16]=T("label",{class:"block text-sm text-gray-400 mb-1"}," Text (editable - voice input appends): ",-1)),Tt(T("textarea",{"onUpdate:modelValue":b[3]||(b[3]=R=>D.value=R),rows:"4",class:"w-full bg-gray-700 border border-gray-600 text-white px-3 py-2 rounded text-sm resize-vertical focus:outline-none focus:border-blue-500",placeholder:"Text will appear here after recording..."},null,512),[[go,D.value]])])])):pe("",!0),T("div",Pu,[(L(),Lt(vn(Pa),{key:d.value?`recording-${i.value}`:"viewer","data-set":o.value,"base-path":Z.value,"init-page":i.value,"audio-lang":l.value,"onUpdate:audioLang":b[4]||(b[4]=R=>l.value=R),"text-lang":a.value,"onUpdate:textLang":b[5]||(b[5]=R=>a.value=R),onUpdatedPage:ve},null,8,["data-set","base-path","init-page","audio-lang","text-lang"]))])])):pe("",!0)],2),o.value?Tt((L(),Lt(Qa,{key:0,"view-data":o.value,"current-page":i.value,"bundle-id":s.value??"",onClose:b[6]||(b[6]=R=>N.value=!1)},null,8,["view-data","current-page","bundle-id"])),[[ho,N.value]]):pe("",!0)]))}});Il(Au).mount("#app");
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>MulmoViewer Preview</title>
7
- <script type="module" crossorigin src="./assets/index-B9s3Wf0n.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-9yP-5cRj.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-DyeW2SiG.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mulmocast/slide",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Convert presentations (Keynote, PowerPoint, PDF, Marp) and videos to MulmoScript format",
5
5
  "homepage": "https://github.com/receptron/MulmoCast-Slides#readme",
6
6
  "bugs": {
@@ -1,19 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function s(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(r){if(r.ep)return;r.ep=!0;const o=s(r);fetch(r.href,o)}})();function rn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ne={},Ct=[],Qe=()=>{},ur=()=>!1,_s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),on=e=>e.startsWith("onUpdate:"),be=Object.assign,ln=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},bo=Object.prototype.hasOwnProperty,Z=(e,t)=>bo.call(e,t),V=Array.isArray,Et=e=>Xt(e)==="[object Map]",ws=e=>Xt(e)==="[object Set]",An=e=>Xt(e)==="[object Date]",B=e=>typeof e=="function",fe=e=>typeof e=="string",Ve=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",cr=e=>(se(e)||B(e))&&B(e.then)&&B(e.catch),fr=Object.prototype.toString,Xt=e=>fr.call(e),yo=e=>Xt(e).slice(8,-1),dr=e=>Xt(e)==="[object Object]",an=e=>fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nt=rn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ss=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},xo=/-\w/g,ht=Ss(e=>e.replace(xo,t=>t.slice(1).toUpperCase())),_o=/\B([A-Z])/g,_t=Ss(e=>e.replace(_o,"-$1").toLowerCase()),pr=Ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),js=Ss(e=>e?`on${pr(e)}`:""),pt=(e,t)=>!Object.is(e,t),is=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},hr=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ts=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pn;const Cs=()=>Pn||(Pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Es(e){if(V(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=fe(n)?Co(n):Es(n);if(r)for(const o in r)t[o]=r[o]}return t}else if(fe(e)||se(e))return e}const wo=/;(?![^(]*\))/g,So=/:([^]+)/,To=/\/\*[^]*?\*\//g;function Co(e){const t={};return e.replace(To,"").split(wo).forEach(s=>{if(s){const n=s.split(So);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function De(e){let t="";if(fe(e))t=e;else if(V(e))for(let s=0;s<e.length;s++){const n=De(e[s]);n&&(t+=n+" ")}else if(se(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}function Mn(e){if(!e)return null;let{class:t,style:s}=e;return t&&!fe(t)&&(e.class=De(t)),s&&(e.style=Es(s)),e}const Eo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ao=rn(Eo);function gr(e){return!!e||e===""}function Po(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Zt(e[n],t[n]);return s}function Zt(e,t){if(e===t)return!0;let s=An(e),n=An(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Ve(e),n=Ve(t),s||n)return e===t;if(s=V(e),n=V(t),s||n)return s&&n?Po(e,t):!1;if(s=se(e),n=se(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!Zt(e[i],t[i]))return!1}}return String(e)===String(t)}function Mo(e,t){return e.findIndex(s=>Zt(s,t))}const vr=e=>!!(e&&e.__v_isRef===!0),de=e=>fe(e)?e:e==null?"":V(e)||se(e)&&(e.toString===fr||!B(e.toString))?vr(e)?de(e.value):JSON.stringify(e,mr,2):String(e),mr=(e,t)=>vr(t)?mr(e,t.value):Et(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],o)=>(s[ks(n,o)+" =>"]=r,s),{})}:ws(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>ks(s))}:Ve(t)?ks(t):se(t)&&!V(t)&&!dr(t)?String(t):t,ks=(e,t="")=>{var s;return Ve(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Me;class Oo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Me,!t&&Me&&(this.index=(Me.scopes||(Me.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Me;try{return Me=this,t()}finally{Me=s}}}on(){++this._on===1&&(this.prevScope=Me,Me=this)}off(){this._on>0&&--this._on===0&&(Me=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Ro(){return Me}let ie;const $s=new WeakSet;class br{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Me&&Me.active&&Me.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,$s.has(this)&&($s.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,On(this),_r(this);const t=ie,s=He;ie=this,He=!0;try{return this.fn()}finally{wr(this),ie=t,He=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)fn(t);this.deps=this.depsTail=void 0,On(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?$s.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zs(this)&&this.run()}get dirty(){return zs(this)}}let yr=0,Vt,Ut;function xr(e,t=!1){if(e.flags|=8,t){e.next=Ut,Ut=e;return}e.next=Vt,Vt=e}function un(){yr++}function cn(){if(--yr>0)return;if(Ut){let t=Ut;for(Ut=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Vt;){let t=Vt;for(Vt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function _r(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wr(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),fn(n),Lo(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function zs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Sr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Sr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qt)||(e.globalVersion=qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zs(e))))return;e.flags|=2;const t=e.dep,s=ie,n=He;ie=e,He=!0;try{_r(e);const r=e.fn(e._value);(t.version===0||pt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ie=s,He=n,wr(e),e.flags&=-3}}function fn(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)fn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Lo(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let He=!0;const Tr=[];function ot(){Tr.push(He),He=!1}function it(){const e=Tr.pop();He=e===void 0?!0:e}function On(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=ie;ie=void 0;try{t()}finally{ie=s}}}let qt=0;class Io{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class dn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ie||!He||ie===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==ie)s=this.activeLink=new Io(ie,this),ie.deps?(s.prevDep=ie.depsTail,ie.depsTail.nextDep=s,ie.depsTail=s):ie.deps=ie.depsTail=s,Cr(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=ie.depsTail,s.nextDep=void 0,ie.depsTail.nextDep=s,ie.depsTail=s,ie.deps===s&&(ie.deps=n)}return s}trigger(t){this.version++,qt++,this.notify(t)}notify(t){un();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{cn()}}}function Cr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Cr(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const qs=new WeakMap,yt=Symbol(""),Js=Symbol(""),Jt=Symbol("");function ye(e,t,s){if(He&&ie){let n=qs.get(e);n||qs.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new dn),r.map=n,r.key=s),r.track()}}function nt(e,t,s,n,r,o){const i=qs.get(e);if(!i){qt++;return}const l=a=>{a&&a.trigger()};if(un(),t==="clear")i.forEach(l);else{const a=V(e),d=a&&an(s);if(a&&s==="length"){const c=Number(n);i.forEach((p,b)=>{(b==="length"||b===Jt||!Ve(b)&&b>=c)&&l(p)})}else switch((s!==void 0||i.has(void 0))&&l(i.get(s)),d&&l(i.get(Jt)),t){case"add":a?d&&l(i.get("length")):(l(i.get(yt)),Et(e)&&l(i.get(Js)));break;case"delete":a||(l(i.get(yt)),Et(e)&&l(i.get(Js)));break;case"set":Et(e)&&l(i.get(yt));break}}cn()}function wt(e){const t=X(e);return t===e?t:(ye(t,"iterate",Jt),$e(e)?t:t.map(Ue))}function As(e){return ye(e=X(e),"iterate",Jt),e}function ft(e,t){return lt(e)?Rt(xt(e)?Ue(t):t):Ue(t)}const jo={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>ft(this,e))},concat(...e){return wt(this).concat(...e.map(t=>V(t)?wt(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=ft(this,e[1]),e))},every(e,t){return et(this,"every",e,t,void 0,arguments)},filter(e,t){return et(this,"filter",e,t,s=>s.map(n=>ft(this,n)),arguments)},find(e,t){return et(this,"find",e,t,s=>ft(this,s),arguments)},findIndex(e,t){return et(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return et(this,"findLast",e,t,s=>ft(this,s),arguments)},findLastIndex(e,t){return et(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return et(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ds(this,"includes",e)},indexOf(...e){return Ds(this,"indexOf",e)},join(e){return wt(this).join(e)},lastIndexOf(...e){return Ds(this,"lastIndexOf",e)},map(e,t){return et(this,"map",e,t,void 0,arguments)},pop(){return $t(this,"pop")},push(...e){return $t(this,"push",e)},reduce(e,...t){return Rn(this,"reduce",e,t)},reduceRight(e,...t){return Rn(this,"reduceRight",e,t)},shift(){return $t(this,"shift")},some(e,t){return et(this,"some",e,t,void 0,arguments)},splice(...e){return $t(this,"splice",e)},toReversed(){return wt(this).toReversed()},toSorted(e){return wt(this).toSorted(e)},toSpliced(...e){return wt(this).toSpliced(...e)},unshift(...e){return $t(this,"unshift",e)},values(){return Fs(this,"values",e=>ft(this,e))}};function Fs(e,t,s){const n=As(e),r=n[t]();return n!==e&&!$e(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=s(o.value)),o}),r}const ko=Array.prototype;function et(e,t,s,n,r,o){const i=As(e),l=i!==e&&!$e(e),a=i[t];if(a!==ko[t]){const p=a.apply(e,o);return l?Ue(p):p}let d=s;i!==e&&(l?d=function(p,b){return s.call(this,ft(e,p),b,e)}:s.length>2&&(d=function(p,b){return s.call(this,p,b,e)}));const c=a.call(i,d,n);return l&&r?r(c):c}function Rn(e,t,s,n){const r=As(e);let o=s;return r!==e&&($e(e)?s.length>3&&(o=function(i,l,a){return s.call(this,i,l,a,e)}):o=function(i,l,a){return s.call(this,i,ft(e,l),a,e)}),r[t](o,...n)}function Ds(e,t,s){const n=X(e);ye(n,"iterate",Jt);const r=n[t](...s);return(r===-1||r===!1)&&vn(s[0])?(s[0]=X(s[0]),n[t](...s)):r}function $t(e,t,s=[]){ot(),un();const n=X(e)[t].apply(e,s);return cn(),it(),n}const $o=rn("__proto__,__v_isRef,__isVue"),Er=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ve));function Fo(e){Ve(e)||(e=String(e));const t=X(this);return ye(t,"has",e),t.hasOwnProperty(e)}class Ar{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(r?o?qo:Rr:o?Or:Mr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=V(t);if(!r){let a;if(i&&(a=jo[s]))return a;if(s==="hasOwnProperty")return Fo}const l=Reflect.get(t,s,_e(t)?t:n);if((Ve(s)?Er.has(s):$o(s))||(r||ye(t,"get",s),o))return l;if(_e(l)){const a=i&&an(s)?l:l.value;return r&&se(a)?Gs(a):a}return se(l)?r?Gs(l):hn(l):l}}class Pr extends Ar{constructor(t=!1){super(!1,t)}set(t,s,n,r){let o=t[s];const i=V(t)&&an(s);if(!this._isShallow){const d=lt(o);if(!$e(n)&&!lt(n)&&(o=X(o),n=X(n)),!i&&_e(o)&&!_e(n))return d||(o.value=n),!0}const l=i?Number(s)<t.length:Z(t,s),a=Reflect.set(t,s,n,_e(t)?t:r);return t===X(r)&&(l?pt(n,o)&&nt(t,"set",s,n):nt(t,"add",s,n)),a}deleteProperty(t,s){const n=Z(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&nt(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!Ve(s)||!Er.has(s))&&ye(t,"has",s),n}ownKeys(t){return ye(t,"iterate",V(t)?"length":yt),Reflect.ownKeys(t)}}class Do extends Ar{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Ho=new Pr,No=new Do,Vo=new Pr(!0);const Ys=e=>e,ns=e=>Reflect.getPrototypeOf(e);function Uo(e,t,s){return function(...n){const r=this.__v_raw,o=X(r),i=Et(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,d=r[e](...n),c=s?Ys:t?Rt:Ue;return!t&&ye(o,"iterate",a?Js:yt),be(Object.create(d),{next(){const{value:p,done:b}=d.next();return b?{value:p,done:b}:{value:l?[c(p[0]),c(p[1])]:c(p),done:b}}})}}function rs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Bo(e,t){const s={get(r){const o=this.__v_raw,i=X(o),l=X(r);e||(pt(r,l)&&ye(i,"get",r),ye(i,"get",l));const{has:a}=ns(i),d=t?Ys:e?Rt:Ue;if(a.call(i,r))return d(o.get(r));if(a.call(i,l))return d(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&ye(X(r),"iterate",yt),r.size},has(r){const o=this.__v_raw,i=X(o),l=X(r);return e||(pt(r,l)&&ye(i,"has",r),ye(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=X(l),d=t?Ys:e?Rt:Ue;return!e&&ye(a,"iterate",yt),l.forEach((c,p)=>r.call(o,d(c),d(p),i))}};return be(s,e?{add:rs("add"),set:rs("set"),delete:rs("delete"),clear:rs("clear")}:{add(r){!t&&!$e(r)&&!lt(r)&&(r=X(r));const o=X(this);return ns(o).has.call(o,r)||(o.add(r),nt(o,"add",r,r)),this},set(r,o){!t&&!$e(o)&&!lt(o)&&(o=X(o));const i=X(this),{has:l,get:a}=ns(i);let d=l.call(i,r);d||(r=X(r),d=l.call(i,r));const c=a.call(i,r);return i.set(r,o),d?pt(o,c)&&nt(i,"set",r,o):nt(i,"add",r,o),this},delete(r){const o=X(this),{has:i,get:l}=ns(o);let a=i.call(o,r);a||(r=X(r),a=i.call(o,r)),l&&l.call(o,r);const d=o.delete(r);return a&&nt(o,"delete",r,void 0),d},clear(){const r=X(this),o=r.size!==0,i=r.clear();return o&&nt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Uo(r,e,t)}),s}function pn(e,t){const s=Bo(e,t);return(n,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(Z(s,r)&&r in n?s:n,r,o)}const Ko={get:pn(!1,!1)},Wo={get:pn(!1,!0)},zo={get:pn(!0,!1)};const Mr=new WeakMap,Or=new WeakMap,Rr=new WeakMap,qo=new WeakMap;function Jo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yo(e){return e.__v_skip||!Object.isExtensible(e)?0:Jo(yo(e))}function hn(e){return lt(e)?e:gn(e,!1,Ho,Ko,Mr)}function Go(e){return gn(e,!1,Vo,Wo,Or)}function Gs(e){return gn(e,!0,No,zo,Rr)}function gn(e,t,s,n,r){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Yo(e);if(o===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,o===2?n:s);return r.set(e,l),l}function xt(e){return lt(e)?xt(e.__v_raw):!!(e&&e.__v_isReactive)}function lt(e){return!!(e&&e.__v_isReadonly)}function $e(e){return!!(e&&e.__v_isShallow)}function vn(e){return e?!!e.__v_raw:!1}function X(e){const t=e&&e.__v_raw;return t?X(t):e}function Qo(e){return!Z(e,"__v_skip")&&Object.isExtensible(e)&&hr(e,"__v_skip",!0),e}const Ue=e=>se(e)?hn(e):e,Rt=e=>se(e)?Gs(e):e;function _e(e){return e?e.__v_isRef===!0:!1}function K(e){return Xo(e,!1)}function Xo(e,t){return _e(e)?e:new Zo(e,t)}class Zo{constructor(t,s){this.dep=new dn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:X(t),this._value=s?t:Ue(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||$e(t)||lt(t);t=n?t:X(t),pt(t,s)&&(this._rawValue=t,this._value=n?t:Ue(t),this.dep.trigger())}}function mn(e){return _e(e)?e.value:e}const ei={get:(e,t,s)=>t==="__v_raw"?e:mn(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return _e(r)&&!_e(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function Lr(e){return xt(e)?e:new Proxy(e,ei)}class ti{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new dn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&ie!==this)return xr(this,!0),!0}get value(){const t=this.dep.track();return Sr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function si(e,t,s=!1){let n,r;return B(e)?n=e:(n=e.get,r=e.set),new ti(n,r,s)}const os={},cs=new WeakMap;let mt;function ni(e,t=!1,s=mt){if(s){let n=cs.get(s);n||cs.set(s,n=[]),n.push(e)}}function ri(e,t,s=ne){const{immediate:n,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=s,d=I=>r?I:$e(I)||r===!1||r===0?rt(I,1):rt(I);let c,p,b,T,M=!1,E=!1;if(_e(e)?(p=()=>e.value,M=$e(e)):xt(e)?(p=()=>d(e),M=!0):V(e)?(E=!0,M=e.some(I=>xt(I)||$e(I)),p=()=>e.map(I=>{if(_e(I))return I.value;if(xt(I))return d(I);if(B(I))return a?a(I,2):I()})):B(e)?t?p=a?()=>a(e,2):e:p=()=>{if(b){ot();try{b()}finally{it()}}const I=mt;mt=c;try{return a?a(e,3,[T]):e(T)}finally{mt=I}}:p=Qe,t&&r){const I=p,j=r===!0?1/0:r;p=()=>rt(I(),j)}const F=Ro(),H=()=>{c.stop(),F&&F.active&&ln(F.effects,c)};if(o&&t){const I=t;t=(...j)=>{I(...j),H()}}let N=E?new Array(e.length).fill(os):os;const J=I=>{if(!(!(c.flags&1)||!c.dirty&&!I))if(t){const j=c.run();if(r||M||(E?j.some((z,ee)=>pt(z,N[ee])):pt(j,N))){b&&b();const z=mt;mt=c;try{const ee=[j,N===os?void 0:E&&N[0]===os?[]:N,T];N=j,a?a(t,3,ee):t(...ee)}finally{mt=z}}}else c.run()};return l&&l(J),c=new br(p),c.scheduler=i?()=>i(J,!1):J,T=I=>ni(I,!1,c),b=c.onStop=()=>{const I=cs.get(c);if(I){if(a)a(I,4);else for(const j of I)j();cs.delete(c)}},t?n?J(!0):N=c.run():i?i(J.bind(null,!0),!0):c.run(),H.pause=c.pause.bind(c),H.resume=c.resume.bind(c),H.stop=H,H}function rt(e,t=1/0,s){if(t<=0||!se(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,_e(e))rt(e.value,t,s);else if(V(e))for(let n=0;n<e.length;n++)rt(e[n],t,s);else if(ws(e)||Et(e))e.forEach(n=>{rt(n,t,s)});else if(dr(e)){for(const n in e)rt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&rt(e[n],t,s)}return e}function es(e,t,s,n){try{return n?e(...n):e()}catch(r){Ps(r,t,s)}}function Xe(e,t,s,n){if(B(e)){const r=es(e,t,s,n);return r&&cr(r)&&r.catch(o=>{Ps(o,t,s)}),r}if(V(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Xe(e[o],t,s,n));return r}}function Ps(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ne;if(t){let l=t.parent;const a=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const c=l.ec;if(c){for(let p=0;p<c.length;p++)if(c[p](e,a,d)===!1)return}l=l.parent}if(o){ot(),es(o,null,10,[e,a,d]),it();return}}oi(e,s,r,n,i)}function oi(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const Se=[];let Je=-1;const At=[];let dt=null,St=0;const Ir=Promise.resolve();let fs=null;function ds(e){const t=fs||Ir;return e?t.then(this?e.bind(this):e):t}function ii(e){let t=Je+1,s=Se.length;for(;t<s;){const n=t+s>>>1,r=Se[n],o=Yt(r);o<e||o===e&&r.flags&2?t=n+1:s=n}return t}function bn(e){if(!(e.flags&1)){const t=Yt(e),s=Se[Se.length-1];!s||!(e.flags&2)&&t>=Yt(s)?Se.push(e):Se.splice(ii(t),0,e),e.flags|=1,jr()}}function jr(){fs||(fs=Ir.then($r))}function li(e){V(e)?At.push(...e):dt&&e.id===-1?dt.splice(St+1,0,e):e.flags&1||(At.push(e),e.flags|=1),jr()}function Ln(e,t,s=Je+1){for(;s<Se.length;s++){const n=Se[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Se.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function kr(e){if(At.length){const t=[...new Set(At)].sort((s,n)=>Yt(s)-Yt(n));if(At.length=0,dt){dt.push(...t);return}for(dt=t,St=0;St<dt.length;St++){const s=dt[St];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}dt=null,St=0}}const Yt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function $r(e){try{for(Je=0;Je<Se.length;Je++){const t=Se[Je];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),es(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Je<Se.length;Je++){const t=Se[Je];t&&(t.flags&=-2)}Je=-1,Se.length=0,kr(),fs=null,(Se.length||At.length)&&$r()}}let xe=null,Fr=null;function ps(e){const t=xe;return xe=e,Fr=e&&e.type.__scopeId||null,t}function ai(e,t=xe,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&Bn(-1);const o=ps(t);let i;try{i=e(...r)}finally{ps(o),n._d&&Bn(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function Tt(e,t){if(xe===null)return e;const s=Is(xe),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=ne]=t[r];o&&(B(o)&&(o={mounted:o,updated:o}),o.deep&&rt(i),n.push({dir:o,instance:s,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function gt(e,t,s,n){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let a=l.dir[n];a&&(ot(),Xe(a,s,8,[e.el,l,e,t]),it())}}function ui(e,t){if(Te){let s=Te.provides;const n=Te.parent&&Te.parent.provides;n===s&&(s=Te.provides=Object.create(n)),s[e]=t}}function ls(e,t,s=!1){const n=il();if(n||Mt){let r=Mt?Mt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&B(t)?t.call(n&&n.proxy):t}}const ci=Symbol.for("v-scx"),fi=()=>ls(ci);function Ie(e,t,s){return Dr(e,t,s)}function Dr(e,t,s=ne){const{immediate:n,deep:r,flush:o,once:i}=s,l=be({},s),a=t&&n||!t&&o!=="post";let d;if(Qt){if(o==="sync"){const T=fi();d=T.__watcherHandles||(T.__watcherHandles=[])}else if(!a){const T=()=>{};return T.stop=Qe,T.resume=Qe,T.pause=Qe,T}}const c=Te;l.call=(T,M,E)=>Xe(T,c,M,E);let p=!1;o==="post"?l.scheduler=T=>{Pe(T,c&&c.suspense)}:o!=="sync"&&(p=!0,l.scheduler=(T,M)=>{M?T():bn(T)}),l.augmentJob=T=>{t&&(T.flags|=4),p&&(T.flags|=2,c&&(T.id=c.uid,T.i=c))};const b=ri(e,t,l);return Qt&&(d?d.push(b):a&&b()),b}function di(e,t,s){const n=this.proxy,r=fe(e)?e.includes(".")?Hr(n,e):()=>n[e]:e.bind(n,n);let o;B(t)?o=t:(o=t.handler,s=t);const i=ss(this),l=Dr(r,o.bind(n),s);return i(),l}function Hr(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const pi=Symbol("_vte"),hi=e=>e.__isTeleport,gi=Symbol("_leaveCb");function yn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,yn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ts(e,t){return B(e)?be({name:e.name},t,{setup:e}):e}function Nr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function In(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const hs=new WeakMap;function Bt(e,t,s,n,r=!1){if(V(e)){e.forEach((E,F)=>Bt(E,t&&(V(t)?t[F]:t),s,n,r));return}if(Pt(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Bt(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Is(n.component):n.el,i=r?null:o,{i:l,r:a}=e,d=t&&t.r,c=l.refs===ne?l.refs={}:l.refs,p=l.setupState,b=X(p),T=p===ne?ur:E=>In(c,E)?!1:Z(b,E),M=(E,F)=>!(F&&In(c,F));if(d!=null&&d!==a){if(jn(t),fe(d))c[d]=null,T(d)&&(p[d]=null);else if(_e(d)){const E=t;M(d,E.k)&&(d.value=null),E.k&&(c[E.k]=null)}}if(B(a))es(a,l,12,[i,c]);else{const E=fe(a),F=_e(a);if(E||F){const H=()=>{if(e.f){const N=E?T(a)?p[a]:c[a]:M()||!e.k?a.value:c[e.k];if(r)V(N)&&ln(N,o);else if(V(N))N.includes(o)||N.push(o);else if(E)c[a]=[o],T(a)&&(p[a]=c[a]);else{const J=[o];M(a,e.k)&&(a.value=J),e.k&&(c[e.k]=J)}}else E?(c[a]=i,T(a)&&(p[a]=i)):F&&(M(a,e.k)&&(a.value=i),e.k&&(c[e.k]=i))};if(i){const N=()=>{H(),hs.delete(e)};N.id=-1,hs.set(e,N),Pe(N,s)}else jn(e),H()}}}function jn(e){const t=hs.get(e);t&&(t.flags|=8,hs.delete(e))}Cs().requestIdleCallback;Cs().cancelIdleCallback;const Pt=e=>!!e.type.__asyncLoader,Vr=e=>e.type.__isKeepAlive;function vi(e,t){Ur(e,"a",t)}function mi(e,t){Ur(e,"da",t)}function Ur(e,t,s=Te){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Ms(t,n,s),s){let r=s.parent;for(;r&&r.parent;)Vr(r.parent.vnode)&&bi(n,t,s,r),r=r.parent}}function bi(e,t,s,n){const r=Ms(t,e,n,!0);Os(()=>{ln(n[t],r)},s)}function Ms(e,t,s=Te,n=!1){if(s){const r=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ot();const l=ss(s),a=Xe(t,s,e,i);return l(),it(),a});return n?r.unshift(o):r.push(o),o}}const ut=e=>(t,s=Te)=>{(!Qt||e==="sp")&&Ms(e,(...n)=>t(...n),s)},yi=ut("bm"),gs=ut("m"),xi=ut("bu"),_i=ut("u"),wi=ut("bum"),Os=ut("um"),Si=ut("sp"),Ti=ut("rtg"),Ci=ut("rtc");function Ei(e,t=Te){Ms("ec",e,t)}const Ai=Symbol.for("v-ndc");function Kt(e,t,s,n){let r;const o=s,i=V(e);if(i||fe(e)){const l=i&&xt(e);let a=!1,d=!1;l&&(a=!$e(e),d=lt(e),e=As(e)),r=new Array(e.length);for(let c=0,p=e.length;c<p;c++)r[c]=t(a?d?Rt(Ue(e[c])):Ue(e[c]):e[c],c,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o)}else if(se(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,d=l.length;a<d;a++){const c=l[a];r[a]=t(e[c],c,a,o)}}else r=[];return r}function Pi(e,t,s={},n,r){if(xe.ce||xe.parent&&Pt(xe.parent)&&xe.parent.ce){const d=Object.keys(s).length>0;return R(),Lt(me,null,[Ne("slot",s,n&&n())],d?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),R();const i=o&&Br(o(s)),l=s.key||i&&i.key,a=Lt(me,{key:(l&&!Ve(l)?l:`_${t}`)+(!i&&n?"_fb":"")},i||(n?n():[]),i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),a}function Br(e){return e.some(t=>wn(t)?!(t.type===at||t.type===me&&!Br(t.children)):!0)?e:null}const Qs=e=>e?co(e)?Is(e):Qs(e.parent):null,Wt=be(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qs(e.parent),$root:e=>Qs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Wr(e),$forceUpdate:e=>e.f||(e.f=()=>{bn(e.update)}),$nextTick:e=>e.n||(e.n=ds.bind(e.proxy)),$watch:e=>di.bind(e)}),Hs=(e,t)=>e!==ne&&!e.__isScriptSetup&&Z(e,t),Mi={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const b=i[t];if(b!==void 0)switch(b){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return o[t]}else{if(Hs(n,t))return i[t]=1,n[t];if(r!==ne&&Z(r,t))return i[t]=2,r[t];if(Z(o,t))return i[t]=3,o[t];if(s!==ne&&Z(s,t))return i[t]=4,s[t];Xs&&(i[t]=0)}}const d=Wt[t];let c,p;if(d)return t==="$attrs"&&ye(e.attrs,"get",""),d(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(s!==ne&&Z(s,t))return i[t]=4,s[t];if(p=a.config.globalProperties,Z(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:o}=e;return Hs(r,t)?(r[t]=s,!0):n!==ne&&Z(n,t)?(n[t]=s,!0):Z(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:o,type:i}},l){let a;return!!(s[l]||e!==ne&&l[0]!=="$"&&Z(e,l)||Hs(t,l)||Z(o,l)||Z(n,l)||Z(Wt,l)||Z(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Z(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function kn(e){return V(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Xs=!0;function Oi(e){const t=Wr(e),s=e.proxy,n=e.ctx;Xs=!1,t.beforeCreate&&$n(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:d,created:c,beforeMount:p,mounted:b,beforeUpdate:T,updated:M,activated:E,deactivated:F,beforeDestroy:H,beforeUnmount:N,destroyed:J,unmounted:I,render:j,renderTracked:z,renderTriggered:ee,errorCaptured:G,serverPrefetch:he,expose:ge,inheritAttrs:Ce,components:L,directives:W,filters:ue}=t;if(d&&Ri(d,n,null),i)for(const Q in i){const Y=i[Q];B(Y)&&(n[Q]=Y.bind(s))}if(r){const Q=r.call(s,s);se(Q)&&(e.data=hn(Q))}if(Xs=!0,o)for(const Q in o){const Y=o[Q],Fe=B(Y)?Y.bind(s,s):B(Y.get)?Y.get.bind(s,s):Qe,Ze=!B(Y)&&B(Y.set)?Y.set.bind(s):Qe,Oe=ae({get:Fe,set:Ze});Object.defineProperty(n,Q,{enumerable:!0,configurable:!0,get:()=>Oe.value,set:ce=>Oe.value=ce})}if(l)for(const Q in l)Kr(l[Q],n,s,Q);if(a){const Q=B(a)?a.call(s):a;Reflect.ownKeys(Q).forEach(Y=>{ui(Y,Q[Y])})}c&&$n(c,e,"c");function pe(Q,Y){V(Y)?Y.forEach(Fe=>Q(Fe.bind(s))):Y&&Q(Y.bind(s))}if(pe(yi,p),pe(gs,b),pe(xi,T),pe(_i,M),pe(vi,E),pe(mi,F),pe(Ei,G),pe(Ci,z),pe(Ti,ee),pe(wi,N),pe(Os,I),pe(Si,he),V(ge))if(ge.length){const Q=e.exposed||(e.exposed={});ge.forEach(Y=>{Object.defineProperty(Q,Y,{get:()=>s[Y],set:Fe=>s[Y]=Fe,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===Qe&&(e.render=j),Ce!=null&&(e.inheritAttrs=Ce),L&&(e.components=L),W&&(e.directives=W),he&&Nr(e)}function Ri(e,t,s=Qe){V(e)&&(e=Zs(e));for(const n in e){const r=e[n];let o;se(r)?"default"in r?o=ls(r.from||n,r.default,!0):o=ls(r.from||n):o=ls(r),_e(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[n]=o}}function $n(e,t,s){Xe(V(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Kr(e,t,s,n){let r=n.includes(".")?Hr(s,n):()=>s[n];if(fe(e)){const o=t[e];B(o)&&Ie(r,o)}else if(B(e))Ie(r,e.bind(s));else if(se(e))if(V(e))e.forEach(o=>Kr(o,t,s,n));else{const o=B(e.handler)?e.handler.bind(s):t[e.handler];B(o)&&Ie(r,o,e)}}function Wr(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!s&&!n?a=t:(a={},r.length&&r.forEach(d=>vs(a,d,i,!0)),vs(a,t,i)),se(t)&&o.set(t,a),a}function vs(e,t,s,n=!1){const{mixins:r,extends:o}=t;o&&vs(e,o,s,!0),r&&r.forEach(i=>vs(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const l=Li[i]||s&&s[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Li={data:Fn,props:Dn,emits:Dn,methods:Ht,computed:Ht,beforeCreate:we,created:we,beforeMount:we,mounted:we,beforeUpdate:we,updated:we,beforeDestroy:we,beforeUnmount:we,destroyed:we,unmounted:we,activated:we,deactivated:we,errorCaptured:we,serverPrefetch:we,components:Ht,directives:Ht,watch:ji,provide:Fn,inject:Ii};function Fn(e,t){return t?e?function(){return be(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function Ii(e,t){return Ht(Zs(e),Zs(t))}function Zs(e){if(V(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function we(e,t){return e?[...new Set([].concat(e,t))]:t}function Ht(e,t){return e?be(Object.create(null),e,t):t}function Dn(e,t){return e?V(e)&&V(t)?[...new Set([...e,...t])]:be(Object.create(null),kn(e),kn(t??{})):t}function ji(e,t){if(!e)return t;if(!t)return e;const s=be(Object.create(null),e);for(const n in t)s[n]=we(e[n],t[n]);return s}function zr(){return{app:null,config:{isNativeTag:ur,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ki=0;function $i(e,t){return function(n,r=null){B(n)||(n=be({},n)),r!=null&&!se(r)&&(r=null);const o=zr(),i=new WeakSet,l=[];let a=!1;const d=o.app={_uid:ki++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:dl,get config(){return o.config},set config(c){},use(c,...p){return i.has(c)||(c&&B(c.install)?(i.add(c),c.install(d,...p)):B(c)&&(i.add(c),c(d,...p))),d},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),d},component(c,p){return p?(o.components[c]=p,d):o.components[c]},directive(c,p){return p?(o.directives[c]=p,d):o.directives[c]},mount(c,p,b){if(!a){const T=d._ceVNode||Ne(n,r);return T.appContext=o,b===!0?b="svg":b===!1&&(b=void 0),e(T,c,b),a=!0,d._container=c,c.__vue_app__=d,Is(T.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Xe(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,p){return o.provides[c]=p,d},runWithContext(c){const p=Mt;Mt=d;try{return c()}finally{Mt=p}}};return d}}let Mt=null;const Fi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${_t(t)}Modifiers`];function Di(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ne;let r=s;const o=t.startsWith("update:"),i=o&&Fi(n,t.slice(7));i&&(i.trim&&(r=s.map(c=>fe(c)?c.trim():c)),i.number&&(r=s.map(Ts)));let l,a=n[l=js(t)]||n[l=js(ht(t))];!a&&o&&(a=n[l=js(_t(t))]),a&&Xe(a,e,6,r);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Xe(d,e,6,r)}}const Hi=new WeakMap;function qr(e,t,s=!1){const n=s?Hi:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!B(e)){const a=d=>{const c=qr(d,t,!0);c&&(l=!0,be(i,c))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(se(e)&&n.set(e,null),null):(V(o)?o.forEach(a=>i[a]=null):be(i,o),se(e)&&n.set(e,i),i)}function Rs(e,t){return!e||!_s(t)?!1:(t=t.slice(2).replace(/Once$/,""),Z(e,t[0].toLowerCase()+t.slice(1))||Z(e,_t(t))||Z(e,t))}function Hn(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:d,renderCache:c,props:p,data:b,setupState:T,ctx:M,inheritAttrs:E}=e,F=ps(e);let H,N;try{if(s.shapeFlag&4){const I=r||n,j=I;H=Ge(d.call(j,I,c,p,T,b,M)),N=l}else{const I=t;H=Ge(I.length>1?I(p,{attrs:l,slots:i,emit:a}):I(p,null)),N=t.props?l:Ni(l)}}catch(I){zt.length=0,Ps(I,e,1),H=Ne(at)}let J=H;if(N&&E!==!1){const I=Object.keys(N),{shapeFlag:j}=J;I.length&&j&7&&(o&&I.some(on)&&(N=Vi(N,o)),J=It(J,N,!1,!0))}return s.dirs&&(J=It(J,null,!1,!0),J.dirs=J.dirs?J.dirs.concat(s.dirs):s.dirs),s.transition&&yn(J,s.transition),H=J,ps(F),H}const Ni=e=>{let t;for(const s in e)(s==="class"||s==="style"||_s(s))&&((t||(t={}))[s]=e[s]);return t},Vi=(e,t)=>{const s={};for(const n in e)(!on(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Ui(e,t,s){const{props:n,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?Nn(n,i,d):!!i;if(a&8){const c=t.dynamicProps;for(let p=0;p<c.length;p++){const b=c[p];if(Jr(i,n,b)&&!Rs(d,b))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:n===i?!1:n?i?Nn(n,i,d):!0:!!i;return!1}function Nn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const o=n[r];if(Jr(t,e,o)&&!Rs(s,o))return!0}return!1}function Jr(e,t,s){const n=e[s],r=t[s];return s==="style"&&se(n)&&se(r)?!Zt(n,r):n!==r}function Bi({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Yr={},Gr=()=>Object.create(Yr),Qr=e=>Object.getPrototypeOf(e)===Yr;function Ki(e,t,s,n=!1){const r={},o=Gr();e.propsDefaults=Object.create(null),Xr(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);s?e.props=n?r:Go(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Wi(e,t,s,n){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=X(r),[a]=e.propsOptions;let d=!1;if((n||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let p=0;p<c.length;p++){let b=c[p];if(Rs(e.emitsOptions,b))continue;const T=t[b];if(a)if(Z(o,b))T!==o[b]&&(o[b]=T,d=!0);else{const M=ht(b);r[M]=en(a,l,M,T,e,!1)}else T!==o[b]&&(o[b]=T,d=!0)}}}else{Xr(e,t,r,o)&&(d=!0);let c;for(const p in l)(!t||!Z(t,p)&&((c=_t(p))===p||!Z(t,c)))&&(a?s&&(s[p]!==void 0||s[c]!==void 0)&&(r[p]=en(a,l,p,void 0,e,!0)):delete r[p]);if(o!==l)for(const p in o)(!t||!Z(t,p))&&(delete o[p],d=!0)}d&&nt(e.attrs,"set","")}function Xr(e,t,s,n){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Nt(a))continue;const d=t[a];let c;r&&Z(r,c=ht(a))?!o||!o.includes(c)?s[c]=d:(l||(l={}))[c]=d:Rs(e.emitsOptions,a)||(!(a in n)||d!==n[a])&&(n[a]=d,i=!0)}if(o){const a=X(s),d=l||ne;for(let c=0;c<o.length;c++){const p=o[c];s[p]=en(r,a,p,d[p],e,!Z(d,p))}}return i}function en(e,t,s,n,r,o){const i=e[s];if(i!=null){const l=Z(i,"default");if(l&&n===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&B(a)){const{propsDefaults:d}=r;if(s in d)n=d[s];else{const c=ss(r);n=d[s]=a.call(null,t),c()}}else n=a;r.ce&&r.ce._setProp(s,n)}i[0]&&(o&&!l?n=!1:i[1]&&(n===""||n===_t(s))&&(n=!0))}return n}const zi=new WeakMap;function Zr(e,t,s=!1){const n=s?zi:t.propsCache,r=n.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!B(e)){const c=p=>{a=!0;const[b,T]=Zr(p,t,!0);be(i,b),T&&l.push(...T)};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!a)return se(e)&&n.set(e,Ct),Ct;if(V(o))for(let c=0;c<o.length;c++){const p=ht(o[c]);Vn(p)&&(i[p]=ne)}else if(o)for(const c in o){const p=ht(c);if(Vn(p)){const b=o[c],T=i[p]=V(b)||B(b)?{type:b}:be({},b),M=T.type;let E=!1,F=!0;if(V(M))for(let H=0;H<M.length;++H){const N=M[H],J=B(N)&&N.name;if(J==="Boolean"){E=!0;break}else J==="String"&&(F=!1)}else E=B(M)&&M.name==="Boolean";T[0]=E,T[1]=F,(E||Z(T,"default"))&&l.push(p)}}const d=[i,l];return se(e)&&n.set(e,d),d}function Vn(e){return e[0]!=="$"&&!Nt(e)}const xn=e=>e==="_"||e==="_ctx"||e==="$stable",_n=e=>V(e)?e.map(Ge):[Ge(e)],qi=(e,t,s)=>{if(t._n)return t;const n=ai((...r)=>_n(t(...r)),s);return n._c=!1,n},eo=(e,t,s)=>{const n=e._ctx;for(const r in e){if(xn(r))continue;const o=e[r];if(B(o))t[r]=qi(r,o,n);else if(o!=null){const i=_n(o);t[r]=()=>i}}},to=(e,t)=>{const s=_n(t);e.slots.default=()=>s},so=(e,t,s)=>{for(const n in t)(s||!xn(n))&&(e[n]=t[n])},Ji=(e,t,s)=>{const n=e.slots=Gr();if(e.vnode.shapeFlag&32){const r=t._;r?(so(n,t,s),s&&hr(n,"_",r,!0)):eo(t,n)}else t&&to(e,t)},Yi=(e,t,s)=>{const{vnode:n,slots:r}=e;let o=!0,i=ne;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:so(r,t,s):(o=!t.$stable,eo(t,r)),i=t}else t&&(to(e,t),i={default:1});if(o)for(const l in r)!xn(l)&&i[l]==null&&delete r[l]},Pe=el;function Gi(e){return Qi(e)}function Qi(e,t){const s=Cs();s.__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:d,setElementText:c,parentNode:p,nextSibling:b,setScopeId:T=Qe,insertStaticContent:M}=e,E=(u,f,h,y=null,g=null,v=null,C=void 0,w=null,_=!!f.dynamicChildren)=>{if(u===f)return;u&&!Ft(u,f)&&(y=le(u),ce(u,g,v,!0),u=null),f.patchFlag===-2&&(_=!1,f.dynamicChildren=null);const{type:m,ref:D,shapeFlag:A}=f;switch(m){case Ls:F(u,f,h,y);break;case at:H(u,f,h,y);break;case Vs:u==null&&N(f,h,y,C);break;case me:L(u,f,h,y,g,v,C,w,_);break;default:A&1?j(u,f,h,y,g,v,C,w,_):A&6?W(u,f,h,y,g,v,C,w,_):(A&64||A&128)&&m.process(u,f,h,y,g,v,C,w,_,Be)}D!=null&&g?Bt(D,u&&u.ref,v,f||u,!f):D==null&&u&&u.ref!=null&&Bt(u.ref,null,v,u,!0)},F=(u,f,h,y)=>{if(u==null)n(f.el=l(f.children),h,y);else{const g=f.el=u.el;f.children!==u.children&&d(g,f.children)}},H=(u,f,h,y)=>{u==null?n(f.el=a(f.children||""),h,y):f.el=u.el},N=(u,f,h,y)=>{[u.el,u.anchor]=M(u.children,f,h,y,u.el,u.anchor)},J=({el:u,anchor:f},h,y)=>{let g;for(;u&&u!==f;)g=b(u),n(u,h,y),u=g;n(f,h,y)},I=({el:u,anchor:f})=>{let h;for(;u&&u!==f;)h=b(u),r(u),u=h;r(f)},j=(u,f,h,y,g,v,C,w,_)=>{if(f.type==="svg"?C="svg":f.type==="math"&&(C="mathml"),u==null)z(f,h,y,g,v,C,w,_);else{const m=u.el&&u.el._isVueCE?u.el:null;try{m&&m._beginPatch(),he(u,f,g,v,C,w,_)}finally{m&&m._endPatch()}}},z=(u,f,h,y,g,v,C,w)=>{let _,m;const{props:D,shapeFlag:A,transition:k,dirs:U}=u;if(_=u.el=i(u.type,v,D&&D.is,D),A&8?c(_,u.children):A&16&&G(u.children,_,null,y,g,Ns(u,v),C,w),U&&gt(u,null,y,"created"),ee(_,u,u.scopeId,C,y),D){for(const oe in D)oe!=="value"&&!Nt(oe)&&o(_,oe,null,D[oe],v,y);"value"in D&&o(_,"value",null,D.value,v),(m=D.onVnodeBeforeMount)&&qe(m,y,u)}U&&gt(u,null,y,"beforeMount");const q=Xi(g,k);q&&k.beforeEnter(_),n(_,f,h),((m=D&&D.onVnodeMounted)||q||U)&&Pe(()=>{m&&qe(m,y,u),q&&k.enter(_),U&&gt(u,null,y,"mounted")},g)},ee=(u,f,h,y,g)=>{if(h&&T(u,h),y)for(let v=0;v<y.length;v++)T(u,y[v]);if(g){let v=g.subTree;if(f===v||io(v.type)&&(v.ssContent===f||v.ssFallback===f)){const C=g.vnode;ee(u,C,C.scopeId,C.slotScopeIds,g.parent)}}},G=(u,f,h,y,g,v,C,w,_=0)=>{for(let m=_;m<u.length;m++){const D=u[m]=w?st(u[m]):Ge(u[m]);E(null,D,f,h,y,g,v,C,w)}},he=(u,f,h,y,g,v,C)=>{const w=f.el=u.el;let{patchFlag:_,dynamicChildren:m,dirs:D}=f;_|=u.patchFlag&16;const A=u.props||ne,k=f.props||ne;let U;if(h&&vt(h,!1),(U=k.onVnodeBeforeUpdate)&&qe(U,h,f,u),D&&gt(f,u,h,"beforeUpdate"),h&&vt(h,!0),(A.innerHTML&&k.innerHTML==null||A.textContent&&k.textContent==null)&&c(w,""),m?ge(u.dynamicChildren,m,w,h,y,Ns(f,g),v):C||Y(u,f,w,null,h,y,Ns(f,g),v,!1),_>0){if(_&16)Ce(w,A,k,h,g);else if(_&2&&A.class!==k.class&&o(w,"class",null,k.class,g),_&4&&o(w,"style",A.style,k.style,g),_&8){const q=f.dynamicProps;for(let oe=0;oe<q.length;oe++){const te=q[oe],Ee=A[te],Ae=k[te];(Ae!==Ee||te==="value")&&o(w,te,Ee,Ae,g,h)}}_&1&&u.children!==f.children&&c(w,f.children)}else!C&&m==null&&Ce(w,A,k,h,g);((U=k.onVnodeUpdated)||D)&&Pe(()=>{U&&qe(U,h,f,u),D&&gt(f,u,h,"updated")},y)},ge=(u,f,h,y,g,v,C)=>{for(let w=0;w<f.length;w++){const _=u[w],m=f[w],D=_.el&&(_.type===me||!Ft(_,m)||_.shapeFlag&198)?p(_.el):h;E(_,m,D,null,y,g,v,C,!0)}},Ce=(u,f,h,y,g)=>{if(f!==h){if(f!==ne)for(const v in f)!Nt(v)&&!(v in h)&&o(u,v,f[v],null,g,y);for(const v in h){if(Nt(v))continue;const C=h[v],w=f[v];C!==w&&v!=="value"&&o(u,v,w,C,g,y)}"value"in h&&o(u,"value",f.value,h.value,g)}},L=(u,f,h,y,g,v,C,w,_)=>{const m=f.el=u?u.el:l(""),D=f.anchor=u?u.anchor:l("");let{patchFlag:A,dynamicChildren:k,slotScopeIds:U}=f;U&&(w=w?w.concat(U):U),u==null?(n(m,h,y),n(D,h,y),G(f.children||[],h,D,g,v,C,w,_)):A>0&&A&64&&k&&u.dynamicChildren&&u.dynamicChildren.length===k.length?(ge(u.dynamicChildren,k,h,g,v,C,w),(f.key!=null||g&&f===g.subTree)&&no(u,f,!0)):Y(u,f,h,D,g,v,C,w,_)},W=(u,f,h,y,g,v,C,w,_)=>{f.slotScopeIds=w,u==null?f.shapeFlag&512?g.ctx.activate(f,h,y,C,_):ue(f,h,y,g,v,C,_):ke(u,f,_)},ue=(u,f,h,y,g,v,C)=>{const w=u.component=ol(u,y,g);if(Vr(u)&&(w.ctx.renderer=Be),ll(w,!1,C),w.asyncDep){if(g&&g.registerDep(w,pe,C),!u.el){const _=w.subTree=Ne(at);H(null,_,f,h),u.placeholder=_.el}}else pe(w,u,f,h,g,v,C)},ke=(u,f,h)=>{const y=f.component=u.component;if(Ui(u,f,h))if(y.asyncDep&&!y.asyncResolved){Q(y,f,h);return}else y.next=f,y.update();else f.el=u.el,y.vnode=f},pe=(u,f,h,y,g,v,C)=>{const w=()=>{if(u.isMounted){let{next:A,bu:k,u:U,parent:q,vnode:oe}=u;{const We=ro(u);if(We){A&&(A.el=oe.el,Q(u,A,C)),We.asyncDep.then(()=>{Pe(()=>{u.isUnmounted||m()},g)});return}}let te=A,Ee;vt(u,!1),A?(A.el=oe.el,Q(u,A,C)):A=oe,k&&is(k),(Ee=A.props&&A.props.onVnodeBeforeUpdate)&&qe(Ee,q,A,oe),vt(u,!0);const Ae=Hn(u),Ke=u.subTree;u.subTree=Ae,E(Ke,Ae,p(Ke.el),le(Ke),u,g,v),A.el=Ae.el,te===null&&Bi(u,Ae.el),U&&Pe(U,g),(Ee=A.props&&A.props.onVnodeUpdated)&&Pe(()=>qe(Ee,q,A,oe),g)}else{let A;const{el:k,props:U}=f,{bm:q,m:oe,parent:te,root:Ee,type:Ae}=u,Ke=Pt(f);vt(u,!1),q&&is(q),!Ke&&(A=U&&U.onVnodeBeforeMount)&&qe(A,te,f),vt(u,!0);{Ee.ce&&Ee.ce._hasShadowRoot()&&Ee.ce._injectChildStyle(Ae);const We=u.subTree=Hn(u);E(null,We,h,y,u,g,v),f.el=We.el}if(oe&&Pe(oe,g),!Ke&&(A=U&&U.onVnodeMounted)){const We=f;Pe(()=>qe(A,te,We),g)}(f.shapeFlag&256||te&&Pt(te.vnode)&&te.vnode.shapeFlag&256)&&u.a&&Pe(u.a,g),u.isMounted=!0,f=h=y=null}};u.scope.on();const _=u.effect=new br(w);u.scope.off();const m=u.update=_.run.bind(_),D=u.job=_.runIfDirty.bind(_);D.i=u,D.id=u.uid,_.scheduler=()=>bn(D),vt(u,!0),m()},Q=(u,f,h)=>{f.component=u;const y=u.vnode.props;u.vnode=f,u.next=null,Wi(u,f.props,y,h),Yi(u,f.children,h),ot(),Ln(u),it()},Y=(u,f,h,y,g,v,C,w,_=!1)=>{const m=u&&u.children,D=u?u.shapeFlag:0,A=f.children,{patchFlag:k,shapeFlag:U}=f;if(k>0){if(k&128){Ze(m,A,h,y,g,v,C,w,_);return}else if(k&256){Fe(m,A,h,y,g,v,C,w,_);return}}U&8?(D&16&&O(m,g,v),A!==m&&c(h,A)):D&16?U&16?Ze(m,A,h,y,g,v,C,w,_):O(m,g,v,!0):(D&8&&c(h,""),U&16&&G(A,h,y,g,v,C,w,_))},Fe=(u,f,h,y,g,v,C,w,_)=>{u=u||Ct,f=f||Ct;const m=u.length,D=f.length,A=Math.min(m,D);let k;for(k=0;k<A;k++){const U=f[k]=_?st(f[k]):Ge(f[k]);E(u[k],U,h,null,g,v,C,w,_)}m>D?O(u,g,v,!0,!1,A):G(f,h,y,g,v,C,w,_,A)},Ze=(u,f,h,y,g,v,C,w,_)=>{let m=0;const D=f.length;let A=u.length-1,k=D-1;for(;m<=A&&m<=k;){const U=u[m],q=f[m]=_?st(f[m]):Ge(f[m]);if(Ft(U,q))E(U,q,h,null,g,v,C,w,_);else break;m++}for(;m<=A&&m<=k;){const U=u[A],q=f[k]=_?st(f[k]):Ge(f[k]);if(Ft(U,q))E(U,q,h,null,g,v,C,w,_);else break;A--,k--}if(m>A){if(m<=k){const U=k+1,q=U<D?f[U].el:y;for(;m<=k;)E(null,f[m]=_?st(f[m]):Ge(f[m]),h,q,g,v,C,w,_),m++}}else if(m>k)for(;m<=A;)ce(u[m],g,v,!0),m++;else{const U=m,q=m,oe=new Map;for(m=q;m<=k;m++){const Le=f[m]=_?st(f[m]):Ge(f[m]);Le.key!=null&&oe.set(Le.key,m)}let te,Ee=0;const Ae=k-q+1;let Ke=!1,We=0;const kt=new Array(Ae);for(m=0;m<Ae;m++)kt[m]=0;for(m=U;m<=A;m++){const Le=u[m];if(Ee>=Ae){ce(Le,g,v,!0);continue}let ze;if(Le.key!=null)ze=oe.get(Le.key);else for(te=q;te<=k;te++)if(kt[te-q]===0&&Ft(Le,f[te])){ze=te;break}ze===void 0?ce(Le,g,v,!0):(kt[ze-q]=m+1,ze>=We?We=ze:Ke=!0,E(Le,f[ze],h,null,g,v,C,w,_),Ee++)}const Tn=Ke?Zi(kt):Ct;for(te=Tn.length-1,m=Ae-1;m>=0;m--){const Le=q+m,ze=f[Le],Cn=f[Le+1],En=Le+1<D?Cn.el||oo(Cn):y;kt[m]===0?E(null,ze,h,En,g,v,C,w,_):Ke&&(te<0||m!==Tn[te]?Oe(ze,h,En,2):te--)}}},Oe=(u,f,h,y,g=null)=>{const{el:v,type:C,transition:w,children:_,shapeFlag:m}=u;if(m&6){Oe(u.component.subTree,f,h,y);return}if(m&128){u.suspense.move(f,h,y);return}if(m&64){C.move(u,f,h,Be);return}if(C===me){n(v,f,h);for(let A=0;A<_.length;A++)Oe(_[A],f,h,y);n(u.anchor,f,h);return}if(C===Vs){J(u,f,h);return}if(y!==2&&m&1&&w)if(y===0)w.beforeEnter(v),n(v,f,h),Pe(()=>w.enter(v),g);else{const{leave:A,delayLeave:k,afterLeave:U}=w,q=()=>{u.ctx.isUnmounted?r(v):n(v,f,h)},oe=()=>{v._isLeaving&&v[gi](!0),A(v,()=>{q(),U&&U()})};k?k(v,q,oe):oe()}else n(v,f,h)},ce=(u,f,h,y=!1,g=!1)=>{const{type:v,props:C,ref:w,children:_,dynamicChildren:m,shapeFlag:D,patchFlag:A,dirs:k,cacheIndex:U}=u;if(A===-2&&(g=!1),w!=null&&(ot(),Bt(w,null,h,u,!0),it()),U!=null&&(f.renderCache[U]=void 0),D&256){f.ctx.deactivate(u);return}const q=D&1&&k,oe=!Pt(u);let te;if(oe&&(te=C&&C.onVnodeBeforeUnmount)&&qe(te,f,u),D&6)P(u.component,h,y);else{if(D&128){u.suspense.unmount(h,y);return}q&&gt(u,null,f,"beforeUnmount"),D&64?u.type.remove(u,f,h,Be,y):m&&!m.hasOnce&&(v!==me||A>0&&A&64)?O(m,f,h,!1,!0):(v===me&&A&384||!g&&D&16)&&O(_,f,h),y&&re(u)}(oe&&(te=C&&C.onVnodeUnmounted)||q)&&Pe(()=>{te&&qe(te,f,u),q&&gt(u,null,f,"unmounted")},h)},re=u=>{const{type:f,el:h,anchor:y,transition:g}=u;if(f===me){x(h,y);return}if(f===Vs){I(u);return}const v=()=>{r(h),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(u.shapeFlag&1&&g&&!g.persisted){const{leave:C,delayLeave:w}=g,_=()=>C(h,v);w?w(u.el,v,_):_()}else v()},x=(u,f)=>{let h;for(;u!==f;)h=b(u),r(u),u=h;r(f)},P=(u,f,h)=>{const{bum:y,scope:g,job:v,subTree:C,um:w,m:_,a:m}=u;Un(_),Un(m),y&&is(y),g.stop(),v&&(v.flags|=8,ce(C,u,f,h)),w&&Pe(w,f),Pe(()=>{u.isUnmounted=!0},f)},O=(u,f,h,y=!1,g=!1,v=0)=>{for(let C=v;C<u.length;C++)ce(u[C],f,h,y,g)},le=u=>{if(u.shapeFlag&6)return le(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=b(u.anchor||u.el),h=f&&f[pi];return h?b(h):f};let Re=!1;const ct=(u,f,h)=>{let y;u==null?f._vnode&&(ce(f._vnode,null,null,!0),y=f._vnode.component):E(f._vnode||null,u,f,null,null,null,h),f._vnode=u,Re||(Re=!0,Ln(y),kr(),Re=!1)},Be={p:E,um:ce,m:Oe,r:re,mt:ue,mc:G,pc:Y,pbc:ge,n:le,o:e};return{render:ct,hydrate:void 0,createApp:$i(ct)}}function Ns({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function vt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Xi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function no(e,t,s=!1){const n=e.children,r=t.children;if(V(n)&&V(r))for(let o=0;o<n.length;o++){const i=n[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=st(r[o]),l.el=i.el),!s&&l.patchFlag!==-2&&no(i,l)),l.type===Ls&&(l.patchFlag===-1&&(l=r[o]=st(l)),l.el=i.el),l.type===at&&!l.el&&(l.el=i.el)}}function Zi(e){const t=e.slice(),s=[0];let n,r,o,i,l;const a=e.length;for(n=0;n<a;n++){const d=e[n];if(d!==0){if(r=s[s.length-1],e[r]<d){t[n]=r,s.push(n);continue}for(o=0,i=s.length-1;o<i;)l=o+i>>1,e[s[l]]<d?o=l+1:i=l;d<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,i=s[o-1];o-- >0;)s[o]=i,i=t[i];return s}function ro(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ro(t)}function Un(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function oo(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?oo(t.subTree):null}const io=e=>e.__isSuspense;function el(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):li(e)}const me=Symbol.for("v-fgt"),Ls=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Vs=Symbol.for("v-stc"),zt=[];let je=null;function R(e=!1){zt.push(je=e?null:[])}function tl(){zt.pop(),je=zt[zt.length-1]||null}let Gt=1;function Bn(e,t=!1){Gt+=e,e<0&&je&&t&&(je.hasOnce=!0)}function lo(e){return e.dynamicChildren=Gt>0?je||Ct:null,tl(),Gt>0&&je&&je.push(e),e}function $(e,t,s,n,r,o){return lo(S(e,t,s,n,r,o,!0))}function Lt(e,t,s,n,r){return lo(Ne(e,t,s,n,r,!0))}function wn(e){return e?e.__v_isVNode===!0:!1}function Ft(e,t){return e.type===t.type&&e.key===t.key}const ao=({key:e})=>e??null,as=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?fe(e)||_e(e)||B(e)?{i:xe,r:e,k:t,f:!!s}:e:null);function S(e,t=null,s=null,n=0,r=null,o=e===me?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ao(t),ref:t&&as(t),scopeId:Fr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:xe};return l?(Sn(a,s),o&128&&e.normalize(a)):s&&(a.shapeFlag|=fe(s)?8:16),Gt>0&&!i&&je&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&je.push(a),a}const Ne=sl;function sl(e,t=null,s=null,n=0,r=null,o=!1){if((!e||e===Ai)&&(e=at),wn(e)){const l=It(e,t,!0);return s&&Sn(l,s),Gt>0&&!o&&je&&(l.shapeFlag&6?je[je.indexOf(e)]=l:je.push(l)),l.patchFlag=-2,l}if(fl(e)&&(e=e.__vccOpts),t){t=uo(t);let{class:l,style:a}=t;l&&!fe(l)&&(t.class=De(l)),se(a)&&(vn(a)&&!V(a)&&(a=be({},a)),t.style=Es(a))}const i=fe(e)?1:io(e)?128:hi(e)?64:se(e)?4:B(e)?2:0;return S(e,t,s,n,r,i,o,!0)}function uo(e){return e?vn(e)||Qr(e)?be({},e):e:null}function It(e,t,s=!1,n=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,d=t?tn(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&ao(d),ref:t&&t.ref?s&&o?V(o)?o.concat(as(t)):[o,as(t)]:as(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==me?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&It(e.ssContent),ssFallback:e.ssFallback&&It(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&yn(c,a.clone(c)),c}function Ye(e=" ",t=0){return Ne(Ls,null,e,t)}function ve(e="",t=!1){return t?(R(),Lt(at,null,e)):Ne(at,null,e)}function Ge(e){return e==null||typeof e=="boolean"?Ne(at):V(e)?Ne(me,null,e.slice()):wn(e)?st(e):Ne(Ls,null,String(e))}function st(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:It(e)}function Sn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(V(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),Sn(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Qr(t)?t._ctx=xe:r===3&&xe&&(xe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else B(t)?(t={default:t,_ctx:xe},s=32):(t=String(t),n&64?(s=16,t=[Ye(t)]):s=8);e.children=t,e.shapeFlag|=s}function tn(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=De([t.class,n.class]));else if(r==="style")t.style=Es([t.style,n.style]);else if(_s(r)){const o=t[r],i=n[r];i&&o!==i&&!(V(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=n[r])}return t}function qe(e,t,s,n=null){Xe(e,t,7,[s,n])}const nl=zr();let rl=0;function ol(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||nl,o={uid:rl++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Oo(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Zr(n,r),emitsOptions:qr(n,r),emit:null,emitted:null,propsDefaults:ne,inheritAttrs:n.inheritAttrs,ctx:ne,data:ne,props:ne,attrs:ne,slots:ne,refs:ne,setupState:ne,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Di.bind(null,o),e.ce&&e.ce(o),o}let Te=null;const il=()=>Te||xe;let ms,sn;{const e=Cs(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};ms=t("__VUE_INSTANCE_SETTERS__",s=>Te=s),sn=t("__VUE_SSR_SETTERS__",s=>Qt=s)}const ss=e=>{const t=Te;return ms(e),e.scope.on(),()=>{e.scope.off(),ms(t)}},Kn=()=>{Te&&Te.scope.off(),ms(null)};function co(e){return e.vnode.shapeFlag&4}let Qt=!1;function ll(e,t=!1,s=!1){t&&sn(t);const{props:n,children:r}=e.vnode,o=co(e);Ki(e,n,o,t),Ji(e,r,s||t);const i=o?al(e,t):void 0;return t&&sn(!1),i}function al(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Mi);const{setup:n}=s;if(n){ot();const r=e.setupContext=n.length>1?cl(e):null,o=ss(e),i=es(n,e,0,[e.props,r]),l=cr(i);if(it(),o(),(l||e.sp)&&!Pt(e)&&Nr(e),l){if(i.then(Kn,Kn),t)return i.then(a=>{Wn(e,a)}).catch(a=>{Ps(a,e,0)});e.asyncDep=i}else Wn(e,i)}else fo(e)}function Wn(e,t,s){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=Lr(t)),fo(e)}function fo(e,t,s){const n=e.type;e.render||(e.render=n.render||Qe);{const r=ss(e);ot();try{Oi(e)}finally{it(),r()}}}const ul={get(e,t){return ye(e,"get",""),e[t]}};function cl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,ul),slots:e.slots,emit:e.emit,expose:t}}function Is(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Lr(Qo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Wt)return Wt[s](e)},has(t,s){return s in t||s in Wt}})):e.proxy}function fl(e){return B(e)&&"__vccOpts"in e}const ae=(e,t)=>si(e,t,Qt),dl="3.5.28";let nn;const zn=typeof window<"u"&&window.trustedTypes;if(zn)try{nn=zn.createPolicy("vue",{createHTML:e=>e})}catch{}const po=nn?e=>nn.createHTML(e):e=>e,pl="http://www.w3.org/2000/svg",hl="http://www.w3.org/1998/Math/MathML",tt=typeof document<"u"?document:null,qn=tt&&tt.createElement("template"),gl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?tt.createElementNS(pl,e):t==="mathml"?tt.createElementNS(hl,e):s?tt.createElement(e,{is:s}):tt.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>tt.createTextNode(e),createComment:e=>tt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>tt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,o){const i=s?s.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===o||!(r=r.nextSibling)););else{qn.innerHTML=po(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=qn.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},vl=Symbol("_vtc");function ml(e,t,s){const n=e[vl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const bs=Symbol("_vod"),ho=Symbol("_vsh"),go={name:"show",beforeMount(e,{value:t},{transition:s}){e[bs]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Dt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Dt(e,!0),n.enter(e)):n.leave(e,()=>{Dt(e,!1)}):Dt(e,t))},beforeUnmount(e,{value:t}){Dt(e,t)}};function Dt(e,t){e.style.display=t?e[bs]:"none",e[ho]=!t}const bl=Symbol(""),yl=/(?:^|;)\s*display\s*:/;function xl(e,t,s){const n=e.style,r=fe(s);let o=!1;if(s&&!r){if(t)if(fe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();s[l]==null&&us(n,l,"")}else for(const i in t)s[i]==null&&us(n,i,"");for(const i in s)i==="display"&&(o=!0),us(n,i,s[i])}else if(r){if(t!==s){const i=n[bl];i&&(s+=";"+i),n.cssText=s,o=yl.test(s)}}else t&&e.removeAttribute("style");bs in e&&(e[bs]=o?n.display:"",e[ho]&&(n.display="none"))}const Jn=/\s*!important$/;function us(e,t,s){if(V(s))s.forEach(n=>us(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=_l(e,t);Jn.test(s)?e.setProperty(_t(n),s.replace(Jn,""),"important"):e[n]=s}}const Yn=["Webkit","Moz","ms"],Us={};function _l(e,t){const s=Us[t];if(s)return s;let n=ht(t);if(n!=="filter"&&n in e)return Us[t]=n;n=pr(n);for(let r=0;r<Yn.length;r++){const o=Yn[r]+n;if(o in e)return Us[t]=o}return t}const Gn="http://www.w3.org/1999/xlink";function Qn(e,t,s,n,r,o=Ao(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Gn,t.slice(6,t.length)):e.setAttributeNS(Gn,t,s):s==null||o&&!gr(s)?e.removeAttribute(t):e.setAttribute(t,o?"":Ve(s)?String(s):s)}function Xn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?po(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(l!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=gr(s):s==null&&l==="string"?(s="",i=!0):l==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(r||t)}function bt(e,t,s,n){e.addEventListener(t,s,n)}function wl(e,t,s,n){e.removeEventListener(t,s,n)}const Zn=Symbol("_vei");function Sl(e,t,s,n,r=null){const o=e[Zn]||(e[Zn]={}),i=o[t];if(n&&i)i.value=n;else{const[l,a]=Tl(t);if(n){const d=o[t]=Al(n,r);bt(e,l,d,a)}else i&&(wl(e,l,i,a),o[t]=void 0)}}const er=/(?:Once|Passive|Capture)$/;function Tl(e){let t;if(er.test(e)){t={};let n;for(;n=e.match(er);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):_t(e.slice(2)),t]}let Bs=0;const Cl=Promise.resolve(),El=()=>Bs||(Cl.then(()=>Bs=0),Bs=Date.now());function Al(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Xe(Pl(n,s.value),t,5,[n])};return s.value=e,s.attached=El(),s}function Pl(e,t){if(V(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const tr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ml=(e,t,s,n,r,o)=>{const i=r==="svg";t==="class"?ml(e,n,i):t==="style"?xl(e,s,n):_s(t)?on(t)||Sl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ol(e,t,n,i))?(Xn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qn(e,t,n,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!fe(n))?Xn(e,ht(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Qn(e,t,n,i))};function Ol(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&tr(t)&&B(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return tr(t)&&fe(s)?!1:t in e}const ys=e=>{const t=e.props["onUpdate:modelValue"]||!1;return V(t)?s=>is(t,s):t};function Rl(e){e.target.composing=!0}function sr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ot=Symbol("_assign");function nr(e,t,s){return t&&(e=e.trim()),s&&(e=Ts(e)),e}const vo={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[Ot]=ys(r);const o=n||r.props&&r.props.type==="number";bt(e,t?"change":"input",i=>{i.target.composing||e[Ot](nr(e.value,s,o))}),(s||o)&&bt(e,"change",()=>{e.value=nr(e.value,s,o)}),t||(bt(e,"compositionstart",Rl),bt(e,"compositionend",sr),bt(e,"change",sr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:o}},i){if(e[Ot]=ys(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ts(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===a)||(e.value=a))}},rr={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const r=ws(t);bt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?Ts(xs(i)):xs(i));e[Ot](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,ds(()=>{e._assigning=!1})}),e[Ot]=ys(n)},mounted(e,{value:t}){or(e,t)},beforeUpdate(e,t,s){e[Ot]=ys(s)},updated(e,{value:t}){e._assigning||or(e,t)}};function or(e,t){const s=e.multiple,n=V(t);if(!(s&&!n&&!ws(t))){for(let r=0,o=e.options.length;r<o;r++){const i=e.options[r],l=xs(i);if(s)if(n){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(d=>String(d)===String(l)):i.selected=Mo(t,l)>-1}else i.selected=t.has(l);else if(Zt(xs(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function xs(e){return"_value"in e?e._value:e.value}const Ll=be({patchProp:Ml},gl);let ir;function Il(){return ir||(ir=Gi(Ll))}const jl=((...e)=>{const t=Il().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=$l(n);if(!r)return;const o=t._component;!B(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=s(r,!1,kl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function kl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $l(e){return fe(e)?document.querySelector(e):e}const Ks=async e=>await new Promise(t=>setTimeout(t,e)),Fl=(e,t)=>{const s=n=>n instanceof Error?n:new Error("Aborted");return new Promise((n,r)=>{if(t.aborted){r(s(t.reason));return}const o=()=>{clearTimeout(i),r(s(t.reason))},i=setTimeout(()=>{t.removeEventListener("abort",o),n()},e);t.addEventListener("abort",o,{once:!0})})},Dl={class:"items-center justify-center w-full"},Hl={key:0,class:"group relative"},Nl=["src"],Vl={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},Ul={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},Bl={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},Kl={key:1,class:"group relative inline-block"},Wl=["src","controls"],zl=["src"],ql={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},Jl={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},Yl={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},Gl={key:2,class:"group relative inline-block"},Ql=["src"],Xl=["src"],Zl={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},ea={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},ta={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},sa={key:3,class:"group relative inline-block"},na=["src"],ra={class:"play-overlay absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},oa={key:0,class:"w-8 h-8 text-white ml-1",fill:"currentColor",viewBox:"0 0 24 24"},ia={key:1,class:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24"},la={key:4},aa={key:5,class:"mt-4 px-6 py-4 text-left"},ua={class:"text-lg leading-relaxed font-sans text-gray-800"},ca={key:0,class:"text-base leading-relaxed font-sans text-gray-400 mt-3 italic"},fa="https://github.com/receptron/mulmocast-cli/blob/main/assets/images/mulmocast_credit.png?raw=true",da=ts({__name:"mulmo_player",props:{index:{},videoWithAudioSource:{default:void 0},soundEffectSource:{default:void 0},videoSource:{default:void 0},imageSource:{default:void 0},audioSource:{default:void 0},text:{default:void 0},originalText:{default:void 0},duration:{default:void 0},defaultLang:{default:void 0},currentLang:{default:void 0},playbackSpeed:{default:1}},emits:["play","pause","ended"],setup(e,{expose:t,emit:s}){const n=e,r=s,o=K(),i=K(),l=K(),a=K(),d=K(!1),c=()=>{i.value&&l.value&&!isNaN(i.value.duration)&&!isNaN(l.value.duration)&&(d.value=l.value.duration>i.value.duration+1)},p=()=>{if(i.value){if(n.soundEffectSource){i.value.volume=1;return}n.videoSource&&(n.audioSource&&n.currentLang&&n.defaultLang&&n.currentLang!==n.defaultLang?i.value.volume=.2:i.value.volume=0)}},b=()=>{const re=n.playbackSpeed??1;o.value&&(o.value.playbackRate=re),i.value&&(i.value.playbackRate=re),l.value&&(l.value.playbackRate=re),a.value&&(a.value.playbackRate=re)};Ie([()=>n.currentLang,()=>n.defaultLang,()=>n.videoSource,()=>n.audioSource],()=>{p()}),Ie(()=>n.playbackSpeed,()=>{b()}),Ie(i,re=>{re&&(p(),b())}),Ie([o,l,a],()=>{b()}),gs(()=>{p(),b()});const T=K(!1),M=K(!1),E=ae(()=>W.value||M.value);let F=null;const H=()=>{F&&(F.abort(),F=null)},N=()=>{W.value=!0,l.value&&i.value&&!l.value.ended&&(l.value.currentTime=i.value.currentTime,l.value.play().catch(()=>{})),r("play")},J=re=>{M.value||i.value?.ended&&l.value&&!l.value.ended||(document.hidden||(W.value=!1),!i.value?.ended&&l?.value&&l.value?.pause(),ge(re))},I=()=>{T.value||(!l.value||l.value.ended)&&Ce()},j=()=>{T.value||(!i.value||i.value.ended)&&Ce()},z=()=>{if(!i.value||!l.value)return;const re=Math.min(l.value.currentTime,i.value.duration);Math.abs(i.value.currentTime-re)>.5&&(i.value.currentTime=re)},ee=()=>{W.value=!0,i.value&&!i.value.ended&&i.value.play().catch(()=>{}),r("play")},G=()=>{M.value||l.value?.ended||(document.hidden||(W.value=!1),i.value&&!i.value.ended&&i.value.pause(),r("pause"))},he=()=>{W.value=!0,r("play")},ge=re=>{if(M.value)return;document.hidden||(W.value=!1);const x=re.target;x.duration!==x.currentTime&&r("pause")},Ce=()=>{T.value||(T.value=!0,W.value=!1,r("ended"))},L=()=>{o.value?.pause(),i.value?.pause(),l.value?.pause(),a.value?.pause()},W=K(!1);let ue=null;const ke=async()=>{if(M.value=!1,T.value=!1,W.value=!0,o.value&&(b(),o.value.play().catch(()=>{})),i.value&&(p(),b(),i.value.play().catch(()=>{}),l.value&&(l.value.currentTime=i.value.currentTime,l.value.play().catch(()=>{}))),a.value&&(b(),a.value.play().catch(()=>{})),!o.value&&!i.value&&!a.value)try{H(),F=new AbortController,await Fl((n.duration??0)*1e3,F.signal),F=null,T.value||(W.value=!1,T.value=!0,r("ended"))}catch{}},pe=()=>{M.value=!0,W.value=!1,T.value=!0,H(),o.value?.pause(),i.value?.pause(),l.value?.pause(),a.value?.pause()},Q=()=>{!l.value||!i.value||l.value.ended||Math.abs(l.value.currentTime-i.value.currentTime)>.5&&(l.value.currentTime=i.value.currentTime)},Y=re=>{re?.paused&&!re.ended&&re.play().catch(()=>{})},Fe=(re,x)=>{x.paused&&!x.ended&&(re.ended||(x.currentTime=re.currentTime),x.play().catch(()=>{}))},Ze=()=>{W.value&&(Y(o.value),i.value&&l.value?(Y(i.value),Fe(i.value,l.value)):Y(i.value),Y(a.value))},Oe=()=>{document.hidden&&W.value?ue||(ue=setInterval(Ze,500)):document.hidden||ue&&(clearInterval(ue),ue=null)},ce=()=>{document.hidden&&W.value&&setTimeout(Ze,50)};return gs(()=>{document.addEventListener("visibilitychange",Oe),o.value?.addEventListener("pause",ce),i.value?.addEventListener("pause",ce),a.value?.addEventListener("pause",ce),l.value?.addEventListener("pause",ce)}),Os(()=>{document.removeEventListener("visibilitychange",Oe),o.value?.removeEventListener("pause",ce),i.value?.removeEventListener("pause",ce),a.value?.removeEventListener("pause",ce),l.value?.removeEventListener("pause",ce),ue&&(clearInterval(ue),ue=null),H()}),t({play:ke,stop:pe}),(re,x)=>(R(),$("div",Dl,[e.videoWithAudioSource?(R(),$("div",Hl,[S("video",{ref_key:"videoWithAudioRef",ref:o,src:e.videoWithAudioSource,class:"mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",controls:!0,playsinline:"true",onPlay:he,onPause:ge,onEnded:Ce},null,40,Nl),S("div",Vl,[S("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:x[0]||(x[0]=P=>E.value?L():ke())},[E.value?(R(),$("svg",Bl,[...x[5]||(x[5]=[S("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(R(),$("svg",Ul,[...x[4]||(x[4]=[S("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):e.soundEffectSource||e.videoSource?(R(),$("div",Kl,[S("video",{ref_key:"videoRef",ref:i,class:"mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",src:e.soundEffectSource||e.videoSource,controls:!d.value,playsinline:"true",onPlay:N,onPause:J,onEnded:I,onSeeked:Q,onLoadedmetadata:c},null,40,Wl),e.audioSource?(R(),$("audio",{key:0,ref_key:"audioSyncRef",ref:l,src:e.audioSource,controls:!0,class:De(d.value?"mulmocast-audio absolute bottom-0 left-0 w-full":"hidden"),onEnded:j,onSeeked:z,onPlay:ee,onPause:G,onLoadedmetadata:c},null,42,zl)):ve("",!0),S("div",ql,[S("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:x[1]||(x[1]=P=>E.value?L():ke())},[E.value?(R(),$("svg",Yl,[...x[7]||(x[7]=[S("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(R(),$("svg",Jl,[...x[6]||(x[6]=[S("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):e.audioSource?(R(),$("div",Gl,[e.imageSource?(R(),$("img",{key:0,src:e.imageSource,class:"mx-auto h-auto max-h-[80vh] w-auto object-contain",alt:"Background"},null,8,Ql)):(R(),$("img",{key:1,src:fa,class:"mx-auto h-auto max-h-[80vh] w-auto object-contain",alt:"Background"})),S("audio",{ref_key:"audioRef",ref:a,class:"mulmocast-audio absolute inset-0 w-full h-full",src:e.audioSource,controls:!0,onPlay:he,onPause:ge,onEnded:Ce},null,40,Xl),S("div",Zl,[S("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:x[2]||(x[2]=P=>E.value?L():ke())},[E.value?(R(),$("svg",ta,[...x[9]||(x[9]=[S("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(R(),$("svg",ea,[...x[8]||(x[8]=[S("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):e.imageSource?(R(),$("div",sa,[S("img",{src:e.imageSource,class:"max-w-full max-h-full object-contain"},null,8,na),S("div",ra,[S("button",{class:"pointer-events-auto w-16 h-16 bg-black/50 hover:bg-black/70 rounded-full flex items-center justify-center transition-colors cursor-pointer",onClick:x[3]||(x[3]=P=>E.value?L():ke())},[E.value?(R(),$("svg",ia,[...x[11]||(x[11]=[S("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},null,-1)])])):(R(),$("svg",oa,[...x[10]||(x[10]=[S("path",{d:"M8 5v14l11-7z"},null,-1)])]))])])])):(R(),$("div",la,"No media available")),e.text?(R(),$("div",aa,[S("p",ua,de(e.text),1),e.originalText&&e.originalText!==e.text?(R(),$("p",ca,de(e.originalText),1)):ve("",!0)])):ve("",!0)]))}}),mo=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},Ws=mo(da,[["__scopeId","data-v-843621f0"]]),pa=["value"],ha=["value"],ga=ts({__name:"select_language",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=["en","ja"],n={en:"English",ja:"日本語"},r=t,o=i=>{const l=i.target;r("update:modelValue",l.value)};return(i,l)=>(R(),$("select",{value:e.modelValue,class:"px-4 py-2 bg-white border-2 border-gray-300 rounded-lg shadow-sm hover:border-indigo-400 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 focus:outline-none transition-colors cursor-pointer text-base font-medium text-gray-700",onChange:o},[(R(),$(me,null,Kt(s,a=>S("option",{key:a,value:a},de(n[a]||a),9,ha)),64))],40,pa))}}),va={class:"w-full overflow-hidden"},ma={class:"max-w-7xl mx-auto px-4"},ba={class:"grid grid-cols-[auto,1fr,auto] gap-x-4 gap-y-4 max-sm:grid-cols-2"},ya=["disabled"],xa={class:"col-start-2 row-start-1 min-w-0 max-sm:col-span-2 max-sm:col-start-1"},_a=["disabled"],wa={key:0,class:"mulmo-text-box col-start-2 row-start-2 min-w-0 mt-1 rounded-lg px-6 py-4 text-left max-sm:col-span-2 max-sm:col-start-1 max-sm:row-start-3"},Sa={class:"mulmo-text-primary text-lg leading-relaxed font-sans"},Ta={key:0,class:"mulmo-text-secondary text-base leading-relaxed font-sans mt-3 italic"},Ca=["src"],Ea=ts({__name:"mulmo_viewer",props:{dataSet:{default:void 0},basePath:{},initPage:{default:void 0},audioLang:{default:"en"},textLang:{default:"en"},playbackSpeed:{default:1}},emits:["updatedPage","update:audioLang","update:textLang","allCompleted"],setup(e,{expose:t,emit:s}){const n=e,r=s,o=n.dataSet?.beats?.length??0,i=K(n.initPage??0),l=K(!0),a=K(),d=K(),c=ae({get:()=>n.audioLang,set:L=>r("update:audioLang",L||"en")}),p=ae({get:()=>n.textLang,set:L=>r("update:textLang",L||"en")});let b=0;Ie(()=>n.audioLang,async(L,W)=>{if(L!==W&&F.value){b++;const ue=b;if(a.value?.stop(),await Ks(500),ue!==b)return;a.value&&(F.value=!0,await a.value.play())}}),Ie(()=>n.textLang,async(L,W)=>{L!==W&&F.value&&(await Ks(100),a.value&&await a.value.play())}),Ie(d,L=>{L&&(L.volume=.3)});const T=ae(()=>n.dataSet?.beats[i.value]),M=L=>L?n.basePath+"/"+L:"",E=ae(()=>M(n.dataSet?.bgmSource)),F=K(!1),H=()=>{F.value=!0,d.value&&(d.value.volume=.3,d.value.play())},N=()=>{F.value=!1,d.value&&d.value.pause()},J=async()=>{b++;const L=b;a.value?.stop(),await Ks(500),L===b&&a.value&&a.value.play()},I=L=>{i.value!==L&&(i.value=L,F.value&&l.value&&J())},j=L=>{const W=i.value+L;return W>-1&&W<o?(I(W),r("updatedPage",W),!0):!1},z=()=>{l.value&&j(1)||(F.value=!1,d.value&&d.value.pause(),r("allCompleted"))},ee={onPlay:H,onPause:N,onEnded:z},G=ae(()=>{const L=T.value,W=L?.audioSources?.[c.value],ue=L?.multiLinguals?.[p.value]??L?.text??"",ke=n.dataSet?.lang?L?.multiLinguals?.[n.dataSet.lang]??L?.text??"":"";return{videoWithAudioSource:M(L?.videoWithAudioSource),videoSource:M(L?.videoSource),soundEffectSource:M(L?.soundEffectSource),audioSource:M(W),imageSource:M(L?.imageSource),index:i.value,text:ue,originalText:ke,duration:L?.duration,defaultLang:n.dataSet?.lang,currentLang:c.value,playbackSpeed:n.playbackSpeed,...ee}}),he=ae(()=>n.dataSet?.beats[i.value+1]),ge=ae(()=>{if(i.value+1>=o)return null;const L=he.value;return{videoWithAudioSource:M(L?.videoWithAudioSource),videoSource:M(L?.videoSource),soundEffectSource:M(L?.soundEffectSource),audioSource:M(L?.audioSources?.[c.value]),imageSource:M(L?.imageSource),index:i.value+1,text:L?.multiLinguals?.[p.value]??L?.text??"",duration:L?.duration}}),Ce=ae(()=>({MulmoPlayer:Ws,pageProps:G.value,currentPage:i.value,pageCount:o,pageMove:j,isPlaying:F.value,audioLang:c,textLang:p,SelectLanguage:ga,mediaPlayerRef:a,handlePlay:H,handlePause:N,handleEnded:z}));return t({updatePage:I}),(L,W)=>(R(),$(me,null,[Pi(L.$slots,"default",Mn(uo(Ce.value)),()=>[S("div",va,[S("div",ma,[S("div",ba,[S("button",{class:"col-start-1 row-start-1 justify-self-start w-auto px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50 self-center max-sm:row-start-2",disabled:i.value===0,onClick:W[0]||(W[0]=ue=>j(-1))}," Prev ",8,ya),S("div",xa,[Ne(Ws,tn({ref_key:"mediaPlayer",ref:a},{...G.value,text:"",originalText:""}),null,16)]),S("button",{class:"col-start-3 row-start-1 justify-self-end w-auto px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50 self-center max-sm:col-start-2 max-sm:row-start-2",disabled:i.value>=mn(o)-1,onClick:W[1]||(W[1]=ue=>j(1))}," Next ",8,_a),G.value.text?(R(),$("div",wa,[S("p",Sa,de(G.value.text),1),G.value.originalText&&G.value.originalText!==G.value.text?(R(),$("p",Ta,de(G.value.originalText),1)):ve("",!0)])):ve("",!0)])])])]),ge.value?Tt((R(),Lt(Ws,Mn(tn({key:0},ge.value)),null,16)),[[go,!1]]):ve("",!0),E.value?(R(),$("audio",{key:1,ref_key:"bgmRef",ref:d,src:E.value},null,8,Ca)):ve("",!0)],64))}}),Aa=mo(Ea,[["__scopeId","data-v-46289647"]]),Pa=`You are answering questions based on the content provided.
2
- - Answer based ONLY on the information in the provided content
3
- - If the answer cannot be found in the content, say so clearly
4
- - Be concise and direct in your answers
5
- - Do not make up information that is not in the content
6
- - You may reference previous conversation when answering follow-up questions
7
- - If references are available and the user asks for more details, mention which reference could provide more information
8
- - When you suggest fetching a reference for more details, include [SUGGEST_FETCH: <url>] in your response`,Ma=(e,t)=>{const s=[],n=e.text||"";if(!n.trim())return"";s.push(`[${t}] ${n}`);const r=e.meta;return r&&(r.tags&&r.tags.length>0&&s.push(` Tags: ${r.tags.join(", ")}`),r.context&&s.push(` Context: ${r.context}`),r.keywords&&r.keywords.length>0&&s.push(` Keywords: ${r.keywords.join(", ")}`),r.expectedQuestions&&r.expectedQuestions.length>0&&s.push(` Can answer: ${r.expectedQuestions.join("; ")}`)),s.join(`
9
- `)},Oa=e=>{const t=e.scriptMeta;if(!t)return"";const s=[];return t.background&&s.push(`Background: ${t.background}`),t.audience&&s.push(`Target audience: ${t.audience}`),t.prerequisites&&t.prerequisites.length>0&&s.push(`Prerequisites: ${t.prerequisites.join(", ")}`),t.goals&&t.goals.length>0&&s.push(`Goals: ${t.goals.join("; ")}`),t.keywords&&t.keywords.length>0&&s.push(`Keywords: ${t.keywords.join(", ")}`),t.references&&t.references.length>0&&(s.push("References:"),t.references.forEach(n=>{const r=n.title||n.url,o=n.description?` - ${n.description}`:"";s.push(` - [${n.type||"web"}] ${r}: ${n.url}${o}`)})),t.faq&&t.faq.length>0&&(s.push("FAQ:"),t.faq.forEach(n=>{s.push(` Q: ${n.question}`),s.push(` A: ${n.answer}`)})),t.author&&s.push(`Author: ${t.author}`),s.length>0?s.join(`
10
- `):""},Ra=e=>{const t=[];t.push(`# Script: ${e.title}`),t.push(`Language: ${e.lang}`),t.push("");const s=Oa(e);s&&(t.push("## About this content"),t.push(s),t.push(""));const n=new Map;return e.beats.forEach((r,o)=>{const i=Ma(r,o);if(!i)return;const l=r.meta?.section||"main";n.has(l)||n.set(l,[]),n.get(l).push(i)}),n.forEach((r,o)=>{t.push(`## Section: ${o}`),r.forEach(i=>t.push(i)),t.push("")}),t.join(`
11
- `)},La="https://api.openai.com/v1/chat/completions",Ia="gpt-4o-mini",lr=3e4;function ar(e){if(!e.startsWith("data: "))return null;const t=e.slice(6);if(t==="[DONE]")return null;try{return JSON.parse(t).choices?.[0]?.delta?.content??null}catch{return null}}async function ja(e,t,s){const n=new AbortController;let r=setTimeout(()=>n.abort(),lr);function o(){clearTimeout(r),r=setTimeout(()=>n.abort(),lr)}const i=t.signal?AbortSignal.any([t.signal,n.signal]):n.signal;try{const l=await fetch(La,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.apiKey}`},body:JSON.stringify({model:t.model??Ia,messages:e,stream:!0}),signal:i});if(!l.ok){const b=await l.text();throw new Error(`OpenAI API error (${l.status}): ${b}`)}if(!l.body)throw new Error("Response body is null");const a=l.body.getReader(),d=new TextDecoder,c=[];let p="";for(;;){const{done:b,value:T}=await a.read();if(b)break;p+=d.decode(T,{stream:!0});const M=p.split(`
12
- `);p=M.pop()??"",M.forEach(E=>{const F=ar(E.trim());F&&(c.push(F),s(F),o())})}if(p.trim()){const b=ar(p.trim());b&&(c.push(b),s(b))}return c.join("")}finally{clearTimeout(r)}}const ka={class:"fixed right-0 top-0 h-full w-96 bg-gray-800 border-l border-gray-700 flex flex-col z-50 shadow-2xl"},$a={class:"flex items-center justify-between px-4 py-3 border-b border-gray-700"},Fa={class:"flex gap-2"},Da=["disabled"],Ha={key:0,class:"text-center text-gray-500 text-sm mt-8"},Na={key:1,class:"flex justify-start"},Va={class:"max-w-[85%] px-3 py-2 rounded-lg text-sm bg-gray-700 text-gray-200 whitespace-pre-wrap break-words"},Ua={key:2,class:"flex justify-start"},Ba={key:3,class:"p-2 bg-red-900/50 text-red-300 rounded text-xs"},Ka={class:"border-t border-gray-700 p-3"},Wa={class:"flex gap-2"},za=["disabled"],qa={class:"flex flex-col gap-1"},Ja=["disabled"],Ya=24e3,Ga=ts({__name:"QAChat",props:{viewData:{},currentPage:{},bundleId:{}},emits:["close"],setup(e,{emit:t}){const s=e,n=t,r=K(""),o=K([]),i=K(!1),l=K(""),a=K(null),d=K(null),c=K(null),p=new Map;Ie(()=>s.bundleId,(j,z)=>{z&&(l.value&&o.value.push({role:"assistant",content:l.value}),p.set(z,[...o.value])),a.value?.abort(),i.value=!1,l.value="",c.value=null,o.value=p.get(j)??[],F()});const b=ae(()=>"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");function T(j){let z=0;const ee=[];for(let G=j.length-1;G>=0&&(z+=j[G].content.length,!(z>Ya));G--)ee.unshift(j[G]);return ee}const M=ae(()=>{const j=Ra(s.viewData);return{role:"system",content:`${Pa}
13
-
14
- ---
15
-
16
- ${j}
17
-
18
- The user is currently viewing beat ${s.currentPage}.`}}),E=ae(()=>o.value.filter(j=>j.role!=="system"));function F(){ds(()=>{d.value&&(d.value.scrollTop=d.value.scrollHeight)})}Ie(l,F);async function H(){const j=r.value.trim();if(!j||i.value)return;c.value=null;const z={role:"user",content:j};r.value="",await ds(),o.value.push(z),F(),i.value=!0,l.value="";const ee=new AbortController;a.value=ee;const G=[M.value,...T(o.value)];try{const he=await ja(G,{apiKey:b.value,signal:ee.signal},ge=>{l.value+=ge});o.value.push({role:"assistant",content:he})}catch(he){he instanceof DOMException&&he.name==="AbortError"?l.value&&o.value.push({role:"assistant",content:l.value}):c.value=he instanceof Error?he.message:"Failed to get response"}finally{i.value=!1,l.value="",a.value=null,F()}}function N(){a.value?.abort()}function J(){o.value=[],l.value="",c.value=null,p.delete(s.bundleId)}function I(j){j.isComposing||j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),H())}return Os(()=>{a.value?.abort()}),(j,z)=>(R(),$("div",ka,[S("div",$a,[z[2]||(z[2]=S("h2",{class:"text-sm font-semibold text-white"},"Q&A Chat",-1)),S("div",Fa,[S("button",{onClick:J,disabled:o.value.length===0&&!i.value,class:"px-2 py-1 text-xs rounded cursor-pointer transition-colors border-none bg-gray-700 text-gray-300 hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed"}," Clear ",8,Da),S("button",{onClick:z[0]||(z[0]=ee=>n("close")),class:"px-2 py-1 text-xs rounded cursor-pointer transition-colors border-none bg-gray-700 text-gray-300 hover:bg-gray-600"}," Close ")])]),S("div",{ref_key:"messagesContainer",ref:d,class:"flex-1 overflow-y-auto p-4 space-y-3"},[E.value.length===0&&!i.value?(R(),$("div",Ha," Ask a question about this presentation. ")):ve("",!0),(R(!0),$(me,null,Kt(E.value,(ee,G)=>(R(),$("div",{key:G,class:De(["flex",ee.role==="user"?"justify-end":"justify-start"])},[S("div",{class:De(["max-w-[85%] px-3 py-2 rounded-lg text-sm whitespace-pre-wrap break-words",ee.role==="user"?"bg-blue-600 text-white":"bg-gray-700 text-gray-200"])},de(ee.content),3)],2))),128)),i.value&&l.value?(R(),$("div",Na,[S("div",Va,[Ye(de(l.value)+" ",1),z[3]||(z[3]=S("span",{class:"animate-pulse"},"|",-1))])])):ve("",!0),i.value&&!l.value?(R(),$("div",Ua,[...z[4]||(z[4]=[S("div",{class:"px-3 py-2 rounded-lg text-sm bg-gray-700 text-gray-400"},[S("span",{class:"animate-pulse"},"Thinking...")],-1)])])):ve("",!0),c.value?(R(),$("div",Ba,de(c.value),1)):ve("",!0)],512),S("div",Ka,[S("div",Wa,[Tt(S("textarea",{"onUpdate:modelValue":z[1]||(z[1]=ee=>r.value=ee),onKeydown:I,disabled:i.value,rows:"2",class:"flex-1 bg-gray-700 border border-gray-600 text-white px-3 py-2 rounded text-sm resize-none focus:outline-none focus:border-blue-500 disabled:opacity-50",placeholder:"Ask about this presentation..."},null,40,za),[[vo,r.value]]),S("div",qa,[i.value?(R(),$("button",{key:1,onClick:N,class:"px-3 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-red-600 text-white hover:bg-red-700"}," Stop ")):(R(),$("button",{key:0,onClick:H,disabled:!r.value.trim(),class:"px-3 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed"}," Send ",8,Ja))])])])]))}}),Qa={class:"min-h-screen flex flex-col bg-gray-900 text-white"},Xa={class:"bg-gray-800 border-b border-gray-700"},Za={class:"flex items-center gap-6 px-6 py-3"},eu={key:0,class:"flex gap-2 flex-wrap"},tu=["onClick"],su={key:0,class:"flex items-center gap-6 px-6 py-2 bg-gray-750 border-t border-gray-700"},nu={class:"flex items-center gap-2 text-sm text-gray-300"},ru=["disabled"],ou=["value"],iu={class:"flex items-center gap-2 text-sm text-gray-300"},lu=["disabled"],au=["value"],uu={key:0,class:"text-center p-8 text-gray-400"},cu={key:1,class:"text-center p-8 text-red-400"},fu={key:2,class:"text-center p-8 text-gray-500"},du={key:3,class:"w-full max-w-5xl mx-auto"},pu={key:0,class:"mb-4 p-4 bg-gray-800 rounded-lg"},hu={class:"flex items-center gap-4 mb-4"},gu={class:"text-sm text-gray-300"},vu={class:"text-white font-medium"},mu={class:"text-sm text-gray-400"},bu={class:"text-sm text-gray-400"},yu={key:0,class:"mb-4 p-2 bg-red-900 text-red-200 rounded text-sm"},xu={class:"flex items-center gap-4 mb-4"},_u=["disabled"],wu={key:2,class:"w-56 px-6 py-2 text-sm text-gray-400 flex items-center justify-center"},Su=["disabled"],Tu=["disabled"],Cu=["disabled"],Eu={class:"mt-2"},Au={class:"text-white [--mulmo-text-bg:#1f2937] [--mulmo-text-secondary:#bbb]"},Pu=ts({__name:"App",setup(e){const t=K([]),s=K(null),n=K(!0),r=K(null),o=K(null),i=K(0),l=K("en"),a=K("en"),d=K(!1),c=K(!1),p=K(!1),b=K(null),T=K([]),M=K(new Map),E=K(new Map),F=K(!1),H=K(null),N=K(!1),J=ae(()=>(o.value?.beats?.length??0)>0),I=ae(()=>!0),j=ae(()=>{if(o.value?.lang)return o.value.lang;const x=o.value?.beats?.[0]?.audioSources;if(x){const P=Object.keys(x);return P.includes("ja")?"ja":P.find(O=>O!=="en")||P[0]||"en"}return"en"}),z=ae({get:()=>{if(E.value.has(i.value))return E.value.get(i.value)||"";const x=o.value?.beats?.[i.value];return x&&(x.multiLinguals?.[j.value]||x.text)||""},set:x=>{E.value.set(i.value,x)}}),ee=ae(()=>o.value?.beats?.[0]?.audioSources?Object.keys(o.value.beats[0].audioSources):["en"]),G=ae(()=>o.value?.beats?.[0]?.multiLinguals?Object.keys(o.value.beats[0].multiLinguals):["en"]),he=ae(()=>s.value?`/bundles/${s.value}`:"");gs(async()=>{try{const x=await fetch("/api/bundles");if(!x.ok)throw new Error("Failed to load bundles");t.value=await x.json(),t.value.length>0&&(s.value=t.value[0].path)}catch(x){r.value=x instanceof Error?x.message:"Unknown error"}finally{n.value=!1}}),Ie(s,async x=>{if(!x){o.value=null;return}try{const P=await fetch(`/bundles/${x}/mulmo_view.json`);if(!P.ok)throw new Error("Failed to load bundle data");o.value=await P.json(),i.value=0;const O=o.value?.beats?.[0]?.audioSources?Object.keys(o.value.beats[0].audioSources):["en"],le=o.value?.beats?.[0]?.multiLinguals?Object.keys(o.value.beats[0].multiLinguals):["en"];O.includes(l.value)||(l.value=O[0]||"en"),le.includes(a.value)||(a.value=le[0]||"en")}catch(P){r.value=P instanceof Error?P.message:"Unknown error",o.value=null}});function ge(x){s.value=x}function Ce(x){i.value=x}const L=ae(()=>o.value?.beats?.length||0),W=ae(()=>M.value.size),ue=ae(()=>E.value.size);async function ke(){if(d.value)await Q(),d.value=!1;else{H.value=null;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(P=>P.stop()),d.value=!0,M.value=new Map,E.value=new Map}catch(x){H.value=x instanceof Error?x.message:"Failed to access microphone"}}}async function pe(){if(!c.value){H.value=null,T.value=[];try{const x=await navigator.mediaDevices.getUserMedia({audio:!0}),P=new MediaRecorder(x,{mimeType:"audio/webm"});P.ondataavailable=O=>{O.data.size>0&&T.value.push(O.data)},P.onstop=()=>{const O=new Blob(T.value,{type:"audio/webm"});M.value.set(i.value,O),x.getTracks().forEach(le=>le.stop())},b.value=P,P.start(),c.value=!0}catch(x){H.value=x instanceof Error?x.message:"Failed to start recording"}}}async function Q(){if(!c.value||!b.value)return;const x=i.value;return new Promise(P=>{b.value?(b.value.onstop=async()=>{const O=new Blob(T.value,{type:"audio/webm"});M.value.set(x,O),b.value?.stream.getTracks().forEach(le=>le.stop()),c.value=!1,b.value=null,await Y(x,O),P()},b.value.stop()):P()})}async function Y(x,P){p.value=!0,H.value=null;try{const O=await Oe(P),Re=await(await fetch("/api/transcribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audioBase64:O,lang:j.value})})).json();if(Re.success&&Re.text){const ct=z.value,Be=ct?`${ct}
19
- ${Re.text}`:Re.text;E.value.set(x,Be)}else H.value=Re.error||"Transcription failed"}catch(O){H.value=O instanceof Error?O.message:"Transcription failed"}finally{p.value=!1}}async function Fe(){await Q(),i.value<L.value-1&&i.value++}async function Ze(){await Q(),i.value>0&&i.value--}function Oe(x){return new Promise((P,O)=>{const le=new FileReader;le.onloadend=()=>{const Re=le.result.split(",")[1];P(Re)},le.onerror=O,le.readAsDataURL(x)})}async function ce(){if(!(!s.value||M.value.size===0&&E.value.size===0)){F.value=!0,H.value=null;try{const x=new Set;M.value.forEach((O,le)=>x.add(le)),E.value.forEach((O,le)=>x.add(le));for(const O of x){const le=o.value?.beats?.[O],Re=le?.multiLinguals?.[j.value]||le?.text||"",ct=E.value.get(O)??Re;if(M.value.has(O)){const Be=M.value.get(O),jt=await Oe(Be),f=await(await fetch("/api/save-beat-text",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bundlePath:s.value,beatIndex:O,langKey:j.value,audioBase64:jt,text:ct})})).json();if(!f.success)throw new Error(f.error||`Failed to save beat ${O+1}`)}else{const jt=await(await fetch("/api/save-beat-text",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bundlePath:s.value,beatIndex:O,langKey:j.value,text:ct})})).json();if(!jt.success)throw new Error(jt.error||`Failed to save text for beat ${O+1}`)}}const P=await fetch(`/bundles/${s.value}/mulmo_view.json`);P.ok&&(o.value=await P.json()),d.value=!1,M.value=new Map,E.value=new Map,l.value=j.value,a.value=j.value}catch(x){H.value=x instanceof Error?x.message:"Failed to save recordings"}finally{F.value=!1}}}function re(){M.value=new Map,E.value=new Map,d.value=!1}return(x,P)=>(R(),$("div",Qa,[S("header",Xa,[S("div",Za,[P[7]||(P[7]=S("h1",{class:"text-lg font-semibold whitespace-nowrap"},"MulmoViewer Preview",-1)),t.value.length>0?(R(),$("nav",eu,[(R(!0),$(me,null,Kt(t.value,O=>(R(),$("button",{key:O.path,class:De(["px-3 py-1.5 rounded text-sm cursor-pointer transition-colors border-none",s.value===O.path?"bg-blue-600 text-white":"bg-gray-700 text-gray-300 hover:bg-gray-600"]),onClick:le=>ge(O.path)},de(O.name),11,tu))),128))])):ve("",!0)]),o.value?(R(),$("div",su,[S("label",nu,[P[8]||(P[8]=Ye(" Audio: ",-1)),Tt(S("select",{"onUpdate:modelValue":P[0]||(P[0]=O=>l.value=O),class:"bg-gray-700 border border-gray-600 text-white px-2 py-1 rounded text-sm cursor-pointer hover:bg-gray-600",disabled:d.value},[(R(!0),$(me,null,Kt(ee.value,O=>(R(),$("option",{key:O,value:O},de(O.toUpperCase()),9,ou))),128))],8,ru),[[rr,l.value]])]),S("label",iu,[P[9]||(P[9]=Ye(" Text: ",-1)),Tt(S("select",{"onUpdate:modelValue":P[1]||(P[1]=O=>a.value=O),class:"bg-gray-700 border border-gray-600 text-white px-2 py-1 rounded text-sm cursor-pointer hover:bg-gray-600",disabled:d.value},[(R(!0),$(me,null,Kt(G.value,O=>(R(),$("option",{key:O,value:O},de(O.toUpperCase()),9,au))),128))],8,lu),[[rr,a.value]])]),P[10]||(P[10]=S("div",{class:"flex-1"},null,-1)),J.value&&I.value?(R(),$("button",{key:0,onClick:P[2]||(P[2]=O=>N.value=!N.value),class:De(["px-3 py-1.5 rounded text-sm cursor-pointer transition-colors border-none",N.value?"bg-purple-600 text-white hover:bg-purple-700":"bg-purple-500 text-white hover:bg-purple-600"])}," Q&A Chat ",2)):ve("",!0),S("button",{onClick:ke,class:De(["px-3 py-1.5 rounded text-sm cursor-pointer transition-colors border-none",d.value?"bg-red-600 text-white hover:bg-red-700":"bg-green-600 text-white hover:bg-green-700"])},de(d.value?"Exit Edit Mode":"Edit Mode"),3)])):ve("",!0)]),S("main",{class:De(["flex-1 flex items-start justify-center p-4 transition-[margin]",N.value?"mr-96":""])},[n.value?(R(),$("div",uu,"Loading bundles...")):r.value?(R(),$("div",cu,de(r.value),1)):t.value.length===0?(R(),$("div",fu,[...P[11]||(P[11]=[Ye(" No bundles found in output/ directory. ",-1),S("p",{class:"mt-2"},[Ye(" Run "),S("code",{class:"bg-gray-800 px-2 py-1 rounded font-mono text-sm"},"yarn run cli bundle <file>"),Ye(" to generate a bundle. ")],-1)])])):o.value?(R(),$("div",du,[d.value?(R(),$("div",pu,[S("div",hu,[S("span",gu,[P[12]||(P[12]=Ye(" Lang: ",-1)),S("span",vu,de(j.value.toUpperCase()),1)]),S("span",mu," Beat "+de(i.value+1)+" / "+de(L.value),1),S("span",bu," Edited: "+de(ue.value),1)]),H.value?(R(),$("div",yu,de(H.value),1)):ve("",!0),S("div",xu,[S("button",{onClick:Ze,disabled:i.value===0||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none disabled:opacity-50 disabled:cursor-not-allowed bg-gray-600 text-white hover:bg-gray-500"}," Prev ",8,_u),!c.value&&!p.value?(R(),$("button",{key:0,onClick:pe,class:"w-56 px-6 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-red-600 text-white hover:bg-red-700 flex items-center justify-center gap-2"},[...P[13]||(P[13]=[S("span",{class:"w-3 h-3 bg-white rounded-full"},null,-1),Ye(" Voice Input ",-1)])])):c.value?(R(),$("button",{key:1,onClick:Q,class:"w-56 px-6 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-gray-600 text-white hover:bg-gray-500 flex items-center justify-center gap-2"},[...P[14]||(P[14]=[S("span",{class:"w-3 h-3 bg-red-500 rounded-sm animate-pulse"},null,-1),Ye(" Stop ",-1)])])):(R(),$("span",wu," Transcribing... ")),S("button",{onClick:Fe,disabled:i.value>=L.value-1||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none disabled:opacity-50 disabled:cursor-not-allowed bg-gray-600 text-white hover:bg-gray-500"}," Next ",8,Su),P[15]||(P[15]=S("div",{class:"flex-1"},null,-1)),S("button",{onClick:re,disabled:F.value||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none bg-gray-600 text-white hover:bg-gray-500"}," Discard ",8,Tu),S("button",{onClick:ce,disabled:W.value===0&&ue.value===0||F.value||c.value||p.value,class:"px-4 py-2 rounded text-sm cursor-pointer transition-colors border-none disabled:opacity-50 disabled:cursor-not-allowed bg-blue-600 text-white hover:bg-blue-700"},de(F.value?"Saving...":`Save All (${ue.value})`),9,Cu)]),S("div",Eu,[P[16]||(P[16]=S("label",{class:"block text-sm text-gray-400 mb-1"}," Text (editable - voice input appends): ",-1)),Tt(S("textarea",{"onUpdate:modelValue":P[3]||(P[3]=O=>z.value=O),rows:"4",class:"w-full bg-gray-700 border border-gray-600 text-white px-3 py-2 rounded text-sm resize-vertical focus:outline-none focus:border-blue-500",placeholder:"Text will appear here after recording..."},null,512),[[vo,z.value]])])])):ve("",!0),S("div",Au,[(R(),Lt(mn(Aa),{key:d.value?`recording-${i.value}`:"viewer","data-set":o.value,"base-path":he.value,"init-page":i.value,"audio-lang":l.value,"onUpdate:audioLang":P[4]||(P[4]=O=>l.value=O),"text-lang":a.value,"onUpdate:textLang":P[5]||(P[5]=O=>a.value=O),"auto-play":!1,onUpdatedPage:Ce},null,8,["data-set","base-path","init-page","audio-lang","text-lang"]))])])):ve("",!0)],2),o.value?Tt((R(),Lt(Ga,{key:0,"view-data":o.value,"current-page":i.value,"bundle-id":s.value??"",onClose:P[6]||(P[6]=O=>N.value=!1)},null,8,["view-data","current-page","bundle-id"])),[[go,N.value]]):ve("",!0)]))}});jl(Pu).mount("#app");