trtc-sdk-v5 5.12.0-beta.5 → 5.12.0-beta.7

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.
Files changed (44) hide show
  1. package/assets/debug-dialog.js +1 -1
  2. package/assets/{selfie_segmentation/selfie_segmentation_landscape.tflite → mediapipe/selfie_segmenter_landscape.tflite} +0 -0
  3. package/assets/mediapipe/vision.js +63 -0
  4. package/assets/mediapipe/vision_wasm_internal.js.gz +0 -0
  5. package/assets/{face_detection/vision_wasm_internal.gz → mediapipe/vision_wasm_internal.wasm.gz} +0 -0
  6. package/assets/mediapipe/vision_wasm_nosimd_internal.js.gz +0 -0
  7. package/assets/{face_detection/vision_wasm_nosimd_internal.gz → mediapipe/vision_wasm_nosimd_internal.wasm.gz} +0 -0
  8. package/index.d.ts +5 -3
  9. package/package.json +1 -1
  10. package/plugins/cdn-streaming/package.json +1 -1
  11. package/plugins/cross-room/package.json +1 -1
  12. package/plugins/custom-encryption/package.json +1 -1
  13. package/plugins/device-detector/device-detector.esm.d.ts +1 -0
  14. package/plugins/device-detector/device-detector.esm.js +18 -16
  15. package/plugins/device-detector/device-detector.umd.js +2 -2
  16. package/plugins/device-detector/package.json +1 -1
  17. package/plugins/small-stream-auto-switcher/package.json +1 -1
  18. package/plugins/video-decoder/package.json +1 -1
  19. package/plugins/video-decoder/video-decoder.esm.js +1 -1
  20. package/plugins/video-decoder/video-decoder.umd.js +1 -1
  21. package/plugins/video-effect/basic-beauty/basic-beauty.esm.js +1 -1
  22. package/plugins/video-effect/basic-beauty/basic-beauty.umd.js +1 -1
  23. package/plugins/video-effect/basic-beauty/package.json +1 -1
  24. package/plugins/video-effect/beauty/package.json +1 -1
  25. package/plugins/video-effect/video-mixer/package.json +1 -1
  26. package/plugins/video-effect/video-mixer/video-mixer.esm.d.ts +85 -13
  27. package/plugins/video-effect/video-mixer/video-mixer.esm.js +1 -1
  28. package/plugins/video-effect/video-mixer/video-mixer.umd.js +1 -1
  29. package/plugins/video-effect/virtual-background/package.json +1 -1
  30. package/plugins/video-effect/virtual-background/virtual-background.esm.js +1 -1
  31. package/plugins/video-effect/virtual-background/virtual-background.umd.js +1 -1
  32. package/plugins/video-effect/watermark/package.json +1 -1
  33. package/plugins/voice-changer/package.json +1 -1
  34. package/trtc.esm.js +36 -35
  35. package/trtc.js +1 -1
  36. package/assets/face_detection/vision_wasm_internal.js +0 -20
  37. package/assets/face_detection/vision_wasm_nosimd_internal.js +0 -20
  38. package/assets/selfie_segmentation/package.json +0 -27
  39. package/assets/selfie_segmentation/selfie_segmentation.binarypb +0 -0
  40. package/assets/selfie_segmentation/selfie_segmentation.tflite +0 -0
  41. package/assets/selfie_segmentation/selfie_segmentation_solution_simd_wasm_bin.data +0 -0
  42. package/assets/selfie_segmentation/selfie_segmentation_solution_simd_wasm_bin.wasm +0 -0
  43. package/assets/selfie_segmentation/selfie_segmentation_solution_wasm_bin.wasm +0 -0
  44. /package/assets/{face_detection → mediapipe}/blaze_face_short_range.tflite +0 -0
