varfr=Object.defineProperty;varmo=Object.getOwnPropertyDescriptor;varpo=Object.getOwnPropertyNames;varuo=Object.prototype.hasOwnProperty;varfo=(o=>typeofrequire!="undefined"?require:typeofProxy!="undefined"?newProxy(o,{get:(t,e)=>(typeofrequire!="undefined"?require:t)[e]}):o)(function(o){if(typeofrequire!="undefined")returnrequire.apply(this,arguments);thrownewError('Dynamic require of "'+o+'" is not supported')});varFe=(o,t)=>{for(vareint)fr(o,e,{get:t[e],enumerable:!0})},ur=(o,t,e,r)=>{if(t&&typeoft=="object"||typeoft=="function")for(letaofpo(t))!uo.call(o,a)&&a!==e&&fr(o,a,{get:()=>t[a],enumerable:!(r=mo(t,a))||r.enumerable});returno},y=(o,t,e)=>(ur(o,t,"default"),e&&ur(e,t,"default"));varn={};Fe(n,{version:()=>_o});y(n,fn);y(n,ln);y(n,dn);import*asfnfrom"@tensorflow/tfjs/dist/index.js";import*aslnfrom"@tensorflow/tfjs-backend-webgl/dist/index.js";import*asdnfrom"@tensorflow/tfjs-backend-wasm/dist/index.js";varlo="3.15.0",ho="3.15.0",bo="3.15.0",go="3.15.0",xo="3.15.0",vo="3.15.0",yo="3.15.0",To="3.15.0",_o={tfjs:lo,"tfjs-core":ho,"tfjs-data":bo,"tfjs-layers":go,"tfjs-converter":xo,"tfjs-backend-cpu":vo,"tfjs-backend-webgl":yo,"tfjs-backend-wasm":To};varNr={};Fe(Nr,{AnchorPosition:()=>Ae,DrawBox:()=>ue,DrawBoxOptions:()=>ke,DrawFaceLandmarks:()=>Oe,DrawFaceLandmarksOptions:()=>$e,DrawTextField:()=>st,DrawTextFieldOptions:()=>Vt,drawContour:()=>q,drawDetections:()=>No,drawFaceExpressions:()=>Lo,drawFaceLandmarks:()=>Ao});functionq(o,t,e=!1){if(o.beginPath(),t.slice(1).forEach(({x:r,y:a},s)=>{leti=t[s];o.moveTo(i.x,i.y),o.lineTo(r,a)}),e){letr=t[t.length-1],a=t[0];if(!r||!a)return;o.moveTo(r.x,r.y),o.lineTo(a.x,a.y)}o.stroke()}varlr={};Fe(lr,{computeReshapedDimensions:()=>Me,getCenterPoint:()=>ut,isDimensions:()=>se,isEven:()=>ae,isFloat:()=>Ee,isTensor:()=>mt,isTensor1D:()=>Po,isTensor2D:()=>De,isTensor3D:()=>Z,isTensor4D:()=>R,isValidNumber:()=>Y,isValidProbablitiy:()=>wt,range:()=>X,round:()=>pt});varS=class{constructor(t,e){if(!Y(t)||!Y(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)}};functionmt(o,t){returnoinstanceofn.Tensor&&o.shape.length===t}functionPo(o){returnmt(o,1)}functionDe(o){returnmt(o,2)}functionZ(o){returnmt(o,3)}functionR(o){returnmt(o,4)}functionEe(o){returno%1!==0}functionae(o){returno%2===0}functionpt(o,t=2){lete=10**t;returnMath.floor(o*e)/e}functionse(o){returno&&o.width&&o.height}functionMe({width:o,height:t},e){letr=e/Math.max(t,o);returnnewS(Math.round(o*r),Math.round(t*r))}functionut(o){returno.reduce((t,e)=>t.add(e),newb(0,0)).div(newb(o.length,o.length))}functionX(o,t,e){returnArray(o).fill(0).map((r,a)=>t+a*e)}functionY(o){return!!o&&o!==1/0&&o!==-1/0&&!Number.isNaN(o)||o===0}functionwt(o){returnY(o)&&o>=0&&o<=1}varb=class{constructor(t,e){this._x=t,this._y=e}getx(){returnthis._x}gety(){returnthis._y}add(t){returnnewb(this.x+t.x,this.y+t.y)}sub(t){returnnewb(this.x-t.x,this.y-t.y)}mul(t){returnnewb(this.x*t.x,this.y*t.y)}div(t){returnnewb(this.x/t.x,this.y/t.y)}abs(){returnnewb(Math.abs(this.x),Math.abs(this.y))}magnitude(){returnMath.sqrt(this.x**2+this.y**2)}floor(){returnnewb(Math.floor(this.x),Math.floor(this.y))}};varF=class{staticisRect(t){return!!t&&[t.x,t.y,t.width,t.height].every(Y)}staticassertIsValidBox(t,e,r=!1){if(!F.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||{},a=[r.left,r.top,r.right,r.bottom].every(Y),s=[r.x,r.y,r.width,r.height].every(Y);if(!s&&!a)thrownewError(`Box.constructor - expected box to be IBoundingBox | IRect, instead have ${JSON.stringify(r)}`);let[i,c,m,p]=s?[r.x,r.y,r.width,r.height]:[r.left,r.top,r