taskin 4.1.0 → 4.1.2
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.
|
@@ -0,0 +1,36 @@
|
|
|
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"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/**
|
|
2
|
+
* @vue/shared v3.5.42
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function $a(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Se={},Ms=[],fn=()=>{},yf=()=>!1,Oi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Pi=e=>e.startsWith("onUpdate:"),nt=Object.assign,Ha=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},I1=Object.prototype.hasOwnProperty,pe=(e,t)=>I1.call(e,t),Z=Array.isArray,Yn=e=>$r(e)==="[object Map]",mi=e=>$r(e)==="[object Set]",dc=e=>$r(e)==="[object Date]",Q=e=>typeof e=="function",Pe=e=>typeof e=="string",Ot=e=>typeof e=="symbol",ye=e=>e!==null&&typeof e=="object",_f=e=>(ye(e)||Q(e))&&Q(e.then)&&Q(e.catch),bf=Object.prototype.toString,$r=e=>bf.call(e),C1=e=>$r(e).slice(8,-1),wf=e=>$r(e)==="[object Object]",Li=e=>Pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wr=$a(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ri=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},M1=/-\w/g,ft=Ri(e=>e.replace(M1,t=>t.slice(1).toUpperCase())),D1=/\B([A-Z])/g,bs=Ri(e=>e.replace(D1,"-$1").toLowerCase()),Fi=Ri(e=>e.charAt(0).toUpperCase()+e.slice(1)),So=Ri(e=>e?`on${Fi(e)}`:""),un=(e,t)=>!Object.is(e,t),To=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},kf=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},O1=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let hc;const Ni=()=>hc||(hc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function dn(e){if(Z(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Pe(s)?F1(s):dn(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(Pe(e)||ye(e))return e}const P1=/;(?![^(]*\))/g,L1=/:([^]+)/,R1=/\/\*[^]*?\*\//g;function F1(e){const t={};return e.replace(R1,"").split(P1).forEach(n=>{if(n){const s=n.split(L1);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function be(e){let t="";if(Pe(e))t=e;else if(Z(e))for(let n=0;n<e.length;n++){const s=be(e[n]);s&&(t+=s+" ")}else if(ye(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function pc(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Pe(t)&&(e.class=be(t)),n&&(e.style=dn(n)),e}const N1="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",U1=$a(N1);function Ef(e){return!!e||e===""}function B1(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Ui(e[s],t[s]);return n}function gc(e,t){if(e.size!==t.size)return!1;const n=Array.from(t),s=new Uint8Array(n.length);for(const r of e){let i=-1;for(let o=0;o<n.length;o++)if(!s[o]&&Ui(r,n[o])){i=o;break}if(i<0)return!1;s[i]=1}return!0}function Ui(e,t){if(e===t)return!0;let n=dc(e),s=dc(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Ot(e),s=Ot(t),n||s)return e===t;if(n=Z(e),s=Z(t),n||s)return n&&s?B1(e,t):!1;if(n=ye(e),s=ye(t),n||s){if(!n||!s)return!1;if(n=Yn(e),s=Yn(t),n||s||(n=mi(e),s=mi(t),n||s))return n&&s?gc(e,t):!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!Ui(e[o],t[o]))return!1}}return String(e)===String(t)}const Af=e=>!!(e&&e.__v_isRef===!0),W=e=>Pe(e)?e:e==null?"":Z(e)||ye(e)&&(e.toString===bf||!Q(e.toString))?Af(e)?W(e.value):JSON.stringify(e,Sf,2):String(e),Sf=(e,t)=>Af(t)?Sf(e,t.value):Yn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[xo(s,i)+" =>"]=r,n),{})}:mi(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>xo(n))}:Ot(t)?xo(t):ye(t)&&!Z(t)&&!wf(t)?String(t):t,xo=(e,t="")=>{var n;return Ot(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.42
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let Xe;class Tf{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Xe&&(Xe.active?(this.parent=Xe,this.index=(Xe.scopes||(Xe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Xe;try{return Xe=this,t()}finally{Xe=n}}}on(){++this._on===1&&(this.prevScope=Xe,Xe=this)}off(){if(this._on>0&&--this._on===0){if(Xe===this)Xe=this.prevScope;else{let t=Xe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(n=0,s=r.length;n<s;n++)r[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function xf(e){return new Tf(e)}function If(){return Xe}function G1(e,t=!1){Xe&&Xe.cleanups.push(e)}let Ae;const Io=new WeakSet;class Cf{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,Xe&&(Xe.active?Xe.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Io.has(this)&&(Io.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Df(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,mc(this),Of(this);const t=Ae,n=Kt;Ae=this,Kt=!0;try{return this.fn()}finally{Pf(this),Ae=t,Kt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ka(t);this.deps=this.depsTail=void 0,mc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Io.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ra(this)&&this.run()}get dirty(){return ra(this)}}let Mf=0,kr,Er;function Df(e,t=!1){if(e.flags|=8,t){e.next=Er,Er=e;return}e.next=kr,kr=e}function za(){Mf++}function Wa(){if(--Mf>0)return;if(Er){let t=Er;for(Er=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;kr;){let t=kr;for(kr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Of(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Pf(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Ka(s),j1(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function ra(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Lf(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Lf(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Dr)||(e.globalVersion=Dr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ra(e))))return;e.flags|=2;const t=e.dep,n=Ae,s=Kt;Ae=e,Kt=!0;try{Of(e);const r=e.fn(e._value);(t.version===0||un(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ae=n,Kt=s,Pf(e),e.flags&=-3}}function Ka(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ka(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function j1(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Kt=!0;const Rf=[];function Dn(){Rf.push(Kt),Kt=!1}function On(){const e=Rf.pop();Kt=e===void 0?!0:e}function mc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let Dr=0;class V1{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ya{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(!Ae||!Kt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink=new V1(Ae,this),Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,Ff(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=s)}return n}trigger(t){this.version++,Dr++,this.notify(t)}notify(t){za();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Wa()}}}function Ff(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ff(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const vi=new WeakMap,ps=Symbol(""),ia=Symbol(""),Or=Symbol("");function it(e,t,n){if(Kt&&Ae){let s=vi.get(e);s||vi.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Ya),r.map=s,r.key=n),r.track()}}function En(e,t,n,s,r,i){const o=vi.get(e);if(!o){Dr++;return}const a=l=>{l&&l.trigger()};if(za(),t==="clear")o.forEach(a);else{const l=Z(e),c=l&&Li(n);if(l&&n==="length"){const u=Number(s);o.forEach((h,w)=>{(w==="length"||w===Or||!Ot(w)&&w>=u)&&a(h)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(Or)),t){case"add":l?c&&a(o.get("length")):(a(o.get(ps)),Yn(e)&&a(o.get(ia)));break;case"delete":l||(a(o.get(ps)),Yn(e)&&a(o.get(ia)));break;case"set":Yn(e)&&a(o.get(ps));break}}Wa()}function $1(e,t){const n=vi.get(e);return n&&n.get(t)}function As(e){const t=de(e);return t===e?t:(it(t,"iterate",Or),Ct(e)?t:t.map(Yt))}function Bi(e){return it(e=de(e),"iterate",Or),e}function an(e,t){return Pn(e)?Us(Tn(e)?Yt(t):t):Yt(t)}const H1={__proto__:null,[Symbol.iterator](){return Co(this,Symbol.iterator,e=>an(this,e))},concat(...e){return As(this).concat(...e.map(t=>Z(t)?As(t):t))},entries(){return Co(this,"entries",e=>(e[1]=an(this,e[1]),e))},every(e,t){return _n(this,"every",e,t,void 0,arguments)},filter(e,t){return _n(this,"filter",e,t,n=>n.map(s=>an(this,s)),arguments)},find(e,t){return _n(this,"find",e,t,n=>an(this,n),arguments)},findIndex(e,t){return _n(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return _n(this,"findLast",e,t,n=>an(this,n),arguments)},findLastIndex(e,t){return _n(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return _n(this,"forEach",e,t,void 0,arguments)},includes(...e){return Mo(this,"includes",e)},indexOf(...e){return Mo(this,"indexOf",e)},join(e){return As(this).join(e)},lastIndexOf(...e){return Mo(this,"lastIndexOf",e)},map(e,t){return _n(this,"map",e,t,void 0,arguments)},pop(){return ur(this,"pop")},push(...e){return ur(this,"push",e)},reduce(e,...t){return vc(this,"reduce",e,t)},reduceRight(e,...t){return vc(this,"reduceRight",e,t)},shift(){return ur(this,"shift")},some(e,t){return _n(this,"some",e,t,void 0,arguments)},splice(...e){return ur(this,"splice",e)},toReversed(){return As(this).toReversed()},toSorted(e){return As(this).toSorted(e)},toSpliced(...e){return As(this).toSpliced(...e)},unshift(...e){return ur(this,"unshift",e)},values(){return Co(this,"values",e=>an(this,e))}};function Co(e,t,n){const s=Bi(e),r=s[t]();return s!==e&&!Ct(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const z1=Array.prototype;function _n(e,t,n,s,r,i){const o=Bi(e),a=o!==e&&!Ct(e),l=o[t];if(l!==z1[t]){const h=l.apply(e,i);return a?Yt(h):h}let c=n;o!==e&&(a?c=function(h,w){return n.call(this,an(e,h),w,e)}:n.length>2&&(c=function(h,w){return n.call(this,h,w,e)}));const u=l.call(o,c,s);return a&&r?r(u):u}function vc(e,t,n,s){const r=Bi(e),i=r!==e&&!Ct(e);let o=n,a=!1;r!==e&&(i?(a=s.length===0,o=function(c,u,h){return a&&(a=!1,c=an(e,c)),n.call(this,c,an(e,u),h,e)}):n.length>3&&(o=function(c,u,h){return n.call(this,c,u,h,e)}));const l=r[t](o,...s);return a?an(e,l):l}function Mo(e,t,n){const s=de(e);it(s,"iterate",Or);const r=s[t](...n);return(r===-1||r===!1)&&ji(n[0])?(n[0]=de(n[0]),s[t](...n)):r}function ur(e,t,n=[]){Dn(),za();const s=de(e)[t].apply(e,n);return Wa(),On(),s}const W1=$a("__proto__,__v_isRef,__isVue"),Nf=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ot));function K1(e){Ot(e)||(e=String(e));const t=de(this);return it(t,"has",e),t.hasOwnProperty(e)}class Uf{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?sp:Vf:i?jf:Gf).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=Z(t);if(!r){let l;if(o&&(l=H1[n]))return l;if(n==="hasOwnProperty")return K1}const a=Reflect.get(t,n,Fe(t)?t:s);if((Ot(n)?Nf.has(n):W1(n))||(r||it(t,"get",n),i))return a;if(Fe(a)){const l=o&&Li(n)?a:a.value;return r&&ye(l)?aa(l):l}return ye(a)?r?aa(a):Gi(a):a}}class Bf extends Uf{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=Z(t)&&Li(n);if(!this._isShallow){const c=Pn(i);if(!Ct(s)&&!Pn(s)&&(i=de(i),s=de(s)),!o&&Fe(i)&&!Fe(s))return c||(i.value=s),!0}const a=o?Number(n)<t.length:pe(t,n),l=Reflect.set(t,n,s,Fe(t)?t:r);return t===de(r)&&l&&(a?un(s,i)&&En(t,"set",n,s):En(t,"add",n,s)),l}deleteProperty(t,n){const s=pe(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&En(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Ot(n)||!Nf.has(n))&&it(t,"has",n),s}ownKeys(t){return it(t,"iterate",Z(t)?"length":ps),Reflect.ownKeys(t)}}class Y1 extends Uf{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const q1=new Bf,X1=new Y1,J1=new Bf(!0);const oa=e=>e,qr=e=>Reflect.getPrototypeOf(e);function Z1(e,t,n){return function(...s){const r=this.__v_raw,i=de(r),o=Yn(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=r[e](...s),u=n?oa:t?Us:Yt;return!t&&it(i,"iterate",l?ia:ps),nt(Object.create(c),{next(){const{value:h,done:w}=c.next();return w?{value:h,done:w}:{value:a?[u(h[0]),u(h[1])]:u(h),done:w}}})}}function Xr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Q1(e,t){const n={get(r){const i=this.__v_raw,o=de(i),a=de(r);e||(un(r,a)&&it(o,"get",r),it(o,"get",a));const{has:l}=qr(o),c=t?oa:e?Us:Yt;if(l.call(o,r))return c(i.get(r));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&it(de(r),"iterate",ps),r.size},has(r){const i=this.__v_raw,o=de(i),a=de(r);return e||(un(r,a)&&it(o,"has",r),it(o,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const o=this,a=o.__v_raw,l=de(a),c=t?oa:e?Us:Yt;return!e&&it(l,"iterate",ps),a.forEach((u,h)=>r.call(i,c(u),c(h),o))}};return nt(n,e?{add:Xr("add"),set:Xr("set"),delete:Xr("delete"),clear:Xr("clear")}:{add(r){const i=de(this),o=qr(i),a=de(r),l=!t&&!Ct(r)&&!Pn(r)?a:r;return o.has.call(i,l)||un(r,l)&&o.has.call(i,r)||un(a,l)&&o.has.call(i,a)||(i.add(l),En(i,"add",l,l)),this},set(r,i){!t&&!Ct(i)&&!Pn(i)&&(i=de(i));const o=de(this),{has:a,get:l}=qr(o);let c=a.call(o,r);c||(r=de(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,i),c?un(i,u)&&En(o,"set",r,i):En(o,"add",r,i),this},delete(r){const i=de(this),{has:o,get:a}=qr(i);let l=o.call(i,r);l||(r=de(r),l=o.call(i,r)),a&&a.call(i,r);const c=i.delete(r);return l&&En(i,"delete",r,void 0),c},clear(){const r=de(this),i=r.size!==0,o=r.clear();return i&&En(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Z1(r,e,t)}),n}function qa(e,t){const n=Q1(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(pe(n,r)&&r in s?n:s,r,i)}const ep={get:qa(!1,!1)},tp={get:qa(!1,!0)},np={get:qa(!0,!1)};const Gf=new WeakMap,jf=new WeakMap,Vf=new WeakMap,sp=new WeakMap;function rp(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Gi(e){return Pn(e)?e:Xa(e,!1,q1,ep,Gf)}function ip(e){return Xa(e,!1,J1,tp,jf)}function aa(e){return Xa(e,!0,X1,np,Vf)}function Xa(e,t,n,s,r){if(!ye(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=rp(C1(e));if(o===0)return e;const a=new Proxy(e,o===2?s:n);return r.set(e,a),a}function Tn(e){return Pn(e)?Tn(e.__v_raw):!!(e&&e.__v_isReactive)}function Pn(e){return!!(e&&e.__v_isReadonly)}function Ct(e){return!!(e&&e.__v_isShallow)}function ji(e){return e?!!e.__v_raw:!1}function de(e){const t=e&&e.__v_raw;return t?de(t):e}function Ja(e){return!pe(e,"__v_skip")&&Object.isExtensible(e)&&kf(e,"__v_skip",!0),e}const Yt=e=>ye(e)?Gi(e):e,Us=e=>ye(e)?aa(e):e;function Fe(e){return e?e.__v_isRef===!0:!1}function ve(e){return $f(e,!1)}function Do(e){return $f(e,!0)}function $f(e,t){return Fe(e)?e:new op(e,t)}class op{constructor(t,n){this.dep=new Ya,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:de(t),this._value=n?t:Yt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ct(t)||Pn(t);t=s?t:de(t),un(t,n)&&(this._rawValue=t,this._value=s?t:Yt(t),this.dep.trigger())}}function O(e){return Fe(e)?e.value:e}const ap={get:(e,t,n)=>t==="__v_raw"?e:O(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Fe(r)&&!Fe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Hf(e){return Tn(e)?e:new Proxy(e,ap)}function lp(e){const t=Z(e)?new Array(e.length):{};for(const n in e)t[n]=Wf(e,n);return t}class cp{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Ot(n)?n:String(n),this._raw=de(t);let r=!0,i=t;if(!Z(t)||Ot(this._key)||!Li(this._key))do r=!ji(i)||Ct(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=O(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Fe(this._raw[this._key])){const n=this._object[this._key];if(Fe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return $1(this._raw,this._key)}}class up{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function zf(e,t,n){return Fe(e)?e:Q(e)?new up(e):ye(e)&&arguments.length>1?Wf(e,t,n):ve(e)}function Wf(e,t,n){return new cp(e,t,n)}class fp{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ya(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Dr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ae!==this)return Df(this,!0),!0}get value(){const t=this.dep.track();return Lf(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function dp(e,t,n=!1){let s,r;return Q(e)?s=e:(s=e.get,r=e.set),new fp(s,r,n)}const Jr={},yi=new WeakMap;let cs;function hp(e,t=!1,n=cs){if(n){let s=yi.get(n);s||yi.set(n,s=[]),s.push(e)}}function pp(e,t,n=Se){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:a,call:l}=n,c=L=>r?L:Ct(L)||r===!1||r===0?zn(L,1):zn(L);let u,h,w,I,M=!1,D=!1;if(Fe(e)?(h=()=>e.value,M=Ct(e)):Tn(e)?(h=()=>c(e),M=!0):Z(e)?(D=!0,M=e.some(L=>Tn(L)||Ct(L)),h=()=>e.map(L=>{if(Fe(L))return L.value;if(Tn(L))return c(L);if(Q(L))return l?l(L,2):L()})):Q(e)?t?h=l?()=>l(e,2):e:h=()=>{if(w){Dn();try{w()}finally{On()}}const L=cs;cs=u;try{return l?l(e,3,[I]):e(I)}finally{cs=L}}:h=fn,t&&r){const L=h,se=r===!0?1/0:r;h=()=>zn(L(),se)}const _=If(),v=()=>{u.stop(),_&&_.active&&Ha(_.effects,u)};if(i&&t){const L=t;t=(...se)=>{const Y=L(...se);return v(),Y}}let k=D?new Array(e.length).fill(Jr):Jr;const N=L=>{if(!(!(u.flags&1)||!u.dirty&&!L))if(t){const se=u.run();if(L||r||M||(D?se.some((Y,R)=>un(Y,k[R])):un(se,k))){w&&w();const Y=cs;cs=u;try{const R=[se,k===Jr?void 0:D&&k[0]===Jr?[]:k,I];k=se,l?l(t,3,R):t(...R)}finally{cs=Y}}}else u.run()};return a&&a(N),u=new Cf(h),u.scheduler=o?()=>o(N,!1):N,I=L=>hp(L,!1,u),w=u.onStop=()=>{const L=yi.get(u);if(L){if(l)l(L,4);else for(const se of L)se();yi.delete(u)}},t?s?N(!0):k=u.run():o?o(N.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function zn(e,t=1/0,n){if(t<=0||!ye(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Fe(e))zn(e.value,t,n);else if(Z(e))for(let s=0;s<e.length;s++)zn(e[s],t,n);else if(mi(e)||Yn(e))e.forEach(s=>{zn(s,t,n)});else if(wf(e)){for(const s in e)zn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&zn(e[s],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.42
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Hr(e,t,n,s){try{return s?e(...s):e()}catch(r){Vi(r,t,n)}}function qt(e,t,n,s){if(Q(e)){const r=Hr(e,t,n,s);return r&&_f(r)&&r.catch(i=>{Vi(i,t,n)}),r}if(Z(e)){const r=[];for(let i=0;i<e.length;i++)r.push(qt(e[i],t,n,s));return r}}function Vi(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Se;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,l,c)===!1)return}a=a.parent}if(i){Dn(),Hr(i,null,10,[e,l,c]),On();return}}gp(e,n,r,s,o)}function gp(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const ct=[];let on=-1;const Ds=[];let Hn=null,Is=0;const Kf=Promise.resolve();let _i=null;function Yf(e){const t=_i||Kf;return e?t.then(this?e.bind(this):e):t}function mp(e){let t=on+1,n=ct.length;for(;t<n;){const s=t+n>>>1,r=ct[s],i=Pr(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function Za(e){if(!(e.flags&1)){const t=Pr(e),n=ct[ct.length-1];!n||!(e.flags&2)&&t>=Pr(n)?ct.push(e):ct.splice(mp(t),0,e),e.flags|=1,qf()}}function qf(){_i||(_i=Kf.then(Jf))}function vp(e){if(!Z(e))Hn&&e.id===-1?Hn.splice(Is+1,0,e):e.flags&1||(Ds.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Ds.push(e[t]);qf()}function yc(e,t,n=on+1){for(;n<ct.length;n++){const s=ct[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;ct.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Xf(e){if(Ds.length){const t=[...new Set(Ds)].sort((n,s)=>Pr(n)-Pr(s));if(Ds.length=0,Hn){for(let n=0;n<t.length;n++)Hn.push(t[n]);return}for(Hn=t,Is=0;Is<Hn.length;Is++){const n=Hn[Is];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Hn=null,Is=0}}const Pr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Jf(e){try{for(on=0;on<ct.length;on++){const t=ct[on];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Hr(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;on<ct.length;on++){const t=ct[on];t&&(t.flags&=-2)}on=-1,ct.length=0,Xf(),_i=null,(ct.length||Ds.length)&&Jf()}}let ut=null,Zf=null;function bi(e){const t=ut;return ut=e,Zf=e&&e.type.__scopeId||null,t}function Ar(e,t=ut,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Oc(-1);const i=bi(t),o=xn.length;let a;try{a=e(...r)}finally{for(let l=xn.length;l>o;l--)il();bi(i),s._d&&Oc(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function os(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const a=r[o];i&&(a.oldValue=i[o].value);let l=a.dir[s];l&&(Dn(),qt(l,n,8,[e.el,a,e,t]),On())}}function Qf(e,t){if(ot){let n=ot.provides;const s=ot.parent&&ot.parent.provides;s===n&&(n=ot.provides=Object.create(s)),n[e]=t}}function Os(e,t,n=!1){const s=Sd();if(s||gs){let r=gs?gs._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Q(t)?t.call(s&&s.proxy):t}}function yp(){return!!(Sd()||gs)}const _p=Symbol.for("v-scx"),bp=()=>Os(_p);function qn(e,t,n){return ed(e,t,n)}function ed(e,t,n=Se){const{immediate:s,deep:r,flush:i,once:o}=n,a=nt({},n),l=t&&s||!t&&i!=="post";let c;if(Fr){if(i==="sync"){const I=bp();c=I.__watcherHandles||(I.__watcherHandles=[])}else if(!l){const I=()=>{};return I.stop=fn,I.resume=fn,I.pause=fn,I}}const u=ot;a.call=(I,M,D)=>qt(I,u,M,D);let h=!1;i==="post"?a.scheduler=I=>{lt(I,u&&u.suspense)}:i!=="sync"&&(h=!0,a.scheduler=(I,M)=>{M?I():Za(I)}),a.augmentJob=I=>{t&&(I.flags|=4),h&&(I.flags|=2,u&&(I.id=u.uid,I.i=u))};const w=pp(e,t,a);return Fr&&(c?c.push(w):l&&w()),w}function wp(e,t,n){const s=this.proxy,r=Pe(e)?e.includes(".")?td(s,e):()=>s[e]:e.bind(s,s);let i;Q(t)?i=t:(i=t.handler,n=t);const o=zr(this),a=ed(r,i.bind(s),n);return o(),a}function td(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const Vn=new WeakMap,nd=Symbol("_vte"),$i=e=>e.__isTeleport,fs=e=>e&&(e.disabled||e.disabled===""),kp=e=>e&&(e.defer||e.defer===""),_c=e=>typeof SVGElement<"u"&&e instanceof SVGElement,bc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,la=(e,t)=>{const n=e&&e.to;return Pe(n)?t?t(n):null:n},Ep={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,a,l,c){const{mc:u,pc:h,pbc:w,o:{insert:I,querySelector:M,createText:D,createComment:_,parentNode:v}}=c,k=fs(t.props);let{dynamicChildren:N}=t;const L=(R,F,B)=>{R.shapeFlag&16&&u(R.children,F,B,r,i,o,a,l)},se=(R=t)=>{const F=fs(R.props),B=R.target=la(R.props,M),J=ca(B,R,D,I);B&&(o!=="svg"&&_c(B)?o="svg":o!=="mathml"&&bc(B)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(B),F||(L(R,B,J),mr(R,!1)))},Y=R=>{const F=()=>{if(Vn.get(R)===F){if(Vn.delete(R),fs(R.props)){const B=v(R.el)||n;L(R,B,R.anchor),mr(R,!0)}se(R)}};Vn.set(R,F),lt(F,i)};if(e==null){const R=t.el=D(""),F=t.anchor=D("");if(I(R,n,s),I(F,n,s),kp(t.props)||i&&i.pendingBranch){Y(t);return}k&&(L(t,n,F),mr(t,!0)),se()}else{t.el=e.el;const R=t.anchor=e.anchor,F=Vn.get(e);if(F){F.flags|=8,Vn.delete(e),Y(t);return}t.targetStart=e.targetStart;const B=t.target=e.target,J=t.targetAnchor=e.targetAnchor,Ie=fs(e.props),Ye=Ie?n:B,st=Ie?R:J;if(o==="svg"||_c(B)?o="svg":(o==="mathml"||bc(B))&&(o="mathml"),N?(w(e.dynamicChildren,N,Ye,r,i,o,a),rl(e,t,!0)):l||h(e,t,Ye,st,r,i,o,a,!1),k)Ie?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zr(t,n,R,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const qe=la(t.props,M);qe&&(t.target=qe,Zr(t,qe,null,c,0))}else Ie&&Zr(t,B,J,c,1);mr(t,k)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:h,props:w}=e,I=fs(w),M=i||!I,D=Vn.get(e);if(D&&(D.flags|=8,Vn.delete(e)),h&&(r(c),r(u)),i&&r(l),!D&&(I||h)&&o&16)for(let _=0;_<a.length;_++){const v=a[_];s(v,t,n,M,!!v.dynamicChildren)}},move:Zr,hydrate:Ap};function Zr(e,t,n,{o:{insert:s},m:r},i=2){i===0&&s(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:c,props:u}=e,h=i===2;if(h&&s(o,t,n),!Vn.has(e)&&(!h||fs(u))&&l&16)for(let w=0;w<c.length;w++)r(c[w],t,n,2);h&&s(a,t,n)}function Ap(e,t,n,s,r,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},h){function w(_,v){let k=v;for(;k;){if(k&&k.nodeType===8){if(k.data==="teleport start anchor")t.targetStart=k;else if(k.data==="teleport anchor"){t.targetAnchor=k,_._lpa=t.targetAnchor&&o(t.targetAnchor);break}}k=o(k)}}function I(_,v){v.anchor=h(o(_),v,a(_),n,s,r,i)}const M=t.target=la(t.props,l),D=fs(t.props);if(M){const _=M._lpa||M.firstChild;t.shapeFlag&16&&(D?(I(e,t),w(M,_),t.targetAnchor||ca(M,t,u,c,a(e)===M?e:null)):(t.anchor=o(e),w(M,_),t.targetAnchor||ca(M,t,u,c),h(_&&o(_),t,M,n,s,r,i))),mr(t,D)}else D&&t.shapeFlag&16&&(I(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}const Sp=Ep;function mr(e,t){const n=e.ctx;if(n&&n.ut){let s,r;for(t?(s=e.el,r=e.anchor):(s=e.targetStart,r=e.targetAnchor);s&&s!==r;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function ca(e,t,n,s,r=null){const i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[nd]=o,e&&(s(i,e,r),s(o,e,r)),o}const Oo=Symbol("_leaveCb");function Tp(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==hn){t=n;break}}return t}function sd(e){if(!el(e))return $i(e.type)&&e.children?Tp(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Q(n.default))return n.default()}}function Qa(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Qa($i(n.type)&&sd(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ve(e,t){return Q(e)?nt({name:e.name},t,{setup:e}):e}function rd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function wc(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const wi=new WeakMap;function Sr(e,t,n,s,r=!1){if(Z(e)){e.forEach((D,_)=>Sr(D,t&&(Z(t)?t[_]:t),n,s,r));return}if(Ps(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Sr(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?al(s.component):s.el,o=r?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===Se?a.refs={}:a.refs,h=a.setupState,w=de(h),I=h===Se?yf:D=>wc(u,D)?!1:pe(w,D),M=(D,_)=>!(_&&wc(u,_));if(c!=null&&c!==l){if(kc(t),Pe(c))u[c]=null,I(c)&&(h[c]=null);else if(Fe(c)){const D=t;M(c,D.k)&&(c.value=null),D.k&&(u[D.k]=null)}}if(Q(l))Hr(l,a,12,[o,u]);else{const D=Pe(l),_=Fe(l);if(D||_){const v=()=>{if(e.f){const k=D?I(l)?h[l]:u[l]:M()||!e.k?l.value:u[e.k];if(r)Z(k)&&Ha(k,i);else if(Z(k))k.includes(i)||k.push(i);else if(D)u[l]=[i],I(l)&&(h[l]=u[l]);else{const N=[i];M(l,e.k)&&(l.value=N),e.k&&(u[e.k]=N)}}else D?(u[l]=o,I(l)&&(h[l]=o)):_&&(M(l,e.k)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const k=()=>{v(),wi.delete(e)};k.id=-1,wi.set(e,k),lt(k,n)}else kc(e),v()}}}function kc(e){const t=wi.get(e);t&&(t.flags|=8,wi.delete(e))}Ni().requestIdleCallback;Ni().cancelIdleCallback;const Ps=e=>!!e.type.__asyncLoader,el=e=>e.type.__isKeepAlive;function xp(e,t){id(e,"a",t)}function Ip(e,t){id(e,"da",t)}function id(e,t,n=ot){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Hi(t,s,n),n){let r=n.parent;for(;r&&r.parent;)el(r.parent.vnode)&&Cp(s,t,n,r),r=r.parent}}function Cp(e,t,n,s){const r=Hi(t,e,s,!0);Js(()=>{Ha(s[t],r)},n)}function Hi(e,t,n=ot,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Dn();const a=zr(n),l=qt(t,n,e,o);return a(),On(),l});return s?r.unshift(i):r.push(i),i}}const Fn=e=>(t,n=ot)=>{(!Fr||e==="sp")&&Hi(e,(...s)=>t(...s),n)},Mp=Fn("bm"),tl=Fn("m"),Dp=Fn("bu"),Op=Fn("u"),Pp=Fn("bum"),Js=Fn("um"),Lp=Fn("sp"),Rp=Fn("rtg"),Fp=Fn("rtc");function Np(e,t=ot){Hi("ec",e,t)}const Up="components";function Bp(e,t){return jp(Up,e,!0,t)||e}const Gp=Symbol.for("v-ndc");function jp(e,t,n=!0,s=!1){const r=ut||ot;if(r){const i=r.type;{const a=E2(i,!1);if(a&&(a===t||a===ft(t)||a===Fi(ft(t))))return i}const o=Ec(r[e]||i[e],t)||Ec(r.appContext[e],t);return!o&&s?i:o}}function Ec(e,t){return e&&(e[t]||e[ft(t)]||e[Fi(ft(t))])}function Mt(e,t,n,s){let r;const i=n,o=Z(e);if(o||Pe(e)){const a=o&&Tn(e);let l=!1,c=!1;a&&(l=!Ct(e),c=Pn(e),e=Bi(e)),r=new Array(e.length);for(let u=0,h=e.length;u<h;u++)r[u]=t(l?c?Us(Yt(e[u])):Yt(e[u]):e[u],u,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let a=0;a<e;a++)r[a]=t(a+1,a,void 0,i)}else if(ye(e))if(e[Symbol.iterator])r=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];r[l]=t(e[u],u,l,i)}}else r=[];return r}function Ls(e,t,n,s,r,i){if(n==null&&(n={}),ut.ce||ut.parent&&Ps(ut.parent)&&ut.parent.ce){const c=n,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),x(),tt(_e,null,[je("slot",c,s&&s())],u?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);const a=xn.length;x();let l;try{const c=o&&od(o(n)),u=n.key||i||c&&c.key;l=tt(_e,{key:(u&&!Ot(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=xn.length;u>a;u--)il();throw c}finally{o&&o._c&&(o._d=!0)}return l}function od(e){return e.some(t=>ol(t)?!(t.type===hn||t.type===_e&&!od(t.children)):!0)?e:null}const ua=e=>e?Td(e)?al(e):ua(e.parent):null,Tr=nt(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=>ua(e.parent),$root:e=>ua(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ld(e),$forceUpdate:e=>e.f||(e.f=()=>{Za(e.update)}),$nextTick:e=>e.n||(e.n=Yf.bind(e.proxy)),$watch:e=>wp.bind(e)}),Po=(e,t)=>e!==Se&&!e.__isScriptSetup&&pe(e,t),Vp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const w=o[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Po(s,t))return o[t]=1,s[t];if(r!==Se&&pe(r,t))return o[t]=2,r[t];if(pe(i,t))return o[t]=3,i[t];if(n!==Se&&pe(n,t))return o[t]=4,n[t];fa&&(o[t]=0)}}const c=Tr[t];let u,h;if(c)return t==="$attrs"&&it(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Se&&pe(n,t))return o[t]=4,n[t];if(h=l.config.globalProperties,pe(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Po(r,t)?(r[t]=n,!0):s!==Se&&pe(s,t)?(s[t]=n,!0):pe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},a){let l;return!!(n[a]||e!==Se&&a[0]!=="$"&&pe(e,a)||Po(t,a)||pe(i,a)||pe(s,a)||pe(Tr,a)||pe(r.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ac(e){return Z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let fa=!0;function $p(e){const t=ld(e),n=e.proxy,s=e.ctx;fa=!1,t.beforeCreate&&Sc(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:w,beforeUpdate:I,updated:M,activated:D,deactivated:_,beforeDestroy:v,beforeUnmount:k,destroyed:N,unmounted:L,render:se,renderTracked:Y,renderTriggered:R,errorCaptured:F,serverPrefetch:B,expose:J,inheritAttrs:Ie,components:Ye,directives:st,filters:qe}=t;if(c&&Hp(c,s,null),o)for(const te in o){const X=o[te];Q(X)&&(s[te]=X.bind(n))}if(r){const te=r.call(n,n);ye(te)&&(e.data=Gi(te))}if(fa=!0,i)for(const te in i){const X=i[te],kt=Q(X)?X.bind(n,n):Q(X.get)?X.get.bind(n,n):fn,vn=!Q(X)&&Q(X.set)?X.set.bind(n):fn,Et=oe({get:kt,set:vn});Object.defineProperty(s,te,{enumerable:!0,configurable:!0,get:()=>Et.value,set:gt=>Et.value=gt})}if(a)for(const te in a)ad(a[te],s,n,te);if(l){const te=Q(l)?l.call(n):l;Reflect.ownKeys(te).forEach(X=>{Qf(X,te[X])})}u&&Sc(u,e,"c");function we(te,X){Z(X)?X.forEach(kt=>te(kt.bind(n))):X&&te(X.bind(n))}if(we(Mp,h),we(tl,w),we(Dp,I),we(Op,M),we(xp,D),we(Ip,_),we(Np,F),we(Fp,Y),we(Rp,R),we(Pp,k),we(Js,L),we(Lp,B),Z(J))if(J.length){const te=e.exposed||(e.exposed={});J.forEach(X=>{Object.defineProperty(te,X,{get:()=>n[X],set:kt=>n[X]=kt,enumerable:!0})})}else e.exposed||(e.exposed={});se&&e.render===fn&&(e.render=se),Ie!=null&&(e.inheritAttrs=Ie),Ye&&(e.components=Ye),st&&(e.directives=st),B&&rd(e)}function Hp(e,t,n=fn){Z(e)&&(e=da(e));for(const s in e){const r=e[s];let i;ye(r)?"default"in r?i=Os(r.from||s,r.default,!0):i=Os(r.from||s):i=Os(r),Fe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Sc(e,t,n){qt(Z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ad(e,t,n,s){let r=s.includes(".")?td(n,s):()=>n[s];if(Pe(e)){const i=t[e];Q(i)&&qn(r,i)}else if(Q(e))qn(r,e.bind(n));else if(ye(e))if(Z(e))e.forEach(i=>ad(i,t,n,s));else{const i=Q(e.handler)?e.handler.bind(n):t[e.handler];Q(i)&&qn(r,i,e)}}function ld(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!r.length&&!n&&!s?l=t:(l={},r.length&&r.forEach(c=>ki(l,c,o,!0)),ki(l,t,o)),ye(t)&&i.set(t,l),l}function ki(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&ki(e,i,n,!0),r&&r.forEach(o=>ki(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const a=zp[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const zp={data:Tc,props:xc,emits:xc,methods:vr,computed:vr,beforeCreate:at,created:at,beforeMount:at,mounted:at,beforeUpdate:at,updated:at,beforeDestroy:at,beforeUnmount:at,destroyed:at,unmounted:at,activated:at,deactivated:at,errorCaptured:at,serverPrefetch:at,components:vr,directives:vr,watch:Kp,provide:Tc,inject:Wp};function Tc(e,t){return t?e?function(){return nt(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Wp(e,t){return vr(da(e),da(t))}function da(e){if(Z(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function at(e,t){return e?[...new Set([].concat(e,t))]:t}function vr(e,t){return e?nt(Object.create(null),e,t):t}function xc(e,t){return e?Z(e)&&Z(t)?[...new Set([...e,...t])]:nt(Object.create(null),Ac(e),Ac(t??{})):t}function Kp(e,t){if(!e)return t;if(!t)return e;const n=nt(Object.create(null),e);for(const s in t)n[s]=at(e[s],t[s]);return n}function cd(){return{app:null,config:{isNativeTag:yf,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 Yp=0;function qp(e,t){return function(s,r=null){Q(s)||(s=nt({},s)),r!=null&&!ye(r)&&(r=null);const i=cd(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:Yp++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:S2,get config(){return i.config},set config(u){},use(u,...h){return o.has(u)||(u&&Q(u.install)?(o.add(u),u.install(c,...h)):Q(u)&&(o.add(u),u(c,...h))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,h){return h?(i.components[u]=h,c):i.components[u]},directive(u,h){return h?(i.directives[u]=h,c):i.directives[u]},mount(u,h,w){if(!l){const I=c._ceVNode||je(s,r);return I.appContext=i,w===!0?w="svg":w===!1&&(w=void 0),e(I,u,w),l=!0,c._container=u,u.__vue_app__=c,al(I.component)}},onUnmount(u){a.push(u)},unmount(){l&&(qt(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,h){return i.provides[u]=h,c},runWithContext(u){const h=gs;gs=c;try{return u()}finally{gs=h}}};return c}}let gs=null;const Xp=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ft(t)}Modifiers`]||e[`${bs(t)}Modifiers`];function Jp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Se;let r=n;const i=t.startsWith("update:"),o=i&&Xp(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>Pe(u)?u.trim():u)),o.number&&(r=r.map(O1)));let a,l=s[a=So(t)]||s[a=So(ft(t))];!l&&i&&(l=s[a=So(bs(t))]),l&&qt(l,e,6,r);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,qt(c,e,6,r)}}const Zp=new WeakMap;function ud(e,t,n=!1){const s=n?Zp:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},a=!1;if(!Q(e)){const l=c=>{const u=ud(c,t,!0);u&&(a=!0,nt(o,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(ye(e)&&s.set(e,null),null):(Z(i)?i.forEach(l=>o[l]=null):nt(o,i),ye(e)&&s.set(e,o),o)}function zi(e,t){return!e||!Oi(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),pe(e,t[0].toLowerCase()+t.slice(1))||pe(e,bs(t))||pe(e,t))}function Ic(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:h,data:w,setupState:I,ctx:M,inheritAttrs:D}=e,_=bi(e);let v,k;try{if(n.shapeFlag&4){const L=r||s,se=L;v=ln(c.call(se,L,u,h,I,w,M)),k=a}else{const L=t;v=ln(L.length>1?L(h,{attrs:a,slots:o,emit:l}):L(h,null)),k=t.props?a:Qp(a)}}catch(L){xn.length=0,Vi(L,e,1),v=je(hn)}let N=v;if(k&&D!==!1){const L=Object.keys(k),{shapeFlag:se}=N;L.length&&se&7&&(i&&L.some(Pi)&&(k=e2(k,i)),N=Bs(N,k,!1,!0))}if(n.dirs&&(N=Bs(N,null,!1,!0),N.dirs=N.dirs?N.dirs.concat(n.dirs):n.dirs),n.transition){const L=$i(N.type)&&sd(N)||N;Qa(L,n.transition)}return v=N,bi(_),v}const Qp=e=>{let t;for(const n in e)(n==="class"||n==="style"||Oi(n))&&((t||(t={}))[n]=e[n]);return t},e2=(e,t)=>{const n={};for(const s in e)(!Pi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function t2(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?Cc(s,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const w=u[h];if(fd(o,s,w)&&!zi(c,w))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:s===o?!1:s?o?Cc(s,o,c):!0:!!o;return!1}function Cc(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(fd(t,e,i)&&!zi(n,i))return!0}return!1}function fd(e,t,n){const s=e[n],r=t[n];return n==="style"&&ye(s)&&ye(r)?!Ui(s,r):s!==r}function n2({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const dd={},hd=()=>Object.create(dd),pd=e=>Object.getPrototypeOf(e)===dd;function s2(e,t,n,s=!1){const r={},i=hd();e.propsDefaults=Object.create(null),gd(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:ip(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function r2(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=de(r),[l]=e.propsOptions;let c=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let w=u[h];if(zi(e.emitsOptions,w))continue;const I=t[w];if(l)if(pe(i,w))I!==i[w]&&(i[w]=I,c=!0);else{const M=ft(w);r[M]=ha(l,a,M,I,e,!1)}else I!==i[w]&&(i[w]=I,c=!0)}}}else{gd(e,t,r,i)&&(c=!0);let u;for(const h in a)(!t||!pe(t,h)&&((u=bs(h))===h||!pe(t,u)))&&(l?n&&(n[h]!==void 0||n[u]!==void 0)&&(r[h]=ha(l,a,h,void 0,e,!0)):delete r[h]);if(i!==a)for(const h in i)(!t||!pe(t,h))&&(delete i[h],c=!0)}c&&En(e.attrs,"set","")}function gd(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(wr(l))continue;const c=t[l];let u;r&&pe(r,u=ft(l))?!i||!i.includes(u)?n[u]=c:(a||(a={}))[u]=c:zi(e.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,o=!0)}if(i){const l=de(n),c=a||Se;for(let u=0;u<i.length;u++){const h=i[u];n[h]=ha(r,l,h,c[h],e,!pe(c,h))}}return o}function ha(e,t,n,s,r,i){const o=e[n];if(o!=null){const a=pe(o,"default");if(a&&s===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Q(l)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=zr(r);s=c[n]=l.call(null,t),u()}}else s=l;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!a?s=!1:o[1]&&(s===""||s===bs(n))&&(s=!0))}return s}const i2=new WeakMap;function md(e,t,n=!1){const s=n?i2:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},a=[];let l=!1;if(!Q(e)){const u=h=>{l=!0;const[w,I]=md(h,t,!0);nt(o,w),I&&a.push(...I)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return ye(e)&&s.set(e,Ms),Ms;if(Z(i))for(let u=0;u<i.length;u++){const h=ft(i[u]);Mc(h)&&(o[h]=Se)}else if(i)for(const u in i){const h=ft(u);if(Mc(h)){const w=i[u],I=o[h]=Z(w)||Q(w)?{type:w}:nt({},w),M=I.type;let D=!1,_=!0;if(Z(M))for(let v=0;v<M.length;++v){const k=M[v],N=Q(k)&&k.name;if(N==="Boolean"){D=!0;break}else N==="String"&&(_=!1)}else D=Q(M)&&M.name==="Boolean";I[0]=D,I[1]=_,(D||pe(I,"default"))&&a.push(h)}}const c=[o,a];return ye(e)&&s.set(e,c),c}function Mc(e){return e[0]!=="$"&&!wr(e)}const nl=e=>e==="_"||e==="_ctx"||e==="$stable",sl=e=>Z(e)?e.map(ln):[ln(e)],o2=(e,t,n)=>{if(t._n)return t;const s=Ar((...r)=>sl(t(...r)),n);return s._c=!1,s},vd=(e,t,n)=>{const s=e._ctx;for(const r in e){if(nl(r))continue;const i=e[r];if(Q(i))t[r]=o2(r,i,s);else if(i!=null){const o=sl(i);t[r]=()=>o}}},yd=(e,t)=>{const n=sl(t);e.slots.default=()=>n},_d=(e,t,n)=>{for(const s in t)(n||!nl(s))&&(e[s]=t[s])},a2=(e,t,n)=>{const s=e.slots=hd();if(e.vnode.shapeFlag&32){const r=t._;r?(_d(s,t,n),n&&kf(s,"_",r,!0)):vd(t,s)}else t&&yd(e,t)},l2=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=Se;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:_d(r,t,n):(i=!t.$stable,vd(t,r)),o=t}else t&&(yd(e,t),o={default:1});if(i)for(const a in r)!nl(a)&&o[a]==null&&delete r[a]},lt=h2;function c2(e){return u2(e)}function u2(e,t){const n=Ni();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:w,setScopeId:I=fn,insertStaticContent:M}=e,D=(d,f,p,y=null,g=null,m=null,E=void 0,S=null,T=!!f.dynamicChildren)=>{if(d===f)return;d&&!fr(d,f)&&(y=Bn(d),gt(d,g,m,!0),d=null),f.patchFlag===-2&&(T=!1,f.dynamicChildren=null);const{type:A,ref:$,shapeFlag:P}=f;switch(A){case Wi:_(d,f,p,y);break;case hn:v(d,f,p,y);break;case Ro:d==null&&k(f,p,y,E);break;case _e:Ye(d,f,p,y,g,m,E,S,T);break;default:P&1?se(d,f,p,y,g,m,E,S,T):P&6?st(d,f,p,y,g,m,E,S,T):(P&64||P&128)&&A.process(d,f,p,y,g,m,E,S,T,ae)}$!=null&&g?Sr($,d&&d.ref,m,f||d,!f):$==null&&d&&d.ref!=null&&Sr(d.ref,null,m,d,!0)},_=(d,f,p,y)=>{if(d==null)s(f.el=a(f.children),p,y);else{const g=f.el=d.el;f.children!==d.children&&c(g,f.children)}},v=(d,f,p,y)=>{d==null?s(f.el=l(f.children||""),p,y):f.el=d.el},k=(d,f,p,y)=>{[d.el,d.anchor]=M(d.children,f,p,y,d.el,d.anchor)},N=({el:d,anchor:f},p,y)=>{let g;for(;d&&d!==f;)g=w(d),s(d,p,y),d=g;s(f,p,y)},L=({el:d,anchor:f})=>{let p;for(;d&&d!==f;)p=w(d),r(d),d=p;r(f)},se=(d,f,p,y,g,m,E,S,T)=>{if(f.type==="svg"?E="svg":f.type==="math"&&(E="mathml"),d==null)Y(f,p,y,g,m,E,S,T);else{const A=d.el&&d.el._isVueCE?d.el:null;try{A&&A._beginPatch(),B(d,f,g,m,E,S,T)}finally{A&&A._endPatch()}}},Y=(d,f,p,y,g,m,E,S)=>{let T,A;const{props:$,shapeFlag:P,transition:G,dirs:H}=d;if(T=d.el=o(d.type,m,$&&$.is,$),P&8?u(T,d.children):P&16&&F(d.children,T,null,y,g,Lo(d,m),E,S),H&&os(d,null,y,"created"),R(T,d,d.scopeId,E,y),$){for(const ne in $)ne!=="value"&&!wr(ne)&&i(T,ne,null,$[ne],m,y);"value"in $&&i(T,"value",null,$.value,m),(A=$.onVnodeBeforeMount)&&tn(A,y,d)}H&&os(d,null,y,"beforeMount");const ie=f2(g,G);ie&&G.beforeEnter(T),s(T,f,p),((A=$&&$.onVnodeMounted)||ie||H)&<(()=>{try{A&&tn(A,y,d),ie&&G.enter(T),H&&os(d,null,y,"mounted")}finally{}},g)},R=(d,f,p,y,g)=>{if(p&&I(d,p),y)for(let m=0;m<y.length;m++)I(d,y[m]);if(g){let m=g.subTree;if(f===m||kd(m.type)&&(m.ssContent===f||m.ssFallback===f)){const E=g.vnode;R(d,E,E.scopeId,E.slotScopeIds,g.parent)}}},F=(d,f,p,y,g,m,E,S,T=0)=>{for(let A=T;A<d.length;A++){const $=d[A]=S?wn(d[A]):ln(d[A]);D(null,$,f,p,y,g,m,E,S)}},B=(d,f,p,y,g,m,E)=>{const S=f.el=d.el;let{patchFlag:T,dynamicChildren:A,dirs:$}=f;T|=d.patchFlag&16;const P=d.props||Se,G=f.props||Se;let H;if(p&&as(p,!1),(H=G.onVnodeBeforeUpdate)&&tn(H,p,f,d),$&&os(f,d,p,"beforeUpdate"),p&&as(p,!0),A&&(!d.dynamicChildren||d.dynamicChildren.length!==A.length)&&(T=0,E=!1,A=null),(P.innerHTML&&G.innerHTML==null||P.textContent&&G.textContent==null)&&u(S,""),A?J(d.dynamicChildren,A,S,p,y,Lo(f,g),m):E||X(d,f,S,null,p,y,Lo(f,g),m,!1),T>0){if(T&16)Ie(S,P,G,p,g);else if(T&2&&P.class!==G.class&&i(S,"class",null,G.class,g),T&4&&i(S,"style",P.style,G.style,g),T&8){const ie=f.dynamicProps;for(let ne=0;ne<ie.length;ne++){const re=ie[ne],Ee=P[re],Re=G[re];(Re!==Ee||re==="value")&&i(S,re,Ee,Re,g,p)}}T&1&&d.children!==f.children&&u(S,f.children)}else!E&&A==null&&Ie(S,P,G,p,g);((H=G.onVnodeUpdated)||$)&<(()=>{H&&tn(H,p,f,d),$&&os(f,d,p,"updated")},y)},J=(d,f,p,y,g,m,E)=>{for(let S=0;S<f.length;S++){const T=d[S],A=f[S],$=T.el&&(T.type===_e||!fr(T,A)||T.shapeFlag&198)?h(T.el):p;D(T,A,$,null,y,g,m,E,!0)}},Ie=(d,f,p,y,g)=>{if(f!==p){if(f!==Se)for(const m in f)!wr(m)&&!(m in p)&&i(d,m,f[m],null,g,y);for(const m in p){if(wr(m))continue;const E=p[m],S=f[m];E!==S&&m!=="value"&&i(d,m,S,E,g,y)}"value"in p&&i(d,"value",f.value,p.value,g)}},Ye=(d,f,p,y,g,m,E,S,T)=>{const A=f.el=d?d.el:a(""),$=f.anchor=d?d.anchor:a("");let{patchFlag:P,dynamicChildren:G,slotScopeIds:H}=f;H&&(S=S?S.concat(H):H),d==null?(s(A,p,y),s($,p,y),F(f.children||[],p,$,g,m,E,S,T)):P>0&&P&64&&G&&d.dynamicChildren&&d.dynamicChildren.length===G.length?(J(d.dynamicChildren,G,p,g,m,E,S),(f.key!=null||g&&f===g.subTree)&&rl(d,f,!0)):X(d,f,p,$,g,m,E,S,T)},st=(d,f,p,y,g,m,E,S,T)=>{f.slotScopeIds=S,d==null?f.shapeFlag&512?g.ctx.activate(f,p,y,E,T):qe(f,p,y,g,m,E,T):Un(d,f,T)},qe=(d,f,p,y,g,m,E)=>{const S=d.component=y2(d,y,g);if(el(d)&&(S.ctx.renderer=ae),_2(S,!1,E),S.asyncDep){if(g&&g.registerDep(S,we,E),!d.el){const T=S.subTree=je(hn);v(null,T,f,p),d.placeholder=T.el}}else we(S,d,f,p,g,m,E)},Un=(d,f,p)=>{const y=f.component=d.component;if(t2(d,f,p))if(y.asyncDep&&!y.asyncResolved){te(y,f,p);return}else y.next=f,y.update();else f.el=d.el,y.vnode=f},we=(d,f,p,y,g,m,E)=>{const S=()=>{if(d.isMounted){let{next:P,bu:G,u:H,parent:ie,vnode:ne}=d;{const mt=bd(d);if(mt){P&&(P.el=ne.el,te(d,P,E)),mt.asyncDep.then(()=>{lt(()=>{d.isUnmounted||A()},g)});return}}let re=P,Ee;as(d,!1),P?(P.el=ne.el,te(d,P,E)):P=ne,G&&To(G),(Ee=P.props&&P.props.onVnodeBeforeUpdate)&&tn(Ee,ie,P,ne),as(d,!0);const Re=Ic(d),et=d.subTree;d.subTree=Re,D(et,Re,h(et.el),Bn(et),d,g,m),P.el=Re.el,re===null&&n2(d,Re.el),H&<(H,g),(Ee=P.props&&P.props.onVnodeUpdated)&<(()=>tn(Ee,ie,P,ne),g)}else{let P;const{el:G,props:H}=f,{bm:ie,m:ne,parent:re,root:Ee,type:Re}=d,et=Ps(f);as(d,!1),ie&&To(ie),!et&&(P=H&&H.onVnodeBeforeMount)&&tn(P,re,f),as(d,!0);{Ee.ce&&Ee.ce._hasShadowRoot()&&Ee.ce._injectChildStyle(Re,d.parent?d.parent.type:void 0);const mt=d.subTree=Ic(d);D(null,mt,p,y,d,g,m),f.el=mt.el}if(ne&<(ne,g),!et&&(P=H&&H.onVnodeMounted)){const mt=f;lt(()=>tn(P,re,mt),g)}(f.shapeFlag&256||re&&Ps(re.vnode)&&re.vnode.shapeFlag&256)&&d.a&<(d.a,g),d.isMounted=!0,f=p=y=null}};d.scope.on();const T=d.effect=new Cf(S);d.scope.off();const A=d.update=T.run.bind(T),$=d.job=T.runIfDirty.bind(T);$.i=d,$.id=d.uid,T.scheduler=()=>Za($),as(d,!0),A()},te=(d,f,p)=>{f.component=d;const y=d.vnode.props;d.vnode=f,d.next=null,r2(d,f.props,y,p),l2(d,f.children,p),Dn(),yc(d),On()},X=(d,f,p,y,g,m,E,S,T=!1)=>{const A=d&&d.children,$=d?d.shapeFlag:0,P=f.children,{patchFlag:G,shapeFlag:H}=f;if(G>0){if(G&128){vn(A,P,p,y,g,m,E,S,T);return}else if(G&256){kt(A,P,p,y,g,m,E,S,T);return}}H&8?($&16&&yn(A,g,m),P!==A&&u(p,P)):$&16?H&16?vn(A,P,p,y,g,m,E,S,T):yn(A,g,m,!0):($&8&&u(p,""),H&16&&F(P,p,y,g,m,E,S,T))},kt=(d,f,p,y,g,m,E,S,T)=>{d=d||Ms,f=f||Ms;const A=d.length,$=f.length,P=Math.min(A,$);let G;for(G=0;G<P;G++){const H=f[G]=T?wn(f[G]):ln(f[G]);D(d[G],H,p,null,g,m,E,S,T)}A>$?yn(d,g,m,!0,!1,P):F(f,p,y,g,m,E,S,T,P)},vn=(d,f,p,y,g,m,E,S,T)=>{let A=0;const $=f.length;let P=d.length-1,G=$-1;for(;A<=P&&A<=G;){const H=d[A],ie=f[A]=T?wn(f[A]):ln(f[A]);if(fr(H,ie))D(H,ie,p,null,g,m,E,S,T);else break;A++}for(;A<=P&&A<=G;){const H=d[P],ie=f[G]=T?wn(f[G]):ln(f[G]);if(fr(H,ie))D(H,ie,p,null,g,m,E,S,T);else break;P--,G--}if(A>P){if(A<=G){const H=G+1,ie=H<$?f[H].el:y;for(;A<=G;)D(null,f[A]=T?wn(f[A]):ln(f[A]),p,ie,g,m,E,S,T),A++}}else if(A>G)for(;A<=P;)gt(d[A],g,m,!0),A++;else{const H=A,ie=A,ne=new Map;for(A=ie;A<=G;A++){const At=f[A]=T?wn(f[A]):ln(f[A]);At.key!=null&&ne.set(At.key,A)}let re,Ee=0;const Re=G-ie+1;let et=!1,mt=0;const cr=new Array(Re);for(A=0;A<Re;A++)cr[A]=0;for(A=H;A<=P;A++){const At=d[A];if(Ee>=Re){gt(At,g,m,!0);continue}let en;if(At.key!=null)en=ne.get(At.key);else for(re=ie;re<=G;re++)if(cr[re-ie]===0&&fr(At,f[re])){en=re;break}en===void 0?gt(At,g,m,!0):(cr[en-ie]=A+1,en>=mt?mt=en:et=!0,D(At,f[en],p,null,g,m,E,S,T),Ee++)}const cc=et?d2(cr):Ms;for(re=cc.length-1,A=Re-1;A>=0;A--){const At=ie+A,en=f[At],uc=f[At+1],fc=At+1<$?uc.el||wd(uc):y;cr[A]===0?D(null,en,p,fc,g,m,E,S,T):et&&(re<0||A!==cc[re]?Et(en,p,fc,2):re--)}}},Et=(d,f,p,y,g=null)=>{const{el:m,type:E,transition:S,children:T,shapeFlag:A}=d;if(A&6){Et(d.component.subTree,f,p,y);return}if(A&128){d.suspense.move(f,p,y);return}if(A&64){E.move(d,f,p,ae);return}if(E===_e){s(m,f,p);for(let P=0;P<T.length;P++)Et(T[P],f,p,y);s(d.anchor,f,p);return}if(E===Ro){N(d,f,p);return}if(y!==2&&A&1&&S)if(y===0)S.persisted&&!m[Oo]?s(m,f,p):(S.beforeEnter(m),s(m,f,p),lt(()=>S.enter(m),g));else{const{leave:P,delayLeave:G,afterLeave:H}=S,ie=()=>{d.ctx.isUnmounted?r(m):s(m,f,p)},ne=()=>{const re=m._isLeaving||!!m[Oo];m._isLeaving&&m[Oo](!0),S.persisted&&!re?ie():P(m,()=>{ie(),H&&H()})};G?G(m,ie,ne):ne()}else s(m,f,p)},gt=(d,f,p,y=!1,g=!1)=>{const{type:m,props:E,ref:S,children:T,dynamicChildren:A,shapeFlag:$,patchFlag:P,dirs:G,cacheIndex:H,memo:ie}=d;if(P===-2&&(g=!1),S!=null&&(Dn(),Sr(S,null,p,d,!0),On()),H!=null&&(f.renderCache[H]=void 0),$&256){f.ctx.deactivate(d);return}const ne=$&1&&G,re=!Ps(d);let Ee;if(re&&(Ee=E&&E.onVnodeBeforeUnmount)&&tn(Ee,f,d),$&6)Es(d.component,p,y);else{if($&128){d.suspense.unmount(p,y);return}ne&&os(d,null,f,"beforeUnmount"),$&64?d.type.remove(d,f,p,ae,y):A&&!A.hasOnce&&(m!==_e||P>0&&P&64)?yn(A,f,p,!1,!0):(m===_e&&P&384||!g&&$&16)&&yn(T,f,p),y&&ks(d)}const Re=ie!=null&&H==null;(re&&(Ee=E&&E.onVnodeUnmounted)||ne||Re)&<(()=>{Ee&&tn(Ee,f,d),ne&&os(d,null,f,"unmounted"),Re&&(d.el=null)},p)},ks=d=>{const{type:f,el:p,anchor:y,transition:g}=d;if(f===_e){lr(p,y);return}if(f===Ro){L(d);return}const m=()=>{r(p),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(d.shapeFlag&1&&g&&!g.persisted){const{leave:E,delayLeave:S}=g,T=()=>E(p,m);S?S(d.el,m,T):T()}else m()},lr=(d,f)=>{let p;for(;d!==f;)p=w(d),r(d),d=p;r(f)},Es=(d,f,p)=>{const{bum:y,scope:g,job:m,subTree:E,um:S,m:T,a:A}=d;Dc(T),Dc(A),y&&To(y),g.stop(),m&&(m.flags|=8,gt(E,d,f,p)),S&<(S,f),lt(()=>{d.isUnmounted=!0},f)},yn=(d,f,p,y=!1,g=!1,m=0)=>{for(let E=m;E<d.length;E++)gt(d[E],f,p,y,g)},Bn=d=>{if(d.shapeFlag&6)return Bn(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const f=w(d.anchor||d.el),p=f&&f[nd];return p?w(p):f};let Gn=!1;const fe=(d,f,p)=>{let y;d==null?f._vnode&&(gt(f._vnode,null,null,!0),y=f._vnode.component):D(f._vnode||null,d,f,null,null,null,p),f._vnode=d,Gn||(Gn=!0,yc(y),Xf(),Gn=!1)},ae={p:D,um:gt,m:Et,r:ks,mt:qe,mc:F,pc:X,pbc:J,n:Bn,o:e};return{render:fe,hydrate:void 0,createApp:qp(fe)}}function Lo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function as({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function f2(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rl(e,t,n=!1){const s=e.children,r=t.children;if(Z(s)&&Z(r))for(let i=0;i<s.length;i++){const o=s[i];let a=r[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[i]=wn(r[i]),a.el=o.el),!n&&a.patchFlag!==-2&&rl(o,a)),a.type===Wi&&(a.patchFlag===-1&&(a=r[i]=wn(a)),a.el=o.el),a.type===hn&&!a.el&&(a.el=o.el)}}function d2(e){const t=e.slice(),n=[0];let s,r,i,o,a;const l=e.length;for(s=0;s<l;s++){const c=e[s];if(c!==0){if(r=n[n.length-1],e[r]<c){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<c?i=a+1:o=a;c<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function bd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:bd(t)}function Dc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function wd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?wd(t.subTree):null}const kd=e=>e.__isSuspense;function h2(e,t){t&&t.pendingBranch?Z(e)?t.effects.push(...e):t.effects.push(e):vp(e)}const _e=Symbol.for("v-fgt"),Wi=Symbol.for("v-txt"),hn=Symbol.for("v-cmt"),Ro=Symbol.for("v-stc"),xn=[];let It=null;function x(e=!1){xn.push(It=e?null:[])}function il(){xn.pop(),It=xn[xn.length-1]||null}let Lr=1;function Oc(e,t=!1){Lr+=e,e<0&&It&&t&&(It.hasOnce=!0)}function Ed(e){return e.dynamicChildren=Lr>0?It||Ms:null,il(),Lr>0&&It&&It.push(e),e}function C(e,t,n,s,r,i){return Ed(b(e,t,n,s,r,i,!0))}function tt(e,t,n,s,r){return Ed(je(e,t,n,s,r,!0))}function ol(e){return e?e.__v_isVNode===!0:!1}function fr(e,t){return e.type===t.type&&e.key===t.key}const Ad=({key:e})=>e??null,oi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Pe(e)||Fe(e)||Q(e)?{i:ut,r:e,k:t,f:!!n}:e:null);function b(e,t=null,n=null,s=0,r=null,i=e===_e?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ad(t),ref:t&&oi(t),scopeId:Zf,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ut};return a?(Ei(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Pe(n)?8:16),Lr>0&&!o&&It&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&It.push(l),l}const je=p2;function p2(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Gp)&&(e=hn),ol(e)){const a=Bs(e,t,!0);return n&&Ei(a,n),Lr>0&&!i&&It&&(a.shapeFlag&6?It[It.indexOf(e)]=a:It.push(a)),a.patchFlag=-2,a}if(A2(e)&&(e=e.__vccOpts),t){t=pa(t);let{class:a,style:l}=t;a&&!Pe(a)&&(t.class=be(a)),ye(l)&&(ji(l)&&!Z(l)&&(l=nt({},l)),t.style=dn(l))}const o=Pe(e)?1:kd(e)?128:$i(e)?64:ye(e)?4:Q(e)?2:0;return b(e,t,n,s,r,o,i,!0)}function pa(e){return e?ji(e)||pd(e)?nt({},e):e:null}function Bs(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?g2(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ad(c),ref:t&&t.ref?n&&i?Z(i)?i.concat(oi(t)):[i,oi(t)]:oi(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bs(e.ssContent),ssFallback:e.ssFallback&&Bs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Qa(u,l.clone(u)),u}function Xn(e=" ",t=0){return je(Wi,null,e,t)}function ee(e="",t=!1){return t?(x(),tt(hn,null,e)):je(hn,null,e)}function ln(e){return e==null||typeof e=="boolean"?je(hn):Z(e)?je(_e,null,e.slice()):ol(e)?wn(e):je(Wi,null,String(e))}function wn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bs(e)}function Ei(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ei(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!pd(t)?t._ctx=ut:r===3&&ut&&(ut.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Q(t)){if(s&65){Ei(e,{default:t});return}t={default:t,_ctx:ut},n=32}else t=String(t),s&64?(n=16,t=[Xn(t)]):n=8;e.children=t,e.shapeFlag|=n}function g2(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=be([t.class,s.class]));else if(r==="style")t.style=dn([t.style,s.style]);else if(Oi(r)){const i=t[r],o=s[r];o&&i!==o&&!(Z(i)&&i.includes(o))?t[r]=i?[].concat(i,o):o:o==null&&i==null&&!Pi(r)&&(t[r]=o)}else r!==""&&(t[r]=s[r])}return t}function tn(e,t,n,s=null){qt(e,t,7,[n,s])}const m2=cd();let v2=0;function y2(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||m2,i={uid:v2++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Tf(!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:md(s,r),emitsOptions:ud(s,r),emit:null,emitted:null,propsDefaults:Se,inheritAttrs:s.inheritAttrs,ctx:Se,data:Se,props:Se,attrs:Se,slots:Se,refs:Se,setupState:Se,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Jp.bind(null,i),e.ce&&e.ce(i),i}let ot=null;const Sd=()=>ot||ut;let Ai,Rr;{const e=Ni(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Ai=t("__VUE_INSTANCE_SETTERS__",n=>ot=n),Rr=t("__VUE_SSR_SETTERS__",n=>Fr=n)}const zr=e=>{const t=ot;return Ai(e),e.scope.on(),()=>{e.scope.off(),Ai(t)}},Pc=()=>{ot&&ot.scope.off(),Ai(null)};function Td(e){return e.vnode.shapeFlag&4}let Fr=!1;function _2(e,t=!1,n=!1){t&&Rr(t);const{props:s,children:r}=e.vnode,i=Td(e);s2(e,s,i,t),a2(e,r,n||t);const o=i?b2(e,t):void 0;return t&&Rr(!1),o}function b2(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Vp);const{setup:s}=n;if(s){Dn();const r=e.setupContext=s.length>1?k2(e):null,i=zr(e),o=Hr(s,e,0,[e.props,r]),a=_f(o);if(On(),i(),(a||e.sp)&&!Ps(e)&&rd(e),a){if(o.then(Pc,Pc),t)return o.then(l=>{Rr(!0);try{Lc(e,l,t)}finally{Rr(!1)}}).catch(l=>{Vi(l,e,0)});e.asyncDep=o}else Lc(e,o)}else xd(e)}function Lc(e,t,n){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ye(t)&&(e.setupState=Hf(t)),xd(e)}function xd(e,t,n){const s=e.type;e.render||(e.render=s.render||fn);{const r=zr(e);Dn();try{$p(e)}finally{On(),r()}}}const w2={get(e,t){return it(e,"get",""),e[t]}};function k2(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,w2),slots:e.slots,emit:e.emit,expose:t}}function al(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Hf(Ja(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Tr)return Tr[n](e)},has(t,n){return n in t||n in Tr}})):e.proxy}function E2(e,t=!0){return Q(e)?e.displayName||e.name:e.name||t&&e.__name}function A2(e){return Q(e)&&"__vccOpts"in e}const oe=(e,t)=>dp(e,t,Fr),S2="3.5.42";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.42
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let ga;const Rc=typeof window<"u"&&window.trustedTypes;if(Rc)try{ga=Rc.createPolicy("vue",{createHTML:e=>e})}catch{}const Id=ga?e=>ga.createHTML(e):e=>e,T2="http://www.w3.org/2000/svg",x2="http://www.w3.org/1998/Math/MathML",bn=typeof document<"u"?document:null,Fc=bn&&bn.createElement("template"),I2={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?bn.createElementNS(T2,e):t==="mathml"?bn.createElementNS(x2,e):n?bn.createElement(e,{is:n}):bn.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>bn.createTextNode(e),createComment:e=>bn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>bn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Fc.innerHTML=Id(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const a=Fc.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},C2=Symbol("_vtc");function M2(e,t,n){const s=e[C2];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Nc=Symbol("_vod"),D2=Symbol("_vsh"),O2=Symbol(""),P2=/(?:^|;)\s*display\s*:/;function L2(e,t,n){const s=e.style,r=Pe(n);let i=!1;if(n&&!r){if(t)if(Pe(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&yr(s,a,"")}else for(const o in t)n[o]==null&&yr(s,o,"");for(const o in n){o==="display"&&(i=!0);const a=n[o];a!=null?F2(e,o,!Pe(t)&&t?t[o]:void 0,a)||yr(s,o,a):yr(s,o,"")}}else if(r){if(t!==n){const o=s[O2];o&&(n+=";"+o),s.cssText=n,i=P2.test(n)}}else t&&e.removeAttribute("style");Nc in e&&(e[Nc]=i?s.display:"",e[D2]&&(s.display="none"))}const Qr=/\s*!important$/;function yr(e,t,n){if(Z(n))n.forEach(s=>yr(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Qr.test(n)?e.setProperty(t,n.replace(Qr,""),"important"):e.setProperty(t,n);else{const s=R2(e,t);Qr.test(n)?e.setProperty(bs(s),n.replace(Qr,""),"important"):e[s]=n}}const Uc=["Webkit","Moz","ms"],Fo={};function R2(e,t){const n=Fo[t];if(n)return n;let s=ft(t);if(s!=="filter"&&s in e)return Fo[t]=s;s=Fi(s);for(let r=0;r<Uc.length;r++){const i=Uc[r]+s;if(i in e)return Fo[t]=i}return t}function F2(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Pe(s)&&n===s}const Bc="http://www.w3.org/1999/xlink";function Gc(e,t,n,s,r,i=U1(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Bc,t.slice(6,t.length)):e.setAttributeNS(Bc,t,n):n==null||i&&!Ef(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ot(n)?String(n):n)}function jc(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Id(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Ef(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function N2(e,t,n,s){e.addEventListener(t,n,s)}function U2(e,t,n,s){e.removeEventListener(t,n,s)}const Vc=Symbol("_vei");function B2(e,t,n,s,r=null){const i=e[Vc]||(e[Vc]={}),o=i[t];if(s&&o)o.value=s;else{const[a,l]=V2(t);if(s){const c=i[t]=z2(s,r);N2(e,a,c,l)}else o&&(U2(e,a,o,l),i[t]=void 0)}}const G2=/(Once|Passive|Capture)$/,j2=/^on:?(?:Once|Passive|Capture)$/;function V2(e){let t,n;for(;(n=e.match(G2))&&!j2.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):bs(e.slice(2)),t]}let No=0;const $2=Promise.resolve(),H2=()=>No||($2.then(()=>No=0),No=Date.now());function z2(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(Z(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),a=[s];for(let l=0;l<o.length&&!s._stopped;l++){const c=o[l];c&&qt(c,t,5,a)}}else qt(r,t,5,[s])};return n.value=e,n.attached=H2(),n}const $c=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,W2=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?M2(e,s,o):t==="style"?L2(e,n,s):Oi(t)?Pi(t)||B2(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):K2(e,t,s,o))?(jc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gc(e,t,s,o,i,t!=="value")):e._isVueCE&&(Y2(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Pe(s)))?jc(e,ft(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Gc(e,t,s,o))};function K2(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$c(t)&&Q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return $c(t)&&Pe(n)?!1:t in e}function Y2(e,t){const n=e._def.props;if(!n)return!1;const s=ft(t);return Array.isArray(n)?n.some(r=>ft(r)===s):Object.keys(n).some(r=>ft(r)===s)}const q2=["ctrl","shift","alt","meta"],X2={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>q2.some(n=>e[`${n}Key`]&&!t.includes(n))},J2=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...i)=>{for(let o=0;o<t.length;o++){const a=X2[t[o]];if(a&&a(r,t))return}return e(r,...i)}))},Z2=nt({patchProp:W2},I2);let Hc;function Q2(){return Hc||(Hc=c2(Z2))}const eg=((...e)=>{const t=Q2().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ng(s);if(!r)return;const i=t._component;!Q(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,tg(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function tg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ng(e){return Pe(e)?document.querySelector(e):e}/*!
|
|
18
|
+
* pinia v2.3.1
|
|
19
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/let Cd;const Ki=e=>Cd=e,Md=Symbol();function ma(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var xr;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(xr||(xr={}));function sg(){const e=xf(!0),t=e.run(()=>ve({}));let n=[],s=[];const r=Ja({install(i){Ki(r),r._a=i,i.provide(Md,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Dd=()=>{};function zc(e,t,n,s=Dd){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&If()&&G1(r),r}function Ss(e,...t){e.slice().forEach(n=>{n(...t)})}const rg=e=>e(),Wc=Symbol(),Uo=Symbol();function va(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];ma(r)&&ma(s)&&e.hasOwnProperty(n)&&!Fe(s)&&!Tn(s)?e[n]=va(r,s):e[n]=s}return e}const ig=Symbol();function og(e){return!ma(e)||!e.hasOwnProperty(ig)}const{assign:$n}=Object;function ag(e){return!!(Fe(e)&&e.effect)}function lg(e,t,n,s){const{state:r,actions:i,getters:o}=t,a=n.state.value[e];let l;function c(){a||(n.state.value[e]=r?r():{});const u=lp(n.state.value[e]);return $n(u,i,Object.keys(o||{}).reduce((h,w)=>(h[w]=Ja(oe(()=>{Ki(n);const I=n._s.get(e);return o[w].call(I,I)})),h),{}))}return l=Od(e,c,t,n,s,!0),l}function Od(e,t,n={},s,r,i){let o;const a=$n({actions:{}},n),l={deep:!0};let c,u,h=[],w=[],I;const M=s.state.value[e];!i&&!M&&(s.state.value[e]={});let D;function _(F){let B;c=u=!1,typeof F=="function"?(F(s.state.value[e]),B={type:xr.patchFunction,storeId:e,events:I}):(va(s.state.value[e],F),B={type:xr.patchObject,payload:F,storeId:e,events:I});const J=D=Symbol();Yf().then(()=>{D===J&&(c=!0)}),u=!0,Ss(h,B,s.state.value[e])}const v=i?function(){const{state:B}=n,J=B?B():{};this.$patch(Ie=>{$n(Ie,J)})}:Dd;function k(){o.stop(),h=[],w=[],s._s.delete(e)}const N=(F,B="")=>{if(Wc in F)return F[Uo]=B,F;const J=function(){Ki(s);const Ie=Array.from(arguments),Ye=[],st=[];function qe(te){Ye.push(te)}function Un(te){st.push(te)}Ss(w,{args:Ie,name:J[Uo],store:se,after:qe,onError:Un});let we;try{we=F.apply(this&&this.$id===e?this:se,Ie)}catch(te){throw Ss(st,te),te}return we instanceof Promise?we.then(te=>(Ss(Ye,te),te)).catch(te=>(Ss(st,te),Promise.reject(te))):(Ss(Ye,we),we)};return J[Wc]=!0,J[Uo]=B,J},L={_p:s,$id:e,$onAction:zc.bind(null,w),$patch:_,$reset:v,$subscribe(F,B={}){const J=zc(h,F,B.detached,()=>Ie()),Ie=o.run(()=>qn(()=>s.state.value[e],Ye=>{(B.flush==="sync"?u:c)&&F({storeId:e,type:xr.direct,events:I},Ye)},$n({},l,B)));return J},$dispose:k},se=Gi(L);s._s.set(e,se);const R=(s._a&&s._a.runWithContext||rg)(()=>s._e.run(()=>(o=xf()).run(()=>t({action:N}))));for(const F in R){const B=R[F];if(Fe(B)&&!ag(B)||Tn(B))i||(M&&og(B)&&(Fe(B)?B.value=M[F]:va(B,M[F])),s.state.value[e][F]=B);else if(typeof B=="function"){const J=N(B,F);R[F]=J,a.actions[F]=B}}return $n(se,R),$n(de(se),R),Object.defineProperty(se,"$state",{get:()=>s.state.value[e],set:F=>{_(B=>{$n(B,F)})}}),s._p.forEach(F=>{$n(se,o.run(()=>F({store:se,app:s._a,pinia:s,options:a})))}),M&&i&&n.hydrate&&n.hydrate(se.$state,M),c=!0,u=!0,se}/*! #__NO_SIDE_EFFECTS__ */function cg(e,t,n){let s,r;const i=typeof t=="function";s=e,r=i?n:t;function o(a,l){const c=yp();return a=a||(c?Os(Md,null):null),a&&Ki(a),a=Cd,a._s.has(s)||(i?Od(s,t,r,a):lg(s,r,a)),a._s.get(s)}return o.$id=s,o}const ug=[{id:"moveUp",title:"Mover para cima",description:"Aumenta a prioridade da tarefa focada",keyboardShortcut:"⌘↑",defaultGesture:"Pointing_Up"},{id:"moveDown",title:"Mover para baixo",description:"Diminui a prioridade da tarefa focada",keyboardShortcut:"⌘↓",defaultGesture:"Thumb_Down"},{id:"groupWith",title:"Agrupar",description:"Agrupa a tarefa focada com a adjacente",keyboardShortcut:"⌘G",defaultGesture:"Victory"},{id:"ungroup",title:"Desagrupar",description:"Dissolve o grupo focado",keyboardShortcut:"⌘⇧G",defaultGesture:"Open_Palm"},{id:"setDifficulty1",title:"Dificuldade 1",description:"Marca dificuldade como muito fácil",keyboardShortcut:"⌘1"},{id:"setDifficulty2",title:"Dificuldade 2",description:"Marca dificuldade como fácil",keyboardShortcut:"⌘2"},{id:"setDifficulty3",title:"Dificuldade 3",description:"Marca dificuldade como média",keyboardShortcut:"⌘3"},{id:"setDifficulty4",title:"Dificuldade 4",description:"Marca dificuldade como difícil",keyboardShortcut:"⌘4"},{id:"setDifficulty5",title:"Dificuldade 5",description:"Marca dificuldade como muito difícil",keyboardShortcut:"⌘5"},{id:"undo",title:"Desfazer",description:"Desfaz a última ação",keyboardShortcut:"⌘Z",defaultGesture:"Closed_Fist"},{id:"copyCard",title:"Copiar card",description:"Copia o texto do card focado",keyboardShortcut:"⌘C"}],ai={None:"",Closed_Fist:"✊",Open_Palm:"🖐️",Pointing_Up:"☝️",Thumb_Down:"👎",Thumb_Up:"👍",Victory:"✌️",ILoveYou:"🤟"},li={None:"None",Closed_Fist:"Fist",Open_Palm:"Open palm",Pointing_Up:"Point up",Thumb_Down:"Thumb down",Thumb_Up:"Thumb up",Victory:"Victory",ILoveYou:"Rock on"},ci={moveUp:"Move up",moveDown:"Move down",groupWith:"Group",ungroup:"Ungroup",undo:"Undo",copyCard:"Copy card",setDifficulty1:"Difficulty 1",setDifficulty2:"Difficulty 2",setDifficulty3:"Difficulty 3",setDifficulty4:"Difficulty 4",setDifficulty5:"Difficulty 5",none:"No action"},fg=["title"],dg={class:"gesture-icon__emoji"},hg={key:0,class:"gesture-icon__label"},pg=Ve({__name:"GestureIcon",props:{gesture:{},size:{default:"md"},showLabel:{type:Boolean,default:!1}},setup(e){const t=e,n={none:"None",closed_fist:"Closed_Fist",open_palm:"Open_Palm",pointing_up:"Pointing_Up",thumb_down:"Thumb_Down",thumb_up:"Thumb_Up",victory:"Victory",iloveyou:"ILoveYou"},s=oe(()=>{const o=t.gesture.toLowerCase().replace(/\s+/g,"_");return n[o]||"None"}),r=oe(()=>ai[s.value]),i=oe(()=>li[s.value]);return(o,a)=>(x(),C("span",{class:be(["gesture-icon",[`gesture-icon--${e.size}`,{"gesture-icon--with-label":e.showLabel}]]),title:i.value},[b("span",dg,W(r.value),1),e.showLabel?(x(),C("span",hg,W(i.value),1)):ee("",!0)],10,fg))}}),Zs=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},gg=Zs(pg,[["__scopeId","data-v-b2255ef3"]]),mg={class:"gesture-legend__label"},vg=Ve({__name:"GestureLegend",props:{mappings:{},compact:{type:Boolean}},setup(e){const t=e,n=ci,s=oe(()=>t.mappings.filter(r=>r.gesture!=="None"&&r.action!=="none"));return(r,i)=>(x(),C("div",{class:be(["gesture-legend",{"gesture-legend--compact":e.compact}])},[(x(!0),C(_e,null,Mt(s.value,o=>(x(),C("div",{class:"gesture-legend__chip",key:o.gesture},[Ls(r.$slots,"chip",{mapping:o,actionLabel:O(n)[o.action]},()=>[je(gg,{gesture:o.gesture,size:e.compact?"sm":"md"},null,8,["gesture","size"]),b("span",mg,W(O(n)[o.action]),1)])]))),128))],2))}}),yg=Zs(vg,[["__scopeId","data-v-005af0f1"]]),_g={class:"wizard-card"},bg={class:"wizard-steps"},wg={key:0,class:"wizard-body"},kg={key:1,class:"wizard-body"},Eg={class:"progress-track"},Ag={class:"hint"},Sg={key:2,class:"wizard-body"},Tg={key:0,class:"gesture-preview"},xg={class:"preview-emoji"},Ig={class:"preview-label"},Cg={key:3,class:"wizard-body"},Mg={class:"action-list"},Dg={key:0,class:"arrow"},Og={key:1,class:"arrow placeholder"},Pg={key:4,class:"wizard-body"},Lg={class:"confirm-pair"},Rg={class:"confirm-item"},Fg={class:"confirm-emoji"},Ng={class:"confirm-item"},Ug={class:"confirm-label"},Bg={key:5,class:"wizard-body"},Gg={class:"confirm-pair"},jg={class:"confirm-item"},Vg={class:"confirm-emoji"},$g={class:"confirm-item"},Hg={class:"confirm-label"},zg={key:6,class:"wizard-error"},Wg={name:"GestureWizardCard"},Kg=Ve({...Wg,props:{wizardState:{},readyProgress:{},step:{},recordingCandidate:{},selectedActionIndex:{},availableActions:{},lastMapping:{},error:{},teleportTo:{type:[String,Boolean]}},setup(e){return(t,n)=>{var s,r,i,o,a,l;return x(),C("div",_g,[b("div",bg,[(x(),C(_e,null,Mt(4,c=>b("div",{class:be(["step-dot",{active:e.step>=c,done:e.step>c}]),key:c},null,2)),64))]),e.wizardState==="IDLE"?(x(),C("div",wg,[...n[0]||(n[0]=[b("div",{class:"wizard-icon"}," 🖐️ ",-1),b("p",{class:"hint"}," Hold your hand open to set up gesture shortcuts ",-1)])])):e.wizardState==="READY"?(x(),C("div",kg,[n[1]||(n[1]=b("div",{class:"wizard-icon pulse"}," 🖐️ ",-1)),n[2]||(n[2]=b("p",{class:"title"}," Setup mode ",-1)),b("div",Eg,[b("div",{class:"progress-fill",style:dn({width:Math.min(100,(e.readyProgress-2e3)/3e3*100)+"%"})},null,4)]),b("p",Ag," Hold your hand open to start ("+W(Math.max(0,Math.ceil((5e3-e.readyProgress)/1e3)))+"s) ",1),n[3]||(n[3]=b("p",{class:"hint-cancel"}," Lower your hand to cancel ",-1))])):e.wizardState==="RECORDING"?(x(),C("div",Sg,[n[4]||(n[4]=b("div",{class:"wizard-icon"}," ✋ ",-1)),n[5]||(n[5]=b("p",{class:"title"}," Step 1: Pick the gesture ",-1)),n[6]||(n[6]=b("p",{class:"hint"}," Make the gesture you want as the shortcut and hold it for 1 second ",-1)),e.recordingCandidate?(x(),C("div",Tg,[b("span",xg,W(O(ai)[e.recordingCandidate]),1),b("span",Ig,W(O(li)[e.recordingCandidate]),1)])):ee("",!0)])):e.wizardState==="SELECTING"?(x(),C("div",Cg,[n[7]||(n[7]=b("div",{class:"wizard-icon"}," ⚙️ ",-1)),n[8]||(n[8]=b("p",{class:"title"}," Step 2: Pick the action ",-1)),b("div",Mg,[(x(!0),C(_e,null,Mt(e.availableActions,(c,u)=>(x(),C("div",{class:be(["action-item",{highlighted:u===e.selectedActionIndex}]),key:c},[u===e.selectedActionIndex?(x(),C("span",Dg,"▶")):(x(),C("span",Og)),b("span",null,W(O(ci)[c]),1)],2))),128))]),n[9]||(n[9]=b("div",{class:"wizard-legend"},[b("span",null,"👍 next"),b("span",null,"👎 ant."),b("span",null,"✊ selec."),b("span",null,"🖐️ canc.")],-1))])):e.wizardState==="CONFIRMING"?(x(),C("div",Pg,[n[11]||(n[11]=b("div",{class:"wizard-icon"}," ✅ ",-1)),n[12]||(n[12]=b("p",{class:"title"}," Step 3: Confirm ",-1)),b("div",Lg,[b("div",Rg,[b("span",Fg,W(O(ai)[((s=e.lastMapping)==null?void 0:s.gesture)||"None"]),1),b("span",null,W(O(li)[((r=e.lastMapping)==null?void 0:r.gesture)||"None"]),1)]),n[10]||(n[10]=b("div",{class:"confirm-arrow"}," → ",-1)),b("div",Ng,[b("span",Ug,W(O(ci)[((i=e.lastMapping)==null?void 0:i.action)||"none"]),1)])]),n[13]||(n[13]=b("div",{class:"wizard-legend"},[b("span",null,"✊ confirm"),b("span",null,"🖐️ cancel")],-1))])):e.wizardState==="SAVED"?(x(),C("div",Bg,[n[15]||(n[15]=b("div",{class:"wizard-icon success"}," ✨ ",-1)),n[16]||(n[16]=b("p",{class:"title"}," Shortcut saved! ",-1)),b("div",Gg,[b("div",jg,[b("span",Vg,W(O(ai)[((o=e.lastMapping)==null?void 0:o.gesture)||"None"]),1),b("span",null,W(O(li)[((a=e.lastMapping)==null?void 0:a.gesture)||"None"]),1)]),n[14]||(n[14]=b("div",{class:"confirm-arrow"}," → ",-1)),b("div",$g,[b("span",Hg,W(O(ci)[((l=e.lastMapping)==null?void 0:l.action)||"none"]),1)])])])):ee("",!0),e.error?(x(),C("div",zg,W(e.error),1)):ee("",!0)])}}}),Kc=Zs(Kg,[["__scopeId","data-v-80c07474"]]),Yg={class:"gesture-wizard-overlay gesture-wizard-overlay--fixed"},qg={key:1,class:"gesture-wizard-overlay gesture-wizard-overlay--absolute"},Xg={name:"GestureWizard"},Jg=Ve({...Xg,props:{wizardState:{},readyProgress:{},step:{},recordingCandidate:{},selectedActionIndex:{},availableActions:{},lastMapping:{},error:{},teleportTo:{type:[String,Boolean]}},setup(e){const t=e,n=oe(()=>{const{teleportTo:s,...r}=t;return r});return(s,r)=>e.teleportTo!==!1?(x(),tt(Sp,{key:0,to:e.teleportTo??"body"},[b("div",Yg,[je(Kc,pc(pa(n.value)),null,16)])],8,["to"])):(x(),C("div",qg,[je(Kc,pc(pa(n.value)),null,16)]))}}),Zg=Zs(Jg,[["__scopeId","data-v-a3a7ff0e"]]),Qg=["webcam","eyes","mouth","expressions","arms"],e3={class:"tracking-controls"},t3={class:"primary-row"},n3=["disabled"],s3={key:0,class:"status"},r3={key:0,class:"control-group"},i3=["checked","onChange"],o3={key:1,class:"control-group"},a3=["checked","onChange"],l3={key:2,class:"error",role:"alert"},c3={name:"TrackingControls"},u3=Ve({...c3,props:{isDetecting:{type:Boolean},error:{},showWebcam:{type:Boolean,default:!0},syncEyes:{type:Boolean},syncMouth:{type:Boolean},syncExpressions:{type:Boolean},syncArms:{type:Boolean},disabled:{type:Boolean},controls:{}},emits:["toggle-tracking","update:showWebcam","update:syncEyes","update:syncMouth","update:syncExpressions","update:syncArms"],setup(e,{emit:t}){const n=e,s=t,r={webcam:{group:"display",label:"Webcam",checked:()=>n.showWebcam,emit:c=>s("update:showWebcam",c)},eyes:{group:"sync",label:"Eyes",checked:()=>n.syncEyes,emit:c=>s("update:syncEyes",c)},mouth:{group:"sync",label:"Mouth",checked:()=>n.syncMouth,emit:c=>s("update:syncMouth",c)},expressions:{group:"sync",label:"Expressions",checked:()=>n.syncExpressions,emit:c=>s("update:syncExpressions",c)},arms:{group:"sync",label:"Arms",checked:()=>n.syncArms,emit:c=>s("update:syncArms",c)}},i=oe(()=>Qg.filter(c=>n.controls.includes(c))),o=oe(()=>i.value.filter(c=>r[c].group==="display")),a=oe(()=>i.value.filter(c=>r[c].group==="sync")),l=(c,u)=>{r[c].emit(u.target.checked)};return(c,u)=>(x(),C("div",e3,[b("div",t3,[b("button",{class:"control-button",disabled:e.disabled,onClick:u[0]||(u[0]=h=>s("toggle-tracking"))},W(e.isDetecting?"Stop":"Start")+" Detection ",9,n3),e.isDetecting?(x(),C("div",s3,[...u[1]||(u[1]=[b("span",{class:"status-indicator"},null,-1),Xn(" Detecting... ",-1)])])):ee("",!0)]),o.value.length?(x(),C("fieldset",r3,[u[2]||(u[2]=b("legend",{class:"control-group__legend"},"Display",-1)),(x(!0),C(_e,null,Mt(o.value,h=>(x(),C("label",{class:"control-checkbox",key:h},[b("input",{type:"checkbox",checked:r[h].checked(),onChange:w=>l(h,w)},null,40,i3),Xn(" "+W(r[h].label),1)]))),128))])):ee("",!0),a.value.length?(x(),C("fieldset",o3,[u[3]||(u[3]=b("legend",{class:"control-group__legend"},"Sync",-1)),(x(!0),C(_e,null,Mt(a.value,h=>(x(),C("label",{class:"control-checkbox",key:h},[b("input",{type:"checkbox",checked:r[h].checked(),onChange:w=>l(h,w)},null,40,a3),Xn(" "+W(r[h].label),1)]))),128))])):ee("",!0),e.error?(x(),C("p",l3,W(e.error),1)):ee("",!0)]))}}),f3=Zs(u3,[["__scopeId","data-v-03434b7e"]]);var Gs=typeof self<"u"?self:{};function ls(){throw Error("Invalid UTF8")}function Yc(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}let ei,Bo;const d3=typeof TextDecoder<"u";let qc;const h3=typeof TextEncoder<"u";function Pd(e){if(h3)e=(qc||(qc=new TextEncoder)).encode(e);else{let n=0;const s=new Uint8Array(3*e.length);for(let r=0;r<e.length;r++){var t=e.charCodeAt(r);if(t<128)s[n++]=t;else{if(t<2048)s[n++]=t>>6|192;else{if(t>=55296&&t<=57343){if(t<=56319&&r<e.length){const i=e.charCodeAt(++r);if(i>=56320&&i<=57343){t=1024*(t-55296)+i-56320+65536,s[n++]=t>>18|240,s[n++]=t>>12&63|128,s[n++]=t>>6&63|128,s[n++]=63&t|128;continue}r--}t=65533}s[n++]=t>>12|224,s[n++]=t>>6&63|128}s[n++]=63&t|128}}e=n===s.length?s:s.subarray(0,n)}return e}var ll,Si;e:{for(var Xc=["CLOSURE_FLAGS"],Go=Gs,jo=0;jo<Xc.length;jo++)if((Go=Go[Xc[jo]])==null){Si=null;break e}Si=Go}var Nr,Jc=Si&&Si[610401301];ll=Jc!=null&&Jc;const Zc=Gs.navigator;function ya(e){return!!ll&&!!Nr&&Nr.brands.some((({brand:t})=>t&&t.indexOf(e)!=-1))}function Gt(e){var t;return(t=Gs.navigator)&&(t=t.userAgent)||(t=""),t.indexOf(e)!=-1}function Wn(){return!!ll&&!!Nr&&Nr.brands.length>0}function Vo(){return Wn()?ya("Chromium"):(Gt("Chrome")||Gt("CriOS"))&&!(!Wn()&&Gt("Edge"))||Gt("Silk")}function Yi(e){return Yi[" "](e),e}Nr=Zc&&Zc.userAgentData||null,Yi[" "]=function(){};var p3=!Wn()&&(Gt("Trident")||Gt("MSIE"));!Gt("Android")||Vo(),Vo(),Gt("Safari")&&(Vo()||!Wn()&&Gt("Coast")||!Wn()&&Gt("Opera")||!Wn()&&Gt("Edge")||(Wn()?ya("Microsoft Edge"):Gt("Edg/"))||Wn()&&ya("Opera"));var Ld={},_r=null;function g3(e){const t=e.length;let n=3*t/4;n%3?n=Math.floor(n):"=.".indexOf(e[t-1])!=-1&&(n="=.".indexOf(e[t-2])!=-1?n-2:n-1);const s=new Uint8Array(n);let r=0;return(function(i,o){function a(c){for(;l<i.length;){const u=i.charAt(l++),h=_r[u];if(h!=null)return h;if(!/^[\s\xa0]*$/.test(u))throw Error("Unknown base64 encoding at char: "+u)}return c}Rd();let l=0;for(;;){const c=a(-1),u=a(0),h=a(64),w=a(64);if(w===64&&c===-1)break;o(c<<2|u>>4),h!=64&&(o(u<<4&240|h>>2),w!=64&&o(h<<6&192|w))}})(e,(function(i){s[r++]=i})),r!==n?s.subarray(0,r):s}function Rd(){if(!_r){_r={};var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const s=e.concat(t[n].split(""));Ld[n]=s;for(let r=0;r<s.length;r++){const i=s[r];_r[i]===void 0&&(_r[i]=r)}}}}var Fd=typeof Uint8Array<"u",Nd=!p3&&typeof btoa=="function";function Qc(e){if(!Nd){var t;t===void 0&&(t=0),Rd(),t=Ld[t];var n=Array(Math.floor(e.length/3)),s=t[64]||"";let l=0,c=0;for(;l<e.length-2;l+=3){var r=e[l],i=e[l+1],o=e[l+2],a=t[r>>2];r=t[(3&r)<<4|i>>4],i=t[(15&i)<<2|o>>6],o=t[63&o],n[c++]=a+r+i+o}switch(a=0,o=s,e.length-l){case 2:o=t[(15&(a=e[l+1]))<<2]||s;case 1:e=e[l],n[c]=t[e>>2]+t[(3&e)<<4|a>>4]+o+s}return n.join("")}for(t="",n=0,s=e.length-10240;n<s;)t+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));return t+=String.fromCharCode.apply(null,n?e.subarray(n):e),btoa(t)}const eu=/[-_.]/g,m3={"-":"+",_:"/",".":"="};function v3(e){return m3[e]||""}function Ud(e){if(!Nd)return g3(e);eu.test(e)&&(e=e.replace(eu,v3)),e=atob(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function vs(e){return Fd&&e!=null&&e instanceof Uint8Array}var js={};function ys(){return tu||(tu=new In(null,js))}function cl(e){Bd(js);var t=e.g;return(t=t==null||vs(t)?t:typeof t=="string"?Ud(t):null)==null?t:e.g=t}var In=class{h(){return new Uint8Array(cl(this)||0)}constructor(e,t){if(Bd(t),this.g=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}};let tu,nu;function Bd(e){if(e!==js)throw Error("illegal external caller")}function Gd(e,t){e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity=t}function jd(e){return Gd(e=Error(e),"warning"),e}function ul(e){if(e!=null){var t=nu??(nu={}),n=t[e]||0;n>=5||(t[e]=n+1,Gd(e=Error(),"incident"),(function(s){Gs.setTimeout((()=>{throw s}),0)})(e))}}var qi=typeof Symbol=="function"&&typeof Symbol()=="symbol";function Qs(e,t,n=!1){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?n&&Symbol.for&&e?Symbol.for(e):e!=null?Symbol(e):Symbol():t}var y3=Qs("jas",void 0,!0),su=Qs(void 0,"0di"),dr=Qs(void 0,"1oa"),Vs=Qs(void 0,Symbol()),_3=Qs(void 0,"0actk"),Vd=Qs(void 0,"8utk");const K=qi?y3:"Ea",$d={Ea:{value:0,configurable:!0,writable:!0,enumerable:!1}},Hd=Object.defineProperties;function Xi(e,t){qi||K in e||Hd(e,$d),e[K]|=t}function ze(e,t){qi||K in e||Hd(e,$d),e[K]=t}function er(e){return Xi(e,34),e}function b3(e,t){ze(t,-15615&(0|e))}function _a(e,t){ze(t,-15581&(34|e))}function Ji(){return typeof BigInt=="function"}function _t(e){return Array.prototype.slice.call(e)}var fl,Wr={};function Zi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.constructor===Object}function dl(e,t){if(e!=null){if(typeof e=="string")e=e?new In(e,js):ys();else if(e.constructor!==In)if(vs(e))e=e.length?new In(new Uint8Array(e),js):ys();else{if(!t)throw Error();e=void 0}}return e}const ru=[];function ss(e){if(2&e)throw Error()}ze(ru,55),fl=Object.freeze(ru);class iu{constructor(t,n,s){this.g=t,this.h=n,this.l=s}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}function hl(e){return Vs?e[Vs]:void 0}var w3=Object.freeze({});function Qi(e){return e.Na=!0,e}var k3=Qi((e=>typeof e=="number")),ou=Qi((e=>typeof e=="string")),E3=Qi((e=>typeof e=="boolean")),eo=typeof Gs.BigInt=="function"&&typeof Gs.BigInt(0)=="bigint";function Jn(e){var t=e;if(ou(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(k3(t)&&!Number.isSafeInteger(t))throw Error(String(t));return eo?BigInt(e):e=E3(e)?e?"1":"0":ou(e)?e.trim()||"0":String(e)}var ba=Qi((e=>eo?e>=S3&&e<=x3:e[0]==="-"?au(e,A3):au(e,T3)));const A3=Number.MIN_SAFE_INTEGER.toString(),S3=eo?BigInt(Number.MIN_SAFE_INTEGER):void 0,T3=Number.MAX_SAFE_INTEGER.toString(),x3=eo?BigInt(Number.MAX_SAFE_INTEGER):void 0;function au(e,t){if(e.length>t.length)return!1;if(e.length<t.length||e===t)return!0;for(let n=0;n<e.length;n++){const s=e[n],r=t[n];if(s>r)return!1;if(s<r)return!0}}const I3=typeof Uint8Array.prototype.slice=="function";let Ti,ke=0,Be=0;function lu(e){const t=e>>>0;ke=t,Be=(e-t)/4294967296>>>0}function _s(e){if(e<0){lu(-e);const[t,n]=vl(ke,Be);ke=t>>>0,Be=n>>>0}else lu(e)}function pl(e){const t=Ti||(Ti=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),Be=0,ke=t.getUint32(0,!0)}function gl(e,t){const n=4294967296*t+(e>>>0);return Number.isSafeInteger(n)?n:Ur(e,t)}function ml(e,t){const n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),typeof(e=gl(e,t))=="number"?n?-e:e:n?"-"+e:e}function Ur(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=""+(4294967296*t+e);else Ji()?n=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(n=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,e>=1e7&&(n+=e/1e7>>>0,e%=1e7),n>=1e7&&(t+=n/1e7>>>0,n%=1e7),n=t+cu(n)+cu(e));return n}function cu(e){return e=String(e),"0000000".slice(e.length)+e}function zd(){var e=ke,t=Be;if(2147483648&t)if(Ji())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{const[n,s]=vl(e,t);e="-"+Ur(n,s)}else e=Ur(e,t);return e}function to(e){if(e.length<16)_s(Number(e));else if(Ji())e=BigInt(e),ke=Number(e&BigInt(4294967295))>>>0,Be=Number(e>>BigInt(32)&BigInt(4294967295));else{const t=+(e[0]==="-");Be=ke=0;const n=e.length;for(let s=t,r=(n-t)%6+t;r<=n;s=r,r+=6){const i=Number(e.slice(s,r));Be*=1e6,ke=1e6*ke+i,ke>=4294967296&&(Be+=Math.trunc(ke/4294967296),Be>>>=0,ke>>>=0)}if(t){const[s,r]=vl(ke,Be);ke=s,Be=r}}}function vl(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}const Br=typeof BigInt=="function"?BigInt.asIntN:void 0,C3=typeof BigInt=="function"?BigInt.asUintN:void 0,Zn=Number.isSafeInteger,no=Number.isFinite,$s=Math.trunc,M3=Jn(0);function rs(e){return e==null||typeof e=="number"?e:e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function Wd(e){return e==null||typeof e=="boolean"?e:typeof e=="number"?!!e:void 0}const D3=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Gr(e){switch(typeof e){case"bigint":return!0;case"number":return no(e);case"string":return D3.test(e);default:return!1}}function tr(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return no(e)?0|e:void 0}function Kd(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return no(e)?e>>>0:void 0}function uu(e){if(e[0]==="-")return!1;const t=e.length;return t<20||t===20&&Number(e.substring(0,6))<184467}function Yd(e){const t=e.length;return e[0]==="-"?t<20||t===20&&Number(e.substring(0,7))>-922337:t<19||t===19&&Number(e.substring(0,6))<922337}function qd(e){return Yd(e)?e:(to(e),zd())}function yl(e){return e=$s(e),Zn(e)||(_s(e),e=ml(ke,Be)),e}function Xd(e){var t=$s(Number(e));return Zn(t)?String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),qd(e))}function fu(e){var t=$s(Number(e));return Zn(t)?Jn(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),Ji()?Jn(Br(64,BigInt(e))):Jn(qd(e)))}function du(e){if(Zn(e))e=Jn(yl(e));else{if(e=$s(e),Zn(e))e=String(e);else{const t=String(e);Yd(t)?e=t:(_s(e),e=zd())}e=Jn(e)}return e}function wa(e){return e==null?e:typeof e=="bigint"?(ba(e)?e=Number(e):(e=Br(64,e),e=ba(e)?Number(e):String(e)),e):Gr(e)?typeof e=="number"?yl(e):Xd(e):void 0}function O3(e){if(e==null)return e;var t=typeof e;if(t==="bigint")return String(C3(64,e));if(Gr(e)){if(t==="string")return t=$s(Number(e)),Zn(t)&&t>=0?e=String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),uu(e)||(to(e),e=Ur(ke,Be))),e;if(t==="number")return(e=$s(e))>=0&&Zn(e)?e:(function(n){if(n<0){_s(n);var s=Ur(ke,Be);return n=Number(s),Zn(n)?n:s}return uu(s=String(n))?s:(_s(n),gl(ke,Be))})(e)}}function Jd(e){if(typeof e!="string")throw Error();return e}function nr(e){if(e!=null&&typeof e!="string")throw Error();return e}function Hs(e){return e==null||typeof e=="string"?e:void 0}function _l(e,t,n,s){if(e!=null&&typeof e=="object"&&e.W===Wr)return e;if(!Array.isArray(e))return n?2&s?((e=t[su])||(er((e=new t).u),e=t[su]=e),t=e):t=new t:t=void 0,t;let r=n=0|e[K];return r===0&&(r|=32&s),r|=2&s,r!==n&&ze(e,r),new t(e)}function P3(e,t,n){if(t)e:{if(!Gr(t=e))throw jd("int64");switch(typeof t){case"string":t=fu(t);break e;case"bigint":t=Jn(Br(64,t));break e;default:t=du(t)}}else e=typeof(t=e),t=t==null?t:e==="bigint"?Jn(Br(64,t)):Gr(t)?e==="string"?fu(t):du(t):void 0;return(e=t)==null?n?M3:void 0:e}function L3(e){return e}const R3={};let F3=(function(){try{return Yi(new class extends Map{constructor(){super()}}),!1}catch{return!0}})();class $o{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,n){return this.g.set(t,n),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,n){return this.g.forEach(t,n)}[Symbol.iterator](){return this.entries()}}const N3=F3?(Object.setPrototypeOf($o.prototype,Map.prototype),Object.defineProperties($o.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),$o):class extends Map{constructor(){super()}};function hu(e){return e}function Ho(e){if(2&e.M)throw Error("Cannot mutate an immutable Map")}var pn=class extends N3{constructor(e,t,n=hu,s=hu){super();let r=0|e[K];r|=64,ze(e,r),this.M=r,this.I=t,this.S=n,this.X=this.I?U3:s;for(let i=0;i<e.length;i++){const o=e[i],a=n(o[0],!1,!0);let l=o[1];t?l===void 0&&(l=null):l=s(o[1],!1,!0,void 0,void 0,r),super.set(a,l)}}La(){var e=j3;if(this.size!==0)return Array.from(super.entries(),(t=>(t[0]=e(t[0]),t[1]=e(t[1]),t)))}da(e=B3){const t=[],n=super.entries();for(var s;!(s=n.next()).done;)(s=s.value)[0]=e(s[0]),s[1]=e(s[1]),t.push(s);return t}clear(){Ho(this),super.clear()}delete(e){return Ho(this),super.delete(this.S(e,!0,!1))}entries(){if(this.I){var e=super.keys();e=new iu(e,G3,this)}else e=super.entries();return e}values(){if(this.I){var e=super.keys();e=new iu(e,pn.prototype.get,this)}else e=super.values();return e}forEach(e,t){this.I?super.forEach(((n,s,r)=>{e.call(t,r.get(s),s,r)})):super.forEach(e,t)}set(e,t){return Ho(this),(e=this.S(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.X(t,!0,!0,this.I,!1,this.M))}Ja(e){const t=this.S(e[0],!1,!0);e=e[1],e=this.I?e===void 0?null:e:this.X(e,!1,!0,void 0,!1,this.M),super.set(t,e)}has(e){return super.has(this.S(e,!1,!1))}get(e){e=this.S(e,!1,!1);const t=super.get(e);if(t!==void 0){var n=this.I;return n?((n=this.X(t,!1,!0,n,this.pa,this.M))!==t&&super.set(e,n),n):t}}[Symbol.iterator](){return this.entries()}};function U3(e,t,n,s,r,i){return e=_l(e,s,n,i),r&&(e=io(e)),e}function B3(e){return e}function G3(e){return[e,this.get(e)]}let pu,Zd,ka,gu;function mu(){return pu||(pu=new pn(er([]),void 0,void 0,void 0,R3))}function Ea(e,t,n,s,r){if(e!=null){if(Array.isArray(e)){const i=0|e[K];return e.length===0&&1&i?void 0:r&&2&i?e:so(e,t,n,s!==void 0,r)}return t(e,s)}}function so(e,t,n,s,r){const i=s||n?0|e[K]:0,o=s?!!(32&i):void 0;let a=0;const l=(s=_t(e)).length;for(let M=0;M<l;M++){var c=s[M];if(M===l-1&&Zi(c)){var u=t,h=n,w=o,I=r;let D;for(let _ in c){const v=Ea(c[_],u,h,w,I);v!=null&&((D??(D={}))[_]=v)}c=D}else c=Ea(s[M],t,n,o,r);s[M]=c,c!=null&&(a=M+1)}return a<l&&(s.length=a),n&&((e=hl(e))&&(s[Vs]=_t(e)),n(i,s)),s}function j3(e){return Ea(e,bl,void 0,void 0,!1)}function bl(e){switch(typeof e){case"number":return Number.isFinite(e)?e:""+e;case"bigint":return ba(e)?Number(e):""+e;case"boolean":return e?1:0;case"object":if(vs(e))return vs(e)&&ul(Vd),Qc(e);if(e.W===Wr)return Qd(e);if(e instanceof In){const t=e.g;return t==null?"":typeof t=="string"?t:e.g=Qc(t)}return e instanceof pn?e.La():void 0}return e}function Qd(e){var t=e.u;e=so(t,bl,void 0,void 0,!1);var n=0|t[K];if((t=e.length)&&!(512&n)){var s=e[t-1],r=!1;Zi(s)?(t--,r=!0):s=void 0;var i=t-(n=512&n?0:-1),o=(Zd??L3)(i,n,e,s);if(s&&(e[t]=void 0),i<o&&s){for(var a in i=!0,s){const l=+a;l<=o?(e[r=l+n]=s[a],t=Math.max(r+1,t),r=!1,delete s[a]):i=!1}i&&(s=void 0)}for(i=t-1;t>0;i=t-1)if((a=e[i])==null)t--,r=!0;else{if(!((i-=n)>=o))break;(s??(s={}))[i]=a,t--,r=!0}r&&(e.length=t),s&&e.push(s)}return e}function Qn(e,t,n){return e=eh(e,t[0],t[1],n?1:2),t!==ka&&n&&Xi(e,8192),e}function eh(e,t,n,s){if(e==null){var r=96;n?(e=[n],r|=512):e=[],t&&(r=-16760833&r|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error("narr");if(8192&(r=0|e[K])||!(64&r)||2&r||ul(_3),1024&r)throw Error("farr");if(64&r)return e;if(s===1||s===2||(r|=64),n&&(r|=512,n!==e[0]))throw Error("mid");e:{var i=(n=e).length;if(i){var o=i-1;if(Zi(s=n[o])){if((o-=t=512&(r|=256)?0:-1)>=1024)throw Error("pvtlmt");for(var a in s)(i=+a)<o&&(n[i+t]=s[a],delete s[a]);r=-16760833&r|(1023&o)<<14;break e}}if(t){if((a=Math.max(t,i-(512&r?0:-1)))>1024)throw Error("spvt");r=-16760833&r|(1023&a)<<14}}}return ze(e,r),e}function Aa(e,t,n=_a){if(e!=null){if(Fd&&e instanceof Uint8Array)return t?e:new Uint8Array(e);if(Array.isArray(e)){var s=0|e[K];return 2&s?e:(t&&(t=s===0||!!(32&s)&&!(64&s||!(16&s))),t?(ze(e,34|s),4&s&&Object.freeze(e),e):so(e,Aa,4&s?_a:n,!0,!0))}return e.W===Wr?e=2&(s=0|(n=e.u)[K])?e:new e.constructor(ro(n,s,!0)):e instanceof pn&&!(2&e.M)&&(n=er(e.da(Aa)),e=new pn(n,e.I,e.S,e.X)),e}}function ro(e,t,n){const s=n||2&t?_a:b3,r=!!(32&t);return e=(function(i,o,a){const l=_t(i);var c=l.length;const u=256&o?l[c-1]:void 0;for(c+=u?-1:0,o=512&o?1:0;o<c;o++)l[o]=a(l[o]);if(u){o=l[o]={};for(const h in u)o[h]=a(u[h])}return(i=hl(i))&&(l[Vs]=_t(i)),l})(e,t,(i=>Aa(i,r,s))),Xi(e,32|(n?2:0)),e}function io(e){const t=e.u,n=0|t[K];return 2&n?new e.constructor(ro(t,n,!1)):e}function zs(e,t){return Nn(e=e.u,0|e[K],t)}function Nn(e,t,n){if(n===-1)return null;const s=n+(512&t?0:-1),r=e.length-1;return s>=r&&256&t?e[r][n]:s<=r?e[s]:void 0}function Te(e,t,n){const s=e.u;let r=0|s[K];return ss(r),Ne(s,r,t,n),e}function Ne(e,t,n,s){const r=512&t?0:-1,i=n+r;var o=e.length-1;return i>=o&&256&t?(e[o][n]=s,t):i<=o?(e[i]=s,t):(s!==void 0&&(n>=(o=t>>14&1023||536870912)?s!=null&&(e[o+r]={[n]:s},ze(e,t|=256)):e[i]=s),t)}function ui(e,t){let n=0|(e=e.u)[K];const s=Nn(e,n,t),r=rs(s);return r!=null&&r!==s&&Ne(e,n,t,r),r}function th(e){let t=0|(e=e.u)[K];const n=Nn(e,t,1),s=dl(n,!0);return s!=null&&s!==n&&Ne(e,t,1,s),s}function ds(){return w3===void 0?2:4}function hs(e,t,n,s,r){const i=e.u,o=2&(e=0|i[K])?1:s;r=!!r;let a=0|(s=wl(i,e,t))[K];if(!(4&a)){4&a&&(s=_t(s),a=Cn(a,e),e=Ne(i,e,t,s));let l=0,c=0;for(;l<s.length;l++){const u=n(s[l]);u!=null&&(s[c++]=u)}c<l&&(s.length=c),a=kl(a,e),n=-2049&(20|a),a=n&=-4097,ze(s,a),2&a&&Object.freeze(s)}return o===1||o===4&&32&a?Sn(a)||(r=a,a|=2,a!==r&&ze(s,a),Object.freeze(s)):(o===2&&Sn(a)&&(s=_t(s),a=Cn(a,e),a=es(a,e,r),ze(s,a),e=Ne(i,e,t,s)),Sn(a)||(t=a,a=es(a,e,r),a!==t&&ze(s,a))),s}function wl(e,t,n){return e=Nn(e,t,n),Array.isArray(e)?e:fl}function kl(e,t){return e===0&&(e=Cn(e,t)),1|e}function Sn(e){return!!(2&e)&&!!(4&e)||!!(1024&e)}function nh(e){e=_t(e);for(let t=0;t<e.length;t++){const n=e[t]=_t(e[t]);Array.isArray(n[1])&&(n[1]=er(n[1]))}return e}function Sa(e,t,n,s){let r=0|(e=e.u)[K];ss(r),Ne(e,r,t,(s==="0"?Number(n)===0:n===s)?void 0:n)}function sr(e,t,n,s){ss(t);let r=wl(e,t,n);const i=r!==fl;if(64&t||!(8192&t)||!i){const o=i?0|r[K]:0;let a=o;(!i||2&a||Sn(a)||4&a&&!(32&a))&&(r=_t(r),a=Cn(a,t),t=Ne(e,t,n,r)),a=-13&kl(a,t),a=es(s?-17&a:16|a,t,!0),a!==o&&ze(r,a)}return r}function zo(e,t){var n=Vh;return Al(El(e=e.u),e,0|e[K],n)===t?t:-1}function El(e){if(qi)return e[dr]??(e[dr]=new Map);if(dr in e)return e[dr];const t=new Map;return Object.defineProperty(e,dr,{value:t}),t}function sh(e,t,n,s){const r=El(e),i=Al(r,e,t,n);return i!==s&&(i&&(t=Ne(e,t,i)),r.set(n,s)),t}function Al(e,t,n,s){let r=e.get(s);if(r!=null)return r;r=0;for(let i=0;i<s.length;i++){const o=s[i];Nn(t,n,o)!=null&&(r!==0&&(n=Ne(t,n,r)),r=o)}return e.set(s,r),r}function Sl(e,t,n){let s=0|e[K];const r=Nn(e,s,n);let i;if(r!=null&&r.W===Wr)return(t=io(r))!==r&&Ne(e,s,n,t),t.u;if(Array.isArray(r)){const o=0|r[K];i=2&o?Qn(ro(r,o,!1),t,!0):64&o?r:Qn(i,t,!0)}else i=Qn(void 0,t,!0);return i!==r&&Ne(e,s,n,i),i}function rh(e,t,n){let s=0|(e=e.u)[K];const r=Nn(e,s,n);return(t=_l(r,t,!1,s))!==r&&t!=null&&Ne(e,s,n,t),t}function ue(e,t,n){if((t=rh(e,t,n))==null)return t;let s=0|(e=e.u)[K];if(!(2&s)){const r=io(t);r!==t&&Ne(e,s,n,t=r)}return t}function ih(e,t,n,s,r,i,o){e=e.u;var a=!!(2&t);const l=a?1:r;i=!!i,o&&(o=!a);var c=0|(r=wl(e,t,s))[K];if(!(a=!!(4&c))){var u=r,h=t;const w=!!(2&(c=kl(c,t)));w&&(h|=2);let I=!w,M=!0,D=0,_=0;for(;D<u.length;D++){const v=_l(u[D],n,!1,h);if(v instanceof n){if(!w){const k=!!(2&(0|v.u[K]));I&&(I=!k),M&&(M=k)}u[_++]=v}}_<D&&(u.length=_),c|=4,c=M?16|c:-17&c,ze(u,c=I?8|c:-9&c),w&&Object.freeze(u)}if(o&&!(8&c||!r.length&&(l===1||l===4&&32&c))){for(Sn(c)&&(r=_t(r),c=Cn(c,t),t=Ne(e,t,s,r)),n=r,o=c,u=0;u<n.length;u++)(c=n[u])!==(h=io(c))&&(n[u]=h);o|=8,ze(n,o=n.length?-17&o:16|o),c=o}return l===1||l===4&&32&c?Sn(c)||(t=c,(c|=!r.length||16&c&&(!a||32&c)?2:1024)!==t&&ze(r,c),Object.freeze(r)):(l===2&&Sn(c)&&(ze(r=_t(r),c=es(c=Cn(c,t),t,i)),t=Ne(e,t,s,r)),Sn(c)||(s=c,(c=es(c,t,i))!==s&&ze(r,c))),r}function Ln(e,t,n){const s=0|e.u[K];return ih(e,s,t,n,ds(),!1,!(2&s))}function q(e,t,n,s){return s==null&&(s=void 0),Te(e,n,s)}function Ir(e,t,n,s){s==null&&(s=void 0);e:{let r=0|(e=e.u)[K];if(ss(r),s==null){const i=El(e);if(Al(i,e,r,n)!==t)break e;i.set(n,0)}else r=sh(e,r,n,t);Ne(e,r,t,s)}}function Cn(e,t){return-1025&(e=32|(2&t?2|e:-3&e))}function es(e,t,n){return 32&t&&n||(e&=-33),e}function oo(e,t,n){ss(0|e.u[K]),hs(e,t,Hs,2,!0).push(Jd(n))}function xi(e,t,n,s){const r=0|e.u[K];ss(r),e=ih(e,r,n,t,2,!0),s=s??new n,e.push(s),e[K]=2&(0|s.u[K])?-9&e[K]:-17&e[K]}function jt(e,t){return tr(zs(e,t))}function Vt(e,t){return Hs(zs(e,t))}function $e(e,t){return ui(e,t)??0}function jr(e,t,n){if(n!=null&&typeof n!="boolean")throw e=typeof n,Error(`Expected boolean but got ${e!="object"?e:n?Array.isArray(n)?"array":e:"null"}: ${n}`);Te(e,t,n)}function gn(e,t,n){if(n!=null){if(typeof n!="number"||!no(n))throw jd("int32");n|=0}Te(e,t,n)}function V(e,t,n){if(n!=null&&typeof n!="number")throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Te(e,t,n)}function Ii(e,t,n){{const o=e.u;let a=0|o[K];if(ss(a),n==null)Ne(o,a,t);else{var s=e=0|n[K],r=Sn(e),i=r||Object.isFrozen(n);for(r||(e=0),i||(n=_t(n),s=0,e=es(e=Cn(e,a),a,!0),i=!1),e|=21,r=0;r<n.length;r++){const l=n[r],c=Jd(l);Object.is(l,c)||(i&&(n=_t(n),s=0,e=es(e=Cn(e,a),a,!0),i=!1),n[r]=c)}e!==s&&(i&&(n=_t(n),e=es(e=Cn(e,a),a,!0)),ze(n,e)),Ne(o,a,t,n)}}}function oh(e,t){return Error(`Invalid wire type: ${e} (at position ${t})`)}function Tl(){return Error("Failed to read varint, encoding is invalid.")}function ah(e,t){return Error(`Tried to read past the end of the data ${t} > ${e}`)}function xl(e){if(typeof e=="string")return{buffer:Ud(e),O:!1};if(Array.isArray(e))return{buffer:new Uint8Array(e),O:!1};if(e.constructor===Uint8Array)return{buffer:e,O:!1};if(e.constructor===ArrayBuffer)return{buffer:new Uint8Array(e),O:!1};if(e.constructor===In)return{buffer:cl(e)||new Uint8Array(0),O:!0};if(e instanceof Uint8Array)return{buffer:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),O:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function Il(e,t){let n,s=0,r=0,i=0;const o=e.h;let a=e.g;do n=o[a++],s|=(127&n)<<i,i+=7;while(i<32&&128&n);for(i>32&&(r|=(127&n)>>4),i=3;i<32&&128&n;i+=7)n=o[a++],r|=(127&n)<<i;if(ms(e,a),n<128)return t(s>>>0,r>>>0);throw Tl()}function Cl(e){let t=0,n=e.g;const s=n+10,r=e.h;for(;n<s;){const i=r[n++];if(t|=i,(128&i)==0)return ms(e,n),!!(127&t)}throw Tl()}function ts(e){const t=e.h;let n=e.g,s=t[n++],r=127&s;if(128&s&&(s=t[n++],r|=(127&s)<<7,128&s&&(s=t[n++],r|=(127&s)<<14,128&s&&(s=t[n++],r|=(127&s)<<21,128&s&&(s=t[n++],r|=s<<28,128&s&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw Tl();return ms(e,n),r}function Rn(e){return ts(e)>>>0}function Ta(e){var t=e.h;const n=e.g,s=t[n],r=t[n+1],i=t[n+2];return t=t[n+3],ms(e,e.g+4),(s<<0|r<<8|i<<16|t<<24)>>>0}function xa(e){var t=Ta(e);e=2*(t>>31)+1;const n=t>>>23&255;return t&=8388607,n==255?t?NaN:e*(1/0):n==0?1401298464324817e-60*e*t:e*Math.pow(2,n-150)*(t+8388608)}function V3(e){return ts(e)}function Wo(e,t,{aa:n=!1}={}){e.aa=n,t&&(t=xl(t),e.h=t.buffer,e.m=t.O,e.j=0,e.l=e.h.length,e.g=e.j)}function ms(e,t){if(e.g=t,t>e.l)throw ah(e.l,t)}function lh(e,t){if(t<0)throw Error(`Tried to read a negative byte length: ${t}`);const n=e.g,s=n+t;if(s>e.l)throw ah(t,e.l-n);return e.g=s,n}function ch(e,t){if(t==0)return ys();var n=lh(e,t);return e.aa&&e.m?n=e.h.subarray(n,n+t):(e=e.h,n=n===(t=n+t)?new Uint8Array(0):I3?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?ys():new In(n,js)}pn.prototype.toJSON=void 0;var vu=[];function uh(e){var t=e.g;if(t.g==t.l)return!1;e.l=e.g.g;var n=Rn(e.g);if(t=n>>>3,!((n&=7)>=0&&n<=5))throw oh(n,e.l);if(t<1)throw Error(`Invalid field number: ${t} (at position ${e.l})`);return e.m=t,e.h=n,!0}function fi(e){switch(e.h){case 0:e.h!=0?fi(e):Cl(e.g);break;case 1:ms(e=e.g,e.g+8);break;case 2:if(e.h!=2)fi(e);else{var t=Rn(e.g);ms(e=e.g,e.g+t)}break;case 5:ms(e=e.g,e.g+4);break;case 3:for(t=e.m;;){if(!uh(e))throw Error("Unmatched start-group tag: stream EOF");if(e.h==4){if(e.m!=t)throw Error("Unmatched end-group tag");break}fi(e)}break;default:throw oh(e.h,e.l)}}function Kr(e,t,n){const s=e.g.l,r=Rn(e.g),i=e.g.g+r;let o=i-s;if(o<=0&&(e.g.l=i,n(t,e,void 0,void 0,void 0),o=i-e.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${r} bytes, instead read ${r-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return e.g.g=i,e.g.l=s,t}function Ml(e){var t=Rn(e.g),n=lh(e=e.g,t);if(e=e.h,d3){var s,r=e;(s=Bo)||(s=Bo=new TextDecoder("utf-8",{fatal:!0})),t=n+t,r=n===0&&t===r.length?r:r.subarray(n,t);try{var i=s.decode(r)}catch(a){if(ei===void 0){try{s.decode(new Uint8Array([128]))}catch{}try{s.decode(new Uint8Array([97])),ei=!0}catch{ei=!1}}throw!ei&&(Bo=void 0),a}}else{t=(i=n)+t,n=[];let a,l=null;for(;i<t;){var o=e[i++];o<128?n.push(o):o<224?i>=t?ls():(a=e[i++],o<194||(192&a)!=128?(i--,ls()):n.push((31&o)<<6|63&a)):o<240?i>=t-1?ls():(a=e[i++],(192&a)!=128||o===224&&a<160||o===237&&a>=160||(192&(s=e[i++]))!=128?(i--,ls()):n.push((15&o)<<12|(63&a)<<6|63&s)):o<=244?i>=t-2?ls():(a=e[i++],(192&a)!=128||a-144+(o<<28)>>30!=0||(192&(s=e[i++]))!=128||(192&(r=e[i++]))!=128?(i--,ls()):(o=(7&o)<<18|(63&a)<<12|(63&s)<<6|63&r,o-=65536,n.push(55296+(o>>10&1023),56320+(1023&o)))):ls(),n.length>=8192&&(l=Yc(l,n),n.length=0)}i=Yc(l,n)}return i}function fh(e){const t=Rn(e.g);return ch(e.g,t)}function ao(e,t,n){var s=Rn(e.g);for(s=e.g.g+s;e.g.g<s;)n.push(t(e.g))}var ti=[];function Xt(e,t,n){t.g?t.m(e,t.g,t.h,n):t.m(e,t.h,n)}var j=class{constructor(e,t){this.u=eh(e,t)}toJSON(){try{var e=Qd(this)}finally{Zd=void 0}return e}l(){var e=k0;return e.g?e.l(this,e.g,e.h):e.l(this,e.h,e.defaultValue)}clone(){const e=this.u;return new this.constructor(ro(e,0|e[K],!1))}O(){return!!(2&(0|this.u[K]))}};function yu(e){return e?/^\d+$/.test(e)?(to(e),new Ia(ke,Be)):null:_u||(_u=new Ia(0,0))}j.prototype.W=Wr,j.prototype.toString=function(){return this.u.toString()};var Ia=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let _u;function bu(e){return e?/^-?\d+$/.test(e)?(to(e),new Ca(ke,Be)):null:wu||(wu=new Ca(0,0))}var Ca=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let wu;function Rs(e,t,n){for(;n>0||t>127;)e.g.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.g.push(t)}function rr(e,t){for(;t>127;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function lo(e,t){if(t>=0)rr(e,t);else{for(let n=0;n<9;n++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function Vr(e,t){e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function Ws(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function Lt(e,t,n){rr(e.g,8*t+n)}function Dl(e,t){return Lt(e,t,2),t=e.g.end(),Ws(e,t),t.push(e.h),t}function Ol(e,t){var n=t.pop();for(n=e.h+e.g.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.h++;t.push(n),e.h++}function co(e,t,n){Lt(e,t,2),rr(e.g,n.length),Ws(e,e.g.end()),Ws(e,n)}function Ci(e,t,n,s){n!=null&&(t=Dl(e,t),s(n,e),Ol(e,t))}function Jt(){const e=class{constructor(){throw Error()}};return Object.setPrototypeOf(e,e.prototype),e}var Pl=Jt(),dh=Jt(),Ll=Jt(),Rl=Jt(),hh=Jt(),ph=Jt(),Fl=Jt(),gh=Jt(),mh=Jt(),ir=class{constructor(e,t,n){this.g=e,this.h=t,e=Pl,this.l=!!e&&n===e||!1}};function uo(e,t){return new ir(e,t,Pl)}function vh(e,t,n,s,r){Ci(e,n,_h(t,s),r)}const $3=uo((function(e,t,n,s,r){return e.h===2&&(Kr(e,Sl(t,s,n),r),!0)}),vh),H3=uo((function(e,t,n,s,r){return e.h===2&&(Kr(e,Sl(t,s,n),r),!0)}),vh);var fo=Symbol(),Nl=Symbol(),ku=Symbol(),Eu=Symbol();let Ma,Da;function ws(e,t,n,s){var r=s[e];if(r)return r;(r={}).Ma=s,r.T=(function(h){switch(typeof h){case"boolean":return ka||(ka=[0,void 0,!0]);case"number":return h>0?void 0:h===0?gu||(gu=[0,void 0]):[-h,void 0];case"string":return[0,h];case"object":return h}})(s[0]);var i=s[1];let o=1;i&&i.constructor===Object&&(r.ga=i,typeof(i=s[++o])=="function"&&(r.la=!0,Ma??(Ma=i),Da??(Da=s[o+1]),i=s[o+=2]));const a={};for(;i&&Array.isArray(i)&&i.length&&typeof i[0]=="number"&&i[0]>0;){for(var l=0;l<i.length;l++)a[i[l]]=i;i=s[++o]}for(l=1;i!==void 0;){let h;typeof i=="number"&&(l+=i,i=s[++o]);var c=void 0;if(i instanceof ir?h=i:(h=$3,o--),h==null?void 0:h.l){i=s[++o],c=s;var u=o;typeof i=="function"&&(i=i(),c[u]=i),c=i}for(u=l+1,typeof(i=s[++o])=="number"&&i<0&&(u-=i,i=s[++o]);l<u;l++){const w=a[l];c?n(r,l,h,c,w):t(r,l,h,w)}}return s[e]=r}function yh(e){return Array.isArray(e)?e[0]instanceof ir?e:[H3,e]:[e,void 0]}function _h(e,t){return e instanceof j?e.u:Array.isArray(e)?Qn(e,t,!1):void 0}function Ul(e,t,n,s){const r=n.g;e[t]=s?(i,o,a)=>r(i,o,a,s):r}function Bl(e,t,n,s,r){const i=n.g;let o,a;e[t]=(l,c,u)=>i(l,c,u,a||(a=ws(Nl,Ul,Bl,s).T),o||(o=Gl(s)),r)}function Gl(e){let t=e[ku];if(t!=null)return t;const n=ws(Nl,Ul,Bl,e);return t=n.la?(s,r)=>Ma(s,r,n):(s,r)=>{const i=0|s[K];for(;uh(r)&&r.h!=4;){var o=r.m,a=n[o];if(a==null){var l=n.ga;l&&(l=l[o])&&(l=z3(l))!=null&&(a=n[o]=l)}a!=null&&a(r,s,o)||(o=(a=r).l,fi(a),a.fa?a=void 0:(l=a.g.g-o,a.g.g=o,a=ch(a.g,l)),o=s,a&&((l=o[Vs])?l.push(a):o[Vs]=[a]))}return 8192&i&&er(s),!0},e[ku]=t}function z3(e){const t=(e=yh(e))[0].g;if(e=e[1]){const n=Gl(e),s=ws(Nl,Ul,Bl,e).T;return(r,i,o)=>t(r,i,o,s,n)}return t}function ho(e,t,n){e[t]=n.h}function po(e,t,n,s){let r,i;const o=n.h;e[t]=(a,l,c)=>o(a,l,c,i||(i=ws(fo,ho,po,s).T),r||(r=bh(s)))}function bh(e){let t=e[Eu];if(!t){const n=ws(fo,ho,po,e);t=(s,r)=>wh(s,r,n),e[Eu]=t}return t}function wh(e,t,n){(function(s,r,i){const o=512&r?0:-1,a=s.length,l=a+((r=64&r?256&r:!!a&&Zi(s[a-1]))?-1:0);for(let c=0;c<l;c++)i(c-o,s[c]);if(r){s=s[a-1];for(const c in s)!isNaN(c)&&i(+c,s[c])}})(e,0|e[K]|(n.T[1]?512:0),((s,r)=>{if(r!=null){var i=(function(o,a){var l=o[a];if(l)return l;if((l=o.ga)&&(l=l[a])){var c=(l=yh(l))[0].h;if(l=l[1]){const u=bh(l),h=ws(fo,ho,po,l).T;l=o.la?Da(h,u):(w,I,M)=>c(w,I,M,h,u)}else l=c;return o[a]=l}})(n,s);i&&i(t,r,s)}})),(e=hl(e))&&(function(s,r){Ws(s,s.g.end());for(let i=0;i<r.length;i++)Ws(s,cl(r[i])||new Uint8Array(0))})(t,e)}function or(e,t){if(Array.isArray(t)){var n=0|t[K];if(4&n)return t;for(var s=0,r=0;s<t.length;s++){const i=e(t[s]);i!=null&&(t[r++]=i)}return r<s&&(t.length=r),ze(t,-6145&(5|n)),2&n&&Object.freeze(t),t}}function ht(e,t,n){return new ir(e,t,n)}function ar(e,t,n){return new ir(e,t,n)}function pt(e,t,n){Ne(e,0|e[K],t,n)}var W3=uo((function(e,t,n,s,r){return e.h===2&&(e=Kr(e,Qn([void 0,void 0],s,!0),r),ss(s=0|t[K]),(r=Nn(t,s,n))instanceof pn?(2&r.M)!=0?((r=r.da()).push(e),Ne(t,s,n,r)):r.Ja(e):Array.isArray(r)?(2&(0|r[K])&&Ne(t,s,n,r=nh(r)),r.push(e)):Ne(t,s,n,[e]),!0)}),(function(e,t,n,s,r){if(t instanceof pn)t.forEach(((i,o)=>{Ci(e,n,Qn([o,i],s,!1),r)}));else if(Array.isArray(t))for(let i=0;i<t.length;i++){const o=t[i];Array.isArray(o)&&Ci(e,n,Qn(o,s,!1),r)}}));function kh(e,t,n){if(t=(function(s){if(s==null)return s;const r=typeof s;if(r==="bigint")return String(Br(64,s));if(Gr(s)){if(r==="string")return Xd(s);if(r==="number")return yl(s)}})(t),t!=null&&(typeof t=="string"&&bu(t),t!=null))switch(Lt(e,n,0),typeof t){case"number":e=e.g,_s(t),Rs(e,ke,Be);break;case"bigint":n=BigInt.asUintN(64,t),n=new Ca(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Rs(e.g,n.h,n.g);break;default:n=bu(t),Rs(e.g,n.h,n.g)}}function Eh(e,t,n){(t=tr(t))!=null&&t!=null&&(Lt(e,n,0),lo(e.g,t))}function Ah(e,t,n){(t=Wd(t))!=null&&(Lt(e,n,0),e.g.g.push(t?1:0))}function Sh(e,t,n){(t=Hs(t))!=null&&co(e,n,Pd(t))}function Th(e,t,n,s,r){Ci(e,n,_h(t,s),r)}function xh(e,t,n){t==null||typeof t=="string"||t instanceof In||(vs(t)?vs(t)&&ul(Vd):t=void 0),t!=null&&co(e,n,xl(t).buffer)}function Ih(e,t,n){return(e.h===5||e.h===2)&&(t=sr(t,0|t[K],n,!1),e.h==2?ao(e,xa,t):t.push(xa(e.g)),!0)}var kn=ht((function(e,t,n){if(e.h!==1)return!1;var s=e.g;e=Ta(s);const r=Ta(s);s=2*(r>>31)+1;const i=r>>>20&2047;return e=4294967296*(1048575&r)+e,pt(t,n,i==2047?e?NaN:s*(1/0):i==0?5e-324*s*e:s*Math.pow(2,i-1075)*(e+4503599627370496)),!0}),(function(e,t,n){(t=rs(t))!=null&&(Lt(e,n,1),e=e.g,(n=Ti||(Ti=new DataView(new ArrayBuffer(8)))).setFloat64(0,+t,!0),ke=n.getUint32(0,!0),Be=n.getUint32(4,!0),Vr(e,ke),Vr(e,Be))}),Jt()),We=ht((function(e,t,n){return e.h===5&&(pt(t,n,xa(e.g)),!0)}),(function(e,t,n){(t=rs(t))!=null&&(Lt(e,n,5),e=e.g,pl(t),Vr(e,ke))}),Fl),K3=ar(Ih,(function(e,t,n){if((t=or(rs,t))!=null)for(let o=0;o<t.length;o++){var s=e,r=n,i=t[o];i!=null&&(Lt(s,r,5),s=s.g,pl(i),Vr(s,ke))}}),Fl),jl=ar(Ih,(function(e,t,n){if((t=or(rs,t))!=null&&t.length){Lt(e,n,2),rr(e.g,4*t.length);for(let s=0;s<t.length;s++)n=e.g,pl(t[s]),Vr(n,ke)}}),Fl),ns=ht((function(e,t,n){return e.h===0&&(pt(t,n,Il(e.g,ml)),!0)}),kh,ph),Ko=ht((function(e,t,n){return e.h===0&&(pt(t,n,(e=Il(e.g,ml))===0?void 0:e),!0)}),kh,ph),Y3=ht((function(e,t,n){return e.h===0&&(pt(t,n,Il(e.g,gl)),!0)}),(function(e,t,n){if((t=O3(t))!=null&&(typeof t=="string"&&yu(t),t!=null))switch(Lt(e,n,0),typeof t){case"number":e=e.g,_s(t),Rs(e,ke,Be);break;case"bigint":n=BigInt.asUintN(64,t),n=new Ia(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Rs(e.g,n.h,n.g);break;default:n=yu(t),Rs(e.g,n.h,n.g)}}),Jt()),Ge=ht((function(e,t,n){return e.h===0&&(pt(t,n,ts(e.g)),!0)}),Eh,Rl),go=ar((function(e,t,n){return(e.h===0||e.h===2)&&(t=sr(t,0|t[K],n,!1),e.h==2?ao(e,ts,t):t.push(ts(e.g)),!0)}),(function(e,t,n){if((t=or(tr,t))!=null&&t.length){n=Dl(e,n);for(let s=0;s<t.length;s++)lo(e.g,t[s]);Ol(e,n)}}),Rl),Cs=ht((function(e,t,n){return e.h===0&&(pt(t,n,(e=ts(e.g))===0?void 0:e),!0)}),Eh,Rl),Oe=ht((function(e,t,n){return e.h===0&&(pt(t,n,Cl(e.g)),!0)}),Ah,dh),Fs=ht((function(e,t,n){return e.h===0&&(pt(t,n,(e=Cl(e.g))===!1?void 0:e),!0)}),Ah,dh),rt=ar((function(e,t,n){return e.h===2&&(e=Ml(e),sr(t,0|t[K],n,!1).push(e),!0)}),(function(e,t,n){if((t=or(Hs,t))!=null)for(let o=0;o<t.length;o++){var s=e,r=n,i=t[o];i!=null&&co(s,r,Pd(i))}}),Ll),Kn=ht((function(e,t,n){return e.h===2&&(pt(t,n,(e=Ml(e))===""?void 0:e),!0)}),Sh,Ll),me=ht((function(e,t,n){return e.h===2&&(pt(t,n,Ml(e)),!0)}),Sh,Ll),Je=(function(e,t,n=Pl){return new ir(e,t,n)})((function(e,t,n,s,r){return e.h===2&&(s=Qn(void 0,s,!0),sr(t,0|t[K],n,!0).push(s),Kr(e,s,r),!0)}),(function(e,t,n,s,r){if(Array.isArray(t))for(let i=0;i<t.length;i++)Th(e,t[i],n,s,r)})),ge=uo((function(e,t,n,s,r,i){return e.h===2&&(sh(t,0|t[K],i,n),Kr(e,t=Sl(t,s,n),r),!0)}),Th),Ch=ht((function(e,t,n){return e.h===2&&(pt(t,n,fh(e)),!0)}),xh,gh),q3=ar((function(e,t,n){return(e.h===0||e.h===2)&&(t=sr(t,0|t[K],n,!1),e.h==2?ao(e,Rn,t):t.push(Rn(e.g)),!0)}),(function(e,t,n){if((t=or(Kd,t))!=null)for(let o=0;o<t.length;o++){var s=e,r=n,i=t[o];i!=null&&(Lt(s,r,0),rr(s.g,i))}}),hh),X3=ht((function(e,t,n){return e.h===0&&(pt(t,n,(e=Rn(e.g))===0?void 0:e),!0)}),(function(e,t,n){(t=Kd(t))!=null&&t!=null&&(Lt(e,n,0),rr(e.g,t))}),hh),Dt=ht((function(e,t,n){return e.h===0&&(pt(t,n,ts(e.g)),!0)}),(function(e,t,n){(t=tr(t))!=null&&(t=parseInt(t,10),Lt(e,n,0),lo(e.g,t))}),mh);class J3{constructor(t,n){this.h=t,this.g=n,this.l=ue,this.m=q,this.defaultValue=void 0}register(){Yi(this)}}function Zt(e,t){return new J3(e,t)}function is(e,t){return(n,s)=>{if(ti.length){const i=ti.pop();i.o(s),Wo(i.g,n,s),n=i}else n=new class{constructor(i,o){if(vu.length){const a=vu.pop();Wo(a,i,o),i=a}else i=new class{constructor(a,l){this.h=null,this.m=!1,this.g=this.l=this.j=0,Wo(this,a,l)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.aa=!1}}(i,o);this.g=i,this.l=this.g.g,this.h=this.m=-1,this.o(o)}o({fa:i=!1}={}){this.fa=i}}(n,s);try{const i=new e,o=i.u;Gl(t)(o,n);var r=i}finally{n.g.clear(),n.m=-1,n.h=-1,ti.length<100&&ti.push(n)}return r}}function mo(e){return function(){const t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const o=this.g;return this.g=[],o}}}};wh(this.u,t,ws(fo,ho,po,e)),Ws(t,t.g.end());const n=new Uint8Array(t.h),s=t.l,r=s.length;let i=0;for(let o=0;o<r;o++){const a=s[o];n.set(a,i),i+=a.length}return t.l=[n],n}}var Au=class extends j{constructor(e){super(e)}},Su=[0,Kn,ht((function(e,t,n){return e.h===2&&(pt(t,n,(e=fh(e))===ys()?void 0:e),!0)}),(function(e,t,n){if(t!=null){if(t instanceof j){const s=t.Oa;return void(s&&(t=s(t),t!=null&&co(e,n,xl(t).buffer)))}if(Array.isArray(t))return}xh(e,t,n)}),gh)];let Yo,Tu=globalThis.trustedTypes;function xu(e){Yo===void 0&&(Yo=(function(){let n=null;if(!Tu)return n;try{const s=r=>r;n=Tu.createPolicy("goog#html",{createHTML:s,createScript:s,createScriptURL:s})}catch{}return n})());var t=Yo;return new class{constructor(n){this.g=n}toString(){return this.g+""}}(t?t.createScriptURL(e):e)}function Z3(e,...t){if(t.length===0)return xu(e[0]);let n=e[0];for(let s=0;s<t.length;s++)n+=encodeURIComponent(t[s])+e[s+1];return xu(n)}var Mh=[0,Ge,Dt,Oe,-1,go,Dt,-1],Q3=class extends j{constructor(e){super(e)}},Dh=[0,Oe,me,Oe,Dt,-1,ar((function(e,t,n){return(e.h===0||e.h===2)&&(t=sr(t,0|t[K],n,!1),e.h==2?ao(e,V3,t):t.push(ts(e.g)),!0)}),(function(e,t,n){if((t=or(tr,t))!=null&&t.length){n=Dl(e,n);for(let s=0;s<t.length;s++)lo(e.g,t[s]);Ol(e,n)}}),mh),me,-1,[0,Oe,-1],Dt,Oe,-1],Oh=[0,me,-2],Iu=class extends j{constructor(e){super(e)}},Ph=[0],Lh=[0,Ge,Oe,1,Oe,-3],Pt=class extends j{constructor(e){super(e,2)}},Ke={};Ke[336783863]=[0,me,Oe,-1,Ge,[0,[1,2,3,4,5,6,7,8,9],ge,Ph,ge,Dh,ge,Oh,ge,Lh,ge,Mh,ge,[0,me,-2],ge,[0,me,Dt],ge,[0,Dt,me,-1],ge,[0,Dt,-1]],[0,me],Oe,[0,[1,3],[2,4],ge,[0,go],-1,ge,[0,rt],-1,Je,[0,me,-1]],me];var Cu=[0,Ko,-1,Fs,-3,Ko,go,Kn,Cs,Ko,-1,Fs,Cs,Fs,-2,Kn];function Rt(e,t){Sa(e,2,nr(t),"")}function xe(e,t){oo(e,3,t)}function ce(e,t){oo(e,4,t)}var dt=class extends j{constructor(e){super(e,500)}o(e){return q(this,0,7,e)}},Cr=[-1,{}],Mu=[0,me,1,Cr],Du=[0,me,rt,Cr];function Ft(e,t){xi(e,1,dt,t)}function Ce(e,t){oo(e,10,t)}function he(e,t){oo(e,15,t)}var wt=class extends j{constructor(e){super(e,500)}o(e){return q(this,0,1001,e)}},Rh=[-500,Je,[-500,Kn,-1,rt,-3,[-2,Ke,Oe],Je,Su,Cs,-1,Mu,Du,Je,[0,Kn,Fs],Kn,Cu,Cs,rt,987,rt],4,Je,[-500,me,-1,[-1,{}],998,me],Je,[-500,me,rt,-1,[-2,{},Oe],997,rt,-1],Cs,Je,[-500,me,rt,Cr,998,rt],rt,Cs,Mu,Du,Je,[0,Kn,-1,Cr],rt,-2,Cu,Kn,-1,Fs,[0,Fs,X3],978,Cr,Je,Su];wt.prototype.g=mo(Rh);var e0=is(wt,Rh),t0=class extends j{constructor(e){super(e)}},Fh=class extends j{constructor(e){super(e)}g(){return Ln(this,t0,1)}},Nh=[0,Je,[0,Ge,We,me,-1]],vo=is(Fh,Nh),n0=class extends j{constructor(e){super(e)}},s0=class extends j{constructor(e){super(e)}},qo=class extends j{constructor(e){super(e)}h(){return ue(this,n0,2)}g(){return Ln(this,s0,5)}},Uh=is(class extends j{constructor(e){super(e)}},[0,rt,go,jl,[0,Dt,[0,Ge,-3],[0,We,-3],[0,Ge,-1,[0,Je,[0,Ge,-2]]],Je,[0,We,-1,me,We]],me,-1,ns,Je,[0,Ge,We],rt,ns]),Bh=class extends j{constructor(e){super(e)}},Ns=is(class extends j{constructor(e){super(e)}},[0,Je,[0,We,-4]]),Gh=class extends j{constructor(e){super(e)}},Yr=is(class extends j{constructor(e){super(e)}},[0,Je,[0,We,-4]]),r0=class extends j{constructor(e){super(e)}},i0=[0,Ge,-1,jl,Dt],jh=class extends j{constructor(e){super(e)}};jh.prototype.g=mo([0,We,-4,ns]);var o0=class extends j{constructor(e){super(e)}},a0=is(class extends j{constructor(e){super(e)}},[0,Je,[0,1,Ge,me,Nh],ns]),Ou=class extends j{constructor(e){super(e)}},l0=class extends j{constructor(e){super(e)}ma(){return th(this)??ys()}},c0=class extends j{constructor(e){super(e)}},Vh=[1,2],u0=is(class extends j{constructor(e){super(e)}},[0,Je,[0,Vh,ge,[0,jl],ge,[0,Ch],Ge,me],ns]),Vl=class extends j{constructor(e){super(e)}},$h=[0,me,Ge,We,rt,-1],Pu=class extends j{constructor(e){super(e)}},f0=[0,Oe,-1],Lu=class extends j{constructor(e){super(e)}},di=[1,2,3,4,5],Mi=class extends j{constructor(e){super(e)}g(){return th(this)!=null}h(){return Vt(this,2)!=null}},Le=class extends j{constructor(e){super(e)}g(){return Wd(zs(this,2))??!1}},Hh=[0,Ch,me,[0,Ge,ns,-1],[0,Y3,ns]],He=[0,Hh,Oe,[0,di,ge,Lh,ge,Dh,ge,Mh,ge,Ph,ge,Oh],Dt],yo=class extends j{constructor(e){super(e)}},$l=[0,He,We,-1,Ge],d0=Zt(502141897,yo);Ke[502141897]=$l;var h0=is(class extends j{constructor(e){super(e)}},[0,[0,Dt,-1,K3,q3],i0]),zh=class extends j{constructor(e){super(e)}},Wh=class extends j{constructor(e){super(e)}},Hl=[0,He,We,[0,He],Oe],Kh=[0,He,$l,Hl,We,[0,[0,Hh]]],p0=Zt(508968150,Wh);Ke[508968150]=Kh,Ke[508968149]=Hl;var Yh=class extends j{constructor(e){super(e)}},g0=Zt(513916220,Yh);Ke[513916220]=[0,He,Kh,Ge];var Ts=class extends j{constructor(e){super(e)}h(){return ue(this,Vl,2)}g(){Te(this,2)}},qh=[0,He,$h];Ke[478825465]=qh;var m0=class extends j{constructor(e){super(e)}},Xh=class extends j{constructor(e){super(e)}},zl=class extends j{constructor(e){super(e)}},Wl=class extends j{constructor(e){super(e)}},Jh=class extends j{constructor(e){super(e)}},Ru=[0,He,[0,He],qh,-1],Zh=[0,He,We,Ge],Kl=[0,He,We],Qh=[0,He,Zh,Kl,We],v0=Zt(479097054,Jh);Ke[479097054]=[0,He,Qh,Ru],Ke[463370452]=Ru,Ke[464864288]=Zh;var y0=Zt(462713202,Wl);Ke[462713202]=Qh,Ke[474472470]=Kl;var _0=class extends j{constructor(e){super(e)}},e1=class extends j{constructor(e){super(e)}},t1=class extends j{constructor(e){super(e)}},n1=class extends j{constructor(e){super(e)}},Yl=[0,He,We,-1,Ge],Oa=[0,He,We,Oe];n1.prototype.g=mo([0,He,Kl,[0,He],$l,Hl,Yl,Oa]);var s1=class extends j{constructor(e){super(e)}},b0=Zt(456383383,s1);Ke[456383383]=[0,He,$h];var r1=class extends j{constructor(e){super(e)}},w0=Zt(476348187,r1);Ke[476348187]=[0,He,f0];var i1=class extends j{constructor(e){super(e)}},Fu=class extends j{constructor(e){super(e)}},o1=[0,Dt,-1],k0=Zt(458105876,class extends j{constructor(e){super(e)}g(){var e=this.u;const t=0|e[K],n=2&t;return e=(function(s,r,i){var o=Fu;const a=2&r;let l=!1;if(i==null){if(a)return mu();i=[]}else if(i.constructor===pn){if((2&i.M)==0||a)return i;i=i.da()}else Array.isArray(i)?l=!!(2&(0|i[K])):i=[];if(a){if(!i.length)return mu();l||(l=!0,er(i))}else l&&(l=!1,i=nh(i));return l||(64&(0|i[K])?i[K]&=-33:32&r&&Xi(i,32)),Ne(s,r,2,o=new pn(i,o,P3,void 0)),o})(e,t,Nn(e,t,2)),!n&&Fu&&(e.pa=!0),e}});Ke[458105876]=[0,o1,W3,[!0,ns,[0,me,-1,rt]]];var ql=class extends j{constructor(e){super(e)}},a1=Zt(458105758,ql);Ke[458105758]=[0,He,me,o1];var l1=class extends j{constructor(e){super(e)}},E0=Zt(443442058,l1);Ke[443442058]=[0,He,me,Ge,We,rt,-1,Oe,We],Ke[514774813]=Yl;var c1=class extends j{constructor(e){super(e)}},A0=Zt(516587230,c1);function Pa(e,t){return t=t?t.clone():new Vl,e.displayNamesLocale!==void 0?Te(t,1,nr(e.displayNamesLocale)):e.displayNamesLocale===void 0&&Te(t,1),e.maxResults!==void 0?gn(t,2,e.maxResults):"maxResults"in e&&Te(t,2),e.scoreThreshold!==void 0?V(t,3,e.scoreThreshold):"scoreThreshold"in e&&Te(t,3),e.categoryAllowlist!==void 0?Ii(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&Te(t,4),e.categoryDenylist!==void 0?Ii(t,5,e.categoryDenylist):"categoryDenylist"in e&&Te(t,5),t}function Xl(e,t=-1,n=""){return{categories:e.map((s=>({index:jt(s,1)??0??-1,score:$e(s,2)??0,categoryName:Vt(s,3)??""??"",displayName:Vt(s,4)??""??""}))),headIndex:t,headName:n}}function u1(e){var t,n,s=hs(e,3,rs,ds()),r=hs(e,2,tr,ds()),i=hs(e,1,Hs,ds()),o=hs(e,9,Hs,ds());const a={categories:[],keypoints:[]};for(let l=0;l<s.length;l++)a.categories.push({score:s[l],index:r[l]??-1,categoryName:i[l]??"",displayName:o[l]??""});if((s=(t=ue(e,qo,4))==null?void 0:t.h())&&(a.boundingBox={originX:jt(s,1)??0,originY:jt(s,2)??0,width:jt(s,3)??0,height:jt(s,4)??0,angle:0}),(n=ue(e,qo,4))==null?void 0:n.g().length)for(const l of ue(e,qo,4).g())a.keypoints.push({x:ui(l,1)??0,y:ui(l,2)??0,score:ui(l,4)??0,label:Vt(l,3)??""});return a}function _o(e){const t=[];for(const n of Ln(e,Gh,1))t.push({x:$e(n,1)??0,y:$e(n,2)??0,z:$e(n,3)??0,visibility:$e(n,4)??0});return t}function Mr(e){const t=[];for(const n of Ln(e,Bh,1))t.push({x:$e(n,1)??0,y:$e(n,2)??0,z:$e(n,3)??0,visibility:$e(n,4)??0});return t}function Nu(e){return Array.from(e,(t=>t>127?t-256:t))}function Uu(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let n=0,s=0,r=0;for(let i=0;i<e.length;i++)n+=e[i]*t[i],s+=e[i]*e[i],r+=t[i]*t[i];if(s<=0||r<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(s*r)}let ni;Ke[516587230]=[0,He,Yl,Oa,We],Ke[518928384]=Oa;const S0=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function f1(){if(ni===void 0)try{await WebAssembly.instantiate(S0),ni=!0}catch{ni=!1}return ni}async function hr(e,t=Z3``){const n=await f1()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${n}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var us=class{};function d1(){var e=navigator;return typeof OffscreenCanvas<"u"&&(!(function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")})(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&e.length>=1&&Number(e[1])>=17))}async function Bu(e){if(typeof importScripts!="function"){const t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise(((n,s)=>{t.addEventListener("load",(()=>{n()}),!1),t.addEventListener("error",(r=>{s(r)}),!1),document.body.appendChild(t)}))}importScripts(e.toString())}function h1(e){return e.videoWidth!==void 0?[e.videoWidth,e.videoHeight]:e.naturalWidth!==void 0?[e.naturalWidth,e.naturalHeight]:e.displayWidth!==void 0?[e.displayWidth,e.displayHeight]:[e.width,e.height]}function z(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function Gu(e,t,n){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(n?e.i._bindTextureToStream(n):e.i._bindTextureToCanvas(),!(n=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[s,r]=h1(t);return!e.l||s===e.i.canvas.width&&r===e.i.canvas.height||(e.i.canvas.width=s,e.i.canvas.height=r),[s,r]}function ju(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const s=new Uint32Array(t.length);for(let r=0;r<t.length;r++)s[r]=e.i.stringToNewUTF8(t[r]);t=e.i._malloc(4*s.length),e.i.HEAPU32.set(s,t>>2),n(t);for(const r of s)e.i._free(r);e.i._free(t)}function nn(e,t,n){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=n}function jn(e,t,n){let s=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(r,i,o)=>{i?(n(s,o),s=[]):s.push(r)}}us.forVisionTasks=function(e){return hr("vision",e)},us.forTextTasks=function(e){return hr("text",e)},us.forGenAiExperimentalTasks=function(e){return hr("genai_experimental",e)},us.forGenAiTasks=function(e){return hr("genai",e)},us.forAudioTasks=function(e){return hr("audio",e)},us.isSimdSupported=function(){return f1()};async function T0(e,t,n,s){return e=await(async(r,i,o,a,l)=>{if(i&&await Bu(i),!self.ModuleFactory||o&&(await Bu(o),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&l&&((i=self.Module).locateFile=l.locateFile,l.mainScriptUrlOrBlob&&(i.mainScriptUrlOrBlob=l.mainScriptUrlOrBlob)),l=await self.ModuleFactory(self.Module||l),self.ModuleFactory=self.Module=void 0,new r(l,a)})(e,n.wasmLoaderPath,n.assetLoaderPath,t,{locateFile:r=>r.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&r.endsWith(".data")?n.assetBinaryPath.toString():r}),await e.o(s),e}function Xo(e,t){const n=ue(e.baseOptions,Mi,1)||new Mi;typeof t=="string"?(Te(n,2,nr(t)),Te(n,1)):t instanceof Uint8Array&&(Te(n,1,dl(t,!1)),Te(n,2)),q(e.baseOptions,0,1,n)}function Vu(e){try{const t=e.G.length;if(t===1)throw Error(e.G[0].message);if(t>1)throw Error("Encountered multiple errors: "+e.G.map((n=>n.message)).join(", "))}finally{e.G=[]}}function U(e,t){e.B=Math.max(e.B,t)}function bo(e,t){e.A=new dt,Rt(e.A,"PassThroughCalculator"),xe(e.A,"free_memory"),ce(e.A,"free_memory_unused_out"),Ce(t,"free_memory"),Ft(t,e.A)}function Ks(e,t){xe(e.A,t),ce(e.A,t+"_unused_out")}function wo(e){e.g.addBoolToStream(!0,"free_memory",e.B)}var La=class{constructor(e){this.g=e,this.G=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){var n,s,r,i,o,a;if(t){const l=e.baseOptions||{};if((n=e.baseOptions)!=null&&n.modelAssetBuffer&&(s=e.baseOptions)!=null&&s.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((r=ue(this.baseOptions,Mi,1))!=null&&r.g()||(i=ue(this.baseOptions,Mi,1))!=null&&i.h()||(o=e.baseOptions)!=null&&o.modelAssetBuffer||(a=e.baseOptions)!=null&&a.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if((function(c,u){let h=ue(c.baseOptions,Lu,3);if(!h){var w=h=new Lu,I=new Iu;Ir(w,4,di,I)}"delegate"in u&&(u.delegate==="GPU"?(u=h,w=new Q3,Ir(u,2,di,w)):(u=h,w=new Iu,Ir(u,4,di,w))),q(c.baseOptions,0,3,h)})(this,l),l.modelAssetPath)return fetch(l.modelAssetPath.toString()).then((c=>{if(c.ok)return c.arrayBuffer();throw Error(`Failed to fetch model: ${l.modelAssetPath} (${c.status})`)})).then((c=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(c),!0,!1,!1),Xo(this,"/model.dat"),this.m(),this.J()}));if(l.modelAssetBuffer instanceof Uint8Array)Xo(this,l.modelAssetBuffer);else if(l.modelAssetBuffer)return(async function(c){const u=[];for(var h=0;;){const{done:w,value:I}=await c.read();if(w)break;u.push(I),h+=I.length}if(u.length===0)return new Uint8Array(0);if(u.length===1)return u[0];c=new Uint8Array(h),h=0;for(const w of u)c.set(w,h),h+=w.length;return c})(l.modelAssetBuffer).then((c=>{Xo(this,c),this.m(),this.J()}))}return this.m(),this.J(),Promise.resolve()}J(){}ca(){let e;if(this.g.ca((t=>{e=e0(t)})),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener(((n,s)=>{this.G.push(Error(s))})),this.g.Ha(),this.g.setGraph(e,t),this.A=void 0,Vu(this)}finishProcessing(){this.g.finishProcessing(),Vu(this)}close(){this.A=void 0,this.g.closeGraph()}};function Mn(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}La.prototype.close=La.prototype.close;class x0{constructor(t,n,s,r){this.g=t,this.h=n,this.m=s,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function $u(e,t,n){const s=e.g;if(n=Mn(s.createShader(n),"Failed to create WebGL shader"),s.shaderSource(n,t),s.compileShader(n),!s.getShaderParameter(n,s.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${s.getShaderInfoLog(n)}`);return s.attachShader(e.h,n),n}function Hu(e,t){const n=e.g,s=Mn(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(s);const r=Mn(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,r),n.enableVertexAttribArray(e.P),n.vertexAttribPointer(e.P,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const i=Mn(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(e.J),n.vertexAttribPointer(e.J,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(t?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new x0(n,s,r,i)}function Jl(e,t){if(e.g){if(t!==e.g)throw Error("Cannot change GL context once initialized")}else e.g=t}function Zl(e,t,n,s){return Jl(e,t),e.h||(e.m(),e.C()),n?(e.s||(e.s=Hu(e,!0)),n=e.s):(e.v||(e.v=Hu(e,!1)),n=e.v),t.useProgram(e.h),n.bind(),e.l(),e=s(),n.g.bindVertexArray(null),e}function ko(e,t,n){return Jl(e,t),e=Mn(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function Eo(e,t,n){Jl(e,t),e.A||(e.A=Mn(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.A),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function Ql(e){var t;(t=e.g)==null||t.bindFramebuffer(e.g.FRAMEBUFFER,null)}var ec=class{G(){return`
|
|
22
|
+
precision mediump float;
|
|
23
|
+
varying vec2 vTex;
|
|
24
|
+
uniform sampler2D inputTexture;
|
|
25
|
+
void main() {
|
|
26
|
+
gl_FragColor = texture2D(inputTexture, vTex);
|
|
27
|
+
}
|
|
28
|
+
`}m(){const e=this.g;if(this.h=Mn(e.createProgram(),"Failed to create WebGL program"),this.Z=$u(this,`
|
|
29
|
+
attribute vec2 aVertex;
|
|
30
|
+
attribute vec2 aTex;
|
|
31
|
+
varying vec2 vTex;
|
|
32
|
+
void main(void) {
|
|
33
|
+
gl_Position = vec4(aVertex, 0.0, 1.0);
|
|
34
|
+
vTex = aTex;
|
|
35
|
+
}`,e.VERTEX_SHADER),this.Y=$u(this,this.G(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.P=e.getAttribLocation(this.h,"aVertex"),this.J=e.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const e=this.g;e.deleteProgram(this.h),e.deleteShader(this.Z),e.deleteShader(this.Y)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}};function An(e,t){switch(t){case 0:return e.g.find((n=>n instanceof Uint8Array));case 1:return e.g.find((n=>n instanceof Float32Array));case 2:return e.g.find((n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture));default:throw Error(`Type is not supported: ${t}`)}}function Ra(e){var t=An(e,1);if(!t){if(t=An(e,0))t=new Float32Array(t).map((s=>s/255));else{t=new Float32Array(e.width*e.height);const s=Ys(e);var n=tc(e);if(Eo(n,s,p1(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(e.width*e.height*4),s.readPixels(0,0,e.width,e.height,s.RGBA,s.FLOAT,n);for(let r=0,i=0;r<t.length;++r,i+=4)t[r]=n[i]}else s.readPixels(0,0,e.width,e.height,s.RED,s.FLOAT,t)}e.g.push(t)}return t}function p1(e){let t=An(e,2);if(!t){const n=Ys(e);t=m1(e);const s=Ra(e),r=g1(e);n.texImage2D(n.TEXTURE_2D,0,r,e.width,e.height,0,n.RED,n.FLOAT,s),Fa(e)}return t}function Ys(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=Mn(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function g1(e){if(e=Ys(e),!si)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))si=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");si=e.R16F}return si}function tc(e){return e.l||(e.l=new ec),e.l}function m1(e){const t=Ys(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=An(e,2);return n||(n=ko(tc(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Fa(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var si,Ze=class{constructor(e,t,n,s,r,i,o){this.g=e,this.m=t,this.j=n,this.canvas=s,this.l=r,this.width=i,this.height=o,this.j&&--zu===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Da(){return!!An(this,0)}ja(){return!!An(this,1)}R(){return!!An(this,2)}ia(){return(t=An(e=this,0))||(t=Ra(e),t=new Uint8Array(t.map((n=>255*n))),e.g.push(t)),t;var e,t}ha(){return Ra(this)}N(){return p1(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const s=Ys(this),r=tc(this);s.activeTexture(s.TEXTURE1),n=ko(r,s,this.m?s.LINEAR:s.NEAREST),s.bindTexture(s.TEXTURE_2D,n);const i=g1(this);s.texImage2D(s.TEXTURE_2D,0,i,this.width,this.height,0,s.RED,s.FLOAT,null),s.bindTexture(s.TEXTURE_2D,null),Eo(r,s,n),Zl(r,s,!1,(()=>{m1(this),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4),Fa(this)})),Ql(r),Fa(this)}}e.push(n)}return new Ze(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ys(this).deleteTexture(An(this,2)),zu=-1}};Ze.prototype.close=Ze.prototype.close,Ze.prototype.clone=Ze.prototype.clone,Ze.prototype.getAsWebGLTexture=Ze.prototype.N,Ze.prototype.getAsFloat32Array=Ze.prototype.ha,Ze.prototype.getAsUint8Array=Ze.prototype.ia,Ze.prototype.hasWebGLTexture=Ze.prototype.R,Ze.prototype.hasFloat32Array=Ze.prototype.ja,Ze.prototype.hasUint8Array=Ze.prototype.Da;var zu=250;function cn(e,t){switch(t){case 0:return e.g.find((n=>n instanceof ImageData));case 1:return e.g.find((n=>typeof ImageBitmap<"u"&&n instanceof ImageBitmap));case 2:return e.g.find((n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture));default:throw Error(`Type is not supported: ${t}`)}}function v1(e){var t=cn(e,0);if(!t){t=qs(e);const n=Ao(e),s=new Uint8Array(e.width*e.height*4);Eo(n,t,hi(e)),t.readPixels(0,0,e.width,e.height,t.RGBA,t.UNSIGNED_BYTE,s),Ql(n),t=new ImageData(new Uint8ClampedArray(s.buffer),e.width,e.height),e.g.push(t)}return t}function hi(e){let t=cn(e,2);if(!t){const n=qs(e);t=pi(e);const s=cn(e,1)||v1(e);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,s),br(e)}return t}function qs(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=Mn(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function Ao(e){return e.l||(e.l=new ec),e.l}function pi(e){const t=qs(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=cn(e,2);return n||(n=ko(Ao(e),t),e.g.push(n),e.m=!0),t.bindTexture(t.TEXTURE_2D,n),n}function br(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}function Wu(e){const t=qs(e);return Zl(Ao(e),t,!0,(()=>(function(n,s){const r=n.canvas;if(r.width===n.width&&r.height===n.height)return s();const i=r.width,o=r.height;return r.width=n.width,r.height=n.height,n=s(),r.width=i,r.height=o,n})(e,(()=>{if(t.bindFramebuffer(t.FRAMEBUFFER,null),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),!(e.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return e.canvas.transferToImageBitmap()}))))}var Qe=class{constructor(e,t,n,s,r,i,o){this.g=e,this.j=t,this.m=n,this.canvas=s,this.l=r,this.width=i,this.height=o,(this.j||this.m)&&--Ku===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ca(){return!!cn(this,0)}ka(){return!!cn(this,1)}R(){return!!cn(this,2)}Aa(){return v1(this)}za(){var e=cn(this,1);return e||(hi(this),pi(this),e=Wu(this),br(this),this.g.push(e),this.j=!0),e}N(){return hi(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof ImageData)n=new ImageData(t.data,this.width,this.height);else if(t instanceof WebGLTexture){const s=qs(this),r=Ao(this);s.activeTexture(s.TEXTURE1),n=ko(r,s),s.bindTexture(s.TEXTURE_2D,n),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,this.width,this.height,0,s.RGBA,s.UNSIGNED_BYTE,null),s.bindTexture(s.TEXTURE_2D,null),Eo(r,s,n),Zl(r,s,!1,(()=>{pi(this),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4),br(this)})),Ql(r),br(this)}else{if(!(t instanceof ImageBitmap))throw Error(`Type is not supported: ${t}`);hi(this),pi(this),n=Wu(this),br(this)}e.push(n)}return new Qe(e,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&cn(this,1).close(),this.m&&qs(this).deleteTexture(cn(this,2)),Ku=-1}};Qe.prototype.close=Qe.prototype.close,Qe.prototype.clone=Qe.prototype.clone,Qe.prototype.getAsWebGLTexture=Qe.prototype.N,Qe.prototype.getAsImageBitmap=Qe.prototype.za,Qe.prototype.getAsImageData=Qe.prototype.Aa,Qe.prototype.hasWebGLTexture=Qe.prototype.R,Qe.prototype.hasImageBitmap=Qe.prototype.ka,Qe.prototype.hasImageData=Qe.prototype.Ca;var Ku=250;function Qt(...e){return e.map((([t,n])=>({start:t,end:n})))}const I0=(function(e){return class extends e{Ha(){this.i._registerModelResourcesGraphService()}}})((Yu=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:d1()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const n=e.length,s=this.i._malloc(n);this.i.HEAPU8.set(e,s),t?this.i._changeBinaryGraph(n,s):this.i._changeTextGraph(n,s),this.i._free(s)}configureAudio(e,t,n,s,r){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),z(this,s||"input_audio",(i=>{z(this,r=r||"audio_header",(o=>{this.i._configureAudio(i,o,e,t??0,n)}))}))}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ca(e){nn(this,"__graph_config__",(t=>{e(t)})),z(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,s,r){const i=4*e.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(e,this.g/4),z(this,s,(o=>{this.i._addAudioToInputStream(this.g,t,n,o,r)}))}addGpuBufferToStream(e,t,n){z(this,t,(s=>{const[r,i]=Gu(this,e,s);this.i._addBoundTextureToStream(s,r,i,n)}))}addBoolToStream(e,t,n){z(this,t,(s=>{this.i._addBoolToInputStream(e,s,n)}))}addDoubleToStream(e,t,n){z(this,t,(s=>{this.i._addDoubleToInputStream(e,s,n)}))}addFloatToStream(e,t,n){z(this,t,(s=>{this.i._addFloatToInputStream(e,s,n)}))}addIntToStream(e,t,n){z(this,t,(s=>{this.i._addIntToInputStream(e,s,n)}))}addUintToStream(e,t,n){z(this,t,(s=>{this.i._addUintToInputStream(e,s,n)}))}addStringToStream(e,t,n){z(this,t,(s=>{z(this,e,(r=>{this.i._addStringToInputStream(r,s,n)}))}))}addStringRecordToStream(e,t,n){z(this,t,(s=>{ju(this,Object.keys(e),(r=>{ju(this,Object.values(e),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(e).length,s,n)}))}))}))}addProtoToStream(e,t,n,s){z(this,n,(r=>{z(this,t,(i=>{const o=this.i._malloc(e.length);this.i.HEAPU8.set(e,o),this.i._addProtoToInputStream(o,e.length,i,r,s),this.i._free(o)}))}))}addEmptyPacketToStream(e,t){z(this,e,(n=>{this.i._addEmptyPacketToInputStream(n,t)}))}addBoolVectorToStream(e,t,n){z(this,t,(s=>{const r=this.i._allocateBoolVector(e.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const i of e)this.i._addBoolVectorEntry(r,i);this.i._addBoolVectorToInputStream(r,s,n)}))}addDoubleVectorToStream(e,t,n){z(this,t,(s=>{const r=this.i._allocateDoubleVector(e.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const i of e)this.i._addDoubleVectorEntry(r,i);this.i._addDoubleVectorToInputStream(r,s,n)}))}addFloatVectorToStream(e,t,n){z(this,t,(s=>{const r=this.i._allocateFloatVector(e.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const i of e)this.i._addFloatVectorEntry(r,i);this.i._addFloatVectorToInputStream(r,s,n)}))}addIntVectorToStream(e,t,n){z(this,t,(s=>{const r=this.i._allocateIntVector(e.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const i of e)this.i._addIntVectorEntry(r,i);this.i._addIntVectorToInputStream(r,s,n)}))}addUintVectorToStream(e,t,n){z(this,t,(s=>{const r=this.i._allocateUintVector(e.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const i of e)this.i._addUintVectorEntry(r,i);this.i._addUintVectorToInputStream(r,s,n)}))}addStringVectorToStream(e,t,n){z(this,t,(s=>{const r=this.i._allocateStringVector(e.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const i of e)z(this,i,(o=>{this.i._addStringVectorEntry(r,o)}));this.i._addStringVectorToInputStream(r,s,n)}))}addBoolToInputSidePacket(e,t){z(this,t,(n=>{this.i._addBoolToInputSidePacket(e,n)}))}addDoubleToInputSidePacket(e,t){z(this,t,(n=>{this.i._addDoubleToInputSidePacket(e,n)}))}addFloatToInputSidePacket(e,t){z(this,t,(n=>{this.i._addFloatToInputSidePacket(e,n)}))}addIntToInputSidePacket(e,t){z(this,t,(n=>{this.i._addIntToInputSidePacket(e,n)}))}addUintToInputSidePacket(e,t){z(this,t,(n=>{this.i._addUintToInputSidePacket(e,n)}))}addStringToInputSidePacket(e,t){z(this,t,(n=>{z(this,e,(s=>{this.i._addStringToInputSidePacket(s,n)}))}))}addProtoToInputSidePacket(e,t,n){z(this,n,(s=>{z(this,t,(r=>{const i=this.i._malloc(e.length);this.i.HEAPU8.set(e,i),this.i._addProtoToInputSidePacket(i,e.length,r,s),this.i._free(i)}))}))}addBoolVectorToInputSidePacket(e,t){z(this,t,(n=>{const s=this.i._allocateBoolVector(e.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const r of e)this.i._addBoolVectorEntry(s,r);this.i._addBoolVectorToInputSidePacket(s,n)}))}addDoubleVectorToInputSidePacket(e,t){z(this,t,(n=>{const s=this.i._allocateDoubleVector(e.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const r of e)this.i._addDoubleVectorEntry(s,r);this.i._addDoubleVectorToInputSidePacket(s,n)}))}addFloatVectorToInputSidePacket(e,t){z(this,t,(n=>{const s=this.i._allocateFloatVector(e.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const r of e)this.i._addFloatVectorEntry(s,r);this.i._addFloatVectorToInputSidePacket(s,n)}))}addIntVectorToInputSidePacket(e,t){z(this,t,(n=>{const s=this.i._allocateIntVector(e.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const r of e)this.i._addIntVectorEntry(s,r);this.i._addIntVectorToInputSidePacket(s,n)}))}addUintVectorToInputSidePacket(e,t){z(this,t,(n=>{const s=this.i._allocateUintVector(e.length);if(!s)throw Error("Unable to allocate new unsigned int vector on heap.");for(const r of e)this.i._addUintVectorEntry(s,r);this.i._addUintVectorToInputSidePacket(s,n)}))}addStringVectorToInputSidePacket(e,t){z(this,t,(n=>{const s=this.i._allocateStringVector(e.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const r of e)z(this,r,(i=>{this.i._addStringVectorEntry(s,i)}));this.i._addStringVectorToInputSidePacket(s,n)}))}attachBoolListener(e,t){nn(this,e,t),z(this,e,(n=>{this.i._attachBoolListener(n)}))}attachBoolVectorListener(e,t){jn(this,e,t),z(this,e,(n=>{this.i._attachBoolVectorListener(n)}))}attachIntListener(e,t){nn(this,e,t),z(this,e,(n=>{this.i._attachIntListener(n)}))}attachIntVectorListener(e,t){jn(this,e,t),z(this,e,(n=>{this.i._attachIntVectorListener(n)}))}attachUintListener(e,t){nn(this,e,t),z(this,e,(n=>{this.i._attachUintListener(n)}))}attachUintVectorListener(e,t){jn(this,e,t),z(this,e,(n=>{this.i._attachUintVectorListener(n)}))}attachDoubleListener(e,t){nn(this,e,t),z(this,e,(n=>{this.i._attachDoubleListener(n)}))}attachDoubleVectorListener(e,t){jn(this,e,t),z(this,e,(n=>{this.i._attachDoubleVectorListener(n)}))}attachFloatListener(e,t){nn(this,e,t),z(this,e,(n=>{this.i._attachFloatListener(n)}))}attachFloatVectorListener(e,t){jn(this,e,t),z(this,e,(n=>{this.i._attachFloatVectorListener(n)}))}attachStringListener(e,t){nn(this,e,t),z(this,e,(n=>{this.i._attachStringListener(n)}))}attachStringVectorListener(e,t){jn(this,e,t),z(this,e,(n=>{this.i._attachStringVectorListener(n)}))}attachProtoListener(e,t,n){nn(this,e,t),z(this,e,(s=>{this.i._attachProtoListener(s,n||!1)}))}attachProtoVectorListener(e,t,n){jn(this,e,t),z(this,e,(s=>{this.i._attachProtoVectorListener(s,n||!1)}))}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),nn(this,e,((s,r)=>{s=new Float32Array(s.buffer,s.byteOffset,s.length/4),t(s,r)})),z(this,e,(s=>{this.i._attachAudioListener(s,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Yu{get ea(){return this.i}oa(e,t,n){z(this,t,(s=>{const[r,i]=Gu(this,e,s);this.ea._addBoundTextureAsImageToStream(s,r,i,n)}))}V(e,t){nn(this,e,t),z(this,e,(n=>{this.ea._attachImageListener(n)}))}ba(e,t){jn(this,e,t),z(this,e,(n=>{this.ea._attachImageVectorListener(n)}))}}));var Yu,$t=class extends I0{};async function le(e,t,n){return(async function(s,r,i,o){return T0(s,r,i,o)})(e,n.canvas??(d1()?void 0:document.createElement("canvas")),t,n)}function y1(e,t,n,s){if(e.U){const i=new jh;if(n!=null&&n.regionOfInterest){if(!e.na)throw Error("This task doesn't support region-of-interest.");var r=n.regionOfInterest;if(r.left>=r.right||r.top>=r.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(r.left<0||r.top<0||r.right>1||r.bottom>1)throw Error("Expected RectF values to be in [0,1].");V(i,1,(r.left+r.right)/2),V(i,2,(r.top+r.bottom)/2),V(i,4,r.right-r.left),V(i,3,r.bottom-r.top)}else V(i,1,.5),V(i,2,.5),V(i,4,1),V(i,3,1);if(n!=null&&n.rotationDegrees){if((n==null?void 0:n.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(V(i,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[o,a]=h1(t);n=$e(i,3)*a/o,r=$e(i,4)*o/a,V(i,4,n),V(i,3,r)}}e.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",e.U,s)}e.g.oa(t,e.Z,s??performance.now()),e.finishProcessing()}function Ht(e,t,n){var s;if((s=e.baseOptions)!=null&&s.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");y1(e,t,n,e.B+1)}function mn(e,t,n,s){var r;if(!((r=e.baseOptions)!=null&&r.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");y1(e,t,n,s)}function Xs(e,t,n,s){var r=t.data;const i=t.width,o=i*(t=t.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==o)throw Error("Unsupported channel count: "+r.length/o);return e=new Ze([r],n,!1,e.g.i.canvas,e.P,i,t),s?e.clone():e}var bt=class extends La{constructor(e,t,n,s){super(e),this.g=e,this.Z=t,this.U=n,this.na=s,this.P=new ec}l(e,t=!0){if("runningMode"in e&&jr(this.baseOptions,2,!!e.runningMode&&e.runningMode!=="IMAGE"),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.P.close(),super.close()}};bt.prototype.close=bt.prototype.close;var Nt=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},q(e=this.h=new yo,0,1,t=new Le),V(this.h,2,.5),V(this.h,3,.3)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&V(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&V(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}D(e,t){return this.j={detections:[]},Ht(this,e,t),this.j}F(e,t,n){return this.j={detections:[]},mn(this,e,n,t),this.j}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect_in"),he(e,"detections");const t=new Pt;Xt(t,d0,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect_in"),ce(n,"DETECTIONS:detections"),n.o(t),Ft(e,n),this.g.attachProtoVectorListener("detections",((s,r)=>{for(const i of s)s=Uh(i),this.j.detections.push(u1(s));U(this,r)})),this.g.attachEmptyPacketListener("detections",(s=>{U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Nt.prototype.detectForVideo=Nt.prototype.F,Nt.prototype.detect=Nt.prototype.D,Nt.prototype.setOptions=Nt.prototype.o,Nt.createFromModelPath=async function(e,t){return le(Nt,e,{baseOptions:{modelAssetPath:t}})},Nt.createFromModelBuffer=function(e,t){return le(Nt,e,{baseOptions:{modelAssetBuffer:t}})},Nt.createFromOptions=function(e,t){return le(Nt,e,t)};var nc=Qt([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),sc=Qt([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),rc=Qt([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),_1=Qt([474,475],[475,476],[476,477],[477,474]),ic=Qt([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),oc=Qt([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),b1=Qt([469,470],[470,471],[471,472],[472,469]),ac=Qt([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),w1=[...nc,...sc,...rc,...ic,...oc,...ac],k1=Qt([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function qu(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Ue=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,q(e=this.h=new Wh,0,1,t=new Le),this.v=new zh,q(this.h,0,3,this.v),this.s=new yo,q(this.h,0,2,this.s),gn(this.s,4,1),V(this.s,2,.5),V(this.v,2,.5),V(this.h,4,.5)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return"numFaces"in e&&gn(this.s,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&V(this.s,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&V(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&V(this.v,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}D(e,t){return qu(this),Ht(this,e,t),this.j}F(e,t,n){return qu(this),mn(this,e,n,t),this.j}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect"),he(e,"face_landmarks");const t=new Pt;Xt(t,p0,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect"),ce(n,"NORM_LANDMARKS:face_landmarks"),n.o(t),Ft(e,n),this.g.attachProtoVectorListener("face_landmarks",((s,r)=>{for(const i of s)s=Yr(i),this.j.faceLandmarks.push(_o(s));U(this,r)})),this.g.attachEmptyPacketListener("face_landmarks",(s=>{U(this,s)})),this.outputFaceBlendshapes&&(he(e,"blendshapes"),ce(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((s,r)=>{if(this.outputFaceBlendshapes)for(const i of s)s=vo(i),this.j.faceBlendshapes.push(Xl(s.g()??[]));U(this,r)})),this.g.attachEmptyPacketListener("blendshapes",(s=>{U(this,s)}))),this.outputFacialTransformationMatrixes&&(he(e,"face_geometry"),ce(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((s,r)=>{if(this.outputFacialTransformationMatrixes)for(const i of s)(s=ue(h0(i),r0,2))&&this.j.facialTransformationMatrixes.push({rows:jt(s,1)??0??0,columns:jt(s,2)??0??0,data:hs(s,3,rs,ds()).slice()??[]});U(this,r)})),this.g.attachEmptyPacketListener("face_geometry",(s=>{U(this,s)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ue.prototype.detectForVideo=Ue.prototype.F,Ue.prototype.detect=Ue.prototype.D,Ue.prototype.setOptions=Ue.prototype.o,Ue.createFromModelPath=function(e,t){return le(Ue,e,{baseOptions:{modelAssetPath:t}})},Ue.createFromModelBuffer=function(e,t){return le(Ue,e,{baseOptions:{modelAssetBuffer:t}})},Ue.createFromOptions=function(e,t){return le(Ue,e,t)},Ue.FACE_LANDMARKS_LIPS=nc,Ue.FACE_LANDMARKS_LEFT_EYE=sc,Ue.FACE_LANDMARKS_LEFT_EYEBROW=rc,Ue.FACE_LANDMARKS_LEFT_IRIS=_1,Ue.FACE_LANDMARKS_RIGHT_EYE=ic,Ue.FACE_LANDMARKS_RIGHT_EYEBROW=oc,Ue.FACE_LANDMARKS_RIGHT_IRIS=b1,Ue.FACE_LANDMARKS_FACE_OVAL=ac,Ue.FACE_LANDMARKS_CONTOURS=w1,Ue.FACE_LANDMARKS_TESSELATION=k1;var sn=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect",!0),q(e=this.j=new Yh,0,1,t=new Le)}get baseOptions(){return ue(this.j,Le,1)}set baseOptions(e){q(this.j,0,1,e)}o(e){return super.l(e)}Ka(e,t,n){const s=typeof t!="function"?t:{};if(this.h=typeof t=="function"?t:n,Ht(this,e,s??{}),!this.h)return this.s}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect"),he(e,"stylized_image");const t=new Pt;Xt(t,g0,this.j);const n=new dt;Rt(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect"),ce(n,"STYLIZED_IMAGE:stylized_image"),n.o(t),Ft(e,n),this.g.V("stylized_image",((s,r)=>{var i=!this.h,o=s.data,a=s.width;const l=a*(s=s.height);if(o instanceof Uint8Array)if(o.length===3*l){const c=new Uint8ClampedArray(4*l);for(let u=0;u<l;++u)c[4*u]=o[3*u],c[4*u+1]=o[3*u+1],c[4*u+2]=o[3*u+2],c[4*u+3]=255;o=new ImageData(c,a,s)}else{if(o.length!==4*l)throw Error("Unsupported channel count: "+o.length/l);o=new ImageData(new Uint8ClampedArray(o.buffer,o.byteOffset,o.length),a,s)}else if(!(o instanceof WebGLTexture))throw Error(`Unsupported format: ${o.constructor.name}`);a=new Qe([o],!1,!1,this.g.i.canvas,this.P,a,s),this.s=i=i?a.clone():a,this.h&&this.h(i),U(this,r)})),this.g.attachEmptyPacketListener("stylized_image",(s=>{this.s=null,this.h&&this.h(null),U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};sn.prototype.stylize=sn.prototype.Ka,sn.prototype.setOptions=sn.prototype.o,sn.createFromModelPath=function(e,t){return le(sn,e,{baseOptions:{modelAssetPath:t}})},sn.createFromModelBuffer=function(e,t){return le(sn,e,{baseOptions:{modelAssetBuffer:t}})},sn.createFromOptions=function(e,t){return le(sn,e,t)};var lc=Qt([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function Xu(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function Ju(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function Zu(e,t=!0){const n=[];for(const r of e){var s=vo(r);e=[];for(const i of s.g())s=t&&jt(i,1)!=null?jt(i,1)??0:-1,e.push({score:$e(i,2)??0,index:s,categoryName:Vt(i,3)??""??"",displayName:Vt(i,4)??""??""});n.push(e)}return n}var yt=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],q(e=this.j=new Jh,0,1,t=new Le),this.s=new Wl,q(this.j,0,2,this.s),this.C=new zl,q(this.s,0,3,this.C),this.v=new Xh,q(this.s,0,2,this.v),this.h=new m0,q(this.j,0,3,this.h),V(this.v,2,.5),V(this.s,4,.5),V(this.C,2,.5)}get baseOptions(){return ue(this.j,Le,1)}set baseOptions(e){q(this.j,0,1,e)}o(e){var t,n,s,r;if(gn(this.v,3,e.numHands??1),"minHandDetectionConfidence"in e&&V(this.v,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&V(this.s,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&V(this.C,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var i=new Ts,o=i,a=Pa(e.cannedGesturesClassifierOptions,(t=ue(this.h,Ts,3))==null?void 0:t.h());q(o,0,2,a),q(this.h,0,3,i)}else e.cannedGesturesClassifierOptions===void 0&&((n=ue(this.h,Ts,3))==null||n.g());return e.customGesturesClassifierOptions?(q(o=i=new Ts,0,2,a=Pa(e.customGesturesClassifierOptions,(s=ue(this.h,Ts,4))==null?void 0:s.h())),q(this.h,0,4,i)):e.customGesturesClassifierOptions===void 0&&((r=ue(this.h,Ts,4))==null||r.g()),this.l(e)}Fa(e,t){return Xu(this),Ht(this,e,t),Ju(this)}Ga(e,t,n){return Xu(this),mn(this,e,n,t),Ju(this)}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect"),he(e,"hand_gestures"),he(e,"hand_landmarks"),he(e,"world_hand_landmarks"),he(e,"handedness");const t=new Pt;Xt(t,v0,this.j);const n=new dt;Rt(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect"),ce(n,"HAND_GESTURES:hand_gestures"),ce(n,"LANDMARKS:hand_landmarks"),ce(n,"WORLD_LANDMARKS:world_hand_landmarks"),ce(n,"HANDEDNESS:handedness"),n.o(t),Ft(e,n),this.g.attachProtoVectorListener("hand_landmarks",((s,r)=>{for(const i of s){s=Yr(i);const o=[];for(const a of Ln(s,Gh,1))o.push({x:$e(a,1)??0,y:$e(a,2)??0,z:$e(a,3)??0,visibility:$e(a,4)??0});this.landmarks.push(o)}U(this,r)})),this.g.attachEmptyPacketListener("hand_landmarks",(s=>{U(this,s)})),this.g.attachProtoVectorListener("world_hand_landmarks",((s,r)=>{for(const i of s){s=Ns(i);const o=[];for(const a of Ln(s,Bh,1))o.push({x:$e(a,1)??0,y:$e(a,2)??0,z:$e(a,3)??0,visibility:$e(a,4)??0});this.worldLandmarks.push(o)}U(this,r)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(s=>{U(this,s)})),this.g.attachProtoVectorListener("hand_gestures",((s,r)=>{this.gestures.push(...Zu(s,!1)),U(this,r)})),this.g.attachEmptyPacketListener("hand_gestures",(s=>{U(this,s)})),this.g.attachProtoVectorListener("handedness",((s,r)=>{this.handedness.push(...Zu(s)),U(this,r)})),this.g.attachEmptyPacketListener("handedness",(s=>{U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function Qu(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}yt.prototype.recognizeForVideo=yt.prototype.Ga,yt.prototype.recognize=yt.prototype.Fa,yt.prototype.setOptions=yt.prototype.o,yt.createFromModelPath=function(e,t){return le(yt,e,{baseOptions:{modelAssetPath:t}})},yt.createFromModelBuffer=function(e,t){return le(yt,e,{baseOptions:{modelAssetBuffer:t}})},yt.createFromOptions=function(e,t){return le(yt,e,t)},yt.HAND_CONNECTIONS=lc;var St=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],q(e=this.h=new Wl,0,1,t=new Le),this.s=new zl,q(this.h,0,3,this.s),this.j=new Xh,q(this.h,0,2,this.j),gn(this.j,3,1),V(this.j,2,.5),V(this.s,2,.5),V(this.h,4,.5)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return"numHands"in e&&gn(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&V(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&V(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&V(this.s,2,e.minHandPresenceConfidence??.5),this.l(e)}D(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ht(this,e,t),Qu(this)}F(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],mn(this,e,n,t),Qu(this)}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect"),he(e,"hand_landmarks"),he(e,"world_hand_landmarks"),he(e,"handedness");const t=new Pt;Xt(t,y0,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect"),ce(n,"LANDMARKS:hand_landmarks"),ce(n,"WORLD_LANDMARKS:world_hand_landmarks"),ce(n,"HANDEDNESS:handedness"),n.o(t),Ft(e,n),this.g.attachProtoVectorListener("hand_landmarks",((s,r)=>{for(const i of s)s=Yr(i),this.landmarks.push(_o(s));U(this,r)})),this.g.attachEmptyPacketListener("hand_landmarks",(s=>{U(this,s)})),this.g.attachProtoVectorListener("world_hand_landmarks",((s,r)=>{for(const i of s)s=Ns(i),this.worldLandmarks.push(Mr(s));U(this,r)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(s=>{U(this,s)})),this.g.attachProtoVectorListener("handedness",((s,r)=>{var i=this.handedness,o=i.push;const a=[];for(const l of s){s=vo(l);const c=[];for(const u of s.g())c.push({score:$e(u,2)??0,index:jt(u,1)??0??-1,categoryName:Vt(u,3)??""??"",displayName:Vt(u,4)??""??""});a.push(c)}o.call(i,...a),U(this,r)})),this.g.attachEmptyPacketListener("handedness",(s=>{U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};St.prototype.detectForVideo=St.prototype.F,St.prototype.detect=St.prototype.D,St.prototype.setOptions=St.prototype.o,St.createFromModelPath=function(e,t){return le(St,e,{baseOptions:{modelAssetPath:t}})},St.createFromModelBuffer=function(e,t){return le(St,e,{baseOptions:{modelAssetBuffer:t}})},St.createFromOptions=function(e,t){return le(St,e,t)},St.HAND_CONNECTIONS=lc;var E1=Qt([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function ef(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function tf(e){try{if(!e.C)return e.h;e.C(e.h)}finally{wo(e)}}function ri(e,t){e=Yr(e),t.push(_o(e))}var Me=class extends bt{constructor(e,t){super(new $t(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,q(e=this.j=new n1,0,1,t=new Le),this.K=new zl,q(this.j,0,2,this.K),this.Y=new _0,q(this.j,0,3,this.Y),this.s=new yo,q(this.j,0,4,this.s),this.H=new zh,q(this.j,0,5,this.H),this.v=new e1,q(this.j,0,6,this.v),this.L=new t1,q(this.j,0,7,this.L),V(this.s,2,.5),V(this.s,3,.3),V(this.H,2,.5),V(this.v,2,.5),V(this.v,3,.3),V(this.L,2,.5),V(this.K,2,.5)}get baseOptions(){return ue(this.j,Le,1)}set baseOptions(e){q(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&V(this.s,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&V(this.s,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&V(this.H,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&V(this.v,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&V(this.v,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&V(this.L,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&V(this.K,2,e.minHandLandmarksConfidence??.5),this.l(e)}D(e,t,n){const s=typeof t!="function"?t:{};return this.C=typeof t=="function"?t:n,ef(this),Ht(this,e,s),tf(this)}F(e,t,n,s){const r=typeof n!="function"?n:{};return this.C=typeof n=="function"?n:s,ef(this),mn(this,e,r,t),tf(this)}m(){var e=new wt;Ce(e,"input_frames_image"),he(e,"pose_landmarks"),he(e,"pose_world_landmarks"),he(e,"face_landmarks"),he(e,"left_hand_landmarks"),he(e,"left_hand_world_landmarks"),he(e,"right_hand_landmarks"),he(e,"right_hand_world_landmarks");const t=new Pt,n=new Au;Sa(n,1,nr("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),(function(r,i){if(i!=null)if(Array.isArray(i))Te(r,2,so(i,bl,void 0,void 0,!1));else{if(!(typeof i=="string"||i instanceof In||vs(i)))throw Error("invalid value in Any.value field: "+i+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");Sa(r,2,dl(i,!1),ys())}})(n,this.j.g());const s=new dt;Rt(s,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),xi(s,8,Au,n),xe(s,"IMAGE:input_frames_image"),ce(s,"POSE_LANDMARKS:pose_landmarks"),ce(s,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),ce(s,"FACE_LANDMARKS:face_landmarks"),ce(s,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),ce(s,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),ce(s,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),ce(s,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),s.o(t),Ft(e,s),bo(this,e),this.g.attachProtoListener("pose_landmarks",((r,i)=>{ri(r,this.h.poseLandmarks),U(this,i)})),this.g.attachEmptyPacketListener("pose_landmarks",(r=>{U(this,r)})),this.g.attachProtoListener("pose_world_landmarks",((r,i)=>{var o=this.h.poseWorldLandmarks;r=Ns(r),o.push(Mr(r)),U(this,i)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(r=>{U(this,r)})),this.outputPoseSegmentationMasks&&(ce(s,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Ks(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",((r,i)=>{this.h.poseSegmentationMasks=[Xs(this,r,!0,!this.C)],U(this,i)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(r=>{this.h.poseSegmentationMasks=[],U(this,r)}))),this.g.attachProtoListener("face_landmarks",((r,i)=>{ri(r,this.h.faceLandmarks),U(this,i)})),this.g.attachEmptyPacketListener("face_landmarks",(r=>{U(this,r)})),this.outputFaceBlendshapes&&(he(e,"extra_blendshapes"),ce(s,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((r,i)=>{var o=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(r=vo(r),o.push(Xl(r.g()??[]))),U(this,i)})),this.g.attachEmptyPacketListener("extra_blendshapes",(r=>{U(this,r)}))),this.g.attachProtoListener("left_hand_landmarks",((r,i)=>{ri(r,this.h.leftHandLandmarks),U(this,i)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(r=>{U(this,r)})),this.g.attachProtoListener("left_hand_world_landmarks",((r,i)=>{var o=this.h.leftHandWorldLandmarks;r=Ns(r),o.push(Mr(r)),U(this,i)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(r=>{U(this,r)})),this.g.attachProtoListener("right_hand_landmarks",((r,i)=>{ri(r,this.h.rightHandLandmarks),U(this,i)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(r=>{U(this,r)})),this.g.attachProtoListener("right_hand_world_landmarks",((r,i)=>{var o=this.h.rightHandWorldLandmarks;r=Ns(r),o.push(Mr(r)),U(this,i)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(r=>{U(this,r)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Me.prototype.detectForVideo=Me.prototype.F,Me.prototype.detect=Me.prototype.D,Me.prototype.setOptions=Me.prototype.o,Me.createFromModelPath=function(e,t){return le(Me,e,{baseOptions:{modelAssetPath:t}})},Me.createFromModelBuffer=function(e,t){return le(Me,e,{baseOptions:{modelAssetBuffer:t}})},Me.createFromOptions=function(e,t){return le(Me,e,t)},Me.HAND_CONNECTIONS=lc,Me.POSE_CONNECTIONS=E1,Me.FACE_LANDMARKS_LIPS=nc,Me.FACE_LANDMARKS_LEFT_EYE=sc,Me.FACE_LANDMARKS_LEFT_EYEBROW=rc,Me.FACE_LANDMARKS_LEFT_IRIS=_1,Me.FACE_LANDMARKS_RIGHT_EYE=ic,Me.FACE_LANDMARKS_RIGHT_EYEBROW=oc,Me.FACE_LANDMARKS_RIGHT_IRIS=b1,Me.FACE_LANDMARKS_FACE_OVAL=ac,Me.FACE_LANDMARKS_CONTOURS=w1,Me.FACE_LANDMARKS_TESSELATION=k1;var Ut=class extends bt{constructor(e,t){super(new $t(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},q(e=this.h=new s1,0,1,t=new Le)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return q(this.h,0,2,Pa(e,ue(this.h,Vl,2))),this.l(e)}qa(e,t){return this.j={classifications:[]},Ht(this,e,t),this.j}ra(e,t,n){return this.j={classifications:[]},mn(this,e,n,t),this.j}m(){var e=new wt;Ce(e,"input_image"),Ce(e,"norm_rect"),he(e,"classifications");const t=new Pt;Xt(t,b0,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),xe(n,"IMAGE:input_image"),xe(n,"NORM_RECT:norm_rect"),ce(n,"CLASSIFICATIONS:classifications"),n.o(t),Ft(e,n),this.g.attachProtoListener("classifications",((s,r)=>{this.j=(function(i){const o={classifications:Ln(i,o0,1).map((a=>{var l;return Xl(((l=ue(a,Fh,4))==null?void 0:l.g())??[],jt(a,2)??0,Vt(a,3)??"")}))};return wa(zs(i,2))!=null&&(o.timestampMs=wa(zs(i,2))??0),o})(a0(s)),U(this,r)})),this.g.attachEmptyPacketListener("classifications",(s=>{U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ut.prototype.classifyForVideo=Ut.prototype.ra,Ut.prototype.classify=Ut.prototype.qa,Ut.prototype.setOptions=Ut.prototype.o,Ut.createFromModelPath=function(e,t){return le(Ut,e,{baseOptions:{modelAssetPath:t}})},Ut.createFromModelBuffer=function(e,t){return le(Ut,e,{baseOptions:{modelAssetBuffer:t}})},Ut.createFromOptions=function(e,t){return le(Ut,e,t)};var Tt=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect",!0),this.h=new r1,this.embeddings={embeddings:[]},q(e=this.h,0,1,t=new Le)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){var t=this.h,n=ue(this.h,Pu,2);return n=n?n.clone():new Pu,e.l2Normalize!==void 0?jr(n,1,e.l2Normalize):"l2Normalize"in e&&Te(n,1),e.quantize!==void 0?jr(n,2,e.quantize):"quantize"in e&&Te(n,2),q(t,0,2,n),this.l(e)}xa(e,t){return Ht(this,e,t),this.embeddings}ya(e,t,n){return mn(this,e,n,t),this.embeddings}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect"),he(e,"embeddings_out");const t=new Pt;Xt(t,w0,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect"),ce(n,"EMBEDDINGS:embeddings_out"),n.o(t),Ft(e,n),this.g.attachProtoListener("embeddings_out",((s,r)=>{s=u0(s),this.embeddings=(function(i){return{embeddings:Ln(i,c0,1).map((o=>{var a,l;const c={headIndex:jt(o,3)??0??-1,headName:Vt(o,4)??""??""};if(rh(o,Ou,zo(o,1))!==void 0)o=hs(o=ue(o,Ou,zo(o,1)),1,rs,ds()),c.floatEmbedding=o.slice();else{const u=new Uint8Array(0);c.quantizedEmbedding=((l=(a=ue(o,l0,zo(o,2)))==null?void 0:a.ma())==null?void 0:l.h())??u}return c})),timestampMs:wa(zs(i,2))??0}})(s),U(this,r)})),this.g.attachEmptyPacketListener("embeddings_out",(s=>{U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Tt.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=Uu(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=Uu(Nu(e.quantizedEmbedding),Nu(t.quantizedEmbedding))}return e},Tt.prototype.embedForVideo=Tt.prototype.ya,Tt.prototype.embed=Tt.prototype.xa,Tt.prototype.setOptions=Tt.prototype.o,Tt.createFromModelPath=function(e,t){return le(Tt,e,{baseOptions:{modelAssetPath:t}})},Tt.createFromModelBuffer=function(e,t){return le(Tt,e,{baseOptions:{modelAssetBuffer:t}})},Tt.createFromOptions=function(e,t){return le(Tt,e,t)};var Na=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach((n=>{n.close()})),(t=this.categoryMask)==null||t.close()}};function nf(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function sf(e){try{const t=new Na(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{wo(e)}}Na.prototype.close=Na.prototype.close;var vt=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ql,this.v=new i1,q(this.h,0,3,this.v),q(e=this.h,0,1,t=new Le)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?Te(this.h,2,nr(e.displayNamesLocale)):"displayNamesLocale"in e&&Te(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}J(){(function(e){var t,n;const s=Ln(e.ca(),dt,1).filter((r=>(Vt(r,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(e.s=[],s.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");s.length===1&&(((n=(t=ue(s[0],Pt,7))==null?void 0:t.l())==null?void 0:n.g())??new Map).forEach(((r,i)=>{e.s[Number(i)]=Vt(r,1)??""}))})(this)}segment(e,t,n){const s=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:n,nf(this),Ht(this,e,s),sf(this)}Ia(e,t,n,s){const r=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:s,nf(this),mn(this,e,r,t),sf(this)}Ba(){return this.s}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect");const t=new Pt;Xt(t,a1,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect"),n.o(t),Ft(e,n),bo(this,e),this.outputConfidenceMasks&&(he(e,"confidence_masks"),ce(n,"CONFIDENCE_MASKS:confidence_masks"),Ks(this,"confidence_masks"),this.g.ba("confidence_masks",((s,r)=>{this.confidenceMasks=s.map((i=>Xs(this,i,!0,!this.j))),U(this,r)})),this.g.attachEmptyPacketListener("confidence_masks",(s=>{this.confidenceMasks=[],U(this,s)}))),this.outputCategoryMask&&(he(e,"category_mask"),ce(n,"CATEGORY_MASK:category_mask"),Ks(this,"category_mask"),this.g.V("category_mask",((s,r)=>{this.categoryMask=Xs(this,s,!1,!this.j),U(this,r)})),this.g.attachEmptyPacketListener("category_mask",(s=>{this.categoryMask=void 0,U(this,s)}))),he(e,"quality_scores"),ce(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((s,r)=>{this.qualityScores=s,U(this,r)})),this.g.attachEmptyPacketListener("quality_scores",(s=>{this.categoryMask=void 0,U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};vt.prototype.getLabels=vt.prototype.Ba,vt.prototype.segmentForVideo=vt.prototype.Ia,vt.prototype.segment=vt.prototype.segment,vt.prototype.setOptions=vt.prototype.o,vt.createFromModelPath=function(e,t){return le(vt,e,{baseOptions:{modelAssetPath:t}})},vt.createFromModelBuffer=function(e,t){return le(vt,e,{baseOptions:{modelAssetBuffer:t}})},vt.createFromOptions=function(e,t){return le(vt,e,t)};var Ua=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach((n=>{n.close()})),(t=this.categoryMask)==null||t.close()}};Ua.prototype.close=Ua.prototype.close;var C0=class extends j{constructor(e){super(e)}},xs=[0,Ge,-2],Di=[0,kn,-3,Oe,kn,-1],rf=[0,Di],of=[0,Di,Ge,-1],Jo=class extends j{constructor(e){super(e)}},af=[0,kn,-1,Oe],M0=class extends j{constructor(e){super(e)}},lf=class extends j{constructor(e){super(e)}},Ba=[1,2,3,4,5,6,7,8,9,10,14,15],A1=class extends j{constructor(e){super(e)}};A1.prototype.g=mo([0,Je,[0,Ba,ge,Di,ge,[0,Di,xs],ge,rf,ge,[0,rf,xs],ge,af,ge,[0,kn,-3,Oe,Dt],ge,[0,kn,-3,Oe],ge,[0,me,kn,-2,Oe,Ge,Oe,-1,2,kn,xs],ge,of,ge,[0,of,xs],kn,xs,me,ge,[0,kn,-3,Oe,xs,-1],ge,[0,Je,af]],me,[0,me,Ge,-1,Oe]]);var rn=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ql,this.s=new i1,q(this.h,0,3,this.s),q(e=this.h,0,1,t=new Le)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,s){const r=typeof n!="function"?n:{};this.j=typeof n=="function"?n:s,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,s=new A1;const i=new lf;var o=new C0;if(gn(o,1,255),q(i,0,12,o),t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var a=new Jo;jr(a,3,!0),V(a,1,t.keypoint.x),V(a,2,t.keypoint.y),Ir(i,5,Ba,a)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new M0,t.scribble))jr(t=new Jo,3,!0),V(t,1,a.x),V(t,2,a.y),xi(o,1,Jo,t);Ir(i,15,Ba,o)}xi(s,1,lf,i),this.g.addProtoToStream(s.g(),"drishti.RenderData","roi_in",n),Ht(this,e,r);e:{try{const c=new Ua(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var l=c;break e}this.j(c)}finally{wo(this)}l=void 0}return l}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"roi_in"),Ce(e,"norm_rect_in");const t=new Pt;Xt(t,a1,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),xe(n,"IMAGE:image_in"),xe(n,"ROI:roi_in"),xe(n,"NORM_RECT:norm_rect_in"),n.o(t),Ft(e,n),bo(this,e),this.outputConfidenceMasks&&(he(e,"confidence_masks"),ce(n,"CONFIDENCE_MASKS:confidence_masks"),Ks(this,"confidence_masks"),this.g.ba("confidence_masks",((s,r)=>{this.confidenceMasks=s.map((i=>Xs(this,i,!0,!this.j))),U(this,r)})),this.g.attachEmptyPacketListener("confidence_masks",(s=>{this.confidenceMasks=[],U(this,s)}))),this.outputCategoryMask&&(he(e,"category_mask"),ce(n,"CATEGORY_MASK:category_mask"),Ks(this,"category_mask"),this.g.V("category_mask",((s,r)=>{this.categoryMask=Xs(this,s,!1,!this.j),U(this,r)})),this.g.attachEmptyPacketListener("category_mask",(s=>{this.categoryMask=void 0,U(this,s)}))),he(e,"quality_scores"),ce(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((s,r)=>{this.qualityScores=s,U(this,r)})),this.g.attachEmptyPacketListener("quality_scores",(s=>{this.categoryMask=void 0,U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};rn.prototype.segment=rn.prototype.segment,rn.prototype.setOptions=rn.prototype.o,rn.createFromModelPath=function(e,t){return le(rn,e,{baseOptions:{modelAssetPath:t}})},rn.createFromModelBuffer=function(e,t){return le(rn,e,{baseOptions:{modelAssetBuffer:t}})},rn.createFromOptions=function(e,t){return le(rn,e,t)};var Bt=class extends bt{constructor(e,t){super(new $t(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},q(e=this.h=new l1,0,1,t=new Le)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?Te(this.h,2,nr(e.displayNamesLocale)):"displayNamesLocale"in e&&Te(this.h,2),e.maxResults!==void 0?gn(this.h,3,e.maxResults):"maxResults"in e&&Te(this.h,3),e.scoreThreshold!==void 0?V(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&Te(this.h,4),e.categoryAllowlist!==void 0?Ii(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&Te(this.h,5),e.categoryDenylist!==void 0?Ii(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&Te(this.h,6),this.l(e)}D(e,t){return this.j={detections:[]},Ht(this,e,t),this.j}F(e,t,n){return this.j={detections:[]},mn(this,e,n,t),this.j}m(){var e=new wt;Ce(e,"input_frame_gpu"),Ce(e,"norm_rect"),he(e,"detections");const t=new Pt;Xt(t,E0,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),xe(n,"IMAGE:input_frame_gpu"),xe(n,"NORM_RECT:norm_rect"),ce(n,"DETECTIONS:detections"),n.o(t),Ft(e,n),this.g.attachProtoVectorListener("detections",((s,r)=>{for(const i of s)s=Uh(i),this.j.detections.push(u1(s));U(this,r)})),this.g.attachEmptyPacketListener("detections",(s=>{U(this,s)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Bt.prototype.detectForVideo=Bt.prototype.F,Bt.prototype.detect=Bt.prototype.D,Bt.prototype.setOptions=Bt.prototype.o,Bt.createFromModelPath=async function(e,t){return le(Bt,e,{baseOptions:{modelAssetPath:t}})},Bt.createFromModelBuffer=function(e,t){return le(Bt,e,{baseOptions:{modelAssetBuffer:t}})},Bt.createFromOptions=function(e,t){return le(Bt,e,t)};var Ga=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){var e;(e=this.segmentationMasks)==null||e.forEach((t=>{t.close()}))}};function cf(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function uf(e){try{const t=new Ga(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.s)return t;e.s(t)}finally{wo(e)}}Ga.prototype.close=Ga.prototype.close;var xt=class extends bt{constructor(e,t){super(new $t(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,q(e=this.h=new c1,0,1,t=new Le),this.v=new t1,q(this.h,0,3,this.v),this.j=new e1,q(this.h,0,2,this.j),gn(this.j,4,1),V(this.j,2,.5),V(this.v,2,.5),V(this.h,4,.5)}get baseOptions(){return ue(this.h,Le,1)}set baseOptions(e){q(this.h,0,1,e)}o(e){return"numPoses"in e&&gn(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&V(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&V(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&V(this.v,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}D(e,t,n){const s=typeof t!="function"?t:{};return this.s=typeof t=="function"?t:n,cf(this),Ht(this,e,s),uf(this)}F(e,t,n,s){const r=typeof n!="function"?n:{};return this.s=typeof n=="function"?n:s,cf(this),mn(this,e,r,t),uf(this)}m(){var e=new wt;Ce(e,"image_in"),Ce(e,"norm_rect"),he(e,"normalized_landmarks"),he(e,"world_landmarks"),he(e,"segmentation_masks");const t=new Pt;Xt(t,A0,this.h);const n=new dt;Rt(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),xe(n,"IMAGE:image_in"),xe(n,"NORM_RECT:norm_rect"),ce(n,"NORM_LANDMARKS:normalized_landmarks"),ce(n,"WORLD_LANDMARKS:world_landmarks"),n.o(t),Ft(e,n),bo(this,e),this.g.attachProtoVectorListener("normalized_landmarks",((s,r)=>{this.landmarks=[];for(const i of s)s=Yr(i),this.landmarks.push(_o(s));U(this,r)})),this.g.attachEmptyPacketListener("normalized_landmarks",(s=>{this.landmarks=[],U(this,s)})),this.g.attachProtoVectorListener("world_landmarks",((s,r)=>{this.worldLandmarks=[];for(const i of s)s=Ns(i),this.worldLandmarks.push(Mr(s));U(this,r)})),this.g.attachEmptyPacketListener("world_landmarks",(s=>{this.worldLandmarks=[],U(this,s)})),this.outputSegmentationMasks&&(ce(n,"SEGMENTATION_MASK:segmentation_masks"),Ks(this,"segmentation_masks"),this.g.ba("segmentation_masks",((s,r)=>{this.segmentationMasks=s.map((i=>Xs(this,i,!0,!this.s))),U(this,r)})),this.g.attachEmptyPacketListener("segmentation_masks",(s=>{this.segmentationMasks=[],U(this,s)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};xt.prototype.detectForVideo=xt.prototype.F,xt.prototype.detect=xt.prototype.D,xt.prototype.setOptions=xt.prototype.o,xt.createFromModelPath=function(e,t){return le(xt,e,{baseOptions:{modelAssetPath:t}})},xt.createFromModelBuffer=function(e,t){return le(xt,e,{baseOptions:{modelAssetBuffer:t}})},xt.createFromOptions=function(e,t){return le(xt,e,t)},xt.POSE_CONNECTIONS=E1;const S1={video:{width:{ideal:1280},height:{ideal:720},facingMode:"user"},audio:!1};function T1(){return navigator.mediaDevices}function D0(){var e;if(typeof navigator>"u")return"Media capture is unavailable: there is no `navigator` in this environment (server-side render or Node).";if(typeof((e=T1())==null?void 0:e.getUserMedia)=="function")return null;const t=typeof location>"u"?"unknown origin":location.origin;return typeof isSecureContext<"u"&&!isSecureContext?`Media capture is unavailable: ${t} is not a secure context, so the browser does not expose \`navigator.mediaDevices\`. Open the page over https://, or over http:// on localhost or 127.0.0.1.`:`Media capture is unavailable: this browser does not expose \`navigator.mediaDevices.getUserMedia\` at ${t}.`}async function O0(e=S1){const t=D0();if(t)throw new Error(t);return T1().getUserMedia(e)}const ii=new WeakMap;async function P0(e,t=S1){const n=ii.get(e);if(n)n.refs+=1;else{const r=await O0(t);e.srcObject=r,ii.set(e,{stream:r,refs:1})}await L0(e);try{await e.play()}catch(r){if(!(r instanceof DOMException)||r.name!=="AbortError")throw r}let s=!1;return()=>{if(s)return;s=!0;const r=ii.get(e);if(r&&(r.refs-=1,!(r.refs>0))){for(const i of r.stream.getTracks())i.stop();ii.delete(e),e.srcObject=null}}}function L0(e){return e.readyState>=HTMLMediaElement.HAVE_METADATA?Promise.resolve():new Promise(t=>{e.addEventListener("loadedmetadata",()=>t(),{once:!0})})}const R0=["None","Closed_Fist","Open_Palm","Pointing_Up","Thumb_Down","Thumb_Up","Victory","ILoveYou"];function F0(e,t={}){const{numHands:n=2,minHandDetectionConfidence:s=.5,minHandPresenceConfidence:r=.5,minTrackingConfidence:i=.5,gestureScoreThreshold:o=.6}=t,a=ve(null),l=ve({isReady:!1,isDetecting:!1,error:null,gestures:[],landmarks:null}),c=ve(0),u=ve("None");let h=null,w=null;const I=async()=>{try{e.value&&(w=await P0(e.value))}catch(Y){l.value.error=`Failed to access webcam: ${Y}`,console.error("Webcam access error:",Y)}},M=async()=>{try{l.value.error=null,a.value&&(a.value.close(),a.value=null);const Y=await us.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.22-rc.20250304/wasm");a.value=await yt.createFromOptions(Y,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/gesture_recognizer/gesture_recognizer/float16/1/gesture_recognizer.task",delegate:"GPU"},runningMode:"IMAGE",numHands:n,minHandDetectionConfidence:s,minHandPresenceConfidence:r,minTrackingConfidence:i}),l.value.isReady=!0}catch(Y){l.value.error=`Failed to initialize gesture recognizer: ${Y}`,console.error(l.value.error)}},D=()=>{var Y,R,F;if(!l.value.isDetecting)return;if(!l.value.isReady){h=requestAnimationFrame(D);return}if(!a.value){k(),l.value.error="Gesture recognizer instance lost";return}if(!e.value){h=requestAnimationFrame(D);return}const B=e.value;if(B.readyState!==B.HAVE_ENOUGH_DATA){h=requestAnimationFrame(D);return}try{const J=a.value.recognize(B),Ie=[];for(const[Ye,st]of(J.gestures??[]).entries()){const[qe]=st;qe!=null&&qe.categoryName&&R0.includes(qe.categoryName)&&Ie.push({gesture:qe.categoryName,score:qe.score,handedness:((F=(R=(Y=J.handedness)==null?void 0:Y[Ye])==null?void 0:R[0])==null?void 0:F.categoryName)||"Right"})}l.value.gestures=Ie,l.value.landmarks=J.landmarks||null}catch(J){console.error("Gesture recognition error:",J)}h=requestAnimationFrame(D)},_=()=>{if(!e.value||!a.value){console.error("Video element or gesture recognizer not ready");return}if(l.value.isDetecting){console.warn("Detection already running");return}l.value.isDetecting=!0,l.value.error=null,setTimeout(()=>{l.value.isDetecting&&a.value&&D()},100)},v=async()=>{try{if(l.value.isReady=!1,l.value.error=null,await M(),!l.value.isReady||!a.value)throw new Error("Failed to initialize gesture recognizer");await I(),_()}catch(Y){l.value.error=`Failed to start detection: ${Y}`,console.error(l.value.error)}},k=()=>{l.value.isDetecting=!1,h!==null&&(cancelAnimationFrame(h),h=null),w==null||w(),w=null},N=()=>{if(l.value.gestures.length===0)return u.value="None",null;const Y=l.value.gestures.reduce((R,F)=>R.score>F.score?R:F);return Y.score<o?(u.value="None",null):Y},L=()=>l.value.gestures.length===0?null:l.value.gestures.reduce((Y,R)=>Y.score>R.score?Y:R),se=(Y,R=300)=>{const F=L();if(!F||F.gesture!==Y)return u.value="None",!1;const B=Date.now();return u.value!==Y?(u.value=Y,c.value=B,!1):B-c.value>=R};return Js(()=>{k(),a.value&&a.value.close()}),{state:l,initialize:M,startDetection:v,stopDetection:k,getDominantGesture:L,getStableGesture:N,isGestureHeld:se}}const ja="taskin-gesture-mappings",gi=[{gesture:"Pointing_Up",action:"moveUp"},{gesture:"Thumb_Down",action:"moveDown"},{gesture:"Victory",action:"groupWith"},{gesture:"Open_Palm",action:"ungroup"},{gesture:"Closed_Fist",action:"undo"}],Zo=["moveUp","moveDown","groupWith","ungroup","undo","copyCard","setDifficulty1","setDifficulty2","setDifficulty3","setDifficulty4","setDifficulty5","none"],ff=2e3,df=5e3,N0=2e3,hf=600;function U0(e){if(typeof localStorage>"u")return gi;try{const t=localStorage.getItem(ja);return t&&JSON.parse(t)[e]||gi}catch{return gi}}function Qo(e,t){if(!(typeof localStorage>"u"))try{const n=localStorage.getItem(ja),s=n?JSON.parse(n):{};s[e]=t,localStorage.setItem(ja,JSON.stringify(s))}catch{}}function B0(e,t,n="default"){const s=ve("IDLE"),r=ve(U0(n)),i=ve(0),o=ve(0),a=ve(null),l=ve(0),c=ve(null),u=oe(()=>{const _={none:"none"};for(const v of r.value)v.gesture!=="None"&&(_[v.gesture]=v.action);return _});let h=null,w=null;const I=()=>{h&&(clearTimeout(h),h=null),w&&(clearTimeout(w),w=null)},M=()=>{s.value="IDLE",i.value=0,o.value=0,a.value=null,l.value=0,I()},D=_=>{if(s.value!=="IDLE")return"none";for(const v of r.value)if(v.gesture===_)return v.action;return"none"};return{wizardState:s,mappings:r,readyProgress:i,step:o,recordingCandidate:a,selectedActionIndex:l,lastMapping:c,currentActions:u,AVAILABLE_ACTIONS:Zo,getMappedAction:()=>{const _=e();return _?D(_.gesture):null},getActionForGesture:D,getGestureForAction:_=>{for(const v of r.value)if(v.action===_)return v.gesture;return null},setMapping:(_,v)=>{const k=r.value.findIndex(N=>N.gesture===_);k>=0?r.value[k]={gesture:_,action:v}:r.value.push({gesture:_,action:v}),Qo(n,r.value)},resetMappings:()=>{r.value=[...gi],Qo(n,r.value)},resetWizard:M,tick:()=>{const _=e();switch(s.value){case"IDLE":{_&&_.gesture==="Open_Palm"&&!h?(i.value=0,h=setInterval(()=>{const v=e();if((v==null?void 0:v.gesture)!=="Open_Palm"){i.value=0,I();return}if(i.value+=100,i.value>=ff){I(),s.value="READY",i.value=ff;const k=setInterval(()=>{const N=e();if((N==null?void 0:N.gesture)!=="Open_Palm"){N&&N.gesture!=="None"&&(s.value="RECORDING",o.value=1,a.value=N.gesture),clearInterval(k);return}i.value+=100,i.value>=df&&(clearInterval(k),s.value="RECORDING",o.value=1)},100);h=k}},100)):(_==null?void 0:_.gesture)!=="Open_Palm"&&(i.value=0);break}case"READY":{i.value+=100,i.value>=df&&(s.value="RECORDING",o.value=1,l.value=0,I());break}case"RECORDING":{_&&_.gesture!=="None"?w||(w=setTimeout(()=>{a.value=_.gesture,o.value=2,s.value="SELECTING",l.value=0,w=null},N0)):w&&(clearTimeout(w),w=null);break}case"SELECTING":{if(t("Closed_Fist",hf)){const v=Zo[l.value];a.value&&v&&(c.value={gesture:a.value,action:v}),o.value=3,s.value="CONFIRMING"}else(_==null?void 0:_.gesture)==="Thumb_Up"?l.value=Math.min(l.value+1,Zo.length-1):(_==null?void 0:_.gesture)==="Thumb_Down"?l.value=Math.max(l.value-1,0):(_==null?void 0:_.gesture)==="Open_Palm"&&M();break}case"CONFIRMING":{if(t("Closed_Fist",hf)){if(c.value){const v=r.value.findIndex(k=>k.gesture===c.value.gesture);v>=0?r.value[v]=c.value:r.value.push(c.value),Qo(n,r.value)}s.value="SAVED",o.value=4,setTimeout(M,1500)}else((_==null?void 0:_.gesture)==="Open_Palm"||(_==null?void 0:_.gesture)==="Thumb_Down")&&M();break}}}}}const G0={class:"gesture-system"},j0=Ve({__name:"GestureSystem",props:{functions:{},userId:{},detecting:{type:Boolean},videoElement:{}},emits:["gestureAction","camera-active"],setup(e,{emit:t}){const n=e,s=t,r=ve(null),i=oe(()=>n.videoElement??r.value),{state:o,startDetection:a,stopDetection:l,getStableGesture:c,isGestureHeld:u}=F0(i),{wizardState:h,readyProgress:w,step:I,recordingCandidate:M,selectedActionIndex:D,lastMapping:_,mappings:v,tick:k,getMappedAction:N,resetWizard:L}=B0(c,u,n.userId),se=oe(()=>[...n.functions.map(R=>R.id),"none"]);qn(()=>o.value.isDetecting,R=>s("camera-active",R));let Y=null;return qn(()=>n.detecting,R=>{R?(a(),Y=setInterval(()=>{k();const F=N();F&&F!=="none"&&s("gestureAction",F)},300)):(l(),Y&&(clearInterval(Y),Y=null),L())}),Js(()=>{l(),Y&&clearInterval(Y)}),(R,F)=>(x(),C("div",G0,[n.videoElement===void 0?(x(),C("video",{key:0,ref_key:"internalVideoRef",ref:r,style:{display:"none"},width:"320",height:"240",muted:"",playsinline:""},null,512)):ee("",!0),O(o).isDetecting?(x(),tt(yg,{key:1,class:"gesture-system__legend",mappings:O(v),compact:""},null,8,["mappings"])):ee("",!0),O(o).isDetecting?(x(),tt(Zg,{key:2,"wizard-state":O(h),"ready-progress":O(w),step:O(I),"recording-candidate":O(M),"selected-action-index":O(D),"available-actions":se.value,"last-mapping":O(_),"teleport-to":"body"},null,8,["wizard-state","ready-progress","step","recording-candidate","selected-action-index","available-actions","last-mapping"])):ee("",!0)]))}}),V0=Zs(j0,[["__scopeId","data-v-04ac58fa"]]),$0=["title"],H0=["src","alt"],z0={key:1,class:"avatar__initials"},W0=Ve({__name:"Avatar",props:{name:{},src:{default:void 0},size:{default:"md"}},setup(e){const t=e,n=oe(()=>{const s=t.name.trim().split(" "),r=s.at(0),i=s.at(-1);return s.length>=2&&r&&i?`${r.charAt(0)}${i.charAt(0)}`.toUpperCase():t.name.slice(0,2).toUpperCase()});return(s,r)=>(x(),C("div",{class:be(["avatar",`avatar--${e.size}`]),title:e.name},[e.src?(x(),C("img",{key:0,class:"avatar__image",src:e.src,alt:e.name},null,8,H0)):(x(),C("span",z0,W(n.value),1))],10,$0))}}),zt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},K0=zt(W0,[["__scopeId","data-v-04fbcabb"]]),Y0=Ve({__name:"Badge",props:{variant:{default:"default"},size:{default:"md"}},setup(e){const t=e,n=oe(()=>({fontSize:{sm:"0.75rem",md:"0.875rem",lg:"1rem"}[t.size]}));return(s,r)=>(x(),C("span",{class:be(["badge",`badge--${e.variant}`]),style:dn(n.value)},[Ls(s.$slots,"default",{},void 0)],6))}}),ea=zt(Y0,[["__scopeId","data-v-714e24a1"]]),q0=["aria-valuenow","aria-label"],X0={class:"progress-bar__track"},J0={class:"progress-bar__label"},Z0={class:"progress-bar__label progress-bar__label--on-fill"},Q0=Ve({__name:"ProgressBar",props:{percentage:{},variant:{default:"primary"},showLabel:{type:Boolean,default:!0},ariaLabel:{default:void 0}},setup(e){const t=e,n=oe(()=>Math.min(100,Math.max(0,t.percentage))),s=oe(()=>t.ariaLabel??`Progresso: ${n.value}%`);return(r,i)=>(x(),C("div",{class:be(["progress-bar",`progress-bar--${e.variant}`]),role:"progressbar","aria-valuenow":n.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":s.value},[b("div",X0,[b("div",{class:be(["progress-bar__fill",`progress-bar__fill--${e.variant}`]),style:dn({width:`${n.value}%`})},null,6),e.showLabel?(x(),C(_e,{key:0},[n.value<100?(x(),C("span",{key:0,class:"progress-bar__label-clip",style:dn({clipPath:`inset(0 0 0 ${n.value}%)`}),"aria-hidden":"true"},[b("span",J0,W(n.value)+"%",1)],4)):ee("",!0),n.value>0?(x(),C("span",{key:1,class:"progress-bar__label-clip",style:dn({clipPath:`inset(0 ${100-n.value}% 0 0)`}),"aria-hidden":"true"},[b("span",Z0,W(n.value)+"%",1)],4)):ee("",!0)],64)):ee("",!0)])],10,q0))}}),e4=zt(Q0,[["__scopeId","data-v-4001a91c"]]),t4="taskin-prioritization-prefs",n4=10;function s4(e){const t={viewMode:"cards",sortMode:"manual",collapsedGroups:{}};if(typeof localStorage>"u")return t;try{const n=localStorage.getItem(e);return n?{...t,...JSON.parse(n)}:t}catch{return t}}function r4(e,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function pf(e,t={}){var n;const s=e.map((o,a)=>({task:o,index:a})).sort((o,a)=>{const l=o.task.order,c=a.task.order;return l===void 0&&c===void 0?o.index-a.index:l===void 0?1:c===void 0?-1:l!==c?l-c:o.index-a.index}).map(({task:o})=>o),r=[];let i=null;for(const o of s){const a=((n=o.parent)==null?void 0:n.type)==="group"?o.parent.id:void 0;if(a){if(i&&i.groupId===a){i.items.push({kind:"task",task:o});continue}i={kind:"group",groupId:a,groupName:o.groupName??null,collapsed:!!t[a],items:[{kind:"task",task:o}]},r.push(i)}else i=null,r.push({kind:"task",task:o})}return r}function ta(e){const t=[];function n(s,r,i,o,a){for(const l of s)if(l.kind==="group")for(const c of l.items)n([c],l.groupId,l.groupName??void 0);else t.push({...l.task,parent:r?{type:"group",id:r}:void 0,groupName:i})}return n(e),t}function De(e){return JSON.parse(JSON.stringify(e))}function Va(e){var t;return{order:e.order,parentId:((t=e.parent)==null?void 0:t.type)==="group"?e.parent.id:void 0,difficulty:e.difficulty}}function i4(e,t){return e?e.order===t.order&&e.parentId===t.parentId&&e.difficulty===t.difficulty:!1}function o4(e,t){return e.filter(n=>!i4(t.get(n.id),Va(n)))}function a4(e,t={}){const n=t.storageKey??t4,s=t.orderStep??n4,r=s4(n),i=ve(r.viewMode),o=ve(r.sortMode),a=ve(r.collapsedGroups),l=ve(""),c=ve(pf(e.value,a.value)),u=Do(new Map(e.value.map(f=>[f.id,Va(f)]))),h=Do([]),w=Do([]);qn(e,f=>{c.value=pf(f,a.value)});function I(){r4(n,{viewMode:i.value,sortMode:o.value,collapsedGroups:a.value})}function M(){let f=0;function p(y){for(const g of y)g.kind==="task"?(f++,g.task.order=f*s):p(g.items)}p(c.value)}const D=oe(()=>o4(ta(c.value),u.value));function _(){const f=ta(c.value);u.value=new Map(f.map(p=>[p.id,Va(p)]))}function v(f){h.value=[...h.value,f].slice(-50),w.value=[]}const k=oe(()=>h.value.length>0),N=oe(()=>w.value.length>0);function L(){const f=h.value.at(-1);f&&(w.value=[...w.value,De(c.value)].slice(-50),h.value=h.value.slice(0,-1),c.value=f)}function se(){const f=w.value.at(-1);f&&(h.value=[...h.value,De(c.value)].slice(-50),w.value=w.value.slice(0,-1),c.value=f)}function Y(f,p,y=null){for(const[g,m]of f.entries()){if(m.kind==="task"&&m.task.id===p)return{container:f,index:g,parentGroup:y};if(m.kind==="group"){const E=Y(m.items,p,m);if(E)return E}}return null}function R(f,p){for(const[y,g]of f.entries()){if(g.kind==="task"&&g.task.id===p||g.kind==="group"&&g.groupId===p)return{container:f,index:y};if(g.kind==="group"){const m=R(g.items,p);if(m)return m}}return null}function F(f){for(let p=f.length-1;p>=0;p--){const y=f[p];if((y==null?void 0:y.kind)==="group"){F(y.items);const[g]=y.items;y.items.length===1&&(g==null?void 0:g.kind)==="task"?f.splice(p,1,{kind:"task",task:g.task}):y.items.length===0&&f.splice(p,1)}}}function B(f,p){const y=Y(f,p);if(!y)return null;const[g]=y.container.splice(y.index,1);return(g==null?void 0:g.kind)!=="task"?null:(F(f),g.task)}function J(f,p){for(const y of f)if(y.kind==="group"){if(y.groupId===p)return y;const g=J(y.items,p);if(g)return g}return null}function Ie(f){l.value=f}function Ye(f){i.value=f,I()}function st(f){o.value=f,I()}function qe(f){a.value={...a.value,[f]:!a.value[f]};const p=J(c.value,f);p&&(p.collapsed=a.value[f]??!1),I()}function Un(f,p){const y=Y(c.value,f);if(!y)return;v(De(c.value));const g=y.container[y.index];(g==null?void 0:g.kind)==="task"&&(g.task={...g.task,difficulty:p})}function we(f,p){if(f===p)return;const y=De(c.value),g=De(c.value),m=B(g,f);if(!m)return;const E=Y(g,p);if(!E)g.push({kind:"task",task:m});else{const S=E.parentGroup;E.container.splice(E.index,0,{kind:"task",task:{...m,parent:S?{type:"group",id:S.groupId}:void 0}})}v(y),c.value=g,M()}function te(f,p){if(f===p)return;const y=De(c.value),g=De(c.value),m=B(g,f);if(!m)return;const E=Y(g,p);if(!E)g.push({kind:"task",task:m});else{const S=E.parentGroup;E.container.splice(E.index+1,0,{kind:"task",task:{...m,parent:S?{type:"group",id:S.groupId}:void 0}})}v(y),c.value=g,M()}function X(f,p){for(const y of f)if(y.kind==="group"){if(y.groupId===p)return f;const g=X(y.items,p);if(g)return g}return null}function kt(f,p){if(f===p)return;const y=De(c.value),g=De(c.value),m=Y(g,f),E=Y(g,p);if(!m||!E)return;const S=E.container[E.index];if((S==null?void 0:S.kind)!=="task")return;const T=m.parentGroup,A=E.parentGroup,$=T==null?void 0:T.groupId,P=A==null?void 0:A.groupId;if(T&&A&&$!==P){const ne=X(g,A.groupId);if(!ne)return;const re=ne.indexOf(T),Ee=ne.indexOf(A);if(re===-1||Ee===-1)return;const Re={kind:"group",groupId:`g-${Math.random().toString(36).slice(2,10)}`,groupName:null,collapsed:!1,items:[{...T},{...A}]},et=Math.min(re,Ee),mt=Math.max(re,Ee);ne.splice(et,mt-et+1,Re),v(y),c.value=g,M();return}if(T&&A&&$===P){const ne=`g-${Math.random().toString(36).slice(2,10)}`,re=Math.min(m.index,E.index),Ee=Math.max(m.index,E.index),Re=m.container[m.index],et=E.container[E.index];if((Re==null?void 0:Re.kind)!=="task"||(et==null?void 0:et.kind)!=="task")return;const mt={kind:"group",groupId:ne,groupName:null,collapsed:!1,items:[{kind:"task",task:{...Re.task,parent:{type:"group",id:ne}}},{kind:"task",task:{...et.task,parent:{type:"group",id:ne}}}]};m.container.splice(re,Ee-re+1,mt),v(y),c.value=g,M();return}const G=B(g,f);if(!G)return;const H=Y(g,p);if(!H){g.push({kind:"task",task:G}),v(y),c.value=g,M();return}const ie=H.container[H.index];if((ie==null?void 0:ie.kind)!=="task"){g.push({kind:"task",task:G}),v(y),c.value=g,M();return}if(H.parentGroup)H.parentGroup.items.push({kind:"task",task:{...G,parent:{type:"group",id:H.parentGroup.groupId}}});else{const ne=`g-${Math.random().toString(36).slice(2,10)}`;H.container.splice(H.index,1,{kind:"group",groupId:ne,groupName:null,collapsed:!1,items:[{kind:"task",task:{...ie.task,parent:{type:"group",id:ne}}},{kind:"task",task:{...G,parent:{type:"group",id:ne}}}]})}v(y),c.value=g,M()}function vn(f,p){const y=J(c.value,p);if(!y||y.items.some(T=>T.kind==="task"&&T.task.id===f))return;const g=De(c.value),m=De(c.value),E=B(m,f);if(!E)return;const S=J(m,p);S?S.items.push({kind:"task",task:{...E,parent:{type:"group",id:S.groupId}}}):m.push({kind:"task",task:E}),v(g),c.value=m,M()}function Et(f,p){if(!J(c.value,f)||f===p)return;const y=De(c.value),g=De(c.value),m=X(g,f);if(!m)return;const E=m.findIndex(A=>A.kind==="group"&&A.groupId===f);if(E===-1)return;const[S]=m.splice(E,1);if(!S)return;const T=R(g,p);T?T.container.splice(T.index,0,S):m.push(S),v(y),c.value=g,M()}function gt(f,p){if(!J(c.value,f)||f===p)return;const y=De(c.value),g=De(c.value),m=X(g,f);if(!m)return;const E=m.findIndex(A=>A.kind==="group"&&A.groupId===f);if(E===-1)return;const[S]=m.splice(E,1);if(!S)return;const T=R(g,p);T?T.container.splice(T.index+1,0,S):m.push(S),v(y),c.value=g,M()}function ks(f,p){if(f===p)return;const y=J(c.value,f),g=J(c.value,p);if(!y||!g)return;const m=De(c.value),E=De(c.value),S=X(E,p);if(!S)return;const T=S.findIndex(re=>re.kind==="group"&&re.groupId===f),A=S.findIndex(re=>re.kind==="group"&&re.groupId===p);if(T===-1||A===-1)return;const $=`g-${Math.random().toString(36).slice(2,10)}`,P=S[T],G=S[A];if(!P||!G)return;const H={kind:"group",groupId:$,groupName:null,collapsed:!1,items:[{...P},{...G}]},ie=Math.min(T,A),ne=Math.max(T,A);S.splice(ne,1),S.splice(ie,1,H),v(m),c.value=E,M()}function lr(f){const p=R(c.value,f);if(!p||p.index===0)return;const y=De(c.value),g=De(c.value),m=R(g,f);if(!m||m.index===0)return;const E=m.container[m.index-1],S=m.container[m.index];!E||!S||(m.container[m.index-1]=S,m.container[m.index]=E,v(y),c.value=g,M())}function Es(f){const p=R(c.value,f);if(!p||p.index>=p.container.length-1)return;const y=De(c.value),g=De(c.value),m=R(g,f);if(!m||m.index>=m.container.length-1)return;const E=m.container[m.index+1],S=m.container[m.index];!E||!S||(m.container[m.index+1]=S,m.container[m.index]=E,v(y),c.value=g,M())}function yn(f){var p;if(!J(c.value,f))return;const y=De(c.value),g=De(c.value),m=X(g,f);if(!m)return;const E=m.findIndex(T=>T.kind==="group"&&T.groupId===f);if(((p=m[E])==null?void 0:p.kind)!=="group")return;const S=m[E];m.splice(E,1,...S.items),v(y),c.value=g,M()}function Bn(f,p){const y=J(c.value,f);y&&(v(De(c.value)),y.groupName=p,M())}function Gn(){return JSON.stringify(ta(c.value),null,2)}function fe(){return JSON.stringify(c.value,null,2)}function ae(f){const p=Y(c.value,f);if(!p)return"";const y=p.container[p.index];if((y==null?void 0:y.kind)!=="task")return"";const g=y.task;return`[${g.id}] (${g.type??"-"}) ${g.title} — dif: ${g.difficulty??"-"}`}function Wt(f){const p=J(c.value,f);if(!p)return"";const y=`${p.groupName??"Grupo"} (${p.items.length} items)`,g=[];function m(E,S){for(const T of E)T.kind==="task"?g.push(`${" ".repeat(S)}[${T.task.id}] (${T.task.type??"-"}) ${T.task.title} — dif: ${T.task.difficulty??"-"}`):(g.push(`${" ".repeat(S)}▼ ${T.groupName??"Grupo"} (${T.items.length} items)`),m(T.items,S+1))}return m(p.items,1),[y,...g].join(`
|
|
36
|
+
`)}const d=oe(()=>o.value==="manual");return{tree:oe(()=>{let f=c.value;if(o.value!=="manual"){let m=function(T){return T.kind==="task"?T.task.difficulty??0:Math.max(0,...T.items.map(m))},E=function(T){return T.map(A=>A.kind==="group"?{...A,items:E([...A.items]).sort(($,P)=>(m($)-m(P))*S)}:A)};const S=o.value==="diff-asc"?1:-1;f=E(f),f=[...f].sort((T,A)=>(m(T)-m(A))*S)}const p=l.value.trim().toLowerCase();if(!p)return f;const y=m=>`${m.id} ${m.type??""} ${m.title}`.toLowerCase().includes(p);function g(m){return m.map(E=>{if(E.kind==="group"){const S=g(E.items);return S.length>0?{...E,items:S}:null}return y(E.task)?E:null}).filter(E=>E!==null)}return g(f)}),filter:l,viewMode:i,sortMode:o,dragEnabled:d,changedTasks:D,canUndo:k,canRedo:N,setFilter:Ie,setViewMode:Ye,setSortMode:st,toggleGroupCollapsed:qe,setDifficulty:Un,moveBefore:we,moveAfter:te,groupWith:kt,joinGroup:vn,renameGroup:Bn,moveGroupBefore:Et,moveGroupAfter:gt,groupWithGroup:ks,moveUp:lr,moveDown:Es,ungroup:yn,exportJson:Gn,exportTreeJson:fe,copyCardText:ae,copyGroupText:Wt,acknowledgeChanges:_,undo:L,redo:se}}const l4={class:"day-bar__header"},c4={class:"day-bar__date"},u4={class:"day-bar__hours"},f4={class:"day-bar__progress"},d4={key:0,class:"day-bar__description"},h4=Ve({__name:"DayBar",props:{day:{},maxHours:{default:8},variant:{default:"default"}},setup(e){const t=e,n=i=>{const o=new Date,a=new Date(o);a.setDate(a.getDate()-1);const l=new Date(i);return l.toDateString()===o.toDateString()?"Hoje":l.toDateString()===a.toDateString()?"Ontem":l.toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:void 0})},s=oe(()=>Math.min(t.day.hours/t.maxHours*100,100)),r=oe(()=>{const i=t.day.hours/t.maxHours;return i>=1?"success":i>=.75?"primary":i>=.5?"warning":"danger"});return(i,o)=>(x(),C("div",{class:be(["day-bar",`day-bar--${e.variant}`])},[b("div",l4,[b("span",c4,W(n(e.day.date)),1),b("span",u4,W(e.day.hours)+"h",1)]),b("div",f4,[b("div",{class:be(["day-bar__fill",`day-bar__fill--${r.value}`]),style:dn({width:`${s.value}%`})},null,6)]),e.variant==="default"&&e.day.description?(x(),C("p",d4,W(e.day.description),1)):ee("",!0)],2))}}),p4=zt(h4,[["__scopeId","data-v-8cc39d72"]]),g4={class:"project-breadcrumb"},m4={key:0,class:"project-breadcrumb__separator"},v4=Ve({__name:"ProjectBreadcrumb",props:{project:{},maxSegments:{default:3},separator:{default:"/"}},setup(e){const t=e,n=oe(()=>t.project.segments.length<=t.maxSegments?t.project.segments:[t.project.segments[0],"...",...t.project.segments.slice(-t.maxSegments+1)]);return(s,r)=>(x(),C("div",g4,[(x(!0),C(_e,null,Mt(n.value,(i,o)=>(x(),C("span",{class:"project-breadcrumb__item",key:`segment-${o}`},[b("span",{class:be(["project-breadcrumb__segment",{"project-breadcrumb__segment--ellipsis":i==="..."}])},W(i),3),o<n.value.length-1?(x(),C("span",m4,W(e.separator),1)):ee("",!0)]))),128))]))}}),y4=zt(v4,[["__scopeId","data-v-2f90185d"]]),_4={class:"task-header__info"},b4={class:"task-header__name"},w4={key:0,class:"task-header__email"},k4=Ve({__name:"TaskHeader",props:{assignee:{},size:{default:"md"}},setup(e){return(t,n)=>(x(),C("div",{class:be(["task-header",`task-header--${e.size}`])},[je(O(K0),{name:e.assignee.name,src:e.assignee.avatar,size:e.size},null,8,["name","src","size"]),b("div",_4,[b("span",b4,W(e.assignee.name),1),e.assignee.email?(x(),C("span",w4,W(e.assignee.email),1)):ee("",!0)])],2))}}),E4=zt(k4,[["__scopeId","data-v-743d664f"]]),A4={class:"time-estimate__item"},S4={class:"time-estimate__value"},T4={key:0,class:"time-estimate__separator"},x4={key:1,class:"time-estimate__separator"},I4={class:"time-estimate__item"},C4={class:"time-estimate__value time-estimate__value--spent"},M4={key:2,class:"time-estimate__separator"},D4={key:3,class:"time-estimate__separator"},O4={class:"time-estimate__item"},P4={class:"time-estimate__value time-estimate__value--remaining"},L4=Ve({__name:"TimeEstimate",props:{estimate:{},variant:{default:"default"}},setup(e){const t=r=>`${r}h`,n=r=>r.estimated===0?0:Math.round(r.spent/r.estimated*100),s=r=>{const i=n(r);return i>=100?"danger":i>=80?"warning":"ok"};return(r,i)=>(x(),C("div",{class:be(["time-estimate",[`time-estimate--${e.variant}`,`time-estimate--${s(e.estimate)}`]])},[b("div",A4,[i[0]||(i[0]=b("span",{class:"time-estimate__label"},"Estimado",-1)),b("span",S4,W(t(e.estimate.estimated)),1)]),e.variant==="default"?(x(),C("div",T4," → ")):(x(),C("div",x4," / ")),b("div",I4,[i[1]||(i[1]=b("span",{class:"time-estimate__label"},"Gasto",-1)),b("span",C4,W(t(e.estimate.spent)),1)]),e.variant==="default"?(x(),C("div",M4," → ")):(x(),C("div",D4," / ")),b("div",O4,[i[2]||(i[2]=b("span",{class:"time-estimate__label"},"Restante",-1)),b("span",P4,W(t(e.estimate.remaining)),1)])],2))}}),R4=zt(L4,[["__scopeId","data-v-b4c7bd5e"]]),F4={class:"dashboard-header"},N4={class:"header-content"},U4={class:"header-title"},B4={class:"connection-status"},G4={class:"status-text"},j4=["disabled"],V4={key:0,class:"error-banner"},$4={class:"error-message"},H4=Ve({__name:"DashboardHeader",props:{title:{default:"Dashboard"},status:{default:"disconnected"},statusText:{default:"Desconectado"},errorMessage:{default:""},showRetry:{type:Boolean,default:!1},isRetrying:{type:Boolean,default:!1},retryText:{default:"Tentar novamente"},retryingText:{default:"Reconectando..."}},emits:["retry"],setup(e){return(t,n)=>(x(),C("header",F4,[b("div",N4,[b("h1",U4,W(e.title),1),b("div",B4,[b("span",{class:be(["status-indicator",`status-indicator--${e.status}`])},null,2),b("span",G4,W(e.statusText),1),e.showRetry?(x(),C("button",{key:0,class:"retry-button",disabled:e.isRetrying,onClick:n[0]||(n[0]=s=>t.$emit("retry"))},W(e.isRetrying?e.retryingText:e.retryText),9,j4)):ee("",!0)])]),e.errorMessage?(x(),C("div",V4,[n[1]||(n[1]=b("span",{class:"error-icon"},"⚠️",-1)),b("span",$4,W(e.errorMessage),1)])):ee("",!0)]))}}),z4=zt(H4,[["__scopeId","data-v-c7d8a980"]]),gf=e=>e,W4=e=>e,K4={class:"task-card__header"},Y4={class:"task-card__header-left"},q4={class:"task-card__title"},X4={key:1,class:"task-card__progress"},J4={key:3,class:"task-card__days"},Z4={class:"task-card__days-list"},Q4={key:4,class:"task-card__dates"},em={key:0,class:"task-card__date"},tm={class:"task-card__date-value"},nm={key:1,class:"task-card__date"},sm={class:"task-card__date-value"},rm={key:5,class:"task-card__tags"},im={key:6,class:"task-card__warnings"},om=Ve({__name:"TaskCard",props:{task:{},id:{},number:{},title:{},status:{},assignee:{},project:{},estimates:{},progress:{},tags:{},warnings:{},dueDate:{},startDate:{},variant:{default:"default"}},setup(e){const t=e,n=oe(()=>t.task?{...t.task,...t.id&&{id:gf(t.id)},...t.number!==void 0&&{number:t.number},...t.title&&{title:t.title},...t.status&&{status:t.status},...t.assignee&&{assignee:t.assignee},...t.project&&{project:t.project},...t.estimates&&{estimates:t.estimates},...t.progress&&{progress:t.progress},...t.tags&&{tags:t.tags},...t.warnings&&{warnings:t.warnings}}:{id:gf(t.id||""),number:t.number||0,title:t.title||"",status:t.status||"pending",assignee:t.assignee,project:t.project||{segments:[]},estimates:t.estimates,progress:t.progress,tags:t.tags||[],warnings:t.warnings||[],dates:{created:new Date,...t.dueDate&&{dueDate:typeof t.dueDate=="string"?new Date(t.dueDate):t.dueDate},...t.startDate&&{started:typeof t.startDate=="string"?new Date(t.startDate):t.startDate}}}),s={pending:"default","in-progress":"primary",paused:"warning","in-review":"info",done:"success",blocked:"danger",canceled:"default"},r=oe(()=>{var l;const c=((l=n.value.progress)==null?void 0:l.percentage)||0;return n.value.status==="blocked"?"danger":n.value.status==="done"||c>=75?"success":c>=50?"primary":c>=25?"warning":"danger"}),i=oe(()=>({pending:"Pending","in-progress":"In Progress",paused:"Paused","in-review":"In Review",done:"Done",blocked:"Blocked",canceled:"Canceled"})[n.value.status]),o=oe(()=>n.value.warnings&&n.value.warnings.length>0),a=l=>(typeof l=="string"?new Date(l):l).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit"});return(l,c)=>{var u;return x(),C("div",{class:be(["task-card",[`task-card--${e.variant}`,`task-card--${n.value.status}`,{"task-card--has-warnings":o.value}]])},[b("div",K4,[b("div",Y4,[je(O(ea),{variant:s[n.value.status],size:"md"},{default:Ar(()=>[Xn(" #"+W(n.value.number),1)]),_:1},8,["variant"]),je(O(ea),{variant:"info",size:"sm"},{default:Ar(()=>[Xn(W(i.value),1)]),_:1})]),n.value.assignee?(x(),tt(O(E4),{key:0,assignee:n.value.assignee,size:"sm"},null,8,["assignee"])):ee("",!0)]),b("h3",q4,W(n.value.title),1),n.value.project?(x(),tt(O(y4),{key:0,class:"task-card__project",project:n.value.project,"max-segments":3},null,8,["project"])):ee("",!0),n.value.progress?(x(),C("div",X4,[je(O(e4),{percentage:n.value.progress.percentage,variant:r.value,"show-label":""},null,8,["percentage","variant"])])):ee("",!0),n.value.estimates?(x(),tt(O(R4),{key:2,class:"task-card__estimates",estimate:n.value.estimates,variant:"compact"},null,8,["estimate"])):ee("",!0),(u=n.value.progress)!=null&&u.dayLogs&&n.value.progress.dayLogs.length>0?(x(),C("div",J4,[c[0]||(c[0]=b("h4",{class:"task-card__days-title"}," Daily Progress ",-1)),b("div",Z4,[(x(!0),C(_e,null,Mt(n.value.progress.dayLogs.slice(-3),(h,w)=>(x(),tt(O(p4),{key:w,day:h,"max-hours":8,variant:"compact"},null,8,["day"]))),128))])])):ee("",!0),n.value.dates?(x(),C("div",Q4,[n.value.dates.dueDate?(x(),C("div",em,[c[1]||(c[1]=b("span",{class:"task-card__date-label"},"Due:",-1)),b("span",tm,W(a(n.value.dates.dueDate)),1)])):ee("",!0),n.value.dates.started?(x(),C("div",nm,[c[2]||(c[2]=b("span",{class:"task-card__date-label"},"Start:",-1)),b("span",sm,W(a(n.value.dates.started)),1)])):ee("",!0)])):ee("",!0),n.value.tags&&n.value.tags.length>0?(x(),C("div",rm,[(x(!0),C(_e,null,Mt(n.value.tags,h=>(x(),tt(O(ea),{key:h,variant:"default",size:"sm"},{default:Ar(()=>[Xn(W(h),1)]),_:2},1024))),128))])):ee("",!0),o.value?(x(),C("div",im,[(x(!0),C(_e,null,Mt(n.value.warnings,(h,w)=>(x(),C("div",{class:"task-card__warning",key:w}," ⚠️ "+W(h),1))),128))])):ee("",!0)],2)}}}),am=zt(om,[["__scopeId","data-v-574ce44b"]]),lm=["data-testid","onDragover","onClick"],cm=["draggable","onDragstart"],um=["onClick"],fm=["onClick"],dm={class:"group-count"},hm=["onClick"],pm=["onClick"],gm=["onClick"],mm=["onClick"],vm={key:0,class:"group-items"},ym=["data-testid","draggable","onDragstart","onDragover","onClick"],_m={key:0,class:"move-col"},bm=["onClick"],wm=["onClick"],km={class:"tico"},Em={class:"body"},Am={class:"id"},Sm={class:"title"},Tm={class:"diff"},xm=["onClick"],Im=["onClick"],Cm=Ve({__name:"PriorityGroupRenderer",props:{nodes:{},depth:{}},setup(e){const t=Os("dragContext"),n={feat:"✨",feature:"✨",fix:"🔧",bug:"🐞",refactor:"♻️",refactoring:"♻️",perf:"⚡",docs:"📄",test:"🧪",chore:"🧹",infra:"🏗️",security:"🔒",research:"🔬"};function s(o){return n[(o??"").toLowerCase()]??"📌"}function r(o){return o.groupName??"Grupo"}function i(o){const a=window.prompt("Nome do grupo:",o.groupName??"");a!==null&&t.onRenameGroup(o.groupId,a.trim()||null)}return(o,a)=>{const l=Bp("PriorityGroupRenderer",!0);return x(!0),C(_e,null,Mt(e.nodes,c=>(x(),C(_e,{key:c.kind==="group"?c.groupId:c.task.id},[c.kind==="group"?(x(),C("div",{key:0,class:be(["priority-group",[{collapsed:c.collapsed},O(t).groupClass(c.groupId)]]),"data-testid":`priority-group-${c.groupId}`,onDragover:u=>O(t).onGroupDragOver(c.groupId,u),onClick:u=>O(t).onFocusNode(c.groupId)},[b("div",{class:be(["group-head",{focused:O(t).focusedId.value===c.groupId}]),draggable:O(t).dragEnabled,onDragstart:u=>O(t).onGroupDragStart(c.groupId,u),onDragend:a[0]||(a[0]=(...u)=>O(t).onDragEnd&&O(t).onDragEnd(...u))},[b("button",{class:"caret",type:"button",onClick:u=>O(t).onToggleCollapse(c.groupId)},W(c.collapsed?"▸":"▾"),9,um),b("span",{class:"group-name",onClick:u=>i(c)},W(r(c)),9,fm),b("span",dm,"· "+W(c.items.length)+" items",1),a[2]||(a[2]=b("span",{class:"spacer"},null,-1)),O(t).dragEnabled?(x(),C("button",{key:0,class:"move-btn",type:"button",title:"Move up",onClick:u=>O(t).onMoveUp(c.groupId)}," ▲ ",8,hm)):ee("",!0),O(t).dragEnabled?(x(),C("button",{key:1,class:"move-btn",type:"button",title:"Move down",onClick:u=>O(t).onMoveDown(c.groupId)}," ▼ ",8,pm)):ee("",!0),O(t).dragEnabled?(x(),C("button",{key:2,class:"move-btn",type:"button",title:"Ungroup",onClick:u=>O(t).onUngroup(c.groupId)}," ✕ ",8,gm)):ee("",!0),b("button",{class:"cp",type:"button",title:"Copiar grupo",onClick:u=>O(t).onCopyGroup(c.groupId)}," ⧉ ",8,mm)],42,cm),c.collapsed?ee("",!0):(x(),C("div",vm,[je(l,{nodes:c.items,depth:(e.depth??0)+1},null,8,["nodes","depth"])]))],42,lm)):(x(),C("div",{key:1,class:be(["priority-card",[O(t).cardClass(c.task.id),{focused:O(t).focusedId.value===c.task.id}]]),"data-testid":`priority-card-${c.task.id}`,draggable:O(t).dragEnabled,onDragstart:u=>O(t).onDragStart(c.task.id,u),onDragend:a[1]||(a[1]=(...u)=>O(t).onDragEnd&&O(t).onDragEnd(...u)),onDragover:u=>O(t).onCardDragOver(c.task.id,u),onClick:u=>O(t).onFocusNode(c.task.id)},[O(t).dragEnabled?(x(),C("div",_m,[b("button",{class:"move-btn",type:"button",title:"Move up",onClick:u=>O(t).onMoveUp(c.task.id)}," ▲ ",8,bm),b("button",{class:"move-btn",type:"button",title:"Move down",onClick:u=>O(t).onMoveDown(c.task.id)}," ▼ ",8,wm)])):ee("",!0),b("div",km,W(s(c.task.type)),1),b("div",Em,[b("div",Am,W(c.task.id),1),b("div",Sm,W(c.task.title),1)]),b("div",Tm,[(x(),C(_e,null,Mt([1,2,3,4,5],u=>b("span",{key:u,class:be({[`on${u}`]:c.task.difficulty===u}),onClick:h=>O(t).onSetDifficulty(c.task.id,u)},W(u),11,xm)),64))]),b("button",{class:"cp",type:"button",title:"Copiar card",onClick:u=>O(t).onCopyCard(c.task.id)}," ⧉ ",8,Im)],42,ym))],64))),128)}}}),Mm={class:"prioritization-screen"},Dm={class:"toolbar"},Om=["value"],Pm={class:"segmented",role:"group","aria-label":"View mode"},Lm=["data-testid","onClick"],Rm=["value"],Fm=["disabled"],Nm=["disabled"],Um={key:0,class:"drag-warning"},Bm={key:0,class:"empty-state"},Gm={key:0,class:"prioritization-screen__fixed"},jm={key:0,class:"prioritization-screen__camera-status"},Vm=Ve({__name:"PrioritizationScreen",props:{tree:{},filter:{default:""},viewMode:{default:"cards"},sortMode:{default:"manual"},dragEnabled:{type:Boolean,default:!0},canUndo:{type:Boolean,default:!1},canRedo:{type:Boolean,default:!1},focusedId:{default:null},detecting:{type:Boolean},showWebcam:{type:Boolean},trackedError:{},gestureFunctions:{},gestureUserId:{},cameraActive:{type:Boolean}},emits:["update:filter","update:viewMode","update:sortMode","toggle-collapse","set-all-collapsed","set-difficulty","rename-group","move-before","move-after","group-with","join-group","move-group-before","move-group-after","group-with-group","move-up","move-down","ungroup","export-json","copy-card","copy-group","update:focusedId","undo","redo","toggle-tracking","update:showWebcam","gestureAction","update:cameraActive"],setup(e,{emit:t}){const n=e,s=t,r=ve(null),i=ve(null),o=ve(!1),a=ve(null);function l(_,v){var k;if(!n.dragEnabled){v.preventDefault();return}o.value=!1,i.value=_,(k=v.dataTransfer)==null||k.setData("text/plain",_)}function c(_,v){var k;if(!n.dragEnabled){v.preventDefault();return}o.value=!0,i.value=_,(k=v.dataTransfer)==null||k.setData("text/plain",_)}function u(){i.value=null,o.value=!1,a.value=null}function h(_,v){if(!n.dragEnabled||i.value===null||i.value===_)return;v.preventDefault();const k=v.currentTarget.getBoundingClientRect(),N=(v.clientY-k.top)/k.height;N<.3?a.value={type:"before",taskId:_}:N>.7?a.value={type:"after",taskId:_}:a.value={type:"group",taskId:_}}function w(_,v){var k;if(!(!n.dragEnabled||i.value===null)&&!((k=v.target)!=null&&k.closest(".priority-card")))if(v.preventDefault(),o.value){const N=v.currentTarget.getBoundingClientRect(),L=(v.clientY-N.top)/N.height;L<.3?a.value={type:"group-before",targetGroupId:_}:L>.7?a.value={type:"group-after",targetGroupId:_}:a.value={type:"group-merge",targetGroupId:_}}else a.value={type:"ingroup",groupId:_}}function I(){if(!n.dragEnabled||i.value===null||!a.value){i.value=null,o.value=!1,a.value=null;return}const _=i.value,v=a.value;o.value?v.type==="before"?s("move-group-before",_,v.taskId):v.type==="after"?s("move-group-after",_,v.taskId):v.type==="group"?s("group-with-group",_,v.taskId):v.type==="group-before"?s("move-group-before",_,v.targetGroupId):v.type==="group-after"?s("move-group-after",_,v.targetGroupId):v.type==="group-merge"&&s("group-with-group",_,v.targetGroupId):v.type==="before"?s("move-before",_,v.taskId):v.type==="after"?s("move-after",_,v.taskId):v.type==="group"?s("group-with",_,v.taskId):v.type==="ingroup"&&s("join-group",_,v.groupId),i.value=null,o.value=!1,a.value=null}function M(_){var v,k,N;return{"priority-card--dragging":i.value===_,"priority-card--drop-before":((v=a.value)==null?void 0:v.type)==="before"&&a.value.taskId===_,"priority-card--drop-after":((k=a.value)==null?void 0:k.type)==="after"&&a.value.taskId===_,"priority-card--drop-group":((N=a.value)==null?void 0:N.type)==="group"&&a.value.taskId===_}}function D(_){var v,k,N;return{"priority-group--dragging":o.value&&i.value===_,"priority-group--drop-before":((v=a.value)==null?void 0:v.type)==="group-before"&&a.value.targetGroupId===_,"priority-group--drop-after":((k=a.value)==null?void 0:k.type)==="group-after"&&a.value.targetGroupId===_,"priority-group--drop-merge":((N=a.value)==null?void 0:N.type)==="group-merge"&&a.value.targetGroupId===_}}return Qf("dragContext",{dragEnabled:n.dragEnabled,draggedId:i,dropIntent:a,onDragStart:l,onGroupDragStart:c,onDragEnd:u,onCardDragOver:h,onGroupDragOver:w,cardClass:M,groupClass:D,onToggleCollapse:_=>s("toggle-collapse",_),onSetDifficulty:(_,v)=>s("set-difficulty",_,v),onRenameGroup:(_,v)=>s("rename-group",_,v),onCopyCard:_=>s("copy-card",_),onCopyGroup:_=>s("copy-group",_),onMoveUp:_=>s("move-up",_),onMoveDown:_=>s("move-down",_),onUngroup:_=>s("ungroup",_),focusedId:zf(n,"focusedId"),onFocusNode:_=>s("update:focusedId",_)}),(_,v)=>(x(),C("div",Mm,[b("div",Dm,[b("input",{class:"filter-input",type:"text",placeholder:"🔎 filtrar…",value:e.filter,onInput:v[0]||(v[0]=k=>s("update:filter",k.target.value))},null,40,Om),b("div",Pm,[(x(),C(_e,null,Mt(["cards","icons","grid"],k=>b("button",{key:k,type:"button",class:be({active:e.viewMode===k}),"data-testid":`view-mode-${k}`,onClick:N=>s("update:viewMode",k)},W(k==="cards"?"▤ Cards":k==="icons"?"◫ Icons":"▦ Grid"),11,Lm)),64))]),b("select",{class:"sort-select","data-testid":"sort-select",value:e.sortMode,onChange:v[1]||(v[1]=k=>s("update:sortMode",k.target.value))},[...v[12]||(v[12]=[b("option",{value:"manual"},"Manual (priority)",-1),b("option",{value:"diff-desc"},"Difficulty ↓ (high→low)",-1),b("option",{value:"diff-asc"},"Difficulty ↑ (low→high)",-1)])],40,Rm),b("button",{class:"ghost",type:"button",onClick:v[2]||(v[2]=k=>s("set-all-collapsed",!0))}," ⊟ Colapsar todos "),b("button",{class:"ghost",type:"button",onClick:v[3]||(v[3]=k=>s("set-all-collapsed",!1))}," ⊞ Expandir todos "),b("button",{class:"ghost",type:"button",title:"Desfazer (Ctrl/Cmd+Z)","data-testid":"undo-button",disabled:!e.canUndo,onClick:v[4]||(v[4]=k=>s("undo"))}," ↶ Desfazer ",8,Fm),b("button",{class:"ghost",type:"button",title:"Refazer (Ctrl/Cmd+Shift+Z)","data-testid":"redo-button",disabled:!e.canRedo,onClick:v[5]||(v[5]=k=>s("redo"))}," ↷ Refazer ",8,Nm),v[13]||(v[13]=b("span",{class:"spacer"},null,-1)),b("button",{class:"ghost",type:"button",onClick:v[6]||(v[6]=k=>s("export-json"))}," ⬇ JSON "),e.dragEnabled?ee("",!0):(x(),C("span",Um," ⚠ arrastar desabilitado (ordenado por dificuldade) "))]),b("div",{class:be(["node-list",`view-${e.viewMode}`]),onDragover:v[7]||(v[7]=J2(()=>{},["prevent"])),onDrop:I},[je(Cm,{nodes:e.tree},null,8,["nodes"]),e.tree.length===0?(x(),C("div",Bm,[...v[14]||(v[14]=[b("p",null,"No tasks found.",-1)])])):ee("",!0)],34),e.gestureFunctions&&e.gestureUserId?(x(),C("div",Gm,[b("video",{ref_key:"videoRef",ref:r,style:{display:"none"},width:"320",height:"240",muted:"",playsinline:""},null,512),je(O(f3),{controls:["webcam"],"is-detecting":e.cameraActive,error:e.trackedError??null,"show-webcam":e.showWebcam,onToggleTracking:v[8]||(v[8]=k=>s("toggle-tracking")),"onUpdate:showWebcam":v[9]||(v[9]=k=>s("update:showWebcam",k))},null,8,["is-detecting","error","show-webcam"]),je(O(V0),{functions:e.gestureFunctions,"user-id":e.gestureUserId,detecting:e.detecting??!1,"video-element":r.value,onGestureAction:v[10]||(v[10]=k=>s("gestureAction",k)),onCameraActive:v[11]||(v[11]=k=>s("update:cameraActive",k))},null,8,["functions","user-id","detecting","video-element"]),e.detecting&&!e.cameraActive?(x(),C("div",jm," ⏳ Starting camera... ")):ee("",!0)])):ee("",!0)]))}}),$m=Ve({__name:"PrioritizationPage",props:{tasks:{},gestureUserId:{}},emits:["update-task","update-tasks"],setup(e,{emit:t}){const n=e,s=t,{tree:r,filter:i,viewMode:o,sortMode:a,dragEnabled:l,changedTasks:c,canUndo:u,canRedo:h,setFilter:w,setViewMode:I,setSortMode:M,toggleGroupCollapsed:D,setDifficulty:_,moveBefore:v,moveAfter:k,groupWith:N,joinGroup:L,renameGroup:se,moveGroupBefore:Y,moveGroupAfter:R,groupWithGroup:F,moveUp:B,moveDown:J,ungroup:Ie,exportJson:Ye,copyCardText:st,copyGroupText:qe,acknowledgeChanges:Un,undo:we,redo:te}=a4(zf(n,"tasks")),X=ve(null),kt=ve(!1),vn=ve(!1),Et=!!n.gestureUserId;function gt(fe){if(fe!=="none"&&X.value)switch(fe){case"moveUp":B(X.value);break;case"moveDown":J(X.value);break;case"groupWith":N(X.value,"");break;case"ungroup":Ie(X.value);break;case"undo":we();break;case"copyCard":Es(X.value);break;case"setDifficulty1":_(X.value,1);break;case"setDifficulty2":_(X.value,2);break;case"setDifficulty3":_(X.value,3);break;case"setDifficulty4":_(X.value,4);break;case"setDifficulty5":_(X.value,5);break}}qn(c,fe=>{if(fe.length!==0){for(const ae of fe)s("update-task",ae);s("update-tasks",fe),Un()}});function ks(fe){for(const ae of r.value)ae.kind==="group"&&ae.collapsed!==fe&&D(ae.groupId)}function lr(){const fe=new Blob([Ye()],{type:"application/json"}),ae=URL.createObjectURL(fe),Wt=document.createElement("a");Wt.href=ae,Wt.download="priorizacao-tasks.json",Wt.click(),URL.revokeObjectURL(ae)}async function Es(fe){const ae=st(fe);ae&&await navigator.clipboard.writeText(ae)}async function yn(fe){const ae=qe(fe);ae&&await navigator.clipboard.writeText(ae)}function Bn(fe){const ae=fe==null?void 0:fe.tagName;return ae==="INPUT"||ae==="TEXTAREA"||ae==="SELECT"}function Gn(fe){if(Bn(fe.target)||!(fe.ctrlKey||fe.metaKey))return;const ae=fe.key.toLowerCase();ae==="z"&&fe.shiftKey?(fe.preventDefault(),te()):ae==="z"?(fe.preventDefault(),we()):ae==="y"&&(fe.preventDefault(),te())}return tl(()=>window.addEventListener("keydown",Gn)),Js(()=>window.removeEventListener("keydown",Gn)),(fe,ae)=>(x(),tt(Vm,{tree:O(r),filter:O(i),"view-mode":O(o),"sort-mode":O(a),"drag-enabled":O(l),"can-undo":O(u),"can-redo":O(h),"focused-id":X.value,detecting:Et?kt.value:void 0,"camera-active":vn.value,"gesture-functions":Et?O(ug):void 0,"gesture-user-id":Et?n.gestureUserId:void 0,onToggleTracking:ae[0]||(ae[0]=Wt=>kt.value=!kt.value),onGestureAction:gt,"onUpdate:cameraActive":ae[1]||(ae[1]=Wt=>vn.value=Wt),"onUpdate:filter":O(w),"onUpdate:viewMode":O(I),"onUpdate:sortMode":O(M),onToggleCollapse:O(D),onSetAllCollapsed:ks,onSetDifficulty:O(_),onRenameGroup:O(se),onMoveBefore:O(v),onMoveAfter:O(k),onGroupWith:O(N),onJoinGroup:O(L),onMoveGroupBefore:O(Y),onMoveGroupAfter:O(R),onGroupWithGroup:O(F),onMoveUp:O(B),onMoveDown:O(J),onUngroup:O(Ie),onExportJson:lr,onCopyCard:Es,onCopyGroup:yn,"onUpdate:focusedId":ae[2]||(ae[2]=Wt=>X.value=Wt),onUndo:O(we),onRedo:O(te)},null,8,["tree","filter","view-mode","sort-mode","drag-enabled","can-undo","can-redo","focused-id","detecting","camera-active","gesture-functions","gesture-user-id","onUpdate:filter","onUpdate:viewMode","onUpdate:sortMode","onToggleCollapse","onSetDifficulty","onRenameGroup","onMoveBefore","onMoveAfter","onGroupWith","onJoinGroup","onMoveGroupBefore","onMoveGroupAfter","onGroupWithGroup","onMoveUp","onMoveDown","onUngroup","onUndo","onRedo"]))}}),Hm={class:"dashboard-layout"},zm={class:"dashboard-main"},Wm=Ve({__name:"DashboardLayout",props:{title:{default:"Dashboard"},connectionStatus:{default:"disconnected"},statusText:{default:"Desconectado"},errorMessage:{default:""},showRetry:{type:Boolean,default:!1},isRetrying:{type:Boolean,default:!1}},emits:["retry"],setup(e){return(t,n)=>(x(),C("div",Hm,[je(z4,{title:e.title,status:e.connectionStatus,"status-text":e.statusText,"error-message":e.errorMessage,"show-retry":e.showRetry,"is-retrying":e.isRetrying,onRetry:n[0]||(n[0]=s=>t.$emit("retry"))},null,8,["title","status","status-text","error-message","show-retry","is-retrying"]),b("main",zm,[Ls(t.$slots,"default",{},void 0)])]))}}),Km=zt(Wm,[["__scopeId","data-v-78602c1a"]]),Ym={class:"task-grid-container"},qm={class:"task-grid-header"},Xm={class:"task-grid-title"},Jm={class:"task-grid-stats"},Zm={class:"stat stat--total"},Qm={class:"stat__value"},ev={key:0,class:"stat stat--in-progress"},tv={class:"stat__value"},nv={key:1,class:"stat stat--blocked"},sv={class:"stat__value"},rv={key:2,class:"stat stat--paused"},iv={class:"stat__value"},ov={key:3,class:"stat stat--in-review"},av={class:"stat__value"},lv={key:0,class:"task-grid-loading"},cv={key:1,class:"task-grid-empty"},uv={class:"empty-message"},fv={key:3,class:"task-grid-footer"},dv=Ve({__name:"TaskGrid",props:{tasks:{},columns:{default:3},gap:{default:"md"},loading:{type:Boolean,default:!1},emptyMessage:{default:"Nenhuma tarefa encontrada"},variant:{default:"default"}},setup(e){const t=e,n=oe(()=>["task-grid",{1:"task-grid--cols-1",2:"task-grid--cols-2",3:"task-grid--cols-3",4:"task-grid--cols-4"}[t.columns],`task-grid--gap-${t.gap}`]),s=oe(()=>({inProgress:t.tasks.filter(i=>i.status==="in-progress"),blocked:t.tasks.filter(i=>i.status==="blocked"),paused:t.tasks.filter(i=>i.status==="paused"),inReview:t.tasks.filter(i=>i.status==="in-review"),pending:t.tasks.filter(i=>i.status==="pending"),done:t.tasks.filter(i=>i.status==="done"),canceled:t.tasks.filter(i=>i.status==="canceled")})),r=oe(()=>({total:t.tasks.length,inProgress:s.value.inProgress.length,blocked:s.value.blocked.length,paused:s.value.paused.length,inReview:s.value.inReview.length,pending:s.value.pending.length,done:s.value.done.length,canceled:s.value.canceled.length}));return(i,o)=>(x(),C("div",Ym,[b("div",qm,[b("h2",Xm,[Ls(i.$slots,"title",{},()=>[o[0]||(o[0]=Xn(" Tarefas em Andamento ",-1))])]),b("div",Jm,[b("div",Zm,[b("span",Qm,W(r.value.total),1),o[1]||(o[1]=b("span",{class:"stat__label"},"Total",-1))]),r.value.inProgress>0?(x(),C("div",ev,[b("span",tv,W(r.value.inProgress),1),o[2]||(o[2]=b("span",{class:"stat__label"},"In Progress",-1))])):ee("",!0),r.value.blocked>0?(x(),C("div",nv,[b("span",sv,W(r.value.blocked),1),o[3]||(o[3]=b("span",{class:"stat__label"},"Blocked",-1))])):ee("",!0),r.value.paused>0?(x(),C("div",rv,[b("span",iv,W(r.value.paused),1),o[4]||(o[4]=b("span",{class:"stat__label"},"Paused",-1))])):ee("",!0),r.value.inReview>0?(x(),C("div",ov,[b("span",av,W(r.value.inReview),1),o[5]||(o[5]=b("span",{class:"stat__label"},"In Review",-1))])):ee("",!0)])]),e.loading?(x(),C("div",lv,[...o[6]||(o[6]=[b("div",{class:"spinner"},null,-1),b("p",null,"Carregando tarefas...",-1)])])):e.tasks.length===0?(x(),C("div",cv,[o[7]||(o[7]=b("div",{class:"empty-icon"}," 📋 ",-1)),b("p",uv,W(e.emptyMessage),1),Ls(i.$slots,"empty-action",{},void 0)])):(x(),C("div",{key:2,class:be(n.value)},[(x(!0),C(_e,null,Mt(e.tasks,a=>(x(),tt(O(am),{key:a.id,task:a,variant:e.variant},null,8,["task","variant"]))),128))],2)),i.$slots.footer?(x(),C("div",fv,[Ls(i.$slots,"footer",{},void 0)])):ee("",!0)]))}}),hv=zt(dv,[["__scopeId","data-v-0078afba"]]),pv={key:0,class:"loading-state"},gv={key:1,class:"empty-state"},mv=Ve({__name:"Dashboard",props:{title:{default:"Dashboard"},connectionStatus:{default:"disconnected"},statusText:{default:"Desconectado"},errorMessage:{default:""},showRetry:{type:Boolean,default:!1},isRetrying:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},tasks:{}},emits:["retry"],setup(e){return(t,n)=>(x(),tt(Km,{title:e.title,"connection-status":e.connectionStatus,"status-text":e.statusText,"error-message":e.errorMessage,"show-retry":e.showRetry,"is-retrying":e.isRetrying,onRetry:n[0]||(n[0]=s=>t.$emit("retry"))},{default:Ar(()=>[e.isLoading&&(e.tasks??[]).length===0?(x(),C("div",pv,[...n[1]||(n[1]=[b("div",{class:"spinner"},null,-1),b("p",null,"Carregando tarefas...",-1)])])):!e.isLoading&&(e.tasks??[]).length===0?(x(),C("div",gv,[...n[2]||(n[2]=[b("p",{class:"empty-icon"}," 📋 ",-1),b("h2",null,"Nenhuma tarefa encontrada",-1),b("p",null,"Conecte-se ao servidor para visualizar suas tarefas.",-1)])])):(x(),tt(hv,{key:2,tasks:e.tasks??[]},null,8,["tasks"]))]),_:1},8,["title","connection-status","status-text","error-message","show-retry","is-retrying"]))}}),vv=zt(mv,[["__scopeId","data-v-001207e0"]]),mf=5e3,yv=1e4,_v=3e4,vf=5e3,bv=100,wv=500,pr=new Map,gr=new Map,na=new Map,sa=new Map,kv=cg("taskin-tasks",{state:()=>({tasks:[],loading:!1,connected:!1,error:null,reconnectAttempts:0,lastSync:null}),getters:{taskById(e){return t=>e.tasks.find(n=>n.id===t)},tasksByStatus(e){return t=>e.tasks.filter(n=>n.status===t)},connectionStatus(e){return{connected:e.connected,error:e.error,reconnectAttempts:e.reconnectAttempts}}},actions:{connect(e){const t=this.$id;pr.has(t)&&this.disconnect(),gr.set(t,{autoReconnect:!0,reconnectDelay:mf,maxReconnectAttempts:0,debug:!1,...e}),this._connect()},_connect(){const e=this.$id,t=gr.get(e);if(t){this._log("Connecting to",t.wsUrl);try{const n=new WebSocket(t.wsUrl);pr.set(e,n),n.onopen=()=>{this._log("Connected"),this.connected=!0,this.error=null,this.reconnectAttempts=0,this.send({type:"list"}),this._startHeartbeat()},n.onmessage=s=>{try{const r=JSON.parse(s.data);this.handleMessage(r)}catch(r){this._log("Error parsing message:",r)}},n.onerror=s=>{this._log("WebSocket error:",s),this.handleError(new Error("WebSocket connection error"))},n.onclose=()=>{this._log("Disconnected"),this.connected=!1,this._stopHeartbeat(),t.autoReconnect&&this.reconnect()}}catch(n){this.handleError(n instanceof Error?n:new Error(String(n)))}}},disconnect(){const e=this.$id;this._log("Disconnecting"),this._stopHeartbeat();const t=pr.get(e);if(t){const n=gr.get(e);n&&(n.autoReconnect=!1),t.close(),pr.delete(e)}this.connected=!1},send(e){const t=this.$id,n=pr.get(t);if(!n||n.readyState!==WebSocket.OPEN){this._log("Cannot send message: not connected");return}const s={...e,timestamp:Date.now()};this._log("Sending:",s),n.send(JSON.stringify(s))},handleMessage(e){var t;switch(this._log("Received:",e),e.type){case"tasks":this.tasks=e.payload||[],this._log("Received tasks:",this.tasks.length),this.tasks.length>0&&this._log("First task sample:",JSON.stringify(this.tasks[0],null,2)),this.lastSync=Date.now(),this.loading=!1;break;case"task:found":if(e.payload){const n=e.payload,s=this.tasks.findIndex(r=>r.id===n.id);s>=0?this.tasks[s]=n:this.tasks.push(n)}break;case"task:updated":if(e.payload){const n=e.payload,s=this.tasks.findIndex(r=>r.id===n.id);s>=0&&(this.tasks[s]=n)}break;case"task:created":if(e.payload){const n=e.payload;this.tasks.push(n)}break;case"task:deleted":if(e.payload){const n=e.payload.id;this.tasks=this.tasks.filter(s=>s.id!==n)}break;case"error":this.error=((t=e.payload)==null?void 0:t.message)||"Unknown error",this._log("Server error:",this.error);break;case"pong":sa.set(this.$id,Date.now());break;default:this._log("Unknown message type:",e.type)}},handleError(e){this._log("Error:",e.message),this.error=e.message,this.connected=!1},reconnect(){const e=gr.get(this.$id);if(!e)return;const t=e.maxReconnectAttempts||0;if(t>0&&this.reconnectAttempts>=t){this._log("Max reconnection attempts reached"),this.error="Max reconnection attempts reached";return}this.reconnectAttempts++;const n=e.reconnectDelay||mf;this._log(`Reconnecting in ${n}ms (attempt ${this.reconnectAttempts})`),setTimeout(()=>{this._connect()},n)},_startHeartbeat(){const e=this.$id;this._stopHeartbeat(),sa.set(e,Date.now());const t=setInterval(()=>{const n=Date.now();if(n-(sa.get(e)||n)>_v){this._log("Heartbeat timeout, reconnecting"),this.disconnect(),this.reconnect();return}this.send({type:"ping"})},yv);na.set(e,t)},_stopHeartbeat(){const e=this.$id,t=na.get(e);t&&(clearInterval(t),na.delete(e))},_log(...e){const t=gr.get(this.$id);t!=null&&t.debug&&console.log("[PiniaTaskProvider]",...e)},async findTask(e){const t=this.tasks.find(n=>n.id===e);if(t)return t;if(this.connected)return new Promise(n=>{const s=`find-${e}-${Date.now()}`,r=setTimeout(()=>{n(void 0)},vf);this.send({type:"find",payload:{taskId:e},requestId:s}),setTimeout(()=>{clearTimeout(r),n(this.tasks.find(i=>i.id===e))},wv)})},async getAllTasks(){return this.tasks.length>0?this.tasks:this.connected?(this.loading=!0,this.send({type:"list"}),new Promise(e=>{const t=setTimeout(()=>{this.loading=!1,e(this.tasks)},vf),n=setInterval(()=>{(!this.loading||this.tasks.length>0)&&(clearTimeout(t),clearInterval(n),this.loading=!1,e(this.tasks))},bv)})):this.tasks},async updateTask(e){if(!this.connected)throw new Error("Not connected to server");const t=this.tasks.findIndex(n=>n.id===e.id);t>=0&&(this.tasks[t]=e),this.send({type:"update",payload:e})}}}),Ev=kv,Av={class:"mode-toggle"},Sv=Ve({__name:"App",setup(e){const t={pending:0,"in-progress":50,paused:30,"in-review":75,done:100,blocked:20,canceled:0},n=ve("board"),s=ve(window.VITE_WS_URL||void 0||"ws://localhost:3001"),r=ve(5e3),i=Ev(),o=oe(()=>i.connectionStatus),a=oe(()=>o.value.connected),l=oe(()=>o.value.error),c=oe(()=>{const D=new URLSearchParams(window.location.search).get("filter");let _=i.tasks;return D==="open"?_=i.tasks.filter(k=>k.status!=="done"&&k.status!=="canceled"):D==="closed"&&(_=i.tasks.filter(k=>k.status==="done"||k.status==="canceled")),_.map(k=>{const N=t[k.status],L={id:k.id,number:parseInt(k.id,10)||0,title:k.title,description:k.description??"",status:k.status,assignee:k.assignee?{id:k.assignee.id,name:k.assignee.name,email:k.assignee.email,avatar:k.assignee.avatar}:void 0,dates:{created:k.createdAt||new Date().toISOString()},tags:k.type?[k.type]:[],progress:{percentage:N},type:k.type,order:k.order,parent:k.groupId?{type:"group",id:W4(k.groupId)}:void 0,groupName:k.groupName,difficulty:k.difficulty};return console.log("Mapped task:",L.id,"assignee:",L.assignee),L})}),u=oe(()=>i.loading);tl(()=>{i.connect({wsUrl:s.value,autoReconnect:!0,reconnectDelay:r.value})}),Js(()=>{i.disconnect()});const h=()=>{i.getAllTasks()},w=D=>{var v;const _=i.tasks.find(k=>k.id===D.id);_&&i.updateTask({..._,order:D.order,groupId:((v=D.parent)==null?void 0:v.type)==="group"?D.parent.id:void 0,groupName:D.groupName,difficulty:D.difficulty})},I=oe(()=>a.value?"connected":l.value?"error":"connecting"),M=oe(()=>a.value?"Connected":l.value?"Connection error":"Connecting...");return(D,_)=>(x(),C(_e,null,[b("div",Av,[b("button",{type:"button",class:be({active:n.value==="board"}),onClick:_[0]||(_[0]=v=>n.value="board")}," Board ",2),b("button",{type:"button",class:be({active:n.value==="prioritization"}),onClick:_[1]||(_[1]=v=>n.value="prioritization")}," Prioritization ",2)]),n.value==="board"?(x(),tt(O(vv),{key:0,title:"Taskin Dashboard","connection-status":I.value,"status-text":M.value,"error-message":l.value||"","show-retry":!!l.value,"is-retrying":u.value,"is-loading":u.value,tasks:c.value,onRetry:h},null,8,["connection-status","status-text","error-message","show-retry","is-retrying","is-loading","tasks"])):(x(),tt(O($m),{key:1,tasks:c.value,onUpdateTask:w},null,8,["tasks"]))],64))}}),Tv=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},xv=Tv(Sv,[["__scopeId","data-v-d591e0dd"]]),x1=eg(xv),Iv=sg();x1.use(Iv);x1.mount("#app");
|