mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-12 10:10:59 +01:00
4 lines
73 KiB
JavaScript
Vendored
4 lines
73 KiB
JavaScript
Vendored
import{q as So,r as ne,s as Be,o as Wr,v as Po,x as Ut,m as ue,d as ge,e as I,y as Eo,z as Ht,A as Ur,B as Oo,a as Ao,c as Mo,f as Z,t as Se,j as pe,k as Lt,C as xo,h as _r,i as Tr,D as $r,F as Sr,E as ko,G as Do,l as Nt,n as Pr,U as Er,p as jo,H as Or}from"./app-D4Udf6Mm.js";import{F as Ro}from"./Form-BGrUTood.js";import{S as Fo}from"./Spinner-DHClvaFf.js";import{_ as Io}from"./QrContentDisplay-C6rCu47Q.js";import{u as Wo}from"./bus-RVphoWuw.js";/*! 2FAuth version 5.4.1 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */var Lr=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},Ar=(r,i,a)=>(Lr(r,i,"read from private field"),a?a.call(r):i.get(r)),Uo=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},Lo=(r,i,a,c)=>(Lr(r,i,"write to private field"),i.set(r,a),a);const Nr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],No=[...Nr,["unknown"]].map(r=>r[0]),lt=new Map(Nr);function Ho(r){for(const[i,a]of lt)if(r===a)return i;return"unknown"}function Vo(r){if(Hr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Vr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Br(r))return{width:r.videoWidth,height:r.videoHeight};if(Gr(r))return{width:r.width,height:r.height};if(Jr(r))return{width:r.displayWidth,height:r.displayHeight};if(zr(r))return{width:r.width,height:r.height};if(qr(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Hr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Vr(r){try{return r instanceof SVGImageElement}catch{return!1}}function Br(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function zr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function Gr(r){try{return r instanceof ImageBitmap}catch{return!1}}function qr(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Jr(r){try{return r instanceof VideoFrame}catch{return!1}}function Yr(r){try{return r instanceof Blob}catch{return!1}}function Bo(r){try{return r instanceof ImageData}catch{return!1}}function zo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Qr(r){if(Hr(r)&&!await Yo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Vr(r)&&!await Qo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Jr(r)&&Xo(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Br(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Gr(r)&&Zo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=Vo(r);if(i===0||a===0)return null;const c=zo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Go(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Qr(i)}function qo(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Jo(r){if(Yr(r))return await Go(r);if(Bo(r)){if(Ko(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return zr(r)||qr(r)?qo(r):await Qr(r)}async function Yo(r){try{return await r.decode(),!0}catch{return!1}}async function Qo(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function Xo(r){return r.format===null}function Ko(r){return r.data.buffer.byteLength===0}function Zo(r){return r.width===0&&r.height===0}function Mr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const xr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function ei(r){return r.join("|")}function ti(r){const i=kr(r);let a=0,c=xr.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),m=xr[f],v=kr(m);if(v===i)return m;v<i?a=f+1:c=f-1}return"None"}function kr(r){return r.toLowerCase().replace(/_-\[\]/g,"")}function ri(r,i){return r.Binarizer[i]}function ni(r,i){return r.CharacterSet[i]}const ai=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function oi(r){return ai[r.value]}function ii(r,i){return r.EanAddOnSymbol[i]}function si(r,i){return r.TextMode[i]}const De={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function Xr(r,i){return{...i,formats:ei(i.formats),binarizer:ri(r,i.binarizer),eanAddOnSymbol:ii(r,i.eanAddOnSymbol),textMode:si(r,i.textMode),characterSet:ni(r,i.characterSet)}}function Kr(r){return{...r,format:ti(r.format),eccLevel:r.eccLevel,contentType:oi(r.contentType)}}const ci={locateFile:(r,i)=>{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let Dr=new WeakMap;function Bt(r,i){var a;const c=Dr.get(r);if(c!=null&&c.modulePromise&&i===void 0)return c.modulePromise;const f=(a=c==null?void 0:c.moduleOverrides)!=null?a:ci,m=r({...f});return Dr.set(r,{moduleOverrides:f,modulePromise:m}),m}async function ui(r,i,a=De){const c={...De,...a},f=await Bt(r),{size:m}=i,v=new Uint8Array(await i.arrayBuffer()),C=f._malloc(m);f.HEAPU8.set(v,C);const h=f.readBarcodesFromImage(C,m,Xr(f,c));f._free(C);const w=[];for(let _=0;_<h.size();++_)w.push(Kr(h.get(_)));return w}async function li(r,i,a=De){const c={...De,...a},f=await Bt(r),{data:m,width:v,height:C,data:{byteLength:h}}=i,w=f._malloc(h);f.HEAPU8.set(m,w);const _=f.readBarcodesFromPixmap(w,v,C,Xr(f,c));f._free(w);const b=[];for(let D=0;D<_.size();++D)b.push(Kr(_.get(D)));return b}({...De,formats:[...De.formats]});var zt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var m=Object.assign({},a),v="./this.program",C=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function _(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(C||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var D=a.printErr||console.error.bind(console);Object.assign(a,m),m=null,a.arguments&&a.arguments,a.thisProgram&&(v=a.thisProgram),a.quit&&a.quit;var j;a.wasmBinary&&(j=a.wasmBinary),typeof WebAssembly!="object"&&te("no native wasm support detected");var k,W=!1,L,P,F,x,S,A,N,ae;function Pe(){var e=k.buffer;a.HEAP8=L=new Int8Array(e),a.HEAP16=F=new Int16Array(e),a.HEAPU8=P=new Uint8Array(e),a.HEAPU16=x=new Uint16Array(e),a.HEAP32=S=new Int32Array(e),a.HEAPU32=A=new Uint32Array(e),a.HEAPF32=N=new Float32Array(e),a.HEAPF64=ae=new Float64Array(e)}var Ee=[],je=[],Re=[];function Ge(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)mt(a.preRun.shift());bt(Ee)}function ht(){bt(je)}function pt(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Fe(a.postRun.shift());bt(Re)}function mt(e){Ee.unshift(e)}function vt(e){je.unshift(e)}function Fe(e){Re.unshift(e)}var ie=0,_e=null;function yt(e){var t;ie++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,ie)}function ve(e){var t;if(ie--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,ie),ie==0&&_e){var n=_e;_e=null,n()}}function te(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",D(e),W=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var gt="data:application/octet-stream;base64,",qe=e=>e.startsWith(gt),ye;ye="zxing_reader.wasm",qe(ye)||(ye=_(ye));function Je(e){if(e==ye&&j)return new Uint8Array(j);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function wt(e){return!j&&(C||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>Je(e)):Promise.resolve().then(()=>Je(e))}function Ye(e,t,n){return wt(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{D(`failed to asynchronously prepare wasm: ${o}`),te(o)})}function pn(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!qe(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return D(`wasm streaming compile failed: ${l}`),D("falling back to ArrayBuffer instantiation"),Ye(t,n,o)})}):Ye(t,n,o)}function mn(){var e={a:ro};function t(o,s){return Y=o.exports,k=Y.ia,Pe(),tr=Y.ma,vt(Y.ja),ve(),Y}yt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){D(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return pn(j,ye,e,n).catch(f),{}}var bt=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Qe=[],Xe=0,vn=e=>{var t=new Ct(e);return t.get_caught()||(t.set_caught(!0),Xe--),t.set_rethrown(!1),Qe.push(t),mr(t.excPtr),t.get_exception_ptr()},de=0,yn=()=>{H(0,0);var e=Qe.pop();pr(e.excPtr),de=0};function Ct(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,L[this.ptr+12>>0]=t},this.get_caught=function(){return L[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,L[this.ptr+13>>0]=t},this.get_rethrown=function(){return L[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=yr(this.get_type());if(t)return A[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var gn=e=>{throw de||(de=e),de},_t=e=>{var t=de;if(!t)return Ve(0),0;var n=new Ct(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Ve(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(vr(u,o,l))return Ve(u),t}return Ve(o),t},wn=()=>_t([]),bn=e=>_t([e]),Cn=(e,t)=>_t([e,t]),_n=()=>{var e=Qe.pop();e||te("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Qe.push(e),e.set_rethrown(!0),e.set_caught(!1),Xe++),de=t,de},Tn=(e,t,n)=>{var o=new Ct(e);throw o.init(t,n),de=e,Xe++,de},$n=()=>Xe,Ke={},Tt=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function $t(e){return this.fromWireType(S[e>>2])}var Oe={},Te={},Ze={},Gt,et=e=>{throw new Gt(e)},$e=(e,t,n)=>{e.forEach(function(d){Ze[d]=t});function o(d){var p=n(d);p.length!==e.length&&et("Mismatched type converter count");for(var g=0;g<e.length;++g)se(e[g],p[g])}var s=new Array(t.length),u=[],l=0;t.forEach((d,p)=>{Te.hasOwnProperty(d)?s[p]=Te[d]:(u.push(d),Oe.hasOwnProperty(d)||(Oe[d]=[]),Oe[d].push(()=>{s[p]=Te[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},Sn=e=>{var t=Ke[e];delete Ke[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));$e([e],u,l=>{var d={};return s.forEach((p,g)=>{var T=p.fieldName,E=l[g],O=p.getter,M=p.getterContext,V=l[g+s.length],q=p.setter,U=p.setterContext;d[T]={read:K=>E.fromWireType(O(M,K)),write:(K,y)=>{var $=[];q(U,K,V.toWireType($,y)),Tt($)}}}),[{name:t.name,fromWireType:p=>{var g={};for(var T in d)g[T]=d[T].read(p);return o(p),g},toWireType:(p,g)=>{for(var T in d)if(!(T in g))throw new TypeError(`Missing field: "${T}"`);var E=n();for(T in d)d[T].write(E,g[T]);return p!==null&&p.push(o,E),E},argPackAdvance:ce,readValueFromPointer:$t,destructorFunction:o}]})},Pn=(e,t,n,o,s)=>{},En=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);qt=e},qt,X=e=>{for(var t="",n=e;P[n];)t+=qt[P[n++]];return t},Ae,R=e=>{throw new Ae(e)};function On(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||R(`type "${o}" must have a positive integer typeid pointer`),Te.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;R(`Cannot register type '${o}' twice`)}if(Te[e]=t,delete Ze[e],Oe.hasOwnProperty(e)){var s=Oe[e];delete Oe[e],s.forEach(u=>u())}}function se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return On(e,t,n)}var ce=8,An=(e,t,n,o)=>{t=X(t),se(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:ce,readValueFromPointer:function(s){return this.fromWireType(P[s])},destructorFunction:null})},Mn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),St=e=>{function t(n){return n.$$.ptrType.registeredClass.name}R(t(e)+" instance already deleted")},Pt=!1,Jt=e=>{},xn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Yt=e=>{e.count.value-=1;var t=e.count.value===0;t&&xn(e)},Qt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Qt(e,t,n.baseClass);return o===null?null:n.downcast(o)},Xt={},kn=()=>Object.keys(Ue).length,Dn=()=>{var e=[];for(var t in Ue)Ue.hasOwnProperty(t)&&e.push(Ue[t]);return e},Ie=[],Et=()=>{for(;Ie.length;){var e=Ie.pop();e.$$.deleteScheduled=!1,e.delete()}},We,jn=e=>{We=e,Ie.length&&We&&We(Et)},Rn=()=>{a.getInheritedInstanceCount=kn,a.getLiveInheritedInstances=Dn,a.flushPendingDeletes=Et,a.setDelayFunction=jn},Ue={},Fn=(e,t)=>{for(t===void 0&&R("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},In=(e,t)=>(t=Fn(e,t),Ue[t]),tt=(e,t)=>{(!t.ptrType||!t.ptr)&&et("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&et("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Le(Object.create(e,{$$:{value:t,writable:!0}}))};function Wn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=In(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?tt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):tt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Xt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var p=Qt(t,this.registeredClass,d.registeredClass);return p===null?s.call(this):this.isSmartPointer?tt(d.registeredClass.instancePrototype,{ptrType:d,ptr:p,smartPtrType:this,smartPtr:e}):tt(d.registeredClass.instancePrototype,{ptrType:d,ptr:p})}var Le=e=>typeof FinalizationRegistry>"u"?(Le=t=>t,e):(Pt=new FinalizationRegistry(t=>{Yt(t.$$)}),Le=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};Pt.register(t,s,t)}return t},Jt=t=>Pt.unregister(t),Le(e)),Un=()=>{Object.assign(rt.prototype,{isAliasOf(e){if(!(this instanceof rt)||!(e instanceof rt))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||St(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Le(Object.create(Object.getPrototypeOf(this),{$$:{value:Mn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&R("Object already scheduled for deletion"),Jt(this),Yt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&R("Object already scheduled for deletion"),Ie.push(this),Ie.length===1&&We&&We(Et),this.$$.deleteScheduled=!0,this}})};function rt(){}var Ne=(e,t)=>Object.defineProperty(t,"name",{value:e}),Kt=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||R(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},Ot=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&R(`Cannot register public name '${e}' twice`),Kt(a,e,e),a.hasOwnProperty(n)&&R(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},Ln=48,Nn=57,Hn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Ln&&t<=Nn?`_${e}`:e};function Vn(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var At=(e,t,n)=>{for(;t!==n;)t.upcast||R(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Bn(e,t){if(t===null)return this.isReference&&R(`null is not a valid ${this.name}`),0;t.$$||R(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||R(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=At(t.$$.ptr,n,this.registeredClass);return o}function zn(e,t){var n;if(t===null)return this.isReference&&R(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&R(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||R(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&R(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=At(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&R("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:R(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,fe.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:R("Unsupporting sharing policy")}return n}function Gn(e,t){if(t===null)return this.isReference&&R(`null is not a valid ${this.name}`),0;t.$$||R(`Cannot pass "${jt(t)}" as a ${this.name}`),t.$$.ptr||R(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&R(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=At(t.$$.ptr,n,this.registeredClass);return o}function Zt(e){return this.fromWireType(A[e>>2])}var qn=()=>{Object.assign(nt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ce,readValueFromPointer:Zt,deleteObject(e){e!==null&&e.delete()},fromWireType:Wn})};function nt(e,t,n,o,s,u,l,d,p,g,T){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=p,this.rawShare=g,this.rawDestructor=T,!s&&t.baseClass===void 0?o?(this.toWireType=Bn,this.destructorFunction=null):(this.toWireType=Gn,this.destructorFunction=null):this.toWireType=zn}var er=(e,t,n)=>{a.hasOwnProperty(e)||et("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},Jn=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},at=[],tr,B=e=>{var t=at[e];return t||(e>=at.length&&(at.length=e+1),at[e]=t=tr.get(e)),t},Yn=(e,t,n)=>{if(e.includes("j"))return Jn(e,t,n);var o=B(t).apply(null,n);return o},Qn=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),Yn(e,t,n)}},oe=(e,t)=>{e=X(e);function n(){return e.includes("j")?Qn(e,t):B(t)}var o=n();return typeof o!="function"&&R(`unknown function pointer with signature ${e}: ${t}`),o},Xn=(e,t)=>{var n=Ne(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+`
|
|
`+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},rr,nr=e=>{var t=hr(e),n=X(t);return he(t),n},ot=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!Te[u]){if(Ze[u]){Ze[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new rr(`${e}: `+n.map(nr).join([", "]))},Kn=(e,t,n,o,s,u,l,d,p,g,T,E,O)=>{T=X(T),u=oe(s,u),d&&(d=oe(l,d)),g&&(g=oe(p,g)),O=oe(E,O);var M=Hn(T);Ot(M,function(){ot(`Cannot construct ${T} due to unbound types`,[o])}),$e([e,t,n],o?[o]:[],function(V){V=V[0];var q,U;o?(q=V.registeredClass,U=q.instancePrototype):U=rt.prototype;var K=Ne(T,function(){if(Object.getPrototypeOf(this)!==y)throw new Ae("Use 'new' to construct "+T);if($.constructor_body===void 0)throw new Ae(T+" has no accessible constructor");var Cr=$.constructor_body[arguments.length];if(Cr===void 0)throw new Ae(`Tried to invoke ctor of ${T} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return Cr.apply(this,arguments)}),y=Object.create(U,{constructor:{value:K}});K.prototype=y;var $=new Vn(T,K,y,O,q,u,d,g);if($.baseClass){var J,Q;(Q=(J=$.baseClass).__derivedClasses)!==null&&Q!==void 0||(J.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var Me=new nt(T,$,!0,!1,!1),ct=new nt(T+"*",$,!1,!1,!1),br=new nt(T+" const*",$,!1,!0,!1);return Xt[e]={pointerType:ct,constPointerType:br},er(M,K),[Me,ct,br]})},Mt=(e,t)=>{for(var n=[],o=0;o<e;o++)n.push(A[t+o*4>>2]);return n};function Zn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function xt(e,t,n,o,s,u){var l=t.length;l<2&&R("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&n!==null,p=Zn(t),g=t[0].name!=="void",T=l-2,E=new Array(T),O=[],M=[],V=function(){arguments.length!==T&&R(`function ${e} called with ${arguments.length} arguments, expected ${T}`),M.length=0;var q;O.length=d?2:1,O[0]=s,d&&(q=t[1].toWireType(M,this),O[1]=q);for(var U=0;U<T;++U)E[U]=t[U+2].toWireType(M,arguments[U]),O.push(E[U]);var K=o.apply(null,O);function y($){if(p)Tt(M);else for(var J=d?1:2;J<t.length;J++){var Q=J===1?q:E[J-2];t[J].destructorFunction!==null&&t[J].destructorFunction(Q)}if(g)return t[0].fromWireType($)}return y(K)};return Ne(e,V)}var ea=(e,t,n,o,s,u)=>{var l=Mt(t,n);s=oe(o,s),$e([],[e],function(d){d=d[0];var p=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new Ae(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{ot(`Cannot construct ${d.name} due to unbound types`,l)},$e([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=xt(p,g,null,s,u),[])),[]})},ar=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},ta=(e,t,n,o,s,u,l,d,p)=>{var g=Mt(n,o);t=X(t),t=ar(t),u=oe(s,u),$e([],[e],function(T){T=T[0];var E=`${T.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&T.registeredClass.pureVirtualFunctions.push(t);function O(){ot(`Cannot call ${E} due to unbound types`,g)}var M=T.registeredClass.instancePrototype,V=M[t];return V===void 0||V.overloadTable===void 0&&V.className!==T.name&&V.argCount===n-2?(O.argCount=n-2,O.className=T.name,M[t]=O):(Kt(M,t,E),M[t].overloadTable[n-2]=O),$e([],g,function(q){var U=xt(E,q,T,u,l);return M[t].overloadTable===void 0?(U.argCount=n-2,M[t]=U):M[t].overloadTable[n-2]=U,[]}),[]})};function ra(){Object.assign(or.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function or(){this.allocated=[void 0],this.freelist=[]}var re=new or,kt=e=>{e>=re.reserved&&--re.get(e).refcount===0&&re.free(e)},na=()=>{for(var e=0,t=re.reserved;t<re.allocated.length;++t)re.allocated[t]!==void 0&&++e;return e},aa=()=>{re.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),re.reserved=re.allocated.length,a.count_emval_handles=na},fe={toValue:e=>(e||R("Cannot use deleted val. handle = "+e),re.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return re.allocate({refcount:1,value:e})}}},oa=(e,t)=>{t=X(t),se(e,{name:t,fromWireType:n=>{var o=fe.toValue(n);return kt(n),o},toWireType:(n,o)=>fe.toHandle(o),argPackAdvance:ce,readValueFromPointer:$t,destructorFunction:null})},ia=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(L[o>>0])}:function(o){return this.fromWireType(P[o>>0])};case 2:return n?function(o){return this.fromWireType(F[o>>1])}:function(o){return this.fromWireType(x[o>>1])};case 4:return n?function(o){return this.fromWireType(S[o>>2])}:function(o){return this.fromWireType(A[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},sa=(e,t,n,o)=>{t=X(t);function s(){}s.values={},se(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:ce,readValueFromPointer:ia(t,n,o),destructorFunction:null}),Ot(t,s)},Dt=(e,t)=>{var n=Te[e];return n===void 0&&R(t+" has unknown type "+nr(e)),n},ca=(e,t,n)=>{var o=Dt(e,"enum");t=X(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:Ne(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},jt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},ua=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(N[n>>2])};case 8:return function(n){return this.fromWireType(ae[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},la=(e,t,n)=>{t=X(t),se(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:ce,readValueFromPointer:ua(t,n),destructorFunction:null})},da=(e,t,n,o,s,u,l)=>{var d=Mt(t,n);e=X(e),e=ar(e),s=oe(o,s),Ot(e,function(){ot(`Cannot call ${e} due to unbound types`,d)},t-1),$e([],d,function(p){var g=[p[0],null].concat(p.slice(1));return er(e,xt(e,g,null,s,u),t-1),[]})},fa=(e,t,n)=>{switch(t){case 1:return n?o=>L[o>>0]:o=>P[o>>0];case 2:return n?o=>F[o>>1]:o=>x[o>>1];case 4:return n?o=>S[o>>2]:o=>A[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ha=(e,t,n,o,s)=>{t=X(t);var u=T=>T;if(o===0){var l=32-8*n;u=T=>T<<l>>>l}var d=t.includes("unsigned"),p=(T,E)=>{},g;d?g=function(T,E){return p(E,this.name),E>>>0}:g=function(T,E){return p(E,this.name),E},se(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:ce,readValueFromPointer:fa(t,n,o!==0),destructorFunction:null})},pa=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=A[l>>2],p=A[l+4>>2];return new s(L.buffer,p,d)}n=X(n),se(e,{name:n,fromWireType:u,argPackAdvance:ce,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},ir=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},ma=(e,t,n)=>ir(e,P,t,n),sr=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o<=127?t++:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,++n):t+=3}return t},cr=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,va=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&cr)return cr.decode(e.subarray(t,s));for(var u="";t<s;){var l=e[t++];if(!(l&128)){u+=String.fromCharCode(l);continue}var d=e[t++]&63;if((l&224)==192){u+=String.fromCharCode((l&31)<<6|d);continue}var p=e[t++]&63;if((l&240)==224?l=(l&15)<<12|d<<6|p:l=(l&7)<<18|d<<12|p<<6|e[t++]&63,l<65536)u+=String.fromCharCode(l);else{var g=l-65536;u+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return u},Rt=(e,t)=>e?va(P,e,t):"",ya=(e,t)=>{t=X(t);var n=t==="std::string";se(e,{name:t,fromWireType(o){var s=A[o>>2],u=o+4,l;if(n)for(var d=u,p=0;p<=s;++p){var g=u+p;if(p==s||P[g]==0){var T=g-d,E=Rt(d,T);l===void 0?l=E:(l+="\0",l+=E),d=g+1}}else{for(var O=new Array(s),p=0;p<s;++p)O[p]=String.fromCharCode(P[u+p]);l=O.join("")}return he(o),l},toWireType(o,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var u,l=typeof s=="string";l||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||R("Cannot pass non-string to std::string"),n&&l?u=sr(s):u=s.length;var d=Wt(4+u+1),p=d+4;if(A[d>>2]=u,n&&l)ma(s,p,u+1);else if(l)for(var g=0;g<u;++g){var T=s.charCodeAt(g);T>255&&(he(p),R("String has UTF-16 code units that do not fit in 8 bits")),P[p+g]=T}else for(var g=0;g<u;++g)P[p+g]=s[g];return o!==null&&o.push(he,d),d},argPackAdvance:ce,readValueFromPointer:Zt,destructorFunction(o){he(o)}})},ur=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ga=(e,t)=>{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&x[o];)++o;if(n=o<<1,n-e>32&&ur)return ur.decode(P.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=F[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},wa=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n<e.length*2?n/2:e.length,l=0;l<u;++l){var d=e.charCodeAt(l);F[t>>1]=d,t+=2}return F[t>>1]=0,t-s},ba=e=>e.length*2,Ca=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=S[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},_a=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(S[t>>2]=d,t+=4,t+4>u)break}return S[t>>2]=0,t-s},Ta=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o>=55296&&o<=57343&&++n,t+=4}return t},$a=(e,t,n)=>{n=X(n);var o,s,u,l,d;t===2?(o=ga,s=wa,l=ba,u=()=>x,d=1):t===4&&(o=Ca,s=_a,l=Ta,u=()=>A,d=2),se(e,{name:n,fromWireType:p=>{for(var g=A[p>>2],T=u(),E,O=p+4,M=0;M<=g;++M){var V=p+4+M*t;if(M==g||T[V>>d]==0){var q=V-O,U=o(O,q);E===void 0?E=U:(E+="\0",E+=U),O=V+t}}return he(p),E},toWireType:(p,g)=>{typeof g!="string"&&R(`Cannot pass non-string to C++ string type ${n}`);var T=l(g),E=Wt(4+T+t);return A[E>>2]=T>>d,s(g,E+4,T+t),p!==null&&p.push(he,E),E},argPackAdvance:ce,readValueFromPointer:$t,destructorFunction(p){he(p)}})},Sa=(e,t,n,o,s,u)=>{Ke[e]={name:X(t),rawConstructor:oe(n,o),rawDestructor:oe(s,u),fields:[]}},Pa=(e,t,n,o,s,u,l,d,p,g)=>{Ke[e].fields.push({fieldName:X(t),getterReturnType:n,getter:oe(o,s),getterContext:u,setterArgumentType:l,setter:oe(d,p),setterContext:g})},Ea=(e,t)=>{t=X(t),se(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Ft=[],Oa=(e,t,n,o)=>(e=Ft[e],t=fe.toValue(t),e(null,t,n,o)),Aa={},Ma=e=>{var t=Aa[e];return t===void 0?X(e):t},lr=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},xa=e=>e===0?fe.toHandle(lr()):(e=Ma(e),fe.toHandle(lr()[e])),ka=e=>{var t=Ft.length;return Ft.push(e),t},Da=(e,t)=>{for(var n=new Array(e),o=0;o<e;++o)n[o]=Dt(A[t+o*4>>2],"parameter "+o);return n},ja=Reflect.construct,Ra=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(A[t>>2]=fe.toHandle(o)),s},Fa=(e,t,n)=>{var o=Da(e,t),s=o.shift();e--;var u=new Array(e),l=(p,g,T,E)=>{for(var O=0,M=0;M<e;++M)u[M]=o[M].readValueFromPointer(E+O),O+=o[M].argPackAdvance;for(var V=n===1?ja(g,u):g.apply(p,u),M=0;M<e;++M){var q,U;(q=(U=o[M]).deleteObject)===null||q===void 0||q.call(U,u[M])}return Ra(s,T,V)},d=`methodCaller<(${o.map(p=>p.name).join(", ")}) => ${s.name}>`;return ka(Ne(d,l))},Ia=e=>{e>4&&(re.get(e).refcount+=1)},Wa=e=>{var t=fe.toValue(e);Tt(t),kt(e)},Ua=(e,t)=>{e=Dt(e,"_emval_take_value");var n=e.readValueFromPointer(t);return fe.toHandle(n)},La=()=>{te("")},Na=(e,t,n)=>P.copyWithin(e,t,t+n),Ha=()=>2147483648,Va=e=>{var t=k.buffer,n=(e-t.byteLength+65535)/65536;try{return k.grow(n),Pe(),1}catch{}},Ba=e=>{var t=P.length;e>>>=0;var n=Ha();if(e>n)return!1;for(var o=(p,g)=>p+(g-p%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=Va(l);if(d)return!0}return!1},It={},za=()=>v||"./this.program",He=()=>{if(!He.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:za()};for(var n in It)It[n]===void 0?delete t[n]:t[n]=It[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);He.strings=o}return He.strings},Ga=(e,t)=>{for(var n=0;n<e.length;++n)L[t++>>0]=e.charCodeAt(n);L[t>>0]=0},qa=(e,t)=>{var n=0;return He().forEach((o,s)=>{var u=t+n;A[e+s*4>>2]=u,Ga(o,u),n+=o.length+1}),0},Ja=(e,t)=>{var n=He();A[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),A[t>>2]=o,0},Ya=e=>e,it=e=>e%4===0&&(e%100!==0||e%400===0),Qa=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},dr=[31,29,31,30,31,30,31,31,30,31,30,31],fr=[31,28,31,30,31,30,31,31,30,31,30,31],Xa=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=it(n.getFullYear()),s=n.getMonth(),u=(o?dr:fr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function Ka(e,t,n){var o=sr(e)+1,s=new Array(o);return ir(e,s,0,s.length),s}var Za=(e,t)=>{L.set(e,t)},eo=(e,t,n,o)=>{var s=A[o+40>>2],u={tm_sec:S[o>>2],tm_min:S[o+4>>2],tm_hour:S[o+8>>2],tm_mday:S[o+12>>2],tm_mon:S[o+16>>2],tm_year:S[o+20>>2],tm_wday:S[o+24>>2],tm_yday:S[o+28>>2],tm_isdst:S[o+32>>2],tm_gmtoff:S[o+36>>2],tm_zone:s?Rt(s):""},l=Rt(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in d)l=l.replace(new RegExp(p,"g"),d[p]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],T=["January","February","March","April","May","June","July","August","September","October","November","December"];function E(y,$,J){for(var Q=typeof y=="number"?y.toString():y||"";Q.length<$;)Q=J[0]+Q;return Q}function O(y,$){return E(y,$,"0")}function M(y,$){function J(Me){return Me<0?-1:Me>0?1:0}var Q;return(Q=J(y.getFullYear()-$.getFullYear()))===0&&(Q=J(y.getMonth()-$.getMonth()))===0&&(Q=J(y.getDate()-$.getDate())),Q}function V(y){switch(y.getDay()){case 0:return new Date(y.getFullYear()-1,11,29);case 1:return y;case 2:return new Date(y.getFullYear(),0,3);case 3:return new Date(y.getFullYear(),0,2);case 4:return new Date(y.getFullYear(),0,1);case 5:return new Date(y.getFullYear()-1,11,31);case 6:return new Date(y.getFullYear()-1,11,30)}}function q(y){var $=Xa(new Date(y.tm_year+1900,0,1),y.tm_yday),J=new Date($.getFullYear(),0,4),Q=new Date($.getFullYear()+1,0,4),Me=V(J),ct=V(Q);return M(Me,$)<=0?M(ct,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var U={"%a":y=>g[y.tm_wday].substring(0,3),"%A":y=>g[y.tm_wday],"%b":y=>T[y.tm_mon].substring(0,3),"%B":y=>T[y.tm_mon],"%C":y=>{var $=y.tm_year+1900;return O($/100|0,2)},"%d":y=>O(y.tm_mday,2),"%e":y=>E(y.tm_mday,2," "),"%g":y=>q(y).toString().substring(2),"%G":y=>q(y),"%H":y=>O(y.tm_hour,2),"%I":y=>{var $=y.tm_hour;return $==0?$=12:$>12&&($-=12),O($,2)},"%j":y=>O(y.tm_mday+Qa(it(y.tm_year+1900)?dr:fr,y.tm_mon-1),3),"%m":y=>O(y.tm_mon+1,2),"%M":y=>O(y.tm_min,2),"%n":()=>`
|
|
`,"%p":y=>y.tm_hour>=0&&y.tm_hour<12?"AM":"PM","%S":y=>O(y.tm_sec,2),"%t":()=>" ","%u":y=>y.tm_wday||7,"%U":y=>{var $=y.tm_yday+7-y.tm_wday;return O(Math.floor($/7),2)},"%V":y=>{var $=Math.floor((y.tm_yday+7-(y.tm_wday+6)%7)/7);if((y.tm_wday+371-y.tm_yday-2)%7<=2&&$++,$){if($==53){var J=(y.tm_wday+371-y.tm_yday)%7;J!=4&&(J!=3||!it(y.tm_year))&&($=1)}}else{$=52;var Q=(y.tm_wday+7-y.tm_yday-1)%7;(Q==4||Q==5&&it(y.tm_year%400-1))&&$++}return O($,2)},"%w":y=>y.tm_wday,"%W":y=>{var $=y.tm_yday+7-(y.tm_wday+6)%7;return O(Math.floor($/7),2)},"%y":y=>(y.tm_year+1900).toString().substring(2),"%Y":y=>y.tm_year+1900,"%z":y=>{var $=y.tm_gmtoff,J=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(J?"+":"-")+("0000"+$).slice(-4)},"%Z":y=>y.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var p in U)l.includes(p)&&(l=l.replace(new RegExp(p,"g"),U[p](u)));l=l.replace(/\0\0/g,"%");var K=Ka(l);return K.length>t?0:(Za(K,e),K.length-1)},to=(e,t,n,o,s)=>eo(e,t,n,o);Gt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},En(),Ae=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Un(),Rn(),qn(),rr=a.UnboundTypeError=Xn(Error,"UnboundTypeError"),ra(),aa();var ro={s:vn,u:yn,b:wn,g:bn,q:Cn,J:_n,f:Tn,V:$n,d:gn,da:Sn,Q:Pn,_:An,ca:Kn,ba:ea,w:ta,Y:oa,x:sa,h:ca,L:la,M:da,t:ha,o:pa,K:ya,C:$a,A:Sa,ea:Pa,$:Ea,R:Oa,ha:kt,fa:xa,Z:Fa,N:Ia,O:Wa,aa:Ua,B:La,X:Na,W:Ba,T:qa,U:Ja,E:wo,D:so,F:go,n:bo,a:no,e:uo,m:io,k:fo,H:vo,v:po,G:yo,z:_o,P:$o,l:lo,j:co,c:oo,p:ao,I:mo,r:Co,i:ho,y:To,ga:Ya,S:to},Y=mn(),he=a._free=e=>(he=a._free=Y.ka)(e),Wt=a._malloc=e=>(Wt=a._malloc=Y.la)(e),hr=e=>(hr=Y.na)(e),H=(e,t)=>(H=Y.oa)(e,t),Ve=e=>(Ve=Y.pa)(e),z=()=>(z=Y.qa)(),G=e=>(G=Y.ra)(e),pr=e=>(pr=Y.sa)(e),mr=e=>(mr=Y.ta)(e),vr=(e,t,n)=>(vr=Y.ua)(e,t,n),yr=e=>(yr=Y.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=Y.wa)(e,t,n,o,s,u,l);var gr=a.dynCall_jiiii=(e,t,n,o,s)=>(gr=a.dynCall_jiiii=Y.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=Y.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,p)=>(a.dynCall_iiiiijj=Y.za)(e,t,n,o,s,u,l,d,p),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,p,g)=>(a.dynCall_iiiiiijj=Y.Aa)(e,t,n,o,s,u,l,d,p,g);function no(e,t){var n=z();try{return B(e)(t)}catch(o){if(G(n),o!==o+0)throw o;H(1,0)}}function ao(e,t,n,o){var s=z();try{B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function oo(e,t,n){var o=z();try{B(e)(t,n)}catch(s){if(G(o),s!==s+0)throw s;H(1,0)}}function io(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function so(e,t,n,o,s){var u=z();try{return B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function co(e,t){var n=z();try{B(e)(t)}catch(o){if(G(n),o!==o+0)throw o;H(1,0)}}function uo(e,t,n){var o=z();try{return B(e)(t,n)}catch(s){if(G(o),s!==s+0)throw s;H(1,0)}}function lo(e){var t=z();try{B(e)()}catch(n){if(G(t),n!==n+0)throw n;H(1,0)}}function fo(e,t,n,o,s){var u=z();try{return B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function ho(e,t,n,o,s,u,l,d,p,g,T){var E=z();try{B(e)(t,n,o,s,u,l,d,p,g,T)}catch(O){if(G(E),O!==O+0)throw O;H(1,0)}}function po(e,t,n,o,s,u,l){var d=z();try{return B(e)(t,n,o,s,u,l)}catch(p){if(G(d),p!==p+0)throw p;H(1,0)}}function mo(e,t,n,o,s){var u=z();try{B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function vo(e,t,n,o,s,u){var l=z();try{return B(e)(t,n,o,s,u)}catch(d){if(G(l),d!==d+0)throw d;H(1,0)}}function yo(e,t,n,o,s,u,l,d){var p=z();try{return B(e)(t,n,o,s,u,l,d)}catch(g){if(G(p),g!==g+0)throw g;H(1,0)}}function go(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function wo(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function bo(e){var t=z();try{return B(e)()}catch(n){if(G(t),n!==n+0)throw n;H(1,0)}}function Co(e,t,n,o,s,u,l,d){var p=z();try{B(e)(t,n,o,s,u,l,d)}catch(g){if(G(p),g!==g+0)throw g;H(1,0)}}function _o(e,t,n,o,s,u,l,d,p,g,T,E){var O=z();try{return B(e)(t,n,o,s,u,l,d,p,g,T,E)}catch(M){if(G(O),M!==M+0)throw M;H(1,0)}}function To(e,t,n,o,s,u,l,d,p,g,T,E,O,M,V,q){var U=z();try{B(e)(t,n,o,s,u,l,d,p,g,T,E,O,M,V,q)}catch(K){if(G(U),K!==K+0)throw K;H(1,0)}}function $o(e,t,n,o,s){var u=z();try{return gr(e,t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}var st;_e=function e(){st||wr(),st||(_e=e)};function wr(){if(ie>0||(Ge(),ie>0))return;function e(){st||(st=!0,a.calledRun=!0,!W&&(ht(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),pt()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return wr(),i.ready}})();function di(r){return Bt(zt,r)}async function fi(r,i){return ui(zt,r,i)}async function hi(r,i){return li(zt,r,i)}var ze;class Zr extends EventTarget{constructor(i={}){var a;super(),Uo(this,ze,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!lt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),Lo(this,ze,c??[]),di().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw Mr(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return No.filter(i=>i!=="unknown")}async detect(i){try{const a=await Jo(i);if(a===null)return[];let c;try{Yr(a)?c=await fi(a,{tryHarder:!0,formats:Ar(this,ze).map(f=>lt.get(f))}):c=await hi(a,{tryHarder:!0,formats:Ar(this,ze).map(f=>lt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:m,y:v},topRight:{x:C,y:h},bottomLeft:{x:w,y:_},bottomRight:{x:b,y:D}}=f.position,j=Math.min(m,C,w,b),k=Math.min(v,h,_,D),W=Math.max(m,C,w,b),L=Math.max(v,h,_,D);return{boundingBox:new DOMRectReadOnly(j,k,W-j,L-k),rawValue:f.text,format:Ho(f.format),cornerPoints:[{x:m,y:v},{x:C,y:h},{x:b,y:D},{x:w,y:_}]}})}catch(a){throw Mr(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ze=new WeakMap;const en=(r,i,a="error")=>{let c,f;const m=new Promise((v,C)=>{c=v,f=C,r.addEventListener(i,c),r.addEventListener(a,f)});return m.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),m},jr=r=>new Promise(i=>setTimeout(i,r));class tn extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class pi extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class mi extends Error{constructor(){super("Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let Vt;const vi=r=>{Vt=new Zr({formats:r})},yi=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{Vt=new Zr({formats:f});const m=v=>async C=>{if(r.readyState>1){const{lastScanned:h,contentBefore:w,lastScanHadContent:_}=v;if(C-h<c)window.requestAnimationFrame(m(v));else{const b=await Vt.detect(r),D=b.some(W=>!w.includes(W.rawValue));D&&i(b);const j=b.length>0;j&&a(b),!j&&_&&a(b);const k={lastScanned:C,lastScanHadContent:j,contentBefore:D?b.map(W=>W.rawValue):w};window.requestAnimationFrame(m(k))}}};m({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var rn={},ee={};Object.defineProperty(ee,"__esModule",{value:!0});ee.compactObject=on;ee.deprecated=Pi;var gi=ee.detectBrowser=Ei;ee.disableLog=Ti;ee.disableWarnings=$i;ee.extractVersion=dt;ee.filterStats=Oi;ee.log=Si;ee.walkStats=ft;ee.wrapPeerConnectionEvent=_i;function wi(r,i,a){return i=bi(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function bi(r){var i=Ci(r,"string");return be(i)==="symbol"?i:String(i)}function Ci(r,i){if(be(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(be(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function be(r){"@babel/helpers - typeof";return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},be(r)}var nn=!0,an=!0;function dt(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function _i(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(v,C){if(v!==i)return f.apply(this,arguments);var h=function(w){var _=a(w);_&&(C.handleEvent?C.handleEvent(_):C(_))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(C,h),f.apply(this,[v,h])};var m=c.removeEventListener;c.removeEventListener=function(v,C){if(v!==i||!this._eventMap||!this._eventMap[i])return m.apply(this,arguments);if(!this._eventMap[i].has(C))return m.apply(this,arguments);var h=this._eventMap[i].get(C);return this._eventMap[i].delete(C),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,m.apply(this,[v,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(v){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),v&&this.addEventListener(i,this["_on"+i]=v)},enumerable:!0,configurable:!0})}}function Ti(r){return typeof r!="boolean"?new Error("Argument type: "+be(r)+". Please use a boolean."):(nn=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function $i(r){return typeof r!="boolean"?new Error("Argument type: "+be(r)+". Please use a boolean."):(an=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function Si(){if((typeof window>"u"?"undefined":be(window))==="object"){if(nn)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Pi(r,i){an&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Ei(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=dt(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=dt(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=dt(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function Rr(r){return Object.prototype.toString.call(r)==="[object Object]"}function on(r){return Rr(r)?Object.keys(r).reduce(function(i,a){var c=Rr(r[a]),f=c?on(r[a]):r[a],m=c&&!Object.keys(f).length;return f===void 0||m?i:Object.assign(i,wi({},a,f))},{}):r}function ft(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ft(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ft(r,r.get(f),a)})}))}function Oi(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var m=[];return r.forEach(function(v){v.type==="track"&&v.trackIdentifier===i.id&&m.push(v)}),m.forEach(function(v){r.forEach(function(C){C.type===c&&C.trackId===v.id&&ft(r,C,f)})}),f}Object.defineProperty(rn,"__esModule",{value:!0});var Ai=rn.shimGetUserMedia=ki,Mi=xi(ee);function sn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(sn=function(c){return c?a:i})(r)}function xi(r,i){if(r&&r.__esModule)return r;if(r===null||we(r)!=="object"&&typeof r!="function")return{default:r};var a=sn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in r)if(m!=="default"&&Object.prototype.hasOwnProperty.call(r,m)){var v=f?Object.getOwnPropertyDescriptor(r,m):null;v&&(v.get||v.set)?Object.defineProperty(c,m,v):c[m]=r[m]}return c.default=r,a&&a.set(r,c),c}function we(r){"@babel/helpers - typeof";return we=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},we(r)}var Fr=Mi.log;function ki(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(we(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(_){if(!(_==="require"||_==="advanced"||_==="mediaSource")){var b=we(h[_])==="object"?h[_]:{ideal:h[_]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var D=function(k,W){return k?k+W.charAt(0).toUpperCase()+W.slice(1):W==="deviceId"?"sourceId":W};if(b.ideal!==void 0){w.optional=w.optional||[];var j={};typeof b.ideal=="number"?(j[D("min",_)]=b.ideal,w.optional.push(j),j={},j[D("max",_)]=b.ideal,w.optional.push(j)):(j[D("",_)]=b.ideal,w.optional.push(j))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[D("",_)]=b.exact):["min","max"].forEach(function(k){b[k]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[D(k,_)]=b[k])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&we(h.audio)==="object"){var _=function(k,W,L){W in k&&!(L in k)&&(k[L]=k[W],delete k[W])};h=JSON.parse(JSON.stringify(h)),_(h.audio,"autoGainControl","googAutoGainControl"),_(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&we(h.video)==="object"){var b=h.video.facingMode;b=b&&(we(b)==="object"?b:{ideal:b});var D=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!D)){delete h.video.facingMode;var j;if(b.exact==="environment"||b.ideal==="environment"?j=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(j=["front"]),j)return a.mediaDevices.enumerateDevices().then(function(k){k=k.filter(function(L){return L.kind==="videoinput"});var W=k.find(function(L){return j.some(function(P){return L.label.toLowerCase().includes(P)})});return!W&&k.length&&j.includes("back")&&(W=k[k.length-1]),W&&(h.video.deviceId=b.exact?{exact:W.deviceId}:{ideal:W.deviceId}),h.video=c(h.video),Fr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return Fr("chrome: "+JSON.stringify(h)),w(h)},m=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},v=function(h,w,_){f(h,function(b){a.webkitGetUserMedia(b,w,function(D){_&&_(m(D))})})};if(a.getUserMedia=v.bind(a),a.mediaDevices.getUserMedia){var C=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return C(w).then(function(_){if(w.audio&&!_.getAudioTracks().length||w.video&&!_.getVideoTracks().length)throw _.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return _},function(_){return Promise.reject(m(_))})})}}}}var cn={};Object.defineProperty(cn,"__esModule",{value:!0});var Di=cn.shimGetUserMedia=Fi,ji=Ri(ee);function un(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(un=function(c){return c?a:i})(r)}function Ri(r,i){if(r&&r.__esModule)return r;if(r===null||xe(r)!=="object"&&typeof r!="function")return{default:r};var a=un(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in r)if(m!=="default"&&Object.prototype.hasOwnProperty.call(r,m)){var v=f?Object.getOwnPropertyDescriptor(r,m):null;v&&(v.get||v.set)?Object.defineProperty(c,m,v):c[m]=r[m]}return c.default=r,a&&a.set(r,c),c}function xe(r){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},xe(r)}function Fi(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,_){ji.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,_)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,_){w in h&&!(_ in h)&&(h[_]=h[w],delete h[w])},m=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return xe(h)==="object"&&xe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),m(h)},c&&c.prototype.getSettings){var v=c.prototype.getSettings;c.prototype.getSettings=function(){var h=v.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var C=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&xe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),C.apply(this,[h])}}}}var le={};Object.defineProperty(le,"__esModule",{value:!0});le.shimAudioContext=Gi;le.shimCallbacksAPI=Ni;le.shimConstraints=fn;le.shimCreateOfferLegacy=zi;var Ii=le.shimGetUserMedia=Hi;le.shimLocalStreamsAPI=Ui;le.shimRTCIceServerUrls=Vi;le.shimRemoteStreamsAPI=Li;le.shimTrackEventTransceiver=Bi;var ln=Wi(ee);function dn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(dn=function(c){return c?a:i})(r)}function Wi(r,i){if(r&&r.__esModule)return r;if(r===null||Ce(r)!=="object"&&typeof r!="function")return{default:r};var a=dn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in r)if(m!=="default"&&Object.prototype.hasOwnProperty.call(r,m)){var v=f?Object.getOwnPropertyDescriptor(r,m):null;v&&(v.get||v.set)?Object.defineProperty(c,m,v):c[m]=r[m]}return c.default=r,a&&a.set(r,c),c}function Ce(r){"@babel/helpers - typeof";return Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ce(r)}function Ui(r){if(!(Ce(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,m=new Array(f>1?f-1:0),v=1;v<f;v++)m[v-1]=arguments[v];return m&&m.forEach(function(C){c._localStreams?c._localStreams.includes(C)||c._localStreams.push(C):c._localStreams=[C]}),i.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(a){var c=this;this._localStreams||(this._localStreams=[]);var f=this._localStreams.indexOf(a);if(f!==-1){this._localStreams.splice(f,1);var m=a.getTracks();this.getSenders().forEach(function(v){m.includes(v.track)&&c.removeTrack(v)})}})}}function Li(r){if(!(Ce(r)!=="object"||!r.RTCPeerConnection)&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(a){var c=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=a),this.addEventListener("track",this._onaddstreampoly=function(f){f.streams.forEach(function(m){if(c._remoteStreams||(c._remoteStreams=[]),!c._remoteStreams.includes(m)){c._remoteStreams.push(m);var v=new Event("addstream");v.stream=m,c.dispatchEvent(v)}})})}});var i=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){var a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(c){c.streams.forEach(function(f){if(a._remoteStreams||(a._remoteStreams=[]),!(a._remoteStreams.indexOf(f)>=0)){a._remoteStreams.push(f);var m=new Event("addstream");m.stream=f,a.dispatchEvent(m)}})}),i.apply(a,arguments)}}}function Ni(r){if(!(Ce(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,m=i.setRemoteDescription,v=i.addIceCandidate;i.createOffer=function(h,w){var _=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[_]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var _=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[_]);return w?(b.then(h,w),Promise.resolve()):b};var C=function(h,w,_){var b=f.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b};i.setLocalDescription=C,C=function(h,w,_){var b=m.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b},i.setRemoteDescription=C,C=function(h,w,_){var b=v.apply(this,[h]);return _?(b.then(w,_),Promise.resolve()):b},i.addIceCandidate=C}}function Hi(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(fn(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,m,v){i.mediaDevices.getUserMedia(f).then(m,v)}).bind(i))}function fn(r){return r&&r.video!==void 0?Object.assign({},r,{video:ln.compactObject(r.video)}):r}function Vi(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],m=0;m<a.iceServers.length;m++){var v=a.iceServers[m];v.urls===void 0&&v.url?(ln.deprecated("RTCIceServer.url","RTCIceServer.urls"),v=JSON.parse(JSON.stringify(v)),v.urls=v.url,delete v.url,f.push(v)):f.push(a.iceServers[m])}a.iceServers=f}return new i(a,c)},r.RTCPeerConnection.prototype=i.prototype,"generateCertificate"in i&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:function(){return i.generateCertificate}})}}function Bi(r){Ce(r)==="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function zi(r){var i=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(a){if(a){typeof a.offerToReceiveAudio<"u"&&(a.offerToReceiveAudio=!!a.offerToReceiveAudio);var c=this.getTransceivers().find(function(m){return m.receiver.track.kind==="audio"});a.offerToReceiveAudio===!1&&c?c.direction==="sendrecv"?c.setDirection?c.setDirection("sendonly"):c.direction="sendonly":c.direction==="recvonly"&&(c.setDirection?c.setDirection("inactive"):c.direction="inactive"):a.offerToReceiveAudio===!0&&!c&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);var f=this.getTransceivers().find(function(m){return m.receiver.track.kind==="video"});a.offerToReceiveVideo===!1&&f?f.direction==="sendrecv"?f.setDirection?f.setDirection("sendonly"):f.direction="sendonly":f.direction==="recvonly"&&(f.setDirection?f.setDirection("inactive"):f.direction="inactive"):a.offerToReceiveVideo===!0&&!f&&this.addTransceiver("video",{direction:"recvonly"})}return i.apply(this,arguments)}}function Gi(r){Ce(r)!=="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}const qi=r=>{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function me(r,i){if(r===!1)throw new Error(i??"assertion failure")}const Ji=qi(()=>{const r=gi(window);switch(r.browser){case"chrome":Ai(window,r);break;case"firefox":Di(window,r);break;case"safari":Ii(window,r);break;default:throw new tn}});let ke=Promise.resolve({type:"stop",data:{}});async function Ir(r,i,a){var c,f,m;if(window.isSecureContext!==!0)throw new pi;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new tn;Ji();const v=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=v:r.mozSrcObject!==void 0?r.mozSrcObject=v:window.URL.createObjectURL?r.src=window.URL.createObjectURL(v):window.webkitURL?r.src=window.webkitURL.createObjectURL(v):r.src=v.id,r.play(),await Promise.race([en(r,"loadeddata"),jr(3e3).then(()=>{throw new mi})]),await jr(500);const[C]=v.getVideoTracks(),h=(m=(f=C==null?void 0:C.getCapabilities)==null?void 0:f.call(C))!=null?m:{};let w=!1;return a&&h.torch&&(await C.applyConstraints({advanced:[{torch:!0}]}),w=!0),{type:"start",data:{videoEl:r,stream:v,capabilities:h,constraints:i,isTorchOn:w}}}async function Yi(r,{constraints:i,torch:a,restart:c=!1}){ke=ke.then(m=>{if(m.type==="start"){const{data:{videoEl:v,stream:C,constraints:h,isTorchOn:w}}=m;return!c&&r===v&&i===h&&a===w?m:hn(v,C,w).then(()=>Ir(r,i,a))}return Ir(r,i,a)});const f=await ke;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");return f.data.capabilities}async function hn(r,i,a){r.src="",r.srcObject=null,r.load(),await en(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function ut(){if(ke=ke.then(r=>{if(r.type==="stop")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return hn(i,a,c)}),(await ke).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const Qi=So({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=ne(a.constraints),m=ne(a.formats);Be(()=>a.constraints,(x,S)=>{JSON.stringify(x)!==JSON.stringify(S)&&(f.value=x)},{deep:!0}),Be(()=>a.formats,(x,S)=>{JSON.stringify(x)!==JSON.stringify(S)&&(m.value=x)},{deep:!0});const v=ne(),C=ne(),h=ne(),w=ne(!1),_=ne(!1);Wr(()=>{_.value=!0}),Po(()=>{ut()});const b=Ut(()=>({torch:a.torch,constraints:f.value,shouldStream:_.value&&!a.paused}));Be(b,async x=>{const S=h.value;me(S!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const A=v.value;me(A!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const N=A.getContext("2d");if(me(N!==null,"if cavnas is defined, canvas 2d context should also be non-null"),x.shouldStream){ut(),w.value=!1;try{const ae=await Yi(S,x);_.value?(w.value=!0,c("camera-on",ae)):await ut()}catch(ae){c("error",ae)}}else A.width=S.videoWidth,A.height=S.videoHeight,N.drawImage(S,0,0,S.videoWidth,S.videoHeight),ut(),w.value=!1,c("camera-off")},{deep:!0}),Be(m,x=>{_.value&&vi(x)});const D=Ut(()=>b.value.shouldStream&&w.value);Be(D,x=>{if(x){me(v.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),j(v.value),me(C.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),j(C.value);const S=()=>a.track===void 0?500:40;me(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),yi(h.value,{detectHandler:A=>c("detect",A),formats:m.value,locateHandler:k,minDelay:S()})}});const j=x=>{const S=x.getContext("2d");me(S!==null,"canvas 2d context should always be non-null"),S.clearRect(0,0,x.width,x.height)},k=x=>{const S=C.value;me(S!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const A=h.value;if(me(A!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),x.length===0||a.track===void 0)j(S);else{const N=A.offsetWidth,ae=A.offsetHeight,Pe=A.videoWidth,Ee=A.videoHeight,je=Math.max(N/Pe,ae/Ee),Re=Pe*je,Ge=Ee*je,ht=Re/Pe,pt=Ge/Ee,mt=(N-Re)/2,vt=(ae-Ge)/2,Fe=({x:ve,y:te})=>({x:Math.floor(ve*ht),y:Math.floor(te*pt)}),ie=({x:ve,y:te})=>({x:Math.floor(ve+mt),y:Math.floor(te+vt)}),_e=x.map(ve=>{const{boundingBox:te,cornerPoints:gt}=ve,{x:qe,y:ye}=ie(Fe({x:te.x,y:te.y})),{x:Je,y:wt}=Fe({x:te.width,y:te.height});return{...ve,cornerPoints:gt.map(Ye=>ie(Fe(Ye))),boundingBox:DOMRectReadOnly.fromRect({x:qe,y:ye,width:Je,height:wt})}});S.width=A.offsetWidth,S.height=A.offsetHeight;const yt=S.getContext("2d");a.track(_e,yt)}},W={width:"100%",height:"100%",position:"relative","z-index":"0"},L={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},P={width:"100%",height:"100%","object-fit":"cover"},F=Ut(()=>D.value?P:{...P,visibility:"hidden",position:"absolute"});return(x,S)=>(ue(),ge("div",{style:W},[I("video",{ref_key:"videoRef",ref:h,style:Eo(F.value),autoplay:"",muted:"",playsinline:""},null,4),Ht(I("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:v,style:P},null,512),[[Ur,!D.value]]),I("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:C,style:L},null,512),I("div",{style:L},[Oo(x.$slots,"default")])]))}}),Xi={class:"modal is-active"},Ki=I("div",{class:"modal-background"},null,-1),Zi={class:"modal-content"},es={class:"section"},ts={class:"columns is-centered"},rs={class:"column is-three-quarters"},ns={class:"modal-slot has-text-centered is-shadowless"},as={key:0},os={class:"block is-size-5"},is={key:0},ss={class:"is-size-7 mb-3"},cs={class:"is-size-7 mb-3"},us={class:"addressbar columns is-mobile is-gapless"},ls={class:"column is-narrow has-text-left circled"},ds=I("div",{class:"column has-text-left ml-3"}," http://my.2fauth.app/... ",-1),fs={class:"column is-narrow has-text-right"},hs={key:1,class:"is-size-7"},ps={class:"fullscreen-streamer"},ms={key:1,class:"field has-addons has-addons-centered mt-3"},vs={class:"control has-icons-left"},ys={class:"select"},gs=["value"],ws={class:"icon is-small is-left"},bs={class:"fullscreen-footer"},Ps={__name:"Capture",setup(r){const i=jo(),a=Wo(),c=Ao(),f=ne(!1),m=ne(null),v=ne([]),C=ne(""),h=Mo(new Ro({qrcode:null,uri:""})),w=ne(!1);Wr(async()=>{var P;(P=navigator.mediaDevices)!=null&&P.enumerateDevices?await navigator.mediaDevices.enumerateDevices().then(F=>{v.value=F.filter(({kind:x})=>x==="videoinput"),v.value.length>0?m.value=v.value[0]:C.value="no_cam_on_device"}).catch(F=>{_(F)}):C.value="secured_context_required"});const _=P=>{P.name==="NotAllowedError"?C.value="need_grant_permission":P.name==="NotFoundError"?C.value="no_cam_on_device":P.name==="NotSupportedError"||P.name==="InsecureContextError"?C.value="secured_context_required":P.name==="NotReadableError"?C.value="not_readable":P.name==="OverconstrainedError"?C.value="camera_not_suitable":P.name==="StreamApiNotSupportedError"?C.value="stream_api_not_supported":c.error(P)},b=async P=>{const[F]=P;h.uri=F.rawValue,h.uri?h.uri.slice(0,33).toLowerCase()=="otpauth-migration://offline?data="?(a.migrationUri=h.uri,i.push({name:"importAccounts"})):h.uri.slice(0,15).toLowerCase()!=="otpauth://totp/"&&h.uri.slice(0,15).toLowerCase()!=="otpauth://hotp/"?(w.value=!0,c.warn({text:Or("errors.no_valid_otp")})):(a.decodedUri=h.uri,i.push({name:"createAccount"})):c.warn({text:Or("errors.qrcode_cannot_be_read")})};function D(P){f.value=!0}function j(P){f.value=!1}function k(){i.go(-1)}const W=(P,F)=>{for(const x of P){const[S,...A]=x.cornerPoints;F.strokeStyle="red",F.beginPath(),F.moveTo(S.x,S.y);for(const{x:N,y:ae}of A)F.lineTo(N,ae);F.lineTo(S.x,S.y),F.closePath(),F.stroke()}};function L(){location.reload()}return(P,F)=>{const x=Nt("FontAwesomeIcon"),S=Nt("ButtonBackCloseCancel"),A=Nt("modal");return ue(),ge(Sr,null,[I("div",Xi,[Ki,I("div",Zi,[I("section",es,[I("div",ts,[I("div",rs,[I("div",ns,[Z(C)?(ue(),ge("div",as,[I("p",os,Se(P.$t("twofaccounts.stream.live_scan_cant_start")),1),pe(Z(Er),null,{default:Lt(({mode:N})=>[I("p",{class:Pr(["block",{"has-text-light":N=="dark"}])},Se(P.$t("twofaccounts.stream."+Z(C)+".reason")),3)]),_:1}),Z(C)=="need_grant_permission"?(ue(),ge("div",is,[I("p",ss,Se(P.$t("twofaccounts.stream.need_grant_permission.solution")),1),I("p",cs,Se(P.$t("twofaccounts.stream.need_grant_permission.click_camera_icon")),1),I("div",us,[I("div",ls,[pe(x,{icon:["fas","lock"],class:"ml-1",size:"xs"}),pe(x,{icon:["fas","video-slash"],class:"ml-3",size:"xs"})]),ds,I("div",fs,[pe(x,{icon:["far","star"],class:"mr-1"})])]),I("p",null,[I("a",{onClick:xo(L,["stop"])},Se(P.$t("commons.refresh")),1)])])):(ue(),ge("p",hs,Se(P.$t("twofaccounts.stream."+Z(C)+".solution")),1))])):(ue(),_r(Z(Er),{key:1},{default:Lt(({mode:N})=>[I("span",{class:Pr(["is-size-4",N=="dark"?"has-text-light":"has-text-grey-dark"])},[pe(Fo,{isVisible:!0,type:"raw",class:"is-size-1"})],2)]),_:1}))])])])])]),Ht(I("div",ps,[Z(m)!==null?(ue(),_r(Z(Qi),{key:0,track:W,onDetect:b,onError:_,onCameraOn:D,onCameraOff:j})):Tr("",!0),Z(f)&&Z(v).length>1?(ue(),ge("div",ms,[I("p",vs,[I("span",ys,[Ht(I("select",{"onUpdate:modelValue":F[0]||(F[0]=N=>$r(m)?m.value=N:null)},[(ue(!0),ge(Sr,null,ko(Z(v),N=>(ue(),ge("option",{key:N.label,value:N},Se(N.label?N.label:P.$t("commons.default")),9,gs))),128))],512),[[Do,Z(m)]])]),I("span",ws,[pe(x,{icon:["fas","camera"]})])])])):Tr("",!0)],512),[[Ur,!Z(C)]]),I("div",bs,[pe(S,{action:"cancel",isCapture:!0,useLinkTag:!1,onCanceled:F[1]||(F[1]=N=>k())})])]),pe(A,{modelValue:Z(w),"onUpdate:modelValue":F[2]||(F[2]=N=>$r(w)?w.value=N:null)},{default:Lt(()=>[pe(Io,{qrContent:Z(h).uri},null,8,["qrContent"])]),_:1},8,["modelValue"])],64)}}};export{Ps as default};
|