vuer 0.0.35rc18__py3-none-any.whl → 0.0.36rc1__py3-none-any.whl

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.

Potentially problematic release.


This version of vuer might be problematic. Click here for more details.

Files changed (68) hide show
  1. vuer/__pycache__/__init__.cpython-311.pyc +0 -0
  2. vuer/__pycache__/base.cpython-311.pyc +0 -0
  3. vuer/__pycache__/events.cpython-311.pyc +0 -0
  4. vuer/__pycache__/serdes.cpython-311.pyc +0 -0
  5. vuer/__pycache__/server.cpython-311.pyc +0 -0
  6. vuer/__pycache__/types.cpython-311.pyc +0 -0
  7. vuer/__pycache__/types.cpython-38.pyc +0 -0
  8. vuer/client_build/404.html +5 -5
  9. vuer/client_build/assets/chunks/chunk-Bfuqp34V.js +6860 -0
  10. vuer/client_build/assets/chunks/chunk-Bfuqp34V.js.map +1 -0
  11. vuer/client_build/assets/chunks/chunk-CJqYWPfW.js +53 -0
  12. vuer/client_build/assets/chunks/chunk-CJqYWPfW.js.map +1 -0
  13. vuer/client_build/assets/chunks/chunk-CPRQl8Yc.js +16 -0
  14. vuer/client_build/assets/chunks/chunk-CPRQl8Yc.js.map +1 -0
  15. vuer/client_build/assets/chunks/chunk-CY_2iGUk.js +3 -0
  16. vuer/client_build/assets/chunks/chunk-CY_2iGUk.js.map +1 -0
  17. vuer/client_build/assets/chunks/chunk-ChCpIqvJ.js +269 -0
  18. vuer/client_build/assets/chunks/chunk-ChCpIqvJ.js.map +1 -0
  19. vuer/client_build/assets/chunks/chunk-Cwh42ARU.js +102 -0
  20. vuer/client_build/assets/chunks/chunk-Cwh42ARU.js.map +1 -0
  21. vuer/client_build/assets/chunks/chunk-D7HrI6pR.js +2 -0
  22. vuer/client_build/assets/chunks/chunk-D7HrI6pR.js.map +1 -0
  23. vuer/client_build/assets/chunks/chunk-Dhe4rJMi.js +4660 -0
  24. vuer/client_build/assets/chunks/chunk-Dhe4rJMi.js.map +1 -0
  25. vuer/client_build/assets/entries/entry-client-routing.BH_27foy.js +5 -0
  26. vuer/client_build/assets/entries/entry-client-routing.BH_27foy.js.map +1 -0
  27. vuer/client_build/assets/entries/pages_editor.BvGv6pkK.js +2 -0
  28. vuer/client_build/assets/entries/pages_editor.BvGv6pkK.js.map +1 -0
  29. vuer/client_build/assets/entries/pages_error.D6auTzhG.js +2 -0
  30. vuer/client_build/assets/entries/pages_error.D6auTzhG.js.map +1 -0
  31. vuer/client_build/assets/entries/pages_index.BeavKUpT.js +2 -0
  32. vuer/client_build/assets/entries/pages_index.BeavKUpT.js.map +1 -0
  33. vuer/client_build/assets/entries/pages_simple.B6Yx1v5Z.js +2 -0
  34. vuer/client_build/assets/entries/pages_simple.B6Yx1v5Z.js.map +1 -0
  35. vuer/client_build/assets/static/editor.B6qEVXNb.css +1 -0
  36. vuer/client_build/assets/static/index.BbAhTARb.css +1 -0
  37. vuer/client_build/assets/static/onRenderClient.C5hpRi0h.css +1 -0
  38. vuer/client_build/editor/index.html +8 -7
  39. vuer/client_build/index.html +8 -7
  40. vuer/client_build/pages/editor/+Page.d.ts +21 -1
  41. vuer/client_build/pages/index/+Page.d.ts +21 -1
  42. vuer/client_build/simple/index.html +6 -6
  43. vuer/frame/__init__.py +2 -0
  44. vuer/frame/__pycache__/__init__.cpython-38.pyc +0 -0
  45. vuer/frame/__pycache__/convert.cpython-38.pyc +0 -0
  46. vuer/frame/__pycache__/to_mat.cpython-38.pyc +0 -0
  47. vuer/frame/convert.py +44 -0
  48. vuer/frame/to_mat.py +50 -0
  49. vuer/schemas/__init__.py +1 -0
  50. vuer/schemas/__pycache__/__init__.cpython-311.pyc +0 -0
  51. vuer/schemas/__pycache__/__init__.cpython-38.pyc +0 -0
  52. vuer/schemas/__pycache__/drei_components.cpython-311.pyc +0 -0
  53. vuer/schemas/__pycache__/html_components.cpython-311.pyc +0 -0
  54. vuer/schemas/__pycache__/physics_components.cpython-311.pyc +0 -0
  55. vuer/schemas/__pycache__/scene_components.cpython-311.pyc +0 -0
  56. vuer/schemas/__pycache__/scene_components.cpython-38.pyc +0 -0
  57. vuer/schemas/__pycache__/vuer_components.cpython-311.pyc +0 -0
  58. vuer/schemas/__pycache__/vuer_components.cpython-38.pyc +0 -0
  59. vuer/schemas/physics_components.py +23 -11
  60. vuer/schemas/scene_components.py +169 -5
  61. vuer/schemas/vuer_components.py +47 -0
  62. vuer/types.py +0 -1
  63. {vuer-0.0.35rc18.dist-info → vuer-0.0.36rc1.dist-info}/METADATA +29 -29
  64. {vuer-0.0.35rc18.dist-info → vuer-0.0.36rc1.dist-info}/RECORD +68 -19
  65. {vuer-0.0.35rc18.dist-info → vuer-0.0.36rc1.dist-info}/WHEEL +1 -1
  66. {vuer-0.0.35rc18.dist-info → vuer-0.0.36rc1.dist-info}/LICENSE +0 -0
  67. {vuer-0.0.35rc18.dist-info → vuer-0.0.36rc1.dist-info}/entry_points.txt +0 -0
  68. {vuer-0.0.35rc18.dist-info → vuer-0.0.36rc1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,16 @@
1
+ var re=typeof self<"u"?self:{};function cn(t,e){t:{for(var n=["CLOSURE_FLAGS"],r=re,s=0;s<n.length;s++)if((r=r[n[s]])==null){n=null;break t}n=r}return(t=n&&n[t])!=null?t:e}function Jt(){throw Error("Invalid UTF8")}function Ls(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}let qe,Jn;const Fa=typeof TextDecoder<"u";let Ma;const Pa=typeof TextEncoder<"u";function Ni(t){if(Pa)t=(Ma||(Ma=new TextEncoder)).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let s=0;s<t.length;s++){var e=t.charCodeAt(s);if(e<128)r[n++]=e;else{if(e<2048)r[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&s<t.length){const i=t.charCodeAt(++s);if(i>=56320&&i<=57343){e=1024*(e-55296)+i-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}s--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var Ue,Ri=cn(610401301,!1),xa=cn(653718497,cn(1,!0)),Ci=cn(660014094,!1);const Fs=re.navigator;function cr(t){return!!Ri&&!!Ue&&Ue.brands.some(({brand:e})=>e&&e.indexOf(t)!=-1)}function pt(t){var e;return(e=re.navigator)&&(e=e.userAgent)||(e=""),e.indexOf(t)!=-1}function jt(){return!!Ri&&!!Ue&&Ue.brands.length>0}function Zn(){return jt()?cr("Chromium"):(pt("Chrome")||pt("CriOS"))&&!(!jt()&&pt("Edge"))||pt("Silk")}function Pr(t){return Pr[" "](t),t}Ue=Fs&&Fs.userAgentData||null,Pr[" "]=function(){};var Oa=!jt()&&(pt("Trident")||pt("MSIE"));!pt("Android")||Zn(),Zn(),pt("Safari")&&(Zn()||!jt()&&pt("Coast")||!jt()&&pt("Opera")||!jt()&&pt("Edge")||(jt()?cr("Microsoft Edge"):pt("Edg/"))||jt()&&cr("Opera"));var Di={},Ie=null;function Ia(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):"=.".indexOf(t[e-1])!=-1&&(n="=.".indexOf(t[e-2])!=-1?n-2:n-1);var r=new Uint8Array(n),s=0;return function(i,o){function h(ut){for(;a<i.length;){var Y=i.charAt(a++),Me=Ie[Y];if(Me!=null)return Me;if(!/^[\s\xa0]*$/.test(Y))throw Error("Unknown base64 encoding at char: "+Y)}return ut}Bi();for(var a=0;;){var c=h(-1),u=h(0),g=h(64),v=h(64);if(v===64&&c===-1)break;o(c<<2|u>>4),g!=64&&(o(u<<4&240|g>>2),v!=64&&o(g<<6&192|v))}}(t,function(i){r[s++]=i}),s!==n?r.subarray(0,s):r}function Bi(){if(!Ie){Ie={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;n<5;n++){var r=t.concat(e[n].split(""));Di[n]=r;for(var s=0;s<r.length;s++){var i=r[s];Ie[i]===void 0&&(Ie[i]=s)}}}}var Ui=typeof Uint8Array<"u",Gi=!Oa&&typeof btoa=="function";function Ms(t){if(!Gi){var e;e===void 0&&(e=0),Bi(),e=Di[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let a=0,c=0;for(;a<t.length-2;a+=3){var s=t[a],i=t[a+1],o=t[a+2],h=e[s>>2];s=e[(3&s)<<4|i>>4],i=e[(15&i)<<2|o>>6],o=e[63&o],n[c++]=h+s+i+o}switch(h=0,o=r,t.length-a){case 2:o=e[(15&(h=t[a+1]))<<2]||r;case 1:t=t[a],n[c]=e[t>>2]+e[(3&t)<<4|h>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const Ps=/[-_.]/g,Na={"-":"+",_:"/",".":"="};function Ra(t){return Na[t]||""}function ji(t){if(!Gi)return Ia(t);Ps.test(t)&&(t=t.replace(Ps,Ra)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function He(t){return Ui&&t!=null&&t instanceof Uint8Array}var de={};let Ca;function Vi(t){if(t!==de)throw Error("illegal external caller")}function se(){return Ca||(Ca=new Ct(null,de))}function xr(t){Vi(de);var e=t.ba;return(e=e==null||He(e)?e:typeof e=="string"?ji(e):null)==null?e:t.ba=e}var Ct=class{constructor(t,e){if(Vi(e),this.ba=t,t!=null&&t.length===0)throw Error("ByteString should be constructed with non-empty values")}ua(){return new Uint8Array(xr(this)||0)}};function Hi(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}let Da;function ie(){const t=Error();Hi(t,"incident"),function(e){re.setTimeout(()=>{throw e},0)}(t)}function ur(t){return Hi(t=Error(t),"warning"),t}function Or(){return typeof BigInt=="function"}function ot(t){return Array.prototype.slice.call(t)}var be=typeof Symbol=="function"&&typeof Symbol()=="symbol";function An(t){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol():t}var We=An(),xs=An("0di"),Qn=An("2ex"),Pe=An("1oa"),En=be?(t,e)=>{t[We]|=e}:(t,e)=>{t.G!==void 0?t.G|=e:Object.defineProperties(t,{G:{value:e,configurable:!0,writable:!0,enumerable:!1}})},un=be?(t,e)=>{t[We]&=~e}:(t,e)=>{t.G!==void 0&&(t.G&=~e)},U=be?t=>0|t[We]:t=>0|t.G,A=be?t=>t[We]:t=>t.G,N=be?(t,e)=>{t[We]=e}:(t,e)=>{t.G!==void 0?t.G=e:Object.defineProperties(t,{G:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Ae(t){return En(t,34),t}function Ba(t,e){N(e,-14591&(0|t))}function lr(t,e){N(e,-14557&(34|t))}var Ir,ze={},Wi={};function Os(t){return!(!t||typeof t!="object"||t.La!==Wi)}function kn(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&t.constructor===Object}function Nr(t,e,n){if(t!=null){if(typeof t=="string")t=t?new Ct(t,de):se();else if(t.constructor!==Ct)if(He(t))t=t.length?new Ct(n?t:new Uint8Array(t),de):se();else{if(!e)throw Error();t=void 0}}return t}function ln(t){return!(!Array.isArray(t)||t.length)&&!!(1&U(t))}const Is=[];function Ut(t){if(2&t)throw Error()}N(Is,55),Ir=Object.freeze(Is);class fn{constructor(e,n,r){this.l=0,this.g=e,this.h=n,this.m=r}next(){if(this.l<this.g.length){const e=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,e):e}}return{done:!0,value:void 0}}[Symbol.iterator](){return new fn(this.g,this.h,this.m)}}let Ht;function zi(t,e){(e=Ht?e[Ht]:void 0)&&(t[Ht]=ot(e))}var Ua=Object.freeze({}),Ga=Object.freeze({});function Tn(t){return t.Sa=!0,t}var ja=Tn(t=>typeof t=="number"),Ns=Tn(t=>typeof t=="string"),Va=Tn(t=>typeof t=="boolean"),Sn=typeof re.BigInt=="function"&&typeof re.BigInt(0)=="bigint",fr=Tn(t=>Sn?t>=Wa&&t<=Ka:t[0]==="-"?Rs(t,Ha):Rs(t,za));const Ha=Number.MIN_SAFE_INTEGER.toString(),Wa=Sn?BigInt(Number.MIN_SAFE_INTEGER):void 0,za=Number.MAX_SAFE_INTEGER.toString(),Ka=Sn?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Rs(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let n=0;n<t.length;n++){const r=t[n],s=e[n];if(r>s)return!1;if(r<s)return!0}}const Xa=typeof Uint8Array.prototype.slice=="function";let Ki,T=0,C=0;function Cs(t){const e=t>>>0;T=e,C=(t-e)/4294967296>>>0}function pe(t){if(t<0){Cs(-t);const[e,n]=Br(T,C);T=e>>>0,C=n>>>0}else Cs(t)}function Rr(t){const e=Ki||(Ki=new DataView(new ArrayBuffer(8)));e.setFloat32(0,+t,!0),C=0,T=e.getUint32(0,!0)}function Cr(t,e){return 4294967296*e+(t>>>0)}function Dr(t,e){const n=2147483648&e;return n&&(e=~e>>>0,(t=1+~t>>>0)==0&&(e=e+1>>>0)),t=Cr(t,e),n?-t:t}function dn(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else Or()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=t/1e7>>>0,t%=1e7),n>=1e7&&(e+=n/1e7>>>0,n%=1e7),n=e+Ds(n)+Ds(t));return n}function Ds(t){return t=String(t),"0000000".slice(t.length)+t}function Ln(t){if(t.length<16)pe(Number(t));else if(Or())t=BigInt(t),T=Number(t&BigInt(4294967295))>>>0,C=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+(t[0]==="-");C=T=0;const n=t.length;for(let r=e,s=(n-e)%6+e;s<=n;r=s,s+=6){const i=Number(t.slice(r,s));C*=1e6,T=1e6*T+i,T>=4294967296&&(C+=Math.trunc(T/4294967296),C>>>=0,T>>>=0)}if(e){const[r,s]=Br(T,C);T=r,C=s}}}function Br(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function $t(t){return t==null||typeof t=="number"?t:t==="NaN"||t==="Infinity"||t==="-Infinity"?Number(t):void 0}function Xi(t){return t==null||typeof t=="boolean"?t:typeof t=="number"?!!t:void 0}const Ya=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Fn(t){const e=typeof t;switch(e){case"bigint":return!0;case"number":return Number.isFinite(t)}return e==="string"&&Ya.test(t)}function Ee(t){if(t==null)return t;if(typeof t=="string"){if(!t)return;t=+t}return typeof t=="number"&&Number.isFinite(t)?0|t:void 0}function $a(t){if(t==null)return t;if(typeof t=="string"){if(!t)return;t=+t}return typeof t=="number"&&Number.isFinite(t)?t>>>0:void 0}function Bs(t){return t[0]!=="-"&&(t.length<20||t.length===20&&Number(t.substring(0,6))<184467)}function Ur(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(pe(t),t=Dr(T,C)),t}function Gr(t){var e=Math.trunc(Number(t));if(Number.isSafeInteger(e))return String(e);if((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),!(t[0]==="-"?t.length<20||t.length===20&&Number(t.substring(0,7))>-922337:t.length<19||t.length===19&&Number(t.substring(0,6))<922337))if(Ln(t),t=T,2147483648&(e=C))if(Or())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=Br(t,e);t="-"+dn(n,r)}else t=dn(t,e);return t}function pn(t){return t==null?t:typeof t=="bigint"?(fr(t)?t=Number(t):(t=BigInt.asIntN(64,t),t=fr(t)?Number(t):String(t)),t):Fn(t)?typeof t=="number"?Ur(t):Gr(t):void 0}function qa(t){if(t==null)return t;var e=typeof t;if(e==="bigint")return String(BigInt.asUintN(64,t));if(Fn(t)){if(e==="string")return e=Math.trunc(Number(t)),Number.isSafeInteger(e)&&e>=0?t=String(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),Bs(t)||(Ln(t),t=dn(T,C))),t;if(e==="number")return(t=Math.trunc(t))>=0&&Number.isSafeInteger(t)?t:function(n){if(n<0){pe(n);const r=dn(T,C);return n=Number(r),Number.isSafeInteger(n)?n:r}return Bs(String(n))?n:(pe(n),Cr(T,C))}(t)}}function Yi(t){if(typeof t!="string")throw Error();return t}function ke(t){if(t!=null&&typeof t!="string")throw Error();return t}function Wt(t){return t==null||typeof t=="string"?t:void 0}function jr(t,e,n,r){if(t!=null&&typeof t=="object"&&t.Y===ze)return t;if(!Array.isArray(t))return n?2&r?(t=e[xs])?e=t:(Ae((t=new e).u),e=e[xs]=t):e=new e:e=void 0,e;let s=n=U(t);return s===0&&(s|=32&r),s|=2&r,s!==n&&N(t,s),new e(t)}function Ja(t,e,n){if(e)t:{if(!Fn(e=t))throw ur("int64");switch(typeof e){case"string":e=Gr(e);break t;case"bigint":if(t=e=BigInt.asIntN(64,e),Ns(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(ja(t)&&!Number.isSafeInteger(t))throw Error(String(t));e=Sn?BigInt(e):Va(e)?e?"1":"0":Ns(e)?e.trim()||"0":String(e);break t;default:e=Ur(e)}}else e=pn(t);return typeof(n=(t=e)==null?n?0:void 0:t)=="string"&&(e=+n,Number.isSafeInteger(e))?e:n}function $i(t){if(xe===void 0&&(xe=typeof Proxy=="function"?Ji(Proxy):null),!xe||!qi())return t;let e=X==null?void 0:X.get(t);return e||(Math.random()>.01?t:(function(n){if(tr===void 0){const r=new xe([],{});tr=Array.prototype.concat.call([],r).length===1}tr&&typeof Symbol=="function"&&Symbol.isConcatSpreadable&&(n[Symbol.isConcatSpreadable]=!0)}(t),e=new xe(t,{set:(n,r,s)=>(ie(),n[r]=s,!0)}),function(n,r){(X||(X=new te)).set(n,r),(en||(en=new te)).set(r,n)}(t,e),e))}let X,en,xe,te,tr,it,gn,Za,Qa;function qi(){return te===void 0&&(te=typeof WeakMap=="function"?Ji(WeakMap):null),te}function Ji(t){try{return t.toString().indexOf("[native code]")!==-1?t:null}catch{return null}}function Vr(t,e,n){var o;if(xa&&qi()){if((o=it==null?void 0:it.get(e))!=null&&o.get(t)){if(n)return}else if(Math.random()>.01)return;var r=t.length;n={length:r};for(var s=0;s<Math.min(r,10);s++){if(r<=10)var i=s;else{i=r/10;const h=Math.floor(s*i);i=h+Math.floor(Math.random()*(Math.floor((s+1)*i)-h))}n[i]=t[i]}Zi(t,n)?((s=(r=it||(it=new te)).get(e))||(s=new te,r.set(e,s)),s.set(t,n)):(ie(),Ge(t,e))}}function mn(t,e){var r;const n=(r=it==null?void 0:it.get(e))==null?void 0:r.get(t);n&&!Zi(t,n)&&(ie(),Ge(t,e))}function Zi(t,e){if(t.length!==e.length)return!1;for(const s in e){var n,r=Number(s);if((n=Number.isInteger(r))&&(n=t[r],r=e[r],n=!(Number.isNaN(n)?Number.isNaN(r):n===r)),n)return!1}return!0}function Mn(t){if(t&&(it!=null&&it.has(t))){var e=t.u;if(e)for(let n=0;n<e.length;n++){const r=e[n];if(n===e.length-1&&kn(r))for(const s in r){const i=r[s];Array.isArray(i)&&mn(i,t)}else Array.isArray(r)&&mn(r,t)}}}function Ge(t,e){var n;(n=it==null?void 0:it.get(e))==null||n.delete(t)}function ee(t,e){return t=Qi(t,e[0],e[1]),En(t,16384),t}function Qi(t,e,n){if(t==null&&(t=gn),gn=void 0,t==null){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-33521665&r|(1023&e)<<15)}else{if(!Array.isArray(t))throw Error("narr");if(2048&(r=U(t)))throw Error("farr");if(64&r)return t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error("mid");t:{const s=(n=t).length;if(s){const i=s-1;if(kn(n[i])){if((e=i-(+!!(512&(r|=256))-1))>=1024)throw Error("pvtlmt");r=-33521665&r|(1023&e)<<15;break t}}if(e){if((e=Math.max(e,s-(+!!(512&r)-1)))>1024)throw Error("spvt");r=-33521665&r|(1023&e)<<15}}}return N(t,r),t}const t1={};let e1=function(){try{return Pr(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class er{constructor(){this.g=new Map}get(e){return this.g.get(e)}set(e,n){return this.g.set(e,n),this.size=this.g.size,this}delete(e){return e=this.g.delete(e),this.size=this.g.size,e}clear(){this.g.clear(),this.size=this.g.size}has(e){return this.g.has(e)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(e,n){return this.g.forEach(e,n)}[Symbol.iterator](){return this.entries()}}const n1=e1?(Object.setPrototypeOf(er.prototype,Map.prototype),Object.defineProperties(er.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),er):class extends Map{constructor(){super()}};function Us(t){return t}function nr(t){if(2&t.M)throw Error("Cannot mutate an immutable Map")}var mt=class extends n1{constructor(t,e,n=Us,r=Us){super();let s=U(t);s|=64,N(t,s),this.M=s,this.U=e,this.T=n,this.aa=this.U?r1:r;for(let i=0;i<t.length;i++){const o=t[i],h=n(o[0],!1,!0);let a=o[1];e?a===void 0&&(a=null):a=r(o[1],!1,!0,void 0,void 0,s),super.set(h,a)}}pa(t=Gs){if(this.size!==0)return this.Z(t)}Z(t=Gs){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){nr(this),super.clear()}delete(t){return nr(this),super.delete(this.T(t,!0,!1))}entries(){var t=this.oa();return new fn(t,s1,this)}keys(){return this.Ka()}values(){var t=this.oa();return new fn(t,mt.prototype.get,this)}forEach(t,e){super.forEach((n,r)=>{t.call(e,this.get(r),r,this)})}set(t,e){return nr(this),(t=this.T(t,!0,!1))==null?this:e==null?(super.delete(t),this):super.set(t,this.aa(e,!0,!0,this.U,!1,this.M))}Qa(t){const e=this.T(t[0],!1,!0);t=t[1],t=this.U?t===void 0?null:t:this.aa(t,!1,!0,void 0,!1,this.M),super.set(e,t)}has(t){return super.has(this.T(t,!1,!1))}get(t){t=this.T(t,!1,!1);const e=super.get(t);if(e!==void 0){var n=this.U;return n?((n=this.aa(e,!1,!0,n,this.va,this.M))!==e&&super.set(t,n),n):e}}oa(){return Array.from(super.keys())}Ka(){return super.keys()}[Symbol.iterator](){return this.entries()}};function r1(t,e,n,r,s,i){return t=jr(t,r,n,i),s&&(t=xn(t)),t}function Gs(t){return t}function s1(t){return[t,this.get(t)]}let i1;function js(){return i1||(i1=new mt(Ae([]),void 0,void 0,void 0,t1))}function Hr(t,e,n,r,s){if(t!=null){if(Array.isArray(t))t=ln(t)?void 0:s&&2&U(t)?t:Pn(t,e,n,r!==void 0,s);else if(kn(t)){const i={};for(let o in t)i[o]=Hr(t[o],e,n,r,s);t=i}else t=e(t,r);return t}}function Pn(t,e,n,r,s){const i=r||n?U(t):0;r=r?!!(32&i):void 0;const o=ot(t);for(let h=0;h<o.length;h++)o[h]=Hr(o[h],e,n,r,s);return n&&(zi(o,t),n(i,o)),o}function o1(t){return Hr(t,Wr,void 0,void 0,!1)}function Wr(t){return t.Y===ze?t.toJSON():t instanceof mt?t.pa(o1):function(e){switch(typeof e){case"number":return isFinite(e)?e:String(e);case"bigint":return fr(e)?Number(e):String(e);case"boolean":return e?1:0;case"object":if(e)if(Array.isArray(e)){if(ln(e))return}else{if(He(e))return Ms(e);if(e instanceof Ct){const n=e.ba;return n==null?"":typeof n=="string"?n:e.ba=Ms(n)}if(e instanceof mt)return e.pa()}}return e}(t)}function dr(t,e,n=lr){if(t!=null){if(Ui&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=U(t);return 2&r?t:(e&&(e=r===0||!!(32&r)&&!(64&r||!(16&r))),e?(N(t,-12293&(34|r)),t):Pn(t,dr,4&r?lr:n,!0,!0))}return t.Y===ze?(n=t.u,t=2&(r=A(n))?t:zr(t,n,r,!0)):t instanceof mt&&!(2&t.M)&&(n=Ae(t.Z(dr)),t=new mt(n,t.U,t.T,t.aa)),t}}function zr(t,e,n,r){return Mn(t),t=t.constructor,gn=e=to(e,n,r),e=new t(e),gn=void 0,e}function to(t,e,n){const r=n||2&e?lr:Ba,s=!!(32&e);return t=function(i,o,h){const a=ot(i);var c=a.length;const u=256&o?a[c-1]:void 0;for(c+=u?-1:0,o=512&o?1:0;o<c;o++)a[o]=h(a[o]);if(u){o=a[o]={};for(const g in u)o[g]=h(u[g])}return zi(a,i),a}(t,e,i=>dr(i,s,r)),En(t,32|(n?2:0)),t}function xn(t){const e=t.u,n=A(e);return 2&n?zr(t,e,n,!1):t}function eo(t,e,n,r){return!(4&e)||n!=null}function zt(t,e){return xt(t=t.u,A(t),e)}function Vs(t,e,n,r){if(!((e=r+(+!!(512&e)-1))<0||e>=t.length||e>=n))return t[e]}function xt(t,e,n,r){if(n===-1)return null;const s=e>>15&1023||536870912;if(!(n>=s)){var i=t.length;return r&&256&e&&(r=t[i-1][n])!=null?(Vs(t,e,s,n)&&Qn!=null&&((e=(t=Da??(Da={}))[Qn]||0)>=4||(t[Qn]=e+1,ie())),r):Vs(t,e,s,n)}return 256&e?t[t.length-1][n]:void 0}function S(t,e,n){const r=t.u;let s=A(r);return Ut(s),x(r,s,e,n),t}function x(t,e,n,r){const s=e>>15&1023||536870912;if(n>=s){let i,o=e;if(256&e)i=t[t.length-1];else{if(r==null)return o;i=t[s+(+!!(512&e)-1)]={},o|=256}return i[n]=r,n<s&&(t[n+(+!!(512&e)-1)]=void 0),o!==e&&N(t,o),o}return t[n+(+!!(512&e)-1)]=r,256&e&&n in(t=t[t.length-1])&&delete t[n],e}function Te(t,e,n,r,s){var i=2&e;s=xt(t,e,n,s),Array.isArray(s)||(s=Ir);const o=!(2&r);r=!(1&r);const h=!!(32&e);let a=U(s);return a!==0||!h||i||o?1&a||(a|=1,N(s,a)):(a|=33,N(s,a)),i?(t=!1,2&a||(Ae(s),t=!!(4&a)),(r||t)&&Object.freeze(s)):(i=!!(2&a)||!!(2048&a),r&&i?(s=ot(s),i=1,h&&!o&&(i|=32),N(s,i),x(t,e,n,s)):o&&32&a&&!i&&un(s,32)),s}function nn(t,e){t=t.u;let n=A(t);const r=xt(t,n,e),s=$t(r);return s!=null&&s!==r&&x(t,n,e,s),s}function no(t){t=t.u;let e=A(t);const n=xt(t,e,1),r=Nr(n,!0,!!(34&e));return r!=null&&r!==n&&x(t,e,1,r),r}function Zt(){return Ua===void 0?2:5}function Qt(t,e,n,r,s,i){const o=t.u;let h=A(o);r=2&h?1:r,i=!!i,s=ro(o,h,e,s);var a=U(s),c=s;if(mn(c,t),r!==2&&r!==1||Ge(c,t),eo(t,a,void 0)){4&a&&(s=ot(s),a=oe(a,h),h=x(o,h,e,s));let g=c=0;for(;c<s.length;c++){const v=n(s[c]);v!=null&&(s[g++]=v)}g<c&&(s.length=g),a=-4097&(20|(a=so(a,h))),N(s,a&=-8193),2&a&&Object.freeze(s)}let u;return r===1||r===4&&32&a?Nt(a)||(t=a,(a|=2)!==t&&N(s,a),Object.freeze(s)):(n=r===5&&(!!(32&a)||Nt(a)||!!(X!=null&&X.get(s))),(r===2||n)&&Nt(a)&&(s=ot(s),a=ge(a=oe(a,h),h,i),N(s,a),h=x(o,h,e,s)),Nt(a)||(e=a,(a=ge(a,h,i))!==e&&N(s,a)),n?(u=$i(s),Vr(s,t,!0)):r!==2||i||(X==null||X.delete(s))),u||s}function ro(t,e,n,r){return t=xt(t,e,n,r),Array.isArray(t)?t:Ir}function so(t,e){return t===0&&(t=oe(t,e)),1|t}function Nt(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function io(t){t=ot(t);for(let e=0;e<t.length;e++){const n=t[e]=ot(t[e]);Array.isArray(n[1])&&(n[1]=Ae(n[1]))}return t}function pr(t,e,n,r){t=t.u;let s=A(t);Ut(s),x(t,s,e,(r==="0"?Number(n)===0:n===r)?void 0:n)}function rr(t,e){var n=Go;return Xr(Kr(t=t.u),t,A(t),n)===e?e:-1}function Kr(t){if(be)return t[Pe]??(t[Pe]=new Map);if(Pe in t)return t[Pe];const e=new Map;return Object.defineProperty(t,Pe,{value:e}),e}function oo(t,e,n,r){const s=Kr(t),i=Xr(s,t,e,n);return i!==r&&(i&&(e=x(t,e,i)),s.set(n,r)),e}function Xr(t,e,n,r){let s=t.get(r);if(s!=null)return s;s=0;for(let i=0;i<r.length;i++){const o=r[i];xt(e,n,o)!=null&&(s!==0&&(n=x(e,n,s)),s=o)}return t.set(r,s),s}function Yr(t,e,n,r){let s,i=A(t);if((r=xt(t,i,n,r))!=null&&r.Y===ze)return(e=xn(r))!==r&&x(t,i,n,e),e.u;if(Array.isArray(r)){const o=U(r);s=2&o?to(r,o,!1):r,s=ee(s,e)}else s=ee(void 0,e);return s!==r&&x(t,i,n,s),s}function ao(t,e,n,r){t=t.u;let s=A(t);return(e=jr(r=xt(t,s,n,r),e,!1,s))!==r&&e!=null&&x(t,s,n,e),e}function w(t,e,n,r=!1){if((e=ao(t,e,n,r))==null)return e;if(t=t.u,!(2&(r=A(t)))){const s=xn(e);s!==e&&x(t,r,n,e=s)}return e}function ho(t,e,n,r,s,i,o){const h=t.u;var a=!!(2&e);s=a?1:s,i=!!i,o&&(o=!a),a=ro(h,e,r);var c=U(a),u=a;if(mn(u,t),s!==2&&s!==1||Ge(u,t),!(u=!!(4&c))){var g=a,v=e;const Y=!!(2&(c=so(c,e)));Y&&(v|=2);let Me=!Y,Ts=!0,$e=0,$n=0;for(;$e<g.length;$e++){const qn=jr(g[$e],n,!1,v);if(qn instanceof n){if(!Y){const Ss=!!(2&U(qn.u));Me&&(Me=!Ss),Ts&&(Ts=Ss)}g[$n++]=qn}}$n<$e&&(g.length=$n),c|=4,c=Ts?16|c:-17&c,N(g,c=Me?8|c:-9&c),Y&&Object.freeze(g)}if(o&&!(8&c||!a.length&&(s===1||s===4&&32&c))){for(Nt(c)?(a=ot(a),c=oe(c,e),e=x(h,e,r,a)):Ge(a,t),n=a,o=c,g=0;g<n.length;g++)(c=n[g])!==(v=xn(c))&&(n[g]=v);o|=8,o=n.length?-17&o:16|o,N(n,o),c=o}let ut;return s===1||s===4&&32&c?Nt(c)||(t=c,(c|=!a.length||16&c&&(!u||32&c)?2:2048)!==t&&N(a,c),Object.freeze(a)):(u=s===5&&(!!(32&c)||Nt(c)||!!(X!=null&&X.get(a))),(s===2||u)&&Nt(c)&&(a=ot(a),c=ge(c=oe(c,e),e,i),N(a,c),e=x(h,e,r,a)),Nt(c)||(r=c,(c=ge(c,e,i))!==r&&N(a,c)),u?(ut=$i(a),Vr(a,t,!0)):s!==2||i||(X==null||X.delete(a))),ut||a}function Bt(t,e,n){const r=A(t.u);return ho(t,r,e,n,Zt(),!1,!(2&r))}function m(t,e,n,r){return r==null&&(r=void 0),S(t,n,r)}function Re(t,e,n,r){r==null&&(r=void 0);t:{t=t.u;let s=A(t);if(Ut(s),r==null){const i=Kr(t);if(Xr(i,t,s,n)!==e)break t;i.set(n,0)}else s=oo(t,s,n,e);x(t,s,e,r)}}function oe(t,e){return-2049&(t=32|(2&e?2|t:-3&t))}function ge(t,e,n){return 32&e&&n||(t&=-33),t}function yn(t,e,n,r){const s=A(t.u);Ut(s),t=ho(t,s,n,e,2,!0),n=r??new n,t.push(n),2&U(n.u)?un(t,8):un(t,16)}function wt(t,e){return t??e}function gt(t,e){return Ee(zt(t,e))}function B(t,e){return wt(nn(t,e),0)}function Mt(t,e){return wt(Wt(zt(t,e)),"")}function je(t,e,n){if(n!=null&&typeof n!="boolean")throw t=typeof n,Error(`Expected boolean but got ${t!="object"?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);S(t,e,n)}function Pt(t,e,n){if(n!=null){if(typeof n!="number"||!Number.isFinite(n))throw ur("int32");n|=0}S(t,e,n)}function d(t,e,n){if(n!=null&&typeof n!="number")throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);S(t,e,n)}function _n(t,e,n){{const h=t.u;let a=A(h);if(Ut(a),n==null)x(h,a,e);else{n=(en==null?void 0:en.get(n))||n;var r,s=U(n),i=s,o=!!(2&s)||Object.isFrozen(n);if((r=!o)&&(r=Ga===void 0||!1),eo(t,s)){s=21,o&&(n=ot(n),i=0,s=ge(s=oe(s,a),a,!0));for(let c=0;c<n.length;c++)n[c]=Yi(n[c])}r?(n=ot(n),i=0,s=ge(s=oe(s,a),a,!0)):o||Vr(n,t),s!==i&&N(n,s),x(h,a,e,n)}}}function On(t,e,n){Ut(A(t.u)),Qt(t,e,Wt,2,void 0,!0).push(Yi(n))}function co(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function $r(){return Error("Failed to read varint, encoding is invalid.")}function uo(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function qr(t){if(typeof t=="string")return{buffer:ji(t),O:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),O:!1};if(t.constructor===Uint8Array)return{buffer:t,O:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),O:!1};if(t.constructor===Ct)return{buffer:xr(t)||new Uint8Array(0),O:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.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 Jr(t,e){let n,r=0,s=0,i=0;const o=t.h;let h=t.g;do n=o[h++],r|=(127&n)<<i,i+=7;while(i<32&&128&n);for(i>32&&(s|=(127&n)>>4),i=3;i<32&&128&n;i+=7)n=o[h++],s|=(127&n)<<i;if(ne(t,h),n<128)return e(r>>>0,s>>>0);throw $r()}function Zr(t){let e=0,n=t.g;const r=n+10,s=t.h;for(;n<r;){const i=s[n++];if(e|=i,(128&i)==0)return ne(t,n),!!(127&e)}throw $r()}function Kt(t){const e=t.h;let n=t.g,r=e[n++],s=127&r;if(128&r&&(r=e[n++],s|=(127&r)<<7,128&r&&(r=e[n++],s|=(127&r)<<14,128&r&&(r=e[n++],s|=(127&r)<<21,128&r&&(r=e[n++],s|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw $r();return ne(t,n),s}function Xt(t){return Kt(t)>>>0}function gr(t){var e=t.h;const n=t.g,r=e[n],s=e[n+1],i=e[n+2];return e=e[n+3],ne(t,t.g+4),(r<<0|s<<8|i<<16|e<<24)>>>0}function mr(t){var e=gr(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,n==255?e?NaN:t*(1/0):n==0?1401298464324817e-60*t*e:t*Math.pow(2,n-150)*(e+8388608)}function a1(t){return Kt(t)}function sr(t,e,{ea:n=!1}={}){t.ea=n,e&&(e=qr(e),t.h=e.buffer,t.m=e.O,t.j=0,t.l=t.h.length,t.g=t.j)}function ne(t,e){if(t.g=e,e>t.l)throw uo(t.l,e)}function lo(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw uo(e,t.l-n);return t.g=r,n}function fo(t,e){if(e==0)return se();var n=lo(t,e);return t.ea&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):Xa?t.slice(n,e):new Uint8Array(t.subarray(n,e))),n.length==0?se():new Ct(n,de)}mt.prototype.toJSON=void 0,mt.prototype.La=Wi;var Hs=[];function po(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=Xt(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw co(n,t.l);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function rn(t){switch(t.h){case 0:t.h!=0?rn(t):Zr(t.g);break;case 1:ne(t=t.g,t.g+8);break;case 2:if(t.h!=2)rn(t);else{var e=Xt(t.g);ne(t=t.g,t.g+e)}break;case 5:ne(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!po(t))throw Error("Unmatched start-group tag: stream EOF");if(t.h==4){if(t.m!=e)throw Error("Unmatched end-group tag");break}rn(t)}break;default:throw co(t.h,t.l)}}function Ke(t,e,n){const r=t.g.l,s=Xt(t.g),i=t.g.g+s;let o=i-r;if(o<=0&&(t.g.l=i,n(e,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${s} bytes, instead read ${s-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=i,t.g.l=r,e}function Qr(t){var e=Xt(t.g),n=lo(t=t.g,e);if(t=t.h,Fa){var r,s=t;(r=Jn)||(r=Jn=new TextDecoder("utf-8",{fatal:!0})),e=n+e,s=n===0&&e===s.length?s:s.subarray(n,e);try{var i=r.decode(s)}catch(h){if(qe===void 0){try{r.decode(new Uint8Array([128]))}catch{}try{r.decode(new Uint8Array([97])),qe=!0}catch{qe=!1}}throw!qe&&(Jn=void 0),h}}else{e=(i=n)+e,n=[];let h,a=null;for(;i<e;){var o=t[i++];o<128?n.push(o):o<224?i>=e?Jt():(h=t[i++],o<194||(192&h)!=128?(i--,Jt()):n.push((31&o)<<6|63&h)):o<240?i>=e-1?Jt():(h=t[i++],(192&h)!=128||o===224&&h<160||o===237&&h>=160||(192&(r=t[i++]))!=128?(i--,Jt()):n.push((15&o)<<12|(63&h)<<6|63&r)):o<=244?i>=e-2?Jt():(h=t[i++],(192&h)!=128||h-144+(o<<28)>>30||(192&(r=t[i++]))!=128||(192&(s=t[i++]))!=128?(i--,Jt()):(o=(7&o)<<18|(63&h)<<12|(63&r)<<6|63&s,o-=65536,n.push(55296+(o>>10&1023),56320+(1023&o)))):Jt(),n.length>=8192&&(a=Ls(a,n),n.length=0)}i=Ls(a,n)}return i}function go(t){const e=Xt(t.g);return fo(t.g,e)}function In(t,e,n){var r=Xt(t.g);for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var Je=[];let vn;function At(t,e,n){e.g?e.m(t,e.g,e.h,n,!0):e.m(t,e.h,n,!0)}var f=class{constructor(t,e){this.u=Qi(t,e)}toJSON(){return mo(this)}l(){var t=Y1;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.u;return zr(this,t,A(t),!1)}O(){return!!(2&U(this.u))}};function mo(t){Mn(t),t=vn?t.u:Pn(t.u,Wr,void 0,void 0,!1);{var e=!vn;let c=t.length;if(c){var n=t[c-1],r=kn(n);r?c--:n=void 0;var s=t;if(r){t:{var i,o=n,h=!1;if(o)for(let u in o)isNaN(+u)?(i??(i={}))[u]=o[u]:(r=o[u],Array.isArray(r)&&(ln(r)||Os(r)&&r.size===0)&&(r=null),r==null&&(h=!0),r!=null&&((i??(i={}))[u]=r));if(h||(i=o),i)for(let u in i){h=i;break t}h=null}o=h==null?n!=null:h!==n}for(;c>0&&((i=s[c-1])==null||ln(i)||Os(i)&&i.size===0);c--)var a=!0;(s!==t||o||a)&&(e?(a||o||h)&&(s.length=c):s=Array.prototype.slice.call(s,0,c),h&&s.push(h)),a=s}else a=t}return a}function Ws(t){return t?/^\d+$/.test(t)?(Ln(t),new yr(T,C)):null:h1||(h1=new yr(0,0))}f.prototype.Y=ze,f.prototype.toString=function(){try{return vn=!0,mo(this).toString()}finally{vn=!1}};var yr=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let h1;function zs(t){return t?/^-?\d+$/.test(t)?(Ln(t),new _r(T,C)):null:c1||(c1=new _r(0,0))}var _r=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let c1;function le(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Xe(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Nn(t,e){if(e>=0)Xe(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Ve(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function me(t,e){e.length!==0&&(t.l.push(e),t.h+=e.length)}function yt(t,e,n){Xe(t.g,8*e+n)}function ts(t,e){return yt(t,e,2),e=t.g.end(),me(t,e),e.push(t.h),e}function es(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Rn(t,e,n){yt(t,e,2),Xe(t.g,n.length),me(t,t.g.end()),me(t,n)}function vr(t,e,n,r){n!=null&&(e=ts(t,e),r(n,t),es(t,e))}class Se{constructor(e,n,r){this.g=e,this.h=n,this.qa=r}}function yo(t){return Array.isArray(t)?t[0]instanceof Se?t:[v1,t]:[t,void 0]}function Le(t,e){if(Array.isArray(e)){var n=U(e);if(4&n)return e;for(var r=0,s=0;r<e.length;r++){const i=t(e[r]);i!=null&&(e[s++]=i)}return s<r&&(e.length=s),N(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}const Ks=Symbol();function ns(t){let e=t[Ks];if(!e){const n=rs(t),r=n.h;e=r?(s,i)=>r(s,i,n):(s,i)=>{var c;for(;po(i)&&i.h!=4;){var o=i.m;let u=n[o];const g=!u;let v=!1;if(!u){var h=n.X;if(h){var a=h[o];a&&(v=(c=h.P)==null?void 0:c[o],(!Ci||v)&&(h=u1(a))&&(u=n[o]=h))}}u&&u(i,s,o)||(o=(h=i).l,rn(h),h.ja?h=void 0:(a=h.g.g-o,h.g.g=o,h=fo(h.g,a)),o=s,h&&(Ht||(Ht=Symbol()),(a=o[Ht])?a.push(h):o[Ht]=[h])),g&&u&&!v&&wr++<5&&ie()}},t[Ks]=e}return e}function u1(t){const e=(t=yo(t))[0].g;if(t=t[1]){const n=ns(t),r=rs(t).g;return(s,i,o)=>e(s,i,o,r,n)}return e}function l1(t,e,n){t[e]=n}function _o(t,e,n,r){var s=l1;e.g=function(g){switch(typeof g){case"boolean":return Za||(Za=[0,void 0,!0]);case"number":return g>0?void 0:g===0?Qa||(Qa=[0,void 0]):[-g,void 0];case"string":return[0,g];case"object":return g}}(t[0]);let i=0;var o=t[++i];o&&o.constructor===Object&&(e.X=o,typeof(o=t[++i])=="function"&&(e.h=o,e.l=t[++i],o=t[++i]));const h={};for(;Array.isArray(o)&&typeof o[0]=="number"&&o[0]>0;){for(var a=0;a<o.length;a++)h[o[a]]=o;o=t[++i]}for(a=1;o!==void 0;){let g;typeof o=="number"&&(a+=o,o=t[++i]);var c=void 0;if(o instanceof Se?g=o:(g=w1,i--),g.qa){o=t[++i],c=t;var u=i;typeof o=="function"&&(o=o(),c[u]=o),c=o}for(u=a+1,typeof(o=t[++i])=="number"&&o<0&&(u-=o,o=t[++i]);a<u;a++){const v=h[a];s(e,a,c?r(g,c,v):n(g,v))}}return e}const Xs=Symbol();function vo(t){let e=t[Xs];if(!e){const n=Cn(t);e=(r,s)=>wo(r,s,n),t[Xs]=e}return e}const Ys=Symbol();function f1(t){return t.h}function d1(t,e){let n,r;const s=t.h;return(i,o,h)=>s(i,o,h,r||(r=Cn(e).g),n||(n=vo(e)))}function Cn(t){let e=t[Ys];return e||(e=_o(t,t[Ys]={},f1,d1))}const $s=Symbol();function p1(t,e){const n=t.g;return e?(r,s,i)=>n(r,s,i,e):n}function g1(t,e,n){const r=t.g;let s,i;return(o,h,a)=>r(o,h,a,i||(i=rs(e).g),s||(s=ns(e)),n)}function rs(t){let e=t[$s];return e||(e=_o(t,t[$s]={},p1,g1))}function qs(t,e){var i;var n=t[e];if(n)return n;if(n=t.X){var r=n[e];if(r){var s=(r=yo(r))[0].h;if(r=r[1],n=(i=n.P)==null?void 0:i[e],!Ci||n){if(r){const o=vo(r),h=Cn(r).g;n=(n=t.l)?n(h,o):(a,c,u)=>s(a,c,u,h,o)}else n=s;return t[e]=n}}}}function wo(t,e,n){var a,c,u;for(var r=A(t),s=+!!(512&r)-1,i=t.length,o=512&r?1:0,h=i+(256&r?-1:0);o<h;o++){const g=t[o];if(g==null)continue;const v=o-s,ut=qs(n,v);if(!ut)continue;const Y=n.X;Y!=null&&Y[v]&&!((a=Y==null?void 0:Y.P)!=null&&a[v])&&wr++<5&&ie(),ut(e,g,v)}if(256&r){r=t[i-1];for(let g in r)s=+g,!Number.isNaN(s)&&(i=r[g])!=null&&(h=qs(n,s))&&((c=o=n.X)!=null&&c[s]&&!((u=o==null?void 0:o.P)!=null&&u[s])&&wr++<5&&ie(),h(e,i,s))}if(t=Ht?t[Ht]:void 0)for(me(e,e.g.end()),n=0;n<t.length;n++)me(e,xr(t[n])||new Uint8Array(0))}function Z(t,e){return new Se(t,e,!1)}function Fe(t,e){return new Se(t,e,!1)}function Dn(t,e){return new Se(t,e,!0)}function Q(t,e,n){x(t,A(t),e,n)}var m1=Dn(function(t,e,n,r,s){return t.h===2&&(t=Ke(t,ee([void 0,void 0],r),s),Ut(r=A(e)),(s=xt(e,r,n))instanceof mt?2&s.M?((s=s.Z()).push(t),x(e,r,n,s)):s.Qa(t):Array.isArray(s)?(2&U(s)&&x(e,r,n,s=io(s)),s.push(t)):x(e,r,n,[t]),!0)},function(t,e,n,r,s){if(e instanceof mt)e.forEach((i,o)=>{vr(t,n,ee([o,i],r),s)});else if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];Array.isArray(o)&&vr(t,n,ee(o,r),s)}});let wr=0;function bo(t,e,n){if(e=function(r){if(r==null)return r;const s=typeof r;if(s==="bigint")return String(BigInt.asIntN(64,r));if(Fn(r)){if(s==="string")return Gr(r);if(s==="number")return Ur(r)}}(e),e!=null&&(typeof e=="string"&&zs(e),e!=null))switch(yt(t,n,0),typeof e){case"number":t=t.g,pe(e),le(t,T,C);break;case"bigint":n=BigInt.asUintN(64,e),n=new _r(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),le(t.g,n.h,n.g);break;default:n=zs(e),le(t.g,n.h,n.g)}}function Ao(t,e,n){(e=Ee(e))!=null&&e!=null&&(yt(t,n,0),Nn(t.g,e))}function Eo(t,e,n){(e=Xi(e))!=null&&(yt(t,n,0),t.g.g.push(e?1:0))}function ko(t,e,n){(e=Wt(e))!=null&&Rn(t,n,Ni(e))}function Bn(t,e,n,r,s){e instanceof f?(Mn(e),e=e.u):e=Array.isArray(e)?ee(e,r):void 0,vr(t,n,e,s)}function To(t,e,n){(e=e==null||typeof e=="string"||He(e)||e instanceof Ct?e:void 0)!=null&&Rn(t,n,qr(e).buffer)}function So(t,e,n){return(t.h===5||t.h===2)&&(e=Te(e,A(e),n,2,!1),t.h==2?In(t,mr,e):e.push(mr(t.g)),!0)}var j,It=Z(function(t,e,n){if(t.h!==1)return!1;var r=t.g;t=gr(r);const s=gr(r);r=2*(s>>31)+1;const i=s>>>20&2047;return t=4294967296*(1048575&s)+t,Q(e,n,i==2047?t?NaN:r*(1/0):i==0?5e-324*r*t:r*Math.pow(2,i-1075)*(t+4503599627370496)),!0},function(t,e,n){(e=$t(e))!=null&&(yt(t,n,1),t=t.g,(n=Ki||(Ki=new DataView(new ArrayBuffer(8)))).setFloat64(0,+e,!0),T=n.getUint32(0,!0),C=n.getUint32(4,!0),Ve(t,T),Ve(t,C))}),H=Z(function(t,e,n){return t.h===5&&(Q(e,n,mr(t.g)),!0)},function(t,e,n){(e=$t(e))!=null&&(yt(t,n,5),t=t.g,Rr(e),Ve(t,T))}),y1=Fe(So,function(t,e,n){if((e=Le($t,e))!=null)for(let o=0;o<e.length;o++){var r=t,s=n,i=e[o];i!=null&&(yt(r,s,5),r=r.g,Rr(i),Ve(r,T))}}),ss=Fe(So,function(t,e,n){if((e=Le($t,e))!=null&&e.length){yt(t,n,2),Xe(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Rr(e[r]),Ve(n,T)}}),Yt=Z(function(t,e,n){return t.h===0&&(Q(e,n,Jr(t.g,Dr)),!0)},bo),ir=Z(function(t,e,n){return t.h===0&&(Q(e,n,(t=Jr(t.g,Dr))===0?void 0:t),!0)},bo),_1=Z(function(t,e,n){return t.h===0&&(Q(e,n,Jr(t.g,Cr)),!0)},function(t,e,n){if((e=qa(e))!=null&&(typeof e=="string"&&Ws(e),e!=null))switch(yt(t,n,0),typeof e){case"number":t=t.g,pe(e),le(t,T,C);break;case"bigint":n=BigInt.asUintN(64,e),n=new yr(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),le(t.g,n.h,n.g);break;default:n=Ws(e),le(t.g,n.h,n.g)}}),D=Z(function(t,e,n){return t.h===0&&(Q(e,n,Kt(t.g)),!0)},Ao),Un=Fe(function(t,e,n){return(t.h===0||t.h===2)&&(e=Te(e,A(e),n,2,!1),t.h==2?In(t,Kt,e):e.push(Kt(t.g)),!0)},function(t,e,n){if((e=Le(Ee,e))!=null&&e.length){n=ts(t,n);for(let r=0;r<e.length;r++)Nn(t.g,e[r]);es(t,n)}}),ue=Z(function(t,e,n){return t.h===0&&(Q(e,n,(t=Kt(t.g))===0?void 0:t),!0)},Ao),I=Z(function(t,e,n){return t.h===0&&(Q(e,n,Zr(t.g)),!0)},Eo),Ce=Z(function(t,e,n){return t.h===0&&(Q(e,n,(t=Zr(t.g))===!1?void 0:t),!0)},Eo),K=Fe(function(t,e,n){if(t.h!==2)return!1;t=Qr(t);const r=A(e);return Ut(r),Te(e,r,n,2).push(t),!0},function(t,e,n){if((e=Le(Wt,e))!=null)for(let o=0;o<e.length;o++){var r=t,s=n,i=e[o];i!=null&&Rn(r,s,Ni(i))}}),Vt=Z(function(t,e,n){return t.h===2&&(Q(e,n,(t=Qr(t))===""?void 0:t),!0)},ko),E=Z(function(t,e,n){return t.h===2&&(Q(e,n,Qr(t)),!0)},ko),v1=Dn(function(t,e,n,r,s){return t.h===2&&(Ke(t,Yr(e,r,n,!0),s),!0)},Bn),w1=Dn(function(t,e,n,r,s){return t.h===2&&(Ke(t,Yr(e,r,n),s),!0)},Bn);j=new Se(function(t,e,n,r,s){if(t.h!==2)return!1;r=ee(void 0,r);let i=A(e);Ut(i);let o=Te(e,i,n,3);return i=A(e),4&U(o)&&(o=ot(o),N(o,-2079&(1|U(o))),x(e,i,n,o)),o.push(r),Ke(t,r,s),!0},function(t,e,n,r,s){if(Array.isArray(e))for(let i=0;i<e.length;i++)Bn(t,e[i],n,r,s)},!0);var k=Dn(function(t,e,n,r,s,i){return t.h===2&&(oo(e,A(e),i,n),Ke(t,e=Yr(e,r,n),s),!0)},Bn),Lo=Z(function(t,e,n){return t.h===2&&(Q(e,n,go(t)),!0)},To),b1=Fe(function(t,e,n){return(t.h===0||t.h===2)&&(e=Te(e,A(e),n,2,!1),t.h==2?In(t,Xt,e):e.push(Xt(t.g)),!0)},function(t,e,n){if((e=Le($a,e))!=null)for(let o=0;o<e.length;o++){var r=t,s=n,i=e[o];i!=null&&(yt(r,s,0),Xe(r.g,i))}}),bt=Z(function(t,e,n){return t.h===0&&(Q(e,n,Kt(t.g)),!0)},function(t,e,n){(e=Ee(e))!=null&&(e=parseInt(e,10),yt(t,n,0),Nn(t.g,e))});class A1{constructor(e,n){this.h=e,this.g=n,this.l=w,this.m=m,this.defaultValue=void 0}}function Et(t,e){return new A1(t,e)}function qt(t,e){return(n,r)=>{if(Je.length){const i=Je.pop();i.o(r),sr(i.g,n,r),n=i}else n=new class{constructor(i,o){if(Hs.length){const h=Hs.pop();sr(h,i,o),i=h}else i=new class{constructor(h,a){this.h=null,this.m=!1,this.g=this.l=this.j=0,sr(this,h,a)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.ea=!1}}(i,o);this.g=i,this.l=this.g.g,this.h=this.m=-1,this.o(o)}o({ja:i=!1}={}){this.ja=i}}(n,r);try{const i=new t,o=i.u;ns(e)(o,n);var s=i}finally{n.g.clear(),n.m=-1,n.h=-1,Je.length<100&&Je.push(n)}return s}}function Gn(t){return function(){Mn(this);const e=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}}}};wo(this.u,e,Cn(t)),me(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,s=r.length;let i=0;for(let o=0;o<s;o++){const h=r[o];n.set(h,i),i+=h.length}return e.l=[n],n}}var Js=class extends f{constructor(t){super(t)}},Zs=[0,Vt,Z(function(t,e,n){return t.h===2&&(Q(e,n,(t=go(t))===se()?void 0:t),!0)},function(t,e,n){if(e!=null){if(e instanceof f){const r=e.Ta;return void(r&&(e=r(e),e!=null&&Rn(t,n,qr(e).buffer)))}if(Array.isArray(e))return}To(t,e,n)})],Fo=[0,D,bt,I,-1,Un,bt,-1],E1=class extends f{constructor(){super()}},Mo=[0,I,E,I,bt,-1,Fe(function(t,e,n){return(t.h===0||t.h===2)&&(e=Te(e,A(e),n,2,!1),t.h==2?In(t,a1,e):e.push(Kt(t.g)),!0)},function(t,e,n){if((e=Le(Ee,e))!=null&&e.length){n=ts(t,n);for(let r=0;r<e.length;r++)Nn(t.g,e[r]);es(t,n)}}),E,-1,[0,I,-1],bt,I,-1],Po=[0,E,-2],Qs=class extends f{constructor(){super()}},xo=[0],Oo=[0,D,I,1,I,-3],k1=[0,E,I,-1,D,[0,[1,2,3,4,5,6,7],k,xo,k,Mo,k,Po,k,Oo,k,Fo,k,[0,E,-2],k,[0,E,bt]],[0,E],I,[0,[1,3],[2,4],k,[0,Un],-1,k,[0,K],-1,j,[0,E,-1]],E],at=class extends f{constructor(t){super(t,2)}},F={},V=F.P={};F[336783863]=k1,V[336783863]=1;var ti=[0,ir,-1,Ce,-3,ir,Un,Vt,ue,ir,-1,Ce,ue,Ce,-2,Vt];function ht(t,e){pr(t,2,ke(e),"")}function L(t,e){On(t,3,e)}function _(t,e){On(t,4,e)}var $=class extends f{constructor(t){super(t,500)}o(t){return m(this,0,7,t)}},De=[-1,{P:{}}],ei=[0,E,1,De],ni=[0,E,K,De];function ct(t,e){yn(t,1,$,e)}function M(t,e){On(t,10,e)}function b(t,e){On(t,15,e)}var tt=class extends f{constructor(t){super(t,500)}o(t){return m(this,0,1001,t)}},Io=[-500,j,[-500,Vt,-1,K,-3,[-2,F,I],j,Zs,ue,-1,ei,ni,j,[0,Vt,Ce],Vt,ti,ue,K,987,K],4,j,[-500,E,-1,[-1,{P:{}}],998,E],j,[-500,E,K,-1,[-2,{P:{}},I],997,K,-1],ue,j,[-500,E,K,De,998,K],K,ue,ei,ni,j,[0,Vt,-1,De],K,-2,ti,Vt,-1,Ce,979,De,j,Zs];tt.prototype.g=Gn(Io);var T1=qt(tt,Io),S1=class extends f{constructor(t){super(t)}},No=class extends f{constructor(t){super(t)}g(){return Bt(this,S1,1)}},Ro=[0,j,[0,D,H,E,-1]],jn=qt(No,Ro),L1=class extends f{constructor(t){super(t)}},F1=class extends f{constructor(t){super(t)}},or=class extends f{constructor(t){super(t)}h(){return w(this,L1,2)}g(){return Bt(this,F1,5)}},Co=qt(class extends f{constructor(t){super(t)}},[0,K,Un,ss,[0,bt,[0,D,-3],[0,H,-3],[0,D,-1,[0,j,[0,D,-2]]],j,[0,H,-1,E,H]],E,-1,Yt,j,[0,D,H],K,Yt]),Do=class extends f{constructor(t){super(t)}},fe=qt(class extends f{constructor(t){super(t)}},[0,j,[0,H,-4]]),Bo=class extends f{constructor(t){super(t)}},Ye=qt(class extends f{constructor(t){super(t)}},[0,j,[0,H,-4]]),M1=class extends f{constructor(t){super(t)}},P1=[0,D,-1,ss,bt],Uo=class extends f{constructor(){super()}};Uo.prototype.g=Gn([0,H,-4,Yt]);var x1=class extends f{constructor(t){super(t)}},O1=qt(class extends f{constructor(t){super(t)}},[0,j,[0,1,D,E,Ro],Yt]),ri=class extends f{constructor(t){super(t)}},I1=class extends f{constructor(t){super(t)}ra(){const t=no(this);return t??se()}},N1=class extends f{constructor(t){super(t)}},Go=[1,2],R1=qt(class extends f{constructor(t){super(t)}},[0,j,[0,Go,k,[0,ss],k,[0,Lo],D,E],Yt]),is=class extends f{constructor(t){super(t)}},jo=[0,E,D,H,K,-1],si=class extends f{constructor(t){super(t)}},C1=[0,I,-1],ii=class extends f{constructor(t){super(t)}},sn=[1,2,3,4,5],wn=class extends f{constructor(t){super(t)}g(){return no(this)!=null}h(){return Wt(zt(this,2))!=null}},O=class extends f{constructor(t){super(t)}g(){return Xi(zt(this,2))??!1}},Vo=[0,Lo,E,[0,D,Yt,-1],[0,_1,Yt]],G=[0,Vo,I,[0,sn,k,Oo,k,Mo,k,Fo,k,xo,k,Po],bt],Vn=class extends f{constructor(t){super(t)}},os=[0,G,H,-1,D],D1=Et(502141897,Vn);F[502141897]=os,V[502141897]=1;var Ho=[0,Vo];F[512499200]=Ho;var Wo=[0,Ho];F[515723506]=Wo;var B1=qt(class extends f{constructor(t){super(t)}},[0,[0,bt,-1,y1,b1],P1]),zo=[0,G];F[508981768]=zo;var Ko=class extends f{constructor(t){super(t)}},Xo=class extends f{constructor(t){super(t)}},as=[0,G,H,zo,I],Yo=[0,G,os,as,H,Wo];F[508968149]=as;var U1=Et(508968150,Xo);F[508968150]=Yo,V[508968150]=1,V[508968149]=1;var $o=class extends f{constructor(t){super(t)}},G1=Et(513916220,$o);F[513916220]=[0,G,Yo,D],V[513916220]=1;var ae=class extends f{constructor(t){super(t)}h(){return w(this,is,2)}g(){S(this,2)}},qo=[0,G,jo];F[478825465]=qo,V[478825465]=1;var Jo=[0,G];F[478825422]=Jo;var j1=class extends f{constructor(t){super(t)}},Zo=class extends f{constructor(t){super(t)}},hs=class extends f{constructor(t){super(t)}},cs=class extends f{constructor(t){super(t)}},Qo=class extends f{constructor(t){super(t)}},ta=[0,G,Jo,qo,-1],ea=[0,G,H,D],us=[0,G,H],na=[0,G,ea,us,H],V1=[0,G,na,ta];F[463370452]=ta,F[464864288]=ea,F[474472470]=us;var H1=Et(462713202,cs);F[462713202]=na;var W1=Et(479097054,Qo);F[479097054]=V1,V[479097054]=1,V[463370452]=1,V[464864288]=1,V[462713202]=1,V[474472470]=1;var z1=class extends f{constructor(t){super(t)}},ra=class extends f{constructor(t){super(t)}},sa=class extends f{constructor(t){super(t)}},ia=class extends f{constructor(){super()}},br=[0,G,H,-1,D],Ar=[0,G,H,I];ia.prototype.g=Gn([0,G,us,[0,G],os,as,br,Ar]),F[514774813]=br,F[518928384]=Ar;var oa=class extends f{constructor(t){super(t)}},K1=Et(456383383,oa);F[456383383]=[0,G,jo],V[456383383]=1;var aa=class extends f{constructor(t){super(t)}},X1=Et(476348187,aa);F[476348187]=[0,G,C1],V[476348187]=1;var ha=class extends f{constructor(t){super(t)}},oi=class extends f{constructor(t){super(t)}},ca=[0,bt,-1],Y1=Et(458105876,class extends f{constructor(t){super(t)}g(){var t=this.u;const e=A(t),n=2&e;return t=function(r,s,i){var o=oi;const h=2&s;let a=!1;if(i==null){if(h)return js();i=[]}else if(i.constructor===mt){if(!(2&i.M)||h)return i;i=i.Z()}else Array.isArray(i)?a=!!(2&U(i)):i=[];if(h){if(!i.length)return js();a||(a=!0,Ae(i))}else a&&(a=!1,i=io(i));return a||(64&U(i)?un(i,32):32&s&&En(i,32)),x(r,s,2,o=new mt(i,o,Ja,void 0)),o}(t,e,xt(t,e,2)),!n&&oi&&(t.va=!0),t}});F[458105876]=[0,ca,m1,[!0,Yt,[0,E,-1,K]]],V[458105876]=1;var ls=class extends f{constructor(t){super(t)}},ua=Et(458105758,ls);F[458105758]=[0,G,E,ca],V[458105758]=1;var la=class extends f{constructor(t){super(t)}},$1=Et(443442058,la);F[443442058]=[0,G,E,D,H,K,-1],V[443442058]=1,V[514774813]=1;var fa=class extends f{constructor(t){super(t)}},q1=Et(516587230,fa);function Er(t,e){return e=e?e.clone():new is,t.displayNamesLocale!==void 0?S(e,1,ke(t.displayNamesLocale)):t.displayNamesLocale===void 0&&S(e,1),t.maxResults!==void 0?Pt(e,2,t.maxResults):"maxResults"in t&&S(e,2),t.scoreThreshold!==void 0?d(e,3,t.scoreThreshold):"scoreThreshold"in t&&S(e,3),t.categoryAllowlist!==void 0?_n(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&S(e,4),t.categoryDenylist!==void 0?_n(e,5,t.categoryDenylist):"categoryDenylist"in t&&S(e,5),e}function fs(t,e=-1,n=""){return{categories:t.map(r=>({index:wt(gt(r,1),0)??-1,score:B(r,2)??0,categoryName:Mt(r,3)??"",displayName:Mt(r,4)??""})),headIndex:e,headName:n}}function da(t){var o,h;var e=Qt(t,3,$t,Zt()),n=Qt(t,2,Ee,Zt()),r=Qt(t,1,Wt,Zt()),s=Qt(t,9,Wt,Zt());const i={categories:[],keypoints:[]};for(let a=0;a<e.length;a++)i.categories.push({score:e[a],index:n[a]??-1,categoryName:r[a]??"",displayName:s[a]??""});if((e=(o=w(t,or,4))==null?void 0:o.h())&&(i.boundingBox={originX:gt(e,1)??0,originY:gt(e,2)??0,width:gt(e,3)??0,height:gt(e,4)??0,angle:0}),(h=w(t,or,4))==null?void 0:h.g().length)for(const a of w(t,or,4).g())i.keypoints.push({x:nn(a,1)??0,y:nn(a,2)??0,score:nn(a,4)??0,label:Wt(zt(a,3))??""});return i}function Hn(t){const e=[];for(const n of Bt(t,Bo,1))e.push({x:B(n,1)??0,y:B(n,2)??0,z:B(n,3)??0,visibility:B(n,4)??0});return e}function Be(t){const e=[];for(const n of Bt(t,Do,1))e.push({x:B(n,1)??0,y:B(n,2)??0,z:B(n,3)??0,visibility:B(n,4)??0});return e}function ai(t){return Array.from(t,e=>e>127?e-256:e)}function hi(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,s=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i],r+=t[i]*t[i],s+=e[i]*e[i];if(r<=0||s<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*s)}let Ze;F[516587230]=[0,G,br,Ar,H],V[516587230]=1,V[518928384]=1;const J1=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 pa(){if(Ze===void 0)try{await WebAssembly.instantiate(J1),Ze=!0}catch{Ze=!1}return Ze}async function Oe(t,e=""){const n=await pa()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var he=class{};function ga(){var t=navigator;return typeof OffscreenCanvas<"u"&&(!function(e=navigator){return(e=e.userAgent).includes("Safari")&&!e.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function ci(t){if(typeof importScripts!="function"){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((n,r)=>{e.addEventListener("load",()=>{n()},!1),e.addEventListener("error",s=>{r(s)},!1),document.body.appendChild(e)})}importScripts(t.toString())}function ma(t){return t.videoWidth!==void 0?[t.videoWidth,t.videoHeight]:t.naturalWidth!==void 0?[t.naturalWidth,t.naturalHeight]:t.displayWidth!==void 0?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function p(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function ui(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[r,s]=ma(e);return!t.l||r===t.i.canvas.width&&s===t.i.canvas.height||(t.i.canvas.width=r,t.i.canvas.height=s),[r,s]}function li(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let s=0;s<e.length;s++)r[s]=t.i.stringToNewUTF8(e[s]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const s of r)t.i._free(s);t.i._free(e)}function Tt(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Gt(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(s,i,o)=>{i?(n(r,o),r=[]):r.push(s)}}he.forVisionTasks=function(t){return Oe("vision",t)},he.forTextTasks=function(t){return Oe("text",t)},he.forGenAiExperimentalTasks=function(t){return Oe("genai_experimental",t)},he.forGenAiTasks=function(t){return Oe("genai",t)},he.forAudioTasks=function(t){return Oe("audio",t)},he.isSimdSupported=function(){return pa()};async function Z1(t,e,n,r){return t=await(async(s,i,o,h,a)=>{if(i&&await ci(i),!self.ModuleFactory||o&&(await ci(o),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&a&&((i=self.Module).locateFile=a.locateFile,a.mainScriptUrlOrBlob&&(i.mainScriptUrlOrBlob=a.mainScriptUrlOrBlob)),a=await self.ModuleFactory(self.Module||a),self.ModuleFactory=self.Module=void 0,new s(a,h)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:s=>s.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&s.endsWith(".data")?n.assetBinaryPath.toString():s}),await t.o(r),t}function ar(t,e){const n=w(t.baseOptions,wn,1)||new wn;typeof e=="string"?(S(n,2,ke(e)),S(n,1)):e instanceof Uint8Array&&(S(n,1,Nr(e,!1,!1)),S(n,2)),m(t.baseOptions,0,1,n)}function fi(t){try{const e=t.H.length;if(e===1)throw Error(t.H[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.H.map(n=>n.message).join(", "))}finally{t.H=[]}}function l(t,e){t.B=Math.max(t.B,e)}function Wn(t,e){t.A=new $,ht(t.A,"PassThroughCalculator"),L(t.A,"free_memory"),_(t.A,"free_memory_unused_out"),M(e,"free_memory"),ct(e,t.A)}function ye(t,e){L(t.A,e),_(t.A,e+"_unused_out")}function zn(t){t.g.addBoolToStream(!0,"free_memory",t.B)}var on=class{constructor(t){this.g=t,this.H=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){var n,r,s,i,o,h;if(e){const a=t.baseOptions||{};if((n=t.baseOptions)!=null&&n.modelAssetBuffer&&((r=t.baseOptions)!=null&&r.modelAssetPath))throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((s=w(this.baseOptions,wn,1))!=null&&s.g()||(i=w(this.baseOptions,wn,1))!=null&&i.h()||(o=t.baseOptions)!=null&&o.modelAssetBuffer||(h=t.baseOptions)!=null&&h.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(c,u){let g=w(c.baseOptions,ii,3);if(!g){var v=g=new ii,ut=new Qs;Re(v,4,sn,ut)}"delegate"in u&&(u.delegate==="GPU"?(u=g,v=new E1,Re(u,2,sn,v)):(u=g,v=new Qs,Re(u,4,sn,v))),m(c.baseOptions,0,3,g)}(this,a),a.modelAssetPath)return fetch(a.modelAssetPath.toString()).then(c=>{if(c.ok)return c.arrayBuffer();throw Error(`Failed to fetch model: ${a.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),ar(this,"/model.dat"),this.m(),this.J()});if(a.modelAssetBuffer instanceof Uint8Array)ar(this,a.modelAssetBuffer);else if(a.modelAssetBuffer)return async function(c){const u=[];for(var g=0;;){const{done:v,value:ut}=await c.read();if(v)break;u.push(ut),g+=ut.length}if(u.length===0)return new Uint8Array(0);if(u.length===1)return u[0];c=new Uint8Array(g),g=0;for(const v of u)c.set(v,g),g+=v.length;return c}(a.modelAssetBuffer).then(c=>{ar(this,c),this.m(),this.J()})}return this.m(),this.J(),Promise.resolve()}J(){}ga(){let t;if(this.g.ga(e=>{t=T1(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener((n,r)=>{this.H.push(Error(r))}),this.g.Oa(),this.g.setGraph(t,e),this.A=void 0,fi(this)}finishProcessing(){this.g.finishProcessing(),fi(this)}close(){this.A=void 0,this.g.closeGraph()}};function Dt(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}on.prototype.close=on.prototype.close,function(t,e){t=t.split(".");var n,r=re;for((t[0]in r)||r.execScript===void 0||r.execScript("var "+t[0]);t.length&&(n=t.shift());)t.length||e===void 0?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=e}("TaskRunner",on);class Q1{constructor(e,n,r,s){this.g=e,this.h=n,this.m=r,this.l=s}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function di(t,e,n){const r=t.g;if(n=Dt(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.h,n),n}function pi(t,e){const n=t.g,r=Dt(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const s=Dt(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.R),n.vertexAttribPointer(t.R,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=Dt(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.J),n.vertexAttribPointer(t.J,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[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 Q1(n,r,s,i)}function ds(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function ps(t,e,n,r){return ds(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=pi(t,!0)),n=t.s):(t.v||(t.v=pi(t,!1)),n=t.v),e.useProgram(t.h),n.bind(),t.l(),t=r(),n.g.bindVertexArray(null),t}function Kn(t,e,n){return ds(t,e),t=Dt(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function Xn(t,e,n){ds(t,e),t.A||(t.A=Dt(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.A),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function gs(t){var e;(e=t.g)==null||e.bindFramebuffer(t.g.FRAMEBUFFER,null)}var ms=class{H(){return`
2
+ precision mediump float;
3
+ varying vec2 vTex;
4
+ uniform sampler2D inputTexture;
5
+ void main() {
6
+ gl_FragColor = texture2D(inputTexture, vTex);
7
+ }
8
+ `}m(){const t=this.g;if(this.h=Dt(t.createProgram(),"Failed to create WebGL program"),this.da=di(this,`
9
+ attribute vec2 aVertex;
10
+ attribute vec2 aTex;
11
+ varying vec2 vTex;
12
+ void main(void) {
13
+ gl_Position = vec4(aVertex, 0.0, 1.0);
14
+ vTex = aTex;
15
+ }`,t.VERTEX_SHADER),this.ca=di(this,this.H(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.R=t.getAttribLocation(this.h,"aVertex"),this.J=t.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.da),t.deleteShader(this.ca)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}};function Rt(t,e){switch(e){case 0:return t.g.find(n=>n instanceof Uint8Array);case 1:return t.g.find(n=>n instanceof Float32Array);case 2:return t.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function kr(t){var e=Rt(t,1);if(!e){if(e=Rt(t,0))e=new Float32Array(e).map(r=>r/255);else{e=new Float32Array(t.width*t.height);const r=_e(t);var n=ys(t);if(Xn(n,r,ya(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in self.document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let s=0,i=0;s<e.length;++s,i+=4)e[s]=n[i]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function ya(t){let e=Rt(t,2);if(!e){const n=_e(t);e=va(t);const r=kr(t),s=_a(t);n.texImage2D(n.TEXTURE_2D,0,s,t.width,t.height,0,n.RED,n.FLOAT,r),Tr(t)}return e}function _e(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Dt(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function _a(t){if(t=_e(t),!Qe)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Qe=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Qe=t.R16F}return Qe}function ys(t){return t.l||(t.l=new ms),t.l}function va(t){const e=_e(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Rt(t,2);return n||(n=Kn(ys(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Tr(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var Qe,W=class{constructor(t,e,n,r,s,i,o){this.g=t,this.m=e,this.j=n,this.canvas=r,this.l=s,this.width=i,this.height=o,this.j&&--gi===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Ja(){return!!Rt(this,0)}ma(){return!!Rt(this,1)}S(){return!!Rt(this,2)}la(){return(e=Rt(t=this,0))||(e=kr(t),e=new Uint8Array(e.map(n=>255*n)),t.g.push(e)),e;var t,e}ka(){return kr(this)}N(){return ya(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const r=_e(this),s=ys(this);r.activeTexture(r.TEXTURE1),n=Kn(s,r,this.m?r.LINEAR:r.NEAREST),r.bindTexture(r.TEXTURE_2D,n);const i=_a(this);r.texImage2D(r.TEXTURE_2D,0,i,this.width,this.height,0,r.RED,r.FLOAT,null),r.bindTexture(r.TEXTURE_2D,null),Xn(s,r,n),ps(s,r,!1,()=>{va(this),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.drawArrays(r.TRIANGLE_FAN,0,4),Tr(this)}),gs(s),Tr(this)}}t.push(n)}return new W(t,this.m,this.S(),this.canvas,this.l,this.width,this.height)}close(){this.j&&_e(this).deleteTexture(Rt(this,2)),gi=-1}};W.prototype.close=W.prototype.close,W.prototype.clone=W.prototype.clone,W.prototype.getAsWebGLTexture=W.prototype.N,W.prototype.getAsFloat32Array=W.prototype.ka,W.prototype.getAsUint8Array=W.prototype.la,W.prototype.hasWebGLTexture=W.prototype.S,W.prototype.hasFloat32Array=W.prototype.ma,W.prototype.hasUint8Array=W.prototype.Ja;var gi=250;function Ft(t,e){switch(e){case 0:return t.g.find(n=>n instanceof ImageData);case 1:return t.g.find(n=>typeof ImageBitmap<"u"&&n instanceof ImageBitmap);case 2:return t.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function wa(t){var e=Ft(t,0);if(!e){e=ve(t);const n=Yn(t),r=new Uint8Array(t.width*t.height*4);Xn(n,e,an(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),gs(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function an(t){let e=Ft(t,2);if(!e){const n=ve(t);e=hn(t);const r=Ft(t,1)||wa(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Ne(t)}return e}function ve(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return t.h||(t.h=Dt(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Yn(t){return t.l||(t.l=new ms),t.l}function hn(t){const e=ve(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ft(t,2);return n||(n=Kn(Yn(t),e),t.g.push(n),t.m=!0),e.bindTexture(e.TEXTURE_2D,n),n}function Ne(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function mi(t){const e=ve(t);return ps(Yn(t),e,!0,()=>function(n,r){const s=n.canvas;if(s.width===n.width&&s.height===n.height)return r();const i=s.width,o=s.height;return s.width=n.width,s.height=n.height,n=r(),s.width=i,s.height=o,n}(t,()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))}var z=class{constructor(t,e,n,r,s,i,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=s,this.width=i,this.height=o,(this.j||this.m)&&--yi===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ia(){return!!Ft(this,0)}na(){return!!Ft(this,1)}S(){return!!Ft(this,2)}Ga(){return wa(this)}Fa(){var t=Ft(this,1);return t||(an(this),hn(this),t=mi(this),Ne(this),this.g.push(t),this.j=!0),t}N(){return an(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const r=ve(this),s=Yn(this);r.activeTexture(r.TEXTURE1),n=Kn(s,r),r.bindTexture(r.TEXTURE_2D,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,this.width,this.height,0,r.RGBA,r.UNSIGNED_BYTE,null),r.bindTexture(r.TEXTURE_2D,null),Xn(s,r,n),ps(s,r,!1,()=>{hn(this),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.drawArrays(r.TRIANGLE_FAN,0,4),Ne(this)}),gs(s),Ne(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);an(this),hn(this),n=mi(this),Ne(this)}t.push(n)}return new z(t,this.na(),this.S(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ft(this,1).close(),this.m&&ve(this).deleteTexture(Ft(this,2)),yi=-1}};z.prototype.close=z.prototype.close,z.prototype.clone=z.prototype.clone,z.prototype.getAsWebGLTexture=z.prototype.N,z.prototype.getAsImageBitmap=z.prototype.Fa,z.prototype.getAsImageData=z.prototype.Ga,z.prototype.hasWebGLTexture=z.prototype.S,z.prototype.hasImageBitmap=z.prototype.na,z.prototype.hasImageData=z.prototype.Ia;var yi=250;function kt(...t){return t.map(([e,n])=>({start:e,end:n}))}const t2=function(t){return class extends t{Oa(){this.i._registerModelResourcesGraphService()}}}((_i=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",e!==void 0?this.i.canvas=e:ga()?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(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph(new TextEncoder().encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,s){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),p(this,r||"input_audio",i=>{p(this,s=s||"audio_header",o=>{this.i._configureAudio(i,o,t,e,n)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ga(t){Tt(this,"__graph_config__",e=>{t(e)}),p(this,"__graph_config__",e=>{this.i._getGraphConfig(e,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,s){const i=4*t.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(t,this.g/4),p(this,r,o=>{this.i._addAudioToInputStream(this.g,e,n,o,s)})}addGpuBufferToStream(t,e,n){p(this,e,r=>{const[s,i]=ui(this,t,r);this.i._addBoundTextureToStream(r,s,i,n)})}addBoolToStream(t,e,n){p(this,e,r=>{this.i._addBoolToInputStream(t,r,n)})}addDoubleToStream(t,e,n){p(this,e,r=>{this.i._addDoubleToInputStream(t,r,n)})}addFloatToStream(t,e,n){p(this,e,r=>{this.i._addFloatToInputStream(t,r,n)})}addIntToStream(t,e,n){p(this,e,r=>{this.i._addIntToInputStream(t,r,n)})}addUintToStream(t,e,n){p(this,e,r=>{this.i._addUintToInputStream(t,r,n)})}addStringToStream(t,e,n){p(this,e,r=>{p(this,t,s=>{this.i._addStringToInputStream(s,r,n)})})}addStringRecordToStream(t,e,n){p(this,e,r=>{li(this,Object.keys(t),s=>{li(this,Object.values(t),i=>{this.i._addFlatHashMapToInputStream(s,i,Object.keys(t).length,r,n)})})})}addProtoToStream(t,e,n,r){p(this,n,s=>{p(this,e,i=>{const o=this.i._malloc(t.length);this.i.HEAPU8.set(t,o),this.i._addProtoToInputStream(o,t.length,i,s,r),this.i._free(o)})})}addEmptyPacketToStream(t,e){p(this,t,n=>{this.i._addEmptyPacketToInputStream(n,e)})}addBoolVectorToStream(t,e,n){p(this,e,r=>{const s=this.i._allocateBoolVector(t.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const i of t)this.i._addBoolVectorEntry(s,i);this.i._addBoolVectorToInputStream(s,r,n)})}addDoubleVectorToStream(t,e,n){p(this,e,r=>{const s=this.i._allocateDoubleVector(t.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const i of t)this.i._addDoubleVectorEntry(s,i);this.i._addDoubleVectorToInputStream(s,r,n)})}addFloatVectorToStream(t,e,n){p(this,e,r=>{const s=this.i._allocateFloatVector(t.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const i of t)this.i._addFloatVectorEntry(s,i);this.i._addFloatVectorToInputStream(s,r,n)})}addIntVectorToStream(t,e,n){p(this,e,r=>{const s=this.i._allocateIntVector(t.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const i of t)this.i._addIntVectorEntry(s,i);this.i._addIntVectorToInputStream(s,r,n)})}addUintVectorToStream(t,e,n){p(this,e,r=>{const s=this.i._allocateUintVector(t.length);if(!s)throw Error("Unable to allocate new unsigned int vector on heap.");for(const i of t)this.i._addUintVectorEntry(s,i);this.i._addUintVectorToInputStream(s,r,n)})}addStringVectorToStream(t,e,n){p(this,e,r=>{const s=this.i._allocateStringVector(t.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const i of t)p(this,i,o=>{this.i._addStringVectorEntry(s,o)});this.i._addStringVectorToInputStream(s,r,n)})}addBoolToInputSidePacket(t,e){p(this,e,n=>{this.i._addBoolToInputSidePacket(t,n)})}addDoubleToInputSidePacket(t,e){p(this,e,n=>{this.i._addDoubleToInputSidePacket(t,n)})}addFloatToInputSidePacket(t,e){p(this,e,n=>{this.i._addFloatToInputSidePacket(t,n)})}addIntToInputSidePacket(t,e){p(this,e,n=>{this.i._addIntToInputSidePacket(t,n)})}addUintToInputSidePacket(t,e){p(this,e,n=>{this.i._addUintToInputSidePacket(t,n)})}addStringToInputSidePacket(t,e){p(this,e,n=>{p(this,t,r=>{this.i._addStringToInputSidePacket(r,n)})})}addProtoToInputSidePacket(t,e,n){p(this,n,r=>{p(this,e,s=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputSidePacket(i,t.length,s,r),this.i._free(i)})})}addBoolVectorToInputSidePacket(t,e){p(this,e,n=>{const r=this.i._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const s of t)this.i._addBoolVectorEntry(r,s);this.i._addBoolVectorToInputSidePacket(r,n)})}addDoubleVectorToInputSidePacket(t,e){p(this,e,n=>{const r=this.i._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const s of t)this.i._addDoubleVectorEntry(r,s);this.i._addDoubleVectorToInputSidePacket(r,n)})}addFloatVectorToInputSidePacket(t,e){p(this,e,n=>{const r=this.i._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const s of t)this.i._addFloatVectorEntry(r,s);this.i._addFloatVectorToInputSidePacket(r,n)})}addIntVectorToInputSidePacket(t,e){p(this,e,n=>{const r=this.i._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const s of t)this.i._addIntVectorEntry(r,s);this.i._addIntVectorToInputSidePacket(r,n)})}addUintVectorToInputSidePacket(t,e){p(this,e,n=>{const r=this.i._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const s of t)this.i._addUintVectorEntry(r,s);this.i._addUintVectorToInputSidePacket(r,n)})}addStringVectorToInputSidePacket(t,e){p(this,e,n=>{const r=this.i._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const s of t)p(this,s,i=>{this.i._addStringVectorEntry(r,i)});this.i._addStringVectorToInputSidePacket(r,n)})}attachBoolListener(t,e){Tt(this,t,e),p(this,t,n=>{this.i._attachBoolListener(n)})}attachBoolVectorListener(t,e){Gt(this,t,e),p(this,t,n=>{this.i._attachBoolVectorListener(n)})}attachIntListener(t,e){Tt(this,t,e),p(this,t,n=>{this.i._attachIntListener(n)})}attachIntVectorListener(t,e){Gt(this,t,e),p(this,t,n=>{this.i._attachIntVectorListener(n)})}attachUintListener(t,e){Tt(this,t,e),p(this,t,n=>{this.i._attachUintListener(n)})}attachUintVectorListener(t,e){Gt(this,t,e),p(this,t,n=>{this.i._attachUintVectorListener(n)})}attachDoubleListener(t,e){Tt(this,t,e),p(this,t,n=>{this.i._attachDoubleListener(n)})}attachDoubleVectorListener(t,e){Gt(this,t,e),p(this,t,n=>{this.i._attachDoubleVectorListener(n)})}attachFloatListener(t,e){Tt(this,t,e),p(this,t,n=>{this.i._attachFloatListener(n)})}attachFloatVectorListener(t,e){Gt(this,t,e),p(this,t,n=>{this.i._attachFloatVectorListener(n)})}attachStringListener(t,e){Tt(this,t,e),p(this,t,n=>{this.i._attachStringListener(n)})}attachStringVectorListener(t,e){Gt(this,t,e),p(this,t,n=>{this.i._attachStringVectorListener(n)})}attachProtoListener(t,e,n){Tt(this,t,e),p(this,t,r=>{this.i._attachProtoListener(r,n||!1)})}attachProtoVectorListener(t,e,n){Gt(this,t,e),p(this,t,r=>{this.i._attachProtoVectorListener(r,n||!1)})}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Tt(this,t,(r,s)=>{r=new Float32Array(r.buffer,r.byteOffset,r.length/4),e(r,s)}),p(this,t,r=>{this.i._attachAudioListener(r,n||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends _i{get ia(){return this.i}ta(t,e,n){p(this,e,r=>{const[s,i]=ui(this,t,r);this.ia._addBoundTextureAsImageToStream(r,s,i,n)})}W(t,e){Tt(this,t,e),p(this,t,n=>{this.ia._attachImageListener(n)})}fa(t,e){Gt(this,t,e),p(this,t,n=>{this.ia._attachImageVectorListener(n)})}}));var _i,_t=class extends t2{};async function y(t,e,n){return async function(r,s,i,o){return Z1(r,s,i,o)}(t,n.canvas??(ga()?void 0:document.createElement("canvas")),e,n)}function ba(t,e,n,r){if(t.V){const i=new Uo;if(n!=null&&n.regionOfInterest){if(!t.sa)throw Error("This task doesn't support region-of-interest.");var s=n.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(s.left<0||s.top<0||s.right>1||s.bottom>1)throw Error("Expected RectF values to be in [0,1].");d(i,1,(s.left+s.right)/2),d(i,2,(s.top+s.bottom)/2),d(i,4,s.right-s.left),d(i,3,s.bottom-s.top)}else d(i,1,.5),d(i,2,.5),d(i,4,1),d(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(d(i,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[o,h]=ma(e);n=B(i,3)*h/o,s=B(i,4)*o/h,d(i,4,n),d(i,3,s)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.V,r)}t.g.ta(e,t.da,r??performance.now()),t.finishProcessing()}function vt(t,e,n){var r;if((r=t.baseOptions)!=null&&r.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");ba(t,e,n,t.B+1)}function Ot(t,e,n,r){var s;if(!((s=t.baseOptions)!=null&&s.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");ba(t,e,n,r)}function we(t,e,n,r){var s=e.data;const i=e.width,o=i*(e=e.height);if((s instanceof Uint8Array||s instanceof Float32Array)&&s.length!==o)throw Error("Unsupported channel count: "+s.length/o);return t=new W([s],n,!1,t.g.i.canvas,t.R,i,e),r?t.clone():t}var J=class extends on{constructor(t,e,n,r){super(t),this.g=t,this.da=e,this.V=n,this.sa=r,this.R=new ms}l(t,e=!0){if("runningMode"in t&&je(this.baseOptions,2,!!t.runningMode&&t.runningMode!=="IMAGE"),t.canvas!==void 0&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.R.close(),super.close()}};J.prototype.close=J.prototype.close;var lt=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},m(t=this.h=new Vn,0,1,e=new O),d(this.h,2,.5),d(this.h,3,.3)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&d(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&d(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}D(t,e){return this.j={detections:[]},vt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Ot(this,t,n,e),this.j}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect_in"),b(t,"detections");const e=new at;At(e,D1,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect_in"),_(n,"DETECTIONS:detections"),n.o(e),ct(t,n),this.g.attachProtoVectorListener("detections",(r,s)=>{for(const i of r)r=Co(i),this.j.detections.push(da(r));l(this,s)}),this.g.attachEmptyPacketListener("detections",r=>{l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};lt.prototype.detectForVideo=lt.prototype.F,lt.prototype.detect=lt.prototype.D,lt.prototype.setOptions=lt.prototype.o,lt.createFromModelPath=async function(t,e){return y(lt,t,{baseOptions:{modelAssetPath:e}})},lt.createFromModelBuffer=function(t,e){return y(lt,t,{baseOptions:{modelAssetBuffer:e}})},lt.createFromOptions=function(t,e){return y(lt,t,e)};var _s=kt([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]),vs=kt([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]),ws=kt([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Aa=kt([474,475],[475,476],[476,477],[477,474]),bs=kt([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]),As=kt([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Ea=kt([469,470],[470,471],[471,472],[472,469]),Es=kt([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]),ka=[..._s,...vs,...ws,...bs,...As,...Es],Ta=kt([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 vi(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var R=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,m(t=this.h=new Xo,0,1,e=new O),this.v=new Ko,m(this.h,0,3,this.v),this.s=new Vn,m(this.h,0,2,this.s),Pt(this.s,4,1),d(this.s,2,.5),d(this.v,2,.5),d(this.h,4,.5)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return"numFaces"in t&&Pt(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&d(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&d(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&d(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return vi(this),vt(this,t,e),this.j}F(t,e,n){return vi(this),Ot(this,t,n,e),this.j}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect"),b(t,"face_landmarks");const e=new at;At(e,U1,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect"),_(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),ct(t,n),this.g.attachProtoVectorListener("face_landmarks",(r,s)=>{for(const i of r)r=Ye(i),this.j.faceLandmarks.push(Hn(r));l(this,s)}),this.g.attachEmptyPacketListener("face_landmarks",r=>{l(this,r)}),this.outputFaceBlendshapes&&(b(t,"blendshapes"),_(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(r,s)=>{if(this.outputFaceBlendshapes)for(const i of r)r=jn(i),this.j.faceBlendshapes.push(fs(r.g()??[]));l(this,s)}),this.g.attachEmptyPacketListener("blendshapes",r=>{l(this,r)})),this.outputFacialTransformationMatrixes&&(b(t,"face_geometry"),_(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(r,s)=>{if(this.outputFacialTransformationMatrixes)for(const i of r)(r=w(B1(i),M1,2))&&this.j.facialTransformationMatrixes.push({rows:wt(gt(r,1),0)??0,columns:wt(gt(r,2),0)??0,data:Qt(r,3,$t,Zt()).slice()??[]});l(this,s)}),this.g.attachEmptyPacketListener("face_geometry",r=>{l(this,r)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};R.prototype.detectForVideo=R.prototype.F,R.prototype.detect=R.prototype.D,R.prototype.setOptions=R.prototype.o,R.createFromModelPath=function(t,e){return y(R,t,{baseOptions:{modelAssetPath:e}})},R.createFromModelBuffer=function(t,e){return y(R,t,{baseOptions:{modelAssetBuffer:e}})},R.createFromOptions=function(t,e){return y(R,t,e)},R.FACE_LANDMARKS_LIPS=_s,R.FACE_LANDMARKS_LEFT_EYE=vs,R.FACE_LANDMARKS_LEFT_EYEBROW=ws,R.FACE_LANDMARKS_LEFT_IRIS=Aa,R.FACE_LANDMARKS_RIGHT_EYE=bs,R.FACE_LANDMARKS_RIGHT_EYEBROW=As,R.FACE_LANDMARKS_RIGHT_IRIS=Ea,R.FACE_LANDMARKS_FACE_OVAL=Es,R.FACE_LANDMARKS_CONTOURS=ka,R.FACE_LANDMARKS_TESSELATION=Ta;var St=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect",!0),m(t=this.j=new $o,0,1,e=new O)}get baseOptions(){return w(this.j,O,1)}set baseOptions(t){m(this.j,0,1,t)}o(t){return super.l(t)}Ra(t,e,n){const r=typeof e!="function"?e:{};if(this.h=typeof e=="function"?e:n,vt(this,t,r??{}),!this.h)return this.s}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect"),b(t,"stylized_image");const e=new at;At(e,G1,this.j);const n=new $;ht(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect"),_(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),ct(t,n),this.g.W("stylized_image",(r,s)=>{var i=!this.h,o=r.data,h=r.width;const a=h*(r=r.height);if(o instanceof Uint8Array)if(o.length===3*a){const c=new Uint8ClampedArray(4*a);for(let u=0;u<a;++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,h,r)}else{if(o.length!==4*a)throw Error("Unsupported channel count: "+o.length/a);o=new ImageData(new Uint8ClampedArray(o.buffer,o.byteOffset,o.length),h,r)}else if(!(o instanceof WebGLTexture))throw Error(`Unsupported format: ${o.constructor.name}`);h=new z([o],!1,!1,this.g.i.canvas,this.R,h,r),this.s=i=i?h.clone():h,this.h&&this.h(i),l(this,s)}),this.g.attachEmptyPacketListener("stylized_image",r=>{this.s=null,this.h&&this.h(null),l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};St.prototype.stylize=St.prototype.Ra,St.prototype.setOptions=St.prototype.o,St.createFromModelPath=function(t,e){return y(St,t,{baseOptions:{modelAssetPath:e}})},St.createFromModelBuffer=function(t,e){return y(St,t,{baseOptions:{modelAssetBuffer:e}})},St.createFromOptions=function(t,e){return y(St,t,e)};var ks=kt([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 wi(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function bi(t){return t.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Ai(t,e=!0){const n=[];for(const s of t){var r=jn(s);t=[];for(const i of r.g())r=e&&gt(i,1)!=null?wt(gt(i,1),0):-1,t.push({score:B(i,2)??0,index:r,categoryName:Mt(i,3)??"",displayName:Mt(i,4)??""});n.push(t)}return n}var et=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],m(t=this.j=new Qo,0,1,e=new O),this.s=new cs,m(this.j,0,2,this.s),this.C=new hs,m(this.s,0,3,this.C),this.v=new Zo,m(this.s,0,2,this.v),this.h=new j1,m(this.j,0,3,this.h),d(this.v,2,.5),d(this.s,4,.5),d(this.C,2,.5)}get baseOptions(){return w(this.j,O,1)}set baseOptions(t){m(this.j,0,1,t)}o(t){var s,i,o,h;if(Pt(this.v,3,t.numHands??1),"minHandDetectionConfidence"in t&&d(this.v,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&d(this.s,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&d(this.C,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new ae,n=e,r=Er(t.cannedGesturesClassifierOptions,(s=w(this.h,ae,3))==null?void 0:s.h());m(n,0,2,r),m(this.h,0,3,e)}else t.cannedGesturesClassifierOptions===void 0&&((i=w(this.h,ae,3))==null||i.g());return t.customGesturesClassifierOptions?(m(n=e=new ae,0,2,r=Er(t.customGesturesClassifierOptions,(o=w(this.h,ae,4))==null?void 0:o.h())),m(this.h,0,4,e)):t.customGesturesClassifierOptions===void 0&&((h=w(this.h,ae,4))==null||h.g()),this.l(t)}Ma(t,e){return wi(this),vt(this,t,e),bi(this)}Na(t,e,n){return wi(this),Ot(this,t,n,e),bi(this)}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect"),b(t,"hand_gestures"),b(t,"hand_landmarks"),b(t,"world_hand_landmarks"),b(t,"handedness");const e=new at;At(e,W1,this.j);const n=new $;ht(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect"),_(n,"HAND_GESTURES:hand_gestures"),_(n,"LANDMARKS:hand_landmarks"),_(n,"WORLD_LANDMARKS:world_hand_landmarks"),_(n,"HANDEDNESS:handedness"),n.o(e),ct(t,n),this.g.attachProtoVectorListener("hand_landmarks",(r,s)=>{for(const i of r){r=Ye(i);const o=[];for(const h of Bt(r,Bo,1))o.push({x:B(h,1)??0,y:B(h,2)??0,z:B(h,3)??0,visibility:B(h,4)??0});this.landmarks.push(o)}l(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",r=>{l(this,r)}),this.g.attachProtoVectorListener("world_hand_landmarks",(r,s)=>{for(const i of r){r=fe(i);const o=[];for(const h of Bt(r,Do,1))o.push({x:B(h,1)??0,y:B(h,2)??0,z:B(h,3)??0,visibility:B(h,4)??0});this.worldLandmarks.push(o)}l(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",r=>{l(this,r)}),this.g.attachProtoVectorListener("hand_gestures",(r,s)=>{this.gestures.push(...Ai(r,!1)),l(this,s)}),this.g.attachEmptyPacketListener("hand_gestures",r=>{l(this,r)}),this.g.attachProtoVectorListener("handedness",(r,s)=>{this.handedness.push(...Ai(r)),l(this,s)}),this.g.attachEmptyPacketListener("handedness",r=>{l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Ei(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}et.prototype.recognizeForVideo=et.prototype.Na,et.prototype.recognize=et.prototype.Ma,et.prototype.setOptions=et.prototype.o,et.createFromModelPath=function(t,e){return y(et,t,{baseOptions:{modelAssetPath:e}})},et.createFromModelBuffer=function(t,e){return y(et,t,{baseOptions:{modelAssetBuffer:e}})},et.createFromOptions=function(t,e){return y(et,t,e)},et.HAND_CONNECTIONS=ks;var nt=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],m(t=this.h=new cs,0,1,e=new O),this.s=new hs,m(this.h,0,3,this.s),this.j=new Zo,m(this.h,0,2,this.j),Pt(this.j,3,1),d(this.j,2,.5),d(this.s,2,.5),d(this.h,4,.5)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return"numHands"in t&&Pt(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&d(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&d(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&d(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],vt(this,t,e),Ei(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Ot(this,t,n,e),Ei(this)}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect"),b(t,"hand_landmarks"),b(t,"world_hand_landmarks"),b(t,"handedness");const e=new at;At(e,H1,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect"),_(n,"LANDMARKS:hand_landmarks"),_(n,"WORLD_LANDMARKS:world_hand_landmarks"),_(n,"HANDEDNESS:handedness"),n.o(e),ct(t,n),this.g.attachProtoVectorListener("hand_landmarks",(r,s)=>{for(const i of r)r=Ye(i),this.landmarks.push(Hn(r));l(this,s)}),this.g.attachEmptyPacketListener("hand_landmarks",r=>{l(this,r)}),this.g.attachProtoVectorListener("world_hand_landmarks",(r,s)=>{for(const i of r)r=fe(i),this.worldLandmarks.push(Be(r));l(this,s)}),this.g.attachEmptyPacketListener("world_hand_landmarks",r=>{l(this,r)}),this.g.attachProtoVectorListener("handedness",(r,s)=>{var i=this.handedness,o=i.push;const h=[];for(const a of r){r=jn(a);const c=[];for(const u of r.g())c.push({score:B(u,2)??0,index:wt(gt(u,1),0)??-1,categoryName:Mt(u,3)??"",displayName:Mt(u,4)??""});h.push(c)}o.call(i,...h),l(this,s)}),this.g.attachEmptyPacketListener("handedness",r=>{l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};nt.prototype.detectForVideo=nt.prototype.F,nt.prototype.detect=nt.prototype.D,nt.prototype.setOptions=nt.prototype.o,nt.createFromModelPath=function(t,e){return y(nt,t,{baseOptions:{modelAssetPath:e}})},nt.createFromModelBuffer=function(t,e){return y(nt,t,{baseOptions:{modelAssetBuffer:e}})},nt.createFromOptions=function(t,e){return y(nt,t,e)},nt.HAND_CONNECTIONS=ks;var Sa=kt([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 ki(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Ti(t){try{if(!t.C)return t.h;t.C(t.h)}finally{zn(t)}}function tn(t,e){t=Ye(t),e.push(Hn(t))}var P=class extends J{constructor(t,e){super(new _t(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,m(t=this.j=new ia,0,1,e=new O),this.K=new hs,m(this.j,0,2,this.K),this.ca=new z1,m(this.j,0,3,this.ca),this.s=new Vn,m(this.j,0,4,this.s),this.I=new Ko,m(this.j,0,5,this.I),this.v=new ra,m(this.j,0,6,this.v),this.L=new sa,m(this.j,0,7,this.L),d(this.s,2,.5),d(this.s,3,.3),d(this.I,2,.5),d(this.v,2,.5),d(this.v,3,.3),d(this.L,2,.5),d(this.K,2,.5)}get baseOptions(){return w(this.j,O,1)}set baseOptions(t){m(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&d(this.s,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&d(this.s,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&d(this.I,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&d(this.v,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&d(this.v,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&d(this.L,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&d(this.K,2,t.minHandLandmarksConfidence??.5),this.l(t)}D(t,e,n){const r=typeof e!="function"?e:{};return this.C=typeof e=="function"?e:n,ki(this),vt(this,t,r),Ti(this)}F(t,e,n,r){const s=typeof n!="function"?n:{};return this.C=typeof n=="function"?n:r,ki(this),Ot(this,t,s,e),Ti(this)}m(){var t=new tt;M(t,"input_frames_image"),b(t,"pose_landmarks"),b(t,"pose_world_landmarks"),b(t,"face_landmarks"),b(t,"left_hand_landmarks"),b(t,"left_hand_world_landmarks"),b(t,"right_hand_landmarks"),b(t,"right_hand_world_landmarks");const e=new at,n=new Js;pr(n,1,ke("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(s,i){if(i!=null)if(Array.isArray(i))S(s,2,Pn(i,Wr,void 0,void 0,!1));else{if(!(typeof i=="string"||i instanceof Ct||He(i)))throw Error("invalid value in Any.value field: "+i+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");pr(s,2,Nr(i,!1,!1),se())}}(n,this.j.g());const r=new $;ht(r,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),yn(r,8,Js,n),L(r,"IMAGE:input_frames_image"),_(r,"POSE_LANDMARKS:pose_landmarks"),_(r,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),_(r,"FACE_LANDMARKS:face_landmarks"),_(r,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),_(r,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),_(r,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),_(r,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),r.o(e),ct(t,r),Wn(this,t),this.g.attachProtoListener("pose_landmarks",(s,i)=>{tn(s,this.h.poseLandmarks),l(this,i)}),this.g.attachEmptyPacketListener("pose_landmarks",s=>{l(this,s)}),this.g.attachProtoListener("pose_world_landmarks",(s,i)=>{var o=this.h.poseWorldLandmarks;s=fe(s),o.push(Be(s)),l(this,i)}),this.g.attachEmptyPacketListener("pose_world_landmarks",s=>{l(this,s)}),this.outputPoseSegmentationMasks&&(_(r,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),ye(this,"pose_segmentation_mask"),this.g.W("pose_segmentation_mask",(s,i)=>{this.h.poseSegmentationMasks=[we(this,s,!0,!this.C)],l(this,i)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",s=>{this.h.poseSegmentationMasks=[],l(this,s)})),this.g.attachProtoListener("face_landmarks",(s,i)=>{tn(s,this.h.faceLandmarks),l(this,i)}),this.g.attachEmptyPacketListener("face_landmarks",s=>{l(this,s)}),this.outputFaceBlendshapes&&(b(t,"extra_blendshapes"),_(r,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(s,i)=>{var o=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(s=jn(s),o.push(fs(s.g()??[]))),l(this,i)}),this.g.attachEmptyPacketListener("extra_blendshapes",s=>{l(this,s)})),this.g.attachProtoListener("left_hand_landmarks",(s,i)=>{tn(s,this.h.leftHandLandmarks),l(this,i)}),this.g.attachEmptyPacketListener("left_hand_landmarks",s=>{l(this,s)}),this.g.attachProtoListener("left_hand_world_landmarks",(s,i)=>{var o=this.h.leftHandWorldLandmarks;s=fe(s),o.push(Be(s)),l(this,i)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",s=>{l(this,s)}),this.g.attachProtoListener("right_hand_landmarks",(s,i)=>{tn(s,this.h.rightHandLandmarks),l(this,i)}),this.g.attachEmptyPacketListener("right_hand_landmarks",s=>{l(this,s)}),this.g.attachProtoListener("right_hand_world_landmarks",(s,i)=>{var o=this.h.rightHandWorldLandmarks;s=fe(s),o.push(Be(s)),l(this,i)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",s=>{l(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};P.prototype.detectForVideo=P.prototype.F,P.prototype.detect=P.prototype.D,P.prototype.setOptions=P.prototype.o,P.createFromModelPath=function(t,e){return y(P,t,{baseOptions:{modelAssetPath:e}})},P.createFromModelBuffer=function(t,e){return y(P,t,{baseOptions:{modelAssetBuffer:e}})},P.createFromOptions=function(t,e){return y(P,t,e)},P.HAND_CONNECTIONS=ks,P.POSE_CONNECTIONS=Sa,P.FACE_LANDMARKS_LIPS=_s,P.FACE_LANDMARKS_LEFT_EYE=vs,P.FACE_LANDMARKS_LEFT_EYEBROW=ws,P.FACE_LANDMARKS_LEFT_IRIS=Aa,P.FACE_LANDMARKS_RIGHT_EYE=bs,P.FACE_LANDMARKS_RIGHT_EYEBROW=As,P.FACE_LANDMARKS_RIGHT_IRIS=Ea,P.FACE_LANDMARKS_FACE_OVAL=Es,P.FACE_LANDMARKS_CONTOURS=ka,P.FACE_LANDMARKS_TESSELATION=Ta;var ft=class extends J{constructor(t,e){super(new _t(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},m(t=this.h=new oa,0,1,e=new O)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return m(this.h,0,2,Er(t,w(this.h,is,2))),this.l(t)}wa(t,e){return this.j={classifications:[]},vt(this,t,e),this.j}xa(t,e,n){return this.j={classifications:[]},Ot(this,t,n,e),this.j}m(){var t=new tt;M(t,"input_image"),M(t,"norm_rect"),b(t,"classifications");const e=new at;At(e,K1,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),L(n,"IMAGE:input_image"),L(n,"NORM_RECT:norm_rect"),_(n,"CLASSIFICATIONS:classifications"),n.o(e),ct(t,n),this.g.attachProtoListener("classifications",(r,s)=>{this.j=function(i){const o={classifications:Bt(i,x1,1).map(h=>{var a;return fs(((a=w(h,No,4))==null?void 0:a.g())??[],wt(gt(h,2),0),Mt(h,3))})};return pn(zt(i,2))!=null&&(o.timestampMs=wt(pn(zt(i,2)),0)),o}(O1(r)),l(this,s)}),this.g.attachEmptyPacketListener("classifications",r=>{l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ft.prototype.classifyForVideo=ft.prototype.xa,ft.prototype.classify=ft.prototype.wa,ft.prototype.setOptions=ft.prototype.o,ft.createFromModelPath=function(t,e){return y(ft,t,{baseOptions:{modelAssetPath:e}})},ft.createFromModelBuffer=function(t,e){return y(ft,t,{baseOptions:{modelAssetBuffer:e}})},ft.createFromOptions=function(t,e){return y(ft,t,e)};var rt=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect",!0),this.h=new aa,this.embeddings={embeddings:[]},m(t=this.h,0,1,e=new O)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){var e=this.h,n=w(this.h,si,2);return n=n?n.clone():new si,t.l2Normalize!==void 0?je(n,1,t.l2Normalize):"l2Normalize"in t&&S(n,1),t.quantize!==void 0?je(n,2,t.quantize):"quantize"in t&&S(n,2),m(e,0,2,n),this.l(t)}Da(t,e){return vt(this,t,e),this.embeddings}Ea(t,e,n){return Ot(this,t,n,e),this.embeddings}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect"),b(t,"embeddings_out");const e=new at;At(e,X1,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect"),_(n,"EMBEDDINGS:embeddings_out"),n.o(e),ct(t,n),this.g.attachProtoListener("embeddings_out",(r,s)=>{r=R1(r),this.embeddings=function(i){return{embeddings:Bt(i,N1,1).map(o=>{var a,c;const h={headIndex:wt(gt(o,3),0)??-1,headName:Mt(o,4)??""};if(ao(o,ri,rr(o,1))!==void 0)o=Qt(o=w(o,ri,rr(o,1)),1,$t,Zt()),h.floatEmbedding=o.slice();else{const u=new Uint8Array(0);h.quantizedEmbedding=((c=(a=w(o,I1,rr(o,2)))==null?void 0:a.ra())==null?void 0:c.ua())??u}return h}),timestampMs:wt(pn(zt(i,2)),0)}}(r),l(this,s)}),this.g.attachEmptyPacketListener("embeddings_out",r=>{l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};rt.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=hi(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=hi(ai(t.quantizedEmbedding),ai(e.quantizedEmbedding))}return t},rt.prototype.embedForVideo=rt.prototype.Ea,rt.prototype.embed=rt.prototype.Da,rt.prototype.setOptions=rt.prototype.o,rt.createFromModelPath=function(t,e){return y(rt,t,{baseOptions:{modelAssetPath:e}})},rt.createFromModelBuffer=function(t,e){return y(rt,t,{baseOptions:{modelAssetBuffer:e}})},rt.createFromOptions=function(t,e){return y(rt,t,e)};var Sr=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(n=>{n.close()}),(e=this.categoryMask)==null||e.close()}};function Si(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Li(t){try{const e=new Sr(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{zn(t)}}Sr.prototype.close=Sr.prototype.close;var q=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ls,this.v=new ha,m(this.h,0,3,this.v),m(t=this.h,0,1,e=new O)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return t.displayNamesLocale!==void 0?S(this.h,2,ke(t.displayNamesLocale)):"displayNamesLocale"in t&&S(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}J(){(function(t){var n,r;const e=Bt(t.ga(),$,1).filter(s=>Mt(s,1).includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");e.length===1&&(((r=(n=w(e[0],at,7))==null?void 0:n.l())==null?void 0:r.g())??new Map).forEach((s,i)=>{t.s[Number(i)]=Mt(s,1)})})(this)}ha(t,e,n){const r=typeof e!="function"?e:{};return this.j=typeof e=="function"?e:n,Si(this),vt(this,t,r),Li(this)}Pa(t,e,n,r){const s=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:r,Si(this),Ot(this,t,s,e),Li(this)}Ha(){return this.s}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect");const e=new at;At(e,ua,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect"),n.o(e),ct(t,n),Wn(this,t),this.outputConfidenceMasks&&(b(t,"confidence_masks"),_(n,"CONFIDENCE_MASKS:confidence_masks"),ye(this,"confidence_masks"),this.g.fa("confidence_masks",(r,s)=>{this.confidenceMasks=r.map(i=>we(this,i,!0,!this.j)),l(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",r=>{this.confidenceMasks=[],l(this,r)})),this.outputCategoryMask&&(b(t,"category_mask"),_(n,"CATEGORY_MASK:category_mask"),ye(this,"category_mask"),this.g.W("category_mask",(r,s)=>{this.categoryMask=we(this,r,!1,!this.j),l(this,s)}),this.g.attachEmptyPacketListener("category_mask",r=>{this.categoryMask=void 0,l(this,r)})),b(t,"quality_scores"),_(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(r,s)=>{this.qualityScores=r,l(this,s)}),this.g.attachEmptyPacketListener("quality_scores",r=>{this.categoryMask=void 0,l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};q.prototype.getLabels=q.prototype.Ha,q.prototype.segmentForVideo=q.prototype.Pa,q.prototype.segment=q.prototype.ha,q.prototype.setOptions=q.prototype.o,q.createFromModelPath=function(t,e){return y(q,t,{baseOptions:{modelAssetPath:e}})},q.createFromModelBuffer=function(t,e){return y(q,t,{baseOptions:{modelAssetBuffer:e}})},q.createFromOptions=function(t,e){return y(q,t,e)};var Lr=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(n=>{n.close()}),(e=this.categoryMask)==null||e.close()}};Lr.prototype.close=Lr.prototype.close;var e2=class extends f{constructor(t){super(t)}},ce=[0,D,-2],bn=[0,It,-3,I,It,-1],Fi=[0,bn],Mi=[0,bn,D,-1],hr=class extends f{constructor(t){super(t)}},Pi=[0,It,-1,I],n2=class extends f{constructor(){super()}},xi=class extends f{constructor(t){super(t)}},Fr=[1,2,3,4,5,6,7,8,9,10,14,15],La=class extends f{constructor(){super()}};La.prototype.g=Gn([0,j,[0,Fr,k,bn,k,[0,bn,ce],k,Fi,k,[0,Fi,ce],k,Pi,k,[0,It,-3,I,bt],k,[0,It,-3,I],k,[0,E,It,-2,I,D,I,-1,2,It,ce],k,Mi,k,[0,Mi,ce],It,ce,E,k,[0,It,-3,I,ce,-1],k,[0,j,Pi]],E,[0,E,D,-1,I]]);var Lt=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ls,this.s=new ha,m(this.h,0,3,this.s),m(t=this.h,0,1,e=new O)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}ha(t,e,n,r){const s=typeof n!="function"?n:{};this.j=typeof n=="function"?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,r=new La;const i=new xi;var o=new e2;if(Pt(o,1,255),m(i,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var h=new hr;je(h,3,!0),d(h,1,e.keypoint.x),d(h,2,e.keypoint.y),Re(i,5,Fr,h)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(h of(o=new n2,e.scribble))je(e=new hr,3,!0),d(e,1,h.x),d(e,2,h.y),yn(o,1,hr,e);Re(i,15,Fr,o)}yn(r,1,xi,i),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),vt(this,t,s);t:{try{const c=new Lr(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var a=c;break t}this.j(c)}finally{zn(this)}a=void 0}return a}m(){var t=new tt;M(t,"image_in"),M(t,"roi_in"),M(t,"norm_rect_in");const e=new at;At(e,ua,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),L(n,"IMAGE:image_in"),L(n,"ROI:roi_in"),L(n,"NORM_RECT:norm_rect_in"),n.o(e),ct(t,n),Wn(this,t),this.outputConfidenceMasks&&(b(t,"confidence_masks"),_(n,"CONFIDENCE_MASKS:confidence_masks"),ye(this,"confidence_masks"),this.g.fa("confidence_masks",(r,s)=>{this.confidenceMasks=r.map(i=>we(this,i,!0,!this.j)),l(this,s)}),this.g.attachEmptyPacketListener("confidence_masks",r=>{this.confidenceMasks=[],l(this,r)})),this.outputCategoryMask&&(b(t,"category_mask"),_(n,"CATEGORY_MASK:category_mask"),ye(this,"category_mask"),this.g.W("category_mask",(r,s)=>{this.categoryMask=we(this,r,!1,!this.j),l(this,s)}),this.g.attachEmptyPacketListener("category_mask",r=>{this.categoryMask=void 0,l(this,r)})),b(t,"quality_scores"),_(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(r,s)=>{this.qualityScores=r,l(this,s)}),this.g.attachEmptyPacketListener("quality_scores",r=>{this.categoryMask=void 0,l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Lt.prototype.segment=Lt.prototype.ha,Lt.prototype.setOptions=Lt.prototype.o,Lt.createFromModelPath=function(t,e){return y(Lt,t,{baseOptions:{modelAssetPath:e}})},Lt.createFromModelBuffer=function(t,e){return y(Lt,t,{baseOptions:{modelAssetBuffer:e}})},Lt.createFromOptions=function(t,e){return y(Lt,t,e)};var dt=class extends J{constructor(t,e){super(new _t(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},m(t=this.h=new la,0,1,e=new O)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return t.displayNamesLocale!==void 0?S(this.h,2,ke(t.displayNamesLocale)):"displayNamesLocale"in t&&S(this.h,2),t.maxResults!==void 0?Pt(this.h,3,t.maxResults):"maxResults"in t&&S(this.h,3),t.scoreThreshold!==void 0?d(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&S(this.h,4),t.categoryAllowlist!==void 0?_n(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&S(this.h,5),t.categoryDenylist!==void 0?_n(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&S(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},vt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Ot(this,t,n,e),this.j}m(){var t=new tt;M(t,"input_frame_gpu"),M(t,"norm_rect"),b(t,"detections");const e=new at;At(e,$1,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),L(n,"IMAGE:input_frame_gpu"),L(n,"NORM_RECT:norm_rect"),_(n,"DETECTIONS:detections"),n.o(e),ct(t,n),this.g.attachProtoVectorListener("detections",(r,s)=>{for(const i of r)r=Co(i),this.j.detections.push(da(r));l(this,s)}),this.g.attachEmptyPacketListener("detections",r=>{l(this,r)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};dt.prototype.detectForVideo=dt.prototype.F,dt.prototype.detect=dt.prototype.D,dt.prototype.setOptions=dt.prototype.o,dt.createFromModelPath=async function(t,e){return y(dt,t,{baseOptions:{modelAssetPath:e}})},dt.createFromModelBuffer=function(t,e){return y(dt,t,{baseOptions:{modelAssetBuffer:e}})},dt.createFromOptions=function(t,e){return y(dt,t,e)};var Mr=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){var t;(t=this.segmentationMasks)==null||t.forEach(e=>{e.close()})}};function Oi(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Ii(t){try{const e=new Mr(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{zn(t)}}Mr.prototype.close=Mr.prototype.close;var st=class extends J{constructor(t,e){super(new _t(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,m(t=this.h=new fa,0,1,e=new O),this.v=new sa,m(this.h,0,3,this.v),this.j=new ra,m(this.h,0,2,this.j),Pt(this.j,4,1),d(this.j,2,.5),d(this.v,2,.5),d(this.h,4,.5)}get baseOptions(){return w(this.h,O,1)}set baseOptions(t){m(this.h,0,1,t)}o(t){return"numPoses"in t&&Pt(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&d(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&d(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&d(this.v,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}D(t,e,n){const r=typeof e!="function"?e:{};return this.s=typeof e=="function"?e:n,Oi(this),vt(this,t,r),Ii(this)}F(t,e,n,r){const s=typeof n!="function"?n:{};return this.s=typeof n=="function"?n:r,Oi(this),Ot(this,t,s,e),Ii(this)}m(){var t=new tt;M(t,"image_in"),M(t,"norm_rect"),b(t,"normalized_landmarks"),b(t,"world_landmarks"),b(t,"segmentation_masks");const e=new at;At(e,q1,this.h);const n=new $;ht(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),L(n,"IMAGE:image_in"),L(n,"NORM_RECT:norm_rect"),_(n,"NORM_LANDMARKS:normalized_landmarks"),_(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),ct(t,n),Wn(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(r,s)=>{this.landmarks=[];for(const i of r)r=Ye(i),this.landmarks.push(Hn(r));l(this,s)}),this.g.attachEmptyPacketListener("normalized_landmarks",r=>{this.landmarks=[],l(this,r)}),this.g.attachProtoVectorListener("world_landmarks",(r,s)=>{this.worldLandmarks=[];for(const i of r)r=fe(i),this.worldLandmarks.push(Be(r));l(this,s)}),this.g.attachEmptyPacketListener("world_landmarks",r=>{this.worldLandmarks=[],l(this,r)}),this.outputSegmentationMasks&&(_(n,"SEGMENTATION_MASK:segmentation_masks"),ye(this,"segmentation_masks"),this.g.fa("segmentation_masks",(r,s)=>{this.segmentationMasks=r.map(i=>we(this,i,!0,!this.s)),l(this,s)}),this.g.attachEmptyPacketListener("segmentation_masks",r=>{this.segmentationMasks=[],l(this,r)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};st.prototype.detectForVideo=st.prototype.F,st.prototype.detect=st.prototype.D,st.prototype.setOptions=st.prototype.o,st.createFromModelPath=function(t,e){return y(st,t,{baseOptions:{modelAssetPath:e}})},st.createFromModelBuffer=function(t,e){return y(st,t,{baseOptions:{modelAssetBuffer:e}})},st.createFromOptions=function(t,e){return y(st,t,e)},st.POSE_CONNECTIONS=Sa;export{lt as FaceDetector,R as FaceLandmarker,St as FaceStylizer,he as FilesetResolver,et as GestureRecognizer,nt as HandLandmarker,P as HolisticLandmarker,ft as ImageClassifier,rt as ImageEmbedder,q as ImageSegmenter,Sr as ImageSegmenterResult,Lt as InteractiveSegmenter,Lr as InteractiveSegmenterResult,z as MPImage,W as MPMask,dt as ObjectDetector,st as PoseLandmarker,J as VisionTaskRunner};
16
+ //# sourceMappingURL=chunk-CPRQl8Yc.js.map