@maxr0ssi/glide-web-ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/glide-demo.cjs.js +1 -1
- package/dist/glide-demo.es.js +1 -1
- package/dist/glide-web-ui.css +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +4 -5
package/dist/glide-demo.cjs.js
CHANGED
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
void main(void) {
|
|
13
13
|
gl_Position = vec4(aVertex, 0.0, 1.0);
|
|
14
14
|
vTex = aTex;
|
|
15
|
-
}`,e.VERTEX_SHADER),this.W=Cs(this,this.H(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.O=e.getAttribLocation(this.h,"aVertex"),this.L=e.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){const e=this.g;e.deleteProgram(this.h),e.deleteShader(this.X),e.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};function Ue(e,t){switch(t){case 0:return e.g.find((n=>n instanceof Uint8Array));case 1:return e.g.find((n=>n instanceof Float32Array));case 2:return e.g.find((n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture));default:throw Error(`Type is not supported: ${t}`)}}function Ni(e){var t=Ue(e,1);if(!t){if(t=Ue(e,0))t=new Float32Array(t).map((i=>i/255));else{t=new Float32Array(e.width*e.height);const i=Dt(e);var n=kr(e);if(Va(n,i,Ha(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(e.width*e.height*4),i.readPixels(0,0,e.width,e.height,i.RGBA,i.FLOAT,n);for(let r=0,s=0;r<t.length;++r,s+=4)t[r]=n[s]}else i.readPixels(0,0,e.width,e.height,i.RED,i.FLOAT,t)}e.g.push(t)}return t}function Ha(e){let t=Ue(e,2);if(!t){const n=Dt(e);t=Wa(e);const i=Ni(e),r=za(e);n.texImage2D(n.TEXTURE_2D,0,r,e.width,e.height,0,n.RED,n.FLOAT,i),Ci(e)}return t}function Dt(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=Ze(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function za(e){if(e=Dt(e),!Sn)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))Sn=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Sn=e.R16F}return Sn}function kr(e){return e.l||(e.l=new Ga),e.l}function Wa(e){const t=Dt(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=Ue(e,2);return n||(n=Ua(kr(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Ci(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var Sn,Y=class{constructor(e,t,n,i,r,s,o){this.g=e,this.m=t,this.j=n,this.canvas=i,this.l=r,this.width=s,this.height=o,this.j&&--Ds===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!Ue(this,0)}ka(){return!!Ue(this,1)}R(){return!!Ue(this,2)}ja(){return(t=Ue(e=this,0))||(t=Ni(e),t=new Uint8Array(t.map((n=>Math.round(255*n)))),e.g.push(t)),t;var e,t}ia(){return Ni(this)}N(){return Ha(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const i=Dt(this),r=kr(this);i.activeTexture(i.TEXTURE1),n=Ua(r,i,this.m?i.LINEAR:i.NEAREST),i.bindTexture(i.TEXTURE_2D,n);const s=za(this);i.texImage2D(i.TEXTURE_2D,0,s,this.width,this.height,0,i.RED,i.FLOAT,null),i.bindTexture(i.TEXTURE_2D,null),Va(r,i,n),tc(r,i,!1,(()=>{Wa(this),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),Ci(this)})),nc(r),Ci(this)}}e.push(n)}return new Y(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Dt(this).deleteTexture(Ue(this,2)),Ds=-1}};Y.prototype.close=Y.prototype.close,Y.prototype.clone=Y.prototype.clone,Y.prototype.getAsWebGLTexture=Y.prototype.N,Y.prototype.getAsFloat32Array=Y.prototype.ia,Y.prototype.getAsUint8Array=Y.prototype.ja,Y.prototype.hasWebGLTexture=Y.prototype.R,Y.prototype.hasFloat32Array=Y.prototype.ka,Y.prototype.hasUint8Array=Y.prototype.Fa;var Ds=250;function Me(...e){return e.map((([t,n])=>({start:t,end:n})))}const ic=(function(e){return class extends e{Ja(){this.i._registerModelResourcesGraphService()}}})((Bs=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:Ba()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const n=e.length,i=this.i._malloc(n);this.i.HEAPU8.set(e,i),t?this.i._changeBinaryGraph(n,i):this.i._changeTextGraph(n,i),this.i._free(i)}configureAudio(e,t,n,i,r){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),m(this,i||"input_audio",(s=>{m(this,r=r||"audio_header",(o=>{this.i._configureAudio(s,o,e,t??0,n)}))}))}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ca(e){Pe(this,"__graph_config__",(t=>{e(t)})),m(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,i,r){const s=4*e.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(e,this.g/4),m(this,i,(o=>{this.i._addAudioToInputStream(this.g,t,n,o,r)}))}addGpuBufferToStream(e,t,n){m(this,t,(i=>{const[r,s]=Rs(this,e,i);this.i._addBoundTextureToStream(i,r,s,n)}))}addBoolToStream(e,t,n){m(this,t,(i=>{this.i._addBoolToInputStream(e,i,n)}))}addDoubleToStream(e,t,n){m(this,t,(i=>{this.i._addDoubleToInputStream(e,i,n)}))}addFloatToStream(e,t,n){m(this,t,(i=>{this.i._addFloatToInputStream(e,i,n)}))}addIntToStream(e,t,n){m(this,t,(i=>{this.i._addIntToInputStream(e,i,n)}))}addUintToStream(e,t,n){m(this,t,(i=>{this.i._addUintToInputStream(e,i,n)}))}addStringToStream(e,t,n){m(this,t,(i=>{m(this,e,(r=>{this.i._addStringToInputStream(r,i,n)}))}))}addStringRecordToStream(e,t,n){m(this,t,(i=>{Os(this,Object.keys(e),(r=>{Os(this,Object.values(e),(s=>{this.i._addFlatHashMapToInputStream(r,s,Object.keys(e).length,i,n)}))}))}))}addProtoToStream(e,t,n,i){m(this,n,(r=>{m(this,t,(s=>{const o=this.i._malloc(e.length);this.i.HEAPU8.set(e,o),this.i._addProtoToInputStream(o,e.length,s,r,i),this.i._free(o)}))}))}addEmptyPacketToStream(e,t){m(this,e,(n=>{this.i._addEmptyPacketToInputStream(n,t)}))}addBoolVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateBoolVector(e.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const s of e)this.i._addBoolVectorEntry(r,s);this.i._addBoolVectorToInputStream(r,i,n)}))}addDoubleVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateDoubleVector(e.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const s of e)this.i._addDoubleVectorEntry(r,s);this.i._addDoubleVectorToInputStream(r,i,n)}))}addFloatVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateFloatVector(e.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const s of e)this.i._addFloatVectorEntry(r,s);this.i._addFloatVectorToInputStream(r,i,n)}))}addIntVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateIntVector(e.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const s of e)this.i._addIntVectorEntry(r,s);this.i._addIntVectorToInputStream(r,i,n)}))}addUintVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateUintVector(e.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const s of e)this.i._addUintVectorEntry(r,s);this.i._addUintVectorToInputStream(r,i,n)}))}addStringVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateStringVector(e.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const s of e)m(this,s,(o=>{this.i._addStringVectorEntry(r,o)}));this.i._addStringVectorToInputStream(r,i,n)}))}addBoolToInputSidePacket(e,t){m(this,t,(n=>{this.i._addBoolToInputSidePacket(e,n)}))}addDoubleToInputSidePacket(e,t){m(this,t,(n=>{this.i._addDoubleToInputSidePacket(e,n)}))}addFloatToInputSidePacket(e,t){m(this,t,(n=>{this.i._addFloatToInputSidePacket(e,n)}))}addIntToInputSidePacket(e,t){m(this,t,(n=>{this.i._addIntToInputSidePacket(e,n)}))}addUintToInputSidePacket(e,t){m(this,t,(n=>{this.i._addUintToInputSidePacket(e,n)}))}addStringToInputSidePacket(e,t){m(this,t,(n=>{m(this,e,(i=>{this.i._addStringToInputSidePacket(i,n)}))}))}addProtoToInputSidePacket(e,t,n){m(this,n,(i=>{m(this,t,(r=>{const s=this.i._malloc(e.length);this.i.HEAPU8.set(e,s),this.i._addProtoToInputSidePacket(s,e.length,r,i),this.i._free(s)}))}))}addBoolVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateBoolVector(e.length);if(!i)throw Error("Unable to allocate new bool vector on heap.");for(const r of e)this.i._addBoolVectorEntry(i,r);this.i._addBoolVectorToInputSidePacket(i,n)}))}addDoubleVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateDoubleVector(e.length);if(!i)throw Error("Unable to allocate new double vector on heap.");for(const r of e)this.i._addDoubleVectorEntry(i,r);this.i._addDoubleVectorToInputSidePacket(i,n)}))}addFloatVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateFloatVector(e.length);if(!i)throw Error("Unable to allocate new float vector on heap.");for(const r of e)this.i._addFloatVectorEntry(i,r);this.i._addFloatVectorToInputSidePacket(i,n)}))}addIntVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateIntVector(e.length);if(!i)throw Error("Unable to allocate new int vector on heap.");for(const r of e)this.i._addIntVectorEntry(i,r);this.i._addIntVectorToInputSidePacket(i,n)}))}addUintVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateUintVector(e.length);if(!i)throw Error("Unable to allocate new unsigned int vector on heap.");for(const r of e)this.i._addUintVectorEntry(i,r);this.i._addUintVectorToInputSidePacket(i,n)}))}addStringVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateStringVector(e.length);if(!i)throw Error("Unable to allocate new string vector on heap.");for(const r of e)m(this,r,(s=>{this.i._addStringVectorEntry(i,s)}));this.i._addStringVectorToInputSidePacket(i,n)}))}attachBoolListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachBoolListener(n)}))}attachBoolVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachBoolVectorListener(n)}))}attachIntListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachIntListener(n)}))}attachIntVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachIntVectorListener(n)}))}attachUintListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachUintListener(n)}))}attachUintVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachUintVectorListener(n)}))}attachDoubleListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachDoubleListener(n)}))}attachDoubleVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachDoubleVectorListener(n)}))}attachFloatListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachFloatListener(n)}))}attachFloatVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachFloatVectorListener(n)}))}attachStringListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachStringListener(n)}))}attachStringVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachStringVectorListener(n)}))}attachProtoListener(e,t,n){Pe(this,e,t),m(this,e,(i=>{this.i._attachProtoListener(i,n||!1)}))}attachProtoVectorListener(e,t,n){Ye(this,e,t),m(this,e,(i=>{this.i._attachProtoVectorListener(i,n||!1)}))}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Pe(this,e,((i,r)=>{i=new Float32Array(i.buffer,i.byteOffset,i.length/4),t(i,r)})),m(this,e,(i=>{this.i._attachAudioListener(i,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Bs{get ga(){return this.i}pa(e,t,n){m(this,t,(i=>{const[r,s]=Rs(this,e,i);this.ga._addBoundTextureAsImageToStream(i,r,s,n)}))}Z(e,t){Pe(this,e,t),m(this,e,(n=>{this.ga._attachImageListener(n)}))}aa(e,t){Ye(this,e,t),m(this,e,(n=>{this.ga._attachImageVectorListener(n)}))}}));var Bs,Le=class extends ic{};async function x(e,t,n){return(async function(i,r,s,o){return Q2(i,r,s,o)})(e,n.canvas??(Ba()?void 0:document.createElement("canvas")),t,n)}function Ka(e,t,n,i){if(e.U){const s=new fa;if(n!=null&&n.regionOfInterest){if(!e.oa)throw Error("This task doesn't support region-of-interest.");var r=n.regionOfInterest;if(r.left>=r.right||r.top>=r.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(r.left<0||r.top<0||r.right>1||r.bottom>1)throw Error("Expected RectF values to be in [0,1].");y(s,1,(r.left+r.right)/2),y(s,2,(r.top+r.bottom)/2),y(s,4,r.right-r.left),y(s,3,r.bottom-r.top)}else y(s,1,.5),y(s,2,.5),y(s,4,1),y(s,3,1);if(n!=null&&n.rotationDegrees){if((n==null?void 0:n.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(y(s,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[o,a]=ja(t);n=U(s,3)*a/o,r=U(s,4)*o/a,y(s,4,n),y(s,3,r)}}e.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",e.U,i)}e.g.pa(t,e.X,i??performance.now()),e.finishProcessing()}function Fe(e,t,n){var i;if((i=e.baseOptions)!=null&&i.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Ka(e,t,n,e.C+1)}function je(e,t,n,i){var r;if(!((r=e.baseOptions)!=null&&r.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Ka(e,t,n,i)}function Bt(e,t,n,i){var r=t.data;const s=t.width,o=s*(t=t.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==o)throw Error("Unsupported channel count: "+r.length/o);return e=new Y([r],n,!1,e.g.i.canvas,e.P,s,t),i?e.clone():e}var me=class extends Oi{constructor(e,t,n,i){super(e),this.g=e,this.X=t,this.U=n,this.oa=i,this.P=new Ga}l(e,t=!0){if("runningMode"in e&&k(this.baseOptions,2,ln(!!e.runningMode&&e.runningMode!=="IMAGE")),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.P.close(),super.close()}};me.prototype.close=me.prototype.close;var Ae=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},_(e=this.h=new ni,0,1,t=new B),y(this.h,2,.5),y(this.h,3,.3)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&y(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&y(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},Fe(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},je(this,e,n,t),this.j}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect_in"),T(e,"detections");const t=new ye;De(t,B2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect_in"),E(n,"DETECTIONS:detections"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("detections",((i,r)=>{for(const s of i)i=la(s),this.j.detections.push(Ia(i));d(this,r)})),this.g.attachEmptyPacketListener("detections",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ae.prototype.detectForVideo=Ae.prototype.G,Ae.prototype.detect=Ae.prototype.F,Ae.prototype.setOptions=Ae.prototype.o,Ae.createFromModelPath=async function(e,t){return x(Ae,e,{baseOptions:{modelAssetPath:t}})},Ae.createFromModelBuffer=function(e,t){return x(Ae,e,{baseOptions:{modelAssetBuffer:t}})},Ae.createFromOptions=function(e,t){return x(Ae,e,t)};var Mr=Me([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]),Lr=Me([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]),Fr=Me([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),qa=Me([474,475],[475,476],[476,477],[477,474]),Pr=Me([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]),Rr=Me([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Xa=Me([469,470],[470,471],[471,472],[472,469]),Or=Me([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]),Ya=[...Mr,...Lr,...Fr,...Pr,...Rr,...Or],$a=Me([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 js(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var D=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,_(e=this.h=new _a,0,1,t=new B),this.A=new ya,_(this.h,0,3,this.A),this.u=new ni,_(this.h,0,2,this.u),ze(this.u,4,1),y(this.u,2,.5),y(this.A,2,.5),y(this.h,4,.5)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numFaces"in e&&ze(this.u,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&y(this.u,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&y(this.A,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return js(this),Fe(this,e,t),this.j}G(e,t,n){return js(this),je(this,e,n,t),this.j}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"face_landmarks");const t=new ye;De(t,U2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"NORM_LANDMARKS:face_landmarks"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("face_landmarks",((i,r)=>{for(const s of i)i=vn(s),this.j.faceLandmarks.push(ii(i));d(this,r)})),this.g.attachEmptyPacketListener("face_landmarks",(i=>{d(this,i)})),this.outputFaceBlendshapes&&(T(e,"blendshapes"),E(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((i,r)=>{if(this.outputFaceBlendshapes)for(const s of i)i=ti(s),this.j.faceBlendshapes.push(Sr(i.g()??[]));d(this,r)})),this.g.attachEmptyPacketListener("blendshapes",(i=>{d(this,i)}))),this.outputFacialTransformationMatrixes&&(T(e,"face_geometry"),E(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((i,r)=>{if(this.outputFacialTransformationMatrixes)for(const s of i)(i=S(i=j2(s),F2,2))&&this.j.facialTransformationMatrixes.push({rows:Ee(i,1)??0??0,columns:Ee(i,2)??0??0,data:ct(i,3,Oe,at()).slice()??[]});d(this,r)})),this.g.attachEmptyPacketListener("face_geometry",(i=>{d(this,i)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};D.prototype.detectForVideo=D.prototype.G,D.prototype.detect=D.prototype.F,D.prototype.setOptions=D.prototype.o,D.createFromModelPath=function(e,t){return x(D,e,{baseOptions:{modelAssetPath:t}})},D.createFromModelBuffer=function(e,t){return x(D,e,{baseOptions:{modelAssetBuffer:t}})},D.createFromOptions=function(e,t){return x(D,e,t)},D.FACE_LANDMARKS_LIPS=Mr,D.FACE_LANDMARKS_LEFT_EYE=Lr,D.FACE_LANDMARKS_LEFT_EYEBROW=Fr,D.FACE_LANDMARKS_LEFT_IRIS=qa,D.FACE_LANDMARKS_RIGHT_EYE=Pr,D.FACE_LANDMARKS_RIGHT_EYEBROW=Rr,D.FACE_LANDMARKS_RIGHT_IRIS=Xa,D.FACE_LANDMARKS_FACE_OVAL=Or,D.FACE_LANDMARKS_CONTOURS=Ya,D.FACE_LANDMARKS_TESSELATION=$a;var Nr=Me([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 Us(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function Vs(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function Gs(e,t=!0){const n=[];for(const r of e){var i=ti(r);e=[];for(const s of i.g())i=t&&Ee(s,1)!=null?Ee(s,1)??0:-1,e.push({score:U(s,2)??0,index:i,categoryName:Q(O(s,3))??""??"",displayName:Q(O(s,4))??""??""});n.push(e)}return n}var ce=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],_(e=this.j=new ba,0,1,t=new B),this.u=new br,_(this.j,0,2,this.u),this.D=new Ar,_(this.u,0,3,this.D),this.A=new Aa,_(this.u,0,2,this.A),this.h=new V2,_(this.j,0,3,this.h),y(this.A,2,.5),y(this.u,4,.5),y(this.D,2,.5)}get baseOptions(){return S(this.j,B,1)}set baseOptions(e){_(this.j,0,1,e)}o(e){var r,s,o,a;if(ze(this.A,3,e.numHands??1),"minHandDetectionConfidence"in e&&y(this.A,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.u,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&y(this.D,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new wt,n=t,i=Ri(e.cannedGesturesClassifierOptions,(r=S(this.h,wt,3))==null?void 0:r.l());_(n,0,2,i),_(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&((s=S(this.h,wt,3))==null||s.g());return e.customGesturesClassifierOptions?(_(n=t=new wt,0,2,i=Ri(e.customGesturesClassifierOptions,(o=S(this.h,wt,4))==null?void 0:o.l())),_(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&((a=S(this.h,wt,4))==null||a.g()),this.l(e)}Ha(e,t){return Us(this),Fe(this,e,t),Vs(this)}Ia(e,t,n){return Us(this),je(this,e,n,t),Vs(this)}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"hand_gestures"),T(e,"hand_landmarks"),T(e,"world_hand_landmarks"),T(e,"handedness");const t=new ye;De(t,G2,this.j);const n=new oe;ge(n,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"HAND_GESTURES:hand_gestures"),E(n,"LANDMARKS:hand_landmarks"),E(n,"WORLD_LANDMARKS:world_hand_landmarks"),E(n,"HANDEDNESS:handedness"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("hand_landmarks",((i,r)=>{for(const s of i){i=vn(s);const o=[];for(const a of He(i,da,1))o.push({x:U(a,1)??0,y:U(a,2)??0,z:U(a,3)??0,visibility:U(a,4)??0});this.landmarks.push(o)}d(this,r)})),this.g.attachEmptyPacketListener("hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("world_hand_landmarks",((i,r)=>{for(const s of i){i=St(s);const o=[];for(const a of He(i,ua,1))o.push({x:U(a,1)??0,y:U(a,2)??0,z:U(a,3)??0,visibility:U(a,4)??0});this.worldLandmarks.push(o)}d(this,r)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("hand_gestures",((i,r)=>{this.gestures.push(...Gs(i,!1)),d(this,r)})),this.g.attachEmptyPacketListener("hand_gestures",(i=>{d(this,i)})),this.g.attachProtoVectorListener("handedness",((i,r)=>{this.handedness.push(...Gs(i)),d(this,r)})),this.g.attachEmptyPacketListener("handedness",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function Hs(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}ce.prototype.recognizeForVideo=ce.prototype.Ia,ce.prototype.recognize=ce.prototype.Ha,ce.prototype.setOptions=ce.prototype.o,ce.createFromModelPath=function(e,t){return x(ce,e,{baseOptions:{modelAssetPath:t}})},ce.createFromModelBuffer=function(e,t){return x(ce,e,{baseOptions:{modelAssetBuffer:t}})},ce.createFromOptions=function(e,t){return x(ce,e,t)},ce.HAND_CONNECTIONS=Nr;var se=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],_(e=this.h=new br,0,1,t=new B),this.u=new Ar,_(this.h,0,3,this.u),this.j=new Aa,_(this.h,0,2,this.j),ze(this.j,3,1),y(this.j,2,.5),y(this.u,2,.5),y(this.h,4,.5)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numHands"in e&&ze(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&y(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&y(this.u,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Fe(this,e,t),Hs(this)}G(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],je(this,e,n,t),Hs(this)}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"hand_landmarks"),T(e,"world_hand_landmarks"),T(e,"handedness");const t=new ye;De(t,H2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"LANDMARKS:hand_landmarks"),E(n,"WORLD_LANDMARKS:world_hand_landmarks"),E(n,"HANDEDNESS:handedness"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("hand_landmarks",((i,r)=>{for(const s of i)i=vn(s),this.landmarks.push(ii(i));d(this,r)})),this.g.attachEmptyPacketListener("hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("world_hand_landmarks",((i,r)=>{for(const s of i)i=St(s),this.worldLandmarks.push(on(i));d(this,r)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("handedness",((i,r)=>{var s=this.handedness,o=s.push;const a=[];for(const c of i){i=ti(c);const h=[];for(const l of i.g())h.push({score:U(l,2)??0,index:Ee(l,1)??0??-1,categoryName:Q(O(l,3))??""??"",displayName:Q(O(l,4))??""??""});a.push(h)}o.call(s,...a),d(this,r)})),this.g.attachEmptyPacketListener("handedness",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};se.prototype.detectForVideo=se.prototype.G,se.prototype.detect=se.prototype.F,se.prototype.setOptions=se.prototype.o,se.createFromModelPath=function(e,t){return x(se,e,{baseOptions:{modelAssetPath:t}})},se.createFromModelBuffer=function(e,t){return x(se,e,{baseOptions:{modelAssetBuffer:t}})},se.createFromOptions=function(e,t){return x(se,e,t)},se.HAND_CONNECTIONS=Nr;var Ja=Me([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 zs(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Ws(e){try{if(!e.D)return e.h;e.D(e.h)}finally{si(e)}}function Tn(e,t){e=vn(e),t.push(ii(e))}var R=class extends me{constructor(e,t){super(new Le(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,_(e=this.j=new Ta,0,1,t=new B),this.I=new Ar,_(this.j,0,2,this.I),this.W=new z2,_(this.j,0,3,this.W),this.u=new ni,_(this.j,0,4,this.u),this.O=new ya,_(this.j,0,5,this.O),this.A=new xa,_(this.j,0,6,this.A),this.M=new Sa,_(this.j,0,7,this.M),y(this.u,2,.5),y(this.u,3,.3),y(this.O,2,.5),y(this.A,2,.5),y(this.A,3,.3),y(this.M,2,.5),y(this.I,2,.5)}get baseOptions(){return S(this.j,B,1)}set baseOptions(e){_(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&y(this.u,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&y(this.u,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&y(this.O,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&y(this.A,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&y(this.A,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&y(this.M,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&y(this.I,2,e.minHandLandmarksConfidence??.5),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.D=typeof t=="function"?t:n,zs(this),Fe(this,e,i),Ws(this)}G(e,t,n,i){const r=typeof n!="function"?n:{};return this.D=typeof n=="function"?n:i,zs(this),je(this,e,r,t),Ws(this)}m(){var e=new _e;I(e,"input_frames_image"),T(e,"pose_landmarks"),T(e,"pose_world_landmarks"),T(e,"face_landmarks"),T(e,"left_hand_landmarks"),T(e,"left_hand_world_landmarks"),T(e,"right_hand_landmarks"),T(e,"right_hand_world_landmarks");const t=new ye,n=new ps;ge(n,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),(function(r,s){if(s!=null)if(Array.isArray(s))k(r,2,Hn(s,0,un));else{if(!(typeof s=="string"||s instanceof Ne||Vi(s)))throw Error("invalid value in Any.value field: "+s+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");$e(r,2,Hi(s,!1),gt())}})(n,this.j.g());const i=new oe;ge(i,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),rr(i,8,ps,n),N(i,"IMAGE:input_frames_image"),E(i,"POSE_LANDMARKS:pose_landmarks"),E(i,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),E(i,"FACE_LANDMARKS:face_landmarks"),E(i,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),E(i,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),E(i,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),E(i,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),i.o(t),Se(e,i),ri(this,e),this.g.attachProtoListener("pose_landmarks",((r,s)=>{Tn(r,this.h.poseLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("pose_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("pose_world_landmarks",((r,s)=>{var o=this.h.poseWorldLandmarks;r=St(r),o.push(on(r)),d(this,s)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(r=>{d(this,r)})),this.outputPoseSegmentationMasks&&(E(i,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),It(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",((r,s)=>{this.h.poseSegmentationMasks=[Bt(this,r,!0,!this.D)],d(this,s)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(r=>{this.h.poseSegmentationMasks=[],d(this,r)}))),this.g.attachProtoListener("face_landmarks",((r,s)=>{Tn(r,this.h.faceLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("face_landmarks",(r=>{d(this,r)})),this.outputFaceBlendshapes&&(T(e,"extra_blendshapes"),E(i,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((r,s)=>{var o=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(r=ti(r),o.push(Sr(r.g()??[]))),d(this,s)})),this.g.attachEmptyPacketListener("extra_blendshapes",(r=>{d(this,r)}))),this.g.attachProtoListener("left_hand_landmarks",((r,s)=>{Tn(r,this.h.leftHandLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("left_hand_world_landmarks",((r,s)=>{var o=this.h.leftHandWorldLandmarks;r=St(r),o.push(on(r)),d(this,s)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("right_hand_landmarks",((r,s)=>{Tn(r,this.h.rightHandLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("right_hand_world_landmarks",((r,s)=>{var o=this.h.rightHandWorldLandmarks;r=St(r),o.push(on(r)),d(this,s)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(r=>{d(this,r)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};R.prototype.detectForVideo=R.prototype.G,R.prototype.detect=R.prototype.F,R.prototype.setOptions=R.prototype.o,R.createFromModelPath=function(e,t){return x(R,e,{baseOptions:{modelAssetPath:t}})},R.createFromModelBuffer=function(e,t){return x(R,e,{baseOptions:{modelAssetBuffer:t}})},R.createFromOptions=function(e,t){return x(R,e,t)},R.HAND_CONNECTIONS=Nr,R.POSE_CONNECTIONS=Ja,R.FACE_LANDMARKS_LIPS=Mr,R.FACE_LANDMARKS_LEFT_EYE=Lr,R.FACE_LANDMARKS_LEFT_EYEBROW=Fr,R.FACE_LANDMARKS_LEFT_IRIS=qa,R.FACE_LANDMARKS_RIGHT_EYE=Pr,R.FACE_LANDMARKS_RIGHT_EYEBROW=Rr,R.FACE_LANDMARKS_RIGHT_IRIS=Xa,R.FACE_LANDMARKS_FACE_OVAL=Or,R.FACE_LANDMARKS_CONTOURS=Ya,R.FACE_LANDMARKS_TESSELATION=$a;var be=class extends me{constructor(e,t){super(new Le(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},_(e=this.h=new ka,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return _(this.h,0,2,Ri(e,S(this.h,_r,2))),this.l(e)}sa(e,t){return this.j={classifications:[]},Fe(this,e,t),this.j}ta(e,t,n){return this.j={classifications:[]},je(this,e,n,t),this.j}m(){var e=new _e;I(e,"input_image"),I(e,"norm_rect"),T(e,"classifications");const t=new ye;De(t,W2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),N(n,"IMAGE:input_image"),N(n,"NORM_RECT:norm_rect"),E(n,"CLASSIFICATIONS:classifications"),n.o(t),Se(e,n),this.g.attachProtoListener("classifications",((i,r)=>{this.j=J2(O2(i)),d(this,r)})),this.g.attachEmptyPacketListener("classifications",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};be.prototype.classifyForVideo=be.prototype.ta,be.prototype.classify=be.prototype.sa,be.prototype.setOptions=be.prototype.o,be.createFromModelPath=function(e,t){return x(be,e,{baseOptions:{modelAssetPath:t}})},be.createFromModelBuffer=function(e,t){return x(be,e,{baseOptions:{modelAssetBuffer:t}})},be.createFromOptions=function(e,t){return x(be,e,t)};var he=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!0),this.h=new Ma,this.embeddings={embeddings:[]},_(e=this.h,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){var t=this.h,n=S(this.h,xs,2);return n=n?n.clone():new xs,e.l2Normalize!==void 0?k(n,1,ln(e.l2Normalize)):"l2Normalize"in e&&k(n,1),e.quantize!==void 0?k(n,2,ln(e.quantize)):"quantize"in e&&k(n,2),_(t,0,2,n),this.l(e)}za(e,t){return Fe(this,e,t),this.embeddings}Aa(e,t,n){return je(this,e,n,t),this.embeddings}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"embeddings_out");const t=new ye;De(t,K2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"EMBEDDINGS:embeddings_out"),n.o(t),Se(e,n),this.g.attachProtoListener("embeddings_out",((i,r)=>{i=I2(i),this.embeddings=(function(s){return{embeddings:He(s,C2,1).map((o=>{var h,l;const a={headIndex:Ee(o,3)??0??-1,headName:Q(O(o,4))??""??""};var c=o.v;return xo(c,0|c[g],Es,gi(o,1))!==void 0?(o=ct(o=S(o,Es,gi(o,1),void 0),1,Oe,at()),a.floatEmbedding=o.slice()):(c=new Uint8Array(0),a.quantizedEmbedding=((l=(h=S(o,N2,gi(o,2),void 0))==null?void 0:h.na())==null?void 0:l.h())??c),a})),timestampMs:Ca(ko(s))}})(i),d(this,r)})),this.g.attachEmptyPacketListener("embeddings_out",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};he.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=Fs(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=Fs(Ls(e.quantizedEmbedding),Ls(t.quantizedEmbedding))}return e},he.prototype.embedForVideo=he.prototype.Aa,he.prototype.embed=he.prototype.za,he.prototype.setOptions=he.prototype.o,he.createFromModelPath=function(e,t){return x(he,e,{baseOptions:{modelAssetPath:t}})},he.createFromModelBuffer=function(e,t){return x(he,e,{baseOptions:{modelAssetBuffer:t}})},he.createFromOptions=function(e,t){return x(he,e,t)};var Ii=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach((n=>{n.close()})),(t=this.categoryMask)==null||t.close()}};function rc(e){var n,i;const t=(function(r){return He(r,oe,1)})(e.ca()).filter((r=>(Q(O(r,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(e.u=[],t.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(((i=(n=S(t[0],ye,7))==null?void 0:n.j())==null?void 0:i.g())??new Map).forEach(((r,s)=>{e.u[Number(s)]=Q(O(r,1))??""}))}function Ks(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function qs(e){try{const t=new Ii(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{si(e)}}Ii.prototype.close=Ii.prototype.close;var re=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new xr,this.A=new La,_(this.h,0,3,this.A),_(e=this.h,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?k(this.h,2,mn(e.displayNamesLocale)):"displayNamesLocale"in e&&k(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}L(){rc(this)}segment(e,t,n){const i=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:n,Ks(this),Fe(this,e,i),qs(this)}La(e,t,n,i){const r=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:i,Ks(this),je(this,e,r,t),qs(this)}Da(){return this.u}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect");const t=new ye;De(t,Pa,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),n.o(t),Se(e,n),ri(this,e),this.outputConfidenceMasks&&(T(e,"confidence_masks"),E(n,"CONFIDENCE_MASKS:confidence_masks"),It(this,"confidence_masks"),this.g.aa("confidence_masks",((i,r)=>{this.confidenceMasks=i.map((s=>Bt(this,s,!0,!this.j))),d(this,r)})),this.g.attachEmptyPacketListener("confidence_masks",(i=>{this.confidenceMasks=[],d(this,i)}))),this.outputCategoryMask&&(T(e,"category_mask"),E(n,"CATEGORY_MASK:category_mask"),It(this,"category_mask"),this.g.Z("category_mask",((i,r)=>{this.categoryMask=Bt(this,i,!1,!this.j),d(this,r)})),this.g.attachEmptyPacketListener("category_mask",(i=>{this.categoryMask=void 0,d(this,i)}))),T(e,"quality_scores"),E(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((i,r)=>{this.qualityScores=i,d(this,r)})),this.g.attachEmptyPacketListener("quality_scores",(i=>{this.categoryMask=void 0,d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};re.prototype.getLabels=re.prototype.Da,re.prototype.segmentForVideo=re.prototype.La,re.prototype.segment=re.prototype.segment,re.prototype.setOptions=re.prototype.o,re.createFromModelPath=function(e,t){return x(re,e,{baseOptions:{modelAssetPath:t}})},re.createFromModelBuffer=function(e,t){return x(re,e,{baseOptions:{modelAssetBuffer:t}})},re.createFromOptions=function(e,t){return x(re,e,t)};var Di=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach((n=>{n.close()})),(t=this.categoryMask)==null||t.close()}};Di.prototype.close=Di.prototype.close;var Re=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new xr,this.u=new La,_(this.h,0,3,this.u),_(e=this.h,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,i){const r=typeof n!="function"?n:{};if(this.j=typeof n=="function"?n:i,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.C+1,i=new Ra,t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var s=new _i;$e(s,3,ln(!0),!1),$e(s,1,tn(t.keypoint.x),0),$e(s,2,tn(t.keypoint.y),0),rn(i,1,Pi,s)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");{const a=new X2;for(s of t.scribble)$e(t=new _i,3,ln(!0),!1),$e(t,1,tn(s.x),0),$e(t,2,tn(s.y),0),rr(a,1,_i,t);rn(i,2,Pi,a)}}this.g.addProtoToStream(i.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",n),Fe(this,e,r);e:{try{const a=new Di(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var o=a;break e}this.j(a)}finally{si(this)}o=void 0}return o}m(){var e=new _e;I(e,"image_in"),I(e,"roi_in"),I(e,"norm_rect_in");const t=new ye;De(t,Pa,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),N(n,"IMAGE:image_in"),N(n,"ROI:roi_in"),N(n,"NORM_RECT:norm_rect_in"),n.o(t),Se(e,n),ri(this,e),this.outputConfidenceMasks&&(T(e,"confidence_masks"),E(n,"CONFIDENCE_MASKS:confidence_masks"),It(this,"confidence_masks"),this.g.aa("confidence_masks",((i,r)=>{this.confidenceMasks=i.map((s=>Bt(this,s,!0,!this.j))),d(this,r)})),this.g.attachEmptyPacketListener("confidence_masks",(i=>{this.confidenceMasks=[],d(this,i)}))),this.outputCategoryMask&&(T(e,"category_mask"),E(n,"CATEGORY_MASK:category_mask"),It(this,"category_mask"),this.g.Z("category_mask",((i,r)=>{this.categoryMask=Bt(this,i,!1,!this.j),d(this,r)})),this.g.attachEmptyPacketListener("category_mask",(i=>{this.categoryMask=void 0,d(this,i)}))),T(e,"quality_scores"),E(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((i,r)=>{this.qualityScores=i,d(this,r)})),this.g.attachEmptyPacketListener("quality_scores",(i=>{this.categoryMask=void 0,d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Re.prototype.segment=Re.prototype.segment,Re.prototype.setOptions=Re.prototype.o,Re.createFromModelPath=function(e,t){return x(Re,e,{baseOptions:{modelAssetPath:t}})},Re.createFromModelBuffer=function(e,t){return x(Re,e,{baseOptions:{modelAssetBuffer:t}})},Re.createFromOptions=function(e,t){return x(Re,e,t)};var we=class extends me{constructor(e,t){super(new Le(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},_(e=this.h=new Oa,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?k(this.h,2,mn(e.displayNamesLocale)):"displayNamesLocale"in e&&k(this.h,2),e.maxResults!==void 0?ze(this.h,3,e.maxResults):"maxResults"in e&&k(this.h,3),e.scoreThreshold!==void 0?y(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&k(this.h,4),e.categoryAllowlist!==void 0?Rn(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&k(this.h,5),e.categoryDenylist!==void 0?Rn(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&k(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},Fe(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},je(this,e,n,t),this.j}m(){var e=new _e;I(e,"input_frame_gpu"),I(e,"norm_rect"),T(e,"detections");const t=new ye;De(t,Y2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),N(n,"IMAGE:input_frame_gpu"),N(n,"NORM_RECT:norm_rect"),E(n,"DETECTIONS:detections"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("detections",((i,r)=>{for(const s of i)i=la(s),this.j.detections.push(Ia(i));d(this,r)})),this.g.attachEmptyPacketListener("detections",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};we.prototype.detectForVideo=we.prototype.G,we.prototype.detect=we.prototype.F,we.prototype.setOptions=we.prototype.o,we.createFromModelPath=async function(e,t){return x(we,e,{baseOptions:{modelAssetPath:t}})},we.createFromModelBuffer=function(e,t){return x(we,e,{baseOptions:{modelAssetBuffer:t}})},we.createFromOptions=function(e,t){return x(we,e,t)};var Bi=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){var e;(e=this.segmentationMasks)==null||e.forEach((t=>{t.close()}))}};function Xs(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function Ys(e){try{const t=new Bi(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.u)return t;e.u(t)}finally{si(e)}}Bi.prototype.close=Bi.prototype.close;var le=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,_(e=this.h=new Na,0,1,t=new B),this.A=new Sa,_(this.h,0,3,this.A),this.j=new xa,_(this.h,0,2,this.j),ze(this.j,4,1),y(this.j,2,.5),y(this.A,2,.5),y(this.h,4,.5)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numPoses"in e&&ze(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&y(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&y(this.A,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.u=typeof t=="function"?t:n,Xs(this),Fe(this,e,i),Ys(this)}G(e,t,n,i){const r=typeof n!="function"?n:{};return this.u=typeof n=="function"?n:i,Xs(this),je(this,e,r,t),Ys(this)}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"normalized_landmarks"),T(e,"world_landmarks"),T(e,"segmentation_masks");const t=new ye;De(t,$2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"NORM_LANDMARKS:normalized_landmarks"),E(n,"WORLD_LANDMARKS:world_landmarks"),n.o(t),Se(e,n),ri(this,e),this.g.attachProtoVectorListener("normalized_landmarks",((i,r)=>{this.landmarks=[];for(const s of i)i=vn(s),this.landmarks.push(ii(i));d(this,r)})),this.g.attachEmptyPacketListener("normalized_landmarks",(i=>{this.landmarks=[],d(this,i)})),this.g.attachProtoVectorListener("world_landmarks",((i,r)=>{this.worldLandmarks=[];for(const s of i)i=St(s),this.worldLandmarks.push(on(i));d(this,r)})),this.g.attachEmptyPacketListener("world_landmarks",(i=>{this.worldLandmarks=[],d(this,i)})),this.outputSegmentationMasks&&(E(n,"SEGMENTATION_MASK:segmentation_masks"),It(this,"segmentation_masks"),this.g.aa("segmentation_masks",((i,r)=>{this.segmentationMasks=i.map((s=>Bt(this,s,!0,!this.u))),d(this,r)})),this.g.attachEmptyPacketListener("segmentation_masks",(i=>{this.segmentationMasks=[],d(this,i)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};le.prototype.detectForVideo=le.prototype.G,le.prototype.detect=le.prototype.F,le.prototype.setOptions=le.prototype.o,le.createFromModelPath=function(e,t){return x(le,e,{baseOptions:{modelAssetPath:t}})},le.createFromModelBuffer=function(e,t){return x(le,e,{baseOptions:{modelAssetBuffer:t}})},le.createFromOptions=function(e,t){return x(le,e,t)},le.POSE_CONNECTIONS=Ja;const sc="https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task",oc="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm";class ac{constructor(){A(this,"landmarker",null);A(this,"_ready",!1)}get isReady(){return this._ready}async initialize(t){const n=(t==null?void 0:t.wasmPath)??oc,i=(t==null?void 0:t.modelPath)??sc,r=await st.forVisionTasks(n);this.landmarker=await se.createFromOptions(r,{baseOptions:{modelAssetPath:i,delegate:"GPU"},runningMode:"VIDEO",numHands:(t==null?void 0:t.numHands)??1,minHandDetectionConfidence:(t==null?void 0:t.minDetectionConfidence)??.5,minTrackingConfidence:(t==null?void 0:t.minTrackingConfidence)??.5}),this._ready=!0}detect(t,n){var c,h,l,u,f,v;if(!this.landmarker)return null;const i=this.landmarker.detectForVideo(t,n);if(!i.landmarks||i.landmarks.length===0)return null;const r=i.landmarks[0],s=((l=(h=(c=i.handednesses)==null?void 0:c[0])==null?void 0:h[0])==null?void 0:l.categoryName)??"Right",o=((v=(f=(u=i.handednesses)==null?void 0:u[0])==null?void 0:f[0])==null?void 0:v.score)??0;return{landmarks:r.map(b=>({x:b.x,y:b.y,visibility:b.visibility??void 0})),handedness:s,confidence:o}}destroy(){var t;(t=this.landmarker)==null||t.close(),this.landmarker=null,this._ready=!1}}function Za(e={}){const{modelPath:t,config:n,enabled:i=!0}=e,r=M.useRef(null),s=M.useRef(null),o=M.useRef(0),a=M.useRef(0),c=M.useRef(0),[h,l]=M.useState(!1),[u,f]=M.useState(!1),[v,b]=M.useState(null),[F,P]=M.useState(Ln()),[W,te]=M.useState(null),[ve,nt]=M.useState(Tt.IDLE),[An,oi]=M.useState(null),[Qa,e1]=M.useState(0),Cr=M.useRef(n?r1(n):$s()),ai=M.useRef(null),Ir=M.useRef(null),ci=M.useRef(null),hi=M.useRef(null),li=M.useRef(null),Dr=M.useRef(0),Br=M.useCallback(()=>{const ie=Cr.current;Ir.current=new ot(ie.kinematics.emaAlpha,ie.kinematics.bufferFrames),ci.current=new p1(ie.touchproof),hi.current=new y1,li.current=new _1},[]),bn=M.useCallback(()=>{var Vr;const ie=r.current,Ke=ai.current;if(!ie||!(Ke!=null&&Ke.isReady)||ie.readyState<2){o.current=requestAnimationFrame(bn);return}const At=performance.now(),ae=ie.videoWidth,Te=ie.videoHeight,qe=Ke.detect(ie,At);let Jt=Ln(),wn=null,jr=Tt.IDLE,Ur=null;if(qe&&qe.landmarks.length>=21){Ur=qe.landmarks,(Vr=Ir.current)==null||Vr.compute(qe.landmarks);const t1=o1(qe.landmarks);ci.current&&(Jt=ci.current.update(qe.landmarks,ae,Te));const Gr=qe.landmarks[8],Hr=qe.landmarks[12];if(hi.current&&(wn=hi.current.update([Gr.x,Gr.y],[Hr.x,Hr.y],Jt.isTouching,At)),li.current){const zr=li.current.update(wn,Jt.isTouching,t1.openPalm&&!Jt.isTouching,At);jr=zr.state,wn=zr.velocity}}Dr.current++,Dr.current%2===0&&(P(Jt),te(wn),nt(jr),oi(Ur)),a.current++,At-c.current>=1e3&&(e1(a.current),a.current=0,c.current=At),o.current=requestAnimationFrame(bn)},[]);return M.useEffect(()=>{if(!i)return;let ie=!1;const Ke=new ac;return ai.current=Ke,(async()=>{f(!0),b(null);try{const ae=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:640},height:{ideal:480},facingMode:"user"}});if(ie){ae.getTracks().forEach(Te=>Te.stop());return}if(r.current&&(r.current.srcObject=ae,await r.current.play()),await Ke.initialize({modelPath:t}),ie)return;Br(),l(!0),f(!1),o.current=requestAnimationFrame(bn)}catch(ae){if(ie)return;const Te=ae instanceof Error?ae.message:"Failed to initialize Glide";Te.includes("Permission")||Te.includes("NotAllowed")?b("Camera access denied. Please allow camera access and reload."):Te.includes("NotFound")||Te.includes("DevicesNotFound")?b("No camera found. Please connect a camera and reload."):b(Te),f(!1)}})(),()=>{ie=!0,cancelAnimationFrame(o.current);const ae=r.current;ae!=null&&ae.srcObject&&(ae.srcObject.getTracks().forEach(Te=>Te.stop()),ae.srcObject=null),Ke.destroy(),ai.current=null}},[i,t,Br,bn]),{videoRef:r,canvasRef:s,isReady:h,isLoading:u,error:v,signals:F,velocity:W,gestureState:ve,landmarks:An,fps:Qa,config:Cr.current}}const cc=[[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],[17,18],[18,19],[19,20],[0,17]],hc=({videoRef:e,canvasRef:t,landmarks:n,signals:i,gestureState:r,fps:s,isLoading:o,error:a})=>{M.useEffect(()=>{const h=t.current,l=e.current;if(!h||!l)return;const u=h.getContext("2d");if(!u)return;const v=setInterval(()=>{if(h.width=l.videoWidth||640,h.height=l.videoHeight||480,u.clearRect(0,0,h.width,h.height),!n||n.length<21)return;const b=h.width,F=h.height;u.lineWidth=2,u.strokeStyle="rgba(255, 255, 255, 0.6)";for(const[P,W]of cc){const te=n[P],ve=n[W];u.beginPath(),u.moveTo(te.x*b,te.y*F),u.lineTo(ve.x*b,ve.y*F),u.stroke()}for(let P=0;P<n.length;P++){const W=n[P],te=P===8||P===12;u.beginPath(),u.arc(W.x*b,W.y*F,te?6:3,0,Math.PI*2),te?u.fillStyle=i.isTouching?"#22c55e":"#ef4444":u.fillStyle="rgba(255, 255, 255, 0.8)",u.fill()}},50);return()=>clearInterval(v)},[t,e,n,i.isTouching]);const c=[{label:"Proximity",value:i.proximityScore,color:"#3b82f6"},{label:"Angle",value:i.angleScore,color:"#8b5cf6"},{label:"Correlation",value:i.correlationScore,color:"#06b6d4"},{label:"Visibility",value:i.visibilityScore,color:"#f59e0b"},{label:"Fused",value:i.fusedScore,color:i.isTouching?"#22c55e":"#ef4444"}];return w.jsxs("div",{className:"glide-visualizer",children:[w.jsxs("div",{className:"glide-video-container",children:[w.jsx("video",{ref:e,autoPlay:!0,playsInline:!0,muted:!0,style:{width:"100%",height:"100%",objectFit:"cover",transform:"scaleX(-1)"}}),w.jsx("canvas",{ref:t,className:"glide-canvas-overlay",style:{transform:"scaleX(-1)"}}),w.jsxs("div",{className:"glide-status-overlay",children:[w.jsxs("span",{className:"glide-fps",children:[s," FPS"]}),w.jsx("span",{className:`glide-state glide-state--${r}`,children:r===Tt.SCROLLING?"SCROLLING":"IDLE"})]}),o&&w.jsxs("div",{className:"glide-loading-overlay",children:[w.jsx("div",{className:"glide-spinner"}),w.jsx("p",{children:"Loading hand detection model..."})]}),a&&w.jsx("div",{className:"glide-error-overlay",children:w.jsx("p",{children:a})})]}),w.jsxs("div",{className:"glide-signal-dashboard",children:[c.map(h=>w.jsxs("div",{className:"glide-signal-row",children:[w.jsx("span",{className:"glide-signal-label",children:h.label}),w.jsx("div",{className:"glide-signal-bar-bg",children:w.jsx("div",{className:"glide-signal-bar-fill",style:{width:`${Math.max(0,Math.min(100,h.value*100))}%`,backgroundColor:h.color}})}),w.jsx("span",{className:"glide-signal-value",children:h.value.toFixed(2)})]},h.label)),w.jsxs("div",{className:"glide-signal-row",children:[w.jsx("span",{className:"glide-signal-label",children:"Distance"}),w.jsx("div",{className:"glide-signal-bar-bg",children:w.jsx("div",{className:"glide-signal-bar-fill",style:{width:`${i.distanceFactor*100}%`,backgroundColor:"#64748b"}})}),w.jsx("span",{className:"glide-signal-value",children:i.distanceFactor.toFixed(2)})]})]})]})},lc=w.jsxs(w.Fragment,{children:[w.jsx("h2",{children:"Scroll Demo"}),w.jsx("p",{children:"This area responds to your Glide gestures. Pinch your index and middle fingers together, then move them up or down to scroll."}),Array.from({length:20},(e,t)=>w.jsxs("div",{className:"glide-scroll-section",children:[w.jsxs("h3",{children:["Section ",t+1]}),w.jsx("p",{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}),w.jsx("p",{children:"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."})]},t))]}),uc=({velocity:e,gestureState:t,isActive:n,children:i})=>{const r=M.useRef(null);return M.useEffect(()=>{if(!n||t!==Tt.SCROLLING||!e||!r.current)return;const s=-e.y*1400;r.current.scrollBy({top:s/60})},[e,t,n]),w.jsx("div",{ref:r,className:`glide-scroll-area ${n?"glide-scroll-area--active":""}`,children:i??lc})},dc=({modelPath:e,config:t,showVisualizer:n=!0,scrollContent:i,className:r="",style:s})=>{const o=Za({modelPath:e,config:t}),a=i===null;return w.jsxs("div",{className:`glide-demo ${a?"glide-demo--full":""} ${r}`,style:s,children:[n&&w.jsx(hc,{videoRef:o.videoRef,canvasRef:o.canvasRef,landmarks:o.landmarks,signals:o.signals,gestureState:o.gestureState,fps:o.fps,isLoading:o.isLoading,error:o.error}),!a&&w.jsx(uc,{velocity:o.velocity,gestureState:o.gestureState,isActive:o.gestureState===Tt.SCROLLING,children:i})]})};exports.GlideDemo=dc;exports.useGlide=Za;
|
|
15
|
+
}`,e.VERTEX_SHADER),this.W=Cs(this,this.H(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.O=e.getAttribLocation(this.h,"aVertex"),this.L=e.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){const e=this.g;e.deleteProgram(this.h),e.deleteShader(this.X),e.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};function Ue(e,t){switch(t){case 0:return e.g.find((n=>n instanceof Uint8Array));case 1:return e.g.find((n=>n instanceof Float32Array));case 2:return e.g.find((n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture));default:throw Error(`Type is not supported: ${t}`)}}function Ni(e){var t=Ue(e,1);if(!t){if(t=Ue(e,0))t=new Float32Array(t).map((i=>i/255));else{t=new Float32Array(e.width*e.height);const i=Dt(e);var n=kr(e);if(Va(n,i,Ha(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(e.width*e.height*4),i.readPixels(0,0,e.width,e.height,i.RGBA,i.FLOAT,n);for(let r=0,s=0;r<t.length;++r,s+=4)t[r]=n[s]}else i.readPixels(0,0,e.width,e.height,i.RED,i.FLOAT,t)}e.g.push(t)}return t}function Ha(e){let t=Ue(e,2);if(!t){const n=Dt(e);t=Wa(e);const i=Ni(e),r=za(e);n.texImage2D(n.TEXTURE_2D,0,r,e.width,e.height,0,n.RED,n.FLOAT,i),Ci(e)}return t}function Dt(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=Ze(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function za(e){if(e=Dt(e),!Sn)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))Sn=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Sn=e.R16F}return Sn}function kr(e){return e.l||(e.l=new Ga),e.l}function Wa(e){const t=Dt(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=Ue(e,2);return n||(n=Ua(kr(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function Ci(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var Sn,Y=class{constructor(e,t,n,i,r,s,o){this.g=e,this.m=t,this.j=n,this.canvas=i,this.l=r,this.width=s,this.height=o,this.j&&--Ds===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!Ue(this,0)}ka(){return!!Ue(this,1)}R(){return!!Ue(this,2)}ja(){return(t=Ue(e=this,0))||(t=Ni(e),t=new Uint8Array(t.map((n=>Math.round(255*n)))),e.g.push(t)),t;var e,t}ia(){return Ni(this)}N(){return Ha(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const i=Dt(this),r=kr(this);i.activeTexture(i.TEXTURE1),n=Ua(r,i,this.m?i.LINEAR:i.NEAREST),i.bindTexture(i.TEXTURE_2D,n);const s=za(this);i.texImage2D(i.TEXTURE_2D,0,s,this.width,this.height,0,i.RED,i.FLOAT,null),i.bindTexture(i.TEXTURE_2D,null),Va(r,i,n),tc(r,i,!1,(()=>{Wa(this),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),Ci(this)})),nc(r),Ci(this)}}e.push(n)}return new Y(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Dt(this).deleteTexture(Ue(this,2)),Ds=-1}};Y.prototype.close=Y.prototype.close,Y.prototype.clone=Y.prototype.clone,Y.prototype.getAsWebGLTexture=Y.prototype.N,Y.prototype.getAsFloat32Array=Y.prototype.ia,Y.prototype.getAsUint8Array=Y.prototype.ja,Y.prototype.hasWebGLTexture=Y.prototype.R,Y.prototype.hasFloat32Array=Y.prototype.ka,Y.prototype.hasUint8Array=Y.prototype.Fa;var Ds=250;function Me(...e){return e.map((([t,n])=>({start:t,end:n})))}const ic=(function(e){return class extends e{Ja(){this.i._registerModelResourcesGraphService()}}})((Bs=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:Ba()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const n=e.length,i=this.i._malloc(n);this.i.HEAPU8.set(e,i),t?this.i._changeBinaryGraph(n,i):this.i._changeTextGraph(n,i),this.i._free(i)}configureAudio(e,t,n,i,r){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),m(this,i||"input_audio",(s=>{m(this,r=r||"audio_header",(o=>{this.i._configureAudio(s,o,e,t??0,n)}))}))}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ca(e){Pe(this,"__graph_config__",(t=>{e(t)})),m(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,i,r){const s=4*e.length;this.h!==s&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(s),this.h=s),this.i.HEAPF32.set(e,this.g/4),m(this,i,(o=>{this.i._addAudioToInputStream(this.g,t,n,o,r)}))}addGpuBufferToStream(e,t,n){m(this,t,(i=>{const[r,s]=Rs(this,e,i);this.i._addBoundTextureToStream(i,r,s,n)}))}addBoolToStream(e,t,n){m(this,t,(i=>{this.i._addBoolToInputStream(e,i,n)}))}addDoubleToStream(e,t,n){m(this,t,(i=>{this.i._addDoubleToInputStream(e,i,n)}))}addFloatToStream(e,t,n){m(this,t,(i=>{this.i._addFloatToInputStream(e,i,n)}))}addIntToStream(e,t,n){m(this,t,(i=>{this.i._addIntToInputStream(e,i,n)}))}addUintToStream(e,t,n){m(this,t,(i=>{this.i._addUintToInputStream(e,i,n)}))}addStringToStream(e,t,n){m(this,t,(i=>{m(this,e,(r=>{this.i._addStringToInputStream(r,i,n)}))}))}addStringRecordToStream(e,t,n){m(this,t,(i=>{Os(this,Object.keys(e),(r=>{Os(this,Object.values(e),(s=>{this.i._addFlatHashMapToInputStream(r,s,Object.keys(e).length,i,n)}))}))}))}addProtoToStream(e,t,n,i){m(this,n,(r=>{m(this,t,(s=>{const o=this.i._malloc(e.length);this.i.HEAPU8.set(e,o),this.i._addProtoToInputStream(o,e.length,s,r,i),this.i._free(o)}))}))}addEmptyPacketToStream(e,t){m(this,e,(n=>{this.i._addEmptyPacketToInputStream(n,t)}))}addBoolVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateBoolVector(e.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const s of e)this.i._addBoolVectorEntry(r,s);this.i._addBoolVectorToInputStream(r,i,n)}))}addDoubleVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateDoubleVector(e.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const s of e)this.i._addDoubleVectorEntry(r,s);this.i._addDoubleVectorToInputStream(r,i,n)}))}addFloatVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateFloatVector(e.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const s of e)this.i._addFloatVectorEntry(r,s);this.i._addFloatVectorToInputStream(r,i,n)}))}addIntVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateIntVector(e.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const s of e)this.i._addIntVectorEntry(r,s);this.i._addIntVectorToInputStream(r,i,n)}))}addUintVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateUintVector(e.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(const s of e)this.i._addUintVectorEntry(r,s);this.i._addUintVectorToInputStream(r,i,n)}))}addStringVectorToStream(e,t,n){m(this,t,(i=>{const r=this.i._allocateStringVector(e.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const s of e)m(this,s,(o=>{this.i._addStringVectorEntry(r,o)}));this.i._addStringVectorToInputStream(r,i,n)}))}addBoolToInputSidePacket(e,t){m(this,t,(n=>{this.i._addBoolToInputSidePacket(e,n)}))}addDoubleToInputSidePacket(e,t){m(this,t,(n=>{this.i._addDoubleToInputSidePacket(e,n)}))}addFloatToInputSidePacket(e,t){m(this,t,(n=>{this.i._addFloatToInputSidePacket(e,n)}))}addIntToInputSidePacket(e,t){m(this,t,(n=>{this.i._addIntToInputSidePacket(e,n)}))}addUintToInputSidePacket(e,t){m(this,t,(n=>{this.i._addUintToInputSidePacket(e,n)}))}addStringToInputSidePacket(e,t){m(this,t,(n=>{m(this,e,(i=>{this.i._addStringToInputSidePacket(i,n)}))}))}addProtoToInputSidePacket(e,t,n){m(this,n,(i=>{m(this,t,(r=>{const s=this.i._malloc(e.length);this.i.HEAPU8.set(e,s),this.i._addProtoToInputSidePacket(s,e.length,r,i),this.i._free(s)}))}))}addBoolVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateBoolVector(e.length);if(!i)throw Error("Unable to allocate new bool vector on heap.");for(const r of e)this.i._addBoolVectorEntry(i,r);this.i._addBoolVectorToInputSidePacket(i,n)}))}addDoubleVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateDoubleVector(e.length);if(!i)throw Error("Unable to allocate new double vector on heap.");for(const r of e)this.i._addDoubleVectorEntry(i,r);this.i._addDoubleVectorToInputSidePacket(i,n)}))}addFloatVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateFloatVector(e.length);if(!i)throw Error("Unable to allocate new float vector on heap.");for(const r of e)this.i._addFloatVectorEntry(i,r);this.i._addFloatVectorToInputSidePacket(i,n)}))}addIntVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateIntVector(e.length);if(!i)throw Error("Unable to allocate new int vector on heap.");for(const r of e)this.i._addIntVectorEntry(i,r);this.i._addIntVectorToInputSidePacket(i,n)}))}addUintVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateUintVector(e.length);if(!i)throw Error("Unable to allocate new unsigned int vector on heap.");for(const r of e)this.i._addUintVectorEntry(i,r);this.i._addUintVectorToInputSidePacket(i,n)}))}addStringVectorToInputSidePacket(e,t){m(this,t,(n=>{const i=this.i._allocateStringVector(e.length);if(!i)throw Error("Unable to allocate new string vector on heap.");for(const r of e)m(this,r,(s=>{this.i._addStringVectorEntry(i,s)}));this.i._addStringVectorToInputSidePacket(i,n)}))}attachBoolListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachBoolListener(n)}))}attachBoolVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachBoolVectorListener(n)}))}attachIntListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachIntListener(n)}))}attachIntVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachIntVectorListener(n)}))}attachUintListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachUintListener(n)}))}attachUintVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachUintVectorListener(n)}))}attachDoubleListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachDoubleListener(n)}))}attachDoubleVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachDoubleVectorListener(n)}))}attachFloatListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachFloatListener(n)}))}attachFloatVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachFloatVectorListener(n)}))}attachStringListener(e,t){Pe(this,e,t),m(this,e,(n=>{this.i._attachStringListener(n)}))}attachStringVectorListener(e,t){Ye(this,e,t),m(this,e,(n=>{this.i._attachStringVectorListener(n)}))}attachProtoListener(e,t,n){Pe(this,e,t),m(this,e,(i=>{this.i._attachProtoListener(i,n||!1)}))}attachProtoVectorListener(e,t,n){Ye(this,e,t),m(this,e,(i=>{this.i._attachProtoVectorListener(i,n||!1)}))}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Pe(this,e,((i,r)=>{i=new Float32Array(i.buffer,i.byteOffset,i.length/4),t(i,r)})),m(this,e,(i=>{this.i._attachAudioListener(i,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends Bs{get ga(){return this.i}pa(e,t,n){m(this,t,(i=>{const[r,s]=Rs(this,e,i);this.ga._addBoundTextureAsImageToStream(i,r,s,n)}))}Z(e,t){Pe(this,e,t),m(this,e,(n=>{this.ga._attachImageListener(n)}))}aa(e,t){Ye(this,e,t),m(this,e,(n=>{this.ga._attachImageVectorListener(n)}))}}));var Bs,Le=class extends ic{};async function x(e,t,n){return(async function(i,r,s,o){return Q2(i,r,s,o)})(e,n.canvas??(Ba()?void 0:document.createElement("canvas")),t,n)}function Ka(e,t,n,i){if(e.U){const s=new fa;if(n!=null&&n.regionOfInterest){if(!e.oa)throw Error("This task doesn't support region-of-interest.");var r=n.regionOfInterest;if(r.left>=r.right||r.top>=r.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(r.left<0||r.top<0||r.right>1||r.bottom>1)throw Error("Expected RectF values to be in [0,1].");y(s,1,(r.left+r.right)/2),y(s,2,(r.top+r.bottom)/2),y(s,4,r.right-r.left),y(s,3,r.bottom-r.top)}else y(s,1,.5),y(s,2,.5),y(s,4,1),y(s,3,1);if(n!=null&&n.rotationDegrees){if((n==null?void 0:n.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(y(s,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[o,a]=ja(t);n=U(s,3)*a/o,r=U(s,4)*o/a,y(s,4,n),y(s,3,r)}}e.g.addProtoToStream(s.g(),"mediapipe.NormalizedRect",e.U,i)}e.g.pa(t,e.X,i??performance.now()),e.finishProcessing()}function Fe(e,t,n){var i;if((i=e.baseOptions)!=null&&i.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Ka(e,t,n,e.C+1)}function je(e,t,n,i){var r;if(!((r=e.baseOptions)!=null&&r.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Ka(e,t,n,i)}function Bt(e,t,n,i){var r=t.data;const s=t.width,o=s*(t=t.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==o)throw Error("Unsupported channel count: "+r.length/o);return e=new Y([r],n,!1,e.g.i.canvas,e.P,s,t),i?e.clone():e}var me=class extends Oi{constructor(e,t,n,i){super(e),this.g=e,this.X=t,this.U=n,this.oa=i,this.P=new Ga}l(e,t=!0){if("runningMode"in e&&k(this.baseOptions,2,ln(!!e.runningMode&&e.runningMode!=="IMAGE")),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.P.close(),super.close()}};me.prototype.close=me.prototype.close;var Ae=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},_(e=this.h=new ni,0,1,t=new B),y(this.h,2,.5),y(this.h,3,.3)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&y(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&y(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},Fe(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},je(this,e,n,t),this.j}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect_in"),T(e,"detections");const t=new ye;De(t,B2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect_in"),E(n,"DETECTIONS:detections"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("detections",((i,r)=>{for(const s of i)i=la(s),this.j.detections.push(Ia(i));d(this,r)})),this.g.attachEmptyPacketListener("detections",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ae.prototype.detectForVideo=Ae.prototype.G,Ae.prototype.detect=Ae.prototype.F,Ae.prototype.setOptions=Ae.prototype.o,Ae.createFromModelPath=async function(e,t){return x(Ae,e,{baseOptions:{modelAssetPath:t}})},Ae.createFromModelBuffer=function(e,t){return x(Ae,e,{baseOptions:{modelAssetBuffer:t}})},Ae.createFromOptions=function(e,t){return x(Ae,e,t)};var Mr=Me([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]),Lr=Me([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]),Fr=Me([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),qa=Me([474,475],[475,476],[476,477],[477,474]),Pr=Me([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]),Rr=Me([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Xa=Me([469,470],[470,471],[471,472],[472,469]),Or=Me([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]),Ya=[...Mr,...Lr,...Fr,...Pr,...Rr,...Or],$a=Me([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 js(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var D=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,_(e=this.h=new _a,0,1,t=new B),this.A=new ya,_(this.h,0,3,this.A),this.u=new ni,_(this.h,0,2,this.u),ze(this.u,4,1),y(this.u,2,.5),y(this.A,2,.5),y(this.h,4,.5)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numFaces"in e&&ze(this.u,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&y(this.u,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&y(this.A,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return js(this),Fe(this,e,t),this.j}G(e,t,n){return js(this),je(this,e,n,t),this.j}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"face_landmarks");const t=new ye;De(t,U2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"NORM_LANDMARKS:face_landmarks"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("face_landmarks",((i,r)=>{for(const s of i)i=vn(s),this.j.faceLandmarks.push(ii(i));d(this,r)})),this.g.attachEmptyPacketListener("face_landmarks",(i=>{d(this,i)})),this.outputFaceBlendshapes&&(T(e,"blendshapes"),E(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((i,r)=>{if(this.outputFaceBlendshapes)for(const s of i)i=ti(s),this.j.faceBlendshapes.push(Sr(i.g()??[]));d(this,r)})),this.g.attachEmptyPacketListener("blendshapes",(i=>{d(this,i)}))),this.outputFacialTransformationMatrixes&&(T(e,"face_geometry"),E(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((i,r)=>{if(this.outputFacialTransformationMatrixes)for(const s of i)(i=S(i=j2(s),F2,2))&&this.j.facialTransformationMatrixes.push({rows:Ee(i,1)??0??0,columns:Ee(i,2)??0??0,data:ct(i,3,Oe,at()).slice()??[]});d(this,r)})),this.g.attachEmptyPacketListener("face_geometry",(i=>{d(this,i)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};D.prototype.detectForVideo=D.prototype.G,D.prototype.detect=D.prototype.F,D.prototype.setOptions=D.prototype.o,D.createFromModelPath=function(e,t){return x(D,e,{baseOptions:{modelAssetPath:t}})},D.createFromModelBuffer=function(e,t){return x(D,e,{baseOptions:{modelAssetBuffer:t}})},D.createFromOptions=function(e,t){return x(D,e,t)},D.FACE_LANDMARKS_LIPS=Mr,D.FACE_LANDMARKS_LEFT_EYE=Lr,D.FACE_LANDMARKS_LEFT_EYEBROW=Fr,D.FACE_LANDMARKS_LEFT_IRIS=qa,D.FACE_LANDMARKS_RIGHT_EYE=Pr,D.FACE_LANDMARKS_RIGHT_EYEBROW=Rr,D.FACE_LANDMARKS_RIGHT_IRIS=Xa,D.FACE_LANDMARKS_FACE_OVAL=Or,D.FACE_LANDMARKS_CONTOURS=Ya,D.FACE_LANDMARKS_TESSELATION=$a;var Nr=Me([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 Us(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function Vs(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function Gs(e,t=!0){const n=[];for(const r of e){var i=ti(r);e=[];for(const s of i.g())i=t&&Ee(s,1)!=null?Ee(s,1)??0:-1,e.push({score:U(s,2)??0,index:i,categoryName:Q(O(s,3))??""??"",displayName:Q(O(s,4))??""??""});n.push(e)}return n}var ce=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],_(e=this.j=new ba,0,1,t=new B),this.u=new br,_(this.j,0,2,this.u),this.D=new Ar,_(this.u,0,3,this.D),this.A=new Aa,_(this.u,0,2,this.A),this.h=new V2,_(this.j,0,3,this.h),y(this.A,2,.5),y(this.u,4,.5),y(this.D,2,.5)}get baseOptions(){return S(this.j,B,1)}set baseOptions(e){_(this.j,0,1,e)}o(e){var r,s,o,a;if(ze(this.A,3,e.numHands??1),"minHandDetectionConfidence"in e&&y(this.A,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.u,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&y(this.D,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new wt,n=t,i=Ri(e.cannedGesturesClassifierOptions,(r=S(this.h,wt,3))==null?void 0:r.l());_(n,0,2,i),_(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&((s=S(this.h,wt,3))==null||s.g());return e.customGesturesClassifierOptions?(_(n=t=new wt,0,2,i=Ri(e.customGesturesClassifierOptions,(o=S(this.h,wt,4))==null?void 0:o.l())),_(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&((a=S(this.h,wt,4))==null||a.g()),this.l(e)}Ha(e,t){return Us(this),Fe(this,e,t),Vs(this)}Ia(e,t,n){return Us(this),je(this,e,n,t),Vs(this)}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"hand_gestures"),T(e,"hand_landmarks"),T(e,"world_hand_landmarks"),T(e,"handedness");const t=new ye;De(t,G2,this.j);const n=new oe;ge(n,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"HAND_GESTURES:hand_gestures"),E(n,"LANDMARKS:hand_landmarks"),E(n,"WORLD_LANDMARKS:world_hand_landmarks"),E(n,"HANDEDNESS:handedness"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("hand_landmarks",((i,r)=>{for(const s of i){i=vn(s);const o=[];for(const a of He(i,da,1))o.push({x:U(a,1)??0,y:U(a,2)??0,z:U(a,3)??0,visibility:U(a,4)??0});this.landmarks.push(o)}d(this,r)})),this.g.attachEmptyPacketListener("hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("world_hand_landmarks",((i,r)=>{for(const s of i){i=St(s);const o=[];for(const a of He(i,ua,1))o.push({x:U(a,1)??0,y:U(a,2)??0,z:U(a,3)??0,visibility:U(a,4)??0});this.worldLandmarks.push(o)}d(this,r)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("hand_gestures",((i,r)=>{this.gestures.push(...Gs(i,!1)),d(this,r)})),this.g.attachEmptyPacketListener("hand_gestures",(i=>{d(this,i)})),this.g.attachProtoVectorListener("handedness",((i,r)=>{this.handedness.push(...Gs(i)),d(this,r)})),this.g.attachEmptyPacketListener("handedness",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function Hs(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}ce.prototype.recognizeForVideo=ce.prototype.Ia,ce.prototype.recognize=ce.prototype.Ha,ce.prototype.setOptions=ce.prototype.o,ce.createFromModelPath=function(e,t){return x(ce,e,{baseOptions:{modelAssetPath:t}})},ce.createFromModelBuffer=function(e,t){return x(ce,e,{baseOptions:{modelAssetBuffer:t}})},ce.createFromOptions=function(e,t){return x(ce,e,t)},ce.HAND_CONNECTIONS=Nr;var se=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],_(e=this.h=new br,0,1,t=new B),this.u=new Ar,_(this.h,0,3,this.u),this.j=new Aa,_(this.h,0,2,this.j),ze(this.j,3,1),y(this.j,2,.5),y(this.u,2,.5),y(this.h,4,.5)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numHands"in e&&ze(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&y(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&y(this.u,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Fe(this,e,t),Hs(this)}G(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],je(this,e,n,t),Hs(this)}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"hand_landmarks"),T(e,"world_hand_landmarks"),T(e,"handedness");const t=new ye;De(t,H2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"LANDMARKS:hand_landmarks"),E(n,"WORLD_LANDMARKS:world_hand_landmarks"),E(n,"HANDEDNESS:handedness"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("hand_landmarks",((i,r)=>{for(const s of i)i=vn(s),this.landmarks.push(ii(i));d(this,r)})),this.g.attachEmptyPacketListener("hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("world_hand_landmarks",((i,r)=>{for(const s of i)i=St(s),this.worldLandmarks.push(on(i));d(this,r)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(i=>{d(this,i)})),this.g.attachProtoVectorListener("handedness",((i,r)=>{var s=this.handedness,o=s.push;const a=[];for(const c of i){i=ti(c);const h=[];for(const l of i.g())h.push({score:U(l,2)??0,index:Ee(l,1)??0??-1,categoryName:Q(O(l,3))??""??"",displayName:Q(O(l,4))??""??""});a.push(h)}o.call(s,...a),d(this,r)})),this.g.attachEmptyPacketListener("handedness",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};se.prototype.detectForVideo=se.prototype.G,se.prototype.detect=se.prototype.F,se.prototype.setOptions=se.prototype.o,se.createFromModelPath=function(e,t){return x(se,e,{baseOptions:{modelAssetPath:t}})},se.createFromModelBuffer=function(e,t){return x(se,e,{baseOptions:{modelAssetBuffer:t}})},se.createFromOptions=function(e,t){return x(se,e,t)},se.HAND_CONNECTIONS=Nr;var Ja=Me([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 zs(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Ws(e){try{if(!e.D)return e.h;e.D(e.h)}finally{si(e)}}function Tn(e,t){e=vn(e),t.push(ii(e))}var R=class extends me{constructor(e,t){super(new Le(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,_(e=this.j=new Ta,0,1,t=new B),this.I=new Ar,_(this.j,0,2,this.I),this.W=new z2,_(this.j,0,3,this.W),this.u=new ni,_(this.j,0,4,this.u),this.O=new ya,_(this.j,0,5,this.O),this.A=new xa,_(this.j,0,6,this.A),this.M=new Sa,_(this.j,0,7,this.M),y(this.u,2,.5),y(this.u,3,.3),y(this.O,2,.5),y(this.A,2,.5),y(this.A,3,.3),y(this.M,2,.5),y(this.I,2,.5)}get baseOptions(){return S(this.j,B,1)}set baseOptions(e){_(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&y(this.u,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&y(this.u,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&y(this.O,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&y(this.A,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&y(this.A,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&y(this.M,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&y(this.I,2,e.minHandLandmarksConfidence??.5),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.D=typeof t=="function"?t:n,zs(this),Fe(this,e,i),Ws(this)}G(e,t,n,i){const r=typeof n!="function"?n:{};return this.D=typeof n=="function"?n:i,zs(this),je(this,e,r,t),Ws(this)}m(){var e=new _e;I(e,"input_frames_image"),T(e,"pose_landmarks"),T(e,"pose_world_landmarks"),T(e,"face_landmarks"),T(e,"left_hand_landmarks"),T(e,"left_hand_world_landmarks"),T(e,"right_hand_landmarks"),T(e,"right_hand_world_landmarks");const t=new ye,n=new ps;ge(n,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),(function(r,s){if(s!=null)if(Array.isArray(s))k(r,2,Hn(s,0,un));else{if(!(typeof s=="string"||s instanceof Ne||Vi(s)))throw Error("invalid value in Any.value field: "+s+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");$e(r,2,Hi(s,!1),gt())}})(n,this.j.g());const i=new oe;ge(i,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),rr(i,8,ps,n),N(i,"IMAGE:input_frames_image"),E(i,"POSE_LANDMARKS:pose_landmarks"),E(i,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),E(i,"FACE_LANDMARKS:face_landmarks"),E(i,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),E(i,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),E(i,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),E(i,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),i.o(t),Se(e,i),ri(this,e),this.g.attachProtoListener("pose_landmarks",((r,s)=>{Tn(r,this.h.poseLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("pose_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("pose_world_landmarks",((r,s)=>{var o=this.h.poseWorldLandmarks;r=St(r),o.push(on(r)),d(this,s)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(r=>{d(this,r)})),this.outputPoseSegmentationMasks&&(E(i,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),It(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",((r,s)=>{this.h.poseSegmentationMasks=[Bt(this,r,!0,!this.D)],d(this,s)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(r=>{this.h.poseSegmentationMasks=[],d(this,r)}))),this.g.attachProtoListener("face_landmarks",((r,s)=>{Tn(r,this.h.faceLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("face_landmarks",(r=>{d(this,r)})),this.outputFaceBlendshapes&&(T(e,"extra_blendshapes"),E(i,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((r,s)=>{var o=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(r=ti(r),o.push(Sr(r.g()??[]))),d(this,s)})),this.g.attachEmptyPacketListener("extra_blendshapes",(r=>{d(this,r)}))),this.g.attachProtoListener("left_hand_landmarks",((r,s)=>{Tn(r,this.h.leftHandLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("left_hand_world_landmarks",((r,s)=>{var o=this.h.leftHandWorldLandmarks;r=St(r),o.push(on(r)),d(this,s)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("right_hand_landmarks",((r,s)=>{Tn(r,this.h.rightHandLandmarks),d(this,s)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(r=>{d(this,r)})),this.g.attachProtoListener("right_hand_world_landmarks",((r,s)=>{var o=this.h.rightHandWorldLandmarks;r=St(r),o.push(on(r)),d(this,s)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(r=>{d(this,r)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};R.prototype.detectForVideo=R.prototype.G,R.prototype.detect=R.prototype.F,R.prototype.setOptions=R.prototype.o,R.createFromModelPath=function(e,t){return x(R,e,{baseOptions:{modelAssetPath:t}})},R.createFromModelBuffer=function(e,t){return x(R,e,{baseOptions:{modelAssetBuffer:t}})},R.createFromOptions=function(e,t){return x(R,e,t)},R.HAND_CONNECTIONS=Nr,R.POSE_CONNECTIONS=Ja,R.FACE_LANDMARKS_LIPS=Mr,R.FACE_LANDMARKS_LEFT_EYE=Lr,R.FACE_LANDMARKS_LEFT_EYEBROW=Fr,R.FACE_LANDMARKS_LEFT_IRIS=qa,R.FACE_LANDMARKS_RIGHT_EYE=Pr,R.FACE_LANDMARKS_RIGHT_EYEBROW=Rr,R.FACE_LANDMARKS_RIGHT_IRIS=Xa,R.FACE_LANDMARKS_FACE_OVAL=Or,R.FACE_LANDMARKS_CONTOURS=Ya,R.FACE_LANDMARKS_TESSELATION=$a;var be=class extends me{constructor(e,t){super(new Le(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},_(e=this.h=new ka,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return _(this.h,0,2,Ri(e,S(this.h,_r,2))),this.l(e)}sa(e,t){return this.j={classifications:[]},Fe(this,e,t),this.j}ta(e,t,n){return this.j={classifications:[]},je(this,e,n,t),this.j}m(){var e=new _e;I(e,"input_image"),I(e,"norm_rect"),T(e,"classifications");const t=new ye;De(t,W2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),N(n,"IMAGE:input_image"),N(n,"NORM_RECT:norm_rect"),E(n,"CLASSIFICATIONS:classifications"),n.o(t),Se(e,n),this.g.attachProtoListener("classifications",((i,r)=>{this.j=J2(O2(i)),d(this,r)})),this.g.attachEmptyPacketListener("classifications",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};be.prototype.classifyForVideo=be.prototype.ta,be.prototype.classify=be.prototype.sa,be.prototype.setOptions=be.prototype.o,be.createFromModelPath=function(e,t){return x(be,e,{baseOptions:{modelAssetPath:t}})},be.createFromModelBuffer=function(e,t){return x(be,e,{baseOptions:{modelAssetBuffer:t}})},be.createFromOptions=function(e,t){return x(be,e,t)};var he=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!0),this.h=new Ma,this.embeddings={embeddings:[]},_(e=this.h,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){var t=this.h,n=S(this.h,xs,2);return n=n?n.clone():new xs,e.l2Normalize!==void 0?k(n,1,ln(e.l2Normalize)):"l2Normalize"in e&&k(n,1),e.quantize!==void 0?k(n,2,ln(e.quantize)):"quantize"in e&&k(n,2),_(t,0,2,n),this.l(e)}za(e,t){return Fe(this,e,t),this.embeddings}Aa(e,t,n){return je(this,e,n,t),this.embeddings}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"embeddings_out");const t=new ye;De(t,K2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"EMBEDDINGS:embeddings_out"),n.o(t),Se(e,n),this.g.attachProtoListener("embeddings_out",((i,r)=>{i=I2(i),this.embeddings=(function(s){return{embeddings:He(s,C2,1).map((o=>{var h,l;const a={headIndex:Ee(o,3)??0??-1,headName:Q(O(o,4))??""??""};var c=o.v;return xo(c,0|c[g],Es,gi(o,1))!==void 0?(o=ct(o=S(o,Es,gi(o,1),void 0),1,Oe,at()),a.floatEmbedding=o.slice()):(c=new Uint8Array(0),a.quantizedEmbedding=((l=(h=S(o,N2,gi(o,2),void 0))==null?void 0:h.na())==null?void 0:l.h())??c),a})),timestampMs:Ca(ko(s))}})(i),d(this,r)})),this.g.attachEmptyPacketListener("embeddings_out",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};he.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=Fs(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=Fs(Ls(e.quantizedEmbedding),Ls(t.quantizedEmbedding))}return e},he.prototype.embedForVideo=he.prototype.Aa,he.prototype.embed=he.prototype.za,he.prototype.setOptions=he.prototype.o,he.createFromModelPath=function(e,t){return x(he,e,{baseOptions:{modelAssetPath:t}})},he.createFromModelBuffer=function(e,t){return x(he,e,{baseOptions:{modelAssetBuffer:t}})},he.createFromOptions=function(e,t){return x(he,e,t)};var Ii=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach((n=>{n.close()})),(t=this.categoryMask)==null||t.close()}};function rc(e){var n,i;const t=(function(r){return He(r,oe,1)})(e.ca()).filter((r=>(Q(O(r,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(e.u=[],t.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(((i=(n=S(t[0],ye,7))==null?void 0:n.j())==null?void 0:i.g())??new Map).forEach(((r,s)=>{e.u[Number(s)]=Q(O(r,1))??""}))}function Ks(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function qs(e){try{const t=new Ii(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{si(e)}}Ii.prototype.close=Ii.prototype.close;var re=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new xr,this.A=new La,_(this.h,0,3,this.A),_(e=this.h,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?k(this.h,2,mn(e.displayNamesLocale)):"displayNamesLocale"in e&&k(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}L(){rc(this)}segment(e,t,n){const i=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:n,Ks(this),Fe(this,e,i),qs(this)}La(e,t,n,i){const r=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:i,Ks(this),je(this,e,r,t),qs(this)}Da(){return this.u}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect");const t=new ye;De(t,Pa,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),n.o(t),Se(e,n),ri(this,e),this.outputConfidenceMasks&&(T(e,"confidence_masks"),E(n,"CONFIDENCE_MASKS:confidence_masks"),It(this,"confidence_masks"),this.g.aa("confidence_masks",((i,r)=>{this.confidenceMasks=i.map((s=>Bt(this,s,!0,!this.j))),d(this,r)})),this.g.attachEmptyPacketListener("confidence_masks",(i=>{this.confidenceMasks=[],d(this,i)}))),this.outputCategoryMask&&(T(e,"category_mask"),E(n,"CATEGORY_MASK:category_mask"),It(this,"category_mask"),this.g.Z("category_mask",((i,r)=>{this.categoryMask=Bt(this,i,!1,!this.j),d(this,r)})),this.g.attachEmptyPacketListener("category_mask",(i=>{this.categoryMask=void 0,d(this,i)}))),T(e,"quality_scores"),E(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((i,r)=>{this.qualityScores=i,d(this,r)})),this.g.attachEmptyPacketListener("quality_scores",(i=>{this.categoryMask=void 0,d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};re.prototype.getLabels=re.prototype.Da,re.prototype.segmentForVideo=re.prototype.La,re.prototype.segment=re.prototype.segment,re.prototype.setOptions=re.prototype.o,re.createFromModelPath=function(e,t){return x(re,e,{baseOptions:{modelAssetPath:t}})},re.createFromModelBuffer=function(e,t){return x(re,e,{baseOptions:{modelAssetBuffer:t}})},re.createFromOptions=function(e,t){return x(re,e,t)};var Di=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach((n=>{n.close()})),(t=this.categoryMask)==null||t.close()}};Di.prototype.close=Di.prototype.close;var Re=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new xr,this.u=new La,_(this.h,0,3,this.u),_(e=this.h,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,i){const r=typeof n!="function"?n:{};if(this.j=typeof n=="function"?n:i,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.C+1,i=new Ra,t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var s=new _i;$e(s,3,ln(!0),!1),$e(s,1,tn(t.keypoint.x),0),$e(s,2,tn(t.keypoint.y),0),rn(i,1,Pi,s)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");{const a=new X2;for(s of t.scribble)$e(t=new _i,3,ln(!0),!1),$e(t,1,tn(s.x),0),$e(t,2,tn(s.y),0),rr(a,1,_i,t);rn(i,2,Pi,a)}}this.g.addProtoToStream(i.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",n),Fe(this,e,r);e:{try{const a=new Di(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var o=a;break e}this.j(a)}finally{si(this)}o=void 0}return o}m(){var e=new _e;I(e,"image_in"),I(e,"roi_in"),I(e,"norm_rect_in");const t=new ye;De(t,Pa,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),N(n,"IMAGE:image_in"),N(n,"ROI:roi_in"),N(n,"NORM_RECT:norm_rect_in"),n.o(t),Se(e,n),ri(this,e),this.outputConfidenceMasks&&(T(e,"confidence_masks"),E(n,"CONFIDENCE_MASKS:confidence_masks"),It(this,"confidence_masks"),this.g.aa("confidence_masks",((i,r)=>{this.confidenceMasks=i.map((s=>Bt(this,s,!0,!this.j))),d(this,r)})),this.g.attachEmptyPacketListener("confidence_masks",(i=>{this.confidenceMasks=[],d(this,i)}))),this.outputCategoryMask&&(T(e,"category_mask"),E(n,"CATEGORY_MASK:category_mask"),It(this,"category_mask"),this.g.Z("category_mask",((i,r)=>{this.categoryMask=Bt(this,i,!1,!this.j),d(this,r)})),this.g.attachEmptyPacketListener("category_mask",(i=>{this.categoryMask=void 0,d(this,i)}))),T(e,"quality_scores"),E(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((i,r)=>{this.qualityScores=i,d(this,r)})),this.g.attachEmptyPacketListener("quality_scores",(i=>{this.categoryMask=void 0,d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Re.prototype.segment=Re.prototype.segment,Re.prototype.setOptions=Re.prototype.o,Re.createFromModelPath=function(e,t){return x(Re,e,{baseOptions:{modelAssetPath:t}})},Re.createFromModelBuffer=function(e,t){return x(Re,e,{baseOptions:{modelAssetBuffer:t}})},Re.createFromOptions=function(e,t){return x(Re,e,t)};var we=class extends me{constructor(e,t){super(new Le(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},_(e=this.h=new Oa,0,1,t=new B)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?k(this.h,2,mn(e.displayNamesLocale)):"displayNamesLocale"in e&&k(this.h,2),e.maxResults!==void 0?ze(this.h,3,e.maxResults):"maxResults"in e&&k(this.h,3),e.scoreThreshold!==void 0?y(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&k(this.h,4),e.categoryAllowlist!==void 0?Rn(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&k(this.h,5),e.categoryDenylist!==void 0?Rn(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&k(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},Fe(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},je(this,e,n,t),this.j}m(){var e=new _e;I(e,"input_frame_gpu"),I(e,"norm_rect"),T(e,"detections");const t=new ye;De(t,Y2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),N(n,"IMAGE:input_frame_gpu"),N(n,"NORM_RECT:norm_rect"),E(n,"DETECTIONS:detections"),n.o(t),Se(e,n),this.g.attachProtoVectorListener("detections",((i,r)=>{for(const s of i)i=la(s),this.j.detections.push(Ia(i));d(this,r)})),this.g.attachEmptyPacketListener("detections",(i=>{d(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};we.prototype.detectForVideo=we.prototype.G,we.prototype.detect=we.prototype.F,we.prototype.setOptions=we.prototype.o,we.createFromModelPath=async function(e,t){return x(we,e,{baseOptions:{modelAssetPath:t}})},we.createFromModelBuffer=function(e,t){return x(we,e,{baseOptions:{modelAssetBuffer:t}})},we.createFromOptions=function(e,t){return x(we,e,t)};var Bi=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){var e;(e=this.segmentationMasks)==null||e.forEach((t=>{t.close()}))}};function Xs(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function Ys(e){try{const t=new Bi(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.u)return t;e.u(t)}finally{si(e)}}Bi.prototype.close=Bi.prototype.close;var le=class extends me{constructor(e,t){super(new Le(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,_(e=this.h=new Na,0,1,t=new B),this.A=new Sa,_(this.h,0,3,this.A),this.j=new xa,_(this.h,0,2,this.j),ze(this.j,4,1),y(this.j,2,.5),y(this.A,2,.5),y(this.h,4,.5)}get baseOptions(){return S(this.h,B,1)}set baseOptions(e){_(this.h,0,1,e)}o(e){return"numPoses"in e&&ze(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&y(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&y(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&y(this.A,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.u=typeof t=="function"?t:n,Xs(this),Fe(this,e,i),Ys(this)}G(e,t,n,i){const r=typeof n!="function"?n:{};return this.u=typeof n=="function"?n:i,Xs(this),je(this,e,r,t),Ys(this)}m(){var e=new _e;I(e,"image_in"),I(e,"norm_rect"),T(e,"normalized_landmarks"),T(e,"world_landmarks"),T(e,"segmentation_masks");const t=new ye;De(t,$2,this.h);const n=new oe;ge(n,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),N(n,"IMAGE:image_in"),N(n,"NORM_RECT:norm_rect"),E(n,"NORM_LANDMARKS:normalized_landmarks"),E(n,"WORLD_LANDMARKS:world_landmarks"),n.o(t),Se(e,n),ri(this,e),this.g.attachProtoVectorListener("normalized_landmarks",((i,r)=>{this.landmarks=[];for(const s of i)i=vn(s),this.landmarks.push(ii(i));d(this,r)})),this.g.attachEmptyPacketListener("normalized_landmarks",(i=>{this.landmarks=[],d(this,i)})),this.g.attachProtoVectorListener("world_landmarks",((i,r)=>{this.worldLandmarks=[];for(const s of i)i=St(s),this.worldLandmarks.push(on(i));d(this,r)})),this.g.attachEmptyPacketListener("world_landmarks",(i=>{this.worldLandmarks=[],d(this,i)})),this.outputSegmentationMasks&&(E(n,"SEGMENTATION_MASK:segmentation_masks"),It(this,"segmentation_masks"),this.g.aa("segmentation_masks",((i,r)=>{this.segmentationMasks=i.map((s=>Bt(this,s,!0,!this.u))),d(this,r)})),this.g.attachEmptyPacketListener("segmentation_masks",(i=>{this.segmentationMasks=[],d(this,i)}))),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};le.prototype.detectForVideo=le.prototype.G,le.prototype.detect=le.prototype.F,le.prototype.setOptions=le.prototype.o,le.createFromModelPath=function(e,t){return x(le,e,{baseOptions:{modelAssetPath:t}})},le.createFromModelBuffer=function(e,t){return x(le,e,{baseOptions:{modelAssetBuffer:t}})},le.createFromOptions=function(e,t){return x(le,e,t)},le.POSE_CONNECTIONS=Ja;const sc="https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task",oc="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.18/wasm";class ac{constructor(){A(this,"landmarker",null);A(this,"_ready",!1)}get isReady(){return this._ready}async initialize(t){const n=(t==null?void 0:t.wasmPath)??oc,i=(t==null?void 0:t.modelPath)??sc,r=await st.forVisionTasks(n);this.landmarker=await se.createFromOptions(r,{baseOptions:{modelAssetPath:i,delegate:"GPU"},runningMode:"VIDEO",numHands:(t==null?void 0:t.numHands)??1,minHandDetectionConfidence:(t==null?void 0:t.minDetectionConfidence)??.5,minTrackingConfidence:(t==null?void 0:t.minTrackingConfidence)??.5}),this._ready=!0}detect(t,n){var c,h,l,u,f,v;if(!this.landmarker)return null;const i=this.landmarker.detectForVideo(t,n);if(!i.landmarks||i.landmarks.length===0)return null;const r=i.landmarks[0],s=((l=(h=(c=i.handednesses)==null?void 0:c[0])==null?void 0:h[0])==null?void 0:l.categoryName)??"Right",o=((v=(f=(u=i.handednesses)==null?void 0:u[0])==null?void 0:f[0])==null?void 0:v.score)??0;return{landmarks:r.map(b=>({x:b.x,y:b.y,visibility:b.visibility??void 0})),handedness:s,confidence:o}}destroy(){var t;(t=this.landmarker)==null||t.close(),this.landmarker=null,this._ready=!1}}function Za(e={}){const{modelPath:t,config:n,enabled:i=!0}=e,r=M.useRef(null),s=M.useRef(null),o=M.useRef(0),a=M.useRef(0),c=M.useRef(0),[h,l]=M.useState(!1),[u,f]=M.useState(!1),[v,b]=M.useState(null),[F,P]=M.useState(Ln()),[W,te]=M.useState(null),[ve,nt]=M.useState(Tt.IDLE),[An,oi]=M.useState(null),[Qa,e1]=M.useState(0),Cr=M.useRef(n?r1(n):$s()),ai=M.useRef(null),Ir=M.useRef(null),ci=M.useRef(null),hi=M.useRef(null),li=M.useRef(null),Dr=M.useRef(0),Br=M.useCallback(()=>{const ie=Cr.current;Ir.current=new ot(ie.kinematics.emaAlpha,ie.kinematics.bufferFrames),ci.current=new p1(ie.touchproof),hi.current=new y1,li.current=new _1},[]),bn=M.useCallback(()=>{var Vr;const ie=r.current,Ke=ai.current;if(!ie||!(Ke!=null&&Ke.isReady)||ie.readyState<2){o.current=requestAnimationFrame(bn);return}const At=performance.now(),ae=ie.videoWidth,Te=ie.videoHeight,qe=Ke.detect(ie,At);let Jt=Ln(),wn=null,jr=Tt.IDLE,Ur=null;if(qe&&qe.landmarks.length>=21){Ur=qe.landmarks,(Vr=Ir.current)==null||Vr.compute(qe.landmarks);const t1=o1(qe.landmarks);ci.current&&(Jt=ci.current.update(qe.landmarks,ae,Te));const Gr=qe.landmarks[8],Hr=qe.landmarks[12];if(hi.current&&(wn=hi.current.update([Gr.x,Gr.y],[Hr.x,Hr.y],Jt.isTouching,At)),li.current){const zr=li.current.update(wn,Jt.isTouching,t1.openPalm&&!Jt.isTouching,At);jr=zr.state,wn=zr.velocity}}Dr.current++,Dr.current%2===0&&(P(Jt),te(wn),nt(jr),oi(Ur)),a.current++,At-c.current>=1e3&&(e1(a.current),a.current=0,c.current=At),o.current=requestAnimationFrame(bn)},[]);return M.useEffect(()=>{if(!i)return;let ie=!1;const Ke=new ac;return ai.current=Ke,(async()=>{f(!0),b(null);try{const ae=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:640},height:{ideal:480},facingMode:"user"}});if(ie){ae.getTracks().forEach(Te=>Te.stop());return}if(r.current&&(r.current.srcObject=ae,await r.current.play()),await Ke.initialize({modelPath:t}),ie)return;Br(),l(!0),f(!1),o.current=requestAnimationFrame(bn)}catch(ae){if(ie)return;const Te=ae instanceof Error?ae.message:"Failed to initialize Glide";Te.includes("Permission")||Te.includes("NotAllowed")?b("Camera access denied. Please allow camera access and reload."):Te.includes("NotFound")||Te.includes("DevicesNotFound")?b("No camera found. Please connect a camera and reload."):b(Te),f(!1)}})(),()=>{ie=!0,cancelAnimationFrame(o.current);const ae=r.current;ae!=null&&ae.srcObject&&(ae.srcObject.getTracks().forEach(Te=>Te.stop()),ae.srcObject=null),Ke.destroy(),ai.current=null}},[i,t,Br,bn]),{videoRef:r,canvasRef:s,isReady:h,isLoading:u,error:v,signals:F,velocity:W,gestureState:ve,landmarks:An,fps:Qa,config:Cr.current}}const cc=[[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],[17,18],[18,19],[19,20],[0,17]],hc=({videoRef:e,canvasRef:t,landmarks:n,signals:i,gestureState:r,fps:s,isLoading:o,error:a})=>{M.useEffect(()=>{const h=t.current,l=e.current;if(!h||!l)return;const u=h.getContext("2d");if(!u)return;const v=setInterval(()=>{if(h.width=l.videoWidth||640,h.height=l.videoHeight||480,u.clearRect(0,0,h.width,h.height),!n||n.length<21)return;const b=h.width,F=h.height;u.lineWidth=2,u.strokeStyle="rgba(255, 255, 255, 0.6)";for(const[P,W]of cc){const te=n[P],ve=n[W];u.beginPath(),u.moveTo(te.x*b,te.y*F),u.lineTo(ve.x*b,ve.y*F),u.stroke()}for(let P=0;P<n.length;P++){const W=n[P],te=P===8||P===12;u.beginPath(),u.arc(W.x*b,W.y*F,te?6:3,0,Math.PI*2),te?u.fillStyle=i.isTouching?"#22c55e":"#ef4444":u.fillStyle="rgba(255, 255, 255, 0.8)",u.fill()}},50);return()=>clearInterval(v)},[t,e,n,i.isTouching]);const c=[{label:"Proximity",value:i.proximityScore,color:"#3b82f6"},{label:"Angle",value:i.angleScore,color:"#8b5cf6"},{label:"Correlation",value:i.correlationScore,color:"#06b6d4"},{label:"Visibility",value:i.visibilityScore,color:"#f59e0b"},{label:"Fused",value:i.fusedScore,color:i.isTouching?"#22c55e":"#ef4444"}];return w.jsxs("div",{className:"glide-visualizer",children:[w.jsxs("div",{className:"glide-video-container",children:[w.jsx("video",{ref:e,autoPlay:!0,playsInline:!0,muted:!0,style:{width:"100%",height:"100%",objectFit:"cover",transform:"scaleX(-1)"}}),w.jsx("canvas",{ref:t,className:"glide-canvas-overlay",style:{transform:"scaleX(-1)"}}),w.jsxs("div",{className:"glide-status-overlay",children:[w.jsxs("span",{className:"glide-fps",children:[s," FPS"]}),w.jsx("span",{className:`glide-state glide-state--${r}`,children:r===Tt.SCROLLING?"SCROLLING":"IDLE"})]}),o&&w.jsxs("div",{className:"glide-loading-overlay",children:[w.jsx("div",{className:"glide-spinner"}),w.jsx("p",{children:"Loading hand detection model..."})]}),a&&w.jsx("div",{className:"glide-error-overlay",children:w.jsx("p",{children:a})})]}),w.jsxs("div",{className:"glide-signal-dashboard",children:[c.map(h=>w.jsxs("div",{className:"glide-signal-row",children:[w.jsx("span",{className:"glide-signal-label",children:h.label}),w.jsx("div",{className:"glide-signal-bar-bg",children:w.jsx("div",{className:"glide-signal-bar-fill",style:{width:`${Math.max(0,Math.min(100,h.value*100))}%`,backgroundColor:h.color}})}),w.jsx("span",{className:"glide-signal-value",children:h.value.toFixed(2)})]},h.label)),w.jsxs("div",{className:"glide-signal-row",children:[w.jsx("span",{className:"glide-signal-label",children:"Distance"}),w.jsx("div",{className:"glide-signal-bar-bg",children:w.jsx("div",{className:"glide-signal-bar-fill",style:{width:`${i.distanceFactor*100}%`,backgroundColor:"#64748b"}})}),w.jsx("span",{className:"glide-signal-value",children:i.distanceFactor.toFixed(2)})]})]})]})},lc=w.jsxs(w.Fragment,{children:[w.jsx("h2",{children:"Scroll Demo"}),w.jsx("p",{children:"This area responds to your Glide gestures. Pinch your index and middle fingers together, then move them up or down to scroll."}),Array.from({length:20},(e,t)=>w.jsxs("div",{className:"glide-scroll-section",children:[w.jsxs("h3",{children:["Section ",t+1]}),w.jsx("p",{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."}),w.jsx("p",{children:"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."})]},t))]}),uc=({velocity:e,gestureState:t,isActive:n,children:i})=>{const r=M.useRef(null);return M.useEffect(()=>{if(!n||t!==Tt.SCROLLING||!e||!r.current)return;const s=-e.y*1400;r.current.scrollBy({top:s/60})},[e,t,n]),w.jsx("div",{ref:r,className:`glide-scroll-area ${n?"glide-scroll-area--active":""}`,children:i??lc})},dc=({modelPath:e,config:t,showVisualizer:n=!0,scrollContent:i,className:r="",style:s})=>{const o=Za({modelPath:e,config:t}),a=i===null;return w.jsxs("div",{className:`glide-demo ${a?"glide-demo--full":""} ${r}`,style:s,children:[n&&w.jsx(hc,{videoRef:o.videoRef,canvasRef:o.canvasRef,landmarks:o.landmarks,signals:o.signals,gestureState:o.gestureState,fps:o.fps,isLoading:o.isLoading,error:o.error}),!a&&w.jsx(uc,{velocity:o.velocity,gestureState:o.gestureState,isActive:o.gestureState===Tt.SCROLLING,children:i})]})};exports.GlideDemo=dc;exports.useGlide=Za;
|
package/dist/glide-demo.es.js
CHANGED
|
@@ -4119,7 +4119,7 @@ ht.prototype.detectForVideo = ht.prototype.G, ht.prototype.detect = ht.prototype
|
|
|
4119
4119
|
}, ht.createFromOptions = function(t, e) {
|
|
4120
4120
|
return E(ht, t, e);
|
|
4121
4121
|
}, ht.POSE_CONNECTIONS = e1;
|
|
4122
|
-
const hc = "https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task", lc = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@
|
|
4122
|
+
const hc = "https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task", lc = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.18/wasm";
|
|
4123
4123
|
class uc {
|
|
4124
4124
|
constructor() {
|
|
4125
4125
|
A(this, "landmarker", null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.glide-demo{display:flex;width:100%;height:100vh;background:#0f172a;color:#e2e8f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.glide-demo--full .glide-visualizer{flex:1 1 100%;border-right:none}@media(max-width:768px){.glide-demo{flex-direction:column}}.glide-visualizer{flex:0 0 50%;display:flex;flex-direction:column;background:#1e293b;border-right:1px solid #334155;overflow:hidden}@media(max-width:768px){.glide-visualizer{flex:0 0 auto;max-height:50vh;border-right:none;border-bottom:1px solid #334155}}.glide-video-container{position:relative;flex:1;min-height:0;background:#000;overflow:hidden}.glide-video-container video{display:block}.glide-canvas-overlay{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.glide-status-overlay{position:absolute;top:8px;left:8px;right:8px;display:flex;justify-content:space-between;pointer-events:none}.glide-fps{background:#0009;padding:2px 8px;border-radius:4px;font-size:12px;font-family:SF Mono,Fira Code,monospace;color:#94a3b8}.glide-state{padding:2px 10px;border-radius:4px;font-size:12px;font-weight:600;font-family:SF Mono,Fira Code,monospace;text-transform:uppercase}.glide-state--idle{background:#64748b80;color:#94a3b8}.glide-state--scrolling{background:#22c55e4d;color:#22c55e;animation:glide-pulse 1.5s ease-in-out infinite}@keyframes glide-pulse{0%,to{opacity:1}50%{opacity:.7}}.glide-loading-overlay,.glide-error-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0f172ae6;z-index:10}.glide-loading-overlay p,.glide-error-overlay p{margin-top:16px;font-size:14px;color:#94a3b8}.glide-error-overlay{background:#7f1d1dd9}.glide-error-overlay p{color:#fecaca}.glide-spinner{width:32px;height:32px;border:3px solid #334155;border-top-color:#3b82f6;border-radius:50%;animation:glide-spin .8s linear infinite}@keyframes glide-spin{to{transform:rotate(360deg)}}.glide-signal-dashboard{flex:0 0 auto;padding:10px 12px;background:#0f172a;border-top:1px solid #1e293b;display:flex;flex-direction:column;gap:4px}.glide-signal-row{display:flex;align-items:center;gap:8px;font-size:11px;font-family:SF Mono,Fira Code,monospace}.glide-signal-label{flex:0 0 72px;color:#64748b;text-align:right}.glide-signal-bar-bg{flex:1;height:6px;background:#1e293b;border-radius:3px;overflow:hidden}.glide-signal-bar-fill{height:100%;border-radius:3px;transition:width .1s ease-out}.glide-signal-value{flex:0 0 36px;color:#94a3b8;text-align:right}.glide-scroll-area{flex:1;overflow-y:auto;padding:24px 32px;background:#0f172a;scroll-behavior:auto}.glide-scroll-area--active{outline:2px solid rgba(34,197,94,.3);outline-offset:-2px}.glide-scroll-area h2{font-size:24px;font-weight:700;margin-bottom:16px;color:#f1f5f9}.glide-scroll-area h3{font-size:16px;font-weight:600;margin-bottom:8px;color:#cbd5e1}.glide-scroll-area p{font-size:14px;line-height:1.6;color:#94a3b8;margin-bottom:12px}.glide-scroll-section{padding:16px 0;border-bottom:1px solid #1e293b}.glide-scroll-section:last-child{border-bottom:none}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,YAAY,EACV,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,YAAY,EACZ,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,KAAK,GACN,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,YAAY,EACV,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,YAAY,EACZ,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,KAAK,GACN,MAAM,6BAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxr0ssi/glide-web-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
"prepublishOnly": "npm run build:lib"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@mediapipe/tasks-vision": "^0.10.18"
|
|
27
|
-
"react": "^18.0.0",
|
|
28
|
-
"react-dom": "^18.0.0"
|
|
26
|
+
"@mediapipe/tasks-vision": "^0.10.18"
|
|
29
27
|
},
|
|
30
28
|
"devDependencies": {
|
|
31
29
|
"@types/react": "^18.3.12",
|
|
@@ -52,6 +50,7 @@
|
|
|
52
50
|
"types": "./dist/index.d.ts",
|
|
53
51
|
"import": "./dist/glide-demo.es.js",
|
|
54
52
|
"require": "./dist/glide-demo.cjs.js"
|
|
55
|
-
}
|
|
53
|
+
},
|
|
54
|
+
"./styles": "./dist/glide-web-ui.css"
|
|
56
55
|
}
|
|
57
56
|
}
|