diff --git "a/face-canvas.js" "b/face-canvas.js" --- "a/face-canvas.js" +++ "b/face-canvas.js" @@ -1,14 +1,14 @@ -(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))O(m);new MutationObserver(m=>{for(const L of m)if(L.type==="childList")for(const j of L.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&O(j)}).observe(document,{childList:!0,subtree:!0});function y(m){const L={};return m.integrity&&(L.integrity=m.integrity),m.referrerPolicy&&(L.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?L.credentials="include":m.crossOrigin==="anonymous"?L.credentials="omit":L.credentials="same-origin",L}function O(m){if(m.ep)return;m.ep=!0;const L=y(m);fetch(m.href,L)}})();const Sn=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.absolute{position:absolute}.relative{position:relative}.bottom-1{bottom:.25rem}.left-1{left:.25rem}.z-10{z-index:10}.inline{display:inline}.flex{display:flex}.hidden{display:none}.w-32{width:8rem}.w-full{width:100%}.items-end{align-items:flex-end}.rounded-lg{border-radius:.5rem}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.font-bold{font-weight:700}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb;--tw-content: ""}:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;margin:0;line-height:inherit} -`;function Bt(){}function He(a){return a()}function Ye(){return Object.create(null)}function ie(a){a.forEach(He)}function Je(a){return typeof a=="function"}function Tn(a,f){return a!=a?f==f:a!==f||a&&typeof a=="object"||typeof a=="function"}function Rn(a){return Object.keys(a).length===0}function wt(a,f){a.appendChild(f)}function Fn(a,f,y){const O=Mn(a);if(!O.getElementById(f)){const m=Ft("style");m.id=f,m.textContent=y,Ln(O,m)}}function Mn(a){if(!a)return document;const f=a.getRootNode?a.getRootNode():a.ownerDocument;return f&&f.host?f:a.ownerDocument}function Ln(a,f){return wt(a.head||a,f),f.sheet}function Pn(a,f,y){a.insertBefore(f,y||null)}function Ke(a){a.parentNode&&a.parentNode.removeChild(a)}function Ft(a){return document.createElement(a)}function Cn(a){return document.createTextNode(a)}function de(){return Cn(" ")}function Nn(a,f,y,O){return a.addEventListener(f,y,O),()=>a.removeEventListener(f,y,O)}function gt(a,f,y){y==null?a.removeAttribute(f):a.getAttribute(f)!==y&&a.setAttribute(f,y)}function Un(a){return Array.from(a.childNodes)}let Kt;function Ht(a){Kt=a}function In(){if(!Kt)throw new Error("Function called outside component initialization");return Kt}function Gn(a){In().$$.on_mount.push(a)}const Gt=[],Jt=[];let $t=[];const De=[],Bn=Promise.resolve();let pe=!1;function $n(){pe||(pe=!0,Bn.then(Ze))}function ve(a){$t.push(a)}const ge=new Set;let It=0;function Ze(){if(It!==0)return;const a=Kt;do{try{for(;Ita.indexOf(O)===-1?f.push(O):y.push(O)),y.forEach(O=>O()),$t=f}const Wn=new Set;function Xn(a,f){a&&a.i&&(Wn.delete(a),a.i(f))}function Yn(a,f,y,O){const{fragment:m,after_update:L}=a.$$;m&&m.m(f,y),O||ve(()=>{const j=a.$$.on_mount.map(He).filter(Je);a.$$.on_destroy?a.$$.on_destroy.push(...j):ie(j),a.$$.on_mount=[]}),L.forEach(ve)}function Dn(a,f){const y=a.$$;y.fragment!==null&&(Vn(y.after_update),ie(y.on_destroy),y.fragment&&y.fragment.d(f),y.on_destroy=y.fragment=null,y.ctx=[])}function Hn(a,f){a.$$.dirty[0]===-1&&(Gt.push(a),$n(),a.$$.dirty.fill(0)),a.$$.dirty[f/31|0]|=1<{const Q=ot.length?ot[0]:et;return C.ctx&&m(C.ctx[W],C.ctx[W]=Q)&&(!C.skip_bound&&C.bound[W]&&C.bound[W](Q),K&&Hn(a,W)),et}):[],C.update(),K=!0,ie(C.before_update),C.fragment=O?O(C.ctx):!1,f.target){if(f.hydrate){const W=Un(f.target);C.fragment&&C.fragment.l(W),W.forEach(Ke)}else C.fragment&&C.fragment.c();f.intro&&Xn(a.$$.fragment),Yn(a,f.target,f.anchor,f.customElement),Ze()}Ht(z)}class Kn{$destroy(){Dn(this,1),this.$destroy=Bt}$on(f,y){if(!Je(y))return Bt;const O=this.$$.callbacks[f]||(this.$$.callbacks[f]=[]);return O.push(y),()=>{const m=O.indexOf(y);m!==-1&&O.splice(m,1)}}$set(f){this.$$set&&!Rn(f)&&(this.$$.skip_bound=!0,this.$$set(f),this.$$.skip_bound=!1)}}var zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zn={};(function(){var a;function f(t){var e=0;return function(){return e>>0)+"_",i=0;return e}),L("Symbol.iterator",function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var e="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n"u"?!0:(typeof o=="function"?o=new o("unhandledrejection",{cancelable:!0}):typeof c=="function"?o=new c("unhandledrejection",{cancelable:!0}):(o=m.document.createEvent("CustomEvent"),o.initCustomEvent("unhandledrejection",!1,!0,o)),o.promise=this,o.reason=this.i,h(o))},e.prototype.A=function(){if(this.g!=null){for(var o=0;on&&(n=Math.max(n+i,0));n"u"||n.execScript("var "+t[0]);for(var r;t.length&&(r=t.shift());)t.length||e===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=e}function F(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}var it,d=typeof TextDecoder<"u",b,B=typeof TextEncoder<"u";function Z(t){if(B)t=(b||(b=new TextEncoder)).encode(t);else{var e=void 0;e=e===void 0?!1:e;for(var n=0,r=new Uint8Array(3*t.length),i=0;iu)r[n++]=u;else{if(2048>u)r[n++]=u>>6|192;else{if(55296<=u&&57343>=u){if(56319>=u&&i=o){u=1024*(u-55296)+o-56320+65536,r[n++]=u>>18|240,r[n++]=u>>12&63|128,r[n++]=u>>6&63|128,r[n++]=u&63|128;continue}else i--}if(e)throw Error("Found an unpaired surrogate");u=65533}r[n++]=u>>12|224,r[n++]=u>>6&63|128}r[n++]=u&63|128}}t=r.subarray(0,n)}return t}var ct={},pt=null;function ft(t,e){e===void 0&&(e=0),Mt(),e=ct[e];for(var n=Array(Math.floor(t.length/3)),r=e[64]||"",i=0,u=0;i>2];o=e[(o&3)<<4|c>>4],c=e[(c&15)<<2|h>>6],h=e[h&63],n[u++]=g+o+c+h}switch(g=0,h=r,t.length-i){case 2:g=t[i+1],h=e[(g&15)<<2]||r;case 1:t=t[i],n[u]=e[t>>2]+e[(t&3)<<4|g>>4]+h+r}return n.join("")}function vt(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):"=.".indexOf(t[e-1])!=-1&&(n="=.".indexOf(t[e-2])!=-1?n-2:n-1);var r=new Uint8Array(n),i=0;return Wt(t,function(u){r[i++]=u}),r.subarray(0,i)}function Wt(t,e){function n(h){for(;r>4),o!=64&&(e(u<<4&240|o>>2),c!=64&&e(o<<6&192|c))}}function Mt(){if(!pt){pt={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));ct[n]=r;for(var i=0;ii&&128<=e;i++)e=t.h[t.g++],n|=(e&127)<<7*i;if(128<=e&&(e=t.h[t.g++],n|=(e&127)<<28,r|=(e&127)>>4),128<=e)for(i=0;5>i&&128<=e;i++)e=t.h[t.g++],r|=(e&127)<<7*i+3;if(128>e)return t=n>>>0,e=r>>>0,(r=e&2147483648)&&(t=~t+1>>>0,e=~e>>>0,t==0&&(e=e+1>>>0)),t=4294967296*e+(t>>>0),r?-t:t;t.m=!0}Lt.prototype.i=function(){var t=this.h,e=t[this.g],n=e&127;return 128>e?(this.g+=1,n):(e=t[this.g+1],n|=(e&127)<<7,128>e?(this.g+=2,n):(e=t[this.g+2],n|=(e&127)<<14,128>e?(this.g+=3,n):(e=t[this.g+3],n|=(e&127)<<21,128>e?(this.g+=4,n):(e=t[this.g+4],n|=(e&15)<<28,128>e?(this.g+=5,n>>>0):(this.g+=5,128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&this.g++,n)))))},Lt.prototype.o=function(){var t=this.h[this.g],e=this.h[this.g+1],n=this.h[this.g+2],r=this.h[this.g+3];return this.g+=4,n=(t<<0|e<<8|n<<16|r<<24)>>>0,t=2*(n>>31)+1,e=n>>>23&255,n&=8388607,e==255?n?NaN:1/0*t:e==0?t*Math.pow(2,-149)*n:t*Math.pow(2,e-150)*(n+Math.pow(2,23))};var be=[];function Qt(){this.g=new Uint8Array(64),this.h=0}Qt.prototype.push=function(t){if(!(this.h+1>>=7;t.push(e)}function Xt(t){var e={},n=e.N===void 0?!1:e.N;this.o={v:e.v===void 0?!1:e.v},this.N=n,e=this.o,be.length?(n=be.pop(),e&&(n.v=e.v),t&&we(n,t),t=n):t=new Lt(t,e),this.g=t,this.m=this.g.g,this.h=this.i=this.l=-1,this.j=!1}Xt.prototype.reset=function(){this.g.reset(),this.h=this.l=-1};function mt(t){var e=t.g;if((e=e.g==e.j)||(e=t.j)||(e=t.g,e=e.m||0>e.g||e.g>e.j),e)return!1;t.m=t.g.g,e=t.g.i();var n=e&7;return n!=0&&n!=5&&n!=1&&n!=2&&n!=3&&n!=4?(t.j=!0,!1):(t.i=e,t.l=e>>>3,t.h=n,!0)}function Pt(t){switch(t.h){case 0:if(t.h!=0)Pt(t);else{for(t=t.g;t.h[t.g]&128;)t.g++;t.g++}break;case 1:t.h!=1?Pt(t):(t=t.g,t.g+=8);break;case 2:if(t.h!=2)Pt(t);else{var e=t.g.i();t=t.g,t.g+=e}break;case 5:t.h!=5?Pt(t):(t=t.g,t.g+=4);break;case 3:e=t.l;do{if(!mt(t)){t.j=!0;break}if(t.h==4){t.l!=e&&(t.j=!0);break}Pt(t)}while(1);break;default:t.j=!0}}function qt(t,e,n){var r=t.g.j,i=t.g.i(),u=t.g.g+i;if(t.g.j=u,n(e,t),n=u-t.g.g,n!==0)throw Error("Message parsing ended unexpectedly. Expected to read "+i+" bytes, instead read "+(i-n)+" bytes, either the data ended unexpectedly or the message misreported its own length");return t.g.g=u,t.g.j=r,e}function lt(t){return t.g.o()}function xe(t){var e=t.g.i();t=t.g;var n=t.g;t.g+=e,t=t.h;var r;if(d)(r=it)||(r=it=new TextDecoder("utf-8",{fatal:!1})),r=r.decode(t.subarray(n,n+e));else{e=n+e;for(var i=[],u=null,o,c,h;no?i.push(o):224>o?n>=e?i.push(65533):(c=t[n++],194>o||(c&192)!==128?(n--,i.push(65533)):i.push((o&31)<<6|c&63)):240>o?n>=e-1?i.push(65533):(c=t[n++],(c&192)!==128||o===224&&160>c||o===237&&160<=c||((r=t[n++])&192)!==128?(n--,i.push(65533)):i.push((o&15)<<12|(c&63)<<6|r&63)):244>=o?n>=e-2?i.push(65533):(c=t[n++],(c&192)!==128||(o<<28)+(c-144)>>30||((r=t[n++])&192)!==128||((h=t[n++])&192)!==128?(n--,i.push(65533)):(o=(o&7)<<18|(c&63)<<12|(r&63)<<6|h&63,o-=65536,i.push((o>>10&1023)+55296,(o&1023)+56320))):i.push(65533),8192<=i.length&&(u=F(u,i),i.length=0);r=F(u,i)}return r}function _e(t,e,n){var r=t.g.i();for(r=t.g.g+r;t.g.gr?1:0)?-r:r,r===0?0<1/r?yt=bt=0:(bt=0,yt=2147483648):isNaN(r)?(bt=0,yt=2147483647):34028234663852886e22>>0):11754943508222875e-54>r?(r=Math.round(r/Math.pow(2,-149)),bt=0,yt=(n<<31|r)>>>0):(e=Math.floor(Math.log(r)/Math.LN2),r*=Math.pow(2,-e),r=Math.round(8388608*r),16777216<=r&&++e,bt=0,yt=(n<<31|e+127<<23|r&8388607)>>>0),n=yt,t.push(n>>>0&255),t.push(n>>>8&255),t.push(n>>>16&255),t.push(n>>>24&255)}}var Ee=typeof Uint8Array=="function";function je(t,e,n){if(t!=null)return typeof t=="object"?Ee&&t instanceof Uint8Array?n(t):Ae(t,e,n):e(t)}function Ae(t,e,n){if(Array.isArray(t)){for(var r=Array(t.length),i=0;i=t.l?t.i?t.i[e]:void 0:t.h[e+t.j]}function ee(t,e){var n=n===void 0?!1:n,r=J(t,e,n);return r==null&&(r=te),r===te&&(r=Yt([]),M(t,e,r,n)),r}function Te(t){var e=ee(t,3);if(t.m||(t.m={}),!t.m[3]){for(var n=0;n=t.l?(Se(t),t.i[e]=n):t.h[e+t.j]=n}function Re(t,e,n){if(n===-1)return null;if(t.g||(t.g={}),!t.g[n]){var r=J(t,n,!1);r&&(t.g[n]=new e(r))}return t.g[n]}function ne(t,e){t.g||(t.g={});var n=t.g[1];if(!n){var r=ee(t,1);n=[];for(var i=0;i{for(const C of m)if(C.type==="childList")for(const j of C.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&S(j)}).observe(document,{childList:!0,subtree:!0});function y(m){const C={};return m.integrity&&(C.integrity=m.integrity),m.referrerPolicy&&(C.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?C.credentials="include":m.crossOrigin==="anonymous"?C.credentials="omit":C.credentials="same-origin",C}function S(m){if(m.ep)return;m.ep=!0;const C=y(m);fetch(m.href,C)}})();const Sn=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.absolute{position:absolute}.relative{position:relative}.bottom-1{bottom:.25rem}.left-1{left:.25rem}.z-10{z-index:10}.inline{display:inline}.flex{display:flex}.hidden{display:none}.w-32{width:8rem}.w-full{width:100%}.items-end{align-items:flex-end}.rounded-lg{border-radius:.5rem}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.font-bold{font-weight:700}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb;--tw-content: ""}:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;margin:0;line-height:inherit} +`;function Bt(){}function He(a){return a()}function Ye(){return Object.create(null)}function ie(a){a.forEach(He)}function Je(a){return typeof a=="function"}function Tn(a,f){return a!=a?f==f:a!==f||a&&typeof a=="object"||typeof a=="function"}function Rn(a){return Object.keys(a).length===0}function wt(a,f){a.appendChild(f)}function Fn(a,f,y){const S=Mn(a);if(!S.getElementById(f)){const m=Ft("style");m.id=f,m.textContent=y,Ln(S,m)}}function Mn(a){if(!a)return document;const f=a.getRootNode?a.getRootNode():a.ownerDocument;return f&&f.host?f:a.ownerDocument}function Ln(a,f){return wt(a.head||a,f),f.sheet}function Cn(a,f,y){a.insertBefore(f,y||null)}function Ke(a){a.parentNode&&a.parentNode.removeChild(a)}function Ft(a){return document.createElement(a)}function Pn(a){return document.createTextNode(a)}function de(){return Pn(" ")}function Nn(a,f,y,S){return a.addEventListener(f,y,S),()=>a.removeEventListener(f,y,S)}function gt(a,f,y){y==null?a.removeAttribute(f):a.getAttribute(f)!==y&&a.setAttribute(f,y)}function Un(a){return Array.from(a.childNodes)}let Kt;function Ht(a){Kt=a}function In(){if(!Kt)throw new Error("Function called outside component initialization");return Kt}function Gn(a){In().$$.on_mount.push(a)}const Gt=[],Jt=[];let $t=[];const De=[],Bn=Promise.resolve();let pe=!1;function $n(){pe||(pe=!0,Bn.then(Ze))}function ve(a){$t.push(a)}const ge=new Set;let It=0;function Ze(){if(It!==0)return;const a=Kt;do{try{for(;Ita.indexOf(S)===-1?f.push(S):y.push(S)),y.forEach(S=>S()),$t=f}const Wn=new Set;function Xn(a,f){a&&a.i&&(Wn.delete(a),a.i(f))}function Yn(a,f,y,S){const{fragment:m,after_update:C}=a.$$;m&&m.m(f,y),S||ve(()=>{const j=a.$$.on_mount.map(He).filter(Je);a.$$.on_destroy?a.$$.on_destroy.push(...j):ie(j),a.$$.on_mount=[]}),C.forEach(ve)}function Dn(a,f){const y=a.$$;y.fragment!==null&&(Vn(y.after_update),ie(y.on_destroy),y.fragment&&y.fragment.d(f),y.on_destroy=y.fragment=null,y.ctx=[])}function Hn(a,f){a.$$.dirty[0]===-1&&(Gt.push(a),$n(),a.$$.dirty.fill(0)),a.$$.dirty[f/31|0]|=1<{const Q=it.length?it[0]:et;return O.ctx&&m(O.ctx[W],O.ctx[W]=Q)&&(!O.skip_bound&&O.bound[W]&&O.bound[W](Q),K&&Hn(a,W)),et}):[],O.update(),K=!0,ie(O.before_update),O.fragment=S?S(O.ctx):!1,f.target){if(f.hydrate){const W=Un(f.target);O.fragment&&O.fragment.l(W),W.forEach(Ke)}else O.fragment&&O.fragment.c();f.intro&&Xn(a.$$.fragment),Yn(a,f.target,f.anchor,f.customElement),Ze()}Ht(N)}class Kn{$destroy(){Dn(this,1),this.$destroy=Bt}$on(f,y){if(!Je(y))return Bt;const S=this.$$.callbacks[f]||(this.$$.callbacks[f]=[]);return S.push(y),()=>{const m=S.indexOf(y);m!==-1&&S.splice(m,1)}}$set(f){this.$$set&&!Rn(f)&&(this.$$.skip_bound=!0,this.$$set(f),this.$$.skip_bound=!1)}}var zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zn={};(function(){var a;function f(t){var e=0;return function(){return e>>0)+"_",i=0;return e}),C("Symbol.iterator",function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var e="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n"u"?!0:(typeof o=="function"?o=new o("unhandledrejection",{cancelable:!0}):typeof c=="function"?o=new c("unhandledrejection",{cancelable:!0}):(o=m.document.createEvent("CustomEvent"),o.initCustomEvent("unhandledrejection",!1,!0,o)),o.promise=this,o.reason=this.i,h(o))},e.prototype.A=function(){if(this.g!=null){for(var o=0;on&&(n=Math.max(n+i,0));n"u"||n.execScript("var "+t[0]);for(var r;t.length&&(r=t.shift());)t.length||e===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=e}function M(t,e){return e=String.fromCharCode.apply(null,e),t==null?e:t+e}var ot,d=typeof TextDecoder<"u",b,$=typeof TextEncoder<"u";function Z(t){if($)t=(b||(b=new TextEncoder)).encode(t);else{var e=void 0;e=e===void 0?!1:e;for(var n=0,r=new Uint8Array(3*t.length),i=0;iu)r[n++]=u;else{if(2048>u)r[n++]=u>>6|192;else{if(55296<=u&&57343>=u){if(56319>=u&&i=o){u=1024*(u-55296)+o-56320+65536,r[n++]=u>>18|240,r[n++]=u>>12&63|128,r[n++]=u>>6&63|128,r[n++]=u&63|128;continue}else i--}if(e)throw Error("Found an unpaired surrogate");u=65533}r[n++]=u>>12|224,r[n++]=u>>6&63|128}r[n++]=u&63|128}}t=r.subarray(0,n)}return t}var ct={},pt=null;function ft(t,e){e===void 0&&(e=0),Mt(),e=ct[e];for(var n=Array(Math.floor(t.length/3)),r=e[64]||"",i=0,u=0;i>2];o=e[(o&3)<<4|c>>4],c=e[(c&15)<<2|h>>6],h=e[h&63],n[u++]=g+o+c+h}switch(g=0,h=r,t.length-i){case 2:g=t[i+1],h=e[(g&15)<<2]||r;case 1:t=t[i],n[u]=e[t>>2]+e[(t&3)<<4|g>>4]+h+r}return n.join("")}function vt(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):"=.".indexOf(t[e-1])!=-1&&(n="=.".indexOf(t[e-2])!=-1?n-2:n-1);var r=new Uint8Array(n),i=0;return Wt(t,function(u){r[i++]=u}),r.subarray(0,i)}function Wt(t,e){function n(h){for(;r>4),o!=64&&(e(u<<4&240|o>>2),c!=64&&e(o<<6&192|c))}}function Mt(){if(!pt){pt={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));ct[n]=r;for(var i=0;ii&&128<=e;i++)e=t.h[t.g++],n|=(e&127)<<7*i;if(128<=e&&(e=t.h[t.g++],n|=(e&127)<<28,r|=(e&127)>>4),128<=e)for(i=0;5>i&&128<=e;i++)e=t.h[t.g++],r|=(e&127)<<7*i+3;if(128>e)return t=n>>>0,e=r>>>0,(r=e&2147483648)&&(t=~t+1>>>0,e=~e>>>0,t==0&&(e=e+1>>>0)),t=4294967296*e+(t>>>0),r?-t:t;t.m=!0}Lt.prototype.i=function(){var t=this.h,e=t[this.g],n=e&127;return 128>e?(this.g+=1,n):(e=t[this.g+1],n|=(e&127)<<7,128>e?(this.g+=2,n):(e=t[this.g+2],n|=(e&127)<<14,128>e?(this.g+=3,n):(e=t[this.g+3],n|=(e&127)<<21,128>e?(this.g+=4,n):(e=t[this.g+4],n|=(e&15)<<28,128>e?(this.g+=5,n>>>0):(this.g+=5,128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&128<=t[this.g++]&&this.g++,n)))))},Lt.prototype.o=function(){var t=this.h[this.g],e=this.h[this.g+1],n=this.h[this.g+2],r=this.h[this.g+3];return this.g+=4,n=(t<<0|e<<8|n<<16|r<<24)>>>0,t=2*(n>>31)+1,e=n>>>23&255,n&=8388607,e==255?n?NaN:1/0*t:e==0?t*Math.pow(2,-149)*n:t*Math.pow(2,e-150)*(n+Math.pow(2,23))};var be=[];function Qt(){this.g=new Uint8Array(64),this.h=0}Qt.prototype.push=function(t){if(!(this.h+1>>=7;t.push(e)}function Xt(t){var e={},n=e.N===void 0?!1:e.N;this.o={v:e.v===void 0?!1:e.v},this.N=n,e=this.o,be.length?(n=be.pop(),e&&(n.v=e.v),t&&we(n,t),t=n):t=new Lt(t,e),this.g=t,this.m=this.g.g,this.h=this.i=this.l=-1,this.j=!1}Xt.prototype.reset=function(){this.g.reset(),this.h=this.l=-1};function mt(t){var e=t.g;if((e=e.g==e.j)||(e=t.j)||(e=t.g,e=e.m||0>e.g||e.g>e.j),e)return!1;t.m=t.g.g,e=t.g.i();var n=e&7;return n!=0&&n!=5&&n!=1&&n!=2&&n!=3&&n!=4?(t.j=!0,!1):(t.i=e,t.l=e>>>3,t.h=n,!0)}function Ct(t){switch(t.h){case 0:if(t.h!=0)Ct(t);else{for(t=t.g;t.h[t.g]&128;)t.g++;t.g++}break;case 1:t.h!=1?Ct(t):(t=t.g,t.g+=8);break;case 2:if(t.h!=2)Ct(t);else{var e=t.g.i();t=t.g,t.g+=e}break;case 5:t.h!=5?Ct(t):(t=t.g,t.g+=4);break;case 3:e=t.l;do{if(!mt(t)){t.j=!0;break}if(t.h==4){t.l!=e&&(t.j=!0);break}Ct(t)}while(1);break;default:t.j=!0}}function qt(t,e,n){var r=t.g.j,i=t.g.i(),u=t.g.g+i;if(t.g.j=u,n(e,t),n=u-t.g.g,n!==0)throw Error("Message parsing ended unexpectedly. Expected to read "+i+" bytes, instead read "+(i-n)+" bytes, either the data ended unexpectedly or the message misreported its own length");return t.g.g=u,t.g.j=r,e}function lt(t){return t.g.o()}function xe(t){var e=t.g.i();t=t.g;var n=t.g;t.g+=e,t=t.h;var r;if(d)(r=ot)||(r=ot=new TextDecoder("utf-8",{fatal:!1})),r=r.decode(t.subarray(n,n+e));else{e=n+e;for(var i=[],u=null,o,c,h;no?i.push(o):224>o?n>=e?i.push(65533):(c=t[n++],194>o||(c&192)!==128?(n--,i.push(65533)):i.push((o&31)<<6|c&63)):240>o?n>=e-1?i.push(65533):(c=t[n++],(c&192)!==128||o===224&&160>c||o===237&&160<=c||((r=t[n++])&192)!==128?(n--,i.push(65533)):i.push((o&15)<<12|(c&63)<<6|r&63)):244>=o?n>=e-2?i.push(65533):(c=t[n++],(c&192)!==128||(o<<28)+(c-144)>>30||((r=t[n++])&192)!==128||((h=t[n++])&192)!==128?(n--,i.push(65533)):(o=(o&7)<<18|(c&63)<<12|(r&63)<<6|h&63,o-=65536,i.push((o>>10&1023)+55296,(o&1023)+56320))):i.push(65533),8192<=i.length&&(u=M(u,i),i.length=0);r=M(u,i)}return r}function _e(t,e,n){var r=t.g.i();for(r=t.g.g+r;t.g.gr?1:0)?-r:r,r===0?0<1/r?yt=bt=0:(bt=0,yt=2147483648):isNaN(r)?(bt=0,yt=2147483647):34028234663852886e22>>0):11754943508222875e-54>r?(r=Math.round(r/Math.pow(2,-149)),bt=0,yt=(n<<31|r)>>>0):(e=Math.floor(Math.log(r)/Math.LN2),r*=Math.pow(2,-e),r=Math.round(8388608*r),16777216<=r&&++e,bt=0,yt=(n<<31|e+127<<23|r&8388607)>>>0),n=yt,t.push(n>>>0&255),t.push(n>>>8&255),t.push(n>>>16&255),t.push(n>>>24&255)}}var Ee=typeof Uint8Array=="function";function je(t,e,n){if(t!=null)return typeof t=="object"?Ee&&t instanceof Uint8Array?n(t):Ae(t,e,n):e(t)}function Ae(t,e,n){if(Array.isArray(t)){for(var r=Array(t.length),i=0;i=t.l?t.i?t.i[e]:void 0:t.h[e+t.j]}function ee(t,e){var n=n===void 0?!1:n,r=J(t,e,n);return r==null&&(r=te),r===te&&(r=Yt([]),L(t,e,r,n)),r}function Te(t){var e=ee(t,3);if(t.m||(t.m={}),!t.m[3]){for(var n=0;n=t.l?(Se(t),t.i[e]=n):t.h[e+t.j]=n}function Re(t,e,n){if(n===-1)return null;if(t.g||(t.g={}),!t.g[n]){var r=J(t,n,!1);r&&(t.g[n]=new e(r))}return t.g[n]}function ne(t,e){t.g||(t.g={});var n=t.g[1];if(!n){var r=ee(t,1);n=[];for(var i=0;iU,U=Math.abs(U);var G=U>>>0;for(U=Math.floor((U-G)/4294967296),U>>>=0,I&&(U=~U>>>0,G=(~G>>>0)+1,4294967295>>7|G<<25)>>>0,G>>>=7;R.push(I)}if(ae(A,N),tt=se(tt),Y.call(rt,at,tt),P.O)for(rt=0;rtU;U++)I.push(G&127|128),G>>=7;I.push(1)}ht(R,2,J(N,2)),I=J(N,3),I!=null&&(I=Z(I),xt(R.g,26),xt(R.g,I.length),Ct(R,R.g.end()),Ct(R,I)),I=J(N,4),I!=null&&(I=Z(I),xt(R.g,34),xt(R.g,I.length),Ct(R,R.g.end()),Ct(R,I)),ae(N,R),A=se(A),at.call(Y,tt,A)}}v=v.data;break t;default:v={}}}switch(x=v,V=g.stream,g.type){case"video":u.pushTexture2d(Object.assign(Object.assign({},x),{stream:V,timestamp:i}));break;case"detections":T=x,T.stream=V,T.timestamp=i,u.pushDetectionList(T);break;default:throw Error("Unknown input config type: '"+g.type+"'")}}return r.i.send(u),D(E,r.C,4);case 4:u.delete(),E.g=0}})})};function _n(t,e,n){return st(t,function r(){var i,u,o,c,h,g,x=this,V,T,E,v,_,S,P,rt;return X(r,function(Y){switch(Y.g){case 1:if(!n)return Y.return(e);for(i={},u=0,o=$(Object.keys(n)),c=o.next();!c.done;c=o.next())h=c.value,g=n[h],typeof g!="string"&&g.type==="texture"&&e[g.stream]!==void 0&&++u;1>>0)+"_",F=0;return l}),m("Symbol.iterator",function(s){if(s)return s;s=Symbol("Symbol.iterator");for(var l="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),w=0;w"u"?!0:(typeof d=="function"?d=new d("unhandledrejection",{cancelable:!0}):typeof b=="function"?d=new b("unhandledrejection",{cancelable:!0}):(d=O.document.createEvent("CustomEvent"),d.initCustomEvent("unhandledrejection",!1,!0,d)),d.promise=this,d.reason=this.i,B(d))},l.prototype.H=function(){if(this.g!=null){for(var d=0;d"u"||q.execScript("var "+H[0]);for(var X;H.length&&(X=H.shift());)H.length||D===void 0?q[X]&&q[X]!==Object.prototype[X]?q=q[X]:q=q[X]={}:q[X]=D}).call(zt);const qn=[33,7,163,144,145,153,154,155,133,173,157,157,158,159,160,161,246],t1=[263,249,390,373,374,380,381,382,362,398,384,384,385,386,387,388,466],e1=[156,70,63,105,66,107],n1=[383,300,293,334,296,336],r1=[78,191,80,81,82,13,312,311,310,415,308,324,318,402,317,14,87,178,88,95,78],i1=[61,185,40,39,37,0,267,269,270,409,291,375,321,405,314,17,84,181,91,146],o1=[6,197,195,5,4],s1=[98,97,2,328,327],a1=[454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234];function u1(a){Fn(a,"svelte-39b13y","canvas.svelte-39b13y{border-radius:0.5rem;--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y{z-index:10;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(248 250 252 / var(--tw-bg-opacity));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254 / var(--tw-bg-opacity))}.container.svelte-39b13y *{color:black !important}")}function c1(a){let f,y,O,m,L,j,$,z,C,K,W;return{c(){f=Ft("div"),y=Ft("video"),O=de(),m=Ft("canvas"),L=de(),j=Ft("div"),$=Ft("button"),$.textContent="Snap",z=de(),C=Ft("canvas"),gt(y,"class","hidden"),y.muted=!0,y.playsInline=!0,gt(m,"width","720px"),gt(m,"height","720px"),gt(m,"class","w-full svelte-39b13y"),gt($,"class","capture-btn svelte-39b13y"),gt(C,"width","720px"),gt(C,"height","720px"),gt(C,"class","w-32 svelte-39b13y"),gt(j,"class","flex absolute bottom-1 left-1 items-end"),gt(f,"class","relative container svelte-39b13y")},m(et,ot){Pn(et,f,ot),wt(f,y),a[4](y),wt(f,O),wt(f,m),a[5](m),wt(f,L),wt(f,j),wt(j,$),wt(j,z),wt(j,C),a[6](C),K||(W=Nn($,"click",a[3]),K=!0)},p:Bt,i:Bt,o:Bt,d(et){et&&Ke(f),a[4](null),a[5](null),a[6](null),K=!1,W()}}}function l1(a,f,y){const O=Zn.FaceMesh||window.FaceMesh,m=Qn.Camera||window.Camera;let L,j,$,z,C,K,W,et,ot="landmarks",Q=ut;Gn(()=>{if(et=document.getElementById("canvas-root"),et._data||(et._data={image:null}),et.dataset.mode){const q=et.dataset.mode;ot=q,Q=q==="points"?kt:ut}$=j.getContext("2d"),K=document.createElement("canvas"),W=K.getContext("2d"),K.width=j.width,K.height=j.height;const k=new O({locateFile:q=>`https://cdn.jsdelivr.net/npm/@mediapipe/face_mesh/${q}`});k.setOptions({maxNumFaces:1,refineLandmarks:!0,minDetectionConfidence:.5,minTrackingConfidence:.5}),k.onResults(Et),new m(L,{onFrame:async()=>{await k.send({image:L})},width:720,height:720}).start()});function ut(k,H,q,X="lime",s=4,l=!1){k.save(),k.beginPath(),k.strokeStyle=X,k.fillStyle=X,k.lineWidth=s;for(const[w,p]of q.entries()){const F=H[p];w===0?k.moveTo(F.x*j.width,F.y*j.height):k.lineTo(F.x*j.width,F.y*j.height)}l?(k.closePath(),k.fill()):k.stroke(),k.restore()}function kt(k,H,q,X="black",s=4,l=!1){k.save(),X="black",k.strokeStyle=X;for(const[w,p]of q.entries()){const F=H[p];k.beginPath(),k.ellipse(F.x*j.width,F.y*j.height,2.5,2.5,0,0,2*Math.PI),k.closePath(),k.stroke(),k.fill()}k.restore()}function Et(k){if($.save(),$.clearRect(0,0,j.width,j.height),$.drawImage(k.image,0,0,j.width,j.height),W.clearRect(0,0,K.width,K.height),k.multiFaceLandmarks)for(const H of k.multiFaceLandmarks)Q(W,H,t1,"magenta",8,!0),Q(W,H,qn,"magenta",8,!0),Q(W,H,e1,"yellow",8,!1),Q(W,H,n1,"yellow",8,!1),Q(W,H,i1,"cyan",8,!0),Q(W,H,r1,"blue",8,!0),Q(W,H,o1,"orange",8,!1),Q(W,H,s1,"orange",8,!1),Q(W,H,a1,"lime",8,!1);$.drawImage(K,0,0,j.width,j.height)}function jt(){C=z.getContext("2d"),C.fillStyle=ot==="landmarks"?"black":"white",C.fillRect(0,0,z.width,z.height),C.drawImage(K,0,0,z.width,z.height),et._data.image=z.toDataURL()}function D(k){Jt[k?"unshift":"push"](()=>{L=k,y(0,L)})}function At(k){Jt[k?"unshift":"push"](()=>{j=k,y(1,j)})}function Vt(k){Jt[k?"unshift":"push"](()=>{z=k,y(2,z)})}return[L,j,z,jt,D,At,Vt]}class f1 extends Kn{constructor(f){super(),Jn(this,f,l1,c1,Tn,{},u1)}}class h1 extends HTMLElement{constructor(){super()}connectedCallback(){const f=this.attachShadow({mode:"open"}),y=document.createElement("style");y.appendChild(document.createTextNode(Sn)),f.appendChild(y),new f1({target:f})}}customElements.define("face-canvas",h1); +`+n.getProgramInfoLog(u));r=t.m=u,n.useProgram(r),i=n.getUniformLocation(r,"sampler0"),t.j={I:n.getAttribLocation(r,"aVertex"),H:n.getAttribLocation(r,"aTex"),da:i},t.s=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,t.s),n.enableVertexAttribArray(t.j.I),n.vertexAttribPointer(t.j.I,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),t.o=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,t.o),n.enableVertexAttribArray(t.j.H),n.vertexAttribPointer(t.j.H,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.uniform1i(i,0)}r=t.j,n.useProgram(t.m),n.canvas.width=e.width,n.canvas.height=e.height,n.viewport(0,0,e.width,e.height),n.activeTexture(n.TEXTURE0),t.h.bindTexture2d(e.glName),n.enableVertexAttribArray(r.I),n.bindBuffer(n.ARRAY_BUFFER,t.s),n.vertexAttribPointer(r.I,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(r.H),n.bindBuffer(n.ARRAY_BUFFER,t.o),n.vertexAttribPointer(r.H,2,n.FLOAT,!1,0,0),n.bindFramebuffer(n.DRAW_FRAMEBUFFER?n.DRAW_FRAMEBUFFER:n.FRAMEBUFFER,null),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.colorMask(!0,!0,!0,!0),n.drawArrays(n.TRIANGLE_FAN,0,4),n.disableVertexAttribArray(r.I),n.disableVertexAttribArray(r.H),n.bindBuffer(n.ARRAY_BUFFER,null),t.h.bindTexture2d(0)}function dn(t){this.g=t}var gn=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function pn(t,e){return e+t}function Ie(t,e){window[t]=e}function vn(t){var e=document.createElement("script");return e.setAttribute("src",t),e.setAttribute("crossorigin","anonymous"),new Promise(function(n){e.addEventListener("load",function(){n()},!1),e.addEventListener("error",function(){n()},!1),document.body.appendChild(e)})}function yn(){return st(this,function t(){return X(t,function(e){switch(e.g){case 1:return e.m=2,D(e,WebAssembly.instantiate(gn),4);case 4:e.g=3,e.m=0;break;case 2:return e.m=0,e.j=null,e.return(!1);case 3:return e.return(!0)}})})}function fe(t){if(this.g=t,this.listeners={},this.j={},this.F={},this.m={},this.s={},this.G=this.o=this.R=!0,this.C=Promise.resolve(),this.P="",this.B={},this.locateFile=t&&t.locateFile||pn,typeof window=="object")var e=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else if(typeof location<"u")e=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/";else throw Error("solutions can only be loaded on a web page or in a web worker");if(this.S=e,t.options){e=z(Object.keys(t.options));for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=t.options[n].default;r!==void 0&&(this.j[n]=typeof r=="function"?r():r)}}}a=fe.prototype,a.close=function(){return this.i&&this.i.delete(),Promise.resolve()};function mn(t,e){return t.g.files===void 0?[]:typeof t.g.files=="function"?t.g.files(e):t.g.files}function wn(t){return st(t,function e(){var n=this,r,i,u,o,c,h,g,x,V,R,E;return X(e,function(v){switch(v.g){case 1:return r=n,n.R?(i=mn(n,n.j),D(v,yn(),2)):v.return();case 2:if(u=v.h,typeof window=="object")return Ie("createMediapipeSolutionsWasm",{locateFile:n.locateFile}),Ie("createMediapipeSolutionsPackedAssets",{locateFile:n.locateFile}),h=i.filter(function(_){return _.data!==void 0}),g=i.filter(function(_){return _.data===void 0}),x=Promise.all(h.map(function(_){var T=he(r,_.url);if(_.path!==void 0){var P=_.path;T=T.then(function(rt){return r.overrideFile(P,rt),Promise.resolve(rt)})}return T})),V=Promise.all(g.map(function(_){return _.simd===void 0||_.simd&&u||!_.simd&&!u?vn(r.locateFile(_.url,r.S)):Promise.resolve()})).then(function(){return st(r,function _(){var T,P,rt=this;return X(_,function(Y){if(Y.g==1)return T=window.createMediapipeSolutionsWasm,P=window.createMediapipeSolutionsPackedAssets,D(Y,T(P),2);rt.h=Y.h,Y.g=0})})}),R=function(){return st(r,function _(){var T=this;return X(_,function(P){return T.g.graph&&T.g.graph.url?P=D(P,he(T,T.g.graph.url),0):(P.g=0,P=void 0),P})})}(),D(v,Promise.all([V,x,R]),7);if(typeof importScripts!="function")throw Error("solutions can only be loaded on a web page or in a web worker");return o=i.filter(function(_){return _.simd===void 0||_.simd&&u||!_.simd&&!u}).map(function(_){return r.locateFile(_.url,r.S)}),importScripts.apply(null,N(o)),D(v,createMediapipeSolutionsWasm(Module),6);case 6:n.h=v.h,n.l=new OffscreenCanvas(1,1),n.h.canvas=n.l,c=n.h.GL.createContext(n.l,{antialias:!1,alpha:!1,ba:typeof WebGL2RenderingContext<"u"?2:1}),n.h.GL.makeContextCurrent(c),v.g=4;break;case 7:if(n.l=document.createElement("canvas"),E=n.l.getContext("webgl2",{}),!E&&(E=n.l.getContext("webgl",{}),!E))return alert("Failed to create WebGL canvas context when passing video frame."),v.return();n.D=E,n.h.canvas=n.l,n.h.createContext(n.l,!0,!0,{});case 4:n.i=new n.h.SolutionWasm,n.R=!1,v.g=0}})})}function bn(t){return st(t,function e(){var n=this,r,i,u,o,c,h,g,x;return X(e,function(V){if(V.g==1){if(n.g.graph&&n.g.graph.url&&n.P===n.g.graph.url)return V.return();if(n.o=!0,!n.g.graph||!n.g.graph.url){V.g=2;return}return n.P=n.g.graph.url,D(V,he(n,n.g.graph.url),3)}for(V.g!=2&&(r=V.h,n.i.loadGraph(r)),i=z(Object.keys(n.B)),u=i.next();!u.done;u=i.next())o=u.value,n.i.overrideFile(o,n.B[o]);if(n.B={},n.g.listeners)for(c=z(n.g.listeners),h=c.next();!h.done;h=c.next())g=h.value,En(n,g);x=n.j,n.j={},n.setOptions(x),V.g=0})})}a.reset=function(){return st(this,function t(){var e=this;return X(t,function(n){e.i&&(e.i.reset(),e.m={},e.s={}),n.g=0})})},a.setOptions=function(t,e){var n=this;if(e=e||this.g.options){for(var r=[],i=[],u={},o=z(Object.keys(t)),c=o.next();!c.done;u={K:u.K,L:u.L},c=o.next()){var h=c.value;h in this.j&&this.j[h]===t[h]||(this.j[h]=t[h],c=e[h],c!==void 0&&(c.onChange&&(u.K=c.onChange,u.L=t[h],r.push(function(g){return function(){return st(n,function x(){var V,R=this;return X(x,function(E){if(E.g==1)return D(E,g.K(g.L),2);V=E.h,V===!0&&(R.o=!0),E.g=0})})}}(u))),c.graphOptionXref&&(h={valueNumber:c.type===1?t[h]:0,valueBoolean:c.type===0?t[h]:!1,valueString:c.type===2?t[h]:""},c=Object.assign(Object.assign(Object.assign({},{calculatorName:"",calculatorIndex:0}),c.graphOptionXref),h),i.push(c))))}(r.length!==0||i.length!==0)&&(this.o=!0,this.A=(this.A===void 0?[]:this.A).concat(i),this.u=(this.u===void 0?[]:this.u).concat(r))}};function xn(t){return st(t,function e(){var n=this,r,i,u,o,c,h,g;return X(e,function(x){switch(x.g){case 1:if(!n.o)return x.return();if(!n.u){x.g=2;break}r=z(n.u),i=r.next();case 3:if(i.done){x.g=5;break}return u=i.value,D(x,u(),4);case 4:i=r.next(),x.g=3;break;case 5:n.u=void 0;case 2:if(n.A){for(o=new n.h.GraphOptionChangeRequestList,c=z(n.A),h=c.next();!h.done;h=c.next())g=h.value,o.push_back(g);n.i.changeOptions(o),o.delete(),n.A=void 0}n.o=!1,x.g=0}})})}a.initialize=function(){return st(this,function t(){var e=this;return X(t,function(n){return n.g==1?D(n,wn(e),2):n.g!=3?D(n,bn(e),3):D(n,xn(e),0)})})};function he(t,e){return st(t,function n(){var r=this,i,u;return X(n,function(o){return e in r.F?o.return(r.F[e]):(i=r.locateFile(e,""),u=fetch(i).then(function(c){return c.arrayBuffer()}),r.F[e]=u,o.return(u))})})}a.overrideFile=function(t,e){this.i?this.i.overrideFile(t,e):this.B[t]=e},a.clearOverriddenFiles=function(){this.B={},this.i&&this.i.clearOverriddenFiles()},a.send=function(t,e){return st(this,function n(){var r=this,i,u,o,c,h,g,x,V,R;return X(n,function(E){switch(E.g){case 1:return r.g.inputs?(i=1e3*(e??performance.now()),D(E,r.C,2)):E.return();case 2:return D(E,r.initialize(),3);case 3:for(u=new r.h.PacketDataList,o=z(Object.keys(t)),c=o.next();!c.done;c=o.next())if(h=c.value,g=r.g.inputs[h]){t:{var v=r,_=t[h];switch(g.type){case"video":var T=v.m[g.stream];if(T||(T=new le(v.h,v.D),v.m[g.stream]=T),v=T,v.l===0&&(v.l=v.h.createTexture()),typeof HTMLVideoElement<"u"&&_ instanceof HTMLVideoElement){var P=_.videoWidth;T=_.videoHeight}else typeof HTMLImageElement<"u"&&_ instanceof HTMLImageElement?(P=_.naturalWidth,T=_.naturalHeight):(P=_.width,T=_.height);T={glName:v.l,width:P,height:T},P=v.g,P.canvas.width=T.width,P.canvas.height=T.height,P.activeTexture(P.TEXTURE0),v.h.bindTexture2d(v.l),P.texImage2D(P.TEXTURE_2D,0,P.RGBA,P.RGBA,P.UNSIGNED_BYTE,_),v.h.bindTexture2d(0),v=T;break t;case"detections":for(T=v.m[g.stream],T||(T=new dn(v.h),v.m[g.stream]=T),v=T,v.data||(v.data=new v.g.DetectionListData),v.data.reset(_.length),T=0;T<_.length;++T){P=_[T];var rt=v.data,Y=rt.setBoundingBox,at=T,tt=P.T,A=new ce;L(A,1,tt.Z),L(A,2,tt.$),L(A,3,tt.height),L(A,4,tt.width),L(A,5,tt.rotation),L(A,6,tt.X);var U=tt=new oe;ht(U,1,J(A,1)),ht(U,2,J(A,2)),ht(U,3,J(A,3)),ht(U,4,J(A,4)),ht(U,5,J(A,5));var G=J(A,6);if(G!=null&&G!=null){xt(U.g,48);var F=U.g,I=G;G=0>I,I=Math.abs(I);var B=I>>>0;for(I=Math.floor((I-B)/4294967296),I>>>=0,G&&(I=~I>>>0,B=(~B>>>0)+1,4294967295>>7|B<<25)>>>0,B>>>=7;F.push(G)}if(ae(A,U),tt=se(tt),Y.call(rt,at,tt),P.O)for(rt=0;rtI;I++)G.push(B&127|128),B>>=7;G.push(1)}ht(F,2,J(U,2)),G=J(U,3),G!=null&&(G=Z(G),xt(F.g,26),xt(F.g,G.length),Pt(F,F.g.end()),Pt(F,G)),G=J(U,4),G!=null&&(G=Z(G),xt(F.g,34),xt(F.g,G.length),Pt(F,F.g.end()),Pt(F,G)),ae(U,F),A=se(A),at.call(Y,tt,A)}}v=v.data;break t;default:v={}}}switch(x=v,V=g.stream,g.type){case"video":u.pushTexture2d(Object.assign(Object.assign({},x),{stream:V,timestamp:i}));break;case"detections":R=x,R.stream=V,R.timestamp=i,u.pushDetectionList(R);break;default:throw Error("Unknown input config type: '"+g.type+"'")}}return r.i.send(u),D(E,r.C,4);case 4:u.delete(),E.g=0}})})};function _n(t,e,n){return st(t,function r(){var i,u,o,c,h,g,x=this,V,R,E,v,_,T,P,rt;return X(r,function(Y){switch(Y.g){case 1:if(!n)return Y.return(e);for(i={},u=0,o=z(Object.keys(n)),c=o.next();!c.done;c=o.next())h=c.value,g=n[h],typeof g!="string"&&g.type==="texture"&&e[g.stream]!==void 0&&++u;1>>0)+"_",M=0;return l}),m("Symbol.iterator",function(s){if(s)return s;s=Symbol("Symbol.iterator");for(var l="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),w=0;w"u"?!0:(typeof d=="function"?d=new d("unhandledrejection",{cancelable:!0}):typeof b=="function"?d=new b("unhandledrejection",{cancelable:!0}):(d=S.document.createEvent("CustomEvent"),d.initCustomEvent("unhandledrejection",!1,!0,d)),d.promise=this,d.reason=this.i,$(d))},l.prototype.H=function(){if(this.g!=null){for(var d=0;d"u"||q.execScript("var "+H[0]);for(var X;H.length&&(X=H.shift());)H.length||D===void 0?q[X]&&q[X]!==Object.prototype[X]?q=q[X]:q=q[X]={}:q[X]=D}).call(zt);const qn=[33,7,163,144,145,153,154,155,133,173,157,157,158,159,160,161,246],t1=[263,249,390,373,374,380,381,382,362,398,384,384,385,386,387,388,466],e1=[156,70,63,105,66,107],n1=[383,300,293,334,296,336],r1=[78,191,80,81,82,13,312,311,310,415,308,324,318,402,317,14,87,178,88,95,78],i1=[61,185,40,39,37,0,267,269,270,409,291,375,321,405,314,17,84,181,91,146],o1=[6,197,195,5,4],s1=[98,97,2,328,327],a1=[454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234];function u1(a){Fn(a,"svelte-39b13y","canvas.svelte-39b13y{border-radius:0.5rem;--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y{z-index:10;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(248 250 252 / var(--tw-bg-opacity));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity));--tw-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.capture-btn.svelte-39b13y:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254 / var(--tw-bg-opacity))}.container.svelte-39b13y *{color:black !important}")}function c1(a){let f,y,S,m,C,j,z,N,O,K,W;return{c(){f=Ft("div"),y=Ft("video"),S=de(),m=Ft("canvas"),C=de(),j=Ft("div"),z=Ft("button"),z.textContent="Snap",N=de(),O=Ft("canvas"),gt(y,"class","hidden"),y.muted=!0,y.playsInline=!0,gt(m,"width","720px"),gt(m,"height","720px"),gt(m,"class","w-full svelte-39b13y"),gt(z,"class","capture-btn svelte-39b13y"),gt(O,"width","720px"),gt(O,"height","720px"),gt(O,"class","w-32 svelte-39b13y"),gt(j,"class","flex absolute bottom-1 left-1 items-end"),gt(f,"class","relative container svelte-39b13y")},m(et,it){Cn(et,f,it),wt(f,y),a[4](y),wt(f,S),wt(f,m),a[5](m),wt(f,C),wt(f,j),wt(j,z),wt(j,N),wt(j,O),a[6](O),K||(W=Nn(z,"click",a[3]),K=!0)},p:Bt,i:Bt,o:Bt,d(et){et&&Ke(f),a[4](null),a[5](null),a[6](null),K=!1,W()}}}function l1(a,f,y){const S=Zn.FaceMesh||window.FaceMesh,m=Qn.Camera||window.Camera;let C,j,z,N,O,K,W,et,it="landmarks",Q=ut;Gn(()=>{if(et=document.getElementById("canvas-root"),et._data||(et._data={image:null}),et.dataset.mode){const q=et.dataset.mode;it=q,Q=q==="points"?kt:ut}z=j.getContext("2d"),K=document.createElement("canvas"),W=K.getContext("2d"),K.width=j.width,K.height=j.height;const k=new S({locateFile:q=>`https://cdn.jsdelivr.net/npm/@mediapipe/face_mesh/${q}`});k.setOptions({maxNumFaces:1,refineLandmarks:!0,minDetectionConfidence:.5,minTrackingConfidence:.5}),k.onResults(Et),new m(C,{onFrame:async()=>{await k.send({image:C})},width:720,height:720}).start()});function ut(k,H,q,X="lime",s=4,l=!1){k.save(),k.beginPath(),k.strokeStyle=X,k.fillStyle=X,k.lineWidth=s;for(const[w,p]of q.entries()){const M=H[p];w===0?k.moveTo(M.x*j.width,M.y*j.height):k.lineTo(M.x*j.width,M.y*j.height)}l?(k.closePath(),k.fill()):k.stroke(),k.restore()}function kt(k,H,q,X="black",s=4,l=!1){k.save(),X="black",k.strokeStyle=X;for(const[w,p]of q.entries()){const M=H[p];k.beginPath(),k.ellipse(M.x*j.width,M.y*j.height,2.5,2.5,0,0,2*Math.PI),k.closePath(),k.stroke(),k.fill()}k.restore()}function Et(k){if(z.save(),z.clearRect(0,0,j.width,j.height),z.drawImage(k.image,0,0,j.width,j.height),W.clearRect(0,0,K.width,K.height),k.multiFaceLandmarks)for(const H of k.multiFaceLandmarks)Q(W,H,t1,"magenta",8,!0),Q(W,H,qn,"magenta",8,!0),Q(W,H,e1,"yellow",8,!1),Q(W,H,n1,"yellow",8,!1),Q(W,H,i1,"cyan",8,!0),Q(W,H,r1,"blue",8,!0),Q(W,H,o1,"orange",8,!1),Q(W,H,s1,"orange",8,!1),Q(W,H,a1,"lime",8,!1);z.drawImage(K,0,0,j.width,j.height)}function jt(){O=N.getContext("2d"),O.save(),O.fillStyle=it==="landmarks"?"black":"white",O.fillRect(0,0,N.width,N.height),O.drawImage(K,0,0,N.width,N.height),it==="points"&&(O.globalCompositeOperation="difference",O.fillStyle="white",O.fillRect(0,0,N.width,N.height),O.drawImage(K,0,0,N.width,N.height)),O.restore(),et._data.image=N.toDataURL()}function D(k){Jt[k?"unshift":"push"](()=>{C=k,y(0,C)})}function At(k){Jt[k?"unshift":"push"](()=>{j=k,y(1,j)})}function Vt(k){Jt[k?"unshift":"push"](()=>{N=k,y(2,N)})}return[C,j,N,jt,D,At,Vt]}class f1 extends Kn{constructor(f){super(),Jn(this,f,l1,c1,Tn,{},u1)}}class h1 extends HTMLElement{constructor(){super()}connectedCallback(){const f=this.attachShadow({mode:"open"}),y=document.createElement("style");y.appendChild(document.createTextNode(Sn)),f.appendChild(y),new f1({target:f})}}customElements.define("face-canvas",h1);