@@ -0,0 +1,63 @@
1
+ "use strict";var Vision=(()=>{var Nu=Object.create;var gr=Object.defineProperty,Cu=Object.defineProperties,Uu=Object.getOwnPropertyDescriptor,Du=Object.getOwnPropertyDescriptors,ku=Object.getOwnPropertyNames,as=Object.getOwnPropertySymbols,Mu=Object.getPrototypeOf,cs=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable;var us=Math.pow,Jn=(t,e,r)=>e in t?gr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Zn=(t,e)=>{for(var r in e||(e={}))cs.call(e,r)&&Jn(t,r,e[r]);if(as)for(var r of as(e))Pu.call(e,r)&&Jn(t,r,e[r]);return t},hs=(t,e)=>Cu(t,Du(e));var Fu=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bu=(t,e)=>{for(var r in e)gr(t,r,{get:e[r],enumerable:!0})},ls=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ku(e))!cs.call(t,i)&&i!==r&&gr(t,i,{get:()=>e[i],enumerable:!(n=Uu(e,i))||n.enumerable});return t};var Vu=(t,e,r)=>(r=t!=null?Nu(Mu(t)):{},ls(e||!t||!t.__esModule?gr(r,"default",{value:t,enumerable:!0}):r,t)),Gu=t=>ls(gr({},"__esModule",{value:!0}),t);var j=(t,e,r)=>Jn(t,typeof e!="symbol"?e+"":e,r);var C=(t,e,r)=>new Promise((n,i)=>{var o=c=>{try{a(r.next(c))}catch(u){i(u)}},s=c=>{try{a(r.throw(c))}catch(u){i(u)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,s);a((r=r.apply(t,e)).next())});var Au=Fu((U3,$o)=>{"use strict";var ul=Object.prototype.hasOwnProperty,lt="~";function Br(){}Object.create&&(Br.prototype=Object.create(null),new Br().__proto__||(lt=!1));function hl(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function Tu(t,e,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var o=new hl(r,n||t,i),s=lt?lt+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],o]:t._events[s].push(o):(t._events[s]=o,t._eventsCount++),t}function zn(t,e){--t._eventsCount===0?t._events=new Br:delete t._events[e]}function ot(){this._events=new Br,this._eventsCount=0}ot.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)ul.call(r,n)&&e.push(lt?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};ot.prototype.listeners=function(e){var r=lt?lt+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s};ot.prototype.listenerCount=function(e){var r=lt?lt+e:e,n=this._events[r];return n?n.fn?1:n.length:0};ot.prototype.emit=function(e,r,n,i,o,s){var a=lt?lt+e:e;if(!this._events[a])return!1;var c=this._events[a],u=arguments.length,l,h;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,n),!0;case 4:return c.fn.call(c.context,r,n,i),!0;case 5:return c.fn.call(c.context,r,n,i,o),!0;case 6:return c.fn.call(c.context,r,n,i,o,s),!0}for(h=1,l=new Array(u-1);h<u;h++)l[h-1]=arguments[h];c.fn.apply(c.context,l)}else{var f=c.length,v;for(h=0;h<f;h++)switch(c[h].once&&this.removeListener(e,c[h].fn,void 0,!0),u){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,r);break;case 3:c[h].fn.call(c[h].context,r,n);break;case 4:c[h].fn.call(c[h].context,r,n,i);break;default:if(!l)for(v=1,l=new Array(u-1);v<u;v++)l[v-1]=arguments[v];c[h].fn.apply(c[h].context,l)}}return!0};ot.prototype.on=function(e,r,n){return Tu(this,e,r,n,!1)};ot.prototype.once=function(e,r,n){return Tu(this,e,r,n,!0)};ot.prototype.removeListener=function(e,r,n,i){var o=lt?lt+e:e;if(!this._events[o])return this;if(!r)return zn(this,o),this;var s=this._events[o];if(s.fn)s.fn===r&&(!i||s.once)&&(!n||s.context===n)&&zn(this,o);else{for(var a=0,c=[],u=s.length;a<u;a++)(s[a].fn!==r||i&&!s[a].once||n&&s[a].context!==n)&&c.push(s[a]);c.length?this._events[o]=c.length===1?c[0]:c:zn(this,o)}return this};ot.prototype.removeAllListeners=function(e){var r;return e?(r=lt?lt+e:e,this._events[r]&&zn(this,r)):(this._events=new Br,this._eventsCount=0),this};ot.prototype.off=ot.prototype.removeListener;ot.prototype.addListener=ot.prototype.on;ot.prefixed=lt;ot.EventEmitter=ot;typeof $o!="undefined"&&($o.exports=ot)});var gl={};Bu(gl,{VisionTaskRegistry:()=>Yo,VisionTaskType:()=>wu});var Ve=typeof self!="undefined"?self:{};function Ae(){throw Error("Invalid UTF8")}function fs(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}var Gr,ti,ju=typeof TextDecoder!="undefined",Hu,zu=typeof TextEncoder!="undefined";function Sa(t){if(zu)t=(Hu||(Hu=new TextEncoder)).encode(t);else{let r=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){let o=t.charCodeAt(++i);if(o>=56320&&o<=57343){e=1024*(e-55296)+o-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}i--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}var Mi,rn;t:{for(ei=["CLOSURE_FLAGS"],jr=Ve,Hr=0;Hr<ei.length;Hr++)if((jr=jr[ei[Hr]])==null){rn=null;break t}rn=jr}var ei,jr,Hr,wr,ps=rn&&rn[610401301];Mi=ps!=null&&ps;var ds=Ve.navigator;function pi(t){return!!Mi&&!!wr&&wr.brands.some(({brand:e})=>e&&e.indexOf(t)!=-1)}function Lt(t){var e;return(e=Ve.navigator)&&(e=e.userAgent)||(e=""),e.indexOf(t)!=-1}function he(){return!!Mi&&!!wr&&wr.brands.length>0}function ri(){return he()?pi("Chromium"):(Lt("Chrome")||Lt("CriOS"))&&!(!he()&&Lt("Edge"))||Lt("Silk")}function hn(t){return hn[" "](t),t}wr=ds&&ds.userAgentData||null,hn[" "]=function(){};var Wu=!he()&&(Lt("Trident")||Lt("MSIE"));!Lt("Android")||ri(),ri(),Lt("Safari")&&(ri()||!he()&&Lt("Coast")||!he()&&Lt("Opera")||!he()&&Lt("Edge")||(he()?pi("Microsoft Edge"):Lt("Edg/"))||he()&&pi("Opera"));var Ia={},Er=null;function $u(t){let e=t.length,r=3*e/4;r%3?r=Math.floor(r):"=.".indexOf(t[e-1])!=-1&&(r="=.".indexOf(t[e-2])!=-1?r-2:r-1);let n=new Uint8Array(r),i=0;return function(o,s){function a(u){for(;c<o.length;){let l=o.charAt(c++),h=Er[l];if(h!=null)return h;if(!/^[\s\xa0]*$/.test(l))throw Error("Unknown base64 encoding at char: "+l)}return u}wa();let c=0;for(;;){let u=a(-1),l=a(0),h=a(64),f=a(64);if(f===64&&u===-1)break;s(u<<2|l>>4),h!=64&&(s(l<<4&240|h>>2),f!=64&&s(h<<6&192|f))}}(t,function(o){n[i++]=o}),i!==r?n.subarray(0,i):n}function wa(){if(!Er){Er={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){let n=t.concat(e[r].split(""));Ia[r]=n;for(let i=0;i<n.length;i++){let o=n[i];Er[o]===void 0&&(Er[o]=i)}}}}var Ra=typeof Uint8Array!="undefined",xa=!Wu&&typeof btoa=="function";function gs(t){if(!xa){var e;e===void 0&&(e=0),wa(),e=Ia[e];var r=Array(Math.floor(t.length/3)),n=e[64]||"";let c=0,u=0;for(;c<t.length-2;c+=3){var i=t[c],o=t[c+1],s=t[c+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],r[u++]=a+i+o+s}switch(a=0,s=n,t.length-c){case 2:s=e[(15&(a=t[c+1]))<<2]||n;case 1:t=t[c],r[u]=e[t>>2]+e[(3&t)<<4|a>>4]+s+n}return r.join("")}for(e="",r=0,n=t.length-10240;r<n;)e+=String.fromCharCode.apply(null,t.subarray(r,r+=10240));return e+=String.fromCharCode.apply(null,r?t.subarray(r):t),btoa(e)}var ms=/[-_.]/g,Ku={"-":"+",_:"/",".":"="};function Xu(t){return Ku[t]||""}function Oa(t){if(!xa)return $u(t);ms.test(t)&&(t=t.replace(ms,Xu)),t=atob(t);let e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function Re(t){return Ra&&t!=null&&t instanceof Uint8Array}var Ge={};function xe(){return Yu||(Yu=new te(null,Ge))}function Pi(t){ba(Ge);var e=t.g;return(e=e==null||Re(e)?e:typeof e=="string"?Oa(e):null)==null?e:t.g=e}var te=class{h(){return new Uint8Array(Pi(this)||0)}constructor(t,e){if(ba(e),this.g=t,t!=null&&t.length===0)throw Error("ByteString should be constructed with non-empty values")}},Yu,ni;function ba(t){if(t!==Ge)throw Error("illegal external caller")}function La(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function di(t){return La(t=Error(t),"warning"),t}function Fi(t){if(t!=null){var e=ni!=null?ni:ni={},r=e[t]||0;r>=5||(e[t]=r+1,La(t=Error(),"incident"),function(n){Ve.setTimeout(()=>{throw n},0)}(t))}}var ln=typeof Symbol=="function"&&typeof Symbol()=="symbol";function Qe(t,e,r=!1){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?r&&Symbol.for&&t?Symbol.for(t):t!=null?Symbol(t):Symbol():e}var qu=Qe("jas",void 0,!0),_s=Qe(void 0,"0di"),mr=Qe(void 0,"1oa"),je=Qe(void 0,Symbol()),Qu=Qe(void 0,"0actk"),Na=Qe(void 0,"8utk"),_=ln?qu:"Ea",Ca={Ea:{value:0,configurable:!0,writable:!0,enumerable:!1}},Ua=Object.defineProperties;function fn(t,e){ln||_ in t||Ua(t,Ca),t[_]|=e}function Y(t,e){ln||_ in t||Ua(t,Ca),t[_]=e}function Je(t){return fn(t,34),t}function Ju(t,e){Y(e,-15615&(0|t))}function gi(t,e){Y(e,-15581&(34|t))}function pn(){return typeof BigInt=="function"}function dt(t){return Array.prototype.slice.call(t)}var Bi,Cr={};function dn(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&t.constructor===Object}function Vi(t,e){if(t!=null){if(typeof t=="string")t=t?new te(t,Ge):xe();else if(t.constructor!==te)if(Re(t))t=t.length?new te(new Uint8Array(t),Ge):xe();else{if(!e)throw Error();t=void 0}}return t}var ys=[];function Ee(t){if(2&t)throw Error()}Y(ys,55),Bi=Object.freeze(ys);var nn=class{constructor(e,r,n){this.g=e,this.h=r,this.l=n}next(){let e=this.g.next();return e.done||(e.value=this.h.call(this.l,e.value)),e}[Symbol.iterator](){return this}};function Gi(t){return je?t[je]:void 0}var Zu=Object.freeze({});function gn(t){return t.Na=!0,t}var t2=gn(t=>typeof t=="number"),Es=gn(t=>typeof t=="string"),e2=gn(t=>typeof t=="boolean"),mn=typeof Ve.BigInt=="function"&&typeof Ve.BigInt(0)=="bigint";function fe(t){var e=t;if(Es(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(t2(e)&&!Number.isSafeInteger(e))throw Error(String(e));return mn?BigInt(t):t=e2(t)?t?"1":"0":Es(t)?t.trim()||"0":String(t)}var mi=gn(t=>mn?t>=n2&&t<=o2:t[0]==="-"?vs(t,r2):vs(t,i2)),r2=Number.MIN_SAFE_INTEGER.toString(),n2=mn?BigInt(Number.MIN_SAFE_INTEGER):void 0,i2=Number.MAX_SAFE_INTEGER.toString(),o2=mn?BigInt(Number.MAX_SAFE_INTEGER):void 0;function vs(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n>i)return!1;if(n<i)return!0}}var s2=typeof Uint8Array.prototype.slice=="function",Da,U=0,W=0;function Ts(t){let e=t>>>0;U=e,W=(t-e)/4294967296>>>0}function Oe(t){if(t<0){Ts(-t);let[e,r]=Wi(U,W);U=e>>>0,W=r>>>0}else Ts(t)}function ji(t){let e=Da||(Da=new DataView(new ArrayBuffer(8)));e.setFloat32(0,+t,!0),W=0,U=e.getUint32(0,!0)}function Hi(t,e){let r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:Rr(t,e)}function zi(t,e){let r=2147483648&e;return r&&(e=~e>>>0,(t=1+~t>>>0)==0&&(e=e+1>>>0)),typeof(t=Hi(t,e))=="number"?r?-t:t:r?"-"+t:t}function Rr(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else pn()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+As(r)+As(t));return r}function As(t){return t=String(t),"0000000".slice(t.length)+t}function ka(){var t=U,e=W;if(2147483648&e)if(pn())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{let[r,n]=Wi(t,e);t="-"+Rr(r,n)}else t=Rr(t,e);return t}function _n(t){if(t.length<16)Oe(Number(t));else if(pn())t=BigInt(t),U=Number(t&BigInt(4294967295))>>>0,W=Number(t>>BigInt(32)&BigInt(4294967295));else{let e=+(t[0]==="-");W=U=0;let r=t.length;for(let n=e,i=(r-e)%6+e;i<=r;n=i,i+=6){let o=Number(t.slice(n,i));W*=1e6,U=1e6*U+o,U>=4294967296&&(W+=Math.trunc(U/4294967296),W>>>=0,U>>>=0)}if(e){let[n,i]=Wi(U,W);U=n,W=i}}}function Wi(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}var xr=typeof BigInt=="function"?BigInt.asIntN:void 0,a2=typeof BigInt=="function"?BigInt.asUintN:void 0,pe=Number.isSafeInteger,yn=Number.isFinite,He=Math.trunc,c2=fe(0);function ve(t){return t==null||typeof t=="number"?t:t==="NaN"||t==="Infinity"||t==="-Infinity"?Number(t):void 0}function Ma(t){return t==null||typeof t=="boolean"?t:typeof t=="number"?!!t:void 0}var u2=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function Or(t){switch(typeof t){case"bigint":return!0;case"number":return yn(t);case"string":return u2.test(t);default:return!1}}function Ze(t){if(t==null)return t;if(typeof t=="string"&&t)t=+t;else if(typeof t!="number")return;return yn(t)?0|t:void 0}function Pa(t){if(t==null)return t;if(typeof t=="string"&&t)t=+t;else if(typeof t!="number")return;return yn(t)?t>>>0:void 0}function Ss(t){if(t[0]==="-")return!1;let e=t.length;return e<20||e===20&&Number(t.substring(0,6))<184467}function Fa(t){let e=t.length;return t[0]==="-"?e<20||e===20&&Number(t.substring(0,7))>-922337:e<19||e===19&&Number(t.substring(0,6))<922337}function Ba(t){return Fa(t)?t:(_n(t),ka())}function $i(t){return t=He(t),pe(t)||(Oe(t),t=zi(U,W)),t}function Va(t){var e=He(Number(t));return pe(e)?String(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),Ba(t))}function Is(t){var e=He(Number(t));return pe(e)?fe(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),pn()?fe(xr(64,BigInt(t))):fe(Ba(t)))}function ws(t){if(pe(t))t=fe($i(t));else{if(t=He(t),pe(t))t=String(t);else{let e=String(t);Fa(e)?t=e:(Oe(t),t=ka())}t=fe(t)}return t}function _i(t){return t==null?t:typeof t=="bigint"?(mi(t)?t=Number(t):(t=xr(64,t),t=mi(t)?Number(t):String(t)),t):Or(t)?typeof t=="number"?$i(t):Va(t):void 0}function h2(t){if(t==null)return t;var e=typeof t;if(e==="bigint")return String(a2(64,t));if(Or(t)){if(e==="string")return e=He(Number(t)),pe(e)&&e>=0?t=String(e):((e=t.indexOf("."))!==-1&&(t=t.substring(0,e)),Ss(t)||(_n(t),t=Rr(U,W))),t;if(e==="number")return(t=He(t))>=0&&pe(t)?t:function(r){if(r<0){Oe(r);var n=Rr(U,W);return r=Number(n),pe(r)?r:n}return Ss(n=String(r))?n:(Oe(r),Hi(U,W))}(t)}}function Ga(t){if(typeof t!="string")throw Error();return t}function tr(t){if(t!=null&&typeof t!="string")throw Error();return t}function ze(t){return t==null||typeof t=="string"?t:void 0}function Ki(t,e,r,n){if(t!=null&&typeof t=="object"&&t.W===Cr)return t;if(!Array.isArray(t))return r?2&n?((t=e[_s])||(Je((t=new e).u),t=e[_s]=t),e=t):e=new e:e=void 0,e;let i=r=0|t[_];return i===0&&(i|=32&n),i|=2&n,i!==r&&Y(t,i),new e(t)}function l2(t,e,r){if(e)t:{if(!Or(e=t))throw di("int64");switch(typeof e){case"string":e=Is(e);break t;case"bigint":e=fe(xr(64,e));break t;default:e=ws(e)}}else t=typeof(e=t),e=e==null?e:t==="bigint"?fe(xr(64,e)):Or(e)?t==="string"?Is(e):ws(e):void 0;return(t=e)==null?r?c2:void 0:t}function f2(t){return t}var p2={},d2=function(){try{return hn(new class extends Map{constructor(){super()}}),!1}catch(t){return!0}}(),Tr=class{constructor(){this.g=new Map}get(e){return this.g.get(e)}set(e,r){return this.g.set(e,r),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,r){return this.g.forEach(e,r)}[Symbol.iterator](){return this.entries()}},g2=d2?(Object.setPrototypeOf(Tr.prototype,Map.prototype),Object.defineProperties(Tr.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),Tr):class extends Map{constructor(){super()}};function Rs(t){return t}function ii(t){if(2&t.M)throw Error("Cannot mutate an immutable Map")}var zt=class extends g2{constructor(t,e,r=Rs,n=Rs){super();let i=0|t[_];i|=64,Y(t,i),this.M=i,this.I=e,this.S=r,this.X=this.I?m2:n;for(let o=0;o<t.length;o++){let s=t[o],a=r(s[0],!1,!0),c=s[1];e?c===void 0&&(c=null):c=n(s[1],!1,!0,void 0,void 0,i),super.set(a,c)}}La(){var t=T2;if(this.size!==0)return Array.from(super.entries(),e=>(e[0]=t(e[0]),e[1]=t(e[1]),e))}da(t=_2){let e=[],r=super.entries();for(var n;!(n=r.next()).done;)(n=n.value)[0]=t(n[0]),n[1]=t(n[1]),e.push(n);return e}clear(){ii(this),super.clear()}delete(t){return ii(this),super.delete(this.S(t,!0,!1))}entries(){if(this.I){var t=super.keys();t=new nn(t,y2,this)}else t=super.entries();return t}values(){if(this.I){var t=super.keys();t=new nn(t,zt.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.I?super.forEach((r,n,i)=>{t.call(e,i.get(n),n,i)}):super.forEach(t,e)}set(t,e){return ii(this),(t=this.S(t,!0,!1))==null?this:e==null?(super.delete(t),this):super.set(t,this.X(e,!0,!0,this.I,!1,this.M))}Ja(t){let e=this.S(t[0],!1,!0);t=t[1],t=this.I?t===void 0?null:t:this.X(t,!1,!0,void 0,!1,this.M),super.set(e,t)}has(t){return super.has(this.S(t,!1,!1))}get(t){t=this.S(t,!1,!1);let e=super.get(t);if(e!==void 0){var r=this.I;return r?((r=this.X(e,!1,!0,r,this.pa,this.M))!==e&&super.set(t,r),r):e}}[Symbol.iterator](){return this.entries()}};function m2(t,e,r,n,i,o){return t=Ki(t,n,r,o),i&&(t=Tn(t)),t}function _2(t){return t}function y2(t){return[t,this.get(t)]}var E2,Xr,ja,v2;function xs(){return E2||(E2=new zt(Je([]),void 0,void 0,void 0,p2))}function yi(t,e,r,n,i){if(t!=null){if(Array.isArray(t)){let o=0|t[_];return t.length===0&&1&o?void 0:i&&2&o?t:En(t,e,r,n!==void 0,i)}return e(t,n)}}function En(t,e,r,n,i){let o=n||r?0|t[_]:0,s=n?!!(32&o):void 0,a=0,c=(n=dt(t)).length;for(let A=0;A<c;A++){var u=n[A];if(A===c-1&&dn(u)){var l=e,h=r,f=s,v=i;let S;for(let F in u){let D=yi(u[F],l,h,f,v);D!=null&&((S!=null?S:S={})[F]=D)}u=S}else u=yi(n[A],e,r,s,i);n[A]=u,u!=null&&(a=A+1)}return a<c&&(n.length=a),r&&((t=Gi(t))&&(n[je]=dt(t)),r(o,n)),n}function T2(t){return yi(t,Xi,void 0,void 0,!1)}function Xi(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return mi(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Re(t))return Re(t)&&Fi(Na),gs(t);if(t.W===Cr)return Ha(t);if(t instanceof te){let e=t.g;return e==null?"":typeof e=="string"?e:t.g=gs(e)}return t instanceof zt?t.La():void 0}return t}function Ha(t){var e=t.u;t=En(e,Xi,void 0,void 0,!1);var r=0|e[_];if((e=t.length)&&!(512&r)){var n=t[e-1],i=!1;dn(n)?(e--,i=!0):n=void 0;var o=e-(r=512&r?0:-1),s=(Xr!=null?Xr:f2)(o,r,t,n);if(n&&(t[e]=void 0),o<s&&n){for(var a in o=!0,n){let c=+a;c<=s?(t[i=c+r]=n[a],e=Math.max(i+1,e),i=!1,delete n[a]):o=!1}o&&(n=void 0)}for(o=e-1;e>0;o=e-1)if((a=t[o])==null)e--,i=!0;else{if(!((o-=r)>=s))break;(n!=null?n:n={})[o]=a,e--,i=!0}i&&(t.length=e),n&&t.push(n)}return t}function de(t,e,r){return t=za(t,e[0],e[1],r?1:2),e!==ja&&r&&fn(t,8192),t}function za(t,e,r,n){if(t==null){var i=96;r?(t=[r],i|=512):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(8192&(i=0|t[_])||!(64&i)||2&i||Fi(Qu),1024&i)throw Error("farr");if(64&i)return t;if(n===1||n===2||(i|=64),r&&(i|=512,r!==t[0]))throw Error("mid");t:{var o=(r=t).length;if(o){var s=o-1;if(dn(n=r[s])){if((s-=e=512&(i|=256)?0:-1)>=1024)throw Error("pvtlmt");for(var a in n)(o=+a)<s&&(r[o+e]=n[a],delete n[a]);i=-16760833&i|(1023&s)<<14;break t}}if(e){if((a=Math.max(e,o-(512&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return Y(t,i),t}function Ei(t,e,r=gi){if(t!=null){if(Ra&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var n=0|t[_];return 2&n?t:(e&&(e=n===0||!!(32&n)&&!(64&n||!(16&n))),e?(Y(t,34|n),4&n&&Object.freeze(t),t):En(t,Ei,4&n?gi:r,!0,!0))}return t.W===Cr?t=2&(n=0|(r=t.u)[_])?t:new t.constructor(vn(r,n,!0)):t instanceof zt&&!(2&t.M)&&(r=Je(t.da(Ei)),t=new zt(r,t.I,t.S,t.X)),t}}function vn(t,e,r){let n=r||2&e?gi:Ju,i=!!(32&e);return t=function(o,s,a){let c=dt(o);var u=c.length;let l=256&s?c[u-1]:void 0;for(u+=l?-1:0,s=512&s?1:0;s<u;s++)c[s]=a(c[s]);if(l){s=c[s]={};for(let h in l)s[h]=a(l[h])}return(o=Gi(o))&&(c[je]=dt(o)),c}(t,e,o=>Ei(o,i,n)),fn(t,32|(r?2:0)),t}function Tn(t){let e=t.u,r=0|e[_];return 2&r?new t.constructor(vn(e,r,!1)):t}function We(t,e){return ie(t=t.u,0|t[_],e)}function ie(t,e,r){if(r===-1)return null;let n=r+(512&e?0:-1),i=t.length-1;return n>=i&&256&e?t[i][r]:n<=i?t[n]:void 0}function k(t,e,r){let n=t.u,i=0|n[_];return Ee(i),H(n,i,e,r),t}function H(t,e,r,n){let i=512&e?0:-1,o=r+i;var s=t.length-1;return o>=s&&256&e?(t[s][r]=n,e):o<=s?(t[o]=n,e):(n!==void 0&&(r>=(s=e>>14&1023||536870912)?n!=null&&(t[s+i]={[r]:n},Y(t,e|=256)):t[o]=n),e)}function Yr(t,e){let r=0|(t=t.u)[_],n=ie(t,r,e),i=ve(n);return i!=null&&i!==n&&H(t,r,e,i),i}function Wa(t){let e=0|(t=t.u)[_],r=ie(t,e,1),n=Vi(r,!0);return n!=null&&n!==r&&H(t,e,1,n),n}function Se(){return Zu===void 0?2:4}function Ie(t,e,r,n,i){let o=t.u,s=2&(t=0|o[_])?1:n;i=!!i;let a=0|(n=Yi(o,t,e))[_];if(!(4&a)){4&a&&(n=dt(n),a=ee(a,t),t=H(o,t,e,n));let c=0,u=0;for(;c<n.length;c++){let l=r(n[c]);l!=null&&(n[u++]=l)}u<c&&(n.length=u),a=qi(a,t),r=-2049&(20|a),a=r&=-4097,Y(n,a),2&a&&Object.freeze(n)}return s===1||s===4&&32&a?Zt(a)||(i=a,a|=2,a!==i&&Y(n,a),Object.freeze(n)):(s===2&&Zt(a)&&(n=dt(n),a=ee(a,t),a=ge(a,t,i),Y(n,a),t=H(o,t,e,n)),Zt(a)||(e=a,a=ge(a,t,i),a!==e&&Y(n,a))),n}function Yi(t,e,r){return t=ie(t,e,r),Array.isArray(t)?t:Bi}function qi(t,e){return t===0&&(t=ee(t,e)),1|t}function Zt(t){return!!(2&t)&&!!(4&t)||!!(1024&t)}function $a(t){t=dt(t);for(let e=0;e<t.length;e++){let r=t[e]=dt(t[e]);Array.isArray(r[1])&&(r[1]=Je(r[1]))}return t}function vi(t,e,r,n){let i=0|(t=t.u)[_];Ee(i),H(t,i,e,(n==="0"?Number(r)===0:r===n)?void 0:r)}function er(t,e,r,n){Ee(e);let i=Yi(t,e,r),o=i!==Bi;if(64&e||!(8192&e)||!o){let s=o?0|i[_]:0,a=s;(!o||2&a||Zt(a)||4&a&&!(32&a))&&(i=dt(i),a=ee(a,e),e=H(t,e,r,i)),a=-13&qi(a,e),a=ge(n?-17&a:16|a,e,!0),a!==s&&Y(i,a)}return i}function oi(t,e){var r=Cc;return Ji(Qi(t=t.u),t,0|t[_],r)===e?e:-1}function Qi(t){var r;if(ln)return(r=t[mr])!=null?r:t[mr]=new Map;if(mr in t)return t[mr];let e=new Map;return Object.defineProperty(t,mr,{value:e}),e}function Ka(t,e,r,n){let i=Qi(t),o=Ji(i,t,e,r);return o!==n&&(o&&(e=H(t,e,o)),i.set(r,n)),e}function Ji(t,e,r,n){let i=t.get(n);if(i!=null)return i;i=0;for(let o=0;o<n.length;o++){let s=n[o];ie(e,r,s)!=null&&(i!==0&&(r=H(e,r,i)),i=s)}return t.set(n,i),i}function Zi(t,e,r){let n=0|t[_],i=ie(t,n,r),o;if(i!=null&&i.W===Cr)return(e=Tn(i))!==i&&H(t,n,r,e),e.u;if(Array.isArray(i)){let s=0|i[_];o=2&s?de(vn(i,s,!1),e,!0):64&s?i:de(o,e,!0)}else o=de(void 0,e,!0);return o!==i&&H(t,n,r,o),o}function Xa(t,e,r){let n=0|(t=t.u)[_],i=ie(t,n,r);return(e=Ki(i,e,!1,n))!==i&&e!=null&&H(t,n,r,e),e}function R(t,e,r){if((e=Xa(t,e,r))==null)return e;let n=0|(t=t.u)[_];if(!(2&n)){let i=Tn(e);i!==e&&H(t,n,r,e=i)}return e}function Ya(t,e,r,n,i,o,s){t=t.u;var a=!!(2&e);let c=a?1:i;o=!!o,s&&(s=!a);var u=0|(i=Yi(t,e,n))[_];if(!(a=!!(4&u))){var l=i,h=e;let f=!!(2&(u=qi(u,e)));f&&(h|=2);let v=!f,A=!0,S=0,F=0;for(;S<l.length;S++){let D=Ki(l[S],r,!1,h);if(D instanceof r){if(!f){let rt=!!(2&(0|D.u[_]));v&&(v=!rt),A&&(A=rt)}l[F++]=D}}F<S&&(l.length=F),u|=4,u=A?16|u:-17&u,Y(l,u=v?8|u:-9&u),f&&Object.freeze(l)}if(s&&!(8&u||!i.length&&(c===1||c===4&&32&u))){for(Zt(u)&&(i=dt(i),u=ee(u,e),e=H(t,e,n,i)),r=i,s=u,l=0;l<r.length;l++)(u=r[l])!==(h=Tn(u))&&(r[l]=h);s|=8,Y(r,s=r.length?-17&s:16|s),u=s}return c===1||c===4&&32&u?Zt(u)||(e=u,(u|=!i.length||16&u&&(!a||32&u)?2:1024)!==e&&Y(i,u),Object.freeze(i)):(c===2&&Zt(u)&&(Y(i=dt(i),u=ge(u=ee(u,e),e,o)),e=H(t,e,n,i)),Zt(u)||(n=u,(u=ge(u,e,o))!==n&&Y(i,u))),i}function re(t,e,r){let n=0|t.u[_];return Ya(t,n,e,r,Se(),!1,!(2&n))}function E(t,e,r,n){return n==null&&(n=void 0),k(t,r,n)}function Ar(t,e,r,n){n==null&&(n=void 0);t:{let i=0|(t=t.u)[_];if(Ee(i),n==null){let o=Qi(t);if(Ji(o,t,i,r)!==e)break t;o.set(r,0)}else i=Ka(t,i,r,e);H(t,i,e,n)}}function ee(t,e){return-1025&(t=32|(2&e?2|t:-3&t))}function ge(t,e,r){return 32&e&&r||(t&=-33),t}function An(t,e,r){Ee(0|t.u[_]),Ie(t,e,ze,2,!0).push(Ga(r))}function on(t,e,r,n){let i=0|t.u[_];Ee(i),t=Ya(t,i,r,e,2,!0),n=n!=null?n:new r,t.push(n),t[_]=2&(0|n.u[_])?-9&t[_]:-17&t[_]}function Nt(t,e){return Ze(We(t,e))}function Ct(t,e){return ze(We(t,e))}function K(t,e){var r;return(r=Yr(t,e))!=null?r:0}function br(t,e,r){if(r!=null&&typeof r!="boolean")throw t=typeof r,Error(`Expected boolean but got ${t!="object"?t:r?Array.isArray(r)?"array":t:"null"}: ${r}`);k(t,e,r)}function Wt(t,e,r){if(r!=null){if(typeof r!="number"||!yn(r))throw di("int32");r|=0}k(t,e,r)}function g(t,e,r){if(r!=null&&typeof r!="number")throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);k(t,e,r)}function sn(t,e,r){{let s=t.u,a=0|s[_];if(Ee(a),r==null)H(s,a,e);else{var n=t=0|r[_],i=Zt(t),o=i||Object.isFrozen(r);for(i||(t=0),o||(r=dt(r),n=0,t=ge(t=ee(t,a),a,!0),o=!1),t|=21,i=0;i<r.length;i++){let c=r[i],u=Ga(c);Object.is(c,u)||(o&&(r=dt(r),n=0,t=ge(t=ee(t,a),a,!0),o=!1),r[i]=u)}t!==n&&(o&&(r=dt(r),t=ge(t=ee(t,a),a,!0)),Y(r,t)),H(s,a,e,r)}}}function qa(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function to(){return Error("Failed to read varint, encoding is invalid.")}function Qa(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function eo(t){if(typeof t=="string")return{buffer:Oa(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===te)return{buffer:Pi(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 ro(t,e){let r,n=0,i=0,o=0,s=t.h,a=t.g;do r=s[a++],n|=(127&r)<<o,o+=7;while(o<32&&128&r);for(o>32&&(i|=(127&r)>>4),o=3;o<32&&128&r;o+=7)r=s[a++],i|=(127&r)<<o;if(we(t,a),r<128)return e(n>>>0,i>>>0);throw to()}function no(t){let e=0,r=t.g,n=r+10,i=t.h;for(;r<n;){let o=i[r++];if(e|=o,(128&o)==0)return we(t,r),!!(127&e)}throw to()}function me(t){let e=t.h,r=t.g,n=e[r++],i=127&n;if(128&n&&(n=e[r++],i|=(127&n)<<7,128&n&&(n=e[r++],i|=(127&n)<<14,128&n&&(n=e[r++],i|=(127&n)<<21,128&n&&(n=e[r++],i|=n<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw to();return we(t,r),i}function ne(t){return me(t)>>>0}function Ti(t){var e=t.h;let r=t.g,n=e[r],i=e[r+1],o=e[r+2];return e=e[r+3],we(t,t.g+4),(n<<0|i<<8|o<<16|e<<24)>>>0}function Ai(t){var e=Ti(t);t=2*(e>>31)+1;let r=e>>>23&255;return e&=8388607,r==255?e?NaN:t*(1/0):r==0?1401298464324817e-60*t*e:t*Math.pow(2,r-150)*(e+8388608)}function A2(t){return me(t)}function si(t,e,{aa:r=!1}={}){t.aa=r,e&&(e=eo(e),t.h=e.buffer,t.m=e.O,t.j=0,t.l=t.h.length,t.g=t.j)}function we(t,e){if(t.g=e,e>t.l)throw Qa(t.l,e)}function Ja(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);let r=t.g,n=r+e;if(n>t.l)throw Qa(e,t.l-r);return t.g=n,r}function Za(t,e){if(e==0)return xe();var r=Ja(t,e);return t.aa&&t.m?r=t.h.subarray(r,r+e):(t=t.h,r=r===(e=r+e)?new Uint8Array(0):s2?t.slice(r,e):new Uint8Array(t.subarray(r,e))),r.length==0?xe():new te(r,Ge)}zt.prototype.toJSON=void 0;var Os=[];function tc(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var r=ne(t.g);if(e=r>>>3,!((r&=7)>=0&&r<=5))throw qa(r,t.l);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=r,!0}function qr(t){switch(t.h){case 0:t.h!=0?qr(t):no(t.g);break;case 1:we(t=t.g,t.g+8);break;case 2:if(t.h!=2)qr(t);else{var e=ne(t.g);we(t=t.g,t.g+e)}break;case 5:we(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!tc(t))throw Error("Unmatched start-group tag: stream EOF");if(t.h==4){if(t.m!=e)throw Error("Unmatched end-group tag");break}qr(t)}break;default:throw qa(t.h,t.l)}}function Ur(t,e,r){let n=t.g.l,i=ne(t.g),o=t.g.g+i,s=o-n;if(s<=0&&(t.g.l=o,r(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=o,t.g.l=n,e}function io(t){var e=ne(t.g),r=Ja(t=t.g,e);if(t=t.h,ju){var n,i=t;(n=ti)||(n=ti=new TextDecoder("utf-8",{fatal:!0})),e=r+e,i=r===0&&e===i.length?i:i.subarray(r,e);try{var o=n.decode(i)}catch(a){if(Gr===void 0){try{n.decode(new Uint8Array([128]))}catch(c){}try{n.decode(new Uint8Array([97])),Gr=!0}catch(c){Gr=!1}}throw!Gr&&(ti=void 0),a}}else{e=(o=r)+e,r=[];let a,c=null;for(;o<e;){var s=t[o++];s<128?r.push(s):s<224?o>=e?Ae():(a=t[o++],s<194||(192&a)!=128?(o--,Ae()):r.push((31&s)<<6|63&a)):s<240?o>=e-1?Ae():(a=t[o++],(192&a)!=128||s===224&&a<160||s===237&&a>=160||(192&(n=t[o++]))!=128?(o--,Ae()):r.push((15&s)<<12|(63&a)<<6|63&n)):s<=244?o>=e-2?Ae():(a=t[o++],(192&a)!=128||a-144+(s<<28)>>30!=0||(192&(n=t[o++]))!=128||(192&(i=t[o++]))!=128?(o--,Ae()):(s=(7&s)<<18|(63&a)<<12|(63&n)<<6|63&i,s-=65536,r.push(55296+(s>>10&1023),56320+(1023&s)))):Ae(),r.length>=8192&&(c=fs(c,r),r.length=0)}o=fs(c,r)}return o}function ec(t){let e=ne(t.g);return Za(t.g,e)}function Sn(t,e,r){var n=ne(t.g);for(n=t.g.g+n;t.g.g<n;)r.push(e(t.g))}var zr=[];function Mt(t,e,r){e.g?e.m(t,e.g,e.h,r):e.m(t,e.h,r)}var d=class{constructor(t,e){this.u=za(t,e)}toJSON(){try{var t=Ha(this)}finally{Xr=void 0}return t}l(){var t=nh;return t.g?t.l(this,t.g,t.h):t.l(this,t.h,t.defaultValue)}clone(){let t=this.u;return new this.constructor(vn(t,0|t[_],!1))}O(){return!!(2&(0|this.u[_]))}};function bs(t){return t?/^\d+$/.test(t)?(_n(t),new Si(U,W)):null:S2||(S2=new Si(0,0))}d.prototype.W=Cr,d.prototype.toString=function(){return this.u.toString()};var Si=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}},S2;function Ls(t){return t?/^-?\d+$/.test(t)?(_n(t),new Ii(U,W)):null:I2||(I2=new Ii(0,0))}var Ii=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}},I2;function Pe(t,e,r){for(;r>0||e>127;)t.g.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.g.push(e)}function rr(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function In(t,e){if(e>=0)rr(t,e);else{for(let r=0;r<9;r++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Lr(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 $e(t,e){e.length!==0&&(t.l.push(e),t.h+=e.length)}function St(t,e,r){rr(t.g,8*e+r)}function oo(t,e){return St(t,e,2),e=t.g.end(),$e(t,e),e.push(t.h),e}function so(t,e){var r=e.pop();for(r=t.h+t.g.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.h++;e.push(r),t.h++}function wn(t,e,r){St(t,e,2),rr(t.g,r.length),$e(t,t.g.end()),$e(t,r)}function an(t,e,r,n){r!=null&&(e=oo(t,e),n(r,t),so(t,e))}function Pt(){let t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var ao=Pt(),rc=Pt(),co=Pt(),uo=Pt(),nc=Pt(),ic=Pt(),ho=Pt(),oc=Pt(),sc=Pt(),nr=class{constructor(t,e,r){this.g=t,this.h=e,t=ao,this.l=!!t&&r===t||!1}};function Rn(t,e){return new nr(t,e,ao)}function ac(t,e,r,n,i){an(t,r,uc(e,n),i)}var w2=Rn(function(t,e,r,n,i){return t.h===2&&(Ur(t,Zi(e,n,r),i),!0)},ac),R2=Rn(function(t,e,r,n,i){return t.h===2&&(Ur(t,Zi(e,n,r),i),!0)},ac),xn=Symbol(),lo=Symbol(),Ns=Symbol(),Cs=Symbol(),Qr,Jr;function be(t,e,r,n){var i=n[t];if(i)return i;(i={}).Ma=n,i.T=function(h){switch(typeof h){case"boolean":return ja||(ja=[0,void 0,!0]);case"number":return h>0?void 0:h===0?v2||(v2=[0,void 0]):[-h,void 0];case"string":return[0,h];case"object":return h}}(n[0]);var o=n[1];let s=1;o&&o.constructor===Object&&(i.ga=o,typeof(o=n[++s])=="function"&&(i.la=!0,Qr!=null||(Qr=o),Jr!=null||(Jr=n[s+1]),o=n[s+=2]));let a={};for(;o&&Array.isArray(o)&&o.length&&typeof o[0]=="number"&&o[0]>0;){for(var c=0;c<o.length;c++)a[o[c]]=o;o=n[++s]}for(c=1;o!==void 0;){let h;typeof o=="number"&&(c+=o,o=n[++s]);var u=void 0;if(o instanceof nr?h=o:(h=w2,s--),h==null?void 0:h.l){o=n[++s],u=n;var l=s;typeof o=="function"&&(o=o(),u[l]=o),u=o}for(l=c+1,typeof(o=n[++s])=="number"&&o<0&&(l-=o,o=n[++s]);c<l;c++){let f=a[c];u?r(i,c,h,u,f):e(i,c,h,f)}}return n[t]=i}function cc(t){return Array.isArray(t)?t[0]instanceof nr?t:[R2,t]:[t,void 0]}function uc(t,e){return t instanceof d?t.u:Array.isArray(t)?de(t,e,!1):void 0}function fo(t,e,r,n){let i=r.g;t[e]=n?(o,s,a)=>i(o,s,a,n):i}function po(t,e,r,n,i){let o=r.g,s,a;t[e]=(c,u,l)=>o(c,u,l,a||(a=be(lo,fo,po,n).T),s||(s=go(n)),i)}function go(t){let e=t[Ns];if(e!=null)return e;let r=be(lo,fo,po,t);return e=r.la?(n,i)=>Qr(n,i,r):(n,i)=>{let o=0|n[_];for(;tc(i)&&i.h!=4;){var s=i.m,a=r[s];if(a==null){var c=r.ga;c&&(c=c[s])&&(c=x2(c))!=null&&(a=r[s]=c)}a!=null&&a(i,n,s)||(s=(a=i).l,qr(a),a.fa?a=void 0:(c=a.g.g-s,a.g.g=s,a=Za(a.g,c)),s=n,a&&((c=s[je])?c.push(a):s[je]=[a]))}return 8192&o&&Je(n),!0},t[Ns]=e}function x2(t){let e=(t=cc(t))[0].g;if(t=t[1]){let r=go(t),n=be(lo,fo,po,t).T;return(i,o,s)=>e(i,o,s,n,r)}return e}function On(t,e,r){t[e]=r.h}function bn(t,e,r,n){let i,o,s=r.h;t[e]=(a,c,u)=>s(a,c,u,o||(o=be(xn,On,bn,n).T),i||(i=hc(n)))}function hc(t){let e=t[Cs];if(!e){let r=be(xn,On,bn,t);e=(n,i)=>lc(n,i,r),t[Cs]=e}return e}function lc(t,e,r){(function(n,i,o){let s=512&i?0:-1,a=n.length,c=a+((i=64&i?256&i:!!a&&dn(n[a-1]))?-1:0);for(let u=0;u<c;u++)o(u-s,n[u]);if(i){n=n[a-1];for(let u in n)!isNaN(u)&&o(+u,n[u])}})(t,0|t[_]|(r.T[1]?512:0),(n,i)=>{if(i!=null){var o=function(s,a){var c=s[a];if(c)return c;if((c=s.ga)&&(c=c[a])){var u=(c=cc(c))[0].h;if(c=c[1]){let l=hc(c),h=be(xn,On,bn,c).T;c=s.la?Jr(h,l):(f,v,A)=>u(f,v,A,h,l)}else c=u;return s[a]=c}}(r,n);o&&o(e,i,n)}}),(t=Gi(t))&&function(n,i){$e(n,n.g.end());for(let o=0;o<i.length;o++)$e(n,Pi(i[o])||new Uint8Array(0))}(e,t)}function ir(t,e){if(Array.isArray(e)){var r=0|e[_];if(4&r)return e;for(var n=0,i=0;n<e.length;n++){let o=t(e[n]);o!=null&&(e[i++]=o)}return i<n&&(e.length=i),Y(e,-6145&(5|r)),2&r&&Object.freeze(e),e}}function ct(t,e,r){return new nr(t,e,r)}function or(t,e,r){return new nr(t,e,r)}function ut(t,e,r){H(t,0|t[_],e,r)}var O2=Rn(function(t,e,r,n,i){return t.h===2&&(t=Ur(t,de([void 0,void 0],n,!0),i),Ee(n=0|e[_]),(i=ie(e,n,r))instanceof zt?(2&i.M)!=0?((i=i.da()).push(t),H(e,n,r,i)):i.Ja(t):Array.isArray(i)?(2&(0|i[_])&&H(e,n,r,i=$a(i)),i.push(t)):H(e,n,r,[t]),!0)},function(t,e,r,n,i){if(e instanceof zt)e.forEach((o,s)=>{an(t,r,de([s,o],n,!1),i)});else if(Array.isArray(e))for(let o=0;o<e.length;o++){let s=e[o];Array.isArray(s)&&an(t,r,de(s,n,!1),i)}});function fc(t,e,r){if(e=function(n){if(n==null)return n;let i=typeof n;if(i==="bigint")return String(xr(64,n));if(Or(n)){if(i==="string")return Va(n);if(i==="number")return $i(n)}}(e),e!=null&&(typeof e=="string"&&Ls(e),e!=null))switch(St(t,r,0),typeof e){case"number":t=t.g,Oe(e),Pe(t,U,W);break;case"bigint":r=BigInt.asUintN(64,e),r=new Ii(Number(r&BigInt(4294967295)),Number(r>>BigInt(32))),Pe(t.g,r.h,r.g);break;default:r=Ls(e),Pe(t.g,r.h,r.g)}}function pc(t,e,r){(e=Ze(e))!=null&&e!=null&&(St(t,r,0),In(t.g,e))}function dc(t,e,r){(e=Ma(e))!=null&&(St(t,r,0),t.g.g.push(e?1:0))}function gc(t,e,r){(e=ze(e))!=null&&wn(t,r,Sa(e))}function mc(t,e,r,n,i){an(t,r,uc(e,n),i)}function _c(t,e,r){e==null||typeof e=="string"||e instanceof te||(Re(e)?Re(e)&&Fi(Na):e=void 0),e!=null&&wn(t,r,eo(e).buffer)}function yc(t,e,r){return(t.h===5||t.h===2)&&(e=er(e,0|e[_],r,!1),t.h==2?Sn(t,Ai,e):e.push(Ai(t.g)),!0)}var qt=ct(function(t,e,r){if(t.h!==1)return!1;var n=t.g;t=Ti(n);let i=Ti(n);n=2*(i>>31)+1;let o=i>>>20&2047;return t=4294967296*(1048575&i)+t,ut(e,r,o==2047?t?NaN:n*(1/0):o==0?5e-324*n*t:n*Math.pow(2,o-1075)*(t+4503599627370496)),!0},function(t,e,r){(e=ve(e))!=null&&(St(t,r,1),t=t.g,(r=Da||(Da=new DataView(new ArrayBuffer(8)))).setFloat64(0,+e,!0),U=r.getUint32(0,!0),W=r.getUint32(4,!0),Lr(t,U),Lr(t,W))},Pt()),q=ct(function(t,e,r){return t.h===5&&(ut(e,r,Ai(t.g)),!0)},function(t,e,r){(e=ve(e))!=null&&(St(t,r,5),t=t.g,ji(e),Lr(t,U))},ho),b2=or(yc,function(t,e,r){if((e=ir(ve,e))!=null)for(let s=0;s<e.length;s++){var n=t,i=r,o=e[s];o!=null&&(St(n,i,5),n=n.g,ji(o),Lr(n,U))}},ho),mo=or(yc,function(t,e,r){if((e=ir(ve,e))!=null&&e.length){St(t,r,2),rr(t.g,4*e.length);for(let n=0;n<e.length;n++)r=t.g,ji(e[n]),Lr(r,U)}},ho),_e=ct(function(t,e,r){return t.h===0&&(ut(e,r,ro(t.g,zi)),!0)},fc,ic),ai=ct(function(t,e,r){return t.h===0&&(ut(e,r,(t=ro(t.g,zi))===0?void 0:t),!0)},fc,ic),L2=ct(function(t,e,r){return t.h===0&&(ut(e,r,ro(t.g,Hi)),!0)},function(t,e,r){if((e=h2(e))!=null&&(typeof e=="string"&&bs(e),e!=null))switch(St(t,r,0),typeof e){case"number":t=t.g,Oe(e),Pe(t,U,W);break;case"bigint":r=BigInt.asUintN(64,e),r=new Si(Number(r&BigInt(4294967295)),Number(r>>BigInt(32))),Pe(t.g,r.h,r.g);break;default:r=bs(e),Pe(t.g,r.h,r.g)}},Pt()),$=ct(function(t,e,r){return t.h===0&&(ut(e,r,me(t.g)),!0)},pc,uo),Ln=or(function(t,e,r){return(t.h===0||t.h===2)&&(e=er(e,0|e[_],r,!1),t.h==2?Sn(t,me,e):e.push(me(t.g)),!0)},function(t,e,r){if((e=ir(Ze,e))!=null&&e.length){r=oo(t,r);for(let n=0;n<e.length;n++)In(t.g,e[n]);so(t,r)}},uo),Me=ct(function(t,e,r){return t.h===0&&(ut(e,r,(t=me(t.g))===0?void 0:t),!0)},pc,uo),V=ct(function(t,e,r){return t.h===0&&(ut(e,r,no(t.g)),!0)},dc,rc),Fe=ct(function(t,e,r){return t.h===0&&(ut(e,r,(t=no(t.g))===!1?void 0:t),!0)},dc,rc),it=or(function(t,e,r){return t.h===2&&(t=io(t),er(e,0|e[_],r,!1).push(t),!0)},function(t,e,r){if((e=ir(ze,e))!=null)for(let s=0;s<e.length;s++){var n=t,i=r,o=e[s];o!=null&&wn(n,i,Sa(o))}},co),le=ct(function(t,e,r){return t.h===2&&(ut(e,r,(t=io(t))===""?void 0:t),!0)},gc,co),L=ct(function(t,e,r){return t.h===2&&(ut(e,r,io(t)),!0)},gc,co),tt=function(t,e,r=ao){return new nr(t,e,r)}(function(t,e,r,n,i){return t.h===2&&(n=de(void 0,n,!0),er(e,0|e[_],r,!0).push(n),Ur(t,n,i),!0)},function(t,e,r,n,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)mc(t,e[o],r,n,i)}),b=Rn(function(t,e,r,n,i,o){return t.h===2&&(Ka(e,0|e[_],o,r),Ur(t,e=Zi(e,n,r),i),!0)},mc),Ec=ct(function(t,e,r){return t.h===2&&(ut(e,r,ec(t)),!0)},_c,oc),N2=or(function(t,e,r){return(t.h===0||t.h===2)&&(e=er(e,0|e[_],r,!1),t.h==2?Sn(t,ne,e):e.push(ne(t.g)),!0)},function(t,e,r){if((e=ir(Pa,e))!=null)for(let s=0;s<e.length;s++){var n=t,i=r,o=e[s];o!=null&&(St(n,i,0),rr(n.g,o))}},nc),C2=ct(function(t,e,r){return t.h===0&&(ut(e,r,(t=ne(t.g))===0?void 0:t),!0)},function(t,e,r){(e=Pa(e))!=null&&e!=null&&(St(t,r,0),rr(t.g,e))},nc),Tt=ct(function(t,e,r){return t.h===0&&(ut(e,r,me(t.g)),!0)},function(t,e,r){(e=Ze(e))!=null&&(e=parseInt(e,10),St(t,r,0),In(t.g,e))},sc),wi=class{constructor(e,r){this.h=e,this.g=r,this.l=R,this.m=E,this.defaultValue=void 0}register(){hn(this)}};function Ft(t,e){return new wi(t,e)}function Te(t,e){return(r,n)=>{if(zr.length){let o=zr.pop();o.o(n),si(o.g,r,n),r=o}else r=new class{constructor(o,s){if(Os.length){let a=Os.pop();si(a,o,s),o=a}else o=new class{constructor(a,c){this.h=null,this.m=!1,this.g=this.l=this.j=0,si(this,a,c)}clear(){this.h=null,this.m=!1,this.g=this.l=this.j=0,this.aa=!1}}(o,s);this.g=o,this.l=this.g.g,this.h=this.m=-1,this.o(s)}o({fa:o=!1}={}){this.fa=o}}(r,n);try{let o=new t,s=o.u;go(e)(s,r);var i=o}finally{r.g.clear(),r.m=-1,r.h=-1,zr.length<100&&zr.push(r)}return i}}function Nn(t){return function(){let e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){let s=this.g;return this.g=[],s}}}};lc(this.u,e,be(xn,On,bn,t)),$e(e,e.g.end());let r=new Uint8Array(e.h),n=e.l,i=n.length,o=0;for(let s=0;s<i;s++){let a=n[s];r.set(a,o),o+=a.length}return e.l=[r],r}}var Us=class extends d{constructor(t){super(t)}},Ds=[0,le,ct(function(t,e,r){return t.h===2&&(ut(e,r,(t=ec(t))===xe()?void 0:t),!0)},function(t,e,r){if(e!=null){if(e instanceof d){let n=e.Oa;return void(n&&(e=n(e),e!=null&&wn(t,r,eo(e).buffer)))}if(Array.isArray(e))return}_c(t,e,r)},oc)],ci,ks=globalThis.trustedTypes;function Ms(t){ci===void 0&&(ci=function(){let r=null;if(!ks)return r;try{let n=i=>i;r=ks.createPolicy("goog#html",{createHTML:n,createScript:n,createScriptURL:n})}catch(n){}return r}());var e=ci;return new class{constructor(r){this.g=r}toString(){return this.g+""}}(e?e.createScriptURL(t):t)}function U2(t,...e){if(e.length===0)return Ms(t[0]);let r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return Ms(r)}var vc=[0,$,Tt,V,-1,Ln,Tt,-1],D2=class extends d{constructor(t){super(t)}},Tc=[0,V,L,V,Tt,-1,or(function(t,e,r){return(t.h===0||t.h===2)&&(e=er(e,0|e[_],r,!1),t.h==2?Sn(t,A2,e):e.push(me(t.g)),!0)},function(t,e,r){if((e=ir(Ze,e))!=null&&e.length){r=oo(t,r);for(let n=0;n<e.length;n++)In(t.g,e[n]);so(t,r)}},sc),L,-1,[0,V,-1],Tt,V,-1],Ac=[0,L,-2],Ps=class extends d{constructor(t){super(t)}},Sc=[0],Ic=[0,$,V,1,V,-3],At=class extends d{constructor(t){super(t,2)}},Q={};Q[336783863]=[0,L,V,-1,$,[0,[1,2,3,4,5,6,7,8,9],b,Sc,b,Tc,b,Ac,b,Ic,b,vc,b,[0,L,-2],b,[0,L,Tt],b,[0,Tt,L,-1],b,[0,Tt,-1]],[0,L],V,[0,[1,3],[2,4],b,[0,Ln],-1,b,[0,it],-1,tt,[0,L,-1]],L];var Fs=[0,ai,-1,Fe,-3,ai,Ln,le,Me,ai,-1,Fe,Me,Fe,-2,le];function It(t,e){vi(t,2,tr(e),"")}function M(t,e){An(t,3,e)}function w(t,e){An(t,4,e)}var at=class extends d{constructor(t){super(t,500)}o(t){return E(this,0,7,t)}},Sr=[-1,{}],Bs=[0,L,1,Sr],Vs=[0,L,it,Sr];function wt(t,e){on(t,1,at,e)}function P(t,e){An(t,10,e)}function x(t,e){An(t,15,e)}var mt=class extends d{constructor(t){super(t,500)}o(t){return E(this,0,1001,t)}},wc=[-500,tt,[-500,le,-1,it,-3,[-2,Q,V],tt,Ds,Me,-1,Bs,Vs,tt,[0,le,Fe],le,Fs,Me,it,987,it],4,tt,[-500,L,-1,[-1,{}],998,L],tt,[-500,L,it,-1,[-2,{},V],997,it,-1],Me,tt,[-500,L,it,Sr,998,it],it,Me,Bs,Vs,tt,[0,le,-1,Sr],it,-2,Fs,le,-1,Fe,[0,Fe,C2],978,Sr,tt,Ds];mt.prototype.g=Nn(wc);var k2=Te(mt,wc),M2=class extends d{constructor(t){super(t)}},Rc=class extends d{constructor(t){super(t)}g(){return re(this,M2,1)}},xc=[0,tt,[0,$,q,L,-1]],Cn=Te(Rc,xc),P2=class extends d{constructor(t){super(t)}},F2=class extends d{constructor(t){super(t)}},ui=class extends d{constructor(t){super(t)}h(){return R(this,P2,2)}g(){return re(this,F2,5)}},Oc=Te(class extends d{constructor(t){super(t)}},[0,it,Ln,mo,[0,Tt,[0,$,-3],[0,q,-3],[0,$,-1,[0,tt,[0,$,-2]]],tt,[0,q,-1,L,q]],L,-1,_e,tt,[0,$,q],it,_e]),bc=class extends d{constructor(t){super(t)}},Be=Te(class extends d{constructor(t){super(t)}},[0,tt,[0,q,-4]]),Lc=class extends d{constructor(t){super(t)}},Dr=Te(class extends d{constructor(t){super(t)}},[0,tt,[0,q,-4]]),B2=class extends d{constructor(t){super(t)}},V2=[0,$,-1,mo,Tt],Nc=class extends d{constructor(t){super(t)}};Nc.prototype.g=Nn([0,q,-4,_e]);var G2=class extends d{constructor(t){super(t)}},j2=Te(class extends d{constructor(t){super(t)}},[0,tt,[0,1,$,L,xc],_e]),Gs=class extends d{constructor(t){super(t)}},H2=class extends d{constructor(t){super(t)}ma(){let t=Wa(this);return t==null?xe():t}},z2=class extends d{constructor(t){super(t)}},Cc=[1,2],W2=Te(class extends d{constructor(t){super(t)}},[0,tt,[0,Cc,b,[0,mo],b,[0,Ec],$,L],_e]),_o=class extends d{constructor(t){super(t)}},Uc=[0,L,$,q,it,-1],js=class extends d{constructor(t){super(t)}},$2=[0,V,-1],Hs=class extends d{constructor(t){super(t)}},Zr=[1,2,3,4,5],cn=class extends d{constructor(t){super(t)}g(){return Wa(this)!=null}h(){return Ct(this,2)!=null}},G=class extends d{constructor(t){super(t)}g(){var t;return(t=Ma(We(this,2)))!=null?t:!1}},Dc=[0,Ec,L,[0,$,_e,-1],[0,L2,_e]],X=[0,Dc,V,[0,Zr,b,Ic,b,Tc,b,vc,b,Sc,b,Ac],Tt],Un=class extends d{constructor(t){super(t)}},yo=[0,X,q,-1,$],K2=Ft(502141897,Un);Q[502141897]=yo;var X2=Te(class extends d{constructor(t){super(t)}},[0,[0,Tt,-1,b2,N2],V2]),kc=class extends d{constructor(t){super(t)}},Mc=class extends d{constructor(t){super(t)}},Eo=[0,X,q,[0,X],V],Pc=[0,X,yo,Eo,q,[0,[0,Dc]]],Y2=Ft(508968150,Mc);Q[508968150]=Pc,Q[508968149]=Eo;var Fc=class extends d{constructor(t){super(t)}},q2=Ft(513916220,Fc);Q[513916220]=[0,X,Pc,$];var De=class extends d{constructor(t){super(t)}h(){return R(this,_o,2)}g(){k(this,2)}},Bc=[0,X,Uc];Q[478825465]=Bc;var Q2=class extends d{constructor(t){super(t)}},Vc=class extends d{constructor(t){super(t)}},vo=class extends d{constructor(t){super(t)}},To=class extends d{constructor(t){super(t)}},Gc=class extends d{constructor(t){super(t)}},zs=[0,X,[0,X],Bc,-1],jc=[0,X,q,$],Ao=[0,X,q],Hc=[0,X,jc,Ao,q],J2=Ft(479097054,Gc);Q[479097054]=[0,X,Hc,zs],Q[463370452]=zs,Q[464864288]=jc;var Z2=Ft(462713202,To);Q[462713202]=Hc,Q[474472470]=Ao;var th=class extends d{constructor(t){super(t)}},zc=class extends d{constructor(t){super(t)}},Wc=class extends d{constructor(t){super(t)}},$c=class extends d{constructor(t){super(t)}},So=[0,X,q,-1,$],Ri=[0,X,q,V];$c.prototype.g=Nn([0,X,Ao,[0,X],yo,Eo,So,Ri]);var Kc=class extends d{constructor(t){super(t)}},eh=Ft(456383383,Kc);Q[456383383]=[0,X,Uc];var Xc=class extends d{constructor(t){super(t)}},rh=Ft(476348187,Xc);Q[476348187]=[0,X,$2];var Yc=class extends d{constructor(t){super(t)}},Ws=class extends d{constructor(t){super(t)}},qc=[0,Tt,-1],nh=Ft(458105876,class extends d{constructor(t){super(t)}g(){var t=this.u;let e=0|t[_],r=2&e;return t=function(n,i,o){var s=Ws;let a=2&i,c=!1;if(o==null){if(a)return xs();o=[]}else if(o.constructor===zt){if((2&o.M)==0||a)return o;o=o.da()}else Array.isArray(o)?c=!!(2&(0|o[_])):o=[];if(a){if(!o.length)return xs();c||(c=!0,Je(o))}else c&&(c=!1,o=$a(o));return c||(64&(0|o[_])?o[_]&=-33:32&i&&fn(o,32)),H(n,i,2,s=new zt(o,s,l2,void 0)),s}(t,e,ie(t,e,2)),!r&&Ws&&(t.pa=!0),t}});Q[458105876]=[0,qc,O2,[!0,_e,[0,L,-1,it]]];var Io=class extends d{constructor(t){super(t)}},Qc=Ft(458105758,Io);Q[458105758]=[0,X,L,qc];var Jc=class extends d{constructor(t){super(t)}},ih=Ft(443442058,Jc);Q[443442058]=[0,X,L,$,q,it,-1,V,q],Q[514774813]=So;var Zc=class extends d{constructor(t){super(t)}},oh=Ft(516587230,Zc);function xi(t,e){return e=e?e.clone():new _o,t.displayNamesLocale!==void 0?k(e,1,tr(t.displayNamesLocale)):t.displayNamesLocale===void 0&&k(e,1),t.maxResults!==void 0?Wt(e,2,t.maxResults):"maxResults"in t&&k(e,2),t.scoreThreshold!==void 0?g(e,3,t.scoreThreshold):"scoreThreshold"in t&&k(e,3),t.categoryAllowlist!==void 0?sn(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&k(e,4),t.categoryDenylist!==void 0?sn(e,5,t.categoryDenylist):"categoryDenylist"in t&&k(e,5),e}function wo(t,e=-1,r=""){return{categories:t.map(n=>{var i,o,s,a,c,u,l;return{index:(o=(i=Nt(n,1))!=null?i:0)!=null?o:-1,score:(s=K(n,2))!=null?s:0,categoryName:(c=(a=Ct(n,3))!=null?a:"")!=null?c:"",displayName:(l=(u=Ct(n,4))!=null?u:"")!=null?l:""}}),headIndex:e,headName:r}}function t1(t){var s,a,c,u,l,h,f,v,A,S,F,D,rt;var e=Ie(t,3,ve,Se()),r=Ie(t,2,Ze,Se()),n=Ie(t,1,ze,Se()),i=Ie(t,9,ze,Se());let o={categories:[],keypoints:[]};for(let N=0;N<e.length;N++)o.categories.push({score:e[N],index:(s=r[N])!=null?s:-1,categoryName:(a=n[N])!=null?a:"",displayName:(c=i[N])!=null?c:""});if((e=(u=R(t,ui,4))==null?void 0:u.h())&&(o.boundingBox={originX:(l=Nt(e,1))!=null?l:0,originY:(h=Nt(e,2))!=null?h:0,width:(f=Nt(e,3))!=null?f:0,height:(v=Nt(e,4))!=null?v:0,angle:0}),(A=R(t,ui,4))==null?void 0:A.g().length)for(let N of R(t,ui,4).g())o.keypoints.push({x:(S=Yr(N,1))!=null?S:0,y:(F=Yr(N,2))!=null?F:0,score:(D=Yr(N,4))!=null?D:0,label:(rt=Ct(N,3))!=null?rt:""});return o}function Dn(t){var r,n,i,o;let e=[];for(let s of re(t,Lc,1))e.push({x:(r=K(s,1))!=null?r:0,y:(n=K(s,2))!=null?n:0,z:(i=K(s,3))!=null?i:0,visibility:(o=K(s,4))!=null?o:0});return e}function Ir(t){var r,n,i,o;let e=[];for(let s of re(t,bc,1))e.push({x:(r=K(s,1))!=null?r:0,y:(n=K(s,2))!=null?n:0,z:(i=K(s,3))!=null?i:0,visibility:(o=K(s,4))!=null?o:0});return e}function $s(t){return Array.from(t,e=>e>127?e-256:e)}function Ks(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let r=0,n=0,i=0;for(let o=0;o<t.length;o++)r+=t[o]*e[o],n+=t[o]*t[o],i+=e[o]*e[o];if(n<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*i)}var Wr;Q[516587230]=[0,X,So,Ri,q],Q[518928384]=Ri;var sh=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]);function e1(){return C(this,null,function*(){if(Wr===void 0)try{yield WebAssembly.instantiate(sh),Wr=!0}catch(t){Wr=!1}return Wr})}function _r(r){return C(this,arguments,function*(t,e=U2``){let n=(yield e1())?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}})}var Qt=class{};function r1(){var t=navigator;return typeof OffscreenCanvas!="undefined"&&(!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))}function Xs(t){return C(this,null,function*(){if(typeof importScripts!="function"){let e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((r,n)=>{e.addEventListener("load",()=>{r()},!1),e.addEventListener("error",i=>{n(i)},!1),document.body.appendChild(e)})}importScripts(t.toString())})}function n1(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 m(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function Ys(t,e,r){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(r?t.i._bindTextureToStream(r):t.i._bindTextureToCanvas(),!(r=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&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);let[n,i]=n1(e);return!t.l||n===t.i.canvas.width&&i===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=i),[n,i]}function qs(t,e,r){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");let n=new Uint32Array(e.length);for(let i=0;i<e.length;i++)n[i]=t.i.stringToNewUTF8(e[i]);e=t.i._malloc(4*n.length),t.i.HEAPU32.set(n,e>>2),r(e);for(let i of n)t.i._free(i);t.i._free(e)}function Vt(t,e,r){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=r}function ue(t,e,r){let n=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(i,o,s)=>{o?(r(n,s),n=[]):n.push(i)}}Qt.forVisionTasks=function(t){return _r("vision",t)},Qt.forTextTasks=function(t){return _r("text",t)},Qt.forGenAiExperimentalTasks=function(t){return _r("genai_experimental",t)},Qt.forGenAiTasks=function(t){return _r("genai",t)},Qt.forAudioTasks=function(t){return _r("audio",t)},Qt.isSimdSupported=function(){return e1()};function ah(t,e,r,n){return C(this,null,function*(){return t=yield((i,o,s,a,c)=>C(this,null,function*(){if(o&&(yield Xs(o)),!self.ModuleFactory||s&&(yield Xs(s),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&c&&((o=self.Module).locateFile=c.locateFile,c.mainScriptUrlOrBlob&&(o.mainScriptUrlOrBlob=c.mainScriptUrlOrBlob)),c=yield self.ModuleFactory(self.Module||c),self.ModuleFactory=self.Module=void 0,new i(c,a)}))(t,r.wasmLoaderPath,r.assetLoaderPath,e,{locateFile:i=>i.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&i.endsWith(".data")?r.assetBinaryPath.toString():i}),yield t.o(n),t})}function hi(t,e){let r=R(t.baseOptions,cn,1)||new cn;typeof e=="string"?(k(r,2,tr(e)),k(r,1)):e instanceof Uint8Array&&(k(r,1,Vi(e,!1)),k(r,2)),E(t.baseOptions,0,1,r)}function Qs(t){try{let e=t.G.length;if(e===1)throw Error(t.G[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.G.map(r=>r.message).join(", "))}finally{t.G=[]}}function p(t,e){t.B=Math.max(t.B,e)}function kn(t,e){t.A=new at,It(t.A,"PassThroughCalculator"),M(t.A,"free_memory"),w(t.A,"free_memory_unused_out"),P(e,"free_memory"),wt(e,t.A)}function Ke(t,e){M(t.A,e),w(t.A,e+"_unused_out")}function Mn(t){t.g.addBoolToStream(!0,"free_memory",t.B)}var Oi=class{constructor(t){this.g=t,this.G=[],this.B=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){var r,n,i,o,s,a;if(e){let c=t.baseOptions||{};if((r=t.baseOptions)!=null&&r.modelAssetBuffer&&((n=t.baseOptions)!=null&&n.modelAssetPath))throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((i=R(this.baseOptions,cn,1))!=null&&i.g()||(o=R(this.baseOptions,cn,1))!=null&&o.h()||(s=t.baseOptions)!=null&&s.modelAssetBuffer||(a=t.baseOptions)!=null&&a.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(u,l){let h=R(u.baseOptions,Hs,3);if(!h){var f=h=new Hs,v=new Ps;Ar(f,4,Zr,v)}"delegate"in l&&(l.delegate==="GPU"?(l=h,f=new D2,Ar(l,2,Zr,f)):(l=h,f=new Ps,Ar(l,4,Zr,f))),E(u.baseOptions,0,3,h)}(this,c),c.modelAssetPath)return fetch(c.modelAssetPath.toString()).then(u=>{if(u.ok)return u.arrayBuffer();throw Error(`Failed to fetch model: ${c.modelAssetPath} (${u.status})`)}).then(u=>{try{this.g.i.FS_unlink("/model.dat")}catch(l){}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(u),!0,!1,!1),hi(this,"/model.dat"),this.m(),this.J()});if(c.modelAssetBuffer instanceof Uint8Array)hi(this,c.modelAssetBuffer);else if(c.modelAssetBuffer)return function(u){return C(this,null,function*(){let l=[];for(var h=0;;){let{done:f,value:v}=yield u.read();if(f)break;l.push(v),h+=v.length}if(l.length===0)return new Uint8Array(0);if(l.length===1)return l[0];u=new Uint8Array(h),h=0;for(let f of l)u.set(f,h),h+=f.length;return u})}(c.modelAssetBuffer).then(u=>{hi(this,u),this.m(),this.J()})}return this.m(),this.J(),Promise.resolve()}J(){}ca(){let t;if(this.g.ca(e=>{t=k2(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener((r,n)=>{this.G.push(Error(n))}),this.g.Ha(),this.g.setGraph(t,e),this.A=void 0,Qs(this)}finishProcessing(){this.g.finishProcessing(),Qs(this)}close(){this.A=void 0,this.g.closeGraph()}};function st(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Oi.prototype.close=Oi.prototype.close;var bi=class{constructor(e,r,n,i){this.g=e,this.h=r,this.m=n,this.l=i}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}};function Js(t,e,r){let n=t.g;if(r=st(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(t.h,r),r}function Zs(t,e){let r=t.g,n=st(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);let i=st(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,i),r.enableVertexAttribArray(t.P),r.vertexAttribPointer(t.P,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);let o=st(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,o),r.enableVertexAttribArray(t.J),r.vertexAttribPointer(t.J,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new bi(r,n,i,o)}function Ro(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function kr(t,e,r,n){return Ro(t,e),t.h||(t.m(),t.C()),r?(t.s||(t.s=Zs(t,!0)),r=t.s):(t.v||(t.v=Zs(t,!1)),r=t.v),e.useProgram(t.h),r.bind(),t.l(),t=n(),r.g.bindVertexArray(null),t}function ye(t,e,r){return Ro(t,e),t=st(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,r!=null?r:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r!=null?r:e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function Pn(t,e,r){Ro(t,e),t.A||(t.A=st(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.A),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}function xo(t){var e;(e=t.g)==null||e.bindFramebuffer(t.g.FRAMEBUFFER,null)}var sr=class{G(){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(){let t=this.g;if(this.h=st(t.createProgram(),"Failed to create WebGL program"),this.Z=Js(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.Y=Js(this,this.G(),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.P=t.getAttribLocation(this.h,"aVertex"),this.J=t.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){let t=this.g;t.deleteProgram(this.h),t.deleteShader(this.Z),t.deleteShader(this.Y)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}},ch=class extends sr{G(){return`
16
+ precision mediump float;
17
+ uniform sampler2D backgroundTexture;
18
+ uniform sampler2D maskTexture;
19
+ uniform sampler2D colorMappingTexture;
20
+ varying vec2 vTex;
21
+ void main() {
22
+ vec4 backgroundColor = texture2D(backgroundTexture, vTex);
23
+ float category = texture2D(maskTexture, vTex).r;
24
+ vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));
25
+ gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);
26
+ }
27
+ `}C(){let t=this.g;t.activeTexture(t.TEXTURE1),this.B=ye(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.j=ye(this,t,t.NEAREST)}m(){super.m();let t=this.g;this.L=st(t.getUniformLocation(this.h,"backgroundTexture"),"Uniform location"),this.U=st(t.getUniformLocation(this.h,"colorMappingTexture"),"Uniform location"),this.K=st(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();let t=this.g;t.uniform1i(this.K,0),t.uniform1i(this.L,1),t.uniform1i(this.U,2)}close(){this.B&&this.g.deleteTexture(this.B),this.j&&this.g.deleteTexture(this.j),super.close()}},uh=class extends sr{G(){return`
28
+ precision mediump float;
29
+ uniform sampler2D maskTexture;
30
+ uniform sampler2D defaultTexture;
31
+ uniform sampler2D overlayTexture;
32
+ varying vec2 vTex;
33
+ void main() {
34
+ float confidence = texture2D(maskTexture, vTex).r;
35
+ vec4 defaultColor = texture2D(defaultTexture, vTex);
36
+ vec4 overlayColor = texture2D(overlayTexture, vTex);
37
+ // Apply the alpha from the overlay and merge in the default color
38
+ overlayColor = mix(defaultColor, overlayColor, overlayColor.a);
39
+ gl_FragColor = mix(defaultColor, overlayColor, confidence);
40
+ }
41
+ `}C(){let t=this.g;t.activeTexture(t.TEXTURE1),this.j=ye(this,t),t.activeTexture(t.TEXTURE2),this.B=ye(this,t)}m(){super.m();let t=this.g;this.K=st(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.L=st(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.H=st(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();let t=this.g;t.uniform1i(this.H,0),t.uniform1i(this.K,1),t.uniform1i(this.L,2)}close(){this.j&&this.g.deleteTexture(this.j),this.B&&this.g.deleteTexture(this.B),super.close()}};function Jt(t,e){switch(e){case 0:return t.g.find(r=>r instanceof Uint8Array);case 1:return t.g.find(r=>r instanceof Float32Array);case 2:return t.g.find(r=>typeof WebGLTexture!="undefined"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function Li(t){var e=Jt(t,1);if(!e){if(e=Jt(t,0))e=new Float32Array(e).map(n=>n/255);else{e=new Float32Array(t.width*t.height);let n=Xe(t);var r=Oo(t);if(Pn(r,n,i1(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){r=new Float32Array(t.width*t.height*4),n.readPixels(0,0,t.width,t.height,n.RGBA,n.FLOAT,r);for(let i=0,o=0;i<e.length;++i,o+=4)e[i]=r[o]}else n.readPixels(0,0,t.width,t.height,n.RED,n.FLOAT,e)}t.g.push(e)}return e}function i1(t){let e=Jt(t,2);if(!e){let r=Xe(t);e=s1(t);let n=Li(t),i=o1(t);r.texImage2D(r.TEXTURE_2D,0,i,t.width,t.height,0,r.RED,r.FLOAT,n),Ni(t)}return e}function Xe(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=st(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function o1(t){if(t=Xe(t),!$r)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))$r=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");$r=t.R16F}return $r}function Oo(t){return t.l||(t.l=new sr),t.l}function s1(t){let e=Xe(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let r=Jt(t,2);return r||(r=ye(Oo(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(r),t.j=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Ni(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var $r,Z=class{constructor(t,e,r,n,i,o,s){this.g=t,this.m=e,this.j=r,this.canvas=n,this.l=i,this.width=o,this.height=s,this.j&&--ta===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Da(){return!!Jt(this,0)}ja(){return!!Jt(this,1)}R(){return!!Jt(this,2)}ia(){return(e=Jt(t=this,0))||(e=Li(t),e=new Uint8Array(e.map(r=>255*r)),t.g.push(e)),e;var t,e}ha(){return Li(this)}N(){return i1(this)}clone(){let t=[];for(let e of this.g){let r;if(e instanceof Uint8Array)r=new Uint8Array(e);else if(e instanceof Float32Array)r=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{let n=Xe(this),i=Oo(this);n.activeTexture(n.TEXTURE1),r=ye(i,n,this.m?n.LINEAR:n.NEAREST),n.bindTexture(n.TEXTURE_2D,r);let o=o1(this);n.texImage2D(n.TEXTURE_2D,0,o,this.width,this.height,0,n.RED,n.FLOAT,null),n.bindTexture(n.TEXTURE_2D,null),Pn(i,n,r),kr(i,n,!1,()=>{s1(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),Ni(this)}),xo(i),Ni(this)}}t.push(r)}return new Z(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Xe(this).deleteTexture(Jt(this,2)),ta=-1}};Z.prototype.close=Z.prototype.close,Z.prototype.clone=Z.prototype.clone,Z.prototype.getAsWebGLTexture=Z.prototype.N,Z.prototype.getAsFloat32Array=Z.prototype.ha,Z.prototype.getAsUint8Array=Z.prototype.ia,Z.prototype.hasWebGLTexture=Z.prototype.R,Z.prototype.hasFloat32Array=Z.prototype.ja,Z.prototype.hasUint8Array=Z.prototype.Da;var ta=250,hh={color:"white",lineWidth:4,radius:6};function li(t){return Zn(hs(Zn({},hh),{fillColor:(t=t||{}).color}),t)}function Yt(t,e){return t instanceof Function?t(e):t}function ea(t,e,r){return Math.max(Math.min(e,r),Math.min(Math.max(e,r),t))}function yr(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Nr(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function ra(t,e,r){var n;if(e.R())r(e.N());else{let i=e.ja()?e.ha():e.ia();t.m=(n=t.m)!=null?n:new sr;let o=Nr(t);r((t=new Z([i],e.m,!1,o.canvas,t.m,e.width,e.height)).N()),t.close()}}function na(t,e,r,n){let i=function(a){return a.g||(a.g=new ch),a.g}(t),o=Nr(t),s=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;kr(i,o,!0,()=>{(function(c,u,l,h){let f=c.g;if(f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,u),f.activeTexture(f.TEXTURE1),f.bindTexture(f.TEXTURE_2D,c.B),f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,l),c.H&&function(v,A){if(v!==A)return!1;v=v.entries(),A=A.entries();for(let[F,D]of v){v=F;let rt=D;var S=A.next();if(S.done)return!1;let[N,fr]=S.value;if(S=fr,v!==N||rt[0]!==S[0]||rt[1]!==S[1]||rt[2]!==S[2]||rt[3]!==S[3])return!1}return!!A.next().done}(c.H,h))f.activeTexture(f.TEXTURE2),f.bindTexture(f.TEXTURE_2D,c.j);else{c.H=h;let v=Array(1024).fill(0);h.forEach((A,S)=>{if(A.length!==4)throw Error(`Color at index ${S} is not a four-channel value.`);v[4*S]=A[0],v[4*S+1]=A[1],v[4*S+2]=A[2],v[4*S+3]=A[3]}),f.activeTexture(f.TEXTURE2),f.bindTexture(f.TEXTURE_2D,c.j),f.texImage2D(f.TEXTURE_2D,0,f.RGBA,256,1,0,f.RGBA,f.UNSIGNED_BYTE,new Uint8Array(v))}})(i,e,s,n),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.TRIANGLE_FAN,0,4);let a=i.g;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,null),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,null)})}function ia(t,e,r,n){let i=Nr(t),o=function(c){return c.h||(c.h=new uh),c.h}(t),s=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;kr(o,i,!0,()=>{var c=o.g;c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,e),c.activeTexture(c.TEXTURE1),c.bindTexture(c.TEXTURE_2D,o.j),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,s),c.activeTexture(c.TEXTURE2),c.bindTexture(c.TEXTURE_2D,o.B),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,a),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(c=o.g).activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE1),c.bindTexture(c.TEXTURE_2D,null),c.activeTexture(c.TEXTURE2),c.bindTexture(c.TEXTURE_2D,null)})}var ft=class{constructor(t,e){typeof CanvasRenderingContext2D!="undefined"&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}wa(t,e){if(t){var r=yr(this);e=li(e),r.save();var n=r.canvas,i=0;for(let o of t)r.fillStyle=Yt(e.fillColor,{index:i,from:o}),r.strokeStyle=Yt(e.color,{index:i,from:o}),r.lineWidth=Yt(e.lineWidth,{index:i,from:o}),(t=new Path2D).arc(o.x*n.width,o.y*n.height,Yt(e.radius,{index:i,from:o}),0,2*Math.PI),r.fill(t),r.stroke(t),++i;r.restore()}}va(t,e,r){if(t&&e){var n=yr(this);r=li(r),n.save();var i=n.canvas,o=0;for(let s of e){n.beginPath(),e=t[s.start];let a=t[s.end];e&&a&&(n.strokeStyle=Yt(r.color,{index:o,from:e,to:a}),n.lineWidth=Yt(r.lineWidth,{index:o,from:e,to:a}),n.moveTo(e.x*i.width,e.y*i.height),n.lineTo(a.x*i.width,a.y*i.height)),++o,n.stroke()}n.restore()}}sa(t,e){let r=yr(this);e=li(e),r.save(),r.beginPath(),r.lineWidth=Yt(e.lineWidth,{}),r.strokeStyle=Yt(e.color,{}),r.fillStyle=Yt(e.fillColor,{}),r.moveTo(t.originX,t.originY),r.lineTo(t.originX+t.width,t.originY),r.lineTo(t.originX+t.width,t.originY+t.height),r.lineTo(t.originX,t.originY+t.height),r.lineTo(t.originX,t.originY),r.stroke(),r.fill(),r.restore()}ta(t,e,r=[0,0,0,255]){this.l?function(n,i,o,s){let a=Nr(n);ra(n,i,c=>{na(n,c,o,s),(c=yr(n)).drawImage(a.canvas,0,0,c.canvas.width,c.canvas.height)})}(this,t,r,e):na(this,t.N(),r,e)}ua(t,e,r){this.l?function(n,i,o,s){let a=Nr(n);ra(n,i,c=>{ia(n,c,o,s),(c=yr(n)).drawImage(a.canvas,0,0,c.canvas.width,c.canvas.height)})}(this,t,e,r):ia(this,t.N(),e,r)}close(){var t,e,r;(t=this.g)==null||t.close(),this.g=void 0,(e=this.h)==null||e.close(),this.h=void 0,(r=this.m)==null||r.close(),this.m=void 0}};function Ht(t,e){switch(e){case 0:return t.g.find(r=>r instanceof ImageData);case 1:return t.g.find(r=>typeof ImageBitmap!="undefined"&&r instanceof ImageBitmap);case 2:return t.g.find(r=>typeof WebGLTexture!="undefined"&&r instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function a1(t){var e=Ht(t,0);if(!e){e=Ye(t);let r=Fn(t),n=new Uint8Array(t.width*t.height*4);Pn(r,e,tn(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,n),xo(r),e=new ImageData(new Uint8ClampedArray(n.buffer),t.width,t.height),t.g.push(e)}return e}function tn(t){let e=Ht(t,2);if(!e){let r=Ye(t);e=en(t);let n=Ht(t,1)||a1(t);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),vr(t)}return e}function Ye(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=st(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Fn(t){return t.l||(t.l=new sr),t.l}function en(t){let e=Ye(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let r=Ht(t,2);return r||(r=ye(Fn(t),e),t.g.push(r),t.m=!0),e.bindTexture(e.TEXTURE_2D,r),r}function vr(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function oa(t){let e=Ye(t);return kr(Fn(t),e,!0,()=>function(r,n){let i=r.canvas;if(i.width===r.width&&i.height===r.height)return n();let o=i.width,s=i.height;return i.width=r.width,i.height=r.height,r=n(),i.width=o,i.height=s,r}(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()}))}ft.prototype.close=ft.prototype.close,ft.prototype.drawConfidenceMask=ft.prototype.ua,ft.prototype.drawCategoryMask=ft.prototype.ta,ft.prototype.drawBoundingBox=ft.prototype.sa,ft.prototype.drawConnectors=ft.prototype.va,ft.prototype.drawLandmarks=ft.prototype.wa,ft.lerp=function(t,e,r,n,i){return ea(n*(1-(t-e)/(r-e))+i*(1-(r-t)/(r-e)),n,i)},ft.clamp=ea;var et=class{constructor(t,e,r,n,i,o,s){this.g=t,this.j=e,this.m=r,this.canvas=n,this.l=i,this.width=o,this.height=s,(this.j||this.m)&&--sa===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ca(){return!!Ht(this,0)}ka(){return!!Ht(this,1)}R(){return!!Ht(this,2)}Aa(){return a1(this)}za(){var t=Ht(this,1);return t||(tn(this),en(this),t=oa(this),vr(this),this.g.push(t),this.j=!0),t}N(){return tn(this)}clone(){let t=[];for(let e of this.g){let r;if(e instanceof ImageData)r=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){let n=Ye(this),i=Fn(this);n.activeTexture(n.TEXTURE1),r=ye(i,n),n.bindTexture(n.TEXTURE_2D,r),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,this.width,this.height,0,n.RGBA,n.UNSIGNED_BYTE,null),n.bindTexture(n.TEXTURE_2D,null),Pn(i,n,r),kr(i,n,!1,()=>{en(this),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.TRIANGLE_FAN,0,4),vr(this)}),xo(i),vr(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);tn(this),en(this),r=oa(this),vr(this)}t.push(r)}return new et(t,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ht(this,1).close(),this.m&&Ye(this).deleteTexture(Ht(this,2)),sa=-1}};et.prototype.close=et.prototype.close,et.prototype.clone=et.prototype.clone,et.prototype.getAsWebGLTexture=et.prototype.N,et.prototype.getAsImageBitmap=et.prototype.za,et.prototype.getAsImageData=et.prototype.Aa,et.prototype.hasWebGLTexture=et.prototype.R,et.prototype.hasImageBitmap=et.prototype.ka,et.prototype.hasImageData=et.prototype.Ca;var sa=250;function Bt(...t){return t.map(([e,r])=>({start:e,end:r}))}var lh=function(t){return class extends t{Ha(){this.i._registerModelResourcesGraphService()}}}((aa=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:r1()?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"))}initializeGraph(t){return C(this,null,function*(){let e=yield(yield 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){let r=t.length,n=this.i._malloc(r);this.i.HEAPU8.set(t,n),e?this.i._changeBinaryGraph(r,n):this.i._changeTextGraph(r,n),this.i._free(n)}configureAudio(t,e,r,n,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),m(this,n||"input_audio",o=>{m(this,i=i||"audio_header",s=>{this.i._configureAudio(o,s,t,e!=null?e:0,r)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){Vt(this,"__graph_config__",e=>{t(e)}),m(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,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,i){let o=4*t.length;this.h!==o&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(o),this.h=o),this.i.HEAPF32.set(t,this.g/4),m(this,n,s=>{this.i._addAudioToInputStream(this.g,e,r,s,i)})}addGpuBufferToStream(t,e,r){m(this,e,n=>{let[i,o]=Ys(this,t,n);this.i._addBoundTextureToStream(n,i,o,r)})}addBoolToStream(t,e,r){m(this,e,n=>{this.i._addBoolToInputStream(t,n,r)})}addDoubleToStream(t,e,r){m(this,e,n=>{this.i._addDoubleToInputStream(t,n,r)})}addFloatToStream(t,e,r){m(this,e,n=>{this.i._addFloatToInputStream(t,n,r)})}addIntToStream(t,e,r){m(this,e,n=>{this.i._addIntToInputStream(t,n,r)})}addUintToStream(t,e,r){m(this,e,n=>{this.i._addUintToInputStream(t,n,r)})}addStringToStream(t,e,r){m(this,e,n=>{m(this,t,i=>{this.i._addStringToInputStream(i,n,r)})})}addStringRecordToStream(t,e,r){m(this,e,n=>{qs(this,Object.keys(t),i=>{qs(this,Object.values(t),o=>{this.i._addFlatHashMapToInputStream(i,o,Object.keys(t).length,n,r)})})})}addProtoToStream(t,e,r,n){m(this,r,i=>{m(this,e,o=>{let s=this.i._malloc(t.length);this.i.HEAPU8.set(t,s),this.i._addProtoToInputStream(s,t.length,o,i,n),this.i._free(s)})})}addEmptyPacketToStream(t,e){m(this,t,r=>{this.i._addEmptyPacketToInputStream(r,e)})}addBoolVectorToStream(t,e,r){m(this,e,n=>{let i=this.i._allocateBoolVector(t.length);if(!i)throw Error("Unable to allocate new bool vector on heap.");for(let o of t)this.i._addBoolVectorEntry(i,o);this.i._addBoolVectorToInputStream(i,n,r)})}addDoubleVectorToStream(t,e,r){m(this,e,n=>{let i=this.i._allocateDoubleVector(t.length);if(!i)throw Error("Unable to allocate new double vector on heap.");for(let o of t)this.i._addDoubleVectorEntry(i,o);this.i._addDoubleVectorToInputStream(i,n,r)})}addFloatVectorToStream(t,e,r){m(this,e,n=>{let i=this.i._allocateFloatVector(t.length);if(!i)throw Error("Unable to allocate new float vector on heap.");for(let o of t)this.i._addFloatVectorEntry(i,o);this.i._addFloatVectorToInputStream(i,n,r)})}addIntVectorToStream(t,e,r){m(this,e,n=>{let i=this.i._allocateIntVector(t.length);if(!i)throw Error("Unable to allocate new int vector on heap.");for(let o of t)this.i._addIntVectorEntry(i,o);this.i._addIntVectorToInputStream(i,n,r)})}addUintVectorToStream(t,e,r){m(this,e,n=>{let i=this.i._allocateUintVector(t.length);if(!i)throw Error("Unable to allocate new unsigned int vector on heap.");for(let o of t)this.i._addUintVectorEntry(i,o);this.i._addUintVectorToInputStream(i,n,r)})}addStringVectorToStream(t,e,r){m(this,e,n=>{let i=this.i._allocateStringVector(t.length);if(!i)throw Error("Unable to allocate new string vector on heap.");for(let o of t)m(this,o,s=>{this.i._addStringVectorEntry(i,s)});this.i._addStringVectorToInputStream(i,n,r)})}addBoolToInputSidePacket(t,e){m(this,e,r=>{this.i._addBoolToInputSidePacket(t,r)})}addDoubleToInputSidePacket(t,e){m(this,e,r=>{this.i._addDoubleToInputSidePacket(t,r)})}addFloatToInputSidePacket(t,e){m(this,e,r=>{this.i._addFloatToInputSidePacket(t,r)})}addIntToInputSidePacket(t,e){m(this,e,r=>{this.i._addIntToInputSidePacket(t,r)})}addUintToInputSidePacket(t,e){m(this,e,r=>{this.i._addUintToInputSidePacket(t,r)})}addStringToInputSidePacket(t,e){m(this,e,r=>{m(this,t,n=>{this.i._addStringToInputSidePacket(n,r)})})}addProtoToInputSidePacket(t,e,r){m(this,r,n=>{m(this,e,i=>{let o=this.i._malloc(t.length);this.i.HEAPU8.set(t,o),this.i._addProtoToInputSidePacket(o,t.length,i,n),this.i._free(o)})})}addBoolVectorToInputSidePacket(t,e){m(this,e,r=>{let n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let i of t)this.i._addBoolVectorEntry(n,i);this.i._addBoolVectorToInputSidePacket(n,r)})}addDoubleVectorToInputSidePacket(t,e){m(this,e,r=>{let n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let i of t)this.i._addDoubleVectorEntry(n,i);this.i._addDoubleVectorToInputSidePacket(n,r)})}addFloatVectorToInputSidePacket(t,e){m(this,e,r=>{let n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let i of t)this.i._addFloatVectorEntry(n,i);this.i._addFloatVectorToInputSidePacket(n,r)})}addIntVectorToInputSidePacket(t,e){m(this,e,r=>{let n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let i of t)this.i._addIntVectorEntry(n,i);this.i._addIntVectorToInputSidePacket(n,r)})}addUintVectorToInputSidePacket(t,e){m(this,e,r=>{let n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let i of t)this.i._addUintVectorEntry(n,i);this.i._addUintVectorToInputSidePacket(n,r)})}addStringVectorToInputSidePacket(t,e){m(this,e,r=>{let n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let i of t)m(this,i,o=>{this.i._addStringVectorEntry(n,o)});this.i._addStringVectorToInputSidePacket(n,r)})}attachBoolListener(t,e){Vt(this,t,e),m(this,t,r=>{this.i._attachBoolListener(r)})}attachBoolVectorListener(t,e){ue(this,t,e),m(this,t,r=>{this.i._attachBoolVectorListener(r)})}attachIntListener(t,e){Vt(this,t,e),m(this,t,r=>{this.i._attachIntListener(r)})}attachIntVectorListener(t,e){ue(this,t,e),m(this,t,r=>{this.i._attachIntVectorListener(r)})}attachUintListener(t,e){Vt(this,t,e),m(this,t,r=>{this.i._attachUintListener(r)})}attachUintVectorListener(t,e){ue(this,t,e),m(this,t,r=>{this.i._attachUintVectorListener(r)})}attachDoubleListener(t,e){Vt(this,t,e),m(this,t,r=>{this.i._attachDoubleListener(r)})}attachDoubleVectorListener(t,e){ue(this,t,e),m(this,t,r=>{this.i._attachDoubleVectorListener(r)})}attachFloatListener(t,e){Vt(this,t,e),m(this,t,r=>{this.i._attachFloatListener(r)})}attachFloatVectorListener(t,e){ue(this,t,e),m(this,t,r=>{this.i._attachFloatVectorListener(r)})}attachStringListener(t,e){Vt(this,t,e),m(this,t,r=>{this.i._attachStringListener(r)})}attachStringVectorListener(t,e){ue(this,t,e),m(this,t,r=>{this.i._attachStringVectorListener(r)})}attachProtoListener(t,e,r){Vt(this,t,e),m(this,t,n=>{this.i._attachProtoListener(n,r||!1)})}attachProtoVectorListener(t,e,r){ue(this,t,e),m(this,t,n=>{this.i._attachProtoVectorListener(n,r||!1)})}attachAudioListener(t,e,r){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Vt(this,t,(n,i)=>{n=new Float32Array(n.buffer,n.byteOffset,n.length/4),e(n,i)}),m(this,t,n=>{this.i._attachAudioListener(n,r||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends aa{get ea(){return this.i}oa(t,e,r){m(this,e,n=>{let[i,o]=Ys(this,t,n);this.ea._addBoundTextureAsImageToStream(n,i,o,r)})}V(t,e){Vt(this,t,e),m(this,t,r=>{this.ea._attachImageListener(r)})}ba(t,e){ue(this,t,e),m(this,t,r=>{this.ea._attachImageVectorListener(r)})}})),aa,Ut=class extends lh{};function I(t,e,r){return C(this,null,function*(){var n;return function(i,o,s,a){return C(this,null,function*(){return ah(i,o,s,a)})}(t,(n=r.canvas)!=null?n:r1()?void 0:document.createElement("canvas"),e,r)})}function c1(t,e,r,n){if(t.U){let o=new Nc;if(r!=null&&r.regionOfInterest){if(!t.na)throw Error("This task doesn't support region-of-interest.");var i=r.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(i.left<0||i.top<0||i.right>1||i.bottom>1)throw Error("Expected RectF values to be in [0,1].");g(o,1,(i.left+i.right)/2),g(o,2,(i.top+i.bottom)/2),g(o,4,i.right-i.left),g(o,3,i.bottom-i.top)}else g(o,1,.5),g(o,2,.5),g(o,4,1),g(o,3,1);if(r!=null&&r.rotationDegrees){if((r==null?void 0:r.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90\xB0.");if(g(o,5,-Math.PI*r.rotationDegrees/180),(r==null?void 0:r.rotationDegrees)%180!=0){let[s,a]=n1(e);r=K(o,3)*a/s,i=K(o,4)*s/a,g(o,4,r),g(o,3,i)}}t.g.addProtoToStream(o.g(),"mediapipe.NormalizedRect",t.U,n)}t.g.oa(e,t.Z,n!=null?n:performance.now()),t.finishProcessing()}function Dt(t,e,r){var n;if((n=t.baseOptions)!=null&&n.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");c1(t,e,r,t.B+1)}function $t(t,e,r,n){var i;if(!((i=t.baseOptions)!=null&&i.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");c1(t,e,r,n)}function qe(t,e,r,n){var i=e.data;let o=e.width,s=o*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==s)throw Error("Unsupported channel count: "+i.length/s);return t=new Z([i],r,!1,t.g.i.canvas,t.P,o,e),n?t.clone():t}var gt=class extends Oi{constructor(t,e,r,n){super(t),this.g=t,this.Z=e,this.U=r,this.na=n,this.P=new sr}l(t,e=!0){if("runningMode"in t&&br(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.P.close(),super.close()}};gt.prototype.close=gt.prototype.close;var pt=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},E(t=this.h=new Un,0,1,e=new G),g(this.h,2,.5),g(this.h,3,.3)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){var e,r;return"minDetectionConfidence"in t&&g(this.h,2,(e=t.minDetectionConfidence)!=null?e:.5),"minSuppressionThreshold"in t&&g(this.h,3,(r=t.minSuppressionThreshold)!=null?r:.3),this.l(t)}D(t,e){return this.j={detections:[]},Dt(this,t,e),this.j}F(t,e,r){return this.j={detections:[]},$t(this,t,r,e),this.j}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect_in"),x(t,"detections");let e=new At;Mt(e,K2,this.h);let r=new at;It(r,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect_in"),w(r,"DETECTIONS:detections"),r.o(e),wt(t,r),this.g.attachProtoVectorListener("detections",(n,i)=>{for(let o of n)n=Oc(o),this.j.detections.push(t1(n));p(this,i)}),this.g.attachEmptyPacketListener("detections",n=>{p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pt.prototype.detectForVideo=pt.prototype.F,pt.prototype.detect=pt.prototype.D,pt.prototype.setOptions=pt.prototype.o,pt.createFromModelPath=function(t,e){return C(this,null,function*(){return I(pt,t,{baseOptions:{modelAssetPath:e}})})},pt.createFromModelBuffer=function(t,e){return I(pt,t,{baseOptions:{modelAssetBuffer:e}})},pt.createFromOptions=function(t,e){return I(pt,t,e)};var bo=Bt([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]),Lo=Bt([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]),No=Bt([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),u1=Bt([474,475],[475,476],[476,477],[477,474]),Co=Bt([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]),Uo=Bt([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),h1=Bt([469,470],[470,471],[471,472],[472,469]),Do=Bt([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]),l1=[...bo,...Lo,...No,...Co,...Uo,...Do],f1=Bt([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 ca(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var z=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,E(t=this.h=new Mc,0,1,e=new G),this.v=new kc,E(this.h,0,3,this.v),this.s=new Un,E(this.h,0,2,this.s),Wt(this.s,4,1),g(this.s,2,.5),g(this.v,2,.5),g(this.h,4,.5)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){var e,r,n,i;return"numFaces"in t&&Wt(this.s,4,(e=t.numFaces)!=null?e:1),"minFaceDetectionConfidence"in t&&g(this.s,2,(r=t.minFaceDetectionConfidence)!=null?r:.5),"minTrackingConfidence"in t&&g(this.h,4,(n=t.minTrackingConfidence)!=null?n:.5),"minFacePresenceConfidence"in t&&g(this.v,2,(i=t.minFacePresenceConfidence)!=null?i:.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return ca(this),Dt(this,t,e),this.j}F(t,e,r){return ca(this),$t(this,t,r,e),this.j}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect"),x(t,"face_landmarks");let e=new At;Mt(e,Y2,this.h);let r=new at;It(r,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect"),w(r,"NORM_LANDMARKS:face_landmarks"),r.o(e),wt(t,r),this.g.attachProtoVectorListener("face_landmarks",(n,i)=>{for(let o of n)n=Dr(o),this.j.faceLandmarks.push(Dn(n));p(this,i)}),this.g.attachEmptyPacketListener("face_landmarks",n=>{p(this,n)}),this.outputFaceBlendshapes&&(x(t,"blendshapes"),w(r,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(n,i)=>{var o;if(this.outputFaceBlendshapes)for(let s of n)n=Cn(s),this.j.faceBlendshapes.push(wo((o=n.g())!=null?o:[]));p(this,i)}),this.g.attachEmptyPacketListener("blendshapes",n=>{p(this,n)})),this.outputFacialTransformationMatrixes&&(x(t,"face_geometry"),w(r,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(n,i)=>{var o,s,a,c,u;if(this.outputFacialTransformationMatrixes)for(let l of n)(n=R(X2(l),B2,2))&&this.j.facialTransformationMatrixes.push({rows:(s=(o=Nt(n,1))!=null?o:0)!=null?s:0,columns:(c=(a=Nt(n,2))!=null?a:0)!=null?c:0,data:(u=Ie(n,3,ve,Se()).slice())!=null?u:[]});p(this,i)}),this.g.attachEmptyPacketListener("face_geometry",n=>{p(this,n)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};z.prototype.detectForVideo=z.prototype.F,z.prototype.detect=z.prototype.D,z.prototype.setOptions=z.prototype.o,z.createFromModelPath=function(t,e){return I(z,t,{baseOptions:{modelAssetPath:e}})},z.createFromModelBuffer=function(t,e){return I(z,t,{baseOptions:{modelAssetBuffer:e}})},z.createFromOptions=function(t,e){return I(z,t,e)},z.FACE_LANDMARKS_LIPS=bo,z.FACE_LANDMARKS_LEFT_EYE=Lo,z.FACE_LANDMARKS_LEFT_EYEBROW=No,z.FACE_LANDMARKS_LEFT_IRIS=u1,z.FACE_LANDMARKS_RIGHT_EYE=Co,z.FACE_LANDMARKS_RIGHT_EYEBROW=Uo,z.FACE_LANDMARKS_RIGHT_IRIS=h1,z.FACE_LANDMARKS_FACE_OVAL=Do,z.FACE_LANDMARKS_CONTOURS=l1,z.FACE_LANDMARKS_TESSELATION=f1;var Gt=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect",!0),E(t=this.j=new Fc,0,1,e=new G)}get baseOptions(){return R(this.j,G,1)}set baseOptions(t){E(this.j,0,1,t)}o(t){return super.l(t)}Ka(t,e,r){let n=typeof e!="function"?e:{};if(this.h=typeof e=="function"?e:r,Dt(this,t,n!=null?n:{}),!this.h)return this.s}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect"),x(t,"stylized_image");let e=new At;Mt(e,q2,this.j);let r=new at;It(r,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect"),w(r,"STYLIZED_IMAGE:stylized_image"),r.o(e),wt(t,r),this.g.V("stylized_image",(n,i)=>{var o=!this.h,s=n.data,a=n.width;let c=a*(n=n.height);if(s instanceof Uint8Array)if(s.length===3*c){let u=new Uint8ClampedArray(4*c);for(let l=0;l<c;++l)u[4*l]=s[3*l],u[4*l+1]=s[3*l+1],u[4*l+2]=s[3*l+2],u[4*l+3]=255;s=new ImageData(u,a,n)}else{if(s.length!==4*c)throw Error("Unsupported channel count: "+s.length/c);s=new ImageData(new Uint8ClampedArray(s.buffer,s.byteOffset,s.length),a,n)}else if(!(s instanceof WebGLTexture))throw Error(`Unsupported format: ${s.constructor.name}`);a=new et([s],!1,!1,this.g.i.canvas,this.P,a,n),this.s=o=o?a.clone():a,this.h&&this.h(o),p(this,i)}),this.g.attachEmptyPacketListener("stylized_image",n=>{this.s=null,this.h&&this.h(null),p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Gt.prototype.stylize=Gt.prototype.Ka,Gt.prototype.setOptions=Gt.prototype.o,Gt.createFromModelPath=function(t,e){return I(Gt,t,{baseOptions:{modelAssetPath:e}})},Gt.createFromModelBuffer=function(t,e){return I(Gt,t,{baseOptions:{modelAssetBuffer:e}})},Gt.createFromOptions=function(t,e){return I(Gt,t,e)};var ko=Bt([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 ua(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function ha(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 la(t,e=!0){var i,o,s,a,c,u;let r=[];for(let l of t){var n=Cn(l);t=[];for(let h of n.g())n=e&&Nt(h,1)!=null?(i=Nt(h,1))!=null?i:0:-1,t.push({score:(o=K(h,2))!=null?o:0,index:n,categoryName:(a=(s=Ct(h,3))!=null?s:"")!=null?a:"",displayName:(u=(c=Ct(h,4))!=null?c:"")!=null?u:""});r.push(t)}return r}var _t=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],E(t=this.j=new Gc,0,1,e=new G),this.s=new To,E(this.j,0,2,this.s),this.C=new vo,E(this.s,0,3,this.C),this.v=new Vc,E(this.s,0,2,this.v),this.h=new Q2,E(this.j,0,3,this.h),g(this.v,2,.5),g(this.s,4,.5),g(this.C,2,.5)}get baseOptions(){return R(this.j,G,1)}set baseOptions(t){E(this.j,0,1,t)}o(t){var i,o,s,a,c,u,l,h;if(Wt(this.v,3,(i=t.numHands)!=null?i:1),"minHandDetectionConfidence"in t&&g(this.v,2,(o=t.minHandDetectionConfidence)!=null?o:.5),"minTrackingConfidence"in t&&g(this.s,4,(s=t.minTrackingConfidence)!=null?s:.5),"minHandPresenceConfidence"in t&&g(this.C,2,(a=t.minHandPresenceConfidence)!=null?a:.5),t.cannedGesturesClassifierOptions){var e=new De,r=e,n=xi(t.cannedGesturesClassifierOptions,(c=R(this.h,De,3))==null?void 0:c.h());E(r,0,2,n),E(this.h,0,3,e)}else t.cannedGesturesClassifierOptions===void 0&&((u=R(this.h,De,3))==null||u.g());return t.customGesturesClassifierOptions?(E(r=e=new De,0,2,n=xi(t.customGesturesClassifierOptions,(l=R(this.h,De,4))==null?void 0:l.h())),E(this.h,0,4,e)):t.customGesturesClassifierOptions===void 0&&((h=R(this.h,De,4))==null||h.g()),this.l(t)}Fa(t,e){return ua(this),Dt(this,t,e),ha(this)}Ga(t,e,r){return ua(this),$t(this,t,r,e),ha(this)}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect"),x(t,"hand_gestures"),x(t,"hand_landmarks"),x(t,"world_hand_landmarks"),x(t,"handedness");let e=new At;Mt(e,J2,this.j);let r=new at;It(r,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect"),w(r,"HAND_GESTURES:hand_gestures"),w(r,"LANDMARKS:hand_landmarks"),w(r,"WORLD_LANDMARKS:world_hand_landmarks"),w(r,"HANDEDNESS:handedness"),r.o(e),wt(t,r),this.g.attachProtoVectorListener("hand_landmarks",(n,i)=>{var o,s,a,c;for(let u of n){n=Dr(u);let l=[];for(let h of re(n,Lc,1))l.push({x:(o=K(h,1))!=null?o:0,y:(s=K(h,2))!=null?s:0,z:(a=K(h,3))!=null?a:0,visibility:(c=K(h,4))!=null?c:0});this.landmarks.push(l)}p(this,i)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,i)=>{var o,s,a,c;for(let u of n){n=Be(u);let l=[];for(let h of re(n,bc,1))l.push({x:(o=K(h,1))!=null?o:0,y:(s=K(h,2))!=null?s:0,z:(a=K(h,3))!=null?a:0,visibility:(c=K(h,4))!=null?c:0});this.worldLandmarks.push(l)}p(this,i)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("hand_gestures",(n,i)=>{this.gestures.push(...la(n,!1)),p(this,i)}),this.g.attachEmptyPacketListener("hand_gestures",n=>{p(this,n)}),this.g.attachProtoVectorListener("handedness",(n,i)=>{this.handedness.push(...la(n)),p(this,i)}),this.g.attachEmptyPacketListener("handedness",n=>{p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function fa(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}_t.prototype.recognizeForVideo=_t.prototype.Ga,_t.prototype.recognize=_t.prototype.Fa,_t.prototype.setOptions=_t.prototype.o,_t.createFromModelPath=function(t,e){return I(_t,t,{baseOptions:{modelAssetPath:e}})},_t.createFromModelBuffer=function(t,e){return I(_t,t,{baseOptions:{modelAssetBuffer:e}})},_t.createFromOptions=function(t,e){return I(_t,t,e)},_t.HAND_CONNECTIONS=ko;var yt=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],E(t=this.h=new To,0,1,e=new G),this.s=new vo,E(this.h,0,3,this.s),this.j=new Vc,E(this.h,0,2,this.j),Wt(this.j,3,1),g(this.j,2,.5),g(this.s,2,.5),g(this.h,4,.5)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){var e,r,n,i;return"numHands"in t&&Wt(this.j,3,(e=t.numHands)!=null?e:1),"minHandDetectionConfidence"in t&&g(this.j,2,(r=t.minHandDetectionConfidence)!=null?r:.5),"minTrackingConfidence"in t&&g(this.h,4,(n=t.minTrackingConfidence)!=null?n:.5),"minHandPresenceConfidence"in t&&g(this.s,2,(i=t.minHandPresenceConfidence)!=null?i:.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Dt(this,t,e),fa(this)}F(t,e,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],$t(this,t,r,e),fa(this)}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect"),x(t,"hand_landmarks"),x(t,"world_hand_landmarks"),x(t,"handedness");let e=new At;Mt(e,Z2,this.h);let r=new at;It(r,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect"),w(r,"LANDMARKS:hand_landmarks"),w(r,"WORLD_LANDMARKS:world_hand_landmarks"),w(r,"HANDEDNESS:handedness"),r.o(e),wt(t,r),this.g.attachProtoVectorListener("hand_landmarks",(n,i)=>{for(let o of n)n=Dr(o),this.landmarks.push(Dn(n));p(this,i)}),this.g.attachEmptyPacketListener("hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("world_hand_landmarks",(n,i)=>{for(let o of n)n=Be(o),this.worldLandmarks.push(Ir(n));p(this,i)}),this.g.attachEmptyPacketListener("world_hand_landmarks",n=>{p(this,n)}),this.g.attachProtoVectorListener("handedness",(n,i)=>{var c,u,l,h,f,v,A;var o=this.handedness,s=o.push;let a=[];for(let S of n){n=Cn(S);let F=[];for(let D of n.g())F.push({score:(c=K(D,2))!=null?c:0,index:(l=(u=Nt(D,1))!=null?u:0)!=null?l:-1,categoryName:(f=(h=Ct(D,3))!=null?h:"")!=null?f:"",displayName:(A=(v=Ct(D,4))!=null?v:"")!=null?A:""});a.push(F)}s.call(o,...a),p(this,i)}),this.g.attachEmptyPacketListener("handedness",n=>{p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};yt.prototype.detectForVideo=yt.prototype.F,yt.prototype.detect=yt.prototype.D,yt.prototype.setOptions=yt.prototype.o,yt.createFromModelPath=function(t,e){return I(yt,t,{baseOptions:{modelAssetPath:e}})},yt.createFromModelBuffer=function(t,e){return I(yt,t,{baseOptions:{modelAssetBuffer:e}})},yt.createFromOptions=function(t,e){return I(yt,t,e)},yt.HAND_CONNECTIONS=ko;var p1=Bt([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 pa(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function da(t){try{if(!t.C)return t.h;t.C(t.h)}finally{Mn(t)}}function Kr(t,e){t=Dr(t),e.push(Dn(t))}var B=class extends gt{constructor(t,e){super(new Ut(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,E(t=this.j=new $c,0,1,e=new G),this.K=new vo,E(this.j,0,2,this.K),this.Y=new th,E(this.j,0,3,this.Y),this.s=new Un,E(this.j,0,4,this.s),this.H=new kc,E(this.j,0,5,this.H),this.v=new zc,E(this.j,0,6,this.v),this.L=new Wc,E(this.j,0,7,this.L),g(this.s,2,.5),g(this.s,3,.3),g(this.H,2,.5),g(this.v,2,.5),g(this.v,3,.3),g(this.L,2,.5),g(this.K,2,.5)}get baseOptions(){return R(this.j,G,1)}set baseOptions(t){E(this.j,0,1,t)}o(t){var e,r,n,i,o,s,a;return"minFaceDetectionConfidence"in t&&g(this.s,2,(e=t.minFaceDetectionConfidence)!=null?e:.5),"minFaceSuppressionThreshold"in t&&g(this.s,3,(r=t.minFaceSuppressionThreshold)!=null?r:.3),"minFacePresenceConfidence"in t&&g(this.H,2,(n=t.minFacePresenceConfidence)!=null?n:.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&g(this.v,2,(i=t.minPoseDetectionConfidence)!=null?i:.5),"minPoseSuppressionThreshold"in t&&g(this.v,3,(o=t.minPoseSuppressionThreshold)!=null?o:.3),"minPosePresenceConfidence"in t&&g(this.L,2,(s=t.minPosePresenceConfidence)!=null?s:.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&g(this.K,2,(a=t.minHandLandmarksConfidence)!=null?a:.5),this.l(t)}D(t,e,r){let n=typeof e!="function"?e:{};return this.C=typeof e=="function"?e:r,pa(this),Dt(this,t,n),da(this)}F(t,e,r,n){let i=typeof r!="function"?r:{};return this.C=typeof r=="function"?r:n,pa(this),$t(this,t,i,e),da(this)}m(){var t=new mt;P(t,"input_frames_image"),x(t,"pose_landmarks"),x(t,"pose_world_landmarks"),x(t,"face_landmarks"),x(t,"left_hand_landmarks"),x(t,"left_hand_world_landmarks"),x(t,"right_hand_landmarks"),x(t,"right_hand_world_landmarks");let e=new At,r=new Us;vi(r,1,tr("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(i,o){if(o!=null)if(Array.isArray(o))k(i,2,En(o,Xi,void 0,void 0,!1));else{if(!(typeof o=="string"||o instanceof te||Re(o)))throw Error("invalid value in Any.value field: "+o+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");vi(i,2,Vi(o,!1),xe())}}(r,this.j.g());let n=new at;It(n,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),on(n,8,Us,r),M(n,"IMAGE:input_frames_image"),w(n,"POSE_LANDMARKS:pose_landmarks"),w(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),w(n,"FACE_LANDMARKS:face_landmarks"),w(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),w(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),w(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),w(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.o(e),wt(t,n),kn(this,t),this.g.attachProtoListener("pose_landmarks",(i,o)=>{Kr(i,this.h.poseLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("pose_landmarks",i=>{p(this,i)}),this.g.attachProtoListener("pose_world_landmarks",(i,o)=>{var s=this.h.poseWorldLandmarks;i=Be(i),s.push(Ir(i)),p(this,o)}),this.g.attachEmptyPacketListener("pose_world_landmarks",i=>{p(this,i)}),this.outputPoseSegmentationMasks&&(w(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Ke(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",(i,o)=>{this.h.poseSegmentationMasks=[qe(this,i,!0,!this.C)],p(this,o)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",i=>{this.h.poseSegmentationMasks=[],p(this,i)})),this.g.attachProtoListener("face_landmarks",(i,o)=>{Kr(i,this.h.faceLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("face_landmarks",i=>{p(this,i)}),this.outputFaceBlendshapes&&(x(t,"extra_blendshapes"),w(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(i,o)=>{var a;var s=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(i=Cn(i),s.push(wo((a=i.g())!=null?a:[]))),p(this,o)}),this.g.attachEmptyPacketListener("extra_blendshapes",i=>{p(this,i)})),this.g.attachProtoListener("left_hand_landmarks",(i,o)=>{Kr(i,this.h.leftHandLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("left_hand_landmarks",i=>{p(this,i)}),this.g.attachProtoListener("left_hand_world_landmarks",(i,o)=>{var s=this.h.leftHandWorldLandmarks;i=Be(i),s.push(Ir(i)),p(this,o)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",i=>{p(this,i)}),this.g.attachProtoListener("right_hand_landmarks",(i,o)=>{Kr(i,this.h.rightHandLandmarks),p(this,o)}),this.g.attachEmptyPacketListener("right_hand_landmarks",i=>{p(this,i)}),this.g.attachProtoListener("right_hand_world_landmarks",(i,o)=>{var s=this.h.rightHandWorldLandmarks;i=Be(i),s.push(Ir(i)),p(this,o)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",i=>{p(this,i)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};B.prototype.detectForVideo=B.prototype.F,B.prototype.detect=B.prototype.D,B.prototype.setOptions=B.prototype.o,B.createFromModelPath=function(t,e){return I(B,t,{baseOptions:{modelAssetPath:e}})},B.createFromModelBuffer=function(t,e){return I(B,t,{baseOptions:{modelAssetBuffer:e}})},B.createFromOptions=function(t,e){return I(B,t,e)},B.HAND_CONNECTIONS=ko,B.POSE_CONNECTIONS=p1,B.FACE_LANDMARKS_LIPS=bo,B.FACE_LANDMARKS_LEFT_EYE=Lo,B.FACE_LANDMARKS_LEFT_EYEBROW=No,B.FACE_LANDMARKS_LEFT_IRIS=u1,B.FACE_LANDMARKS_RIGHT_EYE=Co,B.FACE_LANDMARKS_RIGHT_EYEBROW=Uo,B.FACE_LANDMARKS_RIGHT_IRIS=h1,B.FACE_LANDMARKS_FACE_OVAL=Do,B.FACE_LANDMARKS_CONTOURS=l1,B.FACE_LANDMARKS_TESSELATION=f1;var Ot=class extends gt{constructor(t,e){super(new Ut(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},E(t=this.h=new Kc,0,1,e=new G)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){return E(this.h,0,2,xi(t,R(this.h,_o,2))),this.l(t)}qa(t,e){return this.j={classifications:[]},Dt(this,t,e),this.j}ra(t,e,r){return this.j={classifications:[]},$t(this,t,r,e),this.j}m(){var t=new mt;P(t,"input_image"),P(t,"norm_rect"),x(t,"classifications");let e=new At;Mt(e,eh,this.h);let r=new at;It(r,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),M(r,"IMAGE:input_image"),M(r,"NORM_RECT:norm_rect"),w(r,"CLASSIFICATIONS:classifications"),r.o(e),wt(t,r),this.g.attachProtoListener("classifications",(n,i)=>{this.j=function(o){var a;let s={classifications:re(o,G2,1).map(c=>{var u,l,h,f;return wo((l=(u=R(c,Rc,4))==null?void 0:u.g())!=null?l:[],(h=Nt(c,2))!=null?h:0,(f=Ct(c,3))!=null?f:"")})};return _i(We(o,2))!=null&&(s.timestampMs=(a=_i(We(o,2)))!=null?a:0),s}(j2(n)),p(this,i)}),this.g.attachEmptyPacketListener("classifications",n=>{p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ot.prototype.classifyForVideo=Ot.prototype.ra,Ot.prototype.classify=Ot.prototype.qa,Ot.prototype.setOptions=Ot.prototype.o,Ot.createFromModelPath=function(t,e){return I(Ot,t,{baseOptions:{modelAssetPath:e}})},Ot.createFromModelBuffer=function(t,e){return I(Ot,t,{baseOptions:{modelAssetBuffer:e}})},Ot.createFromOptions=function(t,e){return I(Ot,t,e)};var Et=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect",!0),this.h=new Xc,this.embeddings={embeddings:[]},E(t=this.h,0,1,e=new G)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){var e=this.h,r=R(this.h,js,2);return r=r?r.clone():new js,t.l2Normalize!==void 0?br(r,1,t.l2Normalize):"l2Normalize"in t&&k(r,1),t.quantize!==void 0?br(r,2,t.quantize):"quantize"in t&&k(r,2),E(e,0,2,r),this.l(t)}xa(t,e){return Dt(this,t,e),this.embeddings}ya(t,e,r){return $t(this,t,r,e),this.embeddings}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect"),x(t,"embeddings_out");let e=new At;Mt(e,rh,this.h);let r=new at;It(r,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect"),w(r,"EMBEDDINGS:embeddings_out"),r.o(e),wt(t,r),this.g.attachProtoListener("embeddings_out",(n,i)=>{n=W2(n),this.embeddings=function(o){var s;return{embeddings:re(o,z2,1).map(a=>{var u,l,h,f,v,A,S;let c={headIndex:(l=(u=Nt(a,3))!=null?u:0)!=null?l:-1,headName:(f=(h=Ct(a,4))!=null?h:"")!=null?f:""};if(Xa(a,Gs,oi(a,1))!==void 0)a=Ie(a=R(a,Gs,oi(a,1)),1,ve,Se()),c.floatEmbedding=a.slice();else{let F=new Uint8Array(0);c.quantizedEmbedding=(S=(A=(v=R(a,H2,oi(a,2)))==null?void 0:v.ma())==null?void 0:A.h())!=null?S:F}return c}),timestampMs:(s=_i(We(o,2)))!=null?s:0}}(n),p(this,i)}),this.g.attachEmptyPacketListener("embeddings_out",n=>{p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Et.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Ks(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Ks($s(t.quantizedEmbedding),$s(e.quantizedEmbedding))}return t},Et.prototype.embedForVideo=Et.prototype.ya,Et.prototype.embed=Et.prototype.xa,Et.prototype.setOptions=Et.prototype.o,Et.createFromModelPath=function(t,e){return I(Et,t,{baseOptions:{modelAssetPath:e}})},Et.createFromModelBuffer=function(t,e){return I(Et,t,{baseOptions:{modelAssetBuffer:e}})},Et.createFromOptions=function(t,e){return I(Et,t,e)};var Ci=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(r=>{r.close()}),(e=this.categoryMask)==null||e.close()}};function ga(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function ma(t){try{let e=new Ci(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Mn(t)}}Ci.prototype.close=Ci.prototype.close;var nt=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Io,this.v=new Yc,E(this.h,0,3,this.v),E(t=this.h,0,1,e=new G)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){var e,r;return t.displayNamesLocale!==void 0?k(this.h,2,tr(t.displayNamesLocale)):"displayNamesLocale"in t&&k(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=(e=t.outputCategoryMask)!=null?e:!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=(r=t.outputConfidenceMasks)!=null?r:!0),super.l(t)}J(){(function(t){var r,n,i;let e=re(t.ca(),at,1).filter(o=>{var s;return((s=Ct(o,1))!=null?s:"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")});if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");e.length===1&&((i=(n=(r=R(e[0],At,7))==null?void 0:r.l())==null?void 0:n.g())!=null?i:new Map).forEach((o,s)=>{var a;t.s[Number(s)]=(a=Ct(o,1))!=null?a:""})})(this)}segment(t,e,r){let n=typeof e!="function"?e:{};return this.j=typeof e=="function"?e:r,ga(this),Dt(this,t,n),ma(this)}Ia(t,e,r,n){let i=typeof r!="function"?r:{};return this.j=typeof r=="function"?r:n,ga(this),$t(this,t,i,e),ma(this)}Ba(){return this.s}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect");let e=new At;Mt(e,Qc,this.h);let r=new at;It(r,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect"),r.o(e),wt(t,r),kn(this,t),this.outputConfidenceMasks&&(x(t,"confidence_masks"),w(r,"CONFIDENCE_MASKS:confidence_masks"),Ke(this,"confidence_masks"),this.g.ba("confidence_masks",(n,i)=>{this.confidenceMasks=n.map(o=>qe(this,o,!0,!this.j)),p(this,i)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],p(this,n)})),this.outputCategoryMask&&(x(t,"category_mask"),w(r,"CATEGORY_MASK:category_mask"),Ke(this,"category_mask"),this.g.V("category_mask",(n,i)=>{this.categoryMask=qe(this,n,!1,!this.j),p(this,i)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,p(this,n)})),x(t,"quality_scores"),w(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,i)=>{this.qualityScores=n,p(this,i)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};nt.prototype.getLabels=nt.prototype.Ba,nt.prototype.segmentForVideo=nt.prototype.Ia,nt.prototype.segment=nt.prototype.segment,nt.prototype.setOptions=nt.prototype.o,nt.createFromModelPath=function(t,e){return I(nt,t,{baseOptions:{modelAssetPath:e}})},nt.createFromModelBuffer=function(t,e){return I(nt,t,{baseOptions:{modelAssetBuffer:e}})},nt.createFromOptions=function(t,e){return I(nt,t,e)};var Ui=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(r=>{r.close()}),(e=this.categoryMask)==null||e.close()}};Ui.prototype.close=Ui.prototype.close;var fh=class extends d{constructor(t){super(t)}},ke=[0,$,-2],un=[0,qt,-3,V,qt,-1],_a=[0,un],ya=[0,un,$,-1],fi=class extends d{constructor(t){super(t)}},Ea=[0,qt,-1,V],ph=class extends d{constructor(t){super(t)}},va=class extends d{constructor(t){super(t)}},Di=[1,2,3,4,5,6,7,8,9,10,14,15],d1=class extends d{constructor(t){super(t)}};d1.prototype.g=Nn([0,tt,[0,Di,b,un,b,[0,un,ke],b,_a,b,[0,_a,ke],b,Ea,b,[0,qt,-3,V,Tt],b,[0,qt,-3,V],b,[0,L,qt,-2,V,$,V,-1,2,qt,ke],b,ya,b,[0,ya,ke],qt,ke,L,b,[0,qt,-3,V,ke,-1],b,[0,tt,Ea]],L,[0,L,$,-1,V]]);var jt=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Io,this.s=new Yc,E(this.h,0,3,this.s),E(t=this.h,0,1,e=new G)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){var e,r;return"outputCategoryMask"in t&&(this.outputCategoryMask=(e=t.outputCategoryMask)!=null?e:!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=(r=t.outputConfidenceMasks)!=null?r:!0),super.l(t)}segment(t,e,r,n){let i=typeof r!="function"?r:{};this.j=typeof r=="function"?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.B+1,n=new d1;let o=new va;var s=new fh;if(Wt(s,1,255),E(o,0,12,s),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new fi;br(a,3,!0),g(a,1,e.keypoint.x),g(a,2,e.keypoint.y),Ar(o,5,Di,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(s=new ph,e.scribble))br(e=new fi,3,!0),g(e,1,a.x),g(e,2,a.y),on(s,1,fi,e);Ar(o,15,Di,s)}on(n,1,va,o),this.g.addProtoToStream(n.g(),"drishti.RenderData","roi_in",r),Dt(this,t,i);t:{try{let u=new Ui(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=u;break t}this.j(u)}finally{Mn(this)}c=void 0}return c}m(){var t=new mt;P(t,"image_in"),P(t,"roi_in"),P(t,"norm_rect_in");let e=new At;Mt(e,Qc,this.h);let r=new at;It(r,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),M(r,"IMAGE:image_in"),M(r,"ROI:roi_in"),M(r,"NORM_RECT:norm_rect_in"),r.o(e),wt(t,r),kn(this,t),this.outputConfidenceMasks&&(x(t,"confidence_masks"),w(r,"CONFIDENCE_MASKS:confidence_masks"),Ke(this,"confidence_masks"),this.g.ba("confidence_masks",(n,i)=>{this.confidenceMasks=n.map(o=>qe(this,o,!0,!this.j)),p(this,i)}),this.g.attachEmptyPacketListener("confidence_masks",n=>{this.confidenceMasks=[],p(this,n)})),this.outputCategoryMask&&(x(t,"category_mask"),w(r,"CATEGORY_MASK:category_mask"),Ke(this,"category_mask"),this.g.V("category_mask",(n,i)=>{this.categoryMask=qe(this,n,!1,!this.j),p(this,i)}),this.g.attachEmptyPacketListener("category_mask",n=>{this.categoryMask=void 0,p(this,n)})),x(t,"quality_scores"),w(r,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(n,i)=>{this.qualityScores=n,p(this,i)}),this.g.attachEmptyPacketListener("quality_scores",n=>{this.categoryMask=void 0,p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};jt.prototype.segment=jt.prototype.segment,jt.prototype.setOptions=jt.prototype.o,jt.createFromModelPath=function(t,e){return I(jt,t,{baseOptions:{modelAssetPath:e}})},jt.createFromModelBuffer=function(t,e){return I(jt,t,{baseOptions:{modelAssetBuffer:e}})},jt.createFromOptions=function(t,e){return I(jt,t,e)};var bt=class extends gt{constructor(t,e){super(new Ut(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},E(t=this.h=new Jc,0,1,e=new G)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){return t.displayNamesLocale!==void 0?k(this.h,2,tr(t.displayNamesLocale)):"displayNamesLocale"in t&&k(this.h,2),t.maxResults!==void 0?Wt(this.h,3,t.maxResults):"maxResults"in t&&k(this.h,3),t.scoreThreshold!==void 0?g(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&k(this.h,4),t.categoryAllowlist!==void 0?sn(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&k(this.h,5),t.categoryDenylist!==void 0?sn(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&k(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},Dt(this,t,e),this.j}F(t,e,r){return this.j={detections:[]},$t(this,t,r,e),this.j}m(){var t=new mt;P(t,"input_frame_gpu"),P(t,"norm_rect"),x(t,"detections");let e=new At;Mt(e,ih,this.h);let r=new at;It(r,"mediapipe.tasks.vision.ObjectDetectorGraph"),M(r,"IMAGE:input_frame_gpu"),M(r,"NORM_RECT:norm_rect"),w(r,"DETECTIONS:detections"),r.o(e),wt(t,r),this.g.attachProtoVectorListener("detections",(n,i)=>{for(let o of n)n=Oc(o),this.j.detections.push(t1(n));p(this,i)}),this.g.attachEmptyPacketListener("detections",n=>{p(this,n)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};bt.prototype.detectForVideo=bt.prototype.F,bt.prototype.detect=bt.prototype.D,bt.prototype.setOptions=bt.prototype.o,bt.createFromModelPath=function(t,e){return C(this,null,function*(){return I(bt,t,{baseOptions:{modelAssetPath:e}})})},bt.createFromModelBuffer=function(t,e){return I(bt,t,{baseOptions:{modelAssetBuffer:e}})},bt.createFromOptions=function(t,e){return I(bt,t,e)};var ki=class{constructor(t,e,r){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=r}close(){var t;(t=this.segmentationMasks)==null||t.forEach(e=>{e.close()})}};function Ta(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Aa(t){try{let e=new ki(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{Mn(t)}}ki.prototype.close=ki.prototype.close;var vt=class extends gt{constructor(t,e){super(new Ut(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,E(t=this.h=new Zc,0,1,e=new G),this.v=new Wc,E(this.h,0,3,this.v),this.j=new zc,E(this.h,0,2,this.j),Wt(this.j,4,1),g(this.j,2,.5),g(this.v,2,.5),g(this.h,4,.5)}get baseOptions(){return R(this.h,G,1)}set baseOptions(t){E(this.h,0,1,t)}o(t){var e,r,n,i,o;return"numPoses"in t&&Wt(this.j,4,(e=t.numPoses)!=null?e:1),"minPoseDetectionConfidence"in t&&g(this.j,2,(r=t.minPoseDetectionConfidence)!=null?r:.5),"minTrackingConfidence"in t&&g(this.h,4,(n=t.minTrackingConfidence)!=null?n:.5),"minPosePresenceConfidence"in t&&g(this.v,2,(i=t.minPosePresenceConfidence)!=null?i:.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=(o=t.outputSegmentationMasks)!=null?o:!1),this.l(t)}D(t,e,r){let n=typeof e!="function"?e:{};return this.s=typeof e=="function"?e:r,Ta(this),Dt(this,t,n),Aa(this)}F(t,e,r,n){let i=typeof r!="function"?r:{};return this.s=typeof r=="function"?r:n,Ta(this),$t(this,t,i,e),Aa(this)}m(){var t=new mt;P(t,"image_in"),P(t,"norm_rect"),x(t,"normalized_landmarks"),x(t,"world_landmarks"),x(t,"segmentation_masks");let e=new At;Mt(e,oh,this.h);let r=new at;It(r,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),M(r,"IMAGE:image_in"),M(r,"NORM_RECT:norm_rect"),w(r,"NORM_LANDMARKS:normalized_landmarks"),w(r,"WORLD_LANDMARKS:world_landmarks"),r.o(e),wt(t,r),kn(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(n,i)=>{this.landmarks=[];for(let o of n)n=Dr(o),this.landmarks.push(Dn(n));p(this,i)}),this.g.attachEmptyPacketListener("normalized_landmarks",n=>{this.landmarks=[],p(this,n)}),this.g.attachProtoVectorListener("world_landmarks",(n,i)=>{this.worldLandmarks=[];for(let o of n)n=Be(o),this.worldLandmarks.push(Ir(n));p(this,i)}),this.g.attachEmptyPacketListener("world_landmarks",n=>{this.worldLandmarks=[],p(this,n)}),this.outputSegmentationMasks&&(w(r,"SEGMENTATION_MASK:segmentation_masks"),Ke(this,"segmentation_masks"),this.g.ba("segmentation_masks",(n,i)=>{this.segmentationMasks=n.map(o=>qe(this,o,!0,!this.s)),p(this,i)}),this.g.attachEmptyPacketListener("segmentation_masks",n=>{this.segmentationMasks=[],p(this,n)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};vt.prototype.detectForVideo=vt.prototype.F,vt.prototype.detect=vt.prototype.D,vt.prototype.setOptions=vt.prototype.o,vt.createFromModelPath=function(t,e){return I(vt,t,{baseOptions:{modelAssetPath:e}})},vt.createFromModelBuffer=function(t,e){return I(vt,t,{baseOptions:{modelAssetBuffer:e}})},vt.createFromOptions=function(t,e){return I(vt,t,e)},vt.POSE_CONNECTIONS=p1;var g1={},dh=function(t,e,r,n,i){var o=new Worker(g1[e]||(g1[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(s){var a=s.data,c=a.$e$;if(c){var u=new Error(c[0]);u.code=c[1],u.stack=c[2],i(u,null)}else i(null,a)},o.postMessage(r,n),o},ht=Uint8Array,Le=Uint16Array,y1=Int32Array,Mo=new ht([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Po=new ht([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),E1=new ht([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),v1=function(t,e){for(var r=new Le(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];for(var i=new y1(r[30]),n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return{b:r,r:i}},T1=v1(Mo,2),Fo=T1.b,gh=T1.r;Fo[28]=258,gh[258]=28;var A1=v1(Po,0),S1=A1.b,lf=A1.r,jn=new Le(32768);for(O=0;O<32768;++O)oe=(O&43690)>>1|(O&21845)<<1,oe=(oe&52428)>>2|(oe&13107)<<2,oe=(oe&61680)>>4|(oe&3855)<<4,jn[O]=((oe&65280)>>8|(oe&255)<<8)>>1;var oe,O,ar=function(t,e,r){for(var n=t.length,i=0,o=new Le(e);i<n;++i)t[i]&&++o[t[i]-1];var s=new Le(e);for(i=1;i<e;++i)s[i]=s[i-1]+o[i-1]<<1;var a;if(r){a=new Le(1<<e);var c=15-e;for(i=0;i<n;++i)if(t[i])for(var u=i<<4|t[i],l=e-t[i],h=s[t[i]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)a[jn[h]>>c]=u}else for(a=new Le(n),i=0;i<n;++i)t[i]&&(a[i]=jn[s[t[i]-1]++]>>15-t[i]);return a},Mr=new ht(288);for(O=0;O<144;++O)Mr[O]=8;var O;for(O=144;O<256;++O)Mr[O]=9;var O;for(O=256;O<280;++O)Mr[O]=7;var O;for(O=280;O<288;++O)Mr[O]=8;var O,I1=new ht(32);for(O=0;O<32;++O)I1[O]=5;var O;var w1=ar(Mr,9,1);var R1=ar(I1,5,1),Vn=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},kt=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(e&7)&r},Gn=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},x1=function(t){return(t+7)/8|0},O1=function(t,e,r){return(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length),new ht(t.subarray(e,r))};var b1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Rt=function(t,e,r){var n=new Error(e||b1[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,Rt),!r)throw n;return n},Bo=function(t,e,r,n){var i=t.length,o=n?n.length:0;if(!i||e.f&&!e.l)return r||new ht(0);var s=!r,a=s||e.i!=2,c=e.i;s&&(r=new ht(i*3));var u=function(is){var os=r.length;if(is>os){var ss=new ht(Math.max(os*2,is));ss.set(r),r=ss}},l=e.f||0,h=e.p||0,f=e.b||0,v=e.l,A=e.d,S=e.m,F=e.n,D=i*8;do{if(!v){l=kt(t,h,1);var rt=kt(t,h+1,3);if(h+=3,rt)if(rt==1)v=w1,A=R1,S=9,F=5;else if(rt==2){var Kn=kt(t,h,31)+257,qo=kt(t,h+10,15)+4,Qo=Kn+kt(t,h+5,31)+1;h+=14;for(var pr=new ht(Qo),Xn=new ht(19),xt=0;xt<qo;++xt)Xn[E1[xt]]=kt(t,h+xt*3,7);h+=qo*3;for(var Jo=Vn(Xn),Ru=(1<<Jo)-1,xu=ar(Xn,Jo,1),xt=0;xt<Qo;){var Zo=xu[kt(t,h,Ru)];h+=Zo&15;var N=Zo>>4;if(N<16)pr[xt++]=N;else{var Ce=0,Vr=0;for(N==16?(Vr=3+kt(t,h,3),h+=2,Ce=pr[xt-1]):N==17?(Vr=3+kt(t,h,7),h+=3):N==18&&(Vr=11+kt(t,h,127),h+=7);Vr--;)pr[xt++]=Ce}}var ts=pr.subarray(0,Kn),ce=pr.subarray(Kn);S=Vn(ts),F=Vn(ce),v=ar(ts,S,1),A=ar(ce,F,1)}else Rt(1);else{var N=x1(h)+4,fr=t[N-4]|t[N-3]<<8,$n=N+fr;if($n>i){c&&Rt(0);break}a&&u(f+fr),r.set(t.subarray(N,$n),f),e.b=f+=fr,e.p=h=$n*8,e.f=l;continue}if(h>D){c&&Rt(0);break}}a&&u(f+131072);for(var Ou=(1<<S)-1,bu=(1<<F)-1,Yn=h;;Yn=h){var Ce=v[Gn(t,h)&Ou],Ue=Ce>>4;if(h+=Ce&15,h>D){c&&Rt(0);break}if(Ce||Rt(2),Ue<256)r[f++]=Ue;else if(Ue==256){Yn=h,v=null;break}else{var es=Ue-254;if(Ue>264){var xt=Ue-257,dr=Mo[xt];es=kt(t,h,(1<<dr)-1)+Fo[xt],h+=dr}var qn=A[Gn(t,h)&bu],Qn=qn>>4;qn||Rt(3),h+=qn&15;var ce=S1[Qn];if(Qn>3){var dr=Po[Qn];ce+=Gn(t,h)&(1<<dr)-1,h+=dr}if(h>D){c&&Rt(0);break}a&&u(f+131072);var rs=f+es;if(f<ce){var ns=o-ce,Lu=Math.min(ce,rs);for(ns+f<0&&Rt(3);f<Lu;++f)r[f]=n[ns+f]}for(;f<rs;++f)r[f]=r[f-ce]}}e.l=v,e.p=Yn,e.b=f,e.f=l,v&&(l=1,e.m=S,e.d=A,e.n=F)}while(!l);return f!=r.length&&s?O1(r,0,f):r.subarray(0,f)};var mh=new ht(0);var _h=function(t,e){var r={};for(var n in t)r[n]=t[n];for(var n in e)r[n]=e[n];return r},m1=function(t,e,r){for(var n=t(),i=t.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<n.length;++s){var a=n[s],c=o[s];if(typeof a=="function"){e+=";"+c+"=";var u=a.toString();if(a.prototype)if(u.indexOf("[native code]")!=-1){var l=u.indexOf(" ",8)+1;e+=u.slice(l,u.indexOf("(",l))}else{e+=u;for(var h in a.prototype)e+=";"+c+".prototype."+h+"="+a.prototype[h].toString()}else e+=u}else r[c]=a}return e},Bn=[],yh=function(t){var e=[];for(var r in t)t[r].buffer&&e.push((t[r]=new t[r].constructor(t[r])).buffer);return e},Eh=function(t,e,r,n){if(!Bn[r]){for(var i="",o={},s=t.length-1,a=0;a<s;++a)i=m1(t[a],i,o);Bn[r]={c:m1(t[s],i,o),e:o}}var c=_h({},Bn[r].e);return dh(Bn[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",r,c,yh(c),n)},vh=function(){return[ht,Le,y1,Mo,Po,E1,Fo,S1,w1,R1,jn,b1,ar,Vn,kt,Gn,x1,O1,Rt,Bo,Ih,L1,Ah]};var Th=function(){return[N1,C1]};var L1=function(t){return postMessage(t,[t.buffer])},Ah=function(t){return t&&{out:t.size&&new ht(t.size),dictionary:t.dictionary}},Sh=function(t,e,r,n,i,o){var s=Eh(r,n,i,function(a,c){s.terminate(),o(a,c)});return s.postMessage([t,e],e.consume?[t.buffer]:[]),function(){s.terminate()}};var N1=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&Rt(6,"invalid gzip data");var e=t[3],r=10;e&4&&(r+=(t[10]|t[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!t[r++]);return r+(e&2)},C1=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0};function Ih(t,e){return Bo(t,{i:2},e&&e.out,e&&e.dictionary)}function U1(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Rt(7),Sh(t,e,[vh,Th,function(){return[_1]}],function(n){return L1(_1(n.data[0],n.data[1]))},3,r)}function _1(t,e){var r=N1(t);return r+8>t.length&&Rt(6,"invalid gzip data"),Bo(t.subarray(r,-8),{i:2},e&&e.out||new ht(C1(t)),e&&e.dictionary)}var wh=typeof TextDecoder!="undefined"&&new TextDecoder,Rh=0;try{wh.decode(mh,{stream:!0}),Rh=1}catch(t){}var df=new Date().getTime(),xh=0;var Vo=function(){return new Date().getTime()+xh},D1=function(){let t=new Date;return t.setTime(Vo()),t.toLocaleString()},k1=function(t){let e=String(t.getMilliseconds());return"padStart"in String.prototype&&(e=e.toString().padStart(3,"0")),`${t.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")}:${e}`};var M1="5.0.0";var P1=typeof importScripts!="undefined",F1=typeof registerProcessor!="undefined";var Go="";var Oh="web.sdk.qcloud.com";var bh=`https://${Oh}/trtc/webrtc/v5/doc`,mf=`${bh}/zh-cn/`,B1="https://yun.tim.qq.com",V1="https://apisgp.my-imcloud.com";var G1={LOG:"jssdk_log",EVENT:"jssdk_event",KEY_POINT:"jssdk_new_endreport",KV_STAT:"jssdk_key_metrics_report"};var ae=(s=>(s[s.TRACE=0]="TRACE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARN=3]="WARN",s[s.ERROR=4]="ERROR",s[s.NONE=5]="NONE",s))(ae||{});var _f=7*24*3600*1e3;var j1={"120p":{width:160,height:120,frameRate:15,bitrate:200},"120p_2":{width:160,height:120,frameRate:15,bitrate:100},"180p":{width:320,height:180,frameRate:15,bitrate:350},"180p_2":{width:320,height:180,frameRate:15,bitrate:150},"240p":{width:320,height:240,frameRate:15,bitrate:400},"240p_2":{width:320,height:240,frameRate:15,bitrate:200},"360p":{width:640,height:360,frameRate:15,bitrate:800},"360p_2":{width:640,height:360,frameRate:15,bitrate:400},"480p":{width:640,height:480,frameRate:15,bitrate:900},"480p_2":{width:640,height:480,frameRate:15,bitrate:500},"720p":{width:1280,height:720,frameRate:15,bitrate:1500},"1080p":{width:1920,height:1080,frameRate:15,bitrate:2e3},"1440p":{width:2560,height:1440,frameRate:30,bitrate:4860},"4K":{width:3840,height:2160,frameRate:30,bitrate:9e3}},yf=j1["480p_2"],Ef=j1["120p_2"];var Pr={CANVAS:"canvas",AUDIO:"audio",VIDEO:"video",SCREEN:"screen",SMALL:"small",BIG:"big",AUXILIARY:"auxiliary",SMALL_VIDEO:"smallVideo",FACING_MODE_USER:"user",FACING_MODE_ENVIRONMENT:"environment",MUTE:"mute",UNMUTE:"unmute",ENDED:"ended",PLAYING:"playing",PAUSE:"pause",ERROR:"error",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",AUDIO_INPUT:"audioinput",VIDEO_INPUT:"videoinput",DETAIL:"detail",TEXT:"text",MAIN:"main",BACKUP:"backup",BANNED:"banned",KICK:"kick",USER_TIME_OUT:"user_time_out",ROOM_DISBAND:"room_disband",SEI_MESSAGE:"sei-message",ADD:"add",REMOVE:"remove",REPLACE:"replace",TRACK:"track",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",TRANSCEIVER_DIRECTION_SENDONLY:"sendonly",TRANSCEIVER_DIRECTION_RECVONLY:"recvonly",ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture"};var vf=Pr.MAIN,Tf=Pr.AUXILIARY;var Af=Pr.BIG,Sf=Pr.SMALL,If=10*1e3;var wf=Object.keys(ae);var Rf=10*1e3;var Nh=t=>Number(t)<14e8,H1=function(t,e){let r;Go?r=Go:r=Nh(t)?V1:B1;let n=Math.floor(Math.random()*us(2,31));return`${r}/v5/AVQualityReportSvc/C2S?random=${n}&sdkappid=${t}&cmdtype=${e}`};var Hf=typeof window!="undefined"&&typeof window.glog=="function"?window.glog:()=>{};var z1=t=>typeof t=="undefined",jo=t=>typeof t=="string",W1=t=>typeof t=="number";var{toString:zf}=Object.prototype;function $1({url:t,body:e,method:r="POST",timeout:n,priority:i}){return new Promise((o,s)=>{if("fetch"in window)return fetch(t,{method:r,body:e,priority:i}).then(c=>c.text()).then(c=>{try{o({data:JSON.parse(c)})}catch(u){o({data:c})}},s);let a=new XMLHttpRequest;a.onreadystatechange=()=>{if(a.readyState===4)if(a.status>=200&&a.status<300)try{let c=JSON.parse(a.response);o({data:c})}catch(c){o({data:a.response})}else s({status:a.status,statusText:a.statusText||"request failed!"})},a.timeout=n||5e3,a.open(r,t,!0),a.send(e)})}var Ch=Object.prototype.hasOwnProperty;var cr=t=>typeof t=="function",K1=t=>typeof t=="undefined";var X1=t=>typeof t=="boolean";var Uh=function(t){if(!t||typeof t!="object"||Object.prototype.toString.call(t)!="[object Object]")return!1;let e=Object.getPrototypeOf(t);if(e===null)return!0;let r=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Function.prototype.toString.call(r)===Function.prototype.toString.call(Object)};function Y1(t){if(t==null)return!0;if(typeof t=="boolean")return!1;if(typeof t=="number")return t===0;if(typeof t=="string"||typeof t=="function"||Array.isArray(t))return t.length===0;if(t instanceof Error)return t.message==="";if(Uh(t))switch(Object.prototype.toString.call(t)){case"[object File]":case"[object Map]":case"[object Set]":return t.size===0;case"[object Object]":{for(let e in t)if(Ch.call(t,e))return!1;return!0}}return!1}var Dh=0,kh=1,q1=2;function Mh({retryFunction:t,settings:e,onError:r,onRetrying:n,onRetryFailed:i,onRetrySuccess:o,context:s}){return function(...a){let{retries:c=5,timeout:u=1e3}=e,l=0,h=-1,f=Dh,v=(A,S)=>C(this,null,function*(){let F=s||this;try{let D=yield t.apply(F,a);l>0&&o&&o.call(this,l),l=0,A(D)}catch(D){let rt=()=>{clearTimeout(h),l=0,f=q1,S(D)},N=()=>{f!==q1&&l<(cr(c)?c():c)?(l++,f=kh,cr(n)&&n.call(this,l,rt),h=window.setTimeout(()=>{h=-1,v(A,S)},cr(u)?u(l):u)):(rt(),cr(i)&&i.call(this,D))};cr(r)?r.call(this,{error:D,retry:N,reject:S,retryFuncArgs:a,retriedCount:l}):N()}});return new Promise(v)}}var Q1=Mh;var Fr=class{constructor(e){j(this,"userId");j(this,"remoteUserId");j(this,"id");j(this,"sdkAppId");j(this,"type");j(this,"isLocal");this.id=e.id,this.userId=e.userId,this.sdkAppId=e.sdkAppId,this.remoteUserId=e.remoteUserId,this.isLocal=X1(e.isLocal)?e.isLocal:!0,this.type=this.isLocal?"":e.type}createChild(e){return Object.setPrototypeOf(e,this)}setUserId(e){this.userId=e}setSdkAppId(e){this.sdkAppId=e}log(e,r){let n=this.isLocal?this.userId:this.remoteUserId;r.unshift(`[${this.isLocal?"\u2191":"\u2193"}${this.type&&this.type!=="main"?"*":""}${this.id}${n?`|${n}`:""}]`),se.log(e,r,K1(this.userId)||Y1(this.userId),this.userId,this.sdkAppId)}info(...e){this.log(2,e)}debug(...e){this.log(1,e)}warn(...e){this.log(3,e)}error(...e){this.log(4,e)}};var Kt=typeof navigator=="undefined"?"":navigator.userAgent,T=t=>new RegExp(t,"i").test(Kt),J=t=>{if(T(t)){let e=new RegExp(`${t}\\/([\\d.]+)`),r=Kt.match(e);if(r&&r[1])return r[1]}return""},Ho=t=>{if(T(t)){let e=new RegExp(`${t}\\/(\\d+)`),r=Kt.match(e);if(r&&r[1])return parseFloat(r[1])}return NaN},J1=/AppleWebKit\/([\d.]+)/i.exec(Kt),Ph=J1?parseFloat(J1[1]):NaN,tu=T("iPad"),eu=typeof navigator!="undefined"&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&T("Macintosh"),ru=T("iPhone")&&!tu,Fh=T("iPod"),Hn=ru||tu||Fh||eu,ur=T("Android"),nu=function(){if(ur){let t=Kt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(t){let e=t[1]&&parseFloat(t[1]),r=t[2]&&parseFloat(t[2]);if(e&&r)return parseFloat(`${t[1]}.${t[2]}`);if(e)return e}}return NaN}(),a3=ur&&T("webkit")&&nu<2.3,c3=ur&&nu<5&&Ph<537,Bh=T("Firefox"),Vh=J("Firefox"),u3=Ho("Firefox"),iu=T("Edge"),Gh=J("Edge"),ou=T("Edg"),jh=J("Edg"),h3=Ho("Edg"),su=T("SogouMobileBrowser"),Hh=J("SogouMobileBrowser"),au=T("MetaSr\\s"),zh=J("MetaSr\\s"),Ne=T("TBS"),Wh=J("TBS"),cu=T("XWEB"),$h=J("XWEB"),l3=T("MSIE\\s8\\.0"),Kh=T("MSIE\\/\\d+"),f3=function(){if(Kh){let t=/MSIE\s(\d+)\.\d/.exec(Kt),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(Kt)&&/rv:11.0/.test(Kt)&&(e=11),e}return NaN}(),Xh=T("(micromessenger|webbrowser)"),Yh=J("MicroMessenger"),zo=!Ne&&T("MQQBrowser")&&T("COVC"),Wo=!Ne&&T("MQQBrowser")&&!T("COVC"),Z1=Wo||zo?J("MQQBrowser"):"",uu=!Ne&&T(" QQBrowser"),qh=J(" QQBrowser"),hu=!Ne&&T("QQBrowserLite"),Qh=J("QQBrowserLite"),lu=!Ne&&T("MQBHD"),Jh=J("MQBHD"),p3=T("Windows"),d3=!Hn&&T("MAC OS X"),g3=!ur&&T("Linux"),m3=T("CrOS"),_3=T("MicroMessenger"),y3=T("UCBrowser"),E3=T("Electron"),fu=T("MiuiBrowser"),Zh=J("MiuiBrowser"),pu=T("HuaweiBrowser"),v3=T("Huawei")||T("HUAWEI"),T3=T("Honor")||T("HONOR"),tl=J("HuaweiBrowser"),du=T("SamsungBrowser"),el=J("SamsungBrowser"),gu=T("HeyTapBrowser"),rl=J("HeyTapBrowser"),mu=T("VivoBrowser"),nl=J("VivoBrowser"),A3=T("OpenHarmony"),S3=J("OpenHarmony"),il=()=>Ho("Chrome"),_u=T("Chrome"),ol=!iu&&!au&&!su&&!Ne&&!cu&&!ou&&!uu&&!fu&&!pu&&!du&&!gu&&!mu&&_u,yu=T("HeadlessChrome"),I3=il(),sl=J("Chrome"),al=!_u&&!Wo&&!zo&&!hu&&!lu&&T("Safari");var Eu=J("Version"),w3=/Android.*(wv|.0.0.0)/.test(Kt),vu=(()=>{if(eu)return Eu;if(Hn){let t=Kt.match(/OS (\d+)_(\d+)/i);if(t&&t[1]){let e=t[1];return t[2]&&(e+=`.${t[2]}`),e}}return""})();var R3=Number(vu.split(".")[0]);var x3=(()=>{let t=Number(vu.split(".")[0]);return t===14||t===13})(),O3=T("CriOS");var b3=typeof location=="undefined"?!1:location.protocol==="file:"||location.hostname==="localhost"||location.hostname==="127.0.0.1";var L3=cl();function cl(){let t=new Map([[Bh,["Firefox",Vh]],[ou,["Edg",jh]],[ol,["Chrome",sl]],[al,["Safari",Eu]],[Ne,["TBS",Wh]],[cu,["XWEB",$h]],[Xh&&ru,["WeChat",Yh]],[uu,["QQ(Win)",qh]],[Wo,["QQ(Mobile)",Z1]],[zo,["QQ(Mobile X5)",Z1]],[hu,["QQ(Mac)",Qh]],[lu,["QQ(iPad)",Jh]],[fu,["MI",Zh]],[pu,["HW",tl]],[du,["Samsung",el]],[gu,["OPPO",rl]],[mu,["VIVO",nl]],[iu,["EDGE",Gh]],[su,["SogouMobile",Hh]],[au,["Sogou",zh]]]),e="unknown",r="unknown";return t.has(!0)&&([e,r]=t.get(!0)),{name:e,version:r}}var Su=Vu(Au(),1),ll=new Su.default,hr=ll;var Ko=(y=>(y.ROOM_DESTROY="1",y.JOIN_START="21",y.JOIN_SCHEDULE_SUCCESS="22",y.JOIN_SIGNAL_CONNECTION_START="23",y.JOIN_SIGNAL_CONNECTION_END="24",y.JOIN_SEND_CMD="25",y.JOIN_RECEIVED_CMD_RES="26",y.JOIN_SUCCESS="27",y.JOIN_FAILED="28",y.LEAVE_START="51",y.LEAVE_SEND_CMD="52",y.LEAVE_SUCCESS="53",y.PUBLISH_START="61",y.SEND_FIRST_VIDEO_FRAME="62",y.PUBLISH_FAILED="63",y.SUBSCRIBE_START="81",y.SUBSCRIBE_SUCCESS="82",y.SUBSCRIBE_FAILED="84",y.UNSUBSCRIBE_SUCCESS="83",y.LOCAL_TRACK_CAPTURE_START="101",y.LOCAL_TRACK_CAPTURE_SUCCESS="102",y.LOCAL_TRACK_CAPTURE_FAILED="103",y.LOCAL_TRACK_PUBLISHED="104",y.LOCAL_TRACK_UNPUBLISHED="105",y.LOCAL_TRACK_REPLACED="106",y.SWITCH_DEVICE_SUCCESS="107",y.TRACK_MUTED="108",y.TRACK_UNMUTED="109",y.REMOTE_TRACK_SUBSCRIBED="110",y.REMOTE_TRACK_UNSUBSCRIBED="111",y.LOCAL_TRACK_RECAPTURE="112",y.LOCAL_AUDIO_STARTED="113",y.LOCAL_AUDIO_STOPPED="114",y.REMOTE_AUDIO_STARTED="115",y.REMOTE_AUDIO_STOPPED="116",y.PLAY_TRACK_START="151",y.PLAYER_STATE_CHANGED="152",y.VIDEO_LOADED_DATA="153",y.AUTOPLAY_DIALOG_CLICK_CONFIRM="154",y.SIGNAL_CONNECTION_STATE_CHANGED="201",y.PEER_CONNECTION_STATE_CHANGED="202",y.SINGLE_CONNECTION_STAT="203",y.SPC_RECONNECTED="204",y.HEARTBEAT_REPORT="251",y.RECEIVED_PUBLISHED_USER_LIST="252",y.REMOTE_PUBLISH_STATE_CHANGED="253",y.AUDIO_LEVEL_INTERVAL="260",y.NETWORK_QUALITY="261",y.VIDEO_CODEC_IMPLEMENTATION_CHANGED="262",y.QUALITY_LIMITATION_CHANGED="263",y.LOG="264",y.AUDIO_PROCESSOR_DEBUG="265",y.SWITCH_ROOM_START="401",y.SWITCH_ROOM_SUCCESS="407",y.SWITCH_ROOM_FAILED="408",y))(Ko||{});var lr=Ko;var fl="%cTRTC%c%s",pl="padding: 1px 4px;border-radius: 3px;color: #fff;background: #1E88E5;",dl="display: inline",Wn=class Wn{constructor(){j(this,"_isEnableUploadLog",!0);j(this,"_localJoinedUser",new Map);j(this,"_queue",[]);j(this,"_timeoutId",-1);j(this,"_logLevel",1);j(this,"_logLevelToUpload",2);!P1&&!F1&&(this.checkURLParam(),this.installEvents())}get isAbleToUpload(){return this._isEnableUploadLog&&this._timeoutId!==-1}installEvents(){hr.on(lr.JOIN_SCHEDULE_SUCCESS,({schedule:e})=>{var r;(r=e==null?void 0:e.config)!=null&&r.logLevelToUpload&&ae[e.config.logLevelToUpload]&&(this._logLevelToUpload=e.config.logLevelToUpload)}),hr.on(lr.JOIN_SUCCESS,({room:e})=>{this.addJoinedUser({userId:e.userId,sdkAppId:e.sdkAppId}),this.startUpload()}),hr.once(lr.JOIN_FAILED,()=>{this.startUpload()}),hr.on(lr.LEAVE_SUCCESS,({room:e})=>{this.deleteJoinedUser(e.userId)})}startUpload(){this._timeoutId===-1&&this.uploadInterval()}addJoinedUser(e){this._localJoinedUser.set(e.userId,e),this.startUpload()}deleteJoinedUser(e){this._localJoinedUser.delete(e)}uploadInterval(){this.upload().catch(()=>{}),this._timeoutId=window.setTimeout(()=>this.uploadInterval(),5e3)}getLogsToUpload(){let e={map:new Map,splicedQueue:[]};if(this._queue[0].forAllJoinedClients&&this._localJoinedUser.size===0)return e;let r=0;for(;r<this._queue.length&&r!==50;r++){let n=this._queue[r];if(n.forAllJoinedClients)this._localJoinedUser.forEach(({userId:i,sdkAppId:o})=>{e.map.has(i)?e.map.get(i).logs.push(n):e.map.set(i,{userId:i,sdkAppId:o,logs:[n]})});else if(jo(n.userId)&&W1(n.sdkAppId)){let{userId:i,sdkAppId:o}=n;e.map.has(i)?e.map.get(i).logs.push(n):e.map.set(i,{userId:i,sdkAppId:o,logs:[n]})}}return e.map.size>0&&(e.splicedQueue=this._queue.splice(0,r)),e}upload(){return C(this,null,function*(){if(this._queue.length===0||!this._isEnableUploadLog)return;let{map:e,splicedQueue:r}=this.getLogsToUpload();if(e.size===0)return;try{let i=[...e.values()];for(let o=0;o<i.length;o++){let{userId:s,sdkAppId:a,logs:c}=i[o];yield this.uploadLogWithRetry(JSON.stringify({timestamp:D1(),sdkAppId:String(a),userId:s,version:M1,log:c.map(u=>u.log).join(`
42
+ `)}),a),c.forEach(u=>u.uploaded=!0)}}catch(i){}let n=r.filter(i=>!i.uploaded);n.length>0&&(this._queue=n.concat(this._queue))})}uploadLogWithRetry(e,r){return Q1({retryFunction:()=>$1({url:H1(r,G1.LOG),body:e,timeout:5e3,priority:"low"}),settings:{retries:3,timeout:2e3},onError:({retry:n})=>{n()}})()}getPrefix(e){let r=new Date;return r.setTime(Vo()),`[${k1(r)}] <${ae[e]}>`}getLogLevel(){return this._logLevel}setLogLevel(e){z1(ae[e])||(this._logLevel!==e&&this.info("setLogLevel",e),this._logLevel=e)}enableUploadLog(){this._isEnableUploadLog=!0}disableUploadLog(){this.warn("disableUploadLog"),this._isEnableUploadLog=!1}logChunkToString(e){if(jo(e))return e;try{return e instanceof Error?e.toString():JSON.stringify(e)}catch(r){return""}}log(e,r,n=!0,i,o){var c;r.unshift(this.getPrefix(e));let s={log:r.reduce((u,l)=>`${u} ${this.logChunkToString(l)}`.trim(),""),level:e,userId:i,sdkAppId:o,forAllJoinedClients:n};if(hr.emit(lr.LOG,{log:s}),this._isEnableUploadLog&&e>=this._logLevelToUpload&&this._queue.push(s),e<this._logLevel)return;let a=((c=ae[e])==null?void 0:c.toLowerCase())||"info";Wn.PRINT_LOG_TAG?console[a](fl,pl,dl,...r):console[a](...r)}debug(...e){this.log(1,e)}info(...e){this.log(2,e)}warn(...e){this.log(3,e)}error(...e){this.log(4,e)}createLogger(e){return new Fr(e)}checkURLParam(){let r=new URLSearchParams(location.search).get("logLevelToUpload"),n=r?Number(r):-1;ae[n]&&(this._logLevelToUpload=n)}getQueue(){return this._queue}};j(Wn,"PRINT_LOG_TAG",!(Hn||ur||yu));var Xo=Wn,se=new Xo;var wu=(r=>(r.FaceDetector="FaceDetector",r.ImageSegmenter="ImageSegmenter",r))(wu||{}),Iu={FaceDetector:[pt,t=>t.detectForVideo.bind(t),"blaze_face_short_range.tflite"],ImageSegmenter:[nt,t=>t.segmentForVideo.bind(t),"selfie_segmenter_landscape.tflite"]},Xt=class Xt{constructor(e){this.path=e;j(this,"hashTasks");j(this,"hashResults");j(this,"taskModels");j(this,"vision");j(this,"video");this.hashTasks=new Map,this.hashResults=new Map,this.taskModels=new Map}get basePath(){return this.path}get models(){return this.taskModels}get visionWasm(){return this.vision}static getInstance(e){return C(this,null,function*(){if(e){if(Xt.instance&&Xt.instance.path===e)return Xt.instance;Xt.instance=new Xt(e),yield Xt.instance.initVision()}return Xt.instance})}preloadModels(e){return C(this,null,function*(){return yield Promise.all(e.map(r=>C(this,null,function*(){let n=this.getFinalUrl(`/mediapipe/${Iu[r][2]}`),i=yield this.getBlobUrl(n,!1);this.taskModels.set(r,i)}))).catch(r=>se.error(`preloadModels error: ${r}`))})}generateHash(e,r){return C(this,null,function*(){try{let n=this.normalizeOptions(r),i=JSON.stringify({taskType:e,options:n});return yield crypto.subtle.digest("SHA-256",new TextEncoder().encode(i)).then(o=>this.bufferToHex(o))}catch(n){throw new Error(`GenerateHash error: ${n}`)}})}normalizeOptions(e){let r={};for(let n of Object.keys(e).sort()){let i=e[n];i instanceof HTMLCanvasElement?r[n]={id:i.id}:typeof i=="object"&&i!==null?r[n]=this.normalizeOptions(i):r[n]=i}return r}bufferToHex(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}register(e,r){return C(this,null,function*(){try{let n={baseOptions:{modelAssetPath:this.getModelUrl(e),delegate:"GPU"},runningMode:"VIDEO"};r!=null&&r.path&&n.baseOptions&&(n.baseOptions.modelAssetPath=r.path),r!=null&&r.canvas&&(n.canvas=r.canvas);let i=yield this.generateHash(e,n);if(!this.hashTasks.has(i)){let[o,s]=Iu[e],a=yield o.createFromOptions(this.vision,n),c=s(a);this.hashTasks.set(i,[a,c])}return i}catch(n){se.error(`Register error: ${n}`)}})}getResult(e){try{if(!this.hashResults.has(e)){if(!this.hashTasks.get(e))throw new Error("Unregistered hash");this.hashResults.set(e,this.reasoning(e))}return this.hashResults.get(e)}catch(r){se.error(`GetResult error: ${r}`)}}reasoning(e){let r=this.hashTasks.get(e)[1];return r(this.video,performance.now())}getModelUrl(e){return this.taskModels.get(e)}getFinalUrl(e){return`${this.path}/${e}`.replace(/([^:]\/)\/+/g,"$1")}initVision(){return C(this,null,function*(){try{let e=(yield Qt.isSimdSupported())?"vision_wasm_internal":"vision_wasm_nosimd_internal",r=this.getFinalUrl(`/mediapipe/${e}`),[n,i]=[`${r}.wasm.gz`,`${r}.js.gz`],[o,s]=yield Promise.all([this.getBlobUrl(n),this.getBlobUrl(i)]);this.vision=yield Qt.forVisionTasks(""),this.vision.wasmBinaryPath=o,this.vision.wasmLoaderPath=s}catch(e){se.error(`initVision error: ${e}`)}})}getBlobUrl(e,r=!0){return C(this,null,function*(){let n=yield fetch(e);if(!n.ok)throw new Error(`Failed to fetch ${e}: ${n.status} ${n.statusText};`);let i;if(r){let o=yield n.arrayBuffer();i=yield new Promise((s,a)=>{U1(new Uint8Array(o),(c,u)=>{c&&a(c),s(new Blob([u],{type:this.isWasmFile(u)?"application/wasm":"application/javascript"}))})})}else i=yield n.blob();if(!(i instanceof Blob))throw new Error("Decompressed data is not a valid Blob");return URL.createObjectURL(i)})}isWasmFile(e){return e.length>=4&&e[0]===0&&e[1]===97&&e[2]===115&&e[3]===109}resetHashResults(){this.hashResults=new Map}};j(Xt,"instance");var Yo=Xt;return Gu(gl);})();
43
+
44
+ (() => {
45
+ if (typeof Vision !== 'undefined') {
46
+ // 如果是 default 导出
47
+ if (Vision.default) {
48
+ for (const key in Vision.default) {
49
+ if (Vision.default.hasOwnProperty(key)) {
50
+ window[key] = Vision.default[key];
51
+ }
52
+ }
53
+ } else {
54
+ // 如果是命名导出
55
+ for (const key in Vision) {
56
+ if (Vision.hasOwnProperty(key)) {
57
+ window[key] = Vision[key];
58
+ }
59
+ }
60
+ }
61
+ }
62
+ })();
63
+
package/index.d.ts CHANGED
@@ -6,11 +6,11 @@ import { Beauty, BeautyOptions, UpdateBeautyOptions } from './plugins/video-effe
6
6
  import { BasicBeauty, BasicBeautyOptions } from './plugins/video-effect/basic-beauty';
7
7
  import { CrossRoom, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption } from './plugins/cross-room';
8
8
  import { CustomEncryption, EncryptionOptions } from './plugins/custom-encryption';
9
- import { VideoMixerOptions, VideoMixer} from './plugins/video-effect/video-mixer'
9
+ import { VideoMixerOptions, UpdateVideoMixerOptions, VideoMixer} from './plugins/video-effect/video-mixer'
10
10
  import { SmallStreamAutoSwitcher, SmallStreamAutoSwitcherOptions } from './plugins/small-stream-auto-switcher';
11
11
  import { InitAudioProcessorOptions, UpdateAudioProcessorOptions } from 'trtc-js-sdk-core';
12
12
 
13
- export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption, SmallStreamAutoSwitcherOptions, VideoMixerOptions };
13
+ export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption, SmallStreamAutoSwitcherOptions, VideoMixerOptions, UpdateVideoMixerOptions };
14
14
  type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty | typeof CustomEncryption | typeof SmallStreamAutoSwitcher | typeof VideoMixer;
15
15
  export declare type ExperimentalAPIFunctionMap = {
16
16
  'enableAudioFrameEvent': EnableAudioFrameEventOptions;
@@ -37,7 +37,7 @@ export declare type PluginUpdateOptionsMap = {
37
37
  'CDNStreaming': CDNStreamingOptions;
38
38
  'VirtualBackground': UpdateVirtualBackgroundOptions;
39
39
  'Watermark': WatermarkOptions;
40
- 'VideoMixer': VideoMixerOptions;
40
+ 'VideoMixer': UpdateVideoMixerOptions;
41
41
  'Beauty': UpdateBeautyOptions;
42
42
  'BasicBeauty': BasicBeautyOptions;
43
43
  'CrossRoom': UpdateCrossRoomOption;
@@ -322,6 +322,7 @@ export declare interface TRTCOptions {
322
322
  enableSEI?: boolean;
323
323
  assetsPath?: string;
324
324
  volumeType?: number;
325
+ enableAutoSwitchWhenRecapturing?: boolean;
325
326
  }
326
327
  export interface VideoProfile { width: number, height: number, frameRate: number, bitrate: number; }
327
328
  export interface AudioProfile { sampleRate: number, channelCount: number, bitrate: number; }
@@ -391,6 +392,7 @@ export declare interface SwitchRoomConfig {
391
392
  export declare interface ScreenShareConfig {
392
393
  view?: string | HTMLElement | HTMLElement[] | null;
393
394
  publish?: boolean;
395
+ muteSystemAudio?: boolean;
394
396
  option?: {
395
397
  profile?: keyof typeof screenProfileMap | VideoProfile;
396
398
  fillMode?: 'contain' | 'cover' | 'fill';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-sdk-v5",
3
- "version": "5.12.0-beta.5",
3
+ "version": "5.12.0-beta.7",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cdn-streaming",
3
- "version": "5.12.0-beta.5",
3
+ "version": "5.12.0-beta.7",
4
4
  "description": "TRTC Web SDK 5.x CDN streaming plugin",
5
5
  "main": "./cdn-streaming.esm.js",
6
6
  "module": "./cdn-streaming.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/cross-room",
3
- "version": "5.12.0-beta.5",
3
+ "version": "5.12.0-beta.7",
4
4
  "description": "TRTC Web SDK 5.x Cross Room plugin",
5
5
  "main": "./cross-room.esm.js",
6
6
  "module": "./cross-room.esm.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtc-plugin/custom-encryption",
3
- "version": "5.12.0-beta.5",
3
+ "version": "5.12.0-beta.7",
4
4
  "main": "./custom-encryption.esm.js",
5
5
  "module": "./custom-encryption.esm.js",
6
6
  "types": "./custom-encryption.esm.d.ts"
@@ -11,6 +11,7 @@ export interface DeviceDetectorOptions {
11
11
  mirror?: boolean,
12
12
  },
13
13
  allowSkip?: boolean,
14
+ language?: 'auto' | 'zh' | 'en'
14
15
  }
15
16
 
16
17
  export interface DeviceDetectorResult {