@smileid/web-components 10.0.5 → 10.0.6

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.
@@ -1352,7 +1352,7 @@ ${this.hideAttribution?"":`
1352
1352
  </div>
1353
1353
  </div>
1354
1354
  ${Ai(this.themeColor)}
1355
- `}class W4 extends HTMLElement{constructor(){super(),this.templateString=z4.bind(this),this.render=()=>this.templateString(),this.attachShadow({mode:"open"})}connectedCallback(){const e=document.createElement("template");e.innerHTML=this.render(),this.shadowRoot.appendChild(e.content.cloneNode(!0)),this.navigation=this.shadowRoot.querySelector("smileid-navigation"),this.takeDocumentPhotoButton=this.shadowRoot.querySelector("#take-photo"),this.uploadDocumentPhotoButton=this.shadowRoot.querySelector("#upload-photo"),this.navigation.addEventListener("navigation.back",()=>{this.handleBackEvents()}),this.navigation.addEventListener("navigation.close",()=>{this.handleCloseEvents()}),this.takeDocumentPhotoButton&&this.takeDocumentPhotoButton.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("document-capture-instructions.capture"))}),this.uploadDocumentPhotoButton&&this.uploadDocumentPhotoButton.addEventListener("change",i=>q(this,null,function*(){this.shadowRoot.querySelector("#error").innerHTML="";try{const{files:s}=i.target,o=yield H4.retrieve(s);this.dispatchEvent(new CustomEvent("document-capture-instructions.upload",{detail:{image:o,previewImage:o}}))}catch(s){this.shadowRoot.querySelector("#error").innerHTML=s.message}}))}get hideBack(){return this.hasAttribute("hide-back-to-host")}get showNavigation(){return this.hasAttribute("show-navigation")}get themeColor(){return this.getAttribute("theme-color")||"#001096"}get hideAttribution(){return this.hasAttribute("hide-attribution")}get documentCaptureModes(){return this.getAttribute("document-capture-modes")||"camera"}get supportBothCaptureModes(){const e=this.documentCaptureModes;return e.includes("camera")&&e.includes("upload")}get title(){return this.getAttribute("title")||"Submit Front of ID"}get sideOfId(){return(this.getAttribute("side-of-id")||"front").toLowerCase()}get isFrontOfId(){return this.sideOfId==="front"}get isBackOfId(){return!this.isFrontOfId}handleBackEvents(){this.dispatchEvent(new CustomEvent("document-capture-instructions.cancelled"))}handleCloseEvents(){this.dispatchEvent(new CustomEvent("document-capture-instructions.close"))}}"customElements"in window&&!customElements.get("document-capture-instructions")&&window.customElements.define("document-capture-instructions",W4);const xs={version:"10.0.5"},Z4=xs.version,at=document.querySelector("smart-camera-web");function Cn(t){return q(this,null,function*(){try{const e=yield et.getMedia({audio:!1,video:et.environmentOptions}),s=(yield navigator.mediaDevices.enumerateDevices()).find(o=>o.kind==="videoinput"&&e.getVideoTracks()[0].getSettings().deviceId===o.deviceId);at==null||at.dispatchEvent(new CustomEvent("metadata.camera-name",{detail:{cameraName:s==null?void 0:s.label}})),t.removeAttribute("data-camera-error"),t.setAttribute("data-camera-ready",!0)}catch(e){t.removeAttribute("data-camera-ready"),t.setAttribute("data-camera-error",et.handleCameraError(e))}})}class Wu extends HTMLElement{constructor(){super(),this.activeScreen=null,this.smartCameraWeb=this.closest("smart-camera-web"),at==null||at.dispatchEvent(new CustomEvent("metadata.initialize"))}connectedCallback(){this.innerHTML=`
1355
+ `}class W4 extends HTMLElement{constructor(){super(),this.templateString=z4.bind(this),this.render=()=>this.templateString(),this.attachShadow({mode:"open"})}connectedCallback(){const e=document.createElement("template");e.innerHTML=this.render(),this.shadowRoot.appendChild(e.content.cloneNode(!0)),this.navigation=this.shadowRoot.querySelector("smileid-navigation"),this.takeDocumentPhotoButton=this.shadowRoot.querySelector("#take-photo"),this.uploadDocumentPhotoButton=this.shadowRoot.querySelector("#upload-photo"),this.navigation.addEventListener("navigation.back",()=>{this.handleBackEvents()}),this.navigation.addEventListener("navigation.close",()=>{this.handleCloseEvents()}),this.takeDocumentPhotoButton&&this.takeDocumentPhotoButton.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("document-capture-instructions.capture"))}),this.uploadDocumentPhotoButton&&this.uploadDocumentPhotoButton.addEventListener("change",i=>q(this,null,function*(){this.shadowRoot.querySelector("#error").innerHTML="";try{const{files:s}=i.target,o=yield H4.retrieve(s);this.dispatchEvent(new CustomEvent("document-capture-instructions.upload",{detail:{image:o,previewImage:o}}))}catch(s){this.shadowRoot.querySelector("#error").innerHTML=s.message}}))}get hideBack(){return this.hasAttribute("hide-back-to-host")}get showNavigation(){return this.hasAttribute("show-navigation")}get themeColor(){return this.getAttribute("theme-color")||"#001096"}get hideAttribution(){return this.hasAttribute("hide-attribution")}get documentCaptureModes(){return this.getAttribute("document-capture-modes")||"camera"}get supportBothCaptureModes(){const e=this.documentCaptureModes;return e.includes("camera")&&e.includes("upload")}get title(){return this.getAttribute("title")||"Submit Front of ID"}get sideOfId(){return(this.getAttribute("side-of-id")||"front").toLowerCase()}get isFrontOfId(){return this.sideOfId==="front"}get isBackOfId(){return!this.isFrontOfId}handleBackEvents(){this.dispatchEvent(new CustomEvent("document-capture-instructions.cancelled"))}handleCloseEvents(){this.dispatchEvent(new CustomEvent("document-capture-instructions.close"))}}"customElements"in window&&!customElements.get("document-capture-instructions")&&window.customElements.define("document-capture-instructions",W4);const xs={version:"10.0.6"},Z4=xs.version,at=document.querySelector("smart-camera-web");function Cn(t){return q(this,null,function*(){try{const e=yield et.getMedia({audio:!1,video:et.environmentOptions}),s=(yield navigator.mediaDevices.enumerateDevices()).find(o=>o.kind==="videoinput"&&e.getVideoTracks()[0].getSettings().deviceId===o.deviceId);at==null||at.dispatchEvent(new CustomEvent("metadata.camera-name",{detail:{cameraName:s==null?void 0:s.label}})),t.removeAttribute("data-camera-error"),t.setAttribute("data-camera-ready",!0)}catch(e){t.removeAttribute("data-camera-ready"),t.setAttribute("data-camera-error",et.handleCameraError(e))}})}class Wu extends HTMLElement{constructor(){super(),this.activeScreen=null,this.smartCameraWeb=this.closest("smart-camera-web"),at==null||at.dispatchEvent(new CustomEvent("metadata.initialize"))}connectedCallback(){this.innerHTML=`
1356
1356
  ${Ai(this.themeColor)}
1357
1357
  <div style="height: 100%;">
1358
1358
  <document-capture-instructions theme-color='${this.themeColor}' id='document-capture-instructions-front' ${this.title}
@@ -3204,7 +3204,7 @@ function print() { __p += __j.call(arguments, '') }
3204
3204
  overlayColor = mix(defaultColor, overlayColor, overlayColor.a);
3205
3205
  gl_FragColor = mix(defaultColor, overlayColor, confidence);
3206
3206
  }
3207
- `}C(){const t=this.g;t.activeTexture(t.TEXTURE1),this.j=Pn(this,t),t.activeTexture(t.TEXTURE2),this.B=Pn(this,t)}m(){super.m();const t=this.g;this.K=Ce(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.L=Ce(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.H=Ce(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.H,0),t.uniform1i(this.K,1),t.uniform1i(this.L,2)}close(){this.j&&this.g.deleteTexture(this.j),this.B&&this.g.deleteTexture(this.B),super.close()}};function cn(t,e){switch(e){case 0:return t.g.find(i=>i instanceof Uint8Array);case 1:return t.g.find(i=>i instanceof Float32Array);case 2:return t.g.find(i=>typeof WebGLTexture!="undefined"&&i instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function e1(t){var e=cn(t,1);if(!e){if(e=cn(t,0))e=new Float32Array(e).map(s=>s/255);else{e=new Float32Array(t.width*t.height);const s=ts(t);var i=i1(t);if(wa(i,s,dd(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){i=new Float32Array(t.width*t.height*4),s.readPixels(0,0,t.width,t.height,s.RGBA,s.FLOAT,i);for(let o=0,c=0;o<e.length;++o,c+=4)e[o]=i[c]}else s.readPixels(0,0,t.width,t.height,s.RED,s.FLOAT,e)}t.g.push(e)}return e}function dd(t){let e=cn(t,2);if(!e){const i=ts(t);e=pd(t);const s=e1(t),o=fd(t);i.texImage2D(i.TEXTURE_2D,0,o,t.width,t.height,0,i.RED,i.FLOAT,s),n1(t)}return e}function ts(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ce(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function fd(t){if(t=ts(t),!ba)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))ba=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ba=t.R16F}return ba}function i1(t){return t.l||(t.l=new Qr),t.l}function pd(t){const e=ts(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let i=cn(t,2);return i||(i=Pn(i1(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(i),t.j=!0),e.bindTexture(e.TEXTURE_2D,i),i}function n1(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var ba,se=class{constructor(t,e,i,s,o,c,l){this.g=t,this.m=e,this.j=i,this.canvas=s,this.l=o,this.width=c,this.height=l,this.j&&--gd===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Da(){return!!cn(this,0)}ja(){return!!cn(this,1)}R(){return!!cn(this,2)}ia(){return(e=cn(t=this,0))||(e=e1(t),e=new Uint8Array(e.map(i=>255*i)),t.g.push(e)),e;var t,e}ha(){return e1(this)}N(){return dd(this)}clone(){const t=[];for(const e of this.g){let i;if(e instanceof Uint8Array)i=new Uint8Array(e);else if(e instanceof Float32Array)i=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const s=ts(this),o=i1(this);s.activeTexture(s.TEXTURE1),i=Pn(o,s,this.m?s.LINEAR:s.NEAREST),s.bindTexture(s.TEXTURE_2D,i);const c=fd(this);s.texImage2D(s.TEXTURE_2D,0,c,this.width,this.height,0,s.RED,s.FLOAT,null),s.bindTexture(s.TEXTURE_2D,null),wa(o,s,i),Xs(o,s,!1,()=>{pd(this),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4),n1(this)}),t1(o),n1(this)}}t.push(i)}return new se(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&ts(this).deleteTexture(cn(this,2)),gd=-1}};se.prototype.close=se.prototype.close,se.prototype.clone=se.prototype.clone,se.prototype.getAsWebGLTexture=se.prototype.N,se.prototype.getAsFloat32Array=se.prototype.ha,se.prototype.getAsUint8Array=se.prototype.ia,se.prototype.hasWebGLTexture=se.prototype.R,se.prototype.hasFloat32Array=se.prototype.ja,se.prototype.hasUint8Array=se.prototype.Da;var gd=250;const e6={color:"white",lineWidth:4,radius:6};function r1(t){return Fe(ys(Fe({},e6),{fillColor:(t=t||{}).color}),t)}function ln(t,e){return t instanceof Function?t(e):t}function md(t,e,i){return Math.max(Math.min(e,i),Math.min(Math.max(e,i),t))}function Ks(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Ys(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function vd(t,e,i){var s;if(e.R())i(e.N());else{const o=e.ja()?e.ha():e.ia();t.m=(s=t.m)!=null?s:new Qr;const c=Ys(t);i((t=new se([o],e.m,!1,c.canvas,t.m,e.width,e.height)).N()),t.close()}}function _d(t,e,i,s){const o=function(u){return u.g||(u.g=new Qp),u.g}(t),c=Ys(t),l=Array.isArray(i)?new ImageData(new Uint8ClampedArray(i),1,1):i;Xs(o,c,!0,()=>{(function(h,f,_,m){const b=h.g;if(b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,f),b.activeTexture(b.TEXTURE1),b.bindTexture(b.TEXTURE_2D,h.B),b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,_),h.H&&function(E,A){if(E!==A)return!1;E=E.entries(),A=A.entries();for(const[F,M]of E){E=F;const D=M;var k=A.next();if(k.done)return!1;const[R,$]=k.value;if(k=$,E!==R||D[0]!==k[0]||D[1]!==k[1]||D[2]!==k[2]||D[3]!==k[3])return!1}return!!A.next().done}(h.H,m))b.activeTexture(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,h.j);else{h.H=m;const E=Array(1024).fill(0);m.forEach((A,k)=>{if(A.length!==4)throw Error(`Color at index ${k} is not a four-channel value.`);E[4*k]=A[0],E[4*k+1]=A[1],E[4*k+2]=A[2],E[4*k+3]=A[3]}),b.activeTexture(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,h.j),b.texImage2D(b.TEXTURE_2D,0,b.RGBA,256,1,0,b.RGBA,b.UNSIGNED_BYTE,new Uint8Array(E))}})(o,e,l,s),c.clearColor(0,0,0,0),c.clear(c.COLOR_BUFFER_BIT),c.drawArrays(c.TRIANGLE_FAN,0,4);const u=o.g;u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,null),u.activeTexture(u.TEXTURE1),u.bindTexture(u.TEXTURE_2D,null),u.activeTexture(u.TEXTURE2),u.bindTexture(u.TEXTURE_2D,null)})}function wd(t,e,i,s){const o=Ys(t),c=function(h){return h.h||(h.h=new t6),h.h}(t),l=Array.isArray(i)?new ImageData(new Uint8ClampedArray(i),1,1):i,u=Array.isArray(s)?new ImageData(new Uint8ClampedArray(s),1,1):s;Xs(c,o,!0,()=>{var h=c.g;h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e),h.activeTexture(h.TEXTURE1),h.bindTexture(h.TEXTURE_2D,c.j),h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,l),h.activeTexture(h.TEXTURE2),h.bindTexture(h.TEXTURE_2D,c.B),h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,u),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.TRIANGLE_FAN,0,4),o.bindTexture(o.TEXTURE_2D,null),(h=c.g).activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,null),h.activeTexture(h.TEXTURE1),h.bindTexture(h.TEXTURE_2D,null),h.activeTexture(h.TEXTURE2),h.bindTexture(h.TEXTURE_2D,null)})}var xe=class{constructor(t,e){typeof CanvasRenderingContext2D!="undefined"&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}wa(t,e){if(t){var i=Ks(this);e=r1(e),i.save();var s=i.canvas,o=0;for(const c of t)i.fillStyle=ln(e.fillColor,{index:o,from:c}),i.strokeStyle=ln(e.color,{index:o,from:c}),i.lineWidth=ln(e.lineWidth,{index:o,from:c}),(t=new Path2D).arc(c.x*s.width,c.y*s.height,ln(e.radius,{index:o,from:c}),0,2*Math.PI),i.fill(t),i.stroke(t),++o;i.restore()}}va(t,e,i){if(t&&e){var s=Ks(this);i=r1(i),s.save();var o=s.canvas,c=0;for(const l of e){s.beginPath(),e=t[l.start];const u=t[l.end];e&&u&&(s.strokeStyle=ln(i.color,{index:c,from:e,to:u}),s.lineWidth=ln(i.lineWidth,{index:c,from:e,to:u}),s.moveTo(e.x*o.width,e.y*o.height),s.lineTo(u.x*o.width,u.y*o.height)),++c,s.stroke()}s.restore()}}sa(t,e){const i=Ks(this);e=r1(e),i.save(),i.beginPath(),i.lineWidth=ln(e.lineWidth,{}),i.strokeStyle=ln(e.color,{}),i.fillStyle=ln(e.fillColor,{}),i.moveTo(t.originX,t.originY),i.lineTo(t.originX+t.width,t.originY),i.lineTo(t.originX+t.width,t.originY+t.height),i.lineTo(t.originX,t.originY+t.height),i.lineTo(t.originX,t.originY),i.stroke(),i.fill(),i.restore()}ta(t,e,i=[0,0,0,255]){this.l?function(s,o,c,l){const u=Ys(s);vd(s,o,h=>{_d(s,h,c,l),(h=Ks(s)).drawImage(u.canvas,0,0,h.canvas.width,h.canvas.height)})}(this,t,i,e):_d(this,t.N(),i,e)}ua(t,e,i){this.l?function(s,o,c,l){const u=Ys(s);vd(s,o,h=>{wd(s,h,c,l),(h=Ks(s)).drawImage(u.canvas,0,0,h.canvas.width,h.canvas.height)})}(this,t,e,i):wd(this,t.N(),e,i)}close(){var t,e,i;(t=this.g)==null||t.close(),this.g=void 0,(e=this.h)==null||e.close(),this.h=void 0,(i=this.m)==null||i.close(),this.m=void 0}};function Ni(t,e){switch(e){case 0:return t.g.find(i=>i instanceof ImageData);case 1:return t.g.find(i=>typeof ImageBitmap!="undefined"&&i instanceof ImageBitmap);case 2:return t.g.find(i=>typeof WebGLTexture!="undefined"&&i instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function bd(t){var e=Ni(t,0);if(!e){e=es(t);const i=Ca(t),s=new Uint8Array(t.width*t.height*4);wa(i,e,ya(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,s),t1(i),e=new ImageData(new Uint8ClampedArray(s.buffer),t.width,t.height),t.g.push(e)}return e}function ya(t){let e=Ni(t,2);if(!e){const i=es(t);e=xa(t);const s=Ni(t,1)||bd(t);i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,s),Js(t)}return e}function es(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ce(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ca(t){return t.l||(t.l=new Qr),t.l}function xa(t){const e=es(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let i=Ni(t,2);return i||(i=Pn(Ca(t),e),t.g.push(i),t.m=!0),e.bindTexture(e.TEXTURE_2D,i),i}function Js(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function yd(t){const e=es(t);return Xs(Ca(t),e,!0,()=>function(i,s){const o=i.canvas;if(o.width===i.width&&o.height===i.height)return s();const c=o.width,l=o.height;return o.width=i.width,o.height=i.height,i=s(),o.width=c,o.height=l,i}(t,()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))}xe.prototype.close=xe.prototype.close,xe.prototype.drawConfidenceMask=xe.prototype.ua,xe.prototype.drawCategoryMask=xe.prototype.ta,xe.prototype.drawBoundingBox=xe.prototype.sa,xe.prototype.drawConnectors=xe.prototype.va,xe.prototype.drawLandmarks=xe.prototype.wa,xe.lerp=function(t,e,i,s,o){return md(s*(1-(t-e)/(i-e))+o*(1-(i-t)/(i-e)),s,o)},xe.clamp=md;var ce=class{constructor(t,e,i,s,o,c,l){this.g=t,this.j=e,this.m=i,this.canvas=s,this.l=o,this.width=c,this.height=l,(this.j||this.m)&&--Cd===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ca(){return!!Ni(this,0)}ka(){return!!Ni(this,1)}R(){return!!Ni(this,2)}Aa(){return bd(this)}za(){var t=Ni(this,1);return t||(ya(this),xa(this),t=yd(this),Js(this),this.g.push(t),this.j=!0),t}N(){return ya(this)}clone(){const t=[];for(const e of this.g){let i;if(e instanceof ImageData)i=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const s=es(this),o=Ca(this);s.activeTexture(s.TEXTURE1),i=Pn(o,s),s.bindTexture(s.TEXTURE_2D,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,this.width,this.height,0,s.RGBA,s.UNSIGNED_BYTE,null),s.bindTexture(s.TEXTURE_2D,null),wa(o,s,i),Xs(o,s,!1,()=>{xa(this),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4),Js(this)}),t1(o),Js(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);ya(this),xa(this),i=yd(this),Js(this)}t.push(i)}return new ce(t,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ni(this,1).close(),this.m&&es(this).deleteTexture(Ni(this,2)),Cd=-1}};ce.prototype.close=ce.prototype.close,ce.prototype.clone=ce.prototype.clone,ce.prototype.getAsWebGLTexture=ce.prototype.N,ce.prototype.getAsImageBitmap=ce.prototype.za,ce.prototype.getAsImageData=ce.prototype.Aa,ce.prototype.hasWebGLTexture=ce.prototype.R,ce.prototype.hasImageBitmap=ce.prototype.ka,ce.prototype.hasImageData=ce.prototype.Ca;var Cd=250;function Ti(...t){return t.map(([e,i])=>({start:e,end:i}))}const i6=function(t){return class extends t{Ha(){this.i._registerModelResourcesGraphService()}}}((xd=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",e!==void 0?this.i.canvas=e:rd()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}initializeGraph(t){return q(this,null,function*(){const e=yield(yield fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)})}setGraphFromString(t){this.setGraph(new TextEncoder().encode(t),!1)}setGraph(t,e){const i=t.length,s=this.i._malloc(i);this.i.HEAPU8.set(t,s),e?this.i._changeBinaryGraph(i,s):this.i._changeTextGraph(i,s),this.i._free(s)}configureAudio(t,e,i,s,o){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),W(this,s||"input_audio",c=>{W(this,o=o||"audio_header",l=>{this.i._configureAudio(c,l,t,e!=null?e:0,i)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){$i(this,"__graph_config__",e=>{t(e)}),W(this,"__graph_config__",e=>{this.i._getGraphConfig(e,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,i){this.addAudioToStreamWithShape(t,0,0,e,i)}addAudioToStreamWithShape(t,e,i,s,o){const c=4*t.length;this.h!==c&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(c),this.h=c),this.i.HEAPF32.set(t,this.g/4),W(this,s,l=>{this.i._addAudioToInputStream(this.g,e,i,l,o)})}addGpuBufferToStream(t,e,i){W(this,e,s=>{const[o,c]=ad(this,t,s);this.i._addBoundTextureToStream(s,o,c,i)})}addBoolToStream(t,e,i){W(this,e,s=>{this.i._addBoolToInputStream(t,s,i)})}addDoubleToStream(t,e,i){W(this,e,s=>{this.i._addDoubleToInputStream(t,s,i)})}addFloatToStream(t,e,i){W(this,e,s=>{this.i._addFloatToInputStream(t,s,i)})}addIntToStream(t,e,i){W(this,e,s=>{this.i._addIntToInputStream(t,s,i)})}addUintToStream(t,e,i){W(this,e,s=>{this.i._addUintToInputStream(t,s,i)})}addStringToStream(t,e,i){W(this,e,s=>{W(this,t,o=>{this.i._addStringToInputStream(o,s,i)})})}addStringRecordToStream(t,e,i){W(this,e,s=>{cd(this,Object.keys(t),o=>{cd(this,Object.values(t),c=>{this.i._addFlatHashMapToInputStream(o,c,Object.keys(t).length,s,i)})})})}addProtoToStream(t,e,i,s){W(this,i,o=>{W(this,e,c=>{const l=this.i._malloc(t.length);this.i.HEAPU8.set(t,l),this.i._addProtoToInputStream(l,t.length,c,o,s),this.i._free(l)})})}addEmptyPacketToStream(t,e){W(this,t,i=>{this.i._addEmptyPacketToInputStream(i,e)})}addBoolVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateBoolVector(t.length);if(!o)throw Error("Unable to allocate new bool vector on heap.");for(const c of t)this.i._addBoolVectorEntry(o,c);this.i._addBoolVectorToInputStream(o,s,i)})}addDoubleVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateDoubleVector(t.length);if(!o)throw Error("Unable to allocate new double vector on heap.");for(const c of t)this.i._addDoubleVectorEntry(o,c);this.i._addDoubleVectorToInputStream(o,s,i)})}addFloatVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateFloatVector(t.length);if(!o)throw Error("Unable to allocate new float vector on heap.");for(const c of t)this.i._addFloatVectorEntry(o,c);this.i._addFloatVectorToInputStream(o,s,i)})}addIntVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateIntVector(t.length);if(!o)throw Error("Unable to allocate new int vector on heap.");for(const c of t)this.i._addIntVectorEntry(o,c);this.i._addIntVectorToInputStream(o,s,i)})}addUintVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateUintVector(t.length);if(!o)throw Error("Unable to allocate new unsigned int vector on heap.");for(const c of t)this.i._addUintVectorEntry(o,c);this.i._addUintVectorToInputStream(o,s,i)})}addStringVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateStringVector(t.length);if(!o)throw Error("Unable to allocate new string vector on heap.");for(const c of t)W(this,c,l=>{this.i._addStringVectorEntry(o,l)});this.i._addStringVectorToInputStream(o,s,i)})}addBoolToInputSidePacket(t,e){W(this,e,i=>{this.i._addBoolToInputSidePacket(t,i)})}addDoubleToInputSidePacket(t,e){W(this,e,i=>{this.i._addDoubleToInputSidePacket(t,i)})}addFloatToInputSidePacket(t,e){W(this,e,i=>{this.i._addFloatToInputSidePacket(t,i)})}addIntToInputSidePacket(t,e){W(this,e,i=>{this.i._addIntToInputSidePacket(t,i)})}addUintToInputSidePacket(t,e){W(this,e,i=>{this.i._addUintToInputSidePacket(t,i)})}addStringToInputSidePacket(t,e){W(this,e,i=>{W(this,t,s=>{this.i._addStringToInputSidePacket(s,i)})})}addProtoToInputSidePacket(t,e,i){W(this,i,s=>{W(this,e,o=>{const c=this.i._malloc(t.length);this.i.HEAPU8.set(t,c),this.i._addProtoToInputSidePacket(c,t.length,o,s),this.i._free(c)})})}addBoolVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateBoolVector(t.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const o of t)this.i._addBoolVectorEntry(s,o);this.i._addBoolVectorToInputSidePacket(s,i)})}addDoubleVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateDoubleVector(t.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const o of t)this.i._addDoubleVectorEntry(s,o);this.i._addDoubleVectorToInputSidePacket(s,i)})}addFloatVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateFloatVector(t.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const o of t)this.i._addFloatVectorEntry(s,o);this.i._addFloatVectorToInputSidePacket(s,i)})}addIntVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateIntVector(t.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const o of t)this.i._addIntVectorEntry(s,o);this.i._addIntVectorToInputSidePacket(s,i)})}addUintVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateUintVector(t.length);if(!s)throw Error("Unable to allocate new unsigned int vector on heap.");for(const o of t)this.i._addUintVectorEntry(s,o);this.i._addUintVectorToInputSidePacket(s,i)})}addStringVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateStringVector(t.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const o of t)W(this,o,c=>{this.i._addStringVectorEntry(s,c)});this.i._addStringVectorToInputSidePacket(s,i)})}attachBoolListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachBoolListener(i)})}attachBoolVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachBoolVectorListener(i)})}attachIntListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachIntListener(i)})}attachIntVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachIntVectorListener(i)})}attachUintListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachUintListener(i)})}attachUintVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachUintVectorListener(i)})}attachDoubleListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachDoubleListener(i)})}attachDoubleVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachDoubleVectorListener(i)})}attachFloatListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachFloatListener(i)})}attachFloatVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachFloatVectorListener(i)})}attachStringListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachStringListener(i)})}attachStringVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachStringVectorListener(i)})}attachProtoListener(t,e,i){$i(this,t,e),W(this,t,s=>{this.i._attachProtoListener(s,i||!1)})}attachProtoVectorListener(t,e,i){On(this,t,e),W(this,t,s=>{this.i._attachProtoVectorListener(s,i||!1)})}attachAudioListener(t,e,i){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),$i(this,t,(s,o)=>{s=new Float32Array(s.buffer,s.byteOffset,s.length/4),e(s,o)}),W(this,t,s=>{this.i._attachAudioListener(s,i||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends xd{get ea(){return this.i}oa(t,e,i){W(this,e,s=>{const[o,c]=ad(this,t,s);this.ea._addBoundTextureAsImageToStream(s,o,c,i)})}V(t,e){$i(this,t,e),W(this,t,i=>{this.ea._attachImageListener(i)})}ba(t,e){On(this,t,e),W(this,t,i=>{this.ea._attachImageVectorListener(i)})}}));var xd,hi=class extends i6{};function ct(t,e,i){return q(this,null,function*(){var s;return function(o,c,l,u){return q(this,null,function*(){return Yp(o,c,l,u)})}(t,(s=i.canvas)!=null?s:rd()?void 0:document.createElement("canvas"),e,i)})}function Ed(t,e,i,s){if(t.U){const c=new S0;if(i!=null&&i.regionOfInterest){if(!t.na)throw Error("This task doesn't support region-of-interest.");var o=i.regionOfInterest;if(o.left>=o.right||o.top>=o.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(o.left<0||o.top<0||o.right>1||o.bottom>1)throw Error("Expected RectF values to be in [0,1].");G(c,1,(o.left+o.right)/2),G(c,2,(o.top+o.bottom)/2),G(c,4,o.right-o.left),G(c,3,o.bottom-o.top)}else G(c,1,.5),G(c,2,.5),G(c,4,1),G(c,3,1);if(i!=null&&i.rotationDegrees){if((i==null?void 0:i.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(G(c,5,-Math.PI*i.rotationDegrees/180),(i==null?void 0:i.rotationDegrees)%180!=0){const[l,u]=od(e);i=Xt(c,3)*u/l,o=Xt(c,4)*l/u,G(c,4,i),G(c,3,o)}}t.g.addProtoToStream(c.g(),"mediapipe.NormalizedRect",t.U,s)}t.g.oa(e,t.Z,s!=null?s:performance.now()),t.finishProcessing()}function di(t,e,i){var s;if((s=t.baseOptions)!=null&&s.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Ed(t,e,i,t.B+1)}function Hi(t,e,i,s){var o;if(!((o=t.baseOptions)!=null&&o.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Ed(t,e,i,s)}function is(t,e,i,s){var o=e.data;const c=e.width,l=c*(e=e.height);if((o instanceof Uint8Array||o instanceof Float32Array)&&o.length!==l)throw Error("Unsupported channel count: "+o.length/l);return t=new se([o],i,!1,t.g.i.canvas,t.P,c,e),s?t.clone():t}var De=class extends Jl{constructor(t,e,i,s){super(t),this.g=t,this.Z=e,this.U=i,this.na=s,this.P=new Qr}l(t,e=!0){if("runningMode"in t&&Vs(this.baseOptions,2,!!t.runningMode&&t.runningMode!=="IMAGE"),t.canvas!==void 0&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.P.close(),super.close()}};De.prototype.close=De.prototype.close;var fi=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},Z(t=this.h=new pa,0,1,e=new Pt),G(this.h,2,.5),G(this.h,3,.3)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i;return"minDetectionConfidence"in t&&G(this.h,2,(e=t.minDetectionConfidence)!=null?e:.5),"minSuppressionThreshold"in t&&G(this.h,3,(i=t.minSuppressionThreshold)!=null?i:.3),this.l(t)}D(t,e){return this.j={detections:[]},di(this,t,e),this.j}F(t,e,i){return this.j={detections:[]},Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect_in"),mt(t,"detections");const e=new je;ki(e,Pp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect_in"),dt(i,"DETECTIONS:detections"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("detections",(s,o)=>{for(const c of s)s=x0(c),this.j.detections.push(td(s));U(this,o)}),this.g.attachEmptyPacketListener("detections",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};fi.prototype.detectForVideo=fi.prototype.F,fi.prototype.detect=fi.prototype.D,fi.prototype.setOptions=fi.prototype.o,fi.createFromModelPath=function(t,e){return q(this,null,function*(){return ct(fi,t,{baseOptions:{modelAssetPath:e}})})},fi.createFromModelBuffer=function(t,e){return ct(fi,t,{baseOptions:{modelAssetBuffer:e}})},fi.createFromOptions=function(t,e){return ct(fi,t,e)};var s1=Ti([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]),o1=Ti([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]),a1=Ti([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Ad=Ti([474,475],[475,476],[476,477],[477,474]),c1=Ti([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]),l1=Ti([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Sd=Ti([469,470],[470,471],[471,472],[472,469]),u1=Ti([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]),kd=[...s1,...o1,...a1,...c1,...l1,...u1],Ld=Ti([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 Md(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Bt=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,Z(t=this.h=new R0,0,1,e=new Pt),this.v=new B0,Z(this.h,0,3,this.v),this.s=new pa,Z(this.h,0,2,this.s),Ui(this.s,4,1),G(this.s,2,.5),G(this.v,2,.5),G(this.h,4,.5)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i,s,o;return"numFaces"in t&&Ui(this.s,4,(e=t.numFaces)!=null?e:1),"minFaceDetectionConfidence"in t&&G(this.s,2,(i=t.minFaceDetectionConfidence)!=null?i:.5),"minTrackingConfidence"in t&&G(this.h,4,(s=t.minTrackingConfidence)!=null?s:.5),"minFacePresenceConfidence"in t&&G(this.v,2,(o=t.minFacePresenceConfidence)!=null?o:.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return Md(this),di(this,t,e),this.j}F(t,e,i){return Md(this),Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"face_landmarks");const e=new je;ki(e,$p,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"NORM_LANDMARKS:face_landmarks"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("face_landmarks",(s,o)=>{for(const c of s)s=Zs(c),this.j.faceLandmarks.push(ga(s));U(this,o)}),this.g.attachEmptyPacketListener("face_landmarks",s=>{U(this,s)}),this.outputFaceBlendshapes&&(mt(t,"blendshapes"),dt(i,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(s,o)=>{var c;if(this.outputFaceBlendshapes)for(const l of s)s=ha(l),this.j.faceBlendshapes.push(Kl((c=s.g())!=null?c:[]));U(this,o)}),this.g.attachEmptyPacketListener("blendshapes",s=>{U(this,s)})),this.outputFacialTransformationMatrixes&&(mt(t,"face_geometry"),dt(i,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(s,o)=>{var c,l,u,h,f;if(this.outputFacialTransformationMatrixes)for(const _ of s)(s=gt(Up(_),Mp,2))&&this.j.facialTransformationMatrixes.push({rows:(l=(c=li(s,1))!=null?c:0)!=null?l:0,columns:(h=(u=li(s,2))!=null?u:0)!=null?h:0,data:(f=or(s,3,Mn,sr()).slice())!=null?f:[]});U(this,o)}),this.g.attachEmptyPacketListener("face_geometry",s=>{U(this,s)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Bt.prototype.detectForVideo=Bt.prototype.F,Bt.prototype.detect=Bt.prototype.D,Bt.prototype.setOptions=Bt.prototype.o,Bt.createFromModelPath=function(t,e){return ct(Bt,t,{baseOptions:{modelAssetPath:e}})},Bt.createFromModelBuffer=function(t,e){return ct(Bt,t,{baseOptions:{modelAssetBuffer:e}})},Bt.createFromOptions=function(t,e){return ct(Bt,t,e)},Bt.FACE_LANDMARKS_LIPS=s1,Bt.FACE_LANDMARKS_LEFT_EYE=o1,Bt.FACE_LANDMARKS_LEFT_EYEBROW=a1,Bt.FACE_LANDMARKS_LEFT_IRIS=Ad,Bt.FACE_LANDMARKS_RIGHT_EYE=c1,Bt.FACE_LANDMARKS_RIGHT_EYEBROW=l1,Bt.FACE_LANDMARKS_RIGHT_IRIS=Sd,Bt.FACE_LANDMARKS_FACE_OVAL=u1,Bt.FACE_LANDMARKS_CONTOURS=kd,Bt.FACE_LANDMARKS_TESSELATION=Ld;var Vi=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!0),Z(t=this.j=new O0,0,1,e=new Pt)}get baseOptions(){return gt(this.j,Pt,1)}set baseOptions(t){Z(this.j,0,1,t)}o(t){return super.l(t)}Ka(t,e,i){const s=typeof e!="function"?e:{};if(this.h=typeof e=="function"?e:i,di(this,t,s!=null?s:{}),!this.h)return this.s}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"stylized_image");const e=new je;ki(e,Np,this.j);const i=new ye;Xe(i,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"STYLIZED_IMAGE:stylized_image"),i.o(e),Ke(t,i),this.g.V("stylized_image",(s,o)=>{var c=!this.h,l=s.data,u=s.width;const h=u*(s=s.height);if(l instanceof Uint8Array)if(l.length===3*h){const f=new Uint8ClampedArray(4*h);for(let _=0;_<h;++_)f[4*_]=l[3*_],f[4*_+1]=l[3*_+1],f[4*_+2]=l[3*_+2],f[4*_+3]=255;l=new ImageData(f,u,s)}else{if(l.length!==4*h)throw Error("Unsupported channel count: "+l.length/h);l=new ImageData(new Uint8ClampedArray(l.buffer,l.byteOffset,l.length),u,s)}else if(!(l instanceof WebGLTexture))throw Error(`Unsupported format: ${l.constructor.name}`);u=new ce([l],!1,!1,this.g.i.canvas,this.P,u,s),this.s=c=c?u.clone():u,this.h&&this.h(c),U(this,o)}),this.g.attachEmptyPacketListener("stylized_image",s=>{this.s=null,this.h&&this.h(null),U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Vi.prototype.stylize=Vi.prototype.Ka,Vi.prototype.setOptions=Vi.prototype.o,Vi.createFromModelPath=function(t,e){return ct(Vi,t,{baseOptions:{modelAssetPath:e}})},Vi.createFromModelBuffer=function(t,e){return ct(Vi,t,{baseOptions:{modelAssetBuffer:e}})},Vi.createFromOptions=function(t,e){return ct(Vi,t,e)};var h1=Ti([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 Td(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Id(t){return t.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Fd(t,e=!0){var o,c,l,u,h,f;const i=[];for(const _ of t){var s=ha(_);t=[];for(const m of s.g())s=e&&li(m,1)!=null?(o=li(m,1))!=null?o:0:-1,t.push({score:(c=Xt(m,2))!=null?c:0,index:s,categoryName:(u=(l=ui(m,3))!=null?l:"")!=null?u:"",displayName:(f=(h=ui(m,4))!=null?h:"")!=null?f:""});i.push(t)}return i}var Ye=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Z(t=this.j=new $0,0,1,e=new Pt),this.s=new zl,Z(this.j,0,2,this.s),this.C=new Gl,Z(this.s,0,3,this.C),this.v=new U0,Z(this.s,0,2,this.v),this.h=new Hp,Z(this.j,0,3,this.h),G(this.v,2,.5),G(this.s,4,.5),G(this.C,2,.5)}get baseOptions(){return gt(this.j,Pt,1)}set baseOptions(t){Z(this.j,0,1,t)}o(t){var o,c,l,u,h,f,_,m;if(Ui(this.v,3,(o=t.numHands)!=null?o:1),"minHandDetectionConfidence"in t&&G(this.v,2,(c=t.minHandDetectionConfidence)!=null?c:.5),"minTrackingConfidence"in t&&G(this.s,4,(l=t.minTrackingConfidence)!=null?l:.5),"minHandPresenceConfidence"in t&&G(this.C,2,(u=t.minHandPresenceConfidence)!=null?u:.5),t.cannedGesturesClassifierOptions){var e=new Yr,i=e,s=Xl(t.cannedGesturesClassifierOptions,(h=gt(this.h,Yr,3))==null?void 0:h.h());Z(i,0,2,s),Z(this.h,0,3,e)}else t.cannedGesturesClassifierOptions===void 0&&((f=gt(this.h,Yr,3))==null||f.g());return t.customGesturesClassifierOptions?(Z(i=e=new Yr,0,2,s=Xl(t.customGesturesClassifierOptions,(_=gt(this.h,Yr,4))==null?void 0:_.h())),Z(this.h,0,4,e)):t.customGesturesClassifierOptions===void 0&&((m=gt(this.h,Yr,4))==null||m.g()),this.l(t)}Fa(t,e){return Td(this),di(this,t,e),Id(this)}Ga(t,e,i){return Td(this),Hi(this,t,i,e),Id(this)}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"hand_gestures"),mt(t,"hand_landmarks"),mt(t,"world_hand_landmarks"),mt(t,"handedness");const e=new je;ki(e,Vp,this.j);const i=new ye;Xe(i,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"HAND_GESTURES:hand_gestures"),dt(i,"LANDMARKS:hand_landmarks"),dt(i,"WORLD_LANDMARKS:world_hand_landmarks"),dt(i,"HANDEDNESS:handedness"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("hand_landmarks",(s,o)=>{var c,l,u,h;for(const f of s){s=Zs(f);const _=[];for(const m of rn(s,A0,1))_.push({x:(c=Xt(m,1))!=null?c:0,y:(l=Xt(m,2))!=null?l:0,z:(u=Xt(m,3))!=null?u:0,visibility:(h=Xt(m,4))!=null?h:0});this.landmarks.push(_)}U(this,o)}),this.g.attachEmptyPacketListener("hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("world_hand_landmarks",(s,o)=>{var c,l,u,h;for(const f of s){s=Kr(f);const _=[];for(const m of rn(s,E0,1))_.push({x:(c=Xt(m,1))!=null?c:0,y:(l=Xt(m,2))!=null?l:0,z:(u=Xt(m,3))!=null?u:0,visibility:(h=Xt(m,4))!=null?h:0});this.worldLandmarks.push(_)}U(this,o)}),this.g.attachEmptyPacketListener("world_hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("hand_gestures",(s,o)=>{this.gestures.push(...Fd(s,!1)),U(this,o)}),this.g.attachEmptyPacketListener("hand_gestures",s=>{U(this,s)}),this.g.attachProtoVectorListener("handedness",(s,o)=>{this.handedness.push(...Fd(s)),U(this,o)}),this.g.attachEmptyPacketListener("handedness",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Bd(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Ye.prototype.recognizeForVideo=Ye.prototype.Ga,Ye.prototype.recognize=Ye.prototype.Fa,Ye.prototype.setOptions=Ye.prototype.o,Ye.createFromModelPath=function(t,e){return ct(Ye,t,{baseOptions:{modelAssetPath:e}})},Ye.createFromModelBuffer=function(t,e){return ct(Ye,t,{baseOptions:{modelAssetBuffer:e}})},Ye.createFromOptions=function(t,e){return ct(Ye,t,e)},Ye.HAND_CONNECTIONS=h1;var Je=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Z(t=this.h=new zl,0,1,e=new Pt),this.s=new Gl,Z(this.h,0,3,this.s),this.j=new U0,Z(this.h,0,2,this.j),Ui(this.j,3,1),G(this.j,2,.5),G(this.s,2,.5),G(this.h,4,.5)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i,s,o;return"numHands"in t&&Ui(this.j,3,(e=t.numHands)!=null?e:1),"minHandDetectionConfidence"in t&&G(this.j,2,(i=t.minHandDetectionConfidence)!=null?i:.5),"minTrackingConfidence"in t&&G(this.h,4,(s=t.minTrackingConfidence)!=null?s:.5),"minHandPresenceConfidence"in t&&G(this.s,2,(o=t.minHandPresenceConfidence)!=null?o:.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],di(this,t,e),Bd(this)}F(t,e,i){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Hi(this,t,i,e),Bd(this)}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"hand_landmarks"),mt(t,"world_hand_landmarks"),mt(t,"handedness");const e=new je;ki(e,Gp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"LANDMARKS:hand_landmarks"),dt(i,"WORLD_LANDMARKS:world_hand_landmarks"),dt(i,"HANDEDNESS:handedness"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("hand_landmarks",(s,o)=>{for(const c of s)s=Zs(c),this.landmarks.push(ga(s));U(this,o)}),this.g.attachEmptyPacketListener("hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("world_hand_landmarks",(s,o)=>{for(const c of s)s=Kr(c),this.worldLandmarks.push(qs(s));U(this,o)}),this.g.attachEmptyPacketListener("world_hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("handedness",(s,o)=>{var h,f,_,m,b,E,A;var c=this.handedness,l=c.push;const u=[];for(const k of s){s=ha(k);const F=[];for(const M of s.g())F.push({score:(h=Xt(M,2))!=null?h:0,index:(_=(f=li(M,1))!=null?f:0)!=null?_:-1,categoryName:(b=(m=ui(M,3))!=null?m:"")!=null?b:"",displayName:(A=(E=ui(M,4))!=null?E:"")!=null?A:""});u.push(F)}l.call(c,...u),U(this,o)}),this.g.attachEmptyPacketListener("handedness",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Je.prototype.detectForVideo=Je.prototype.F,Je.prototype.detect=Je.prototype.D,Je.prototype.setOptions=Je.prototype.o,Je.createFromModelPath=function(t,e){return ct(Je,t,{baseOptions:{modelAssetPath:e}})},Je.createFromModelBuffer=function(t,e){return ct(Je,t,{baseOptions:{modelAssetBuffer:e}})},Je.createFromOptions=function(t,e){return ct(Je,t,e)},Je.HAND_CONNECTIONS=h1;var Rd=Ti([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 Dd(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Od(t){try{if(!t.C)return t.h;t.C(t.h)}finally{_a(t)}}function Ea(t,e){t=Zs(t),e.push(ga(t))}var Ut=class extends De{constructor(t,e){super(new hi(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,Z(t=this.j=new W0,0,1,e=new Pt),this.K=new Gl,Z(this.j,0,2,this.K),this.Y=new zp,Z(this.j,0,3,this.Y),this.s=new pa,Z(this.j,0,4,this.s),this.H=new B0,Z(this.j,0,5,this.H),this.v=new G0,Z(this.j,0,6,this.v),this.L=new z0,Z(this.j,0,7,this.L),G(this.s,2,.5),G(this.s,3,.3),G(this.H,2,.5),G(this.v,2,.5),G(this.v,3,.3),G(this.L,2,.5),G(this.K,2,.5)}get baseOptions(){return gt(this.j,Pt,1)}set baseOptions(t){Z(this.j,0,1,t)}o(t){var e,i,s,o,c,l,u;return"minFaceDetectionConfidence"in t&&G(this.s,2,(e=t.minFaceDetectionConfidence)!=null?e:.5),"minFaceSuppressionThreshold"in t&&G(this.s,3,(i=t.minFaceSuppressionThreshold)!=null?i:.3),"minFacePresenceConfidence"in t&&G(this.H,2,(s=t.minFacePresenceConfidence)!=null?s:.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&G(this.v,2,(o=t.minPoseDetectionConfidence)!=null?o:.5),"minPoseSuppressionThreshold"in t&&G(this.v,3,(c=t.minPoseSuppressionThreshold)!=null?c:.3),"minPosePresenceConfidence"in t&&G(this.L,2,(l=t.minPosePresenceConfidence)!=null?l:.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&G(this.K,2,(u=t.minHandLandmarksConfidence)!=null?u:.5),this.l(t)}D(t,e,i){const s=typeof e!="function"?e:{};return this.C=typeof e=="function"?e:i,Dd(this),di(this,t,s),Od(this)}F(t,e,i,s){const o=typeof i!="function"?i:{};return this.C=typeof i=="function"?i:s,Dd(this),Hi(this,t,o,e),Od(this)}m(){var t=new Re;Ft(t,"input_frames_image"),mt(t,"pose_landmarks"),mt(t,"pose_world_landmarks"),mt(t,"face_landmarks"),mt(t,"left_hand_landmarks"),mt(t,"left_hand_world_landmarks"),mt(t,"right_hand_landmarks"),mt(t,"right_hand_world_landmarks");const e=new je,i=new a0;hl(i,1,Ur("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(o,c){if(c!=null)if(Array.isArray(c))Mt(o,2,zo(c,al,void 0,void 0,!1));else{if(!(typeof c=="string"||c instanceof tn||ir(c)))throw Error("invalid value in Any.value field: "+c+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");hl(o,2,jc(c,!1),nr())}}(i,this.j.g());const s=new ye;Xe(s,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Xo(s,8,a0,i),Tt(s,"IMAGE:input_frames_image"),dt(s,"POSE_LANDMARKS:pose_landmarks"),dt(s,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),dt(s,"FACE_LANDMARKS:face_landmarks"),dt(s,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),dt(s,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),dt(s,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),dt(s,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),s.o(e),Ke(t,s),va(this,t),this.g.attachProtoListener("pose_landmarks",(o,c)=>{Ea(o,this.h.poseLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("pose_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("pose_world_landmarks",(o,c)=>{var l=this.h.poseWorldLandmarks;o=Kr(o),l.push(qs(o)),U(this,c)}),this.g.attachEmptyPacketListener("pose_world_landmarks",o=>{U(this,o)}),this.outputPoseSegmentationMasks&&(dt(s,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Jr(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",(o,c)=>{this.h.poseSegmentationMasks=[is(this,o,!0,!this.C)],U(this,c)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",o=>{this.h.poseSegmentationMasks=[],U(this,o)})),this.g.attachProtoListener("face_landmarks",(o,c)=>{Ea(o,this.h.faceLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("face_landmarks",o=>{U(this,o)}),this.outputFaceBlendshapes&&(mt(t,"extra_blendshapes"),dt(s,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(o,c)=>{var u;var l=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(o=ha(o),l.push(Kl((u=o.g())!=null?u:[]))),U(this,c)}),this.g.attachEmptyPacketListener("extra_blendshapes",o=>{U(this,o)})),this.g.attachProtoListener("left_hand_landmarks",(o,c)=>{Ea(o,this.h.leftHandLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("left_hand_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("left_hand_world_landmarks",(o,c)=>{var l=this.h.leftHandWorldLandmarks;o=Kr(o),l.push(qs(o)),U(this,c)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("right_hand_landmarks",(o,c)=>{Ea(o,this.h.rightHandLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("right_hand_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("right_hand_world_landmarks",(o,c)=>{var l=this.h.rightHandWorldLandmarks;o=Kr(o),l.push(qs(o)),U(this,c)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",o=>{U(this,o)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ut.prototype.detectForVideo=Ut.prototype.F,Ut.prototype.detect=Ut.prototype.D,Ut.prototype.setOptions=Ut.prototype.o,Ut.createFromModelPath=function(t,e){return ct(Ut,t,{baseOptions:{modelAssetPath:e}})},Ut.createFromModelBuffer=function(t,e){return ct(Ut,t,{baseOptions:{modelAssetBuffer:e}})},Ut.createFromOptions=function(t,e){return ct(Ut,t,e)},Ut.HAND_CONNECTIONS=h1,Ut.POSE_CONNECTIONS=Rd,Ut.FACE_LANDMARKS_LIPS=s1,Ut.FACE_LANDMARKS_LEFT_EYE=o1,Ut.FACE_LANDMARKS_LEFT_EYEBROW=a1,Ut.FACE_LANDMARKS_LEFT_IRIS=Ad,Ut.FACE_LANDMARKS_RIGHT_EYE=c1,Ut.FACE_LANDMARKS_RIGHT_EYEBROW=l1,Ut.FACE_LANDMARKS_RIGHT_IRIS=Sd,Ut.FACE_LANDMARKS_FACE_OVAL=u1,Ut.FACE_LANDMARKS_CONTOURS=kd,Ut.FACE_LANDMARKS_TESSELATION=Ld;var pi=class extends De{constructor(t,e){super(new hi(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},Z(t=this.h=new Z0,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){return Z(this.h,0,2,Xl(t,gt(this.h,Nl,2))),this.l(t)}qa(t,e){return this.j={classifications:[]},di(this,t,e),this.j}ra(t,e,i){return this.j={classifications:[]},Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"input_image"),Ft(t,"norm_rect"),mt(t,"classifications");const e=new je;ki(e,Wp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Tt(i,"IMAGE:input_image"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"CLASSIFICATIONS:classifications"),i.o(e),Ke(t,i),this.g.attachProtoListener("classifications",(s,o)=>{this.j=function(c){var u;const l={classifications:rn(c,Ip,1).map(h=>{var f,_,m,b;return Kl((_=(f=gt(h,y0,4))==null?void 0:f.g())!=null?_:[],(m=li(h,2))!=null?m:0,(b=ui(h,3))!=null?b:"")})};return il(Nr(c,2))!=null&&(l.timestampMs=(u=il(Nr(c,2)))!=null?u:0),l}(Fp(s)),U(this,o)}),this.g.attachEmptyPacketListener("classifications",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pi.prototype.classifyForVideo=pi.prototype.ra,pi.prototype.classify=pi.prototype.qa,pi.prototype.setOptions=pi.prototype.o,pi.createFromModelPath=function(t,e){return ct(pi,t,{baseOptions:{modelAssetPath:e}})},pi.createFromModelBuffer=function(t,e){return ct(pi,t,{baseOptions:{modelAssetBuffer:e}})},pi.createFromOptions=function(t,e){return ct(pi,t,e)};var Qe=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!0),this.h=new q0,this.embeddings={embeddings:[]},Z(t=this.h,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e=this.h,i=gt(this.h,T0,2);return i=i?i.clone():new T0,t.l2Normalize!==void 0?Vs(i,1,t.l2Normalize):"l2Normalize"in t&&Mt(i,1),t.quantize!==void 0?Vs(i,2,t.quantize):"quantize"in t&&Mt(i,2),Z(e,0,2,i),this.l(t)}xa(t,e){return di(this,t,e),this.embeddings}ya(t,e,i){return Hi(this,t,i,e),this.embeddings}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"embeddings_out");const e=new je;ki(e,Zp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"EMBEDDINGS:embeddings_out"),i.o(e),Ke(t,i),this.g.attachProtoListener("embeddings_out",(s,o)=>{s=Dp(s),this.embeddings=function(c){var l;return{embeddings:rn(c,Rp,1).map(u=>{var f,_,m,b,E,A,k;const h={headIndex:(_=(f=li(u,3))!=null?f:0)!=null?_:-1,headName:(b=(m=ui(u,4))!=null?m:"")!=null?b:""};if(Th(u,k0,dl(u,1))!==void 0)u=or(u=gt(u,k0,dl(u,1)),1,Mn,sr()),h.floatEmbedding=u.slice();else{const F=new Uint8Array(0);h.quantizedEmbedding=(k=(A=(E=gt(u,Bp,dl(u,2)))==null?void 0:E.ma())==null?void 0:A.h())!=null?k:F}return h}),timestampMs:(l=il(Nr(c,2)))!=null?l:0}}(s),U(this,o)}),this.g.attachEmptyPacketListener("embeddings_out",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Qe.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=id(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=id(ed(t.quantizedEmbedding),ed(e.quantizedEmbedding))}return t},Qe.prototype.embedForVideo=Qe.prototype.ya,Qe.prototype.embed=Qe.prototype.xa,Qe.prototype.setOptions=Qe.prototype.o,Qe.createFromModelPath=function(t,e){return ct(Qe,t,{baseOptions:{modelAssetPath:e}})},Qe.createFromModelBuffer=function(t,e){return ct(Qe,t,{baseOptions:{modelAssetBuffer:e}})},Qe.createFromOptions=function(t,e){return ct(Qe,t,e)};var d1=class{constructor(t,e,i){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=i}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(i=>{i.close()}),(e=this.categoryMask)==null||e.close()}};function Pd(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Ud(t){try{const e=new d1(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{_a(t)}}d1.prototype.close=d1.prototype.close;var Oe=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new jl,this.v=new j0,Z(this.h,0,3,this.v),Z(t=this.h,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i;return t.displayNamesLocale!==void 0?Mt(this.h,2,Ur(t.displayNamesLocale)):"displayNamesLocale"in t&&Mt(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=(e=t.outputCategoryMask)!=null?e:!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=(i=t.outputConfidenceMasks)!=null?i:!0),super.l(t)}J(){(function(t){var i,s,o;const e=rn(t.ca(),ye,1).filter(c=>{var l;return((l=ui(c,1))!=null?l:"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")});if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");e.length===1&&((o=(s=(i=gt(e[0],je,7))==null?void 0:i.l())==null?void 0:s.g())!=null?o:new Map).forEach((c,l)=>{var u;t.s[Number(l)]=(u=ui(c,1))!=null?u:""})})(this)}segment(t,e,i){const s=typeof e!="function"?e:{};return this.j=typeof e=="function"?e:i,Pd(this),di(this,t,s),Ud(this)}Ia(t,e,i,s){const o=typeof i!="function"?i:{};return this.j=typeof i=="function"?i:s,Pd(this),Hi(this,t,o,e),Ud(this)}Ba(){return this.s}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect");const e=new je;ki(e,Y0,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),i.o(e),Ke(t,i),va(this,t),this.outputConfidenceMasks&&(mt(t,"confidence_masks"),dt(i,"CONFIDENCE_MASKS:confidence_masks"),Jr(this,"confidence_masks"),this.g.ba("confidence_masks",(s,o)=>{this.confidenceMasks=s.map(c=>is(this,c,!0,!this.j)),U(this,o)}),this.g.attachEmptyPacketListener("confidence_masks",s=>{this.confidenceMasks=[],U(this,s)})),this.outputCategoryMask&&(mt(t,"category_mask"),dt(i,"CATEGORY_MASK:category_mask"),Jr(this,"category_mask"),this.g.V("category_mask",(s,o)=>{this.categoryMask=is(this,s,!1,!this.j),U(this,o)}),this.g.attachEmptyPacketListener("category_mask",s=>{this.categoryMask=void 0,U(this,s)})),mt(t,"quality_scores"),dt(i,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(s,o)=>{this.qualityScores=s,U(this,o)}),this.g.attachEmptyPacketListener("quality_scores",s=>{this.categoryMask=void 0,U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Oe.prototype.getLabels=Oe.prototype.Ba,Oe.prototype.segmentForVideo=Oe.prototype.Ia,Oe.prototype.segment=Oe.prototype.segment,Oe.prototype.setOptions=Oe.prototype.o,Oe.createFromModelPath=function(t,e){return ct(Oe,t,{baseOptions:{modelAssetPath:e}})},Oe.createFromModelBuffer=function(t,e){return ct(Oe,t,{baseOptions:{modelAssetBuffer:e}})},Oe.createFromOptions=function(t,e){return ct(Oe,t,e)};var f1=class{constructor(t,e,i){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=i}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(i=>{i.close()}),(e=this.categoryMask)==null||e.close()}};f1.prototype.close=f1.prototype.close;var n6=class extends H{constructor(t){super(t)}},ns=[0,Wt,-2],Aa=[0,an,-3,Ot,an,-1],$d=[0,Aa],Nd=[0,Aa,Wt,-1],p1=class extends H{constructor(t){super(t)}},Hd=[0,an,-1,Ot],r6=class extends H{constructor(t){super(t)}},Vd=class extends H{constructor(t){super(t)}},g1=[1,2,3,4,5,6,7,8,9,10,14,15],Gd=class extends H{constructor(t){super(t)}};Gd.prototype.g=ua([0,re,[0,g1,Ct,Aa,Ct,[0,Aa,ns],Ct,$d,Ct,[0,$d,ns],Ct,Hd,Ct,[0,an,-3,Ot,qe],Ct,[0,an,-3,Ot],Ct,[0,yt,an,-2,Ot,Wt,Ot,-1,2,an,ns],Ct,Nd,Ct,[0,Nd,ns],an,ns,yt,Ct,[0,an,-3,Ot,ns,-1],Ct,[0,re,Hd]],yt,[0,yt,Wt,-1,Ot]]);var Gi=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new jl,this.s=new j0,Z(this.h,0,3,this.s),Z(t=this.h,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i;return"outputCategoryMask"in t&&(this.outputCategoryMask=(e=t.outputCategoryMask)!=null?e:!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=(i=t.outputConfidenceMasks)!=null?i:!0),super.l(t)}segment(t,e,i,s){const o=typeof i!="function"?i:{};this.j=typeof i=="function"?i:s,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,i=this.B+1,s=new Gd;const c=new Vd;var l=new n6;if(Ui(l,1,255),Z(c,0,12,l),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var u=new p1;Vs(u,3,!0),G(u,1,e.keypoint.x),G(u,2,e.keypoint.y),Hs(c,5,g1,u)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(u of(l=new r6,e.scribble))Vs(e=new p1,3,!0),G(e,1,u.x),G(e,2,u.y),Xo(l,1,p1,e);Hs(c,15,g1,l)}Xo(s,1,Vd,c),this.g.addProtoToStream(s.g(),"drishti.RenderData","roi_in",i),di(this,t,o);t:{try{const f=new f1(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var h=f;break t}this.j(f)}finally{_a(this)}h=void 0}return h}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"roi_in"),Ft(t,"norm_rect_in");const e=new je;ki(e,Y0,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"ROI:roi_in"),Tt(i,"NORM_RECT:norm_rect_in"),i.o(e),Ke(t,i),va(this,t),this.outputConfidenceMasks&&(mt(t,"confidence_masks"),dt(i,"CONFIDENCE_MASKS:confidence_masks"),Jr(this,"confidence_masks"),this.g.ba("confidence_masks",(s,o)=>{this.confidenceMasks=s.map(c=>is(this,c,!0,!this.j)),U(this,o)}),this.g.attachEmptyPacketListener("confidence_masks",s=>{this.confidenceMasks=[],U(this,s)})),this.outputCategoryMask&&(mt(t,"category_mask"),dt(i,"CATEGORY_MASK:category_mask"),Jr(this,"category_mask"),this.g.V("category_mask",(s,o)=>{this.categoryMask=is(this,s,!1,!this.j),U(this,o)}),this.g.attachEmptyPacketListener("category_mask",s=>{this.categoryMask=void 0,U(this,s)})),mt(t,"quality_scores"),dt(i,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(s,o)=>{this.qualityScores=s,U(this,o)}),this.g.attachEmptyPacketListener("quality_scores",s=>{this.categoryMask=void 0,U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Gi.prototype.segment=Gi.prototype.segment,Gi.prototype.setOptions=Gi.prototype.o,Gi.createFromModelPath=function(t,e){return ct(Gi,t,{baseOptions:{modelAssetPath:e}})},Gi.createFromModelBuffer=function(t,e){return ct(Gi,t,{baseOptions:{modelAssetBuffer:e}})},Gi.createFromOptions=function(t,e){return ct(Gi,t,e)};var gi=class extends De{constructor(t,e){super(new hi(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},Z(t=this.h=new J0,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){return t.displayNamesLocale!==void 0?Mt(this.h,2,Ur(t.displayNamesLocale)):"displayNamesLocale"in t&&Mt(this.h,2),t.maxResults!==void 0?Ui(this.h,3,t.maxResults):"maxResults"in t&&Mt(this.h,3),t.scoreThreshold!==void 0?G(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Mt(this.h,4),t.categoryAllowlist!==void 0?Ko(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Mt(this.h,5),t.categoryDenylist!==void 0?Ko(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Mt(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},di(this,t,e),this.j}F(t,e,i){return this.j={detections:[]},Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"input_frame_gpu"),Ft(t,"norm_rect"),mt(t,"detections");const e=new je;ki(e,jp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.ObjectDetectorGraph"),Tt(i,"IMAGE:input_frame_gpu"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"DETECTIONS:detections"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("detections",(s,o)=>{for(const c of s)s=x0(c),this.j.detections.push(td(s));U(this,o)}),this.g.attachEmptyPacketListener("detections",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};gi.prototype.detectForVideo=gi.prototype.F,gi.prototype.detect=gi.prototype.D,gi.prototype.setOptions=gi.prototype.o,gi.createFromModelPath=function(t,e){return q(this,null,function*(){return ct(gi,t,{baseOptions:{modelAssetPath:e}})})},gi.createFromModelBuffer=function(t,e){return ct(gi,t,{baseOptions:{modelAssetBuffer:e}})},gi.createFromOptions=function(t,e){return ct(gi,t,e)};var m1=class{constructor(t,e,i){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=i}close(){var t;(t=this.segmentationMasks)==null||t.forEach(e=>{e.close()})}};function zd(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Wd(t){try{const e=new m1(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{_a(t)}}m1.prototype.close=m1.prototype.close;var ti=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,Z(t=this.h=new Q0,0,1,e=new Pt),this.v=new z0,Z(this.h,0,3,this.v),this.j=new G0,Z(this.h,0,2,this.j),Ui(this.j,4,1),G(this.j,2,.5),G(this.v,2,.5),G(this.h,4,.5)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i,s,o,c;return"numPoses"in t&&Ui(this.j,4,(e=t.numPoses)!=null?e:1),"minPoseDetectionConfidence"in t&&G(this.j,2,(i=t.minPoseDetectionConfidence)!=null?i:.5),"minTrackingConfidence"in t&&G(this.h,4,(s=t.minTrackingConfidence)!=null?s:.5),"minPosePresenceConfidence"in t&&G(this.v,2,(o=t.minPosePresenceConfidence)!=null?o:.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=(c=t.outputSegmentationMasks)!=null?c:!1),this.l(t)}D(t,e,i){const s=typeof e!="function"?e:{};return this.s=typeof e=="function"?e:i,zd(this),di(this,t,s),Wd(this)}F(t,e,i,s){const o=typeof i!="function"?i:{};return this.s=typeof i=="function"?i:s,zd(this),Hi(this,t,o,e),Wd(this)}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"normalized_landmarks"),mt(t,"world_landmarks"),mt(t,"segmentation_masks");const e=new je;ki(e,Xp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"NORM_LANDMARKS:normalized_landmarks"),dt(i,"WORLD_LANDMARKS:world_landmarks"),i.o(e),Ke(t,i),va(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(s,o)=>{this.landmarks=[];for(const c of s)s=Zs(c),this.landmarks.push(ga(s));U(this,o)}),this.g.attachEmptyPacketListener("normalized_landmarks",s=>{this.landmarks=[],U(this,s)}),this.g.attachProtoVectorListener("world_landmarks",(s,o)=>{this.worldLandmarks=[];for(const c of s)s=Kr(c),this.worldLandmarks.push(qs(s));U(this,o)}),this.g.attachEmptyPacketListener("world_landmarks",s=>{this.worldLandmarks=[],U(this,s)}),this.outputSegmentationMasks&&(dt(i,"SEGMENTATION_MASK:segmentation_masks"),Jr(this,"segmentation_masks"),this.g.ba("segmentation_masks",(s,o)=>{this.segmentationMasks=s.map(c=>is(this,c,!0,!this.s)),U(this,o)}),this.g.attachEmptyPacketListener("segmentation_masks",s=>{this.segmentationMasks=[],U(this,s)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ti.prototype.detectForVideo=ti.prototype.F,ti.prototype.detect=ti.prototype.D,ti.prototype.setOptions=ti.prototype.o,ti.createFromModelPath=function(t,e){return ct(ti,t,{baseOptions:{modelAssetPath:e}})},ti.createFromModelBuffer=function(t,e){return ct(ti,t,{baseOptions:{modelAssetBuffer:e}})},ti.createFromOptions=function(t,e){return ct(ti,t,e)},ti.POSE_CONNECTIONS=Rd;const s6=t=>{if(!t||t.length===0)return 0;const e=t[0];if(!e||e.length===0)return 0;let i=1,s=0,o=1,c=0;e.forEach(f=>{f&&typeof f.x=="number"&&typeof f.y=="number"&&(i=Math.min(i,f.x),s=Math.max(s,f.x),o=Math.min(o,f.y),c=Math.max(c,f.y))});const l=s-i,u=c-o;return Math.max(l,u)},o6=(t,e)=>{if(!t||t.length===0)return!1;const i=t[0];let s=1,o=0,c=1,l=0;i.forEach(ne=>{s=Math.min(s,ne.x),o=Math.max(o,ne.x),c=Math.min(c,ne.y),l=Math.max(l,ne.y)});const u=.5,h=.6,f=e>1;let _,m;f?(_=.4,m=.3):(_=.35,m=.5);const b=(s+o)/2,E=(c+l)/2,A=.2,k=_*(1+A),F=m*(1+A),D=((ne,Ii)=>{const Ae=(ne-u)/k,he=(Ii-h)/F;return Ae*Ae+he*he<=1})(b,E),R=.2,$=.1,X=_*(1+R),N=m*(1+$),vt=(ne,Ii)=>{const Ae=(ne-u)/X,he=(Ii-h)/N;return Ae*Ae+he*he<=1},J=vt(s,c),pt=vt(o,c),kt=vt(s,l),Zt=vt(o,l);return D&&J&&pt&&kt&&Zt},a6=t=>{if(!t||t.length===0)return 0;const e=t[0];if(!e||e.length===0)return 0;const i=e[13],s=e[14];if(!i||!s)return 0;const o=Math.abs(s.y-i.y),c=Math.min(...e.map(h=>h.y)),u=Math.max(...e.map(h=>h.y))-c;return u>0?o/u:0},c6=t=>{const e=document.createElement("canvas"),i=e.getContext("2d");if(!i)return null;const s=t.videoWidth,o=t.videoHeight,c=Math.min(s,o),l=(s-c)/2,u=(o-c)/2;return e.width=c,e.height=c,i.drawImage(t,l,u,c,c,0,0,c,c),e},Zd=(t,e,i,s)=>{const o=t.getContext("2d");if(!o)return;const c=t.width,l=t.height;o.clearRect(0,0,c,l);const u=new xe(o);e.forEach(h=>{if(!h||h.length===0)return;const f="rgba(162, 155, 254,0.4)",_=2;o.strokeStyle="rgba(255, 255, 255, 0.6)",o.lineWidth=_,o.lineCap="round",o.lineJoin="round",u.drawLandmarks(h,{color:"rgba(9, 132, 227,0.7)",lineWidth:.5,radius:.5}),u.drawConnectors(h,Bt.FACE_LANDMARKS_FACE_OVAL,{color:f,lineWidth:_}),i>0&&i>=s&&u.drawConnectors(h,Bt.FACE_LANDMARKS_LIPS,{color:f,lineWidth:_})})},qd=t=>{const e=t.getContext("2d");e&&e.clearRect(0,0,t.width,t.height)},l6=(t,e=!1)=>{const i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;const o=t.videoHeight>t.videoWidth;e?o?(i.width=480,i.height=Math.max(640,i.width*t.videoHeight/t.videoWidth)):(i.width=640,i.height=Math.max(480,i.width*t.videoHeight/t.videoWidth)):o?(i.width=240,i.height=Math.max(320,i.width*t.videoHeight/t.videoWidth)):(i.width=320,i.height=Math.max(240,i.width*t.videoHeight/t.videoWidth));const c=1,l=t.videoWidth*c,u=t.videoHeight*c,h=(l-t.videoWidth)/2,f=(u-t.videoHeight)/2;return s.drawImage(t,-h,-f-0,l,u,0,0,i.width,i.height),i.toDataURL("image/jpeg")},jd={LIVENESS_IMAGE_BASE64:6,SELFIE_IMAGE_BASE64:2},Xd={"multiple-faces":"Ensure only one face is visible","no-face":"Position your face in the oval","out-of-bounds":"Position your face in the oval","too-close":"Move farther away","too-far":"Move closer","neutral-expression":"Neutral expression","smile-required":"Smile!","open-mouth-smile":"Wider smile - teeth visible",initializing:"Initializing..."},u6=()=>{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return!1;const i=e.getExtension("OES_texture_half_float"),s=e.getExtension("OES_texture_half_float_linear"),o=e.getExtension("EXT_color_buffer_half_float");return!!(i&&o&&s)},Kd=()=>q(null,null,function*(){window.__smileIdentityMediapipe||(window.__smileIdentityMediapipe={instance:null,loading:null,loaded:!1});const t=window.__smileIdentityMediapipe;return t.loaded&&t.instance?t.instance:(t.loading||(t.loading=q(null,null,function*(){try{const e=yield lr.forVisionTasks("https://web-models.smileidentity.com/mediapipe-tasks-vision-wasm"),i=yield Bt.createFromOptions(e,{baseOptions:{modelAssetPath:"https://web-models.smileidentity.com/face_landmarker/face_landmarker.task",delegate:u6()?"GPU":"CPU"},outputFaceBlendshapes:!0,runningMode:"VIDEO",numFaces:2});return t.instance=i,t.loaded=!0,t.loading=null,i}catch(e){throw t.loading=null,e}})),t.loading)}),Qs=xs.version,h6=({videoRef:t,canvasRef:e,interval:i,duration:s,smileThreshold:o,mouthOpenThreshold:c,minFaceSize:l,maxFaceSize:u,smileCooldown:h,getFacingMode:f})=>{const _=pe(null),m=pe(null),b=pe(null),E=pe(null),A=Gt(!1),k=Gt(!1),F=Gt("good"),M=Gt(!1),D=Gt(16/9),R=Gt([]),$=Gt(0),X=Gt(0),N=Gt(0),vt=Gt(0),J=Gt(""),pt=Gt(!0),kt=Gt(!1),Zt=Gt(!1),ne=Gt(0),Ii=Gt([]),Ae=Gt(null),he=Gt(1),Se=Gt(0),ur=Gt(!1),ei=Dc(()=>Math.floor(he.value*.4)),ka=Dc(()=>Math.floor(he.value*.2)),rs=Dc(()=>A.value&&k.value&&F.value==="good"&&!M.value),Pe=lt=>{lt&&Xd[lt]?J.value=Xd[lt]:J.value=""},ke=pe(N2.throttle(lt=>{Pe(lt)},300)).current,b1=()=>q(null,null,function*(){var lt,xt;try{((lt=window.__smileIdentityMediapipe)==null?void 0:lt.loaded)&&((xt=window.__smileIdentityMediapipe)==null?void 0:xt.instance)||(pt.value=!0,Pe("initializing")),_.current=yield Kd(),pt.value=!1}catch(me){console.error("Failed to initialize MediaPipe:",me),pt.value=!1}}),y1=()=>{if(t.current&&e.current){const{videoWidth:lt,videoHeight:xt}=t.current;D.value=lt/xt,e.current.width=lt,e.current.height=xt,t.current.parentElement&&(e.current.style.left="50%",e.current.style.top="50%")}},Un=()=>{const lt=Se.value<ka.value,xt=Se.value>=ei.value;lt?J.value="Capturing...":xt?Date.now()-vt.value>h?$.value>=o&&N.value<c?ke("open-mouth-smile"):ke("smile-required"):J.value="Keep smiling!":ke(null)},ss=()=>{pt.value?Pe("initializing"):M.value?ke("multiple-faces"):A.value?F.value==="too-close"?ke("too-close"):F.value==="too-far"?ke("too-far"):k.value?kt.value?Un():J.value="Ready to capture":ke("out-of-bounds"):ke("no-face")},to=()=>{m.current&&(cancelAnimationFrame(m.current),m.current=null)},hn=()=>q(null,null,function*(){var lt,xt;if(!_.current||!t.current){to();return}if(t.current.videoWidth<=0||t.current.videoHeight<=0||t.current.readyState<2){m.current=requestAnimationFrame(hn);return}try{pt.value&&(pt.value=!1);const me=c6(t.current),$n=me||t.current,Le=_.current.detectForVideo($n,performance.now());if(R.value=Le.faceLandmarks||[],Le.faceLandmarks&&e.current&&t.current)if(me){const $e=t.current.videoWidth,Ne=t.current.videoHeight,qi=Math.min($e,Ne),dr=($e-qi)/(2*$e),Hn=(Ne-qi)/(2*Ne),Vn=qi/$e,ji=qi/Ne,io=Le.faceLandmarks.map(no=>no.map(fr=>({x:fr.x*Vn+dr,y:fr.y*ji+Hn,z:fr.z})));Zd(e.current,io,Se.value,ei.value)}else Zd(e.current,Le.faceLandmarks,Se.value,ei.value);else e.current&&qd(e.current);const Nn=Le.faceLandmarks?Le.faceLandmarks.length:0;M.value=Nn>1;const La=Le.faceBlendshapes&&Le.faceBlendshapes.length>0&&Nn===1;if(A.value=La,La&&Le.faceLandmarks){const $e=s6(Le.faceLandmarks);X.value=$e,$e>u?F.value="too-close":$e<l?F.value="too-far":F.value="good",k.value=o6(Le.faceLandmarks,D.value);const Ne=Le.faceBlendshapes[0].categories,qi=((lt=Ne.find(ji=>ji.categoryName==="mouthSmileLeft"))==null?void 0:lt.score)||0,dr=((xt=Ne.find(ji=>ji.categoryName==="mouthSmileRight"))==null?void 0:xt.score)||0,Hn=a6(Le.faceLandmarks),Vn=(qi+dr)/2;$.value=Vn,N.value=Hn,Vn>=o&&Hn>=c&&(vt.value=Date.now(),Zt.value&&kt.value&&E.current&&setTimeout(()=>{Date.now()-vt.value<=100&&Zt.value&&kt.value&&E.current&&E.current()},0))}else $.value=0,X.value=0,N.value=0,k.value=!1,F.value="good";ss()}catch(me){A.value=!1,k.value=!1,M.value=!1,F.value="good",N.value=0,kt.value&&ke("no-face")}m.current=requestAnimationFrame(hn)}),hr=()=>{m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(hn)},C1=()=>{if(!t.current)return;const lt=Se.value===he.value-1,xt=l6(t.current,lt);xt&&(lt?Ae.value=xt:Ii.value=[...Ii.value,xt],Se.value++,ne.value=he.value-Se.value)},dn=()=>{if(b.current&&(clearInterval(b.current),b.current=null),kt.value=!1,Zt.value=!1,Se.value>=he.value&&Ae.value){const lt=Ii.value.map($n=>({image:$n.split(",")[1],image_type_id:jd.LIVENESS_IMAGE_BASE64})),xt={image:Ae.value.split(",")[1],image_type_id:jd.SELFIE_IMAGE_BASE64},me={images:[...lt,xt],referenceImage:Ae.value,previewImage:Ae.value,facingMode:f(),meta:{libraryVersion:Qs}};window.dispatchEvent(new CustomEvent("selfie-capture.publish",{detail:me})),ur.value=!0}},Wi=()=>{b.current&&(clearInterval(b.current),b.current=null),Zt.value=!0,!M.value&&A.value&&k.value&&F.value==="good"&&ke("smile-required")},eo=()=>{b.current&&clearInterval(b.current),b.current=setInterval(()=>{if(Se.value>=he.value){dn();return}if(M.value){Wi();return}if(!A.value)return;if(!k.value){Wi();return}if(F.value!=="good"){Wi();return}if(Se.value>=ei.value&&Date.now()-vt.value>h){Wi();return}C1()},i)},Ue=()=>{if(A.value&&F.value==="good"&&k.value&&!M.value){if(Se.value>=ei.value&&Date.now()-vt.value>h)return;Zt.value=!1,ke(null),eo()}};return E.current=Ue,{faceDetected:A,faceInBounds:k,faceProximity:F,multipleFaces:M,videoAspectRatio:D,faceLandmarks:R,currentSmileScore:$,currentFaceSize:X,currentMouthOpen:N,lastSmileTime:vt,alertTitle:J,isInitializing:pt,isReadyToCapture:rs,isCapturing:kt,isPaused:Zt,countdown:ne,capturedImages:Ii,referencePhoto:Ae,totalCaptures:he,capturesTaken:Se,hasFinishedCapture:ur,smileCheckpoint:ei,neutralZone:ka,initializeFaceLandmarker:b1,setupCanvas:y1,startDetectionLoop:hr,stopDetectionLoop:to,updateAlert:ke,startCapture:()=>q(null,null,function*(){Ii.value=[],kt.value=!0,Zt.value=!1,he.value=Math.ceil(s/i),Se.value=0,ne.value=he.value;const lt=document.querySelector("smart-camera-web");lt==null||lt.dispatchEvent(new CustomEvent("metadata.selfie-capture-start")),lt==null||lt.dispatchEvent(new CustomEvent("metadata.selfie-origin",{detail:{imageOrigin:{environment:"back_camera",user:"front_camera"}[f()]}})),eo()}),stopCapture:dn,pauseCapture:Wi,resumeCapture:Ue,handleCancel:()=>{dn(),window.dispatchEvent(new CustomEvent("selfie-capture.cancelled",{detail:{meta:{libraryVersion:Qs}}})),window.dispatchEvent(new CustomEvent("selfie-capture-screens.cancelled",{detail:{meta:{libraryVersion:Qs}}}))},handleClose:()=>{dn(),window.dispatchEvent(new CustomEvent("selfie-capture.close",{detail:{meta:{libraryVersion:Qs}}})),window.dispatchEvent(new CustomEvent("selfie-capture-screens.close",{detail:{meta:{libraryVersion:Qs}}}))},cleanup:()=>{b.current&&clearInterval(b.current),to(),ke.cancel()},resetFaceDetectionState:()=>{A.value=!1,k.value=!1,F.value="good",M.value=!1,R.value=[],$.value=0,X.value=0,N.value=0,vt.value=0,e.current&&qd(e.current)}}},d6=({progress:t,duration:e=1e3,themeColor:i="#001096"})=>{const s=pe(null),o=pe(t);return Si(()=>{const c=s.current;if(!c)return;const l=c.getTotalLength();c.style.opacity=t>0?"1":"0";const u=l*(1-o.current),h=l*(1-t);u!==h&&(c.style.transition="none",c.style.strokeDasharray=`${l} ${l}`,c.style.strokeDashoffset=`${u}`,c.getBoundingClientRect(),c.style.transition=`stroke-dashoffset ${e}ms ease-out`,c.style.strokeDashoffset=`${h}`,o.current=t)},[t,e]),st("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none"},children:st("svg",{viewBox:"0 0 285 380",preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"100%"},children:[st("clipPath",{id:"selfie-clip-path",clipPathUnits:"objectBoundingBox",children:st("path",{d:"M0.085 0.382 C0.087 0.357 0.092 0.294 0.131 0.236 C0.200 0.133 0.340 0.063 0.501 0.063 C0.730 0.063 0.915 0.205 0.915 0.382 C0.915 0.424 0.899 0.513 0.891 0.549 C0.882 0.588 0.871 0.626 0.857 0.664 C0.792 0.825 0.639 0.937 0.501 0.937 C0.314 0.937 0.182 0.755 0.144 0.666 C0.126 0.624 0.110 0.557 0.107 0.547 C0.092 0.485 0.081 0.439 0.085 0.382 Z"})}),st("path",{d:"M142.693 24C208.319 24 261 77.97 261 145.008C261 160.97 256.319 194.788 254.129 208.356C251.64 223.188 248.348 237.875 244.27 252.35C225.747 313.203 182.328 356 142.693 356C89.414 356 51.871 286.667 41.016 252.948C35.937 236.987 31.356 211.748 30.559 207.857C26.277 184.114 22.991 166.556 24.285 145.008C24.883 135.631 26.277 111.789 37.431 89.742C57.049 50.636 96.983 24 142.693 24Z",stroke:i,fill:"none",style:{strokeWidth:"8"}}),st("path",{ref:s,d:"M142.693 24C208.319 24 261 77.97 261 145.008C261 160.97 256.319 194.788 254.129 208.356C251.64 223.188 248.348 237.875 244.27 252.35C225.747 313.203 182.328 356 142.693 356C89.414 356 51.871 286.667 41.016 252.948C35.937 236.987 31.356 211.748 30.559 207.857C26.277 184.114 22.991 166.556 24.285 145.008C24.883 135.631 26.277 111.789 37.431 89.742C57.049 50.636 96.983 24 142.693 24Z",stroke:"#22c55e",style:{strokeWidth:"8"},fill:"none",strokeLinecap:"round"})]})})},f6=({videoRef:t,canvasRef:e,facingMode:i,multipleFaces:s,progress:o,interval:c,themeColor:l})=>st(xn,{children:[st("div",{className:"camera-preview-container",children:[st("div",{className:"video-wrapper",style:{clipPath:s?"none":"url(#selfie-clip-path)"},children:st("div",{className:"video-container",children:[st("video",{ref:t,autoPlay:!0,playsInline:!0,muted:!0,className:`camera-video ${i==="user"?"mirror":""}`}),st("canvas",{ref:e,className:`camera-canvas ${i==="user"?"mirror":""}`})]})}),!s&&st(d6,{progress:o,duration:c,themeColor:l})]}),st("style",{children:`
3207
+ `}C(){const t=this.g;t.activeTexture(t.TEXTURE1),this.j=Pn(this,t),t.activeTexture(t.TEXTURE2),this.B=Pn(this,t)}m(){super.m();const t=this.g;this.K=Ce(t.getUniformLocation(this.h,"defaultTexture"),"Uniform location"),this.L=Ce(t.getUniformLocation(this.h,"overlayTexture"),"Uniform location"),this.H=Ce(t.getUniformLocation(this.h,"maskTexture"),"Uniform location")}l(){super.l();const t=this.g;t.uniform1i(this.H,0),t.uniform1i(this.K,1),t.uniform1i(this.L,2)}close(){this.j&&this.g.deleteTexture(this.j),this.B&&this.g.deleteTexture(this.B),super.close()}};function cn(t,e){switch(e){case 0:return t.g.find(i=>i instanceof Uint8Array);case 1:return t.g.find(i=>i instanceof Float32Array);case 2:return t.g.find(i=>typeof WebGLTexture!="undefined"&&i instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function e1(t){var e=cn(t,1);if(!e){if(e=cn(t,0))e=new Float32Array(e).map(s=>s/255);else{e=new Float32Array(t.width*t.height);const s=ts(t);var i=i1(t);if(wa(i,s,dd(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){i=new Float32Array(t.width*t.height*4),s.readPixels(0,0,t.width,t.height,s.RGBA,s.FLOAT,i);for(let o=0,c=0;o<e.length;++o,c+=4)e[o]=i[c]}else s.readPixels(0,0,t.width,t.height,s.RED,s.FLOAT,e)}t.g.push(e)}return e}function dd(t){let e=cn(t,2);if(!e){const i=ts(t);e=pd(t);const s=e1(t),o=fd(t);i.texImage2D(i.TEXTURE_2D,0,o,t.width,t.height,0,i.RED,i.FLOAT,s),n1(t)}return e}function ts(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ce(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function fd(t){if(t=ts(t),!ba)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))ba=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ba=t.R16F}return ba}function i1(t){return t.l||(t.l=new Qr),t.l}function pd(t){const e=ts(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let i=cn(t,2);return i||(i=Pn(i1(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(i),t.j=!0),e.bindTexture(e.TEXTURE_2D,i),i}function n1(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var ba,se=class{constructor(t,e,i,s,o,c,l){this.g=t,this.m=e,this.j=i,this.canvas=s,this.l=o,this.width=c,this.height=l,this.j&&--gd===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Da(){return!!cn(this,0)}ja(){return!!cn(this,1)}R(){return!!cn(this,2)}ia(){return(e=cn(t=this,0))||(e=e1(t),e=new Uint8Array(e.map(i=>255*i)),t.g.push(e)),e;var t,e}ha(){return e1(this)}N(){return dd(this)}clone(){const t=[];for(const e of this.g){let i;if(e instanceof Uint8Array)i=new Uint8Array(e);else if(e instanceof Float32Array)i=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const s=ts(this),o=i1(this);s.activeTexture(s.TEXTURE1),i=Pn(o,s,this.m?s.LINEAR:s.NEAREST),s.bindTexture(s.TEXTURE_2D,i);const c=fd(this);s.texImage2D(s.TEXTURE_2D,0,c,this.width,this.height,0,s.RED,s.FLOAT,null),s.bindTexture(s.TEXTURE_2D,null),wa(o,s,i),Xs(o,s,!1,()=>{pd(this),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4),n1(this)}),t1(o),n1(this)}}t.push(i)}return new se(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&ts(this).deleteTexture(cn(this,2)),gd=-1}};se.prototype.close=se.prototype.close,se.prototype.clone=se.prototype.clone,se.prototype.getAsWebGLTexture=se.prototype.N,se.prototype.getAsFloat32Array=se.prototype.ha,se.prototype.getAsUint8Array=se.prototype.ia,se.prototype.hasWebGLTexture=se.prototype.R,se.prototype.hasFloat32Array=se.prototype.ja,se.prototype.hasUint8Array=se.prototype.Da;var gd=250;const e6={color:"white",lineWidth:4,radius:6};function r1(t){return Fe(ys(Fe({},e6),{fillColor:(t=t||{}).color}),t)}function ln(t,e){return t instanceof Function?t(e):t}function md(t,e,i){return Math.max(Math.min(e,i),Math.min(Math.max(e,i),t))}function Ks(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Ys(t){if(!t.j)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.j}function vd(t,e,i){var s;if(e.R())i(e.N());else{const o=e.ja()?e.ha():e.ia();t.m=(s=t.m)!=null?s:new Qr;const c=Ys(t);i((t=new se([o],e.m,!1,c.canvas,t.m,e.width,e.height)).N()),t.close()}}function _d(t,e,i,s){const o=function(u){return u.g||(u.g=new Qp),u.g}(t),c=Ys(t),l=Array.isArray(i)?new ImageData(new Uint8ClampedArray(i),1,1):i;Xs(o,c,!0,()=>{(function(h,f,_,m){const b=h.g;if(b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,f),b.activeTexture(b.TEXTURE1),b.bindTexture(b.TEXTURE_2D,h.B),b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,_),h.H&&function(E,A){if(E!==A)return!1;E=E.entries(),A=A.entries();for(const[F,M]of E){E=F;const D=M;var k=A.next();if(k.done)return!1;const[R,$]=k.value;if(k=$,E!==R||D[0]!==k[0]||D[1]!==k[1]||D[2]!==k[2]||D[3]!==k[3])return!1}return!!A.next().done}(h.H,m))b.activeTexture(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,h.j);else{h.H=m;const E=Array(1024).fill(0);m.forEach((A,k)=>{if(A.length!==4)throw Error(`Color at index ${k} is not a four-channel value.`);E[4*k]=A[0],E[4*k+1]=A[1],E[4*k+2]=A[2],E[4*k+3]=A[3]}),b.activeTexture(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,h.j),b.texImage2D(b.TEXTURE_2D,0,b.RGBA,256,1,0,b.RGBA,b.UNSIGNED_BYTE,new Uint8Array(E))}})(o,e,l,s),c.clearColor(0,0,0,0),c.clear(c.COLOR_BUFFER_BIT),c.drawArrays(c.TRIANGLE_FAN,0,4);const u=o.g;u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,null),u.activeTexture(u.TEXTURE1),u.bindTexture(u.TEXTURE_2D,null),u.activeTexture(u.TEXTURE2),u.bindTexture(u.TEXTURE_2D,null)})}function wd(t,e,i,s){const o=Ys(t),c=function(h){return h.h||(h.h=new t6),h.h}(t),l=Array.isArray(i)?new ImageData(new Uint8ClampedArray(i),1,1):i,u=Array.isArray(s)?new ImageData(new Uint8ClampedArray(s),1,1):s;Xs(c,o,!0,()=>{var h=c.g;h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e),h.activeTexture(h.TEXTURE1),h.bindTexture(h.TEXTURE_2D,c.j),h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,l),h.activeTexture(h.TEXTURE2),h.bindTexture(h.TEXTURE_2D,c.B),h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,u),o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.TRIANGLE_FAN,0,4),o.bindTexture(o.TEXTURE_2D,null),(h=c.g).activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,null),h.activeTexture(h.TEXTURE1),h.bindTexture(h.TEXTURE_2D,null),h.activeTexture(h.TEXTURE2),h.bindTexture(h.TEXTURE_2D,null)})}var xe=class{constructor(t,e){typeof CanvasRenderingContext2D!="undefined"&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.j=e):this.j=t}wa(t,e){if(t){var i=Ks(this);e=r1(e),i.save();var s=i.canvas,o=0;for(const c of t)i.fillStyle=ln(e.fillColor,{index:o,from:c}),i.strokeStyle=ln(e.color,{index:o,from:c}),i.lineWidth=ln(e.lineWidth,{index:o,from:c}),(t=new Path2D).arc(c.x*s.width,c.y*s.height,ln(e.radius,{index:o,from:c}),0,2*Math.PI),i.fill(t),i.stroke(t),++o;i.restore()}}va(t,e,i){if(t&&e){var s=Ks(this);i=r1(i),s.save();var o=s.canvas,c=0;for(const l of e){s.beginPath(),e=t[l.start];const u=t[l.end];e&&u&&(s.strokeStyle=ln(i.color,{index:c,from:e,to:u}),s.lineWidth=ln(i.lineWidth,{index:c,from:e,to:u}),s.moveTo(e.x*o.width,e.y*o.height),s.lineTo(u.x*o.width,u.y*o.height)),++c,s.stroke()}s.restore()}}sa(t,e){const i=Ks(this);e=r1(e),i.save(),i.beginPath(),i.lineWidth=ln(e.lineWidth,{}),i.strokeStyle=ln(e.color,{}),i.fillStyle=ln(e.fillColor,{}),i.moveTo(t.originX,t.originY),i.lineTo(t.originX+t.width,t.originY),i.lineTo(t.originX+t.width,t.originY+t.height),i.lineTo(t.originX,t.originY+t.height),i.lineTo(t.originX,t.originY),i.stroke(),i.fill(),i.restore()}ta(t,e,i=[0,0,0,255]){this.l?function(s,o,c,l){const u=Ys(s);vd(s,o,h=>{_d(s,h,c,l),(h=Ks(s)).drawImage(u.canvas,0,0,h.canvas.width,h.canvas.height)})}(this,t,i,e):_d(this,t.N(),i,e)}ua(t,e,i){this.l?function(s,o,c,l){const u=Ys(s);vd(s,o,h=>{wd(s,h,c,l),(h=Ks(s)).drawImage(u.canvas,0,0,h.canvas.width,h.canvas.height)})}(this,t,e,i):wd(this,t.N(),e,i)}close(){var t,e,i;(t=this.g)==null||t.close(),this.g=void 0,(e=this.h)==null||e.close(),this.h=void 0,(i=this.m)==null||i.close(),this.m=void 0}};function Ni(t,e){switch(e){case 0:return t.g.find(i=>i instanceof ImageData);case 1:return t.g.find(i=>typeof ImageBitmap!="undefined"&&i instanceof ImageBitmap);case 2:return t.g.find(i=>typeof WebGLTexture!="undefined"&&i instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function bd(t){var e=Ni(t,0);if(!e){e=es(t);const i=Ca(t),s=new Uint8Array(t.width*t.height*4);wa(i,e,ya(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,s),t1(i),e=new ImageData(new Uint8ClampedArray(s.buffer),t.width,t.height),t.g.push(e)}return e}function ya(t){let e=Ni(t,2);if(!e){const i=es(t);e=xa(t);const s=Ni(t,1)||bd(t);i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,s),Js(t)}return e}function es(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Ce(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Ca(t){return t.l||(t.l=new Qr),t.l}function xa(t){const e=es(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let i=Ni(t,2);return i||(i=Pn(Ca(t),e),t.g.push(i),t.m=!0),e.bindTexture(e.TEXTURE_2D,i),i}function Js(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function yd(t){const e=es(t);return Xs(Ca(t),e,!0,()=>function(i,s){const o=i.canvas;if(o.width===i.width&&o.height===i.height)return s();const c=o.width,l=o.height;return o.width=i.width,o.height=i.height,i=s(),o.width=c,o.height=l,i}(t,()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))}xe.prototype.close=xe.prototype.close,xe.prototype.drawConfidenceMask=xe.prototype.ua,xe.prototype.drawCategoryMask=xe.prototype.ta,xe.prototype.drawBoundingBox=xe.prototype.sa,xe.prototype.drawConnectors=xe.prototype.va,xe.prototype.drawLandmarks=xe.prototype.wa,xe.lerp=function(t,e,i,s,o){return md(s*(1-(t-e)/(i-e))+o*(1-(i-t)/(i-e)),s,o)},xe.clamp=md;var ce=class{constructor(t,e,i,s,o,c,l){this.g=t,this.j=e,this.m=i,this.canvas=s,this.l=o,this.width=c,this.height=l,(this.j||this.m)&&--Cd===0&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources.")}Ca(){return!!Ni(this,0)}ka(){return!!Ni(this,1)}R(){return!!Ni(this,2)}Aa(){return bd(this)}za(){var t=Ni(this,1);return t||(ya(this),xa(this),t=yd(this),Js(this),this.g.push(t),this.j=!0),t}N(){return ya(this)}clone(){const t=[];for(const e of this.g){let i;if(e instanceof ImageData)i=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const s=es(this),o=Ca(this);s.activeTexture(s.TEXTURE1),i=Pn(o,s),s.bindTexture(s.TEXTURE_2D,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,this.width,this.height,0,s.RGBA,s.UNSIGNED_BYTE,null),s.bindTexture(s.TEXTURE_2D,null),wa(o,s,i),Xs(o,s,!1,()=>{xa(this),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4),Js(this)}),t1(o),Js(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);ya(this),xa(this),i=yd(this),Js(this)}t.push(i)}return new ce(t,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Ni(this,1).close(),this.m&&es(this).deleteTexture(Ni(this,2)),Cd=-1}};ce.prototype.close=ce.prototype.close,ce.prototype.clone=ce.prototype.clone,ce.prototype.getAsWebGLTexture=ce.prototype.N,ce.prototype.getAsImageBitmap=ce.prototype.za,ce.prototype.getAsImageData=ce.prototype.Aa,ce.prototype.hasWebGLTexture=ce.prototype.R,ce.prototype.hasImageBitmap=ce.prototype.ka,ce.prototype.hasImageData=ce.prototype.Ca;var Cd=250;function Ti(...t){return t.map(([e,i])=>({start:e,end:i}))}const i6=function(t){return class extends t{Ha(){this.i._registerModelResourcesGraphService()}}}((xd=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",e!==void 0?this.i.canvas=e:rd()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}initializeGraph(t){return q(this,null,function*(){const e=yield(yield fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)})}setGraphFromString(t){this.setGraph(new TextEncoder().encode(t),!1)}setGraph(t,e){const i=t.length,s=this.i._malloc(i);this.i.HEAPU8.set(t,s),e?this.i._changeBinaryGraph(i,s):this.i._changeTextGraph(i,s),this.i._free(s)}configureAudio(t,e,i,s,o){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),W(this,s||"input_audio",c=>{W(this,o=o||"audio_header",l=>{this.i._configureAudio(c,l,t,e!=null?e:0,i)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){$i(this,"__graph_config__",e=>{t(e)}),W(this,"__graph_config__",e=>{this.i._getGraphConfig(e,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,i){this.addAudioToStreamWithShape(t,0,0,e,i)}addAudioToStreamWithShape(t,e,i,s,o){const c=4*t.length;this.h!==c&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(c),this.h=c),this.i.HEAPF32.set(t,this.g/4),W(this,s,l=>{this.i._addAudioToInputStream(this.g,e,i,l,o)})}addGpuBufferToStream(t,e,i){W(this,e,s=>{const[o,c]=ad(this,t,s);this.i._addBoundTextureToStream(s,o,c,i)})}addBoolToStream(t,e,i){W(this,e,s=>{this.i._addBoolToInputStream(t,s,i)})}addDoubleToStream(t,e,i){W(this,e,s=>{this.i._addDoubleToInputStream(t,s,i)})}addFloatToStream(t,e,i){W(this,e,s=>{this.i._addFloatToInputStream(t,s,i)})}addIntToStream(t,e,i){W(this,e,s=>{this.i._addIntToInputStream(t,s,i)})}addUintToStream(t,e,i){W(this,e,s=>{this.i._addUintToInputStream(t,s,i)})}addStringToStream(t,e,i){W(this,e,s=>{W(this,t,o=>{this.i._addStringToInputStream(o,s,i)})})}addStringRecordToStream(t,e,i){W(this,e,s=>{cd(this,Object.keys(t),o=>{cd(this,Object.values(t),c=>{this.i._addFlatHashMapToInputStream(o,c,Object.keys(t).length,s,i)})})})}addProtoToStream(t,e,i,s){W(this,i,o=>{W(this,e,c=>{const l=this.i._malloc(t.length);this.i.HEAPU8.set(t,l),this.i._addProtoToInputStream(l,t.length,c,o,s),this.i._free(l)})})}addEmptyPacketToStream(t,e){W(this,t,i=>{this.i._addEmptyPacketToInputStream(i,e)})}addBoolVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateBoolVector(t.length);if(!o)throw Error("Unable to allocate new bool vector on heap.");for(const c of t)this.i._addBoolVectorEntry(o,c);this.i._addBoolVectorToInputStream(o,s,i)})}addDoubleVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateDoubleVector(t.length);if(!o)throw Error("Unable to allocate new double vector on heap.");for(const c of t)this.i._addDoubleVectorEntry(o,c);this.i._addDoubleVectorToInputStream(o,s,i)})}addFloatVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateFloatVector(t.length);if(!o)throw Error("Unable to allocate new float vector on heap.");for(const c of t)this.i._addFloatVectorEntry(o,c);this.i._addFloatVectorToInputStream(o,s,i)})}addIntVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateIntVector(t.length);if(!o)throw Error("Unable to allocate new int vector on heap.");for(const c of t)this.i._addIntVectorEntry(o,c);this.i._addIntVectorToInputStream(o,s,i)})}addUintVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateUintVector(t.length);if(!o)throw Error("Unable to allocate new unsigned int vector on heap.");for(const c of t)this.i._addUintVectorEntry(o,c);this.i._addUintVectorToInputStream(o,s,i)})}addStringVectorToStream(t,e,i){W(this,e,s=>{const o=this.i._allocateStringVector(t.length);if(!o)throw Error("Unable to allocate new string vector on heap.");for(const c of t)W(this,c,l=>{this.i._addStringVectorEntry(o,l)});this.i._addStringVectorToInputStream(o,s,i)})}addBoolToInputSidePacket(t,e){W(this,e,i=>{this.i._addBoolToInputSidePacket(t,i)})}addDoubleToInputSidePacket(t,e){W(this,e,i=>{this.i._addDoubleToInputSidePacket(t,i)})}addFloatToInputSidePacket(t,e){W(this,e,i=>{this.i._addFloatToInputSidePacket(t,i)})}addIntToInputSidePacket(t,e){W(this,e,i=>{this.i._addIntToInputSidePacket(t,i)})}addUintToInputSidePacket(t,e){W(this,e,i=>{this.i._addUintToInputSidePacket(t,i)})}addStringToInputSidePacket(t,e){W(this,e,i=>{W(this,t,s=>{this.i._addStringToInputSidePacket(s,i)})})}addProtoToInputSidePacket(t,e,i){W(this,i,s=>{W(this,e,o=>{const c=this.i._malloc(t.length);this.i.HEAPU8.set(t,c),this.i._addProtoToInputSidePacket(c,t.length,o,s),this.i._free(c)})})}addBoolVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateBoolVector(t.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const o of t)this.i._addBoolVectorEntry(s,o);this.i._addBoolVectorToInputSidePacket(s,i)})}addDoubleVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateDoubleVector(t.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const o of t)this.i._addDoubleVectorEntry(s,o);this.i._addDoubleVectorToInputSidePacket(s,i)})}addFloatVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateFloatVector(t.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const o of t)this.i._addFloatVectorEntry(s,o);this.i._addFloatVectorToInputSidePacket(s,i)})}addIntVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateIntVector(t.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const o of t)this.i._addIntVectorEntry(s,o);this.i._addIntVectorToInputSidePacket(s,i)})}addUintVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateUintVector(t.length);if(!s)throw Error("Unable to allocate new unsigned int vector on heap.");for(const o of t)this.i._addUintVectorEntry(s,o);this.i._addUintVectorToInputSidePacket(s,i)})}addStringVectorToInputSidePacket(t,e){W(this,e,i=>{const s=this.i._allocateStringVector(t.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const o of t)W(this,o,c=>{this.i._addStringVectorEntry(s,c)});this.i._addStringVectorToInputSidePacket(s,i)})}attachBoolListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachBoolListener(i)})}attachBoolVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachBoolVectorListener(i)})}attachIntListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachIntListener(i)})}attachIntVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachIntVectorListener(i)})}attachUintListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachUintListener(i)})}attachUintVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachUintVectorListener(i)})}attachDoubleListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachDoubleListener(i)})}attachDoubleVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachDoubleVectorListener(i)})}attachFloatListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachFloatListener(i)})}attachFloatVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachFloatVectorListener(i)})}attachStringListener(t,e){$i(this,t,e),W(this,t,i=>{this.i._attachStringListener(i)})}attachStringVectorListener(t,e){On(this,t,e),W(this,t,i=>{this.i._attachStringVectorListener(i)})}attachProtoListener(t,e,i){$i(this,t,e),W(this,t,s=>{this.i._attachProtoListener(s,i||!1)})}attachProtoVectorListener(t,e,i){On(this,t,e),W(this,t,s=>{this.i._attachProtoVectorListener(s,i||!1)})}attachAudioListener(t,e,i){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),$i(this,t,(s,o)=>{s=new Float32Array(s.buffer,s.byteOffset,s.length/4),e(s,o)}),W(this,t,s=>{this.i._attachAudioListener(s,i||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends xd{get ea(){return this.i}oa(t,e,i){W(this,e,s=>{const[o,c]=ad(this,t,s);this.ea._addBoundTextureAsImageToStream(s,o,c,i)})}V(t,e){$i(this,t,e),W(this,t,i=>{this.ea._attachImageListener(i)})}ba(t,e){On(this,t,e),W(this,t,i=>{this.ea._attachImageVectorListener(i)})}}));var xd,hi=class extends i6{};function ct(t,e,i){return q(this,null,function*(){var s;return function(o,c,l,u){return q(this,null,function*(){return Yp(o,c,l,u)})}(t,(s=i.canvas)!=null?s:rd()?void 0:document.createElement("canvas"),e,i)})}function Ed(t,e,i,s){if(t.U){const c=new S0;if(i!=null&&i.regionOfInterest){if(!t.na)throw Error("This task doesn't support region-of-interest.");var o=i.regionOfInterest;if(o.left>=o.right||o.top>=o.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(o.left<0||o.top<0||o.right>1||o.bottom>1)throw Error("Expected RectF values to be in [0,1].");G(c,1,(o.left+o.right)/2),G(c,2,(o.top+o.bottom)/2),G(c,4,o.right-o.left),G(c,3,o.bottom-o.top)}else G(c,1,.5),G(c,2,.5),G(c,4,1),G(c,3,1);if(i!=null&&i.rotationDegrees){if((i==null?void 0:i.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(G(c,5,-Math.PI*i.rotationDegrees/180),(i==null?void 0:i.rotationDegrees)%180!=0){const[l,u]=od(e);i=Xt(c,3)*u/l,o=Xt(c,4)*l/u,G(c,4,i),G(c,3,o)}}t.g.addProtoToStream(c.g(),"mediapipe.NormalizedRect",t.U,s)}t.g.oa(e,t.Z,s!=null?s:performance.now()),t.finishProcessing()}function di(t,e,i){var s;if((s=t.baseOptions)!=null&&s.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Ed(t,e,i,t.B+1)}function Hi(t,e,i,s){var o;if(!((o=t.baseOptions)!=null&&o.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Ed(t,e,i,s)}function is(t,e,i,s){var o=e.data;const c=e.width,l=c*(e=e.height);if((o instanceof Uint8Array||o instanceof Float32Array)&&o.length!==l)throw Error("Unsupported channel count: "+o.length/l);return t=new se([o],i,!1,t.g.i.canvas,t.P,c,e),s?t.clone():t}var De=class extends Jl{constructor(t,e,i,s){super(t),this.g=t,this.Z=e,this.U=i,this.na=s,this.P=new Qr}l(t,e=!0){if("runningMode"in t&&Vs(this.baseOptions,2,!!t.runningMode&&t.runningMode!=="IMAGE"),t.canvas!==void 0&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.P.close(),super.close()}};De.prototype.close=De.prototype.close;var fi=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},Z(t=this.h=new pa,0,1,e=new Pt),G(this.h,2,.5),G(this.h,3,.3)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i;return"minDetectionConfidence"in t&&G(this.h,2,(e=t.minDetectionConfidence)!=null?e:.5),"minSuppressionThreshold"in t&&G(this.h,3,(i=t.minSuppressionThreshold)!=null?i:.3),this.l(t)}D(t,e){return this.j={detections:[]},di(this,t,e),this.j}F(t,e,i){return this.j={detections:[]},Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect_in"),mt(t,"detections");const e=new je;ki(e,Pp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect_in"),dt(i,"DETECTIONS:detections"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("detections",(s,o)=>{for(const c of s)s=x0(c),this.j.detections.push(td(s));U(this,o)}),this.g.attachEmptyPacketListener("detections",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};fi.prototype.detectForVideo=fi.prototype.F,fi.prototype.detect=fi.prototype.D,fi.prototype.setOptions=fi.prototype.o,fi.createFromModelPath=function(t,e){return q(this,null,function*(){return ct(fi,t,{baseOptions:{modelAssetPath:e}})})},fi.createFromModelBuffer=function(t,e){return ct(fi,t,{baseOptions:{modelAssetBuffer:e}})},fi.createFromOptions=function(t,e){return ct(fi,t,e)};var s1=Ti([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]),o1=Ti([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]),a1=Ti([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Ad=Ti([474,475],[475,476],[476,477],[477,474]),c1=Ti([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]),l1=Ti([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Sd=Ti([469,470],[470,471],[471,472],[472,469]),u1=Ti([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]),kd=[...s1,...o1,...a1,...c1,...l1,...u1],Ld=Ti([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 Md(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Bt=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,Z(t=this.h=new R0,0,1,e=new Pt),this.v=new B0,Z(this.h,0,3,this.v),this.s=new pa,Z(this.h,0,2,this.s),Ui(this.s,4,1),G(this.s,2,.5),G(this.v,2,.5),G(this.h,4,.5)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i,s,o;return"numFaces"in t&&Ui(this.s,4,(e=t.numFaces)!=null?e:1),"minFaceDetectionConfidence"in t&&G(this.s,2,(i=t.minFaceDetectionConfidence)!=null?i:.5),"minTrackingConfidence"in t&&G(this.h,4,(s=t.minTrackingConfidence)!=null?s:.5),"minFacePresenceConfidence"in t&&G(this.v,2,(o=t.minFacePresenceConfidence)!=null?o:.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return Md(this),di(this,t,e),this.j}F(t,e,i){return Md(this),Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"face_landmarks");const e=new je;ki(e,$p,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"NORM_LANDMARKS:face_landmarks"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("face_landmarks",(s,o)=>{for(const c of s)s=Zs(c),this.j.faceLandmarks.push(ga(s));U(this,o)}),this.g.attachEmptyPacketListener("face_landmarks",s=>{U(this,s)}),this.outputFaceBlendshapes&&(mt(t,"blendshapes"),dt(i,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(s,o)=>{var c;if(this.outputFaceBlendshapes)for(const l of s)s=ha(l),this.j.faceBlendshapes.push(Kl((c=s.g())!=null?c:[]));U(this,o)}),this.g.attachEmptyPacketListener("blendshapes",s=>{U(this,s)})),this.outputFacialTransformationMatrixes&&(mt(t,"face_geometry"),dt(i,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(s,o)=>{var c,l,u,h,f;if(this.outputFacialTransformationMatrixes)for(const _ of s)(s=gt(Up(_),Mp,2))&&this.j.facialTransformationMatrixes.push({rows:(l=(c=li(s,1))!=null?c:0)!=null?l:0,columns:(h=(u=li(s,2))!=null?u:0)!=null?h:0,data:(f=or(s,3,Mn,sr()).slice())!=null?f:[]});U(this,o)}),this.g.attachEmptyPacketListener("face_geometry",s=>{U(this,s)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Bt.prototype.detectForVideo=Bt.prototype.F,Bt.prototype.detect=Bt.prototype.D,Bt.prototype.setOptions=Bt.prototype.o,Bt.createFromModelPath=function(t,e){return ct(Bt,t,{baseOptions:{modelAssetPath:e}})},Bt.createFromModelBuffer=function(t,e){return ct(Bt,t,{baseOptions:{modelAssetBuffer:e}})},Bt.createFromOptions=function(t,e){return ct(Bt,t,e)},Bt.FACE_LANDMARKS_LIPS=s1,Bt.FACE_LANDMARKS_LEFT_EYE=o1,Bt.FACE_LANDMARKS_LEFT_EYEBROW=a1,Bt.FACE_LANDMARKS_LEFT_IRIS=Ad,Bt.FACE_LANDMARKS_RIGHT_EYE=c1,Bt.FACE_LANDMARKS_RIGHT_EYEBROW=l1,Bt.FACE_LANDMARKS_RIGHT_IRIS=Sd,Bt.FACE_LANDMARKS_FACE_OVAL=u1,Bt.FACE_LANDMARKS_CONTOURS=kd,Bt.FACE_LANDMARKS_TESSELATION=Ld;var Vi=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!0),Z(t=this.j=new O0,0,1,e=new Pt)}get baseOptions(){return gt(this.j,Pt,1)}set baseOptions(t){Z(this.j,0,1,t)}o(t){return super.l(t)}Ka(t,e,i){const s=typeof e!="function"?e:{};if(this.h=typeof e=="function"?e:i,di(this,t,s!=null?s:{}),!this.h)return this.s}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"stylized_image");const e=new je;ki(e,Np,this.j);const i=new ye;Xe(i,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"STYLIZED_IMAGE:stylized_image"),i.o(e),Ke(t,i),this.g.V("stylized_image",(s,o)=>{var c=!this.h,l=s.data,u=s.width;const h=u*(s=s.height);if(l instanceof Uint8Array)if(l.length===3*h){const f=new Uint8ClampedArray(4*h);for(let _=0;_<h;++_)f[4*_]=l[3*_],f[4*_+1]=l[3*_+1],f[4*_+2]=l[3*_+2],f[4*_+3]=255;l=new ImageData(f,u,s)}else{if(l.length!==4*h)throw Error("Unsupported channel count: "+l.length/h);l=new ImageData(new Uint8ClampedArray(l.buffer,l.byteOffset,l.length),u,s)}else if(!(l instanceof WebGLTexture))throw Error(`Unsupported format: ${l.constructor.name}`);u=new ce([l],!1,!1,this.g.i.canvas,this.P,u,s),this.s=c=c?u.clone():u,this.h&&this.h(c),U(this,o)}),this.g.attachEmptyPacketListener("stylized_image",s=>{this.s=null,this.h&&this.h(null),U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Vi.prototype.stylize=Vi.prototype.Ka,Vi.prototype.setOptions=Vi.prototype.o,Vi.createFromModelPath=function(t,e){return ct(Vi,t,{baseOptions:{modelAssetPath:e}})},Vi.createFromModelBuffer=function(t,e){return ct(Vi,t,{baseOptions:{modelAssetBuffer:e}})},Vi.createFromOptions=function(t,e){return ct(Vi,t,e)};var h1=Ti([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 Td(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Id(t){return t.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Fd(t,e=!0){var o,c,l,u,h,f;const i=[];for(const _ of t){var s=ha(_);t=[];for(const m of s.g())s=e&&li(m,1)!=null?(o=li(m,1))!=null?o:0:-1,t.push({score:(c=Xt(m,2))!=null?c:0,index:s,categoryName:(u=(l=ui(m,3))!=null?l:"")!=null?u:"",displayName:(f=(h=ui(m,4))!=null?h:"")!=null?f:""});i.push(t)}return i}var Ye=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Z(t=this.j=new $0,0,1,e=new Pt),this.s=new zl,Z(this.j,0,2,this.s),this.C=new Gl,Z(this.s,0,3,this.C),this.v=new U0,Z(this.s,0,2,this.v),this.h=new Hp,Z(this.j,0,3,this.h),G(this.v,2,.5),G(this.s,4,.5),G(this.C,2,.5)}get baseOptions(){return gt(this.j,Pt,1)}set baseOptions(t){Z(this.j,0,1,t)}o(t){var o,c,l,u,h,f,_,m;if(Ui(this.v,3,(o=t.numHands)!=null?o:1),"minHandDetectionConfidence"in t&&G(this.v,2,(c=t.minHandDetectionConfidence)!=null?c:.5),"minTrackingConfidence"in t&&G(this.s,4,(l=t.minTrackingConfidence)!=null?l:.5),"minHandPresenceConfidence"in t&&G(this.C,2,(u=t.minHandPresenceConfidence)!=null?u:.5),t.cannedGesturesClassifierOptions){var e=new Yr,i=e,s=Xl(t.cannedGesturesClassifierOptions,(h=gt(this.h,Yr,3))==null?void 0:h.h());Z(i,0,2,s),Z(this.h,0,3,e)}else t.cannedGesturesClassifierOptions===void 0&&((f=gt(this.h,Yr,3))==null||f.g());return t.customGesturesClassifierOptions?(Z(i=e=new Yr,0,2,s=Xl(t.customGesturesClassifierOptions,(_=gt(this.h,Yr,4))==null?void 0:_.h())),Z(this.h,0,4,e)):t.customGesturesClassifierOptions===void 0&&((m=gt(this.h,Yr,4))==null||m.g()),this.l(t)}Fa(t,e){return Td(this),di(this,t,e),Id(this)}Ga(t,e,i){return Td(this),Hi(this,t,i,e),Id(this)}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"hand_gestures"),mt(t,"hand_landmarks"),mt(t,"world_hand_landmarks"),mt(t,"handedness");const e=new je;ki(e,Vp,this.j);const i=new ye;Xe(i,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"HAND_GESTURES:hand_gestures"),dt(i,"LANDMARKS:hand_landmarks"),dt(i,"WORLD_LANDMARKS:world_hand_landmarks"),dt(i,"HANDEDNESS:handedness"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("hand_landmarks",(s,o)=>{var c,l,u,h;for(const f of s){s=Zs(f);const _=[];for(const m of rn(s,A0,1))_.push({x:(c=Xt(m,1))!=null?c:0,y:(l=Xt(m,2))!=null?l:0,z:(u=Xt(m,3))!=null?u:0,visibility:(h=Xt(m,4))!=null?h:0});this.landmarks.push(_)}U(this,o)}),this.g.attachEmptyPacketListener("hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("world_hand_landmarks",(s,o)=>{var c,l,u,h;for(const f of s){s=Kr(f);const _=[];for(const m of rn(s,E0,1))_.push({x:(c=Xt(m,1))!=null?c:0,y:(l=Xt(m,2))!=null?l:0,z:(u=Xt(m,3))!=null?u:0,visibility:(h=Xt(m,4))!=null?h:0});this.worldLandmarks.push(_)}U(this,o)}),this.g.attachEmptyPacketListener("world_hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("hand_gestures",(s,o)=>{this.gestures.push(...Fd(s,!1)),U(this,o)}),this.g.attachEmptyPacketListener("hand_gestures",s=>{U(this,s)}),this.g.attachProtoVectorListener("handedness",(s,o)=>{this.handedness.push(...Fd(s)),U(this,o)}),this.g.attachEmptyPacketListener("handedness",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Bd(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Ye.prototype.recognizeForVideo=Ye.prototype.Ga,Ye.prototype.recognize=Ye.prototype.Fa,Ye.prototype.setOptions=Ye.prototype.o,Ye.createFromModelPath=function(t,e){return ct(Ye,t,{baseOptions:{modelAssetPath:e}})},Ye.createFromModelBuffer=function(t,e){return ct(Ye,t,{baseOptions:{modelAssetBuffer:e}})},Ye.createFromOptions=function(t,e){return ct(Ye,t,e)},Ye.HAND_CONNECTIONS=h1;var Je=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Z(t=this.h=new zl,0,1,e=new Pt),this.s=new Gl,Z(this.h,0,3,this.s),this.j=new U0,Z(this.h,0,2,this.j),Ui(this.j,3,1),G(this.j,2,.5),G(this.s,2,.5),G(this.h,4,.5)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i,s,o;return"numHands"in t&&Ui(this.j,3,(e=t.numHands)!=null?e:1),"minHandDetectionConfidence"in t&&G(this.j,2,(i=t.minHandDetectionConfidence)!=null?i:.5),"minTrackingConfidence"in t&&G(this.h,4,(s=t.minTrackingConfidence)!=null?s:.5),"minHandPresenceConfidence"in t&&G(this.s,2,(o=t.minHandPresenceConfidence)!=null?o:.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],di(this,t,e),Bd(this)}F(t,e,i){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Hi(this,t,i,e),Bd(this)}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"hand_landmarks"),mt(t,"world_hand_landmarks"),mt(t,"handedness");const e=new je;ki(e,Gp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"LANDMARKS:hand_landmarks"),dt(i,"WORLD_LANDMARKS:world_hand_landmarks"),dt(i,"HANDEDNESS:handedness"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("hand_landmarks",(s,o)=>{for(const c of s)s=Zs(c),this.landmarks.push(ga(s));U(this,o)}),this.g.attachEmptyPacketListener("hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("world_hand_landmarks",(s,o)=>{for(const c of s)s=Kr(c),this.worldLandmarks.push(qs(s));U(this,o)}),this.g.attachEmptyPacketListener("world_hand_landmarks",s=>{U(this,s)}),this.g.attachProtoVectorListener("handedness",(s,o)=>{var h,f,_,m,b,E,A;var c=this.handedness,l=c.push;const u=[];for(const k of s){s=ha(k);const F=[];for(const M of s.g())F.push({score:(h=Xt(M,2))!=null?h:0,index:(_=(f=li(M,1))!=null?f:0)!=null?_:-1,categoryName:(b=(m=ui(M,3))!=null?m:"")!=null?b:"",displayName:(A=(E=ui(M,4))!=null?E:"")!=null?A:""});u.push(F)}l.call(c,...u),U(this,o)}),this.g.attachEmptyPacketListener("handedness",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Je.prototype.detectForVideo=Je.prototype.F,Je.prototype.detect=Je.prototype.D,Je.prototype.setOptions=Je.prototype.o,Je.createFromModelPath=function(t,e){return ct(Je,t,{baseOptions:{modelAssetPath:e}})},Je.createFromModelBuffer=function(t,e){return ct(Je,t,{baseOptions:{modelAssetBuffer:e}})},Je.createFromOptions=function(t,e){return ct(Je,t,e)},Je.HAND_CONNECTIONS=h1;var Rd=Ti([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 Dd(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Od(t){try{if(!t.C)return t.h;t.C(t.h)}finally{_a(t)}}function Ea(t,e){t=Zs(t),e.push(ga(t))}var Ut=class extends De{constructor(t,e){super(new hi(t,e),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,Z(t=this.j=new W0,0,1,e=new Pt),this.K=new Gl,Z(this.j,0,2,this.K),this.Y=new zp,Z(this.j,0,3,this.Y),this.s=new pa,Z(this.j,0,4,this.s),this.H=new B0,Z(this.j,0,5,this.H),this.v=new G0,Z(this.j,0,6,this.v),this.L=new z0,Z(this.j,0,7,this.L),G(this.s,2,.5),G(this.s,3,.3),G(this.H,2,.5),G(this.v,2,.5),G(this.v,3,.3),G(this.L,2,.5),G(this.K,2,.5)}get baseOptions(){return gt(this.j,Pt,1)}set baseOptions(t){Z(this.j,0,1,t)}o(t){var e,i,s,o,c,l,u;return"minFaceDetectionConfidence"in t&&G(this.s,2,(e=t.minFaceDetectionConfidence)!=null?e:.5),"minFaceSuppressionThreshold"in t&&G(this.s,3,(i=t.minFaceSuppressionThreshold)!=null?i:.3),"minFacePresenceConfidence"in t&&G(this.H,2,(s=t.minFacePresenceConfidence)!=null?s:.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&G(this.v,2,(o=t.minPoseDetectionConfidence)!=null?o:.5),"minPoseSuppressionThreshold"in t&&G(this.v,3,(c=t.minPoseSuppressionThreshold)!=null?c:.3),"minPosePresenceConfidence"in t&&G(this.L,2,(l=t.minPosePresenceConfidence)!=null?l:.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&G(this.K,2,(u=t.minHandLandmarksConfidence)!=null?u:.5),this.l(t)}D(t,e,i){const s=typeof e!="function"?e:{};return this.C=typeof e=="function"?e:i,Dd(this),di(this,t,s),Od(this)}F(t,e,i,s){const o=typeof i!="function"?i:{};return this.C=typeof i=="function"?i:s,Dd(this),Hi(this,t,o,e),Od(this)}m(){var t=new Re;Ft(t,"input_frames_image"),mt(t,"pose_landmarks"),mt(t,"pose_world_landmarks"),mt(t,"face_landmarks"),mt(t,"left_hand_landmarks"),mt(t,"left_hand_world_landmarks"),mt(t,"right_hand_landmarks"),mt(t,"right_hand_world_landmarks");const e=new je,i=new a0;hl(i,1,Ur("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(o,c){if(c!=null)if(Array.isArray(c))Mt(o,2,zo(c,al,void 0,void 0,!1));else{if(!(typeof c=="string"||c instanceof tn||ir(c)))throw Error("invalid value in Any.value field: "+c+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");hl(o,2,jc(c,!1),nr())}}(i,this.j.g());const s=new ye;Xe(s,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Xo(s,8,a0,i),Tt(s,"IMAGE:input_frames_image"),dt(s,"POSE_LANDMARKS:pose_landmarks"),dt(s,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),dt(s,"FACE_LANDMARKS:face_landmarks"),dt(s,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),dt(s,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),dt(s,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),dt(s,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),s.o(e),Ke(t,s),va(this,t),this.g.attachProtoListener("pose_landmarks",(o,c)=>{Ea(o,this.h.poseLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("pose_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("pose_world_landmarks",(o,c)=>{var l=this.h.poseWorldLandmarks;o=Kr(o),l.push(qs(o)),U(this,c)}),this.g.attachEmptyPacketListener("pose_world_landmarks",o=>{U(this,o)}),this.outputPoseSegmentationMasks&&(dt(s,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),Jr(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",(o,c)=>{this.h.poseSegmentationMasks=[is(this,o,!0,!this.C)],U(this,c)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",o=>{this.h.poseSegmentationMasks=[],U(this,o)})),this.g.attachProtoListener("face_landmarks",(o,c)=>{Ea(o,this.h.faceLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("face_landmarks",o=>{U(this,o)}),this.outputFaceBlendshapes&&(mt(t,"extra_blendshapes"),dt(s,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(o,c)=>{var u;var l=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(o=ha(o),l.push(Kl((u=o.g())!=null?u:[]))),U(this,c)}),this.g.attachEmptyPacketListener("extra_blendshapes",o=>{U(this,o)})),this.g.attachProtoListener("left_hand_landmarks",(o,c)=>{Ea(o,this.h.leftHandLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("left_hand_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("left_hand_world_landmarks",(o,c)=>{var l=this.h.leftHandWorldLandmarks;o=Kr(o),l.push(qs(o)),U(this,c)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("right_hand_landmarks",(o,c)=>{Ea(o,this.h.rightHandLandmarks),U(this,c)}),this.g.attachEmptyPacketListener("right_hand_landmarks",o=>{U(this,o)}),this.g.attachProtoListener("right_hand_world_landmarks",(o,c)=>{var l=this.h.rightHandWorldLandmarks;o=Kr(o),l.push(qs(o)),U(this,c)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",o=>{U(this,o)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ut.prototype.detectForVideo=Ut.prototype.F,Ut.prototype.detect=Ut.prototype.D,Ut.prototype.setOptions=Ut.prototype.o,Ut.createFromModelPath=function(t,e){return ct(Ut,t,{baseOptions:{modelAssetPath:e}})},Ut.createFromModelBuffer=function(t,e){return ct(Ut,t,{baseOptions:{modelAssetBuffer:e}})},Ut.createFromOptions=function(t,e){return ct(Ut,t,e)},Ut.HAND_CONNECTIONS=h1,Ut.POSE_CONNECTIONS=Rd,Ut.FACE_LANDMARKS_LIPS=s1,Ut.FACE_LANDMARKS_LEFT_EYE=o1,Ut.FACE_LANDMARKS_LEFT_EYEBROW=a1,Ut.FACE_LANDMARKS_LEFT_IRIS=Ad,Ut.FACE_LANDMARKS_RIGHT_EYE=c1,Ut.FACE_LANDMARKS_RIGHT_EYEBROW=l1,Ut.FACE_LANDMARKS_RIGHT_IRIS=Sd,Ut.FACE_LANDMARKS_FACE_OVAL=u1,Ut.FACE_LANDMARKS_CONTOURS=kd,Ut.FACE_LANDMARKS_TESSELATION=Ld;var pi=class extends De{constructor(t,e){super(new hi(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},Z(t=this.h=new Z0,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){return Z(this.h,0,2,Xl(t,gt(this.h,Nl,2))),this.l(t)}qa(t,e){return this.j={classifications:[]},di(this,t,e),this.j}ra(t,e,i){return this.j={classifications:[]},Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"input_image"),Ft(t,"norm_rect"),mt(t,"classifications");const e=new je;ki(e,Wp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Tt(i,"IMAGE:input_image"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"CLASSIFICATIONS:classifications"),i.o(e),Ke(t,i),this.g.attachProtoListener("classifications",(s,o)=>{this.j=function(c){var u;const l={classifications:rn(c,Ip,1).map(h=>{var f,_,m,b;return Kl((_=(f=gt(h,y0,4))==null?void 0:f.g())!=null?_:[],(m=li(h,2))!=null?m:0,(b=ui(h,3))!=null?b:"")})};return il(Nr(c,2))!=null&&(l.timestampMs=(u=il(Nr(c,2)))!=null?u:0),l}(Fp(s)),U(this,o)}),this.g.attachEmptyPacketListener("classifications",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};pi.prototype.classifyForVideo=pi.prototype.ra,pi.prototype.classify=pi.prototype.qa,pi.prototype.setOptions=pi.prototype.o,pi.createFromModelPath=function(t,e){return ct(pi,t,{baseOptions:{modelAssetPath:e}})},pi.createFromModelBuffer=function(t,e){return ct(pi,t,{baseOptions:{modelAssetBuffer:e}})},pi.createFromOptions=function(t,e){return ct(pi,t,e)};var Qe=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!0),this.h=new q0,this.embeddings={embeddings:[]},Z(t=this.h,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e=this.h,i=gt(this.h,T0,2);return i=i?i.clone():new T0,t.l2Normalize!==void 0?Vs(i,1,t.l2Normalize):"l2Normalize"in t&&Mt(i,1),t.quantize!==void 0?Vs(i,2,t.quantize):"quantize"in t&&Mt(i,2),Z(e,0,2,i),this.l(t)}xa(t,e){return di(this,t,e),this.embeddings}ya(t,e,i){return Hi(this,t,i,e),this.embeddings}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"embeddings_out");const e=new je;ki(e,Zp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"EMBEDDINGS:embeddings_out"),i.o(e),Ke(t,i),this.g.attachProtoListener("embeddings_out",(s,o)=>{s=Dp(s),this.embeddings=function(c){var l;return{embeddings:rn(c,Rp,1).map(u=>{var f,_,m,b,E,A,k;const h={headIndex:(_=(f=li(u,3))!=null?f:0)!=null?_:-1,headName:(b=(m=ui(u,4))!=null?m:"")!=null?b:""};if(Th(u,k0,dl(u,1))!==void 0)u=or(u=gt(u,k0,dl(u,1)),1,Mn,sr()),h.floatEmbedding=u.slice();else{const F=new Uint8Array(0);h.quantizedEmbedding=(k=(A=(E=gt(u,Bp,dl(u,2)))==null?void 0:E.ma())==null?void 0:A.h())!=null?k:F}return h}),timestampMs:(l=il(Nr(c,2)))!=null?l:0}}(s),U(this,o)}),this.g.attachEmptyPacketListener("embeddings_out",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Qe.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=id(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=id(ed(t.quantizedEmbedding),ed(e.quantizedEmbedding))}return t},Qe.prototype.embedForVideo=Qe.prototype.ya,Qe.prototype.embed=Qe.prototype.xa,Qe.prototype.setOptions=Qe.prototype.o,Qe.createFromModelPath=function(t,e){return ct(Qe,t,{baseOptions:{modelAssetPath:e}})},Qe.createFromModelBuffer=function(t,e){return ct(Qe,t,{baseOptions:{modelAssetBuffer:e}})},Qe.createFromOptions=function(t,e){return ct(Qe,t,e)};var d1=class{constructor(t,e,i){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=i}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(i=>{i.close()}),(e=this.categoryMask)==null||e.close()}};function Pd(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Ud(t){try{const e=new d1(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{_a(t)}}d1.prototype.close=d1.prototype.close;var Oe=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new jl,this.v=new j0,Z(this.h,0,3,this.v),Z(t=this.h,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i;return t.displayNamesLocale!==void 0?Mt(this.h,2,Ur(t.displayNamesLocale)):"displayNamesLocale"in t&&Mt(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=(e=t.outputCategoryMask)!=null?e:!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=(i=t.outputConfidenceMasks)!=null?i:!0),super.l(t)}J(){(function(t){var i,s,o;const e=rn(t.ca(),ye,1).filter(c=>{var l;return((l=ui(c,1))!=null?l:"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")});if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");e.length===1&&((o=(s=(i=gt(e[0],je,7))==null?void 0:i.l())==null?void 0:s.g())!=null?o:new Map).forEach((c,l)=>{var u;t.s[Number(l)]=(u=ui(c,1))!=null?u:""})})(this)}segment(t,e,i){const s=typeof e!="function"?e:{};return this.j=typeof e=="function"?e:i,Pd(this),di(this,t,s),Ud(this)}Ia(t,e,i,s){const o=typeof i!="function"?i:{};return this.j=typeof i=="function"?i:s,Pd(this),Hi(this,t,o,e),Ud(this)}Ba(){return this.s}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect");const e=new je;ki(e,Y0,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),i.o(e),Ke(t,i),va(this,t),this.outputConfidenceMasks&&(mt(t,"confidence_masks"),dt(i,"CONFIDENCE_MASKS:confidence_masks"),Jr(this,"confidence_masks"),this.g.ba("confidence_masks",(s,o)=>{this.confidenceMasks=s.map(c=>is(this,c,!0,!this.j)),U(this,o)}),this.g.attachEmptyPacketListener("confidence_masks",s=>{this.confidenceMasks=[],U(this,s)})),this.outputCategoryMask&&(mt(t,"category_mask"),dt(i,"CATEGORY_MASK:category_mask"),Jr(this,"category_mask"),this.g.V("category_mask",(s,o)=>{this.categoryMask=is(this,s,!1,!this.j),U(this,o)}),this.g.attachEmptyPacketListener("category_mask",s=>{this.categoryMask=void 0,U(this,s)})),mt(t,"quality_scores"),dt(i,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(s,o)=>{this.qualityScores=s,U(this,o)}),this.g.attachEmptyPacketListener("quality_scores",s=>{this.categoryMask=void 0,U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Oe.prototype.getLabels=Oe.prototype.Ba,Oe.prototype.segmentForVideo=Oe.prototype.Ia,Oe.prototype.segment=Oe.prototype.segment,Oe.prototype.setOptions=Oe.prototype.o,Oe.createFromModelPath=function(t,e){return ct(Oe,t,{baseOptions:{modelAssetPath:e}})},Oe.createFromModelBuffer=function(t,e){return ct(Oe,t,{baseOptions:{modelAssetBuffer:e}})},Oe.createFromOptions=function(t,e){return ct(Oe,t,e)};var f1=class{constructor(t,e,i){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=i}close(){var t,e;(t=this.confidenceMasks)==null||t.forEach(i=>{i.close()}),(e=this.categoryMask)==null||e.close()}};f1.prototype.close=f1.prototype.close;var n6=class extends H{constructor(t){super(t)}},ns=[0,Wt,-2],Aa=[0,an,-3,Ot,an,-1],$d=[0,Aa],Nd=[0,Aa,Wt,-1],p1=class extends H{constructor(t){super(t)}},Hd=[0,an,-1,Ot],r6=class extends H{constructor(t){super(t)}},Vd=class extends H{constructor(t){super(t)}},g1=[1,2,3,4,5,6,7,8,9,10,14,15],Gd=class extends H{constructor(t){super(t)}};Gd.prototype.g=ua([0,re,[0,g1,Ct,Aa,Ct,[0,Aa,ns],Ct,$d,Ct,[0,$d,ns],Ct,Hd,Ct,[0,an,-3,Ot,qe],Ct,[0,an,-3,Ot],Ct,[0,yt,an,-2,Ot,Wt,Ot,-1,2,an,ns],Ct,Nd,Ct,[0,Nd,ns],an,ns,yt,Ct,[0,an,-3,Ot,ns,-1],Ct,[0,re,Hd]],yt,[0,yt,Wt,-1,Ot]]);var Gi=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new jl,this.s=new j0,Z(this.h,0,3,this.s),Z(t=this.h,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i;return"outputCategoryMask"in t&&(this.outputCategoryMask=(e=t.outputCategoryMask)!=null?e:!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=(i=t.outputConfidenceMasks)!=null?i:!0),super.l(t)}segment(t,e,i,s){const o=typeof i!="function"?i:{};this.j=typeof i=="function"?i:s,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,i=this.B+1,s=new Gd;const c=new Vd;var l=new n6;if(Ui(l,1,255),Z(c,0,12,l),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var u=new p1;Vs(u,3,!0),G(u,1,e.keypoint.x),G(u,2,e.keypoint.y),Hs(c,5,g1,u)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(u of(l=new r6,e.scribble))Vs(e=new p1,3,!0),G(e,1,u.x),G(e,2,u.y),Xo(l,1,p1,e);Hs(c,15,g1,l)}Xo(s,1,Vd,c),this.g.addProtoToStream(s.g(),"drishti.RenderData","roi_in",i),di(this,t,o);t:{try{const f=new f1(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var h=f;break t}this.j(f)}finally{_a(this)}h=void 0}return h}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"roi_in"),Ft(t,"norm_rect_in");const e=new je;ki(e,Y0,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"ROI:roi_in"),Tt(i,"NORM_RECT:norm_rect_in"),i.o(e),Ke(t,i),va(this,t),this.outputConfidenceMasks&&(mt(t,"confidence_masks"),dt(i,"CONFIDENCE_MASKS:confidence_masks"),Jr(this,"confidence_masks"),this.g.ba("confidence_masks",(s,o)=>{this.confidenceMasks=s.map(c=>is(this,c,!0,!this.j)),U(this,o)}),this.g.attachEmptyPacketListener("confidence_masks",s=>{this.confidenceMasks=[],U(this,s)})),this.outputCategoryMask&&(mt(t,"category_mask"),dt(i,"CATEGORY_MASK:category_mask"),Jr(this,"category_mask"),this.g.V("category_mask",(s,o)=>{this.categoryMask=is(this,s,!1,!this.j),U(this,o)}),this.g.attachEmptyPacketListener("category_mask",s=>{this.categoryMask=void 0,U(this,s)})),mt(t,"quality_scores"),dt(i,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(s,o)=>{this.qualityScores=s,U(this,o)}),this.g.attachEmptyPacketListener("quality_scores",s=>{this.categoryMask=void 0,U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Gi.prototype.segment=Gi.prototype.segment,Gi.prototype.setOptions=Gi.prototype.o,Gi.createFromModelPath=function(t,e){return ct(Gi,t,{baseOptions:{modelAssetPath:e}})},Gi.createFromModelBuffer=function(t,e){return ct(Gi,t,{baseOptions:{modelAssetBuffer:e}})},Gi.createFromOptions=function(t,e){return ct(Gi,t,e)};var gi=class extends De{constructor(t,e){super(new hi(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},Z(t=this.h=new J0,0,1,e=new Pt)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){return t.displayNamesLocale!==void 0?Mt(this.h,2,Ur(t.displayNamesLocale)):"displayNamesLocale"in t&&Mt(this.h,2),t.maxResults!==void 0?Ui(this.h,3,t.maxResults):"maxResults"in t&&Mt(this.h,3),t.scoreThreshold!==void 0?G(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Mt(this.h,4),t.categoryAllowlist!==void 0?Ko(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Mt(this.h,5),t.categoryDenylist!==void 0?Ko(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Mt(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},di(this,t,e),this.j}F(t,e,i){return this.j={detections:[]},Hi(this,t,i,e),this.j}m(){var t=new Re;Ft(t,"input_frame_gpu"),Ft(t,"norm_rect"),mt(t,"detections");const e=new je;ki(e,jp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.ObjectDetectorGraph"),Tt(i,"IMAGE:input_frame_gpu"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"DETECTIONS:detections"),i.o(e),Ke(t,i),this.g.attachProtoVectorListener("detections",(s,o)=>{for(const c of s)s=x0(c),this.j.detections.push(td(s));U(this,o)}),this.g.attachEmptyPacketListener("detections",s=>{U(this,s)}),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};gi.prototype.detectForVideo=gi.prototype.F,gi.prototype.detect=gi.prototype.D,gi.prototype.setOptions=gi.prototype.o,gi.createFromModelPath=function(t,e){return q(this,null,function*(){return ct(gi,t,{baseOptions:{modelAssetPath:e}})})},gi.createFromModelBuffer=function(t,e){return ct(gi,t,{baseOptions:{modelAssetBuffer:e}})},gi.createFromOptions=function(t,e){return ct(gi,t,e)};var m1=class{constructor(t,e,i){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=i}close(){var t;(t=this.segmentationMasks)==null||t.forEach(e=>{e.close()})}};function zd(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Wd(t){try{const e=new m1(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{_a(t)}}m1.prototype.close=m1.prototype.close;var ti=class extends De{constructor(t,e){super(new hi(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,Z(t=this.h=new Q0,0,1,e=new Pt),this.v=new z0,Z(this.h,0,3,this.v),this.j=new G0,Z(this.h,0,2,this.j),Ui(this.j,4,1),G(this.j,2,.5),G(this.v,2,.5),G(this.h,4,.5)}get baseOptions(){return gt(this.h,Pt,1)}set baseOptions(t){Z(this.h,0,1,t)}o(t){var e,i,s,o,c;return"numPoses"in t&&Ui(this.j,4,(e=t.numPoses)!=null?e:1),"minPoseDetectionConfidence"in t&&G(this.j,2,(i=t.minPoseDetectionConfidence)!=null?i:.5),"minTrackingConfidence"in t&&G(this.h,4,(s=t.minTrackingConfidence)!=null?s:.5),"minPosePresenceConfidence"in t&&G(this.v,2,(o=t.minPosePresenceConfidence)!=null?o:.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=(c=t.outputSegmentationMasks)!=null?c:!1),this.l(t)}D(t,e,i){const s=typeof e!="function"?e:{};return this.s=typeof e=="function"?e:i,zd(this),di(this,t,s),Wd(this)}F(t,e,i,s){const o=typeof i!="function"?i:{};return this.s=typeof i=="function"?i:s,zd(this),Hi(this,t,o,e),Wd(this)}m(){var t=new Re;Ft(t,"image_in"),Ft(t,"norm_rect"),mt(t,"normalized_landmarks"),mt(t,"world_landmarks"),mt(t,"segmentation_masks");const e=new je;ki(e,Xp,this.h);const i=new ye;Xe(i,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Tt(i,"IMAGE:image_in"),Tt(i,"NORM_RECT:norm_rect"),dt(i,"NORM_LANDMARKS:normalized_landmarks"),dt(i,"WORLD_LANDMARKS:world_landmarks"),i.o(e),Ke(t,i),va(this,t),this.g.attachProtoVectorListener("normalized_landmarks",(s,o)=>{this.landmarks=[];for(const c of s)s=Zs(c),this.landmarks.push(ga(s));U(this,o)}),this.g.attachEmptyPacketListener("normalized_landmarks",s=>{this.landmarks=[],U(this,s)}),this.g.attachProtoVectorListener("world_landmarks",(s,o)=>{this.worldLandmarks=[];for(const c of s)s=Kr(c),this.worldLandmarks.push(qs(s));U(this,o)}),this.g.attachEmptyPacketListener("world_landmarks",s=>{this.worldLandmarks=[],U(this,s)}),this.outputSegmentationMasks&&(dt(i,"SEGMENTATION_MASK:segmentation_masks"),Jr(this,"segmentation_masks"),this.g.ba("segmentation_masks",(s,o)=>{this.segmentationMasks=s.map(c=>is(this,c,!0,!this.s)),U(this,o)}),this.g.attachEmptyPacketListener("segmentation_masks",s=>{this.segmentationMasks=[],U(this,s)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ti.prototype.detectForVideo=ti.prototype.F,ti.prototype.detect=ti.prototype.D,ti.prototype.setOptions=ti.prototype.o,ti.createFromModelPath=function(t,e){return ct(ti,t,{baseOptions:{modelAssetPath:e}})},ti.createFromModelBuffer=function(t,e){return ct(ti,t,{baseOptions:{modelAssetBuffer:e}})},ti.createFromOptions=function(t,e){return ct(ti,t,e)},ti.POSE_CONNECTIONS=Rd;const s6=t=>{if(!t||t.length===0)return 0;const e=t[0];if(!e||e.length===0)return 0;let i=1,s=0,o=1,c=0;e.forEach(f=>{f&&typeof f.x=="number"&&typeof f.y=="number"&&(i=Math.min(i,f.x),s=Math.max(s,f.x),o=Math.min(o,f.y),c=Math.max(c,f.y))});const l=s-i,u=c-o;return Math.max(l,u)},o6=(t,e)=>{if(!t||t.length===0)return!1;const i=t[0];let s=1,o=0,c=1,l=0;i.forEach(ne=>{s=Math.min(s,ne.x),o=Math.max(o,ne.x),c=Math.min(c,ne.y),l=Math.max(l,ne.y)});const u=.5,h=.6,f=e>1;let _,m;f?(_=.4,m=.3):(_=.35,m=.5);const b=(s+o)/2,E=(c+l)/2,A=.2,k=_*(1+A),F=m*(1+A),D=((ne,Ii)=>{const Ae=(ne-u)/k,he=(Ii-h)/F;return Ae*Ae+he*he<=1})(b,E),R=.2,$=.1,X=_*(1+R),N=m*(1+$),vt=(ne,Ii)=>{const Ae=(ne-u)/X,he=(Ii-h)/N;return Ae*Ae+he*he<=1},J=vt(s,c),pt=vt(o,c),kt=vt(s,l),Zt=vt(o,l);return D&&J&&pt&&kt&&Zt},a6=t=>{if(!t||t.length===0)return 0;const e=t[0];if(!e||e.length===0)return 0;const i=e[13],s=e[14];if(!i||!s)return 0;const o=Math.abs(s.y-i.y),c=Math.min(...e.map(h=>h.y)),u=Math.max(...e.map(h=>h.y))-c;return u>0?o/u:0},c6=t=>{const e=document.createElement("canvas"),i=e.getContext("2d");if(!i)return null;const s=t.videoWidth,o=t.videoHeight,c=Math.min(s,o),l=(s-c)/2,u=(o-c)/2;return e.width=c,e.height=c,i.drawImage(t,l,u,c,c,0,0,c,c),e},Zd=(t,e,i,s)=>{const o=t.getContext("2d");if(!o)return;const c=t.width,l=t.height;o.clearRect(0,0,c,l);const u=new xe(o);e.forEach(h=>{if(!h||h.length===0)return;const f="rgba(162, 155, 254,0.4)",_=2;o.strokeStyle="rgba(255, 255, 255, 0.6)",o.lineWidth=_,o.lineCap="round",o.lineJoin="round",u.drawLandmarks(h,{color:"rgba(9, 132, 227,0.7)",lineWidth:.5,radius:.5}),u.drawConnectors(h,Bt.FACE_LANDMARKS_FACE_OVAL,{color:f,lineWidth:_}),i>0&&i>=s&&u.drawConnectors(h,Bt.FACE_LANDMARKS_LIPS,{color:f,lineWidth:_})})},qd=t=>{const e=t.getContext("2d");e&&e.clearRect(0,0,t.width,t.height)},l6=(t,e=!1)=>{const i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;const o=t.videoHeight>t.videoWidth;e?o?(i.width=480,i.height=Math.max(640,i.width*t.videoHeight/t.videoWidth)):(i.width=640,i.height=Math.max(480,i.width*t.videoHeight/t.videoWidth)):o?(i.width=240,i.height=Math.max(320,i.width*t.videoHeight/t.videoWidth)):(i.width=320,i.height=Math.max(240,i.width*t.videoHeight/t.videoWidth));const c=1,l=t.videoWidth*c,u=t.videoHeight*c,h=(l-t.videoWidth)/2,f=(u-t.videoHeight)/2;return s.drawImage(t,-h,-f-0,l,u,0,0,i.width,i.height),i.toDataURL("image/jpeg")},jd={LIVENESS_IMAGE_BASE64:6,SELFIE_IMAGE_BASE64:2},Xd={"multiple-faces":"Ensure only one face is visible","no-face":"Position your face in the oval","out-of-bounds":"Position your face in the oval","too-close":"Move farther away","too-far":"Move closer","neutral-expression":"Neutral expression","smile-required":"Smile!","open-mouth-smile":"Wider smile - teeth visible",initializing:"Initializing..."},u6=()=>{const t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return!1;const i=e.getExtension("OES_texture_half_float"),s=e.getExtension("OES_texture_half_float_linear"),o=e.getExtension("EXT_color_buffer_half_float");return!!(i&&o&&s)},Kd=()=>q(null,null,function*(){window.__smileIdentityMediapipe||(window.__smileIdentityMediapipe={instance:null,loading:null,loaded:!1});const t=window.__smileIdentityMediapipe;return t.loaded&&t.instance?t.instance:(t.loading||(t.loading=q(null,null,function*(){try{const e=yield lr.forVisionTasks("https://web-models.smileidentity.com/mediapipe-tasks-vision-wasm"),i=yield Bt.createFromOptions(e,{baseOptions:{modelAssetPath:"https://web-models.smileidentity.com/face_landmarker/face_landmarker.task",delegate:u6()?"GPU":"CPU"},outputFaceBlendshapes:!0,runningMode:"VIDEO",numFaces:2});return t.instance=i,t.loaded=!0,t.loading=null,i}catch(e){throw t.loading=null,e}})),t.loading)}),Qs=xs.version,h6=({videoRef:t,canvasRef:e,interval:i,duration:s,smileThreshold:o,mouthOpenThreshold:c,minFaceSize:l,maxFaceSize:u,smileCooldown:h,getFacingMode:f})=>{const _=pe(null),m=pe(null),b=pe(null),E=pe(null),A=Gt(!1),k=Gt(!1),F=Gt("good"),M=Gt(!1),D=Gt(16/9),R=Gt([]),$=Gt(0),X=Gt(0),N=Gt(0),vt=Gt(0),J=Gt(""),pt=Gt(!0),kt=Gt(!1),Zt=Gt(!1),ne=Gt(0),Ii=Gt([]),Ae=Gt(null),he=Gt(1),Se=Gt(0),ur=Gt(!1),ei=Dc(()=>Math.floor(he.value*.4)),ka=Dc(()=>Math.floor(he.value*.2)),rs=Dc(()=>A.value&&k.value&&F.value==="good"&&!M.value),Pe=lt=>{lt&&Xd[lt]?J.value=Xd[lt]:J.value=""},ke=pe(N2.throttle(lt=>{Pe(lt)},600)).current,b1=()=>q(null,null,function*(){var lt,xt;try{((lt=window.__smileIdentityMediapipe)==null?void 0:lt.loaded)&&((xt=window.__smileIdentityMediapipe)==null?void 0:xt.instance)||(pt.value=!0,Pe("initializing")),_.current=yield Kd(),pt.value=!1}catch(me){console.error("Failed to initialize MediaPipe:",me),pt.value=!1}}),y1=()=>{if(t.current&&e.current){const{videoWidth:lt,videoHeight:xt}=t.current;D.value=lt/xt,e.current.width=lt,e.current.height=xt,t.current.parentElement&&(e.current.style.left="50%",e.current.style.top="50%")}},Un=()=>{const lt=Se.value<ka.value,xt=Se.value>=ei.value;lt?J.value="Capturing...":xt?Date.now()-vt.value>h?$.value>=o&&N.value<c?ke("open-mouth-smile"):ke("smile-required"):J.value="Keep smiling!":ke(null)},ss=()=>{pt.value?Pe("initializing"):M.value?ke("multiple-faces"):A.value?F.value==="too-close"?ke("too-close"):F.value==="too-far"?ke("too-far"):k.value?kt.value?Un():J.value="Ready to capture":ke("out-of-bounds"):ke("no-face")},to=()=>{m.current&&(cancelAnimationFrame(m.current),m.current=null)},hn=()=>q(null,null,function*(){var lt,xt;if(!_.current||!t.current){to();return}if(t.current.videoWidth<=0||t.current.videoHeight<=0||t.current.readyState<2){m.current=requestAnimationFrame(hn);return}try{pt.value&&(pt.value=!1);const me=c6(t.current),$n=me||t.current,Le=_.current.detectForVideo($n,performance.now());if(R.value=Le.faceLandmarks||[],Le.faceLandmarks&&e.current&&t.current)if(me){const $e=t.current.videoWidth,Ne=t.current.videoHeight,qi=Math.min($e,Ne),dr=($e-qi)/(2*$e),Hn=(Ne-qi)/(2*Ne),Vn=qi/$e,ji=qi/Ne,io=Le.faceLandmarks.map(no=>no.map(fr=>({x:fr.x*Vn+dr,y:fr.y*ji+Hn,z:fr.z})));Zd(e.current,io,Se.value,ei.value)}else Zd(e.current,Le.faceLandmarks,Se.value,ei.value);else e.current&&qd(e.current);const Nn=Le.faceLandmarks?Le.faceLandmarks.length:0;M.value=Nn>1;const La=Le.faceBlendshapes&&Le.faceBlendshapes.length>0&&Nn===1;if(A.value=La,La&&Le.faceLandmarks){const $e=s6(Le.faceLandmarks);X.value=$e,$e>u?F.value="too-close":$e<l?F.value="too-far":F.value="good",k.value=o6(Le.faceLandmarks,D.value);const Ne=Le.faceBlendshapes[0].categories,qi=((lt=Ne.find(ji=>ji.categoryName==="mouthSmileLeft"))==null?void 0:lt.score)||0,dr=((xt=Ne.find(ji=>ji.categoryName==="mouthSmileRight"))==null?void 0:xt.score)||0,Hn=a6(Le.faceLandmarks),Vn=(qi+dr)/2;$.value=Vn,N.value=Hn,Vn>=o&&Hn>=c&&(vt.value=Date.now(),Zt.value&&kt.value&&E.current&&setTimeout(()=>{Date.now()-vt.value<=100&&Zt.value&&kt.value&&E.current&&E.current()},0))}else $.value=0,X.value=0,N.value=0,k.value=!1,F.value="good";ss()}catch(me){A.value=!1,k.value=!1,M.value=!1,F.value="good",N.value=0,kt.value&&ke("no-face")}m.current=requestAnimationFrame(hn)}),hr=()=>{m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(hn)},C1=()=>{if(!t.current)return;const lt=Se.value===he.value-1,xt=l6(t.current,lt);xt&&(lt?Ae.value=xt:Ii.value=[...Ii.value,xt],Se.value++,ne.value=he.value-Se.value)},dn=()=>{if(b.current&&(clearInterval(b.current),b.current=null),kt.value=!1,Zt.value=!1,Se.value>=he.value&&Ae.value){const lt=Ii.value.map($n=>({image:$n.split(",")[1],image_type_id:jd.LIVENESS_IMAGE_BASE64})),xt={image:Ae.value.split(",")[1],image_type_id:jd.SELFIE_IMAGE_BASE64},me={images:[...lt,xt],referenceImage:Ae.value,previewImage:Ae.value,facingMode:f(),meta:{libraryVersion:Qs}};window.dispatchEvent(new CustomEvent("selfie-capture.publish",{detail:me})),ur.value=!0}},Wi=()=>{b.current&&(clearInterval(b.current),b.current=null),Zt.value=!0,!M.value&&A.value&&k.value&&F.value==="good"&&ke("smile-required")},eo=()=>{b.current&&clearInterval(b.current),b.current=setInterval(()=>{if(Se.value>=he.value){dn();return}if(M.value){Wi();return}if(!A.value)return;if(!k.value){Wi();return}if(F.value!=="good"){Wi();return}if(Se.value>=ei.value&&Date.now()-vt.value>h){Wi();return}C1()},i)},Ue=()=>{if(A.value&&F.value==="good"&&k.value&&!M.value){if(Se.value>=ei.value&&Date.now()-vt.value>h)return;Zt.value=!1,ke(null),eo()}};return E.current=Ue,{faceDetected:A,faceInBounds:k,faceProximity:F,multipleFaces:M,videoAspectRatio:D,faceLandmarks:R,currentSmileScore:$,currentFaceSize:X,currentMouthOpen:N,lastSmileTime:vt,alertTitle:J,isInitializing:pt,isReadyToCapture:rs,isCapturing:kt,isPaused:Zt,countdown:ne,capturedImages:Ii,referencePhoto:Ae,totalCaptures:he,capturesTaken:Se,hasFinishedCapture:ur,smileCheckpoint:ei,neutralZone:ka,initializeFaceLandmarker:b1,setupCanvas:y1,startDetectionLoop:hr,stopDetectionLoop:to,updateAlert:ke,startCapture:()=>q(null,null,function*(){Ii.value=[],kt.value=!0,Zt.value=!1,he.value=Math.ceil(s/i),Se.value=0,ne.value=he.value;const lt=document.querySelector("smart-camera-web");lt==null||lt.dispatchEvent(new CustomEvent("metadata.selfie-capture-start")),lt==null||lt.dispatchEvent(new CustomEvent("metadata.selfie-origin",{detail:{imageOrigin:{environment:"back_camera",user:"front_camera"}[f()]}})),eo()}),stopCapture:dn,pauseCapture:Wi,resumeCapture:Ue,handleCancel:()=>{dn(),window.dispatchEvent(new CustomEvent("selfie-capture.cancelled",{detail:{meta:{libraryVersion:Qs}}})),window.dispatchEvent(new CustomEvent("selfie-capture-screens.cancelled",{detail:{meta:{libraryVersion:Qs}}}))},handleClose:()=>{dn(),window.dispatchEvent(new CustomEvent("selfie-capture.close",{detail:{meta:{libraryVersion:Qs}}})),window.dispatchEvent(new CustomEvent("selfie-capture-screens.close",{detail:{meta:{libraryVersion:Qs}}}))},cleanup:()=>{b.current&&clearInterval(b.current),to(),ke.cancel()},resetFaceDetectionState:()=>{A.value=!1,k.value=!1,F.value="good",M.value=!1,R.value=[],$.value=0,X.value=0,N.value=0,vt.value=0,e.current&&qd(e.current)}}},d6=({progress:t,duration:e=1e3,themeColor:i="#001096"})=>{const s=pe(null),o=pe(t);return Si(()=>{const c=s.current;if(!c)return;const l=c.getTotalLength();c.style.opacity=t>0?"1":"0";const u=l*(1-o.current),h=l*(1-t);u!==h&&(c.style.transition="none",c.style.strokeDasharray=`${l} ${l}`,c.style.strokeDashoffset=`${u}`,c.getBoundingClientRect(),c.style.transition=`stroke-dashoffset ${e}ms ease-out`,c.style.strokeDashoffset=`${h}`,o.current=t)},[t,e]),st("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none"},children:st("svg",{viewBox:"0 0 285 380",preserveAspectRatio:"xMidYMid meet",style:{width:"100%",height:"100%"},children:[st("clipPath",{id:"selfie-clip-path",clipPathUnits:"objectBoundingBox",children:st("path",{d:"M0.085 0.382 C0.087 0.357 0.092 0.294 0.131 0.236 C0.200 0.133 0.340 0.063 0.501 0.063 C0.730 0.063 0.915 0.205 0.915 0.382 C0.915 0.424 0.899 0.513 0.891 0.549 C0.882 0.588 0.871 0.626 0.857 0.664 C0.792 0.825 0.639 0.937 0.501 0.937 C0.314 0.937 0.182 0.755 0.144 0.666 C0.126 0.624 0.110 0.557 0.107 0.547 C0.092 0.485 0.081 0.439 0.085 0.382 Z"})}),st("path",{d:"M142.693 24C208.319 24 261 77.97 261 145.008C261 160.97 256.319 194.788 254.129 208.356C251.64 223.188 248.348 237.875 244.27 252.35C225.747 313.203 182.328 356 142.693 356C89.414 356 51.871 286.667 41.016 252.948C35.937 236.987 31.356 211.748 30.559 207.857C26.277 184.114 22.991 166.556 24.285 145.008C24.883 135.631 26.277 111.789 37.431 89.742C57.049 50.636 96.983 24 142.693 24Z",stroke:i,fill:"none",style:{strokeWidth:"8"}}),st("path",{ref:s,d:"M142.693 24C208.319 24 261 77.97 261 145.008C261 160.97 256.319 194.788 254.129 208.356C251.64 223.188 248.348 237.875 244.27 252.35C225.747 313.203 182.328 356 142.693 356C89.414 356 51.871 286.667 41.016 252.948C35.937 236.987 31.356 211.748 30.559 207.857C26.277 184.114 22.991 166.556 24.285 145.008C24.883 135.631 26.277 111.789 37.431 89.742C57.049 50.636 96.983 24 142.693 24Z",stroke:"#22c55e",style:{strokeWidth:"8"},fill:"none",strokeLinecap:"round"})]})})},f6=({videoRef:t,canvasRef:e,facingMode:i,multipleFaces:s,progress:o,interval:c,themeColor:l})=>st(xn,{children:[st("div",{className:"camera-preview-container",children:[st("div",{className:"video-wrapper",style:{clipPath:s?"none":"url(#selfie-clip-path)"},children:st("div",{className:"video-container",children:[st("video",{ref:t,autoPlay:!0,playsInline:!0,muted:!0,className:`camera-video ${i==="user"?"mirror":""}`}),st("canvas",{ref:e,className:`camera-canvas ${i==="user"?"mirror":""}`})]})}),!s&&st(d6,{progress:o,duration:c,themeColor:l})]}),st("style",{children:`
3208
3208
  .camera-preview-container {
3209
3209
  position: relative;
3210
3210
  width: 100%;