varpn=Object.create,Ye=Object.defineProperty,dn=Object.getPrototypeOf,un=Object.prototype.hasOwnProperty,ln=Object.getOwnPropertyNames,fn=Object.getOwnPropertyDescriptor;varDr=o=>Ye(o,"__esModule",{value:!0});varuo=(o,t)=>()=>(t||(t={exports:{}},o(t.exports,t)),t.exports),Er=(o,t)=>{for(vareint)Ye(o,e,{get:t[e],enumerable:!0})},lt=(o,t,e)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofln(t))!un.call(o,r)&&r!=="default"&&Ye(o,r,{get:()=>t[r],enumerable:!(e=fn(t,r))||e.enumerable});returno},hn=o=>lt(Dr(Ye(o!=null?pn(dn(o)):{},"default",o&&o.__esModule&&"default"ino?{get:()=>o.default,enumerable:!0}:{value:o,enumerable:!0})),o);import*asCafrom"@tensorflow/tfjs/dist/index.js";import*asNafrom"@tensorflow/tfjs-backend-wasm";varb=uo(xn=>{Dr(xn);lt(xn,Ca);lt(xn,Na)});vargo=uo((_n,bo)=>{Dr(_n);Er(_n,{isNodejs:()=>wn});functionwn(){returntypeofglobal=="object"&&!0&&typeofbo!="undefined"&&typeofprocess!="undefined"&&!!process.version}});varya=b();varPo={};Er(Po,{AnchorPosition:()=>pt,DrawBox:()=>Ue,DrawBoxOptions:()=>jr,DrawFaceLandmarks:()=>Zr,DrawFaceLandmarksOptions:()=>qr,DrawTextField:()=>Mt,DrawTextFieldOptions:()=>Ce,drawContour:()=>ft,drawDetections:()=>En,drawFaceExpressions:()=>kn,drawFaceLandmarks:()=>Ln});functionft(o,t,e=!1){if(o.beginPath(),t.slice(1).forEach(({x:r,y:n},a)=>{lets=t[a];o.moveTo(s.x,s.y),o.lineTo(r,n)}),e){letr=t[t.length-1],n=t[0];if(!r||!n)return;o.moveTo(r.x,r.y),o.lineTo(n.x,n.y)}o.stroke()}varlo={};Er(lo,{computeReshapedDimensions:()=>Nr,getCenterPoint:()=>$t,isDimensions:()=>ze,isEven:()=>Ge,isFloat:()=>Cr,isTensor:()=>Bt,isTensor1D:()=>bn,isTensor2D:()=>Mr,isTensor3D:()=>ht,isTensor4D:()=>G,isValidNumber:()=>et,isValidProbablitiy:()=>ee,range:()=>it,round:()=>Rt});varfo=b();varS=class{constructor(t,e){if(!et(t)||!et(e))thrownewError(`Dimensions.constructor - expected width and height to be valid numbers, instead have ${JSON.stringify({width:t,height:e})}`);this._width=t,this._height=e}getwidth(){returnthis._width}getheight(){returnthis._height}reverse(){returnnewS(1/this.width,1/this.height)}};functionBt(o,t){returnoinstanceoffo.Tensor&&o.shape.length===t}functionbn(o){returnBt(o,1)}functionMr(o){returnBt(o,2)}functionht(o){returnBt(o,3)}functionG(o){returnBt(o,4)}functionCr(o){returno%1!=0}functionGe(o){returno%2==0}functionRt(o,t=2){lete=10**t;returnMath.floor(o*e)/e}functionze(o){returno&&o.width&&o.height}functionNr({width:o,height:t},e){letr=e/Math.max(t,o);returnnewS(Math.round(o*r),Math.round(t*r))}function$t(o){returno.reduce((t,e)=>t.add(e),newx(0,0)).div(newx(o.length,o.length))}functionit(o,t,e){returnArray(o).fill(0).map((r,n)=>t+n*e)}functionet(o){return!!o&&o!==Infinity&&o!==-Infinity&&!Number.isNaN(o)||o===0}functionee(o){returnet(o)&&o>=0&&o<=1}varx=class{constructor(t,e){this._x=t,this._y=e}getx(){returnthis._x}gety(){returnthis._y}add(t){returnnewx(this.x+t.x,this.y+t.y)}sub(t){returnnewx(this.x-t.x,this.y-t.y)}mul(t){returnnewx(this.x*t.x,this.y*t.y)}div(t){returnnewx(this.x/t.x,this.y/t.y)}abs(){returnnewx(Math.abs(this.x),Math.abs(this.y))}magnitude(){returnMath.sqrt(this.x**2+this.y**2)}floor(){returnnewx(Math.floor(this.x),Math.floor(this.y))}};varP=class{staticisRect(t){return!!t&&[t.x,t.y,t.width,t.height].every(et)}staticassertIsValidBox(t,e,r=!1){if(!P.isRect(t))thrownewError(`${e} - invalid box: ${JSON.stringify(t)}, expected object with properties x, y, width, height`);if(!r&&(t.width<0||t.height<0))thrownewError(`${e} - width (${t.width}) and height (${t.height}) must be positive numbers`)}constructor(t,e=!0){letr=t||{},n=[r.left,r.top,r.right,r.bottom].every(et),a=[r.x,r.y,r.width,r.height].every(et);if(!a&&!n)thrownewError(`Box.constructor - expected box to be IBoundingBox | IRect, instead have ${JSON.stringify(r)}`);let[s,i,c,m]=a?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top];P.assertIsValidBox({x:s,y:i,width:c,height:m},"Box.constructor",e),this._x=s,this._y=i,this._width=c,this._height=m}getx(){returnthis._x}gety(){return