@ekyc_qoobiss/qbs-ect-cmp 4.7.90 → 4.7.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18113,6 +18113,6 @@ var s,r,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.toS
18113
18113
  * See the License for the specific language governing permissions and
18114
18114
  * limitations under the License.
18115
18115
  * =============================================================================
18116
- */const E9={"tfjs-core":Kh,"tfjs-backend-cpu":pW,"tfjs-backend-webgl":MJ,"tfjs-data":Pj,"tfjs-layers":dA,"tfjs-converter":Cz,tfjs:I9};var M9=Object.freeze({__proto__:null,Abs:Yn,Acos:Hn,Acosh:Zn,AdadeltaOptimizer:vk,AdagradOptimizer:xk,AdamOptimizer:Nk,AdamaxOptimizer:kk,Add:Qn,AddN:Xn,All:qn,Any:Jn,ArgMax:Kn,ArgMin:ts,Asin:es,Asinh:ns,Atan:ss,Atan2:is,Atanh:rs,AvgPool:os,AvgPool3D:cs,AvgPool3DGrad:us,AvgPoolGrad:as,BatchMatMul:ls,BatchToSpaceND:fs,Bincount:hs,BroadcastArgs:ps,BroadcastTo:ds,Callback:i_,CallbackList:aT,Cast:ms,Ceil:bs,ClipByValue:ys,Complex:ws,ComplexAbs:gs,Concat:vs,Conv2D:xs,Conv2DBackpropFilter:Ns,Conv2DBackpropInput:ks,Conv3D:Cs,Conv3DBackpropFilterV2:$s,Conv3DBackpropInputV2:Ss,Cos:Is,Cosh:Es,CropAndResize:As,Cumprod:Ms,Cumsum:Ts,CustomCallback:lT,DataStorage:_e,DenseBincount:Ds,DepthToSpace:Rs,DepthwiseConv2dNative:Os,DepthwiseConv2dNativeBackpropFilter:Ls,DepthwiseConv2dNativeBackpropInput:_s,Diag:Fs,Dilation2D:zs,Dilation2DBackpropFilter:Ps,Dilation2DBackpropInput:js,get ENV(){return Pn},EarlyStopping:c_,Einsum:Ws,Elu:Gs,EluGrad:Us,Environment:Ln,Equal:Ys,Erf:Vs,Exp:Hs,ExpandDims:Zs,Expm1:Qs,FFT:Xs,Fill:qs,FlipLeftRight:Js,Floor:Ks,FloorDiv:tr,FromPixels:Ki,FusedBatchNorm:er,FusedConv2D:no,FusedDepthwiseConv2D:so,GatherNd:sr,GatherV2:nr,GraphModel:vz,Greater:rr,GreaterEqual:ir,History:uT,IFFT:ar,Identity:or,Imag:cr,InputSpec:sM,IsFinite:ur,IsInf:lr,IsNan:fr,KernelBackend:Fe,LRN:Cr,LRNGrad:$r,LayerVariable:KE,LayersModel:VA,LeakyRelu:hr,Less:dr,LessEqual:pr,LinSpace:mr,Log:br,Log1p:yr,LogSoftmax:Nr,LogicalAnd:wr,LogicalNot:gr,LogicalOr:vr,LogicalXor:xr,LowerBound:kr,Max:Sr,MaxPool:Er,MaxPool3D:Tr,MaxPool3DGrad:Ar,MaxPoolGrad:Mr,MaxPoolWithArgmax:Dr,Maximum:Ir,Mean:Rr,Min:Or,Minimum:Lr,MirrorPad:_r,Mod:Fr,MomentumOptimizer:$k,Multinomial:zr,Multiply:jr,Neg:Pr,NonMaxSuppressionV3:Wr,NonMaxSuppressionV4:Gr,NonMaxSuppressionV5:Ur,NotEqual:Br,OP_SCOPE_SUFFIX:hu,OneHot:Yr,OnesLike:Vr,Optimizer:gk,OptimizerConstructors:Ik,Pack:Hr,PadV2:Zr,Pool:Qr,Pow:Xr,Prelu:qr,Prod:Jr,RMSPropOptimizer:Sk,RNN:iR,RaggedGather:Kr,RaggedTensorToTensor:ti,Range:ei,get Rank(){return ya},Real:ni,RealDiv:Bs,Reciprocal:si,get Reduction(){return AN},Relu:ri,Relu6:li,Reshape:ii,ResizeBilinear:ci,ResizeBilinearGrad:ui,ResizeNearestNeighbor:oi,ResizeNearestNeighborGrad:ai,Reverse:fi,RotateWithOffset:to,Round:hi,Rsqrt:di,SGDOptimizer:Ck,ScatterNd:pi,SearchSorted:mi,Select:bi,Selu:yi,Sequential:qA,Sigmoid:Ni,Sign:xi,Sin:gi,Sinh:vi,Slice:wi,Softmax:Ei,Softplus:ki,SpaceToBatchND:Si,SparseFillEmptyRows:Mi,SparseReshape:Ti,SparseSegmentMean:Ai,SparseSegmentSum:Di,SparseToDense:Ri,SplitV:Ii,Sqrt:Ci,Square:Li,SquaredDifference:Oi,Step:Ji,StridedSlice:_i,StringNGrams:Fi,StringSplit:zi,StringToHashBucketFast:ji,Sub:Pi,Sum:$i,SymbolicTensor:rM,Tan:Bi,Tanh:Wi,Tensor:pa,TensorBuffer:ua,Tile:Gi,TopK:Ui,Transform:Vi,Transpose:Yi,Unique:Hi,Unpack:Zi,UnsortedSegmentSum:Qi,UpperBound:Xi,Variable:ba,ZerosLike:qi,_FusedMatMul:eo,abs:ud,acos:fd,acosh:dd,add:ed,addN:md,all:yd,any:gd,argMax:xd,argMin:kd,asin:$d,asinh:Id,atan:Md,atan2:Ad,atanh:Rd,avgPool:ep,avgPool3d:sp,backend:Rf,backend_util:FC,basicLSTMCell:dp,batchNorm:wp,batchNorm2d:vp,batchNorm3d:Np,batchNorm4d:Cp,batchToSpaceND:mp,bincount:Sp,booleanMaskAsync:Qv,broadcastArgs:Ep,broadcastTo:Tp,broadcast_util:Qf,browser:oh,buffer:Il,callbacks:l_,cast:Ml,ceil:Dp,clipByValue:Lp,clone:Al,complex:mu,concat:ip,concat1d:Fp,concat2d:jp,concat3d:Bp,concat4d:Gp,constraints:jM,conv1d:Hp,conv2d:Vp,conv2dTranspose:qp,conv3d:Kp,conv3dTranspose:sm,copyRegisteredKernels:bo,cos:im,cosh:am,cosineWindow:ux,cumprod:um,cumsum:fm,customGrad:Jb,data:Bj,denseBincount:dm,deprecationWarn:yf,depthToSpace:mm,depthwiseConv2d:ym,deregisterOp:y_,device_util:Ua,diag:gm,dilation2d:xm,disableDeprecationWarnings:bf,dispose:kf,disposeVariables:wf,div:id,divNoNan:Mm,dot:Am,dropout:ax,einsum:Rm,elu:Lm,enableDebugMode:mf,enableProdMode:pf,enclosingPowerOfTwo:cx,engine:gf,env:jn,equal:km,erf:Fm,euclideanNorm:ub,exp:fb,expandDims:db,expm1:mb,eye:gb,fft:av,fill:Rp,findBackend:Tf,findBackendFactory:Af,floor:xb,floorDiv:sd,fused:Ex,gather:kb,gatherND:rx,gather_util:ch,getBackend:Ef,getGradient:uo,getKernel:co,getKernelsForBackend:lo,grad:Hb,grads:Zb,greater:$b,greaterEqual:Ib,ifft:uv,imag:_f,image:pk,inTopKAsync:fx,initializers:eT,input:eD,io:uf,irfft:fv,isFinite:Mb,isInf:Ab,isNaN:Rb,keep:Cf,kernel_impls:zC,layers:FL,leakyRelu:Lb,less:Fb,lessEqual:jb,linalg:mk,linspace:Pb,loadGraphModel:xz,loadGraphModelSync:Nz,loadLayersModel:tD,localResponseNormalization:Wb,log:Ub,log1p:Yb,logSigmoid:sy,logSoftmax:ay,logSumExp:uy,logicalAnd:fy,logicalNot:dy,logicalOr:my,logicalXor:yy,losses:bk,lowerBound:xy,matMul:ff,math:Vf,max:Hm,maxPool:ky,maxPool3d:$y,maxPoolWithArgmax:Iy,maximum:My,mean:Ay,memory:vf,meshgrid:Oy,metrics:KL,min:Qm,minimum:_y,mirrorPad:zy,mod:Py,model:JA,models:t_,moments:Wy,movingAverage:qv,mul:ad,multiRNNCell:Uy,multinomial:Yy,neg:zf,nextFrame:Tk,norm:ab,notEqual:Zy,oneHot:df,ones:Ry,onesLike:Xy,op:du,outerProduct:Jy,pad:tw,pad1d:nw,pad2d:rw,pad3d:ow,pad4d:cw,pool:pw,pow:qm,prelu:bw,print:Dl,prod:ww,profile:xf,raggedGather:vw,raggedTensorToTensor:Nw,rand:Cw,randomGamma:lg,randomNormal:hg,randomStandardNormal:pg,randomUniform:bg,range:yg,ready:If,real:Pf,reciprocal:gg,registerBackend:Df,registerCallbackConstructor:nD,registerGradient:ho,registerKernel:fo,registerOp:m_,regularizers:r_,relu:xg,relu6:kg,removeBackend:Mf,reshape:Kd,reverse:$g,reverse1d:Ig,reverse2d:Mg,reverse3d:Ag,reverse4d:Rg,rfft:mv,round:Lg,rsqrt:Fg,scalar:Jm,scatterND:Kv,scatter_util:hh,searchSorted:vy,selu:jg,separableConv2d:Bg,sequential:KA,serialization:Fh,setBackend:Sf,setPlatform:Of,setdiff1dAsync:Gg,sigmoid:ap,sign:Vg,signal:dk,sin:Hg,sinh:Qg,slice:up,slice1d:qg,slice2d:Kg,slice3d:ev,slice4d:sv,slice_util:Rh,softmax:iv,softplus:ey,spaceToBatchND:lw,sparse:yk,sparseToDense:nx,spectral:hk,split:dv,sqrt:tb,square:nb,squaredDifference:yv,squeeze:gv,stack:xv,step:kv,stridedSlice:$v,string:wk,sub:iy,sum:rb,sumOutType:Ca,tan:Iv,tanh:fp,tensor:yu,tensor1d:Ev,tensor2d:Mv,tensor3d:Xf,tensor4d:Tv,tensor5d:Av,tensor6d:Dv,tensor_util:Aa,test_util:Jh,tidy:Nf,tile:yb,time:$f,topk:Ov,train:Ek,transpose:Wf,truncatedNormal:_v,unique:zv,unregisterGradient:mo,unregisterKernel:po,unsortedSegmentSum:Pv,unstack:Wv,upcastType:ka,upperBound:Gv,util:Zo,valueAndGrad:Qb,valueAndGrads:Xb,variable:Uv,variableGrads:qb,version:E9,version_converter:Cz,version_core:Kh,version_layers:dA,where:$m,whereAsync:Hv,zeros:Dy,zerosLike:Im});var T9=f(M9);var A9;function D9(){if(A9)return st;A9=1;var t=ot();var e=ut();Object.defineProperty(st,"__esModule",{value:true});st.ObjectDetectionModel=st.ClassificationModel=void 0;var n=t(jt());var s=t(se());var r=t(ue());var i=t(me());var o=t(we());var a=t(xe());var c=t(Ce());var u=t(Re());var l=h(T9);function f(t){if(typeof WeakMap!=="function")return null;var e=new WeakMap;var n=new WeakMap;return(f=function t(s){return s?n:e})(t)}function h(t,n){if(t&&t.__esModule){return t}if(t===null||e(t)!=="object"&&typeof t!=="function"){return{default:t}}var s=f(n);if(s&&s.has(t)){return s.get(t)}var r={};var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t){if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;if(a&&(a.get||a.set)){Object.defineProperty(r,o,a)}else{r[o]=t[o]}}}r.default=t;if(s){s.set(t,r)}return r}function d(t){var e=p();return function n(){var s=(0,o.default)(t),r;if(e){var a=(0,o.default)(this).constructor;r=Reflect.construct(s,arguments,a)}else{r=s.apply(this,arguments)}return(0,i.default)(this,r)}}function p(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(t){return false}}var m=function(){function t(){(0,c.default)(this,t);this.NEW_OD_OUTPUT_TENSORS=["detected_boxes","detected_scores","detected_classes"]}(0,u.default)(t,[{key:"loadModelAsync",value:function(){var t=(0,a.default)(n.default.mark((function t(e){var s,r=arguments;return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:s=r.length>1&&r[1]!==undefined?r[1]:null;n.next=3;return l.loadGraphModel(e,s);case 3:this.model=n.sent;this.input_size=this.model.inputs[0].shape[1];this.is_new_od_model=this.model.outputs.length==3;this.is_rgb_input=this.model.metadata&&this.model.metadata["Image.BitmapPixelFormat"]=="Rgb8"||this.is_new_od_model;case 7:case"end":return n.stop()}}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"dispose",value:function t(){this.model.dispose()}},{key:"executeAsync",value:function(){var t=(0,a.default)(n.default.mark((function t(e){var s=this;var r,i,o;return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:r=l.tidy((function(){return e instanceof l.Tensor?e:s._preprocess(l.browser.fromPixels(e,3))}));n.next=3;return this.model.executeAsync(r,this.is_new_od_model?this.NEW_OD_OUTPUT_TENSORS:null);case 3:i=n.sent;l.dispose(r);n.next=7;return!Array.isArray(i)?i.array():Promise.all(i.map((function(t){return t.array()})));case 7:o=n.sent;l.dispose(i);return n.abrupt("return",this._postprocess(o));case 10:case"end":return n.stop()}}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"_postprocess",value:function(){var t=(0,a.default)(n.default.mark((function t(e){return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:return n.abrupt("return",e);case 1:case"end":return n.stop()}}}),t)})));function e(e){return t.apply(this,arguments)}return e}()}]);return t}();var b=function(t){(0,r.default)(i,t);var e=d(i);function i(){var t;(0,c.default)(this,i);t=e.call(this);t.ANCHORS=[.573,.677,1.87,2.06,3.34,5.47,7.88,3.53,9.77,9.17];return t}(0,u.default)(i,[{key:"_preprocess",value:function t(e){var n=l.image.resizeBilinear(e.expandDims().toFloat(),[this.input_size,this.input_size]);return this.is_rgb_input?n:n.reverse(-1)}},{key:"_postprocess",value:function(){var t=(0,a.default)(n.default.mark((function t(e){var r=this;var i,o,a,c,u,f,h,d;return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:if(!(e.length==3)){n.next=2;break}return n.abrupt("return",e);case 2:i=l.tidy((function(){var t=r.ANCHORS.length/2;var n=e[0][0][0].length;var s=e[0].length;var i=e[0][0].length;var o=n/t-5;var a=[];var c=[];var u=[];for(var f=0;f<s;f++){for(var h=0;h<i;h++){var d=0;for(var p=0;p<t;p++){var m=(r._logistic(e[0][f][h][d++])+h)/i;var b=(r._logistic(e[0][f][h][d++])+f)/s;var y=Math.exp(e[0][f][h][d++])*r.ANCHORS[p*2]/i;var w=Math.exp(e[0][f][h][d++])*r.ANCHORS[p*2+1]/s;var g=l.scalar(r._logistic(e[0][f][h][d++]));var v=l.tensor1d(e[0][f][h].slice(d,d+o)).softmax();d+=o;v=v.mul(g);var x=v.argMax();a.push([m-y/2,b-w/2,m+y/2,b+w/2]);c.push(v.max().dataSync()[0]);u.push(x.dataSync()[0])}}}a=l.tensor2d(a);c=l.tensor1d(c);u=l.tensor1d(u);return[a,c,u]})),o=(0,s.default)(i,3),a=o[0],c=o[1],u=o[2];n.next=5;return l.image.nonMaxSuppressionAsync(a,c,10);case 5:f=n.sent;h=[a.gather(f),c.gather(f),u.gather(f)];n.next=9;return h[0].array();case 9:n.t0=n.sent;n.next=12;return h[1].array();case 12:n.t1=n.sent;n.next=15;return h[2].array();case 15:n.t2=n.sent;d=[n.t0,n.t1,n.t2];l.dispose([a,c,u]);l.dispose(f);l.dispose(h);return n.abrupt("return",d);case 21:case"end":return n.stop()}}}),t)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"_logistic",value:function t(e){if(e>0){return 1/(1+Math.exp(-e))}else{var n=Math.exp(e);return n/(1+n)}}}]);return i}(m);st.ObjectDetectionModel=b;var y=function(t){(0,r.default)(n,t);var e=d(n);function n(){(0,c.default)(this,n);return e.apply(this,arguments)}(0,u.default)(n,[{key:"_preprocess",value:function t(e){var n=e.shape.slice(0,2),r=(0,s.default)(n,2),i=r[0],o=r[1];var a=i>o?(i-o)/2:0;var c=i>o?0:(o-i)/2;var u=Math.min(i,o);var f=l.image.cropAndResize(e.expandDims().toFloat(),[[a/i,c/o,(a+u)/i,(c+u)/o]],[0],[this.input_size,this.input_size]);return this.is_rgb_input?f:f.reverse(-1)}}]);return n}(m);st.ClassificationModel=y;return st}var R9=D9();const O9=".camera{color:white;display:flex;align-items:center;justify-content:center;position:relative}.cameraCanvas,.cameraCanvasSelfie,.cameraCanvasSelfieDesk{z-index:3;max-width:100%;max-height:100%;border-radius:10px}.cameraCanvasSelfie,.cameraCanvasSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.cameraVideo,.cameraVideoSelfie,.cameraVideoSelfieDesk{z-index:2;max-width:100%;max-height:100%;border-radius:10px}.cameraVideoSelfie,.cameraVideoSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.id-guide-rectangle{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:70%;padding-bottom:calc(70% / 1.58);border:3px dashed rgba(255, 255, 255, 0.7);border-radius:8px;z-index:5;pointer-events:none;box-sizing:border-box}.countdown-overlay-style{position:absolute;inset:0;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:6}.video-overlay-canvas{position:absolute;top:0;left:0;width:100%;height:100%;z-index:7;pointer-events:none}.capture-flash-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:white;opacity:0;animation:capture-flash 0.2s ease-out;pointer-events:none;z-index:10}@keyframes bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8, 0, 1, 1)}50%{transform:none;animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes capture-flash{0%{opacity:0}50%{opacity:1}100%{opacity:0}}.countdown-text-style{color:white;font-size:8rem;font-weight:bold;animation:bounce 1s infinite;}";var L9;(function(t){t["JPEG"]="image/jpeg";t["PNG"]="image/png"})(L9||(L9={}));const _9=class{constructor(n){t(this,n);this.eventPhotoCapture=e(this,"photoIdCapture");this.eventRecordingIdReady=e(this,"recordingIdCapture");this.eventTimeElapsed=e(this,"timeElapsed");this.mediaRecorder=null;this.mediaStream=null;this.animationFrameId=null;this.processingsCount=0;this.objectDetectionModel=null;this.canvasContext=null;this.processingContext=null;this.overlayContext=null;this.timerInterval=null;this.WARNING_THRESHOLD_SECONDS=40;this.recordedChunks=[];this.countdown=0;this.isCapturing=false;this.mode="idle";this.tfjsReady=false;this.detectedArea=null;this.elapsedTime=0;this.isLoading=true;this.startRecording=()=>{if(!this.mediaStream||!this.videoElement||!o.videoRecording){return}this.recordedChunks=[];var t={mimeType:m.webmMimeType.mime};if(!MediaRecorder.isTypeSupported(t.mimeType)){if(o.device.mobileOS==w.iOS||o.device.browser==x.Safari)t.mimeType=m.mp4MimeType.mime}this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:"video/webm"});this.mediaRecorder.ondataavailable=({data:t})=>{if(t.size>0){this.recordedChunks=[...this.recordedChunks,t]}};this.mediaRecorder.onstop=()=>{if(this.recordedChunks.length>0){var e=new Blob(this.recordedChunks,{type:t.mimeType.split(";")[0]});this.eventRecordingIdReady.emit(e);this.mode="done"}};this.mediaRecorder.start();console.log("Recording started...")};this.stopRecording=()=>{if(this.mediaRecorder&&this.mediaRecorder.state==="recording"){this.mediaRecorder.stop();console.log("Recording stopped.")}};this.capture=async()=>new Promise((t=>{if(this.videoElement&&this.canvasElement){const e=this.videoElement;const n=this.canvasElement;const s=this.canvasContext;n.width=e.videoWidth;n.height=e.videoHeight;s.drawImage(e,0,0,n.width,n.height);n.toBlob((e=>{if(e&&e.type===L9.JPEG&&!o.device.isAppleDevice){try{if(o.debug)console.log("stream | getFrame | addExifInImg");N(e,this.mediaStream.getTracks()[0],{width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}).then((e=>{this.eventPhotoCapture.emit(e);this.isCapturing=true;setTimeout((()=>{this.isCapturing=false}),400);t(true)}))}catch(e){this.eventTimeElapsed.emit();t(false)}}else{if(o.debug)console.log("stream | getFrame | resolve");this.eventPhotoCapture.emit(e);this.isCapturing=true;setTimeout((()=>{this.isCapturing=false}),400);t(true)}}),L9.PNG,1);console.log("Image captured!")}else{console.error("Video element or canvas element not found. Cannot capture image.")}}));this.startFrameProcessing=()=>{if(this.animationFrameId===null){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}};this.handleStartTiltDetection=()=>{console.log("Detecting tilt... Please tilt the ID. (Rectangle will appear on detected object).");this.mode="detecting_tilt_live";this.detectedArea=null;this.titleMesage=this.translations.HowToValues.TiltTitle;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.startFrameProcessing()};this.handleStartDetection=async()=>{if(!this.mediaStream){console.log("Camera not ready. Please allow camera access.");return}console.log("Starting ID detection...");this.mode="detecting_straight_id";this.recordedChunks=[];this.detectedArea=null;this.countdown=0;this.processingsCount=0;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}if(this.videoElement&&this.videoElement.readyState<3){console.log("Waiting for video stream to fully load...");await new Promise((t=>{const e=()=>{this.videoElement.removeEventListener("canplaythrough",e);t()};this.videoElement.addEventListener("canplaythrough",e)}));console.log("Video stream ready. Starting detection.")}this.startRecording();this.startFrameProcessing()}}async componentWillLoad(){this.translations=await b.getValues()}async componentDidLoad(){this.initVariables();if(this.canvasElement){this.canvasContext=this.canvasElement.getContext("2d",{willReadFrequently:true})}if(this.processingCanvasElement){this.processingContext=this.processingCanvasElement.getContext("2d",{willReadFrequently:true})}if(this.overlayCanvasElement){this.overlayContext=this.overlayCanvasElement.getContext("2d",{willReadFrequently:true})}console.log("Loading AI model...");this.objectDetectionModel=new R9.ObjectDetectionModel;await this.objectDetectionModel.loadModelAsync("../../../assets/tfmodel/model.json");this.tfjsReady=true;console.log('AI model loaded. Camera ready. Click "Start ID Detection" to begin.');await this.getMedia();this.handleStartDetection();this.timerInterval=setInterval((()=>{this.elapsedTime++;console.log(`Time open: ${this.elapsedTime} seconds`);if(this.elapsedTime>=this.WARNING_THRESHOLD_SECONDS){if(this.timerInterval!==null){clearInterval(this.timerInterval);this.timerInterval=null;console.warn(`Warning: Component has been open for ${this.WARNING_THRESHOLD_SECONDS} seconds!`)}this.eventTimeElapsed.emit()}}),1e3)}initVariables(){if(o.debug)console.log("id-capture | initVariables");if(o.flowStatus==a.IDFRONT){this.titleMesage=this.translations.IdCaptureValues.Title}else if(o.flowStatus==a.IDBACK){this.titleMesage=this.translations.IdCaptureValues.TitleBack}else if(o.flowStatus==a.IDTILT){this.titleMesage=this.translations.IdCaptureValues.IDPoseMapping}}disconnectedCallback(){if(this.mediaRecorder){this.mediaRecorder.stop();this.mediaRecorder=null}if(this.mediaStream){this.mediaStream.getTracks().forEach((t=>t.stop()))}if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.detectedArea=null;if(this.timerInterval!==null){clearInterval(this.timerInterval);this.timerInterval=null}}async getMedia(){try{if(!o.cameraId){await m.InitCameras(o.device)}const t=m.GetConstraints(o.cameraId,o.device);const e=await navigator.mediaDevices.getUserMedia(t);if(this.videoElement){this.videoElement.srcObject=e;this.videoElement.play()}this.mediaStream=e;this.checkReadyState()}catch(t){console.error("Error accessing camera:",t);this.mode="idle";this.isLoading=false}}async detectIdWithTensorFlow(t,e=.9){if(!this.objectDetectionModel)return null;try{const n=await this.objectDetectionModel.executeAsync(t);let s=null;let r=0;for(const i of n[1]){if(i>e){s={};let e=n[0][r];s.bbox=[e[0]*t.videoWidth,e[1]*t.videoHeight,e[2]*t.videoWidth-e[0]*t.videoWidth,e[3]*t.videoHeight-e[1]*t.videoHeight];s.score=n[1][r];s.class=n[2][r]}++r}return s}catch(t){console.error("TensorFlow.js detection error:",t);return null}}async processVideoFrame(){if(this.videoElement&&this.processingCanvasElement&&this.overlayCanvasElement&&this.tfjsReady&&(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live")&&this.videoElement.readyState>=2&&this.processingContext&&this.overlayContext&&this.processingsCount<100){this.processingsCount++;const t=this.videoElement;const e=this.processingCanvasElement;const n=this.overlayCanvasElement;const s=this.processingContext;const r=this.overlayContext;r.clearRect(0,0,n.width,n.height);e.width=t.videoWidth;e.height=t.videoHeight;n.width=t.videoWidth;n.height=t.videoHeight;s.drawImage(t,0,0,e.width,e.height);let i=await this.detectIdWithTensorFlow(t);try{if(i){const[e,s,o,a]=i.bbox;const c=o/a;const u=o*a;let l="blue";let f=`Detected: ${i.class} (${(i.score*100).toFixed(1)}%). Area: ${u.toFixed(0)} px²`;console.log(f);this.detectedArea=u;if(this.mode==="detecting_straight_id"){if(c>1.4&&c<1.8&&u>t.videoWidth*t.videoHeight*.1){l="green";console.log("Straight ID detected! Starting countdown...");this.titleMesage=this.translations.IdCaptureValues.IdDetected;this.countdown=3;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.mode="countdown_capture";const t=setInterval((async()=>{this.countdown--;if(this.countdown<=0){clearInterval(t);await this.capture();console.log('ID captured! Click "Start Tilt Detection" to analyze tilt.');this.countdown=0;this.detectedArea=null;r.clearRect(0,0,n.width,n.height);this.mode="awaiting_tilt_start";this.handleStartTiltDetection()}}),1e3);return}else{l="red";console.log("Looking for straight ID... Please align your ID with the guide.")}}else if(this.mode==="detecting_tilt_live"){if(c>1.4&&c<1.8){l="green";console.log(`ID is relatively straight (Aspect Ratio: ${c.toFixed(2)}).`);this.titleMesage=this.translations.IdCaptureValues.NoTiltDetected}else{l="yellow";console.log(`ID appears tilted (Aspect Ratio: ${c.toFixed(2)}).`);this.stopRecording()}console.log("Detecting tilt... Observe the highlighted object.")}r.strokeStyle=l;r.lineWidth=4;r.strokeRect(e,s,o,a);r.fillStyle=l;r.font="24px Arial";r.fillText(`${i.class} (${(i.score*100).toFixed(1)}%)`,e,s>20?s-10:s+25)}else{this.detectedArea=null;if(this.mode==="detecting_straight_id"){console.log("No ID detected. Please ensure ID is visible.")}else if(this.mode==="detecting_tilt_live"){console.log("No object detected for tilt analysis.")}}}catch(t){console.error("TensorFlow.js processing error:",t);console.log("AI processing error. See console for details.");this.mode="idle";this.detectedArea=null;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}}finally{}if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){setTimeout((()=>{if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}}),100)}else{if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}}}if(this.processingsCount>=100){console.warn("Maximum processing frames reached. Stopping further processing.");this.mode="idle";this.processingsCount=0;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.eventTimeElapsed.emit()}}checkReadyState(){if(this.tfjsReady&&this.mediaStream){this.isLoading=false;this.mode="idle"}}render(){let t="cameraVideo";if(o.device.isDesktop){t="cameraVideoSelfieDesk"}return n("div",{key:"24aaaa0f3075a34306461e8fa633006bbc0ba8b0",class:"container flex center"},n("div",{key:"9d05b82d9bb4d8b207aaf09267508b6a8f3d2515",class:"px-2 w-100"},n("h1",{key:"19e51ef69bd86e387c43ac1707a7a280cf6f3f61",class:this.titleStyle,innerHTML:this.titleMesage}),n("div",{key:"4fe5a07ae4ea914f2526ef2d3b299150f342fca1",class:"w-100 h-100 rounded"},n("div",{key:"c82f360cacea013f69391040b8e2d22a83886918",class:"camera rounded"},this.isLoading&&n("div",{key:"86e8f0ed8be6c8a46de131a70e8c01d5bddba7ea",class:"loader-overlay"},n("div",{key:"4cdd9337a17e201d0f6c7fa7cd4370530ca11cd5",class:"loader-spinner"})),n("video",{key:"a0548200df7455cc914d04c796ae57e58499afb4",id:"video",loop:true,autoplay:true,playsinline:true,muted:true,class:t,ref:t=>this.videoElement=t}),n("canvas",{key:"af44733acf7d0c6238f195284f975d6fa84f8aac",id:"output",ref:t=>this.canvasElement=t,style:{display:"none"}}),n("canvas",{key:"21f10eee1121b42f5ed0878fe0f804d7d49ed51d",id:"processingCanvasElement",ref:t=>this.processingCanvasElement=t,style:{display:"none"}}),n("canvas",{key:"b7608d2e2b0d6e16975bcff1d3a52f7187d314c8",id:"overlayCanvasElement",ref:t=>this.overlayCanvasElement=t,class:"video-overlay-canvas"}),n("div",{key:"9ebbfbafe3ab8423411f5d40716d2733be0c515a",class:"id-guide-rectangle"}),this.isCapturing&&n("div",{key:"5097a52a261aa74e58318445500bbe66b1ae4a6e",class:"capture-flash-overlay"}),this.countdown>0&&n("div",{key:"7c64ebee2f0e31f541a320b34200791c69790d0d",class:"countdown-overlay-style"},n("span",{key:"258fe5d2567add9900dd3e3f1f285058e58c9624",class:"countdown-text-style"},this.countdown)))),n("div",{key:"e198b7758c08dc16cdf81b04705bd4cd485f3a76",class:"footer text-center"},n("img",{key:"80f5b2e1a4983ae00d0fc3186f1ac6ee07e115e5",src:y}))))}get el(){return s(this)}};_9.style=O9;const F9="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1Mi4yOTIiIGhlaWdodD0iNDMuODU4IiB2aWV3Qm94PSIwIDAgNTIuMjkyIDQzLjg1OCI+DQogIDxnIGlkPSJpZC1jYXJkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcgLTI5KSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTEiIGQ9Ik0yMC4zNzQsNjYuOTU0aDIyLjM1YS44NDMuODQzLDAsMCwwLDAtMS42ODdIMjAuMzc0YTEuNjg5LDEuNjg5LDAsMCwxLTEuNjg3LTEuNjg3VjMyLjM3NGExLjY4OSwxLjY4OSwwLDAsMSwxLjY4Ny0xLjY4N0g2NS45MThBMS42ODksMS42ODksMCwwLDEsNjcuNiwzMi4zNzRWNDkuMjQyYS44NDMuODQzLDAsMCwwLDEuNjg3LDBWMzIuMzc0QTMuMzc4LDMuMzc4LDAsMCwwLDY1LjkxOCwyOUgyMC4zNzRBMy4zNzgsMy4zNzgsMCwwLDAsMTcsMzIuMzc0VjYzLjU4QTMuMzc4LDMuMzc4LDAsMCwwLDIwLjM3NCw2Ni45NTRaIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MiIgZGF0YS1uYW1lPSJQYXRoIDQ3NTIiIGQ9Ik01MC42NTEsNTAuMzI2YTYuMzI2LDYuMzI2LDAsMSwwLTYuMzI2LDYuMzI2QTYuMzMzLDYuMzMzLDAsMCwwLDUwLjY1MSw1MC4zMjZabS0xMC45NjQsMGE0LjYzOSw0LjYzOSwwLDEsMSw0LjYzOSw0LjYzOUE0LjY0NCw0LjY0NCwwLDAsMSwzOS42ODcsNTAuMzI2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEyLjE0NCAtOC42NzQpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MyIgZGF0YS1uYW1lPSJQYXRoIDQ3NTMiIGQ9Ik0zMiw4NC43NDd2My4zNzRhLjg0NC44NDQsMCwwLDAsLjg0My44NDNINDguODY4YS44NDQuODQ0LDAsMCwwLC44NDMtLjg0M1Y4NC43NDdBNi43NTUsNi43NTUsMCwwLDAsNDIuOTY0LDc4SDM4Ljc0N0E2Ljc1NSw2Ljc1NSwwLDAsMCwzMiw4NC43NDdabTYuNzQ3LTUuMDZoNC4yMTdhNS4wNjYsNS4wNjYsMCwwLDEsNS4wNiw1LjA2djIuNTNIMzMuNjg3di0yLjUzQTUuMDY2LDUuMDY2LDAsMCwxLDM4Ljc0Nyw3OS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOC42NzQgLTI4LjMzNikiIGZpbGw9IiMyNTJjODIiLz4NCiAgICA8cGF0aCBpZD0iUGF0aF80NzU0IiBkYXRhLW5hbWU9IlBhdGggNDc1NCIgZD0iTTEwMi43MTIsNDhIODUuODQzYS44NDMuODQzLDAsMCwwLDAsMS42ODdoMTYuODY4YS44NDMuODQzLDAsMCwwLDAtMS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzkuMzI0IC0xMC45ODgpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1NSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTUiIGQ9Ik0xMDIuNzEyLDYySDg1Ljg0M2EuODQzLjg0MywwLDEsMCwwLDEuNjg3aDE2Ljg2OGEuODQzLjg0MywwLDAsMCwwLTEuNjg3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5LjMyNCAtMTkuMDg0KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTYiIGRhdGEtbmFtZT0iUGF0aCA0NzU2IiBkPSJNOTUuMjI5LDc1YTEyLjIzLDEyLjIzLDAsMSwwLDEyLjIzLDEyLjIzQTEyLjI0NCwxMi4yNDQsMCwwLDAsOTUuMjI5LDc1Wm0wLDIyLjk3N0ExMC43NDcsMTAuNzQ3LDAsMSwxLDEwNS45NzcsODcuMjMsMTAuNzU5LDEwLjc1OSwwLDAsMSw5NS4yMjksOTcuOTc3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM4LjE2NyAtMjYuNjAyKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTciIGRhdGEtbmFtZT0iUGF0aCA0NzU3IiBkPSJNMTExLjA1OSw5OC43MTdsLTcuNDQ0LDcuNDQzLTQuODUtNC44NDlhLjc0MS43NDEsMCwwLDAtMS4wNDgsMS4wNDhsNS4zNzQsNS4zNzRhLjc0MS43NDEsMCwwLDAsMS4wNDgsMGw3Ljk2OC03Ljk2OGEuNzQxLjc0MSwwLDAsMC0xLjA0OC0xLjA0OFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00Ny4yOTQgLTQxLjM5MykiIGZpbGw9IiM3YmI0MGYiLz4NCiAgPC9nPg0KPC9zdmc+DQo=";const z9="";const j9=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillRender(){this.translations=await b.getValues()}componentWillLoad(){this.yesButtonPressed=false;this.noButtonPressed=false}async hasBackSelected(){this.yesButtonPressed=true;try{await i.instance.SetTwoSidedId()}catch(t){this.apiErrorEvent.emit(t)}}async onlyFrontSelected(){this.noButtonPressed=true;try{o.flowStatus=await i.instance.GetNextFlowState()}catch(t){this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"008e5ebfbe16e455448ff03de29796e2baa54d6d",class:"container flex center"},n("div",{key:"e099c4e5b00fbb452197569c4b11d3b160da51e4",class:"px-3"},n("div",{key:"bf59fcb8f9f89fa46892a033a5f42ec565a738a6",class:"mb-1 ml-1 text-center"},n("img",{key:"b7a91c2e08e7ba3941c42b35f39f2f09fe1e29a2",src:F9,style:{width:"70px"}})),n("h1",{key:"12981efac16a102b281582d3be075fa31b16623f",class:"text-center mb-1"},this.translations.IdSelectionValues.Title),n("div",{key:"3e3698e32544a50f0ed4833de4a1c8b22626625b",class:"color-blue mb-2 loud-text",innerHTML:this.translations.IdSelectionValues.Description}),!this.noButtonPressed?n("div",{class:"button flex mb-1"},this.yesButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.yesButtonPressed,onClick:()=>this.hasBackSelected()},this.translations.IdSelectionValues.ButtonYes)):null,n("div",{key:"3eb629414407cc98068f491dfa93451d622cd3a2"}),!this.yesButtonPressed?n("div",{class:"button flex mb-1"},this.noButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.noButtonPressed,onClick:()=>this.onlyFrontSelected()},this.translations.IdSelectionValues.ButtonNo)):null,n("div",{key:"760230d2c827f71f366ba33cd8f39f77e5626e20",class:"footer text-center"},n("img",{key:"dbf9c2b64c20a3071b86c6565009857f2a5a4d70",src:y}))))}};j9.style=z9;const P9="4.7.90";var B9={version:P9};class W9{constructor(){var t,e,n,s;this.motionValues=[];this.orientationValues=[];this.addItemsToOrientation=t=>{this.orientationValues.push({beta:t.beta,gamma:t.gamma});if(this.orientationValues.length>5){window.removeEventListener("deviceorientation",this.addItemsToOrientation)}};this.addItemsToMotion=t=>{this.motionValues.push({x:t.acceleration.x,y:t.acceleration.y});if(this.motionValues.length>5){window.removeEventListener("devicemotion",this.addItemsToMotion)}};this.supportedScreenOrientation=(e=(t=((screen===null||screen===void 0?void 0:screen.orientation)||{}).type)!==null&&t!==void 0?t:screen.mozOrientation)!==null&&e!==void 0?e:screen.msOrientation;this.safariScreenOrientation=!(screen===null||screen===void 0?void 0:screen.orientation)&&matchMedia("(orientation: portrait)").matches?"portrait-primary":"landscape-primary";this.initialScreenOrientation=(s=(n=this.supportedScreenOrientation)!==null&&n!==void 0?n:this.safariScreenOrientation)!==null&&s!==void 0?s:"portrait-primary";this.userAgent=navigator.userAgent||navigator.vendor||window.opera||undefined;this.isMobile=this.isMobileDevice();this.isTablet=this.isTabletDevice();this.isDesktop=!this.isMobile&&!this.isTablet}isMobileDevice(){const t=[/(Android)(.+)(Mobile)/i,/BlackBerry/i,/iPhone|iPod/i,/Opera Mini/i,/IEMobile/i];return t.some((t=>this.userAgent.match(t)))}isTabletDevice(){const t=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;return t.test(this.userAgent.toLowerCase())}getMobileOS(){if(this.isMobileDevice()){if(/windows phone/i.test(this.userAgent))return w.WindowsPhone;else if(/android/i.test(this.userAgent))return w.Android;else if(/iPad|iPhone|iPod/.test(this.userAgent)&&!window.MSStream)return w.iOS;return w.Unknown}else return undefined}getDesktopOS(){if(this.isDesktop){if(this.userAgent.indexOf("Win")!==-1)return k.Windows;else if(this.userAgent.indexOf("Mac")!==-1)return k.MacOS;else if(this.userAgent.indexOf("X11")!==-1)return k.Unix;else if(this.userAgent.indexOf("Linux")!==-1)return k.Linux;return k.Unknown}else return undefined}getDeviceOS(){var t;return(t=this.getMobileOS())!==null&&t!==void 0?t:this.getDesktopOS()}getBrowser(){if(/XiaoMi/i.test(this.userAgent)||/MiuiBrowser/i.test(this.userAgent))return x.Mi;var t=/chrome/i.test(this.userAgent);if(t)return x.Chrome;if(/firefox/i.test(navigator.userAgent))return x.Firefox;else if(!t&&/safari/i.test(navigator.userAgent))return x.Safari;else return x.Unknown}async checkIfMobileBySensors(){var t,e;if(typeof((t=window.DeviceMotionEvent)===null||t===void 0?void 0:t.requestPermission)==="function"){var n=window.DeviceMotionEvent.requestPermission();if(n==="granted"){await this.getMotionValues()}}else{await this.getMotionValues()}await I(200);var s=false;if(this.motionValues.length>0){s=this.motionValues.filter((t=>t.x!=0)).length>=3}if(typeof((e=window.DeviceOrientationEvent)===null||e===void 0?void 0:e.requestPermission)==="function"){var n=window.DeviceOrientationEvent.requestPermission();if(n==="granted"){await this.getOrientationValues()}}else{await this.getOrientationValues()}await I(500);var r=false;if(this.orientationValues.length>0){r=this.orientationValues.map((t=>t.beta)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))||this.orientationValues.map((t=>t.gamma)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))}return s||r}async getOrientationValues(){window.addEventListener("deviceorientation",this.addItemsToOrientation)}async getMotionValues(){window.addEventListener("devicemotion",this.addItemsToMotion)}async getDevice(){var t=await this.checkIfMobileBySensors();var e={isMobileBySensors:t,isDesktop:this.isDesktop,desktopOS:this.getDesktopOS(),isWindowsDesktop:this.getDeviceOS()===k.Windows,isLinuxOrUnixDesktop:this.getDeviceOS()===k.Linux||this.getDeviceOS()===k.Unix,isMobile:this.isMobile,mobileOS:this.getMobileOS(),isAndroidDevice:this.getDeviceOS()===w.Android,isAppleDevice:this.getDeviceOS()===w.iOS||this.getDeviceOS()===k.MacOS,isUnknownMobileDevice:this.getDeviceOS()===w.Unknown,browser:this.getBrowser(),isTablet:this.isTablet,initialScreenOrientation:this.initialScreenOrientation};return e}}const G9="@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:100;src:url(./files/roboto-latin-ext-100-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-100-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:200;src:url(./files/roboto-latin-ext-200-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-200-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:300;src:url(./files/roboto-latin-ext-300-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-300-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:400;src:url(./files/roboto-latin-ext-400-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-400-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:500;src:url(./files/roboto-latin-ext-500-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-500-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:600;src:url(./files/roboto-latin-ext-600-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-600-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:700;src:url(./files/roboto-latin-ext-700-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-700-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:800;src:url(./files/roboto-latin-ext-800-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-800-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:900;src:url(./files/roboto-latin-ext-900-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-900-normal.woff) format('woff')}*{font-family:'Roboto', sans-serif}[hidden]{visibility:hidden !important;opacity:0 !important}.full{width:100%;height:100%;left:0;top:0}.container{width:100%;height:100%;background-color:white;max-width:991px;margin:auto;position:relative;overflow:hidden}.flex{display:flex}.relative{position:relative}.d-block{display:block}.center{align-items:center;justify-content:center}.footer{position:relative;width:100%;margin-top:5vh}.w-100{width:100%}.h-100{height:100%}.px-1{padding-left:1em;padding-right:1em}.px-2{padding-left:2em;padding-right:2em}.px-3{padding-left:3em;padding-right:3em}.px-4{padding-left:4em;padding-right:4em}.py-1{padding-top:1em;padding-bottom:1em}.py-2{padding-top:2em;padding-bottom:2em}.py-3{padding-top:3em;padding-bottom:3em}.py-4{padding-top:4em;padding-bottom:4em}.mx-1{margin-left:1em;margin-right:1em}.mx-2{margin-left:2em;margin-right:2em}.mx-3{margin-left:3em;margin-right:3em}.mx-4{margin-left:4em;margin-right:4em}.my-1{margin-top:1em;margin-bottom:1em}.my-2{margin-top:2em;margin-bottom:2em}.my-3{margin-top:3em;margin-bottom:3em}.my-4{margin-top:4em;margin-bottom:4em}.ml-1{margin-left:1em}.ml-2{margin-left:2em}.ml-3{margin-left:3em}.ml-4{margin-left:4em}.mb-05{margin-bottom:0.5em}.mb-1{margin-bottom:1em}.mb-2{margin-bottom:2em}.mb-3{margin-bottom:3em}.mb-4{margin-bottom:4em}.mt-05{margin-top:0.5em}.mt-1{margin-top:1em}.mt-2{margin-top:2em}.mt-3{margin-top:3em}.mt-4{margin-top:4em}h1{color:#252c82;font-size:1.5em;margin:0}h2{font-weight:500;font-size:1.2em;margin:0;color:#525252}h3{font-size:1.4em;margin:0}.main-text{font-weight:400;color:#525252}.link-text{text-decoration:underline;color:#252c82d9}.rounded{border-radius:8px}.cit-selector{width:50%}.img-text{display:flex;align-items:center}.img-text .bg-img{width:4em;height:5em;display:flex;align-items:center;justify-content:center;flex:none;margin-right:1em}.button{position:relative}.img-loader{position:absolute;left:-2px;top:-2px;background:#ffffffc7;border:2px solid #252c82;box-shadow:3px 3px 6px #00000029}.img-loader.rounded{border-radius:11px}.img-loader-button{width:100%;height:100%}.img-loader-button.rounded{border-radius:50px}.loading-image-button{width:100%;height:100%;border-radius:25px}.main-button{background:#7bb40e;border-radius:50px;text-align:center;width:100%;padding:0.9em;color:#fff;border:0;font-size:1.1em;font-weight:600}.main-button:disabled{color:#fff;background:#bdbdbd}.color-red{color:#ff5353}.color-blue{color:#252c82}.loud-text{font-size:1.2em}.loud-text p{margin:0.6em 0}.modal{position:fixed;left:0;top:0;width:100%;height:100%;z-index:999;background:#8b8b8be0;visibility:visible;opacity:1;transition:visibility 0s, opacity 0.2s linear}.inner{background:white;box-shadow:3px 3px 6px #00000029;border-radius:10px;padding:2em;position:relative}.close-modal{position:absolute;top:1em;right:1em}.document-view{height:100%}.scroll{height:100%;overflow-x:hidden;overflow-y:auto;scroll-behavior:smooth;position:relative}.scroll:before{content:'';display:block;width:100%;height:15px;position:sticky;top:0;left:0;background:linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.scroll:after{content:'';display:block;width:100%;height:15px;position:sticky;bottom:0;left:0;background:linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.main-input{width:calc(100% - 3.2em - 2px);padding:0.8em 1.6em;border:2px solid #464e58;font-size:1.2em;border-radius:10px}.checklist ul{margin:0;padding-left:20px;text-align:left;list-style-image:url('assets/checkmark.svg')}.checklist li{margin-bottom:1em}.checklist li:last-child{margin-bottom:0}.row-validare h1{font-size:28px;line-height:32px}body{margin:0;padding:0;height:100vh;position:relative;height:100vh;}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text .bg-img img{width:100%;padding:2vh}.cit-selector-desktop{width:200px;height:140px}.img-selector{width:100%}.img-text .cit-selector,.img-text .cit-selector-desktop{border-radius:5%}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.show-bottom{bottom:-2vh}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:40vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.mt-5{margin-top:5vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{text-align:center}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-size-25{font-size:2.5vh}.font-size-1{font-size:1vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.ml-5{margin-left:5vh}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.scroll-disabled{height:100%;overflow-x:hidden;pointer-events:none;user-select:none}.scroll-to-top-btn{position:fixed;z-index:200;bottom:20px;left:20px;width:6vh;height:6vh;border-radius:50%;background-color:#1feaa6;color:white;display:flex;align-items:center;justify-content:center;font-size:5vh;cursor:pointer;box-shadow:0 2px 5px rgba(0, 0, 0, 0.3);transition:background-color 0.3s}.scroll-to-top-btn:hover{background-color:#17d296}.scroll-full{margin:4px, 4px;padding:4px;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}video::-webkit-media-controls{display:none !important}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}.pulsate{animation:textPulse 2s ease 0s infinite normal forwards}@keyframes textPulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}.ml-5{margin-left:20vw}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}.ml-5{margin-left:15vw}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}.ml-5{margin-left:10vw}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}.ml-5{margin-left:2.5vw}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1);height:calc(100% - 80px)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}.img-selector{width:10vw}}.loader-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;color:white;font-size:1.5rem;z-index:1000;border-radius:10px}.loader-spinner{border:8px solid #71727a;border-top:8px solid #1feaa6;border-radius:50%;width:60px;height:60px;animation:spin 2s linear infinite;margin-bottom:20px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const U9=class{async onTokenChange(t,e){if(o.debug)console.log("Token change called with value: "+t);if(t==""){t=o.token;return}if(o.token!==t){o.token=t}}agreementAcceptanceEmitted(t){try{i.instance.GenerateAgreement(t.detail.agreementType)}catch(t){this.apiErrorEmitter(t,"Agreement Acceptance")}}async apiErrorEmitter(t,e){var n,s,r,u,l,f;if(t.detail){this.errorTitle=(s=(n=t.detail.message)!==null&&n!==void 0?n:t.detail.status)!==null&&s!==void 0?s:"";this.errorMessage=(u=(r=t.detail.stack)!==null&&r!==void 0?r:t.detail.statusText)!==null&&u!==void 0?u:""}else if(t.message){this.errorTitle=t.message}else if(t.status){this.errorTitle=(l=t.status)!==null&&l!==void 0?l:"";this.errorMessage=(f=t.statusText)!==null&&f!==void 0?f:""}else{this.errorTitle=t}let h={message:this.errorTitle,stack:this.errorMessage,zone:e};try{await i.instance.AddLog(h,await E(this.order_id,this.redirect_id,this.token))}catch(t){}await c.ectdata.delete(o.requestId);p.flowError(this.errorTitle);o.flowStatus=a.ERROREND}constructor(e){t(this,e);this.logInit={};this.initialised=false}async componentWillLoad(){var t,e,n;o.analytics=(t=this.analytics)!==null&&t!==void 0?t:true;this.appInsights=C.getInstance();this.appInsights.trackEvent("IdentificationComponent | init",{requestId:o.requestId});p.init(window);p.flowEvent(r.ComponentLoaded,u.Initialized);o.apiBaseUrl=this.api_url;if(this.env&&this.env!=""){o.environment=this.env}if(o.environment!="PROD"){o.debug=true}i.getInstance();if(o.debug)this.logInit=await E(this.order_id,this.redirect_id,this.token);if(this.token){if(o.debug)console.log("Store Token set with property value: "+this.token);o.token=this.token}if(this.redirect_id){o.redirectId=this.redirect_id}if(this.lang_iso&&this.lang_iso!=""){o.langIso=this.lang_iso}o.showCitizenshipSelector=(e=this.show_citizenship_selector)!==null&&e!==void 0?e:false;o.scrollMode=(n=this.scroll_mode)!==null&&n!==void 0?n:false}async componentDidLoad(){var t,e,n,s,r,a;if(this.order_id&&this.order_id!=""){this.ectData=await c.getOrCreateEctData(this.order_id);o.requestId=this.order_id;o.initialized=this.ectData.initialized;o.modelsPath=this.ectData.modelsPath;if(o.debug)console.log("Current RequestId has value: "+this.order_id)}else if(!this.redirect_id||this.redirect_id==""){var u=await c.getLastEctData(false);if(u){this.ectData=u;o.requestId=this.ectData.orderId;o.initialized=this.ectData.initialized}}if(((t=this.ectData)===null||t===void 0?void 0:t.modelsPath)&&((e=this.ectData)===null||e===void 0?void 0:e.modelsPath)!=""){o.modelsPath=this.ectData.modelsPath}if(this.phone_number&&this.phone_number!=""){o.phoneNumber=this.phone_number;this.ectData.phoneNumber=this.phone_number;await c.ectdata.put(this.ectData)}else if(((n=this.ectData)===null||n===void 0?void 0:n.phoneNumber)&&((s=this.ectData)===null||s===void 0?void 0:s.phoneNumber)!=""){o.phoneNumber=this.ectData.phoneNumber}if(this.citizenship&&this.citizenship!=""){o.citizenship=this.citizenship;this.ectData.citizenship=this.citizenship;await c.ectdata.put(this.ectData)}else if(((r=this.ectData)===null||r===void 0?void 0:r.citizenship)&&((a=this.ectData)===null||a===void 0?void 0:a.citizenship)!=""){o.citizenship=this.ectData.citizenship}await this.initializeRequest();try{if(this.ectData.initialized){o.flowStatus=await i.instance.GetFlowState()}}catch(t){}}async initializeRequest(){if(this.initialised){return}this.initialised=true;if(!o.device){o.device=await(new W9).getDevice()}if(o.device.browser==x.Mi){this.apiErrorEmitter("Mi Browser nu este acceptat. Va rugam utilizati Chrome.","Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId);return}try{if(o.debug)await i.instance.AddLog({phase:"debug mode"},this.logInit)}catch(t){}try{if(!o.device.isMobile&&o.redirectId==""&&o.environment=="DEMO"){o.redirectId=M();this.redirect_id=o.redirectId}if(o.token!=""&&(o.requestId!=""||o.redirectId!="")&&!o.initialized){await i.instance.AddIdentificationRequest(o.device,B9.version);await this.treatMobileRedirect();this.ectData.initialized=true;this.ectData.flowStatus=o.flowStatus;this.ectData.modelsPath=o.modelsPath;await c.ectdata.put(this.ectData)}}catch(t){this.apiErrorEmitter(t,"Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId)}}async treatMobileRedirect(){if(this.order_id&&this.order_id!=""){return}this.order_id=o.requestId;this.ectData=await c.ectdata.get(o.requestId);if(!this.ectData){await c.ectdata.add({orderId:o.requestId,redirectId:o.redirectId,timestamp:new Date,initialized:true,phoneNumber:o.phoneNumber,refreshStarted:false,flowStatus:o.flowStatus,modelsPath:o.modelsPath,citizenship:o.citizenship,finished:false});this.ectData=await c.ectdata.get(o.requestId)}}disconnectedCallback(){p.flowEvent(r.ComponentLoaded,u.Finalized)}render(){let t=n("div",{key:"51e7fa15dcf75e7134a37a45a05a2deec6cbc0fb",class:"loader-overlay"},n("div",{key:"699747e8a561e1a43a28af8ddc852fde31595f6a",class:"loader-spinner"}));if(o.flowStatus==a.CITIZENSHIP){t=n("citizenship-selection",{key:"face211708102626ab18f2c826d75be0ec2c97a9"})}else if(o.flowStatus==a.LANDING){t=n("landing-validation",{key:"6a7d3bfe38c6027c59301f07f8cdcd58212fad8a"})}else if(o.flowStatus==a.MOBILE){t=n("mobile-redirect",{key:"c29e05e049f22827a38cec9d97549d992ccda433"})}else if(o.flowStatus==a.AGREEMENT){t=n("agreement-info",{key:"90537da896d9df0a489fe30d675c46fe286e2de8"})}else if(o.flowStatus==a.PHONE){t=n("sms-send",{key:"ac14a4bdf28f403db2e38d9ab1f0ebe3588662d8"})}else if(o.flowStatus==a.CODE){t=n("sms-code-validation",{key:"9a123b8a5456bd5f881981a9c89c5d35f15e9415"})}else if(o.flowStatus==a.CODEERROR){t=n("sms-code-validation",{key:"612f155d95c811b233de1571cfa26bb745563c4d"})}else if(o.flowStatus==a.IDTYPE){t=n("id-selection",{key:"4bae4a47873b5f013cda82b3b9851bd062ad22b3"})}else if(o.flowStatus==a.IDFRONTHOWTO){if(o.debug)console.log("identification-component | render | IDFRONTHOWTO");t=n("how-to-info",{key:"dbdb8b61efe5049bf3eb98d3d2d1c473fb9c6f2c"})}else if(o.flowStatus==a.IDFRONT){if(o.debug)console.log("identification-component | render | IDFRONT");t=n("process-id",{key:"9a334c1ee9f6e4ee6bc4f5c7dcd583cfafaecd6b",id:"processIdFront",mode:"front"})}else if(o.flowStatus==a.IDBACKHOWTO){if(o.debug)console.log("identification-component | render | IDBACKHOWTO");t=n("how-to-info",{key:"6749512e25a392f66ad794690a732233936a87d7"})}else if(o.flowStatus==a.IDBACK){if(o.debug)console.log("identification-component | render | IDBACK");t=n("process-id",{key:"45bb5e28d61af6415f2f2773c771b5a3f5b76c39",id:"processIdBack",mode:"back"})}else if(o.flowStatus==a.IDTILTHOWTO){if(o.debug)console.log("identification-component | render | IDTILTHOWTO");t=n("how-to-info",{key:"1490d3a64dbe06a49a5807578306332dbdeeded3"})}else if(o.flowStatus==a.IDTILT){if(o.debug)console.log("identification-component | render | TILT");t=n("process-id",{key:"b543a1e52ec210cba06d83af0afc93784e00afee",id:"processIdTilt",mode:"tilt"})}else if(o.flowStatus==a.LIVENESSHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSHOWTO");t=n("how-to-info",{key:"ddd51cbe5b494e03c6ba826bbbc97fbcd698e748"})}else if(o.flowStatus==a.LIVENESS){if(o.debug)console.log("identification-component | render | LIVENESS");t=n("user-liveness",{key:"a38d1ea473137ec4f5c6fba1f9af35d30a597f64",id:"userLiveness",mode:"selfie"})}else if(o.flowStatus==a.LIVENESSGESTUREHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSGESTUREHOWTO");t=n("state-transition",{key:"1d3a0cd3923cce12cb311698170763caea602f5b"})}else if(o.flowStatus==a.LIVENESSGESTURE){if(o.debug)console.log("identification-component | render | LIVENESSGESTURE");t=n("user-liveness",{key:"f1f981d9b46c249c284869ea961f30494851a05e",id:"userLivenessGesture",mode:"selfieGesture"})}else if(o.flowStatus==a.COMPLETE){if(o.debug)console.log("identification-component | render | COMPLETE");t=n("end-redirect",{key:"8ed924b6601d2ce11123dd17d561526f3da1f4d4"})}else if(o.flowStatus==a.ERROREND){t=n("error-end",{key:"93b8d03f0404a2dd247b73ca3d15155aa04384cf",errorTitle:this.errorTitle,message:this.errorMessage})}else if(o.flowStatus==a.CAMERAERROR){t=n("camera-error",{key:"316ad8684029ef013f7bfbcf89973a1c6bf4b160"})}else if(o.flowStatus==a.RANDOM){if(o.debug)console.log("identification-component | render | RANDOM");t=n("random-action",{key:"c49e74a61ae61e0e91ed132c50b24f827e8469d1"})}return n("div",{key:"81ca47c424ca58a23b79efd6d175a43d1a79f02b",class:"full"},t)}static get watchers(){return{token:["onTokenChange"]}}};U9.style=G9;const V9="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0Mi4xMDkiIGhlaWdodD0iNTIuNzg4IiB2aWV3Qm94PSIwIDAgNDIuMTA5IDUyLjc4OCI+DQogIDxnIGlkPSJtb2JpbGVfcGhvbmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yNSAtMzQyKSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc0NiIgZGF0YS1uYW1lPSJQYXRoIDQ3NDYiIGQ9Ik0yOS45MSw1NWEuOTEuOTEsMCwxLDAsMCwxLjgyaDMuNjQxYS45MS45MSwwLDEsMCwwLTEuODJaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4Ljc0MiAzMzQuMzI3KSIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NDgiIGRhdGEtbmFtZT0iUGF0aCA0NzQ4IiBkPSJNMzYuNTEyLDguOTFBLjg2Ljg2LDAsMCwwLDM1LjYsOEgyNy40MWEuODYuODYsMCwwLDAtLjkxLjkxLjg2Ljg2LDAsMCwwLC45MS45MUgzNS42QS44Ni44NiwwLDAsMCwzNi41MTIsOC45MVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDguOTY3IDMzOC41NTEpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPGcgaWQ9Ikdyb3VwXzQ2MDciIGRhdGEtbmFtZT0iR3JvdXAgNDYwNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMzQyKSI+DQogICAgICA8cGF0aCBpZD0iUGF0aF80NzQ3IiBkYXRhLW5hbWU9IlBhdGggNDc0NyIgZD0iTTQ0LjEyNSw4LjM3YS45MS45MSwwLDEsMCwxLjgyLDBBNS40MzksNS40MzksMCwwLDAsNDAuNTc1LDNIMjAuMzdBNS40MzksNS40MzksMCwwLDAsMTUsOC4zN1Y1MC40MThhNS4zOCw1LjM4LDAsMCwwLDUuMzcsNS4zN0g0MC41NzVhNS4zOCw1LjM4LDAsMCwwLDUuMzctNS4zN1YzNy41ODVhLjkxLjkxLDAsMSwwLTEuODIsMFY1MC40MThhMy41NTQsMy41NTQsMCwwLDEtMy41NSwzLjU1SDIwLjM3YTMuNTU0LDMuNTU0LDAsMCwxLTMuNTUtMy41NVY4LjM3YTMuNjE0LDMuNjE0LDAsMCwxLDMuNTUtMy41NUg0MC41NzVhMy42MTQsMy42MTQsMCwwLDEsMy41NSwzLjU1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE1IC0zKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgPGcgaWQ9Ikdyb3VwXzQ2MDYiIGRhdGEtbmFtZT0iR3JvdXAgNDYwNiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTguMjAzIDguMTkxKSI+DQogICAgICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTgiIGRhdGEtbmFtZT0iUGF0aCA0NzU4IiBkPSJNOTQuOTUzLDc1YTExLjk1MywxMS45NTMsMCwxLDAsMTEuOTUzLDExLjk1M0ExMS45NjcsMTEuOTY3LDAsMCwwLDk0Ljk1Myw3NVptMCwyMi40NTdhMTAuNSwxMC41LDAsMSwxLDEwLjUtMTAuNUExMC41MTYsMTAuNTE2LDAsMCwxLDk0Ljk1Myw5Ny40NTdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtODMgLTc1KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgICA8cGF0aCBpZD0iUGF0aF80NzU5IiBkYXRhLW5hbWU9IlBhdGggNDc1OSIgZD0iTTExMC43NTIsOTguNzEybC03LjI3NSw3LjI3NS00Ljc0LTQuNzM5YS43MjQuNzI0LDAsMCwwLTEuMDI0LDEuMDI0bDUuMjUyLDUuMjUyYS43MjQuNzI0LDAsMCwwLDEuMDI0LDBsNy43ODctNy43ODdhLjcyNC43MjQsMCwwLDAtMS4wMjQtMS4wMjRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOTIuMjQ4IC04OS45ODgpIiBmaWxsPSIjN2JiNDBlIi8+DQogICAgICA8L2c+DQogICAgPC9nPg0KICA8L2c+DQo8L3N2Zz4NCg==";const Y9="";const H9=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillLoad(){p.flowStarted();this.translations=await b.getValues();this.buttonDisabled=false;this.ectData=await c.ectdata.get(o.requestId);await this.initRequest()}async componentDidLoad(){await d.initialize(r.Landing)}async initRequest(){if(o.apiBaseUrl.includes("apimd")){this.warningText=this.translations.LandingValues.WarningMd}else{this.warningText=this.translations.LandingValues.Warning}}async startFlow(){if(!this.buttonDisabled){this.buttonDisabled=true;var t=await m.InitCameras(o.device);if(!t&&o.device.mobileOS==w.iOS){this.ectData.refreshStarted=false;await c.ectdata.put(this.ectData)}try{o.flowStatus=await i.instance.LandingValidationStartFlow(t)}catch(t){this.apiErrorEvent.emit(t)}}}async disconnectedCallback(){await d.finalize(r.Landing)}async leaveFlow(){if(this.buttonDisabled)return;try{let t=await i.instance.AbortRequest();o.flowStatus=a[t.state];await c.ectdata.delete(o.requestId);p.flowAborted()}catch(t){p.flowAborted();this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"47d5d34b5aa97bbf61cc376152c5bd633d8e3b9b",class:"container flex center"},n("div",{key:"4ba7b8526fe2a5527cf900bd15ec79472fd5ff6f",class:"px-4"},n("h1",{key:"579a05999b0c79b0f1d2f743352e34146d56702e",class:"text-center px-1 mb-1"},this.translations.LandingValues.Title),n("div",{key:"5063ff311608d3ab65b20f8e178f9b40b76b4f4f",class:"info-container mb-2"},n("div",{key:"ac1a39cea3fe8f44a171b82a7d95f0466f8faf46",class:"img-text"},n("div",{key:"74d8f4029a07554f19a29646213c3ba96dbd89b7",class:"bg-img"},n("img",{key:"a7f398111232f6b380235de78f546182e5abf033",src:F9})),n("h2",{key:"daf5821cc348ec5a46338ab756b383ea3031a274"},this.translations.LandingValues.IdInfo)),n("div",{key:"5c9e02363b8ab54b4cf19eecfe421dfe073f2447",class:"img-text"},n("div",{key:"58a46398d3ea125d77fb40e44a0850cb919b30e6",class:"bg-img"},n("img",{key:"6426228b6f99bdec68d6ef84c6b3dd4f0a7bfed0",src:V9})),n("h2",{key:"969ac755a5b2dba98d753579d305d7b47eb7f3ba"},this.translations.LandingValues.DeviceInfo))),n("div",{key:"956ae2afe073c37e6d0fc332e7736a1a3a90f74c",class:"button flex mb-1"},this.buttonDisabled?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"a02941f92c55df8a1ecc051f5557bb17dfbbc952",class:"main-button",type:"button",disabled:this.buttonDisabled,onClick:()=>this.startFlow()},this.translations.LandingValues.Button)),n("div",{key:"bcd143e73c5c5ef8a7bfc3b41b6473815c7276d6",class:"text-center"},n("p",{key:"7e7a8345196174fe87e9de49f1f945e5f60316cd",class:"main-text link-text",onClick:()=>this.leaveFlow()},this.translations.LandingValues.ButtonLeave)),n("div",{key:"da95242ffdae0c74dfc7504c66b4eb29cb54b8c6",class:"footer text-center"},n("img",{key:"4ddb18e563442e9faf9bfda4dbca302c3cf2ec08",src:y}))))}};H9.style=Y9;var Z9={};var Q9;var X9;function q9(){if(X9)return Q9;X9=1;Q9=function(){return typeof Promise==="function"&&Promise.prototype&&Promise.prototype.then};return Q9}var J9={};var K9={};var t7;function e7(){if(t7)return K9;t7=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];K9.getSymbolSize=function t(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};K9.getSymbolTotalCodewords=function t(n){return e[n]};K9.getBCHDigit=function(t){let e=0;while(t!==0){e++;t>>>=1}return e};K9.setToSJISFunction=function e(n){if(typeof n!=="function"){throw new Error('"toSJISFunc" is not a valid function.')}t=n};K9.isKanjiModeEnabled=function(){return typeof t!=="undefined"};K9.toSJIS=function e(n){return t(n)};return K9}var n7={};var s7;function r7(){if(s7)return n7;s7=1;(function(t){t.L={bit:1};t.M={bit:0};t.Q={bit:3};t.H={bit:2};function e(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}t.isValid=function t(e){return e&&typeof e.bit!=="undefined"&&e.bit>=0&&e.bit<4};t.from=function n(s,r){if(t.isValid(s)){return s}try{return e(s)}catch(t){return r}}})(n7);return n7}var i7;var o7;function a7(){if(o7)return i7;o7=1;function t(){this.buffer=[];this.length=0}t.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++){this.putBit((t>>>e-n-1&1)===1)}},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);if(this.buffer.length<=e){this.buffer.push(0)}if(t){this.buffer[e]|=128>>>this.length%8}this.length++}};i7=t;return i7}var c7;var u7;function l7(){if(u7)return c7;u7=1;function t(t){if(!t||t<1){throw new Error("BitMatrix size must be defined and greater than 0")}this.size=t;this.data=new Uint8Array(t*t);this.reservedBit=new Uint8Array(t*t)}t.prototype.set=function(t,e,n,s){const r=t*this.size+e;this.data[r]=n;if(s)this.reservedBit[r]=true};t.prototype.get=function(t,e){return this.data[t*this.size+e]};t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};c7=t;return c7}var f7={};var h7;function d7(){if(h7)return f7;h7=1;(function(t){const e=e7().getSymbolSize;t.getRowColCoords=function t(n){if(n===1)return[];const s=Math.floor(n/7)+2;const r=e(n);const i=r===145?26:Math.ceil((r-13)/(2*s-2))*2;const o=[r-7];for(let t=1;t<s-1;t++){o[t]=o[t-1]-i}o.push(6);return o.reverse()};t.getPositions=function e(n){const s=[];const r=t.getRowColCoords(n);const i=r.length;for(let t=0;t<i;t++){for(let e=0;e<i;e++){if(t===0&&e===0||t===0&&e===i-1||t===i-1&&e===0){continue}s.push([r[t],r[e]])}}return s}})(f7);return f7}var p7={};var m7;function b7(){if(m7)return p7;m7=1;const t=e7().getSymbolSize;const e=7;p7.getPositions=function n(s){const r=t(s);return[[0,0],[r-e,0],[0,r-e]]};return p7}var y7={};var w7;function g7(){if(w7)return y7;w7=1;(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function t(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};t.from=function e(n){return t.isValid(n)?parseInt(n,10):undefined};t.getPenaltyN1=function t(n){const s=n.size;let r=0;let i=0;let o=0;let a=null;let c=null;for(let t=0;t<s;t++){i=o=0;a=c=null;for(let u=0;u<s;u++){let s=n.get(t,u);if(s===a){i++}else{if(i>=5)r+=e.N1+(i-5);a=s;i=1}s=n.get(u,t);if(s===c){o++}else{if(o>=5)r+=e.N1+(o-5);c=s;o=1}}if(i>=5)r+=e.N1+(i-5);if(o>=5)r+=e.N1+(o-5)}return r};t.getPenaltyN2=function t(n){const s=n.size;let r=0;for(let t=0;t<s-1;t++){for(let e=0;e<s-1;e++){const s=n.get(t,e)+n.get(t,e+1)+n.get(t+1,e)+n.get(t+1,e+1);if(s===4||s===0)r++}}return r*e.N2};t.getPenaltyN3=function t(n){const s=n.size;let r=0;let i=0;let o=0;for(let t=0;t<s;t++){i=o=0;for(let e=0;e<s;e++){i=i<<1&2047|n.get(t,e);if(e>=10&&(i===1488||i===93))r++;o=o<<1&2047|n.get(e,t);if(e>=10&&(o===1488||o===93))r++}}return r*e.N3};t.getPenaltyN4=function t(n){let s=0;const r=n.data.length;for(let t=0;t<r;t++)s+=n.data[t];const i=Math.abs(Math.ceil(s*100/r/5)-10);return i*e.N4};function n(e,n,s){switch(e){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.applyMask=function t(e,s){const r=s.size;for(let t=0;t<r;t++){for(let i=0;i<r;i++){if(s.isReserved(i,t))continue;s.xor(i,t,n(e,i,t))}}};t.getBestMask=function e(n,s){const r=Object.keys(t.Patterns).length;let i=0;let o=Infinity;for(let e=0;e<r;e++){s(e);t.applyMask(e,n);const r=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(e,n);if(r<o){o=r;i=e}}return i}})(y7);return y7}var v7={};var x7;function N7(){if(x7)return v7;x7=1;const t=r7();const e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81];const n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];v7.getBlocksCount=function n(s,r){switch(r){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return undefined}};v7.getTotalCodewordsCount=function e(s,r){switch(r){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return undefined}};return v7}var k7={};var C7={};var $7;function S7(){if($7)return C7;$7=1;const t=new Uint8Array(512);const e=new Uint8Array(256);(function n(){let s=1;for(let n=0;n<255;n++){t[n]=s;e[s]=n;s<<=1;if(s&256){s^=285}}for(let e=255;e<512;e++){t[e]=t[e-255]}})();C7.log=function t(n){if(n<1)throw new Error("log("+n+")");return e[n]};C7.exp=function e(n){return t[n]};C7.mul=function n(s,r){if(s===0||r===0)return 0;return t[e[s]+e[r]]};return C7}var I7;function E7(){if(I7)return k7;I7=1;(function(t){const e=S7();t.mul=function t(n,s){const r=new Uint8Array(n.length+s.length-1);for(let t=0;t<n.length;t++){for(let i=0;i<s.length;i++){r[t+i]^=e.mul(n[t],s[i])}}return r};t.mod=function t(n,s){let r=new Uint8Array(n);while(r.length-s.length>=0){const t=r[0];for(let n=0;n<s.length;n++){r[n]^=e.mul(s[n],t)}let n=0;while(n<r.length&&r[n]===0)n++;r=r.slice(n)}return r};t.generateECPolynomial=function n(s){let r=new Uint8Array([1]);for(let n=0;n<s;n++){r=t.mul(r,new Uint8Array([1,e.exp(n)]))}return r}})(k7);return k7}var M7;var T7;function A7(){if(T7)return M7;T7=1;const t=E7();function e(t){this.genPoly=undefined;this.degree=t;if(this.degree)this.initialize(this.degree)}e.prototype.initialize=function e(n){this.degree=n;this.genPoly=t.generateECPolynomial(this.degree)};e.prototype.encode=function e(n){if(!this.genPoly){throw new Error("Encoder not initialized")}const s=new Uint8Array(n.length+this.degree);s.set(n);const r=t.mod(s,this.genPoly);const i=this.degree-r.length;if(i>0){const t=new Uint8Array(this.degree);t.set(r,i);return t}return r};M7=e;return M7}var D7={};var R7={};var O7={};var L7;function _7(){if(L7)return O7;L7=1;O7.isValid=function t(e){return!isNaN(e)&&e>=1&&e<=40};return O7}var F7={};var z7;function j7(){if(z7)return F7;z7=1;const t="[0-9]+";const e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|"+"[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|"+"[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|"+"[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const s="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";F7.KANJI=new RegExp(n,"g");F7.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");F7.BYTE=new RegExp(s,"g");F7.NUMERIC=new RegExp(t,"g");F7.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$");const i=new RegExp("^"+t+"$");const o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");F7.testKanji=function t(e){return r.test(e)};F7.testNumeric=function t(e){return i.test(e)};F7.testAlphanumeric=function t(e){return o.test(e)};return F7}var P7;function B7(){if(P7)return R7;P7=1;(function(t){const e=_7();const n=j7();t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};t.MIXED={bit:-1};t.getCharCountIndicator=function t(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!e.isValid(s)){throw new Error("Invalid version: "+s)}if(s>=1&&s<10)return n.ccBits[0];else if(s<27)return n.ccBits[1];return n.ccBits[2]};t.getBestModeForData=function e(s){if(n.testNumeric(s))return t.NUMERIC;else if(n.testAlphanumeric(s))return t.ALPHANUMERIC;else if(n.testKanji(s))return t.KANJI;else return t.BYTE};t.toString=function t(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};t.isValid=function t(e){return e&&e.bit&&e.ccBits};function s(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}t.from=function e(n,r){if(t.isValid(n)){return n}try{return s(n)}catch(t){return r}}})(R7);return R7}var W7;function G7(){if(W7)return D7;W7=1;(function(t){const e=e7();const n=N7();const s=r7();const r=B7();const i=_7();const o=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;const a=e.getBCHDigit(o);function c(e,n,s){for(let r=1;r<=40;r++){if(n<=t.getCapacity(r,s,e)){return r}}return undefined}function u(t,e){return r.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;t.forEach((function(t){const s=u(t.mode,e);n+=s+t.getBitsLength()}));return n}function f(e,n){for(let s=1;s<=40;s++){const i=l(e,s);if(i<=t.getCapacity(s,n,r.MIXED)){return s}}return undefined}t.from=function t(e,n){if(i.isValid(e)){return parseInt(e,10)}return n};t.getCapacity=function t(s,o,a){if(!i.isValid(s)){throw new Error("Invalid QR Code version")}if(typeof a==="undefined")a=r.BYTE;const c=e.getSymbolTotalCodewords(s);const l=n.getTotalCodewordsCount(s,o);const f=(c-l)*8;if(a===r.MIXED)return f;const h=f-u(a,s);switch(a){case r.NUMERIC:return Math.floor(h/10*3);case r.ALPHANUMERIC:return Math.floor(h/11*2);case r.KANJI:return Math.floor(h/13);case r.BYTE:default:return Math.floor(h/8)}};t.getBestVersionForData=function t(e,n){let r;const i=s.from(n,s.M);if(Array.isArray(e)){if(e.length>1){return f(e,i)}if(e.length===0){return 1}r=e[0]}else{r=e}return c(r.mode,r.getLength(),i)};t.getEncodedBits=function t(n){if(!i.isValid(n)||n<7){throw new Error("Invalid QR Code version")}let s=n<<12;while(e.getBCHDigit(s)-a>=0){s^=o<<e.getBCHDigit(s)-a}return n<<12|s}})(D7);return D7}var U7={};var V7;function Y7(){if(V7)return U7;V7=1;const t=e7();const e=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0;const n=1<<14|1<<12|1<<10|1<<4|1<<1;const s=t.getBCHDigit(e);U7.getEncodedBits=function r(i,o){const a=i.bit<<3|o;let c=a<<10;while(t.getBCHDigit(c)-s>=0){c^=e<<t.getBCHDigit(c)-s}return(a<<10|c)^n};return U7}var H7={};var Z7;var Q7;function X7(){if(Q7)return Z7;Q7=1;const t=B7();function e(e){this.mode=t.NUMERIC;this.data=e.toString()}e.getBitsLength=function t(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function t(e){let n,s,r;for(n=0;n+3<=this.data.length;n+=3){s=this.data.substr(n,3);r=parseInt(s,10);e.put(r,10)}const i=this.data.length-n;if(i>0){s=this.data.substr(n);r=parseInt(s,10);e.put(r,i*3+1)}};Z7=e;return Z7}var q7;var J7;function K7(){if(J7)return q7;J7=1;const t=B7();const e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC;this.data=e}n.getBitsLength=function t(e){return 11*Math.floor(e/2)+6*(e%2)};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function t(n){let s;for(s=0;s+2<=this.data.length;s+=2){let t=e.indexOf(this.data[s])*45;t+=e.indexOf(this.data[s+1]);n.put(t,11)}if(this.data.length%2){n.put(e.indexOf(this.data[s]),6)}};q7=n;return q7}var ttt;var ett;function ntt(){if(ett)return ttt;ett=1;const t=B7();function e(e){this.mode=t.BYTE;if(typeof e==="string"){this.data=(new TextEncoder).encode(e)}else{this.data=new Uint8Array(e)}}e.getBitsLength=function t(e){return e*8};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++){t.put(this.data[e],8)}};ttt=e;return ttt}var stt;var rtt;function itt(){if(rtt)return stt;rtt=1;const t=B7();const e=e7();function n(e){this.mode=t.KANJI;this.data=e}n.getBitsLength=function t(e){return e*13};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let s=e.toSJIS(this.data[n]);if(s>=33088&&s<=40956){s-=33088}else if(s>=57408&&s<=60351){s-=49472}else{throw new Error("Invalid SJIS character: "+this.data[n]+"\n"+"Make sure your charset is UTF-8")}s=(s>>>8&255)*192+(s&255);t.put(s,13)}};stt=n;return stt}var ott={exports:{}};var att;function ctt(){if(att)return ott.exports;att=1;(function(t){var e={single_source_shortest_paths:function(t,n,s){var r={};var i={};i[n]=0;var o=e.PriorityQueue.make();o.push(n,0);var a,c,u,l,f,h,d,p,m;while(!o.empty()){a=o.pop();c=a.value;l=a.cost;f=t[c]||{};for(u in f){if(f.hasOwnProperty(u)){h=f[u];d=l+h;p=i[u];m=typeof i[u]==="undefined";if(m||p>d){i[u]=d;o.push(u,d);r[u]=c}}}}if(typeof s!=="undefined"&&typeof i[s]==="undefined"){var b=["Could not find a path from ",n," to ",s,"."].join("");throw new Error(b)}return r},extract_shortest_path_from_predecessor_list:function(t,e){var n=[];var s=e;while(s){n.push(s);s=t[s]}n.reverse();return n},find_path:function(t,n,s){var r=e.single_source_shortest_paths(t,n,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,s={},r;t=t||{};for(r in n){if(n.hasOwnProperty(r)){s[r]=n[r]}}s.queue=[];s.sorter=t.sorter||n.default_sorter;return s},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n);this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};{t.exports=e}})(ott);return ott.exports}var utt;function ltt(){if(utt)return H7;utt=1;(function(t){const e=B7();const n=X7();const s=K7();const r=ntt();const i=itt();const o=j7();const a=e7();const c=ctt();function u(t){return unescape(encodeURIComponent(t)).length}function l(t,e,n){const s=[];let r;while((r=t.exec(n))!==null){s.push({data:r[0],index:r.index,mode:e,length:r[0].length})}return s}function f(t){const n=l(o.NUMERIC,e.NUMERIC,t);const s=l(o.ALPHANUMERIC,e.ALPHANUMERIC,t);let r;let i;if(a.isKanjiModeEnabled()){r=l(o.BYTE,e.BYTE,t);i=l(o.KANJI,e.KANJI,t)}else{r=l(o.BYTE_KANJI,e.BYTE,t);i=[]}const c=n.concat(s,r,i);return c.sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,o){switch(o){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return s.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return r.getBitsLength(t)}}function d(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;if(n&&n.mode===e.mode){t[t.length-1].data+=e.data;return t}t.push(e);return t}),[])}function p(t){const n=[];for(let s=0;s<t.length;s++){const r=t[s];switch(r.mode){case e.NUMERIC:n.push([r,{data:r.data,mode:e.ALPHANUMERIC,length:r.length},{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.ALPHANUMERIC:n.push([r,{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.KANJI:n.push([r,{data:r.data,mode:e.BYTE,length:u(r.data)}]);break;case e.BYTE:n.push([{data:r.data,mode:e.BYTE,length:u(r.data)}])}}return n}function m(t,n){const s={};const r={start:{}};let i=["start"];for(let o=0;o<t.length;o++){const a=t[o];const c=[];for(let t=0;t<a.length;t++){const u=a[t];const l=""+o+t;c.push(l);s[l]={node:u,lastCount:0};r[l]={};for(let t=0;t<i.length;t++){const o=i[t];if(s[o]&&s[o].node.mode===u.mode){r[o][l]=h(s[o].lastCount+u.length,u.mode)-h(s[o].lastCount,u.mode);s[o].lastCount+=u.length}else{if(s[o])s[o].lastCount=u.length;r[o][l]=h(u.length,u.mode)+4+e.getCharCountIndicator(u.mode,n)}}}i=c}for(let t=0;t<i.length;t++){r[i[t]].end=0}return{map:r,table:s}}function b(t,o){let c;const u=e.getBestModeForData(t);c=e.from(o,u);if(c!==e.BYTE&&c.bit<u.bit){throw new Error('"'+t+'"'+" cannot be encoded with mode "+e.toString(c)+".\n Suggested mode is: "+e.toString(u))}if(c===e.KANJI&&!a.isKanjiModeEnabled()){c=e.BYTE}switch(c){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new s(t);case e.KANJI:return new i(t);case e.BYTE:return new r(t)}}t.fromArray=function t(e){return e.reduce((function(t,e){if(typeof e==="string"){t.push(b(e,null))}else if(e.data){t.push(b(e.data,e.mode))}return t}),[])};t.fromString=function e(n,s){const r=f(n,a.isKanjiModeEnabled());const i=p(r);const o=m(i,s);const u=c.find_path(o.map,"start","end");const l=[];for(let t=1;t<u.length-1;t++){l.push(o.table[u[t]].node)}return t.fromArray(d(l))};t.rawSplit=function e(n){return t.fromArray(f(n,a.isKanjiModeEnabled()))}})(H7);return H7}var ftt;function htt(){if(ftt)return J9;ftt=1;const t=e7();const e=r7();const n=a7();const s=l7();const r=d7();const i=b7();const o=g7();const a=N7();const c=A7();const u=G7();const l=Y7();const f=B7();const h=ltt();function d(t,e){const n=t.size;const s=i.getPositions(e);for(let e=0;e<s.length;e++){const r=s[e][0];const i=s[e][1];for(let e=-1;e<=7;e++){if(r+e<=-1||n<=r+e)continue;for(let s=-1;s<=7;s++){if(i+s<=-1||n<=i+s)continue;if(e>=0&&e<=6&&(s===0||s===6)||s>=0&&s<=6&&(e===0||e===6)||e>=2&&e<=4&&s>=2&&s<=4){t.set(r+e,i+s,true,true)}else{t.set(r+e,i+s,false,true)}}}}}function p(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2===0;t.set(n,6,e,true);t.set(6,n,e,true)}}function m(t,e){const n=r.getPositions(e);for(let e=0;e<n.length;e++){const s=n[e][0];const r=n[e][1];for(let e=-2;e<=2;e++){for(let n=-2;n<=2;n++){if(e===-2||e===2||n===-2||n===2||e===0&&n===0){t.set(s+e,r+n,true,true)}else{t.set(s+e,r+n,false,true)}}}}}function b(t,e){const n=t.size;const s=u.getEncodedBits(e);let r,i,o;for(let e=0;e<18;e++){r=Math.floor(e/3);i=e%3+n-8-3;o=(s>>e&1)===1;t.set(r,i,o,true);t.set(i,r,o,true)}}function y(t,e,n){const s=t.size;const r=l.getEncodedBits(e,n);let i,o;for(i=0;i<15;i++){o=(r>>i&1)===1;if(i<6){t.set(i,8,o,true)}else if(i<8){t.set(i+1,8,o,true)}else{t.set(s-15+i,8,o,true)}if(i<8){t.set(8,s-i-1,o,true)}else if(i<9){t.set(8,15-i-1+1,o,true)}else{t.set(8,15-i-1,o,true)}}t.set(s-8,8,1,true)}function w(t,e){const n=t.size;let s=-1;let r=n-1;let i=7;let o=0;for(let a=n-1;a>0;a-=2){if(a===6)a--;while(true){for(let n=0;n<2;n++){if(!t.isReserved(r,a-n)){let s=false;if(o<e.length){s=(e[o]>>>i&1)===1}t.set(r,a-n,s);i--;if(i===-1){o++;i=7}}}r+=s;if(r<0||n<=r){r-=s;s=-s;break}}}}function g(e,s,r){const i=new n;r.forEach((function(t){i.put(t.mode.bit,4);i.put(t.getLength(),f.getCharCountIndicator(t.mode,e));t.write(i)}));const o=t.getSymbolTotalCodewords(e);const c=a.getTotalCodewordsCount(e,s);const u=(o-c)*8;if(i.getLengthInBits()+4<=u){i.put(0,4)}while(i.getLengthInBits()%8!==0){i.putBit(0)}const l=(u-i.getLengthInBits())/8;for(let t=0;t<l;t++){i.put(t%2?17:236,8)}return v(i,e,s)}function v(e,n,s){const r=t.getSymbolTotalCodewords(n);const i=a.getTotalCodewordsCount(n,s);const o=r-i;const u=a.getBlocksCount(n,s);const l=r%u;const f=u-l;const h=Math.floor(r/u);const d=Math.floor(o/u);const p=d+1;const m=h-d;const b=new c(m);let y=0;const w=new Array(u);const g=new Array(u);let v=0;const x=new Uint8Array(e.buffer);for(let t=0;t<u;t++){const e=t<f?d:p;w[t]=x.slice(y,y+e);g[t]=b.encode(w[t]);y+=e;v=Math.max(v,e)}const N=new Uint8Array(r);let k=0;let C,$;for(C=0;C<v;C++){for($=0;$<u;$++){if(C<w[$].length){N[k++]=w[$][C]}}}for(C=0;C<m;C++){for($=0;$<u;$++){N[k++]=g[$][C]}}return N}function x(e,n,r,i){let a;if(Array.isArray(e)){a=h.fromArray(e)}else if(typeof e==="string"){let t=n;if(!t){const n=h.rawSplit(e);t=u.getBestVersionForData(n,r)}a=h.fromString(e,t||40)}else{throw new Error("Invalid data")}const c=u.getBestVersionForData(a,r);if(!c){throw new Error("The amount of data is too big to be stored in a QR Code")}if(!n){n=c}else if(n<c){throw new Error("\n"+"The chosen QR Code version cannot contain this amount of data.\n"+"Minimum version required to store current data is: "+c+".\n")}const l=g(n,r,a);const f=t.getSymbolSize(n);const v=new s(f);d(v,n);p(v);m(v,n);y(v,r,0);if(n>=7){b(v,n)}w(v,l);if(isNaN(i)){i=o.getBestMask(v,y.bind(null,v,r))}o.applyMask(i,v);y(v,r,i);return{modules:v,version:n,errorCorrectionLevel:r,maskPattern:i,segments:a}}J9.create=function n(s,r){if(typeof s==="undefined"||s===""){throw new Error("No input text")}let i=e.M;let a;let c;if(typeof r!=="undefined"){i=e.from(r.errorCorrectionLevel,e.M);a=u.from(r.version);c=o.from(r.maskPattern);if(r.toSJISFunc){t.setToSJISFunction(r.toSJISFunc)}}return x(s,a,i,c)};return J9}var dtt={};var ptt={};var mtt={};var btt={};var ytt;var wtt;function gtt(){if(wtt)return ytt;wtt=1;ytt=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var n=Symbol("test");var s=Object(n);if(typeof n==="string"){return false}if(Object.prototype.toString.call(n)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(s)!=="[object Symbol]"){return false}var r=42;e[n]=r;for(var i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==n){return false}if(!Object.prototype.propertyIsEnumerable.call(e,n)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==r||a.enumerable!==true){return false}}return true};return ytt}var vtt;var xtt;function Ntt(){if(xtt)return vtt;xtt=1;var t=gtt();vtt=function e(){return t()&&!!Symbol.toStringTag};return vtt}var ktt;var Ctt;function $tt(){if(Ctt)return ktt;Ctt=1;ktt=Object;return ktt}var Stt;var Itt;function Ett(){if(Itt)return Stt;Itt=1;Stt=Error;return Stt}var Mtt;var Ttt;function Att(){if(Ttt)return Mtt;Ttt=1;Mtt=EvalError;return Mtt}var Dtt;var Rtt;function Ott(){if(Rtt)return Dtt;Rtt=1;Dtt=RangeError;return Dtt}var Ltt;var _tt;function Ftt(){if(_tt)return Ltt;_tt=1;Ltt=ReferenceError;return Ltt}var ztt;var jtt;function Ptt(){if(jtt)return ztt;jtt=1;ztt=SyntaxError;return ztt}var Btt;var Wtt;function Gtt(){if(Wtt)return Btt;Wtt=1;Btt=TypeError;return Btt}var Utt;var Vtt;function Ytt(){if(Vtt)return Utt;Vtt=1;Utt=URIError;return Utt}var Htt;var Ztt;function Qtt(){if(Ztt)return Htt;Ztt=1;Htt=Math.abs;return Htt}var Xtt;var qtt;function Jtt(){if(qtt)return Xtt;qtt=1;Xtt=Math.floor;return Xtt}var Ktt;var tet;function eet(){if(tet)return Ktt;tet=1;Ktt=Math.max;return Ktt}var net;var set;function ret(){if(set)return net;set=1;net=Math.min;return net}var iet;var oet;function aet(){if(oet)return iet;oet=1;iet=Math.pow;return iet}var cet;var uet;function fet(){if(uet)return cet;uet=1;cet=Math.round;return cet}var het;var det;function pet(){if(det)return het;det=1;het=Number.isNaN||function t(e){return e!==e};return het}var met;var bet;function yet(){if(bet)return met;bet=1;var t=pet();met=function e(n){if(t(n)||n===0){return n}return n<0?-1:1};return met}var wet;var get;function vet(){if(get)return wet;get=1;wet=Object.getOwnPropertyDescriptor;return wet}var xet;var Net;function ket(){if(Net)return xet;Net=1;var t=vet();if(t){try{t([],"length")}catch(e){t=null}}xet=t;return xet}var Cet;var $et;function Iet(){if($et)return Cet;$et=1;var t=Object.defineProperty||false;if(t){try{t({},"a",{value:1})}catch(e){t=false}}Cet=t;return Cet}var Eet;var Met;function Tet(){if(Met)return Eet;Met=1;var t=typeof Symbol!=="undefined"&&Symbol;var e=gtt();Eet=function n(){if(typeof t!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof t("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return e()};return Eet}var Aet;var Det;function Ret(){if(Det)return Aet;Det=1;Aet=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null;return Aet}var Oet;var Let;function _et(){if(Let)return Oet;Let=1;var t=$tt();Oet=t.getPrototypeOf||null;return Oet}var Fet;var zet;function jet(){if(zet)return Fet;zet=1;var t="Function.prototype.bind called on incompatible ";var e=Object.prototype.toString;var n=Math.max;var s="[object Function]";var r=function t(e,n){var s=[];for(var r=0;r<e.length;r+=1){s[r]=e[r]}for(var i=0;i<n.length;i+=1){s[i+e.length]=n[i]}return s};var i=function t(e,n){var s=[];for(var r=n,i=0;r<e.length;r+=1,i+=1){s[i]=e[r]}return s};var o=function(t,e){var n="";for(var s=0;s<t.length;s+=1){n+=t[s];if(s+1<t.length){n+=e}}return n};Fet=function a(c){var u=this;if(typeof u!=="function"||e.apply(u)!==s){throw new TypeError(t+u)}var l=i(arguments,1);var f;var h=function(){if(this instanceof f){var t=u.apply(this,r(l,arguments));if(Object(t)===t){return t}return this}return u.apply(c,r(l,arguments))};var d=n(0,u.length-l.length);var p=[];for(var m=0;m<d;m++){p[m]="$"+m}f=Function("binder","return function ("+o(p,",")+"){ return binder.apply(this,arguments); }")(h);if(u.prototype){var b=function t(){};b.prototype=u.prototype;f.prototype=new b;b.prototype=null}return f};return Fet}var Pet;var Bet;function Wet(){if(Bet)return Pet;Bet=1;var t=jet();Pet=Function.prototype.bind||t;return Pet}var Get;var Uet;function Vet(){if(Uet)return Get;Uet=1;Get=Function.prototype.call;return Get}var Yet;var Het;function Zet(){if(Het)return Yet;Het=1;Yet=Function.prototype.apply;return Yet}var Qet;var Xet;function qet(){if(Xet)return Qet;Xet=1;Qet=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply;return Qet}var Jet;var Ket;function tnt(){if(Ket)return Jet;Ket=1;var t=Wet();var e=Zet();var n=Vet();var s=qet();Jet=s||t.call(n,e);return Jet}var ent;var nnt;function snt(){if(nnt)return ent;nnt=1;var t=Wet();var e=Gtt();var n=Vet();var s=tnt();ent=function r(i){if(i.length<1||typeof i[0]!=="function"){throw new e("a function is required")}return s(t,n,i)};return ent}var rnt;var int;function ont(){if(int)return rnt;int=1;var t=snt();var e=ket();var n;try{n=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!=="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS"){throw t}}var s=!!n&&e&&e(Object.prototype,"__proto__");var r=Object;var i=r.getPrototypeOf;rnt=s&&typeof s.get==="function"?t([s.get]):typeof i==="function"?function t(e){return i(e==null?e:r(e))}:false;return rnt}var ant;var cnt;function unt(){if(cnt)return ant;cnt=1;var t=Ret();var e=_et();var n=ont();ant=t?function e(n){return t(n)}:e?function t(n){if(!n||typeof n!=="object"&&typeof n!=="function"){throw new TypeError("getProto: not an object")}return e(n)}:n?function t(e){return n(e)}:null;return ant}var lnt;var fnt;function hnt(){if(fnt)return lnt;fnt=1;var t=Function.prototype.call;var e=Object.prototype.hasOwnProperty;var n=Wet();lnt=n.call(t,e);return lnt}var dnt;var pnt;function mnt(){if(pnt)return dnt;pnt=1;var t;var e=$tt();var n=Ett();var s=Att();var r=Ott();var i=Ftt();var o=Ptt();var a=Gtt();var c=Ytt();var u=Qtt();var l=Jtt();var f=eet();var h=ret();var d=aet();var p=fet();var m=yet();var b=Function;var y=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}};var w=ket();var g=Iet();var v=function(){throw new a};var x=w?function(){try{return v}catch(t){try{return w(arguments,"callee").get}catch(t){return v}}}():v;var N=Tet()();var k=unt();var C=_et();var $=Ret();var S=Zet();var I=Vet();var E={};var M=typeof Uint8Array==="undefined"||!k?t:k(Uint8Array);var T={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?t:ArrayBuffer,"%ArrayIteratorPrototype%":N&&k?k([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":E,"%AsyncGenerator%":E,"%AsyncGeneratorFunction%":E,"%AsyncIteratorPrototype%":E,"%Atomics%":typeof Atomics==="undefined"?t:Atomics,"%BigInt%":typeof BigInt==="undefined"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":s,"%Float16Array%":typeof Float16Array==="undefined"?t:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?t:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?t:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":E,"%Int8Array%":typeof Int8Array==="undefined"?t:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?t:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&k?k(k([][Symbol.iterator]())):t,"%JSON%":typeof JSON==="object"?JSON:t,"%Map%":typeof Map==="undefined"?t:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!N||!k?t:k((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?t:Promise,"%Proxy%":typeof Proxy==="undefined"?t:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect==="undefined"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?t:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!N||!k?t:k((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&k?k(""[Symbol.iterator]()):t,"%Symbol%":N?Symbol:t,"%SyntaxError%":o,"%ThrowTypeError%":x,"%TypedArray%":M,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array==="undefined"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?t:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap==="undefined"?t:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?t:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?t:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":S,"%Object.defineProperty%":g,"%Object.getPrototypeOf%":C,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":f,"%Math.min%":h,"%Math.pow%":d,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":$};var A=function t(e){var n;if(e==="%AsyncFunction%"){n=y("async function () {}")}else if(e==="%GeneratorFunction%"){n=y("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){n=y("async function* () {}")}else if(e==="%AsyncGenerator%"){var s=t("%AsyncGeneratorFunction%");if(s){n=s.prototype}}else if(e==="%AsyncIteratorPrototype%"){var r=t("%AsyncGenerator%");if(r&&k){n=k(r.prototype)}}T[e]=n;return n};var D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var R=Wet();var O=hnt();var L=R.call(I,Array.prototype.concat);var _=R.call(S,Array.prototype.splice);var F=R.call(I,String.prototype.replace);var z=R.call(I,String.prototype.slice);var j=R.call(I,RegExp.prototype.exec);var P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var B=/\\(\\)?/g;var W=function t(e){var n=z(e,0,1);var s=z(e,-1);if(n==="%"&&s!=="%"){throw new o("invalid intrinsic syntax, expected closing `%`")}else if(s==="%"&&n!=="%"){throw new o("invalid intrinsic syntax, expected opening `%`")}var r=[];F(e,P,(function(t,e,n,s){r[r.length]=n?F(s,B,"$1"):e||t}));return r};var G=function t(e,n){var s=e;var r;if(O(D,s)){r=D[s];s="%"+r[0]+"%"}if(O(T,s)){var i=T[s];if(i===E){i=A(s)}if(typeof i==="undefined"&&!n){throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:r,name:s,value:i}}throw new o("intrinsic "+e+" does not exist!")};dnt=function t(e,n){if(typeof e!=="string"||e.length===0){throw new a("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof n!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(j(/^%?[^%]*%?$/,e)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var s=W(e);var r=s.length>0?s[0]:"";var i=G("%"+r+"%",n);var c=i.name;var u=i.value;var l=false;var f=i.alias;if(f){r=f[0];_(s,L([0,1],f))}for(var h=1,d=true;h<s.length;h+=1){var p=s[h];var m=z(p,0,1);var b=z(p,-1);if((m==='"'||m==="'"||m==="`"||(b==='"'||b==="'"||b==="`"))&&m!==b){throw new o("property names with quotes must have matching quotes")}if(p==="constructor"||!d){l=true}r+="."+p;c="%"+r+"%";if(O(T,c)){u=T[c]}else if(u!=null){if(!(p in u)){if(!n){throw new a("base intrinsic for "+e+" exists, but the property is not available.")}return void 0}if(w&&h+1>=s.length){var y=w(u,p);d=!!y;if(d&&"get"in y&&!("originalValue"in y.get)){u=y.get}else{u=u[p]}}else{d=O(u,p);u=u[p]}if(d&&!l){T[c]=u}}}return u};return dnt}var bnt;var ynt;function wnt(){if(ynt)return bnt;ynt=1;var t=mnt();var e=snt();var n=e([t("%String.prototype.indexOf%")]);bnt=function s(r,i){var o=t(r,!!i);if(typeof o==="function"&&n(r,".prototype.")>-1){return e([o])}return o};return bnt}var gnt;var vnt;function xnt(){if(vnt)return gnt;vnt=1;var t=Ntt()();var e=wnt();var n=e("Object.prototype.toString");var s=function e(s){if(t&&s&&typeof s==="object"&&Symbol.toStringTag in s){return false}return n(s)==="[object Arguments]"};var r=function t(e){if(s(e)){return true}return e!==null&&typeof e==="object"&&"length"in e&&typeof e.length==="number"&&e.length>=0&&n(e)!=="[object Array]"&&"callee"in e&&n(e.callee)==="[object Function]"};var i=function(){return s(arguments)}();s.isLegacyArguments=r;gnt=i?s:r;return gnt}var Nnt;var knt;function Cnt(){if(knt)return Nnt;knt=1;var t=wnt();var e=Ntt()();var n=hnt();var s=ket();var r;if(e){var i=t("RegExp.prototype.exec");var o={};var a=function(){throw o};var c={toString:a,valueOf:a};if(typeof Symbol.toPrimitive==="symbol"){c[Symbol.toPrimitive]=a}r=function t(e){if(!e||typeof e!=="object"){return false}var r=s(e,"lastIndex");var a=r&&n(r,"value");if(!a){return false}try{i(e,c)}catch(t){return t===o}}}else{var u=t("Object.prototype.toString");var l="[object RegExp]";r=function t(e){if(!e||typeof e!=="object"&&typeof e!=="function"){return false}return u(e)===l}}Nnt=r;return Nnt}var $nt;var Snt;function Int(){if(Snt)return $nt;Snt=1;var t=wnt();var e=Cnt();var n=t("RegExp.prototype.exec");var s=Gtt();$nt=function t(r){if(!e(r)){throw new s("`regex` must be a RegExp")}return function t(e){return n(r,e)!==null}};return $nt}var Ent;var Mnt;function Tnt(){if(Mnt)return Ent;Mnt=1;var t=wnt();var e=Int();var n=e(/^\s*(?:function)?\*/);var s=Ntt()();var r=unt();var i=t("Object.prototype.toString");var o=t("Function.prototype.toString");var a=function(){if(!s){return false}try{return Function("return function*() {}")()}catch(t){}};var c;Ent=function t(e){if(typeof e!=="function"){return false}if(n(o(e))){return true}if(!s){var u=i(e);return u==="[object GeneratorFunction]"}if(!r){return false}if(typeof c==="undefined"){var l=a();c=l?r(l):false}return r(e)===c};return Ent}var Ant;var Dnt;function Rnt(){if(Dnt)return Ant;Dnt=1;var t=Function.prototype.toString;var e=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply;var n;var s;if(typeof e==="function"&&typeof Object.defineProperty==="function"){try{n=Object.defineProperty({},"length",{get:function(){throw s}});s={};e((function(){throw 42}),null,n)}catch(t){if(t!==s){e=null}}}else{e=null}var r=/^\s*class\b/;var i=function e(n){try{var s=t.call(n);return r.test(s)}catch(t){return false}};var o=function e(n){try{if(i(n)){return false}t.call(n);return true}catch(t){return false}};var a=Object.prototype.toString;var c="[object Object]";var u="[object Function]";var l="[object GeneratorFunction]";var f="[object HTMLAllCollection]";var h="[object HTML document.all class]";var d="[object HTMLCollection]";var p=typeof Symbol==="function"&&!!Symbol.toStringTag;var m=!(0 in[,]);var b=function t(){return false};if(typeof document==="object"){var y=document.all;if(a.call(y)===a.call(document.all)){b=function t(e){if((m||!e)&&(typeof e==="undefined"||typeof e==="object")){try{var n=a.call(e);return(n===f||n===h||n===d||n===c)&&e("")==null}catch(t){}}return false}}}Ant=e?function t(r){if(b(r)){return true}if(!r){return false}if(typeof r!=="function"&&typeof r!=="object"){return false}try{e(r,null,n)}catch(t){if(t!==s){return false}}return!i(r)&&o(r)}:function t(e){if(b(e)){return true}if(!e){return false}if(typeof e!=="function"&&typeof e!=="object"){return false}if(p){return o(e)}if(i(e)){return false}var n=a.call(e);if(n!==u&&n!==l&&!/^\[object HTML/.test(n)){return false}return o(e)};return Ant}var Ont;var Lnt;function _nt(){if(Lnt)return Ont;Lnt=1;var t=Rnt();var e=Object.prototype.toString;var n=Object.prototype.hasOwnProperty;var s=function t(e,s,r){for(var i=0,o=e.length;i<o;i++){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};var r=function t(e,n,s){for(var r=0,i=e.length;r<i;r++){if(s==null){n(e.charAt(r),r,e)}else{n.call(s,e.charAt(r),r,e)}}};var i=function t(e,s,r){for(var i in e){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};function o(t){return e.call(t)==="[object Array]"}Ont=function e(n,a,c){if(!t(a)){throw new TypeError("iterator must be a function")}var u;if(arguments.length>=3){u=c}if(o(n)){s(n,a,u)}else if(typeof n==="string"){r(n,a,u)}else{i(n,a,u)}};return Ont}var Fnt;var znt;function jnt(){if(znt)return Fnt;znt=1;Fnt=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"];return Fnt}var Pnt;var Bnt;function Wnt(){if(Bnt)return Pnt;Bnt=1;var t=jnt();var e=typeof globalThis==="undefined"?h:globalThis;Pnt=function n(){var s=[];for(var r=0;r<t.length;r++){if(typeof e[t[r]]==="function"){s[s.length]=t[r]}}return s};return Pnt}var Gnt={exports:{}};var Unt;var Vnt;function Ynt(){if(Vnt)return Unt;Vnt=1;var t=Iet();var e=Ptt();var n=Gtt();var s=ket();Unt=function r(i,o,a){if(!i||typeof i!=="object"&&typeof i!=="function"){throw new n("`obj` must be an object or a function`")}if(typeof o!=="string"&&typeof o!=="symbol"){throw new n("`property` must be a string or a symbol`")}if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null){throw new n("`nonEnumerable`, if provided, must be a boolean or null")}if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null){throw new n("`nonWritable`, if provided, must be a boolean or null")}if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null){throw new n("`nonConfigurable`, if provided, must be a boolean or null")}if(arguments.length>6&&typeof arguments[6]!=="boolean"){throw new n("`loose`, if provided, must be a boolean")}var c=arguments.length>3?arguments[3]:null;var u=arguments.length>4?arguments[4]:null;var l=arguments.length>5?arguments[5]:null;var f=arguments.length>6?arguments[6]:false;var h=!!s&&s(i,o);if(t){t(i,o,{configurable:l===null&&h?h.configurable:!l,enumerable:c===null&&h?h.enumerable:!c,value:a,writable:u===null&&h?h.writable:!u})}else if(f||!c&&!u&&!l){i[o]=a}else{throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}};return Unt}var Hnt;var Znt;function Qnt(){if(Znt)return Hnt;Znt=1;var t=Iet();var e=function e(){return!!t};e.hasArrayLengthDefineBug=function e(){if(!t){return null}try{return t([],"length",{value:1}).length!==1}catch(t){return true}};Hnt=e;return Hnt}var Xnt;var qnt;function Jnt(){if(qnt)return Xnt;qnt=1;var t=mnt();var e=Ynt();var n=Qnt()();var s=ket();var r=Gtt();var i=t("%Math.floor%");Xnt=function t(o,a){if(typeof o!=="function"){throw new r("`fn` is not a function")}if(typeof a!=="number"||a<0||a>4294967295||i(a)!==a){throw new r("`length` must be a positive 32-bit integer")}var c=arguments.length>2&&!!arguments[2];var u=true;var l=true;if("length"in o&&s){var f=s(o,"length");if(f&&!f.configurable){u=false}if(f&&!f.writable){l=false}}if(u||l||!c){if(n){e(o,"length",a,true,true)}else{e(o,"length",a)}}return o};return Xnt}var Knt;var tst;function est(){if(tst)return Knt;tst=1;var t=Wet();var e=Zet();var n=tnt();Knt=function s(){return n(t,e,arguments)};return Knt}var nst;function sst(){if(nst)return Gnt.exports;nst=1;(function(t){var e=Jnt();var n=Iet();var s=snt();var r=est();t.exports=function t(n){var r=s(arguments);var i=n.length-(arguments.length-1);return e(r,1+(i>0?i:0),true)};if(n){n(t.exports,"apply",{value:r})}else{t.exports.apply=r}})(Gnt);return Gnt.exports}var rst;var ist;function ost(){if(ist)return rst;ist=1;var t=_nt();var e=Wnt();var n=sst();var s=wnt();var r=ket();var i=unt();var o=s("Object.prototype.toString");var a=Ntt()();var c=typeof globalThis==="undefined"?h:globalThis;var u=e();var l=s("String.prototype.slice");var f=s("Array.prototype.indexOf",true)||function t(e,n){for(var s=0;s<e.length;s+=1){if(e[s]===n){return s}}return-1};var d={__proto__:null};if(a&&r&&i){t(u,(function(t){var e=new c[t];if(Symbol.toStringTag in e&&i){var s=i(e);var o=r(s,Symbol.toStringTag);if(!o&&s){var a=i(s);o=r(a,Symbol.toStringTag)}d["$"+t]=n(o.get)}}))}else{t(u,(function(t){var e=new c[t];var s=e.slice||e.set;if(s){d["$"+t]=n(s)}}))}var p=function e(n){var s=false;t(d,(function(t,e){if(!s){try{if("$"+t(n)===e){s=l(e,1)}}catch(t){}}}));return s};var m=function e(n){var s=false;t(d,(function(t,e){if(!s){try{t(n);s=l(e,1)}catch(t){}}}));return s};rst=function t(e){if(!e||typeof e!=="object"){return false}if(!a){var n=l(o(e),8,-1);if(f(u,n)>-1){return n}if(n!=="Object"){return false}return m(e)}if(!r){return null}return p(e)};return rst}var ast;var cst;function ust(){if(cst)return ast;cst=1;var t=ost();ast=function e(n){return!!t(n)};return ast}var lst;function fst(){if(lst)return btt;lst=1;(function(t){var e=xnt();var n=Tnt();var s=ost();var r=ust();function i(t){return t.call.bind(t)}var o=typeof BigInt!=="undefined";var a=typeof Symbol!=="undefined";var c=i(Object.prototype.toString);var u=i(Number.prototype.valueOf);var l=i(String.prototype.valueOf);var f=i(Boolean.prototype.valueOf);if(o){var h=i(BigInt.prototype.valueOf)}if(a){var d=i(Symbol.prototype.valueOf)}function p(t,e){if(typeof t!=="object"){return false}try{e(t);return true}catch(t){return false}}t.isArgumentsObject=e;t.isGeneratorFunction=n;t.isTypedArray=r;function m(t){return typeof Promise!=="undefined"&&t instanceof Promise||t!==null&&typeof t==="object"&&typeof t.then==="function"&&typeof t.catch==="function"}t.isPromise=m;function b(t){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(t)}return r(t)||j(t)}t.isArrayBufferView=b;function y(t){return s(t)==="Uint8Array"}t.isUint8Array=y;function w(t){return s(t)==="Uint8ClampedArray"}t.isUint8ClampedArray=w;function g(t){return s(t)==="Uint16Array"}t.isUint16Array=g;function v(t){return s(t)==="Uint32Array"}t.isUint32Array=v;function x(t){return s(t)==="Int8Array"}t.isInt8Array=x;function N(t){return s(t)==="Int16Array"}t.isInt16Array=N;function k(t){return s(t)==="Int32Array"}t.isInt32Array=k;function C(t){return s(t)==="Float32Array"}t.isFloat32Array=C;function $(t){return s(t)==="Float64Array"}t.isFloat64Array=$;function S(t){return s(t)==="BigInt64Array"}t.isBigInt64Array=S;function I(t){return s(t)==="BigUint64Array"}t.isBigUint64Array=I;function E(t){return c(t)==="[object Map]"}E.working=typeof Map!=="undefined"&&E(new Map);function M(t){if(typeof Map==="undefined"){return false}return E.working?E(t):t instanceof Map}t.isMap=M;function T(t){return c(t)==="[object Set]"}T.working=typeof Set!=="undefined"&&T(new Set);function A(t){if(typeof Set==="undefined"){return false}return T.working?T(t):t instanceof Set}t.isSet=A;function D(t){return c(t)==="[object WeakMap]"}D.working=typeof WeakMap!=="undefined"&&D(new WeakMap);function R(t){if(typeof WeakMap==="undefined"){return false}return D.working?D(t):t instanceof WeakMap}t.isWeakMap=R;function O(t){return c(t)==="[object WeakSet]"}O.working=typeof WeakSet!=="undefined"&&O(new WeakSet);function L(t){return O(t)}t.isWeakSet=L;function _(t){return c(t)==="[object ArrayBuffer]"}_.working=typeof ArrayBuffer!=="undefined"&&_(new ArrayBuffer);function F(t){if(typeof ArrayBuffer==="undefined"){return false}return _.working?_(t):t instanceof ArrayBuffer}t.isArrayBuffer=F;function z(t){return c(t)==="[object DataView]"}z.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&z(new DataView(new ArrayBuffer(1),0,1));function j(t){if(typeof DataView==="undefined"){return false}return z.working?z(t):t instanceof DataView}t.isDataView=j;var P=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function B(t){return c(t)==="[object SharedArrayBuffer]"}function W(t){if(typeof P==="undefined"){return false}if(typeof B.working==="undefined"){B.working=B(new P)}return B.working?B(t):t instanceof P}t.isSharedArrayBuffer=W;function G(t){return c(t)==="[object AsyncFunction]"}t.isAsyncFunction=G;function U(t){return c(t)==="[object Map Iterator]"}t.isMapIterator=U;function V(t){return c(t)==="[object Set Iterator]"}t.isSetIterator=V;function Y(t){return c(t)==="[object Generator]"}t.isGeneratorObject=Y;function H(t){return c(t)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=H;function Z(t){return p(t,u)}t.isNumberObject=Z;function Q(t){return p(t,l)}t.isStringObject=Q;function X(t){return p(t,f)}t.isBooleanObject=X;function q(t){return o&&p(t,h)}t.isBigIntObject=q;function J(t){return a&&p(t,d)}t.isSymbolObject=J;function K(t){return Z(t)||Q(t)||X(t)||q(t)||J(t)}t.isBoxedPrimitive=K;function tt(t){return typeof Uint8Array!=="undefined"&&(F(t)||W(t))}t.isAnyArrayBuffer=tt;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:false,value:function(){throw new Error(e+" is not supported in userland")}})}))})(btt);return btt}var hst;var dst;function pst(){if(dst)return hst;dst=1;hst=function t(e){return e instanceof uc};return hst}var mst={exports:{}};var bst={exports:{}};var yst;function wst(){if(yst)return bst.exports;yst=1;if(typeof Object.create==="function"){bst.exports=function t(e,n){if(n){e.super_=n;e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{bst.exports=function t(e,n){if(n){e.super_=n;var s=function(){};s.prototype=n.prototype;e.prototype=new s;e.prototype.constructor=e}}}return bst.exports}var gst;function vst(){if(gst)return mst.exports;gst=1;try{var t=Nst();if(typeof t.inherits!=="function")throw"";mst.exports=t.inherits}catch(t){mst.exports=wst()}return mst.exports}var xst;function Nst(){if(xst)return mtt;xst=1;(function(t){var e=Object.getOwnPropertyDescriptors||function t(e){var n=Object.keys(e);var s={};for(var r=0;r<n.length;r++){s[n[r]]=Object.getOwnPropertyDescriptor(e,n[r])}return s};var n=/%[sdj%]/g;t.format=function(t){if(!N(t)){var e=[];for(var s=0;s<arguments.length;s++){e.push(o(arguments[s]))}return e.join(" ")}var s=1;var r=arguments;var i=r.length;var a=String(t).replace(n,(function(t){if(t==="%%")return"%";if(s>=i)return t;switch(t){case"%s":return String(r[s++]);case"%d":return Number(r[s++]);case"%j":try{return JSON.stringify(r[s++])}catch(t){return"[Circular]"}default:return t}}));for(var c=r[s];s<i;c=r[++s]){if(w(c)||!S(c)){a+=" "+c}else{a+=" "+o(c)}}return a};t.deprecate=function(e,n){if(typeof v!=="undefined"&&v.noDeprecation===true){return e}if(typeof v==="undefined"){return function(){return t.deprecate(e,n).apply(this,arguments)}}var s=false;function r(){if(!s){if(v.throwDeprecation){throw new Error(n)}else if(v.traceDeprecation){console.trace(n)}else{console.error(n)}s=true}return e.apply(this,arguments)}return r};var s={};var r=/^$/;if(v.env.NODE_DEBUG){var i=v.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase();r=new RegExp("^"+i+"$","i")}t.debuglog=function(e){e=e.toUpperCase();if(!s[e]){if(r.test(e)){var n=v.pid;s[e]=function(){var s=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,s)}}else{s[e]=function(){}}}return s[e]};function o(e,n){var s={seen:[],stylize:c};if(arguments.length>=3)s.depth=arguments[2];if(arguments.length>=4)s.colors=arguments[3];if(y(n)){s.showHidden=n}else if(n){t._extend(s,n)}if(C(s.showHidden))s.showHidden=false;if(C(s.depth))s.depth=2;if(C(s.colors))s.colors=false;if(C(s.customInspect))s.customInspect=true;if(s.colors)s.stylize=a;return l(s,e,s.depth)}t.inspect=o;o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(t,e){var n=o.styles[e];if(n){return"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m"}else{return t}}function c(t,e){return t}function u(t){var e={};t.forEach((function(t,n){e[t]=true}));return e}function l(e,n,s){if(e.customInspect&&n&&M(n.inspect)&&n.inspect!==t.inspect&&!(n.constructor&&n.constructor.prototype===n)){var r=n.inspect(s,e);if(!N(r)){r=l(e,r,s)}return r}var i=f(e,n);if(i){return i}var o=Object.keys(n);var a=u(o);if(e.showHidden){o=Object.getOwnPropertyNames(n)}if(E(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0)){return h(n)}if(o.length===0){if(M(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}if(I(n)){return e.stylize(Date.prototype.toString.call(n),"date")}if(E(n)){return h(n)}}var y="",w=false,g=["{","}"];if(b(n)){w=true;g=["[","]"]}if(M(n)){var v=n.name?": "+n.name:"";y=" [Function"+v+"]"}if($(n)){y=" "+RegExp.prototype.toString.call(n)}if(I(n)){y=" "+Date.prototype.toUTCString.call(n)}if(E(n)){y=" "+h(n)}if(o.length===0&&(!w||n.length==0)){return g[0]+y+g[1]}if(s<0){if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(n);var x;if(w){x=d(e,n,s,a,o)}else{x=o.map((function(t){return p(e,n,s,a,t,w)}))}e.seen.pop();return m(x,y,g)}function f(t,e){if(C(e))return t.stylize("undefined","undefined");if(N(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(x(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(w(e))return t.stylize("null","null")}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,s,r){var i=[];for(var o=0,a=e.length;o<a;++o){if(L(e,String(o))){i.push(p(t,e,n,s,String(o),true))}else{i.push("")}}r.forEach((function(r){if(!r.match(/^\d+$/)){i.push(p(t,e,n,s,r,true))}}));return i}function p(t,e,n,s,r,i){var o,a,c;c=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]};if(c.get){if(c.set){a=t.stylize("[Getter/Setter]","special")}else{a=t.stylize("[Getter]","special")}}else{if(c.set){a=t.stylize("[Setter]","special")}}if(!L(s,r)){o="["+r+"]"}if(!a){if(t.seen.indexOf(c.value)<0){if(w(n)){a=l(t,c.value,null)}else{a=l(t,c.value,n-1)}if(a.indexOf("\n")>-1){if(i){a=a.split("\n").map((function(t){return" "+t})).join("\n").slice(2)}else{a="\n"+a.split("\n").map((function(t){return" "+t})).join("\n")}}}else{a=t.stylize("[Circular]","special")}}if(C(o)){if(i&&r.match(/^\d+$/)){return a}o=JSON.stringify(""+r);if(o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){o=o.slice(1,-1);o=t.stylize(o,"name")}else{o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");o=t.stylize(o,"string")}}return o+": "+a}function m(t,e,n){var s=t.reduce((function(t,e){if(e.indexOf("\n")>=0);return t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(s>60){return n[0]+(e===""?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]}return n[0]+e+" "+t.join(", ")+" "+n[1]}t.types=fst();function b(t){return Array.isArray(t)}t.isArray=b;function y(t){return typeof t==="boolean"}t.isBoolean=y;function w(t){return t===null}t.isNull=w;function g(t){return t==null}t.isNullOrUndefined=g;function x(t){return typeof t==="number"}t.isNumber=x;function N(t){return typeof t==="string"}t.isString=N;function k(t){return typeof t==="symbol"}t.isSymbol=k;function C(t){return t===void 0}t.isUndefined=C;function $(t){return S(t)&&A(t)==="[object RegExp]"}t.isRegExp=$;t.types.isRegExp=$;function S(t){return typeof t==="object"&&t!==null}t.isObject=S;function I(t){return S(t)&&A(t)==="[object Date]"}t.isDate=I;t.types.isDate=I;function E(t){return S(t)&&(A(t)==="[object Error]"||t instanceof Error)}t.isError=E;t.types.isNativeError=E;function M(t){return typeof t==="function"}t.isFunction=M;function T(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}t.isPrimitive=T;t.isBuffer=pst();function A(t){return Object.prototype.toString.call(t)}function D(t){return t<10?"0"+t.toString(10):t.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date;var e=[D(t.getHours()),D(t.getMinutes()),D(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))};t.inherits=vst();t._extend=function(t,e){if(!e||!S(e))return t;var n=Object.keys(e);var s=n.length;while(s--){t[n[s]]=e[n[s]]}return t};function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var _=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function t(n){if(typeof n!=="function")throw new TypeError('The "original" argument must be of type Function');if(_&&n[_]){var s=n[_];if(typeof s!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return s}function s(){var t,e;var s=new Promise((function(n,s){t=n;e=s}));var r=[];for(var i=0;i<arguments.length;i++){r.push(arguments[i])}r.push((function(n,s){if(n){e(n)}else{t(s)}}));try{n.apply(this,r)}catch(t){e(t)}return s}Object.setPrototypeOf(s,Object.getPrototypeOf(n));if(_)Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return Object.defineProperties(s,e(n))};t.promisify.custom=_;function F(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t;t=n}return e(t)}function z(t){if(typeof t!=="function"){throw new TypeError('The "original" argument must be of type Function')}function n(){var e=[];for(var n=0;n<arguments.length;n++){e.push(arguments[n])}var s=e.pop();if(typeof s!=="function"){throw new TypeError("The last argument must be of type Function")}var r=this;var i=function(){return s.apply(r,arguments)};t.apply(this,e).then((function(t){v.nextTick(i.bind(null,null,t))}),(function(t){v.nextTick(F.bind(null,t,i))}))}Object.setPrototypeOf(n,Object.getPrototypeOf(t));Object.defineProperties(n,e(t));return n}t.callbackify=z})(mtt);return mtt}var kst;function Cst(){}Cst.prototype=Object.create(null);function $st(){$st.init.call(this)}$st.EventEmitter=$st;$st.usingDomains=false;$st.prototype.domain=undefined;$st.prototype._events=undefined;$st.prototype._maxListeners=undefined;$st.defaultMaxListeners=10;$st.init=function(){this.domain=null;if($st.usingDomains){if(kst.active&&!(this instanceof kst.Domain)){this.domain=kst.active}}if(!this._events||this._events===Object.getPrototypeOf(this)._events){this._events=new Cst;this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};$st.prototype.setMaxListeners=function t(e){if(typeof e!=="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');this._maxListeners=e;return this};function Sst(t){if(t._maxListeners===undefined)return $st.defaultMaxListeners;return t._maxListeners}$st.prototype.getMaxListeners=function t(){return Sst(this)};function Ist(t,e,n){if(e)t.call(n);else{var s=t.length;var r=Fst(t,s);for(var i=0;i<s;++i)r[i].call(n)}}function Est(t,e,n,s){if(e)t.call(n,s);else{var r=t.length;var i=Fst(t,r);for(var o=0;o<r;++o)i[o].call(n,s)}}function Mst(t,e,n,s,r){if(e)t.call(n,s,r);else{var i=t.length;var o=Fst(t,i);for(var a=0;a<i;++a)o[a].call(n,s,r)}}function Tst(t,e,n,s,r,i){if(e)t.call(n,s,r,i);else{var o=t.length;var a=Fst(t,o);for(var c=0;c<o;++c)a[c].call(n,s,r,i)}}function Ast(t,e,n,s){if(e)t.apply(n,s);else{var r=t.length;var i=Fst(t,r);for(var o=0;o<r;++o)i[o].apply(n,s)}}$st.prototype.emit=function t(e){var n,s,r,i,o,a,c;var u=e==="error";a=this._events;if(a)u=u&&a.error==null;else if(!u)return false;c=this.domain;if(u){n=arguments[1];if(c){if(!n)n=new Error('Uncaught, unspecified "error" event');n.domainEmitter=this;n.domain=c;n.domainThrown=false;c.emit("error",n)}else if(n instanceof Error){throw n}else{var l=new Error('Uncaught, unspecified "error" event. ('+n+")");l.context=n;throw l}return false}s=a[e];if(!s)return false;var f=typeof s==="function";r=arguments.length;switch(r){case 1:Ist(s,f,this);break;case 2:Est(s,f,this,arguments[1]);break;case 3:Mst(s,f,this,arguments[1],arguments[2]);break;case 4:Tst(s,f,this,arguments[1],arguments[2],arguments[3]);break;default:i=new Array(r-1);for(o=1;o<r;o++)i[o-1]=arguments[o];Ast(s,f,this,i)}return true};function Dst(t,e,n,s){var r;var i;var o;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');i=t._events;if(!i){i=t._events=new Cst;t._eventsCount=0}else{if(i.newListener){t.emit("newListener",e,n.listener?n.listener:n);i=t._events}o=i[e]}if(!o){o=i[e]=n;++t._eventsCount}else{if(typeof o==="function"){o=i[e]=s?[n,o]:[o,n]}else{if(s){o.unshift(n)}else{o.push(n)}}if(!o.warned){r=Sst(t);if(r&&r>0&&o.length>r){o.warned=true;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+e+" listeners added. "+"Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning";a.emitter=t;a.type=e;a.count=o.length;Rst(a)}}}return t}function Rst(t){typeof console.warn==="function"?console.warn(t):console.log(t)}$st.prototype.addListener=function t(e,n){return Dst(this,e,n,false)};$st.prototype.on=$st.prototype.addListener;$st.prototype.prependListener=function t(e,n){return Dst(this,e,n,true)};function Ost(t,e,n){var s=false;function r(){t.removeListener(e,r);if(!s){s=true;n.apply(t,arguments)}}r.listener=n;return r}$st.prototype.once=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.on(e,Ost(this,e,n));return this};$st.prototype.prependOnceListener=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.prependListener(e,Ost(this,e,n));return this};$st.prototype.removeListener=function t(e,n){var s,r,i,o,a;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');r=this._events;if(!r)return this;s=r[e];if(!s)return this;if(s===n||s.listener&&s.listener===n){if(--this._eventsCount===0)this._events=new Cst;else{delete r[e];if(r.removeListener)this.emit("removeListener",e,s.listener||n)}}else if(typeof s!=="function"){i=-1;for(o=s.length;o-- >0;){if(s[o]===n||s[o].listener&&s[o].listener===n){a=s[o].listener;i=o;break}}if(i<0)return this;if(s.length===1){s[0]=undefined;if(--this._eventsCount===0){this._events=new Cst;return this}else{delete r[e]}}else{_st(s,i)}if(r.removeListener)this.emit("removeListener",e,a||n)}return this};$st.prototype.removeAllListeners=function t(e){var n,s;s=this._events;if(!s)return this;if(!s.removeListener){if(arguments.length===0){this._events=new Cst;this._eventsCount=0}else if(s[e]){if(--this._eventsCount===0)this._events=new Cst;else delete s[e]}return this}if(arguments.length===0){var r=Object.keys(s);for(var i=0,o;i<r.length;++i){o=r[i];if(o==="removeListener")continue;this.removeAllListeners(o)}this.removeAllListeners("removeListener");this._events=new Cst;this._eventsCount=0;return this}n=s[e];if(typeof n==="function"){this.removeListener(e,n)}else if(n){do{this.removeListener(e,n[n.length-1])}while(n[0])}return this};$st.prototype.listeners=function t(e){var n;var s;var r=this._events;if(!r)s=[];else{n=r[e];if(!n)s=[];else if(typeof n==="function")s=[n.listener||n];else s=zst(n)}return s};$st.listenerCount=function(t,e){if(typeof t.listenerCount==="function"){return t.listenerCount(e)}else{return Lst.call(t,e)}};$st.prototype.listenerCount=Lst;function Lst(t){var e=this._events;if(e){var n=e[t];if(typeof n==="function"){return 1}else if(n){return n.length}}return 0}$st.prototype.eventNames=function t(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function _st(t,e){for(var n=e,s=n+1,r=t.length;s<r;n+=1,s+=1)t[n]=t[s];t.pop()}function Fst(t,e){var n=new Array(e);while(e--)n[e]=t[e];return n}function zst(t){var e=new Array(t.length);for(var n=0;n<e.length;++n){e[n]=t[n].listener||t[n]}return e}var jst=Nst();function Pst(){this.head=null;this.tail=null;this.length=0}Pst.prototype.push=function(t){var e={data:t,next:null};if(this.length>0)this.tail.next=e;else this.head=e;this.tail=e;++this.length};Pst.prototype.unshift=function(t){var e={data:t,next:this.head};if(this.length===0)this.tail=e;this.head=e;++this.length};Pst.prototype.shift=function(){if(this.length===0)return;var t=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return t};Pst.prototype.clear=function(){this.head=this.tail=null;this.length=0};Pst.prototype.join=function(t){if(this.length===0)return"";var e=this.head;var n=""+e.data;while(e=e.next){n+=t+e.data}return n};Pst.prototype.concat=function(t){if(this.length===0)return uc.alloc(0);if(this.length===1)return this.head.data;var e=uc.allocUnsafe(t>>>0);var n=this.head;var s=0;while(n){n.data.copy(e,s);s+=n.data.length;n=n.next}return e};var Bst={};var Wst={exports:{}};var Gst=f(ou);
18116
+ */const E9={"tfjs-core":Kh,"tfjs-backend-cpu":pW,"tfjs-backend-webgl":MJ,"tfjs-data":Pj,"tfjs-layers":dA,"tfjs-converter":Cz,tfjs:I9};var M9=Object.freeze({__proto__:null,Abs:Yn,Acos:Hn,Acosh:Zn,AdadeltaOptimizer:vk,AdagradOptimizer:xk,AdamOptimizer:Nk,AdamaxOptimizer:kk,Add:Qn,AddN:Xn,All:qn,Any:Jn,ArgMax:Kn,ArgMin:ts,Asin:es,Asinh:ns,Atan:ss,Atan2:is,Atanh:rs,AvgPool:os,AvgPool3D:cs,AvgPool3DGrad:us,AvgPoolGrad:as,BatchMatMul:ls,BatchToSpaceND:fs,Bincount:hs,BroadcastArgs:ps,BroadcastTo:ds,Callback:i_,CallbackList:aT,Cast:ms,Ceil:bs,ClipByValue:ys,Complex:ws,ComplexAbs:gs,Concat:vs,Conv2D:xs,Conv2DBackpropFilter:Ns,Conv2DBackpropInput:ks,Conv3D:Cs,Conv3DBackpropFilterV2:$s,Conv3DBackpropInputV2:Ss,Cos:Is,Cosh:Es,CropAndResize:As,Cumprod:Ms,Cumsum:Ts,CustomCallback:lT,DataStorage:_e,DenseBincount:Ds,DepthToSpace:Rs,DepthwiseConv2dNative:Os,DepthwiseConv2dNativeBackpropFilter:Ls,DepthwiseConv2dNativeBackpropInput:_s,Diag:Fs,Dilation2D:zs,Dilation2DBackpropFilter:Ps,Dilation2DBackpropInput:js,get ENV(){return Pn},EarlyStopping:c_,Einsum:Ws,Elu:Gs,EluGrad:Us,Environment:Ln,Equal:Ys,Erf:Vs,Exp:Hs,ExpandDims:Zs,Expm1:Qs,FFT:Xs,Fill:qs,FlipLeftRight:Js,Floor:Ks,FloorDiv:tr,FromPixels:Ki,FusedBatchNorm:er,FusedConv2D:no,FusedDepthwiseConv2D:so,GatherNd:sr,GatherV2:nr,GraphModel:vz,Greater:rr,GreaterEqual:ir,History:uT,IFFT:ar,Identity:or,Imag:cr,InputSpec:sM,IsFinite:ur,IsInf:lr,IsNan:fr,KernelBackend:Fe,LRN:Cr,LRNGrad:$r,LayerVariable:KE,LayersModel:VA,LeakyRelu:hr,Less:dr,LessEqual:pr,LinSpace:mr,Log:br,Log1p:yr,LogSoftmax:Nr,LogicalAnd:wr,LogicalNot:gr,LogicalOr:vr,LogicalXor:xr,LowerBound:kr,Max:Sr,MaxPool:Er,MaxPool3D:Tr,MaxPool3DGrad:Ar,MaxPoolGrad:Mr,MaxPoolWithArgmax:Dr,Maximum:Ir,Mean:Rr,Min:Or,Minimum:Lr,MirrorPad:_r,Mod:Fr,MomentumOptimizer:$k,Multinomial:zr,Multiply:jr,Neg:Pr,NonMaxSuppressionV3:Wr,NonMaxSuppressionV4:Gr,NonMaxSuppressionV5:Ur,NotEqual:Br,OP_SCOPE_SUFFIX:hu,OneHot:Yr,OnesLike:Vr,Optimizer:gk,OptimizerConstructors:Ik,Pack:Hr,PadV2:Zr,Pool:Qr,Pow:Xr,Prelu:qr,Prod:Jr,RMSPropOptimizer:Sk,RNN:iR,RaggedGather:Kr,RaggedTensorToTensor:ti,Range:ei,get Rank(){return ya},Real:ni,RealDiv:Bs,Reciprocal:si,get Reduction(){return AN},Relu:ri,Relu6:li,Reshape:ii,ResizeBilinear:ci,ResizeBilinearGrad:ui,ResizeNearestNeighbor:oi,ResizeNearestNeighborGrad:ai,Reverse:fi,RotateWithOffset:to,Round:hi,Rsqrt:di,SGDOptimizer:Ck,ScatterNd:pi,SearchSorted:mi,Select:bi,Selu:yi,Sequential:qA,Sigmoid:Ni,Sign:xi,Sin:gi,Sinh:vi,Slice:wi,Softmax:Ei,Softplus:ki,SpaceToBatchND:Si,SparseFillEmptyRows:Mi,SparseReshape:Ti,SparseSegmentMean:Ai,SparseSegmentSum:Di,SparseToDense:Ri,SplitV:Ii,Sqrt:Ci,Square:Li,SquaredDifference:Oi,Step:Ji,StridedSlice:_i,StringNGrams:Fi,StringSplit:zi,StringToHashBucketFast:ji,Sub:Pi,Sum:$i,SymbolicTensor:rM,Tan:Bi,Tanh:Wi,Tensor:pa,TensorBuffer:ua,Tile:Gi,TopK:Ui,Transform:Vi,Transpose:Yi,Unique:Hi,Unpack:Zi,UnsortedSegmentSum:Qi,UpperBound:Xi,Variable:ba,ZerosLike:qi,_FusedMatMul:eo,abs:ud,acos:fd,acosh:dd,add:ed,addN:md,all:yd,any:gd,argMax:xd,argMin:kd,asin:$d,asinh:Id,atan:Md,atan2:Ad,atanh:Rd,avgPool:ep,avgPool3d:sp,backend:Rf,backend_util:FC,basicLSTMCell:dp,batchNorm:wp,batchNorm2d:vp,batchNorm3d:Np,batchNorm4d:Cp,batchToSpaceND:mp,bincount:Sp,booleanMaskAsync:Qv,broadcastArgs:Ep,broadcastTo:Tp,broadcast_util:Qf,browser:oh,buffer:Il,callbacks:l_,cast:Ml,ceil:Dp,clipByValue:Lp,clone:Al,complex:mu,concat:ip,concat1d:Fp,concat2d:jp,concat3d:Bp,concat4d:Gp,constraints:jM,conv1d:Hp,conv2d:Vp,conv2dTranspose:qp,conv3d:Kp,conv3dTranspose:sm,copyRegisteredKernels:bo,cos:im,cosh:am,cosineWindow:ux,cumprod:um,cumsum:fm,customGrad:Jb,data:Bj,denseBincount:dm,deprecationWarn:yf,depthToSpace:mm,depthwiseConv2d:ym,deregisterOp:y_,device_util:Ua,diag:gm,dilation2d:xm,disableDeprecationWarnings:bf,dispose:kf,disposeVariables:wf,div:id,divNoNan:Mm,dot:Am,dropout:ax,einsum:Rm,elu:Lm,enableDebugMode:mf,enableProdMode:pf,enclosingPowerOfTwo:cx,engine:gf,env:jn,equal:km,erf:Fm,euclideanNorm:ub,exp:fb,expandDims:db,expm1:mb,eye:gb,fft:av,fill:Rp,findBackend:Tf,findBackendFactory:Af,floor:xb,floorDiv:sd,fused:Ex,gather:kb,gatherND:rx,gather_util:ch,getBackend:Ef,getGradient:uo,getKernel:co,getKernelsForBackend:lo,grad:Hb,grads:Zb,greater:$b,greaterEqual:Ib,ifft:uv,imag:_f,image:pk,inTopKAsync:fx,initializers:eT,input:eD,io:uf,irfft:fv,isFinite:Mb,isInf:Ab,isNaN:Rb,keep:Cf,kernel_impls:zC,layers:FL,leakyRelu:Lb,less:Fb,lessEqual:jb,linalg:mk,linspace:Pb,loadGraphModel:xz,loadGraphModelSync:Nz,loadLayersModel:tD,localResponseNormalization:Wb,log:Ub,log1p:Yb,logSigmoid:sy,logSoftmax:ay,logSumExp:uy,logicalAnd:fy,logicalNot:dy,logicalOr:my,logicalXor:yy,losses:bk,lowerBound:xy,matMul:ff,math:Vf,max:Hm,maxPool:ky,maxPool3d:$y,maxPoolWithArgmax:Iy,maximum:My,mean:Ay,memory:vf,meshgrid:Oy,metrics:KL,min:Qm,minimum:_y,mirrorPad:zy,mod:Py,model:JA,models:t_,moments:Wy,movingAverage:qv,mul:ad,multiRNNCell:Uy,multinomial:Yy,neg:zf,nextFrame:Tk,norm:ab,notEqual:Zy,oneHot:df,ones:Ry,onesLike:Xy,op:du,outerProduct:Jy,pad:tw,pad1d:nw,pad2d:rw,pad3d:ow,pad4d:cw,pool:pw,pow:qm,prelu:bw,print:Dl,prod:ww,profile:xf,raggedGather:vw,raggedTensorToTensor:Nw,rand:Cw,randomGamma:lg,randomNormal:hg,randomStandardNormal:pg,randomUniform:bg,range:yg,ready:If,real:Pf,reciprocal:gg,registerBackend:Df,registerCallbackConstructor:nD,registerGradient:ho,registerKernel:fo,registerOp:m_,regularizers:r_,relu:xg,relu6:kg,removeBackend:Mf,reshape:Kd,reverse:$g,reverse1d:Ig,reverse2d:Mg,reverse3d:Ag,reverse4d:Rg,rfft:mv,round:Lg,rsqrt:Fg,scalar:Jm,scatterND:Kv,scatter_util:hh,searchSorted:vy,selu:jg,separableConv2d:Bg,sequential:KA,serialization:Fh,setBackend:Sf,setPlatform:Of,setdiff1dAsync:Gg,sigmoid:ap,sign:Vg,signal:dk,sin:Hg,sinh:Qg,slice:up,slice1d:qg,slice2d:Kg,slice3d:ev,slice4d:sv,slice_util:Rh,softmax:iv,softplus:ey,spaceToBatchND:lw,sparse:yk,sparseToDense:nx,spectral:hk,split:dv,sqrt:tb,square:nb,squaredDifference:yv,squeeze:gv,stack:xv,step:kv,stridedSlice:$v,string:wk,sub:iy,sum:rb,sumOutType:Ca,tan:Iv,tanh:fp,tensor:yu,tensor1d:Ev,tensor2d:Mv,tensor3d:Xf,tensor4d:Tv,tensor5d:Av,tensor6d:Dv,tensor_util:Aa,test_util:Jh,tidy:Nf,tile:yb,time:$f,topk:Ov,train:Ek,transpose:Wf,truncatedNormal:_v,unique:zv,unregisterGradient:mo,unregisterKernel:po,unsortedSegmentSum:Pv,unstack:Wv,upcastType:ka,upperBound:Gv,util:Zo,valueAndGrad:Qb,valueAndGrads:Xb,variable:Uv,variableGrads:qb,version:E9,version_converter:Cz,version_core:Kh,version_layers:dA,where:$m,whereAsync:Hv,zeros:Dy,zerosLike:Im});var T9=f(M9);var A9;function D9(){if(A9)return st;A9=1;var t=ot();var e=ut();Object.defineProperty(st,"__esModule",{value:true});st.ObjectDetectionModel=st.ClassificationModel=void 0;var n=t(jt());var s=t(se());var r=t(ue());var i=t(me());var o=t(we());var a=t(xe());var c=t(Ce());var u=t(Re());var l=h(T9);function f(t){if(typeof WeakMap!=="function")return null;var e=new WeakMap;var n=new WeakMap;return(f=function t(s){return s?n:e})(t)}function h(t,n){if(t&&t.__esModule){return t}if(t===null||e(t)!=="object"&&typeof t!=="function"){return{default:t}}var s=f(n);if(s&&s.has(t)){return s.get(t)}var r={};var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t){if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;if(a&&(a.get||a.set)){Object.defineProperty(r,o,a)}else{r[o]=t[o]}}}r.default=t;if(s){s.set(t,r)}return r}function d(t){var e=p();return function n(){var s=(0,o.default)(t),r;if(e){var a=(0,o.default)(this).constructor;r=Reflect.construct(s,arguments,a)}else{r=s.apply(this,arguments)}return(0,i.default)(this,r)}}function p(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(t){return false}}var m=function(){function t(){(0,c.default)(this,t);this.NEW_OD_OUTPUT_TENSORS=["detected_boxes","detected_scores","detected_classes"]}(0,u.default)(t,[{key:"loadModelAsync",value:function(){var t=(0,a.default)(n.default.mark((function t(e){var s,r=arguments;return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:s=r.length>1&&r[1]!==undefined?r[1]:null;n.next=3;return l.loadGraphModel(e,s);case 3:this.model=n.sent;this.input_size=this.model.inputs[0].shape[1];this.is_new_od_model=this.model.outputs.length==3;this.is_rgb_input=this.model.metadata&&this.model.metadata["Image.BitmapPixelFormat"]=="Rgb8"||this.is_new_od_model;case 7:case"end":return n.stop()}}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"dispose",value:function t(){this.model.dispose()}},{key:"executeAsync",value:function(){var t=(0,a.default)(n.default.mark((function t(e){var s=this;var r,i,o;return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:r=l.tidy((function(){return e instanceof l.Tensor?e:s._preprocess(l.browser.fromPixels(e,3))}));n.next=3;return this.model.executeAsync(r,this.is_new_od_model?this.NEW_OD_OUTPUT_TENSORS:null);case 3:i=n.sent;l.dispose(r);n.next=7;return!Array.isArray(i)?i.array():Promise.all(i.map((function(t){return t.array()})));case 7:o=n.sent;l.dispose(i);return n.abrupt("return",this._postprocess(o));case 10:case"end":return n.stop()}}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"_postprocess",value:function(){var t=(0,a.default)(n.default.mark((function t(e){return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:return n.abrupt("return",e);case 1:case"end":return n.stop()}}}),t)})));function e(e){return t.apply(this,arguments)}return e}()}]);return t}();var b=function(t){(0,r.default)(i,t);var e=d(i);function i(){var t;(0,c.default)(this,i);t=e.call(this);t.ANCHORS=[.573,.677,1.87,2.06,3.34,5.47,7.88,3.53,9.77,9.17];return t}(0,u.default)(i,[{key:"_preprocess",value:function t(e){var n=l.image.resizeBilinear(e.expandDims().toFloat(),[this.input_size,this.input_size]);return this.is_rgb_input?n:n.reverse(-1)}},{key:"_postprocess",value:function(){var t=(0,a.default)(n.default.mark((function t(e){var r=this;var i,o,a,c,u,f,h,d;return n.default.wrap((function t(n){while(1){switch(n.prev=n.next){case 0:if(!(e.length==3)){n.next=2;break}return n.abrupt("return",e);case 2:i=l.tidy((function(){var t=r.ANCHORS.length/2;var n=e[0][0][0].length;var s=e[0].length;var i=e[0][0].length;var o=n/t-5;var a=[];var c=[];var u=[];for(var f=0;f<s;f++){for(var h=0;h<i;h++){var d=0;for(var p=0;p<t;p++){var m=(r._logistic(e[0][f][h][d++])+h)/i;var b=(r._logistic(e[0][f][h][d++])+f)/s;var y=Math.exp(e[0][f][h][d++])*r.ANCHORS[p*2]/i;var w=Math.exp(e[0][f][h][d++])*r.ANCHORS[p*2+1]/s;var g=l.scalar(r._logistic(e[0][f][h][d++]));var v=l.tensor1d(e[0][f][h].slice(d,d+o)).softmax();d+=o;v=v.mul(g);var x=v.argMax();a.push([m-y/2,b-w/2,m+y/2,b+w/2]);c.push(v.max().dataSync()[0]);u.push(x.dataSync()[0])}}}a=l.tensor2d(a);c=l.tensor1d(c);u=l.tensor1d(u);return[a,c,u]})),o=(0,s.default)(i,3),a=o[0],c=o[1],u=o[2];n.next=5;return l.image.nonMaxSuppressionAsync(a,c,10);case 5:f=n.sent;h=[a.gather(f),c.gather(f),u.gather(f)];n.next=9;return h[0].array();case 9:n.t0=n.sent;n.next=12;return h[1].array();case 12:n.t1=n.sent;n.next=15;return h[2].array();case 15:n.t2=n.sent;d=[n.t0,n.t1,n.t2];l.dispose([a,c,u]);l.dispose(f);l.dispose(h);return n.abrupt("return",d);case 21:case"end":return n.stop()}}}),t)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"_logistic",value:function t(e){if(e>0){return 1/(1+Math.exp(-e))}else{var n=Math.exp(e);return n/(1+n)}}}]);return i}(m);st.ObjectDetectionModel=b;var y=function(t){(0,r.default)(n,t);var e=d(n);function n(){(0,c.default)(this,n);return e.apply(this,arguments)}(0,u.default)(n,[{key:"_preprocess",value:function t(e){var n=e.shape.slice(0,2),r=(0,s.default)(n,2),i=r[0],o=r[1];var a=i>o?(i-o)/2:0;var c=i>o?0:(o-i)/2;var u=Math.min(i,o);var f=l.image.cropAndResize(e.expandDims().toFloat(),[[a/i,c/o,(a+u)/i,(c+u)/o]],[0],[this.input_size,this.input_size]);return this.is_rgb_input?f:f.reverse(-1)}}]);return n}(m);st.ClassificationModel=y;return st}var R9=D9();const O9=".camera{color:white;display:flex;align-items:center;justify-content:center;position:relative}.cameraCanvas,.cameraCanvasSelfie,.cameraCanvasSelfieDesk{z-index:3;max-width:100%;max-height:100%;border-radius:10px}.cameraCanvasSelfie,.cameraCanvasSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.cameraVideo,.cameraVideoSelfie,.cameraVideoSelfieDesk{z-index:2;max-width:100%;max-height:100%;border-radius:10px}.cameraVideoSelfie,.cameraVideoSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.id-guide-rectangle{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:70%;padding-bottom:calc(70% / 1.58);border:3px dashed rgba(255, 255, 255, 0.7);border-radius:8px;z-index:5;pointer-events:none;box-sizing:border-box}.countdown-overlay-style{position:absolute;inset:0;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:6}.video-overlay-canvas{position:absolute;top:0;left:0;width:100%;height:100%;z-index:7;pointer-events:none}.capture-flash-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:white;opacity:0;animation:capture-flash 0.2s ease-out;pointer-events:none;z-index:10}@keyframes bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8, 0, 1, 1)}50%{transform:none;animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes capture-flash{0%{opacity:0}50%{opacity:1}100%{opacity:0}}.countdown-text-style{color:white;font-size:8rem;font-weight:bold;animation:bounce 1s infinite;}";var L9;(function(t){t["JPEG"]="image/jpeg";t["PNG"]="image/png"})(L9||(L9={}));const _9=class{constructor(n){t(this,n);this.eventPhotoCapture=e(this,"photoIdCapture");this.eventRecordingIdReady=e(this,"recordingIdCapture");this.eventTimeElapsed=e(this,"timeElapsed");this.mediaRecorder=null;this.mediaStream=null;this.animationFrameId=null;this.processingsCount=0;this.objectDetectionModel=null;this.canvasContext=null;this.processingContext=null;this.overlayContext=null;this.timerInterval=null;this.WARNING_THRESHOLD_SECONDS=40;this.recordedChunks=[];this.countdown=0;this.isCapturing=false;this.mode="idle";this.tfjsReady=false;this.detectedArea=null;this.elapsedTime=0;this.isLoading=true;this.startRecording=()=>{if(!this.mediaStream||!this.videoElement||!o.videoRecording){return}this.recordedChunks=[];var t={mimeType:m.webmMimeType.mime};if(!MediaRecorder.isTypeSupported(t.mimeType)){if(o.device.mobileOS==w.iOS||o.device.browser==x.Safari)t.mimeType=m.mp4MimeType.mime}this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:"video/webm"});this.mediaRecorder.ondataavailable=({data:t})=>{if(t.size>0){this.recordedChunks=[...this.recordedChunks,t]}};this.mediaRecorder.onstop=()=>{if(this.recordedChunks.length>0){var e=new Blob(this.recordedChunks,{type:t.mimeType.split(";")[0]});this.eventRecordingIdReady.emit(e);this.mode="done"}};this.mediaRecorder.start();console.log("Recording started...")};this.stopRecording=()=>{if(this.mediaRecorder&&this.mediaRecorder.state==="recording"){this.mediaRecorder.stop();console.log("Recording stopped.")}};this.capture=async()=>new Promise((t=>{if(this.videoElement&&this.canvasElement){const e=this.videoElement;const n=this.canvasElement;const s=this.canvasContext;n.width=e.videoWidth;n.height=e.videoHeight;s.drawImage(e,0,0,n.width,n.height);n.toBlob((e=>{if(e&&e.type===L9.JPEG&&!o.device.isAppleDevice){try{if(o.debug)console.log("stream | getFrame | addExifInImg");N(e,this.mediaStream.getTracks()[0],{width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}).then((e=>{this.eventPhotoCapture.emit(e);this.isCapturing=true;setTimeout((()=>{this.isCapturing=false}),400);t(true)}))}catch(e){this.eventTimeElapsed.emit();t(false)}}else{if(o.debug)console.log("stream | getFrame | resolve");this.eventPhotoCapture.emit(e);this.isCapturing=true;setTimeout((()=>{this.isCapturing=false}),400);t(true)}}),L9.PNG,1);console.log("Image captured!")}else{console.error("Video element or canvas element not found. Cannot capture image.")}}));this.startFrameProcessing=()=>{if(this.animationFrameId===null){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}};this.handleStartTiltDetection=()=>{console.log("Detecting tilt... Please tilt the ID. (Rectangle will appear on detected object).");this.mode="detecting_tilt_live";this.detectedArea=null;this.titleMesage=this.translations.HowToValues.TiltTitle;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.startFrameProcessing()};this.handleStartDetection=async()=>{if(!this.mediaStream){console.log("Camera not ready. Please allow camera access.");return}console.log("Starting ID detection...");this.mode="detecting_straight_id";this.recordedChunks=[];this.detectedArea=null;this.countdown=0;this.processingsCount=0;if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}if(this.videoElement&&this.videoElement.readyState<3){console.log("Waiting for video stream to fully load...");await new Promise((t=>{const e=()=>{this.videoElement.removeEventListener("canplaythrough",e);t()};this.videoElement.addEventListener("canplaythrough",e)}));console.log("Video stream ready. Starting detection.")}this.startRecording();this.startFrameProcessing()}}async componentWillLoad(){this.translations=await b.getValues()}async componentDidLoad(){this.initVariables();if(this.canvasElement){this.canvasContext=this.canvasElement.getContext("2d",{willReadFrequently:true})}if(this.processingCanvasElement){this.processingContext=this.processingCanvasElement.getContext("2d",{willReadFrequently:true})}if(this.overlayCanvasElement){this.overlayContext=this.overlayCanvasElement.getContext("2d",{willReadFrequently:true})}console.log("Loading AI model...");this.objectDetectionModel=new R9.ObjectDetectionModel;await this.objectDetectionModel.loadModelAsync("../../../assets/tfmodel/model.json");this.tfjsReady=true;console.log('AI model loaded. Camera ready. Click "Start ID Detection" to begin.');await this.getMedia();this.handleStartDetection();this.timerInterval=setInterval((()=>{this.elapsedTime++;console.log(`Time open: ${this.elapsedTime} seconds`);if(this.elapsedTime>=this.WARNING_THRESHOLD_SECONDS){if(this.timerInterval!==null){clearInterval(this.timerInterval);this.timerInterval=null;console.warn(`Warning: Component has been open for ${this.WARNING_THRESHOLD_SECONDS} seconds!`)}this.eventTimeElapsed.emit()}}),1e3)}initVariables(){if(o.debug)console.log("id-capture | initVariables");if(o.flowStatus==a.IDFRONT){this.titleMesage=this.translations.IdCaptureValues.Title}else if(o.flowStatus==a.IDBACK){this.titleMesage=this.translations.IdCaptureValues.TitleBack}else if(o.flowStatus==a.IDTILT){this.titleMesage=this.translations.IdCaptureValues.IDPoseMapping}}disconnectedCallback(){if(this.mediaRecorder){this.mediaRecorder.stop();this.mediaRecorder=null}if(this.mediaStream){this.mediaStream.getTracks().forEach((t=>t.stop()))}if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}this.detectedArea=null;if(this.timerInterval!==null){clearInterval(this.timerInterval);this.timerInterval=null}}async getMedia(){try{if(!o.cameraId){await m.InitCameras(o.device)}const t=m.GetConstraints(o.cameraId,o.device);const e=await navigator.mediaDevices.getUserMedia(t);if(this.videoElement){this.videoElement.srcObject=e;this.videoElement.play()}this.mediaStream=e;this.checkReadyState()}catch(t){console.error("Error accessing camera:",t);this.mode="idle";this.isLoading=false}}async detectIdWithTensorFlow(t,e=.9){if(!this.objectDetectionModel)return null;try{const n=await this.objectDetectionModel.executeAsync(t);let s=null;let r=0;for(const i of n[1]){if(i>e){s={};let e=n[0][r];s.bbox=[e[0]*t.videoWidth,e[1]*t.videoHeight,e[2]*t.videoWidth-e[0]*t.videoWidth,e[3]*t.videoHeight-e[1]*t.videoHeight];s.score=n[1][r];s.class=n[2][r]}++r}return s}catch(t){console.error("TensorFlow.js detection error:",t);return null}}async processVideoFrame(){if(this.videoElement&&this.processingCanvasElement&&this.overlayCanvasElement&&this.tfjsReady&&(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live")&&this.videoElement.readyState>=2&&this.processingContext&&this.overlayContext&&this.processingsCount<100){this.processingsCount++;const t=this.videoElement;const e=this.processingCanvasElement;const n=this.overlayCanvasElement;const s=this.processingContext;const r=this.overlayContext;r.clearRect(0,0,n.width,n.height);e.width=t.videoWidth;e.height=t.videoHeight;n.width=t.videoWidth;n.height=t.videoHeight;s.drawImage(t,0,0,e.width,e.height);let i=await this.detectIdWithTensorFlow(t);try{if(i){const[e,s,o,a]=i.bbox;const c=o/a;const u=o*a;let l="blue";let f=`Detected: ${i.class} (${(i.score*100).toFixed(1)}%). Area: ${u.toFixed(0)} px²`;console.log(f);this.detectedArea=u;if(this.mode==="detecting_straight_id"){if(c>1.4&&c<1.8&&u>t.videoWidth*t.videoHeight*.1){l="green";console.log("Straight ID detected! Starting countdown...");this.titleMesage=this.translations.IdCaptureValues.IdDetected;this.countdown=3;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.mode="countdown_capture";const t=setInterval((async()=>{this.countdown--;if(this.countdown<=0){clearInterval(t);await this.capture();console.log('ID captured! Click "Start Tilt Detection" to analyze tilt.');this.countdown=0;this.detectedArea=null;r.clearRect(0,0,n.width,n.height);this.mode="awaiting_tilt_start";this.handleStartTiltDetection()}}),1e3);return}else{l="red";console.log("Looking for straight ID... Please align your ID with the guide.")}}else if(this.mode==="detecting_tilt_live"){if(c>1.4&&c<1.8){l="green";console.log(`ID is relatively straight (Aspect Ratio: ${c.toFixed(2)}).`);this.titleMesage=this.translations.IdCaptureValues.NoTiltDetected}else{l="yellow";console.log(`ID appears tilted (Aspect Ratio: ${c.toFixed(2)}).`);this.stopRecording()}console.log("Detecting tilt... Observe the highlighted object.")}r.strokeStyle=l;r.lineWidth=4;r.strokeRect(e,s,o,a);r.fillStyle=l;r.font="24px Arial";r.fillText(`${i.class} (${(i.score*100).toFixed(1)}%)`,e,s>20?s-10:s+25)}else{this.detectedArea=null;if(this.mode==="detecting_straight_id"){console.log("No ID detected. Please ensure ID is visible.")}else if(this.mode==="detecting_tilt_live"){console.log("No object detected for tilt analysis.")}}}catch(t){console.error("TensorFlow.js processing error:",t);console.log("AI processing error. See console for details.");this.mode="idle";this.detectedArea=null;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}}finally{}if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){setTimeout((()=>{if(this.mode==="detecting_straight_id"||this.mode==="detecting_tilt_live"){this.animationFrameId=requestAnimationFrame((()=>this.processVideoFrame()))}}),100)}else{if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}}}if(this.processingsCount>=100){console.warn("Maximum processing frames reached. Stopping further processing.");this.mode="idle";this.processingsCount=0;if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}this.eventTimeElapsed.emit()}}checkReadyState(){if(this.tfjsReady&&this.mediaStream){this.isLoading=false;this.mode="idle"}}render(){let t="cameraVideo";if(o.device.isDesktop){t="cameraVideoSelfieDesk"}return n("div",{key:"24aaaa0f3075a34306461e8fa633006bbc0ba8b0",class:"container flex center"},n("div",{key:"9d05b82d9bb4d8b207aaf09267508b6a8f3d2515",class:"px-2 w-100"},n("h1",{key:"19e51ef69bd86e387c43ac1707a7a280cf6f3f61",class:this.titleStyle,innerHTML:this.titleMesage}),n("div",{key:"4fe5a07ae4ea914f2526ef2d3b299150f342fca1",class:"w-100 h-100 rounded"},n("div",{key:"c82f360cacea013f69391040b8e2d22a83886918",class:"camera rounded"},this.isLoading&&n("div",{key:"86e8f0ed8be6c8a46de131a70e8c01d5bddba7ea",class:"loader-overlay"},n("div",{key:"4cdd9337a17e201d0f6c7fa7cd4370530ca11cd5",class:"loader-spinner"})),n("video",{key:"a0548200df7455cc914d04c796ae57e58499afb4",id:"video",loop:true,autoplay:true,playsinline:true,muted:true,class:t,ref:t=>this.videoElement=t}),n("canvas",{key:"af44733acf7d0c6238f195284f975d6fa84f8aac",id:"output",ref:t=>this.canvasElement=t,style:{display:"none"}}),n("canvas",{key:"21f10eee1121b42f5ed0878fe0f804d7d49ed51d",id:"processingCanvasElement",ref:t=>this.processingCanvasElement=t,style:{display:"none"}}),n("canvas",{key:"b7608d2e2b0d6e16975bcff1d3a52f7187d314c8",id:"overlayCanvasElement",ref:t=>this.overlayCanvasElement=t,class:"video-overlay-canvas"}),n("div",{key:"9ebbfbafe3ab8423411f5d40716d2733be0c515a",class:"id-guide-rectangle"}),this.isCapturing&&n("div",{key:"5097a52a261aa74e58318445500bbe66b1ae4a6e",class:"capture-flash-overlay"}),this.countdown>0&&n("div",{key:"7c64ebee2f0e31f541a320b34200791c69790d0d",class:"countdown-overlay-style"},n("span",{key:"258fe5d2567add9900dd3e3f1f285058e58c9624",class:"countdown-text-style"},this.countdown)))),n("div",{key:"e198b7758c08dc16cdf81b04705bd4cd485f3a76",class:"footer text-center"},n("img",{key:"80f5b2e1a4983ae00d0fc3186f1ac6ee07e115e5",src:y}))))}get el(){return s(this)}};_9.style=O9;const F9="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1Mi4yOTIiIGhlaWdodD0iNDMuODU4IiB2aWV3Qm94PSIwIDAgNTIuMjkyIDQzLjg1OCI+DQogIDxnIGlkPSJpZC1jYXJkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcgLTI5KSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTEiIGQ9Ik0yMC4zNzQsNjYuOTU0aDIyLjM1YS44NDMuODQzLDAsMCwwLDAtMS42ODdIMjAuMzc0YTEuNjg5LDEuNjg5LDAsMCwxLTEuNjg3LTEuNjg3VjMyLjM3NGExLjY4OSwxLjY4OSwwLDAsMSwxLjY4Ny0xLjY4N0g2NS45MThBMS42ODksMS42ODksMCwwLDEsNjcuNiwzMi4zNzRWNDkuMjQyYS44NDMuODQzLDAsMCwwLDEuNjg3LDBWMzIuMzc0QTMuMzc4LDMuMzc4LDAsMCwwLDY1LjkxOCwyOUgyMC4zNzRBMy4zNzgsMy4zNzgsMCwwLDAsMTcsMzIuMzc0VjYzLjU4QTMuMzc4LDMuMzc4LDAsMCwwLDIwLjM3NCw2Ni45NTRaIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MiIgZGF0YS1uYW1lPSJQYXRoIDQ3NTIiIGQ9Ik01MC42NTEsNTAuMzI2YTYuMzI2LDYuMzI2LDAsMSwwLTYuMzI2LDYuMzI2QTYuMzMzLDYuMzMzLDAsMCwwLDUwLjY1MSw1MC4zMjZabS0xMC45NjQsMGE0LjYzOSw0LjYzOSwwLDEsMSw0LjYzOSw0LjYzOUE0LjY0NCw0LjY0NCwwLDAsMSwzOS42ODcsNTAuMzI2WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEyLjE0NCAtOC42NzQpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1MyIgZGF0YS1uYW1lPSJQYXRoIDQ3NTMiIGQ9Ik0zMiw4NC43NDd2My4zNzRhLjg0NC44NDQsMCwwLDAsLjg0My44NDNINDguODY4YS44NDQuODQ0LDAsMCwwLC44NDMtLjg0M1Y4NC43NDdBNi43NTUsNi43NTUsMCwwLDAsNDIuOTY0LDc4SDM4Ljc0N0E2Ljc1NSw2Ljc1NSwwLDAsMCwzMiw4NC43NDdabTYuNzQ3LTUuMDZoNC4yMTdhNS4wNjYsNS4wNjYsMCwwLDEsNS4wNiw1LjA2djIuNTNIMzMuNjg3di0yLjUzQTUuMDY2LDUuMDY2LDAsMCwxLDM4Ljc0Nyw3OS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOC42NzQgLTI4LjMzNikiIGZpbGw9IiMyNTJjODIiLz4NCiAgICA8cGF0aCBpZD0iUGF0aF80NzU0IiBkYXRhLW5hbWU9IlBhdGggNDc1NCIgZD0iTTEwMi43MTIsNDhIODUuODQzYS44NDMuODQzLDAsMCwwLDAsMS42ODdoMTYuODY4YS44NDMuODQzLDAsMCwwLDAtMS42ODdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzkuMzI0IC0xMC45ODgpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc1NSIgZGF0YS1uYW1lPSJQYXRoIDQ3NTUiIGQ9Ik0xMDIuNzEyLDYySDg1Ljg0M2EuODQzLjg0MywwLDEsMCwwLDEuNjg3aDE2Ljg2OGEuODQzLjg0MywwLDAsMCwwLTEuNjg3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5LjMyNCAtMTkuMDg0KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTYiIGRhdGEtbmFtZT0iUGF0aCA0NzU2IiBkPSJNOTUuMjI5LDc1YTEyLjIzLDEyLjIzLDAsMSwwLDEyLjIzLDEyLjIzQTEyLjI0NCwxMi4yNDQsMCwwLDAsOTUuMjI5LDc1Wm0wLDIyLjk3N0ExMC43NDcsMTAuNzQ3LDAsMSwxLDEwNS45NzcsODcuMjMsMTAuNzU5LDEwLjc1OSwwLDAsMSw5NS4yMjksOTcuOTc3WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM4LjE2NyAtMjYuNjAyKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTciIGRhdGEtbmFtZT0iUGF0aCA0NzU3IiBkPSJNMTExLjA1OSw5OC43MTdsLTcuNDQ0LDcuNDQzLTQuODUtNC44NDlhLjc0MS43NDEsMCwwLDAtMS4wNDgsMS4wNDhsNS4zNzQsNS4zNzRhLjc0MS43NDEsMCwwLDAsMS4wNDgsMGw3Ljk2OC03Ljk2OGEuNzQxLjc0MSwwLDAsMC0xLjA0OC0xLjA0OFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00Ny4yOTQgLTQxLjM5MykiIGZpbGw9IiM3YmI0MGYiLz4NCiAgPC9nPg0KPC9zdmc+DQo=";const z9="";const j9=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillRender(){this.translations=await b.getValues()}componentWillLoad(){this.yesButtonPressed=false;this.noButtonPressed=false}async hasBackSelected(){this.yesButtonPressed=true;try{await i.instance.SetTwoSidedId()}catch(t){this.apiErrorEvent.emit(t)}}async onlyFrontSelected(){this.noButtonPressed=true;try{o.flowStatus=await i.instance.GetNextFlowState()}catch(t){this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"008e5ebfbe16e455448ff03de29796e2baa54d6d",class:"container flex center"},n("div",{key:"e099c4e5b00fbb452197569c4b11d3b160da51e4",class:"px-3"},n("div",{key:"bf59fcb8f9f89fa46892a033a5f42ec565a738a6",class:"mb-1 ml-1 text-center"},n("img",{key:"b7a91c2e08e7ba3941c42b35f39f2f09fe1e29a2",src:F9,style:{width:"70px"}})),n("h1",{key:"12981efac16a102b281582d3be075fa31b16623f",class:"text-center mb-1"},this.translations.IdSelectionValues.Title),n("div",{key:"3e3698e32544a50f0ed4833de4a1c8b22626625b",class:"color-blue mb-2 loud-text",innerHTML:this.translations.IdSelectionValues.Description}),!this.noButtonPressed?n("div",{class:"button flex mb-1"},this.yesButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.yesButtonPressed,onClick:()=>this.hasBackSelected()},this.translations.IdSelectionValues.ButtonYes)):null,n("div",{key:"3eb629414407cc98068f491dfa93451d622cd3a2"}),!this.yesButtonPressed?n("div",{class:"button flex mb-1"},this.noButtonPressed?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{class:"main-button",type:"button",disabled:this.noButtonPressed,onClick:()=>this.onlyFrontSelected()},this.translations.IdSelectionValues.ButtonNo)):null,n("div",{key:"760230d2c827f71f366ba33cd8f39f77e5626e20",class:"footer text-center"},n("img",{key:"dbf9c2b64c20a3071b86c6565009857f2a5a4d70",src:y}))))}};j9.style=z9;const P9="4.7.91";var B9={version:P9};class W9{constructor(){var t,e,n,s;this.motionValues=[];this.orientationValues=[];this.addItemsToOrientation=t=>{this.orientationValues.push({beta:t.beta,gamma:t.gamma});if(this.orientationValues.length>5){window.removeEventListener("deviceorientation",this.addItemsToOrientation)}};this.addItemsToMotion=t=>{this.motionValues.push({x:t.acceleration.x,y:t.acceleration.y});if(this.motionValues.length>5){window.removeEventListener("devicemotion",this.addItemsToMotion)}};this.supportedScreenOrientation=(e=(t=((screen===null||screen===void 0?void 0:screen.orientation)||{}).type)!==null&&t!==void 0?t:screen.mozOrientation)!==null&&e!==void 0?e:screen.msOrientation;this.safariScreenOrientation=!(screen===null||screen===void 0?void 0:screen.orientation)&&matchMedia("(orientation: portrait)").matches?"portrait-primary":"landscape-primary";this.initialScreenOrientation=(s=(n=this.supportedScreenOrientation)!==null&&n!==void 0?n:this.safariScreenOrientation)!==null&&s!==void 0?s:"portrait-primary";this.userAgent=navigator.userAgent||navigator.vendor||window.opera||undefined;this.isMobile=this.isMobileDevice();this.isTablet=this.isTabletDevice();this.isDesktop=!this.isMobile&&!this.isTablet}isMobileDevice(){const t=[/(Android)(.+)(Mobile)/i,/BlackBerry/i,/iPhone|iPod/i,/Opera Mini/i,/IEMobile/i];return t.some((t=>this.userAgent.match(t)))}isTabletDevice(){const t=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;return t.test(this.userAgent.toLowerCase())}getMobileOS(){if(this.isMobileDevice()){if(/windows phone/i.test(this.userAgent))return w.WindowsPhone;else if(/android/i.test(this.userAgent))return w.Android;else if(/iPad|iPhone|iPod/.test(this.userAgent)&&!window.MSStream)return w.iOS;return w.Unknown}else return undefined}getDesktopOS(){if(this.isDesktop){if(this.userAgent.indexOf("Win")!==-1)return k.Windows;else if(this.userAgent.indexOf("Mac")!==-1)return k.MacOS;else if(this.userAgent.indexOf("X11")!==-1)return k.Unix;else if(this.userAgent.indexOf("Linux")!==-1)return k.Linux;return k.Unknown}else return undefined}getDeviceOS(){var t;return(t=this.getMobileOS())!==null&&t!==void 0?t:this.getDesktopOS()}getBrowser(){if(/XiaoMi/i.test(this.userAgent)||/MiuiBrowser/i.test(this.userAgent))return x.Mi;var t=/chrome/i.test(this.userAgent);if(t)return x.Chrome;if(/firefox/i.test(navigator.userAgent))return x.Firefox;else if(!t&&/safari/i.test(navigator.userAgent))return x.Safari;else return x.Unknown}async checkIfMobileBySensors(){var t,e;if(typeof((t=window.DeviceMotionEvent)===null||t===void 0?void 0:t.requestPermission)==="function"){var n=window.DeviceMotionEvent.requestPermission();if(n==="granted"){await this.getMotionValues()}}else{await this.getMotionValues()}await I(200);var s=false;if(this.motionValues.length>0){s=this.motionValues.filter((t=>t.x!=0)).length>=3}if(typeof((e=window.DeviceOrientationEvent)===null||e===void 0?void 0:e.requestPermission)==="function"){var n=window.DeviceOrientationEvent.requestPermission();if(n==="granted"){await this.getOrientationValues()}}else{await this.getOrientationValues()}await I(500);var r=false;if(this.orientationValues.length>0){r=this.orientationValues.map((t=>t.beta)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))||this.orientationValues.map((t=>t.gamma)).every(((t,e,n)=>e==0?t!==n[n.length-1]:t!==n[e-1]))}return s||r}async getOrientationValues(){window.addEventListener("deviceorientation",this.addItemsToOrientation)}async getMotionValues(){window.addEventListener("devicemotion",this.addItemsToMotion)}async getDevice(){var t=await this.checkIfMobileBySensors();var e={isMobileBySensors:t,isDesktop:this.isDesktop,desktopOS:this.getDesktopOS(),isWindowsDesktop:this.getDeviceOS()===k.Windows,isLinuxOrUnixDesktop:this.getDeviceOS()===k.Linux||this.getDeviceOS()===k.Unix,isMobile:this.isMobile,mobileOS:this.getMobileOS(),isAndroidDevice:this.getDeviceOS()===w.Android,isAppleDevice:this.getDeviceOS()===w.iOS||this.getDeviceOS()===k.MacOS,isUnknownMobileDevice:this.getDeviceOS()===w.Unknown,browser:this.getBrowser(),isTablet:this.isTablet,initialScreenOrientation:this.initialScreenOrientation};return e}}const G9="@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:100;src:url(./files/roboto-latin-ext-100-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-100-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:200;src:url(./files/roboto-latin-ext-200-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-200-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:300;src:url(./files/roboto-latin-ext-300-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-300-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:400;src:url(./files/roboto-latin-ext-400-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-400-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:500;src:url(./files/roboto-latin-ext-500-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-500-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:600;src:url(./files/roboto-latin-ext-600-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-600-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:700;src:url(./files/roboto-latin-ext-700-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-700-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:800;src:url(./files/roboto-latin-ext-800-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-800-normal.woff) format('woff')}@font-face{font-family:'Roboto';font-style:normal;font-display:swap;font-weight:900;src:url(./files/roboto-latin-ext-900-normal.woff2) format('woff2'), url(./files/roboto-latin-ext-900-normal.woff) format('woff')}*{font-family:'Roboto', sans-serif}[hidden]{visibility:hidden !important;opacity:0 !important}.full{width:100%;height:100%;left:0;top:0}.container{width:100%;height:100%;background-color:white;max-width:991px;margin:auto;position:relative;overflow:hidden}.flex{display:flex}.relative{position:relative}.d-block{display:block}.center{align-items:center;justify-content:center}.footer{position:relative;width:100%;margin-top:5vh}.w-100{width:100%}.h-100{height:100%}.px-1{padding-left:1em;padding-right:1em}.px-2{padding-left:2em;padding-right:2em}.px-3{padding-left:3em;padding-right:3em}.px-4{padding-left:4em;padding-right:4em}.py-1{padding-top:1em;padding-bottom:1em}.py-2{padding-top:2em;padding-bottom:2em}.py-3{padding-top:3em;padding-bottom:3em}.py-4{padding-top:4em;padding-bottom:4em}.mx-1{margin-left:1em;margin-right:1em}.mx-2{margin-left:2em;margin-right:2em}.mx-3{margin-left:3em;margin-right:3em}.mx-4{margin-left:4em;margin-right:4em}.my-1{margin-top:1em;margin-bottom:1em}.my-2{margin-top:2em;margin-bottom:2em}.my-3{margin-top:3em;margin-bottom:3em}.my-4{margin-top:4em;margin-bottom:4em}.ml-1{margin-left:1em}.ml-2{margin-left:2em}.ml-3{margin-left:3em}.ml-4{margin-left:4em}.mb-05{margin-bottom:0.5em}.mb-1{margin-bottom:1em}.mb-2{margin-bottom:2em}.mb-3{margin-bottom:3em}.mb-4{margin-bottom:4em}.mt-05{margin-top:0.5em}.mt-1{margin-top:1em}.mt-2{margin-top:2em}.mt-3{margin-top:3em}.mt-4{margin-top:4em}h1{color:#252c82;font-size:1.5em;margin:0}h2{font-weight:500;font-size:1.2em;margin:0;color:#525252}h3{font-size:1.4em;margin:0}.main-text{font-weight:400;color:#525252}.link-text{text-decoration:underline;color:#252c82d9}.rounded{border-radius:8px}.cit-selector{width:50%}.img-text{display:flex;align-items:center}.img-text .bg-img{width:4em;height:5em;display:flex;align-items:center;justify-content:center;flex:none;margin-right:1em}.button{position:relative}.img-loader{position:absolute;left:-2px;top:-2px;background:#ffffffc7;border:2px solid #252c82;box-shadow:3px 3px 6px #00000029}.img-loader.rounded{border-radius:11px}.img-loader-button{width:100%;height:100%}.img-loader-button.rounded{border-radius:50px}.loading-image-button{width:100%;height:100%;border-radius:25px}.main-button{background:#7bb40e;border-radius:50px;text-align:center;width:100%;padding:0.9em;color:#fff;border:0;font-size:1.1em;font-weight:600}.main-button:disabled{color:#fff;background:#bdbdbd}.color-red{color:#ff5353}.color-blue{color:#252c82}.loud-text{font-size:1.2em}.loud-text p{margin:0.6em 0}.modal{position:fixed;left:0;top:0;width:100%;height:100%;z-index:999;background:#8b8b8be0;visibility:visible;opacity:1;transition:visibility 0s, opacity 0.2s linear}.inner{background:white;box-shadow:3px 3px 6px #00000029;border-radius:10px;padding:2em;position:relative}.close-modal{position:absolute;top:1em;right:1em}.document-view{height:100%}.scroll{height:100%;overflow-x:hidden;overflow-y:auto;scroll-behavior:smooth;position:relative}.scroll:before{content:'';display:block;width:100%;height:15px;position:sticky;top:0;left:0;background:linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.scroll:after{content:'';display:block;width:100%;height:15px;position:sticky;bottom:0;left:0;background:linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%)}.main-input{width:calc(100% - 3.2em - 2px);padding:0.8em 1.6em;border:2px solid #464e58;font-size:1.2em;border-radius:10px}.checklist ul{margin:0;padding-left:20px;text-align:left;list-style-image:url('assets/checkmark.svg')}.checklist li{margin-bottom:1em}.checklist li:last-child{margin-bottom:0}.row-validare h1{font-size:28px;line-height:32px}body{margin:0;padding:0;height:100vh;position:relative;height:100vh;}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text .bg-img img{width:100%;padding:2vh}.cit-selector-desktop{width:200px;height:140px}.img-selector{width:100%}.img-text .cit-selector,.img-text .cit-selector-desktop{border-radius:5%}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.show-bottom{bottom:-2vh}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:40vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.mt-5{margin-top:5vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{text-align:center}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-size-25{font-size:2.5vh}.font-size-1{font-size:1vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.ml-5{margin-left:5vh}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.scroll-disabled{height:100%;overflow-x:hidden;pointer-events:none;user-select:none}.scroll-to-top-btn{position:fixed;z-index:200;bottom:20px;left:20px;width:6vh;height:6vh;border-radius:50%;background-color:#1feaa6;color:white;display:flex;align-items:center;justify-content:center;font-size:5vh;cursor:pointer;box-shadow:0 2px 5px rgba(0, 0, 0, 0.3);transition:background-color 0.3s}.scroll-to-top-btn:hover{background-color:#17d296}.scroll-full{margin:4px, 4px;padding:4px;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}video::-webkit-media-controls{display:none !important}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}.pulsate{animation:textPulse 2s ease 0s infinite normal forwards}@keyframes textPulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}.ml-5{margin-left:20vw}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}.ml-5{margin-left:15vw}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}.ml-5{margin-left:10vw}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}.ml-5{margin-left:2.5vw}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1);height:calc(100% - 80px)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}.img-selector{width:10vw}}.loader-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;color:white;font-size:1.5rem;z-index:1000;border-radius:10px}.loader-spinner{border:8px solid #71727a;border-top:8px solid #1feaa6;border-radius:50%;width:60px;height:60px;animation:spin 2s linear infinite;margin-bottom:20px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const U9=class{async onTokenChange(t,e){if(o.debug)console.log("Token change called with value: "+t);if(t==""){t=o.token;return}if(o.token!==t){o.token=t}}agreementAcceptanceEmitted(t){try{i.instance.GenerateAgreement(t.detail.agreementType)}catch(t){this.apiErrorEmitter(t,"Agreement Acceptance")}}async apiErrorEmitter(t,e){var n,s,r,u,l,f;if(t.detail){this.errorTitle=(s=(n=t.detail.message)!==null&&n!==void 0?n:t.detail.status)!==null&&s!==void 0?s:"";this.errorMessage=(u=(r=t.detail.stack)!==null&&r!==void 0?r:t.detail.statusText)!==null&&u!==void 0?u:""}else if(t.message){this.errorTitle=t.message}else if(t.status){this.errorTitle=(l=t.status)!==null&&l!==void 0?l:"";this.errorMessage=(f=t.statusText)!==null&&f!==void 0?f:""}else{this.errorTitle=t}let h={message:this.errorTitle,stack:this.errorMessage,zone:e};try{await i.instance.AddLog(h,await E(this.order_id,this.redirect_id,this.token))}catch(t){}await c.ectdata.delete(o.requestId);p.flowError(this.errorTitle);o.flowStatus=a.ERROREND}constructor(e){t(this,e);this.logInit={};this.initialised=false}async componentWillLoad(){var t,e,n;o.analytics=(t=this.analytics)!==null&&t!==void 0?t:true;this.appInsights=C.getInstance();this.appInsights.trackEvent("IdentificationComponent | init",{requestId:o.requestId});p.init(window);p.flowEvent(r.ComponentLoaded,u.Initialized);o.apiBaseUrl=this.api_url;if(this.env&&this.env!=""){o.environment=this.env}if(o.environment!="PROD"){o.debug=true}i.getInstance();if(o.debug)this.logInit=await E(this.order_id,this.redirect_id,this.token);if(this.token){if(o.debug)console.log("Store Token set with property value: "+this.token);o.token=this.token}if(this.redirect_id){o.redirectId=this.redirect_id}if(this.lang_iso&&this.lang_iso!=""){o.langIso=this.lang_iso}o.showCitizenshipSelector=(e=this.show_citizenship_selector)!==null&&e!==void 0?e:false;o.scrollMode=(n=this.scroll_mode)!==null&&n!==void 0?n:false}async componentDidLoad(){var t,e,n,s,r,a;if(this.order_id&&this.order_id!=""){this.ectData=await c.getOrCreateEctData(this.order_id);o.requestId=this.order_id;o.initialized=this.ectData.initialized;o.modelsPath=this.ectData.modelsPath;if(o.debug)console.log("Current RequestId has value: "+this.order_id)}else if(!this.redirect_id||this.redirect_id==""){var u=await c.getLastEctData(false);if(u){this.ectData=u;o.requestId=this.ectData.orderId;o.initialized=this.ectData.initialized}}if(((t=this.ectData)===null||t===void 0?void 0:t.modelsPath)&&((e=this.ectData)===null||e===void 0?void 0:e.modelsPath)!=""){o.modelsPath=this.ectData.modelsPath}if(this.phone_number&&this.phone_number!=""){o.phoneNumber=this.phone_number;this.ectData.phoneNumber=this.phone_number;await c.ectdata.put(this.ectData)}else if(((n=this.ectData)===null||n===void 0?void 0:n.phoneNumber)&&((s=this.ectData)===null||s===void 0?void 0:s.phoneNumber)!=""){o.phoneNumber=this.ectData.phoneNumber}if(this.citizenship&&this.citizenship!=""){o.citizenship=this.citizenship;this.ectData.citizenship=this.citizenship;await c.ectdata.put(this.ectData)}else if(((r=this.ectData)===null||r===void 0?void 0:r.citizenship)&&((a=this.ectData)===null||a===void 0?void 0:a.citizenship)!=""){o.citizenship=this.ectData.citizenship}await this.initializeRequest();try{if(this.ectData.initialized){o.flowStatus=await i.instance.GetFlowState()}}catch(t){}}async initializeRequest(){if(this.initialised){return}this.initialised=true;if(!o.device){o.device=await(new W9).getDevice()}if(o.device.browser==x.Mi){this.apiErrorEmitter("Mi Browser nu este acceptat. Va rugam utilizati Chrome.","Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId);return}try{if(o.debug)await i.instance.AddLog({phase:"debug mode"},this.logInit)}catch(t){}try{if(!o.device.isMobile&&o.redirectId==""&&o.environment=="DEMO"){o.redirectId=M();this.redirect_id=o.redirectId}if(o.token!=""&&(o.requestId!=""||o.redirectId!="")&&!o.initialized){await i.instance.AddIdentificationRequest(o.device,B9.version);await this.treatMobileRedirect();this.ectData.initialized=true;this.ectData.flowStatus=o.flowStatus;this.ectData.modelsPath=o.modelsPath;await c.ectdata.put(this.ectData)}}catch(t){this.apiErrorEmitter(t,"Request Initialisation RequestId:"+o.requestId+" RedirectId:"+o.redirectId)}}async treatMobileRedirect(){if(this.order_id&&this.order_id!=""){return}this.order_id=o.requestId;this.ectData=await c.ectdata.get(o.requestId);if(!this.ectData){await c.ectdata.add({orderId:o.requestId,redirectId:o.redirectId,timestamp:new Date,initialized:true,phoneNumber:o.phoneNumber,refreshStarted:false,flowStatus:o.flowStatus,modelsPath:o.modelsPath,citizenship:o.citizenship,finished:false});this.ectData=await c.ectdata.get(o.requestId)}}disconnectedCallback(){p.flowEvent(r.ComponentLoaded,u.Finalized)}render(){let t=n("div",{key:"51e7fa15dcf75e7134a37a45a05a2deec6cbc0fb",class:"loader-overlay"},n("div",{key:"699747e8a561e1a43a28af8ddc852fde31595f6a",class:"loader-spinner"}));if(o.flowStatus==a.CITIZENSHIP){t=n("citizenship-selection",{key:"face211708102626ab18f2c826d75be0ec2c97a9"})}else if(o.flowStatus==a.LANDING){t=n("landing-validation",{key:"6a7d3bfe38c6027c59301f07f8cdcd58212fad8a"})}else if(o.flowStatus==a.MOBILE){t=n("mobile-redirect",{key:"c29e05e049f22827a38cec9d97549d992ccda433"})}else if(o.flowStatus==a.AGREEMENT){t=n("agreement-info",{key:"90537da896d9df0a489fe30d675c46fe286e2de8"})}else if(o.flowStatus==a.PHONE){t=n("sms-send",{key:"ac14a4bdf28f403db2e38d9ab1f0ebe3588662d8"})}else if(o.flowStatus==a.CODE){t=n("sms-code-validation",{key:"9a123b8a5456bd5f881981a9c89c5d35f15e9415"})}else if(o.flowStatus==a.CODEERROR){t=n("sms-code-validation",{key:"612f155d95c811b233de1571cfa26bb745563c4d"})}else if(o.flowStatus==a.IDTYPE){t=n("id-selection",{key:"4bae4a47873b5f013cda82b3b9851bd062ad22b3"})}else if(o.flowStatus==a.IDFRONTHOWTO){if(o.debug)console.log("identification-component | render | IDFRONTHOWTO");t=n("how-to-info",{key:"dbdb8b61efe5049bf3eb98d3d2d1c473fb9c6f2c"})}else if(o.flowStatus==a.IDFRONT){if(o.debug)console.log("identification-component | render | IDFRONT");t=n("process-id",{key:"9a334c1ee9f6e4ee6bc4f5c7dcd583cfafaecd6b",id:"processIdFront",mode:"front"})}else if(o.flowStatus==a.IDBACKHOWTO){if(o.debug)console.log("identification-component | render | IDBACKHOWTO");t=n("how-to-info",{key:"6749512e25a392f66ad794690a732233936a87d7"})}else if(o.flowStatus==a.IDBACK){if(o.debug)console.log("identification-component | render | IDBACK");t=n("process-id",{key:"45bb5e28d61af6415f2f2773c771b5a3f5b76c39",id:"processIdBack",mode:"back"})}else if(o.flowStatus==a.IDTILTHOWTO){if(o.debug)console.log("identification-component | render | IDTILTHOWTO");t=n("how-to-info",{key:"1490d3a64dbe06a49a5807578306332dbdeeded3"})}else if(o.flowStatus==a.IDTILT){if(o.debug)console.log("identification-component | render | TILT");t=n("process-id",{key:"b543a1e52ec210cba06d83af0afc93784e00afee",id:"processIdTilt",mode:"tilt"})}else if(o.flowStatus==a.LIVENESSHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSHOWTO");t=n("how-to-info",{key:"ddd51cbe5b494e03c6ba826bbbc97fbcd698e748"})}else if(o.flowStatus==a.LIVENESS){if(o.debug)console.log("identification-component | render | LIVENESS");t=n("user-liveness",{key:"a38d1ea473137ec4f5c6fba1f9af35d30a597f64",id:"userLiveness",mode:"selfie"})}else if(o.flowStatus==a.LIVENESSGESTUREHOWTO){if(o.debug)console.log("identification-component | render | LIVENESSGESTUREHOWTO");t=n("state-transition",{key:"1d3a0cd3923cce12cb311698170763caea602f5b"})}else if(o.flowStatus==a.LIVENESSGESTURE){if(o.debug)console.log("identification-component | render | LIVENESSGESTURE");t=n("user-liveness",{key:"f1f981d9b46c249c284869ea961f30494851a05e",id:"userLivenessGesture",mode:"selfieGesture"})}else if(o.flowStatus==a.COMPLETE){if(o.debug)console.log("identification-component | render | COMPLETE");t=n("end-redirect",{key:"8ed924b6601d2ce11123dd17d561526f3da1f4d4"})}else if(o.flowStatus==a.ERROREND){t=n("error-end",{key:"93b8d03f0404a2dd247b73ca3d15155aa04384cf",errorTitle:this.errorTitle,message:this.errorMessage})}else if(o.flowStatus==a.CAMERAERROR){t=n("camera-error",{key:"316ad8684029ef013f7bfbcf89973a1c6bf4b160"})}else if(o.flowStatus==a.RANDOM){if(o.debug)console.log("identification-component | render | RANDOM");t=n("random-action",{key:"c49e74a61ae61e0e91ed132c50b24f827e8469d1"})}return n("div",{key:"81ca47c424ca58a23b79efd6d175a43d1a79f02b",class:"full"},t)}static get watchers(){return{token:["onTokenChange"]}}};U9.style=G9;const V9="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0Mi4xMDkiIGhlaWdodD0iNTIuNzg4IiB2aWV3Qm94PSIwIDAgNDIuMTA5IDUyLjc4OCI+DQogIDxnIGlkPSJtb2JpbGVfcGhvbmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yNSAtMzQyKSI+DQogICAgPHBhdGggaWQ9IlBhdGhfNDc0NiIgZGF0YS1uYW1lPSJQYXRoIDQ3NDYiIGQ9Ik0yOS45MSw1NWEuOTEuOTEsMCwxLDAsMCwxLjgyaDMuNjQxYS45MS45MSwwLDEsMCwwLTEuODJaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4Ljc0MiAzMzQuMzI3KSIvPg0KICAgIDxwYXRoIGlkPSJQYXRoXzQ3NDgiIGRhdGEtbmFtZT0iUGF0aCA0NzQ4IiBkPSJNMzYuNTEyLDguOTFBLjg2Ljg2LDAsMCwwLDM1LjYsOEgyNy40MWEuODYuODYsMCwwLDAtLjkxLjkxLjg2Ljg2LDAsMCwwLC45MS45MUgzNS42QS44Ni44NiwwLDAsMCwzNi41MTIsOC45MVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDguOTY3IDMzOC41NTEpIiBmaWxsPSIjMjUyYzgyIi8+DQogICAgPGcgaWQ9Ikdyb3VwXzQ2MDciIGRhdGEtbmFtZT0iR3JvdXAgNDYwNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMzQyKSI+DQogICAgICA8cGF0aCBpZD0iUGF0aF80NzQ3IiBkYXRhLW5hbWU9IlBhdGggNDc0NyIgZD0iTTQ0LjEyNSw4LjM3YS45MS45MSwwLDEsMCwxLjgyLDBBNS40MzksNS40MzksMCwwLDAsNDAuNTc1LDNIMjAuMzdBNS40MzksNS40MzksMCwwLDAsMTUsOC4zN1Y1MC40MThhNS4zOCw1LjM4LDAsMCwwLDUuMzcsNS4zN0g0MC41NzVhNS4zOCw1LjM4LDAsMCwwLDUuMzctNS4zN1YzNy41ODVhLjkxLjkxLDAsMSwwLTEuODIsMFY1MC40MThhMy41NTQsMy41NTQsMCwwLDEtMy41NSwzLjU1SDIwLjM3YTMuNTU0LDMuNTU0LDAsMCwxLTMuNTUtMy41NVY4LjM3YTMuNjE0LDMuNjE0LDAsMCwxLDMuNTUtMy41NUg0MC41NzVhMy42MTQsMy42MTQsMCwwLDEsMy41NSwzLjU1WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE1IC0zKSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgPGcgaWQ9Ikdyb3VwXzQ2MDYiIGRhdGEtbmFtZT0iR3JvdXAgNDYwNiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTguMjAzIDguMTkxKSI+DQogICAgICAgIDxwYXRoIGlkPSJQYXRoXzQ3NTgiIGRhdGEtbmFtZT0iUGF0aCA0NzU4IiBkPSJNOTQuOTUzLDc1YTExLjk1MywxMS45NTMsMCwxLDAsMTEuOTUzLDExLjk1M0ExMS45NjcsMTEuOTY3LDAsMCwwLDk0Ljk1Myw3NVptMCwyMi40NTdhMTAuNSwxMC41LDAsMSwxLDEwLjUtMTAuNUExMC41MTYsMTAuNTE2LDAsMCwxLDk0Ljk1Myw5Ny40NTdaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtODMgLTc1KSIgZmlsbD0iIzI1MmM4MiIvPg0KICAgICAgICA8cGF0aCBpZD0iUGF0aF80NzU5IiBkYXRhLW5hbWU9IlBhdGggNDc1OSIgZD0iTTExMC43NTIsOTguNzEybC03LjI3NSw3LjI3NS00Ljc0LTQuNzM5YS43MjQuNzI0LDAsMCwwLTEuMDI0LDEuMDI0bDUuMjUyLDUuMjUyYS43MjQuNzI0LDAsMCwwLDEuMDI0LDBsNy43ODctNy43ODdhLjcyNC43MjQsMCwwLDAtMS4wMjQtMS4wMjRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOTIuMjQ4IC04OS45ODgpIiBmaWxsPSIjN2JiNDBlIi8+DQogICAgICA8L2c+DQogICAgPC9nPg0KICA8L2c+DQo8L3N2Zz4NCg==";const Y9="";const H9=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError")}async componentWillLoad(){p.flowStarted();this.translations=await b.getValues();this.buttonDisabled=false;this.ectData=await c.ectdata.get(o.requestId);await this.initRequest()}async componentDidLoad(){await d.initialize(r.Landing)}async initRequest(){if(o.apiBaseUrl.includes("apimd")){this.warningText=this.translations.LandingValues.WarningMd}else{this.warningText=this.translations.LandingValues.Warning}}async startFlow(){if(!this.buttonDisabled){this.buttonDisabled=true;var t=await m.InitCameras(o.device);if(!t&&o.device.mobileOS==w.iOS){this.ectData.refreshStarted=false;await c.ectdata.put(this.ectData)}try{o.flowStatus=await i.instance.LandingValidationStartFlow(t)}catch(t){this.apiErrorEvent.emit(t)}}}async disconnectedCallback(){await d.finalize(r.Landing)}async leaveFlow(){if(this.buttonDisabled)return;try{let t=await i.instance.AbortRequest();o.flowStatus=a[t.state];await c.ectdata.delete(o.requestId);p.flowAborted()}catch(t){p.flowAborted();this.apiErrorEvent.emit(t)}}render(){return n("div",{key:"47d5d34b5aa97bbf61cc376152c5bd633d8e3b9b",class:"container flex center"},n("div",{key:"4ba7b8526fe2a5527cf900bd15ec79472fd5ff6f",class:"px-4"},n("h1",{key:"579a05999b0c79b0f1d2f743352e34146d56702e",class:"text-center px-1 mb-1"},this.translations.LandingValues.Title),n("div",{key:"5063ff311608d3ab65b20f8e178f9b40b76b4f4f",class:"info-container mb-2"},n("div",{key:"ac1a39cea3fe8f44a171b82a7d95f0466f8faf46",class:"img-text"},n("div",{key:"74d8f4029a07554f19a29646213c3ba96dbd89b7",class:"bg-img"},n("img",{key:"a7f398111232f6b380235de78f546182e5abf033",src:F9})),n("h2",{key:"daf5821cc348ec5a46338ab756b383ea3031a274"},this.translations.LandingValues.IdInfo)),n("div",{key:"5c9e02363b8ab54b4cf19eecfe421dfe073f2447",class:"img-text"},n("div",{key:"58a46398d3ea125d77fb40e44a0850cb919b30e6",class:"bg-img"},n("img",{key:"6426228b6f99bdec68d6ef84c6b3dd4f0a7bfed0",src:V9})),n("h2",{key:"969ac755a5b2dba98d753579d305d7b47eb7f3ba"},this.translations.LandingValues.DeviceInfo))),n("div",{key:"956ae2afe073c37e6d0fc332e7736a1a3a90f74c",class:"button flex mb-1"},this.buttonDisabled?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"a02941f92c55df8a1ecc051f5557bb17dfbbc952",class:"main-button",type:"button",disabled:this.buttonDisabled,onClick:()=>this.startFlow()},this.translations.LandingValues.Button)),n("div",{key:"bcd143e73c5c5ef8a7bfc3b41b6473815c7276d6",class:"text-center"},n("p",{key:"7e7a8345196174fe87e9de49f1f945e5f60316cd",class:"main-text link-text",onClick:()=>this.leaveFlow()},this.translations.LandingValues.ButtonLeave)),n("div",{key:"da95242ffdae0c74dfc7504c66b4eb29cb54b8c6",class:"footer text-center"},n("img",{key:"4ddb18e563442e9faf9bfda4dbca302c3cf2ec08",src:y}))))}};H9.style=Y9;var Z9={};var Q9;var X9;function q9(){if(X9)return Q9;X9=1;Q9=function(){return typeof Promise==="function"&&Promise.prototype&&Promise.prototype.then};return Q9}var J9={};var K9={};var t7;function e7(){if(t7)return K9;t7=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];K9.getSymbolSize=function t(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};K9.getSymbolTotalCodewords=function t(n){return e[n]};K9.getBCHDigit=function(t){let e=0;while(t!==0){e++;t>>>=1}return e};K9.setToSJISFunction=function e(n){if(typeof n!=="function"){throw new Error('"toSJISFunc" is not a valid function.')}t=n};K9.isKanjiModeEnabled=function(){return typeof t!=="undefined"};K9.toSJIS=function e(n){return t(n)};return K9}var n7={};var s7;function r7(){if(s7)return n7;s7=1;(function(t){t.L={bit:1};t.M={bit:0};t.Q={bit:3};t.H={bit:2};function e(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}t.isValid=function t(e){return e&&typeof e.bit!=="undefined"&&e.bit>=0&&e.bit<4};t.from=function n(s,r){if(t.isValid(s)){return s}try{return e(s)}catch(t){return r}}})(n7);return n7}var i7;var o7;function a7(){if(o7)return i7;o7=1;function t(){this.buffer=[];this.length=0}t.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++){this.putBit((t>>>e-n-1&1)===1)}},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);if(this.buffer.length<=e){this.buffer.push(0)}if(t){this.buffer[e]|=128>>>this.length%8}this.length++}};i7=t;return i7}var c7;var u7;function l7(){if(u7)return c7;u7=1;function t(t){if(!t||t<1){throw new Error("BitMatrix size must be defined and greater than 0")}this.size=t;this.data=new Uint8Array(t*t);this.reservedBit=new Uint8Array(t*t)}t.prototype.set=function(t,e,n,s){const r=t*this.size+e;this.data[r]=n;if(s)this.reservedBit[r]=true};t.prototype.get=function(t,e){return this.data[t*this.size+e]};t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};c7=t;return c7}var f7={};var h7;function d7(){if(h7)return f7;h7=1;(function(t){const e=e7().getSymbolSize;t.getRowColCoords=function t(n){if(n===1)return[];const s=Math.floor(n/7)+2;const r=e(n);const i=r===145?26:Math.ceil((r-13)/(2*s-2))*2;const o=[r-7];for(let t=1;t<s-1;t++){o[t]=o[t-1]-i}o.push(6);return o.reverse()};t.getPositions=function e(n){const s=[];const r=t.getRowColCoords(n);const i=r.length;for(let t=0;t<i;t++){for(let e=0;e<i;e++){if(t===0&&e===0||t===0&&e===i-1||t===i-1&&e===0){continue}s.push([r[t],r[e]])}}return s}})(f7);return f7}var p7={};var m7;function b7(){if(m7)return p7;m7=1;const t=e7().getSymbolSize;const e=7;p7.getPositions=function n(s){const r=t(s);return[[0,0],[r-e,0],[0,r-e]]};return p7}var y7={};var w7;function g7(){if(w7)return y7;w7=1;(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function t(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};t.from=function e(n){return t.isValid(n)?parseInt(n,10):undefined};t.getPenaltyN1=function t(n){const s=n.size;let r=0;let i=0;let o=0;let a=null;let c=null;for(let t=0;t<s;t++){i=o=0;a=c=null;for(let u=0;u<s;u++){let s=n.get(t,u);if(s===a){i++}else{if(i>=5)r+=e.N1+(i-5);a=s;i=1}s=n.get(u,t);if(s===c){o++}else{if(o>=5)r+=e.N1+(o-5);c=s;o=1}}if(i>=5)r+=e.N1+(i-5);if(o>=5)r+=e.N1+(o-5)}return r};t.getPenaltyN2=function t(n){const s=n.size;let r=0;for(let t=0;t<s-1;t++){for(let e=0;e<s-1;e++){const s=n.get(t,e)+n.get(t,e+1)+n.get(t+1,e)+n.get(t+1,e+1);if(s===4||s===0)r++}}return r*e.N2};t.getPenaltyN3=function t(n){const s=n.size;let r=0;let i=0;let o=0;for(let t=0;t<s;t++){i=o=0;for(let e=0;e<s;e++){i=i<<1&2047|n.get(t,e);if(e>=10&&(i===1488||i===93))r++;o=o<<1&2047|n.get(e,t);if(e>=10&&(o===1488||o===93))r++}}return r*e.N3};t.getPenaltyN4=function t(n){let s=0;const r=n.data.length;for(let t=0;t<r;t++)s+=n.data[t];const i=Math.abs(Math.ceil(s*100/r/5)-10);return i*e.N4};function n(e,n,s){switch(e){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.applyMask=function t(e,s){const r=s.size;for(let t=0;t<r;t++){for(let i=0;i<r;i++){if(s.isReserved(i,t))continue;s.xor(i,t,n(e,i,t))}}};t.getBestMask=function e(n,s){const r=Object.keys(t.Patterns).length;let i=0;let o=Infinity;for(let e=0;e<r;e++){s(e);t.applyMask(e,n);const r=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(e,n);if(r<o){o=r;i=e}}return i}})(y7);return y7}var v7={};var x7;function N7(){if(x7)return v7;x7=1;const t=r7();const e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81];const n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];v7.getBlocksCount=function n(s,r){switch(r){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return undefined}};v7.getTotalCodewordsCount=function e(s,r){switch(r){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return undefined}};return v7}var k7={};var C7={};var $7;function S7(){if($7)return C7;$7=1;const t=new Uint8Array(512);const e=new Uint8Array(256);(function n(){let s=1;for(let n=0;n<255;n++){t[n]=s;e[s]=n;s<<=1;if(s&256){s^=285}}for(let e=255;e<512;e++){t[e]=t[e-255]}})();C7.log=function t(n){if(n<1)throw new Error("log("+n+")");return e[n]};C7.exp=function e(n){return t[n]};C7.mul=function n(s,r){if(s===0||r===0)return 0;return t[e[s]+e[r]]};return C7}var I7;function E7(){if(I7)return k7;I7=1;(function(t){const e=S7();t.mul=function t(n,s){const r=new Uint8Array(n.length+s.length-1);for(let t=0;t<n.length;t++){for(let i=0;i<s.length;i++){r[t+i]^=e.mul(n[t],s[i])}}return r};t.mod=function t(n,s){let r=new Uint8Array(n);while(r.length-s.length>=0){const t=r[0];for(let n=0;n<s.length;n++){r[n]^=e.mul(s[n],t)}let n=0;while(n<r.length&&r[n]===0)n++;r=r.slice(n)}return r};t.generateECPolynomial=function n(s){let r=new Uint8Array([1]);for(let n=0;n<s;n++){r=t.mul(r,new Uint8Array([1,e.exp(n)]))}return r}})(k7);return k7}var M7;var T7;function A7(){if(T7)return M7;T7=1;const t=E7();function e(t){this.genPoly=undefined;this.degree=t;if(this.degree)this.initialize(this.degree)}e.prototype.initialize=function e(n){this.degree=n;this.genPoly=t.generateECPolynomial(this.degree)};e.prototype.encode=function e(n){if(!this.genPoly){throw new Error("Encoder not initialized")}const s=new Uint8Array(n.length+this.degree);s.set(n);const r=t.mod(s,this.genPoly);const i=this.degree-r.length;if(i>0){const t=new Uint8Array(this.degree);t.set(r,i);return t}return r};M7=e;return M7}var D7={};var R7={};var O7={};var L7;function _7(){if(L7)return O7;L7=1;O7.isValid=function t(e){return!isNaN(e)&&e>=1&&e<=40};return O7}var F7={};var z7;function j7(){if(z7)return F7;z7=1;const t="[0-9]+";const e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|"+"[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|"+"[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|"+"[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const s="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";F7.KANJI=new RegExp(n,"g");F7.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");F7.BYTE=new RegExp(s,"g");F7.NUMERIC=new RegExp(t,"g");F7.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$");const i=new RegExp("^"+t+"$");const o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");F7.testKanji=function t(e){return r.test(e)};F7.testNumeric=function t(e){return i.test(e)};F7.testAlphanumeric=function t(e){return o.test(e)};return F7}var P7;function B7(){if(P7)return R7;P7=1;(function(t){const e=_7();const n=j7();t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};t.MIXED={bit:-1};t.getCharCountIndicator=function t(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!e.isValid(s)){throw new Error("Invalid version: "+s)}if(s>=1&&s<10)return n.ccBits[0];else if(s<27)return n.ccBits[1];return n.ccBits[2]};t.getBestModeForData=function e(s){if(n.testNumeric(s))return t.NUMERIC;else if(n.testAlphanumeric(s))return t.ALPHANUMERIC;else if(n.testKanji(s))return t.KANJI;else return t.BYTE};t.toString=function t(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};t.isValid=function t(e){return e&&e.bit&&e.ccBits};function s(e){if(typeof e!=="string"){throw new Error("Param is not a string")}const n=e.toLowerCase();switch(n){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}t.from=function e(n,r){if(t.isValid(n)){return n}try{return s(n)}catch(t){return r}}})(R7);return R7}var W7;function G7(){if(W7)return D7;W7=1;(function(t){const e=e7();const n=N7();const s=r7();const r=B7();const i=_7();const o=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0;const a=e.getBCHDigit(o);function c(e,n,s){for(let r=1;r<=40;r++){if(n<=t.getCapacity(r,s,e)){return r}}return undefined}function u(t,e){return r.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;t.forEach((function(t){const s=u(t.mode,e);n+=s+t.getBitsLength()}));return n}function f(e,n){for(let s=1;s<=40;s++){const i=l(e,s);if(i<=t.getCapacity(s,n,r.MIXED)){return s}}return undefined}t.from=function t(e,n){if(i.isValid(e)){return parseInt(e,10)}return n};t.getCapacity=function t(s,o,a){if(!i.isValid(s)){throw new Error("Invalid QR Code version")}if(typeof a==="undefined")a=r.BYTE;const c=e.getSymbolTotalCodewords(s);const l=n.getTotalCodewordsCount(s,o);const f=(c-l)*8;if(a===r.MIXED)return f;const h=f-u(a,s);switch(a){case r.NUMERIC:return Math.floor(h/10*3);case r.ALPHANUMERIC:return Math.floor(h/11*2);case r.KANJI:return Math.floor(h/13);case r.BYTE:default:return Math.floor(h/8)}};t.getBestVersionForData=function t(e,n){let r;const i=s.from(n,s.M);if(Array.isArray(e)){if(e.length>1){return f(e,i)}if(e.length===0){return 1}r=e[0]}else{r=e}return c(r.mode,r.getLength(),i)};t.getEncodedBits=function t(n){if(!i.isValid(n)||n<7){throw new Error("Invalid QR Code version")}let s=n<<12;while(e.getBCHDigit(s)-a>=0){s^=o<<e.getBCHDigit(s)-a}return n<<12|s}})(D7);return D7}var U7={};var V7;function Y7(){if(V7)return U7;V7=1;const t=e7();const e=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0;const n=1<<14|1<<12|1<<10|1<<4|1<<1;const s=t.getBCHDigit(e);U7.getEncodedBits=function r(i,o){const a=i.bit<<3|o;let c=a<<10;while(t.getBCHDigit(c)-s>=0){c^=e<<t.getBCHDigit(c)-s}return(a<<10|c)^n};return U7}var H7={};var Z7;var Q7;function X7(){if(Q7)return Z7;Q7=1;const t=B7();function e(e){this.mode=t.NUMERIC;this.data=e.toString()}e.getBitsLength=function t(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function t(e){let n,s,r;for(n=0;n+3<=this.data.length;n+=3){s=this.data.substr(n,3);r=parseInt(s,10);e.put(r,10)}const i=this.data.length-n;if(i>0){s=this.data.substr(n);r=parseInt(s,10);e.put(r,i*3+1)}};Z7=e;return Z7}var q7;var J7;function K7(){if(J7)return q7;J7=1;const t=B7();const e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC;this.data=e}n.getBitsLength=function t(e){return 11*Math.floor(e/2)+6*(e%2)};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function t(n){let s;for(s=0;s+2<=this.data.length;s+=2){let t=e.indexOf(this.data[s])*45;t+=e.indexOf(this.data[s+1]);n.put(t,11)}if(this.data.length%2){n.put(e.indexOf(this.data[s]),6)}};q7=n;return q7}var ttt;var ett;function ntt(){if(ett)return ttt;ett=1;const t=B7();function e(e){this.mode=t.BYTE;if(typeof e==="string"){this.data=(new TextEncoder).encode(e)}else{this.data=new Uint8Array(e)}}e.getBitsLength=function t(e){return e*8};e.prototype.getLength=function t(){return this.data.length};e.prototype.getBitsLength=function t(){return e.getBitsLength(this.data.length)};e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++){t.put(this.data[e],8)}};ttt=e;return ttt}var stt;var rtt;function itt(){if(rtt)return stt;rtt=1;const t=B7();const e=e7();function n(e){this.mode=t.KANJI;this.data=e}n.getBitsLength=function t(e){return e*13};n.prototype.getLength=function t(){return this.data.length};n.prototype.getBitsLength=function t(){return n.getBitsLength(this.data.length)};n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let s=e.toSJIS(this.data[n]);if(s>=33088&&s<=40956){s-=33088}else if(s>=57408&&s<=60351){s-=49472}else{throw new Error("Invalid SJIS character: "+this.data[n]+"\n"+"Make sure your charset is UTF-8")}s=(s>>>8&255)*192+(s&255);t.put(s,13)}};stt=n;return stt}var ott={exports:{}};var att;function ctt(){if(att)return ott.exports;att=1;(function(t){var e={single_source_shortest_paths:function(t,n,s){var r={};var i={};i[n]=0;var o=e.PriorityQueue.make();o.push(n,0);var a,c,u,l,f,h,d,p,m;while(!o.empty()){a=o.pop();c=a.value;l=a.cost;f=t[c]||{};for(u in f){if(f.hasOwnProperty(u)){h=f[u];d=l+h;p=i[u];m=typeof i[u]==="undefined";if(m||p>d){i[u]=d;o.push(u,d);r[u]=c}}}}if(typeof s!=="undefined"&&typeof i[s]==="undefined"){var b=["Could not find a path from ",n," to ",s,"."].join("");throw new Error(b)}return r},extract_shortest_path_from_predecessor_list:function(t,e){var n=[];var s=e;while(s){n.push(s);s=t[s]}n.reverse();return n},find_path:function(t,n,s){var r=e.single_source_shortest_paths(t,n,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,s={},r;t=t||{};for(r in n){if(n.hasOwnProperty(r)){s[r]=n[r]}}s.queue=[];s.sorter=t.sorter||n.default_sorter;return s},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n);this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};{t.exports=e}})(ott);return ott.exports}var utt;function ltt(){if(utt)return H7;utt=1;(function(t){const e=B7();const n=X7();const s=K7();const r=ntt();const i=itt();const o=j7();const a=e7();const c=ctt();function u(t){return unescape(encodeURIComponent(t)).length}function l(t,e,n){const s=[];let r;while((r=t.exec(n))!==null){s.push({data:r[0],index:r.index,mode:e,length:r[0].length})}return s}function f(t){const n=l(o.NUMERIC,e.NUMERIC,t);const s=l(o.ALPHANUMERIC,e.ALPHANUMERIC,t);let r;let i;if(a.isKanjiModeEnabled()){r=l(o.BYTE,e.BYTE,t);i=l(o.KANJI,e.KANJI,t)}else{r=l(o.BYTE_KANJI,e.BYTE,t);i=[]}const c=n.concat(s,r,i);return c.sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,o){switch(o){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return s.getBitsLength(t);case e.KANJI:return i.getBitsLength(t);case e.BYTE:return r.getBitsLength(t)}}function d(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;if(n&&n.mode===e.mode){t[t.length-1].data+=e.data;return t}t.push(e);return t}),[])}function p(t){const n=[];for(let s=0;s<t.length;s++){const r=t[s];switch(r.mode){case e.NUMERIC:n.push([r,{data:r.data,mode:e.ALPHANUMERIC,length:r.length},{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.ALPHANUMERIC:n.push([r,{data:r.data,mode:e.BYTE,length:r.length}]);break;case e.KANJI:n.push([r,{data:r.data,mode:e.BYTE,length:u(r.data)}]);break;case e.BYTE:n.push([{data:r.data,mode:e.BYTE,length:u(r.data)}])}}return n}function m(t,n){const s={};const r={start:{}};let i=["start"];for(let o=0;o<t.length;o++){const a=t[o];const c=[];for(let t=0;t<a.length;t++){const u=a[t];const l=""+o+t;c.push(l);s[l]={node:u,lastCount:0};r[l]={};for(let t=0;t<i.length;t++){const o=i[t];if(s[o]&&s[o].node.mode===u.mode){r[o][l]=h(s[o].lastCount+u.length,u.mode)-h(s[o].lastCount,u.mode);s[o].lastCount+=u.length}else{if(s[o])s[o].lastCount=u.length;r[o][l]=h(u.length,u.mode)+4+e.getCharCountIndicator(u.mode,n)}}}i=c}for(let t=0;t<i.length;t++){r[i[t]].end=0}return{map:r,table:s}}function b(t,o){let c;const u=e.getBestModeForData(t);c=e.from(o,u);if(c!==e.BYTE&&c.bit<u.bit){throw new Error('"'+t+'"'+" cannot be encoded with mode "+e.toString(c)+".\n Suggested mode is: "+e.toString(u))}if(c===e.KANJI&&!a.isKanjiModeEnabled()){c=e.BYTE}switch(c){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new s(t);case e.KANJI:return new i(t);case e.BYTE:return new r(t)}}t.fromArray=function t(e){return e.reduce((function(t,e){if(typeof e==="string"){t.push(b(e,null))}else if(e.data){t.push(b(e.data,e.mode))}return t}),[])};t.fromString=function e(n,s){const r=f(n,a.isKanjiModeEnabled());const i=p(r);const o=m(i,s);const u=c.find_path(o.map,"start","end");const l=[];for(let t=1;t<u.length-1;t++){l.push(o.table[u[t]].node)}return t.fromArray(d(l))};t.rawSplit=function e(n){return t.fromArray(f(n,a.isKanjiModeEnabled()))}})(H7);return H7}var ftt;function htt(){if(ftt)return J9;ftt=1;const t=e7();const e=r7();const n=a7();const s=l7();const r=d7();const i=b7();const o=g7();const a=N7();const c=A7();const u=G7();const l=Y7();const f=B7();const h=ltt();function d(t,e){const n=t.size;const s=i.getPositions(e);for(let e=0;e<s.length;e++){const r=s[e][0];const i=s[e][1];for(let e=-1;e<=7;e++){if(r+e<=-1||n<=r+e)continue;for(let s=-1;s<=7;s++){if(i+s<=-1||n<=i+s)continue;if(e>=0&&e<=6&&(s===0||s===6)||s>=0&&s<=6&&(e===0||e===6)||e>=2&&e<=4&&s>=2&&s<=4){t.set(r+e,i+s,true,true)}else{t.set(r+e,i+s,false,true)}}}}}function p(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2===0;t.set(n,6,e,true);t.set(6,n,e,true)}}function m(t,e){const n=r.getPositions(e);for(let e=0;e<n.length;e++){const s=n[e][0];const r=n[e][1];for(let e=-2;e<=2;e++){for(let n=-2;n<=2;n++){if(e===-2||e===2||n===-2||n===2||e===0&&n===0){t.set(s+e,r+n,true,true)}else{t.set(s+e,r+n,false,true)}}}}}function b(t,e){const n=t.size;const s=u.getEncodedBits(e);let r,i,o;for(let e=0;e<18;e++){r=Math.floor(e/3);i=e%3+n-8-3;o=(s>>e&1)===1;t.set(r,i,o,true);t.set(i,r,o,true)}}function y(t,e,n){const s=t.size;const r=l.getEncodedBits(e,n);let i,o;for(i=0;i<15;i++){o=(r>>i&1)===1;if(i<6){t.set(i,8,o,true)}else if(i<8){t.set(i+1,8,o,true)}else{t.set(s-15+i,8,o,true)}if(i<8){t.set(8,s-i-1,o,true)}else if(i<9){t.set(8,15-i-1+1,o,true)}else{t.set(8,15-i-1,o,true)}}t.set(s-8,8,1,true)}function w(t,e){const n=t.size;let s=-1;let r=n-1;let i=7;let o=0;for(let a=n-1;a>0;a-=2){if(a===6)a--;while(true){for(let n=0;n<2;n++){if(!t.isReserved(r,a-n)){let s=false;if(o<e.length){s=(e[o]>>>i&1)===1}t.set(r,a-n,s);i--;if(i===-1){o++;i=7}}}r+=s;if(r<0||n<=r){r-=s;s=-s;break}}}}function g(e,s,r){const i=new n;r.forEach((function(t){i.put(t.mode.bit,4);i.put(t.getLength(),f.getCharCountIndicator(t.mode,e));t.write(i)}));const o=t.getSymbolTotalCodewords(e);const c=a.getTotalCodewordsCount(e,s);const u=(o-c)*8;if(i.getLengthInBits()+4<=u){i.put(0,4)}while(i.getLengthInBits()%8!==0){i.putBit(0)}const l=(u-i.getLengthInBits())/8;for(let t=0;t<l;t++){i.put(t%2?17:236,8)}return v(i,e,s)}function v(e,n,s){const r=t.getSymbolTotalCodewords(n);const i=a.getTotalCodewordsCount(n,s);const o=r-i;const u=a.getBlocksCount(n,s);const l=r%u;const f=u-l;const h=Math.floor(r/u);const d=Math.floor(o/u);const p=d+1;const m=h-d;const b=new c(m);let y=0;const w=new Array(u);const g=new Array(u);let v=0;const x=new Uint8Array(e.buffer);for(let t=0;t<u;t++){const e=t<f?d:p;w[t]=x.slice(y,y+e);g[t]=b.encode(w[t]);y+=e;v=Math.max(v,e)}const N=new Uint8Array(r);let k=0;let C,$;for(C=0;C<v;C++){for($=0;$<u;$++){if(C<w[$].length){N[k++]=w[$][C]}}}for(C=0;C<m;C++){for($=0;$<u;$++){N[k++]=g[$][C]}}return N}function x(e,n,r,i){let a;if(Array.isArray(e)){a=h.fromArray(e)}else if(typeof e==="string"){let t=n;if(!t){const n=h.rawSplit(e);t=u.getBestVersionForData(n,r)}a=h.fromString(e,t||40)}else{throw new Error("Invalid data")}const c=u.getBestVersionForData(a,r);if(!c){throw new Error("The amount of data is too big to be stored in a QR Code")}if(!n){n=c}else if(n<c){throw new Error("\n"+"The chosen QR Code version cannot contain this amount of data.\n"+"Minimum version required to store current data is: "+c+".\n")}const l=g(n,r,a);const f=t.getSymbolSize(n);const v=new s(f);d(v,n);p(v);m(v,n);y(v,r,0);if(n>=7){b(v,n)}w(v,l);if(isNaN(i)){i=o.getBestMask(v,y.bind(null,v,r))}o.applyMask(i,v);y(v,r,i);return{modules:v,version:n,errorCorrectionLevel:r,maskPattern:i,segments:a}}J9.create=function n(s,r){if(typeof s==="undefined"||s===""){throw new Error("No input text")}let i=e.M;let a;let c;if(typeof r!=="undefined"){i=e.from(r.errorCorrectionLevel,e.M);a=u.from(r.version);c=o.from(r.maskPattern);if(r.toSJISFunc){t.setToSJISFunction(r.toSJISFunc)}}return x(s,a,i,c)};return J9}var dtt={};var ptt={};var mtt={};var btt={};var ytt;var wtt;function gtt(){if(wtt)return ytt;wtt=1;ytt=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var n=Symbol("test");var s=Object(n);if(typeof n==="string"){return false}if(Object.prototype.toString.call(n)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(s)!=="[object Symbol]"){return false}var r=42;e[n]=r;for(var i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==n){return false}if(!Object.prototype.propertyIsEnumerable.call(e,n)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==r||a.enumerable!==true){return false}}return true};return ytt}var vtt;var xtt;function Ntt(){if(xtt)return vtt;xtt=1;var t=gtt();vtt=function e(){return t()&&!!Symbol.toStringTag};return vtt}var ktt;var Ctt;function $tt(){if(Ctt)return ktt;Ctt=1;ktt=Object;return ktt}var Stt;var Itt;function Ett(){if(Itt)return Stt;Itt=1;Stt=Error;return Stt}var Mtt;var Ttt;function Att(){if(Ttt)return Mtt;Ttt=1;Mtt=EvalError;return Mtt}var Dtt;var Rtt;function Ott(){if(Rtt)return Dtt;Rtt=1;Dtt=RangeError;return Dtt}var Ltt;var _tt;function Ftt(){if(_tt)return Ltt;_tt=1;Ltt=ReferenceError;return Ltt}var ztt;var jtt;function Ptt(){if(jtt)return ztt;jtt=1;ztt=SyntaxError;return ztt}var Btt;var Wtt;function Gtt(){if(Wtt)return Btt;Wtt=1;Btt=TypeError;return Btt}var Utt;var Vtt;function Ytt(){if(Vtt)return Utt;Vtt=1;Utt=URIError;return Utt}var Htt;var Ztt;function Qtt(){if(Ztt)return Htt;Ztt=1;Htt=Math.abs;return Htt}var Xtt;var qtt;function Jtt(){if(qtt)return Xtt;qtt=1;Xtt=Math.floor;return Xtt}var Ktt;var tet;function eet(){if(tet)return Ktt;tet=1;Ktt=Math.max;return Ktt}var net;var set;function ret(){if(set)return net;set=1;net=Math.min;return net}var iet;var oet;function aet(){if(oet)return iet;oet=1;iet=Math.pow;return iet}var cet;var uet;function fet(){if(uet)return cet;uet=1;cet=Math.round;return cet}var het;var det;function pet(){if(det)return het;det=1;het=Number.isNaN||function t(e){return e!==e};return het}var met;var bet;function yet(){if(bet)return met;bet=1;var t=pet();met=function e(n){if(t(n)||n===0){return n}return n<0?-1:1};return met}var wet;var get;function vet(){if(get)return wet;get=1;wet=Object.getOwnPropertyDescriptor;return wet}var xet;var Net;function ket(){if(Net)return xet;Net=1;var t=vet();if(t){try{t([],"length")}catch(e){t=null}}xet=t;return xet}var Cet;var $et;function Iet(){if($et)return Cet;$et=1;var t=Object.defineProperty||false;if(t){try{t({},"a",{value:1})}catch(e){t=false}}Cet=t;return Cet}var Eet;var Met;function Tet(){if(Met)return Eet;Met=1;var t=typeof Symbol!=="undefined"&&Symbol;var e=gtt();Eet=function n(){if(typeof t!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof t("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return e()};return Eet}var Aet;var Det;function Ret(){if(Det)return Aet;Det=1;Aet=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null;return Aet}var Oet;var Let;function _et(){if(Let)return Oet;Let=1;var t=$tt();Oet=t.getPrototypeOf||null;return Oet}var Fet;var zet;function jet(){if(zet)return Fet;zet=1;var t="Function.prototype.bind called on incompatible ";var e=Object.prototype.toString;var n=Math.max;var s="[object Function]";var r=function t(e,n){var s=[];for(var r=0;r<e.length;r+=1){s[r]=e[r]}for(var i=0;i<n.length;i+=1){s[i+e.length]=n[i]}return s};var i=function t(e,n){var s=[];for(var r=n,i=0;r<e.length;r+=1,i+=1){s[i]=e[r]}return s};var o=function(t,e){var n="";for(var s=0;s<t.length;s+=1){n+=t[s];if(s+1<t.length){n+=e}}return n};Fet=function a(c){var u=this;if(typeof u!=="function"||e.apply(u)!==s){throw new TypeError(t+u)}var l=i(arguments,1);var f;var h=function(){if(this instanceof f){var t=u.apply(this,r(l,arguments));if(Object(t)===t){return t}return this}return u.apply(c,r(l,arguments))};var d=n(0,u.length-l.length);var p=[];for(var m=0;m<d;m++){p[m]="$"+m}f=Function("binder","return function ("+o(p,",")+"){ return binder.apply(this,arguments); }")(h);if(u.prototype){var b=function t(){};b.prototype=u.prototype;f.prototype=new b;b.prototype=null}return f};return Fet}var Pet;var Bet;function Wet(){if(Bet)return Pet;Bet=1;var t=jet();Pet=Function.prototype.bind||t;return Pet}var Get;var Uet;function Vet(){if(Uet)return Get;Uet=1;Get=Function.prototype.call;return Get}var Yet;var Het;function Zet(){if(Het)return Yet;Het=1;Yet=Function.prototype.apply;return Yet}var Qet;var Xet;function qet(){if(Xet)return Qet;Xet=1;Qet=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply;return Qet}var Jet;var Ket;function tnt(){if(Ket)return Jet;Ket=1;var t=Wet();var e=Zet();var n=Vet();var s=qet();Jet=s||t.call(n,e);return Jet}var ent;var nnt;function snt(){if(nnt)return ent;nnt=1;var t=Wet();var e=Gtt();var n=Vet();var s=tnt();ent=function r(i){if(i.length<1||typeof i[0]!=="function"){throw new e("a function is required")}return s(t,n,i)};return ent}var rnt;var int;function ont(){if(int)return rnt;int=1;var t=snt();var e=ket();var n;try{n=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!=="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS"){throw t}}var s=!!n&&e&&e(Object.prototype,"__proto__");var r=Object;var i=r.getPrototypeOf;rnt=s&&typeof s.get==="function"?t([s.get]):typeof i==="function"?function t(e){return i(e==null?e:r(e))}:false;return rnt}var ant;var cnt;function unt(){if(cnt)return ant;cnt=1;var t=Ret();var e=_et();var n=ont();ant=t?function e(n){return t(n)}:e?function t(n){if(!n||typeof n!=="object"&&typeof n!=="function"){throw new TypeError("getProto: not an object")}return e(n)}:n?function t(e){return n(e)}:null;return ant}var lnt;var fnt;function hnt(){if(fnt)return lnt;fnt=1;var t=Function.prototype.call;var e=Object.prototype.hasOwnProperty;var n=Wet();lnt=n.call(t,e);return lnt}var dnt;var pnt;function mnt(){if(pnt)return dnt;pnt=1;var t;var e=$tt();var n=Ett();var s=Att();var r=Ott();var i=Ftt();var o=Ptt();var a=Gtt();var c=Ytt();var u=Qtt();var l=Jtt();var f=eet();var h=ret();var d=aet();var p=fet();var m=yet();var b=Function;var y=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}};var w=ket();var g=Iet();var v=function(){throw new a};var x=w?function(){try{return v}catch(t){try{return w(arguments,"callee").get}catch(t){return v}}}():v;var N=Tet()();var k=unt();var C=_et();var $=Ret();var S=Zet();var I=Vet();var E={};var M=typeof Uint8Array==="undefined"||!k?t:k(Uint8Array);var T={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?t:ArrayBuffer,"%ArrayIteratorPrototype%":N&&k?k([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":E,"%AsyncGenerator%":E,"%AsyncGeneratorFunction%":E,"%AsyncIteratorPrototype%":E,"%Atomics%":typeof Atomics==="undefined"?t:Atomics,"%BigInt%":typeof BigInt==="undefined"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":s,"%Float16Array%":typeof Float16Array==="undefined"?t:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?t:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?t:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":E,"%Int8Array%":typeof Int8Array==="undefined"?t:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?t:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&k?k(k([][Symbol.iterator]())):t,"%JSON%":typeof JSON==="object"?JSON:t,"%Map%":typeof Map==="undefined"?t:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!N||!k?t:k((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?t:Promise,"%Proxy%":typeof Proxy==="undefined"?t:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect==="undefined"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?t:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!N||!k?t:k((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&k?k(""[Symbol.iterator]()):t,"%Symbol%":N?Symbol:t,"%SyntaxError%":o,"%ThrowTypeError%":x,"%TypedArray%":M,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array==="undefined"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?t:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap==="undefined"?t:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?t:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?t:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":S,"%Object.defineProperty%":g,"%Object.getPrototypeOf%":C,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":f,"%Math.min%":h,"%Math.pow%":d,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":$};var A=function t(e){var n;if(e==="%AsyncFunction%"){n=y("async function () {}")}else if(e==="%GeneratorFunction%"){n=y("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){n=y("async function* () {}")}else if(e==="%AsyncGenerator%"){var s=t("%AsyncGeneratorFunction%");if(s){n=s.prototype}}else if(e==="%AsyncIteratorPrototype%"){var r=t("%AsyncGenerator%");if(r&&k){n=k(r.prototype)}}T[e]=n;return n};var D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var R=Wet();var O=hnt();var L=R.call(I,Array.prototype.concat);var _=R.call(S,Array.prototype.splice);var F=R.call(I,String.prototype.replace);var z=R.call(I,String.prototype.slice);var j=R.call(I,RegExp.prototype.exec);var P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var B=/\\(\\)?/g;var W=function t(e){var n=z(e,0,1);var s=z(e,-1);if(n==="%"&&s!=="%"){throw new o("invalid intrinsic syntax, expected closing `%`")}else if(s==="%"&&n!=="%"){throw new o("invalid intrinsic syntax, expected opening `%`")}var r=[];F(e,P,(function(t,e,n,s){r[r.length]=n?F(s,B,"$1"):e||t}));return r};var G=function t(e,n){var s=e;var r;if(O(D,s)){r=D[s];s="%"+r[0]+"%"}if(O(T,s)){var i=T[s];if(i===E){i=A(s)}if(typeof i==="undefined"&&!n){throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:r,name:s,value:i}}throw new o("intrinsic "+e+" does not exist!")};dnt=function t(e,n){if(typeof e!=="string"||e.length===0){throw new a("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof n!=="boolean"){throw new a('"allowMissing" argument must be a boolean')}if(j(/^%?[^%]*%?$/,e)===null){throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var s=W(e);var r=s.length>0?s[0]:"";var i=G("%"+r+"%",n);var c=i.name;var u=i.value;var l=false;var f=i.alias;if(f){r=f[0];_(s,L([0,1],f))}for(var h=1,d=true;h<s.length;h+=1){var p=s[h];var m=z(p,0,1);var b=z(p,-1);if((m==='"'||m==="'"||m==="`"||(b==='"'||b==="'"||b==="`"))&&m!==b){throw new o("property names with quotes must have matching quotes")}if(p==="constructor"||!d){l=true}r+="."+p;c="%"+r+"%";if(O(T,c)){u=T[c]}else if(u!=null){if(!(p in u)){if(!n){throw new a("base intrinsic for "+e+" exists, but the property is not available.")}return void 0}if(w&&h+1>=s.length){var y=w(u,p);d=!!y;if(d&&"get"in y&&!("originalValue"in y.get)){u=y.get}else{u=u[p]}}else{d=O(u,p);u=u[p]}if(d&&!l){T[c]=u}}}return u};return dnt}var bnt;var ynt;function wnt(){if(ynt)return bnt;ynt=1;var t=mnt();var e=snt();var n=e([t("%String.prototype.indexOf%")]);bnt=function s(r,i){var o=t(r,!!i);if(typeof o==="function"&&n(r,".prototype.")>-1){return e([o])}return o};return bnt}var gnt;var vnt;function xnt(){if(vnt)return gnt;vnt=1;var t=Ntt()();var e=wnt();var n=e("Object.prototype.toString");var s=function e(s){if(t&&s&&typeof s==="object"&&Symbol.toStringTag in s){return false}return n(s)==="[object Arguments]"};var r=function t(e){if(s(e)){return true}return e!==null&&typeof e==="object"&&"length"in e&&typeof e.length==="number"&&e.length>=0&&n(e)!=="[object Array]"&&"callee"in e&&n(e.callee)==="[object Function]"};var i=function(){return s(arguments)}();s.isLegacyArguments=r;gnt=i?s:r;return gnt}var Nnt;var knt;function Cnt(){if(knt)return Nnt;knt=1;var t=wnt();var e=Ntt()();var n=hnt();var s=ket();var r;if(e){var i=t("RegExp.prototype.exec");var o={};var a=function(){throw o};var c={toString:a,valueOf:a};if(typeof Symbol.toPrimitive==="symbol"){c[Symbol.toPrimitive]=a}r=function t(e){if(!e||typeof e!=="object"){return false}var r=s(e,"lastIndex");var a=r&&n(r,"value");if(!a){return false}try{i(e,c)}catch(t){return t===o}}}else{var u=t("Object.prototype.toString");var l="[object RegExp]";r=function t(e){if(!e||typeof e!=="object"&&typeof e!=="function"){return false}return u(e)===l}}Nnt=r;return Nnt}var $nt;var Snt;function Int(){if(Snt)return $nt;Snt=1;var t=wnt();var e=Cnt();var n=t("RegExp.prototype.exec");var s=Gtt();$nt=function t(r){if(!e(r)){throw new s("`regex` must be a RegExp")}return function t(e){return n(r,e)!==null}};return $nt}var Ent;var Mnt;function Tnt(){if(Mnt)return Ent;Mnt=1;var t=wnt();var e=Int();var n=e(/^\s*(?:function)?\*/);var s=Ntt()();var r=unt();var i=t("Object.prototype.toString");var o=t("Function.prototype.toString");var a=function(){if(!s){return false}try{return Function("return function*() {}")()}catch(t){}};var c;Ent=function t(e){if(typeof e!=="function"){return false}if(n(o(e))){return true}if(!s){var u=i(e);return u==="[object GeneratorFunction]"}if(!r){return false}if(typeof c==="undefined"){var l=a();c=l?r(l):false}return r(e)===c};return Ent}var Ant;var Dnt;function Rnt(){if(Dnt)return Ant;Dnt=1;var t=Function.prototype.toString;var e=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply;var n;var s;if(typeof e==="function"&&typeof Object.defineProperty==="function"){try{n=Object.defineProperty({},"length",{get:function(){throw s}});s={};e((function(){throw 42}),null,n)}catch(t){if(t!==s){e=null}}}else{e=null}var r=/^\s*class\b/;var i=function e(n){try{var s=t.call(n);return r.test(s)}catch(t){return false}};var o=function e(n){try{if(i(n)){return false}t.call(n);return true}catch(t){return false}};var a=Object.prototype.toString;var c="[object Object]";var u="[object Function]";var l="[object GeneratorFunction]";var f="[object HTMLAllCollection]";var h="[object HTML document.all class]";var d="[object HTMLCollection]";var p=typeof Symbol==="function"&&!!Symbol.toStringTag;var m=!(0 in[,]);var b=function t(){return false};if(typeof document==="object"){var y=document.all;if(a.call(y)===a.call(document.all)){b=function t(e){if((m||!e)&&(typeof e==="undefined"||typeof e==="object")){try{var n=a.call(e);return(n===f||n===h||n===d||n===c)&&e("")==null}catch(t){}}return false}}}Ant=e?function t(r){if(b(r)){return true}if(!r){return false}if(typeof r!=="function"&&typeof r!=="object"){return false}try{e(r,null,n)}catch(t){if(t!==s){return false}}return!i(r)&&o(r)}:function t(e){if(b(e)){return true}if(!e){return false}if(typeof e!=="function"&&typeof e!=="object"){return false}if(p){return o(e)}if(i(e)){return false}var n=a.call(e);if(n!==u&&n!==l&&!/^\[object HTML/.test(n)){return false}return o(e)};return Ant}var Ont;var Lnt;function _nt(){if(Lnt)return Ont;Lnt=1;var t=Rnt();var e=Object.prototype.toString;var n=Object.prototype.hasOwnProperty;var s=function t(e,s,r){for(var i=0,o=e.length;i<o;i++){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};var r=function t(e,n,s){for(var r=0,i=e.length;r<i;r++){if(s==null){n(e.charAt(r),r,e)}else{n.call(s,e.charAt(r),r,e)}}};var i=function t(e,s,r){for(var i in e){if(n.call(e,i)){if(r==null){s(e[i],i,e)}else{s.call(r,e[i],i,e)}}}};function o(t){return e.call(t)==="[object Array]"}Ont=function e(n,a,c){if(!t(a)){throw new TypeError("iterator must be a function")}var u;if(arguments.length>=3){u=c}if(o(n)){s(n,a,u)}else if(typeof n==="string"){r(n,a,u)}else{i(n,a,u)}};return Ont}var Fnt;var znt;function jnt(){if(znt)return Fnt;znt=1;Fnt=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"];return Fnt}var Pnt;var Bnt;function Wnt(){if(Bnt)return Pnt;Bnt=1;var t=jnt();var e=typeof globalThis==="undefined"?h:globalThis;Pnt=function n(){var s=[];for(var r=0;r<t.length;r++){if(typeof e[t[r]]==="function"){s[s.length]=t[r]}}return s};return Pnt}var Gnt={exports:{}};var Unt;var Vnt;function Ynt(){if(Vnt)return Unt;Vnt=1;var t=Iet();var e=Ptt();var n=Gtt();var s=ket();Unt=function r(i,o,a){if(!i||typeof i!=="object"&&typeof i!=="function"){throw new n("`obj` must be an object or a function`")}if(typeof o!=="string"&&typeof o!=="symbol"){throw new n("`property` must be a string or a symbol`")}if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null){throw new n("`nonEnumerable`, if provided, must be a boolean or null")}if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null){throw new n("`nonWritable`, if provided, must be a boolean or null")}if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null){throw new n("`nonConfigurable`, if provided, must be a boolean or null")}if(arguments.length>6&&typeof arguments[6]!=="boolean"){throw new n("`loose`, if provided, must be a boolean")}var c=arguments.length>3?arguments[3]:null;var u=arguments.length>4?arguments[4]:null;var l=arguments.length>5?arguments[5]:null;var f=arguments.length>6?arguments[6]:false;var h=!!s&&s(i,o);if(t){t(i,o,{configurable:l===null&&h?h.configurable:!l,enumerable:c===null&&h?h.enumerable:!c,value:a,writable:u===null&&h?h.writable:!u})}else if(f||!c&&!u&&!l){i[o]=a}else{throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}};return Unt}var Hnt;var Znt;function Qnt(){if(Znt)return Hnt;Znt=1;var t=Iet();var e=function e(){return!!t};e.hasArrayLengthDefineBug=function e(){if(!t){return null}try{return t([],"length",{value:1}).length!==1}catch(t){return true}};Hnt=e;return Hnt}var Xnt;var qnt;function Jnt(){if(qnt)return Xnt;qnt=1;var t=mnt();var e=Ynt();var n=Qnt()();var s=ket();var r=Gtt();var i=t("%Math.floor%");Xnt=function t(o,a){if(typeof o!=="function"){throw new r("`fn` is not a function")}if(typeof a!=="number"||a<0||a>4294967295||i(a)!==a){throw new r("`length` must be a positive 32-bit integer")}var c=arguments.length>2&&!!arguments[2];var u=true;var l=true;if("length"in o&&s){var f=s(o,"length");if(f&&!f.configurable){u=false}if(f&&!f.writable){l=false}}if(u||l||!c){if(n){e(o,"length",a,true,true)}else{e(o,"length",a)}}return o};return Xnt}var Knt;var tst;function est(){if(tst)return Knt;tst=1;var t=Wet();var e=Zet();var n=tnt();Knt=function s(){return n(t,e,arguments)};return Knt}var nst;function sst(){if(nst)return Gnt.exports;nst=1;(function(t){var e=Jnt();var n=Iet();var s=snt();var r=est();t.exports=function t(n){var r=s(arguments);var i=n.length-(arguments.length-1);return e(r,1+(i>0?i:0),true)};if(n){n(t.exports,"apply",{value:r})}else{t.exports.apply=r}})(Gnt);return Gnt.exports}var rst;var ist;function ost(){if(ist)return rst;ist=1;var t=_nt();var e=Wnt();var n=sst();var s=wnt();var r=ket();var i=unt();var o=s("Object.prototype.toString");var a=Ntt()();var c=typeof globalThis==="undefined"?h:globalThis;var u=e();var l=s("String.prototype.slice");var f=s("Array.prototype.indexOf",true)||function t(e,n){for(var s=0;s<e.length;s+=1){if(e[s]===n){return s}}return-1};var d={__proto__:null};if(a&&r&&i){t(u,(function(t){var e=new c[t];if(Symbol.toStringTag in e&&i){var s=i(e);var o=r(s,Symbol.toStringTag);if(!o&&s){var a=i(s);o=r(a,Symbol.toStringTag)}d["$"+t]=n(o.get)}}))}else{t(u,(function(t){var e=new c[t];var s=e.slice||e.set;if(s){d["$"+t]=n(s)}}))}var p=function e(n){var s=false;t(d,(function(t,e){if(!s){try{if("$"+t(n)===e){s=l(e,1)}}catch(t){}}}));return s};var m=function e(n){var s=false;t(d,(function(t,e){if(!s){try{t(n);s=l(e,1)}catch(t){}}}));return s};rst=function t(e){if(!e||typeof e!=="object"){return false}if(!a){var n=l(o(e),8,-1);if(f(u,n)>-1){return n}if(n!=="Object"){return false}return m(e)}if(!r){return null}return p(e)};return rst}var ast;var cst;function ust(){if(cst)return ast;cst=1;var t=ost();ast=function e(n){return!!t(n)};return ast}var lst;function fst(){if(lst)return btt;lst=1;(function(t){var e=xnt();var n=Tnt();var s=ost();var r=ust();function i(t){return t.call.bind(t)}var o=typeof BigInt!=="undefined";var a=typeof Symbol!=="undefined";var c=i(Object.prototype.toString);var u=i(Number.prototype.valueOf);var l=i(String.prototype.valueOf);var f=i(Boolean.prototype.valueOf);if(o){var h=i(BigInt.prototype.valueOf)}if(a){var d=i(Symbol.prototype.valueOf)}function p(t,e){if(typeof t!=="object"){return false}try{e(t);return true}catch(t){return false}}t.isArgumentsObject=e;t.isGeneratorFunction=n;t.isTypedArray=r;function m(t){return typeof Promise!=="undefined"&&t instanceof Promise||t!==null&&typeof t==="object"&&typeof t.then==="function"&&typeof t.catch==="function"}t.isPromise=m;function b(t){if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){return ArrayBuffer.isView(t)}return r(t)||j(t)}t.isArrayBufferView=b;function y(t){return s(t)==="Uint8Array"}t.isUint8Array=y;function w(t){return s(t)==="Uint8ClampedArray"}t.isUint8ClampedArray=w;function g(t){return s(t)==="Uint16Array"}t.isUint16Array=g;function v(t){return s(t)==="Uint32Array"}t.isUint32Array=v;function x(t){return s(t)==="Int8Array"}t.isInt8Array=x;function N(t){return s(t)==="Int16Array"}t.isInt16Array=N;function k(t){return s(t)==="Int32Array"}t.isInt32Array=k;function C(t){return s(t)==="Float32Array"}t.isFloat32Array=C;function $(t){return s(t)==="Float64Array"}t.isFloat64Array=$;function S(t){return s(t)==="BigInt64Array"}t.isBigInt64Array=S;function I(t){return s(t)==="BigUint64Array"}t.isBigUint64Array=I;function E(t){return c(t)==="[object Map]"}E.working=typeof Map!=="undefined"&&E(new Map);function M(t){if(typeof Map==="undefined"){return false}return E.working?E(t):t instanceof Map}t.isMap=M;function T(t){return c(t)==="[object Set]"}T.working=typeof Set!=="undefined"&&T(new Set);function A(t){if(typeof Set==="undefined"){return false}return T.working?T(t):t instanceof Set}t.isSet=A;function D(t){return c(t)==="[object WeakMap]"}D.working=typeof WeakMap!=="undefined"&&D(new WeakMap);function R(t){if(typeof WeakMap==="undefined"){return false}return D.working?D(t):t instanceof WeakMap}t.isWeakMap=R;function O(t){return c(t)==="[object WeakSet]"}O.working=typeof WeakSet!=="undefined"&&O(new WeakSet);function L(t){return O(t)}t.isWeakSet=L;function _(t){return c(t)==="[object ArrayBuffer]"}_.working=typeof ArrayBuffer!=="undefined"&&_(new ArrayBuffer);function F(t){if(typeof ArrayBuffer==="undefined"){return false}return _.working?_(t):t instanceof ArrayBuffer}t.isArrayBuffer=F;function z(t){return c(t)==="[object DataView]"}z.working=typeof ArrayBuffer!=="undefined"&&typeof DataView!=="undefined"&&z(new DataView(new ArrayBuffer(1),0,1));function j(t){if(typeof DataView==="undefined"){return false}return z.working?z(t):t instanceof DataView}t.isDataView=j;var P=typeof SharedArrayBuffer!=="undefined"?SharedArrayBuffer:undefined;function B(t){return c(t)==="[object SharedArrayBuffer]"}function W(t){if(typeof P==="undefined"){return false}if(typeof B.working==="undefined"){B.working=B(new P)}return B.working?B(t):t instanceof P}t.isSharedArrayBuffer=W;function G(t){return c(t)==="[object AsyncFunction]"}t.isAsyncFunction=G;function U(t){return c(t)==="[object Map Iterator]"}t.isMapIterator=U;function V(t){return c(t)==="[object Set Iterator]"}t.isSetIterator=V;function Y(t){return c(t)==="[object Generator]"}t.isGeneratorObject=Y;function H(t){return c(t)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=H;function Z(t){return p(t,u)}t.isNumberObject=Z;function Q(t){return p(t,l)}t.isStringObject=Q;function X(t){return p(t,f)}t.isBooleanObject=X;function q(t){return o&&p(t,h)}t.isBigIntObject=q;function J(t){return a&&p(t,d)}t.isSymbolObject=J;function K(t){return Z(t)||Q(t)||X(t)||q(t)||J(t)}t.isBoxedPrimitive=K;function tt(t){return typeof Uint8Array!=="undefined"&&(F(t)||W(t))}t.isAnyArrayBuffer=tt;["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:false,value:function(){throw new Error(e+" is not supported in userland")}})}))})(btt);return btt}var hst;var dst;function pst(){if(dst)return hst;dst=1;hst=function t(e){return e instanceof uc};return hst}var mst={exports:{}};var bst={exports:{}};var yst;function wst(){if(yst)return bst.exports;yst=1;if(typeof Object.create==="function"){bst.exports=function t(e,n){if(n){e.super_=n;e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{bst.exports=function t(e,n){if(n){e.super_=n;var s=function(){};s.prototype=n.prototype;e.prototype=new s;e.prototype.constructor=e}}}return bst.exports}var gst;function vst(){if(gst)return mst.exports;gst=1;try{var t=Nst();if(typeof t.inherits!=="function")throw"";mst.exports=t.inherits}catch(t){mst.exports=wst()}return mst.exports}var xst;function Nst(){if(xst)return mtt;xst=1;(function(t){var e=Object.getOwnPropertyDescriptors||function t(e){var n=Object.keys(e);var s={};for(var r=0;r<n.length;r++){s[n[r]]=Object.getOwnPropertyDescriptor(e,n[r])}return s};var n=/%[sdj%]/g;t.format=function(t){if(!N(t)){var e=[];for(var s=0;s<arguments.length;s++){e.push(o(arguments[s]))}return e.join(" ")}var s=1;var r=arguments;var i=r.length;var a=String(t).replace(n,(function(t){if(t==="%%")return"%";if(s>=i)return t;switch(t){case"%s":return String(r[s++]);case"%d":return Number(r[s++]);case"%j":try{return JSON.stringify(r[s++])}catch(t){return"[Circular]"}default:return t}}));for(var c=r[s];s<i;c=r[++s]){if(w(c)||!S(c)){a+=" "+c}else{a+=" "+o(c)}}return a};t.deprecate=function(e,n){if(typeof v!=="undefined"&&v.noDeprecation===true){return e}if(typeof v==="undefined"){return function(){return t.deprecate(e,n).apply(this,arguments)}}var s=false;function r(){if(!s){if(v.throwDeprecation){throw new Error(n)}else if(v.traceDeprecation){console.trace(n)}else{console.error(n)}s=true}return e.apply(this,arguments)}return r};var s={};var r=/^$/;if(v.env.NODE_DEBUG){var i=v.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase();r=new RegExp("^"+i+"$","i")}t.debuglog=function(e){e=e.toUpperCase();if(!s[e]){if(r.test(e)){var n=v.pid;s[e]=function(){var s=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,s)}}else{s[e]=function(){}}}return s[e]};function o(e,n){var s={seen:[],stylize:c};if(arguments.length>=3)s.depth=arguments[2];if(arguments.length>=4)s.colors=arguments[3];if(y(n)){s.showHidden=n}else if(n){t._extend(s,n)}if(C(s.showHidden))s.showHidden=false;if(C(s.depth))s.depth=2;if(C(s.colors))s.colors=false;if(C(s.customInspect))s.customInspect=true;if(s.colors)s.stylize=a;return l(s,e,s.depth)}t.inspect=o;o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(t,e){var n=o.styles[e];if(n){return"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m"}else{return t}}function c(t,e){return t}function u(t){var e={};t.forEach((function(t,n){e[t]=true}));return e}function l(e,n,s){if(e.customInspect&&n&&M(n.inspect)&&n.inspect!==t.inspect&&!(n.constructor&&n.constructor.prototype===n)){var r=n.inspect(s,e);if(!N(r)){r=l(e,r,s)}return r}var i=f(e,n);if(i){return i}var o=Object.keys(n);var a=u(o);if(e.showHidden){o=Object.getOwnPropertyNames(n)}if(E(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0)){return h(n)}if(o.length===0){if(M(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}if(I(n)){return e.stylize(Date.prototype.toString.call(n),"date")}if(E(n)){return h(n)}}var y="",w=false,g=["{","}"];if(b(n)){w=true;g=["[","]"]}if(M(n)){var v=n.name?": "+n.name:"";y=" [Function"+v+"]"}if($(n)){y=" "+RegExp.prototype.toString.call(n)}if(I(n)){y=" "+Date.prototype.toUTCString.call(n)}if(E(n)){y=" "+h(n)}if(o.length===0&&(!w||n.length==0)){return g[0]+y+g[1]}if(s<0){if($(n)){return e.stylize(RegExp.prototype.toString.call(n),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(n);var x;if(w){x=d(e,n,s,a,o)}else{x=o.map((function(t){return p(e,n,s,a,t,w)}))}e.seen.pop();return m(x,y,g)}function f(t,e){if(C(e))return t.stylize("undefined","undefined");if(N(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(x(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(w(e))return t.stylize("null","null")}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,s,r){var i=[];for(var o=0,a=e.length;o<a;++o){if(L(e,String(o))){i.push(p(t,e,n,s,String(o),true))}else{i.push("")}}r.forEach((function(r){if(!r.match(/^\d+$/)){i.push(p(t,e,n,s,r,true))}}));return i}function p(t,e,n,s,r,i){var o,a,c;c=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]};if(c.get){if(c.set){a=t.stylize("[Getter/Setter]","special")}else{a=t.stylize("[Getter]","special")}}else{if(c.set){a=t.stylize("[Setter]","special")}}if(!L(s,r)){o="["+r+"]"}if(!a){if(t.seen.indexOf(c.value)<0){if(w(n)){a=l(t,c.value,null)}else{a=l(t,c.value,n-1)}if(a.indexOf("\n")>-1){if(i){a=a.split("\n").map((function(t){return" "+t})).join("\n").slice(2)}else{a="\n"+a.split("\n").map((function(t){return" "+t})).join("\n")}}}else{a=t.stylize("[Circular]","special")}}if(C(o)){if(i&&r.match(/^\d+$/)){return a}o=JSON.stringify(""+r);if(o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){o=o.slice(1,-1);o=t.stylize(o,"name")}else{o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");o=t.stylize(o,"string")}}return o+": "+a}function m(t,e,n){var s=t.reduce((function(t,e){if(e.indexOf("\n")>=0);return t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(s>60){return n[0]+(e===""?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]}return n[0]+e+" "+t.join(", ")+" "+n[1]}t.types=fst();function b(t){return Array.isArray(t)}t.isArray=b;function y(t){return typeof t==="boolean"}t.isBoolean=y;function w(t){return t===null}t.isNull=w;function g(t){return t==null}t.isNullOrUndefined=g;function x(t){return typeof t==="number"}t.isNumber=x;function N(t){return typeof t==="string"}t.isString=N;function k(t){return typeof t==="symbol"}t.isSymbol=k;function C(t){return t===void 0}t.isUndefined=C;function $(t){return S(t)&&A(t)==="[object RegExp]"}t.isRegExp=$;t.types.isRegExp=$;function S(t){return typeof t==="object"&&t!==null}t.isObject=S;function I(t){return S(t)&&A(t)==="[object Date]"}t.isDate=I;t.types.isDate=I;function E(t){return S(t)&&(A(t)==="[object Error]"||t instanceof Error)}t.isError=E;t.types.isNativeError=E;function M(t){return typeof t==="function"}t.isFunction=M;function T(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}t.isPrimitive=T;t.isBuffer=pst();function A(t){return Object.prototype.toString.call(t)}function D(t){return t<10?"0"+t.toString(10):t.toString(10)}var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date;var e=[D(t.getHours()),D(t.getMinutes()),D(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))};t.inherits=vst();t._extend=function(t,e){if(!e||!S(e))return t;var n=Object.keys(e);var s=n.length;while(s--){t[n[s]]=e[n[s]]}return t};function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var _=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function t(n){if(typeof n!=="function")throw new TypeError('The "original" argument must be of type Function');if(_&&n[_]){var s=n[_];if(typeof s!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return s}function s(){var t,e;var s=new Promise((function(n,s){t=n;e=s}));var r=[];for(var i=0;i<arguments.length;i++){r.push(arguments[i])}r.push((function(n,s){if(n){e(n)}else{t(s)}}));try{n.apply(this,r)}catch(t){e(t)}return s}Object.setPrototypeOf(s,Object.getPrototypeOf(n));if(_)Object.defineProperty(s,_,{value:s,enumerable:false,writable:false,configurable:true});return Object.defineProperties(s,e(n))};t.promisify.custom=_;function F(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t;t=n}return e(t)}function z(t){if(typeof t!=="function"){throw new TypeError('The "original" argument must be of type Function')}function n(){var e=[];for(var n=0;n<arguments.length;n++){e.push(arguments[n])}var s=e.pop();if(typeof s!=="function"){throw new TypeError("The last argument must be of type Function")}var r=this;var i=function(){return s.apply(r,arguments)};t.apply(this,e).then((function(t){v.nextTick(i.bind(null,null,t))}),(function(t){v.nextTick(F.bind(null,t,i))}))}Object.setPrototypeOf(n,Object.getPrototypeOf(t));Object.defineProperties(n,e(t));return n}t.callbackify=z})(mtt);return mtt}var kst;function Cst(){}Cst.prototype=Object.create(null);function $st(){$st.init.call(this)}$st.EventEmitter=$st;$st.usingDomains=false;$st.prototype.domain=undefined;$st.prototype._events=undefined;$st.prototype._maxListeners=undefined;$st.defaultMaxListeners=10;$st.init=function(){this.domain=null;if($st.usingDomains){if(kst.active&&!(this instanceof kst.Domain)){this.domain=kst.active}}if(!this._events||this._events===Object.getPrototypeOf(this)._events){this._events=new Cst;this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};$st.prototype.setMaxListeners=function t(e){if(typeof e!=="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');this._maxListeners=e;return this};function Sst(t){if(t._maxListeners===undefined)return $st.defaultMaxListeners;return t._maxListeners}$st.prototype.getMaxListeners=function t(){return Sst(this)};function Ist(t,e,n){if(e)t.call(n);else{var s=t.length;var r=Fst(t,s);for(var i=0;i<s;++i)r[i].call(n)}}function Est(t,e,n,s){if(e)t.call(n,s);else{var r=t.length;var i=Fst(t,r);for(var o=0;o<r;++o)i[o].call(n,s)}}function Mst(t,e,n,s,r){if(e)t.call(n,s,r);else{var i=t.length;var o=Fst(t,i);for(var a=0;a<i;++a)o[a].call(n,s,r)}}function Tst(t,e,n,s,r,i){if(e)t.call(n,s,r,i);else{var o=t.length;var a=Fst(t,o);for(var c=0;c<o;++c)a[c].call(n,s,r,i)}}function Ast(t,e,n,s){if(e)t.apply(n,s);else{var r=t.length;var i=Fst(t,r);for(var o=0;o<r;++o)i[o].apply(n,s)}}$st.prototype.emit=function t(e){var n,s,r,i,o,a,c;var u=e==="error";a=this._events;if(a)u=u&&a.error==null;else if(!u)return false;c=this.domain;if(u){n=arguments[1];if(c){if(!n)n=new Error('Uncaught, unspecified "error" event');n.domainEmitter=this;n.domain=c;n.domainThrown=false;c.emit("error",n)}else if(n instanceof Error){throw n}else{var l=new Error('Uncaught, unspecified "error" event. ('+n+")");l.context=n;throw l}return false}s=a[e];if(!s)return false;var f=typeof s==="function";r=arguments.length;switch(r){case 1:Ist(s,f,this);break;case 2:Est(s,f,this,arguments[1]);break;case 3:Mst(s,f,this,arguments[1],arguments[2]);break;case 4:Tst(s,f,this,arguments[1],arguments[2],arguments[3]);break;default:i=new Array(r-1);for(o=1;o<r;o++)i[o-1]=arguments[o];Ast(s,f,this,i)}return true};function Dst(t,e,n,s){var r;var i;var o;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');i=t._events;if(!i){i=t._events=new Cst;t._eventsCount=0}else{if(i.newListener){t.emit("newListener",e,n.listener?n.listener:n);i=t._events}o=i[e]}if(!o){o=i[e]=n;++t._eventsCount}else{if(typeof o==="function"){o=i[e]=s?[n,o]:[o,n]}else{if(s){o.unshift(n)}else{o.push(n)}}if(!o.warned){r=Sst(t);if(r&&r>0&&o.length>r){o.warned=true;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+e+" listeners added. "+"Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning";a.emitter=t;a.type=e;a.count=o.length;Rst(a)}}}return t}function Rst(t){typeof console.warn==="function"?console.warn(t):console.log(t)}$st.prototype.addListener=function t(e,n){return Dst(this,e,n,false)};$st.prototype.on=$st.prototype.addListener;$st.prototype.prependListener=function t(e,n){return Dst(this,e,n,true)};function Ost(t,e,n){var s=false;function r(){t.removeListener(e,r);if(!s){s=true;n.apply(t,arguments)}}r.listener=n;return r}$st.prototype.once=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.on(e,Ost(this,e,n));return this};$st.prototype.prependOnceListener=function t(e,n){if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');this.prependListener(e,Ost(this,e,n));return this};$st.prototype.removeListener=function t(e,n){var s,r,i,o,a;if(typeof n!=="function")throw new TypeError('"listener" argument must be a function');r=this._events;if(!r)return this;s=r[e];if(!s)return this;if(s===n||s.listener&&s.listener===n){if(--this._eventsCount===0)this._events=new Cst;else{delete r[e];if(r.removeListener)this.emit("removeListener",e,s.listener||n)}}else if(typeof s!=="function"){i=-1;for(o=s.length;o-- >0;){if(s[o]===n||s[o].listener&&s[o].listener===n){a=s[o].listener;i=o;break}}if(i<0)return this;if(s.length===1){s[0]=undefined;if(--this._eventsCount===0){this._events=new Cst;return this}else{delete r[e]}}else{_st(s,i)}if(r.removeListener)this.emit("removeListener",e,a||n)}return this};$st.prototype.removeAllListeners=function t(e){var n,s;s=this._events;if(!s)return this;if(!s.removeListener){if(arguments.length===0){this._events=new Cst;this._eventsCount=0}else if(s[e]){if(--this._eventsCount===0)this._events=new Cst;else delete s[e]}return this}if(arguments.length===0){var r=Object.keys(s);for(var i=0,o;i<r.length;++i){o=r[i];if(o==="removeListener")continue;this.removeAllListeners(o)}this.removeAllListeners("removeListener");this._events=new Cst;this._eventsCount=0;return this}n=s[e];if(typeof n==="function"){this.removeListener(e,n)}else if(n){do{this.removeListener(e,n[n.length-1])}while(n[0])}return this};$st.prototype.listeners=function t(e){var n;var s;var r=this._events;if(!r)s=[];else{n=r[e];if(!n)s=[];else if(typeof n==="function")s=[n.listener||n];else s=zst(n)}return s};$st.listenerCount=function(t,e){if(typeof t.listenerCount==="function"){return t.listenerCount(e)}else{return Lst.call(t,e)}};$st.prototype.listenerCount=Lst;function Lst(t){var e=this._events;if(e){var n=e[t];if(typeof n==="function"){return 1}else if(n){return n.length}}return 0}$st.prototype.eventNames=function t(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function _st(t,e){for(var n=e,s=n+1,r=t.length;s<r;n+=1,s+=1)t[n]=t[s];t.pop()}function Fst(t,e){var n=new Array(e);while(e--)n[e]=t[e];return n}function zst(t){var e=new Array(t.length);for(var n=0;n<e.length;++n){e[n]=t[n].listener||t[n]}return e}var jst=Nst();function Pst(){this.head=null;this.tail=null;this.length=0}Pst.prototype.push=function(t){var e={data:t,next:null};if(this.length>0)this.tail.next=e;else this.head=e;this.tail=e;++this.length};Pst.prototype.unshift=function(t){var e={data:t,next:this.head};if(this.length===0)this.tail=e;this.head=e;++this.length};Pst.prototype.shift=function(){if(this.length===0)return;var t=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return t};Pst.prototype.clear=function(){this.head=this.tail=null;this.length=0};Pst.prototype.join=function(t){if(this.length===0)return"";var e=this.head;var n=""+e.data;while(e=e.next){n+=t+e.data}return n};Pst.prototype.concat=function(t){if(this.length===0)return uc.alloc(0);if(this.length===1)return this.head.data;var e=uc.allocUnsafe(t>>>0);var n=this.head;var s=0;while(n){n.data.copy(e,s);s+=n.data.length;n=n.next}return e};var Bst={};var Wst={exports:{}};var Gst=f(ou);
18117
18117
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ust;function Vst(){if(Ust)return Wst.exports;Ust=1;(function(t,e){var n=Gst;var s=n.Buffer;function r(t,e){for(var n in t){e[n]=t[n]}}if(s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow){t.exports=n}else{r(n,e);e.Buffer=i}function i(t,e,n){return s(t,e,n)}i.prototype=Object.create(s.prototype);r(s,i);i.from=function(t,e,n){if(typeof t==="number"){throw new TypeError("Argument must not be a number")}return s(t,e,n)};i.alloc=function(t,e,n){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}var r=s(t);if(e!==undefined){if(typeof n==="string"){r.fill(e,n)}else{r.fill(e)}}else{r.fill(0)}return r};i.allocUnsafe=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return s(t)};i.allocUnsafeSlow=function(t){if(typeof t!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(t)}})(Wst,Wst.exports);return Wst.exports}var Yst;function Hst(){if(Yst)return Bst;Yst=1;var t=Vst().Buffer;var e=t.isEncoding||function(t){t=""+t;switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function n(t){if(!t)return"utf8";var e;while(true){switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase();e=true}}}function s(s){var r=n(s);if(typeof r!=="string"&&(t.isEncoding===e||!e(s)))throw new Error("Unknown encoding: "+s);return r||s}Bst.StringDecoder=r;function r(e){this.encoding=s(e);var n;switch(this.encoding){case"utf16le":this.text=f;this.end=h;n=4;break;case"utf8":this.fillLast=c;n=4;break;case"base64":this.text=d;this.end=p;n=3;break;default:this.write=m;this.end=b;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=t.allocUnsafe(n)}r.prototype.write=function(t){if(t.length===0)return"";var e;var n;if(this.lastNeed){e=this.fillLast(t);if(e===undefined)return"";n=this.lastNeed;this.lastNeed=0}else{n=0}if(n<t.length)return e?e+this.text(t,n):this.text(t,n);return e||""};r.prototype.end=l;r.prototype.text=u;r.prototype.fillLast=function(t){if(this.lastNeed<=t.length){t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length);this.lastNeed-=t.length};function i(t){if(t<=127)return 0;else if(t>>5===6)return 2;else if(t>>4===14)return 3;else if(t>>3===30)return 4;return t>>6===2?-1:-2}function o(t,e,n){var s=e.length-1;if(s<n)return 0;var r=i(e[s]);if(r>=0){if(r>0)t.lastNeed=r-1;return r}if(--s<n||r===-2)return 0;r=i(e[s]);if(r>=0){if(r>0)t.lastNeed=r-2;return r}if(--s<n||r===-2)return 0;r=i(e[s]);if(r>=0){if(r>0){if(r===2)r=0;else t.lastNeed=r-3}return r}return 0}function a(t,e,n){if((e[0]&192)!==128){t.lastNeed=0;return"�"}if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128){t.lastNeed=1;return"�"}if(t.lastNeed>2&&e.length>2){if((e[2]&192)!==128){t.lastNeed=2;return"�"}}}}function c(t){var e=this.lastTotal-this.lastNeed;var n=a(this,t);if(n!==undefined)return n;if(this.lastNeed<=t.length){t.copy(this.lastChar,e,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}t.copy(this.lastChar,e,0,t.length);this.lastNeed-=t.length}function u(t,e){var n=o(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var s=t.length-(n-this.lastNeed);t.copy(this.lastChar,0,s);return t.toString("utf8",e,s)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed)return e+"�";return e}function f(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var s=n.charCodeAt(n.length-1);if(s>=55296&&s<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=t[t.length-2];this.lastChar[1]=t[t.length-1];return n.slice(0,-1)}}return n}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=t[t.length-1];return t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function d(t,e){var n=(t.length-e)%3;if(n===0)return t.toString("base64",e);this.lastNeed=3-n;this.lastTotal=3;if(n===1){this.lastChar[0]=t[t.length-1]}else{this.lastChar[0]=t[t.length-2];this.lastChar[1]=t[t.length-1]}return t.toString("base64",e,t.length-n)}function p(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed)return e+this.lastChar.toString("base64",0,3-this.lastNeed);return e}function m(t){return t.toString(this.encoding)}function b(t){return t&&t.length?this.write(t):""}return Bst}var Zst=Hst();Kst.ReadableState=Jst;var Qst=jst.debuglog("stream");jst.inherits(Kst,$st);function Xst(t,e,n){if(typeof t.prependListener==="function"){return t.prependListener(e,n)}else{if(!t._events||!t._events[e])t.on(e,n);else if(Array.isArray(t._events[e]))t._events[e].unshift(n);else t._events[e]=[n,t._events[e]]}}function qst(t,e){return t.listeners(e).length}function Jst(t,e){t=t||{};this.objectMode=!!t.objectMode;if(e instanceof Hrt)this.objectMode=this.objectMode||!!t.readableObjectMode;var n=t.highWaterMark;var s=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:s;this.highWaterMark=~~this.highWaterMark;this.buffer=new Pst;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.defaultEncoding=t.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(t.encoding){this.decoder=new Zst.StringDecoder(t.encoding);this.encoding=t.encoding}}function Kst(t){if(!(this instanceof Kst))return new Kst(t);this._readableState=new Jst(t,this);this.readable=true;if(t&&typeof t.read==="function")this._read=t.read;$st.call(this)}Kst.prototype.push=function(t,e){var n=this._readableState;if(!n.objectMode&&typeof t==="string"){e=e||n.defaultEncoding;if(e!==n.encoding){t=uc.from(t,e);e=""}}return trt(this,n,t,e,false)};Kst.prototype.unshift=function(t){var e=this._readableState;return trt(this,e,t,"",true)};Kst.prototype.isPaused=function(){return this._readableState.flowing===false};function trt(t,e,n,s,r){var i=irt(e,n);if(i){t.emit("error",i)}else if(n===null){e.reading=false;ort(t,e)}else if(e.objectMode||n&&n.length>0){if(e.ended&&!r){var o=new Error("stream.push() after EOF");t.emit("error",o)}else if(e.endEmitted&&r){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else{var c;if(e.decoder&&!r&&!s){n=e.decoder.write(n);c=!e.objectMode&&n.length===0}if(!r)e.reading=false;if(!c){if(e.flowing&&e.length===0&&!e.sync){t.emit("data",n);t.read(0)}else{e.length+=e.objectMode?1:n.length;if(r)e.buffer.unshift(n);else e.buffer.push(n);if(e.needReadable)art(t)}}urt(t,e)}}else if(!r){e.reading=false}return ert(e)}function ert(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}Kst.prototype.setEncoding=function(t){this._readableState.decoder=new Zst.StringDecoder(t);this._readableState.encoding=t;return this};var nrt=8388608;function srt(t){if(t>=nrt){t=nrt}else{t--;t|=t>>>1;t|=t>>>2;t|=t>>>4;t|=t>>>8;t|=t>>>16;t++}return t}function rrt(t,e){if(t<=0||e.length===0&&e.ended)return 0;if(e.objectMode)return 1;if(t!==t){if(e.flowing&&e.length)return e.buffer.head.data.length;else return e.length}if(t>e.highWaterMark)e.highWaterMark=srt(t);if(t<=e.length)return t;if(!e.ended){e.needReadable=true;return 0}return e.length}Kst.prototype.read=function(t){Qst("read",t);t=parseInt(t,10);var e=this._readableState;var n=t;if(t!==0)e.emittedReadable=false;if(t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended)){Qst("read: emitReadable",e.length,e.ended);if(e.length===0&&e.ended)vrt(this);else art(this);return null}t=rrt(t,e);if(t===0&&e.ended){if(e.length===0)vrt(this);return null}var s=e.needReadable;Qst("need readable",s);if(e.length===0||e.length-t<e.highWaterMark){s=true;Qst("length less than watermark",s)}if(e.ended||e.reading){s=false;Qst("reading or ended",s)}else if(s){Qst("do read");e.reading=true;e.sync=true;if(e.length===0)e.needReadable=true;this._read(e.highWaterMark);e.sync=false;if(!e.reading)t=rrt(n,e)}var r;if(t>0)r=brt(t,e);else r=null;if(r===null){e.needReadable=true;t=0}else{e.length-=t}if(e.length===0){if(!e.ended)e.needReadable=true;if(n!==t&&e.ended)vrt(this)}if(r!==null)this.emit("data",r);return r};function irt(t,e){var n=null;if(!uc.isBuffer(e)&&typeof e!=="string"&&e!==null&&e!==undefined&&!t.objectMode){n=new TypeError("Invalid non-string/buffer chunk")}return n}function ort(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();if(n&&n.length){e.buffer.push(n);e.length+=e.objectMode?1:n.length}}e.ended=true;art(t)}function art(t){var e=t._readableState;e.needReadable=false;if(!e.emittedReadable){Qst("emitReadable",e.flowing);e.emittedReadable=true;if(e.sync)$(crt,t);else crt(t)}}function crt(t){Qst("emit readable");t.emit("readable");mrt(t)}function urt(t,e){if(!e.readingMore){e.readingMore=true;$(lrt,t,e)}}function lrt(t,e){var n=e.length;while(!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark){Qst("maybeReadMore read 0");t.read(0);if(n===e.length)break;else n=e.length}e.readingMore=false}Kst.prototype._read=function(t){this.emit("error",new Error("not implemented"))};Kst.prototype.pipe=function(t,e){var n=this;var s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t);break}s.pipesCount+=1;Qst("pipe count=%d opts=%j",s.pipesCount,e);var r=!e||e.end!==false;var i=r?a:l;if(s.endEmitted)$(i);else n.once("end",i);t.on("unpipe",o);function o(t){Qst("onunpipe");if(t===n){l()}}function a(){Qst("onend");t.end()}var c=frt(n);t.on("drain",c);var u=false;function l(){Qst("cleanup");t.removeListener("close",p);t.removeListener("finish",m);t.removeListener("drain",c);t.removeListener("error",d);t.removeListener("unpipe",o);n.removeListener("end",a);n.removeListener("end",l);n.removeListener("data",h);u=true;if(s.awaitDrain&&(!t._writableState||t._writableState.needDrain))c()}var f=false;n.on("data",h);function h(e){Qst("ondata");f=false;var r=t.write(e);if(false===r&&!f){if((s.pipesCount===1&&s.pipes===t||s.pipesCount>1&&krt(s.pipes,t)!==-1)&&!u){Qst("false write response, pause",n._readableState.awaitDrain);n._readableState.awaitDrain++;f=true}n.pause()}}function d(e){Qst("onerror",e);b();t.removeListener("error",d);if(qst(t,"error")===0)t.emit("error",e)}Xst(t,"error",d);function p(){t.removeListener("finish",m);b()}t.once("close",p);function m(){Qst("onfinish");t.removeListener("close",p);b()}t.once("finish",m);function b(){Qst("unpipe");n.unpipe(t)}t.emit("pipe",n);if(!s.flowing){Qst("pipe resume");n.resume()}return t};function frt(t){return function(){var e=t._readableState;Qst("pipeOnDrain",e.awaitDrain);if(e.awaitDrain)e.awaitDrain--;if(e.awaitDrain===0&&t.listeners("data").length){e.flowing=true;mrt(t)}}}Kst.prototype.unpipe=function(t){var e=this._readableState;if(e.pipesCount===0)return this;if(e.pipesCount===1){if(t&&t!==e.pipes)return this;if(!t)t=e.pipes;e.pipes=null;e.pipesCount=0;e.flowing=false;if(t)t.emit("unpipe",this);return this}if(!t){var n=e.pipes;var s=e.pipesCount;e.pipes=null;e.pipesCount=0;e.flowing=false;for(var r=0;r<s;r++){n[r].emit("unpipe",this)}return this}var i=krt(e.pipes,t);if(i===-1)return this;e.pipes.splice(i,1);e.pipesCount-=1;if(e.pipesCount===1)e.pipes=e.pipes[0];t.emit("unpipe",this);return this};Kst.prototype.on=function(t,e){var n=$st.prototype.on.call(this,t,e);if(t==="data"){if(this._readableState.flowing!==false)this.resume()}else if(t==="readable"){var s=this._readableState;if(!s.endEmitted&&!s.readableListening){s.readableListening=s.needReadable=true;s.emittedReadable=false;if(!s.reading){$(hrt,this)}else if(s.length){art(this)}}}return n};Kst.prototype.addListener=Kst.prototype.on;function hrt(t){Qst("readable nexttick read 0");t.read(0)}Kst.prototype.resume=function(){var t=this._readableState;if(!t.flowing){Qst("resume");t.flowing=true;drt(this,t)}return this};function drt(t,e){if(!e.resumeScheduled){e.resumeScheduled=true;$(prt,t,e)}}function prt(t,e){if(!e.reading){Qst("resume read 0");t.read(0)}e.resumeScheduled=false;e.awaitDrain=0;t.emit("resume");mrt(t);if(e.flowing&&!e.reading)t.read(0)}Kst.prototype.pause=function(){Qst("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){Qst("pause");this._readableState.flowing=false;this.emit("pause")}return this};function mrt(t){var e=t._readableState;Qst("flow",e.flowing);while(e.flowing&&t.read()!==null){}}Kst.prototype.wrap=function(t){var e=this._readableState;var n=false;var s=this;t.on("end",(function(){Qst("wrapped end");if(e.decoder&&!e.ended){var t=e.decoder.end();if(t&&t.length)s.push(t)}s.push(null)}));t.on("data",(function(r){Qst("wrapped data");if(e.decoder)r=e.decoder.write(r);if(e.objectMode&&(r===null||r===undefined))return;else if(!e.objectMode&&(!r||!r.length))return;var i=s.push(r);if(!i){n=true;t.pause()}}));for(var r in t){if(this[r]===undefined&&typeof t[r]==="function"){this[r]=function(e){return function(){return t[e].apply(t,arguments)}}(r)}}var i=["error","close","destroy","pause","resume"];Nrt(i,(function(e){t.on(e,s.emit.bind(s,e))}));s._read=function(e){Qst("wrapped _read",e);if(n){n=false;t.resume()}};return s};Kst._fromList=brt;function brt(t,e){if(e.length===0)return null;var n;if(e.objectMode)n=e.buffer.shift();else if(!t||t>=e.length){if(e.decoder)n=e.buffer.join("");else if(e.buffer.length===1)n=e.buffer.head.data;else n=e.buffer.concat(e.length);e.buffer.clear()}else{n=yrt(t,e.buffer,e.decoder)}return n}function yrt(t,e,n){var s;if(t<e.head.data.length){s=e.head.data.slice(0,t);e.head.data=e.head.data.slice(t)}else if(t===e.head.data.length){s=e.shift()}else{s=n?wrt(t,e):grt(t,e)}return s}function wrt(t,e){var n=e.head;var s=1;var r=n.data;t-=r.length;while(n=n.next){var i=n.data;var o=t>i.length?i.length:t;if(o===i.length)r+=i;else r+=i.slice(0,t);t-=o;if(t===0){if(o===i.length){++s;if(n.next)e.head=n.next;else e.head=e.tail=null}else{e.head=n;n.data=i.slice(o)}break}++s}e.length-=s;return r}function grt(t,e){var n=uc.allocUnsafe(t);var s=e.head;var r=1;s.data.copy(n);t-=s.data.length;while(s=s.next){var i=s.data;var o=t>i.length?i.length:t;i.copy(n,n.length-t,0,o);t-=o;if(t===0){if(o===i.length){++r;if(s.next)e.head=s.next;else e.head=e.tail=null}else{e.head=s;s.data=i.slice(o)}break}++r}e.length-=r;return n}function vrt(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!e.endEmitted){e.ended=true;$(xrt,e,t)}}function xrt(t,e){if(!t.endEmitted&&t.length===0){t.endEmitted=true;e.readable=false;e.emit("end")}}function Nrt(t,e){for(var n=0,s=t.length;n<s;n++){e(t[n],n)}}function krt(t,e){for(var n=0,s=t.length;n<s;n++){if(t[n]===e)return n}return-1}Irt.WritableState=Srt;jst.inherits(Irt,$st);function Crt(){}function $rt(t,e,n){this.chunk=t;this.encoding=e;this.callback=n;this.next=null}function Srt(t,e){Object.defineProperty(this,"buffer",{get:jst.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")});t=t||{};this.objectMode=!!t.objectMode;if(e instanceof Hrt)this.objectMode=this.objectMode||!!t.writableObjectMode;var n=t.highWaterMark;var s=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:s;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var r=t.decodeStrings===false;this.decodeStrings=!r;this.defaultEncoding=t.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(t){Lrt(e,t)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new Grt(this)}Srt.prototype.getBuffer=function t(){var e=this.bufferedRequest;var n=[];while(e){n.push(e);e=e.next}return n};function Irt(t){if(!(this instanceof Irt)&&!(this instanceof Hrt))return new Irt(t);this._writableState=new Srt(t,this);this.writable=true;if(t){if(typeof t.write==="function")this._write=t.write;if(typeof t.writev==="function")this._writev=t.writev}$st.call(this)}Irt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ert(t,e){var n=new Error("write after end");t.emit("error",n);$(e,n)}function Mrt(t,e,n,s){var r=true;var i=false;if(n===null){i=new TypeError("May not write null values to stream")}else if(!uc.isBuffer(n)&&typeof n!=="string"&&n!==undefined&&!e.objectMode){i=new TypeError("Invalid non-string/buffer chunk")}if(i){t.emit("error",i);$(s,i);r=false}return r}Irt.prototype.write=function(t,e,n){var s=this._writableState;var r=false;if(typeof e==="function"){n=e;e=null}if(uc.isBuffer(t))e="buffer";else if(!e)e=s.defaultEncoding;if(typeof n!=="function")n=Crt;if(s.ended)Ert(this,n);else if(Mrt(this,s,t,n)){s.pendingcb++;r=Art(this,s,t,e,n)}return r};Irt.prototype.cork=function(){var t=this._writableState;t.corked++};Irt.prototype.uncork=function(){var t=this._writableState;if(t.corked){t.corked--;if(!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest)zrt(this,t)}};Irt.prototype.setDefaultEncoding=function t(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function Trt(t,e,n){if(!t.objectMode&&t.decodeStrings!==false&&typeof e==="string"){e=uc.from(e,n)}return e}function Art(t,e,n,s,r){n=Trt(e,n,s);if(uc.isBuffer(n))s="buffer";var i=e.objectMode?1:n.length;e.length+=i;var o=e.length<e.highWaterMark;if(!o)e.needDrain=true;if(e.writing||e.corked){var a=e.lastBufferedRequest;e.lastBufferedRequest=new $rt(n,s,r);if(a){a.next=e.lastBufferedRequest}else{e.bufferedRequest=e.lastBufferedRequest}e.bufferedRequestCount+=1}else{Drt(t,e,false,i,n,s,r)}return o}function Drt(t,e,n,s,r,i,o){e.writelen=s;e.writecb=o;e.writing=true;e.sync=true;if(n)t._writev(r,e.onwrite);else t._write(r,i,e.onwrite);e.sync=false}function Rrt(t,e,n,s,r){--e.pendingcb;if(n)$(r,s);else r(s);t._writableState.errorEmitted=true;t.emit("error",s)}function Ort(t){t.writing=false;t.writecb=null;t.length-=t.writelen;t.writelen=0}function Lrt(t,e){var n=t._writableState;var s=n.sync;var r=n.writecb;Ort(n);if(e)Rrt(t,n,s,e,r);else{var i=jrt(n);if(!i&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest){zrt(t,n)}if(s){$(_rt,t,n,i,r)}else{_rt(t,n,i,r)}}}function _rt(t,e,n,s){if(!n)Frt(t,e);e.pendingcb--;s();Brt(t,e)}function Frt(t,e){if(e.length===0&&e.needDrain){e.needDrain=false;t.emit("drain")}}function zrt(t,e){e.bufferProcessing=true;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var s=e.bufferedRequestCount;var r=new Array(s);var i=e.corkedRequestsFree;i.entry=n;var o=0;while(n){r[o]=n;n=n.next;o+=1}Drt(t,e,true,e.length,r,"",i.finish);e.pendingcb++;e.lastBufferedRequest=null;if(i.next){e.corkedRequestsFree=i.next;i.next=null}else{e.corkedRequestsFree=new Grt(e)}}else{while(n){var a=n.chunk;var c=n.encoding;var u=n.callback;var l=e.objectMode?1:a.length;Drt(t,e,false,l,a,c,u);n=n.next;if(e.writing){break}}if(n===null)e.lastBufferedRequest=null}e.bufferedRequestCount=0;e.bufferedRequest=n;e.bufferProcessing=false}Irt.prototype._write=function(t,e,n){n(new Error("not implemented"))};Irt.prototype._writev=null;Irt.prototype.end=function(t,e,n){var s=this._writableState;if(typeof t==="function"){n=t;t=null;e=null}else if(typeof e==="function"){n=e;e=null}if(t!==null&&t!==undefined)this.write(t,e);if(s.corked){s.corked=1;this.uncork()}if(!s.ending&&!s.finished)Wrt(this,s,n)};function jrt(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Prt(t,e){if(!e.prefinished){e.prefinished=true;t.emit("prefinish")}}function Brt(t,e){var n=jrt(e);if(n){if(e.pendingcb===0){Prt(t,e);e.finished=true;t.emit("finish")}else{Prt(t,e)}}return n}function Wrt(t,e,n){e.ending=true;Brt(t,e);if(n){if(e.finished)$(n);else t.once("finish",n)}e.ended=true;t.writable=false}function Grt(t){var e=this;this.next=null;this.entry=null;this.finish=function(n){var s=e.entry;e.entry=null;while(s){var r=s.callback;t.pendingcb--;r(n);s=s.next}if(t.corkedRequestsFree){t.corkedRequestsFree.next=e}else{t.corkedRequestsFree=e}}}jst.inherits(Hrt,Kst);var Urt=Object.keys(Irt.prototype);for(var Vrt=0;Vrt<Urt.length;Vrt++){var Yrt=Urt[Vrt];if(!Hrt.prototype[Yrt])Hrt.prototype[Yrt]=Irt.prototype[Yrt]}function Hrt(t){if(!(this instanceof Hrt))return new Hrt(t);Kst.call(this,t);Irt.call(this,t);if(t&&t.readable===false)this.readable=false;if(t&&t.writable===false)this.writable=false;this.allowHalfOpen=true;if(t&&t.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",Zrt)}function Zrt(){if(this.allowHalfOpen||this._writableState.ended)return;$(Qrt,this)}function Qrt(t){t.end()}jst.inherits(Jrt,Hrt);function Xrt(t){this.afterTransform=function(e,n){return qrt(t,e,n)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null;this.writeencoding=null}function qrt(t,e,n){var s=t._transformState;s.transforming=false;var r=s.writecb;if(!r)return t.emit("error",new Error("no writecb in Transform class"));s.writechunk=null;s.writecb=null;if(n!==null&&n!==undefined)t.push(n);r(e);var i=t._readableState;i.reading=false;if(i.needReadable||i.length<i.highWaterMark){t._read(i.highWaterMark)}}function Jrt(t){if(!(this instanceof Jrt))return new Jrt(t);Hrt.call(this,t);this._transformState=new Xrt(this);var e=this;this._readableState.needReadable=true;this._readableState.sync=false;if(t){if(typeof t.transform==="function")this._transform=t.transform;if(typeof t.flush==="function")this._flush=t.flush}this.once("prefinish",(function(){if(typeof this._flush==="function")this._flush((function(t){Krt(e,t)}));else Krt(e)}))}Jrt.prototype.push=function(t,e){this._transformState.needTransform=false;return Hrt.prototype.push.call(this,t,e)};Jrt.prototype._transform=function(t,e,n){throw new Error("Not implemented")};Jrt.prototype._write=function(t,e,n){var s=this._transformState;s.writecb=n;s.writechunk=t;s.writeencoding=e;if(!s.transforming){var r=this._readableState;if(s.needTransform||r.needReadable||r.length<r.highWaterMark)this._read(r.highWaterMark)}};Jrt.prototype._read=function(t){var e=this._transformState;if(e.writechunk!==null&&e.writecb&&!e.transforming){e.transforming=true;this._transform(e.writechunk,e.writeencoding,e.afterTransform)}else{e.needTransform=true}};function Krt(t,e){if(e)return t.emit("error",e);var n=t._writableState;var s=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(s.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}jst.inherits(tit,Jrt);function tit(t){if(!(this instanceof tit))return new tit(t);Jrt.call(this,t)}tit.prototype._transform=function(t,e,n){n(null,t)};jst.inherits(eit,$st);eit.Readable=Kst;eit.Writable=Irt;eit.Duplex=Hrt;eit.Transform=Jrt;eit.PassThrough=tit;eit.Stream=eit;function eit(){$st.call(this)}eit.prototype.pipe=function(t,e){var n=this;function s(e){if(t.writable){if(false===t.write(e)&&n.pause){n.pause()}}}n.on("data",s);function r(){if(n.readable&&n.resume){n.resume()}}t.on("drain",r);if(!t._isStdio&&(!e||e.end!==false)){n.on("end",o);n.on("close",a)}var i=false;function o(){if(i)return;i=true;t.end()}function a(){if(i)return;i=true;if(typeof t.destroy==="function")t.destroy()}function c(t){u();if($st.listenerCount(this,"error")===0){throw t}}n.on("error",c);t.on("error",c);function u(){n.removeListener("data",s);t.removeListener("drain",r);n.removeListener("end",o);n.removeListener("close",a);n.removeListener("error",c);t.removeListener("error",c);n.removeListener("end",u);n.removeListener("close",u);t.removeListener("close",u)}n.on("end",u);n.on("close",u);t.on("close",u);t.emit("pipe",n);return t};var nit=Object.freeze({__proto__:null,Duplex:Hrt,PassThrough:tit,Readable:Kst,Stream:eit,Transform:Jrt,Writable:Irt,default:eit});var sit=f(nit);var rit={exports:{}};var iit={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function oit(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}function ait(t,e,n,s,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+s),r);return}for(var i=0;i<s;i++){t[r+i]=e[n+i]}}var cit=Uint8Array;var uit=Uint16Array;var lit=Int32Array;var fit=4;var hit=0;var dit=1;var pit=2;function mit(t){var e=t.length;while(--e>=0){t[e]=0}}var bit=0;var yit=1;var wit=2;var git=3;var vit=258;var xit=29;var Nit=256;var kit=Nit+1+xit;var Cit=30;var $it=19;var Sit=2*kit+1;var Iit=15;var Eit=16;var Mit=7;var Tit=256;var Ait=16;var Dit=17;var Rit=18;var Oit=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var Lit=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var _it=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var Fit=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var zit=512;var jit=new Array((kit+2)*2);mit(jit);var Pit=new Array(Cit*2);mit(Pit);var Bit=new Array(zit);mit(Bit);var Wit=new Array(vit-git+1);mit(Wit);var Git=new Array(xit);mit(Git);var Uit=new Array(Cit);mit(Uit);function Vit(t,e,n,s,r){this.static_tree=t;this.extra_bits=e;this.extra_base=n;this.elems=s;this.max_length=r;this.has_stree=t&&t.length}var Yit;var Hit;var Zit;function Qit(t,e){this.dyn_tree=t;this.max_code=0;this.stat_desc=e}function Xit(t){return t<256?Bit[t]:Bit[256+(t>>>7)]}function qit(t,e){t.pending_buf[t.pending++]=e&255;t.pending_buf[t.pending++]=e>>>8&255}function Jit(t,e,n){if(t.bi_valid>Eit-n){t.bi_buf|=e<<t.bi_valid&65535;qit(t,t.bi_buf);t.bi_buf=e>>Eit-t.bi_valid;t.bi_valid+=n-Eit}else{t.bi_buf|=e<<t.bi_valid&65535;t.bi_valid+=n}}function Kit(t,e,n){Jit(t,n[e*2],n[e*2+1])}function tot(t,e){var n=0;do{n|=t&1;t>>>=1;n<<=1}while(--e>0);return n>>>1}function eot(t){if(t.bi_valid===16){qit(t,t.bi_buf);t.bi_buf=0;t.bi_valid=0}else if(t.bi_valid>=8){t.pending_buf[t.pending++]=t.bi_buf&255;t.bi_buf>>=8;t.bi_valid-=8}}function not(t,e){var n=e.dyn_tree;var s=e.max_code;var r=e.stat_desc.static_tree;var i=e.stat_desc.has_stree;var o=e.stat_desc.extra_bits;var a=e.stat_desc.extra_base;var c=e.stat_desc.max_length;var u;var l,f;var h;var d;var p;var m=0;for(h=0;h<=Iit;h++){t.bl_count[h]=0}n[t.heap[t.heap_max]*2+1]=0;for(u=t.heap_max+1;u<Sit;u++){l=t.heap[u];h=n[n[l*2+1]*2+1]+1;if(h>c){h=c;m++}n[l*2+1]=h;if(l>s){continue}t.bl_count[h]++;d=0;if(l>=a){d=o[l-a]}p=n[l*2];t.opt_len+=p*(h+d);if(i){t.static_len+=p*(r[l*2+1]+d)}}if(m===0){return}do{h=c-1;while(t.bl_count[h]===0){h--}t.bl_count[h]--;t.bl_count[h+1]+=2;t.bl_count[c]--;m-=2}while(m>0);for(h=c;h!==0;h--){l=t.bl_count[h];while(l!==0){f=t.heap[--u];if(f>s){continue}if(n[f*2+1]!==h){t.opt_len+=(h-n[f*2+1])*n[f*2];n[f*2+1]=h}l--}}}function sot(t,e,n){var s=new Array(Iit+1);var r=0;var i;var o;for(i=1;i<=Iit;i++){s[i]=r=r+n[i-1]<<1}for(o=0;o<=e;o++){var a=t[o*2+1];if(a===0){continue}t[o*2]=tot(s[a]++,a)}}function rot(){var t;var e;var n;var s;var r;var i=new Array(Iit+1);n=0;for(s=0;s<xit-1;s++){Git[s]=n;for(t=0;t<1<<Oit[s];t++){Wit[n++]=s}}Wit[n-1]=s;r=0;for(s=0;s<16;s++){Uit[s]=r;for(t=0;t<1<<Lit[s];t++){Bit[r++]=s}}r>>=7;for(;s<Cit;s++){Uit[s]=r<<7;for(t=0;t<1<<Lit[s]-7;t++){Bit[256+r++]=s}}for(e=0;e<=Iit;e++){i[e]=0}t=0;while(t<=143){jit[t*2+1]=8;t++;i[8]++}while(t<=255){jit[t*2+1]=9;t++;i[9]++}while(t<=279){jit[t*2+1]=7;t++;i[7]++}while(t<=287){jit[t*2+1]=8;t++;i[8]++}sot(jit,kit+1,i);for(t=0;t<Cit;t++){Pit[t*2+1]=5;Pit[t*2]=tot(t,5)}Yit=new Vit(jit,Oit,Nit+1,kit,Iit);Hit=new Vit(Pit,Lit,0,Cit,Iit);Zit=new Vit(new Array(0),_it,0,$it,Mit)}function iot(t){var e;for(e=0;e<kit;e++){t.dyn_ltree[e*2]=0}for(e=0;e<Cit;e++){t.dyn_dtree[e*2]=0}for(e=0;e<$it;e++){t.bl_tree[e*2]=0}t.dyn_ltree[Tit*2]=1;t.opt_len=t.static_len=0;t.last_lit=t.matches=0}function oot(t){if(t.bi_valid>8){qit(t,t.bi_buf)}else if(t.bi_valid>0){t.pending_buf[t.pending++]=t.bi_buf}t.bi_buf=0;t.bi_valid=0}function aot(t,e,n,s){oot(t);{qit(t,n);qit(t,~n)}ait(t.pending_buf,t.window,e,n,t.pending);t.pending+=n}function cot(t,e,n,s){var r=e*2;var i=n*2;return t[r]<t[i]||t[r]===t[i]&&s[e]<=s[n]}function uot(t,e,n){var s=t.heap[n];var r=n<<1;while(r<=t.heap_len){if(r<t.heap_len&&cot(e,t.heap[r+1],t.heap[r],t.depth)){r++}if(cot(e,s,t.heap[r],t.depth)){break}t.heap[n]=t.heap[r];n=r;r<<=1}t.heap[n]=s}function lot(t,e,n){var s;var r;var i=0;var o;var a;if(t.last_lit!==0){do{s=t.pending_buf[t.d_buf+i*2]<<8|t.pending_buf[t.d_buf+i*2+1];r=t.pending_buf[t.l_buf+i];i++;if(s===0){Kit(t,r,e)}else{o=Wit[r];Kit(t,o+Nit+1,e);a=Oit[o];if(a!==0){r-=Git[o];Jit(t,r,a)}s--;o=Xit(s);Kit(t,o,n);a=Lit[o];if(a!==0){s-=Uit[o];Jit(t,s,a)}}}while(i<t.last_lit)}Kit(t,Tit,e)}function fot(t,e){var n=e.dyn_tree;var s=e.stat_desc.static_tree;var r=e.stat_desc.has_stree;var i=e.stat_desc.elems;var o,a;var c=-1;var u;t.heap_len=0;t.heap_max=Sit;for(o=0;o<i;o++){if(n[o*2]!==0){t.heap[++t.heap_len]=c=o;t.depth[o]=0}else{n[o*2+1]=0}}while(t.heap_len<2){u=t.heap[++t.heap_len]=c<2?++c:0;n[u*2]=1;t.depth[u]=0;t.opt_len--;if(r){t.static_len-=s[u*2+1]}}e.max_code=c;for(o=t.heap_len>>1;o>=1;o--){uot(t,n,o)}u=i;do{o=t.heap[1];t.heap[1]=t.heap[t.heap_len--];uot(t,n,1);a=t.heap[1];t.heap[--t.heap_max]=o;t.heap[--t.heap_max]=a;n[u*2]=n[o*2]+n[a*2];t.depth[u]=(t.depth[o]>=t.depth[a]?t.depth[o]:t.depth[a])+1;n[o*2+1]=n[a*2+1]=u;t.heap[1]=u++;uot(t,n,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1];not(t,e);sot(n,c,t.bl_count)}function hot(t,e,n){var s;var r=-1;var i;var o=e[0*2+1];var a=0;var c=7;var u=4;if(o===0){c=138;u=3}e[(n+1)*2+1]=65535;for(s=0;s<=n;s++){i=o;o=e[(s+1)*2+1];if(++a<c&&i===o){continue}else if(a<u){t.bl_tree[i*2]+=a}else if(i!==0){if(i!==r){t.bl_tree[i*2]++}t.bl_tree[Ait*2]++}else if(a<=10){t.bl_tree[Dit*2]++}else{t.bl_tree[Rit*2]++}a=0;r=i;if(o===0){c=138;u=3}else if(i===o){c=6;u=3}else{c=7;u=4}}}function dot(t,e,n){var s;var r=-1;var i;var o=e[0*2+1];var a=0;var c=7;var u=4;if(o===0){c=138;u=3}for(s=0;s<=n;s++){i=o;o=e[(s+1)*2+1];if(++a<c&&i===o){continue}else if(a<u){do{Kit(t,i,t.bl_tree)}while(--a!==0)}else if(i!==0){if(i!==r){Kit(t,i,t.bl_tree);a--}Kit(t,Ait,t.bl_tree);Jit(t,a-3,2)}else if(a<=10){Kit(t,Dit,t.bl_tree);Jit(t,a-3,3)}else{Kit(t,Rit,t.bl_tree);Jit(t,a-11,7)}a=0;r=i;if(o===0){c=138;u=3}else if(i===o){c=6;u=3}else{c=7;u=4}}}function pot(t){var e;hot(t,t.dyn_ltree,t.l_desc.max_code);hot(t,t.dyn_dtree,t.d_desc.max_code);fot(t,t.bl_desc);for(e=$it-1;e>=3;e--){if(t.bl_tree[Fit[e]*2+1]!==0){break}}t.opt_len+=3*(e+1)+5+5+4;return e}function mot(t,e,n,s){var r;Jit(t,e-257,5);Jit(t,n-1,5);Jit(t,s-4,4);for(r=0;r<s;r++){Jit(t,t.bl_tree[Fit[r]*2+1],3)}dot(t,t.dyn_ltree,e-1);dot(t,t.dyn_dtree,n-1)}function bot(t){var e=4093624447;var n;for(n=0;n<=31;n++,e>>>=1){if(e&1&&t.dyn_ltree[n*2]!==0){return hit}}if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0){return dit}for(n=32;n<Nit;n++){if(t.dyn_ltree[n*2]!==0){return dit}}return hit}var yot=false;function wot(t){if(!yot){rot();yot=true}t.l_desc=new Qit(t.dyn_ltree,Yit);t.d_desc=new Qit(t.dyn_dtree,Hit);t.bl_desc=new Qit(t.bl_tree,Zit);t.bi_buf=0;t.bi_valid=0;iot(t)}function got(t,e,n,s){Jit(t,(bit<<1)+(s?1:0),3);aot(t,e,n)}function vot(t){Jit(t,yit<<1,3);Kit(t,Tit,jit);eot(t)}function xot(t,e,n,s){var r,i;var o=0;if(t.level>0){if(t.strm.data_type===pit){t.strm.data_type=bot(t)}fot(t,t.l_desc);fot(t,t.d_desc);o=pot(t);r=t.opt_len+3+7>>>3;i=t.static_len+3+7>>>3;if(i<=r){r=i}}else{r=i=n+5}if(n+4<=r&&e!==-1){got(t,e,n,s)}else if(t.strategy===fit||i===r){Jit(t,(yit<<1)+(s?1:0),3);lot(t,jit,Pit)}else{Jit(t,(wit<<1)+(s?1:0),3);mot(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1);lot(t,t.dyn_ltree,t.dyn_dtree)}iot(t);if(s){oot(t)}}function Not(t,e,n){t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255;t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255;t.pending_buf[t.l_buf+t.last_lit]=n&255;t.last_lit++;if(e===0){t.dyn_ltree[n*2]++}else{t.matches++;e--;t.dyn_ltree[(Wit[n]+Nit+1)*2]++;t.dyn_dtree[Xit(e)*2]++}return t.last_lit===t.lit_bufsize-1}function kot(t,e,n,s){var r=t&65535|0,i=t>>>16&65535|0,o=0;while(n!==0){o=n>2e3?2e3:n;n-=o;do{r=r+e[s++]|0;i=i+r|0}while(--o);r%=65521;i%=65521}return r|i<<16|0}function Cot(){var t,e=[];for(var n=0;n<256;n++){t=n;for(var s=0;s<8;s++){t=t&1?3988292384^t>>>1:t>>>1}e[n]=t}return e}var $ot=Cot();function Sot(t,e,n,s){var r=$ot,i=s+n;t^=-1;for(var o=s;o<i;o++){t=t>>>8^r[(t^e[o])&255]}return t^-1}var Iot=0;var Eot=1;var Mot=3;var Tot=4;var Aot=5;var Dot=0;var Rot=1;var Oot=-2;var Lot=-3;var _ot=-5;var Fot=-1;var zot=1;var jot=2;var Pot=3;var Bot=4;var Wot=2;var Got=8;var Uot=9;var Vot=29;var Yot=256;var Hot=Yot+1+Vot;var Zot=30;var Qot=19;var Xot=2*Hot+1;var qot=15;var Jot=3;var Kot=258;var tat=Kot+Jot+1;var eat=32;var nat=42;var sat=69;var rat=73;var iat=91;var oat=103;var aat=113;var cat=666;var uat=1;var lat=2;var fat=3;var hat=4;var dat=3;function pat(t,e){t.msg=iit[e];return e}function mat(t){return(t<<1)-(t>4?9:0)}function bat(t){var e=t.length;while(--e>=0){t[e]=0}}function yat(t){var e=t.state;var n=e.pending;if(n>t.avail_out){n=t.avail_out}if(n===0){return}ait(t.output,e.pending_buf,e.pending_out,n,t.next_out);t.next_out+=n;e.pending_out+=n;t.total_out+=n;t.avail_out-=n;e.pending-=n;if(e.pending===0){e.pending_out=0}}function wat(t,e){xot(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e);t.block_start=t.strstart;yat(t.strm)}function gat(t,e){t.pending_buf[t.pending++]=e}function vat(t,e){t.pending_buf[t.pending++]=e>>>8&255;t.pending_buf[t.pending++]=e&255}function xat(t,e,n,s){var r=t.avail_in;if(r>s){r=s}if(r===0){return 0}t.avail_in-=r;ait(e,t.input,t.next_in,r,n);if(t.state.wrap===1){t.adler=kot(t.adler,e,r,n)}else if(t.state.wrap===2){t.adler=Sot(t.adler,e,r,n)}t.next_in+=r;t.total_in+=r;return r}function Nat(t,e){var n=t.max_chain_length;var s=t.strstart;var r;var i;var o=t.prev_length;var a=t.nice_match;var c=t.strstart>t.w_size-tat?t.strstart-(t.w_size-tat):0;var u=t.window;var l=t.w_mask;var f=t.prev;var h=t.strstart+Kot;var d=u[s+o-1];var p=u[s+o];if(t.prev_length>=t.good_match){n>>=2}if(a>t.lookahead){a=t.lookahead}do{r=e;if(u[r+o]!==p||u[r+o-1]!==d||u[r]!==u[s]||u[++r]!==u[s+1]){continue}s+=2;r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<h);i=Kot-(h-s);s=h-Kot;if(i>o){t.match_start=e;o=i;if(i>=a){break}d=u[s+o-1];p=u[s+o]}}while((e=f[e&l])>c&&--n!==0);if(o<=t.lookahead){return o}return t.lookahead}function kat(t){var e=t.w_size;var n,s,r,i,o;do{i=t.window_size-t.lookahead-t.strstart;if(t.strstart>=e+(e-tat)){ait(t.window,t.window,e,e,0);t.match_start-=e;t.strstart-=e;t.block_start-=e;s=t.hash_size;n=s;do{r=t.head[--n];t.head[n]=r>=e?r-e:0}while(--s);s=e;n=s;do{r=t.prev[--n];t.prev[n]=r>=e?r-e:0}while(--s);i+=e}if(t.strm.avail_in===0){break}s=xat(t.strm,t.window,t.strstart+t.lookahead,i);t.lookahead+=s;if(t.lookahead+t.insert>=Jot){o=t.strstart-t.insert;t.ins_h=t.window[o];t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+1])&t.hash_mask;while(t.insert){t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+Jot-1])&t.hash_mask;t.prev[o&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=o;o++;t.insert--;if(t.lookahead+t.insert<Jot){break}}}}while(t.lookahead<tat&&t.strm.avail_in!==0)}function Cat(t,e){var n=65535;if(n>t.pending_buf_size-5){n=t.pending_buf_size-5}for(;;){if(t.lookahead<=1){kat(t);if(t.lookahead===0&&e===Iot){return uat}if(t.lookahead===0){break}}t.strstart+=t.lookahead;t.lookahead=0;var s=t.block_start+n;if(t.strstart===0||t.strstart>=s){t.lookahead=t.strstart-s;t.strstart=s;wat(t,false);if(t.strm.avail_out===0){return uat}}if(t.strstart-t.block_start>=t.w_size-tat){wat(t,false);if(t.strm.avail_out===0){return uat}}}t.insert=0;if(e===Tot){wat(t,true);if(t.strm.avail_out===0){return fat}return hat}if(t.strstart>t.block_start){wat(t,false);if(t.strm.avail_out===0){return uat}}return uat}function $at(t,e){var n;var s;for(;;){if(t.lookahead<tat){kat(t);if(t.lookahead<tat&&e===Iot){return uat}if(t.lookahead===0){break}}n=0;if(t.lookahead>=Jot){t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Jot-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}if(n!==0&&t.strstart-n<=t.w_size-tat){t.match_length=Nat(t,n)}if(t.match_length>=Jot){s=Not(t,t.strstart-t.match_start,t.match_length-Jot);t.lookahead-=t.match_length;if(t.match_length<=t.max_lazy_match&&t.lookahead>=Jot){t.match_length--;do{t.strstart++;t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Jot-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}while(--t.match_length!==0);t.strstart++}else{t.strstart+=t.match_length;t.match_length=0;t.ins_h=t.window[t.strstart];t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask}}else{s=Not(t,0,t.window[t.strstart]);t.lookahead--;t.strstart++}if(s){wat(t,false);if(t.strm.avail_out===0){return uat}}}t.insert=t.strstart<Jot-1?t.strstart:Jot-1;if(e===Tot){wat(t,true);if(t.strm.avail_out===0){return fat}return hat}if(t.last_lit){wat(t,false);if(t.strm.avail_out===0){return uat}}return lat}function Sat(t,e){var n;var s;var r;for(;;){if(t.lookahead<tat){kat(t);if(t.lookahead<tat&&e===Iot){return uat}if(t.lookahead===0){break}}n=0;if(t.lookahead>=Jot){t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Jot-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}t.prev_length=t.match_length;t.prev_match=t.match_start;t.match_length=Jot-1;if(n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-tat){t.match_length=Nat(t,n);if(t.match_length<=5&&(t.strategy===zot||t.match_length===Jot&&t.strstart-t.match_start>4096)){t.match_length=Jot-1}}if(t.prev_length>=Jot&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-Jot;s=Not(t,t.strstart-1-t.prev_match,t.prev_length-Jot);t.lookahead-=t.prev_length-1;t.prev_length-=2;do{if(++t.strstart<=r){t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Jot-1])&t.hash_mask;n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h];t.head[t.ins_h]=t.strstart}}while(--t.prev_length!==0);t.match_available=0;t.match_length=Jot-1;t.strstart++;if(s){wat(t,false);if(t.strm.avail_out===0){return uat}}}else if(t.match_available){s=Not(t,0,t.window[t.strstart-1]);if(s){wat(t,false)}t.strstart++;t.lookahead--;if(t.strm.avail_out===0){return uat}}else{t.match_available=1;t.strstart++;t.lookahead--}}if(t.match_available){s=Not(t,0,t.window[t.strstart-1]);t.match_available=0}t.insert=t.strstart<Jot-1?t.strstart:Jot-1;if(e===Tot){wat(t,true);if(t.strm.avail_out===0){return fat}return hat}if(t.last_lit){wat(t,false);if(t.strm.avail_out===0){return uat}}return lat}function Iat(t,e){var n;var s;var r,i;var o=t.window;for(;;){if(t.lookahead<=Kot){kat(t);if(t.lookahead<=Kot&&e===Iot){return uat}if(t.lookahead===0){break}}t.match_length=0;if(t.lookahead>=Jot&&t.strstart>0){r=t.strstart-1;s=o[r];if(s===o[++r]&&s===o[++r]&&s===o[++r]){i=t.strstart+Kot;do{}while(s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&s===o[++r]&&r<i);t.match_length=Kot-(i-r);if(t.match_length>t.lookahead){t.match_length=t.lookahead}}}if(t.match_length>=Jot){n=Not(t,1,t.match_length-Jot);t.lookahead-=t.match_length;t.strstart+=t.match_length;t.match_length=0}else{n=Not(t,0,t.window[t.strstart]);t.lookahead--;t.strstart++}if(n){wat(t,false);if(t.strm.avail_out===0){return uat}}}t.insert=0;if(e===Tot){wat(t,true);if(t.strm.avail_out===0){return fat}return hat}if(t.last_lit){wat(t,false);if(t.strm.avail_out===0){return uat}}return lat}function Eat(t,e){var n;for(;;){if(t.lookahead===0){kat(t);if(t.lookahead===0){if(e===Iot){return uat}break}}t.match_length=0;n=Not(t,0,t.window[t.strstart]);t.lookahead--;t.strstart++;if(n){wat(t,false);if(t.strm.avail_out===0){return uat}}}t.insert=0;if(e===Tot){wat(t,true);if(t.strm.avail_out===0){return fat}return hat}if(t.last_lit){wat(t,false);if(t.strm.avail_out===0){return uat}}return lat}function Mat(t,e,n,s,r){this.good_length=t;this.max_lazy=e;this.nice_length=n;this.max_chain=s;this.func=r}var Tat;Tat=[new Mat(0,0,0,0,Cat),new Mat(4,4,8,4,$at),new Mat(4,5,16,8,$at),new Mat(4,6,32,32,$at),new Mat(4,4,16,16,Sat),new Mat(8,16,32,32,Sat),new Mat(8,16,128,128,Sat),new Mat(8,32,128,256,Sat),new Mat(32,128,258,1024,Sat),new Mat(32,258,258,4096,Sat)];function Aat(t){t.window_size=2*t.w_size;bat(t.head);t.max_lazy_match=Tat[t.level].max_lazy;t.good_match=Tat[t.level].good_length;t.nice_match=Tat[t.level].nice_length;t.max_chain_length=Tat[t.level].max_chain;t.strstart=0;t.block_start=0;t.lookahead=0;t.insert=0;t.match_length=t.prev_length=Jot-1;t.match_available=0;t.ins_h=0}function Dat(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=Got;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new uit(Xot*2);this.dyn_dtree=new uit((2*Zot+1)*2);this.bl_tree=new uit((2*Qot+1)*2);bat(this.dyn_ltree);bat(this.dyn_dtree);bat(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new uit(qot+1);this.heap=new uit(2*Hot+1);bat(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new uit(2*Hot+1);bat(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function Rat(t){var e;if(!t||!t.state){return pat(t,Oot)}t.total_in=t.total_out=0;t.data_type=Wot;e=t.state;e.pending=0;e.pending_out=0;if(e.wrap<0){e.wrap=-e.wrap}e.status=e.wrap?nat:aat;t.adler=e.wrap===2?0:1;e.last_flush=Iot;wot(e);return Dot}function Oat(t){var e=Rat(t);if(e===Dot){Aat(t.state)}return e}function Lat(t,e,n,s,r,i){if(!t){return Oot}var o=1;if(e===Fot){e=6}if(s<0){o=0;s=-s}else if(s>15){o=2;s-=16}if(r<1||r>Uot||n!==Got||s<8||s>15||e<0||e>9||i<0||i>Bot){return pat(t,Oot)}if(s===8){s=9}var a=new Dat;t.state=a;a.strm=t;a.wrap=o;a.gzhead=null;a.w_bits=s;a.w_size=1<<a.w_bits;a.w_mask=a.w_size-1;a.hash_bits=r+7;a.hash_size=1<<a.hash_bits;a.hash_mask=a.hash_size-1;a.hash_shift=~~((a.hash_bits+Jot-1)/Jot);a.window=new cit(a.w_size*2);a.head=new uit(a.hash_size);a.prev=new uit(a.w_size);a.lit_bufsize=1<<r+6;a.pending_buf_size=a.lit_bufsize*4;a.pending_buf=new cit(a.pending_buf_size);a.d_buf=1*a.lit_bufsize;a.l_buf=(1+2)*a.lit_bufsize;a.level=e;a.strategy=i;a.method=n;return Oat(t)}function _at(t,e){var n,s;var r,i;if(!t||!t.state||e>Aot||e<0){return t?pat(t,Oot):Oot}s=t.state;if(!t.output||!t.input&&t.avail_in!==0||s.status===cat&&e!==Tot){return pat(t,t.avail_out===0?_ot:Oot)}s.strm=t;n=s.last_flush;s.last_flush=e;if(s.status===nat){if(s.wrap===2){t.adler=0;gat(s,31);gat(s,139);gat(s,8);if(!s.gzhead){gat(s,0);gat(s,0);gat(s,0);gat(s,0);gat(s,0);gat(s,s.level===9?2:s.strategy>=jot||s.level<2?4:0);gat(s,dat);s.status=aat}else{gat(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(!s.gzhead.extra?0:4)+(!s.gzhead.name?0:8)+(!s.gzhead.comment?0:16));gat(s,s.gzhead.time&255);gat(s,s.gzhead.time>>8&255);gat(s,s.gzhead.time>>16&255);gat(s,s.gzhead.time>>24&255);gat(s,s.level===9?2:s.strategy>=jot||s.level<2?4:0);gat(s,s.gzhead.os&255);if(s.gzhead.extra&&s.gzhead.extra.length){gat(s,s.gzhead.extra.length&255);gat(s,s.gzhead.extra.length>>8&255)}if(s.gzhead.hcrc){t.adler=Sot(t.adler,s.pending_buf,s.pending,0)}s.gzindex=0;s.status=sat}}else{var o=Got+(s.w_bits-8<<4)<<8;var a=-1;if(s.strategy>=jot||s.level<2){a=0}else if(s.level<6){a=1}else if(s.level===6){a=2}else{a=3}o|=a<<6;if(s.strstart!==0){o|=eat}o+=31-o%31;s.status=aat;vat(s,o);if(s.strstart!==0){vat(s,t.adler>>>16);vat(s,t.adler&65535)}t.adler=1}}if(s.status===sat){if(s.gzhead.extra){r=s.pending;while(s.gzindex<(s.gzhead.extra.length&65535)){if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r){t.adler=Sot(t.adler,s.pending_buf,s.pending-r,r)}yat(t);r=s.pending;if(s.pending===s.pending_buf_size){break}}gat(s,s.gzhead.extra[s.gzindex]&255);s.gzindex++}if(s.gzhead.hcrc&&s.pending>r){t.adler=Sot(t.adler,s.pending_buf,s.pending-r,r)}if(s.gzindex===s.gzhead.extra.length){s.gzindex=0;s.status=rat}}else{s.status=rat}}if(s.status===rat){if(s.gzhead.name){r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r){t.adler=Sot(t.adler,s.pending_buf,s.pending-r,r)}yat(t);r=s.pending;if(s.pending===s.pending_buf_size){i=1;break}}if(s.gzindex<s.gzhead.name.length){i=s.gzhead.name.charCodeAt(s.gzindex++)&255}else{i=0}gat(s,i)}while(i!==0);if(s.gzhead.hcrc&&s.pending>r){t.adler=Sot(t.adler,s.pending_buf,s.pending-r,r)}if(i===0){s.gzindex=0;s.status=iat}}else{s.status=iat}}if(s.status===iat){if(s.gzhead.comment){r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r){t.adler=Sot(t.adler,s.pending_buf,s.pending-r,r)}yat(t);r=s.pending;if(s.pending===s.pending_buf_size){i=1;break}}if(s.gzindex<s.gzhead.comment.length){i=s.gzhead.comment.charCodeAt(s.gzindex++)&255}else{i=0}gat(s,i)}while(i!==0);if(s.gzhead.hcrc&&s.pending>r){t.adler=Sot(t.adler,s.pending_buf,s.pending-r,r)}if(i===0){s.status=oat}}else{s.status=oat}}if(s.status===oat){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size){yat(t)}if(s.pending+2<=s.pending_buf_size){gat(s,t.adler&255);gat(s,t.adler>>8&255);t.adler=0;s.status=aat}}else{s.status=aat}}if(s.pending!==0){yat(t);if(t.avail_out===0){s.last_flush=-1;return Dot}}else if(t.avail_in===0&&mat(e)<=mat(n)&&e!==Tot){return pat(t,_ot)}if(s.status===cat&&t.avail_in!==0){return pat(t,_ot)}if(t.avail_in!==0||s.lookahead!==0||e!==Iot&&s.status!==cat){var c=s.strategy===jot?Eat(s,e):s.strategy===Pot?Iat(s,e):Tat[s.level].func(s,e);if(c===fat||c===hat){s.status=cat}if(c===uat||c===fat){if(t.avail_out===0){s.last_flush=-1}return Dot}if(c===lat){if(e===Eot){vot(s)}else if(e!==Aot){got(s,0,0,false);if(e===Mot){bat(s.head);if(s.lookahead===0){s.strstart=0;s.block_start=0;s.insert=0}}}yat(t);if(t.avail_out===0){s.last_flush=-1;return Dot}}}if(e!==Tot){return Dot}if(s.wrap<=0){return Rot}if(s.wrap===2){gat(s,t.adler&255);gat(s,t.adler>>8&255);gat(s,t.adler>>16&255);gat(s,t.adler>>24&255);gat(s,t.total_in&255);gat(s,t.total_in>>8&255);gat(s,t.total_in>>16&255);gat(s,t.total_in>>24&255)}else{vat(s,t.adler>>>16);vat(s,t.adler&65535)}yat(t);if(s.wrap>0){s.wrap=-s.wrap}return s.pending!==0?Dot:Rot}function Fat(t){var e;if(!t||!t.state){return Oot}e=t.state.status;if(e!==nat&&e!==sat&&e!==rat&&e!==iat&&e!==oat&&e!==aat&&e!==cat){return pat(t,Oot)}t.state=null;return e===aat?pat(t,Lot):Dot}var zat=30;var jat=12;function Pat(t,e){var n;var s;var r;var i;var o;var a;var c;var u;var l;var f;var h;var d;var p;var m;var b;var y;var w;var g;var v;var x;var N;var k;var C;var $,S;n=t.state;s=t.next_in;$=t.input;r=s+(t.avail_in-5);i=t.next_out;S=t.output;o=i-(e-t.avail_out);a=i+(t.avail_out-257);c=n.dmax;u=n.wsize;l=n.whave;f=n.wnext;h=n.window;d=n.hold;p=n.bits;m=n.lencode;b=n.distcode;y=(1<<n.lenbits)-1;w=(1<<n.distbits)-1;t:do{if(p<15){d+=$[s++]<<p;p+=8;d+=$[s++]<<p;p+=8}g=m[d&y];e:for(;;){v=g>>>24;d>>>=v;p-=v;v=g>>>16&255;if(v===0){S[i++]=g&65535}else if(v&16){x=g&65535;v&=15;if(v){if(p<v){d+=$[s++]<<p;p+=8}x+=d&(1<<v)-1;d>>>=v;p-=v}if(p<15){d+=$[s++]<<p;p+=8;d+=$[s++]<<p;p+=8}g=b[d&w];n:for(;;){v=g>>>24;d>>>=v;p-=v;v=g>>>16&255;if(v&16){N=g&65535;v&=15;if(p<v){d+=$[s++]<<p;p+=8;if(p<v){d+=$[s++]<<p;p+=8}}N+=d&(1<<v)-1;if(N>c){t.msg="invalid distance too far back";n.mode=zat;break t}d>>>=v;p-=v;v=i-o;if(N>v){v=N-v;if(v>l){if(n.sane){t.msg="invalid distance too far back";n.mode=zat;break t}}k=0;C=h;if(f===0){k+=u-v;if(v<x){x-=v;do{S[i++]=h[k++]}while(--v);k=i-N;C=S}}else if(f<v){k+=u+f-v;v-=f;if(v<x){x-=v;do{S[i++]=h[k++]}while(--v);k=0;if(f<x){v=f;x-=v;do{S[i++]=h[k++]}while(--v);k=i-N;C=S}}}else{k+=f-v;if(v<x){x-=v;do{S[i++]=h[k++]}while(--v);k=i-N;C=S}}while(x>2){S[i++]=C[k++];S[i++]=C[k++];S[i++]=C[k++];x-=3}if(x){S[i++]=C[k++];if(x>1){S[i++]=C[k++]}}}else{k=i-N;do{S[i++]=S[k++];S[i++]=S[k++];S[i++]=S[k++];x-=3}while(x>2);if(x){S[i++]=S[k++];if(x>1){S[i++]=S[k++]}}}}else if((v&64)===0){g=b[(g&65535)+(d&(1<<v)-1)];continue n}else{t.msg="invalid distance code";n.mode=zat;break t}break}}else if((v&64)===0){g=m[(g&65535)+(d&(1<<v)-1)];continue e}else if(v&32){n.mode=jat;break t}else{t.msg="invalid literal/length code";n.mode=zat;break t}break}}while(s<r&&i<a);x=p>>3;s-=x;p-=x<<3;d&=(1<<p)-1;t.next_in=s;t.next_out=i;t.avail_in=s<r?5+(r-s):5-(s-r);t.avail_out=i<a?257+(a-i):257-(i-a);n.hold=d;n.bits=p;return}var Bat=15;var Wat=852;var Gat=592;var Uat=0;var Vat=1;var Yat=2;var Hat=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var Zat=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78];var Qat=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var Xat=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function qat(t,e,n,s,r,i,o,a){var c=a.bits;var u=0;var l=0;var f=0,h=0;var d=0;var p=0;var m=0;var b=0;var y=0;var w=0;var g;var v;var x;var N;var k;var C=null;var $=0;var S;var I=new uit(Bat+1);var E=new uit(Bat+1);var M=null;var T=0;var A,D,R;for(u=0;u<=Bat;u++){I[u]=0}for(l=0;l<s;l++){I[e[n+l]]++}d=c;for(h=Bat;h>=1;h--){if(I[h]!==0){break}}if(d>h){d=h}if(h===0){r[i++]=1<<24|64<<16|0;r[i++]=1<<24|64<<16|0;a.bits=1;return 0}for(f=1;f<h;f++){if(I[f]!==0){break}}if(d<f){d=f}b=1;for(u=1;u<=Bat;u++){b<<=1;b-=I[u];if(b<0){return-1}}if(b>0&&(t===Uat||h!==1)){return-1}E[1]=0;for(u=1;u<Bat;u++){E[u+1]=E[u]+I[u]}for(l=0;l<s;l++){if(e[n+l]!==0){o[E[e[n+l]]++]=l}}if(t===Uat){C=M=o;S=19}else if(t===Vat){C=Hat;$-=257;M=Zat;T-=257;S=256}else{C=Qat;M=Xat;S=-1}w=0;l=0;u=f;k=i;p=d;m=0;x=-1;y=1<<d;N=y-1;if(t===Vat&&y>Wat||t===Yat&&y>Gat){return 1}for(;;){A=u-m;if(o[l]<S){D=0;R=o[l]}else if(o[l]>S){D=M[T+o[l]];R=C[$+o[l]]}else{D=32+64;R=0}g=1<<u-m;v=1<<p;f=v;do{v-=g;r[k+(w>>m)+v]=A<<24|D<<16|R|0}while(v!==0);g=1<<u-1;while(w&g){g>>=1}if(g!==0){w&=g-1;w+=g}else{w=0}l++;if(--I[u]===0){if(u===h){break}u=e[n+o[l]]}if(u>d&&(w&N)!==x){if(m===0){m=d}k+=f;p=u-m;b=1<<p;while(p+m<h){b-=I[p+m];if(b<=0){break}p++;b<<=1}y+=1<<p;if(t===Vat&&y>Wat||t===Yat&&y>Gat){return 1}x=w&N;r[x]=d<<24|p<<16|k-i|0}}if(w!==0){r[k+w]=u-m<<24|64<<16|0}a.bits=d;return 0}var Jat=0;var Kat=1;var tct=2;var ect=4;var nct=5;var sct=6;var rct=0;var ict=1;var oct=2;var act=-2;var cct=-3;var uct=-4;var lct=-5;var fct=8;var hct=1;var dct=2;var pct=3;var mct=4;var bct=5;var yct=6;var wct=7;var gct=8;var vct=9;var xct=10;var Nct=11;var kct=12;var Cct=13;var $ct=14;var Sct=15;var Ict=16;var Ect=17;var Mct=18;var Tct=19;var Act=20;var Dct=21;var Rct=22;var Oct=23;var Lct=24;var _ct=25;var Fct=26;var zct=27;var jct=28;var Pct=29;var Bct=30;var Wct=31;var Gct=32;var Uct=852;var Vct=592;function Yct(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function Hct(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new uit(320);this.work=new uit(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function Zct(t){var e;if(!t||!t.state){return act}e=t.state;t.total_in=t.total_out=e.total=0;t.msg="";if(e.wrap){t.adler=e.wrap&1}e.mode=hct;e.last=0;e.havedict=0;e.dmax=32768;e.head=null;e.hold=0;e.bits=0;e.lencode=e.lendyn=new lit(Uct);e.distcode=e.distdyn=new lit(Vct);e.sane=1;e.back=-1;return rct}function Qct(t){var e;if(!t||!t.state){return act}e=t.state;e.wsize=0;e.whave=0;e.wnext=0;return Zct(t)}function Xct(t,e){var n;var s;if(!t||!t.state){return act}s=t.state;if(e<0){n=0;e=-e}else{n=(e>>4)+1;if(e<48){e&=15}}if(e&&(e<8||e>15)){return act}if(s.window!==null&&s.wbits!==e){s.window=null}s.wrap=n;s.wbits=e;return Qct(t)}function qct(t,e){var n;var s;if(!t){return act}s=new Hct;t.state=s;s.window=null;n=Xct(t,e);if(n!==rct){t.state=null}return n}var Jct=true;var Kct,tut;function eut(t){if(Jct){var e;Kct=new lit(512);tut=new lit(32);e=0;while(e<144){t.lens[e++]=8}while(e<256){t.lens[e++]=9}while(e<280){t.lens[e++]=7}while(e<288){t.lens[e++]=8}qat(Kat,t.lens,0,288,Kct,0,t.work,{bits:9});e=0;while(e<32){t.lens[e++]=5}qat(tct,t.lens,0,32,tut,0,t.work,{bits:5});Jct=false}t.lencode=Kct;t.lenbits=9;t.distcode=tut;t.distbits=5}function nut(t,e,n,s){var r;var i=t.state;if(i.window===null){i.wsize=1<<i.wbits;i.wnext=0;i.whave=0;i.window=new cit(i.wsize)}if(s>=i.wsize){ait(i.window,e,n-i.wsize,i.wsize,0);i.wnext=0;i.whave=i.wsize}else{r=i.wsize-i.wnext;if(r>s){r=s}ait(i.window,e,n-s,r,i.wnext);s-=r;if(s){ait(i.window,e,n-s,s,0);i.wnext=s;i.whave=i.wsize}else{i.wnext+=r;if(i.wnext===i.wsize){i.wnext=0}if(i.whave<i.wsize){i.whave+=r}}}return 0}function sut(t,e){var n;var s,r;var i;var o;var a,c;var u;var l;var f,h;var d;var p;var m;var b=0;var y,w,g;var v,x,N;var k;var C;var $=new cit(4);var S;var I;var E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0){return act}n=t.state;if(n.mode===kct){n.mode=Cct}o=t.next_out;r=t.output;c=t.avail_out;i=t.next_in;s=t.input;a=t.avail_in;u=n.hold;l=n.bits;f=a;h=c;C=rct;t:for(;;){switch(n.mode){case hct:if(n.wrap===0){n.mode=Cct;break}while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(n.wrap&2&&u===35615){n.check=0;$[0]=u&255;$[1]=u>>>8&255;n.check=Sot(n.check,$,2,0);u=0;l=0;n.mode=dct;break}n.flags=0;if(n.head){n.head.done=false}if(!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){t.msg="incorrect header check";n.mode=Bct;break}if((u&15)!==fct){t.msg="unknown compression method";n.mode=Bct;break}u>>>=4;l-=4;k=(u&15)+8;if(n.wbits===0){n.wbits=k}else if(k>n.wbits){t.msg="invalid window size";n.mode=Bct;break}n.dmax=1<<k;t.adler=n.check=1;n.mode=u&512?xct:kct;u=0;l=0;break;case dct:while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.flags=u;if((n.flags&255)!==fct){t.msg="unknown compression method";n.mode=Bct;break}if(n.flags&57344){t.msg="unknown header flags set";n.mode=Bct;break}if(n.head){n.head.text=u>>8&1}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;n.check=Sot(n.check,$,2,0)}u=0;l=0;n.mode=pct;case pct:while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(n.head){n.head.time=u}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;$[2]=u>>>16&255;$[3]=u>>>24&255;n.check=Sot(n.check,$,4,0)}u=0;l=0;n.mode=mct;case mct:while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(n.head){n.head.xflags=u&255;n.head.os=u>>8}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;n.check=Sot(n.check,$,2,0)}u=0;l=0;n.mode=bct;case bct:if(n.flags&1024){while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.length=u;if(n.head){n.head.extra_len=u}if(n.flags&512){$[0]=u&255;$[1]=u>>>8&255;n.check=Sot(n.check,$,2,0)}u=0;l=0}else if(n.head){n.head.extra=null}n.mode=yct;case yct:if(n.flags&1024){d=n.length;if(d>a){d=a}if(d){if(n.head){k=n.head.extra_len-n.length;if(!n.head.extra){n.head.extra=new Array(n.head.extra_len)}ait(n.head.extra,s,i,d,k)}if(n.flags&512){n.check=Sot(n.check,s,d,i)}a-=d;i+=d;n.length-=d}if(n.length){break t}}n.length=0;n.mode=wct;case wct:if(n.flags&2048){if(a===0){break t}d=0;do{k=s[i+d++];if(n.head&&k&&n.length<65536){n.head.name+=String.fromCharCode(k)}}while(k&&d<a);if(n.flags&512){n.check=Sot(n.check,s,d,i)}a-=d;i+=d;if(k){break t}}else if(n.head){n.head.name=null}n.length=0;n.mode=gct;case gct:if(n.flags&4096){if(a===0){break t}d=0;do{k=s[i+d++];if(n.head&&k&&n.length<65536){n.head.comment+=String.fromCharCode(k)}}while(k&&d<a);if(n.flags&512){n.check=Sot(n.check,s,d,i)}a-=d;i+=d;if(k){break t}}else if(n.head){n.head.comment=null}n.mode=vct;case vct:if(n.flags&512){while(l<16){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(u!==(n.check&65535)){t.msg="header crc mismatch";n.mode=Bct;break}u=0;l=0}if(n.head){n.head.hcrc=n.flags>>9&1;n.head.done=true}t.adler=n.check=0;n.mode=kct;break;case xct:while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}t.adler=n.check=Yct(u);u=0;l=0;n.mode=Nct;case Nct:if(n.havedict===0){t.next_out=o;t.avail_out=c;t.next_in=i;t.avail_in=a;n.hold=u;n.bits=l;return oct}t.adler=n.check=1;n.mode=kct;case kct:if(e===nct||e===sct){break t}case Cct:if(n.last){u>>>=l&7;l-=l&7;n.mode=zct;break}while(l<3){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.last=u&1;u>>>=1;l-=1;switch(u&3){case 0:n.mode=$ct;break;case 1:eut(n);n.mode=Act;if(e===sct){u>>>=2;l-=2;break t}break;case 2:n.mode=Ect;break;case 3:t.msg="invalid block type";n.mode=Bct}u>>>=2;l-=2;break;case $ct:u>>>=l&7;l-=l&7;while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if((u&65535)!==(u>>>16^65535)){t.msg="invalid stored block lengths";n.mode=Bct;break}n.length=u&65535;u=0;l=0;n.mode=Sct;if(e===sct){break t}case Sct:n.mode=Ict;case Ict:d=n.length;if(d){if(d>a){d=a}if(d>c){d=c}if(d===0){break t}ait(r,s,i,d,o);a-=d;i+=d;c-=d;o+=d;n.length-=d;break}n.mode=kct;break;case Ect:while(l<14){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.nlen=(u&31)+257;u>>>=5;l-=5;n.ndist=(u&31)+1;u>>>=5;l-=5;n.ncode=(u&15)+4;u>>>=4;l-=4;if(n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols";n.mode=Bct;break}n.have=0;n.mode=Mct;case Mct:while(n.have<n.ncode){while(l<3){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.lens[E[n.have++]]=u&7;u>>>=3;l-=3}while(n.have<19){n.lens[E[n.have++]]=0}n.lencode=n.lendyn;n.lenbits=7;S={bits:n.lenbits};C=qat(Jat,n.lens,0,19,n.lencode,0,n.work,S);n.lenbits=S.bits;if(C){t.msg="invalid code lengths set";n.mode=Bct;break}n.have=0;n.mode=Tct;case Tct:while(n.have<n.nlen+n.ndist){for(;;){b=n.lencode[u&(1<<n.lenbits)-1];y=b>>>24;w=b>>>16&255;g=b&65535;if(y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(g<16){u>>>=y;l-=y;n.lens[n.have++]=g}else{if(g===16){I=y+2;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=y;l-=y;if(n.have===0){t.msg="invalid bit length repeat";n.mode=Bct;break}k=n.lens[n.have-1];d=3+(u&3);u>>>=2;l-=2}else if(g===17){I=y+3;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=y;l-=y;k=0;d=3+(u&7);u>>>=3;l-=3}else{I=y+7;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=y;l-=y;k=0;d=11+(u&127);u>>>=7;l-=7}if(n.have+d>n.nlen+n.ndist){t.msg="invalid bit length repeat";n.mode=Bct;break}while(d--){n.lens[n.have++]=k}}}if(n.mode===Bct){break}if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block";n.mode=Bct;break}n.lenbits=9;S={bits:n.lenbits};C=qat(Kat,n.lens,0,n.nlen,n.lencode,0,n.work,S);n.lenbits=S.bits;if(C){t.msg="invalid literal/lengths set";n.mode=Bct;break}n.distbits=6;n.distcode=n.distdyn;S={bits:n.distbits};C=qat(tct,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S);n.distbits=S.bits;if(C){t.msg="invalid distances set";n.mode=Bct;break}n.mode=Act;if(e===sct){break t}case Act:n.mode=Dct;case Dct:if(a>=6&&c>=258){t.next_out=o;t.avail_out=c;t.next_in=i;t.avail_in=a;n.hold=u;n.bits=l;Pat(t,h);o=t.next_out;r=t.output;c=t.avail_out;i=t.next_in;s=t.input;a=t.avail_in;u=n.hold;l=n.bits;if(n.mode===kct){n.back=-1}break}n.back=0;for(;;){b=n.lencode[u&(1<<n.lenbits)-1];y=b>>>24;w=b>>>16&255;g=b&65535;if(y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(w&&(w&240)===0){v=y;x=w;N=g;for(;;){b=n.lencode[N+((u&(1<<v+x)-1)>>v)];y=b>>>24;w=b>>>16&255;g=b&65535;if(v+y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=v;l-=v;n.back+=v}u>>>=y;l-=y;n.back+=y;n.length=g;if(w===0){n.mode=Fct;break}if(w&32){n.back=-1;n.mode=kct;break}if(w&64){t.msg="invalid literal/length code";n.mode=Bct;break}n.extra=w&15;n.mode=Rct;case Rct:if(n.extra){I=n.extra;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.length+=u&(1<<n.extra)-1;u>>>=n.extra;l-=n.extra;n.back+=n.extra}n.was=n.length;n.mode=Oct;case Oct:for(;;){b=n.distcode[u&(1<<n.distbits)-1];y=b>>>24;w=b>>>16&255;g=b&65535;if(y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if((w&240)===0){v=y;x=w;N=g;for(;;){b=n.distcode[N+((u&(1<<v+x)-1)>>v)];y=b>>>24;w=b>>>16&255;g=b&65535;if(v+y<=l){break}if(a===0){break t}a--;u+=s[i++]<<l;l+=8}u>>>=v;l-=v;n.back+=v}u>>>=y;l-=y;n.back+=y;if(w&64){t.msg="invalid distance code";n.mode=Bct;break}n.offset=g;n.extra=w&15;n.mode=Lct;case Lct:if(n.extra){I=n.extra;while(l<I){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}n.offset+=u&(1<<n.extra)-1;u>>>=n.extra;l-=n.extra;n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back";n.mode=Bct;break}n.mode=_ct;case _ct:if(c===0){break t}d=h-c;if(n.offset>d){d=n.offset-d;if(d>n.whave){if(n.sane){t.msg="invalid distance too far back";n.mode=Bct;break}}if(d>n.wnext){d-=n.wnext;p=n.wsize-d}else{p=n.wnext-d}if(d>n.length){d=n.length}m=n.window}else{m=r;p=o-n.offset;d=n.length}if(d>c){d=c}c-=d;n.length-=d;do{r[o++]=m[p++]}while(--d);if(n.length===0){n.mode=Dct}break;case Fct:if(c===0){break t}r[o++]=n.length;c--;n.mode=Dct;break;case zct:if(n.wrap){while(l<32){if(a===0){break t}a--;u|=s[i++]<<l;l+=8}h-=c;t.total_out+=h;n.total+=h;if(h){t.adler=n.check=n.flags?Sot(n.check,r,h,o-h):kot(n.check,r,h,o-h)}h=c;if((n.flags?u:Yct(u))!==n.check){t.msg="incorrect data check";n.mode=Bct;break}u=0;l=0}n.mode=jct;case jct:if(n.wrap&&n.flags){while(l<32){if(a===0){break t}a--;u+=s[i++]<<l;l+=8}if(u!==(n.total&4294967295)){t.msg="incorrect length check";n.mode=Bct;break}u=0;l=0}n.mode=Pct;case Pct:C=ict;break t;case Bct:C=cct;break t;case Wct:return uct;case Gct:default:return act}}t.next_out=o;t.avail_out=c;t.next_in=i;t.avail_in=a;n.hold=u;n.bits=l;if(n.wsize||h!==t.avail_out&&n.mode<Bct&&(n.mode<zct||e!==ect)){if(nut(t,t.output,t.next_out,h-t.avail_out));}f-=t.avail_in;h-=t.avail_out;t.total_in+=f;t.total_out+=h;n.total+=h;if(n.wrap&&h){t.adler=n.check=n.flags?Sot(n.check,r,h,t.next_out-h):kot(n.check,r,h,t.next_out-h)}t.data_type=n.bits+(n.last?64:0)+(n.mode===kct?128:0)+(n.mode===Act||n.mode===Sct?256:0);if((f===0&&h===0||e===ect)&&C===rct){C=lct}return C}function rut(t){if(!t||!t.state){return act}var e=t.state;if(e.window){e.window=null}t.state=null;return rct}var iut=0;var out=1;var aut=2;var cut=3;var uut=4;var lut=5;var fut=6;var hut=7;var dut=0,put=1,mut=2,but=3,yut=4,wut=5,gut=6,vut=0,xut=1,Nut=2,kut=-1,Cut=-2,$ut=-3,Sut=-5,Iut=0,Eut=1,Mut=9,Tut=-1,Aut=1,Dut=2,Rut=3,Out=4,Lut=0,_ut=0,Fut=1,zut=2,jut=8;function Put(t){if(t<out||t>hut)throw new TypeError("Bad argument");this.mode=t;this.init_done=false;this.write_in_progress=false;this.pending_close=false;this.windowBits=0;this.level=0;this.memLevel=0;this.strategy=0;this.dictionary=null}Put.prototype.init=function(t,e,n,s,r){this.windowBits=t;this.level=e;this.memLevel=n;this.strategy=s;if(this.mode===cut||this.mode===uut)this.windowBits+=16;if(this.mode===hut)this.windowBits+=32;if(this.mode===lut||this.mode===fut)this.windowBits=-this.windowBits;this.strm=new oit;var i;switch(this.mode){case out:case cut:case lut:i=Lat(this.strm,this.level,jut,this.windowBits,this.memLevel,this.strategy);break;case aut:case uut:case fut:case hut:i=qct(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}if(i!==vut){this._error(i);return}this.write_in_progress=false;this.init_done=true};Put.prototype.params=function(){throw new Error("deflateParams Not supported")};Put.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===iut)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")};Put.prototype.write=function(t,e,n,s,r,i,o){this._writeCheck();this.write_in_progress=true;var a=this;v.nextTick((function(){a.write_in_progress=false;var c=a._write(t,e,n,s,r,i,o);a.callback(c[0],c[1]);if(a.pending_close)a.close()}));return this};function But(t,e){for(var n=0;n<t.length;n++){this[e+n]=t[n]}}Put.prototype.writeSync=function(t,e,n,s,r,i,o){this._writeCheck();return this._write(t,e,n,s,r,i,o)};Put.prototype._write=function(t,e,n,s,r,i,o){this.write_in_progress=true;if(t!==dut&&t!==put&&t!==mut&&t!==but&&t!==yut&&t!==wut){throw new Error("Invalid flush value")}if(e==null){e=new uc(0);s=0;n=0}if(r._set)r.set=r._set;else r.set=But;var a=this.strm;a.avail_in=s;a.input=e;a.next_in=n;a.avail_out=o;a.output=r;a.next_out=i;var c;switch(this.mode){case out:case cut:case lut:c=_at(a,t);break;case hut:case aut:case uut:case fut:c=sut(a,t);break;default:throw new Error("Unknown mode "+this.mode)}if(c!==xut&&c!==vut){this._error(c)}this.write_in_progress=false;return[a.avail_in,a.avail_out]};Put.prototype.close=function(){if(this.write_in_progress){this.pending_close=true;return}this.pending_close=false;if(this.mode===out||this.mode===cut||this.mode===lut){Fat(this.strm)}else{rut(this.strm)}this.mode=iut};var Wut;Put.prototype.reset=function(){switch(this.mode){case out:case lut:Wut=Oat(this.strm);break;case aut:case fut:Wut=Qct(this.strm);break}if(Wut!==vut){this._error(Wut)}};Put.prototype._error=function(t){this.onerror(iit[t]+": "+this.strm.msg,t);this.write_in_progress=false;if(this.pending_close)this.close()};var Gut=Object.freeze({__proto__:null,DEFLATE:out,DEFLATERAW:lut,GUNZIP:uut,GZIP:cut,INFLATE:aut,INFLATERAW:fut,NONE:iut,UNZIP:hut,Z_BEST_COMPRESSION:Mut,Z_BEST_SPEED:Eut,Z_BINARY:_ut,Z_BLOCK:wut,Z_BUF_ERROR:Sut,Z_DATA_ERROR:$ut,Z_DEFAULT_COMPRESSION:Tut,Z_DEFAULT_STRATEGY:Lut,Z_DEFLATED:jut,Z_ERRNO:kut,Z_FILTERED:Aut,Z_FINISH:yut,Z_FIXED:Out,Z_FULL_FLUSH:but,Z_HUFFMAN_ONLY:Dut,Z_NEED_DICT:Nut,Z_NO_COMPRESSION:Iut,Z_NO_FLUSH:dut,Z_OK:vut,Z_PARTIAL_FLUSH:put,Z_RLE:Rut,Z_STREAM_END:xut,Z_STREAM_ERROR:Cut,Z_SYNC_FLUSH:mut,Z_TEXT:Fut,Z_TREES:gut,Z_UNKNOWN:zut,Zlib:Put});function Uut(t,e){if(!t){throw new Error(e)}}var Vut={};Object.keys(Gut).forEach((function(t){Vut[t]=Gut[t]}));Vut.Z_MIN_WINDOWBITS=8;Vut.Z_MAX_WINDOWBITS=15;Vut.Z_DEFAULT_WINDOWBITS=15;Vut.Z_MIN_CHUNK=64;Vut.Z_MAX_CHUNK=Infinity;Vut.Z_DEFAULT_CHUNK=16*1024;Vut.Z_MIN_MEMLEVEL=1;Vut.Z_MAX_MEMLEVEL=9;Vut.Z_DEFAULT_MEMLEVEL=8;Vut.Z_MIN_LEVEL=-1;Vut.Z_MAX_LEVEL=9;Vut.Z_DEFAULT_LEVEL=Vut.Z_DEFAULT_COMPRESSION;var Yut={Z_OK:Vut.Z_OK,Z_STREAM_END:Vut.Z_STREAM_END,Z_NEED_DICT:Vut.Z_NEED_DICT,Z_ERRNO:Vut.Z_ERRNO,Z_STREAM_ERROR:Vut.Z_STREAM_ERROR,Z_DATA_ERROR:Vut.Z_DATA_ERROR,Z_MEM_ERROR:Vut.Z_MEM_ERROR,Z_BUF_ERROR:Vut.Z_BUF_ERROR,Z_VERSION_ERROR:Vut.Z_VERSION_ERROR};Object.keys(Yut).forEach((function(t){Yut[Yut[t]]=t}));function Hut(t){return new blt(t)}function Zut(t){return new ylt(t)}function Qut(t){return new vlt(t)}function Xut(t){return new xlt(t)}function qut(t){return new wlt(t)}function Jut(t){return new glt(t)}function Kut(t){return new Nlt(t)}function tlt(t,e,n){if(typeof e==="function"){n=e;e={}}return plt(new blt(e),t,n)}function elt(t,e){return mlt(new blt(e),t)}function nlt(t,e,n){if(typeof e==="function"){n=e;e={}}return plt(new wlt(e),t,n)}function slt(t,e){return mlt(new wlt(e),t)}function rlt(t,e,n){if(typeof e==="function"){n=e;e={}}return plt(new vlt(e),t,n)}function ilt(t,e){return mlt(new vlt(e),t)}function olt(t,e,n){if(typeof e==="function"){n=e;e={}}return plt(new Nlt(e),t,n)}function alt(t,e){return mlt(new Nlt(e),t)}function clt(t,e,n){if(typeof e==="function"){n=e;e={}}return plt(new ylt(e),t,n)}function ult(t,e){return mlt(new ylt(e),t)}function llt(t,e,n){if(typeof e==="function"){n=e;e={}}return plt(new glt(e),t,n)}function flt(t,e){return mlt(new glt(e),t)}function hlt(t,e,n){if(typeof e==="function"){n=e;e={}}return plt(new xlt(e),t,n)}function dlt(t,e){return mlt(new xlt(e),t)}function plt(t,e,n){var s=[];var r=0;t.on("error",o);t.on("end",a);t.end(e);i();function i(){var e;while(null!==(e=t.read())){s.push(e);r+=e.length}t.once("readable",i)}function o(e){t.removeListener("end",a);t.removeListener("readable",i);n(e)}function a(){var e=uc.concat(s,r);s=[];n(null,e);t.close()}}function mlt(t,e){if(typeof e==="string")e=new uc(e);if(!uc.isBuffer(e))throw new TypeError("Not a string or buffer");var n=Vut.Z_FINISH;return t._processChunk(e,n)}function blt(t){if(!(this instanceof blt))return new blt(t);klt.call(this,t,Vut.DEFLATE)}function ylt(t){if(!(this instanceof ylt))return new ylt(t);klt.call(this,t,Vut.INFLATE)}function wlt(t){if(!(this instanceof wlt))return new wlt(t);klt.call(this,t,Vut.GZIP)}function glt(t){if(!(this instanceof glt))return new glt(t);klt.call(this,t,Vut.GUNZIP)}function vlt(t){if(!(this instanceof vlt))return new vlt(t);klt.call(this,t,Vut.DEFLATERAW)}function xlt(t){if(!(this instanceof xlt))return new xlt(t);klt.call(this,t,Vut.INFLATERAW)}function Nlt(t){if(!(this instanceof Nlt))return new Nlt(t);klt.call(this,t,Vut.UNZIP)}function klt(t,e){this._opts=t=t||{};this._chunkSize=t.chunkSize||Vut.Z_DEFAULT_CHUNK;Jrt.call(this,t);if(t.flush){if(t.flush!==Vut.Z_NO_FLUSH&&t.flush!==Vut.Z_PARTIAL_FLUSH&&t.flush!==Vut.Z_SYNC_FLUSH&&t.flush!==Vut.Z_FULL_FLUSH&&t.flush!==Vut.Z_FINISH&&t.flush!==Vut.Z_BLOCK){throw new Error("Invalid flush flag: "+t.flush)}}this._flushFlag=t.flush||Vut.Z_NO_FLUSH;if(t.chunkSize){if(t.chunkSize<Vut.Z_MIN_CHUNK||t.chunkSize>Vut.Z_MAX_CHUNK){throw new Error("Invalid chunk size: "+t.chunkSize)}}if(t.windowBits){if(t.windowBits<Vut.Z_MIN_WINDOWBITS||t.windowBits>Vut.Z_MAX_WINDOWBITS){throw new Error("Invalid windowBits: "+t.windowBits)}}if(t.level){if(t.level<Vut.Z_MIN_LEVEL||t.level>Vut.Z_MAX_LEVEL){throw new Error("Invalid compression level: "+t.level)}}if(t.memLevel){if(t.memLevel<Vut.Z_MIN_MEMLEVEL||t.memLevel>Vut.Z_MAX_MEMLEVEL){throw new Error("Invalid memLevel: "+t.memLevel)}}if(t.strategy){if(t.strategy!=Vut.Z_FILTERED&&t.strategy!=Vut.Z_HUFFMAN_ONLY&&t.strategy!=Vut.Z_RLE&&t.strategy!=Vut.Z_FIXED&&t.strategy!=Vut.Z_DEFAULT_STRATEGY){throw new Error("Invalid strategy: "+t.strategy)}}if(t.dictionary){if(!uc.isBuffer(t.dictionary)){throw new Error("Invalid dictionary: it should be a Buffer instance")}}this._binding=new Vut.Zlib(e);var n=this;this._hadError=false;this._binding.onerror=function(t,e){n._binding=null;n._hadError=true;var s=new Error(t);s.errno=e;s.code=Vut.codes[e];n.emit("error",s)};var s=Vut.Z_DEFAULT_COMPRESSION;if(typeof t.level==="number")s=t.level;var r=Vut.Z_DEFAULT_STRATEGY;if(typeof t.strategy==="number")r=t.strategy;this._binding.init(t.windowBits||Vut.Z_DEFAULT_WINDOWBITS,s,t.memLevel||Vut.Z_DEFAULT_MEMLEVEL,r,t.dictionary);this._buffer=new uc(this._chunkSize);this._offset=0;this._closed=false;this._level=s;this._strategy=r;this.once("end",this.close)}jst.inherits(klt,Jrt);klt.prototype.params=function(t,e,n){if(t<Vut.Z_MIN_LEVEL||t>Vut.Z_MAX_LEVEL){throw new RangeError("Invalid compression level: "+t)}if(e!=Vut.Z_FILTERED&&e!=Vut.Z_HUFFMAN_ONLY&&e!=Vut.Z_RLE&&e!=Vut.Z_FIXED&&e!=Vut.Z_DEFAULT_STRATEGY){throw new TypeError("Invalid strategy: "+e)}if(this._level!==t||this._strategy!==e){var s=this;this.flush(Vut.Z_SYNC_FLUSH,(function(){s._binding.params(t,e);if(!s._hadError){s._level=t;s._strategy=e;if(n)n()}}))}else{v.nextTick(n)}};klt.prototype.reset=function(){return this._binding.reset()};klt.prototype._flush=function(t){this._transform(new uc(0),"",t)};klt.prototype.flush=function(t,e){var n=this._writableState;if(typeof t==="function"||t===void 0&&!e){e=t;t=Vut.Z_FULL_FLUSH}if(n.ended){if(e)v.nextTick(e)}else if(n.ending){if(e)this.once("end",e)}else if(n.needDrain){var s=this;this.once("drain",(function(){s.flush(e)}))}else{this._flushFlag=t;this.write(new uc(0),"",e)}};klt.prototype.close=function(t){if(t)v.nextTick(t);if(this._closed)return;this._closed=true;this._binding.close();var e=this;v.nextTick((function(){e.emit("close")}))};klt.prototype._transform=function(t,e,n){var s;var r=this._writableState;var i=r.ending||r.ended;var o=i&&(!t||r.length===t.length);if(!t===null&&!uc.isBuffer(t))return n(new Error("invalid input"));if(o)s=Vut.Z_FINISH;else{s=this._flushFlag;if(t.length>=r.length){this._flushFlag=this._opts.flush||Vut.Z_NO_FLUSH}}this._processChunk(t,s,n)};klt.prototype._processChunk=function(t,e,n){var s=t&&t.length;var r=this._chunkSize-this._offset;var i=0;var o=this;var a=typeof n==="function";if(!a){var c=[];var u=0;var l;this.on("error",(function(t){l=t}));do{var f=this._binding.writeSync(e,t,i,s,this._buffer,this._offset,r)}while(!this._hadError&&p(f[0],f[1]));if(this._hadError){throw l}var h=uc.concat(c,u);this.close();return h}var d=this._binding.write(e,t,i,s,this._buffer,this._offset,r);d.buffer=t;d.callback=p;function p(l,f){if(o._hadError)return;var h=r-f;Uut(h>=0,"have should not go down");if(h>0){var d=o._buffer.slice(o._offset,o._offset+h);o._offset+=h;if(a){o.push(d)}else{c.push(d);u+=d.length}}if(f===0||o._offset>=o._chunkSize){r=o._chunkSize;o._offset=0;o._buffer=new uc(o._chunkSize)}if(f===0){i+=s-l;s=l;if(!a)return true;var m=o._binding.write(e,t,i,s,o._buffer,o._offset,o._chunkSize);m.callback=p;m.buffer=t;return}if(!a)return false;n()}};jst.inherits(blt,klt);jst.inherits(ylt,klt);jst.inherits(wlt,klt);jst.inherits(glt,klt);jst.inherits(vlt,klt);jst.inherits(xlt,klt);jst.inherits(Nlt,klt);var Clt={codes:Yut,createDeflate:Hut,createInflate:Zut,createDeflateRaw:Qut,createInflateRaw:Xut,createGzip:qut,createGunzip:Jut,createUnzip:Kut,deflate:tlt,deflateSync:elt,gzip:nlt,gzipSync:slt,deflateRaw:rlt,deflateRawSync:ilt,unzip:olt,unzipSync:alt,inflate:clt,inflateSync:ult,gunzip:llt,gunzipSync:flt,inflateRaw:hlt,inflateRawSync:dlt,Deflate:blt,Inflate:ylt,Gzip:wlt,Gunzip:glt,DeflateRaw:vlt,InflateRaw:xlt,Unzip:Nlt,Zlib:klt};var $lt=Object.freeze({__proto__:null,Deflate:blt,DeflateRaw:vlt,Gunzip:glt,Gzip:wlt,Inflate:ylt,InflateRaw:xlt,Unzip:Nlt,Zlib:klt,codes:Yut,createDeflate:Hut,createDeflateRaw:Qut,createGunzip:Jut,createGzip:qut,createInflate:Zut,createInflateRaw:Xut,createUnzip:Kut,default:Clt,deflate:tlt,deflateRaw:rlt,deflateRawSync:ilt,deflateSync:elt,gunzip:llt,gunzipSync:flt,gzip:nlt,gzipSync:slt,inflate:clt,inflateRaw:hlt,inflateRawSync:dlt,inflateSync:ult,unzip:olt,unzipSync:alt});var Slt=f($lt);var Ilt={exports:{}};var Elt;function Mlt(){if(Elt)return Ilt.exports;Elt=1;let t=Nst();let e=sit;let n=Ilt.exports=function(){e.call(this);this._buffers=[];this._buffered=0;this._reads=[];this._paused=false;this._encoding="utf8";this.writable=true};t.inherits(n,e);n.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e});v.nextTick(function(){this._process();if(this._paused&&this._reads&&this._reads.length>0){this._paused=false;this.emit("drain")}}.bind(this))};n.prototype.write=function(t,e){if(!this.writable){this.emit("error",new Error("Stream not writable"));return false}let n;if(uc.isBuffer(t)){n=t}else{n=uc.from(t,e||this._encoding)}this._buffers.push(n);this._buffered+=n.length;this._process();if(this._reads&&this._reads.length===0){this._paused=true}return this.writable&&!this._paused};n.prototype.end=function(t,e){if(t){this.write(t,e)}this.writable=false;if(!this._buffers){return}if(this._buffers.length===0){this._end()}else{this._buffers.push(null);this._process()}};n.prototype.destroySoon=n.prototype.end;n.prototype._end=function(){if(this._reads.length>0){this.emit("error",new Error("Unexpected end of input"))}this.destroy()};n.prototype.destroy=function(){if(!this._buffers){return}this.writable=false;this._reads=null;this._buffers=null;this.emit("close")};n.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];if(e.length>t.length){this._buffered-=t.length;this._buffers[0]=e.slice(t.length);t.func.call(this,e.slice(0,t.length))}else{this._buffered-=e.length;this._buffers.shift();t.func.call(this,e)}};n.prototype._processRead=function(t){this._reads.shift();let e=0;let n=0;let s=uc.alloc(t.length);while(e<t.length){let r=this._buffers[n++];let i=Math.min(r.length,t.length-e);r.copy(s,e,0,i);e+=i;if(i!==r.length){this._buffers[--n]=r.slice(i)}}if(n>0){this._buffers.splice(0,n)}this._buffered-=t.length;t.func.call(this,s)};n.prototype._process=function(){try{while(this._buffered>0&&this._reads&&this._reads.length>0){let t=this._reads[0];if(t.allowLess){this._processReadAllowingLess(t)}else if(this._buffered>=t.length){this._processRead(t)}else{break}}if(this._buffers&&!this.writable){this._end()}}catch(t){this.emit("error",t)}};return Ilt.exports}var Tlt={exports:{}};var Alt={exports:{}};var Dlt={};var Rlt;function Olt(){if(Rlt)return Dlt;Rlt=1;let t=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];Dlt.getImagePasses=function(e,n){let s=[];let r=e%8;let i=n%8;let o=(e-r)/8;let a=(n-i)/8;for(let e=0;e<t.length;e++){let n=t[e];let c=o*n.x.length;let u=a*n.y.length;for(let t=0;t<n.x.length;t++){if(n.x[t]<r){c++}else{break}}for(let t=0;t<n.y.length;t++){if(n.y[t]<i){u++}else{break}}if(c>0&&u>0){s.push({width:c,height:u,index:e})}}return s};Dlt.getInterlaceIterator=function(e){return function(n,s,r){let i=n%t[r].x.length;let o=(n-i)/t[r].x.length*8+t[r].x[i];let a=s%t[r].y.length;let c=(s-a)/t[r].y.length*8+t[r].y[a];return o*4+c*e*4}};return Dlt}var Llt;var _lt;function Flt(){if(_lt)return Llt;_lt=1;Llt=function t(e,n,s){let r=e+n-s;let i=Math.abs(r-e);let o=Math.abs(r-n);let a=Math.abs(r-s);if(i<=o&&i<=a){return e}if(o<=a){return n}return s};return Llt}var zlt;function jlt(){if(zlt)return Alt.exports;zlt=1;let t=Olt();let e=Flt();function n(t,e,n){let s=t*e;if(n!==8){s=Math.ceil(s/(8/n))}return s}let s=Alt.exports=function(e,s){let r=e.width;let i=e.height;let o=e.interlace;let a=e.bpp;let c=e.depth;this.read=s.read;this.write=s.write;this.complete=s.complete;this._imageIndex=0;this._images=[];if(o){let e=t.getImagePasses(r,i);for(let t=0;t<e.length;t++){this._images.push({byteWidth:n(e[t].width,a,c),height:e[t].height,lineIndex:0})}}else{this._images.push({byteWidth:n(r,a,c),height:i,lineIndex:0})}if(c===8){this._xComparison=a}else if(c===16){this._xComparison=a*2}else{this._xComparison=1}};s.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};s.prototype._unFilterType1=function(t,e,n){let s=this._xComparison;let r=s-1;for(let i=0;i<n;i++){let n=t[1+i];let o=i>r?e[i-s]:0;e[i]=n+o}};s.prototype._unFilterType2=function(t,e,n){let s=this._lastLine;for(let r=0;r<n;r++){let n=t[1+r];let i=s?s[r]:0;e[r]=n+i}};s.prototype._unFilterType3=function(t,e,n){let s=this._xComparison;let r=s-1;let i=this._lastLine;for(let o=0;o<n;o++){let n=t[1+o];let a=i?i[o]:0;let c=o>r?e[o-s]:0;let u=Math.floor((c+a)/2);e[o]=n+u}};s.prototype._unFilterType4=function(t,n,s){let r=this._xComparison;let i=r-1;let o=this._lastLine;for(let a=0;a<s;a++){let s=t[1+a];let c=o?o[a]:0;let u=a>i?n[a-r]:0;let l=a>i&&o?o[a-r]:0;let f=e(u,c,l);n[a]=s+f}};s.prototype._reverseFilterLine=function(t){let e=t[0];let n;let s=this._images[this._imageIndex];let r=s.byteWidth;if(e===0){n=t.slice(1,r+1)}else{n=uc.alloc(r);switch(e){case 1:this._unFilterType1(t,n,r);break;case 2:this._unFilterType2(t,n,r);break;case 3:this._unFilterType3(t,n,r);break;case 4:this._unFilterType4(t,n,r);break;default:throw new Error("Unrecognised filter type - "+e)}}this.write(n);s.lineIndex++;if(s.lineIndex>=s.height){this._lastLine=null;this._imageIndex++;s=this._images[this._imageIndex]}else{this._lastLine=n}if(s){this.read(s.byteWidth+1,this._reverseFilterLine.bind(this))}else{this._lastLine=null;this.complete()}};return Alt.exports}var Plt;function Blt(){if(Plt)return Tlt.exports;Plt=1;let t=Nst();let e=Mlt();let n=jlt();let s=Tlt.exports=function(t){e.call(this);let s=[];let r=this;this._filter=new n(t,{read:this.read.bind(this),write:function(t){s.push(t)},complete:function(){r.emit("complete",uc.concat(s))}});this._filter.start()};t.inherits(s,e);return Tlt.exports}var Wlt={exports:{}};var Glt;var Ult;function Vlt(){if(Ult)return Glt;Ult=1;Glt={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5};return Glt}var Ylt={exports:{}};var Hlt;function Zlt(){if(Hlt)return Ylt.exports;Hlt=1;let t=[];(function(){for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++){if(n&1){n=3988292384^n>>>1}else{n=n>>>1}}t[e]=n}})();let e=Ylt.exports=function(){this._crc=-1};e.prototype.write=function(e){for(let n=0;n<e.length;n++){this._crc=t[(this._crc^e[n])&255]^this._crc>>>8}return true};e.prototype.crc32=function(){return this._crc^-1};e.crc32=function(e){let n=-1;for(let s=0;s<e.length;s++){n=t[(n^e[s])&255]^n>>>8}return n^-1};return Ylt.exports}var Qlt;function Xlt(){if(Qlt)return Wlt.exports;Qlt=1;let t=Vlt();let e=Zlt();let n=Wlt.exports=function(e,n){this._options=e;e.checkCRC=e.checkCRC!==false;this._hasIHDR=false;this._hasIEND=false;this._emittedHeadersFinished=false;this._palette=[];this._colorType=0;this._chunks={};this._chunks[t.TYPE_IHDR]=this._handleIHDR.bind(this);this._chunks[t.TYPE_IEND]=this._handleIEND.bind(this);this._chunks[t.TYPE_IDAT]=this._handleIDAT.bind(this);this._chunks[t.TYPE_PLTE]=this._handlePLTE.bind(this);this._chunks[t.TYPE_tRNS]=this._handleTRNS.bind(this);this._chunks[t.TYPE_gAMA]=this._handleGAMA.bind(this);this.read=n.read;this.error=n.error;this.metadata=n.metadata;this.gamma=n.gamma;this.transColor=n.transColor;this.palette=n.palette;this.parsed=n.parsed;this.inflateData=n.inflateData;this.finished=n.finished;this.simpleTransparency=n.simpleTransparency;this.headersFinished=n.headersFinished||function(){}};n.prototype.start=function(){this.read(t.PNG_SIGNATURE.length,this._parseSignature.bind(this))};n.prototype._parseSignature=function(e){let n=t.PNG_SIGNATURE;for(let t=0;t<n.length;t++){if(e[t]!==n[t]){this.error(new Error("Invalid file signature"));return}}this.read(8,this._parseChunkBegin.bind(this))};n.prototype._parseChunkBegin=function(n){let s=n.readUInt32BE(0);let r=n.readUInt32BE(4);let i="";for(let t=4;t<8;t++){i+=String.fromCharCode(n[t])}let o=Boolean(n[4]&32);if(!this._hasIHDR&&r!==t.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}this._crc=new e;this._crc.write(uc.from(i));if(this._chunks[r]){return this._chunks[r](s)}if(!o){this.error(new Error("Unsupported critical chunk type "+i));return}this.read(s+4,this._skipChunk.bind(this))};n.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};n.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};n.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0);let n=this._crc.crc32();if(this._options.checkCRC&&n!==e){this.error(new Error("Crc error - "+e+" - "+n));return}if(!this._hasIEND){this.read(8,this._parseChunkBegin.bind(this))}};n.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))};n.prototype._parseIHDR=function(e){this._crc.write(e);let n=e.readUInt32BE(0);let s=e.readUInt32BE(4);let r=e[8];let i=e[9];let o=e[10];let a=e[11];let c=e[12];if(r!==8&&r!==4&&r!==2&&r!==1&&r!==16){this.error(new Error("Unsupported bit depth "+r));return}if(!(i in t.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(o!==0){this.error(new Error("Unsupported compression method"));return}if(a!==0){this.error(new Error("Unsupported filter method"));return}if(c!==0&&c!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=i;let u=t.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=true;this.metadata({width:n,height:s,depth:r,interlace:Boolean(c),palette:Boolean(i&t.COLORTYPE_PALETTE),color:Boolean(i&t.COLORTYPE_COLOR),alpha:Boolean(i&t.COLORTYPE_ALPHA),bpp:u,colorType:i});this._handleChunkEnd()};n.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))};n.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let n=0;n<e;n++){this._palette.push([t[n*3],t[n*3+1],t[n*3+2],255])}this.palette(this._palette);this._handleChunkEnd()};n.prototype._handleTRNS=function(t){this.simpleTransparency();this.read(t,this._parseTRNS.bind(this))};n.prototype._parseTRNS=function(e){this._crc.write(e);if(this._colorType===t.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(e.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let t=0;t<e.length;t++){this._palette[t][3]=e[t]}this.palette(this._palette)}if(this._colorType===t.COLORTYPE_GRAYSCALE){this.transColor([e.readUInt16BE(0)])}if(this._colorType===t.COLORTYPE_COLOR){this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)])}this._handleChunkEnd()};n.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))};n.prototype._parseGAMA=function(e){this._crc.write(e);this.gamma(e.readUInt32BE(0)/t.GAMMA_DIVISION);this._handleChunkEnd()};n.prototype._handleIDAT=function(t){if(!this._emittedHeadersFinished){this._emittedHeadersFinished=true;this.headersFinished()}this.read(-t,this._parseIDAT.bind(this,t))};n.prototype._parseIDAT=function(e,n){this._crc.write(n);if(this._colorType===t.COLORTYPE_PALETTE_COLOR&&this._palette.length===0){throw new Error("Expected palette not found")}this.inflateData(n);let s=e-n.length;if(s>0){this._handleIDAT(s)}else{this._handleChunkEnd()}};n.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))};n.prototype._parseIEND=function(t){this._crc.write(t);this._hasIEND=true;this._handleChunkEnd();if(this.finished){this.finished()}};return Wlt.exports}var qlt={};var Jlt;function Klt(){if(Jlt)return qlt;Jlt=1;let t=Olt();let e=[function(){},function(t,e,n,s){if(s===e.length){throw new Error("Ran out of data")}let r=e[s];t[n]=r;t[n+1]=r;t[n+2]=r;t[n+3]=255},function(t,e,n,s){if(s+1>=e.length){throw new Error("Ran out of data")}let r=e[s];t[n]=r;t[n+1]=r;t[n+2]=r;t[n+3]=e[s+1]},function(t,e,n,s){if(s+2>=e.length){throw new Error("Ran out of data")}t[n]=e[s];t[n+1]=e[s+1];t[n+2]=e[s+2];t[n+3]=255},function(t,e,n,s){if(s+3>=e.length){throw new Error("Ran out of data")}t[n]=e[s];t[n+1]=e[s+1];t[n+2]=e[s+2];t[n+3]=e[s+3]}];let n=[function(){},function(t,e,n,s){let r=e[0];t[n]=r;t[n+1]=r;t[n+2]=r;t[n+3]=s},function(t,e,n){let s=e[0];t[n]=s;t[n+1]=s;t[n+2]=s;t[n+3]=e[1]},function(t,e,n,s){t[n]=e[0];t[n+1]=e[1];t[n+2]=e[2];t[n+3]=s},function(t,e,n){t[n]=e[0];t[n+1]=e[1];t[n+2]=e[2];t[n+3]=e[3]}];function s(t,e){let n=[];let s=0;function r(){if(s===t.length){throw new Error("Ran out of data")}let r=t[s];s++;let i,o,a,c,u,l,f,h;switch(e){default:throw new Error("unrecognised depth");case 16:f=t[s];s++;n.push((r<<8)+f);break;case 4:f=r&15;h=r>>4;n.push(h,f);break;case 2:u=r&3;l=r>>2&3;f=r>>4&3;h=r>>6&3;n.push(h,f,l,u);break;case 1:i=r&1;o=r>>1&1;a=r>>2&1;c=r>>3&1;u=r>>4&1;l=r>>5&1;f=r>>6&1;h=r>>7&1;n.push(h,f,l,u,c,a,o,i);break}}return{get:function(t){while(n.length<t){r()}let e=n.slice(0,t);n=n.slice(t);return e},resetAfterLine:function(){n.length=0},end:function(){if(s!==t.length){throw new Error("extra data found")}}}}function r(t,n,s,r,i,o){let a=t.width;let c=t.height;let u=t.index;for(let t=0;t<c;t++){for(let c=0;c<a;c++){let a=s(c,t,u);e[r](n,i,a,o);o+=r}}return o}function i(t,e,s,r,i,o){let a=t.width;let c=t.height;let u=t.index;for(let t=0;t<c;t++){for(let c=0;c<a;c++){let a=i.get(r);let l=s(c,t,u);n[r](e,a,l,o)}i.resetAfterLine()}}qlt.dataToBitMap=function(e,n){let o=n.width;let a=n.height;let c=n.depth;let u=n.bpp;let l=n.interlace;let f;if(c!==8){f=s(e,c)}let h;if(c<=8){h=uc.alloc(o*a*4)}else{h=new Uint16Array(o*a*4)}let d=Math.pow(2,c)-1;let p=0;let m;let b;if(l){m=t.getImagePasses(o,a);b=t.getInterlaceIterator(o,a)}else{let t=0;b=function(){let e=t;t+=4;return e};m=[{width:o,height:a}]}for(let t=0;t<m.length;t++){if(c===8){p=r(m[t],h,b,u,e,p)}else{i(m[t],h,b,u,f,d)}}if(c===8){if(p!==e.length){throw new Error("extra data found")}}else{f.end()}return h};return qlt}var tft;var eft;function nft(){if(eft)return tft;eft=1;function t(t,e,n,s,r){let i=0;for(let o=0;o<s;o++){for(let s=0;s<n;s++){let n=r[t[i]];if(!n){throw new Error("index "+t[i]+" not in palette")}for(let t=0;t<4;t++){e[i+t]=n[t]}i+=4}}}function e(t,e,n,s,r){let i=0;for(let o=0;o<s;o++){for(let s=0;s<n;s++){let n=false;if(r.length===1){if(r[0]===t[i]){n=true}}else if(r[0]===t[i]&&r[1]===t[i+1]&&r[2]===t[i+2]){n=true}if(n){for(let t=0;t<4;t++){e[i+t]=0}}i+=4}}}function n(t,e,n,s,r){let i=255;let o=Math.pow(2,r)-1;let a=0;for(let r=0;r<s;r++){for(let s=0;s<n;s++){for(let n=0;n<4;n++){e[a+n]=Math.floor(t[a+n]*i/o+.5)}a+=4}}}tft=function(s,r){let i=r.depth;let o=r.width;let a=r.height;let c=r.colorType;let u=r.transColor;let l=r.palette;let f=s;if(c===3){t(s,f,o,a,l)}else{if(u){e(s,f,o,a,u)}if(i!==8){if(i===16){f=uc.alloc(o*a*4)}n(s,f,o,a,i)}}return f};return tft}var sft;function rft(){if(sft)return rit.exports;sft=1;let t=Nst();let e=Slt;let n=Mlt();let s=Blt();let r=Xlt();let i=Klt();let o=nft();let a=rit.exports=function(t){n.call(this);this._parser=new r(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)});this._options=t;this.writable=true;this._parser.start()};t.inherits(a,n);a.prototype._handleError=function(t){this.emit("error",t);this.writable=false;this.destroy();if(this._inflate&&this._inflate.destroy){this._inflate.destroy()}if(this._filter){this._filter.destroy();this._filter.on("error",(function(){}))}this.errord=true};a.prototype._inflateData=function(t){if(!this._inflate){if(this._bitmapInfo.interlace){this._inflate=e.createInflate();this._inflate.on("error",this.emit.bind(this,"error"));this._filter.on("complete",this._complete.bind(this));this._inflate.pipe(this._filter)}else{let t=(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1;let n=t*this._bitmapInfo.height;let s=Math.max(n,e.Z_MIN_CHUNK);this._inflate=e.createInflate({chunkSize:s});let r=n;let i=this.emit.bind(this,"error");this._inflate.on("error",(function(t){if(!r){return}i(t)}));this._filter.on("complete",this._complete.bind(this));let o=this._filter.write.bind(this._filter);this._inflate.on("data",(function(t){if(!r){return}if(t.length>r){t=t.slice(0,r)}r-=t.length;o(t)}));this._inflate.on("end",this._filter.end.bind(this._filter))}}this._inflate.write(t)};a.prototype._handleMetaData=function(t){this._metaData=t;this._bitmapInfo=Object.create(t);this._filter=new s(this._bitmapInfo)};a.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t};a.prototype._handlePalette=function(t){this._bitmapInfo.palette=t};a.prototype._simpleTransparency=function(){this._metaData.alpha=true};a.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};a.prototype._finished=function(){if(this.errord){return}if(!this._inflate){this.emit("error","No Inflate block")}else{this._inflate.end()}};a.prototype._complete=function(t){if(this.errord){return}let e;try{let n=i.dataToBitMap(t,this._bitmapInfo);e=o(n,this._bitmapInfo);n=null}catch(t){this._handleError(t);return}this.emit("parsed",e)};return rit.exports}var ift={exports:{}};var oft={exports:{}};var aft;var cft;function uft(){if(cft)return aft;cft=1;let t=Vlt();aft=function(e,n,s,r){let i=[t.COLORTYPE_COLOR_ALPHA,t.COLORTYPE_ALPHA].indexOf(r.colorType)!==-1;if(r.colorType===r.inputColorType){let t=function(){let t=new ArrayBuffer(2);new DataView(t).setInt16(0,256,true);return new Int16Array(t)[0]!==256}();if(r.bitDepth===8||r.bitDepth===16&&t){return e}}let o=r.bitDepth!==16?e:new Uint16Array(e.buffer);let a=255;let c=t.COLORTYPE_TO_BPP_MAP[r.inputColorType];if(c===4&&!r.inputHasAlpha){c=3}let u=t.COLORTYPE_TO_BPP_MAP[r.colorType];if(r.bitDepth===16){a=65535;u*=2}let l=uc.alloc(n*s*u);let f=0;let h=0;let d=r.bgColor||{};if(d.red===undefined){d.red=a}if(d.green===undefined){d.green=a}if(d.blue===undefined){d.blue=a}function p(){let e;let n;let s;let c=a;switch(r.inputColorType){case t.COLORTYPE_COLOR_ALPHA:c=o[f+3];e=o[f];n=o[f+1];s=o[f+2];break;case t.COLORTYPE_COLOR:e=o[f];n=o[f+1];s=o[f+2];break;case t.COLORTYPE_ALPHA:c=o[f+1];e=o[f];n=e;s=e;break;case t.COLORTYPE_GRAYSCALE:e=o[f];n=e;s=e;break;default:throw new Error("input color type:"+r.inputColorType+" is not supported at present")}if(r.inputHasAlpha){if(!i){c/=a;e=Math.min(Math.max(Math.round((1-c)*d.red+c*e),0),a);n=Math.min(Math.max(Math.round((1-c)*d.green+c*n),0),a);s=Math.min(Math.max(Math.round((1-c)*d.blue+c*s),0),a)}}return{red:e,green:n,blue:s,alpha:c}}for(let e=0;e<s;e++){for(let e=0;e<n;e++){let e=p();switch(r.colorType){case t.COLORTYPE_COLOR_ALPHA:case t.COLORTYPE_COLOR:if(r.bitDepth===8){l[h]=e.red;l[h+1]=e.green;l[h+2]=e.blue;if(i){l[h+3]=e.alpha}}else{l.writeUInt16BE(e.red,h);l.writeUInt16BE(e.green,h+2);l.writeUInt16BE(e.blue,h+4);if(i){l.writeUInt16BE(e.alpha,h+6)}}break;case t.COLORTYPE_ALPHA:case t.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;if(r.bitDepth===8){l[h]=t;if(i){l[h+1]=e.alpha}}else{l.writeUInt16BE(t,h);if(i){l.writeUInt16BE(e.alpha,h+2)}}break}default:throw new Error("unrecognised color Type "+r.colorType)}f+=c;h+=u}}return l};return aft}var lft;var fft;function hft(){if(fft)return lft;fft=1;let t=Flt();function e(t,e,n,s,r){for(let i=0;i<n;i++){s[r+i]=t[e+i]}}function n(t,e,n){let s=0;let r=e+n;for(let n=e;n<r;n++){s+=Math.abs(t[n])}return s}function s(t,e,n,s,r,i){for(let o=0;o<n;o++){let n=o>=i?t[e+o-i]:0;let a=t[e+o]-n;s[r+o]=a}}function r(t,e,n,s){let r=0;for(let i=0;i<n;i++){let n=i>=s?t[e+i-s]:0;let o=t[e+i]-n;r+=Math.abs(o)}return r}function i(t,e,n,s,r){for(let i=0;i<n;i++){let o=e>0?t[e+i-n]:0;let a=t[e+i]-o;s[r+i]=a}}function o(t,e,n){let s=0;let r=e+n;for(let i=e;i<r;i++){let r=e>0?t[i-n]:0;let o=t[i]-r;s+=Math.abs(o)}return s}function a(t,e,n,s,r,i){for(let o=0;o<n;o++){let a=o>=i?t[e+o-i]:0;let c=e>0?t[e+o-n]:0;let u=t[e+o]-(a+c>>1);s[r+o]=u}}function c(t,e,n,s){let r=0;for(let i=0;i<n;i++){let o=i>=s?t[e+i-s]:0;let a=e>0?t[e+i-n]:0;let c=t[e+i]-(o+a>>1);r+=Math.abs(c)}return r}function u(e,n,s,r,i,o){for(let a=0;a<s;a++){let c=a>=o?e[n+a-o]:0;let u=n>0?e[n+a-s]:0;let l=n>0&&a>=o?e[n+a-(s+o)]:0;let f=e[n+a]-t(c,u,l);r[i+a]=f}}function l(e,n,s,r){let i=0;for(let o=0;o<s;o++){let a=o>=r?e[n+o-r]:0;let c=n>0?e[n+o-s]:0;let u=n>0&&o>=r?e[n+o-(s+r)]:0;let l=e[n+o]-t(a,c,u);i+=Math.abs(l)}return i}let f={0:e,1:s,2:i,3:a,4:u};let h={0:n,1:r,2:o,3:c,4:l};lft=function(t,e,n,s,r){let i;if(!("filterType"in s)||s.filterType===-1){i=[0,1,2,3,4]}else if(typeof s.filterType==="number"){i=[s.filterType]}else{throw new Error("unrecognised filter types")}if(s.bitDepth===16){r*=2}let o=e*r;let a=0;let c=0;let u=uc.alloc((o+1)*n);let l=i[0];for(let e=0;e<n;e++){if(i.length>1){let e=Infinity;for(let n=0;n<i.length;n++){let s=h[i[n]](t,c,o,r);if(s<e){l=i[n];e=s}}}u[a]=l;a++;f[l](t,c,o,u,a,r);a+=o;c+=o}return u};return lft}var dft;function pft(){if(dft)return oft.exports;dft=1;let t=Vlt();let e=Zlt();let n=uft();let s=hft();let r=Slt;let i=oft.exports=function(e){this._options=e;e.deflateChunkSize=e.deflateChunkSize||32*1024;e.deflateLevel=e.deflateLevel!=null?e.deflateLevel:9;e.deflateStrategy=e.deflateStrategy!=null?e.deflateStrategy:3;e.inputHasAlpha=e.inputHasAlpha!=null?e.inputHasAlpha:true;e.deflateFactory=e.deflateFactory||r.createDeflate;e.bitDepth=e.bitDepth||8;e.colorType=typeof e.colorType==="number"?e.colorType:t.COLORTYPE_COLOR_ALPHA;e.inputColorType=typeof e.inputColorType==="number"?e.inputColorType:t.COLORTYPE_COLOR_ALPHA;if([t.COLORTYPE_GRAYSCALE,t.COLORTYPE_COLOR,t.COLORTYPE_COLOR_ALPHA,t.COLORTYPE_ALPHA].indexOf(e.colorType)===-1){throw new Error("option color type:"+e.colorType+" is not supported at present")}if([t.COLORTYPE_GRAYSCALE,t.COLORTYPE_COLOR,t.COLORTYPE_COLOR_ALPHA,t.COLORTYPE_ALPHA].indexOf(e.inputColorType)===-1){throw new Error("option input color type:"+e.inputColorType+" is not supported at present")}if(e.bitDepth!==8&&e.bitDepth!==16){throw new Error("option bit depth:"+e.bitDepth+" is not supported at present")}};i.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};i.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};i.prototype.filterData=function(e,r,i){let o=n(e,r,i,this._options);let a=t.COLORTYPE_TO_BPP_MAP[this._options.colorType];let c=s(o,r,i,this._options,a);return c};i.prototype._packChunk=function(t,n){let s=n?n.length:0;let r=uc.alloc(s+12);r.writeUInt32BE(s,0);r.writeUInt32BE(t,4);if(n){n.copy(r,8)}r.writeInt32BE(e.crc32(r.slice(4,r.length-4)),r.length-4);return r};i.prototype.packGAMA=function(e){let n=uc.alloc(4);n.writeUInt32BE(Math.floor(e*t.GAMMA_DIVISION),0);return this._packChunk(t.TYPE_gAMA,n)};i.prototype.packIHDR=function(e,n){let s=uc.alloc(13);s.writeUInt32BE(e,0);s.writeUInt32BE(n,4);s[8]=this._options.bitDepth;s[9]=this._options.colorType;s[10]=0;s[11]=0;s[12]=0;return this._packChunk(t.TYPE_IHDR,s)};i.prototype.packIDAT=function(e){return this._packChunk(t.TYPE_IDAT,e)};i.prototype.packIEND=function(){return this._packChunk(t.TYPE_IEND,null)};return oft.exports}var mft;function bft(){if(mft)return ift.exports;mft=1;let t=Nst();let e=sit;let n=Vlt();let s=pft();let r=ift.exports=function(t){e.call(this);let n=t||{};this._packer=new s(n);this._deflate=this._packer.createDeflate();this.readable=true};t.inherits(r,e);r.prototype.pack=function(t,e,s,r){this.emit("data",uc.from(n.PNG_SIGNATURE));this.emit("data",this._packer.packIHDR(e,s));if(r){this.emit("data",this._packer.packGAMA(r))}let i=this._packer.filterData(t,e,s);this._deflate.on("error",this.emit.bind(this,"error"));this._deflate.on("data",function(t){this.emit("data",this._packer.packIDAT(t))}.bind(this));this._deflate.on("end",function(){this.emit("data",this._packer.packIEND());this.emit("end")}.bind(this));this._deflate.end(i)};return ift.exports}var yft={};var wft={exports:{}};function gft(t,e){if(t===e){return 0}var n=t.length;var s=e.length;for(var r=0,i=Math.min(n,s);r<i;++r){if(t[r]!==e[r]){n=t[r];s=e[r];break}}if(n<s){return-1}if(s<n){return 1}return 0}var vft=Object.prototype.hasOwnProperty;var xft=Object.keys||function(t){var e=[];for(var n in t){if(vft.call(t,n))e.push(n)}return e};var Nft=Array.prototype.slice;var kft;function Cft(){if(typeof kft!=="undefined"){return kft}return kft=function(){return function t(){}.name==="foo"}()}function $ft(t){return Object.prototype.toString.call(t)}function Sft(t){if(su(t)){return false}if(typeof g.ArrayBuffer!=="function"){return false}if(typeof ArrayBuffer.isView==="function"){return ArrayBuffer.isView(t)}if(!t){return false}if(t instanceof DataView){return true}if(t.buffer&&t.buffer instanceof ArrayBuffer){return true}return false}function Ift(t,e){if(!t)Oft(t,true,e,"==",Lft)}var Eft=/\s*function\s+([^\(\s]*)\s*/;function Mft(t){if(!jst.isFunction(t)){return}if(Cft()){return t.name}var e=t.toString();var n=e.match(Eft);return n&&n[1]}Ift.AssertionError=Tft;function Tft(t){this.name="AssertionError";this.actual=t.actual;this.expected=t.expected;this.operator=t.operator;if(t.message){this.message=t.message;this.generatedMessage=false}else{this.message=Rft(this);this.generatedMessage=true}var e=t.stackStartFunction||Oft;if(Error.captureStackTrace){Error.captureStackTrace(this,e)}else{var n=new Error;if(n.stack){var s=n.stack;var r=Mft(e);var i=s.indexOf("\n"+r);if(i>=0){var o=s.indexOf("\n",i+1);s=s.substring(o+1)}this.stack=s}}}jst.inherits(Tft,Error);function Aft(t,e){if(typeof t==="string"){return t.length<e?t:t.slice(0,e)}else{return t}}function Dft(t){if(Cft()||!jst.isFunction(t)){return jst.inspect(t)}var e=Mft(t);var n=e?": "+e:"";return"[Function"+n+"]"}function Rft(t){return Aft(Dft(t.actual),128)+" "+t.operator+" "+Aft(Dft(t.expected),128)}function Oft(t,e,n,s,r){throw new Tft({message:n,actual:t,expected:e,operator:s,stackStartFunction:r})}Ift.fail=Oft;function Lft(t,e){if(!t)Oft(t,true,e,"==",Lft)}Ift.ok=Lft;Ift.equal=_ft;function _ft(t,e,n){if(t!=e)Oft(t,e,n,"==",_ft)}Ift.notEqual=Fft;function Fft(t,e,n){if(t==e){Oft(t,e,n,"!=",Fft)}}Ift.deepEqual=zft;function zft(t,e,n){if(!Pft(t,e,false)){Oft(t,e,n,"deepEqual",zft)}}Ift.deepStrictEqual=jft;function jft(t,e,n){if(!Pft(t,e,true)){Oft(t,e,n,"deepStrictEqual",jft)}}function Pft(t,e,n,s){if(t===e){return true}else if(su(t)&&su(e)){return gft(t,e)===0}else if(jst.isDate(t)&&jst.isDate(e)){return t.getTime()===e.getTime()}else if(jst.isRegExp(t)&&jst.isRegExp(e)){return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase}else if((t===null||typeof t!=="object")&&(e===null||typeof e!=="object")){return n?t===e:t==e}else if(Sft(t)&&Sft(e)&&$ft(t)===$ft(e)&&!(t instanceof Float32Array||t instanceof Float64Array)){return gft(new Uint8Array(t.buffer),new Uint8Array(e.buffer))===0}else if(su(t)!==su(e)){return false}else{s=s||{actual:[],expected:[]};var r=s.actual.indexOf(t);if(r!==-1){if(r===s.expected.indexOf(e)){return true}}s.actual.push(t);s.expected.push(e);return Wft(t,e,n,s)}}function Bft(t){return Object.prototype.toString.call(t)=="[object Arguments]"}function Wft(t,e,n,s){if(t===null||t===undefined||e===null||e===undefined)return false;if(jst.isPrimitive(t)||jst.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return false;var r=Bft(t);var i=Bft(e);if(r&&!i||!r&&i)return false;if(r){t=Nft.call(t);e=Nft.call(e);return Pft(t,e,n)}var o=xft(t);var a=xft(e);var c,u;if(o.length!==a.length)return false;o.sort();a.sort();for(u=o.length-1;u>=0;u--){if(o[u]!==a[u])return false}for(u=o.length-1;u>=0;u--){c=o[u];if(!Pft(t[c],e[c],n,s))return false}return true}Ift.notDeepEqual=Gft;function Gft(t,e,n){if(Pft(t,e,false)){Oft(t,e,n,"notDeepEqual",Gft)}}Ift.notDeepStrictEqual=Uft;function Uft(t,e,n){if(Pft(t,e,true)){Oft(t,e,n,"notDeepStrictEqual",Uft)}}Ift.strictEqual=Vft;function Vft(t,e,n){if(t!==e){Oft(t,e,n,"===",Vft)}}Ift.notStrictEqual=Yft;function Yft(t,e,n){if(t===e){Oft(t,e,n,"!==",Yft)}}function Hft(t,e){if(!t||!e){return false}if(Object.prototype.toString.call(e)=="[object RegExp]"){return e.test(t)}try{if(t instanceof e){return true}}catch(t){}if(Error.isPrototypeOf(e)){return false}return e.call({},t)===true}function Zft(t){var e;try{t()}catch(t){e=t}return e}function Qft(t,e,n,s){var r;if(typeof e!=="function"){throw new TypeError('"block" argument must be a function')}if(typeof n==="string"){s=n;n=null}r=Zft(e);s=(n&&n.name?" ("+n.name+").":".")+(s?" "+s:".");if(t&&!r){Oft(r,n,"Missing expected exception"+s)}var i=typeof s==="string";var o=!t&&jst.isError(r);var a=!t&&r&&!n;if(o&&i&&Hft(r,n)||a){Oft(r,n,"Got unwanted exception"+s)}if(t&&r&&n&&!Hft(r,n)||!t&&r){throw r}}Ift.throws=Xft;function Xft(t,e,n){Qft(true,t,e,n)}Ift.doesNotThrow=qft;function qft(t,e,n){Qft(false,t,e,n)}Ift.ifError=Jft;function Jft(t){if(t)throw t}var Kft=Object.freeze({__proto__:null,AssertionError:Tft,assert:Lft,deepEqual:zft,deepStrictEqual:jft,default:Ift,doesNotThrow:qft,equal:_ft,fail:Oft,ifError:Jft,notDeepEqual:Gft,notDeepStrictEqual:Uft,notEqual:Fft,notStrictEqual:Yft,ok:Lft,strictEqual:Vft,throws:Xft});var tht=f(Kft);var eht;function nht(){if(eht)return wft.exports;eht=1;(function(t,e){let n=tht.ok;let s=Slt;let r=Nst();let i=Gst.kMaxLength;function o(t){if(!(this instanceof o)){return new o(t)}if(t&&t.chunkSize<s.Z_MIN_CHUNK){t.chunkSize=s.Z_MIN_CHUNK}s.Inflate.call(this,t);this._offset=this._offset===undefined?this._outOffset:this._offset;this._buffer=this._buffer||this._outBuffer;if(t&&t.maxLength!=null){this._maxLength=t.maxLength}}function a(t){return new o(t)}function c(t,e){if(!t._handle){return}t._handle.close();t._handle=null}o.prototype._processChunk=function(t,e,r){if(typeof r==="function"){return s.Inflate._processChunk.call(this,t,e,r)}let o=this;let a=t&&t.length;let u=this._chunkSize-this._offset;let l=this._maxLength;let f=0;let h=[];let d=0;let p;this.on("error",(function(t){p=t}));function m(t,e){if(o._hadError){return}let s=u-e;n(s>=0,"have should not go down");if(s>0){let t=o._buffer.slice(o._offset,o._offset+s);o._offset+=s;if(t.length>l){t=t.slice(0,l)}h.push(t);d+=t.length;l-=t.length;if(l===0){return false}}if(e===0||o._offset>=o._chunkSize){u=o._chunkSize;o._offset=0;o._buffer=uc.allocUnsafe(o._chunkSize)}if(e===0){f+=a-t;a=t;return true}return false}n(this._handle,"zlib binding closed");let b;do{b=this._handle.writeSync(e,t,f,a,this._buffer,this._offset,u);b=b||this._writeState}while(!this._hadError&&m(b[0],b[1]));if(this._hadError){throw p}if(d>=i){c(this);throw new RangeError("Cannot create final Buffer. It would be larger than 0x"+i.toString(16)+" bytes")}let y=uc.concat(h,d);c(this);return y};r.inherits(o,s.Inflate);function u(t,e){if(typeof e==="string"){e=uc.from(e)}if(!(e instanceof uc)){throw new TypeError("Not a string or buffer")}let n=t._finishFlushFlag;if(n==null){n=s.Z_FINISH}return t._processChunk(e,n)}function l(t,e){return u(new o(e),t)}t.exports=e=l;e.Inflate=o;e.createInflate=a;e.inflateSync=l})(wft,wft.exports);return wft.exports}var sht={exports:{}};var rht;function iht(){if(rht)return sht.exports;rht=1;let t=sht.exports=function(t){this._buffer=t;this._reads=[]};t.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})};t.prototype.process=function(){while(this._reads.length>0&&this._buffer.length){let t=this._reads[0];if(this._buffer.length&&(this._buffer.length>=t.length||t.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length);t.func.call(this,e.slice(0,t.length))}else{break}}if(this._reads.length>0){return new Error("There are some read requests waitng on finished stream")}if(this._buffer.length>0){return new Error("unrecognised content at end of stream")}};return sht.exports}var oht={};var aht;function cht(){if(aht)return oht;aht=1;let t=iht();let e=jlt();oht.process=function(n,s){let r=[];let i=new t(n);let o=new e(s,{read:i.read.bind(i),write:function(t){r.push(t)},complete:function(){}});o.start();i.process();return uc.concat(r)};return oht}var uht;var lht;function fht(){if(lht)return uht;lht=1;let t=true;let e=Slt;let n=nht();if(!e.deflateSync){t=false}let s=iht();let r=cht();let i=Xlt();let o=Klt();let a=nft();uht=function(c,u){if(!t){throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0")}let l;function f(t){l=t}let h;function d(t){h=t}function p(t){h.transColor=t}function m(t){h.palette=t}function b(){h.alpha=true}let y;function w(t){y=t}let g=[];function v(t){g.push(t)}let x=new s(c);let N=new i(u,{read:x.read.bind(x),error:f,metadata:d,gamma:w,palette:m,transColor:p,inflateData:v,simpleTransparency:b});N.start();x.process();if(l){throw l}let k=uc.concat(g);g.length=0;let C;if(h.interlace){C=e.inflateSync(k)}else{let t=(h.width*h.bpp*h.depth+7>>3)+1;let e=t*h.height;C=n(k,{chunkSize:e,maxLength:e})}k=null;if(!C||!C.length){throw new Error("bad png - invalid inflate data response")}let $=r.process(C,h);k=null;let S=o.dataToBitMap($,h);$=null;let I=a(S,h);h.data=I;h.gamma=y||0;return h};return uht}var hht;var dht;function pht(){if(dht)return hht;dht=1;let t=true;let e=Slt;if(!e.deflateSync){t=false}let n=Vlt();let s=pft();hht=function(r,i){if(!t){throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0")}let o=i||{};let a=new s(o);let c=[];c.push(uc.from(n.PNG_SIGNATURE));c.push(a.packIHDR(r.width,r.height));if(r.gamma){c.push(a.packGAMA(r.gamma))}let u=a.filterData(r.data,r.width,r.height);let l=e.deflateSync(u,a.getDeflateOptions());u=null;if(!l||!l.length){throw new Error("bad png - invalid compressed data response")}c.push(a.packIDAT(l));c.push(a.packIEND());return uc.concat(c)};return hht}var mht;function bht(){if(mht)return yft;mht=1;let t=fht();let e=pht();yft.read=function(e,n){return t(e,n||{})};yft.write=function(t,n){return e(t,n)};return yft}var yht;function wht(){if(yht)return ptt;yht=1;let t=Nst();let e=sit;let n=rft();let s=bft();let r=bht();let i=ptt.PNG=function(t){e.call(this);t=t||{};this.width=t.width|0;this.height=t.height|0;this.data=this.width>0&&this.height>0?uc.alloc(4*this.width*this.height):null;if(t.fill&&this.data){this.data.fill(0)}this.gamma=0;this.readable=this.writable=true;this._parser=new n(t);this._parser.on("error",this.emit.bind(this,"error"));this._parser.on("close",this._handleClose.bind(this));this._parser.on("metadata",this._metadata.bind(this));this._parser.on("gamma",this._gamma.bind(this));this._parser.on("parsed",function(t){this.data=t;this.emit("parsed",t)}.bind(this));this._packer=new s(t);this._packer.on("data",this.emit.bind(this,"data"));this._packer.on("end",this.emit.bind(this,"end"));this._parser.on("close",this._handleClose.bind(this));this._packer.on("error",this.emit.bind(this,"error"))};t.inherits(i,e);i.sync=r;i.prototype.pack=function(){if(!this.data||!this.data.length){this.emit("error","No data provided");return this}v.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this));return this};i.prototype.parse=function(t,e){if(e){let t,n;t=function(t){this.removeListener("error",n);this.data=t;e(null,this)}.bind(this);n=function(n){this.removeListener("parsed",t);e(n,null)}.bind(this);this.once("parsed",t);this.once("error",n)}this.end(t);return this};i.prototype.write=function(t){this._parser.write(t);return true};i.prototype.end=function(t){this._parser.end(t)};i.prototype._metadata=function(t){this.width=t.width;this.height=t.height;this.emit("metadata",t)};i.prototype._gamma=function(t){this.gamma=t};i.prototype._handleClose=function(){if(!this._parser.writable&&!this._packer.readable){this.emit("close")}};i.bitblt=function(t,e,n,s,r,i,o,a){n|=0;s|=0;r|=0;i|=0;o|=0;a|=0;if(n>t.width||s>t.height||n+r>t.width||s+i>t.height){throw new Error("bitblt reading outside image")}if(o>e.width||a>e.height||o+r>e.width||a+i>e.height){throw new Error("bitblt writing outside image")}for(let c=0;c<i;c++){t.data.copy(e.data,(a+c)*e.width+o<<2,(s+c)*t.width+n<<2,(s+c)*t.width+n+r<<2)}};i.prototype.bitblt=function(t,e,n,s,r,o,a){i.bitblt(this,t,e,n,s,r,o,a);return this};i.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++){for(let n=0;n<t.width;n++){let s=t.width*e+n<<2;for(let e=0;e<3;e++){let n=t.data[s+e]/255;n=Math.pow(n,1/2.2/t.gamma);t.data[s+e]=Math.round(n*255)}}}t.gamma=0}};i.prototype.adjustGamma=function(){i.adjustGamma(this)};return ptt}var ght={};var vht;function xht(){if(vht)return ght;vht=1;(function(t){function e(t){if(typeof t==="number"){t=t.toString()}if(typeof t!=="string"){throw new Error("Color should be defined as hex string")}let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8){throw new Error("Invalid hex color: "+t)}if(e.length===3||e.length===4){e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))}if(e.length===6)e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function t(n){if(!n)n={};if(!n.color)n.color={};const s=typeof n.margin==="undefined"||n.margin===null||n.margin<0?4:n.margin;const r=n.width&&n.width>=21?n.width:undefined;const i=n.scale||4;return{width:r,scale:r?4:i,margin:s,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}};t.getScale=function t(e,n){return n.width&&n.width>=e+n.margin*2?n.width/(e+n.margin*2):n.scale};t.getImageWidth=function e(n,s){const r=t.getScale(n,s);return Math.floor((n+s.margin*2)*r)};t.qrToImageData=function e(n,s,r){const i=s.modules.size;const o=s.modules.data;const a=t.getScale(i,r);const c=Math.floor((i+r.margin*2)*a);const u=r.margin*a;const l=[r.color.light,r.color.dark];for(let t=0;t<c;t++){for(let e=0;e<c;e++){let s=(t*c+e)*4;let f=r.color.light;if(t>=u&&e>=u&&t<c-u&&e<c-u){const n=Math.floor((t-u)/a);const s=Math.floor((e-u)/a);f=l[o[n*i+s]?1:0]}n[s++]=f.r;n[s++]=f.g;n[s++]=f.b;n[s]=f.a}}}})(ght);return ght}var Nht;function kht(){if(Nht)return dtt;Nht=1;(function(t){const e=Jw;const n=wht().PNG;const s=xht();t.render=function t(e,r){const i=s.getOptions(r);const o=i.rendererOpts;const a=s.getImageWidth(e.modules.size,i);o.width=a;o.height=a;const c=new n(o);s.qrToImageData(c.data,e,i);return c};t.renderToDataURL=function e(n,s,r){if(typeof r==="undefined"){r=s;s=undefined}t.renderToBuffer(n,s,(function(t,e){if(t)r(t);let n="data:image/png;base64,";n+=e.toString("base64");r(null,n)}))};t.renderToBuffer=function e(n,s,r){if(typeof r==="undefined"){r=s;s=undefined}const i=t.render(n,s);const o=[];i.on("error",r);i.on("data",(function(t){o.push(t)}));i.on("end",(function(){r(null,uc.concat(o))}));i.pack()};t.renderToFile=function n(s,r,i,o){if(typeof o==="undefined"){o=i;i=undefined}let a=false;const c=(...t)=>{if(a)return;a=true;o.apply(null,t)};const u=e.createWriteStream(s);u.on("error",c);u.on("close",c);t.renderToFileStream(u,r,i)};t.renderToFileStream=function e(n,s,r){const i=t.render(s,r);i.pack().pipe(n)}})(dtt);return dtt}var Cht={};var $ht;function Sht(){if($ht)return Cht;$ht=1;(function(t){const e=xht();const n={WW:" ",WB:"▄",BB:"█",BW:"▀"};const s={BB:" ",BW:"▄",WW:"█",WB:"▀"};function r(t,e,n){if(t&&e)return n.BB;if(t&&!e)return n.BW;if(!t&&e)return n.WB;return n.WW}t.render=function(t,i,o){const a=e.getOptions(i);let c=n;if(a.color.dark.hex==="#ffffff"||a.color.light.hex==="#000000"){c=s}const u=t.modules.size;const l=t.modules.data;let f="";let h=Array(u+a.margin*2+1).join(c.WW);h=Array(a.margin/2+1).join(h+"\n");const d=Array(a.margin+1).join(c.WW);f+=h;for(let t=0;t<u;t+=2){f+=d;for(let e=0;e<u;e++){const n=l[t*u+e];const s=l[(t+1)*u+e];f+=r(n,s,c)}f+=d+"\n"}f+=h.slice(0,-1);if(typeof o==="function"){o(null,f)}return f};t.renderToFile=function e(n,s,r,i){if(typeof i==="undefined"){i=r;r=undefined}const o=Jw;const a=t.render(s,r);o.writeFile(n,a,i)}})(Cht);return Cht}var Iht={};var Eht={};var Mht;function Tht(){if(Mht)return Eht;Mht=1;Eht.render=function(t,e,n){const s=t.modules.size;const r=t.modules.data;const i=" ";const o=" ";let a="";const c=Array(s+3).join(o);const u=Array(2).join(o);a+=c+"\n";for(let t=0;t<s;++t){a+=o;for(let e=0;e<s;e++){a+=r[t*s+e]?i:o}a+=u+"\n"}a+=c+"\n";if(typeof n==="function"){n(null,a)}return a};return Eht}var Aht={};var Dht;function Rht(){if(Dht)return Aht;Dht=1;const t="";const e="";const n="";const s="";const r="";const i=t+s;const o=e+n;const a=function(t,e,n){return{"00":r+" "+t,"01":r+e+"▄"+t,"02":r+n+"▄"+t,10:r+e+"▀"+t,11:" ",12:"▄",20:r+n+"▀"+t,21:"▀",22:"█"}};const c=function(t,e,n,s){const r=e+1;if(n>=r||s>=r||s<-1||n<-1)return"0";if(n>=e||s>=e||s<0||n<0)return"1";const i=s*e+n;return t[i]?"2":"1"};const u=function(t,e,n,s){return c(t,e,n,s)+c(t,e,n,s+1)};Aht.render=function(t,e,c){const l=t.modules.size;const f=t.modules.data;const h=!!(e&&e.inverse);const d=e&&e.inverse?o:i;const p=h?s:n;const m=h?n:s;const b=a(d,p,m);const y=r+"\n"+d;let w=d;for(let t=-1;t<l+1;t+=2){for(let e=-1;e<l;e++){w+=b[u(f,l,e,t)]}w+=b[u(f,l,l,t)]+y}w+=r;if(typeof c==="function"){c(null,w)}return w};return Aht}var Oht;function Lht(){if(Oht)return Iht;Oht=1;const t=Tht();const e=Rht();Iht.render=function(n,s,r){if(s&&s.small){return e.render(n,s,r)}return t.render(n,s,r)};return Iht}var _ht={};var Fht={};var zht;function jht(){if(zht)return Fht;zht=1;const t=xht();function e(t,e){const n=t.a/255;const s=e+'="'+t.hex+'"';return n<1?s+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function n(t,e,n){let s=t+e;if(typeof n!=="undefined")s+=" "+n;return s}function s(t,e,s){let r="";let i=0;let o=false;let a=0;for(let c=0;c<t.length;c++){const u=Math.floor(c%e);const l=Math.floor(c/e);if(!u&&!o)o=true;if(t[c]){a++;if(!(c>0&&u>0&&t[c-1])){r+=o?n("M",u+s,.5+l+s):n("m",i,0);i=0;o=false}if(!(u+1<e&&t[c+1])){r+=n("h",a);a=0}}else{i++}}return r}Fht.render=function n(r,i,o){const a=t.getOptions(i);const c=r.modules.size;const u=r.modules.data;const l=c+a.margin*2;const f=!a.color.light.a?"":"<path "+e(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>';const h="<path "+e(a.color.dark,"stroke")+' d="'+s(u,c,a.margin)+'"/>';const d='viewBox="'+"0 0 "+l+" "+l+'"';const p=!a.width?"":'width="'+a.width+'" height="'+a.width+'" ';const m='<svg xmlns="http://www.w3.org/2000/svg" '+p+d+' shape-rendering="crispEdges">'+f+h+"</svg>\n";if(typeof o==="function"){o(null,m)}return m};return Fht}var Pht;function Bht(){if(Pht)return _ht;Pht=1;(function(t){const e=jht();t.render=e.render;t.renderToFile=function e(n,s,r,i){if(typeof i==="undefined"){i=r;r=undefined}const o=Jw;const a=t.render(s,r);const c='<?xml version="1.0" encoding="utf-8"?>'+'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+a;o.writeFile(n,c,i)}})(_ht);return _ht}var Wht={};var Ght={};var Uht;function Vht(){if(Uht)return Ght;Uht=1;(function(t){const e=xht();function n(t,e,n){t.clearRect(0,0,e.width,e.height);if(!e.style)e.style={};e.height=n;e.width=n;e.style.height=n+"px";e.style.width=n+"px"}function s(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}t.render=function t(r,i,o){let a=o;let c=i;if(typeof a==="undefined"&&(!i||!i.getContext)){a=i;i=undefined}if(!i){c=s()}a=e.getOptions(a);const u=e.getImageWidth(r.modules.size,a);const l=c.getContext("2d");const f=l.createImageData(u,u);e.qrToImageData(f.data,r,a);n(l,c,u);l.putImageData(f,0,0);return c};t.renderToDataURL=function e(n,s,r){let i=r;if(typeof i==="undefined"&&(!s||!s.getContext)){i=s;s=undefined}if(!i)i={};const o=t.render(n,s,i);const a=i.type||"image/png";const c=i.rendererOpts||{};return o.toDataURL(a,c.quality)}})(Ght);return Ght}var Yht;function Hht(){if(Yht)return Wht;Yht=1;const t=q9();const e=htt();const n=Vht();const s=jht();function r(n,s,r,i,o){const a=[].slice.call(arguments,1);const c=a.length;const u=typeof a[c-1]==="function";if(!u&&!t()){throw new Error("Callback required as last argument")}if(u){if(c<2){throw new Error("Too few arguments provided")}if(c===2){o=r;r=s;s=i=undefined}else if(c===3){if(s.getContext&&typeof o==="undefined"){o=i;i=undefined}else{o=i;i=r;r=s;s=undefined}}}else{if(c<1){throw new Error("Too few arguments provided")}if(c===1){r=s;s=i=undefined}else if(c===2&&!s.getContext){i=r;r=s;s=undefined}return new Promise((function(t,o){try{const o=e.create(r,i);t(n(o,s,i))}catch(t){o(t)}}))}try{const t=e.create(r,i);o(null,n(t,s,i))}catch(t){o(t)}}Wht.create=e.create;Wht.toCanvas=r.bind(null,n.render);Wht.toDataURL=r.bind(null,n.renderToDataURL);Wht.toString=r.bind(null,(function(t,e,n){return s.render(t,n)}));return Wht}var Zht;function Qht(){if(Zht)return Z9;Zht=1;const t=q9();const e=htt();const n=kht();const s=Sht();const r=Lht();const i=Bht();function o(e,n,s){if(typeof e==="undefined"){throw new Error("String required as first argument")}if(typeof s==="undefined"){s=n;n={}}if(typeof s!=="function"){if(!t()){throw new Error("Callback required as last argument")}else{n=s||{};s=null}}return{opts:n,cb:s}}function a(t){return t.slice((t.lastIndexOf(".")-1>>>0)+2).toLowerCase()}function c(t){switch(t){case"svg":return i;case"txt":case"utf8":return s;case"png":case"image/png":default:return n}}function u(t){switch(t){case"svg":return i;case"terminal":return r;case"utf8":default:return s}}function l(t,n,s){if(!s.cb){return new Promise((function(r,i){try{const o=e.create(n,s.opts);return t(o,s.opts,(function(t,e){return t?i(t):r(e)}))}catch(t){i(t)}}))}try{const r=e.create(n,s.opts);return t(r,s.opts,s.cb)}catch(t){s.cb(t)}}Z9.create=e.create;Z9.toCanvas=Hht().toCanvas;Z9.toString=function t(e,n,s){const r=o(e,n,s);const i=r.opts?r.opts.type:undefined;const a=u(i);return l(a.render,e,r)};Z9.toDataURL=function t(e,n,s){const r=o(e,n,s);const i=c(r.opts.type);return l(i.renderToDataURL,e,r)};Z9.toBuffer=function t(e,n,s){const r=o(e,n,s);const i=c(r.opts.type);return l(i.renderToBuffer,e,r)};Z9.toFile=function e(n,s,r,i){if(typeof n!=="string"||!(typeof s==="string"||typeof s==="object")){throw new Error("Invalid argument")}if(arguments.length<3&&!t()){throw new Error("Too few arguments provided")}const u=o(s,r,i);const f=u.opts.type||a(n);const h=c(f);const d=h.renderToFile.bind(null,n);return l(d,s,u)};Z9.toFileStream=function t(e,n,s){if(arguments.length<2){throw new Error("Too few arguments provided")}const r=o(n,s,e.emit.bind(e,"error"));const i=c("png");const a=i.renderToFileStream.bind(null,e);l(a,n,r)};return Z9}var Xht;var qht;function Jht(){if(qht)return Xht;qht=1;Xht=Qht();return Xht}var Kht=Jht();var tdt=l(Kht);const edt=".qr-canvas{max-height:60vh;max-width:80vw;text-align:center}.qr-canvas>canvas{width:100%;height:100%}";const ndt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.prefilledPhone=false;this.invalidValue=false;this.waitingMobile=false}async componentWillLoad(){p.flowStarted();this.translations=await b.getValues();this.infoTextTop=this.translations.MobileRedirectValues.InfoTop;this.infoTextBottom=this.translations.MobileRedirectValues.InfoBottom;let t="ontr";if(o.environment=="QA"){t="test"}else if(o.environment=="DOCKER"){t=""}let e="";if(o.apiBaseUrl.includes("apimd")){e="https://onmd.id-kyc.com/"}else if(o.apiBaseUrl.includes("apiontrace")){e="https://ontrace.id-kyc.com/"}else{e="https://onro.id-kyc.com/"}this.redirectLink=new URL(t+"mobileredirect?redirectId="+o.redirectId,e).toString();if(o.phoneNumber&&o.phoneNumber!=""){this.contact=o.phoneNumber;this.prefilledPhone=true}var n=this;tdt.toDataURL(this.redirectLink,{type:"image/png",errorCorrectionLevel:"M",scale:6},(function(t,e){if(t)console.error(t);n.qrCode=e}))}async componentDidLoad(){await d.initialize(r.MobileRedirect);await I(5e3);await this.checkStatus();while(this.orderStatus!=a.COMPLETE){await this.checkStatus();await I(5e3)}}async checkStatus(){this.orderStatus=await i.instance.GetStatusUi(o.requestId);if(this.orderStatus==null){this.apiErrorEvent.emit({message:"No order was started for this process."})}else if(this.orderStatus==a.ABORTED){this.waitingMobile=false;this.infoTextTop=this.translations.MobileRedirectValues.InfoAborted;p.flowAborted()}else if(this.orderStatus==a.COMPLETE){this.waitingMobile=false;o.flowStatus=a.COMPLETE}else if(this.orderStatus!=a.MOBILE){this.infoTextTop=this.translations.MobileRedirectValues.InfoWaiting;this.waitingMobile=true}}async disconnectedCallback(){await d.finalize(r.MobileRedirect)}async buttonClick(){if(this.contact==""||this.contact.length!=10){return}this.waitingMobile=true;this.infoTextTop=this.translations.MobileRedirectValues.InfoWaiting;try{await i.instance.SendLink(this.redirectLink,this.contact)}catch(t){this.apiErrorEvent.emit(t)}}handleChangeContact(t){let e=t.target?t.target.value:"";this.contact=e.replace(/\D/g,"");if(this.contact.length>10){this.contact=this.contact.substring(0,10)}this.invalidValue=this.contact.length!=10;t.target.value=this.contact}render(){return n("div",{key:"e48453a129b56fff2e812acbb80b1faa35316432",class:"container flex center"},n("div",{key:"3370c8a057d4574cd0f500274100385229761956",class:"px-2 w-100"},n("div",{key:"74011c58c41cd8d562cacb4426d105f8f708113b",hidden:this.waitingMobile},n("h1",{key:"3747be4ea0b88527ca86d0291b21c0bfa30811ca",class:"text-center px-2 mb-1"},this.infoTextTop),n("div",{key:"22ec4e5453fd4f616dc1608ae175ef6817601595",class:"flex center"},n("img",{key:"11addbf143739909975300e207596663f5901ee0",src:this.qrCode})),n("h2",{key:"222c1214b792262fd7ac1d738a4daf1c9104e9ed",class:"text-center px-2 mb-2"},this.infoTextBottom),n("div",{key:"1de23b1898abb0e20a48f663260e51be5db12481",class:"input-container mb-3 px-3"},n("label",{key:"6210d71f4bac1d4163d7225aa230bc7ffb3ca258",class:"font-size-18 mb-1 color-red",hidden:this.invalidValue==false},n("b",{key:"abda8245a8f3136a2ca1496ed040c07e08b5f706"},this.translations.MobileRedirectValues.Validation)),n("input",{key:"4f90bb9249aa415459eb82cd991d4f680f1bff05",type:"text",id:"codeInput",class:"main-input",disabled:this.prefilledPhone,value:this.contact,onInput:t=>this.handleChangeContact(t)})),n("div",{key:"5f1e0b050350ee7a8a06953b6abfd6ecd6b97ee5",class:"px-3"},n("button",{key:"514b2c2ca6e8ef939b7220dfac62a87a12cd064f",class:"main-button",onClick:()=>this.buttonClick()},this.translations.MobileRedirectValues.Send))),n("div",{key:"004947a7dd608be829938621d6ef1c04f0ac0766",hidden:this.waitingMobile==false},n("div",{key:"abbc706729a114df4ec020fa841f2e20662ce345",class:"text-center"},n("p",{key:"5cc239282fce1db61b73ab1845c17962d108acb9",class:"font-size-2"},this.infoTextTop))),n("div",{key:"3c199ec207677f999fb880fea2df25a15599b86c",class:"footer text-center"},n("img",{key:"9cc7a6129d01787d37160293ed514ccbea453246",src:y}))))}};ndt.style=edt;var sdt;(function(t){t["IdFront"]="IdFront";t["IdBack"]="IdBack";t["IdFrontVideo"]="IdFrontVideo";t["IdBackVideo"]="IdBackVideo";t["Selfie"]="Selfie";t["SelfieVideo"]="SelfieVideo";t["SelfieGestureVideo"]="SelfieGestureVideo";t["TiltVideo"]="TiltVideo";t["None"]="None"})(sdt||(sdt={}));const rdt="";const idt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.recordingResultCount=0;this.uploadingPhoto=false;this.uploadingRecording=false;this.appInsights=C.getInstance()}componentWillLoad(){this.captureRetryCount=0;this.initFlow();this.appInsights.trackEvent("ProcessId | init",{requestId:o.requestId})}initFlow(){if(this.mode=="front"){this.currentStep=r.CiFront;this.flow={fileName:"idImage.png",recName:"idVideo.",photoType:sdt.IdFront,recType:sdt.IdFrontVideo,imageSize:0,videoSize:0}}else if(this.mode=="back"){this.currentStep=r.CiBack;this.flow={fileName:"idBackImage.png",recName:"idBackVideo.",photoType:sdt.IdBack,recType:sdt.IdBackVideo,imageSize:0,videoSize:0}}else if(this.mode=="tilt"){this.currentStep=r.CiTilt;this.flow={fileName:"idTiltImage.png",recName:"idTiltVideo.",photoType:sdt.None,recType:sdt.TiltVideo,imageSize:0,videoSize:0}}if(o.debug)console.log("process-id | initFlow")}timeElapsed(){this.errorReason="Timeout";this.showTimeout=true}captureErrorDone(){if(o.debug)console.log("process-id | captureErrorDone");if(this.showTimeout==true){this.showTimeout=false}if(this.showInvalid==true){this.showInvalid=false}}async captureIdImage(t){if(o.debug)console.log("process-id | captureIdImage",this.mode);if(this.mode=="tilt")return;try{let e=t.detail;if(e.size==0){if(o.debug)console.log("process-id | captureIdImage | Empty id photo");await i.instance.AddLog({message:"Empty id photo",blobData:e},await E());this.triggerErrorFlow();return}this.capture=new File([e],this.flow.fileName,{type:"image/png"})}catch(t){if(o.debug)console.error("process-id | captureIdImage | Error processing id photo",t);this.triggerErrorFlow()}this.uploadCapture()}async uploadCapture(){try{this.uploadingPhoto=true;let e=await T(this.capture);this.flow.imageSize=A(e);if(o.debug)console.log("process-id | captureIdImage | uploadResult: "+t);var t=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.photoType,e);if(t.isValid){o.flowStatus=a[t.state]}else{this.uploadingPhoto=false;this.switchCamera();this.triggerErrorFlow()}this.capture=null}catch(t){this.apiErrorEvent.emit(t)}}async capturedIdRecording(t){if(o.debug)console.log("process-id | capturedIdRecording");let e=t.detail;if(e.size==0&&this.recordingResultCount==0){this.recordingResultCount++;return}if(e.size==0){if(o.debug)console.log("process-id | capturedIdRecording | Empty ID recording");await i.instance.AddLog({message:"Empty ID recording",blobData:e},await E());this.triggerErrorFlow();return}this.uploadingRecording=true;let n=e.type==S.mp4MimeType.type?S.mp4MimeType:S.webmMimeType;let s=new File([e],this.flow.recName+n.extension,{type:n.type});let r=await T(s);this.flow.videoSize=A(r);var c=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.recType,r);if(o.debug)console.log("process-id | capturedIdRecording | uploadResult: "+c);if(c.saved){o.flowStatus=a[c.state]}else{this.uploadingRecording=false;this.triggerErrorFlow()}this.recordingResultCount=0}async verificationFinished(){if(o.debug)console.log("process-id | verificationFinished");this.verificationReceived=Date.now();while(Date.now()-this.verificationReceived<9e4){await I(2e3);if(this.showInvalid||this.showTimeout)return}this.triggerUploadFailedFlow();if(o.debug)console.log("process-id | verificationFinished | waitingFinished ")}triggerUploadFailedFlow(){this.errorReason="Upload Failed";this.showInvalid=true}async componentDidLoad(){if(o.debug)console.log("process-id | componentDidLoad");await d.initialize(this.currentStep)}triggerErrorFlow(){this.errorReason="Invalid";this.showInvalid=true}async disconnectedCallback(){if(o.debug)console.log("process-id | disconnectedCallback");await d.finalize(this.currentStep)}switchCamera(){if(o.debug)console.log("process-id | switchCamera");if(this.captureRetryCount==1){m.switchCamera();this.captureRetryCount=0}else{this.captureRetryCount++}}render(){let t=n("capture-error",{type:"ID",reason:this.errorReason,error:`image: ${this.flow.imageSize}mb video: ${this.flow.videoSize}mb`});let e=n("id-auto-capture",null);let s=n("uploading-data",{type:"id"});if(this.uploadingPhoto&&this.uploadingRecording)return s;if(this.showInvalid||this.showTimeout)return t;return e}};idt.style=rdt;const odt=".grid{display:grid;gap:20px;grid-template-rows:repeat(3, calc((100vw - 4em - 40px) / 3));grid-template-columns:repeat(3, calc((100vw - 4em - 40px) / 3))}.grid>div{background-color:#f9f9f9;display:flex;align-items:center;justify-content:center;border-radius:50%;font-weight:600;font-size:1.4em;box-shadow:1px 1px 3px #00000029}.grid>div.error{background:#FF5353;color:white}.grid>div.success{background:#7BB40E;color:white}";const adt=class{constructor(e){t(this,e);this.rand=[]}async componentWillLoad(){this.translations=await b.getValues();this.randomize()}randomInt(t,e){return Math.floor(Math.random()*(e-t+1)+t)}randomize(){this.rand=[];for(let e=0;e<9;e++){var t=this.randomInt(1,99);while(this.rand.includes(t)){t=this.randomInt(1,99)}this.rand.push(t)}this.choice=this.randomInt(0,8)}async click(t,e){let n=e.currentTarget;if(this.choice==t){n.classList.add("success");await I(500);o.flowStatus=await i.instance.GetNextFlowState()}else{n.classList.add("error");await I(500);this.randomize()}n.classList=[]}render(){return n("div",{key:"ecbf405171ffc0bf133141d56fa634e432ec9ed6",class:"container flex center"},n("div",{key:"360200e9024fa9cebb0a3cfcd353fd346dc9331e",class:"px-2 w-100"},n("h1",{key:"07fedb8ca678649f5c9d238e63dd1266758dafb0",class:"text-center px-1 mb-2",innerHTML:this.translations.RandomActionValues.Title+` ${this.rand[this.choice]}`}),n("div",{key:"05e01978d5ae8b65afdc79496de3025a3a8e2cd8",class:"grid"},this.rand.map(((t,e)=>n("div",{onClick:t=>this.click(e,t)},t)))),n("div",{key:"8fefba938370174b017fdb77c4bde124befc075b",class:"footer text-center"},n("img",{key:"4e5b8ede8361b03da5c41d33db514d8d16643260",src:y}))))}};adt.style=odt;var cdt="undefined"!=typeof self?self:{};function udt(){throw Error("Invalid UTF8")}function ldt(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let fdt,hdt;const ddt="undefined"!=typeof TextDecoder;let pdt;const mdt="undefined"!=typeof TextEncoder;function bdt(t){if(mdt)t=(pdt||=new TextEncoder).encode(t);else{let n=0;const s=new Uint8Array(3*t.length);for(let r=0;r<t.length;r++){var e=t.charCodeAt(r);if(e<128)s[n++]=e;else{if(e<2048)s[n++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&r<t.length){const i=t.charCodeAt(++r);if(i>=56320&&i<=57343){e=1024*(e-55296)+i-56320+65536,s[n++]=e>>18|240,s[n++]=e>>12&63|128,s[n++]=e>>6&63|128,s[n++]=63&e|128;continue}r--}e=65533}s[n++]=e>>12|224,s[n++]=e>>6&63|128}s[n++]=63&e|128}}t=n===s.length?s:s.subarray(0,n)}return t}var ydt,wdt;t:{for(var gdt=["CLOSURE_FLAGS"],vdt=cdt,xdt=0;xdt<gdt.length;xdt++)if(null==(vdt=vdt[gdt[xdt]])){wdt=null;break t}wdt=vdt}var Ndt,kdt=wdt&&wdt[610401301];ydt=null!=kdt&&kdt;const Cdt=cdt.navigator;function $dt(t){return!!ydt&&(!!Ndt&&Ndt.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function Sdt(t){var e;return(e=cdt.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}function Idt(){return!!ydt&&(!!Ndt&&Ndt.brands.length>0)}function Edt(){return Idt()?$dt("Chromium"):(Sdt("Chrome")||Sdt("CriOS"))&&!(!Idt()&&Sdt("Edge"))||Sdt("Silk")}function Mdt(t){return Mdt[" "](t),t}Ndt=Cdt&&Cdt.userAgentData||null,Mdt[" "]=function(){};var Tdt=!Idt()&&(Sdt("Trident")||Sdt("MSIE"));!Sdt("Android")||Edt(),Edt(),Sdt("Safari")&&(Edt()||!Idt()&&Sdt("Coast")||!Idt()&&Sdt("Opera")||!Idt()&&Sdt("Edge")||(Idt()?$dt("Microsoft Edge"):Sdt("Edg/"))||Idt()&&$dt("Opera"));var Adt={},Ddt=null;function Rdt(t){const e=t.length;let n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);const s=new Uint8Array(n);let r=0;return function(t,e){function n(e){for(;s<t.length;){const e=t.charAt(s++),n=Ddt[e];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}Odt();let s=0;for(;;){const t=n(-1),s=n(0),r=n(64),i=n(64);if(64===i&&-1===t)break;e(t<<2|s>>4),64!=r&&(e(s<<4&240|r>>2),64!=i&&e(r<<6&192|i))}}(t,(function(t){s[r++]=t})),r!==n?s.subarray(0,r):s}function Odt(){if(!Ddt){Ddt={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const s=t.concat(e[n].split(""));Adt[n]=s;for(let t=0;t<s.length;t++){const e=s[t];void 0===Ddt[e]&&(Ddt[e]=t)}}}}var Ldt="undefined"!=typeof Uint8Array,_dt=!Tdt&&"function"==typeof btoa;function Fdt(t){if(!_dt){var e;void 0===e&&(e=0),Odt(),e=Adt[e];var n=Array(Math.floor(t.length/3)),s=e[64]||"";let c=0,u=0;for(;c<t.length-2;c+=3){var r=t[c],i=t[c+1],o=t[c+2],a=e[r>>2];r=e[(3&r)<<4|i>>4],i=e[(15&i)<<2|o>>6],o=e[63&o],n[u++]=a+r+i+o}switch(a=0,o=s,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||s;case 1:t=t[c],n[u]=e[t>>2]+e[(3&t)<<4|a>>4]+o+s}return n.join("")}for(e="",n=0,s=t.length-10240;n<s;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const zdt=/[-_.]/g,jdt={"-":"+",_:"/",".":"="};function Pdt(t){return jdt[t]||""}function Bdt(t){if(!_dt)return Rdt(t);zdt.test(t)&&(t=t.replace(zdt,Pdt)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function Wdt(t){return Ldt&&null!=t&&t instanceof Uint8Array}var Gdt={};function Udt(){return Hdt||=new Ydt(null,Gdt)}function Vdt(t){Qdt(Gdt);var e=t.g;return null==(e=null==e||Wdt(e)?e:"string"==typeof e?Bdt(e):null)?e:t.g=e}var Ydt=class{h(){return new Uint8Array(Vdt(this)||0)}constructor(t,e){if(Qdt(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};let Hdt,Zdt;function Qdt(t){if(t!==Gdt)throw Error("illegal external caller")}function Xdt(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function qdt(t){return Xdt(t=Error(t),"warning"),t}function Jdt(t){if(null!=t){var e=Zdt??={},n=e[t]||0;n>=5||(e[t]=n+1,Xdt(t=Error(),"incident"),function(t){cdt.setTimeout((()=>{throw t}),0)}(t))}}var Kdt="function"==typeof Symbol&&"symbol"==typeof Symbol();function tpt(t,e,n=false){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?n&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var ept=tpt("jas",void 0,true),npt=tpt(void 0,"0di"),spt=tpt(void 0,"1oa"),rpt=tpt(void 0,Symbol()),ipt=tpt(void 0,"0actk"),opt=tpt(void 0,"8utk");const apt=Kdt?ept:"Ea",cpt={Ea:{value:0,configurable:true,writable:true,enumerable:false}},upt=Object.defineProperties;function lpt(t,e){Kdt||apt in t||upt(t,cpt),t[apt]|=e}function fpt(t,e){Kdt||apt in t||upt(t,cpt),t[apt]=e}function hpt(t){return lpt(t,34),t}function dpt(t,e){fpt(e,-15615&(0|t))}function ppt(t,e){fpt(e,-15581&(34|t))}function mpt(){return"function"==typeof BigInt}function bpt(t){return Array.prototype.slice.call(t)}var ypt,wpt={};function gpt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function vpt(t,e){if(null!=t)if("string"==typeof t)t=t?new Ydt(t,Gdt):Udt();else if(t.constructor!==Ydt)if(Wdt(t))t=t.length?new Ydt(new Uint8Array(t),Gdt):Udt();else{if(!e)throw Error();t=void 0}return t}const xpt=[];function Npt(t){if(2&t)throw Error()}fpt(xpt,55),ypt=Object.freeze(xpt);class kpt{constructor(t,e,n){this.g=t,this.h=e,this.l=n}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}function Cpt(t){return rpt?t[rpt]:void 0}var $pt=Object.freeze({});function Spt(t){return t.Na=true,t}var Ipt=Spt((t=>"number"==typeof t)),Ept=Spt((t=>"string"==typeof t)),Mpt=Spt((t=>"boolean"==typeof t)),Tpt="function"==typeof cdt.BigInt&&"bigint"==typeof cdt.BigInt(0);function Apt(t){var e=t;if(Ept(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(Ipt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return Tpt?BigInt(t):t=Mpt(t)?t?"1":"0":Ept(t)?t.trim()||"0":String(t)}var Dpt=Spt((t=>Tpt?t>=Opt&&t<=_pt:"-"===t[0]?Fpt(t,Rpt):Fpt(t,Lpt)));const Rpt=Number.MIN_SAFE_INTEGER.toString(),Opt=Tpt?BigInt(Number.MIN_SAFE_INTEGER):void 0,Lpt=Number.MAX_SAFE_INTEGER.toString(),_pt=Tpt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Fpt(t,e){if(t.length>e.length)return false;if(t.length<e.length||t===e)return true;for(let n=0;n<t.length;n++){const s=t[n],r=e[n];if(s>r)return false;if(s<r)return true}}const zpt="function"==typeof Uint8Array.prototype.slice;let jpt,Ppt=0,Bpt=0;function Wpt(t){const e=t>>>0;Ppt=e,Bpt=(t-e)/4294967296>>>0}function Gpt(t){if(t<0){Wpt(-t);const[e,n]=qpt(Ppt,Bpt);Ppt=e>>>0,Bpt=n>>>0}else Wpt(t)}function Upt(t){const e=jpt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,true),Bpt=0,Ppt=e.getUint32(0,true)}function Vpt(t,e){const n=4294967296*e+(t>>>0);return Number.isSafeInteger(n)?n:Hpt(t,e)}function Ypt(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),"number"==typeof(t=Vpt(t,e))?n?-t:t:n?"-"+t:t}function Hpt(t,e){if(t>>>=0,(e>>>=0)<=2097151)var n=""+(4294967296*e+t);else mpt()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,t>=1e7&&(n+=t/1e7>>>0,t%=1e7),n>=1e7&&(e+=n/1e7>>>0,n%=1e7),n=e+Zpt(n)+Zpt(t));return n}function Zpt(t){return t=String(t),"0000000".slice(t.length)+t}function Qpt(){var t=Ppt,e=Bpt;if(2147483648&e)if(mpt())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,s]=qpt(t,e);t="-"+Hpt(n,s)}else t=Hpt(t,e);return t}function Xpt(t){if(t.length<16)Gpt(Number(t));else if(mpt())t=BigInt(t),Ppt=Number(t&BigInt(4294967295))>>>0,Bpt=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);Bpt=Ppt=0;const n=t.length;for(let s=e,r=(n-e)%6+e;r<=n;s=r,r+=6){const e=Number(t.slice(s,r));Bpt*=1e6,Ppt=1e6*Ppt+e,Ppt>=4294967296&&(Bpt+=Math.trunc(Ppt/4294967296),Bpt>>>=0,Ppt>>>=0)}if(e){const[t,e]=qpt(Ppt,Bpt);Ppt=t,Bpt=e}}}function qpt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}const Jpt="function"==typeof BigInt?BigInt.asIntN:void 0,Kpt="function"==typeof BigInt?BigInt.asUintN:void 0,tmt=Number.isSafeInteger,emt=Number.isFinite,nmt=Math.trunc,smt=Apt(0);function rmt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function imt(t){return null==t||"boolean"==typeof t?t:"number"==typeof t?!!t:void 0}const omt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function amt(t){switch(typeof t){case"bigint":return true;case"number":return emt(t);case"string":return omt.test(t);default:return false}}function cmt(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return emt(t)?0|t:void 0}function umt(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return emt(t)?t>>>0:void 0}function lmt(t){if("-"===t[0])return false;const e=t.length;return e<20||20===e&&Number(t.substring(0,6))<184467}function fmt(t){const e=t.length;return"-"===t[0]?e<20||20===e&&Number(t.substring(0,7))>-922337:e<19||19===e&&Number(t.substring(0,6))<922337}function hmt(t){return fmt(t)?t:(Xpt(t),Qpt())}function dmt(t){return t=nmt(t),tmt(t)||(Gpt(t),t=Ypt(Ppt,Bpt)),t}function pmt(t){var e=nmt(Number(t));return tmt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),hmt(t))}function mmt(t){var e=nmt(Number(t));return tmt(e)?Apt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),mpt()?Apt(Jpt(64,BigInt(t))):Apt(hmt(t)))}function bmt(t){if(tmt(t))t=Apt(dmt(t));else{if(t=nmt(t),tmt(t))t=String(t);else{const e=String(t);fmt(e)?t=e:(Gpt(t),t=Qpt())}t=Apt(t)}return t}function ymt(t){return null==t?t:"bigint"==typeof t?(Dpt(t)?t=Number(t):(t=Jpt(64,t),t=Dpt(t)?Number(t):String(t)),t):amt(t)?"number"==typeof t?dmt(t):pmt(t):void 0}function wmt(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Kpt(64,t));if(amt(t)){if("string"===e)return e=nmt(Number(t)),tmt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),lmt(t)||(Xpt(t),t=Hpt(Ppt,Bpt))),t;if("number"===e)return(t=nmt(t))>=0&&tmt(t)?t:function(t){if(t<0){Gpt(t);var e=Hpt(Ppt,Bpt);return t=Number(e),tmt(t)?t:e}return lmt(e=String(t))?e:(Gpt(t),Vpt(Ppt,Bpt))}(t)}}function gmt(t){if("string"!=typeof t)throw Error();return t}function vmt(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function xmt(t){return null==t||"string"==typeof t?t:void 0}function Nmt(t,e,n,s){if(null!=t&&"object"==typeof t&&t.W===wpt)return t;if(!Array.isArray(t))return n?2&s?((t=e[npt])||(hpt((t=new e).u),t=e[npt]=t),e=t):e=new e:e=void 0,e;let r=n=0|t[apt];return 0===r&&(r|=32&s),r|=2&s,r!==n&&fpt(t,r),new e(t)}function kmt(t,e,n){if(e)t:{if(!amt(e=t))throw qdt("int64");switch(typeof e){case"string":e=mmt(e);break t;case"bigint":e=Apt(Jpt(64,e));break t;default:e=bmt(e)}}else t=typeof(e=t),e=null==e?e:"bigint"===t?Apt(Jpt(64,e)):amt(e)?"string"===t?mmt(e):bmt(e):void 0;return null==(t=e)?n?smt:void 0:t}function Cmt(t){return t}const $mt={};let Smt=function(){try{return Mdt(new class extends Map{constructor(){super()}}),false}catch{return true}}();class Imt{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,e){return this.g.set(t,e),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,e){return this.g.forEach(t,e)}[Symbol.iterator](){return this.entries()}}const Emt=Smt?(Object.setPrototypeOf(Imt.prototype,Map.prototype),Object.defineProperties(Imt.prototype,{size:{value:0,configurable:true,enumerable:true,writable:true}}),Imt):class extends Map{constructor(){super()}};function Mmt(t){return t}function Tmt(t){if(2&t.M)throw Error("Cannot mutate an immutable Map")}var Amt=class extends Emt{constructor(t,e,n=Mmt,s=Mmt){super();let r=0|t[apt];r|=64,fpt(t,r),this.M=r,this.I=e,this.S=n,this.X=this.I?Dmt:s;for(let i=0;i<t.length;i++){const o=t[i],a=n(o[0],false,true);let c=o[1];e?void 0===c&&(c=null):c=s(o[1],false,true,void 0,void 0,r),super.set(a,c)}}La(){var t=Wmt;if(0!==this.size)return Array.from(super.entries(),(e=>(e[0]=t(e[0]),e[1]=t(e[1]),e)))}da(t=Rmt){const e=[],n=super.entries();for(var s;!(s=n.next()).done;)(s=s.value)[0]=t(s[0]),s[1]=t(s[1]),e.push(s);return e}clear(){Tmt(this),super.clear()}delete(t){return Tmt(this),super.delete(this.S(t,true,false))}entries(){if(this.I){var t=super.keys();t=new kpt(t,Omt,this)}else t=super.entries();return t}values(){if(this.I){var t=super.keys();t=new kpt(t,Amt.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.I?super.forEach(((n,s,r)=>{t.call(e,r.get(s),s,r)})):super.forEach(t,e)}set(t,e){return Tmt(this),null==(t=this.S(t,true,false))?this:null==e?(super.delete(t),this):super.set(t,this.X(e,true,true,this.I,false,this.M))}Ja(t){const e=this.S(t[0],false,true);t=t[1],t=this.I?void 0===t?null:t:this.X(t,false,true,void 0,false,this.M),super.set(e,t)}has(t){return super.has(this.S(t,false,false))}get(t){t=this.S(t,false,false);const e=super.get(t);if(void 0!==e){var n=this.I;return n?((n=this.X(e,false,true,n,this.pa,this.M))!==e&&super.set(t,n),n):e}}[Symbol.iterator](){return this.entries()}};function Dmt(t,e,n,s,r,i){return t=Nmt(t,s,n,i),r&&(t=Qmt(t)),t}function Rmt(t){return t}function Omt(t){return[t,this.get(t)]}let Lmt,_mt,Fmt,zmt;function jmt(){return Lmt||=new Amt(hpt([]),void 0,void 0,void 0,$mt)}function Pmt(t,e,n,s,r){if(null!=t){if(Array.isArray(t)){const i=0|t[apt];return 0===t.length&&1&i?void 0:r&&2&i?t:Bmt(t,e,n,void 0!==s,r)}return e(t,s)}}function Bmt(t,e,n,s,r){const i=s||n?0|t[apt]:0,o=s?!!(32&i):void 0;let a=0;const c=(s=bpt(t)).length;for(let t=0;t<c;t++){var u=s[t];if(t===c-1&&gpt(u)){var l=e,f=n,h=o,d=r;let t;for(let e in u){const n=Pmt(u[e],l,f,h,d);null!=n&&((t??={})[e]=n)}u=t}else u=Pmt(s[t],e,n,o,r);s[t]=u,null!=u&&(a=t+1)}return a<c&&(s.length=a),n&&((t=Cpt(t))&&(s[rpt]=bpt(t)),n(i,s)),s}function Wmt(t){return Pmt(t,Gmt,void 0,void 0,false)}function Gmt(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return Dpt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Wdt(t))return Wdt(t)&&Jdt(opt),Fdt(t);if(t.W===wpt)return Umt(t);if(t instanceof Ydt){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=Fdt(e)}return t instanceof Amt?t.La():void 0}return t}function Umt(t){var e=t.u;t=Bmt(e,Gmt,void 0,void 0,false);var n=0|e[apt];if((e=t.length)&&!(512&n)){var s=t[e-1],r=false;gpt(s)?(e--,r=true):s=void 0;var i=e-(n=512&n?0:-1),o=(_mt??Cmt)(i,n,t,s);if(s&&(t[e]=void 0),i<o&&s){for(var a in i=true,s){const c=+a;c<=o?(t[r=c+n]=s[a],e=Math.max(r+1,e),r=false,delete s[a]):i=false}i&&(s=void 0)}for(i=e-1;e>0;i=e-1)if(null==(a=t[i]))e--,r=true;else{if(!((i-=n)>=o))break;(s??={})[i]=a,e--,r=true}r&&(t.length=e),s&&t.push(s)}return t}function Vmt(t,e,n){return t=Ymt(t,e[0],e[1],n?1:2),e!==Fmt&&n&&lpt(t,8192),t}function Ymt(t,e,n,s){if(null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-16760833&r|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(8192&(r=0|t[apt])||!(64&r)||2&r||Jdt(ipt),1024&r)throw Error("farr");if(64&r)return t;if(1===s||2===s||(r|=64),n&&(r|=512,n!==t[0]))throw Error("mid");t:{var i=(n=t).length;if(i){var o=i-1;if(gpt(s=n[o])){if((o-=e=512&(r|=256)?0:-1)>=1024)throw Error("pvtlmt");for(var a in s)(i=+a)<o&&(n[i+e]=s[a],delete s[a]);r=-16760833&r|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,i-(512&r?0:-1)))>1024)throw Error("spvt");r=-16760833&r|(1023&a)<<14}}}return fpt(t,r),t}function Hmt(t,e,n=ppt){if(null!=t){if(Ldt&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var s=0|t[apt];return 2&s?t:(e&&=0===s||!!(32&s)&&!(64&s||!(16&s)),e?(fpt(t,34|s),4&s&&Object.freeze(t),t):Bmt(t,Hmt,4&s?ppt:n,true,true))}return t.W===wpt?t=2&(s=0|(n=t.u)[apt])?t:new t.constructor(Zmt(n,s,true)):t instanceof Amt&&!(2&t.M)&&(n=hpt(t.da(Hmt)),t=new Amt(n,t.I,t.S,t.X)),t}}function Zmt(t,e,n){const s=n||2&e?ppt:dpt,r=!!(32&e);return t=function(t,e,n){const s=bpt(t);var r=s.length;const i=256&e?s[r-1]:void 0;for(r+=i?-1:0,e=512&e?1:0;e<r;e++)s[e]=n(s[e]);if(i){e=s[e]={};for(const t in i)e[t]=n(i[t])}return(t=Cpt(t))&&(s[rpt]=bpt(t)),s}(t,e,(t=>Hmt(t,r,s))),lpt(t,32|(n?2:0)),t}function Qmt(t){const e=t.u,n=0|e[apt];return 2&n?new t.constructor(Zmt(e,n,false)):t}function Xmt(t,e){return qmt(t=t.u,0|t[apt],e)}function qmt(t,e,n){if(-1===n)return null;const s=n+(512&e?0:-1),r=t.length-1;return s>=r&&256&e?t[r][n]:s<=r?t[s]:void 0}function Jmt(t,e,n){const s=t.u;let r=0|s[apt];return Npt(r),Kmt(s,r,e,n),t}function Kmt(t,e,n,s){const r=512&e?0:-1,i=n+r;var o=t.length-1;return i>=o&&256&e?(t[o][n]=s,e):i<=o?(t[i]=s,e):(void 0!==s&&(n>=(o=e>>14&1023||536870912)?null!=s&&(t[o+r]={[n]:s},fpt(t,e|=256)):t[i]=s),e)}function tbt(t,e){let n=0|(t=t.u)[apt];const s=qmt(t,n,e),r=rmt(s);return null!=r&&r!==s&&Kmt(t,n,e,r),r}function ebt(t){let e=0|(t=t.u)[apt];const n=qmt(t,e,1),s=vpt(n,true);return null!=s&&s!==n&&Kmt(t,e,1,s),s}function nbt(){return void 0===$pt?2:4}function sbt(t,e,n,s,r){const i=t.u,o=2&(t=0|i[apt])?1:s;r=!!r;let a=0|(s=rbt(i,t,e))[apt];if(!(4&a)){4&a&&(s=bpt(s),a=xbt(a,t),t=Kmt(i,t,e,s));let r=0,o=0;for(;r<s.length;r++){const t=n(s[r]);null!=t&&(s[o++]=t)}o<r&&(s.length=o),a=ibt(a,t),n=-2049&(20|a),a=n&=-4097,fpt(s,a),2&a&&Object.freeze(s)}return 1===o||4===o&&32&a?obt(a)||(r=a,a|=2,a!==r&&fpt(s,a),Object.freeze(s)):(2===o&&obt(a)&&(s=bpt(s),a=xbt(a,t),a=Nbt(a,t,r),fpt(s,a),t=Kmt(i,t,e,s)),obt(a)||(e=a,a=Nbt(a,t,r),a!==e&&fpt(s,a))),s}function rbt(t,e,n){return t=qmt(t,e,n),Array.isArray(t)?t:ypt}function ibt(t,e){return 0===t&&(t=xbt(t,e)),1|t}function obt(t){return!!(2&t)&&!!(4&t)||!!(1024&t)}function abt(t){t=bpt(t);for(let e=0;e<t.length;e++){const n=t[e]=bpt(t[e]);Array.isArray(n[1])&&(n[1]=hpt(n[1]))}return t}function cbt(t,e,n,s){let r=0|(t=t.u)[apt];Npt(r),Kmt(t,r,e,("0"===s?0===Number(n):n===s)?void 0:n)}function ubt(t,e,n,s){Npt(e);let r=rbt(t,e,n);const i=r!==ypt;if(64&e||!(8192&e)||!i){const o=i?0|r[apt]:0;let a=o;(!i||2&a||obt(a)||4&a&&!(32&a))&&(r=bpt(r),a=xbt(a,e),e=Kmt(t,e,n,r)),a=-13&ibt(a,e),a=Nbt(s?-17&a:16|a,e,true),a!==o&&fpt(r,a)}return r}function lbt(t,e){var n=Mgt;return dbt(fbt(t=t.u),t,0|t[apt],n)===e?e:-1}function fbt(t){if(Kdt)return t[spt]??(t[spt]=new Map);if(spt in t)return t[spt];const e=new Map;return Object.defineProperty(t,spt,{value:e}),e}function hbt(t,e,n,s){const r=fbt(t),i=dbt(r,t,e,n);return i!==s&&(i&&(e=Kmt(t,e,i)),r.set(n,s)),e}function dbt(t,e,n,s){let r=t.get(s);if(null!=r)return r;r=0;for(let t=0;t<s.length;t++){const i=s[t];null!=qmt(e,n,i)&&(0!==r&&(n=Kmt(e,n,r)),r=i)}return t.set(s,r),r}function pbt(t,e,n){let s=0|t[apt];const r=qmt(t,s,n);let i;if(null!=r&&r.W===wpt)return(e=Qmt(r))!==r&&Kmt(t,s,n,e),e.u;if(Array.isArray(r)){const t=0|r[apt];i=2&t?Vmt(Zmt(r,t,false),e,true):64&t?r:Vmt(i,e,true)}else i=Vmt(void 0,e,true);return i!==r&&Kmt(t,s,n,i),i}function mbt(t,e,n){let s=0|(t=t.u)[apt];const r=qmt(t,s,n);return(e=Nmt(r,e,false,s))!==r&&null!=e&&Kmt(t,s,n,e),e}function bbt(t,e,n){if(null==(e=mbt(t,e,n)))return e;let s=0|(t=t.u)[apt];if(!(2&s)){const r=Qmt(e);r!==e&&Kmt(t,s,n,e=r)}return e}function ybt(t,e,n,s,r,i,o){t=t.u;var a=!!(2&e);const c=a?1:r;i=!!i,o&&=!a;var u=0|(r=rbt(t,e,s))[apt];if(!(a=!!(4&u))){var l=r,f=e;const t=!!(2&(u=ibt(u,e)));t&&(f|=2);let s=!t,i=true,o=0,a=0;for(;o<l.length;o++){const e=Nmt(l[o],n,false,f);if(e instanceof n){if(!t){const t=!!(2&(0|e.u[apt]));s&&=!t,i&&=t}l[a++]=e}}a<o&&(l.length=a),u|=4,u=i?16|u:-17&u,fpt(l,u=s?8|u:-9&u),t&&Object.freeze(l)}if(o&&!(8&u||!r.length&&(1===c||4===c&&32&u))){for(obt(u)&&(r=bpt(r),u=xbt(u,e),e=Kmt(t,e,s,r)),n=r,o=u,l=0;l<n.length;l++)(u=n[l])!==(f=Qmt(u))&&(n[l]=f);o|=8,fpt(n,o=n.length?-17&o:16|o),u=o}return 1===c||4===c&&32&u?obt(u)||(e=u,(u|=!r.length||16&u&&(!a||32&u)?2:1024)!==e&&fpt(r,u),Object.freeze(r)):(2===c&&obt(u)&&(fpt(r=bpt(r),u=Nbt(u=xbt(u,e),e,i)),e=Kmt(t,e,s,r)),obt(u)||(s=u,(u=Nbt(u,e,i))!==s&&fpt(r,u))),r}function wbt(t,e,n){const s=0|t.u[apt];return ybt(t,s,e,n,nbt(),false,!(2&s))}function gbt(t,e,n,s){return null==s&&(s=void 0),Jmt(t,n,s)}function vbt(t,e,n,s){null==s&&(s=void 0);t:{let r=0|(t=t.u)[apt];if(Npt(r),null==s){const s=fbt(t);if(dbt(s,t,r,n)!==e)break t;s.set(n,0)}else r=hbt(t,r,n,e);Kmt(t,r,e,s)}}function xbt(t,e){return-1025&(t=32|(2&e?2|t:-3&t))}function Nbt(t,e,n){return 32&e&&n||(t&=-33),t}function kbt(t,e,n){Npt(0|t.u[apt]),sbt(t,e,xmt,2,true).push(gmt(n))}function Cbt(t,e,n,s){const r=0|t.u[apt];Npt(r),t=ybt(t,r,n,e,2,true),s=null!=s?s:new n,t.push(s),t[apt]=2&(0|s.u[apt])?-9&t[apt]:-17&t[apt]}function $bt(t,e){return cmt(Xmt(t,e))}function Sbt(t,e){return xmt(Xmt(t,e))}function Ibt(t,e){return tbt(t,e)??0}function Ebt(t,e,n){if(null!=n&&"boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);Jmt(t,e,n)}function Mbt(t,e,n){if(null!=n){if("number"!=typeof n)throw qdt("int32");if(!emt(n))throw qdt("int32");n|=0}Jmt(t,e,n)}function Tbt(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Jmt(t,e,n)}function Abt(t,e,n){{const o=t.u;let a=0|o[apt];if(Npt(a),null==n)Kmt(o,a,e);else{var s=t=0|n[apt],r=obt(t),i=r||Object.isFrozen(n);for(r||(t=0),i||(n=bpt(n),s=0,t=Nbt(t=xbt(t,a),a,true),i=false),t|=21,r=0;r<n.length;r++){const e=n[r],o=gmt(e);Object.is(e,o)||(i&&(n=bpt(n),s=0,t=Nbt(t=xbt(t,a),a,true),i=false),n[r]=o)}t!==s&&(i&&(n=bpt(n),t=Nbt(t=xbt(t,a),a,true)),fpt(n,t)),Kmt(o,a,e,n)}}}function Dbt(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function Rbt(){return Error("Failed to read varint, encoding is invalid.")}function Obt(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function Lbt(t){if("string"==typeof t)return{buffer:Bdt(t),O:false};if(Array.isArray(t))return{buffer:new Uint8Array(t),O:false};if(t.constructor===Uint8Array)return{buffer:t,O:false};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),O:false};if(t.constructor===Ydt)return{buffer:Vdt(t)||new Uint8Array(0),O:true};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),O:false};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function _bt(t,e){let n,s=0,r=0,i=0;const o=t.h;let a=t.g;do{n=o[a++],s|=(127&n)<<i,i+=7}while(i<32&&128&n);for(i>32&&(r|=(127&n)>>4),i=3;i<32&&128&n;i+=7)n=o[a++],r|=(127&n)<<i;if(Ubt(t,a),n<128)return e(s>>>0,r>>>0);throw Rbt()}function Fbt(t){let e=0,n=t.g;const s=n+10,r=t.h;for(;n<s;){const s=r[n++];if(e|=s,0==(128&s))return Ubt(t,n),!!(127&e)}throw Rbt()}function zbt(t){const e=t.h;let n=t.g,s=e[n++],r=127&s;if(128&s&&(s=e[n++],r|=(127&s)<<7,128&s&&(s=e[n++],r|=(127&s)<<14,128&s&&(s=e[n++],r|=(127&s)<<21,128&s&&(s=e[n++],r|=s<<28,128&s&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw Rbt();return Ubt(t,n),r}function jbt(t){return zbt(t)>>>0}function Pbt(t){var e=t.h;const n=t.g,s=e[n],r=e[n+1],i=e[n+2];return e=e[n+3],Ubt(t,t.g+4),(s<<0|r<<8|i<<16|e<<24)>>>0}function Bbt(t){var e=Pbt(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:t*(1/0):0==n?1401298464324817e-60*t*e:t*Math.pow(2,n-150)*(e+8388608)}function Wbt(t){return zbt(t)}function Gbt(t,e,{aa:n=false}={}){t.aa=n,e&&(e=Lbt(e),t.h=e.buffer,t.m=e.O,t.j=0,t.l=t.h.length,t.g=t.j)}function Ubt(t,e){if(t.g=e,e>t.l)throw Obt(t.l,e)}function Vbt(t,e){if(e<0)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,s=n+e;if(s>t.l)throw Obt(e,t.l-n);return t.g=s,n}function Ybt(t,e){if(0==e)return Udt();var n=Vbt(t,e);return t.aa&&t.m?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?new Uint8Array(0):zpt?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?Udt():new Ydt(n,Gdt)}Amt.prototype.toJSON=void 0;var Hbt=[];function Zbt(t){var e=t.g;if(e.g==e.l)return false;t.l=t.g.g;var n=jbt(t.g);if(e=n>>>3,!((n&=7)>=0&&n<=5))throw Dbt(n,t.l);if(e<1)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,true}function Qbt(t){switch(t.h){case 0:0!=t.h?Qbt(t):Fbt(t.g);break;case 1:Ubt(t=t.g,t.g+8);break;case 2:if(2!=t.h)Qbt(t);else{var e=jbt(t.g);Ubt(t=t.g,t.g+e)}break;case 5:Ubt(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!Zbt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}Qbt(t)}break;default:throw Dbt(t.h,t.l)}}function Xbt(t,e,n){const s=t.g.l,r=jbt(t.g),i=t.g.g+r;let o=i-s;if(o<=0&&(t.g.l=i,n(e,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${r} bytes, instead read ${r-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=i,t.g.l=s,e}function qbt(t){var e=jbt(t.g),n=Vbt(t=t.g,e);if(t=t.h,ddt){var s,r=t;(s=hdt)||(s=hdt=new TextDecoder("utf-8",{fatal:true})),e=n+e,r=0===n&&e===r.length?r:r.subarray(n,e);try{var i=s.decode(r)}catch(t){if(void 0===fdt){try{s.decode(new Uint8Array([128]))}catch(t){}try{s.decode(new Uint8Array([97])),fdt=true}catch(t){fdt=false}}throw!fdt&&(hdt=void 0),t}}else{e=(i=n)+e,n=[];let a,c=null;for(;i<e;){var o=t[i++];o<128?n.push(o):o<224?i>=e?udt():(a=t[i++],o<194||128!=(192&a)?(i--,udt()):n.push((31&o)<<6|63&a)):o<240?i>=e-1?udt():(a=t[i++],128!=(192&a)||224===o&&a<160||237===o&&a>=160||128!=(192&(s=t[i++]))?(i--,udt()):n.push((15&o)<<12|(63&a)<<6|63&s)):o<=244?i>=e-2?udt():(a=t[i++],128!=(192&a)||a-144+(o<<28)>>30!=0||128!=(192&(s=t[i++]))||128!=(192&(r=t[i++]))?(i--,udt()):(o=(7&o)<<18|(63&a)<<12|(63&s)<<6|63&r,o-=65536,n.push(55296+(o>>10&1023),56320+(1023&o)))):udt(),n.length>=8192&&(c=ldt(c,n),n.length=0)}i=ldt(c,n)}return i}function Jbt(t){const e=jbt(t.g);return Ybt(t.g,e)}function Kbt(t,e,n){var s=jbt(t.g);for(s=t.g.g+s;t.g.g<s;)n.push(e(t.g))}var tyt=[];function eyt(t,e,n){e.g?e.m(t,e.g,e.h,n):e.m(t,e.h,n)}var nyt=class{constructor(t,e){this.u=Ymt(t,e)}toJSON(){try{var t=Umt(this)}finally{_mt=void 0}return t}l(){var t=Cvt;return t.g?t.l(this,t.g,t.h):t.l(this,t.h,t.defaultValue)}clone(){const t=this.u;return new this.constructor(Zmt(t,0|t[apt],false))}O(){return!!(2&(0|this.u[apt]))}};function syt(t){return t?/^\d+$/.test(t)?(Xpt(t),new ryt(Ppt,Bpt)):null:iyt||=new ryt(0,0)}nyt.prototype.W=wpt,nyt.prototype.toString=function(){return this.u.toString()};var ryt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let iyt;function oyt(t){return t?/^-?\d+$/.test(t)?(Xpt(t),new ayt(Ppt,Bpt)):null:cyt||=new ayt(0,0)}var ayt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let cyt;function uyt(t,e,n){for(;n>0||e>127;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function lyt(t,e){for(;e>127;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function fyt(t,e){if(e>=0)lyt(t,e);else{for(let n=0;n<9;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function hyt(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function dyt(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function pyt(t,e,n){lyt(t.g,8*e+n)}function myt(t,e){return pyt(t,e,2),e=t.g.end(),dyt(t,e),e.push(t.h),e}function byt(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;n>127;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function yyt(t,e,n){pyt(t,e,2),lyt(t.g,n.length),dyt(t,t.g.end()),dyt(t,n)}function wyt(t,e,n,s){null!=n&&(e=myt(t,e),s(n,t),byt(t,e))}function gyt(){const t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var vyt=gyt(),xyt=gyt(),Nyt=gyt(),kyt=gyt(),Cyt=gyt(),$yt=gyt(),Syt=gyt(),Iyt=gyt(),Eyt=gyt(),Myt=class{constructor(t,e,n){this.g=t,this.h=e,t=vyt,this.l=!!t&&n===t||false}};function Tyt(t,e){return new Myt(t,e,vyt)}function Ayt(t,e,n,s,r){wyt(t,n,Wyt(e,s),r)}const Dyt=Tyt((function(t,e,n,s,r){return 2===t.h&&(Xbt(t,pbt(e,s,n),r),true)}),Ayt),Ryt=Tyt((function(t,e,n,s,r){return 2===t.h&&(Xbt(t,pbt(e,s,n),r),true)}),Ayt);var Oyt=Symbol(),Lyt=Symbol(),_yt=Symbol(),Fyt=Symbol();let zyt,jyt;function Pyt(t,e,n,s){var r=s[t];if(r)return r;(r={}).Ma=s,r.T=function(t){switch(typeof t){case"boolean":return Fmt||=[0,void 0,true];case"number":return t>0?void 0:0===t?zmt||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(s[0]);var i=s[1];let o=1;i&&i.constructor===Object&&(r.ga=i,"function"==typeof(i=s[++o])&&(r.la=true,zyt??=i,jyt??=s[o+1],i=s[o+=2]));const a={};for(;i&&Array.isArray(i)&&i.length&&"number"==typeof i[0]&&i[0]>0;){for(var c=0;c<i.length;c++)a[i[c]]=i;i=s[++o]}for(c=1;void 0!==i;){let t;"number"==typeof i&&(c+=i,i=s[++o]);var u=void 0;if(i instanceof Myt?t=i:(t=Dyt,o--),t?.l){i=s[++o],u=s;var l=o;"function"==typeof i&&(i=i(),u[l]=i),u=i}for(l=c+1,"number"==typeof(i=s[++o])&&i<0&&(l-=i,i=s[++o]);c<l;c++){const s=a[c];u?n(r,c,t,u,s):e(r,c,t,s)}}return s[t]=r}function Byt(t){return Array.isArray(t)?t[0]instanceof Myt?t:[Ryt,t]:[t,void 0]}function Wyt(t,e){return t instanceof nyt?t.u:Array.isArray(t)?Vmt(t,e,false):void 0}function Gyt(t,e,n,s){const r=n.g;t[e]=s?(t,e,n)=>r(t,e,n,s):r}function Uyt(t,e,n,s,r){const i=n.g;let o,a;t[e]=(t,e,n)=>i(t,e,n,a||=Pyt(Lyt,Gyt,Uyt,s).T,o||=Vyt(s),r)}function Vyt(t){let e=t[_yt];if(null!=e)return e;const n=Pyt(Lyt,Gyt,Uyt,t);return e=n.la?(t,e)=>zyt(t,e,n):(t,e)=>{const s=0|t[apt];for(;Zbt(e)&&4!=e.h;){var r=e.m,i=n[r];if(null==i){var o=n.ga;o&&(o=o[r])&&(null!=(o=Yyt(o))&&(i=n[r]=o))}null!=i&&i(e,t,r)||(r=(i=e).l,Qbt(i),i.fa?i=void 0:(o=i.g.g-r,i.g.g=r,i=Ybt(i.g,o)),r=t,i&&((o=r[rpt])?o.push(i):r[rpt]=[i]))}return 8192&s&&hpt(t),true},t[_yt]=e}function Yyt(t){const e=(t=Byt(t))[0].g;if(t=t[1]){const n=Vyt(t),s=Pyt(Lyt,Gyt,Uyt,t).T;return(t,r,i)=>e(t,r,i,s,n)}return e}function Hyt(t,e,n){t[e]=n.h}function Zyt(t,e,n,s){let r,i;const o=n.h;t[e]=(t,e,n)=>o(t,e,n,i||=Pyt(Oyt,Hyt,Zyt,s).T,r||=Qyt(s))}function Qyt(t){let e=t[Fyt];if(!e){const n=Pyt(Oyt,Hyt,Zyt,t);e=(t,e)=>Xyt(t,e,n),t[Fyt]=e}return e}function Xyt(t,e,n){!function(t,e,n){const s=512&e?0:-1,r=t.length,i=r+((e=64&e?256&e:!!r&&gpt(t[r-1]))?-1:0);for(let e=0;e<i;e++)n(e-s,t[e]);if(e){t=t[r-1];for(const e in t)!isNaN(e)&&n(+e,t[e])}}(t,0|t[apt]|(n.T[1]?512:0),((t,s)=>{if(null!=s){var r=function(t,e){var n=t[e];if(n)return n;if((n=t.ga)&&(n=n[e])){var s=(n=Byt(n))[0].h;if(n=n[1]){const e=Qyt(n),r=Pyt(Oyt,Hyt,Zyt,n).T;n=t.la?jyt(r,e):(t,n,i)=>s(t,n,i,r,e)}else n=s;return t[e]=n}}(n,t);r&&r(e,s,t)}})),(t=Cpt(t))&&function(t,e){dyt(t,t.g.end());for(let n=0;n<e.length;n++)dyt(t,Vdt(e[n])||new Uint8Array(0))}(e,t)}function qyt(t,e){if(Array.isArray(e)){var n=0|e[apt];if(4&n)return e;for(var s=0,r=0;s<e.length;s++){const n=t(e[s]);null!=n&&(e[r++]=n)}return r<s&&(e.length=r),fpt(e,-6145&(5|n)),2&n&&Object.freeze(e),e}}function Jyt(t,e,n){return new Myt(t,e,n)}function Kyt(t,e,n){return new Myt(t,e,n)}function twt(t,e,n){Kmt(t,0|t[apt],e,n)}var ewt=Tyt((function(t,e,n,s,r){return 2===t.h&&(t=Xbt(t,Vmt([void 0,void 0],s,true),r),Npt(s=0|e[apt]),(r=qmt(e,s,n))instanceof Amt?0!=(2&r.M)?((r=r.da()).push(t),Kmt(e,s,n,r)):r.Ja(t):Array.isArray(r)?(2&(0|r[apt])&&Kmt(e,s,n,r=abt(r)),r.push(t)):Kmt(e,s,n,[t]),true)}),(function(t,e,n,s,r){if(e instanceof Amt)e.forEach(((e,i)=>{wyt(t,n,Vmt([i,e],s,false),r)}));else if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];Array.isArray(o)&&wyt(t,n,Vmt(o,s,false),r)}}));function nwt(t,e,n){if(e=function(t){if(null==t)return t;const e=typeof t;if("bigint"===e)return String(Jpt(64,t));if(amt(t)){if("string"===e)return pmt(t);if("number"===e)return dmt(t)}}(e),null!=e){if("string"==typeof e)oyt(e);if(null!=e)switch(pyt(t,n,0),typeof e){case"number":t=t.g,Gpt(e),uyt(t,Ppt,Bpt);break;case"bigint":n=BigInt.asUintN(64,e),n=new ayt(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),uyt(t.g,n.h,n.g);break;default:n=oyt(e),uyt(t.g,n.h,n.g)}}}function swt(t,e,n){null!=(e=cmt(e))&&null!=e&&(pyt(t,n,0),fyt(t.g,e))}function rwt(t,e,n){null!=(e=imt(e))&&(pyt(t,n,0),t.g.g.push(e?1:0))}function iwt(t,e,n){null!=(e=xmt(e))&&yyt(t,n,bdt(e))}function owt(t,e,n,s,r){wyt(t,n,Wyt(e,s),r)}function awt(t,e,n){null==e||"string"==typeof e||e instanceof Ydt||(Wdt(e)?Wdt(e)&&Jdt(opt):e=void 0),null!=e&&yyt(t,n,Lbt(e).buffer)}function cwt(t,e,n){return(5===t.h||2===t.h)&&(e=ubt(e,0|e[apt],n,false),2==t.h?Kbt(t,Bbt,e):e.push(Bbt(t.g)),true)}var uwt=Jyt((function(t,e,n){if(1!==t.h)return false;var s=t.g;t=Pbt(s);const r=Pbt(s);s=2*(r>>31)+1;const i=r>>>20&2047;return t=4294967296*(1048575&r)+t,twt(e,n,2047==i?t?NaN:s*(1/0):0==i?5e-324*s*t:s*Math.pow(2,i-1075)*(t+4503599627370496)),true}),(function(t,e,n){null!=(e=rmt(e))&&(pyt(t,n,1),t=t.g,(n=jpt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,true),Ppt=n.getUint32(0,true),Bpt=n.getUint32(4,true),hyt(t,Ppt),hyt(t,Bpt))}),gyt()),lwt=Jyt((function(t,e,n){return 5===t.h&&(twt(e,n,Bbt(t.g)),true)}),(function(t,e,n){null!=(e=rmt(e))&&(pyt(t,n,5),t=t.g,Upt(e),hyt(t,Ppt))}),Syt),fwt=Kyt(cwt,(function(t,e,n){if(null!=(e=qyt(rmt,e)))for(let o=0;o<e.length;o++){var s=t,r=n,i=e[o];null!=i&&(pyt(s,r,5),s=s.g,Upt(i),hyt(s,Ppt))}}),Syt),hwt=Kyt(cwt,(function(t,e,n){if(null!=(e=qyt(rmt,e))&&e.length){pyt(t,n,2),lyt(t.g,4*e.length);for(let s=0;s<e.length;s++)n=t.g,Upt(e[s]),hyt(n,Ppt)}}),Syt),dwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,_bt(t.g,Ypt)),true)}),nwt,$yt),pwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,0===(t=_bt(t.g,Ypt))?void 0:t),true)}),nwt,$yt),mwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,_bt(t.g,Vpt)),true)}),(function(t,e,n){if(null!=(e=wmt(e))){if("string"==typeof e)syt(e);if(null!=e)switch(pyt(t,n,0),typeof e){case"number":t=t.g,Gpt(e),uyt(t,Ppt,Bpt);break;case"bigint":n=BigInt.asUintN(64,e),n=new ryt(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),uyt(t.g,n.h,n.g);break;default:n=syt(e),uyt(t.g,n.h,n.g)}}}),gyt()),bwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,zbt(t.g)),true)}),swt,kyt),ywt=Kyt((function(t,e,n){return(0===t.h||2===t.h)&&(e=ubt(e,0|e[apt],n,false),2==t.h?Kbt(t,zbt,e):e.push(zbt(t.g)),true)}),(function(t,e,n){if(null!=(e=qyt(cmt,e))&&e.length){n=myt(t,n);for(let n=0;n<e.length;n++)fyt(t.g,e[n]);byt(t,n)}}),kyt),wwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,0===(t=zbt(t.g))?void 0:t),true)}),swt,kyt),gwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,Fbt(t.g)),true)}),rwt,xyt),vwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,false===(t=Fbt(t.g))?void 0:t),true)}),rwt,xyt),xwt=Kyt((function(t,e,n){return 2===t.h&&(t=qbt(t),ubt(e,0|e[apt],n,false).push(t),true)}),(function(t,e,n){if(null!=(e=qyt(xmt,e)))for(let o=0;o<e.length;o++){var s=t,r=n,i=e[o];null!=i&&yyt(s,r,bdt(i))}}),Nyt),Nwt=Jyt((function(t,e,n){return 2===t.h&&(twt(e,n,""===(t=qbt(t))?void 0:t),true)}),iwt,Nyt),kwt=Jyt((function(t,e,n){return 2===t.h&&(twt(e,n,qbt(t)),true)}),iwt,Nyt),Cwt=function(t,e,n=vyt){return new Myt(t,e,n)}((function(t,e,n,s,r){return 2===t.h&&(s=Vmt(void 0,s,true),ubt(e,0|e[apt],n,true).push(s),Xbt(t,s,r),true)}),(function(t,e,n,s,r){if(Array.isArray(e))for(let i=0;i<e.length;i++)owt(t,e[i],n,s,r)})),$wt=Tyt((function(t,e,n,s,r,i){return 2===t.h&&(hbt(e,0|e[apt],i,n),Xbt(t,e=pbt(e,s,n),r),true)}),owt),Swt=Jyt((function(t,e,n){return 2===t.h&&(twt(e,n,Jbt(t)),true)}),awt,Iyt),Iwt=Kyt((function(t,e,n){return(0===t.h||2===t.h)&&(e=ubt(e,0|e[apt],n,false),2==t.h?Kbt(t,jbt,e):e.push(jbt(t.g)),true)}),(function(t,e,n){if(null!=(e=qyt(umt,e)))for(let o=0;o<e.length;o++){var s=t,r=n,i=e[o];null!=i&&(pyt(s,r,0),lyt(s.g,i))}}),Cyt),Ewt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,0===(t=jbt(t.g))?void 0:t),true)}),(function(t,e,n){null!=(e=umt(e))&&null!=e&&(pyt(t,n,0),lyt(t.g,e))}),Cyt),Mwt=Jyt((function(t,e,n){return 0===t.h&&(twt(e,n,zbt(t.g)),true)}),(function(t,e,n){null!=(e=cmt(e))&&(e=parseInt(e,10),pyt(t,n,0),fyt(t.g,e))}),Eyt);class Twt{constructor(t,e){this.h=t,this.g=e,this.l=bbt,this.m=gbt,this.defaultValue=void 0}register(){Mdt(this)}}function Awt(t,e){return new Twt(t,e)}function Dwt(t,e){return(n,s)=>{if(tyt.length){const t=tyt.pop();t.o(s),Gbt(t.g,n,s),n=t}else n=new class{constructor(t,e){if(Hbt.length){const n=Hbt.pop();Gbt(n,t,e),t=n}else t=new class{constructor(t,e){this.h=null,this.m=false,this.g=this.l=this.j=0,Gbt(this,t,e)}clear(){this.h=null,this.m=false,this.g=this.l=this.j=0,this.aa=false}}(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({fa:t=false}={}){this.fa=t}}(n,s);try{const s=new t,i=s.u;Vyt(e)(i,n);var r=s}finally{n.g.clear(),n.m=-1,n.h=-1,tyt.length<100&&tyt.push(n)}return r}}function Rwt(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};Xyt(this.u,e,Pyt(Oyt,Hyt,Zyt,t)),dyt(e,e.g.end());const n=new Uint8Array(e.h),s=e.l,r=s.length;let i=0;for(let t=0;t<r;t++){const e=s[t];n.set(e,i),i+=e.length}return e.l=[n],n}}var Owt=class extends nyt{constructor(t){super(t)}},Lwt=[0,Nwt,Jyt((function(t,e,n){return 2===t.h&&(twt(e,n,(t=Jbt(t))===Udt()?void 0:t),true)}),(function(t,e,n){if(null!=e){if(e instanceof nyt){const s=e.Oa;return void(s&&(e=s(e),null!=e&&yyt(t,n,Lbt(e).buffer)))}if(Array.isArray(e))return}awt(t,e,n)}),Iyt)];let _wt,Fwt=globalThis.trustedTypes;function zwt(t){void 0===_wt&&(_wt=function(){let t=null;if(!Fwt)return t;try{const e=t=>t;t=Fwt.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}());var e=_wt;return new class{constructor(t){this.g=t}toString(){return this.g+""}}(e?e.createScriptURL(t):t)}function jwt(t,...e){if(0===e.length)return zwt(t[0]);let n=t[0];for(let s=0;s<e.length;s++)n+=encodeURIComponent(e[s])+t[s+1];return zwt(n)}var Pwt=[0,bwt,Mwt,gwt,-1,ywt,Mwt,-1],Bwt=class extends nyt{constructor(t){super(t)}},Wwt=[0,gwt,kwt,gwt,Mwt,-1,Kyt((function(t,e,n){return(0===t.h||2===t.h)&&(e=ubt(e,0|e[apt],n,false),2==t.h?Kbt(t,Wbt,e):e.push(zbt(t.g)),true)}),(function(t,e,n){if(null!=(e=qyt(cmt,e))&&e.length){n=myt(t,n);for(let n=0;n<e.length;n++)fyt(t.g,e[n]);byt(t,n)}}),Eyt),kwt,-1,[0,gwt,-1],Mwt,gwt,-1],Gwt=[0,kwt,-2],Uwt=class extends nyt{constructor(t){super(t)}},Vwt=[0],Ywt=[0,bwt,gwt,1,gwt,-3],Hwt=class extends nyt{constructor(t){super(t,2)}},Zwt={};Zwt[336783863]=[0,kwt,gwt,-1,bwt,[0,[1,2,3,4,5,6,7,8,9],$wt,Vwt,$wt,Wwt,$wt,Gwt,$wt,Ywt,$wt,Pwt,$wt,[0,kwt,-2],$wt,[0,kwt,Mwt],$wt,[0,Mwt,kwt,-1],$wt,[0,Mwt,-1]],[0,kwt],gwt,[0,[1,3],[2,4],$wt,[0,ywt],-1,$wt,[0,xwt],-1,Cwt,[0,kwt,-1]],kwt];var Qwt=[0,pwt,-1,vwt,-3,pwt,ywt,Nwt,wwt,pwt,-1,vwt,wwt,vwt,-2,Nwt];function Xwt(t,e){cbt(t,2,vmt(e),"")}function qwt(t,e){kbt(t,3,e)}function Jwt(t,e){kbt(t,4,e)}var Kwt=class extends nyt{constructor(t){super(t,500)}o(t){return gbt(this,0,7,t)}},tgt=[-1,{}],egt=[0,kwt,1,tgt],ngt=[0,kwt,xwt,tgt];function sgt(t,e){Cbt(t,1,Kwt,e)}function rgt(t,e){kbt(t,10,e)}function igt(t,e){kbt(t,15,e)}var ogt=class extends nyt{constructor(t){super(t,500)}o(t){return gbt(this,0,1001,t)}},agt=[-500,Cwt,[-500,Nwt,-1,xwt,-3,[-2,Zwt,gwt],Cwt,Lwt,wwt,-1,egt,ngt,Cwt,[0,Nwt,vwt],Nwt,Qwt,wwt,xwt,987,xwt],4,Cwt,[-500,kwt,-1,[-1,{}],998,kwt],Cwt,[-500,kwt,xwt,-1,[-2,{},gwt],997,xwt,-1],wwt,Cwt,[-500,kwt,xwt,tgt,998,xwt],xwt,wwt,egt,ngt,Cwt,[0,Nwt,-1,tgt],xwt,-2,Qwt,Nwt,-1,vwt,[0,vwt,Ewt],978,tgt,Cwt,Lwt];ogt.prototype.g=Rwt(agt);var cgt=Dwt(ogt,agt),ugt=class extends nyt{constructor(t){super(t)}},lgt=class extends nyt{constructor(t){super(t)}g(){return wbt(this,ugt,1)}},fgt=[0,Cwt,[0,bwt,lwt,kwt,-1]],hgt=Dwt(lgt,fgt),dgt=class extends nyt{constructor(t){super(t)}},pgt=class extends nyt{constructor(t){super(t)}},mgt=class extends nyt{constructor(t){super(t)}h(){return bbt(this,dgt,2)}g(){return wbt(this,pgt,5)}},bgt=Dwt(class extends nyt{constructor(t){super(t)}},[0,xwt,ywt,hwt,[0,Mwt,[0,bwt,-3],[0,lwt,-3],[0,bwt,-1,[0,Cwt,[0,bwt,-2]]],Cwt,[0,lwt,-1,kwt,lwt]],kwt,-1,dwt,Cwt,[0,bwt,lwt],xwt,dwt]),ygt=class extends nyt{constructor(t){super(t)}},wgt=Dwt(class extends nyt{constructor(t){super(t)}},[0,Cwt,[0,lwt,-4]]),ggt=class extends nyt{constructor(t){super(t)}},vgt=Dwt(class extends nyt{constructor(t){super(t)}},[0,Cwt,[0,lwt,-4]]),xgt=class extends nyt{constructor(t){super(t)}},Ngt=[0,bwt,-1,hwt,Mwt],kgt=class extends nyt{constructor(t){super(t)}};kgt.prototype.g=Rwt([0,lwt,-4,dwt]);var Cgt=class extends nyt{constructor(t){super(t)}},$gt=Dwt(class extends nyt{constructor(t){super(t)}},[0,Cwt,[0,1,bwt,kwt,fgt],dwt]),Sgt=class extends nyt{constructor(t){super(t)}},Igt=class extends nyt{constructor(t){super(t)}ma(){const t=ebt(this);return null==t?Udt():t}},Egt=class extends nyt{constructor(t){super(t)}},Mgt=[1,2],Tgt=Dwt(class extends nyt{constructor(t){super(t)}},[0,Cwt,[0,Mgt,$wt,[0,hwt],$wt,[0,Swt],bwt,kwt],dwt]),Agt=class extends nyt{constructor(t){super(t)}},Dgt=[0,kwt,bwt,lwt,xwt,-1],Rgt=class extends nyt{constructor(t){super(t)}},Ogt=[0,gwt,-1],Lgt=class extends nyt{constructor(t){super(t)}},_gt=[1,2,3,4,5],Fgt=class extends nyt{constructor(t){super(t)}g(){return null!=ebt(this)}h(){return null!=Sbt(this,2)}},zgt=class extends nyt{constructor(t){super(t)}g(){return imt(Xmt(this,2))??false}},jgt=[0,Swt,kwt,[0,bwt,dwt,-1],[0,mwt,dwt]],Pgt=[0,jgt,gwt,[0,_gt,$wt,Ywt,$wt,Wwt,$wt,Pwt,$wt,Vwt,$wt,Gwt],Mwt],Bgt=class extends nyt{constructor(t){super(t)}},Wgt=[0,Pgt,lwt,-1,bwt],Ggt=Awt(502141897,Bgt);Zwt[502141897]=Wgt;var Ugt=Dwt(class extends nyt{constructor(t){super(t)}},[0,[0,Mwt,-1,fwt,Iwt],Ngt]),Vgt=class extends nyt{constructor(t){super(t)}},Ygt=class extends nyt{constructor(t){super(t)}},Hgt=[0,Pgt,lwt,[0,Pgt],gwt],Zgt=[0,Pgt,Wgt,Hgt,lwt,[0,[0,jgt]]],Qgt=Awt(508968150,Ygt);Zwt[508968150]=Zgt,Zwt[508968149]=Hgt;var Xgt=class extends nyt{constructor(t){super(t)}},qgt=Awt(513916220,Xgt);Zwt[513916220]=[0,Pgt,Zgt,bwt];var Jgt=class extends nyt{constructor(t){super(t)}h(){return bbt(this,Agt,2)}g(){Jmt(this,2)}},Kgt=[0,Pgt,Dgt];Zwt[478825465]=Kgt;var tvt=class extends nyt{constructor(t){super(t)}},evt=class extends nyt{constructor(t){super(t)}},nvt=class extends nyt{constructor(t){super(t)}},svt=class extends nyt{constructor(t){super(t)}},rvt=class extends nyt{constructor(t){super(t)}},ivt=[0,Pgt,[0,Pgt],Kgt,-1],ovt=[0,Pgt,lwt,bwt],avt=[0,Pgt,lwt],cvt=[0,Pgt,ovt,avt,lwt],uvt=Awt(479097054,rvt);Zwt[479097054]=[0,Pgt,cvt,ivt],Zwt[463370452]=ivt,Zwt[464864288]=ovt;var lvt=Awt(462713202,svt);Zwt[462713202]=cvt,Zwt[474472470]=avt;var fvt=class extends nyt{constructor(t){super(t)}},hvt=class extends nyt{constructor(t){super(t)}},dvt=class extends nyt{constructor(t){super(t)}},pvt=class extends nyt{constructor(t){super(t)}},mvt=[0,Pgt,lwt,-1,bwt],bvt=[0,Pgt,lwt,gwt];pvt.prototype.g=Rwt([0,Pgt,avt,[0,Pgt],Wgt,Hgt,mvt,bvt]);var yvt=class extends nyt{constructor(t){super(t)}},wvt=Awt(456383383,yvt);Zwt[456383383]=[0,Pgt,Dgt];var gvt=class extends nyt{constructor(t){super(t)}},vvt=Awt(476348187,gvt);Zwt[476348187]=[0,Pgt,Ogt];var xvt=class extends nyt{constructor(t){super(t)}},Nvt=class extends nyt{constructor(t){super(t)}},kvt=[0,Mwt,-1],Cvt=Awt(458105876,class extends nyt{constructor(t){super(t)}g(){var t=this.u;const e=0|t[apt],n=2&e;return t=function(t,e,n){var s=Nvt;const r=2&e;let i=false;if(null==n){if(r)return jmt();n=[]}else if(n.constructor===Amt){if(0==(2&n.M)||r)return n;n=n.da()}else Array.isArray(n)?i=!!(2&(0|n[apt])):n=[];if(r){if(!n.length)return jmt();i||(i=true,hpt(n))}else i&&(i=false,n=abt(n));return i||(64&(0|n[apt])?n[apt]&=-33:32&e&&lpt(n,32)),Kmt(t,e,2,s=new Amt(n,s,kmt,void 0)),s}(t,e,qmt(t,e,2)),!n&&Nvt&&(t.pa=true),t}});Zwt[458105876]=[0,kvt,ewt,[true,dwt,[0,kwt,-1,xwt]]];var $vt=class extends nyt{constructor(t){super(t)}},Svt=Awt(458105758,$vt);Zwt[458105758]=[0,Pgt,kwt,kvt];var Ivt=class extends nyt{constructor(t){super(t)}},Evt=Awt(443442058,Ivt);Zwt[443442058]=[0,Pgt,kwt,bwt,lwt,xwt,-1,gwt,lwt],Zwt[514774813]=mvt;var Mvt=class extends nyt{constructor(t){super(t)}},Tvt=Awt(516587230,Mvt);function Avt(t,e){return e=e?e.clone():new Agt,void 0!==t.displayNamesLocale?Jmt(e,1,vmt(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Jmt(e,1),void 0!==t.maxResults?Mbt(e,2,t.maxResults):"maxResults"in t&&Jmt(e,2),void 0!==t.scoreThreshold?Tbt(e,3,t.scoreThreshold):"scoreThreshold"in t&&Jmt(e,3),void 0!==t.categoryAllowlist?Abt(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Jmt(e,4),void 0!==t.categoryDenylist?Abt(e,5,t.categoryDenylist):"categoryDenylist"in t&&Jmt(e,5),e}function Dvt(t,e=-1,n=""){return{categories:t.map((t=>({index:$bt(t,1)??0??-1,score:Ibt(t,2)??0,categoryName:Sbt(t,3)??""??"",displayName:Sbt(t,4)??""??""}))),headIndex:e,headName:n}}function Rvt(t){var e=sbt(t,3,rmt,nbt()),n=sbt(t,2,cmt,nbt()),s=sbt(t,1,xmt,nbt()),r=sbt(t,9,xmt,nbt());const i={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)i.categories.push({score:e[t],index:n[t]??-1,categoryName:s[t]??"",displayName:r[t]??""});if((e=bbt(t,mgt,4)?.h())&&(i.boundingBox={originX:$bt(e,1)??0,originY:$bt(e,2)??0,width:$bt(e,3)??0,height:$bt(e,4)??0,angle:0}),bbt(t,mgt,4)?.g().length)for(const e of bbt(t,mgt,4).g())i.keypoints.push({x:tbt(e,1)??0,y:tbt(e,2)??0,score:tbt(e,4)??0,label:Sbt(e,3)??""});return i}function Ovt(t){const e=[];for(const n of wbt(t,ggt,1))e.push({x:Ibt(n,1)??0,y:Ibt(n,2)??0,z:Ibt(n,3)??0,visibility:Ibt(n,4)??0});return e}function Lvt(t){const e=[];for(const n of wbt(t,ygt,1))e.push({x:Ibt(n,1)??0,y:Ibt(n,2)??0,z:Ibt(n,3)??0,visibility:Ibt(n,4)??0});return e}function _vt(t){return Array.from(t,(t=>t>127?t-256:t))}function Fvt(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,s=0,r=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i],s+=t[i]*t[i],r+=e[i]*e[i];if(s<=0||r<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(s*r)}let zvt;Zwt[516587230]=[0,Pgt,mvt,bvt,lwt],Zwt[518928384]=bvt;const jvt=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function Pvt(){if(void 0===zvt)try{await WebAssembly.instantiate(jvt),zvt=true}catch{zvt=false}return zvt}async function Bvt(t,e=jwt``){const n=await Pvt()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Wvt=class{};function Gvt(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Uvt(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),false),e.addEventListener("error",(t=>{n(t)}),false),document.body.appendChild(e)}))}importScripts(t.toString())}function Vvt(t){return void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height]}function Yvt(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function Hvt(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,true),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,false);const[s,r]=Vvt(e);return!t.l||s===t.i.canvas.width&&r===t.i.canvas.height||(t.i.canvas.width=s,t.i.canvas.height=r),[s,r]}function Zvt(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const s=new Uint32Array(e.length);for(let n=0;n<e.length;n++)s[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*s.length),t.i.HEAPU32.set(s,e>>2),n(e);for(const e of s)t.i._free(e);t.i._free(e)}function Qvt(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function Xvt(t,e,n){let s=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,r)=>{e?(n(s,r),s=[]):s.push(t)}}Wvt.forVisionTasks=function(t){return Bvt("vision",t)},Wvt.forTextTasks=function(t){return Bvt("text",t)},Wvt.forGenAiExperimentalTasks=function(t){return Bvt("genai_experimental",t)},Wvt.forGenAiTasks=function(t){return Bvt("genai",t)},Wvt.forAudioTasks=function(t){return Bvt("audio",t)},Wvt.isSimdSupported=function(){return Pvt()};async function qvt(t,e,n,s){return t=await(async(t,e,n,s,r)=>{if(e&&await Uvt(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await Uvt(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,s)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&t.endsWith(".data")?n.assetBinaryPath.toString():t}),await t.o(s),t}function Jvt(t,e){const n=bbt(t.baseOptions,Fgt,1)||new Fgt;"string"==typeof e?(Jmt(n,2,vmt(e)),Jmt(n,1)):e instanceof Uint8Array&&(Jmt(n,1,vpt(e,false)),Jmt(n,2)),gbt(t.baseOptions,0,1,n)}function Kvt(t){try{const e=t.G.length;if(1===e)throw Error(t.G[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.G.map((t=>t.message)).join(", "))}finally{t.G=[]}}function txt(t,e){t.B=Math.max(t.B,e)}function ext(t,e){t.A=new Kwt,Xwt(t.A,"PassThroughCalculator"),qwt(t.A,"free_memory"),Jwt(t.A,"free_memory_unused_out"),rgt(e,"free_memory"),sgt(e,t.A)}function nxt(t,e){qwt(t.A,e),Jwt(t.A,e+"_unused_out")}function sxt(t){t.g.addBoolToStream(true,"free_memory",t.B)}var rxt=class{constructor(t){this.g=t,this.G=[],this.B=0,this.g.setAutoRenderToScreen(false)}l(t,e=true){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(bbt(this.baseOptions,Fgt,1)?.g()||bbt(this.baseOptions,Fgt,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=bbt(t.baseOptions,Lgt,3);if(!n){var s=n=new Lgt,r=new Uwt;vbt(s,4,_gt,r)}"delegate"in e&&("GPU"===e.delegate?(e=n,s=new Bwt,vbt(e,2,_gt,s)):(e=n,s=new Uwt,vbt(e,4,_gt,s))),gbt(t.baseOptions,0,3,n)}(this,e),e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)})).then((t=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),true,false,false),Jvt(this,"/model.dat"),this.m(),this.J()}));if(e.modelAssetBuffer instanceof Uint8Array)Jvt(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){const e=[];for(var n=0;;){const{done:s,value:r}=await t.read();if(s)break;e.push(r),n+=r.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(n),n=0;for(const s of e)t.set(s,n),n+=s.length;return t}(e.modelAssetBuffer).then((t=>{Jvt(this,t),this.m(),this.J()}))}return this.m(),this.J(),Promise.resolve()}J(){}ca(){let t;if(this.g.ca((e=>{t=cgt(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.G.push(Error(e))})),this.g.Ha(),this.g.setGraph(t,e),this.A=void 0,Kvt(this)}finishProcessing(){this.g.finishProcessing(),Kvt(this)}close(){this.A=void 0,this.g.closeGraph()}};function ixt(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}rxt.prototype.close=rxt.prototype.close;class oxt{constructor(t,e,n,s){this.g=t,this.h=e,this.m=n,this.l=s}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function axt(t,e,n){const s=t.g;if(n=ixt(s.createShader(n),"Failed to create WebGL shader"),s.shaderSource(n,e),s.compileShader(n),!s.getShaderParameter(n,s.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${s.getShaderInfoLog(n)}`);return s.attachShader(t.h,n),n}function cxt(t,e){const n=t.g,s=ixt(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(s);const r=ixt(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,r),n.enableVertexAttribArray(t.P),n.vertexAttribPointer(t.P,2,n.FLOAT,false,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const i=ixt(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.J),n.vertexAttribPointer(t.J,2,n.FLOAT,false,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new oxt(n,s,r,i)}function uxt(t,e){if(t.g){if(e!==t.g)throw Error("Cannot change GL context once initialized")}else t.g=e}function lxt(t,e,n,s){return uxt(t,e),t.h||(t.m(),t.C()),n?(t.s||(t.s=cxt(t,true)),n=t.s):(t.v||(t.v=cxt(t,false)),n=t.v),e.useProgram(t.h),n.bind(),t.l(),t=s(),n.g.bindVertexArray(null),t}function fxt(t,e,n){return uxt(t,e),t=ixt(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function hxt(t,e,n){uxt(t,e),t.A||(t.A=ixt(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.A),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function dxt(t){t.g?.bindFramebuffer(t.g.FRAMEBUFFER,null)}var pxt=class{G(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}m(){const t=this.g;if(this.h=ixt(t.createProgram(),"Failed to create WebGL program"),this.Z=axt(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.Y=axt(this,this.G(),t.FRAGMENT_SHADER),t.linkProgram(this.h),!t.getProgramParameter(this.h,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.h)}`);this.P=t.getAttribLocation(this.h,"aVertex"),this.J=t.getAttribLocation(this.h,"aTex")}C(){}l(){}close(){if(this.h){const t=this.g;t.deleteProgram(this.h),t.deleteShader(this.Z),t.deleteShader(this.Y)}this.A&&this.g.deleteFramebuffer(this.A),this.v&&this.v.close(),this.s&&this.s.close()}};function mxt(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function bxt(t){var e=mxt(t,1);if(!e){if(e=mxt(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const s=wxt(t);var n=vxt(t);if(hxt(n,s,yxt(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(t.width*t.height*4),s.readPixels(0,0,t.width,t.height,s.RGBA,s.FLOAT,n);for(let t=0,s=0;t<e.length;++t,s+=4)e[t]=n[s]}else s.readPixels(0,0,t.width,t.height,s.RED,s.FLOAT,e)}t.g.push(e)}return e}function yxt(t){let e=mxt(t,2);if(!e){const n=wxt(t);e=xxt(t);const s=bxt(t),r=gxt(t);n.texImage2D(n.TEXTURE_2D,0,r,t.width,t.height,0,n.RED,n.FLOAT,s),Nxt(t)}return e}function wxt(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=ixt(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function gxt(t){if(t=wxt(t),!kxt)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))kxt=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");kxt=t.R16F}return kxt}function vxt(t){return t.l||(t.l=new pxt),t.l}function xxt(t){const e=wxt(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=mxt(t,2);return n||(n=fxt(vxt(t),e,t.m?e.LINEAR:e.NEAREST),t.g.push(n),t.j=true),e.bindTexture(e.TEXTURE_2D,n),n}function Nxt(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var kxt,Cxt=class{constructor(t,e,n,s,r,i,o){this.g=t,this.m=e,this.j=n,this.canvas=s,this.l=r,this.width=i,this.height=o,this.j&&(0===--$xt&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Da(){return!!mxt(this,0)}ja(){return!!mxt(this,1)}R(){return!!mxt(this,2)}ia(){return(e=mxt(t=this,0))||(e=bxt(t),e=new Uint8Array(e.map((t=>255*t))),t.g.push(e)),e;var t,e}ha(){return bxt(this)}N(){return yxt(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=wxt(this),e=vxt(this);t.activeTexture(t.TEXTURE1),n=fxt(e,t,this.m?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,n);const s=gxt(this);t.texImage2D(t.TEXTURE_2D,0,s,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),hxt(e,t,n),lxt(e,t,false,(()=>{xxt(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Nxt(this)})),dxt(e),Nxt(this)}}t.push(n)}return new Cxt(t,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&wxt(this).deleteTexture(mxt(this,2)),$xt=-1}};Cxt.prototype.close=Cxt.prototype.close,Cxt.prototype.clone=Cxt.prototype.clone,Cxt.prototype.getAsWebGLTexture=Cxt.prototype.N,Cxt.prototype.getAsFloat32Array=Cxt.prototype.ha,Cxt.prototype.getAsUint8Array=Cxt.prototype.ia,Cxt.prototype.hasWebGLTexture=Cxt.prototype.R,Cxt.prototype.hasFloat32Array=Cxt.prototype.ja,Cxt.prototype.hasUint8Array=Cxt.prototype.Da;var $xt=250;function Sxt(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Ixt(t){var e=Sxt(t,0);if(!e){e=Mxt(t);const n=Txt(t),s=new Uint8Array(t.width*t.height*4);hxt(n,e,Ext(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,s),dxt(n),e=new ImageData(new Uint8ClampedArray(s.buffer),t.width,t.height),t.g.push(e)}return e}function Ext(t){let e=Sxt(t,2);if(!e){const n=Mxt(t);e=Axt(t);const s=Sxt(t,1)||Ixt(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,s),Dxt(t)}return e}function Mxt(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=ixt(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Txt(t){return t.l||(t.l=new pxt),t.l}function Axt(t){const e=Mxt(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Sxt(t,2);return n||(n=fxt(Txt(t),e),t.g.push(n),t.m=true),e.bindTexture(e.TEXTURE_2D,n),n}function Dxt(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function Rxt(t){const e=Mxt(t);return lxt(Txt(t),e,true,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const s=n.width,r=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=s,n.height=r,t}(t,(()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))))}var Oxt=class{constructor(t,e,n,s,r,i,o){this.g=t,this.j=e,this.m=n,this.canvas=s,this.l=r,this.width=i,this.height=o,(this.j||this.m)&&(0===--Lxt&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Ca(){return!!Sxt(this,0)}ka(){return!!Sxt(this,1)}R(){return!!Sxt(this,2)}Aa(){return Ixt(this)}za(){var t=Sxt(this,1);return t||(Ext(this),Axt(this),t=Rxt(this),Dxt(this),this.g.push(t),this.j=true),t}N(){return Ext(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Mxt(this),e=Txt(this);t.activeTexture(t.TEXTURE1),n=fxt(e,t),t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),hxt(e,t,n),lxt(e,t,false,(()=>{Axt(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Dxt(this)})),dxt(e),Dxt(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Ext(this),Axt(this),n=Rxt(this),Dxt(this)}t.push(n)}return new Oxt(t,this.ka(),this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&Sxt(this,1).close(),this.m&&Mxt(this).deleteTexture(Sxt(this,2)),Lxt=-1}};Oxt.prototype.close=Oxt.prototype.close,Oxt.prototype.clone=Oxt.prototype.clone,Oxt.prototype.getAsWebGLTexture=Oxt.prototype.N,Oxt.prototype.getAsImageBitmap=Oxt.prototype.za,Oxt.prototype.getAsImageData=Oxt.prototype.Aa,Oxt.prototype.hasWebGLTexture=Oxt.prototype.R,Oxt.prototype.hasImageBitmap=Oxt.prototype.ka,Oxt.prototype.hasImageData=Oxt.prototype.Ca;var Lxt=250;function _xt(...t){return t.map((([t,e])=>({start:t,end:e})))}const Fxt=function(t){return class extends t{Ha(){this.i._registerModelResourcesGraphService()}}}((zxt=class{constructor(t,e){this.l=true,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:Gvt()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),false)}setGraph(t,e){const n=t.length,s=this.i._malloc(n);this.i.HEAPU8.set(t,s),e?this.i._changeBinaryGraph(n,s):this.i._changeTextGraph(n,s),this.i._free(s)}configureAudio(t,e,n,s,r){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Yvt(this,s||"input_audio",(s=>{Yvt(this,r=r||"audio_header",(r=>{this.i._configureAudio(s,r,t,e??0,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}ca(t){Qvt(this,"__graph_config__",(e=>{t(e)})),Yvt(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,s,r){const i=4*t.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(t,this.g/4),Yvt(this,s,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,r)}))}addGpuBufferToStream(t,e,n){Yvt(this,e,(e=>{const[s,r]=Hvt(this,t,e);this.i._addBoundTextureToStream(e,s,r,n)}))}addBoolToStream(t,e,n){Yvt(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){Yvt(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){Yvt(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){Yvt(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addUintToStream(t,e,n){Yvt(this,e,(e=>{this.i._addUintToInputStream(t,e,n)}))}addStringToStream(t,e,n){Yvt(this,e,(e=>{Yvt(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){Yvt(this,e,(e=>{Zvt(this,Object.keys(t),(s=>{Zvt(this,Object.values(t),(r=>{this.i._addFlatHashMapToInputStream(s,r,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,s){Yvt(this,n,(n=>{Yvt(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputStream(r,t.length,e,n,s),this.i._free(r)}))}))}addEmptyPacketToStream(t,e){Yvt(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){Yvt(this,e,(e=>{const s=this.i._allocateBoolVector(t.length);if(!s)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(s,e);this.i._addBoolVectorToInputStream(s,e,n)}))}addDoubleVectorToStream(t,e,n){Yvt(this,e,(e=>{const s=this.i._allocateDoubleVector(t.length);if(!s)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(s,e);this.i._addDoubleVectorToInputStream(s,e,n)}))}addFloatVectorToStream(t,e,n){Yvt(this,e,(e=>{const s=this.i._allocateFloatVector(t.length);if(!s)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(s,e);this.i._addFloatVectorToInputStream(s,e,n)}))}addIntVectorToStream(t,e,n){Yvt(this,e,(e=>{const s=this.i._allocateIntVector(t.length);if(!s)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(s,e);this.i._addIntVectorToInputStream(s,e,n)}))}addUintVectorToStream(t,e,n){Yvt(this,e,(e=>{const s=this.i._allocateUintVector(t.length);if(!s)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(s,e);this.i._addUintVectorToInputStream(s,e,n)}))}addStringVectorToStream(t,e,n){Yvt(this,e,(e=>{const s=this.i._allocateStringVector(t.length);if(!s)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Yvt(this,e,(t=>{this.i._addStringVectorEntry(s,t)}));this.i._addStringVectorToInputStream(s,e,n)}))}addBoolToInputSidePacket(t,e){Yvt(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){Yvt(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){Yvt(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){Yvt(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addUintToInputSidePacket(t,e){Yvt(this,e,(e=>{this.i._addUintToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){Yvt(this,e,(e=>{Yvt(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){Yvt(this,n,(n=>{Yvt(this,e,(e=>{const s=this.i._malloc(t.length);this.i.HEAPU8.set(t,s),this.i._addProtoToInputSidePacket(s,t.length,e,n),this.i._free(s)}))}))}addBoolVectorToInputSidePacket(t,e){Yvt(this,e,(e=>{const n=this.i._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.i._addBoolVectorEntry(n,e);this.i._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){Yvt(this,e,(e=>{const n=this.i._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.i._addDoubleVectorEntry(n,e);this.i._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){Yvt(this,e,(e=>{const n=this.i._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.i._addFloatVectorEntry(n,e);this.i._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){Yvt(this,e,(e=>{const n=this.i._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.i._addIntVectorEntry(n,e);this.i._addIntVectorToInputSidePacket(n,e)}))}addUintVectorToInputSidePacket(t,e){Yvt(this,e,(e=>{const n=this.i._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(const e of t)this.i._addUintVectorEntry(n,e);this.i._addUintVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){Yvt(this,e,(e=>{const n=this.i._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)Yvt(this,e,(t=>{this.i._addStringVectorEntry(n,t)}));this.i._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Qvt(this,t,e),Yvt(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Xvt(this,t,e),Yvt(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){Qvt(this,t,e),Yvt(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){Xvt(this,t,e),Yvt(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachUintListener(t,e){Qvt(this,t,e),Yvt(this,t,(t=>{this.i._attachUintListener(t)}))}attachUintVectorListener(t,e){Xvt(this,t,e),Yvt(this,t,(t=>{this.i._attachUintVectorListener(t)}))}attachDoubleListener(t,e){Qvt(this,t,e),Yvt(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Xvt(this,t,e),Yvt(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Qvt(this,t,e),Yvt(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Xvt(this,t,e),Yvt(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){Qvt(this,t,e),Yvt(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){Xvt(this,t,e),Yvt(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Qvt(this,t,e),Yvt(this,t,(t=>{this.i._attachProtoListener(t,n||false)}))}attachProtoVectorListener(t,e,n){Xvt(this,t,e),Yvt(this,t,(t=>{this.i._attachProtoVectorListener(t,n||false)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Qvt(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),Yvt(this,t,(t=>{this.i._attachAudioListener(t,n||false)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends zxt{get ea(){return this.i}oa(t,e,n){Yvt(this,e,(e=>{const[s,r]=Hvt(this,t,e);this.ea._addBoundTextureAsImageToStream(e,s,r,n)}))}V(t,e){Qvt(this,t,e),Yvt(this,t,(t=>{this.ea._attachImageListener(t)}))}ba(t,e){Xvt(this,t,e),Yvt(this,t,(t=>{this.ea._attachImageVectorListener(t)}))}}));var zxt,jxt=class extends Fxt{};async function Pxt(t,e,n){return async function(t,e,n,s){return qvt(t,e,n,s)}(t,n.canvas??(Gvt()?void 0:document.createElement("canvas")),e,n)}function Bxt(t,e,n,s){if(t.U){const i=new kgt;if(n?.regionOfInterest){if(!t.na)throw Error("This task doesn't support region-of-interest.");var r=n.regionOfInterest;if(r.left>=r.right||r.top>=r.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(r.left<0||r.top<0||r.right>1||r.bottom>1)throw Error("Expected RectF values to be in [0,1].");Tbt(i,1,(r.left+r.right)/2),Tbt(i,2,(r.top+r.bottom)/2),Tbt(i,4,r.right-r.left),Tbt(i,3,r.bottom-r.top)}else Tbt(i,1,.5),Tbt(i,2,.5),Tbt(i,4,1),Tbt(i,3,1);if(n?.rotationDegrees){if(n?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Tbt(i,5,-Math.PI*n.rotationDegrees/180),n?.rotationDegrees%180!=0){const[t,s]=Vvt(e);n=Ibt(i,3)*s/t,r=Ibt(i,4)*t/s,Tbt(i,4,n),Tbt(i,3,r)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.U,s)}t.g.oa(e,t.Z,s??performance.now()),t.finishProcessing()}function Wxt(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Bxt(t,e,n,t.B+1)}function Gxt(t,e,n,s){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Bxt(t,e,n,s)}function Uxt(t,e,n,s){var r=e.data;const i=e.width,o=i*(e=e.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==o)throw Error("Unsupported channel count: "+r.length/o);return t=new Cxt([r],n,false,t.g.i.canvas,t.P,i,e),s?t.clone():t}var Vxt=class extends rxt{constructor(t,e,n,s){super(t),this.g=t,this.Z=e,this.U=n,this.na=s,this.P=new pxt}l(t,e=true){if("runningMode"in t&&Ebt(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.P.close(),super.close()}};Vxt.prototype.close=Vxt.prototype.close;var Yxt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect_in",false),this.j={detections:[]},gbt(t=this.h=new Bgt,0,1,e=new zgt),Tbt(this.h,2,.5),Tbt(this.h,3,.3)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&Tbt(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Tbt(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}D(t,e){return this.j={detections:[]},Wxt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Gxt(this,t,n,e),this.j}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect_in"),igt(t,"detections");const e=new Hwt;eyt(e,Ggt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect_in"),Jwt(n,"DETECTIONS:detections"),n.o(e),sgt(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=bgt(e),this.j.detections.push(Rvt(t));txt(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};Yxt.prototype.detectForVideo=Yxt.prototype.F,Yxt.prototype.detect=Yxt.prototype.D,Yxt.prototype.setOptions=Yxt.prototype.o,Yxt.createFromModelPath=async function(t,e){return Pxt(Yxt,t,{baseOptions:{modelAssetPath:e}})},Yxt.createFromModelBuffer=function(t,e){return Pxt(Yxt,t,{baseOptions:{modelAssetBuffer:e}})},Yxt.createFromOptions=function(t,e){return Pxt(Yxt,t,e)};var Hxt=_xt([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),Zxt=_xt([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),Qxt=_xt([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Xxt=_xt([474,475],[475,476],[476,477],[477,474]),qxt=_xt([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),Jxt=_xt([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Kxt=_xt([469,470],[470,471],[471,472],[472,469]),tNt=_xt([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),eNt=[...Hxt,...Zxt,...Qxt,...qxt,...Jxt,...tNt],nNt=_xt([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function sNt(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var rNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect",false),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=false,gbt(t=this.h=new Ygt,0,1,e=new zgt),this.v=new Vgt,gbt(this.h,0,3,this.v),this.s=new Bgt,gbt(this.h,0,2,this.s),Mbt(this.s,4,1),Tbt(this.s,2,.5),Tbt(this.v,2,.5),Tbt(this.h,4,.5)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return"numFaces"in t&&Mbt(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Tbt(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Tbt(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Tbt(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}D(t,e){return sNt(this),Wxt(this,t,e),this.j}F(t,e,n){return sNt(this),Gxt(this,t,n,e),this.j}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect"),igt(t,"face_landmarks");const e=new Hwt;eyt(e,Qgt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),sgt(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=vgt(e),this.j.faceLandmarks.push(Ovt(t));txt(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{txt(this,t)})),this.outputFaceBlendshapes&&(igt(t,"blendshapes"),Jwt(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=hgt(e),this.j.faceBlendshapes.push(Dvt(t.g()??[]));txt(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{txt(this,t)}))),this.outputFacialTransformationMatrixes&&(igt(t,"face_geometry"),Jwt(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=bbt(Ugt(e),xgt,2))&&this.j.facialTransformationMatrixes.push({rows:$bt(t,1)??0??0,columns:$bt(t,2)??0??0,data:sbt(t,3,rmt,nbt()).slice()??[]});txt(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{txt(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),true)}};rNt.prototype.detectForVideo=rNt.prototype.F,rNt.prototype.detect=rNt.prototype.D,rNt.prototype.setOptions=rNt.prototype.o,rNt.createFromModelPath=function(t,e){return Pxt(rNt,t,{baseOptions:{modelAssetPath:e}})},rNt.createFromModelBuffer=function(t,e){return Pxt(rNt,t,{baseOptions:{modelAssetBuffer:e}})},rNt.createFromOptions=function(t,e){return Pxt(rNt,t,e)},rNt.FACE_LANDMARKS_LIPS=Hxt,rNt.FACE_LANDMARKS_LEFT_EYE=Zxt,rNt.FACE_LANDMARKS_LEFT_EYEBROW=Qxt,rNt.FACE_LANDMARKS_LEFT_IRIS=Xxt,rNt.FACE_LANDMARKS_RIGHT_EYE=qxt,rNt.FACE_LANDMARKS_RIGHT_EYEBROW=Jxt,rNt.FACE_LANDMARKS_RIGHT_IRIS=Kxt,rNt.FACE_LANDMARKS_FACE_OVAL=tNt,rNt.FACE_LANDMARKS_CONTOURS=eNt,rNt.FACE_LANDMARKS_TESSELATION=nNt;var iNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect",true),gbt(t=this.j=new Xgt,0,1,e=new zgt)}get baseOptions(){return bbt(this.j,zgt,1)}set baseOptions(t){gbt(this.j,0,1,t)}o(t){return super.l(t)}Ka(t,e,n){const s="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,Wxt(this,t,s??{}),!this.h)return this.s}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect"),igt(t,"stylized_image");const e=new Hwt;eyt(e,qgt,this.j);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),sgt(t,n),this.g.V("stylized_image",((t,e)=>{var n=!this.h,s=t.data,r=t.width;const i=r*(t=t.height);if(s instanceof Uint8Array)if(s.length===3*i){const e=new Uint8ClampedArray(4*i);for(let t=0;t<i;++t)e[4*t]=s[3*t],e[4*t+1]=s[3*t+1],e[4*t+2]=s[3*t+2],e[4*t+3]=255;s=new ImageData(e,r,t)}else{if(s.length!==4*i)throw Error("Unsupported channel count: "+s.length/i);s=new ImageData(new Uint8ClampedArray(s.buffer,s.byteOffset,s.length),r,t)}else if(!(s instanceof WebGLTexture))throw Error(`Unsupported format: ${s.constructor.name}`);r=new Oxt([s],false,false,this.g.i.canvas,this.P,r,t),this.s=n=n?r.clone():r,this.h&&this.h(n),txt(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};iNt.prototype.stylize=iNt.prototype.Ka,iNt.prototype.setOptions=iNt.prototype.o,iNt.createFromModelPath=function(t,e){return Pxt(iNt,t,{baseOptions:{modelAssetPath:e}})},iNt.createFromModelBuffer=function(t,e){return Pxt(iNt,t,{baseOptions:{modelAssetBuffer:e}})},iNt.createFromOptions=function(t,e){return Pxt(iNt,t,e)};var oNt=_xt([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function aNt(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function cNt(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function uNt(t,e=true){const n=[];for(const r of t){var s=hgt(r);t=[];for(const n of s.g())s=e&&null!=$bt(n,1)?$bt(n,1)??0:-1,t.push({score:Ibt(n,2)??0,index:s,categoryName:Sbt(n,3)??""??"",displayName:Sbt(n,4)??""??""});n.push(t)}return n}var lNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect",false),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],gbt(t=this.j=new rvt,0,1,e=new zgt),this.s=new svt,gbt(this.j,0,2,this.s),this.C=new nvt,gbt(this.s,0,3,this.C),this.v=new evt,gbt(this.s,0,2,this.v),this.h=new tvt,gbt(this.j,0,3,this.h),Tbt(this.v,2,.5),Tbt(this.s,4,.5),Tbt(this.C,2,.5)}get baseOptions(){return bbt(this.j,zgt,1)}set baseOptions(t){gbt(this.j,0,1,t)}o(t){if(Mbt(this.v,3,t.numHands??1),"minHandDetectionConfidence"in t&&Tbt(this.v,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Tbt(this.s,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Tbt(this.C,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new Jgt,n=e,s=Avt(t.cannedGesturesClassifierOptions,bbt(this.h,Jgt,3)?.h());gbt(n,0,2,s),gbt(this.h,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&bbt(this.h,Jgt,3)?.g();return t.customGesturesClassifierOptions?(gbt(n=e=new Jgt,0,2,s=Avt(t.customGesturesClassifierOptions,bbt(this.h,Jgt,4)?.h())),gbt(this.h,0,4,e)):void 0===t.customGesturesClassifierOptions&&bbt(this.h,Jgt,4)?.g(),this.l(t)}Fa(t,e){return aNt(this),Wxt(this,t,e),cNt(this)}Ga(t,e,n){return aNt(this),Gxt(this,t,n,e),cNt(this)}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect"),igt(t,"hand_gestures"),igt(t,"hand_landmarks"),igt(t,"world_hand_landmarks"),igt(t,"handedness");const e=new Hwt;eyt(e,uvt,this.j);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"HAND_GESTURES:hand_gestures"),Jwt(n,"LANDMARKS:hand_landmarks"),Jwt(n,"WORLD_LANDMARKS:world_hand_landmarks"),Jwt(n,"HANDEDNESS:handedness"),n.o(e),sgt(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=vgt(e);const n=[];for(const e of wbt(t,ggt,1))n.push({x:Ibt(e,1)??0,y:Ibt(e,2)??0,z:Ibt(e,3)??0,visibility:Ibt(e,4)??0});this.landmarks.push(n)}txt(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{txt(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=wgt(e);const n=[];for(const e of wbt(t,ygt,1))n.push({x:Ibt(e,1)??0,y:Ibt(e,2)??0,z:Ibt(e,3)??0,visibility:Ibt(e,4)??0});this.worldLandmarks.push(n)}txt(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{txt(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...uNt(t,false)),txt(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{txt(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...uNt(t)),txt(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};function fNt(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}lNt.prototype.recognizeForVideo=lNt.prototype.Ga,lNt.prototype.recognize=lNt.prototype.Fa,lNt.prototype.setOptions=lNt.prototype.o,lNt.createFromModelPath=function(t,e){return Pxt(lNt,t,{baseOptions:{modelAssetPath:e}})},lNt.createFromModelBuffer=function(t,e){return Pxt(lNt,t,{baseOptions:{modelAssetBuffer:e}})},lNt.createFromOptions=function(t,e){return Pxt(lNt,t,e)},lNt.HAND_CONNECTIONS=oNt;var hNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect",false),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],gbt(t=this.h=new svt,0,1,e=new zgt),this.s=new nvt,gbt(this.h,0,3,this.s),this.j=new evt,gbt(this.h,0,2,this.j),Mbt(this.j,3,1),Tbt(this.j,2,.5),Tbt(this.s,2,.5),Tbt(this.h,4,.5)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return"numHands"in t&&Mbt(this.j,3,t.numHands??1),"minHandDetectionConfidence"in t&&Tbt(this.j,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Tbt(this.h,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Tbt(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}D(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Wxt(this,t,e),fNt(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Gxt(this,t,n,e),fNt(this)}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect"),igt(t,"hand_landmarks"),igt(t,"world_hand_landmarks"),igt(t,"handedness");const e=new Hwt;eyt(e,lvt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"LANDMARKS:hand_landmarks"),Jwt(n,"WORLD_LANDMARKS:world_hand_landmarks"),Jwt(n,"HANDEDNESS:handedness"),n.o(e),sgt(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=vgt(e),this.landmarks.push(Ovt(t));txt(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{txt(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=wgt(e),this.worldLandmarks.push(Lvt(t));txt(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{txt(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,s=n.push;const r=[];for(const e of t){t=hgt(e);const n=[];for(const e of t.g())n.push({score:Ibt(e,2)??0,index:$bt(e,1)??0??-1,categoryName:Sbt(e,3)??""??"",displayName:Sbt(e,4)??""??""});r.push(n)}s.call(n,...r),txt(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};hNt.prototype.detectForVideo=hNt.prototype.F,hNt.prototype.detect=hNt.prototype.D,hNt.prototype.setOptions=hNt.prototype.o,hNt.createFromModelPath=function(t,e){return Pxt(hNt,t,{baseOptions:{modelAssetPath:e}})},hNt.createFromModelBuffer=function(t,e){return Pxt(hNt,t,{baseOptions:{modelAssetBuffer:e}})},hNt.createFromOptions=function(t,e){return Pxt(hNt,t,e)},hNt.HAND_CONNECTIONS=oNt;var dNt=_xt([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function pNt(t){t.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function mNt(t){try{if(!t.C)return t.h;t.C(t.h)}finally{sxt(t)}}function bNt(t,e){t=vgt(t),e.push(Ovt(t))}var yNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"input_frames_image",null,false),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=false,gbt(t=this.j=new pvt,0,1,e=new zgt),this.K=new nvt,gbt(this.j,0,2,this.K),this.Y=new fvt,gbt(this.j,0,3,this.Y),this.s=new Bgt,gbt(this.j,0,4,this.s),this.H=new Vgt,gbt(this.j,0,5,this.H),this.v=new hvt,gbt(this.j,0,6,this.v),this.L=new dvt,gbt(this.j,0,7,this.L),Tbt(this.s,2,.5),Tbt(this.s,3,.3),Tbt(this.H,2,.5),Tbt(this.v,2,.5),Tbt(this.v,3,.3),Tbt(this.L,2,.5),Tbt(this.K,2,.5)}get baseOptions(){return bbt(this.j,zgt,1)}set baseOptions(t){gbt(this.j,0,1,t)}o(t){return"minFaceDetectionConfidence"in t&&Tbt(this.s,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Tbt(this.s,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Tbt(this.H,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Tbt(this.v,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Tbt(this.v,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Tbt(this.L,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Tbt(this.K,2,t.minHandLandmarksConfidence??.5),this.l(t)}D(t,e,n){const s="function"!=typeof e?e:{};return this.C="function"==typeof e?e:n,pNt(this),Wxt(this,t,s),mNt(this)}F(t,e,n,s){const r="function"!=typeof n?n:{};return this.C="function"==typeof n?n:s,pNt(this),Gxt(this,t,r,e),mNt(this)}m(){var t=new ogt;rgt(t,"input_frames_image"),igt(t,"pose_landmarks"),igt(t,"pose_world_landmarks"),igt(t,"face_landmarks"),igt(t,"left_hand_landmarks"),igt(t,"left_hand_world_landmarks"),igt(t,"right_hand_landmarks"),igt(t,"right_hand_world_landmarks");const e=new Hwt,n=new Owt;cbt(n,1,vmt("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),""),function(t,e){if(null!=e)if(Array.isArray(e))Jmt(t,2,Bmt(e,Gmt,void 0,void 0,false));else{if(!("string"==typeof e||e instanceof Ydt||Wdt(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");cbt(t,2,vpt(e,false),Udt())}}(n,this.j.g());const s=new Kwt;Xwt(s,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Cbt(s,8,Owt,n),qwt(s,"IMAGE:input_frames_image"),Jwt(s,"POSE_LANDMARKS:pose_landmarks"),Jwt(s,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Jwt(s,"FACE_LANDMARKS:face_landmarks"),Jwt(s,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Jwt(s,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Jwt(s,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Jwt(s,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),s.o(e),sgt(t,s),ext(this,t),this.g.attachProtoListener("pose_landmarks",((t,e)=>{bNt(t,this.h.poseLandmarks),txt(this,e)})),this.g.attachEmptyPacketListener("pose_landmarks",(t=>{txt(this,t)})),this.g.attachProtoListener("pose_world_landmarks",((t,e)=>{var n=this.h.poseWorldLandmarks;t=wgt(t),n.push(Lvt(t)),txt(this,e)})),this.g.attachEmptyPacketListener("pose_world_landmarks",(t=>{txt(this,t)})),this.outputPoseSegmentationMasks&&(Jwt(s,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),nxt(this,"pose_segmentation_mask"),this.g.V("pose_segmentation_mask",((t,e)=>{this.h.poseSegmentationMasks=[Uxt(this,t,true,!this.C)],txt(this,e)})),this.g.attachEmptyPacketListener("pose_segmentation_mask",(t=>{this.h.poseSegmentationMasks=[],txt(this,t)}))),this.g.attachProtoListener("face_landmarks",((t,e)=>{bNt(t,this.h.faceLandmarks),txt(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{txt(this,t)})),this.outputFaceBlendshapes&&(igt(t,"extra_blendshapes"),Jwt(s,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",((t,e)=>{var n=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(t=hgt(t),n.push(Dvt(t.g()??[]))),txt(this,e)})),this.g.attachEmptyPacketListener("extra_blendshapes",(t=>{txt(this,t)}))),this.g.attachProtoListener("left_hand_landmarks",((t,e)=>{bNt(t,this.h.leftHandLandmarks),txt(this,e)})),this.g.attachEmptyPacketListener("left_hand_landmarks",(t=>{txt(this,t)})),this.g.attachProtoListener("left_hand_world_landmarks",((t,e)=>{var n=this.h.leftHandWorldLandmarks;t=wgt(t),n.push(Lvt(t)),txt(this,e)})),this.g.attachEmptyPacketListener("left_hand_world_landmarks",(t=>{txt(this,t)})),this.g.attachProtoListener("right_hand_landmarks",((t,e)=>{bNt(t,this.h.rightHandLandmarks),txt(this,e)})),this.g.attachEmptyPacketListener("right_hand_landmarks",(t=>{txt(this,t)})),this.g.attachProtoListener("right_hand_world_landmarks",((t,e)=>{var n=this.h.rightHandWorldLandmarks;t=wgt(t),n.push(Lvt(t)),txt(this,e)})),this.g.attachEmptyPacketListener("right_hand_world_landmarks",(t=>{txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};yNt.prototype.detectForVideo=yNt.prototype.F,yNt.prototype.detect=yNt.prototype.D,yNt.prototype.setOptions=yNt.prototype.o,yNt.createFromModelPath=function(t,e){return Pxt(yNt,t,{baseOptions:{modelAssetPath:e}})},yNt.createFromModelBuffer=function(t,e){return Pxt(yNt,t,{baseOptions:{modelAssetBuffer:e}})},yNt.createFromOptions=function(t,e){return Pxt(yNt,t,e)},yNt.HAND_CONNECTIONS=oNt,yNt.POSE_CONNECTIONS=dNt,yNt.FACE_LANDMARKS_LIPS=Hxt,yNt.FACE_LANDMARKS_LEFT_EYE=Zxt,yNt.FACE_LANDMARKS_LEFT_EYEBROW=Qxt,yNt.FACE_LANDMARKS_LEFT_IRIS=Xxt,yNt.FACE_LANDMARKS_RIGHT_EYE=qxt,yNt.FACE_LANDMARKS_RIGHT_EYEBROW=Jxt,yNt.FACE_LANDMARKS_RIGHT_IRIS=Kxt,yNt.FACE_LANDMARKS_FACE_OVAL=tNt,yNt.FACE_LANDMARKS_CONTOURS=eNt,yNt.FACE_LANDMARKS_TESSELATION=nNt;var wNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"input_image","norm_rect",true),this.j={classifications:[]},gbt(t=this.h=new yvt,0,1,e=new zgt)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return gbt(this.h,0,2,Avt(t,bbt(this.h,Agt,2))),this.l(t)}qa(t,e){return this.j={classifications:[]},Wxt(this,t,e),this.j}ra(t,e,n){return this.j={classifications:[]},Gxt(this,t,n,e),this.j}m(){var t=new ogt;rgt(t,"input_image"),rgt(t,"norm_rect"),igt(t,"classifications");const e=new Hwt;eyt(e,wvt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),qwt(n,"IMAGE:input_image"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"CLASSIFICATIONS:classifications"),n.o(e),sgt(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:wbt(t,Cgt,1).map((t=>Dvt(bbt(t,lgt,4)?.g()??[],$bt(t,2)??0,Sbt(t,3)??"")))};return null!=ymt(Xmt(t,2))&&(e.timestampMs=ymt(Xmt(t,2))??0),e}($gt(t)),txt(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};wNt.prototype.classifyForVideo=wNt.prototype.ra,wNt.prototype.classify=wNt.prototype.qa,wNt.prototype.setOptions=wNt.prototype.o,wNt.createFromModelPath=function(t,e){return Pxt(wNt,t,{baseOptions:{modelAssetPath:e}})},wNt.createFromModelBuffer=function(t,e){return Pxt(wNt,t,{baseOptions:{modelAssetBuffer:e}})},wNt.createFromOptions=function(t,e){return Pxt(wNt,t,e)};var gNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect",true),this.h=new gvt,this.embeddings={embeddings:[]},gbt(t=this.h,0,1,e=new zgt)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){var e=this.h,n=bbt(this.h,Rgt,2);return n=n?n.clone():new Rgt,void 0!==t.l2Normalize?Ebt(n,1,t.l2Normalize):"l2Normalize"in t&&Jmt(n,1),void 0!==t.quantize?Ebt(n,2,t.quantize):"quantize"in t&&Jmt(n,2),gbt(e,0,2,n),this.l(t)}xa(t,e){return Wxt(this,t,e),this.embeddings}ya(t,e,n){return Gxt(this,t,n,e),this.embeddings}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect"),igt(t,"embeddings_out");const e=new Hwt;eyt(e,vvt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"EMBEDDINGS:embeddings_out"),n.o(e),sgt(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Tgt(t),this.embeddings=function(t){return{embeddings:wbt(t,Egt,1).map((t=>{const e={headIndex:$bt(t,3)??0??-1,headName:Sbt(t,4)??""??""};if(void 0!==mbt(t,Sgt,lbt(t,1)))t=sbt(t=bbt(t,Sgt,lbt(t,1)),1,rmt,nbt()),e.floatEmbedding=t.slice();else{const n=new Uint8Array(0);e.quantizedEmbedding=bbt(t,Igt,lbt(t,2))?.ma()?.h()??n}return e})),timestampMs:ymt(Xmt(t,2))??0}}(t),txt(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};gNt.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=Fvt(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=Fvt(_vt(t.quantizedEmbedding),_vt(e.quantizedEmbedding))}return t},gNt.prototype.embedForVideo=gNt.prototype.ya,gNt.prototype.embed=gNt.prototype.xa,gNt.prototype.setOptions=gNt.prototype.o,gNt.createFromModelPath=function(t,e){return Pxt(gNt,t,{baseOptions:{modelAssetPath:e}})},gNt.createFromModelBuffer=function(t,e){return Pxt(gNt,t,{baseOptions:{modelAssetBuffer:e}})},gNt.createFromOptions=function(t,e){return Pxt(gNt,t,e)};var vNt=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function xNt(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function NNt(t){try{const e=new vNt(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{sxt(t)}}vNt.prototype.close=vNt.prototype.close;var kNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect",false),this.s=[],this.outputCategoryMask=false,this.outputConfidenceMasks=true,this.h=new $vt,this.v=new xvt,gbt(this.h,0,3,this.v),gbt(t=this.h,0,1,e=new zgt)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Jmt(this.h,2,vmt(t.displayNamesLocale)):"displayNamesLocale"in t&&Jmt(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??false),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??true),super.l(t)}J(){!function(t){const e=wbt(t.ca(),Kwt,1).filter((t=>(Sbt(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.s=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(bbt(e[0],Hwt,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=Sbt(e,1)??""}))}(this)}segment(t,e,n){const s="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,xNt(this),Wxt(this,t,s),NNt(this)}Ia(t,e,n,s){const r="function"!=typeof n?n:{};return this.j="function"==typeof n?n:s,xNt(this),Gxt(this,t,r,e),NNt(this)}Ba(){return this.s}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect");const e=new Hwt;eyt(e,Svt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect"),n.o(e),sgt(t,n),ext(this,t),this.outputConfidenceMasks&&(igt(t,"confidence_masks"),Jwt(n,"CONFIDENCE_MASKS:confidence_masks"),nxt(this,"confidence_masks"),this.g.ba("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Uxt(this,t,true,!this.j))),txt(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],txt(this,t)}))),this.outputCategoryMask&&(igt(t,"category_mask"),Jwt(n,"CATEGORY_MASK:category_mask"),nxt(this,"category_mask"),this.g.V("category_mask",((t,e)=>{this.categoryMask=Uxt(this,t,false,!this.j),txt(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,txt(this,t)}))),igt(t,"quality_scores"),Jwt(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,txt(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};kNt.prototype.getLabels=kNt.prototype.Ba,kNt.prototype.segmentForVideo=kNt.prototype.Ia,kNt.prototype.segment=kNt.prototype.segment,kNt.prototype.setOptions=kNt.prototype.o,kNt.createFromModelPath=function(t,e){return Pxt(kNt,t,{baseOptions:{modelAssetPath:e}})},kNt.createFromModelBuffer=function(t,e){return Pxt(kNt,t,{baseOptions:{modelAssetBuffer:e}})},kNt.createFromOptions=function(t,e){return Pxt(kNt,t,e)};var CNt=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};CNt.prototype.close=CNt.prototype.close;var $Nt=class extends nyt{constructor(t){super(t)}},SNt=[0,bwt,-2],INt=[0,uwt,-3,gwt,uwt,-1],ENt=[0,INt],MNt=[0,INt,bwt,-1],TNt=class extends nyt{constructor(t){super(t)}},ANt=[0,uwt,-1,gwt],DNt=class extends nyt{constructor(t){super(t)}},RNt=class extends nyt{constructor(t){super(t)}},ONt=[1,2,3,4,5,6,7,8,9,10,14,15],LNt=class extends nyt{constructor(t){super(t)}};LNt.prototype.g=Rwt([0,Cwt,[0,ONt,$wt,INt,$wt,[0,INt,SNt],$wt,ENt,$wt,[0,ENt,SNt],$wt,ANt,$wt,[0,uwt,-3,gwt,Mwt],$wt,[0,uwt,-3,gwt],$wt,[0,kwt,uwt,-2,gwt,bwt,gwt,-1,2,uwt,SNt],$wt,MNt,$wt,[0,MNt,SNt],uwt,SNt,kwt,$wt,[0,uwt,-3,gwt,SNt,-1],$wt,[0,Cwt,ANt]],kwt,[0,kwt,bwt,-1,gwt]]);var _Nt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect_in",false),this.outputCategoryMask=false,this.outputConfidenceMasks=true,this.h=new $vt,this.s=new xvt,gbt(this.h,0,3,this.s),gbt(t=this.h,0,1,e=new zgt)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??false),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??true),super.l(t)}segment(t,e,n,s){const r="function"!=typeof n?n:{};this.j="function"==typeof n?n:s,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.B+1,s=new LNt;const i=new RNt;var o=new $Nt;if(Mbt(o,1,255),gbt(i,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new TNt;Ebt(a,3,true),Tbt(a,1,e.keypoint.x),Tbt(a,2,e.keypoint.y),vbt(i,5,ONt,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new DNt,e.scribble))Ebt(e=new TNt,3,true),Tbt(e,1,a.x),Tbt(e,2,a.y),Cbt(o,1,TNt,e);vbt(i,15,ONt,o)}Cbt(s,1,RNt,i),this.g.addProtoToStream(s.g(),"drishti.RenderData","roi_in",n),Wxt(this,t,r);t:{try{const t=new CNt(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=t;break t}this.j(t)}finally{sxt(this)}c=void 0}return c}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"roi_in"),rgt(t,"norm_rect_in");const e=new Hwt;eyt(e,Svt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"ROI:roi_in"),qwt(n,"NORM_RECT:norm_rect_in"),n.o(e),sgt(t,n),ext(this,t),this.outputConfidenceMasks&&(igt(t,"confidence_masks"),Jwt(n,"CONFIDENCE_MASKS:confidence_masks"),nxt(this,"confidence_masks"),this.g.ba("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>Uxt(this,t,true,!this.j))),txt(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],txt(this,t)}))),this.outputCategoryMask&&(igt(t,"category_mask"),Jwt(n,"CATEGORY_MASK:category_mask"),nxt(this,"category_mask"),this.g.V("category_mask",((t,e)=>{this.categoryMask=Uxt(this,t,false,!this.j),txt(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,txt(this,t)}))),igt(t,"quality_scores"),Jwt(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,txt(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};_Nt.prototype.segment=_Nt.prototype.segment,_Nt.prototype.setOptions=_Nt.prototype.o,_Nt.createFromModelPath=function(t,e){return Pxt(_Nt,t,{baseOptions:{modelAssetPath:e}})},_Nt.createFromModelBuffer=function(t,e){return Pxt(_Nt,t,{baseOptions:{modelAssetBuffer:e}})},_Nt.createFromOptions=function(t,e){return Pxt(_Nt,t,e)};var FNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"input_frame_gpu","norm_rect",false),this.j={detections:[]},gbt(t=this.h=new Ivt,0,1,e=new zgt)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Jmt(this.h,2,vmt(t.displayNamesLocale)):"displayNamesLocale"in t&&Jmt(this.h,2),void 0!==t.maxResults?Mbt(this.h,3,t.maxResults):"maxResults"in t&&Jmt(this.h,3),void 0!==t.scoreThreshold?Tbt(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Jmt(this.h,4),void 0!==t.categoryAllowlist?Abt(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Jmt(this.h,5),void 0!==t.categoryDenylist?Abt(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Jmt(this.h,6),this.l(t)}D(t,e){return this.j={detections:[]},Wxt(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},Gxt(this,t,n,e),this.j}m(){var t=new ogt;rgt(t,"input_frame_gpu"),rgt(t,"norm_rect"),igt(t,"detections");const e=new Hwt;eyt(e,Evt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),qwt(n,"IMAGE:input_frame_gpu"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"DETECTIONS:detections"),n.o(e),sgt(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=bgt(e),this.j.detections.push(Rvt(t));txt(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{txt(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),true)}};FNt.prototype.detectForVideo=FNt.prototype.F,FNt.prototype.detect=FNt.prototype.D,FNt.prototype.setOptions=FNt.prototype.o,FNt.createFromModelPath=async function(t,e){return Pxt(FNt,t,{baseOptions:{modelAssetPath:e}})},FNt.createFromModelBuffer=function(t,e){return Pxt(FNt,t,{baseOptions:{modelAssetBuffer:e}})},FNt.createFromOptions=function(t,e){return Pxt(FNt,t,e)};var zNt=class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=n}close(){this.segmentationMasks?.forEach((t=>{t.close()}))}};function jNt(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function PNt(t){try{const e=new zNt(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.s)return e;t.s(e)}finally{sxt(t)}}zNt.prototype.close=zNt.prototype.close;var BNt=class extends Vxt{constructor(t,e){super(new jxt(t,e),"image_in","norm_rect",false),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=false,gbt(t=this.h=new Mvt,0,1,e=new zgt),this.v=new dvt,gbt(this.h,0,3,this.v),this.j=new hvt,gbt(this.h,0,2,this.j),Mbt(this.j,4,1),Tbt(this.j,2,.5),Tbt(this.v,2,.5),Tbt(this.h,4,.5)}get baseOptions(){return bbt(this.h,zgt,1)}set baseOptions(t){gbt(this.h,0,1,t)}o(t){return"numPoses"in t&&Mbt(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Tbt(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Tbt(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Tbt(this.v,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??false),this.l(t)}D(t,e,n){const s="function"!=typeof e?e:{};return this.s="function"==typeof e?e:n,jNt(this),Wxt(this,t,s),PNt(this)}F(t,e,n,s){const r="function"!=typeof n?n:{};return this.s="function"==typeof n?n:s,jNt(this),Gxt(this,t,r,e),PNt(this)}m(){var t=new ogt;rgt(t,"image_in"),rgt(t,"norm_rect"),igt(t,"normalized_landmarks"),igt(t,"world_landmarks"),igt(t,"segmentation_masks");const e=new Hwt;eyt(e,Tvt,this.h);const n=new Kwt;Xwt(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),qwt(n,"IMAGE:image_in"),qwt(n,"NORM_RECT:norm_rect"),Jwt(n,"NORM_LANDMARKS:normalized_landmarks"),Jwt(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),sgt(t,n),ext(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=vgt(e),this.landmarks.push(Ovt(t));txt(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],txt(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=wgt(e),this.worldLandmarks.push(Lvt(t));txt(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],txt(this,t)})),this.outputSegmentationMasks&&(Jwt(n,"SEGMENTATION_MASK:segmentation_masks"),nxt(this,"segmentation_masks"),this.g.ba("segmentation_masks",((t,e)=>{this.segmentationMasks=t.map((t=>Uxt(this,t,true,!this.s))),txt(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.segmentationMasks=[],txt(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),true)}};BNt.prototype.detectForVideo=BNt.prototype.F,BNt.prototype.detect=BNt.prototype.D,BNt.prototype.setOptions=BNt.prototype.o,BNt.createFromModelPath=function(t,e){return Pxt(BNt,t,{baseOptions:{modelAssetPath:e}})},BNt.createFromModelBuffer=function(t,e){return Pxt(BNt,t,{baseOptions:{modelAssetBuffer:e}})},BNt.createFromOptions=function(t,e){return Pxt(BNt,t,e)},BNt.POSE_CONNECTIONS=dNt;const WNt=".camera{color:white;display:flex;align-items:center;justify-content:center;position:relative}.cameraCanvas,.cameraCanvasSelfie,.cameraCanvasSelfieDesk{z-index:5;max-width:100%;max-height:100%;border-radius:10px}.cameraVideo,.cameraVideoSelfie,.cameraVideoSelfieDesk{z-index:2;max-width:100%;max-height:100%;border-radius:10px;transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}img{max-width:100%;margin-top:20px;border:1px solid #ddd}.video-overlay-canvas{position:absolute;top:0;left:0;width:100%;height:100%;z-index:7;pointer-events:none}";var GNt;(function(t){t["JPEG"]="image/jpeg";t["PNG"]="image/png"})(GNt||(GNt={}));const UNt=class{constructor(n){t(this,n);this.eventSelfieRecordingReady=e(this,"recordingSelfieCapture");this.eventPhotoCapture=e(this,"photoSelfieCapture");this.apiErrorEvent=e(this,"apiError");this.eventTimeElapsed=e(this,"timeElapsed");this.mediaStream=null;this.mediaRecorder=null;this.isRecording=false;this.recordedChunks=[];this.capturedImage=null;this.faceDetector=null;this.hasFace=false;this.isDetecting=false;this.elapsedTime=0;this.canvasCtx=null;this.overlayContext=null;this.modelPath="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm";this.minDetectionConfidence=.5;this.animationFrameId=null;this.timerInterval=null;this.WARNING_THRESHOLD_SECONDS=30;this.startDetection=()=>{if(this.faceDetector&&this.videoElement&&!this.isDetecting){this.isDetecting=true;this.detectFacesInRealTime()}};this.detectFacesInRealTime=async()=>{if(!this.isDetecting||!this.faceDetector||!this.videoElement||this.videoElement.paused||this.videoElement.ended){return}try{this.canvasElement.width=this.videoElement.videoWidth;this.canvasElement.height=this.videoElement.videoHeight;this.overlayCanvasElement.width=this.videoElement.videoWidth;this.overlayCanvasElement.height=this.videoElement.videoHeight;let t=performance.now();const e=this.faceDetector.detectForVideo(this.videoElement,t);this.drawResults(e.detections);if(e.detections&&e.detections.length>0){await I(1e3);this.isDetecting=false;this.hasFace=true;await this.captureImage();this.stopRecording();if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}}else{this.hasFace=false}}catch(t){console.error("Error during face detection:",t)}if(this.isDetecting){this.animationFrameId=requestAnimationFrame(this.detectFacesInRealTime)}};this.startRecording=()=>{if(!this.mediaStream||!this.videoElement||!o.videoRecording){return}this.recordedChunks=[];var t={mimeType:m.webmMimeType.mime};if(!MediaRecorder.isTypeSupported(t.mimeType)){if(o.device.mobileOS==w.iOS||o.device.browser==x.Safari)t.mimeType=m.mp4MimeType.mime}this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:"video/webm"});this.mediaRecorder.ondataavailable=({data:t})=>{if(t.size>0){this.recordedChunks=[...this.recordedChunks,t]}};this.mediaRecorder.onstop=()=>{if(this.recordedChunks.length>0){var e=new Blob(this.recordedChunks,{type:t.mimeType.split(";")[0]});this.eventSelfieRecordingReady.emit(e)}};this.mediaRecorder.start();this.isRecording=true;console.log("Recording started...")};this.stopRecording=()=>{if(this.mediaRecorder&&this.mediaRecorder.state==="recording"){this.mediaRecorder.stop();this.isRecording=false;console.log("Recording stopped.")}};this.captureImage=async()=>new Promise((t=>{if(this.hasFace&&this.canvasElement){const e=this.videoElement;const n=this.canvasElement;n.width=e.videoWidth;n.height=e.videoHeight;this.canvasCtx.drawImage(e,0,0,n.width,n.height);n.toBlob((e=>{if(e&&e.type===GNt.JPEG&&!o.device.isAppleDevice){try{if(o.debug)console.log("stream | getFrame | addExifInImg");N(e,this.mediaStream.getTracks()[0],{width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}).then((e=>{this.eventPhotoCapture.emit(e);t(true)}))}catch(e){this.eventTimeElapsed.emit();t(false)}}else{if(o.debug)console.log("stream | getFrame | resolve");this.eventPhotoCapture.emit(e);t(true)}}),GNt.PNG,1);console.log("Image captured!")}else{console.log("No face detected or canvas not ready. Cannot capture image.")}}))}infoTimeElapsed(){this.titleMesage=this.translations.SelfieCaptureValues.TitleMore;this.titleStyle+=" pulsate"}async componentWillLoad(){this.translations=await b.getValues();if(!navigator.mediaDevices){this.apiErrorEvent.emit({message:"This browser does not support webRTC"})}this.titleStyle="text-center px-1 mb-2";await this.setupMediaPipe()}async componentDidLoad(){if(o.flowStatus==a.LIVENESS){this.titleMesage=this.translations.SelfieCaptureValues.Title}if(this.canvasElement){this.canvasCtx=this.canvasElement.getContext("2d",{willReadFrequently:true})}if(this.overlayCanvasElement){this.overlayContext=this.overlayCanvasElement.getContext("2d",{willReadFrequently:true})}if(!this.videoElement||!this.canvasElement||!this.canvasCtx){console.error("Canvas or video element not found.");return}await this.startWebcam();this.timerInterval=setInterval((()=>{this.elapsedTime++;console.log(`Time open: ${this.elapsedTime} seconds`);if(this.elapsedTime>=this.WARNING_THRESHOLD_SECONDS){if(this.timerInterval!==null){clearInterval(this.timerInterval);this.timerInterval=null;console.warn(`Warning: Component has been open for ${this.WARNING_THRESHOLD_SECONDS} seconds!`)}this.eventTimeElapsed.emit()}}),1e3)}async startWebcam(){try{const t=m.GetConstraints("",o.device,true);if(o.device.isAppleDevice){navigator.audioSession.type="play-and-record"}this.mediaStream=await navigator.mediaDevices.getUserMedia(t);if(this.videoElement){this.videoElement.srcObject=this.mediaStream;this.videoElement.play();this.startRecording();this.videoElement.addEventListener("loadeddata",(()=>{this.startDetection()}))}}catch(t){console.error("Error accessing webcam:",t);alert("Could not access webcam. Please ensure you have a camera and grant permissions.")}}async setupMediaPipe(){try{const t=await Wvt.forVisionTasks(this.modelPath);this.faceDetector=await Yxt.createFromOptions(t,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite"},runningMode:"VIDEO",minDetectionConfidence:this.minDetectionConfidence});console.log("MediaPipe Face Detector loaded.")}catch(t){console.error("Error loading MediaPipe Face Detector:",t)}}disconnectedCallback(){if(this.mediaRecorder){this.mediaRecorder.stop();this.mediaRecorder=null}if(this.mediaStream){this.mediaStream.getTracks().forEach((t=>t.stop()));this.mediaStream=null}if(this.videoElement){this.videoElement.srcObject=null}if(this.animationFrameId!==null){cancelAnimationFrame(this.animationFrameId);this.animationFrameId=null}if(this.canvasCtx){this.canvasCtx.clearRect(0,0,this.canvasElement.width,this.canvasElement.height)}if(this.overlayContext){this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height)}if(this.timerInterval!==null){clearInterval(this.timerInterval);this.timerInterval=null}}drawResults(t){this.overlayContext.save();this.overlayContext.clearRect(0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height);this.overlayContext.drawImage(this.videoElement,0,0,this.overlayCanvasElement.width,this.overlayCanvasElement.height);for(const e of t){const t=e.boundingBox;this.overlayContext.strokeStyle="red";this.overlayContext.lineWidth=2;this.overlayContext.strokeRect(t.originX,t.originY,t.width,t.height);if(e.keypoints){for(const t of e.keypoints){this.overlayContext.beginPath();this.overlayContext.arc(t.x,t.y,5,0,2*Math.PI);this.overlayContext.fillStyle="blue";this.overlayContext.fill()}}}this.overlayContext.restore()}render(){return n("div",{key:"2c6c4418a37d7d328fd9810c0eedbd412de2624c",class:"container flex center"},n("div",{key:"b4c68fdce64c22edd9299102443f21febadb427c",class:"px-2 w-100"},n("h1",{key:"9ab57f33e87033dee63999a02538a517539d581c",class:this.titleStyle,innerHTML:this.titleMesage}),n("div",{key:"ff119892dc0247f9ed9ad1d70b2a8d7dd1828dc0",class:"bg-black w-100 h-100 rounded"},n("div",{key:"5e393b537e6d13c968f0da789e0341a00438da51",class:"camera rounded"},n("video",{key:"7b04387c65bd3a95e66b4add5d74e516e5588438",id:"video",loop:true,autoplay:true,playsinline:true,muted:true,class:"cameraVideoSelfie",ref:t=>this.videoElement=t}),n("canvas",{key:"b1cea6f8f726f2c1dbab5f751bfcfd54962e80d1",id:"output",ref:t=>this.canvasElement=t,style:{display:"none"}}),n("canvas",{key:"27f4e5886b19051443bbf38aac9a7b74a2a32523",id:"overlayCanvasElement",ref:t=>this.overlayCanvasElement=t,class:"video-overlay-canvas"}))),n("div",{key:"9347d0660e002a66ae46659bbcaf270f309694fc",class:"footer text-center"},n("img",{key:"512630e3276d17b95148f124acb04e87e4b7d526",src:y}))))}get component(){return s(this)}};UNt.style=WNt;const VNt="";const YNt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.canSend=false;this.sending=false;this.hasError=false}async doAction(){if(this.sending)return;this.sending=true;this.canSend=false;try{var t=await i.instance.CheckOTPCode(o.requestId,this.code);o.flowStatus=a[t.state];if(o.flowStatus==a.CODEERROR)this.hasError=true;this.sending=false;this.code=""}catch(t){this.apiErrorEvent.emit(t)}}async disconnectedCallback(){await d.finalize(r.OtpCheck)}async componentWillLoad(){if(o.flowStatus==a.CODEERROR)this.hasError=true}async componentWillRender(){this.translations=await b.getValues();this.title=this.translations.CodeValidationValues.Title;this.details=this.translations.CodeValidationValues.Description;this.buttonText=this.translations.CodeValidationValues.Button}async componentDidLoad(){await d.initialize(r.OtpCheck)}handleChangeCode(t){let e=t.target?t.target.value:"";this.code=e;if(this.code.length>4)this.code=this.code.substring(0,4);this.canSend=this.code.length==4;t.target.value=this.code;this.hasError=false}render(){return n("div",{key:"204e0658cadf87fa271bdb13e73740ffe878e0e0",class:"container flex center"},n("div",{key:"aef2ba7978e94c52bb5eed8ed5439f73d31f619b",class:"px-1 w-100"},this.hasError?n("div",null,n("div",{class:"mb-1 ml-1 text-center"},n("img",{src:J,style:{width:"60px"}})),n("h1",{class:"text-center color-red px-1 mb-2"},this.translations.CodeValidationValues.Error)):n("div",null,n("div",{class:"mb-1 ml-1 text-center"},n("img",{src:V9,style:{width:"60px"}})),n("h1",{class:"text-center px-1 mb-2"},this.title)),n("p",{key:"1667989668fa094a4920ac9b6e554adae1cfaa5c",class:"text-center mb-05"},this.details),n("div",{key:"d199e27674d10e0c3bba50aff2ca1b7b66277cb3",class:"mb-2"},n("input",{key:"5d7adcdffc3f1a5d77ec3d0cbbd6c47233663bae",placeholder:"XXXX",type:"tel",id:"codeInput",class:"main-input",onInput:t=>this.handleChangeCode(t),value:this.code})),n("div",{key:"5d552ff1b99d0801073a0e1f08059bebdd9941a5",class:"button flex mb-1 mx-3"},this.sending?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"4f8f7425ef0edcc842efa8e7d6f160b4df963160",id:"action",disabled:!this.canSend,class:"main-button",onClick:()=>this.doAction()},this.buttonText)),n("div",{key:"48746642056bcaca1b95270bf7a1f3f296b8ab5a",class:"footer text-center"},n("img",{key:"68c5e0d907b066e326ca139d865e6ecdc0992c02",src:y}))))}};YNt.style=VNt;const HNt="";const ZNt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.prefilledPhone=false;this.canSend=false;this.sending=false}async doAction(){if(this.sending)return;this.sending=true;try{this.canSend=false;var t=await i.instance.SendOTPCode(o.requestId,this.phoneNumber);if(t.sent===true){await this.setPhoneNumber();o.flowStatus=a[t.state]}}catch(t){this.apiErrorEvent.emit(t)}}async setPhoneNumber(){var t=await c.ectdata.get(o.requestId);t.phoneNumber=this.phoneNumber;await c.ectdata.put(t)}async disconnectedCallback(){await d.finalize(r.OtpSend)}async componentWillRender(){this.translations=await b.getValues();this.buttonText=this.translations.PhoneValidationValues.Button;this.title=this.translations.PhoneValidationValues.Title;this.details=this.translations.PhoneValidationValues.Description;if(o.phoneNumber&&o.phoneNumber!=""){this.phoneNumber=o.phoneNumber;this.prefilledPhone=true;this.canSend=true}}async componentDidLoad(){await d.initialize(r.OtpSend)}handleChangePhone(t){let e=t.target?t.target.value:"";this.phoneNumber=e.replace(/\D/g,"");if(this.phoneNumber.length>10)this.phoneNumber=this.phoneNumber.substring(0,10);this.canSend=this.phoneNumber.length==10;t.target.value=this.phoneNumber}render(){return n("div",{key:"ed18a87568d1459e4cbb5deaa70f271e6f900e94",class:"container flex center"},n("div",{key:"630dc399688386336270cc0b0f3ea2cbbbcdbee1",class:"px-1"},n("div",{key:"bac0077823be572077d5e07a316c755cb0a0a500",class:"mb-1 ml-1 text-center"},n("img",{key:"d54ddf68948dc0cb10260787111e28042e894bab",src:V9,style:{width:"60px"}})),n("h1",{key:"4b6392b714ab55ab903499f8bb8cf081deab7f40",class:"text-center px-1 mb-2"},this.title),n("p",{key:"1117f954708ceaadbfe06eca4876710fa01e93c3",class:"text-center mb-05"},this.details),n("div",{key:"4c09dc0be6074f4b0c18126f270be60d912e17d9",class:"mb-2"},n("input",{key:"6fb0d7c52e4940d28b25257c7dfa98a79629c2af",placeholder:this.translations.PhoneValidationValues.Label,type:"tel",id:"phoneInput",class:"main-input",disabled:this.prefilledPhone,onInput:t=>this.handleChangePhone(t),value:this.phoneNumber})),n("div",{key:"3e2c724875bbd6e023744ac7f551f1cbde54fdfb",class:"button flex mb-1 mx-3"},this.sending?n("div",{class:"img-loader rounded img-loader-button"},n("img",{class:"loading-image loading-image-button",src:z})):null,n("button",{key:"a7130c2a02e9ded826e809f2943b274fcdc74110",id:"action",disabled:!this.canSend,class:"main-button",onClick:()=>this.doAction()},this.buttonText)),n("div",{key:"e49db8c33dd2ee7e373b084be46869ded390e783",class:"footer text-center"},n("img",{key:"6d00b0821bfbe89210fb298b3763c189842e3e60",src:y}))))}};ZNt.style=HNt;const QNt="";const XNt=class{constructor(e){t(this,e)}async componentWillLoad(){o.flowStatus=await i.instance.GetNextFlowState()}render(){return n("div",{key:"f612fe145d8603cca451c95f2aecd9f1d0c10810",class:"container"},n("div",{key:"6309825d1220a3371afe183272f66ac9de611e19",class:"row"},n("div",{key:"863c57478a52b997e3d452e59cc87ffb836bd692",class:"div-ci align-center"},n("img",{key:"3292db41dcce2df80af948b198efeb69406cfa00",src:z}))))}};XNt.style=QNt;const qNt=class{constructor(e){t(this,e)}async componentWillLoad(){this.translations=await b.getValues()}render(){return n("div",{key:"ef7d55821d437003ac8ae48b45490c90a0d2be1e",class:"container flex center"},n("div",{key:"ede7302839a9af8f90c16e273879b9c7df62fc41",class:"px-2 w-100"},n("h1",{key:"646e401f22c097f45706d381cd348ab610da62f9",class:"text-center px-1 mb-2",innerHTML:this.type=="id"?this.translations.IdCaptureValues.Loading:this.translations.SelfieCaptureValues.Loading}),n("img",{key:"dae17f75135aa4afed905de6be14148aa587dc33",class:"w-100",src:"https://ekyc.blob.core.windows.net/$web/"+(this.type=="id"?"uploading_id.gif":"uploading_selfie.gif")}),n("div",{key:"0fcf729d0ef6e1e6ee04846415389f4ce30a6aac",class:"footer text-center"},n("img",{key:"ecffb115b8d9dd3ec6886715516909e878aeca67",src:y}))))}};const JNt="";const KNt=class{constructor(n){t(this,n);this.apiErrorEvent=e(this,"apiError");this.uploadingPhoto=false;this.uploadingRecording=false;this.recordingResultCount=0;this.recordingRetryCount=0;this.appInsights=C.getInstance()}async componentDidLoad(){}componentWillLoad(){this.appInsights.trackEvent("UserLiveness | init",{requestId:o.requestId});if(this.mode=="selfie"){this.currentStep=r.Selfie;this.flow={fileName:"selfie.png",recName:"selfieVideo.",photoType:sdt.Selfie,recType:sdt.SelfieVideo,imageSize:0,videoSize:0}}else if(this.mode=="selfieGesture"){this.currentStep=r.SelfieTilt;this.flow={fileName:"",recName:"selfieTiltVideo.",photoType:sdt.None,recType:sdt.SelfieGestureVideo,imageSize:0,videoSize:0}}}timeElapsed(){this.errorReason="Timeout";this.showTimeout=true}captureErrorDone(){if(this.showTimeout==true){this.showTimeout=false}if(this.showError==true){this.showError=false}}async captureSelfieImage(t){if(o.flowStatus==a.LIVENESSGESTURE)return;let e=t.detail;if(e.size==0){await i.instance.AddLog({message:"Empty selfie",blobData:e},await E());this.triggerErrorFlow();return}try{var n=new File([e],this.flow.fileName,{type:"image/png"});let t=await T(n);this.flow.imageSize=A(t);this.uploadingPhoto=true;let s=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.photoType,t);if(s.isValid){o.flowStatus=a[s.state]}else{this.triggerErrorFlow()}this.uploadingPhoto=false}catch(t){this.apiErrorEvent.emit(t)}}async capturedSelfieRecording(t){let e=t.detail;if(e.size==0&&this.recordingResultCount==0){this.recordingResultCount++;return}this.recordingResultCount=0;if(e.size==0){await i.instance.AddLog({message:"Empty recording",blobData:e},await E());this.triggerErrorFlow();return}let n=e.type==S.mp4MimeType.type?S.mp4MimeType:S.webmMimeType;try{this.uploadingRecording=true;let t=new File([e],this.flow.recName+n.extension,{type:n.type});let s=await T(t);this.flow.videoSize=A(s);let r=await i.instance.UploadFileForRequestB64(o.requestId,this.flow.recType,s);if(r.saved){o.flowStatus=a[r.state]}else{this.uploadingRecording=false;this.triggerErrorFlow()}}catch(t){this.uploadingRecording=false;if(this.recordingRetryCount<3){this.recordingRetryCount++;this.triggerErrorFlow()}else{this.apiErrorEvent.emit(t)}}}async verificationFinished(){if(o.debug)console.log("user-liveness | verificationFinished");this.verificationReceived=Date.now();while(Date.now()-this.verificationReceived<9e4){await I(2e3);if(this.showError||this.showTimeout)return}this.triggerUploadFailedFlow();if(o.debug)console.log("user-liveness | verificationFinished | waitingFinished ")}triggerUploadFailedFlow(){this.errorReason="Upload Failed";this.showError=true}async disconnectedCallback(){await d.finalize(this.currentStep)}triggerErrorFlow(){this.errorReason="Invalid";this.showError=true}render(){let t=n("selfie-auto-capture",null);let e=n("capture-error",{type:"LIVENESS",reason:this.errorReason,error:`image: ${this.flow.imageSize}mb video: ${this.flow.videoSize}mb`});let s=n("uploading-data",{type:"id"});if(this.uploadingPhoto&&this.uploadingRecording)return s;if(this.showError||this.showTimeout)return e;return t}};KNt.style=JNt;export{L as agreement_info,F as agreement_view,G as camera_error,H as capture_error,Q as citizenship_selection,q as end_redirect,tt as error_end,nt as how_to_info,_9 as id_auto_capture,j9 as id_selection,U9 as identification_component,H9 as landing_validation,ndt as mobile_redirect,idt as process_id,adt as random_action,UNt as selfie_auto_capture,YNt as sms_code_validation,ZNt as sms_send,XNt as state_transition,qNt as uploading_data,KNt as user_liveness};
18118
- //# sourceMappingURL=p-71948f96.entry.js.map
18118
+ //# sourceMappingURL=p-401c3741.entry.js.map