text:  /**
   * Jeeliz Face Filter - https://github.com/jeeliz/jeelizFaceFilter
   *
   * Copyright 2018 Jeeliz ( https://jeeliz.com )
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
  */
  
  var JEEFACEFILTERAPI=(function(){window.JEEFACEFILTERAPIGEN=function(){function Cb(a){var c=null,d=null,e=null,h=0;this.o=function(g){this.ce(g.Pa);e.pd({Db:g.Db,Ab:g.Ab})};this.Fd=function(g){return c[g]};this.ce=function(g){var t=null;h=g.length;c=g.map(function(n,f){n=Object.assign({},n,{index:f,parent:this,Va:t,Nd:f===h-1});return t=f=0===f?Qb.instance(n):Rb.instance(n)});d=c[0];e=c[h-1];c.forEach(function(n,f){0!==f&&n.Yd()})};this.J=function(g,t){var n=t;c.forEach(function(f){n=f.J(n,g)});return n};this.nc=function(){return d.B()};
  this.qc=function(){return e.Gd()};this.mc=function(){return e.mc()};this.h=function(){c&&(c.forEach(function(g){g.h()}),e=d=c=null,h=0)};"undefined"!==typeof a&&this.o(a)}var Na,Oa,Pa,Ya,Za,Qa,$a,ab,bb,kb,lb,mb,nb;function ob(a,c){var d=c%8;return a[(c-d)/8]>>7-d&1}function Sb(a){var c=JSON.parse(a);a=c.ne;var d=c.nf,e=c.n;var h="undefined"===typeof btoa?Buffer.from(c.data,"base64").toString("latin1"):atob(c.data);var g=h.length;c=new Uint8Array(g);for(var t=0;t<g;++t)c[t]=h.charCodeAt(t);h=new Float32Array(e);
  g=new Float32Array(d);t=a+d+1;for(var n=0;n<e;++n){for(var f=t*n,x=0===ob(c,f)?1:-1,B=f+1,k=1,w=0,l=B+a-1;l>=B;--l)w+=k*ob(c,l),k*=2;B=w;f=f+1+a;k=g.length;w=0;for(l=f;l<f+k;++l)g[w]=ob(c,l,!0),++w;for(k=f=0;k<d;++k)f+=g[k]*Math.pow(2,-k-1);h[n]=0===f&&0===B?0:x*(1+f)*Math.pow(2,1+B-Math.pow(2,a-1))}return h}function cb(){return-1!==[ba.ready,ba.play,ba.pause].indexOf(ia)}function Tb(a){if(ia!==ba.pause){var c=ia===ba.play?L.Ca:W.ad;db=setTimeout(Db.bind(null,a),c)}}function pb(){if(ia===ba.play)return!1;
  ia=ba.play;Ra&&window.cancelAnimationFrame(Ra);Db(0)}function Eb(){if(ia!==ba.play)return!1;db&&(clearTimeout(db),db=null);Ra&&(window.cancelAnimationFrame(Ra),Ra=null);ia=ba.pause;return!0}function Da(a,c,d,e,h){a=4*(3*c+a)+d;return e+(X.buffer[a]/255+X.buffer[a+12]/65025)*(h-e)}function qb(){b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!1);sa.X();S.reset();T.reset();z.I();z.$b();b.disable(b.DEPTH_TEST);b.disable(b.BLEND);S.sa();z.ma()}function Db(){if(ia!==ba.pause){z.$b();S.reset();S.sa();b.disable(b.DEPTH_TEST);
  b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!1);sa.X();z.ma();if(!y.vb)a:{if(y.ub){if(!y.element.needsUpdate)break a;y.ba.se(y.element.arrayBuffer);y.element.needsUpdate=!1}else{var a=y.element.currentTime,c=a-y.Wa;0>c&&(y.Wa=a);if(1E3*c<W.ue)break a;y.Wa+=c;y.ba.refresh()}z.set("s50");y.V.O();y.ba.b(0);S.g(!1,!1)}a=za.oc();if(I.L.length>a)I.L.splice(0,I.L.length-a);else for(;I.L.length<a;)I.L.push(0);if(1!==I.i)if(oa.every(rb)){for(var d=0,e=c=0;e<oa.length;++e)oa[e].detected>d&&(d=oa[e].detected,c=0);for(d=
  0;d<a;++d)I.L[d]=c}else{c=I.Ac;d=0;for(e=!1;d<a;++d){if(rb(oa[c]))if(e){do++c===I.i&&(c=0);while(rb(oa[c]))}else e=!0;I.L[d]=c++;c>=I.i&&(c=0)}I.Ac=c}for(a=0;a<za.oc();++a)I.fa=I.L[a],I.zb=(.5+I.fa)/I.i,I.xc=I.L.lastIndexOf(I.fa)===a,z.set("s51"),c=oa[I.fa],z.A("u37",1+Sa.Gb*(Math.cos(c.ry)-1)),L.ka&&z.A("u36",c.rz),1!==I.i&&z.A("u35",I.zb),U.xa.O(),y.V.b(0),X.Aa.b(1),S.g(!1,!1),U.xa.b(0),Ga.J(!1,U.xa);za.me();sa.G();b.viewport(0,0,3,2*I.i);z.set("s49");X.Aa.b(0);S.g(!1,!1);b.readPixels(0,0,3,2*I.i,
  b.RGBA,b.UNSIGNED_BYTE,X.buffer);for(a=0;a<I.i;++a)if(-1!==I.L.indexOf(a)){var h=a;c=Wa[h];var g=[h];d=oa[h];e=sb[h];var t=2*h;c.Fa=Da(1,t,3,0,1);d.detected=pa.R(d.detected,c.Fa,W.Yc);if(c.Fa<W.Cc)L.ka&&(d.rz=0,d.ry=0);else{var n=X.Ba;c.x=Da(0,t,1,-1,1);c.y=Da(0,t,2,-1,1);c.U=Da(0,t,3,0,1);c.Eb=Da(1,t,0,-n[0],n[0]);c.Fb=Da(1,t,1,-n[1],n[1]);c.ya=Da(1,t,2,-n[2],n[2]);for(n=0;n<X.S;++n)c.hc[n]=X.wa[n](Da(2,t,n,0,1));g.kb=c.x-d.xRaw;g.lb=c.y-d.yRaw;g.jb=c.U-d.sRaw;g.gb=c.Eb-d.rx;g.hb=c.Fb-d.ry;g.ib=
  L.ka?c.ya:c.ya-d.rz;t=za.Cd();g=(1-eb.Qa(ta.translationFactorRange[0],ta.translationFactorRange[1],Math.sqrt(g.kb*g.kb+g.lb*g.lb+g.jb*g.jb)/t))*(1-eb.Qa(ta.rotationFactorRange[0],ta.rotationFactorRange[1],Math.sqrt(g.gb*g.gb+g.hb*g.hb+g.ib*g.ib)/t))*eb.Qa(ta.qualityFactorRange[0],ta.qualityFactorRange[1],c.Fa);h=e[++tb[h]%e.length]=g;for(t=0;t<e.length;++t)h=Math.min(h,e[t]);h=Math.max(.5,h);g=Math.min(h,g);e=pa.R(ta.alphaRange[1],ta.alphaRange[0],Math.pow(g,W.$c));d.xRaw=pa.R(d.xRaw,c.x,e);d.yRaw=
  pa.R(d.yRaw,c.y,e);d.sRaw=pa.R(d.sRaw,c.U,e);d.rx=pa.R(d.rx,c.Eb,e);d.ry=pa.R(d.ry,c.Fb,e);d.rz=L.ka?d.rz+e*c.ya:pa.R(d.rz,c.ya,e);h=d.sRaw*Sa.fb*Math.sin(d.ry);g=Math.sin(d.rz)*h/Ta;d.x=d.xRaw+Math.cos(d.rz)*h;d.y=d.yRaw+g;d.s=d.sRaw;e=Math.max(e,W.Zc);for(h=0;h<X.S;++h)d.expressions[h]=pa.R(d.expressions[h],c.hc[h],e);++c.Ta}}sa.qe();sa.reset();T.reset();b.enable(b.DEPTH_TEST);L.Ea&&(1===I.i?L.Ea(oa[0]):L.Ea(oa));b.disable(b.BLEND);ia===ba.play&&(Ra=window.requestAnimationFrame(Tb))}}function Fb(){y.V||
  (y.V=T.instance({isPot:!1,isLinear:!0,isFloat:!1,width:U.M,height:U.N}));U.xa=T.instance({isPot:!0,isFloat:!1,width:Ga.nc()});for(var a=W.Oc,c=I.i,d=new Float32Array([0,aa.borderWidth,aa.borderHeight,0,0,0,0,0,0,0,0,0]),e=new Float32Array(d.length*I.i),h=0,g;h<I.i;++h)for(g=0;g<d.length;++g)e[h*d.length+g]=d[g];X.Aa=Ub.instance({width:a,height:c,isFloat:!0,isPot:!1,array:e})}function Vb(){function a(c){for(var d=[],e=0;e<I.i;++e)d.push(JSON.parse(JSON.stringify(c)));return d}X.buffer=new Uint8Array(8*
  W.Oc*I.i);Wa=a({Fa:0,x:0,y:0,U:1,Eb:0,Fb:0,ya:0,hc:new Float32Array(X.S),Ta:0});oa=a({detected:0,x:0,y:0,s:1,xRaw:0,yRaw:0,sRaw:1,rx:0,ry:0,rz:0,expressions:new Float32Array(X.S)});a({kb:0,lb:0,jb:0,gb:0,hb:0,ib:0})}function ub(){z.K("s51",[{type:"1i",name:"u1",value:0},{type:"1i",name:"u33",value:1},{type:"2f",name:"u34",value:U.u},{type:"1f",name:"u35",value:.5},{type:"1f",name:"u36",value:0}]);z.K("s52",[{type:"1i",name:"u38",value:0},{type:"1i",name:"u33",value:1},{type:"1f",name:"u41",value:W.oe},
  {type:"1f",name:"u42",value:W.Vc},{type:"1f",name:"u43",value:W.Uc},{type:"3f",name:"u40",value:[X.ha[0]*U.u[0],X.ha[1]*U.u[1],X.ha[2]]},{type:"1f",name:"u35",value:.5},{type:"1f",name:"u44",value:1},{type:"1f",name:"u36",value:0}]);var a=[{type:"1i",name:"u38",value:0}];z.K("s53",a);z.K("s54",a);z.K("s49",[{type:"1i",name:"u33",value:0},{type:"1f",name:"u47",value:U.u[0]},{type:"2f",name:"u46",value:[0,.5/I.i]}])}function vb(){var a=Ga.nc(),c=U.M/a;Qa=aa.minScale*c;wb=aa.maxScale*c;$a=(1-2*aa.borderWidth)/
  aa.nStepsX;ab=(1-2*aa.borderHeight)/aa.nStepsY;bb=(wb-Qa)/aa.nStepsScale;kb=aa.borderWidth;lb=aa.borderHeight;mb=1-aa.borderWidth;nb=1-aa.borderHeight;U.u[0]=a/U.M;U.u[1]=a/U.N;Na=aa.borderWidth;Oa=aa.borderHeight;Pa=Qa;Ya=aa.borderWidth;Za=aa.borderHeight;xb=Qa}function Wb(a){if(L.oa)Gb("string"===typeof L.oa?JSON.parse(L.oa):L.oa,a);else{var c=L.Mb;"JSON"!==c.toUpperCase().split(".").pop()&&(c+=W.neuralNetworkPath);Hb.get(c,function(d){d=JSON.parse(d);Gb(d,a)})}}function Gb(a,c){if(a.exportData){var d=
  a.exportData;d.thetaXYZfactor&&(X.Ba=d.thetaXYZfactor);d.trackingDxysFactor&&(X.ha=d.trackingDxysFactor);"undefined"!==typeof d.nExpressions&&(X.S=d.nExpressions);Sa.Gb=.4;Sa.fb=.7;"undefined"!==typeof d.fgScaleXFactor&&(Sa.Gb=d.fgScaleXFactor);"undefined"!==typeof d.fgDisplaceXFactor&&(Sa.fb=d.fgDisplaceXFactor)}X.S||(X.S=W.Fc);if(!X.wa)for(X.wa=[],d=0;d<X.S;++d)X.wa.push(W.wd);c(a)}function Xb(){if(Ua.o({cb:L.Y,width:U.M,height:U.N,debug:!1,Gc:function(){Ha("GLCONTEXT_LOST")},antialias:L.antialias,
  premultipliedAlpha:!0}))return!0;Ha("GL_INCOMPATIBLE");return!1}function rb(a){return a.detected<=W.Cc}function Ib(a,c,d,e){return d>a?Math.max(0,a+c/2-(d-e/2)):Math.max(0,d+e/2-(a-c/2))}function Yb(){return Wa.some(function(a,c){if(c===I.fa)return!1;c=Wa[I.fa];if(c.Ta>a.Ta||3>a.Ta||Ib(c.x,c.U,a.x,a.U)<W.Dc*c.U)return!1;var d=U.M/U.N;return Ib(c.y,c.U*d,a.y,a.U*d)>W.Dc*c.U*d})}function Zb(){var a=I.fa;X.Aa.fe(1);1!==I.i&&(b.viewport(0,0,3,I.i),z.set("s0"),z.Nc("u1",1),S.g(!1,!1),z.Nc("u1",0));b.viewport(0,
  a,1,1);z.set("s52");L.ka&&z.A("u36",oa[a].rz);1!==I.i&&z.A("u35",I.zb);if(1<I.i){var c=Yb()?0:1;z.A("u44",c)}z.he("u39",Ya,Za,xb);S.g(!1,!1);I.xc&&(b.viewport(1,a,1,1),z.set("s53"),S.g(!1,!1),b.viewport(2,a,1,1),z.set("s54"),S.g(!1,!1));Pa+=bb;Pa>wb&&(Na+=$a,Pa=Qa,Na>mb&&(Na=kb,Oa+=ab,Oa>nb&&(Oa=lb)));Ya=Na+.5*(Math.random()-.5)*$a;Za=Oa+.5*(Math.random()-.5)*ab;xb=Pa+.5*(Math.random()-.5)*bb}function Jb(){y.ba&&y.ba.remove();y.ub=y.element.isFakeVideo?!0:!1;if(y.ub){var a=Kb();a={isFlipY:!1,array:y.element.arrayBuffer,
  width:a.w,height:a.la,isKeepArray:!0}}else a={F:y.element};y.ba=T.instance(Object.assign({isPot:!1,isFloat:!1},a))}function Ia(){z.K("s50",[{type:"1i",name:"u1",value:0},{type:"mat2",name:"u32",value:y.m}])}function Ja(){y.D[0]=.5;y.D[1]=.5;var a=y.u[1]/y.u[0];Ta=Ua.P()/Ua.B();90===Math.abs(ma.rotate)&&(a=1/a);a>Ta?y.D[1]*=Ta/a:y.D[0]*=a/Ta;z.K("s52",[{name:"u45",type:"1f",value:Ta}]);y.m[0]=0;y.m[1]=0;y.m[2]=0;y.m[3]=0;switch(ma.rotate){case 0:y.m[0]=y.D[0];y.m[3]=y.D[1];break;case 180:y.m[0]=-y.D[0];
  y.m[3]=-y.D[1];break;case 90:y.m[1]=y.D[0];y.m[2]=-y.D[1];break;case -90:y.m[1]=-y.D[0],y.m[2]=y.D[1]}ma.flipX&&(y.m[0]*=-1,y.m[2]*=-1)}function Kb(){var a={w:y.element.videoWidth||y.element.width,la:y.element.videoHeight||y.element.height};if(!a.w||!a.la||4>a.w||4>a.la)throw Error("INVALID VIDEO DIMENSIONS - width = "+a.w+" height = "+a.la);return a}function yb(){var a=Kb(),c=y.u[0]!==a.w||y.u[1]!==a.la;c&&(y.u[0]=a.w,y.u[1]=a.la);return c}function fb(a,c){if(ia===ba.error)return!1;y.element=a;yb();
  c&&c();return!0}function Lb(a,c,d){a&&a();y.ua={video:{facingMode:{ideal:ma.facingMode},width:{min:ma.minWidth,max:ma.maxWidth,ideal:ma.idealWidth},height:{min:ma.minHeight,max:ma.maxHeight,ideal:ma.idealHeight}},audio:!1};ma.deviceId&&(y.ua.deviceId=ma.deviceId);V.get(y.element?y.element:V.Id(),function(e){c&&c(e);d(e)},function(){Ha("WEBCAM_UNAVAILABLE")},y.ua)}function Ha(a){ia!==ba.error&&(ia=ba.error,L.ta&&L.ta(a))}var pa={qf:function(a){return Math.ceil(Math.log2(a))},Qd:function(a){return Math.log2(a)},
  Df:function(a){return 0===Math.log2(a)%1},De:function(a){var c=[0,0,0,0];a.forEach(function(d){c[0]+=d[0];c[1]+=d[1];c[2]+=d[2];c[3]+=d[3]});return c},Ee:function(a,c,d){return Math.min(Math.max(a,c),d)},He:function(a){return a*Math.PI/180},Jf:function(a,c){c=Math.pow(10,c);return Math.round(a*c)/c},Kf:function(a){return Math.round(1E6*a)/1E6},rf:function(a,c){return(100*a/c).toFixed(3)},R:function(a,c,d){return a*(1-d)+c*d},td:function(a,c){return pa.ld(a-c)},ld:function(a){for(;a>Math.PI;)a-=2*
  Math.PI;for(;a<=-Math.PI;)a+=2*Math.PI;return a},Je:function(a,c){return Math.abs(pa.td(a,c))},ve:function(a,c){return Math.atan2(Math.sin(a)+Math.sin(c),Math.cos(a)+Math.cos(c))}},Hb={get:function(a,c,d){var e=new XMLHttpRequest;e.open("GET",a,!0);e.withCredentials=!1;e.onreadystatechange=function(){4===e.readyState&&(200===e.status||0===e.status?c(e.responseText):"undefined"!==typeof d&&d(e.status))};e.send()},lf:function(a,c){Hb.get(a,function(d){c(JSON.parse(d))})},Hf:function(a,c,d){var e=new XMLHttpRequest;
  e.open("POST",a,!0);e.setRequestHeader("Content-type","application/x-www-form-urlencoded");e.onreadystatechange=function(){4!==e.readyState||200!==e.status&&0!==e.status||d(e.responseText)};e.send(c)},$e:function(a,c){var d=new XMLHttpRequest;d.open("POST",a,!0);d.responseType="arraybuffer";d.onload=function(){c(d.response)};d.send()}},eb={Vf:function(a,c,d){a=Math.min(Math.max((d-a)/(c-a),0),1);return a*a*(3-2*a)},Qa:function(a,c,d){return Math.min(Math.max((d-a)/(c-a),0),1)},Ue:function(a,c,d,e){return Math.pow(Math.min(Math.max((e-
  a)/(c-a),0),1),d)},Zf:function(){return 0},Gf:function(){return 1},Ff:function(a){return a},Re:function(a){return a*a},We:function(a){return a*(2-a)},Oe:function(a){return.5>a?2*a*a:-1+(4-2*a)*a},Me:function(a){return a*a*a},Ve:function(a){return--a*a*a+1},Ne:function(a){return.5>a?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1},Se:function(a){return a*a*a*a},Xe:function(a){return 1- --a*a*a*a},Pe:function(a){return.5>a?8*a*a*a*a:1-8*--a*a*a*a},Te:function(a){return a*a*a*a*a},Ye:function(a){return 1+--a*a*a*a*
  a},Qe:function(a){return.5>a?16*a*a*a*a*a:1+16*--a*a*a*a*a}},$b={yd:function(a,c,d){switch(a){case "relu":return d+"=max(vec4(0.,0.,0.,0.),"+c+");";case "elu":return d+"=mix(exp(-abs("+c+"))-vec4(1.,1.,1.,1.),"+c+",step(0.,"+c+"));";case "elu01":return d+"=mix(0.1*exp(-abs("+c+"))-vec4(0.1,0.1,0.1,0.1),"+c+",step(0.,"+c+"));";case "arctan":return d+"=atan(3.14159265359*texture2D(u0,vUV))/3.14159265359;";case "copy":return"";default:return!1}}},z=function(){function a(u,r,E){r=u.createShader(r);u.shaderSource(r,
  E);u.compileShader(r);return u.getShaderParameter(r,u.COMPILE_STATUS)?r:!1}function c(u,r,E){r=a(u,u.VERTEX_SHADER,r);E=a(u,u.FRAGMENT_SHADER,E);u===b&&t.push(r,E);var O=u.createProgram();u.attachShader(O,r);u.attachShader(O,E);u.linkProgram(O);return O}function d(u,r){void 0===r.ia&&(r.ia="precision lowp float;attribute vec2 a0;varying vec2 vv0;void main(){gl_Position=vec4(a0,0.,1.),vv0=a0*.5+vec2(.5,.5);}");void 0===r.Da&&(r.Da=["a0"]);void 0===r.qa&&(r.qa=[2]);if(void 0===r.precision||"highp"===
  r.precision)r.precision=k;r.id=x++;void 0!==r.be&&r.be.forEach(function(O,Z){r.a=r.a.replace(O,r.Xa[Z])});r.Lb=0;r.qa.forEach(function(O){r.Lb+=4*O});r.ga=c(u,r.ia,"precision "+r.precision+" float;\n"+r.a);r.j={};r.c.forEach(function(O){r.j[O]=u.getUniformLocation(r.ga,O)});r.attributes={};r.ra=[];r.Da.forEach(function(O){var Z=u.getAttribLocation(r.ga,O);r.attributes[O]=Z;r.ra.push(Z)});if(r.f){u.useProgram(r.ga);f=r;n=r.id;for(var E in r.f)u.uniform1i(r.j[E],r.f[E])}r.sb=!0}function e(u){ua.ge(J);
  n!==u.id&&(J.I(),n=u.id,f=u,b.useProgram(u.ga),u.ra.forEach(function(r){0!==r&&b.enableVertexAttribArray(r)}))}function h(u,r,E){d(u,r,E);u.useProgram(r.ga);u.enableVertexAttribArray(0);n=-1;return f=r}function g(){return{a:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vv0);}",c:["u1"],f:{u1:0}}}var t=[],n=-1,f=null,x=0,B=!1,k="highp",w=["u1"],l=["u0"],D={u1:0},H={u0:0},C={u1:0,u2:1},q={u3:0},v={s0:g(),s1:{a:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vv0);}",
  c:w,f:D,precision:"lowp"},s2:{a:"uniform sampler2D u1,u2;varying vec2 vv0;void main(){vec4 a=texture2D(u2,vv0),b=texture2D(u1,vv0);gl_FragColor=a*b;}",c:["u1","u2"],f:C},s3:{a:"uniform sampler2D u1;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u1,vv0);gl_FragColor=a.r*f;}",c:w,f:D},s4:{a:"uniform sampler2D u1,u2;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u2,vv0),b=texture2D(u1,vv0);gl_FragColor=a.a*b.r*f;}",c:["u1","u2"],f:C},s5:{a:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vec2(1.-vv0.x,vv0.y));}",
  c:w,f:D},s6:{a:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vec2(vv0.x,1.-vv0.y));}",c:w,f:D},s7:{a:"uniform sampler2D u0;uniform float u4;varying vec2 vv0;void main(){vec4 a=texture2D(u0,vv0);gl_FragColor=a*u4;}",c:["u0","u4"],f:H},s8:{a:"uniform sampler2D u0;uniform float u4;varying vec2 vv0;const vec4 f=vec4(.25,.25,.25,.25),g=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0);float b=dot(a*u4,f);gl_FragColor=b*g;}",c:["u0","u4"],f:H},s9:{a:"uniform sampler2D u1;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.);void main(){float a=.25*dot(e,texture2D(u1,vv0));gl_FragColor=a*e;}",
  c:w,f:D},s10:{a:"uniform sampler2D u1,u5;uniform float u6;const vec4 f=vec4(1.,1.,1.,1.);varying vec2 vv0;void main(){vec4 a=texture2D(u1,vv0),b=texture2D(u5,vv0);gl_FragColor=mix(b,a,u6*f);}",c:["u1","u5","u6"],f:{u1:0,u5:1}},s11:{a:"uniform sampler2D u1;uniform vec2 u7;varying vec2 vv0;void main(){gl_FragColor=.25*(texture2D(u1,vv0+u7)+texture2D(u1,vv0+u7*vec2(1.,-1.))+texture2D(u1,vv0+u7*vec2(-1.,-1.))+texture2D(u1,vv0+u7*vec2(-1.,1.)));}",c:["u1","u7"],f:D},s12:{a:"uniform sampler2D u1;uniform vec4 u8;varying vec2 vv0;float g(float a,float b){a=floor(a)+.5;return floor(a/exp2(b));}float h(float a,float b){return floor(a*exp2(b)+.5);}float i(float a,float b){return mod(a,h(1.,b));}float e(float c,float a,float b){a=floor(a+.5),b=floor(b+.5);return i(g(c,a),b-a);}vec4 j(float a){if(a==0.)return vec4(0.,0.,0.,0.);float k=128.*step(a,0.);a=abs(a);float c=floor(log2(a)),l=c+127.,b=(a/exp2(c)-1.)*8388608.,d=l/2.,m=fract(d)*2.,n=floor(d),o=e(b,0.,8.),p=e(b,8.,16.),q=m*128.+e(b,16.,23.),r=k+n;return vec4(o,p,q,r)/255.;}void main(){float a=dot(texture2D(u1,vv0),u8);gl_FragColor=j(a);}",
  c:["u1","u8"],f:D},s13:{a:"uniform sampler2D u0;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0),b=e/(e+exp(-a));gl_FragColor=b;}",c:l,f:H},s14:{a:"uniform sampler2D u0;varying vec2 vv0;const vec4 f=vec4(0.,0.,0.,0.);void main(){vec4 a=texture2D(u0,vv0);gl_FragColor=max(f,a);}",c:l,f:H},s15:{a:"uniform sampler2D u0;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0);gl_FragColor=mix(exp(-abs(a))-f,a,step(0.,a));}",c:l,f:H},s16:{a:"uniform sampler2D u0;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0),b=exp(-abs(a))-f;gl_FragColor=mix(.1*b,a,step(0.,a));}",
  c:l,f:H},s17:{a:"uniform sampler2D u0,u6,u9;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0),c=texture2D(u6,vv0),d=texture2D(u9,vv0),b=a/d;gl_FragColor=c*mix(exp(-abs(b))-f,b,step(0.,a));}",c:["u0","u6","u9"],f:{u0:0,u6:1,u9:2}},s18:{a:"uniform sampler2D u0;const float e=3.141593;varying vec2 vv0;void main(){gl_FragColor=atan(e*texture2D(u0,vv0))/e;}",c:l,f:H},s19:{a:"uniform sampler2D u0;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=texture2D(u0,vv0),b=log(f+a);gl_FragColor=b;}",
  c:l,f:H},s20:{a:"uniform sampler2D u0,u10;uniform float u11;const vec2 e=vec2(.5,.5);const float f=1e-5;const vec4 g=vec4(1.,1.,1.,1.),i=vec4(0.,0.,0.,0.);varying vec2 vv0;void main(){vec4 a=texture2D(u10,e);float b=u11*u11;vec4 c=max(b*a,f*g);gl_FragColor=texture2D(u0,vv0)/c;}",c:["u0","u10","u11"],f:{u0:0,u10:1}},s21:{a:"uniform sampler2D u1;uniform vec2 u12;varying vec2 vv0;void main(){float a=u12.x*u12.y;vec2 b=floor(vv0*a)/a,c=fract(vv0*a),d=floor(b*u12.y),f=floor(u12.x*fract(b*u12.y)),g=(f*u12.y+d)/a;gl_FragColor=texture2D(u1,g+c/a);}",
  c:["u1","u12"],f:D},s22:{a:"uniform sampler2D u13,u14,u15;varying vec2 vv0;void main(){vec4 a=texture2D(u15,vv0);vec2 b=a.rg,c=a.ba;vec4 d=texture2D(u13,b),f=texture2D(u14,c);gl_FragColor=d*f;}",c:["u13","u14","u15"],f:{u14:0,u13:1,u15:2}},s23:{a:"uniform float u16;uniform sampler2D u13,u14;varying vec2 vv0;void main(){vec2 a=fract(vv0*u16);vec4 b=texture2D(u13,vv0),c=texture2D(u14,a);gl_FragColor=b*c;}",c:["u14","u13","u16"],f:{u14:0,u13:1}},s24:{a:"uniform float u16;uniform sampler2D u13,u14,u17,u18,u19,u20;varying vec2 vv0;const vec4 e=vec4(1.,1.,1.,1.),g=vec4(1e-3,1e-3,1e-3,1e-3);void main(){vec2 h=vv0*u16,l=floor(h),c=h-l;vec4 m=texture2D(u13,vv0),d=texture2D(u14,c),a=texture2D(u20,vv0);a=a*255.;vec4 n=texture2D(u17,c),o=texture2D(u18,c),p=texture2D(u19,c),i=step(-g,-a),b=e-i,j=b*step(-e-g,-a);b*=e-j;vec4 k=b*step(-2.*e-g,-a);b*=e-k;vec4 q=b;d=i*d+j*n+k*o+q*p,gl_FragColor=m*d;}",
  c:"u13 u14 u16 u20 u17 u18 u19".split(" "),f:{u14:0,u13:1,u20:3,u17:4,u18:5,u19:6}},s25:{a:"uniform sampler2D u13,u14,u21;uniform float u16,u22,u23,u24;varying vec2 vv0;const vec2 j=vec2(1.,1.);void main(){vec2 a=floor(u22*vv0),b=u22*vv0-a;float c=u16/u22;vec2 d=floor(b*c),f=b*c-d,g=(a+f)/u22;float k=u22*u24/u16;vec2 l=k*d,h=(l+f*u23)/u24,i=step(h,j);vec4 m=texture2D(u13,g),n=texture2D(u14,h),o=m*n*i.x*i.y,p=texture2D(u21,g);gl_FragColor=o*u23*u23+p;}",c:"u13 u14 u16 u22 u23 u24 u21".split(" "),f:{u14:0,
  u13:1,u21:2}},s26:{a:"uniform sampler2D u13,u14;varying vec2 vv0;void main(){vec4 a=texture2D(u13,vv0),b=texture2D(u14,vv0);gl_FragColor=a*b;}",c:["u13","u14"],f:{u14:0,u13:1}},s27:{a:"uniform sampler2D u1,u21;uniform float u25;varying vec2 vv0;void main(){gl_FragColor=texture2D(u21,vv0)+u25*texture2D(u1,vv0);}",c:["u1","u21","u25"],f:{u1:0,u21:1}},s28:{a:"varying vec2 vv0;uniform sampler2D u1;const vec4 f=vec4(1.,1.,1.,1.),g=vec4(.299,.587,.114,0.);void main(){vec4 a=texture2D(u1,vv0);gl_FragColor=dot(a,g)*f;}",
  c:w,f:D,precision:"lowp"},s29:{a:"varying vec2 vv0;uniform sampler2D u1;uniform float u26;const vec3 f=vec3(.299,.587,.114);void main(){vec3 a=texture2D(u1,vv0).rgb,b=texture2D(u1,vv0+vec2(0.,u26)).rgb,c=texture2D(u1,vv0+vec2(u26,u26)).rgb,d=texture2D(u1,vv0+vec2(u26,0.)).rgb;gl_FragColor=vec4(dot(a,f),dot(b,f),dot(c,f),dot(d,f));}",c:["u1","u26"],f:D,precision:"lowp"},s30:{a:"varying vec2 vv0;uniform sampler2D u1;uniform float u26;const vec3 f=vec3(.299,.587,.114);void main(){vec3 a=texture2D(u1,vv0).rgb,b=texture2D(u1,vv0+vec2(0.,u26)).rgb,c=texture2D(u1,vv0+vec2(u26,u26)).rgb,d=texture2D(u1,vv0+vec2(u26,0.)).rgb;gl_FragColor=vec4(a.r,b.g,c.b,dot(d,f));}",
  c:["u1","u26"],f:D,precision:"lowp"},s31:{a:"varying vec2 vv0;uniform sampler2D u1,u2;uniform float u27;const vec4 f=vec4(1.,1.,1.,1.);void main(){vec4 a=vec4(0.);a-=texture2D(u1,vec2(vv0.x-u27,vv0.y-u27))*1.,a-=texture2D(u1,vec2(vv0.x-u27,vv0.y))*2.,a-=texture2D(u1,vec2(vv0.x-u27,vv0.y+u27))*1.,a+=texture2D(u1,vec2(vv0.x+u27,vv0.y-u27))*1.,a+=texture2D(u1,vec2(vv0.x+u27,vv0.y))*2.,a+=texture2D(u1,vec2(vv0.x+u27,vv0.y+u27))*1.;vec4 b=vec4(0.);b-=texture2D(u1,vec2(vv0.x-u27,vv0.y-u27))*1.,b-=texture2D(u1,vec2(vv0.x,vv0.y-u27))*2.,b-=texture2D(u1,vec2(vv0.x+u27,vv0.y-u27))*1.,b+=texture2D(u1,vec2(vv0.x-u27,vv0.y+u27))*1.,b+=texture2D(u1,vec2(vv0.x,vv0.y+u27))*2.,b+=texture2D(u1,vec2(vv0.x+u27,vv0.y+u27))*1.;vec3 c=sqrt(a.rgb*a.rgb+b.rgb*b.rgb);vec4 e=vec4(c,texture2D(u1,vv0).a),g=texture2D(u2,vv0);gl_FragColor=g.a*e.r*f;}",
  c:["u1","u2","u27"],f:C},s32:{a:"varying vec2 vv0;uniform sampler2D u1,u2;uniform float u27;const vec4 j=vec4(1.,1.,1.,1.);const vec2 k=vec2(1.,1.);void main(){float h=0.;vec2 l=k*u27,a,b;float c,d,i=0.;for(float e=-4.;e<=4.;e+=1.)for(float f=-4.;f<=4.;f+=1.)a=vec2(e,f),c=length(a)/2.,d=exp(-c*c),b=vv0+l*a,h+=d*texture2D(u1,b).r,i+=d;vec4 m=texture2D(u2,vv0);gl_FragColor=m.a*(texture2D(u1,b).r-h/i)*j;}",c:["u1","u2","u27"],f:C},s33:{a:"uniform sampler2D u3;uniform vec2 u7;varying vec2 vv0;vec4 e(vec4 a,vec4 b){vec4 c=step(a,b);return mix(a,b,c);}const vec2 g=vec2(.5,.5),h=vec2(1.,0.),i=vec2(0.,1.);void main(){vec2 a=vv0-u7*g;vec4 b=texture2D(u3,a),c=texture2D(u3,a+u7*h),d=texture2D(u3,a+u7*i),j=texture2D(u3,a+u7),k=e(b,c),l=e(d,j);gl_FragColor=e(k,l);}",
  c:["u3","u7"],f:q},s34:{a:"uniform sampler2D u3;uniform vec2 u7;varying vec2 vv0;const vec2 k=vec2(1.,0.),l=vec2(0.,1.),m=vec2(2.,0.),n=vec2(0.,2.);vec4 e(vec4 a,vec4 b){vec4 c=step(a,b);return mix(a,b,c);}vec4 f(vec2 a){vec4 b=texture2D(u3,a),c=texture2D(u3,a+u7*k),d=texture2D(u3,a+u7*l),g=texture2D(u3,a+u7),h=e(b,c),i=e(d,g);return e(h,i);}void main(){vec2 a=vv0+u7*vec2(-.55,-1.05);vec4 b=f(a),c=f(a+u7*m),d=f(a+u7*2.),g=f(a+u7*n),h=e(b,c),i=e(d,g);gl_FragColor=e(h,i);}",c:["u3","u7"],f:q},s35:{a:"uniform sampler2D u1;varying vec2 vv0;void main(){vec4 a=texture2D(u1,vv0);gl_FragColor=a*a;}",
  c:["u1"],f:D,precision:"lowp"},s36:{a:"uniform sampler2D u1;uniform vec2 u7;varying vec2 vv0;const float e=15444.;void main(){vec4 a=1001./e*texture2D(u1,vv0-3.*u7)+2002./e*texture2D(u1,vv0-2.*u7)+3003./e*texture2D(u1,vv0-u7)+3432./e*texture2D(u1,vv0)+3003./e*texture2D(u1,vv0+u7)+2002./e*texture2D(u1,vv0+2.*u7)+1001./e*texture2D(u1,vv0+3.*u7);gl_FragColor=a;}",c:["u7","u1"],f:D,precision:"lowp"},s37:{a:"uniform sampler2D u1,u28,u29;varying vec2 vv0;const vec4 f=vec4(1.,1.,1.,1.);const float g=.1;void main(){vec4 a=texture2D(u28,vv0),b=texture2D(u29,vv0),c=texture2D(u1,vv0),d=max(f*g,b-a*a),h=sqrt(d);gl_FragColor=(c-a)/h;}",
  c:["u1","u28","u29"],f:{u1:0,u28:1,u29:2}}},G={s38:{a:"uniform float u16,u30;uniform sampler2D u13,u14,u21;varying vec2 vv0;const vec2 ZERO2=vec2(0.,0.),ONE2=vec2(1.,1.),HALF2=vec2(.5,.5),EPS2=vec2(1e-5,1e-5);void main(){vec4 sum=texture2D(u21,vv0);float toSparsity=1.1111;vec2 uvFrom,uvWeight,xyPatch=ZERO2,eps2=EPS2/u16,xyTo=floor(vv0*u16+eps2);float weightSize=toSparsity*u16;vec2 halfFromSparsity=ONE2*(toSparsity-1.)/2.;for(float patch_x=0.;patch_x<1.1111;patch_x+=1.){xyPatch.x=patch_x;for(float patch_y=0.;patch_y<1.1111;patch_y+=1.)xyPatch.y=patch_y,uvFrom=(xyTo+HALF2+u30*(xyPatch-halfFromSparsity))/u16,uvFrom+=step(uvFrom,-eps2),uvFrom-=step(ONE2-eps2,uvFrom),uvWeight=(xyTo*toSparsity+xyPatch+HALF2)/weightSize,sum+=texture2D(u13,uvWeight)*texture2D(u14,uvFrom);}gl_FragColor=sum,gl_FragColor*=2.2222;}",
  c:["u16","u13","u14","u21","u30"],Xa:["1.1111","gl_FragColor\\*=2.2222;"]},s39:{a:"uniform float u16,u30,u24;uniform sampler2D u13,u14,u21;varying vec2 vv0;const vec2 ZERO2=vec2(0.,0.),ONE2=vec2(1.,1.),HALF2=vec2(.5,.5),EPS2=vec2(1e-4,1e-4);void main(){vec4 sum=texture2D(u21,vv0);float fromSparsity=1.1111,shrinkFactor=3.3333;vec2 uvFrom,uvWeight,xyFrom,xyPatchTo,xyPatch=ZERO2,xyShrink=ZERO2,eps2=EPS2/u24,xyTo=floor(vv0*u16+eps2);float weightSize=fromSparsity*u24;vec2 halfFromSparsity=ONE2*(fromSparsity-1.)/2.;float toSparsity=weightSize/u16;vec2 xyFrom0=xyTo*shrinkFactor;for(float patch_x=0.;patch_x<1.1111;patch_x+=1.){xyPatch.x=patch_x;for(float patch_y=0.;patch_y<1.1111;patch_y+=1.){xyPatch.y=patch_y;for(float shrink_x=0.;shrink_x<3.3333;shrink_x+=1.){xyShrink.x=shrink_x;for(float shrink_y=0.;shrink_y<3.3333;shrink_y+=1.)xyShrink.y=shrink_y,xyFrom=xyFrom0+xyShrink+shrinkFactor*u30*(xyPatch-halfFromSparsity),uvFrom=(xyFrom+HALF2)/u24,uvFrom+=step(uvFrom,-eps2),uvFrom-=step(ONE2-eps2,uvFrom),xyPatchTo=xyPatch*shrinkFactor+xyShrink,uvWeight=(xyTo*toSparsity+xyPatchTo+HALF2)/weightSize,sum+=texture2D(u13,uvWeight)*texture2D(u14,uvFrom);}}}gl_FragColor=sum,gl_FragColor*=2.2222;}",
  c:"u16 u24 u13 u14 u21 u30".split(" "),Xa:["1.1111","gl_FragColor\\*=2.2222;","3.3333"]}},J={Oa:function(){return B},o:function(){if(!B){k="highp";for(var u in v)d(b,v[u],u);z.set("s0");b.enableVertexAttribArray(0);B=!0}},Xc:function(u){u.forEach(function(r){J.Ob(r)})},Ob:function(u){v[u.id]=u;d(b,u,u.id)},sc:function(u,r,E){r||(r=u);v[r]=Object.create(G[u]);v[r].Md=!0;G[u].Xa&&G[u].Xa.forEach(function(O,Z){v[r].a=v[r].a.replace(new RegExp(O,"g"),E[Z])});d(b,v[r],r)},set:function(u){e(v[u])},Ya:function(u){return h(u,
  g(),"s40")},Hb:function(u){return h(u,{a:"void main(){gl_FragColor=vec4(.5,.5,.5,.5);}",c:[],precision:"highp"},"s41")},vd:function(u){return"undefined"===typeof v[u]?!1:v[u].sb},I:function(){-1!==n&&(n=-1,f.ra.forEach(function(u){0!==u&&b.disableVertexAttribArray(u)}))},Jb:function(){var u=0;f.ra.forEach(function(r,E){E=f.qa[E];b.vertexAttribPointer(r,E,b.FLOAT,!1,f.Lb,u);u+=4*E})},$b:function(){b.enableVertexAttribArray(0)},ma:function(){J.Za(b)},Za:function(u){u.vertexAttribPointer(f.ra[0],2,u.FLOAT,
  !1,8,0)},Nc:function(u,r){b.uniform1i(f.j[u],r)},A:function(u,r){b.uniform1f(f.j[u],r)},za:function(u,r,E){b.uniform2f(f.j[u],r,E)},Pf:function(u,r){b.uniform2fv(f.j[u],r)},Qf:function(u,r){b.uniform3fv(f.j[u],r)},he:function(u,r,E,O){b.uniform3f(f.j[u],r,E,O)},Rf:function(u,r,E,O,Z){b.uniform4f(f.j[u],r,E,O,Z)},Ib:function(u,r){b.uniform4fv(f.j[u],r)},Sf:function(u,r){b.uniformMatrix2fv(f.j[u],!1,r)},Tf:function(u,r){b.uniformMatrix3fv(f.j[u],!1,r)},Uf:function(u,r){b.uniformMatrix4fv(f.j[u],!1,
  r)},K:function(u,r){J.set(u);r.forEach(function(E){switch(E.type){case "4f":b.uniform4fv(f.j[E.name],E.value);break;case "3f":b.uniform3fv(f.j[E.name],E.value);break;case "2f":b.uniform2fv(f.j[E.name],E.value);break;case "1f":b.uniform1f(f.j[E.name],E.value);break;case "1i":b.uniform1i(f.j[E.name],E.value);break;case "mat2":b.uniformMatrix2fv(f.j[E.name],!1,E.value);break;case "mat3":b.uniformMatrix3fv(f.j[E.name],!1,E.value);break;case "mat4":b.uniformMatrix4fv(f.j[E.name],!1,E.value)}})},pf:function(){return"lowp"},
  h:function(){b.disableVertexAttribArray(0);J.I();for(var u in v){var r=v[u];r.sb&&(r.sb=!1,b.deleteProgram(r.ga));r.Md&&delete v[u]}t.forEach(function(E){b.deleteShader(E)});t.splice(0);x=0;B=!1}};return J}(),b=null,Ua=function(){function a(k){console.log("ERROR in ContextFF: ",k);return!1}function c(k){function w(){Ea.h();D.getExtension("WEBGL_lose_context").loseContext()}if(navigator.userAgent&&-1!==navigator.userAgent.indexOf("forceWebGL1"))return!1;var l=document.createElement("canvas");l.setAttribute("width",
  1);l.setAttribute("height",1);var D=null;try{D=l.getContext("webgl2",k)}catch(H){return!1}if(!D)return!1;d(D);ca.ac(D);k=ca.eb(D);if(!k.Z&&!k.$)return w(),!1;k=Ea.Sb(D,k);w();return k?!0:!1}function d(k){k.clearColor(0,0,0,0);k.disable(k.DEPTH_TEST);k.disable(k.BLEND);k.disable(k.DITHER);k.disable(k.STENCIL_TEST);k.disable(k.CULL_FACE);k.GENERATE_MIPMAP_HINT&&k.hint(k.GENERATE_MIPMAP_HINT,k.FASTEST);k.disable(k.SAMPLE_ALPHA_TO_COVERAGE);k.disable(k.SAMPLE_COVERAGE);k.depthFunc(k.LEQUAL);k.clearDepth(1)}
  var e=null,h=null,g=null,t=null,n=!0,f=null,x=null,B={B:function(){return e.width},P:function(){return e.height},df:function(){return e},bf:function(){return b},aa:function(){return n},flush:function(){b.flush()},Bd:function(){f||(f=new Uint8Array(e.width*e.height*4));b.readPixels(0,0,e.width,e.height,b.RGBA,b.UNSIGNED_BYTE,f);return f},ff:function(){return e.toDataURL("image/jpeg")},gf:function(){sa.G();h||(h=document.createElement("canvas"),g=h.getContext("2d"));h.width=e.width;h.height=e.height;
  for(var k=B.Bd(),w=g.createImageData(h.width,h.height),l=h.width,D=h.height,H=w.data,C=0;C<D;++C)for(var q=D-C-1,v=0;v<l;++v){var G=4*(C*l+v),J=4*(q*l+v);H[G]=k[J];H[G+1]=k[J+1];H[G+2]=k[J+2];H[G+3]=k[J+3]}g.putImageData(w,0,0);return h.toDataURL("image/png")},ef:function(k){!h&&k&&(h=document.createElement("canvas"),g=h.getContext("2d"));var w=k?h:document.createElement("canvas");w.width=e.width;w.height=e.height;(k?g:w.getContext("2d")).drawImage(e,0,0);return w},o:function(k){k.qd&&!k.cb?e=document.getElementById(k.qd):
  k.cb&&(e=k.cb);e||(e=document.createElement("canvas"));e.width=k&&void 0!==k.width?k.width:512;e.height=k&&void 0!==k.height?k.height:512;"undefined"===typeof k&&(k={});void 0===k.premultipliedAlpha&&(k.premultipliedAlpha=!1);void 0===k.wc&&(k.wc=!0);void 0===k.antialias&&(k.antialias=!1);if(!b){var w={antialias:k.antialias,alpha:!0,preserveDrawingBuffer:!0,premultipliedAlpha:k.premultipliedAlpha,stencil:!1,depth:k.wc};navigator&&navigator.userAgent&&-1!==navigator.userAgent.indexOf("noAntialiasing")&&
  (w.antialias=!1);var l=c(w);!l&&w.antialias&&(w.antialias=!1,l=c(w));l&&(b=e.getContext("webgl2",w));b?n=!0:((b=e.getContext("webgl",w))||(b=e.getContext("experimental-webgl",w)),n=!1)}if(!b)return a("WebGL1 and 2 are not enabled");(t=b.getExtension("WEBGL_lose_context"))&&k.Gc&&(x=k.Gc,e.addEventListener("webglcontextlost",x,!1));if(!ca.o())return a("Not enough GL capabilities");d(b);z.o();S.o();return Ea.Sb(b,ca.Ad())?!0:a("Cannot filter float textures")},h:function(){b&&ca.h();t&&x&&(e.removeEventListener("webglcontextlost",
  x,!1),x=null);f=g=h=e=null}};return B}(),ua=function(){function a(){null===c&&("undefined"!==typeof z?c=z:"undefined"!==typeof JEShaders&&(c=JEShaders))}var c=null;a();return{ge:function(d){c!==d&&(c&&c.I(),c=d)},Oa:function(){return c.Oa()},ma:function(){return c.ma()},Za:function(d){return c.Za(d)},Jb:function(){return c.Jb()},I:function(){return c.I()},set:function(d){return c.set(d)},Ya:function(d){a();return c.Ya(d)},Hb:function(d){a();return c.Hb(d)},h:function(){return c.h()}}}(),Ca=function(){function a(m){b.bindTexture(b.TEXTURE_2D,
  m)}function c(m){O[0]=m;m=Z[0];var M=m>>16&32768,K=m>>12&2047,p=m>>23&255;return 103>p?M:142<p?M|31744|((255==p?0:1)&&m&8388607):113>p?(K|=2048,M|(K>>114-p)+(K>>113-p&1)):M=(M|p-112<<10|K>>1)+(K&1)}function d(m){var M=new Uint16Array(m.length);m.forEach(function(K,p){M[p]=c(K)});return M}function e(){if(null!==na.qb)return na.qb;var m=g(d([1,1,1,1]));return null===m?!0:na.qb=m}function h(){if(null!==na.rb)return na.rb;var m=g(new Uint8Array([255,255,255,255]));return null===m?!0:na.rb=m}function g(m){if(!ua.Oa()||
  !H)return null;var M=null;try{var K=b.getError();if("FUCKING_BIG_ERROR"===K)return!1;M=F.instance({isFloat:!1,H:!0,array:m,width:1});K=b.getError();if(K!==b.NO_ERROR)return!1}catch(p){return!1}ka.G();b.viewport(0,0,1,1);b.clearColor(0,0,0,0);b.clear(b.COLOR_BUFFER_BIT);ua.set("s0");M.Qb(0);la.g(!0,!0);m=new Uint8Array(4);b.readPixels(0,0,1,1,b.RGBA,b.UNSIGNED_BYTE,m);m=.9<m[0];M.remove();ka.X();return m}var t=0,n=null,f=0,x=null,B=null,k=null,w=null,l=null,D=null,H=!1,C=[],q={isFloat:!1,isPot:!0,
  isLinear:!1,isMipmap:!1,isAnisotropicFiltering:!1,isMirrorX:!1,isMirrorY:!1,isSrgb:!1,isKeepArray:!1,isFlipY:null,width:0,height:0,url:null,array:null,data:null,F:null,Ld:!1,H:!1,ea:null,Sa:4,wb:0},v=!1,G=null,J=null,u=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],r=!1,E=!1,O=new Float32Array(1),Z=new Int32Array(O.buffer),na={qb:null,rb:null},F={o:function(){H||(l=[b.RGB,null,b.RGB,b.RGBA],D=[b.RGB,null,b.RGB,b.RGBA],n=[b.TEXTURE0,b.TEXTURE1,b.TEXTURE2,b.TEXTURE3,b.TEXTURE4,b.TEXTURE5,b.TEXTURE6,b.TEXTURE7],
  r="undefined"!==typeof JEContext,E="undefined"!==typeof ca,r&&JEContext.Ef()&&n.push(b.TEXTURE8,b.TEXTURE9),x=[-1,-1,-1,-1,-1,-1,-1,-1],w=[b.UNSIGNED_BYTE,b.FLOAT,b.FLOAT],H=!0)},Kd:function(){if(!B){for(var m=new Float32Array(16384),M=0;16384>M;++M)m[M]=2*Math.random()-1;B={random:F.instance({isFloat:!0,isPot:!0,array:m,width:64}),Sc:F.instance({isFloat:!1,isPot:!0,width:1,array:new Uint8Array([0,0,0,0])})}}F.te()},wf:function(){return B.Sc},te:function(){w[1]=ca.ob(b)},de:function(){D=l=[b.RGBA,
  b.RGBA,b.RGBA,b.RGBA]},If:function(m,M){z.set("s1");ka.G();var K=m.B(),p=m.P();b.viewport(0,0,K,p);m.b(0);la.g(!1,!1);b.readPixels(0,0,K,p,b.RGBA,b.UNSIGNED_BYTE,M)},jc:function(m,M,K,p,ea,va,Aa){m.activeTexture(m.TEXTURE0);var qa=m.createTexture();m.bindTexture(m.TEXTURE_2D,qa);ea=ea instanceof Float32Array?ea:new Float32Array(ea);0!==pa.Qd(ea.length)%1&&(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE));m.texParameteri(m.TEXTURE_2D,
  m.TEXTURE_MAG_FILTER,m.NEAREST);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST);m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,va);m.texImage2D(m.TEXTURE_2D,0,m.RGBA,K,p,0,m.RGBA,m.FLOAT,ea);m.bindTexture(m.TEXTURE_2D,null);m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,!1);Aa&&(ka.X(),z.set("s0"));m.viewport(0,0,K,p);m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,M,0);m.bindTexture(m.TEXTURE_2D,qa);Aa?la.g(!0,!0):S.Ja(m);m.deleteTexture(qa);H&&(x[0]=-1,k=null,t=0)},instance:function(m){function M(A){var N=
  b.getError();if("FUCKING_BIG_ERROR"===N)return!1;b.texImage2D(b.TEXTURE_2D,0,fa,da,ha,A);N=b.getError();N!==b.NO_ERROR&&da!==b.RGBA&&(da=b.RGBA,b.texImage2D(b.TEXTURE_2D,0,fa,da,ha,A));return!0}function K(){if(!Mb){a(ra);wa&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,wa);p.isPot?(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,p.isMirrorX?b.MIRRORED_REPEAT:b.REPEAT),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,p.isMirrorY?b.MIRRORED_REPEAT:b.REPEAT)):(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),
  b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE));p.isAnisotropicFiltering&&"undefined"!==typeof JESETTINGS&&b.texParameterf(b.TEXTURE_2D,JEContext.hf().TEXTURE_MAX_ANISOTROPY_EXT,JESETTINGS.we);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,p.isLinear?b.LINEAR:b.NEAREST);p.isLinear?b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,p.isMipmap&&!Ka?b.NEAREST_MIPMAP_LINEAR:b.LINEAR):b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,p.isMipmap&&!Ka?b.NEAREST_MIPMAP_NEAREST:b.NEAREST);
  da=l[p.Sa-1];fa=D[p.Sa-1];ha=w[va];if(ca.aa()){var A=b.RGBA32F;da===b.RGBA&&ha===b.FLOAT?p.isMipmap||p.isLinear?fa=Ea.Dd(b):ca.Tb()?A&&(fa=A):fa=b.RGBA16F||b.RGBA:da===b.RGB&&ha===b.FLOAT&&A&&(fa=A,da=b.RGBA)}if(p.H&&!p.isFloat||p.isFloat&&p.isMipmap&&Ea.Pd())(A=b.RGBA16F)&&(fa=A),ha=ca.ob(b);p.wb&&(gb=p.wb);p.isSrgb&&4===p.Sa&&(da=JEContext.uf());if(p.F)M(p.F);else if(p.url)M(Fa);else if(xa){A=xa;try{"FUCKING_BIG_ERROR"!==b.getError()&&(b.texImage2D(b.TEXTURE_2D,0,fa,P,Q,0,da,ha,A),b.getError()!==
  b.NO_ERROR&&(b.texImage2D(b.TEXTURE_2D,0,fa,P,Q,0,da,ha,null),b.getError()!==b.NO_ERROR&&b.texImage2D(b.TEXTURE_2D,0,b.RGBA,P,Q,0,b.RGBA,b.UNSIGNED_BYTE,null)))}catch(lc){b.texImage2D(b.TEXTURE_2D,0,fa,P,Q,0,da,ha,null)}p.isKeepArray||(xa=null)}else A=b.getError(),"FUCKING_BIG_ERROR"!==A&&(b.texImage2D(b.TEXTURE_2D,0,fa,P,Q,0,da,ha,null),A=b.getError(),A!==b.NO_ERROR&&(da=b.RGBA,p.H&&ha!==b.FLOAT&&(ha=b.FLOAT,b.texImage2D(b.TEXTURE_2D,0,fa,P,Q,0,da,ha,null))));if(p.isMipmap)if(!Ka&&Y)Y.nb(),hb=!0;
  else if(Ka){A=Math.log2(Math.min(P,Q));Va=Array(1+A);Va[0]=ra;for(var N=1;N<=A;++N){var ja=Math.pow(2,N),R=P/ja;ja=Q/ja;var La=b.createTexture();a(La);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.NEAREST);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.NEAREST);b.texImage2D(b.TEXTURE_2D,0,fa,R,ja,0,da,ha,null);a(null);Va[N]=La}hb=!0}a(null);x[t]=-1;wa&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!1);ib=!0;p.ea&&Y&&(p.ea(Y),p.ea=null)}}var p=Object.assign({},q,m),ea=f++;null===p.isFlipY&&(p.isFlipY=
  p.url||p.array?!0:!1);p.data&&(p.array="string"===typeof p.data?Sb(p.data):p.isFloat?new Float32Array(p.data):new Uint8Array(p.data),p.isFlipY=!1);var va=0,Aa=p.F?!0:!1,qa=null,zb=null,Nb=!1,Ab=null;p.H=p.H||p.isFloat;p.H&&(va=1);p.Ld||ca.aa()||!p.isFloat||!E||ca.Tb()||(p.isFloat=!1);p.isFloat&&(va=2);p.isAnisotropicFiltering&&r&&!JEContext.yf()&&(p.isAnisotropicFiltering=!1);var ra=b.createTexture(),Fa=null,xa=!1,P=0,Q=0,ib=!1,Mb=!1,jb=!1,ya=null,Ba=null,Bb=null,Xa=null,fa=null,da=null,ha=null,wa=
  p.isFlipY,ac=(m=p.H&&p.isMipmap)&&Ea.gd(),Ka=m&&ac?!0:!1,Va=null,gb=-1,hb=!1,Ma={yc:!1,Rb:null,kc:null};p.width&&(P=p.width,Q=p.height?p.height:P);var Y={get:function(){return ra},B:function(){return P},P:function(){return Q},xf:function(){return p.url},zf:function(){return p.isFloat},Bf:function(){return p.H},Cf:function(){return p.isLinear},nb:function(){b.generateMipmap(b.TEXTURE_2D)},ed:function(A,N){Ka?(A||(A=Y.pc()),Y.bb(N),a(Va[A]),x[N]=-1):Y.b(N)},pc:function(){-1===gb&&(gb=Math.log(P)/Math.log(2));
  return gb},xd:function(A){if(Ka){A||(A=Y.pc());z.set("s11");Y.bb(0);for(var N=P,ja=Q,R=1;R<=A;++R)N/=2,ja/=2,z.za("u7",.25/N,.25/ja),b.viewport(0,0,N,ja),a(Va[R-1]),b.framebufferTexture2D(ka.Ma(),b.COLOR_ATTACHMENT0,b.TEXTURE_2D,Va[R],0),la.g(!1,1===R);x[0]=-1}else Y.nb()},bb:function(A){A!==t&&(b.activeTexture(n[A]),t=A)},b:function(A){if(!ib)return!1;Y.bb(A);if(x[A]===ea)return!1;a(ra);x[A]=ea;return!0},Qb:function(A){b.activeTexture(n[A]);t=A;a(ra);x[A]=ea},l:function(){k=Y;b.framebufferTexture2D(ka.Ma(),
  b.COLOR_ATTACHMENT0,b.TEXTURE_2D,ra,0)},O:function(){k=Y;b.viewport(0,0,P,Q);b.framebufferTexture2D(ka.Ma(),b.COLOR_ATTACHMENT0,b.TEXTURE_2D,ra,0)},Kb:F.Kb,resize:function(A,N){P=A;Q=N;K()},clone:function(A){A=F.instance({width:P,height:Q,H:p.H,isFloat:p.isFloat,isLinear:p.isLinear,isMirrorY:p.isMirrorY,isFlipY:A?!wa:wa,isPot:p.isPot});ua.set("s0");ka.X();A.l();b.viewport(0,0,P,Q);Y.b(0);la.g(!0,!0);return A},ie:function(){b.viewport(0,0,P,Q)},remove:function(){b.deleteTexture(ra);Mb=!0;C.splice(C.indexOf(Y),
  1);Y=null},refresh:function(){Y.Qb(0);wa&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!0);Aa?b.texImage2D(b.TEXTURE_2D,0,fa,da,b.UNSIGNED_BYTE,p.F):b.texImage2D(b.TEXTURE_2D,0,fa,P,Q,0,da,ha,xa);wa&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!1)},Xb:function(){var A=P*Q*4;Ba=[new Uint8Array(A),new Uint8Array(A),new Uint8Array(A),new Uint8Array(A)];ya=[new Float32Array(Ba[0].buffer),new Float32Array(Ba[1].buffer),new Float32Array(Ba[2].buffer),new Float32Array(Ba[3].buffer)];Bb=new Uint8Array(4*A);Xa=new Float32Array(Bb.buffer);
  jb=!0},Kc:function(){jb||Y.Xb();b.readPixels(0,0,P,4*Q,b.RGBA,b.UNSIGNED_BYTE,Bb);for(var A=P*Q,N=2*A,ja=3*A,R=0;R<A;++R)ya[0][R]=Xa[R],ya[1][R]=Xa[R+A],ya[2][R]=Xa[R+N],ya[3][R]=Xa[R+ja];return ya},$d:function(){Ma.yc||(Ma.Rb=new Uint8Array(P*Q*4),Ma.kc=new Float32Array(Ma.buffer),Ma.yc=!0);b.readPixels(0,0,P,Q,b.RGBA,b.UNSIGNED_BYTE,Ma.Rb);return Ma.kc},Yb:function(A){ka.G();z.set("s12");Y.b(0);if(A)b.viewport(0,0,P,Q),z.Ib("u8",.25,.25,.25,.25),la.g(!1,!0);else for(A=0;4>A;++A)b.viewport(0,Q*A,
  P,Q),z.Ib("u8",u[A]),la.g(!1,0===A)},se:function(A){var N=ha===w[0]&&!h();a(ra);wa&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!0);N?(Nb||(qa=document.createElement("canvas"),qa.width=P,qa.height=Q,zb=qa.getContext("2d"),Ab=zb.createImageData(P,Q),Nb=!0),Ab.data.set(A),zb.putImageData(Ab,0,0),b.texImage2D(b.TEXTURE_2D,0,fa,da,ha,qa)):b.texImage2D(b.TEXTURE_2D,0,fa,P,Q,0,da,ha,A);x[t]=ea;wa&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!1)},Xf:function(A,N){a(ra);N&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!0);b.texImage2D(b.TEXTURE_2D,
  0,fa,da,ha,A);x[t]=ea;N&&b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!1)},Nf:function(A,N){var ja=P*Q,R=4*ja;A=p.H?A?"RGBE":"JSON":"RGBA";N&&(A=N);N=ca.aa()&&!1;var La=null;switch(A){case "RGBE":La="s42";break;case "JSON":La=N?"s0":"s12";break;case "RGBA":case "RGBAARRAY":La="s6"}jb||("RGBA"===A||"RGBE"===A||"RGBAARRAY"===A?(Ba=new Uint8Array(R),jb=!0):"JSON"!==A||N||Y.Xb());ka.G();z.set(La);Y.b(0);R=null;if("RGBA"===A||"RGBE"===A||"RGBAARRAY"===A){b.viewport(0,0,P,Q);la.g(!0,!0);b.readPixels(0,0,P,Q,b.RGBA,
  b.UNSIGNED_BYTE,Ba);if("RGBAARRAY"===A)return{data:Ba};v||(G=document.createElement("canvas"),J=G.getContext("2d"),v=!0);G.width=P;G.height=Q;ja=J.createImageData(P,Q);ja.data.set(Ba);J.putImageData(ja,0,0);R=G.toDataURL("image/png")}else if("JSON"===A)if(N)R=new Float32Array(ja),b.viewport(0,0,P,Q),la.g(!0,!0),b.readPixels(0,0,P,Q,b.RGBA,b.FLOAT,R);else{for(R=0;4>R;++R)b.viewport(0,Q*R,P,Q),z.Ib("u8",u[R]),la.g(!R,!R);Y.Kc();R=Array(ja);for(N=0;N<ja;++N)R[4*N]=ya[0][N],R[4*N+1]=ya[1][N],R[4*N+2]=
  ya[2][N],R[4*N+3]=ya[3][N]}return{format:A,data:R,width:P,height:Q,isMirrorY:p.isMirrorY,isFlipY:"RGBA"===A?p.isFlipY:!p.isFlipY}}};p.isMipmap&&!Ka&&ib&&!hb&&(Y.nb(),hb=!0);if(p.url)a(ra),b.texImage2D(b.TEXTURE_2D,0,b.RGBA,1,1,0,b.RGBA,b.UNSIGNED_BYTE,null),Fa=new Image,Fa.Ie="Anonymous",Fa.crossOrigin="Anonymous",Fa.src=p.url,Fa.onload=function(){P=Fa.width;Q=Fa.height;K()};else if(p.F){var Ob=function(){P=void 0!==p.F.videoWidth?p.F.videoWidth:p.F.width;Q=void 0!==p.F.videoHeight?p.F.videoHeight:
  p.F.height;P?K():setTimeout(Ob,1)};Ob()}else p.array?(p.H&&!p.isFloat?p.array instanceof Uint16Array?(xa=p.array,K()):e()?(xa=d(p.array),K()):(K(),F.jc(b,ra,Y.B(),Y.P(),p.array,wa,!0)):(xa=p.isFloat?p.array instanceof Float32Array?p.array:new Float32Array(p.array):p.array instanceof Uint8Array?p.array:new Uint8Array(p.array),K()),p.isKeepArray||(xa&&xa!==p.array&&(xa=null),delete p.array)):K();Y.tf=Y.B;p.ea&&ib&&(p.ea(Y),p.ea=null);C.push(Y);return Y},G:function(m){m!==t&&(b.activeTexture(n[m]),t=
  m);x[m]=-1;a(null)},ze:function(m){B.random.b(m)},Kb:function(){k=null;b.framebufferTexture2D(ka.Ma(),b.COLOR_ATTACHMENT0,b.TEXTURE_2D,null,0)},reset:function(){for(var m=0;m<n.length;++m)x[m]=-1;t=-1},Lf:function(){t=-1},pe:function(){for(var m=0;m<n.length;++m)F.G(m)},lc:function(){B&&(B.random.remove(),B.Sc.remove())},Wf:function(m,M){if("RGBA"===m.format||"RGBE"===m.format){var K=new Image;K.src=m.data;K.onload=function(){F.instance({isMirrorY:m.isMirrorY,isFlipY:m.isFlipY,isFloat:!1,F:K,ea:function(p){if("RGBA"===
  m.format)M(p);else{var ea=m.width,va=m.height,Aa=F.instance({isMirrorY:m.isMirrorY,isFloat:!0,width:ea,height:va,isFlipY:m.isFlipY});ka.X();b.viewport(0,0,ea,va);z.set("s43");Aa.l();p.b(0);la.g(!0,!0);F.G(0);M(Aa);b.flush();setTimeout(p.remove,50)}}})}}else"JSON"===m.format?M(F.instance({isFloat:!0,isFlipY:m.isFlipY,width:m.width,height:m.height,array:new Float32Array(m.data)})):M(!1)},h:function(){k&&(sa.X(),F.Kb(),sa.G());F.pe();C.slice(0).forEach(function(m){m.remove()});C.splice(0);H=!1;f=0;"undefined"!==
  typeof Ea&&Ea.h()}};return F}(),Ub=function(){return{instance:function(a){var c=[Ca.instance(a),Ca.instance(a)],d=[c[1],c[0]],e=d,h={fe:function(g){e[1].l();e[0].b(g);h.Pc()},Of:function(g){e[1].O();e[0].b(g);h.Pc()},Pc:function(){e=e===c?d:c},refresh:function(){e[0].refresh();e[1].refresh()},b:function(g){e[0].b(g)},ye:function(g){e[1].b(g)},mf:function(){return e[0]},remove:function(){e[0].remove();e[1].remove();e=null}};return h}}}(),la=function(){function a(f){var x={W:null,C:null};x.W=f.createBuffer();
  f.bindBuffer(f.ARRAY_BUFFER,x.W);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),f.STATIC_DRAW);x.C=f.createBuffer();f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,x.C);f.bufferData(f.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2]),f.STATIC_DRAW);return x}var c=null,d=0,e=!1,h=[],g=-2,t=-2,n={reset:function(){t=g=-2},o:function(){e||(c=a(b),n.sa(),e=!0)},instance:function(f){var x=d++,B=f.C?f.C.length:0,k="undefined"===typeof f.mode?b.STATIC_DRAW:f.mode,w=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,
  w);b.bufferData(b.ARRAY_BUFFER,f.W instanceof Float32Array?f.W:new Float32Array(f.W),k);g=x;var l=null,D=null,H=null;if(f.C){l=b.createBuffer();b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,l);var C=null;65536>f.C.length?(C=Uint16Array,D=b.UNSIGNED_SHORT,H=2):(C=Uint32Array,D=b.UNSIGNED_INT,H=4);C=f.C instanceof C?f.C:new C(f.C);b.bufferData(b.ELEMENT_ARRAY_BUFFER,C,k);t=x}var q={fd:function(v){g!==x&&(b.bindBuffer(b.ARRAY_BUFFER,w),g=x);v&&ua.Jb()},cd:function(){t!==x&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,
  l),t=x)},bind:function(v){q.fd(v);q.cd()},Ke:function(){b.drawElements(b.TRIANGLES,B,D,0)},Le:function(v,G){b.drawElements(b.TRIANGLES,v,D,G*H)},remove:function(){b.deleteBuffer(w);f.C&&b.deleteBuffer(l);q=null}};h.push(q);return q},sa:function(){-1!==g&&(b.bindBuffer(b.ARRAY_BUFFER,c.W),g=-1);-1!==t&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,c.C),t=-1)},g:function(f,x){f&&la.sa();x&&ua.ma();b.drawElements(b.TRIANGLES,3,b.UNSIGNED_SHORT,0)},Ja:function(f){f=f||b;var x=a(f);f.bindBuffer(f.ARRAY_BUFFER,
  x.W);f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,x.C);ua.Za(f);f.drawElements(f.TRIANGLES,3,f.UNSIGNED_SHORT,0);f.deleteBuffer(x.W);f.deleteBuffer(x.C);n.reset();e&&(n.sa(),ua.ma())},lc:function(){var f=b,x=c;f.deleteBuffer(x.W);f.deleteBuffer(x.C)},h:function(){n.lc();h.forEach(function(f){f.remove()});b.bindBuffer(b.ARRAY_BUFFER,null);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,null);n.reset();e=!1;h.splice(0);d=0}};return n}(),ka=function(){var a=null,c=null,d=null,e=!1,h=[],g={v:-2,ic:1},t={Oa:function(){return e},
  o:function(){if(!e){a=b.createFramebuffer();var n=ca.aa();c=n&&b.DRAW_FRAMEBUFFER?b.DRAW_FRAMEBUFFER:b.FRAMEBUFFER;d=n&&b.READ_FRAMEBUFFER?b.READ_FRAMEBUFFER:b.FRAMEBUFFER;e=!0}},jf:function(){return c},Ed:function(){return d},Ma:function(){return b.FRAMEBUFFER},sf:function(){return g},af:function(){return a},instance:function(n){void 0===n.vc&&(n.vc=!1);var f=n.ba?n.ba:null,x=n.width,B=void 0!==n.height?n.height:n.width,k=a,w=null,l=!1,D=!1,H=0;f&&(x=x?x:f.B(),B=B?B:f.P());var C={Lc:function(){l||
  (k=b.createFramebuffer(),l=!0,H=g.ic++)},Wc:function(){C.Lc();C.l();w=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,w);b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,x,B);b.framebufferRenderbuffer(c,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,w);b.clearDepth(1)},bind:function(q,v){H!==g.v&&(b.bindFramebuffer(c,k),g.v=H);f&&f.l();v&&b.viewport(0,0,x,B);q&&b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT)},xe:function(){H!==g.v&&(b.bindFramebuffer(c,k),g.v=H)},clear:function(){b.clear(b.COLOR_BUFFER_BIT|
  b.DEPTH_BUFFER_BIT)},Fe:function(){b.clear(b.COLOR_BUFFER_BIT)},Ge:function(){b.clear(b.DEPTH_BUFFER_BIT)},ie:function(){b.viewport(0,0,x,B)},l:function(){H!==g.v&&(b.bindFramebuffer(c,k),g.v=H)},rtt:function(q){f=q;g.v!==H&&(b.bindFramebuffer(b.FRAMEBUFFER,k),g.v=H);q.l()},G:function(){b.bindFramebuffer(c,null);g.v=-1},resize:function(q,v){x=q;B=v;w&&(b.bindRenderbuffer(b.RENDERBUFFER,w),b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,x,B))},remove:function(){k===a||D||(b.bindFramebuffer(c,
  k),b.framebufferTexture2D(c,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,null,0),w&&b.framebufferRenderbuffer(c,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,null),b.bindFramebuffer(c,null),b.deleteFramebuffer(k),w&&b.deleteRenderbuffer(w));D=!0}};n.vc&&C.Wc();h.push(C);return C},G:function(){b.bindFramebuffer(c,null);g.v=-1},qe:function(){b.bindFramebuffer(c,null);b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT);b.viewport(0,0,ca.B(),ca.P());g.v=-1},reset:function(){g.v=-2},X:function(){0!==g.v&&(b.bindFramebuffer(c,a),g.v=
  0)},clear:function(){b.viewport(0,0,ca.B(),ca.P());b.clear(b.COLOR_BUFFER_BIT)},h:function(){t.G();h.forEach(function(n){n.remove()});b.deleteFramebuffer(a);t.reset();e=!1;h.splice(0);g.v=-2;g.ic=1}};return t}(),ca=function(){function a(){d="undefined"===typeof Ua?JEContext:Ua;e=!0}function c(q,v){for(var G=0;G<q.length;++G){var J=v.getExtension(q[G]);if(J)return J}return null}var d=null,e=!1,h=!1,g=null,t=null,n=!1,f=null,x=!1,B=null,k=!1,w=null,l=null,D={Z:!0,$:!0,mb:!0},H="undefined"===typeof window?
  {}:window,C={o:function(){if(e)return!0;a();var q=b;if(!h){g=C.dc(q);if((n=(H.GL_EXT_FLOAT=g)?!0:!1)||C.aa())t=C.ec(q),H.GL_EXT_FLOATLINEAR=t;h=!0}if(!k){if(f=C.Ia(q))x=!0,H.GL_EXT_HALFFLOAT=f;if(x||C.aa())B=C.fc(q),H.GL_EXT_HALFFLOATLINEAR=B;k=!0}w=C.bc(q);H.GL_EXT_COLORBUFFERFLOAT=w;l=C.cc(q);H.GL_EXT_COLORBUFFERHALFFLOAT=l;ka.o();Ca.o();if(!C.rd())return!1;la.o();Ca.Kd();return!0},B:function(){e||a();return d.B()},P:function(){e||a();return d.P()},aa:function(){e||a();return d.aa()},ac:function(q){C.bc(q);
  C.cc(q);C.dc(q);C.ec(q);C.Ia(q);C.fc(q)},bc:c.bind(null,["EXT_color_buffer_float","WEBGL_color_buffer_float","OES_color_buffer_float"]),cc:c.bind(null,["EXT_color_buffer_half_float","WEBGL_color_buffer_half_float","OES_color_buffer_half_float"]),dc:c.bind(null,["OES_texture_float","MOZ_OES_texture_float","WEBKIT_OES_texture_float"]),ec:c.bind(null,["OES_texture_float_linear","MOZ_OES_texture_float_linear","WEBKIT_OES_texture_float_linear"]),Ia:c.bind(null,["OES_texture_half_float","MOZ_OES_texture_half_float",
  "WEBKIT_OES_texture_half_float"]),fc:c.bind(null,["OES_texture_half_float_linear","MOZ_OES_texture_half_float_linear","WEBKIT_OES_texture_half_float_linear"]),ob:function(q){var v=C.Ia(q);return v&&v.HALF_FLOAT_OES?v.HALF_FLOAT_OES:q.HALF_FLOAT||q.FLOAT},Ad:function(){return D},Tb:function(){return D.Z},Be:function(){return D.$},Ae:function(){return D.mb},$a:function(q,v,G){function J(){q.bindTexture(q.TEXTURE_2D,null);q.bindFramebuffer(u,null);q.deleteTexture(O);q.deleteFramebuffer(E)}var u=q.FRAMEBUFFER,
  r=q.NEAREST,E=q.createFramebuffer();q.bindFramebuffer(u,E);var O=q.createTexture();q.bindTexture(q.TEXTURE_2D,O);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,r);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,r);q.texImage2D(q.TEXTURE_2D,0,v,1,1,0,q.RGBA,G,null);q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_2D,O,0);if(q.checkFramebufferStatus(q.READ_FRAMEBUFFER||q.FRAMEBUFFER)!==q.FRAMEBUFFER_COMPLETE)return J(),!1;ua.Hb(q);q.clearColor(0,0,0,0);q.viewport(0,0,1,1);q.disable(q.DEPTH_TEST);
  q.clear(q.COLOR_BUFFER_BIT);la.Ja(q);q.bindFramebuffer(u,null);ua.Ya(q);q.activeTexture(q.TEXTURE0);q.bindTexture(q.TEXTURE_2D,O);la.Ja(q);v=new Uint8Array(4);q.readPixels(0,0,1,1,q.RGBA,q.UNSIGNED_BYTE,v);J();return 3<Math.abs(v[0]-127)?!1:!0},eb:function(q){var v={Z:!1,$:!1};q.disable(q.BLEND);q.clearColor(0,0,0,0);q.clear(q.COLOR_BUFFER_BIT);q.RGBA32F&&C.$a(q,q.RGBA32F,q.FLOAT)&&(v.Z=!0);!v.Z&&C.$a(q,q.RGBA,q.FLOAT)&&(v.Z=!0);var G=C.ob(q);q.RGBA16F&&C.$a(q,q.RGBA16F,G)&&(v.$=!0);!v.$&&C.$a(q,
  q.RGBA,G)&&(v.$=!0);return v},sd:function(){var q=ka.instance({width:1});q.Lc();var v=Ca.instance({width:1,isFloat:!0,Sa:3});q.l();v.l();b.flush();b.checkFramebufferStatus(ka.Ed())!==b.FRAMEBUFFER_COMPLETE?(Ca.de(),D.mb=!1):D.mb=!0;q.remove();v.remove()},rd:function(){var q=C.eb(b);Object.assign(D,q);if(!D.Z&&!D.$)return!1;C.sd();return!0},h:function(){Ca.h();ua.h();ka.h();la.h();e=!1}};return C}(),S=la,sa=ka,T=Ca,Ea=function(){function a(v,G,J,u){l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,
  u?l.NEAREST_MIPMAP_NEAREST:l.LINEAR);var r=null;if(null!==J)try{r=l.getError();if("FUCKING_BIG_ERROR"===r)return!1;l.texImage2D(l.TEXTURE_2D,0,v,2,2,0,l.RGBA,G,J);r=l.getError();if(r!==l.NO_ERROR)return!1}catch(E){return!1}u&&l.generateMipmap(l.TEXTURE_2D);l.clear(l.COLOR_BUFFER_BIT);S.Ja(l);r=l.getError();if("FUCKING_BIG_ERROR"===r)return!1;l.readPixels(0,0,1,1,l.RGBA,l.UNSIGNED_BYTE,B);r=l.getError();r===l.INVALID_OPERATION&&"undefined"!==typeof l.PIXEL_PACK_BUFFER&&(l.bindBuffer(l.PIXEL_PACK_BUFFER,
  null),l.readPixels(0,0,1,1,l.RGBA,l.UNSIGNED_BYTE,B),r=l.getError());if(r!==l.NO_ERROR)return!1;if(J=0!==B[0])f.Ic=G,f.uc=v;return J}function c(v,G){return D.Z&&a(v,l.FLOAT,new Float32Array(w),G)?(n=t.Nb,!0):!1}function d(v,G,J){if(!D.$)return!1;var u=ca.Ia(l);if(u&&u.HALF_FLOAT_OES&&a(v,u.HALF_FLOAT_OES,new Uint16Array(w),G)||l.HALF_FLOAT&&a(v,l.HALF_FLOAT,new Uint16Array(w),G)||a(v,l.FLOAT,new Float32Array(w),G))return n=t.pa,!0;l.bindTexture(l.TEXTURE_2D,J);l.texImage2D(l.TEXTURE_2D,0,l.RGBA,1,
  1,0,l.RGBA,l.UNSIGNED_BYTE,null);l.bindFramebuffer(f.Ga,q);Ca.jc(l,J,1,1,new Float32Array(w),!1,!1);l.bindFramebuffer(f.Ga,null);l.bindTexture(l.TEXTURE_2D,J);return a(v,null,null,G)?(n=t.pa,!0):!1}function e(v,G,J){x=!0;if(d(v,!0,J)||c(G,!0))return!0;x=!1;return d(v,!1,J)||c(G,!1)?!0:!1}function h(v){if(n===t.I){l=v||b;n=t.RGBA8;x=!0;ca.ac(l);D||(D=ca.eb(l));sa.reset();q=l.createFramebuffer();f.Ga=l.DRAW_FRAMEBUFFER||l.FRAMEBUFFER;l.bindFramebuffer(f.Ga,null);l.clearColor(0,0,0,0);l.viewport(0,0,
  1,1);z.I();H=z.Ya(l);v=l.createTexture();l.activeTexture(l.TEXTURE0);l.bindTexture(l.TEXTURE_2D,v);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.REPEAT);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.REPEAT);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.NEAREST);C=v;var G=v=l.RGBA,J=l.RGBA16F,u=l.RGBA32F;u&&(v=u);J&&(G=J);if((J||u)&&e(G,v,C))return g(),!0;v=G=l.RGBA;if(e(G,v,C))return g(),!0;n=t.RGBA8;g();return!1}}function g(){l.deleteProgram(H.ga);l.deleteTexture(C);C=H=null}var t={I:-1,
  Nb:3,pa:2,RGBA8:0},n=t.I,f={Ic:null,uc:null,Ga:null},x=!0,B=new Uint8Array(4),k=[.8,1,.8,1],w=k.concat(k,k,k),l=null,D=null,H=null,C=null,q=null;return{gd:function(v){h(v);return x},Sb:function(v,G){n===t.I&&(typeof("undefined"!==G)&&(D=G),h(v));return n!==t.RGBA8},Af:function(v){h(v);return n===t.Nb},Pd:function(v){h(v);return n===t.pa},kf:function(v){h(v);return f.Ic},Dd:function(v){h(v);return f.uc},h:function(){l=null;x=!0;n=t.I;D=null}}}(),bc=function(){return{instance:function(a){var c=T.instance(a.alpha),
  d=T.instance(a.beta);return{ud:function(){c.b(1);d.b(2)}}}}}(),Qb=function(){return{instance:function(a){var c=null,d=!1,e=!1,h=null,g=!1,t=!1,n=null,f="undefined"===typeof a.preprocessing?!1:a.preprocessing,x="undefined"===typeof a.preprocessingSize?a.size:a.preprocessingSize;a.mask&&(d=!0,W&&void 0!==W.bd&&(a.mask=W.bd+a.mask),c=T.instance({isFloat:!1,url:a.mask}));var B=!1;a.customInputShader&&(B="s44",z.Ob({name:"_",id:B,a:a.customInputShader,c:["uSource"],precision:"lowp"}),z.K(B,[{type:"1i",
  name:"_",value:0}]));switch(f){case "sobel":n="s31";g=!0;break;case "meanNormalization":n="s32";g=!0;break;case "grayScale":n="s28";g=!1;break;case "grayScaleTilt":n="s29";t=!0;g=!1;break;case "rgbGrayTilt":n="s30";t=!0;g=!1;break;case "copy":n=B?B:"s0";break;case "inputLightRegulation":n=B?B:"s28";h=cc.instance({tc:x,Hc:a.size,Ec:a.nBlurPass,Od:!1});e=!0;break;case "direct":case "none":n=!1;break;default:n="s3"}t&&z.K(n,[{name:"u26",type:"1f",value:a.tilt}]);d&&(n+="Mask");var k=T.instance({isFloat:!1,
  isPot:!1,width:a.size}),w={B:function(){return x},pb:function(){return w.B()},Gd:function(){return e?h.qc():k},J:function(){sa.X();n&&(z.set(n),g&&z.A("u27",1/a.size),k.O(),d&&c.b(1),S.g(!1,!1),k.b(0),e&&h.process(k))},h:function(){k.remove();d&&c.remove()}};return w}}}(),Rb=function(){return{instance:function(a){"undefined"===typeof a.disableNormalize&&(a.disableNormalize=!1);var c={input:null,ja:null,tb:null,T:null,Ua:null,Bb:null,Cb:null},d=null,e=[],h=[],g=!1,t=null,n=!0,f=-1,x=a.isReorganize?
  a.isReorganize:!1,B=a.kernelsNumber?!0:!1,k=a.dynPelu?bc.instance(a.dynPelu):!1,w=k?!0:!1,l={isEnabled:!1};a.Nd?(a.sparsity="undefined"!==typeof a.sparsity?a.sparsity:a.Va.pb(),n=!1):"full"===a.connectivityUp&&(a.sparsity=a.Va.pb());var D={elu:"s15",elu01:"s16",relu:"s14",arctan:"s18",sigmoid:"s13",copy:"s0",softplus:"s19",dynPelu:"s17"}[a.activation],H=a.sparsity*a.sparsity,C=!1,q=a.size,v="";if(a.maxPooling){switch(a.maxPooling.size){case 2:v="s33";break;case 4:v="s34"}C=!0;q/=a.maxPooling.size;
  c.Bb=T.instance({isFloat:!0,isPot:!1,width:q})}var G=void 0!==a.Wd&&a.Wd?!0:!1,J=null,u=null,r=null;if(G){J="s45"+a.index.toString();z.sc("s45",J,[((a.normalization.n-1)/2).toFixed(1)]);z.K(J,[{type:"1i",name:"u1",value:0},{type:"2f",name:"u7",value:[1/a.size,1/a.size]},{type:"1f",name:"u6",value:a.normalization.alpha},{type:"1f",name:"u9",value:a.normalization.beta},{type:"1f",name:"u31",value:a.normalization.k}]);var E={isFloat:!0,isPot:!0,width:a.size};u=T.instance(E);r=T.instance(E)}var O=-1,
  Z=null;n&&(c.T=T.instance({isFloat:!0,isPot:!1,width:a.size}));c.ja=T.instance(a.bias);var na={B:function(){return a.size},pb:function(){return q},mc:function(){return a.classesCount},dd:function(F){d.b(F)},Yd:function(){a.remap&&a.remap.isEnabled&&(l={isEnabled:!0,Sd:T.instance({isFloat:!1,isFlipY:!1,array:new Uint8Array(a.remap.maskTexture.data),width:a.remap.maskTexture.width,isPot:!1}),Pa:a.remap.layers.map(function(F){return a.parent.Fd(F)}),depth:a.remap.depth})},ee:function(){switch(a.connectivityUp){case "direct":Z=
  dc.instance(a.connectivity);break;case "square":Z=ec.instance(a.connectivity);break;case "squareFast":Z=fc.instance(a.connectivity,a.activation);break;case "full":Z=gc.instance(a.connectivity);break;case "conv":f=a.kernelsNumber,Z=hc.instance(a.connectivity),x&&(c.Ua=T.instance({width:q,isFloat:!0,isFlipY:!1,isPot:!1}))}if(Z.na){var F=a.size*a.sparsity;O=Math.log(F/a.size)/Math.log(2);c.input=T.instance({isMipmap:!0,isFloat:!0,isPot:!0,width:F,wb:O});c.tb=T.instance({isFloat:!0,isPot:!0,width:a.size})}},
  J:function(F){d=F;Z.na?(c.input.O(),B&&c.ja.b(2),Z.J(l),c.input.b(0),c.input.xd(O),c.tb.O(),B?z.set("s0"):(z.set("s27"),z.A("u25",H),c.ja.b(1)),c.input.ed(O,0),S.g(!1,!1),z.set(D),G?u.l():c.T.l(),c.tb.b(0),w&&k.ud(),S.g(!1,!1)):(c.T.O(),c.ja.b(1),Z.J());G&&(z.set(J),r.l(),u.b(0),S.g(!1,!1),z.set("s46"),z.A("u6",1),c.T.l(),r.b(1),S.g(!1,!1));if(n)return C?(c.Bb.O(),c.T.b(0),z.set(v),z.za("u7",1/a.size,1/a.size),S.g(!1,!1),F=c.Bb):F=c.T,F.b(0),x&&(c.Ua.l(),z.set("s21"),z.za("u12",f,q/f),S.g(!1,!1),
  F=c.Ua,c.Ua.b(0)),F;F=c.T;a.disableNormalize||(z.set("gpuRawAvg"===g?"s8":"s7"),z.A("u4",1/a.size),c.Cb.O(),c.T.b(0),S.g(!1,!1),F=c.Cb);switch(g){case "cpuRGBA2Float":F.Yb(!1);F=na.Zd(F);t(F);break;case "cpuMeanFloat":F.Yb(!0);F=F.$d();t(F);break;case "gpuRawAvg":case "gpuRaw":F.b(0);case "none":null!==t&&t(F)}return!1},pd:function(F){F&&(g=F.Db||"none",t=F.Ab||null);c.T=T.instance({isFloat:!0,isPot:!0,isMipmap:!1,width:a.size});F="undefined"!==typeof a.classesCount&&a.classesCount?a.classesCount:
  a.size*a.size;for(var m=0,M=0,K=0;m<F;++m)e.push(M+(a.size-1-K)*a.size),h.push([-1,-1,-1,-1]),++M,M===a.size&&(M=0,++K);a.disableNormalize||(c.Cb=T.instance({isFloat:!0,isPot:!0,width:a.size}))},Zd:function(F){var m=F.Kc();e.forEach(function(M,K){h[K][0]=m[0][M];h[K][1]=m[1][M];h[K][2]=m[2][M];h[K][3]=m[3][M]});return h},h:function(){for(var F in c){var m=c[F];m&&m.remove()}Z&&(Z.h(),Z=null)}};a.Va&&na.ee(a.Va);return na}}}();Cb.Zb=function(a){a.forEach(function(c){c.nd&&T.Zb(c.nd.Yf);c.ja&&T.Zb(c.ja)})};
  var dc=function(){return{instance:function(a){var c=T.instance(a.weights);delete a.weights.data;return{na:!0,La:function(){return 1},h:function(){c.remove()},Jd:function(){return c},J:function(){z.set("s26");c.b(1);S.g(!1,!1)}}}}}(),gc=function(){return{instance:function(a){var c=a.fromLayerSize,d=T.instance(a.weights);delete a.weights.data;return{na:!0,La:function(){return c},h:function(){d.remove()},J:function(e){if(e.isEnabled){z.set("s24");e.Sd.b(3);var h,g=Math.min(e.Pa.length,e.depth);for(h=
  0;h<g;++h)e.Pa[h].dd(4+h)}else z.set("s23");z.A("u16",a.toLayerSize);d.b(1);S.g(!1,!1)}}}}}(),ec=function(){return{instance:function(a){for(var c=a.fromLayerSize,d=a.toLayerSize,e=a.toSparsity,h=e*d,g=h/c,t=c/d,n=0,f=0,x=0,B=Array(e*d*e*d*4),k=Array(e*d*e*d*4),w=Array(c*c),l=0;l<w.length;++l)w[l]=0;l=Math.floor(e/2);for(var D=.5/d,H=.5/c,C=.5/h,q=0;q<d;++q)for(var v=Math.round(q*t),G=0;G<d;++G){var J=Math.round(G*t),u=q/d,r=G/d;u+=D;r+=D;for(var E=0;E<e;++E){var O=v+E-l;0>O&&(O+=c);O>=c&&(O-=c);for(var Z=
  0;Z<e;++Z){var na=n/h,F=f/h,m=J+Z-l;0>m&&(m+=c);m>=c&&(m-=c);var M=O/c,K=m/c;F=1-F-1/h;M+=H;K+=H;na+=C;F+=C;var p=q*e+E,ea=G*e+Z;ea=d*e-ea-1;p=ea*d*e+p;B[4*p]=na;B[4*p+1]=F;B[4*p+2]=M;B[4*p+3]=K;K=w[m*c+O]++;p=K%g;M=O*g+p;m=m*g+(K-p)/g;m=c*g-1-m;m=m*c*g+M;k[4*m]=na;k[4*m+1]=F;k[4*m+2]=u;k[4*m+3]=r;++n>=h&&(n=0,++f);++x}}}w=null;var va=T.instance(a.weights);delete a.weights.data;var Aa=T.instance({width:h,isFloat:!0,array:new Float32Array(k),isPot:!0});k=null;var qa=T.instance({width:h,isFloat:!0,
  array:new Float32Array(B),isPot:!0});B=null;return{na:!0,La:function(){return g},h:function(){Aa.remove();qa.remove();va.remove()},J:function(){z.set("s22");va.b(1);qa.b(2);S.g(!1,!1)}}}}}(),hc=function(){return{instance:function(a){var c=a.kernelsNumber,d=a.toSparsity,e=d*a.toLayerSize/a.fromLayerSize,h=T.instance(a.weights);delete a.weights.data;return{na:!0,La:function(){return e},vf:function(){return d},Jd:function(){return h},h:function(){h.remove()},J:function(){z.set("s25");z.A("u22",c);z.A("u23",
  d);z.A("u16",a.toLayerSize);z.A("u24",a.fromLayerSize);h.b(1);S.g(!1,!1)}}}}}(),fc=function(){return{instance:function(a,c){var d=a.fromLayerSize,e=a.toLayerSize,h=a.toSparsity,g=a.stride?a.stride:1,t=h*e/d,n=e<d,f=d/e,x=T.instance(a.weights);delete a.weights.data;var B="s47"+[d.toString(),e.toString(),h.toString(),g.toString(),c].join("_");z.vd(B)||(a=$b.yd(c,"gl_FragColor","gl_FragColor"),e=[{type:"1f",name:"u16",value:e},{type:"1f",name:"u30",value:g}],n&&e.push({type:"1f",name:"u24",value:d}),
  d=[(n?t:h).toFixed(1),a],n&&d.push(f.toFixed(1)),z.sc(n?"s39":"s38",B,d),z.K(B,e.concat([{type:"1i",name:"u14",value:0},{type:"1i",name:"u21",value:1},{type:"1i",name:"u13",value:3}])));return{na:!1,La:function(){return t},h:function(){x.remove()},J:function(){z.set(B);x.b(3);S.g(!1,!1)}}}}}(),cc=function(){return{instance:function(a){var c=a.Ec?a.Ec:3,d=a.tc?a.tc:64,e=a.Hc?a.Hc:64,h=a.Od?!0:!1;a={isFloat:!1,width:d,isPot:!1,isFlipY:!1};var g=T.instance(a),t=T.instance(a),n=T.instance(a),f=T.instance(a),
  x=T.instance({isFloat:!0,width:e,isPot:!1,isFlipY:!1}),B=1/d;return{process:function(k){z.set("s35");f.l();S.g(h,!1);z.set("s36");for(var w=0;w<c;++w)g.l(),z.za("u7",B,0),S.g(h,!1),n.l(),f.b(0),S.g(h,!1),t.l(),g.b(0),z.za("u7",0,B),S.g(h,!1),f.l(),n.b(0),S.g(h,!1),w!==c-1&&t.b(0);z.set("s37");x.l();k.b(0);t.b(1);f.b(2);S.g(h,!1);x.b(0)},qc:function(){return x}}}}}(),V={Id:function(){return V.Wb()?document.createElement("video"):!1},va:function(a,c){a[c]=!0;a.setAttribute(c,"true")},kd:function(){var a=
  !1,c=navigator.userAgent||navigator.vendor||window.opera;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(c)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(c.substr(0,
  4)))a=!0;return a},Ub:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},zd:function(){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return 2<a.length?[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||0,10)]:[0,0,0]},zc:function(){try{return window.matchMedia("(orientation: portrait)").matches?!0:!1}catch(a){return window.innerHeight>window.innerWidth}},jd:function(){return V.Vb()||V.Ub()},Vb:function(){var a=navigator.userAgent.toLowerCase();return-1!==
  a.indexOf("safari")&&-1===a.indexOf("chrome")?!0:!1},Ze:function(){return V.kd()?V.zc()?window.innerHeight/window.innerWidth*45:45:45},Wb:function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?!0:!1},pause:function(a){a.pause()},Mf:function(a){a.play()},release:function(a){a.pause();a.videoStream&&a.videoStream.stop();a.videoStream=null},md:function(a){if(!a)return a;var c=!1;if(a.video){var d=function(e){var h={};"undefined"!==typeof e.min&&(h.min=e.min);"undefined"!==typeof e.max&&
  (h.max=e.max);"undefined"!==typeof e.ideal&&(h.ideal=e.ideal);return h};c={};"undefined"!==typeof a.video.width&&(c.width=d(a.video.width));"undefined"!==typeof a.video.height&&(c.height=d(a.video.height));"undefined"!==typeof a.video.facingMode&&(c.facingMode=a.video.facingMode)}c={audio:a.audio,video:c};"undefined"!==typeof a.deviceId&&(c.deviceId=a.deviceId);return c},Qc:function(a){var c=a.video.width;a.video.width=a.video.height;a.video.height=c;return a},od:function(a){function c(k){return[480,
  576,640,648,720,768,800,960,1080,1152,1280,1366,1920].sort(function(w,l){return Math.abs(w-k)-Math.abs(l-k)})}function d(k){var w=V.md(a);e.push(k(w))}var e=[];if(!a||!a.video)return e;if(a.video.width&&a.video.height){if(a.video.width.ideal&&a.video.height.ideal){var h=c(a.video.width.ideal).slice(0,3),g=c(a.video.height.ideal).slice(0,3),t={},n=0;for(t.da=void 0;n<h.length;t={da:t.da},++n){t.da=h[n];var f={},x=0;for(f.ca=void 0;x<g.length;f={ca:f.ca},++x)if(f.ca=g[x],t.da!==a.video.width.ideal||
  f.ca!==a.video.height.ideal){var B=Math.max(t.da,f.ca)/Math.min(t.da,f.ca);B<4/3-.1||B>16/9+.1||d(function(k,w){return function(l){l.video.width.ideal=k.da;l.video.height.ideal=w.ca;return l}}(t,f))}}}d(function(k){return V.Qc(k)})}a.video.width&&a.video.height&&(a.video.width.ideal&&a.video.height.ideal&&d(function(k){delete k.video.width.ideal;delete k.video.height.ideal;return k}),d(function(k){delete k.video.width;delete k.video.height;return k}));a.video.facingMode&&(d(function(k){delete k.video.facingMode;
  return k}),a.video.width&&a.video.height&&d(function(k){V.Qc(k);delete k.video.facingMode;return k}));e.push({audio:a.audio,video:!0});return e},le:function(a){if(V.zc()){if(!a||!a.video)return!1;var c=a.video.width,d=a.video.height;if(!c||!d)return!1;if(c.ideal&&d.ideal&&c.ideal>d.ideal)return a.video.height=c,a.video.width=d,!0}return!1},Ra:function(a){a.volume=0;V.va(a,"muted");if(V.Vb()){if(1===a.volume){var c=function(){a.volume=0;window.removeEventListener("mousemove",c,!1);window.removeEventListener("touchstart",
  c,!1)};window.addEventListener("mousemove",c,!1);window.addEventListener("touchstart",c,!1)}setTimeout(function(){a.volume=0;V.va(a,"muted")},5)}},Rc:function(a,c,d){return new Promise(function(e,h){if(a.srcObject&&a.srcObject.getVideoTracks){var g=a.srcObject.getVideoTracks();1!==g.length?h("INVALID_TRACKNUMBER"):(g=g[0],c?V.get(a,e,h,d):(g.stop(),e()))}else h("BAD_IMPLEMENTATION")})},rc:function(a,c,d,e){function h(t){g||(g=!0,d(t))}var g=!1;return navigator.mediaDevices.getUserMedia(e).then(function(t){function n(){setTimeout(function(){if(a.currentTime){var f=
  a.videoWidth,x=a.videoHeight;if(0===f||0===x)h("VIDEO_NULLSIZE");else{f&&(a.style.width=f.toString()+"px");x&&(a.style.height=x.toString()+"px");f={hd:null,je:null,Td:null};try{var B=t.getVideoTracks()[0];B&&(f.Td=B,f.hd=B.getCapabilities(),f.je=B.getSettings())}catch(k){}V.jd()?a.parentNode&&null!==a.parentNode?(g||c(a,t,f),setTimeout(function(){a.play()},100)):(document.body.appendChild(a),V.Ra(a),g||c(a,t,f),setTimeout(function(){a.style.transform="scale(0.0001,0.0001)";a.style.position="fixed";
  a.style.bottom="0px";a.style.right="0px";V.Ra(a);setTimeout(function(){a.play()},100)},80)):g||c(a,t,f)}}else h("VIDEO_NOTSTARTED")},700)}"undefined"!==typeof a.srcObject?a.srcObject=t:(a.src=window.URL.createObjectURL(t),a.videoStream=t);V.Ra(a);a.addEventListener("loadeddata",function(){var f=a.play();V.Ra(a);"undefined"===typeof f?n():f.then(function(){n()}).catch(function(){h("VIDEO_PLAYPROMISEREJECTED")})},!1)}).catch(function(t){h(t)})},get:function(a,c,d,e){if(!a)return d&&d("VIDEO_NOTPROVIDED"),
  !1;if(!V.Wb())return d&&d("MEDIASTREAMAPI_NOTFOUND"),!1;if(e&&e.video){if(V.Ub()){var h=V.zd();(12>h[0]||12===h[0]&&2>h[1])&&V.le(e)}e.video.width&&e.video.width.ideal&&(a.style.width=e.video.width.ideal+"px");e.video.height&&e.video.height.ideal&&(a.style.height=e.video.height.ideal+"px")}V.va(a,"autoplay");V.va(a,"playsinline");e&&e.audio?a.volume=0:V.va(a,"muted");V.rc(a,c,function(){function g(n){if(0===n.length)d("INVALID_FALLBACKCONSTRAINTS");else{var f=n.shift();V.rc(a,c,function(){g(n)},f)}}
  var t=V.od(e);g(t)},e)},Hd:function(a){if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return a(!1,"NOTSUPPORTED"),!1;navigator.mediaDevices.enumerateDevices().then(function(c){(c=c.filter(function(d){return d.kind&&-1!==d.kind.toLowerCase().indexOf("video")&&d.label&&d.deviceId}))&&c.length&&0<c.length?a(c,!1):a(!1,"NODEVICESFOUND")}).catch(function(){a(!1,"PROMISEREJECTED")})},Ce:function(a,c,d){var e={};e[c]=d;c=[];c.push(e);a.applyConstraints({advanced:c}).catch(function(){})}},
  za=function(){var a={n:5,xb:1,Bc:0,Ka:[30,45],Ha:[2,200],k:.7,re:200,Xd:.05},c=-1,d=null,e=-1,h=-1,g=0,t=-1,n=-1,f=0,x=0,B=a.Ha[1],k={oc:function(){switch(c){case -1:return-1;case 0:return n+d.Bc;case 1:return f}},cf:function(w){return Math.pow(Math.min(Math.max(t,0),d.n-1)/(d.n-1),w||1)},o:function(w){d=Object.assign({},a,w);t=n=d.xb;c=0},me:function(w){w=("undefined"===typeof w?Date.now():w)||0;var l=Math.min(Math.max(w-x,d.Ha[0]),d.Ha[1]);B=l;x=w;var D=-1===e?0:d.k;e=Math.min(Math.max(1E3/l,5),
  120)*(1-D)+e*D;w-h>d.re&&5<++g&&(l=d.k,t=t*(1-l)+(e<d.Ka[0]?n-1:e>d.Ka[1]?n+1:n)*l,Math.abs(t-n)>1-d.Xd&&(l=Math.min(Math.max(Math.round(t),0),d.n-1),l!==n&&(t=n=l,e=(d.Ka[1]-d.Ka[0])/2)),h=w)},Mc:function(w){f=w;c=1},Tc:function(){c=0;k.reset()},reset:function(){B=a.Ha[1];h=e=-1;g=0},Cd:function(){return B}};return k}(),W={neuralNetworkPath:"NNC.json",Pb:0,ad:25,ab:[2,7],ae:{minScale:.15,maxScale:.6,borderWidth:.2,borderHeight:.2,nStepsX:6,nStepsY:5,
  nStepsScale:3,nDetectsPerLoop:-1},oe:50,Dc:.5,Cc:.4,Ud:8,Vc:.8,Uc:1,ke:{translationFactorRange:[.0015,.005],rotationFactorRange:[.003,.02],qualityFactorRange:[.9,.98],alphaRange:[.05,1]},Ba:[.65,1,.262],ha:[.092,.092,.3],Yc:.2,$c:2,Zc:.1,Vd:8,Fc:1,wd:eb.Qa.bind(null,.3,.7),ue:20,Oc:3},ma={facingMode:"user",idealWidth:800,idealHeight:600,minWidth:480,maxWidth:1280,minHeight:480,maxHeight:1280,rotate:0,flipX:!1},ba={yb:-3,Rd:-1,error:-2,ready:1,play:2,pause:3},ia=ba.yb,y=null,ic={vb:!1,element:null,
  ba:null,V:null,u:[0,0],D:[.5,.5],m:[.5,0,0,.5],Wa:0,ua:null,ub:!1},L=null,jc={ta:null,Ea:null,antialias:!0,Mb:"./",oa:null,Y:null,Ca:W.Pb,Jc:W.Pb,Na:!1,ka:!1},Ga=null,aa=null,ta=null;var wb=Qa=nb=mb=lb=kb=bb=ab=$a=0;var Ta=1;var xb=Pa=Za=Ya=Oa=Na=0;var Sa={Gb:-1,fb:-1},U=null,kc={M:0,N:0,u:[0,0],xa:null},X={Aa:null,buffer:null,ha:null,Ba:null,S:W.Fc,wa:null},Wa=null,oa=null,db=null,Ra=null,I={i:1,fa:0,L:null,xc:!1,Ac:0,zb:0},sb=[],tb=[],Pb={VERSION:"1.3.5",init:function(a){function c(){ia!==ba.error&&
  2===++e&&(Ja(),Jb(),Ia(),L.ta&&(ia=ba.ready,L.ta(!1,{GL:b,canvasElement:L.Y,videoTexture:y.V.get(),maxFacesDetected:I.i,videoElement:y.element}),qb()),pb())}if(ia!==ba.yb)return a.callbackReady&&a.callbackReady("ALREADY_INITIALIZED"),!1;ia=ba.Rd;y=Object.assign({},ic);L=Object.assign({},jc);U=Object.assign({},kc);I.L=[0];X.ha=W.ha.slice(0);X.Ba=W.Ba.slice(0);"undefined"!==typeof a.antialias&&(L.antialias=a.antialias);a.callbackReady&&(L.ta=a.callbackReady);a.callbackTrack&&(L.Ea=a.callbackTrack);
  a.nExpressions&&(X.S=a.nExpressions);a.expressionsEasings&&(X.wa=a.expressionsEasings);"undefined"!==typeof a.animateDelay&&(L.Ca=a.animateDelay);"undefined"!==typeof a.NNCpath&&(L.Mb=a.NNCpath);"undefined"!==typeof a.NNC&&(L.oa=a.NNC);"undefined"!==typeof a.maxFacesDetected&&(I.i=Math.max(1,a.maxFacesDetected));"undefined"!==typeof a.followZRot&&(L.ka=a.followZRot?!0:!1);if(I.i>W.Ud)return Ha("MAXFACES_TOOHIGH"),!1;if(!a.canvasId&&!a.canvas)return Ha("NO_CANVASID"),!1;L.Y=a.canvas?a.canvas:document.getElementById(a.canvasId);
  if(!L.Y)return Ha("INVALID_CANVASID"),!1;U.M=L.Y.width;U.N=L.Y.height;if(!U.M||!U.N)return Ha("INVALID_CANVASDIMENSIONS"),!1;for(var d=0;d<I.i;++d)sb.push(new Float32Array(W.Vd)),tb.push(0);za.o({xb:0,n:W.ab[1]-W.ab[0]+1,Bc:W.ab[0]});aa=Object.create(W.ae);a.scanSettings&&(Object.assign(aa,a.scanSettings),-1!==aa.nDetectsPerLoop?za.Mc(aa.nDetectsPerLoop):za.Tc());ta=Object.create(W.ke);a.stabilizationSettings&&Object.assign(ta,a.stabilizationSettings);var e=0;a.videoSettings&&a.videoSettings.videoElement?
  fb(a.videoSettings.videoElement,c):(a.videoSettings&&Object.assign(ma,a.videoSettings),Lb(a.onWebcamAsk,a.onWebcamGet,function(h){fb(h,c)}));Wb(function(h){if(!Xb())return!1;Ga=new Cb({Pa:h.layers,Db:"gpuRawAvg",Ab:Zb});z.Xc([{id:"s50",name:"_",ia:"attribute vec2 a0;uniform mat2 u32;varying vec2 vv0;void main(){gl_Position=vec4(a0,0.,1.),vv0=vec2(.5,.5)+u32*a0*vec2(1.,-1.);}",Da:["a0"],qa:[2],a:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vv0);}",c:["u1","u32"],precision:"lowp"},
  {id:"s51",name:"_",a:"uniform sampler2D u1;varying vec2 vv0;void main(){gl_FragColor=texture2D(u1,vv0);}",ia:"attribute vec2 a0;uniform sampler2D u33;uniform vec2 u34;uniform float u35,u36,u37;varying vec2 vv0;void main(){vec4 a=texture2D(u33,vec2(.17,u35));vec2 f=a.gb,g=a.a*u34,b=a0;b.x*=u37;float c=cos(u36),d=sin(u36);vec2 h=mat2(c,d,-d,c)*b;vv0=f+h*.5*g,gl_Position=vec4(a0,0.,1.);}",Da:["a0"],qa:[2],c:"u1 u33 u34 u35 u36 u37".split(" "),precision:"lowp"},{id:"s52",name:"_",a:"uniform sampler2D u38,u33;uniform vec3 u39,u40;uniform float u41,u42,u43,u35,u44,u36,u45;const vec4 e=vec4(.25,.25,.25,.25);void main(){vec4 f=texture2D(u38,vec2(.625,.625)),g=texture2D(u38,vec2(.875,.625)),a=texture2D(u33,vec2(.17,u35));float b=dot(f,e),h=dot(g,e);bool i=b>u42&&b>h+u43;i?a.r=2.:a.r>u41?a.r=0.:a.r>1.9?a.r+=1.:0.,a.r*=u44;if(a.r<.9)a=vec4(1.,u39);else{a.r*=step(1.9,a.r);float j=dot(e,texture2D(u38,vec2(.875,.875))),k=dot(e,texture2D(u38,vec2(.125,.625))),l=dot(e,texture2D(u38,vec2(.375,.625))),c=cos(u36),d=sin(u36);vec2 m=mat2(c,d*u45,-d/u45,c)*vec2(j,k);a.gba+=vec3(m,l)*u40*a.a;}gl_FragColor=a;}",
  ia:"attribute vec2 a0;void main(){gl_Position=vec4(a0,0.,1.);}",c:"u38 u33 u39 u41 u40 u44 u36 u45 u42 u43 u35".split(" ")},{id:"s53",name:"_",ia:"attribute vec2 a0;void main(){gl_Position=vec4(a0,0.,1.);}",a:"uniform sampler2D u38;const vec4 e=vec4(.25,.25,.25,.25);const vec3 f=vec3(.5,.5,.5);void main(){float a=dot(e,texture2D(u38,vec2(.125,.875))),b=dot(e,texture2D(u38,vec2(.375,.875))),c=dot(e,texture2D(u38,vec2(.625,.875))),d=dot(e,texture2D(u38,vec2(.625,.625)));vec3 g=vec3(a,b,c)*.5+f;gl_FragColor=vec4(g,d);}",
  c:["u38"]},{id:"s54",name:"_",ia:"attribute vec2 a0;void main(){gl_Position=vec4(a0,0.,1.);}",a:"uniform sampler2D u38;const vec4 e=vec4(.25,.25,.25,.25);void main(){float a=dot(e,texture2D(u38,vec2(.375,.375))),b=dot(e,texture2D(u38,vec2(.625,.375))),c=dot(e,texture2D(u38,vec2(.875,.375))),d=dot(e,texture2D(u38,vec2(.125,.125)));gl_FragColor=vec4(a,b,c,d);}",c:["u38"]},{id:"s49",name:"_",a:"uniform sampler2D u33;uniform vec2 u46;uniform float u47;varying vec2 vv0;void main(){float f=step(.5,mod(gl_FragCoord.y+1.5,2.)),c=step(.33,vv0.x);vec4 a=texture2D(u33,vv0+u46);a.a=mix(a.a*u47,a.a,c);vec4 d=floor(255.*a),g=255.*(255.*a-d),b=mix(d,g,f)/255.;b.x=mix(step(a.x,1.5),b.x,c),gl_FragColor=b;}",
  c:["u33","u47","u46"]}]);Fb();Vb();vb();ub();c()});return!0},destroy:function(){return new Promise(function(a,c){Pb.toggle_pause(!0,!0).catch(function(){c()}).then(function(){Ga&&Ga.h();Ua.h();Ga=oa=Wa=null;sb.splice(0);tb.splice(0);ia=ba.yb;a()})})},toggle_pause:function(a,c){if(!cb())return Promise.reject();var d=null;d=c?V.Rc(y.element,!a,y.ua):Promise.resolve();a?Eb():d.then(function(){pb()});return d},update_videoSettings:function(a){Eb();return new Promise(function(c){V.Rc(y.element,!1,y.ua).then(function(){Object.assign(ma,
  a);Lb(null,null,function(d){fb(d,function(){Ja();Ia();pb();c()})})})})},toggle_slow:function(a){cb()&&ia===ba.play&&(a&&!L.Na?(L.Jc=L.Ca,aa.nDetectsPerLoop=1,this.set_animateDelay(100),L.Na=!0):!a&&L.Na&&(aa.nDetectsPerLoop=-1,this.set_animateDelay(L.Jc),L.Na=!1))},set_animateDelay:function(a){L.Ca=a},resize:function(){if(!cb())return!1;var a=L.Y.width,c=L.Y.height;if(!yb()&&a===U.M&&c===U.N)return!1;U.M=a;U.N=c;vb();ub();Ja();Ia();y.V&&y.V.resize(U.M,U.N);return!0},set_inputTexture:function(a,c,
  d){y.u[0]=c;y.u[1]=d;y.vb=!0;Ja();qb();Ia();z.set("s50");y.V.O();b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,a);S.g(!0,!0)},reset_GLState:function(){qb();U.xa.remove();X.Aa.remove();Fb()},render_video:function(){sa.G();z.set("s1");b.viewport(0,0,U.M,U.N);y.V.b(0);S.g(!0,!0)},reset_inputTexture:function(){yb();y.vb=!1;Ja();Ia()},get_videoDevices:function(a){return V.Hd(a)},set_scanSettings:function(a){Object.assign(aa,a);-1!==aa.nDetectsPerLoop?za.Mc(aa.nDetectsPerLoop):za.Tc();vb();ub()},
  set_stabilizationSettings:function(a){Object.assign(ta,a)},set_videoOrientation:function(a,c){cb()&&(ma.flipX=c,ma.rotate=a,Ja(),Ia())},update_videoElement:function(a,c){fb(a?a:y.element,function(){Jb();Ja();Ia();c&&c()})}};return Pb};window.JEEFACEFILTERAPI=window.JEEFACEFILTERAPIGEN();
  ;return JEEFACEFILTERAPI||window.JEEFACEFILTERAPI;})();