scanbot-web-sdk 7.0.0-dev.2 → 7.0.0-dev.4
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.
- package/@types/barcode-scanner-view.d.ts +6 -6
- package/@types/core-types.d.ts +28 -28
- package/@types/cropping-view.d.ts +2 -2
- package/@types/document-data-extractor-view.d.ts +3 -3
- package/@types/document-scanner-view.d.ts +6 -6
- package/@types/index.d.ts +7 -33
- package/@types/model/barcode/barcode-result.d.ts +3 -7
- package/@types/model/barcode/barcode.d.ts +4 -4
- package/@types/model/configuration/{barcode-scanner-configuration.d.ts → barcode-scanner-view-configuration.d.ts} +5 -5
- package/@types/model/configuration/document-data-extractor-view-configuration.d.ts +9 -0
- package/@types/model/configuration/{document-scanner-configuration.d.ts → document-scanner-view-configuration.d.ts} +7 -7
- package/@types/model/configuration/{mrz-scanner-configuration.d.ts → mrz-scanner-view-configuration.d.ts} +6 -6
- package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
- package/@types/model/configuration/text-pattern-scanner-view-configuration.d.ts +9 -0
- package/@types/model/configuration/vin-scanner-view-configuration.d.ts +9 -0
- package/@types/mrz-scanner-view.d.ts +3 -3
- package/@types/scanbot-sdk.d.ts +77 -77
- package/@types/service/document-data-extractor.d.ts +2 -2
- package/@types/service/document-quality-analyzer.d.ts +2 -2
- package/@types/service/ocr-engine.d.ts +3 -3
- package/@types/service/simple-mrz-recognizer.d.ts +3 -3
- package/@types/service/text-pattern-scanner.d.ts +3 -3
- package/@types/service/tiff-generator.d.ts +2 -2
- package/@types/service/vin-scanner.d.ts +3 -3
- package/@types/ui2/barcode/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/barcode/controllers/multiple-scanning-mode-controller.d.ts +2 -2
- package/@types/ui2/barcode/controllers/single-scanning-mode-controller.d.ts +2 -2
- package/@types/ui2/barcode/utils/camera-config.d.ts +1 -1
- package/@types/ui2/barcode/utils/styled-button.d.ts +1 -1
- package/@types/ui2/barcode/views/action-button/action-button-container.d.ts +2 -2
- package/@types/ui2/barcode/views/action-button/action-button.d.ts +1 -1
- package/@types/ui2/barcode/views/barcode-scanner.d.ts +3 -3
- package/@types/ui2/barcode/views/camera-permission-denied.d.ts +1 -1
- package/@types/ui2/barcode/views/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/ui2/barcode/views/form/dialog-button.d.ts +0 -1
- package/@types/ui2/barcode/views/navigation-bar.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +6 -0
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +2 -0
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/Geometry.d.ts +1 -1
- package/@types/ui2/configuration/barcode/ArTrackingOverlayConfiguration.d.ts +3 -24
- package/@types/ui2/configuration/barcode/BarcodeInfoMapping.d.ts +3 -3
- package/@types/ui2/configuration/barcode/BarcodeRecognizerConfiguration.d.ts +6 -13
- package/@types/ui2/configuration/barcode/BarcodeScannerConfiguration.d.ts +13 -13
- package/@types/ui2/configuration/barcode/BarcodeScannerUIResult.d.ts +8 -8
- package/@types/ui2/configuration/barcode/BarcodeUseCase.d.ts +3 -3
- package/@types/ui2/configuration/barcode/FindAndPickScanningModeUseCase.d.ts +8 -6
- package/@types/ui2/configuration/barcode/MultipleScanningModeUseCase.d.ts +11 -6
- package/@types/ui2/configuration/barcode/SingleScanningModeUseCase.d.ts +4 -4
- package/@types/ui2/configuration.d.ts +12 -20
- package/@types/ui2/document/model/sb-document.d.ts +3 -3
- package/@types/ui2/document/views/camera-screen/use-document-scanner-view.d.ts +1 -1
- package/@types/ui2/document/views/camera-screen/user-guidance-text.d.ts +1 -1
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/utils/barcode-utils.d.ts +2 -2
- package/@types/view/action-bar/bottom-action-bar.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +4 -4
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +5 -5
- package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
- package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
- package/@types/view/document-outline.d.ts +1 -1
- package/@types/view/polygon/animated-document-polygon.d.ts +1 -1
- package/@types/view/polygon/animated-path.d.ts +1 -1
- package/@types/worker/worker-bridge.d.ts +98 -98
- package/bundle/ScanbotSDK.min.js +4 -4
- package/bundle/ScanbotSDK.ui2.min.js +16 -16
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +1 -1
- package/@types/model/configuration/document-data-extractor-configuration.d.ts +0 -9
- package/@types/model/configuration/text-pattern-scanner-configuration.d.ts +0 -9
- package/@types/model/configuration/vin-scanner-configuration.d.ts +0 -9
- package/@types/ui2/configuration/barcode/ActionBarConfiguration.d.ts +0 -42
- package/@types/ui2/configuration/barcode/BarcodeItemMapper.d.ts +0 -6
- package/@types/ui2/configuration/barcode/BarcodeScannerTypes.d.ts +0 -2
- package/@types/ui2/configuration/barcode/BarcodeTypes.d.ts +0 -1
- package/@types/ui2/configuration/barcode/CameraConfiguration.d.ts +0 -60
- package/@types/ui2/configuration/barcode/CameraPermission.d.ts +0 -54
- package/@types/ui2/configuration/barcode/Common.d.ts +0 -359
- package/@types/ui2/configuration/barcode/CommonFieldType.d.ts +0 -1
- package/@types/ui2/configuration/barcode/GenericDocument.d.ts +0 -1
- package/@types/ui2/configuration/barcode/Geometry.d.ts +0 -1
- package/@types/ui2/configuration/barcode/ScanbotAlertDialog.d.ts +0 -49
- package/@types/ui2/configuration/barcode/TopBarConfiguration.d.ts +0 -55
- package/@types/ui2/configuration/barcode/UserGuidanceConfiguration.d.ts +0 -30
- package/@types/ui2/configuration/barcode/ViewFinderConfiguration.d.ts +0 -93
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e){function i(e,t=!1){const r=[];if(t)return r;return function e(t){if(t)if(t.constructor===ImageData)r.push(t.data.buffer);else if(t.constructor===ArrayBuffer)r.push(t);else if(ArrayBuffer.isView(t))r.push(t.buffer);else if(Array.isArray(t))for(let r=0;r<t.length;++r)e(t[r]);else if(t.constructor===Object)for(const r in t)t.hasOwnProperty(r)&&e(t[r])}(e),r}function n(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:i=!0}=t||{};let n="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){n+="-simd";i&&function(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}()&&(n+="-threads")}return n}r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,i,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var u,c=[],d=!1,m=-1;function l(){d&&u&&(d=!1,u.length?c=u.concat(c):m=-1,c.length&&h())}function h(){if(!d){var e=s(l);d=!0;for(var t=c.length;t;){for(u=c,c=[];++m<t;)u&&u[m].run();m=-1,t=c.length}u=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||d||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,r){"use strict";var i,n=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,r,n=e;n.ready=new Promise(((e,i)=>{t=e,r=i}));var o,a,s,u=Object.assign({},n),c="./this.program",d=(e,t)=>{throw t},m="";m=self.location.href,i&&(m=i),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)};var l,h=n.print||console.log.bind(console),f=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(c=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(l=n.wasmBinary);var p,g=n.noExitRuntime||!0;"object"!=typeof WebAssembly&&B("no native wasm support detected");var v,y,w,S,F,C,b,E,x,_=!1;function A(){var e=p.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=S=new Uint16Array(e),n.HEAP32=F=new Int32Array(e),n.HEAPU32=C=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=E=new Float64Array(e)}var D,T,k,P,z=[],M=[],O=[],R=0,Q=null,L=null;function $(e){R++,n.monitorRunDependencies&&n.monitorRunDependencies(R)}function Z(e){if(R--,n.monitorRunDependencies&&n.monitorRunDependencies(R),0==R&&(null!==Q&&(clearInterval(Q),Q=null),L)){var t=L;L=null,t()}}function B(e){n.onAbort&&n.onAbort(e),f(e="Aborted("+e+")"),_=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw r(t),t}function N(e){return e.startsWith("data:application/octet-stream;base64,")}function I(e){if(e==D&&l)return new Uint8Array(l);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function j(e,t,r){return function(e){return l||"function"!=typeof fetch?Promise.resolve().then((()=>I(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>I(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{f(`failed to asynchronously prepare wasm: ${e}`),B(e)}))}N(D="ScanbotSDK.Asm-simd.wasm")||(T=D,D=n.locateFile?n.locateFile(T,m):m+T);var W={1371016:e=>vr(function(){return this[pe(e)].toString()}.apply((0,eval)("(()=>this)()")))};function H(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var U=e=>{for(;e.length>0;)e.shift()(n)},V=[],q=0,Y=0;function G(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Qr(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var K=e=>{var t=Y;if(!t)return Ar(0),0;var r=new G(t);r.set_adjusted_ptr(t);var i=r.get_type();if(!i)return Ar(0),t;for(var n in e){var o=e[n];if(0===o||o===i)break;var a=r.ptr+16;if(Rr(o,i,a))return Ar(o),t}return Ar(i),t},X=()=>{var e=V.pop();e||B("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(V.push(e),e.set_rethrown(!0),e.set_caught(!1),q++),Y=t},J={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=J.isAbs(e),r="/"===e.substr(-1);return(e=J.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=J.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=J.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return J.normalize(e.join("/"))},join2:(e,t)=>J.normalize(e+"/"+t)},ee=e=>(ee=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);B("initRandomDevice")})())(e),te={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:fe.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=J.isAbs(i)}return(t?"/":"")+(e=J.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=te.resolve(e).substr(1),t=te.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),o=Math.min(i.length,n.length),a=o,s=0;s<o;s++)if(i[s]!==n[s]){a=s;break}var u=[];for(s=a;s<i.length;s++)u.push("..");return(u=u.concat(n.slice(a))).join("/")}},re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ie=(e,t,r)=>{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&re)return re.decode(e.subarray(t,n));for(var o="";t<n;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ne=[],oe=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++r):t+=3}return t},ae=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,o=r+i-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-n};function se(e,t,r){var i=r>0?r:oe(e)+1,n=new Array(i),o=ae(e,n,0,n.length);return t&&(n.length=o),n}var ue={ttys:[],init(){},shutdown(){},register(e,t){ue.ttys[e]={input:[],output:[],ops:t},fe.registerDevice(e,ue.stream_ops)},stream_ops:{open(e){var t=ue.ttys[e.node.rdev];if(!t)throw new fe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new fe.ErrnoError(60);for(var o=0,a=0;a<i;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new fe.ErrnoError(29)}if(void 0===s&&0===o)throw new fe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,i,n){if(!e.tty||!e.tty.ops.put_char)throw new fe.ErrnoError(60);try{for(var o=0;o<i;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new fe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!ne.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ne=se(e,!0)}return ne.shift()})(),put_char(e,t){null===t||10===t?(h(ie(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(h(ie(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(f(ie(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(f(ie(e.output,0)),e.output=[])}}},ce=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=Tr(65536,e);return t?((e,t)=>(y.fill(0,e,e+t),e))(t,e):0},de={ops_table:null,mount:e=>de.createNode(null,"/",16895,0),createNode(e,t,r,i){if(fe.isBlkdev(r)||fe.isFIFO(r))throw new fe.ErrnoError(63);de.ops_table||(de.ops_table={dir:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,lookup:de.node_ops.lookup,mknod:de.node_ops.mknod,rename:de.node_ops.rename,unlink:de.node_ops.unlink,rmdir:de.node_ops.rmdir,readdir:de.node_ops.readdir,symlink:de.node_ops.symlink},stream:{llseek:de.stream_ops.llseek}},file:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:{llseek:de.stream_ops.llseek,read:de.stream_ops.read,write:de.stream_ops.write,allocate:de.stream_ops.allocate,mmap:de.stream_ops.mmap,msync:de.stream_ops.msync}},link:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,readlink:de.node_ops.readlink},stream:{}},chrdev:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:fe.chrdev_stream_ops}});var n=fe.createNode(e,t,r,i);return fe.isDir(n.mode)?(n.node_ops=de.ops_table.dir.node,n.stream_ops=de.ops_table.dir.stream,n.contents={}):fe.isFile(n.mode)?(n.node_ops=de.ops_table.file.node,n.stream_ops=de.ops_table.file.stream,n.usedBytes=0,n.contents=null):fe.isLink(n.mode)?(n.node_ops=de.ops_table.link.node,n.stream_ops=de.ops_table.link.stream):fe.isChrdev(n.mode)&&(n.node_ops=de.ops_table.chrdev.node,n.stream_ops=de.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=fe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,fe.isDir(e.mode)?t.size=4096:fe.isFile(e.mode)?t.size=e.usedBytes:fe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&de.resizeFileStorage(e,t.size)},lookup(e,t){throw fe.genericErrors[44]},mknod:(e,t,r,i)=>de.createNode(e,t,r,i),rename(e,t,r){if(fe.isDir(e.mode)){var i;try{i=fe.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=fe.lookupNode(e,t);for(var i in r.contents)throw new fe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=de.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!fe.isLink(e.mode))throw new fe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var o=e.node.contents;if(n>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,i);if(a>8&&o.subarray)t.set(o.subarray(n,n+a),r);else for(var s=0;s<a;s++)t[r+s]=o[n+s];return a},write(e,t,r,i,n,o){if(t.buffer===v.buffer&&(o=!1),!i)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return a.contents=t.subarray(r,r+i),a.usedBytes=i,i;if(0===a.usedBytes&&0===n)return a.contents=t.slice(r,r+i),a.usedBytes=i,i;if(n+i<=a.usedBytes)return a.contents.set(t.subarray(r,r+i),n),i}if(de.expandFileStorage(a,n+i),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+i),n);else for(var s=0;s<i;s++)a.contents[n+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,n+i),i},llseek(e,t,r){var i=t;if(1===r?i+=e.position:2===r&&fe.isFile(e.node.mode)&&(i+=e.node.usedBytes),i<0)throw new fe.ErrnoError(28);return i},allocate(e,t,r){de.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,t,r,i,n){if(!fe.isFile(e.node.mode))throw new fe.ErrnoError(43);var o,a,s=e.node.contents;if(2&n||s.buffer!==v.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(o=ce(t)))throw new fe.ErrnoError(48);v.set(s,o)}else a=!1,o=s.byteOffset;return{ptr:o,allocated:a}},msync:(e,t,r,i,n)=>(de.stream_ops.write(e,t,0,i,r,!1),0)}},me=(e,t,r,i)=>{var n=i?"":`al ${e}`;a(e,(r=>{var i;i=`Loading data file "${e}" failed (no arrayBuffer).`,r||B(i),t(new Uint8Array(r)),n&&Z()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&$()},le=n.preloadPlugins||[],he=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=te.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new fe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=fe.root,n="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(i=fe.lookupNode(i,r[o]),n=J.join2(n,r[o]),fe.isMountpoint(i)&&(!a||a&&t.follow_mount)&&(i=i.mounted.root),!a||t.follow)for(var s=0;fe.isLink(i.mode);){var u=fe.readlink(n);if(n=te.resolve(J.dirname(n),u),i=fe.lookupPath(n,{recurse_count:t.recurse_count+1}).node,s++>40)throw new fe.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(fe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%fe.nameTable.length},hashAddNode(e){var t=fe.hashName(e.parent.id,e.name);e.name_next=fe.nameTable[t],fe.nameTable[t]=e},hashRemoveNode(e){var t=fe.hashName(e.parent.id,e.name);if(fe.nameTable[t]===e)fe.nameTable[t]=e.name_next;else for(var r=fe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=fe.mayLookup(e);if(r)throw new fe.ErrnoError(r,e);for(var i=fe.hashName(e.id,t),n=fe.nameTable[i];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===t)return n}return fe.lookup(e,t)},createNode(e,t,r,i){var n=new fe.FSNode(e,t,r,i);return fe.hashAddNode(n),n},destroyNode(e){fe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>fe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=fe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return fe.lookupNode(e,t),20}catch(e){}return fe.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=fe.lookupNode(e,t)}catch(e){return e.errno}var n=fe.nodePermissions(e,"wx");if(n)return n;if(r){if(!fe.isDir(i.mode))return 54;if(fe.isRoot(i)||fe.getPath(i)===fe.cwd())return 10}else if(fe.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?fe.isLink(e.mode)?32:fe.isDir(e.mode)&&("r"!==fe.flagsToPermissionString(t)||512&t)?31:fe.nodePermissions(e,fe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=fe.MAX_OPEN_FDS;e++)if(!fe.streams[e])return e;throw new fe.ErrnoError(33)},getStreamChecked(e){var t=fe.getStream(e);if(!t)throw new fe.ErrnoError(8);return t},getStream:e=>fe.streams[e],createStream:(e,t=-1)=>(fe.FSStream||(fe.FSStream=function(){this.shared={}},fe.FSStream.prototype={},Object.defineProperties(fe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new fe.FSStream,e),-1==t&&(t=fe.nextfd()),e.fd=t,fe.streams[t]=e,e),closeStream(e){fe.streams[e]=null},chrdev_stream_ops:{open(e){var t=fe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){fe.devices[e]={stream_ops:t}},getDevice:e=>fe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),fe.syncFSRequests++,fe.syncFSRequests>1&&f(`warning: ${fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=fe.getMounts(fe.root.mount),i=0;function n(e){return fe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var i,n="/"===r,o=!r;if(n&&fe.root)throw new fe.ErrnoError(10);if(!n&&!o){var a=fe.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,fe.isMountpoint(i))throw new fe.ErrnoError(10);if(!fe.isDir(i.mode))throw new fe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,n?fe.root=u:i&&(i.mounted=s,i.mount&&i.mount.mounts.push(s)),u},unmount(e){var t=fe.lookupPath(e,{follow_mount:!1});if(!fe.isMountpoint(t.node))throw new fe.ErrnoError(28);var r=t.node,i=r.mounted,n=fe.getMounts(i);Object.keys(fe.nameTable).forEach((e=>{for(var t=fe.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&fe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(i);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=fe.lookupPath(e,{parent:!0}).node,n=J.basename(e);if(!n||"."===n||".."===n)throw new fe.ErrnoError(28);var o=fe.mayCreate(i,n);if(o)throw new fe.ErrnoError(o);if(!i.node_ops.mknod)throw new fe.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,fe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,fe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n<r.length;++n)if(r[n]){i+="/"+r[n];try{fe.mkdir(i,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,fe.mknod(e,t,r)),symlink(e,t){if(!te.resolve(e))throw new fe.ErrnoError(44);var r=fe.lookupPath(t,{parent:!0}).node;if(!r)throw new fe.ErrnoError(44);var i=J.basename(t),n=fe.mayCreate(r,i);if(n)throw new fe.ErrnoError(n);if(!r.node_ops.symlink)throw new fe.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=J.dirname(e),o=J.dirname(t),a=J.basename(e),s=J.basename(t);if(r=fe.lookupPath(e,{parent:!0}).node,i=fe.lookupPath(t,{parent:!0}).node,!r||!i)throw new fe.ErrnoError(44);if(r.mount!==i.mount)throw new fe.ErrnoError(75);var u,c=fe.lookupNode(r,a),d=te.relative(e,o);if("."!==d.charAt(0))throw new fe.ErrnoError(28);if("."!==(d=te.relative(t,n)).charAt(0))throw new fe.ErrnoError(55);try{u=fe.lookupNode(i,s)}catch(e){}if(c!==u){var m=fe.isDir(c.mode),l=fe.mayDelete(r,a,m);if(l)throw new fe.ErrnoError(l);if(l=u?fe.mayDelete(i,s,m):fe.mayCreate(i,s))throw new fe.ErrnoError(l);if(!r.node_ops.rename)throw new fe.ErrnoError(63);if(fe.isMountpoint(c)||u&&fe.isMountpoint(u))throw new fe.ErrnoError(10);if(i!==r&&(l=fe.nodePermissions(r,"w")))throw new fe.ErrnoError(l);fe.hashRemoveNode(c);try{r.node_ops.rename(c,i,s)}catch(e){throw e}finally{fe.hashAddNode(c)}}},rmdir(e){var t=fe.lookupPath(e,{parent:!0}).node,r=J.basename(e),i=fe.lookupNode(t,r),n=fe.mayDelete(t,r,!0);if(n)throw new fe.ErrnoError(n);if(!t.node_ops.rmdir)throw new fe.ErrnoError(63);if(fe.isMountpoint(i))throw new fe.ErrnoError(10);t.node_ops.rmdir(t,r),fe.destroyNode(i)},readdir(e){var t=fe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new fe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=fe.lookupPath(e,{parent:!0}).node;if(!t)throw new fe.ErrnoError(44);var r=J.basename(e),i=fe.lookupNode(t,r),n=fe.mayDelete(t,r,!1);if(n)throw new fe.ErrnoError(n);if(!t.node_ops.unlink)throw new fe.ErrnoError(63);if(fe.isMountpoint(i))throw new fe.ErrnoError(10);t.node_ops.unlink(t,r),fe.destroyNode(i)},readlink(e){var t=fe.lookupPath(e).node;if(!t)throw new fe.ErrnoError(44);if(!t.node_ops.readlink)throw new fe.ErrnoError(28);return te.resolve(fe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=fe.lookupPath(e,{follow:!t}).node;if(!r)throw new fe.ErrnoError(44);if(!r.node_ops.getattr)throw new fe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>fe.stat(e,!0),chmod(e,t,r){var i;if(!(i="string"==typeof e?fe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){fe.chmod(e,t,!0)},fchmod(e,t){var r=fe.getStreamChecked(e);fe.chmod(r.node,t)},chown(e,t,r,i){var n;if(!(n="string"==typeof e?fe.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){fe.chown(e,t,r,!0)},fchown(e,t,r){var i=fe.getStreamChecked(e);fe.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new fe.ErrnoError(28);var r;if(!(r="string"==typeof e?fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);if(fe.isDir(r.mode))throw new fe.ErrnoError(31);if(!fe.isFile(r.mode))throw new fe.ErrnoError(28);var i=fe.nodePermissions(r,"w");if(i)throw new fe.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=fe.getStreamChecked(e);if(0==(2097155&r.flags))throw new fe.ErrnoError(28);fe.truncate(r.node,t)},utime(e,t,r){var i=fe.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new fe.ErrnoError(44);var i;if(r="undefined"==typeof r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=J.normalize(e);try{i=fe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(i){if(128&t)throw new fe.ErrnoError(20)}else i=fe.mknod(e,r,0),o=!0;if(!i)throw new fe.ErrnoError(44);if(fe.isChrdev(i.mode)&&(t&=-513),65536&t&&!fe.isDir(i.mode))throw new fe.ErrnoError(54);if(!o){var a=fe.mayOpen(i,t);if(a)throw new fe.ErrnoError(a)}512&t&&!o&&fe.truncate(i,0),t&=-131713;var s=fe.createStream({node:i,path:fe.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&t||(fe.readFiles||(fe.readFiles={}),e in fe.readFiles||(fe.readFiles[e]=1)),s},close(e){if(fe.isClosed(e))throw new fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(fe.isClosed(e))throw new fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new fe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new fe.ErrnoError(28);if(fe.isClosed(e))throw new fe.ErrnoError(8);if(1==(2097155&e.flags))throw new fe.ErrnoError(8);if(fe.isDir(e.node.mode))throw new fe.ErrnoError(31);if(!e.stream_ops.read)throw new fe.ErrnoError(28);var o="undefined"!=typeof n;if(o){if(!e.seekable)throw new fe.ErrnoError(70)}else n=e.position;var a=e.stream_ops.read(e,t,r,i,n);return o||(e.position+=a),a},write(e,t,r,i,n,o){if(i<0||n<0)throw new fe.ErrnoError(28);if(fe.isClosed(e))throw new fe.ErrnoError(8);if(0==(2097155&e.flags))throw new fe.ErrnoError(8);if(fe.isDir(e.node.mode))throw new fe.ErrnoError(31);if(!e.stream_ops.write)throw new fe.ErrnoError(28);e.seekable&&1024&e.flags&&fe.llseek(e,0,2);var a="undefined"!=typeof n;if(a){if(!e.seekable)throw new fe.ErrnoError(70)}else n=e.position;var s=e.stream_ops.write(e,t,r,i,n,o);return a||(e.position+=s),s},allocate(e,t,r){if(fe.isClosed(e))throw new fe.ErrnoError(8);if(t<0||r<=0)throw new fe.ErrnoError(28);if(0==(2097155&e.flags))throw new fe.ErrnoError(8);if(!fe.isFile(e.node.mode)&&!fe.isDir(e.node.mode))throw new fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new fe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new fe.ErrnoError(2);if(1==(2097155&e.flags))throw new fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new fe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new fe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=fe.open(e,t.flags),n=fe.stat(e).size,o=new Uint8Array(n);return fe.read(i,o,0,n,0),"utf8"===t.encoding?r=ie(o,0):"binary"===t.encoding&&(r=o),fe.close(i),r},writeFile(e,t,r={}){r.flags=r.flags||577;var i=fe.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(oe(t)+1),o=ae(t,n,0,n.length);fe.write(i,n,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");fe.write(i,t,0,t.byteLength,void 0,r.canOwn)}fe.close(i)},cwd:()=>fe.currentPath,chdir(e){var t=fe.lookupPath(e,{follow:!0});if(null===t.node)throw new fe.ErrnoError(44);if(!fe.isDir(t.node.mode))throw new fe.ErrnoError(54);var r=fe.nodePermissions(t.node,"x");if(r)throw new fe.ErrnoError(r);fe.currentPath=t.path},createDefaultDirectories(){fe.mkdir("/tmp"),fe.mkdir("/home"),fe.mkdir("/home/web_user")},createDefaultDevices(){fe.mkdir("/dev"),fe.registerDevice(fe.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),fe.mkdev("/dev/null",fe.makedev(1,3)),ue.register(fe.makedev(5,0),ue.default_tty_ops),ue.register(fe.makedev(6,0),ue.default_tty1_ops),fe.mkdev("/dev/tty",fe.makedev(5,0)),fe.mkdev("/dev/tty1",fe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ee(e).byteLength),e[--t]);fe.createDevice("/dev","random",r),fe.createDevice("/dev","urandom",r),fe.mkdir("/dev/shm"),fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){fe.mkdir("/proc");var e=fe.mkdir("/proc/self");fe.mkdir("/proc/self/fd"),fe.mount({mount(){var t=fe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=fe.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?fe.createDevice("/dev","stdin",n.stdin):fe.symlink("/dev/tty","/dev/stdin"),n.stdout?fe.createDevice("/dev","stdout",null,n.stdout):fe.symlink("/dev/tty","/dev/stdout"),n.stderr?fe.createDevice("/dev","stderr",null,n.stderr):fe.symlink("/dev/tty1","/dev/stderr"),fe.open("/dev/stdin",0),fe.open("/dev/stdout",1),fe.open("/dev/stderr",1)},ensureErrnoError(){fe.ErrnoError||(fe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},fe.ErrnoError.prototype=new Error,fe.ErrnoError.prototype.constructor=fe.ErrnoError,[44].forEach((e=>{fe.genericErrors[e]=new fe.ErrnoError(e),fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){fe.ensureErrnoError(),fe.nameTable=new Array(4096),fe.mount(de,{},"/"),fe.createDefaultDirectories(),fe.createDefaultDevices(),fe.createSpecialDirectories(),fe.filesystems={MEMFS:de}},init(e,t,r){fe.init.initialized=!0,fe.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,fe.createStandardStreams()},quit(){fe.init.initialized=!1;for(var e=0;e<fe.streams.length;e++){var t=fe.streams[e];t&&fe.close(t)}},findObject(e,t){var r=fe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(i=fe.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=fe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=i.path,r.parentObject=i.node,r.name=J.basename(e),i=fe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=i.path,r.object=i.node,r.name=i.node.name,r.isRoot="/"===i.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,i){e="string"==typeof e?e:fe.getPath(e);for(var n=t.split("/").reverse();n.length;){var o=n.pop();if(o){var a=J.join2(e,o);try{fe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,i,n){var o=J.join2("string"==typeof e?e:fe.getPath(e),t),a=he(i,n);return fe.create(o,a)},createDataFile(e,t,r,i,n,o){var a=t;e&&(e="string"==typeof e?e:fe.getPath(e),a=t?J.join2(e,t):e);var s=he(i,n),u=fe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),d=0,m=r.length;d<m;++d)c[d]=r.charCodeAt(d);r=c}fe.chmod(u,146|s);var l=fe.open(u,577);fe.write(l,r,0,r.length,0,o),fe.close(l),fe.chmod(u,s)}return u},createDevice(e,t,r,i){var n=J.join2("string"==typeof e?e:fe.getPath(e),t),o=he(!!r,!!i);fe.createDevice.major||(fe.createDevice.major=64);var a=fe.makedev(fe.createDevice.major++,0);return fe.registerDevice(a,{open(e){e.seekable=!1},close(e){i&&i.buffer&&i.buffer.length&&i(10)},read(e,t,i,n,o){for(var a=0,s=0;s<n;s++){var u;try{u=r()}catch(e){throw new fe.ErrnoError(29)}if(void 0===u&&0===a)throw new fe.ErrnoError(6);if(null==u)break;a++,t[i+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,n,o){for(var a=0;a<n;a++)try{i(t[r+a])}catch(e){throw new fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}}),fe.mkdev(n,o,a)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=se(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new fe.ErrnoError(29)}},createLazyFile(e,t,r,i,n){function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;n||(a=i);var s=this;s.setDataGetter((e=>{var t=e*a,n=(e+1)*a-1;if(n=Math.min(n,i-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==a&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):se(n.responseText||"",!0)})(t,n)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&i||(a=i=1,i=this.getter(0).length,a=i,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var a=new o;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=fe.createFile(e,t,s,i,n);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function d(e,t,r,i,n){var o=e.node.contents;if(n>=o.length)return 0;var a=Math.min(o.length-n,i);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[n+s];else for(s=0;s<a;s++)t[r+s]=o.get(n+s);return a}return Object.keys(u.stream_ops).forEach((e=>{var t=u.stream_ops[e];c[e]=function(){return fe.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(e,t,r,i,n)=>(fe.forceLoadFile(u),d(e,t,r,i,n)),c.mmap=(e,t,r,i,n)=>{fe.forceLoadFile(u);var o=ce(t);if(!o)throw new fe.ErrnoError(48);return d(e,v,o,t,r),{ptr:o,allocated:!0}},u.stream_ops=c,u}},pe=(e,t)=>e?ie(y,e,t):"",ge={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(J.isAbs(t))return t;var i;if(i=-100===e?fe.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!r)throw new fe.ErrnoError(44);return i}return J.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&J.normalize(t)!==J.normalize(fe.getPath(e.node)))return-54;throw e}F[r>>2]=i.dev,F[r+4>>2]=i.mode,C[r+8>>2]=i.nlink,F[r+12>>2]=i.uid,F[r+16>>2]=i.gid,F[r+20>>2]=i.rdev,P=[i.size>>>0,(k=i.size,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+24>>2]=P[0],F[r+28>>2]=P[1],F[r+32>>2]=4096,F[r+36>>2]=i.blocks;var n=i.atime.getTime(),o=i.mtime.getTime(),a=i.ctime.getTime();return P=[Math.floor(n/1e3)>>>0,(k=Math.floor(n/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+40>>2]=P[0],F[r+44>>2]=P[1],C[r+48>>2]=n%1e3*1e3,P=[Math.floor(o/1e3)>>>0,(k=Math.floor(o/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+56>>2]=P[0],F[r+60>>2]=P[1],C[r+64>>2]=o%1e3*1e3,P=[Math.floor(a/1e3)>>>0,(k=Math.floor(a/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+72>>2]=P[0],F[r+76>>2]=P[1],C[r+80>>2]=a%1e3*1e3,P=[i.ino>>>0,(k=i.ino,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+88>>2]=P[0],F[r+92>>2]=P[1],0},doMsync(e,t,r,i,n){if(!fe.isFile(t.node.mode))throw new fe.ErrnoError(43);if(2&i)return 0;var o=y.slice(e,e+r);fe.msync(t,o,n,r,i)},varargs:void 0,get(){var e=F[ge.varargs>>2];return ge.varargs+=4,e},getp:()=>ge.get(),getStr:e=>pe(e),getStreamFromFD:e=>fe.getStreamChecked(e)},ve={},ye=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function we(e){return this.fromWireType(F[e>>2])}var Se={},Fe={},Ce={},be=void 0,Ee=e=>{throw new be(e)},xe=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ee("Mismatched type converter count");for(var n=0;n<e.length;++n)ke(e[n],i[n])}e.forEach((function(e){Ce[e]=t}));var n=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{Fe.hasOwnProperty(e)?n[t]=Fe[e]:(o.push(e),Se.hasOwnProperty(e)||(Se[e]=[]),Se[e].push((()=>{n[t]=Fe[e],++a===o.length&&i(n)})))})),0===o.length&&i(n)},_e=void 0,Ae=e=>{for(var t="",r=e;y[r];)t+=_e[y[r++]];return t},De=void 0,Te=e=>{throw new De(e)};function ke(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var i=t.name;if(e||Te(`type "${i}" must have a positive integer typeid pointer`),Fe.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Te(`Cannot register type '${i}' twice`)}if(Fe[e]=t,delete Ce[e],Se.hasOwnProperty(e)){var n=Se[e];delete Se[e],n.forEach((e=>e()))}}(e,t,r)}var Pe=8;function ze(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n}var Me=e=>{Te(e.$$.ptrType.registeredClass.name+" instance already deleted")},Oe=!1,Re=e=>{},Qe=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},Le=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=Le(e,t,r.baseClass);return null===i?null:r.downcast(i)},$e={},Ze=()=>Object.keys(He).length,Be=()=>{var e=[];for(var t in He)He.hasOwnProperty(t)&&e.push(He[t]);return e},Ne=[],Ie=()=>{for(;Ne.length;){var e=Ne.pop();e.$$.deleteScheduled=!1,e.delete()}},je=void 0,We=e=>{je=e,Ne.length&&je&&je(Ie)},He={},Ue=(e,t)=>(t=((e,t)=>{for(void 0===t&&Te("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),He[t]),Ve=(e,t)=>(t.ptrType&&t.ptr||Ee("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ee("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ye(Object.create(e,{$$:{value:t}})));function qe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Ue(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?Ve(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ve(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=$e[a];if(!s)return n.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=Le(t,this.registeredClass,o.registeredClass);return null===u?n.call(this):this.isSmartPointer?Ve(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):Ve(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var Ye=e=>"undefined"==typeof FinalizationRegistry?(Ye=e=>e,e):(Oe=new FinalizationRegistry((e=>{Qe(e.$$)})),Ye=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Oe.register(e,r,e)}return e},Re=e=>Oe.unregister(e),Ye(e));function Ge(){if(this.$$.ptr||Me(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Ye(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Ke(){this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Te("Object already scheduled for deletion"),Re(this),Qe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Xe(){return!this.$$.ptr}function Je(){return this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Te("Object already scheduled for deletion"),Ne.push(this),1===Ne.length&&je&&je(Ie),this.$$.deleteScheduled=!0,this}function et(){}var tt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e};function rt(e,t){return{[e=tt(e)]:function(){return t.apply(this,arguments)}}[e]}var it=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Te(`Function '${r}' 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[i.argCount]=i}},nt=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&Te(`Cannot register public name '${e}' twice`),it(n,e,e),n.hasOwnProperty(r)&&Te(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function ot(e,t,r,i,n,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var at=(e,t,r)=>{for(;t!==r;)t.upcast||Te(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function st(e,t){if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function ut(e,t){var r;if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Te(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=at(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Te("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Te(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,kt.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Te("Unsupporting sharing policy")}return r}function ct(e,t){if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Te(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function dt(e){return this.fromWireType(C[e>>2])}function mt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function lt(e){this.rawDestructor&&this.rawDestructor(e)}var ht=e=>{null!==e&&e.delete()};function ft(e,t,r,i,n,o,a,s,u,c,d){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=d,n||void 0!==t.baseClass?this.toWireType=ut:i?(this.toWireType=st,this.destructorFunction=null):(this.toWireType=ct,this.destructorFunction=null)}var pt=(e,t,r)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},gt=e=>x.get(e),vt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)})(e,t,r):gt(t).apply(null,r),yt=(e,t)=>{var r,i,n,o=(e=Ae(e)).includes("j")?(r=e,i=t,n=[],function(){return n.length=0,Object.assign(n,arguments),vt(r,i,n)}):gt(t);return"function"!=typeof o&&Te(`unknown function pointer with signature ${e}: ${t}`),o},wt=void 0,St=e=>{var t=Dr(e),r=Ae(t);return xr(t),r},Ft=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Fe[t]||(Ce[t]?Ce[t].forEach(e):(r.push(t),i[t]=!0))})),new wt(`${e}: `+r.map(St).join([", "]))},Ct=(e,t)=>{for(var r=[],i=0;i<e;i++)r.push(C[t+4*i>>2]);return r};function bt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=rt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Et(e,t,r,i,n,o){var a=t.length;a<2&&Te("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var d="void"!==t[0].name,m="",l="";for(c=0;c<a-2;++c)m+=(0!==c?", ":"")+"arg"+c,l+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${tt(e)}(${m}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(h+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[Te,i,n,ye,t[0],t[1]];for(s&&(h+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),g.push(t[c+2]);if(s&&(l="thisWired"+(l.length>0?", ":"")+l),h+=(d||o?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return d&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",p.push(h),bt(Function,p).apply(null,g)}function xt(){this.allocated=[void 0],this.freelist=[]}var _t,At=new xt,Dt=e=>{e>=At.reserved&&0==--At.get(e).refcount&&At.free(e)},Tt=()=>{for(var e=0,t=At.reserved;t<At.allocated.length;++t)void 0!==At.allocated[t]&&++e;return e},kt={toValue:e=>(e||Te("Cannot use deleted val. handle = "+e),At.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 At.allocate({refcount:1,value:e})}}},Pt=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},zt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(E[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Mt=(e,t,r)=>{switch(t){case 1:return r?e=>v[e>>0]:e=>y[e>>0];case 2:return r?e=>w[e>>1]:e=>S[e>>1];case 4:return r?e=>F[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Ot=(e,t,r)=>ae(e,y,t,r),Rt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Qt=(e,t)=>{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&S[i];)++i;if((r=i<<1)-e>32&&Rt)return Rt.decode(y.subarray(e,r));for(var o="",a=0;!(a>=t/2);++a){var s=w[e+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}return o},Lt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,o=0;o<n;++o){var a=e.charCodeAt(o);w[t>>1]=a,t+=2}return w[t>>1]=0,t-i},$t=e=>2*e.length,Zt=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=F[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var o=n-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(n)}return i},Bt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),F[t>>2]=a,(t+=4)+4>n)break}return F[t>>2]=0,t-i},Nt=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=55296&&i<=57343&&++r,t+=4}return t},It=(e,t)=>{var r=Fe[e];return void 0===r&&Te(t+" has unknown type "+St(e)),r},jt={},Wt=e=>{var t=jt[e];return void 0===t?Ae(e):t},Ht=[],Ut=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Vt=[],qt=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Yt=e=>e%4==0&&(e%100!=0||e%400==0),Gt=[0,31,60,91,121,152,182,213,244,274,305,335],Kt=[0,31,59,90,120,151,181,212,243,273,304,334],Xt=e=>(Yt(e.getFullYear())?Gt:Kt)[e.getMonth()]+e.getDate()-1,Jt=e=>{var t=oe(e)+1,r=Er(t);return r&&Ot(e,r,t),r},er=[],tr=(e,t,r)=>{var i=((e,t)=>{var r;for(er.length=0;r=y[e++];)t+=105!=r&&t%8?4:0,er.push(105==r?F[t>>2]:E[t>>3]),t+=105==r?4:8;return er})(t,r);return W[e].apply(null,i)};_t=()=>performance.now();var rr,ir,nr,or=e=>{B("OOM")},ar=e=>{var t=(e-p.buffer.byteLength+65535)/65536;try{return p.grow(t),A(),1}catch(e){}},sr={},ur=()=>{if(!ur.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var t in sr)void 0===sr[t]?delete e[t]:e[t]=sr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);ur.strings=r}return ur.strings},cr=e=>{g||(n.onExit&&n.onExit(e),_=!0),d(e,new H(e))},dr=(e,t)=>{cr(e)},mr=(e,t)=>{for(var r=0,i=0;i<=t;r+=e[i++]);return r},lr=[31,29,31,30,31,30,31,31,30,31,30,31],hr=[31,28,31,30,31,30,31,31,30,31,30,31],fr=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var i=Yt(r.getFullYear()),n=r.getMonth(),o=(i?lr:hr)[n];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),n<11?r.setMonth(n+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r},pr=(e,t,r,i)=>{var n=C[i+40>>2],o={tm_sec:F[i>>2],tm_min:F[i+4>>2],tm_hour:F[i+8>>2],tm_mday:F[i+12>>2],tm_mon:F[i+16>>2],tm_year:F[i+20>>2],tm_wday:F[i+24>>2],tm_yday:F[i+28>>2],tm_isdst:F[i+32>>2],tm_gmtoff:F[i+36>>2],tm_zone:n?pe(n):""},a=pe(r),s={"%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 u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(e,t,r){for(var i="number"==typeof e?e.toString():e||"";i.length<t;)i=r[0]+i;return i}function l(e,t){return m(e,t,"0")}function h(e,t){function r(e){return e<0?-1:e>0?1:0}var i;return 0===(i=r(e.getFullYear()-t.getFullYear()))&&0===(i=r(e.getMonth()-t.getMonth()))&&(i=r(e.getDate()-t.getDate())),i}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=fr(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),n=f(r),o=f(i);return h(n,t)<=0?h(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":e=>c[e.tm_wday].substring(0,3),"%A":e=>c[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>l((e.tm_year+1900)/100|0,2),"%d":e=>l(e.tm_mday,2),"%e":e=>m(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>l(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),l(t,2)},"%j":e=>l(e.tm_mday+mr(Yt(e.tm_year+1900)?lr:hr,e.tm_mon-1),3),"%m":e=>l(e.tm_mon+1,2),"%M":e=>l(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>l(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return l(Math.floor(t/7),2)},"%V":e=>{var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Yt(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&Yt(e.tm_year%400-1))&&t++}return l(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return l(Math.floor(t/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in a=a.replace(/%%/g,"\0\0"),g)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),g[u](o)));var y,w,S=se(a=a.replace(/\0\0/g,"%"),!1);return S.length>t?0:(y=S,w=e,v.set(y,w),S.length-1)},gr=e=>parseInt(e),vr=Jt,yr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=fe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},wr=365,Sr=146;Object.defineProperties(yr.prototype,{read:{get:function(){return(this.mode&wr)===wr},set:function(e){e?this.mode|=wr:this.mode&=-366}},write:{get:function(){return(this.mode&Sr)===Sr},set:function(e){e?this.mode|=Sr:this.mode&=-147}},isFolder:{get:function(){return fe.isDir(this.mode)}},isDevice:{get:function(){return fe.isChrdev(this.mode)}}}),fe.FSNode=yr,fe.createPreloadedFile=(e,t,r,i,n,o,a,s,u,c)=>{var d=t?te.resolve(J.join2(e,t)):e;function m(r){function m(r){c&&c(),s||fe.createDataFile(e,t,r,i,n,u),o&&o(),Z()}((e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return le.forEach((o=>{n||o.canHandle(t)&&(o.handle(e,t,r,i),n=!0)})),n})(r,d,m,(()=>{a&&a(),Z()}))||m(r)}$(),"string"==typeof r?me(r,(e=>m(e)),a):m(r)},fe.staticInit(),be=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);_e=e})(),De=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},et.prototype.isAliasOf=ze,et.prototype.clone=Ge,et.prototype.delete=Ke,et.prototype.isDeleted=Xe,et.prototype.deleteLater=Je,n.getInheritedInstanceCount=Ze,n.getLiveInheritedInstances=Be,n.flushPendingDeletes=Ie,n.setDelayFunction=We,ft.prototype.getPointee=mt,ft.prototype.destructor=lt,ft.prototype.argPackAdvance=Pe,ft.prototype.readValueFromPointer=dt,ft.prototype.deleteObject=ht,ft.prototype.fromWireType=qe,wt=n.UnboundTypeError=(rr=Error,(nr=rt(ir="UnboundTypeError",(function(e){this.name=ir,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(rr.prototype),nr.prototype.constructor=nr,nr.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},nr),Object.assign(xt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},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)}}),At.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),At.reserved=At.allocated.length,n.count_emval_handles=Tt;var Fr,Cr={s:e=>{var t=new G(e);return t.get_caught()||(t.set_caught(!0),q--),t.set_rethrown(!1),V.push(t),Or(t.excPtr),t.get_exception_ptr()},Bb:()=>{if(!V.length)return 0;var e=V[V.length-1];return Or(e.excPtr),e.excPtr},D:()=>{kr(0,0);var e=V.pop();Mr(e.excPtr),Y=0},a:()=>K([]),h:e=>K([e]),I:(e,t)=>K([e,t]),Ia:X,Ab:e=>{if(e){var t=new G(e);V.push(t),t.set_rethrown(!0),X()}},o:(e,t,r)=>{throw new G(e).init(t,r),q++,Y=e},Cb:()=>q,c:e=>{throw Y||(Y=e),Y},Hb:function(e,t,r,i,n){try{for(var o=0,a=t?F[t>>2]:0,s=t?F[t+4>>2]:0,u=r?F[r>>2]:0,c=r?F[r+4>>2]:0,d=i?F[i>>2]:0,m=i?F[i+4>>2]:0,l=0,h=0,f=0,p=0,g=0,v=0,y=(t?F[t>>2]:0)|(r?F[r>>2]:0)|(i?F[i>>2]:0),w=(t?F[t+4>>2]:0)|(r?F[r+4>>2]:0)|(i?F[i+4>>2]:0),S=function(e,t,r,i){return e<32?t&i:r&i},C=0;C<e;C++){var b=1<<C%32;if(S(C,y,w,b)){var E=ge.getStreamFromFD(C),x=ge.DEFAULT_POLLMASK;if(E.stream_ops.poll){var _=-1;n&&(_=1e3*((t?F[n>>2]:0)+(t?F[n+8>>2]:0)/1e6)),x=E.stream_ops.poll(E,_)}1&x&&S(C,a,s,b)&&(C<32?l|=b:h|=b,o++),4&x&&S(C,u,c,b)&&(C<32?f|=b:p|=b,o++),2&x&&S(C,d,m,b)&&(C<32?g|=b:v|=b,o++)}}return t&&(F[t>>2]=l,F[t+4>>2]=h),r&&(F[r>>2]=f,F[r+4>>2]=p),i&&(F[i>>2]=g,F[i+4>>2]=v),o}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ma:function(e,t,r){ge.varargs=r;try{var i=ge.getStreamFromFD(e);switch(t){case 0:if((n=ge.get())<0)return-28;for(;fe.streams[n];)n++;return fe.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=ge.get();return i.flags|=n,0;case 5:return n=ge.getp(),w[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return o=28,F[_r()>>2]=o,-1}}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}var o},Qb:function(e,t){try{var r=ge.getStreamFromFD(e);return ge.doStat(fe.stat,r.path,t)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Rb:function(e,t,r){ge.varargs=r;try{var i=ge.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return i.tty?0:-59;case 21505:if(!i.tty)return-59;if(i.tty.ops.ioctl_tcgets){var n=i.tty.ops.ioctl_tcgets(i),o=ge.getp();F[o>>2]=n.c_iflag||0,F[o+4>>2]=n.c_oflag||0,F[o+8>>2]=n.c_cflag||0,F[o+12>>2]=n.c_lflag||0;for(var a=0;a<32;a++)v[o+a+17>>0]=n.c_cc[a]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!i.tty)return-59;if(i.tty.ops.ioctl_tcsets){o=ge.getp();var s=F[o>>2],u=F[o+4>>2],c=F[o+8>>2],d=F[o+12>>2],m=[];for(a=0;a<32;a++)m.push(v[o+a+17>>0]);return i.tty.ops.ioctl_tcsets(i.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:d,c_cc:m})}return 0;case 21519:return i.tty?(o=ge.getp(),F[o>>2]=0,0):-59;case 21520:return i.tty?-28:-59;case 21531:return o=ge.getp(),fe.ioctl(i,t,o);case 21523:if(!i.tty)return-59;if(i.tty.ops.ioctl_tiocgwinsz){var l=i.tty.ops.ioctl_tiocgwinsz(i.tty);o=ge.getp(),w[o>>1]=l[0],w[o+2>>1]=l[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ob:function(e,t,r,i){try{t=ge.getStr(t);var n=256&i,o=4096&i;return i&=-6401,t=ge.calculateAt(e,t,o),ge.doStat(n?fe.lstat:fe.stat,t,r)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Na:function(e,t,r,i){ge.varargs=i;try{t=ge.getStr(t),t=ge.calculateAt(e,t);var n=i?ge.get():0;return fe.open(t,r,n).fd}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Jb:function(e){try{return e=ge.getStr(e),fe.rmdir(e),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Pb:function(e,t){try{return e=ge.getStr(e),ge.doStat(fe.stat,e,t)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Kb:function(e,t,r){try{return t=ge.getStr(t),t=ge.calculateAt(e,t),0===r?fe.unlink(t):512===r?fe.rmdir(t):B("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},hb:e=>{var t=ve[e];delete ve[e];var r=t.rawConstructor,i=t.rawDestructor,n=t.fields,o=n.map((e=>e.getterReturnType)).concat(n.map((e=>e.setterArgumentType)));xe([e],o,(e=>{var o={};return n.forEach(((t,r)=>{var i=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+n.length],d=t.setter,m=t.setterContext;o[i]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];d(m,e,c.toWireType(r,t)),ye(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return i(e),t},toWireType:(e,t)=>{for(var n in o)if(!(n in t))throw new TypeError(`Missing field: "${n}"`);var a=r();for(n in o)o[n].write(a,t[n]);return null!==e&&e.push(i,a),a},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:i}]}))},ub:(e,t,r,i,n)=>{},Wb:(e,t,r,i)=>{ke(e,{name:t=Ae(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Pe,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},fb:(e,t,r,i,n,o,a,s,u,c,d,m,l)=>{d=Ae(d),o=yt(n,o),s&&(s=yt(a,s)),c&&(c=yt(u,c)),l=yt(m,l);var h=tt(d);nt(h,(function(){Ft(`Cannot construct ${d} due to unbound types`,[i])})),xe([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:et.prototype;var a=rt(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new De("Use 'new' to construct "+d);if(void 0===m.constructor_body)throw new De(d+" has no accessible constructor");var e=m.constructor_body[arguments.length];if(void 0===e)throw new De(`Tried to invoke ctor of ${d} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(n,{constructor:{value:a}});a.prototype=u;var m=new ot(d,a,u,l,r,o,s,c);m.baseClass&&(void 0===m.baseClass.__derivedClasses&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var f=new ft(d,m,!0,!1,!1),p=new ft(d+"*",m,!1,!1,!1),g=new ft(d+" const*",m,!1,!0,!1);return $e[e]={pointerType:p,constPointerType:g},pt(h,a),[f,p,g]}))},eb:(e,t,r,i,n,o)=>{var a=Ct(t,r);n=yt(i,n),xe([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new De(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Ft(`Cannot construct ${e.name} due to unbound types`,a)},xe([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Et(r,i,null,n,o),[]))),[]}))},db:(e,t,r,i,n,o,a,s,u)=>{var c=Ct(r,i);t=Ae(t),o=yt(n,o),xe([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Ft(`Cannot call ${i} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var d=e.registeredClass.instancePrototype,m=d[t];return void 0===m||void 0===m.overloadTable&&m.className!==e.name&&m.argCount===r-2?(n.argCount=r-2,n.className=e.name,d[t]=n):(it(d,t,i),d[t].overloadTable[r-2]=n),xe([],c,(function(n){var s=Et(i,n,e,o,a,u);return void 0===d[t].overloadTable?(s.argCount=r-2,d[t]=s):d[t].overloadTable[r-2]=s,[]})),[]}))},Ub:(e,t)=>{ke(e,{name:t=Ae(t),fromWireType:e=>{var t=kt.toValue(e);return Dt(e),t},toWireType:(e,t)=>kt.toHandle(t),argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:null})},Pa:(e,t,r)=>{ke(e,{name:t=Ae(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Pe,readValueFromPointer:zt(t,r),destructorFunction:null})},ba:(e,t,r,i,n,o,a)=>{var s=Ct(t,r);e=Ae(e),n=yt(i,n),nt(e,(function(){Ft(`Cannot call ${e} due to unbound types`,s)}),t-1),xe([],s,(function(r){var i=[r[0],null].concat(r.slice(1));return pt(e,Et(e,i,null,n,o,a),t-1),[]}))},T:(e,t,r,i,n)=>{t=Ae(t),-1===n&&(n=4294967295);var o=e=>e;if(0===i){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");ke(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Pe,readValueFromPointer:Mt(t,r,0!==i),destructorFunction:null})},G:(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=C[e>>2],r=C[e+4>>2];return new i(v.buffer,r,t)}ke(e,{name:r=Ae(r),fromWireType:n,argPackAdvance:Pe,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},Oa:(e,t)=>{var r="std::string"===(t=Ae(t));ke(e,{name:t,fromWireType:e=>{var t,i=C[e>>2],n=e+4;if(r)for(var o=n,a=0;a<=i;++a){var s=n+a;if(a==i||0==y[s]){var u=pe(o,s-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=s+1}}else{var c=new Array(i);for(a=0;a<i;++a)c[a]=String.fromCharCode(y[n+a]);t=c.join("")}return xr(e),t},toWireType:(e,t)=>{var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Te("Cannot pass non-string to std::string"),i=r&&n?oe(t):t.length;var o=Er(4+i+1),a=o+4;if(C[o>>2]=i,r&&n)Ot(t,a,i+1);else if(n)for(var s=0;s<i;++s){var u=t.charCodeAt(s);u>255&&(xr(a),Te("String has UTF-16 code units that do not fit in 8 bits")),y[a+s]=u}else for(s=0;s<i;++s)y[a+s]=t[s];return null!==e&&e.push(xr,o),o},argPackAdvance:Pe,readValueFromPointer:dt,destructorFunction:e=>xr(e)})},Aa:(e,t,r)=>{var i,n,o,a,s;r=Ae(r),2===t?(i=Qt,n=Lt,a=$t,o=()=>S,s=1):4===t&&(i=Zt,n=Bt,a=Nt,o=()=>C,s=2),ke(e,{name:r,fromWireType:e=>{for(var r,n=C[e>>2],a=o(),u=e+4,c=0;c<=n;++c){var d=e+4+c*t;if(c==n||0==a[d>>s]){var m=i(u,d-u);void 0===r?r=m:(r+=String.fromCharCode(0),r+=m),u=d+t}}return xr(e),r},toWireType:(e,i)=>{"string"!=typeof i&&Te(`Cannot pass non-string to C++ string type ${r}`);var o=a(i),u=Er(4+o+t);return C[u>>2]=o>>s,n(i,u+4,o+t),null!==e&&e.push(xr,u),u},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:e=>xr(e)})},ib:(e,t,r,i,n,o)=>{ve[e]={name:Ae(t),rawConstructor:yt(r,i),rawDestructor:yt(n,o),fields:[]}},gb:(e,t,r,i,n,o,a,s,u,c)=>{ve[e].fields.push({fieldName:Ae(t),getterReturnType:r,getter:yt(i,n),getterContext:o,setterArgumentType:a,setter:yt(s,u),setterContext:c})},Xb:(e,t)=>{ke(e,{isVoid:!0,name:t=Ae(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Sb:()=>!0,Db:()=>{throw 1/0},da:(e,t,r)=>{e=kt.toValue(e),t=It(t,"emval::as");var i=[],n=kt.toHandle(i);return C[r>>2]=n,t.toWireType(i,e)},wa:(e,t,r,i,n)=>(e=Ht[e])(t=kt.toValue(t),r=Wt(r),(e=>{var t=[];return C[e>>2]=kt.toHandle(t),t})(i),n),va:(e,t,r,i)=>{(e=Ht[e])(t=kt.toValue(t),r=Wt(r),null,i)},Ib:Dt,$a:e=>0===e?kt.toHandle(Ut()):(e=Wt(e),kt.toHandle(Ut()[e])),ca:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),i=0;i<e;++i)r[i]=It(C[t+4*i>>2],"parameter "+i);return r})(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Vt[n];if(void 0!==o)return o;for(var a=["retType"],s=[i],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,a.push("argType"+c),s.push(r[1+c]);var d="return function "+tt("methodCaller_"+n)+"(handle, name, destructors, args) {\n",m=0;for(c=0;c<e-1;++c)d+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(m?"+"+m:"")+");\n",m+=r[c+1].argPackAdvance;for(d+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(d+=" argType"+c+".deleteObject(arg"+c+");\n");i.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",a.push(d);var l,h,f=bt(Function,a).apply(null,s);return l=f,h=Ht.length,Ht.push(l),o=h,Vt[n]=o,o},kb:(e,t)=>(e=kt.toValue(e),t=kt.toValue(t),kt.toHandle(e[t])),u:e=>{e>4&&(At.get(e).refcount+=1)},X:()=>kt.toHandle([]),U:e=>kt.toHandle(Wt(e)),H:()=>kt.toHandle({}),jb:e=>{var t=kt.toValue(e);ye(t),Dt(e)},Vb:(e,t,r)=>{e=kt.toValue(e),t=kt.toValue(t),r=kt.toValue(r),e[t]=r},S:(e,t)=>{var r=(e=It(e,"_emval_take_value")).readValueFromPointer(t);return kt.toHandle(r)},qb:function(e,t,r){var i=qt(e,t),n=new Date(1e3*i);F[r>>2]=n.getUTCSeconds(),F[r+4>>2]=n.getUTCMinutes(),F[r+8>>2]=n.getUTCHours(),F[r+12>>2]=n.getUTCDate(),F[r+16>>2]=n.getUTCMonth(),F[r+20>>2]=n.getUTCFullYear()-1900,F[r+24>>2]=n.getUTCDay();var o=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),a=(n.getTime()-o)/864e5|0;F[r+28>>2]=a},rb:function(e,t,r){var i=qt(e,t),n=new Date(1e3*i);F[r>>2]=n.getSeconds(),F[r+4>>2]=n.getMinutes(),F[r+8>>2]=n.getHours(),F[r+12>>2]=n.getDate(),F[r+16>>2]=n.getMonth(),F[r+20>>2]=n.getFullYear()-1900,F[r+24>>2]=n.getDay();var o=0|Xt(n);F[r+28>>2]=o,F[r+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),0,1),s=new Date(n.getFullYear(),6,1).getTimezoneOffset(),u=a.getTimezoneOffset(),c=0|(s!=u&&n.getTimezoneOffset()==Math.min(u,s));F[r+32>>2]=c},sb:function(e){var t=(()=>{var t=new Date(F[e+20>>2]+1900,F[e+16>>2],F[e+12>>2],F[e+8>>2],F[e+4>>2],F[e>>2],0),r=F[e+32>>2],i=t.getTimezoneOffset(),n=new Date(t.getFullYear(),0,1),o=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=Math.min(a,o);if(r<0)F[e+32>>2]=Number(o!=a&&s==i);else if(r>0!=(s==i)){var u=Math.max(a,o),c=r>0?s:u;t.setTime(t.getTime()+6e4*(c-i))}F[e+24>>2]=t.getDay();var d=0|Xt(t);return F[e+28>>2]=d,F[e>>2]=t.getSeconds(),F[e+4>>2]=t.getMinutes(),F[e+8>>2]=t.getHours(),F[e+12>>2]=t.getDate(),F[e+16>>2]=t.getMonth(),F[e+20>>2]=t.getYear(),t.getTime()/1e3})();return Ar((k=t,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)),t>>>0},pb:function(e,t,r,i,n,o,a){var s=qt(o,a);try{if(isNaN(s))return 61;var u=ge.getStreamFromFD(n);2&r&&ge.doMsync(e,u,t,i,s),fe.munmap(u)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Fb:(e,t,r)=>{var i=(new Date).getFullYear(),n=new Date(i,0,1),o=new Date(i,6,1),a=n.getTimezoneOffset(),s=o.getTimezoneOffset(),u=Math.max(a,s);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*u,F[t>>2]=Number(a!=s);var d=c(n),m=c(o),l=Jt(d),h=Jt(m);s<a?(C[r>>2]=l,C[r+4>>2]=h):(C[r>>2]=h,C[r+4>>2]=l)},y:()=>{B("")},ab:(e,t,r)=>tr(e,t,r),ya:()=>Date.now(),Gb:()=>2147483648,ia:_t,Tb:(e,t,r)=>y.copyWithin(e,t,t+r),Eb:e=>{var t=y.length,r=2147483648;(e>>>=0)>r&&or();for(var i,n,o=1;o<=4;o*=2){var a=t*(1+.2/o);a=Math.min(a,e+100663296);var s=Math.min(r,(i=Math.max(e,a))+((n=65536)-i%n)%n);if(ar(s))return!0}or()},Mb:(e,t)=>{var r=0;return ur().forEach(((i,n)=>{var o=t+r;C[e+4*n>>2]=o,((e,t)=>{for(var r=0;r<e.length;++r)v[t++>>0]=e.charCodeAt(r);v[t>>0]=0})(i,o),r+=i.length+1})),0},Nb:(e,t)=>{var r=ur();C[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),C[t>>2]=i,0},Yb:dr,za:function(e){try{var t=ge.getStreamFromFD(e);return fe.close(t),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},Lb:function(e,t){try{var r=ge.getStreamFromFD(e),i=r.tty?2:fe.isDir(r.mode)?3:fe.isLink(r.mode)?7:4;return v[t>>0]=i,w[t+2>>1]=0,P=[0,(k=0,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[t+8>>2]=P[0],F[t+12>>2]=P[1],P=[0,(k=0,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[t+16>>2]=P[0],F[t+20>>2]=P[1],0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},La:function(e,t,r,i){try{var n=((e,t,r,i)=>{for(var n=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=fe.read(e,v,a,s,i);if(u<0)return-1;if(n+=u,u<s)break;"undefined"!=typeof i&&(i+=u)}return n})(ge.getStreamFromFD(e),t,r);return C[i>>2]=n,0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},tb:function(e,t,r,i,n){var o=qt(t,r);try{if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return fe.llseek(a,o,i),P=[a.position>>>0,(k=a.position,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[n>>2]=P[0],F[n+4>>2]=P[1],a.getdents&&0===o&&0===i&&(a.getdents=null),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},xa:function(e,t,r,i){try{var n=((e,t,r,i)=>{for(var n=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=fe.write(e,v,a,s,i);if(u<0)return-1;n+=u,"undefined"!=typeof i&&(i+=u)}return n})(ge.getStreamFromFD(e),t,r);return C[i>>2]=n,0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},cb:function(){return vr(location.toString())},zb:(e,t)=>(ee(y.subarray(e,e+t)),0),bb:function(){return vr((e=Ur,self[e(358,"rXbW")][e(360,"i#Os")]()));var e},Ja:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},ua:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},B:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},q:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},x:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},ea:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},P:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},la:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},t:function(e){var t=Pr();try{return gt(e)()}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},i:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},dc:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Ta:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},cc:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{return gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},b:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Wa:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},f:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},ta:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},k:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},Ka:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},n:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},w:function(e,t,r,i,n,o,a){var s=Pr();try{return gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Q:function(e,t,r,i,n,o,a,s){var u=Pr();try{return gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},E:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{return gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Z:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},ma:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},pa:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},mb:function(e,t,r,i,n,o,a){var s=Pr();try{return jr(e,t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},xb:function(e,t,r,i){var n=Pr();try{return Zr(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},ob:function(e){var t=Pr();try{return Nr(e)}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},yb:function(e,t){var r=Pr();try{return Lr(e,t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},nb:function(e,t,r){var i=Pr();try{return Ir(e,t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},vb:function(e,t,r,i){var n=Pr();try{return Br(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},lb:function(e,t,r,i,n){var o=Pr();try{return Wr(e,t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},l:function(e){var t=Pr();try{gt(e)()}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},g:function(e,t){var r=Pr();try{gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},_b:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},na:function(e,t,r){var i=Pr();try{gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Ha:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},d:function(e,t,r){var i=Pr();try{gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},$:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},Ya:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},$b:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},sa:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},V:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ba:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},J:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},aa:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},bc:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Fa:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},ha:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Da:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ga:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},e:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},A:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Va:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},ac:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},K:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},z:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},fa:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},ja:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},Qa:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},O:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Ra:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Ea:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Xa:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},j:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},ra:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},C:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},W:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},Sa:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},m:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},ec:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},v:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ua:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},M:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},p:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},qa:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},ka:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},r:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},F:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Ca:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},N:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},ga:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h){var f=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h)}catch(e){if(zr(f),e!==e+0)throw e;kr(1,0)}},Y:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},Za:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},_:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h){var f=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h)}catch(e){if(zr(f),e!==e+0)throw e;kr(1,0)}},oa:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h,f,p){var g=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h,f,p)}catch(e){if(zr(g),e!==e+0)throw e;kr(1,0)}},wb:function(e,t,r,i){var n=Pr();try{$r(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},R:e=>e,_a:pr,L:(e,t,r,i,n)=>pr(e,t,r,i),Zb:(e,t,r)=>{for(var i=pe(t),n="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,a=n.length;o<a;++o)i=i.replace(new RegExp("\\"+n[o],"g"),"\\"+n[o]);var s={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var u in s)i=i.replace(u,s[u]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var d in c)i=i.replace(d,"("+d+c[d]+")");var m=[];for(o=i.indexOf("%");o>=0;o=i.indexOf("%"))m.push(i[o+1]),i=i.replace(new RegExp("\\%"+i[o+1],"g"),"");var l=new RegExp("^"+i,"i").exec(pe(e));if(l){var h,f=function(){function e(e,t,r){return"number"!=typeof e||isNaN(e)?t:e>=t?e<=r?e:r:t}return{year:e(F[r+20>>2]+1900,1970,9999),month:e(F[r+16>>2],0,11),day:e(F[r+12>>2],1,31),hour:e(F[r+8>>2],0,23),min:e(F[r+4>>2],0,59),sec:e(F[r>>2],0,59)}}(),p=e=>{var t=m.indexOf(e);if(t>=0)return l[t+1]};if((h=p("S"))&&(f.sec=gr(h)),(h=p("M"))&&(f.min=gr(h)),h=p("H"))f.hour=gr(h);else if(h=p("I")){var g=gr(h);(h=p("p"))&&(g+="P"===h.toUpperCase()[0]?12:0),f.hour=g}if(h=p("Y"))f.year=gr(h);else if(h=p("y")){var v=gr(h);(h=p("C"))?v+=100*gr(h):v+=v<69?2e3:1900,f.year=v}if((h=p("m"))?f.month=gr(h)-1:(h=p("b"))&&(f.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[h.substring(0,3).toUpperCase()]||0),h=p("d"))f.day=gr(h);else if(h=p("j"))for(var y=gr(h),w=Yt(f.year),S=0;S<12;++S){var C=mr(w?lr:hr,S-1);y<=C+(w?lr:hr)[S]&&(f.day=y-C)}else if(h=p("a")){var b=h.substring(0,3).toUpperCase();if(h=p("U")){var E={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[b],x=gr(h);A=0===(_=new Date(f.year,0,1)).getDay()?fr(_,E+7*(x-1)):fr(_,7-_.getDay()+E+7*(x-1)),f.day=A.getDate(),f.month=A.getMonth()}else if(h=p("W")){var _,A;E={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[b],x=gr(h),A=1===(_=new Date(f.year,0,1)).getDay()?fr(_,E+7*(x-1)):fr(_,7-_.getDay()+1+E+7*(x-1)),f.day=A.getDate(),f.month=A.getMonth()}}var D=new Date(f.year,f.month,f.day,f.hour,f.min,f.sec,0);return F[r>>2]=D.getSeconds(),F[r+4>>2]=D.getMinutes(),F[r+8>>2]=D.getHours(),F[r+12>>2]=D.getDate(),F[r+16>>2]=D.getMonth(),F[r+20>>2]=D.getFullYear()-1900,F[r+24>>2]=D.getDay(),F[r+28>>2]=mr(Yt(D.getFullYear())?lr:hr,D.getMonth()-1)+D.getDate()-1,F[r+32>>2]=0,e+se(l[0]).length-1}return 0}},br=function(){var e,t,i,o,a={a:Cr};function s(e,t){var r,i=e.exports;return p=(br=i).fc,A(),x=br.ic,r=br.gc,M.unshift(r),Z(),i}if($(),n.instantiateWasm)try{return n.instantiateWasm(a,s)}catch(e){f(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return(e=l,t=D,i=a,o=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||N(t)||"function"!=typeof fetch?j(t,i,o):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,i).then(o,(function(e){return f(`wasm streaming compile failed: ${e}`),f("falling back to ArrayBuffer instantiation"),j(t,i,o)}))))).catch(r),{}}(),Er=n._malloc=e=>(Er=n._malloc=br.hc)(e),xr=n._free=e=>(xr=n._free=br.jc)(e),_r=()=>(_r=br.kc)(),Ar=e=>(Ar=br.lc)(e),Dr=e=>(Dr=br.mc)(e),Tr=(n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=br.nc)(),(e,t)=>(Tr=br.oc)(e,t)),kr=(e,t)=>(kr=br.pc)(e,t),Pr=()=>(Pr=br.qc)(),zr=e=>(zr=br.rc)(e),Mr=e=>(Mr=br.sc)(e),Or=e=>(Or=br.tc)(e),Rr=(e,t,r)=>(Rr=br.uc)(e,t,r),Qr=e=>(Qr=br.vc)(e),Lr=n.dynCall_ji=(e,t)=>(Lr=n.dynCall_ji=br.wc)(e,t),$r=n.dynCall_vij=(e,t,r,i)=>($r=n.dynCall_vij=br.xc)(e,t,r,i),Zr=n.dynCall_iij=(e,t,r,i)=>(Zr=n.dynCall_iij=br.yc)(e,t,r,i),Br=(n.dynCall_viijii=(e,t,r,i,o,a,s)=>(n.dynCall_viijii=br.zc)(e,t,r,i,o,a,s),n.dynCall_jiii=(e,t,r,i)=>(Br=n.dynCall_jiii=br.Ac)(e,t,r,i)),Nr=(n.dynCall_jjj=(e,t,r,i,o)=>(n.dynCall_jjj=br.Bc)(e,t,r,i,o),n.dynCall_iiiijj=(e,t,r,i,o,a,s,u)=>(n.dynCall_iiiijj=br.Cc)(e,t,r,i,o,a,s,u),n.dynCall_viijj=(e,t,r,i,o,a,s)=>(n.dynCall_viijj=br.Dc)(e,t,r,i,o,a,s),n.dynCall_viiijjj=(e,t,r,i,o,a,s,u,c,d)=>(n.dynCall_viiijjj=br.Ec)(e,t,r,i,o,a,s,u,c,d),n.dynCall_jiji=(e,t,r,i,o)=>(n.dynCall_jiji=br.Fc)(e,t,r,i,o),n.dynCall_j=e=>(Nr=n.dynCall_j=br.Gc)(e)),Ir=n.dynCall_jii=(e,t,r)=>(Ir=n.dynCall_jii=br.Hc)(e,t,r),jr=n.dynCall_iiiiij=(e,t,r,i,o,a,s)=>(jr=n.dynCall_iiiiij=br.Ic)(e,t,r,i,o,a,s),Wr=n.dynCall_jiiii=(e,t,r,i,o)=>(Wr=n.dynCall_jiiii=br.Jc)(e,t,r,i,o);function Hr(){function e(){Fr||(Fr=!0,n.calledRun=!0,_||(n.noFSInit||fe.init.initialized||fe.init(),fe.ignorePermissions=!1,ue.init(),U(M),t(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),O.unshift(e);var e;U(O)}()))}R>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),z.unshift(e);var e;U(z)}(),R>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_iiiiijj=(e,t,r,i,o,a,s,u,c)=>(n.dynCall_iiiiijj=br.Kc)(e,t,r,i,o,a,s,u,c),n.dynCall_iiiiiijj=(e,t,r,i,o,a,s,u,c,d)=>(n.dynCall_iiiiiijj=br.Lc)(e,t,r,i,o,a,s,u,c,d),n.___start_em_js=1370908,n.___stop_em_js=1371016,n.UTF8ToString=pe,n.stringToUTF8=Ot,n.lengthBytesUTF8=oe,n.allocateUTF8=vr,L=function e(){Fr||Hr(),Fr||(L=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function Ur(e,t){var r=Vr();return Ur=function(t,i){var n=r[t-=344];if(void 0===Ur.VbSwDI){var o=function(e){for(var t,r,i="",n="",o=0,a=0;r=e.charAt(a++);~r&&(t=o%4?64*t+r:r,o++%4)?i+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=i.length;s<u;s++)n+="%"+("00"+i.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(n)},a=function(e,t){var r,i,n=[],a=0,s="";for(e=o(e),i=0;i<256;i++)n[i]=i;for(i=0;i<256;i++)a=(a+n[i]+t.charCodeAt(i%t.length))%256,r=n[i],n[i]=n[a],n[a]=r;i=0,a=0;for(var u=0;u<e.length;u++)a=(a+n[i=(i+1)%256])%256,r=n[i],n[i]=n[a],n[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^n[(n[i]+n[a])%256]);return s};Ur.LnCLHN=a,e=arguments,Ur.VbSwDI=!0}var s=r[0],u=t+s,c=e[u];return c?n=c:(void 0===Ur.zRXgAW&&(Ur.zRXgAW=!0),n=Ur.LnCLHN(n,i),e[u]=n),n},Ur(e,t)}function Vr(){var e=["fZxdP8oAAKFdPa","WQ02ut4wW4STW48MWQmpW6FcHa","WO/dRg/cNcq2mColW4lcGvpdT8kI","wSk6WQnpW6VdL8ofWP/dUJ/cG1Ka","k8o9ACkuc1ynW7PoEI/cL10","dSktW5lcLahcJSoAWOJcOIvgqCkO","W6baW77dQIddTCk9WQJcPmogWOKwW6K","F0qhneNcKeyLWPSvW48HgW","WQjFW7WUEgCKW5xcT8ostKrC","mmonWQFdPeZdPSknamoNW4hdJmkp","Fmk1W5BdL8kZWRGHAbJdKhldMmor","yYFdP1NcRmoDWOfg","W4FcJ3tcRmkvW7z0t08hW69fW6K","W6PVo3XxWPf2W4u","W4qcW7eSfmk2WQ3dImktnmkWWOBcMa","WQ9uk2XCWOjk","W6BcSmkKo8kWwSkAlt7cR1BcLCkL","W4GhWOddPdXDySoQW6JcKCo0W5i"];return(Vr=function(){return e})()}Hr(),function(e,t){for(var r=Ur,i=e();;)try{if(744009==parseInt(r(344,"i#Os"))/1*(-parseInt(r(351,"[iJt"))/2)+parseInt(r(346,"EsBE"))/3+parseInt(r(349,"txNK"))/4+parseInt(r(348,"i#Os"))/5+parseInt(r(361,"Lorv"))/6+-parseInt(r(350,"s&J4"))/7+parseInt(r(352,"ATY@"))/8)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Vr);var ighnua,qr=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),Yr=qr(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Yr)};return e()}));return Yr(),e.ready});e.exports=n},function(e,t){},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Ae})),r.d(t,"commands",(function(){return ze}));var i=r(0);class n{_marker(){}}class o extends n{constructor(e={}){super(),this.author="Created with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==e.author&&(this.author=e.author),void 0!==e.creator&&(this.creator=e.creator),void 0!==e.title&&(this.title=e.title),void 0!==e.subject&&(this.subject=e.subject),void 0!==e.keywords&&(this.keywords=e.keywords)}}class a extends n{constructor(e={}){super(),this.attributes=new o({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==e.attributes&&(this.attributes=new o(e.attributes)),void 0!==e.pageSize&&(this.pageSize=e.pageSize),void 0!==e.pageDirection&&(this.pageDirection=e.pageDirection),void 0!==e.pageFit&&(this.pageFit=e.pageFit),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.resamplingMethod&&(this.resamplingMethod=e.resamplingMethod)}}class s extends n{constructor(e={}){super(),this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.confirmationMethod&&(this.confirmationMethod=e.confirmationMethod),void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class u extends n{constructor(e={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class c extends n{constructor(e={}){super(),this.frameAccumulationConfiguration=new u({}),this.enableDetection=!0,this.incompleteResultHandling="ACCEPT",void 0!==e.frameAccumulationConfiguration&&(this.frameAccumulationConfiguration=new u(e.frameAccumulationConfiguration)),void 0!==e.enableDetection&&(this.enableDetection=e.enableDetection),void 0!==e.incompleteResultHandling&&(this.incompleteResultHandling=e.incompleteResultHandling)}}class d extends n{constructor(e={}){if(super(),void 0===e.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=e.symbolQuality,void 0===e.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=e.symbolRatio}}class m extends n{constructor(e={}){super(),this.qualityThresholds=[new d({symbolQuality:.5,symbolRatio:.5}),new d({symbolQuality:.7,symbolRatio:.3}),new d({symbolQuality:.85,symbolRatio:.3}),new d({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.detectOrientation=!1,this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==e.qualityThresholds&&(this.qualityThresholds=e.qualityThresholds.map((e=>new d(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.detectOrientation&&(this.detectOrientation=e.detectOrientation),void 0!==e.maxImageSize&&(this.maxImageSize=e.maxImageSize),void 0!==e.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=e.minEstimatedNumberOfSymbolsForDocument),void 0!==e.minProcessedFraction&&(this.minProcessedFraction=e.minProcessedFraction),void 0!==e.maxProcessedFraction&&(this.maxProcessedFraction=e.maxProcessedFraction),void 0!==e.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=e.earlyStopIfNSymbolsFound),void 0!==e.tileSize&&(this.tileSize=e.tileSize)}}var l;!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new h(e);case"CustomBinarizationFilter":return new f(e);case"ColorDocumentFilter":return new p(e);case"BrightnessFilter":return new g(e);case"ContrastFilter":return new v(e);case"GrayscaleFilter":return new y(e);case"LegacyFilter":return new w(e);case"WhiteBlackPointFilter":return new S(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class h extends n{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class f extends n{constructor(e={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class p extends n{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class g extends n{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class v extends n{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class y extends n{constructor(e={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class w extends n{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class S extends n{constructor(e={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}class F extends n{constructor(e={}){super(),this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}class C extends n{constructor(e={}){super(),this.isLive=!1,this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.acceptedAspectRatioScore=85,this.aspectRatios=[],this.ignoreOrientationMismatch=!1,void 0!==e.isLive&&(this.isLive=e.isLive),void 0!==e.acceptedAngleScore&&(this.acceptedAngleScore=e.acceptedAngleScore),void 0!==e.acceptedSizeScore&&(this.acceptedSizeScore=e.acceptedSizeScore),void 0!==e.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=e.acceptedBrightnessThreshold),void 0!==e.acceptedAspectRatioScore&&(this.acceptedAspectRatioScore=e.acceptedAspectRatioScore),void 0!==e.aspectRatios&&(this.aspectRatios=e.aspectRatios.map((e=>new F(e)))),void 0!==e.ignoreOrientationMismatch&&(this.ignoreOrientationMismatch=e.ignoreOrientationMismatch)}}var b;!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new E(e);case"PatternContentValidator":return new x(e);default:throw`Unknown child class name: ${t}`}}}(b||(b={}));class E extends n{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class x extends n{constructor(e={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters),void 0===e.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=e.pattern,void 0!==e.matchSubstring&&(this.matchSubstring=e.matchSubstring)}}class _ extends n{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new E({}),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==e.validator&&(this.validator=b.From(e.validator))}}class A extends n{constructor(e={}){super(),this.extractVINFromBarcode=!1,this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.extractVINFromBarcode&&(this.extractVINFromBarcode=e.extractVINFromBarcode),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}var D,T;!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new k(e);case"BarcodeFormatCode11Configuration":return new P(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new M(e);case"BarcodeFormatCode128Configuration":return new O(e);case"BarcodeFormatCode2Of5Configuration":return new R(e);case"BarcodeFormatDataBarConfiguration":return new Q(e);case"BarcodeFormatDataBarExpandedConfiguration":return new L(e);case"BarcodeFormatDataBarLimitedConfiguration":return new $(e);case"BarcodeFormatITFConfiguration":return new Z(e);case"BarcodeFormatMSIPlesseyConfiguration":return new B(e);case"BarcodeFormatUpcEanConfiguration":return new N(e);case"BarcodeFormatPharmaCodeConfiguration":return new I(e);case"BarcodeFormatAztecConfiguration":return new H(e);case"BarcodeFormatQRCodeConfiguration":return new U(e);case"BarcodeFormatPDF417Configuration":return new V(e);case"BarcodeFormatMicroPDF417Configuration":return new q(e);case"BarcodeFormatDataMatrixConfiguration":return new Y(e);case"BarcodeFormatMaxiCodeConfiguration":return new G(e);case"BarcodeFormatAustraliaPostConfiguration":return new K(e);case"BarcodeFormatJapanPostConfiguration":return new X(e);case"BarcodeFormatRoyalMailConfiguration":return new J(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ee(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new te(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new re(e);case"BarcodeFormatGS1CompositeConfiguration":return new ie(e);case"BarcodeFormatCommonOneDConfiguration":return new ne(e);case"BarcodeFormatCommonTwoDConfiguration":return new oe(e);case"BarcodeFormatCommonFourStateConfiguration":return new ae(e);case"BarcodeFormatCommonConfiguration":return new se(e);default:throw`Unknown child class name: ${t}`}}}(D||(D={})),function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new k(e);case"BarcodeFormatCode11Configuration":return new P(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new M(e);case"BarcodeFormatCode128Configuration":return new O(e);case"BarcodeFormatCode2Of5Configuration":return new R(e);case"BarcodeFormatDataBarConfiguration":return new Q(e);case"BarcodeFormatDataBarExpandedConfiguration":return new L(e);case"BarcodeFormatDataBarLimitedConfiguration":return new $(e);case"BarcodeFormatITFConfiguration":return new Z(e);case"BarcodeFormatMSIPlesseyConfiguration":return new B(e);case"BarcodeFormatUpcEanConfiguration":return new N(e);case"BarcodeFormatPharmaCodeConfiguration":return new I(e);default:throw`Unknown child class name: ${t}`}}}(T||(T={}));class k extends n{constructor(e={}){super(),this._type="BarcodeFormatCodabarConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.returnStartEnd&&(this.returnStartEnd=e.returnStartEnd)}}class P extends n{constructor(e={}){super(),this._type="BarcodeFormatCode11Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksum&&(this.checksum=e.checksum)}}class z extends n{constructor(e={}){super(),this._type="BarcodeFormatCode39Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.code32&&(this.code32=e.code32),void 0!==e.code39&&(this.code39=e.code39),void 0!==e.pzn&&(this.pzn=e.pzn),void 0!==e.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=e.tryCode39ExtendedMode),void 0!==e.useCode39CheckDigit&&(this.useCode39CheckDigit=e.useCode39CheckDigit)}}class M extends n{constructor(e={}){super(),this._type="BarcodeFormatCode93Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class O extends n{constructor(e={}){super(),this._type="BarcodeFormatCode128Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class R extends n{constructor(e={}){super(),this._type="BarcodeFormatCode2Of5Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.iata2of5&&(this.iata2of5=e.iata2of5),void 0!==e.code25&&(this.code25=e.code25),void 0!==e.industrial2of5&&(this.industrial2of5=e.industrial2of5),void 0!==e.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=e.useIATA2OF5Checksum)}}class Q extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class L extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarExpandedConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class $ extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarLimitedConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Z extends n{constructor(e={}){super(),this._type="BarcodeFormatITFConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class B extends n{constructor(e={}){super(),this._type="BarcodeFormatMSIPlesseyConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class N extends n{constructor(e={}){super(),this._type="BarcodeFormatUpcEanConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="ALLOW_ANY",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.ean8&&(this.ean8=e.ean8),void 0!==e.ean13&&(this.ean13=e.ean13),void 0!==e.upca&&(this.upca=e.upca),void 0!==e.upce&&(this.upce=e.upce),void 0!==e.extensions&&(this.extensions=e.extensions)}}class I extends n{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}var j,W;!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAztecConfiguration":return new H(e);case"BarcodeFormatQRCodeConfiguration":return new U(e);case"BarcodeFormatPDF417Configuration":return new V(e);case"BarcodeFormatMicroPDF417Configuration":return new q(e);case"BarcodeFormatDataMatrixConfiguration":return new Y(e);case"BarcodeFormatMaxiCodeConfiguration":return new G(e);default:throw`Unknown child class name: ${t}`}}}(j||(j={}));class H extends n{constructor(e={}){super(),this._type="BarcodeFormatAztecConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class U extends n{constructor(e={}){super(),this._type="BarcodeFormatQRCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.qr&&(this.qr=e.qr),void 0!==e.microQr&&(this.microQr=e.microQr),void 0!==e.rmqr&&(this.rmqr=e.rmqr)}}class V extends n{constructor(e={}){super(),this._type="BarcodeFormatPDF417Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class q extends n{constructor(e={}){super(),this._type="BarcodeFormatMicroPDF417Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class Y extends n{constructor(e={}){super(),this._type="BarcodeFormatDataMatrixConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class G extends n{constructor(e={}){super(),this._type="BarcodeFormatMaxiCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAustraliaPostConfiguration":return new K(e);case"BarcodeFormatJapanPostConfiguration":return new X(e);case"BarcodeFormatRoyalMailConfiguration":return new J(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ee(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new te(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new re(e);default:throw`Unknown child class name: ${t}`}}}(W||(W={}));class K extends n{constructor(e={}){super(),this._type="BarcodeFormatAustraliaPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class X extends n{constructor(e={}){super(),this._type="BarcodeFormatJapanPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class J extends n{constructor(e={}){super(),this._type="BarcodeFormatRoyalMailConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class ee extends n{constructor(e={}){super(),this._type="BarcodeFormatRoyalTNTPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class te extends n{constructor(e={}){super(),this._type="BarcodeFormatUSPSIntelligentMailConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class re extends n{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeTwoTrackConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class ie extends n{constructor(e={}){super(),this._type="BarcodeFormatGS1CompositeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class ne extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonOneDConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class oe extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonTwoDConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXI_CODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ae extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonFourStateConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class se extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ue extends n{constructor(e={}){super(),this.barcodeFormatConfigurations=[new se({})],this.extractedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.onlyAcceptDocuments=!1,this.returnBarcodeImage=!0,this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,void 0!==e.barcodeFormatConfigurations&&(this.barcodeFormatConfigurations=e.barcodeFormatConfigurations.map((e=>D.From(e)))),void 0!==e.extractedDocumentFormats&&(this.extractedDocumentFormats=e.extractedDocumentFormats.map((e=>e))),void 0!==e.onlyAcceptDocuments&&(this.onlyAcceptDocuments=e.onlyAcceptDocuments),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live)}}var ce;!function(e){e.From=function(e){const t=e._type;switch(t){case"DateValidationConfiguration":return new de(e);case"EuropeanHealthInsuranceCardConfiguration":return new le(e);case"MRZFallbackConfiguration":return new he(e);case"DocumentDataExtractorCommonConfiguration":return new fe(e);default:throw`Unknown child class name: ${t}`}}}(ce||(ce={}));class de extends n{constructor(e={}){if(super(),this._type="DateValidationConfiguration",this.minYear=0,this.maxYear=2999,void 0!==e.minYear&&(this.minYear=e.minYear),void 0!==e.maxYear&&(this.maxYear=e.maxYear),void 0===e.fieldTypeName)throw new Error("fieldTypeName must be present in constructor argument");this.fieldTypeName=e.fieldTypeName}}const me=["AUSTRIA","BELGIUM","BULGARIA","CROATIA","CYPRUS","CZECH_REPUBLIC","DENMARK","ESTONIA","FINLAND","FRANCE","GERMANY","GREECE","HUNGARY","IRELAND","ITALY","LATVIA","LITHUANIA","LUXEMBOURG","MALTA","NETHERLANDS","POLAND","PORTUGAL","ROMANIA","SLOVAKIA","SLOVENIA","SPAIN","SWEDEN","SWITZERLAND"];class le extends n{constructor(e={}){super(),this._type="EuropeanHealthInsuranceCardConfiguration",this.expectedCountry=null,void 0!==e.expectedCountry&&(this.expectedCountry=null!=e.expectedCountry&&me.includes(e.expectedCountry)?e.expectedCountry:null)}}class he extends n{constructor(e={}){super(),this._type="MRZFallbackConfiguration",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==e.acceptedCountries&&(this.acceptedCountries=e.acceptedCountries.map((e=>e))),void 0!==e.acceptedMRZTypes&&(this.acceptedMRZTypes=e.acceptedMRZTypes.map((e=>e)))}}class fe extends n{constructor(e={}){if(super(),this._type="DocumentDataExtractorCommonConfiguration",void 0===e.acceptedDocumentTypes)throw new Error("acceptedDocumentTypes must be present in constructor argument");this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e))}}class pe extends n{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class ge extends n{constructor(e={}){if(super(),this.resultAccumulationConfig=new s({}),this.fieldExcludeList=[],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new s(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0===e.configurations)throw new Error("configurations must be present in constructor argument");this.configurations=e.configurations.map((e=>ce.From(e)))}}var ve,ye;!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new we(e);case"UserFieldStringValue":return new Se(e);case"UserFieldIntValue":return new Fe(e);default:throw`Unknown child class name: ${t}`}}}(ve||(ve={}));class we extends n{constructor(e={}){if(super(),this._type="UserFieldDoubleValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Se extends n{constructor(e={}){if(super(),this._type="UserFieldStringValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Fe extends n{constructor(e={}){if(super(),this._type="UserFieldIntValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Ce extends n{constructor(e={}){if(super(),void 0===e.tag)throw new Error("tag must be present in constructor argument");if(this.tag=e.tag,void 0===e.name)throw new Error("name must be present in constructor argument");if(this.name=e.name,void 0===e.value)throw new Error("value must be present in constructor argument");this.value=ve.From(e.value)}}class be extends n{constructor(e={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==e.compression&&(this.compression=e.compression),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.zipCompressionLevel&&(this.zipCompressionLevel=e.zipCompressionLevel),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.userFields&&(this.userFields=e.userFields.map((e=>new Ce(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?l.From(e.binarizationFilter):null)}}(ye=be||(be={})).defaultCompression="LZW",ye.binaryDocumentOptimizedCompression="CCITT_T6";var Ee=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};let xe;class _e extends Error{}class Ae{constructor(e){this.id=e}}const De={};function Te(e){const t=Math.random().toString(36);return De[t]=e,new Ae(t)}function ke(e){if(!De.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return De[e.id]}function Pe(e){const t=ke(e);t.delete&&t.delete(),delete De[e.id]}const ze={initialize:function(e,t,n,o,a){return Ee(this,void 0,void 0,(function*(){try{const{captureConsole:s,jpegQuality:u=80,requestSuffix:c=""}=a||{};s&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const d=r(2),m=r(3),l={locateFile:function(e,r){let n;return n=t?Object(i.c)(t)?t:"":o,e.endsWith(".worker.js")&&m?m.default:new URL(n+e+c,location.href).href}},h=Object(i.b)(a),f=h.includes("-threads");l.mainScriptUrlOrBlob=l.locateFile(`ScanbotSDK.Asm${h}.js`);let p;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&f){let e=[2147483648,805306368,536870912],t=134217728;const r=["barcode-scanner"],i=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=i,e.push(4*i));for(let r=0;r<e.length;r++){const i=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:i/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(l.wasmMemory=p),l.onAbort=function(e){const t="\nNo further calls to the SDK are possible until you destroy and reinitialize the SDK.";throw new _e("OOM"===e?"ScanbotSDK ran out of memory. "+t:"ScanbotSDK ran into an unexpected error: "+e+t)},yield d(l),xe=l,xe.initialize(e||"",n,u)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return Ee(this,void 0,void 0,(function*(){return xe.getLicenseInfo()}))},encodeJpeg:function(e){return Ee(this,void 0,void 0,(function*(){const t=Re(e);return Me(xe.encodeJpeg(t))}))},detectDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){const r=new xe.DocumentDetector(new C(t)),i=r.detect(Re(e));return r.delete(),Me(i)}))},detectAndCropDocument:function(e){return Ee(this,void 0,void 0,(function*(){let t=Me(xe.detectAndCropDocument(Re(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.DocumentDetector(new C(e)))}))},documentScannerDetect:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).detect(Re(t)),t)}))},parseBarcodeDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.parseBarcodeDocument(e,t))}))},createBarcodeScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.BarcodeRecognizer(new ue(e)))}))},scanBarcodes:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t)),t)}))},beginPdf:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.PdfGenerationContext(new a(e)))}))},addPageToPdf:function(e,t){return Ee(this,void 0,void 0,(function*(){Me(ke(e).addPage(Re(t)))}))},completePdf:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Pe(e)}}))},beginTiff:function(e){return Ee(this,void 0,void 0,(function*(){const t=new xe.TiffGenerationContext(new be(e));return Me(t.begin()),Te(t)}))},addPageToTiff:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).addPage(Re(t),r))}))},completeTiff:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Pe(e)}}))},createMRZScanner:function(e){return Ee(this,void 0,void 0,(function*(){e.incompleteResultHandling="REJECT",e.enableDetection=!1;return Te(new xe.MRZScannerContext(new c(e)))}))},scanMRZ:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).scan(Re(t)),t)}))},releaseObject:function(e){return Ee(this,void 0,void 0,(function*(){Pe(e)}))},createOcrEngine:function(){return Ee(this,void 0,void 0,(function*(){return Te(new xe.TLDROcrContext)}))},performOcr:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).performOcr(Re(t)))}))},createTextPatternScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.GenericTextLineScanner(new _(e)))}))},scanTextLine:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t)),t)}))},cleanTextLineScanningQueue:function(e){return Ee(this,void 0,void 0,(function*(){ke(e).cleanRecognitionQueue()}))},createVinScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.VinScanner(new A(e)))}))},scanVin:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).run(Re(t)),t)}))},cleanVinScanningQueue:function(e){return Ee(this,void 0,void 0,(function*(){ke(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.DocumentQualityAnalyzer(new m(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).analyze(Re(t)))}))},imageApplyFilter:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageApplyFilter(Re(e),l.From(t)))}))},imageCrop:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageCrop(Re(e),t))}))},imageResize:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageResize(Re(e),t))}))},imageRotate:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(xe.imageRotate(Re(e),t))}))},documentDataExtractorCreate:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new xe.GenericDocumentRecognizer(new ge(e)))}))},documentDataExtractorExtract:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t),new pe(r)),t)}))},version:function(){return Ee(this,void 0,void 0,(function*(){return"7.0.0-dev.2"}))},__hasModuleFunction:function(e){return Ee(this,void 0,void 0,(function*(){return xe.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return Ee(this,void 0,void 0,(function*(){return xe[e](...t)}))}};function Me(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Oe(e,t){return Object.assign(Object.assign({},Me(e)),{originalImage:t})}function Re(e){if(!e)throw new Error("null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;xe||"initialize"===t?(()=>Ee(this,void 0,void 0,(function*(){return yield ze[t].apply(null,r)})))().then((e=>{const t=Object(i.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{if(e instanceof _e)self.postMessage({ticket:n,unrecoverableError:e});else{const t="number"==typeof e?Error(xe.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,recoverableError:t})}})):self.postMessage({ticket:n,recoverableError:new Error("WASM module not loaded yet.")})}}]);
|
|
1
|
+
!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e){function i(e,t=!1){const r=[];if(t)return r;return function e(t){if(t)if(t.constructor===ImageData)r.push(t.data.buffer);else if(t.constructor===ArrayBuffer)r.push(t);else if(ArrayBuffer.isView(t))r.push(t.buffer);else if(Array.isArray(t))for(let r=0;r<t.length;++r)e(t[r]);else if(t.constructor===Object)for(const r in t)t.hasOwnProperty(r)&&e(t[r])}(e),r}function n(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:i=!0}=t||{};let n="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){n+="-simd";i&&function(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}()&&(n+="-threads")}return n}r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,i,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var u,c=[],d=!1,m=-1;function l(){d&&u&&(d=!1,u.length?c=u.concat(c):m=-1,c.length&&h())}function h(){if(!d){var e=s(l);d=!0;for(var t=c.length;t;){for(u=c,c=[];++m<t;)u&&u[m].run();m=-1,t=c.length}u=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||d||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,r){"use strict";var i,n=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,r,n=e;n.ready=new Promise(((e,i)=>{t=e,r=i}));var o,a,s,u=Object.assign({},n),c="./this.program",d=(e,t)=>{throw t},m="";m=self.location.href,i&&(m=i),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)};var l,h=n.print||console.log.bind(console),f=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(c=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(l=n.wasmBinary);var p,g=n.noExitRuntime||!0;"object"!=typeof WebAssembly&&B("no native wasm support detected");var v,y,w,S,F,C,b,E,_,x=!1;function A(){var e=p.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=S=new Uint16Array(e),n.HEAP32=F=new Int32Array(e),n.HEAPU32=C=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=E=new Float64Array(e)}var D,T,k,P,z=[],M=[],O=[],R=0,Q=null,Z=null;function L(e){R++,n.monitorRunDependencies&&n.monitorRunDependencies(R)}function $(e){if(R--,n.monitorRunDependencies&&n.monitorRunDependencies(R),0==R&&(null!==Q&&(clearInterval(Q),Q=null),Z)){var t=Z;Z=null,t()}}function B(e){n.onAbort&&n.onAbort(e),f(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw r(t),t}function j(e){return e.startsWith("data:application/octet-stream;base64,")}function N(e){if(e==D&&l)return new Uint8Array(l);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function I(e,t,r){return function(e){return l||"function"!=typeof fetch?Promise.resolve().then((()=>N(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>N(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{f(`failed to asynchronously prepare wasm: ${e}`),B(e)}))}j(D="ScanbotSDK.Asm-simd.wasm")||(T=D,D=n.locateFile?n.locateFile(T,m):m+T);var W={1371016:e=>vr(function(){return this[pe(e)].toString()}.apply((0,eval)("(()=>this)()")))};function H(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var U=e=>{for(;e.length>0;)e.shift()(n)},V=[],q=0,Y=0;function G(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Qr(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var J=e=>{var t=Y;if(!t)return Ar(0),0;var r=new G(t);r.set_adjusted_ptr(t);var i=r.get_type();if(!i)return Ar(0),t;for(var n in e){var o=e[n];if(0===o||o===i)break;var a=r.ptr+16;if(Rr(o,i,a))return Ar(o),t}return Ar(i),t},X=()=>{var e=V.pop();e||B("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(V.push(e),e.set_rethrown(!0),e.set_caught(!1),q++),Y=t},K={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=K.isAbs(e),r="/"===e.substr(-1);return(e=K.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=K.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=K.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return K.normalize(e.join("/"))},join2:(e,t)=>K.normalize(e+"/"+t)},ee=e=>(ee=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);B("initRandomDevice")})())(e),te={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:fe.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=K.isAbs(i)}return(t?"/":"")+(e=K.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=te.resolve(e).substr(1),t=te.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),o=Math.min(i.length,n.length),a=o,s=0;s<o;s++)if(i[s]!==n[s]){a=s;break}var u=[];for(s=a;s<i.length;s++)u.push("..");return(u=u.concat(n.slice(a))).join("/")}},re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ie=(e,t,r)=>{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&re)return re.decode(e.subarray(t,n));for(var o="";t<n;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ne=[],oe=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++r):t+=3}return t},ae=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,o=r+i-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-n};function se(e,t,r){var i=r>0?r:oe(e)+1,n=new Array(i),o=ae(e,n,0,n.length);return t&&(n.length=o),n}var ue={ttys:[],init(){},shutdown(){},register(e,t){ue.ttys[e]={input:[],output:[],ops:t},fe.registerDevice(e,ue.stream_ops)},stream_ops:{open(e){var t=ue.ttys[e.node.rdev];if(!t)throw new fe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new fe.ErrnoError(60);for(var o=0,a=0;a<i;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new fe.ErrnoError(29)}if(void 0===s&&0===o)throw new fe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,i,n){if(!e.tty||!e.tty.ops.put_char)throw new fe.ErrnoError(60);try{for(var o=0;o<i;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new fe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!ne.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ne=se(e,!0)}return ne.shift()})(),put_char(e,t){null===t||10===t?(h(ie(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(h(ie(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(f(ie(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(f(ie(e.output,0)),e.output=[])}}},ce=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=Tr(65536,e);return t?((e,t)=>(y.fill(0,e,e+t),e))(t,e):0},de={ops_table:null,mount:e=>de.createNode(null,"/",16895,0),createNode(e,t,r,i){if(fe.isBlkdev(r)||fe.isFIFO(r))throw new fe.ErrnoError(63);de.ops_table||(de.ops_table={dir:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,lookup:de.node_ops.lookup,mknod:de.node_ops.mknod,rename:de.node_ops.rename,unlink:de.node_ops.unlink,rmdir:de.node_ops.rmdir,readdir:de.node_ops.readdir,symlink:de.node_ops.symlink},stream:{llseek:de.stream_ops.llseek}},file:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:{llseek:de.stream_ops.llseek,read:de.stream_ops.read,write:de.stream_ops.write,allocate:de.stream_ops.allocate,mmap:de.stream_ops.mmap,msync:de.stream_ops.msync}},link:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr,readlink:de.node_ops.readlink},stream:{}},chrdev:{node:{getattr:de.node_ops.getattr,setattr:de.node_ops.setattr},stream:fe.chrdev_stream_ops}});var n=fe.createNode(e,t,r,i);return fe.isDir(n.mode)?(n.node_ops=de.ops_table.dir.node,n.stream_ops=de.ops_table.dir.stream,n.contents={}):fe.isFile(n.mode)?(n.node_ops=de.ops_table.file.node,n.stream_ops=de.ops_table.file.stream,n.usedBytes=0,n.contents=null):fe.isLink(n.mode)?(n.node_ops=de.ops_table.link.node,n.stream_ops=de.ops_table.link.stream):fe.isChrdev(n.mode)&&(n.node_ops=de.ops_table.chrdev.node,n.stream_ops=de.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=fe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,fe.isDir(e.mode)?t.size=4096:fe.isFile(e.mode)?t.size=e.usedBytes:fe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&de.resizeFileStorage(e,t.size)},lookup(e,t){throw fe.genericErrors[44]},mknod:(e,t,r,i)=>de.createNode(e,t,r,i),rename(e,t,r){if(fe.isDir(e.mode)){var i;try{i=fe.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=fe.lookupNode(e,t);for(var i in r.contents)throw new fe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=de.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!fe.isLink(e.mode))throw new fe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var o=e.node.contents;if(n>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,i);if(a>8&&o.subarray)t.set(o.subarray(n,n+a),r);else for(var s=0;s<a;s++)t[r+s]=o[n+s];return a},write(e,t,r,i,n,o){if(t.buffer===v.buffer&&(o=!1),!i)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(o)return a.contents=t.subarray(r,r+i),a.usedBytes=i,i;if(0===a.usedBytes&&0===n)return a.contents=t.slice(r,r+i),a.usedBytes=i,i;if(n+i<=a.usedBytes)return a.contents.set(t.subarray(r,r+i),n),i}if(de.expandFileStorage(a,n+i),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+i),n);else for(var s=0;s<i;s++)a.contents[n+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,n+i),i},llseek(e,t,r){var i=t;if(1===r?i+=e.position:2===r&&fe.isFile(e.node.mode)&&(i+=e.node.usedBytes),i<0)throw new fe.ErrnoError(28);return i},allocate(e,t,r){de.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,t,r,i,n){if(!fe.isFile(e.node.mode))throw new fe.ErrnoError(43);var o,a,s=e.node.contents;if(2&n||s.buffer!==v.buffer){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(o=ce(t)))throw new fe.ErrnoError(48);v.set(s,o)}else a=!1,o=s.byteOffset;return{ptr:o,allocated:a}},msync:(e,t,r,i,n)=>(de.stream_ops.write(e,t,0,i,r,!1),0)}},me=(e,t,r,i)=>{var n=i?"":`al ${e}`;a(e,(r=>{var i;i=`Loading data file "${e}" failed (no arrayBuffer).`,r||B(i),t(new Uint8Array(r)),n&&$()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&L()},le=n.preloadPlugins||[],he=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=te.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new fe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=fe.root,n="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(i=fe.lookupNode(i,r[o]),n=K.join2(n,r[o]),fe.isMountpoint(i)&&(!a||a&&t.follow_mount)&&(i=i.mounted.root),!a||t.follow)for(var s=0;fe.isLink(i.mode);){var u=fe.readlink(n);if(n=te.resolve(K.dirname(n),u),i=fe.lookupPath(n,{recurse_count:t.recurse_count+1}).node,s++>40)throw new fe.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(fe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%fe.nameTable.length},hashAddNode(e){var t=fe.hashName(e.parent.id,e.name);e.name_next=fe.nameTable[t],fe.nameTable[t]=e},hashRemoveNode(e){var t=fe.hashName(e.parent.id,e.name);if(fe.nameTable[t]===e)fe.nameTable[t]=e.name_next;else for(var r=fe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=fe.mayLookup(e);if(r)throw new fe.ErrnoError(r,e);for(var i=fe.hashName(e.id,t),n=fe.nameTable[i];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===t)return n}return fe.lookup(e,t)},createNode(e,t,r,i){var n=new fe.FSNode(e,t,r,i);return fe.hashAddNode(n),n},destroyNode(e){fe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>fe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=fe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return fe.lookupNode(e,t),20}catch(e){}return fe.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=fe.lookupNode(e,t)}catch(e){return e.errno}var n=fe.nodePermissions(e,"wx");if(n)return n;if(r){if(!fe.isDir(i.mode))return 54;if(fe.isRoot(i)||fe.getPath(i)===fe.cwd())return 10}else if(fe.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?fe.isLink(e.mode)?32:fe.isDir(e.mode)&&("r"!==fe.flagsToPermissionString(t)||512&t)?31:fe.nodePermissions(e,fe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=fe.MAX_OPEN_FDS;e++)if(!fe.streams[e])return e;throw new fe.ErrnoError(33)},getStreamChecked(e){var t=fe.getStream(e);if(!t)throw new fe.ErrnoError(8);return t},getStream:e=>fe.streams[e],createStream:(e,t=-1)=>(fe.FSStream||(fe.FSStream=function(){this.shared={}},fe.FSStream.prototype={},Object.defineProperties(fe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new fe.FSStream,e),-1==t&&(t=fe.nextfd()),e.fd=t,fe.streams[t]=e,e),closeStream(e){fe.streams[e]=null},chrdev_stream_ops:{open(e){var t=fe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){fe.devices[e]={stream_ops:t}},getDevice:e=>fe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),fe.syncFSRequests++,fe.syncFSRequests>1&&f(`warning: ${fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=fe.getMounts(fe.root.mount),i=0;function n(e){return fe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var i,n="/"===r,o=!r;if(n&&fe.root)throw new fe.ErrnoError(10);if(!n&&!o){var a=fe.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,fe.isMountpoint(i))throw new fe.ErrnoError(10);if(!fe.isDir(i.mode))throw new fe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,n?fe.root=u:i&&(i.mounted=s,i.mount&&i.mount.mounts.push(s)),u},unmount(e){var t=fe.lookupPath(e,{follow_mount:!1});if(!fe.isMountpoint(t.node))throw new fe.ErrnoError(28);var r=t.node,i=r.mounted,n=fe.getMounts(i);Object.keys(fe.nameTable).forEach((e=>{for(var t=fe.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&fe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(i);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=fe.lookupPath(e,{parent:!0}).node,n=K.basename(e);if(!n||"."===n||".."===n)throw new fe.ErrnoError(28);var o=fe.mayCreate(i,n);if(o)throw new fe.ErrnoError(o);if(!i.node_ops.mknod)throw new fe.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,fe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,fe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n<r.length;++n)if(r[n]){i+="/"+r[n];try{fe.mkdir(i,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,fe.mknod(e,t,r)),symlink(e,t){if(!te.resolve(e))throw new fe.ErrnoError(44);var r=fe.lookupPath(t,{parent:!0}).node;if(!r)throw new fe.ErrnoError(44);var i=K.basename(t),n=fe.mayCreate(r,i);if(n)throw new fe.ErrnoError(n);if(!r.node_ops.symlink)throw new fe.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=K.dirname(e),o=K.dirname(t),a=K.basename(e),s=K.basename(t);if(r=fe.lookupPath(e,{parent:!0}).node,i=fe.lookupPath(t,{parent:!0}).node,!r||!i)throw new fe.ErrnoError(44);if(r.mount!==i.mount)throw new fe.ErrnoError(75);var u,c=fe.lookupNode(r,a),d=te.relative(e,o);if("."!==d.charAt(0))throw new fe.ErrnoError(28);if("."!==(d=te.relative(t,n)).charAt(0))throw new fe.ErrnoError(55);try{u=fe.lookupNode(i,s)}catch(e){}if(c!==u){var m=fe.isDir(c.mode),l=fe.mayDelete(r,a,m);if(l)throw new fe.ErrnoError(l);if(l=u?fe.mayDelete(i,s,m):fe.mayCreate(i,s))throw new fe.ErrnoError(l);if(!r.node_ops.rename)throw new fe.ErrnoError(63);if(fe.isMountpoint(c)||u&&fe.isMountpoint(u))throw new fe.ErrnoError(10);if(i!==r&&(l=fe.nodePermissions(r,"w")))throw new fe.ErrnoError(l);fe.hashRemoveNode(c);try{r.node_ops.rename(c,i,s)}catch(e){throw e}finally{fe.hashAddNode(c)}}},rmdir(e){var t=fe.lookupPath(e,{parent:!0}).node,r=K.basename(e),i=fe.lookupNode(t,r),n=fe.mayDelete(t,r,!0);if(n)throw new fe.ErrnoError(n);if(!t.node_ops.rmdir)throw new fe.ErrnoError(63);if(fe.isMountpoint(i))throw new fe.ErrnoError(10);t.node_ops.rmdir(t,r),fe.destroyNode(i)},readdir(e){var t=fe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new fe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=fe.lookupPath(e,{parent:!0}).node;if(!t)throw new fe.ErrnoError(44);var r=K.basename(e),i=fe.lookupNode(t,r),n=fe.mayDelete(t,r,!1);if(n)throw new fe.ErrnoError(n);if(!t.node_ops.unlink)throw new fe.ErrnoError(63);if(fe.isMountpoint(i))throw new fe.ErrnoError(10);t.node_ops.unlink(t,r),fe.destroyNode(i)},readlink(e){var t=fe.lookupPath(e).node;if(!t)throw new fe.ErrnoError(44);if(!t.node_ops.readlink)throw new fe.ErrnoError(28);return te.resolve(fe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=fe.lookupPath(e,{follow:!t}).node;if(!r)throw new fe.ErrnoError(44);if(!r.node_ops.getattr)throw new fe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>fe.stat(e,!0),chmod(e,t,r){var i;if(!(i="string"==typeof e?fe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){fe.chmod(e,t,!0)},fchmod(e,t){var r=fe.getStreamChecked(e);fe.chmod(r.node,t)},chown(e,t,r,i){var n;if(!(n="string"==typeof e?fe.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){fe.chown(e,t,r,!0)},fchown(e,t,r){var i=fe.getStreamChecked(e);fe.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new fe.ErrnoError(28);var r;if(!(r="string"==typeof e?fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new fe.ErrnoError(63);if(fe.isDir(r.mode))throw new fe.ErrnoError(31);if(!fe.isFile(r.mode))throw new fe.ErrnoError(28);var i=fe.nodePermissions(r,"w");if(i)throw new fe.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=fe.getStreamChecked(e);if(0==(2097155&r.flags))throw new fe.ErrnoError(28);fe.truncate(r.node,t)},utime(e,t,r){var i=fe.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new fe.ErrnoError(44);var i;if(r="undefined"==typeof r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=K.normalize(e);try{i=fe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(i){if(128&t)throw new fe.ErrnoError(20)}else i=fe.mknod(e,r,0),o=!0;if(!i)throw new fe.ErrnoError(44);if(fe.isChrdev(i.mode)&&(t&=-513),65536&t&&!fe.isDir(i.mode))throw new fe.ErrnoError(54);if(!o){var a=fe.mayOpen(i,t);if(a)throw new fe.ErrnoError(a)}512&t&&!o&&fe.truncate(i,0),t&=-131713;var s=fe.createStream({node:i,path:fe.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&t||(fe.readFiles||(fe.readFiles={}),e in fe.readFiles||(fe.readFiles[e]=1)),s},close(e){if(fe.isClosed(e))throw new fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(fe.isClosed(e))throw new fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new fe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new fe.ErrnoError(28);if(fe.isClosed(e))throw new fe.ErrnoError(8);if(1==(2097155&e.flags))throw new fe.ErrnoError(8);if(fe.isDir(e.node.mode))throw new fe.ErrnoError(31);if(!e.stream_ops.read)throw new fe.ErrnoError(28);var o="undefined"!=typeof n;if(o){if(!e.seekable)throw new fe.ErrnoError(70)}else n=e.position;var a=e.stream_ops.read(e,t,r,i,n);return o||(e.position+=a),a},write(e,t,r,i,n,o){if(i<0||n<0)throw new fe.ErrnoError(28);if(fe.isClosed(e))throw new fe.ErrnoError(8);if(0==(2097155&e.flags))throw new fe.ErrnoError(8);if(fe.isDir(e.node.mode))throw new fe.ErrnoError(31);if(!e.stream_ops.write)throw new fe.ErrnoError(28);e.seekable&&1024&e.flags&&fe.llseek(e,0,2);var a="undefined"!=typeof n;if(a){if(!e.seekable)throw new fe.ErrnoError(70)}else n=e.position;var s=e.stream_ops.write(e,t,r,i,n,o);return a||(e.position+=s),s},allocate(e,t,r){if(fe.isClosed(e))throw new fe.ErrnoError(8);if(t<0||r<=0)throw new fe.ErrnoError(28);if(0==(2097155&e.flags))throw new fe.ErrnoError(8);if(!fe.isFile(e.node.mode)&&!fe.isDir(e.node.mode))throw new fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new fe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new fe.ErrnoError(2);if(1==(2097155&e.flags))throw new fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new fe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new fe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=fe.open(e,t.flags),n=fe.stat(e).size,o=new Uint8Array(n);return fe.read(i,o,0,n,0),"utf8"===t.encoding?r=ie(o,0):"binary"===t.encoding&&(r=o),fe.close(i),r},writeFile(e,t,r={}){r.flags=r.flags||577;var i=fe.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(oe(t)+1),o=ae(t,n,0,n.length);fe.write(i,n,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");fe.write(i,t,0,t.byteLength,void 0,r.canOwn)}fe.close(i)},cwd:()=>fe.currentPath,chdir(e){var t=fe.lookupPath(e,{follow:!0});if(null===t.node)throw new fe.ErrnoError(44);if(!fe.isDir(t.node.mode))throw new fe.ErrnoError(54);var r=fe.nodePermissions(t.node,"x");if(r)throw new fe.ErrnoError(r);fe.currentPath=t.path},createDefaultDirectories(){fe.mkdir("/tmp"),fe.mkdir("/home"),fe.mkdir("/home/web_user")},createDefaultDevices(){fe.mkdir("/dev"),fe.registerDevice(fe.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),fe.mkdev("/dev/null",fe.makedev(1,3)),ue.register(fe.makedev(5,0),ue.default_tty_ops),ue.register(fe.makedev(6,0),ue.default_tty1_ops),fe.mkdev("/dev/tty",fe.makedev(5,0)),fe.mkdev("/dev/tty1",fe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ee(e).byteLength),e[--t]);fe.createDevice("/dev","random",r),fe.createDevice("/dev","urandom",r),fe.mkdir("/dev/shm"),fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){fe.mkdir("/proc");var e=fe.mkdir("/proc/self");fe.mkdir("/proc/self/fd"),fe.mount({mount(){var t=fe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=fe.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?fe.createDevice("/dev","stdin",n.stdin):fe.symlink("/dev/tty","/dev/stdin"),n.stdout?fe.createDevice("/dev","stdout",null,n.stdout):fe.symlink("/dev/tty","/dev/stdout"),n.stderr?fe.createDevice("/dev","stderr",null,n.stderr):fe.symlink("/dev/tty1","/dev/stderr"),fe.open("/dev/stdin",0),fe.open("/dev/stdout",1),fe.open("/dev/stderr",1)},ensureErrnoError(){fe.ErrnoError||(fe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},fe.ErrnoError.prototype=new Error,fe.ErrnoError.prototype.constructor=fe.ErrnoError,[44].forEach((e=>{fe.genericErrors[e]=new fe.ErrnoError(e),fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){fe.ensureErrnoError(),fe.nameTable=new Array(4096),fe.mount(de,{},"/"),fe.createDefaultDirectories(),fe.createDefaultDevices(),fe.createSpecialDirectories(),fe.filesystems={MEMFS:de}},init(e,t,r){fe.init.initialized=!0,fe.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,fe.createStandardStreams()},quit(){fe.init.initialized=!1;for(var e=0;e<fe.streams.length;e++){var t=fe.streams[e];t&&fe.close(t)}},findObject(e,t){var r=fe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(i=fe.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=fe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=i.path,r.parentObject=i.node,r.name=K.basename(e),i=fe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=i.path,r.object=i.node,r.name=i.node.name,r.isRoot="/"===i.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,i){e="string"==typeof e?e:fe.getPath(e);for(var n=t.split("/").reverse();n.length;){var o=n.pop();if(o){var a=K.join2(e,o);try{fe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,i,n){var o=K.join2("string"==typeof e?e:fe.getPath(e),t),a=he(i,n);return fe.create(o,a)},createDataFile(e,t,r,i,n,o){var a=t;e&&(e="string"==typeof e?e:fe.getPath(e),a=t?K.join2(e,t):e);var s=he(i,n),u=fe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),d=0,m=r.length;d<m;++d)c[d]=r.charCodeAt(d);r=c}fe.chmod(u,146|s);var l=fe.open(u,577);fe.write(l,r,0,r.length,0,o),fe.close(l),fe.chmod(u,s)}return u},createDevice(e,t,r,i){var n=K.join2("string"==typeof e?e:fe.getPath(e),t),o=he(!!r,!!i);fe.createDevice.major||(fe.createDevice.major=64);var a=fe.makedev(fe.createDevice.major++,0);return fe.registerDevice(a,{open(e){e.seekable=!1},close(e){i&&i.buffer&&i.buffer.length&&i(10)},read(e,t,i,n,o){for(var a=0,s=0;s<n;s++){var u;try{u=r()}catch(e){throw new fe.ErrnoError(29)}if(void 0===u&&0===a)throw new fe.ErrnoError(6);if(null==u)break;a++,t[i+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,n,o){for(var a=0;a<n;a++)try{i(t[r+a])}catch(e){throw new fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}}),fe.mkdev(n,o,a)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=se(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new fe.ErrnoError(29)}},createLazyFile(e,t,r,i,n){function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;n||(a=i);var s=this;s.setDataGetter((e=>{var t=e*a,n=(e+1)*a-1;if(n=Math.min(n,i-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==a&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):se(n.responseText||"",!0)})(t,n)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&i||(a=i=1,i=this.getter(0).length,a=i,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var a=new o;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=fe.createFile(e,t,s,i,n);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function d(e,t,r,i,n){var o=e.node.contents;if(n>=o.length)return 0;var a=Math.min(o.length-n,i);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[n+s];else for(s=0;s<a;s++)t[r+s]=o.get(n+s);return a}return Object.keys(u.stream_ops).forEach((e=>{var t=u.stream_ops[e];c[e]=function(){return fe.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(e,t,r,i,n)=>(fe.forceLoadFile(u),d(e,t,r,i,n)),c.mmap=(e,t,r,i,n)=>{fe.forceLoadFile(u);var o=ce(t);if(!o)throw new fe.ErrnoError(48);return d(e,v,o,t,r),{ptr:o,allocated:!0}},u.stream_ops=c,u}},pe=(e,t)=>e?ie(y,e,t):"",ge={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(K.isAbs(t))return t;var i;if(i=-100===e?fe.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!r)throw new fe.ErrnoError(44);return i}return K.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&K.normalize(t)!==K.normalize(fe.getPath(e.node)))return-54;throw e}F[r>>2]=i.dev,F[r+4>>2]=i.mode,C[r+8>>2]=i.nlink,F[r+12>>2]=i.uid,F[r+16>>2]=i.gid,F[r+20>>2]=i.rdev,P=[i.size>>>0,(k=i.size,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+24>>2]=P[0],F[r+28>>2]=P[1],F[r+32>>2]=4096,F[r+36>>2]=i.blocks;var n=i.atime.getTime(),o=i.mtime.getTime(),a=i.ctime.getTime();return P=[Math.floor(n/1e3)>>>0,(k=Math.floor(n/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+40>>2]=P[0],F[r+44>>2]=P[1],C[r+48>>2]=n%1e3*1e3,P=[Math.floor(o/1e3)>>>0,(k=Math.floor(o/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+56>>2]=P[0],F[r+60>>2]=P[1],C[r+64>>2]=o%1e3*1e3,P=[Math.floor(a/1e3)>>>0,(k=Math.floor(a/1e3),+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+72>>2]=P[0],F[r+76>>2]=P[1],C[r+80>>2]=a%1e3*1e3,P=[i.ino>>>0,(k=i.ino,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[r+88>>2]=P[0],F[r+92>>2]=P[1],0},doMsync(e,t,r,i,n){if(!fe.isFile(t.node.mode))throw new fe.ErrnoError(43);if(2&i)return 0;var o=y.slice(e,e+r);fe.msync(t,o,n,r,i)},varargs:void 0,get(){var e=F[ge.varargs>>2];return ge.varargs+=4,e},getp:()=>ge.get(),getStr:e=>pe(e),getStreamFromFD:e=>fe.getStreamChecked(e)},ve={},ye=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function we(e){return this.fromWireType(F[e>>2])}var Se={},Fe={},Ce={},be=void 0,Ee=e=>{throw new be(e)},_e=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ee("Mismatched type converter count");for(var n=0;n<e.length;++n)ke(e[n],i[n])}e.forEach((function(e){Ce[e]=t}));var n=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{Fe.hasOwnProperty(e)?n[t]=Fe[e]:(o.push(e),Se.hasOwnProperty(e)||(Se[e]=[]),Se[e].push((()=>{n[t]=Fe[e],++a===o.length&&i(n)})))})),0===o.length&&i(n)},xe=void 0,Ae=e=>{for(var t="",r=e;y[r];)t+=xe[y[r++]];return t},De=void 0,Te=e=>{throw new De(e)};function ke(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var i=t.name;if(e||Te(`type "${i}" must have a positive integer typeid pointer`),Fe.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Te(`Cannot register type '${i}' twice`)}if(Fe[e]=t,delete Ce[e],Se.hasOwnProperty(e)){var n=Se[e];delete Se[e],n.forEach((e=>e()))}}(e,t,r)}var Pe=8;function ze(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n}var Me=e=>{Te(e.$$.ptrType.registeredClass.name+" instance already deleted")},Oe=!1,Re=e=>{},Qe=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},Ze=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=Ze(e,t,r.baseClass);return null===i?null:r.downcast(i)},Le={},$e=()=>Object.keys(He).length,Be=()=>{var e=[];for(var t in He)He.hasOwnProperty(t)&&e.push(He[t]);return e},je=[],Ne=()=>{for(;je.length;){var e=je.pop();e.$$.deleteScheduled=!1,e.delete()}},Ie=void 0,We=e=>{Ie=e,je.length&&Ie&&Ie(Ne)},He={},Ue=(e,t)=>(t=((e,t)=>{for(void 0===t&&Te("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),He[t]),Ve=(e,t)=>(t.ptrType&&t.ptr||Ee("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ee("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ye(Object.create(e,{$$:{value:t}})));function qe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Ue(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?Ve(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ve(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=Le[a];if(!s)return n.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=Ze(t,this.registeredClass,o.registeredClass);return null===u?n.call(this):this.isSmartPointer?Ve(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):Ve(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var Ye=e=>"undefined"==typeof FinalizationRegistry?(Ye=e=>e,e):(Oe=new FinalizationRegistry((e=>{Qe(e.$$)})),Ye=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Oe.register(e,r,e)}return e},Re=e=>Oe.unregister(e),Ye(e));function Ge(){if(this.$$.ptr||Me(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Ye(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Je(){this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Te("Object already scheduled for deletion"),Re(this),Qe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Xe(){return!this.$$.ptr}function Ke(){return this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Te("Object already scheduled for deletion"),je.push(this),1===je.length&&Ie&&Ie(Ne),this.$$.deleteScheduled=!0,this}function et(){}var tt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e};function rt(e,t){return{[e=tt(e)]:function(){return t.apply(this,arguments)}}[e]}var it=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Te(`Function '${r}' 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[i.argCount]=i}},nt=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&Te(`Cannot register public name '${e}' twice`),it(n,e,e),n.hasOwnProperty(r)&&Te(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function ot(e,t,r,i,n,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var at=(e,t,r)=>{for(;t!==r;)t.upcast||Te(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function st(e,t){if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function ut(e,t){var r;if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Te(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=at(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Te("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Te(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,kt.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Te("Unsupporting sharing policy")}return r}function ct(e,t){if(null===t)return this.isReference&&Te(`null is not a valid ${this.name}`),0;t.$$||Te(`Cannot pass "${Pt(t)}" as a ${this.name}`),t.$$.ptr||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Te(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return at(t.$$.ptr,r,this.registeredClass)}function dt(e){return this.fromWireType(C[e>>2])}function mt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function lt(e){this.rawDestructor&&this.rawDestructor(e)}var ht=e=>{null!==e&&e.delete()};function ft(e,t,r,i,n,o,a,s,u,c,d){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=d,n||void 0!==t.baseClass?this.toWireType=ut:i?(this.toWireType=st,this.destructorFunction=null):(this.toWireType=ct,this.destructorFunction=null)}var pt=(e,t,r)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},gt=e=>_.get(e),vt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)})(e,t,r):gt(t).apply(null,r),yt=(e,t)=>{var r,i,n,o=(e=Ae(e)).includes("j")?(r=e,i=t,n=[],function(){return n.length=0,Object.assign(n,arguments),vt(r,i,n)}):gt(t);return"function"!=typeof o&&Te(`unknown function pointer with signature ${e}: ${t}`),o},wt=void 0,St=e=>{var t=Dr(e),r=Ae(t);return _r(t),r},Ft=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Fe[t]||(Ce[t]?Ce[t].forEach(e):(r.push(t),i[t]=!0))})),new wt(`${e}: `+r.map(St).join([", "]))},Ct=(e,t)=>{for(var r=[],i=0;i<e;i++)r.push(C[t+4*i>>2]);return r};function bt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=rt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Et(e,t,r,i,n,o){var a=t.length;a<2&&Te("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var d="void"!==t[0].name,m="",l="";for(c=0;c<a-2;++c)m+=(0!==c?", ":"")+"arg"+c,l+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${tt(e)}(${m}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(h+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[Te,i,n,ye,t[0],t[1]];for(s&&(h+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),g.push(t[c+2]);if(s&&(l="thisWired"+(l.length>0?", ":"")+l),h+=(d||o?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(h+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return d&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",p.push(h),bt(Function,p).apply(null,g)}function _t(){this.allocated=[void 0],this.freelist=[]}var xt,At=new _t,Dt=e=>{e>=At.reserved&&0==--At.get(e).refcount&&At.free(e)},Tt=()=>{for(var e=0,t=At.reserved;t<At.allocated.length;++t)void 0!==At.allocated[t]&&++e;return e},kt={toValue:e=>(e||Te("Cannot use deleted val. handle = "+e),At.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 At.allocate({refcount:1,value:e})}}},Pt=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},zt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(E[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Mt=(e,t,r)=>{switch(t){case 1:return r?e=>v[e>>0]:e=>y[e>>0];case 2:return r?e=>w[e>>1]:e=>S[e>>1];case 4:return r?e=>F[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Ot=(e,t,r)=>ae(e,y,t,r),Rt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Qt=(e,t)=>{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&S[i];)++i;if((r=i<<1)-e>32&&Rt)return Rt.decode(y.subarray(e,r));for(var o="",a=0;!(a>=t/2);++a){var s=w[e+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}return o},Zt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,o=0;o<n;++o){var a=e.charCodeAt(o);w[t>>1]=a,t+=2}return w[t>>1]=0,t-i},Lt=e=>2*e.length,$t=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=F[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var o=n-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(n)}return i},Bt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),F[t>>2]=a,(t+=4)+4>n)break}return F[t>>2]=0,t-i},jt=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=55296&&i<=57343&&++r,t+=4}return t},Nt=(e,t)=>{var r=Fe[e];return void 0===r&&Te(t+" has unknown type "+St(e)),r},It={},Wt=e=>{var t=It[e];return void 0===t?Ae(e):t},Ht=[],Ut=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Vt=[],qt=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Yt=e=>e%4==0&&(e%100!=0||e%400==0),Gt=[0,31,60,91,121,152,182,213,244,274,305,335],Jt=[0,31,59,90,120,151,181,212,243,273,304,334],Xt=e=>(Yt(e.getFullYear())?Gt:Jt)[e.getMonth()]+e.getDate()-1,Kt=e=>{var t=oe(e)+1,r=Er(t);return r&&Ot(e,r,t),r},er=[],tr=(e,t,r)=>{var i=((e,t)=>{var r;for(er.length=0;r=y[e++];)t+=105!=r&&t%8?4:0,er.push(105==r?F[t>>2]:E[t>>3]),t+=105==r?4:8;return er})(t,r);return W[e].apply(null,i)};xt=()=>performance.now();var rr,ir,nr,or=e=>{B("OOM")},ar=e=>{var t=(e-p.buffer.byteLength+65535)/65536;try{return p.grow(t),A(),1}catch(e){}},sr={},ur=()=>{if(!ur.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var t in sr)void 0===sr[t]?delete e[t]:e[t]=sr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);ur.strings=r}return ur.strings},cr=e=>{g||(n.onExit&&n.onExit(e),x=!0),d(e,new H(e))},dr=(e,t)=>{cr(e)},mr=(e,t)=>{for(var r=0,i=0;i<=t;r+=e[i++]);return r},lr=[31,29,31,30,31,30,31,31,30,31,30,31],hr=[31,28,31,30,31,30,31,31,30,31,30,31],fr=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var i=Yt(r.getFullYear()),n=r.getMonth(),o=(i?lr:hr)[n];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),n<11?r.setMonth(n+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r},pr=(e,t,r,i)=>{var n=C[i+40>>2],o={tm_sec:F[i>>2],tm_min:F[i+4>>2],tm_hour:F[i+8>>2],tm_mday:F[i+12>>2],tm_mon:F[i+16>>2],tm_year:F[i+20>>2],tm_wday:F[i+24>>2],tm_yday:F[i+28>>2],tm_isdst:F[i+32>>2],tm_gmtoff:F[i+36>>2],tm_zone:n?pe(n):""},a=pe(r),s={"%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 u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(e,t,r){for(var i="number"==typeof e?e.toString():e||"";i.length<t;)i=r[0]+i;return i}function l(e,t){return m(e,t,"0")}function h(e,t){function r(e){return e<0?-1:e>0?1:0}var i;return 0===(i=r(e.getFullYear()-t.getFullYear()))&&0===(i=r(e.getMonth()-t.getMonth()))&&(i=r(e.getDate()-t.getDate())),i}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=fr(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),n=f(r),o=f(i);return h(n,t)<=0?h(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":e=>c[e.tm_wday].substring(0,3),"%A":e=>c[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>l((e.tm_year+1900)/100|0,2),"%d":e=>l(e.tm_mday,2),"%e":e=>m(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>l(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),l(t,2)},"%j":e=>l(e.tm_mday+mr(Yt(e.tm_year+1900)?lr:hr,e.tm_mon-1),3),"%m":e=>l(e.tm_mon+1,2),"%M":e=>l(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>l(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return l(Math.floor(t/7),2)},"%V":e=>{var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Yt(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&Yt(e.tm_year%400-1))&&t++}return l(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return l(Math.floor(t/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in a=a.replace(/%%/g,"\0\0"),g)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),g[u](o)));var y,w,S=se(a=a.replace(/\0\0/g,"%"),!1);return S.length>t?0:(y=S,w=e,v.set(y,w),S.length-1)},gr=e=>parseInt(e),vr=Kt,yr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=fe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},wr=365,Sr=146;Object.defineProperties(yr.prototype,{read:{get:function(){return(this.mode&wr)===wr},set:function(e){e?this.mode|=wr:this.mode&=-366}},write:{get:function(){return(this.mode&Sr)===Sr},set:function(e){e?this.mode|=Sr:this.mode&=-147}},isFolder:{get:function(){return fe.isDir(this.mode)}},isDevice:{get:function(){return fe.isChrdev(this.mode)}}}),fe.FSNode=yr,fe.createPreloadedFile=(e,t,r,i,n,o,a,s,u,c)=>{var d=t?te.resolve(K.join2(e,t)):e;function m(r){function m(r){c&&c(),s||fe.createDataFile(e,t,r,i,n,u),o&&o(),$()}((e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return le.forEach((o=>{n||o.canHandle(t)&&(o.handle(e,t,r,i),n=!0)})),n})(r,d,m,(()=>{a&&a(),$()}))||m(r)}L(),"string"==typeof r?me(r,(e=>m(e)),a):m(r)},fe.staticInit(),be=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);xe=e})(),De=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},et.prototype.isAliasOf=ze,et.prototype.clone=Ge,et.prototype.delete=Je,et.prototype.isDeleted=Xe,et.prototype.deleteLater=Ke,n.getInheritedInstanceCount=$e,n.getLiveInheritedInstances=Be,n.flushPendingDeletes=Ne,n.setDelayFunction=We,ft.prototype.getPointee=mt,ft.prototype.destructor=lt,ft.prototype.argPackAdvance=Pe,ft.prototype.readValueFromPointer=dt,ft.prototype.deleteObject=ht,ft.prototype.fromWireType=qe,wt=n.UnboundTypeError=(rr=Error,(nr=rt(ir="UnboundTypeError",(function(e){this.name=ir,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(rr.prototype),nr.prototype.constructor=nr,nr.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},nr),Object.assign(_t.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},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)}}),At.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),At.reserved=At.allocated.length,n.count_emval_handles=Tt;var Fr,Cr={s:e=>{var t=new G(e);return t.get_caught()||(t.set_caught(!0),q--),t.set_rethrown(!1),V.push(t),Or(t.excPtr),t.get_exception_ptr()},Bb:()=>{if(!V.length)return 0;var e=V[V.length-1];return Or(e.excPtr),e.excPtr},D:()=>{kr(0,0);var e=V.pop();Mr(e.excPtr),Y=0},a:()=>J([]),h:e=>J([e]),I:(e,t)=>J([e,t]),Ia:X,Ab:e=>{if(e){var t=new G(e);V.push(t),t.set_rethrown(!0),X()}},o:(e,t,r)=>{throw new G(e).init(t,r),q++,Y=e},Cb:()=>q,c:e=>{throw Y||(Y=e),Y},Hb:function(e,t,r,i,n){try{for(var o=0,a=t?F[t>>2]:0,s=t?F[t+4>>2]:0,u=r?F[r>>2]:0,c=r?F[r+4>>2]:0,d=i?F[i>>2]:0,m=i?F[i+4>>2]:0,l=0,h=0,f=0,p=0,g=0,v=0,y=(t?F[t>>2]:0)|(r?F[r>>2]:0)|(i?F[i>>2]:0),w=(t?F[t+4>>2]:0)|(r?F[r+4>>2]:0)|(i?F[i+4>>2]:0),S=function(e,t,r,i){return e<32?t&i:r&i},C=0;C<e;C++){var b=1<<C%32;if(S(C,y,w,b)){var E=ge.getStreamFromFD(C),_=ge.DEFAULT_POLLMASK;if(E.stream_ops.poll){var x=-1;n&&(x=1e3*((t?F[n>>2]:0)+(t?F[n+8>>2]:0)/1e6)),_=E.stream_ops.poll(E,x)}1&_&&S(C,a,s,b)&&(C<32?l|=b:h|=b,o++),4&_&&S(C,u,c,b)&&(C<32?f|=b:p|=b,o++),2&_&&S(C,d,m,b)&&(C<32?g|=b:v|=b,o++)}}return t&&(F[t>>2]=l,F[t+4>>2]=h),r&&(F[r>>2]=f,F[r+4>>2]=p),i&&(F[i>>2]=g,F[i+4>>2]=v),o}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ma:function(e,t,r){ge.varargs=r;try{var i=ge.getStreamFromFD(e);switch(t){case 0:if((n=ge.get())<0)return-28;for(;fe.streams[n];)n++;return fe.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=ge.get();return i.flags|=n,0;case 5:return n=ge.getp(),w[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return o=28,F[xr()>>2]=o,-1}}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}var o},Qb:function(e,t){try{var r=ge.getStreamFromFD(e);return ge.doStat(fe.stat,r.path,t)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Rb:function(e,t,r){ge.varargs=r;try{var i=ge.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return i.tty?0:-59;case 21505:if(!i.tty)return-59;if(i.tty.ops.ioctl_tcgets){var n=i.tty.ops.ioctl_tcgets(i),o=ge.getp();F[o>>2]=n.c_iflag||0,F[o+4>>2]=n.c_oflag||0,F[o+8>>2]=n.c_cflag||0,F[o+12>>2]=n.c_lflag||0;for(var a=0;a<32;a++)v[o+a+17>>0]=n.c_cc[a]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!i.tty)return-59;if(i.tty.ops.ioctl_tcsets){o=ge.getp();var s=F[o>>2],u=F[o+4>>2],c=F[o+8>>2],d=F[o+12>>2],m=[];for(a=0;a<32;a++)m.push(v[o+a+17>>0]);return i.tty.ops.ioctl_tcsets(i.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:d,c_cc:m})}return 0;case 21519:return i.tty?(o=ge.getp(),F[o>>2]=0,0):-59;case 21520:return i.tty?-28:-59;case 21531:return o=ge.getp(),fe.ioctl(i,t,o);case 21523:if(!i.tty)return-59;if(i.tty.ops.ioctl_tiocgwinsz){var l=i.tty.ops.ioctl_tiocgwinsz(i.tty);o=ge.getp(),w[o>>1]=l[0],w[o+2>>1]=l[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ob:function(e,t,r,i){try{t=ge.getStr(t);var n=256&i,o=4096&i;return i&=-6401,t=ge.calculateAt(e,t,o),ge.doStat(n?fe.lstat:fe.stat,t,r)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Na:function(e,t,r,i){ge.varargs=i;try{t=ge.getStr(t),t=ge.calculateAt(e,t);var n=i?ge.get():0;return fe.open(t,r,n).fd}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Jb:function(e){try{return e=ge.getStr(e),fe.rmdir(e),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Pb:function(e,t){try{return e=ge.getStr(e),ge.doStat(fe.stat,e,t)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Kb:function(e,t,r){try{return t=ge.getStr(t),t=ge.calculateAt(e,t),0===r?fe.unlink(t):512===r?fe.rmdir(t):B("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},hb:e=>{var t=ve[e];delete ve[e];var r=t.rawConstructor,i=t.rawDestructor,n=t.fields,o=n.map((e=>e.getterReturnType)).concat(n.map((e=>e.setterArgumentType)));_e([e],o,(e=>{var o={};return n.forEach(((t,r)=>{var i=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+n.length],d=t.setter,m=t.setterContext;o[i]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];d(m,e,c.toWireType(r,t)),ye(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return i(e),t},toWireType:(e,t)=>{for(var n in o)if(!(n in t))throw new TypeError(`Missing field: "${n}"`);var a=r();for(n in o)o[n].write(a,t[n]);return null!==e&&e.push(i,a),a},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:i}]}))},ub:(e,t,r,i,n)=>{},Wb:(e,t,r,i)=>{ke(e,{name:t=Ae(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Pe,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},fb:(e,t,r,i,n,o,a,s,u,c,d,m,l)=>{d=Ae(d),o=yt(n,o),s&&(s=yt(a,s)),c&&(c=yt(u,c)),l=yt(m,l);var h=tt(d);nt(h,(function(){Ft(`Cannot construct ${d} due to unbound types`,[i])})),_e([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:et.prototype;var a=rt(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new De("Use 'new' to construct "+d);if(void 0===m.constructor_body)throw new De(d+" has no accessible constructor");var e=m.constructor_body[arguments.length];if(void 0===e)throw new De(`Tried to invoke ctor of ${d} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(n,{constructor:{value:a}});a.prototype=u;var m=new ot(d,a,u,l,r,o,s,c);m.baseClass&&(void 0===m.baseClass.__derivedClasses&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var f=new ft(d,m,!0,!1,!1),p=new ft(d+"*",m,!1,!1,!1),g=new ft(d+" const*",m,!1,!0,!1);return Le[e]={pointerType:p,constPointerType:g},pt(h,a),[f,p,g]}))},eb:(e,t,r,i,n,o)=>{var a=Ct(t,r);n=yt(i,n),_e([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new De(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Ft(`Cannot construct ${e.name} due to unbound types`,a)},_e([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Et(r,i,null,n,o),[]))),[]}))},db:(e,t,r,i,n,o,a,s,u)=>{var c=Ct(r,i);t=Ae(t),o=yt(n,o),_e([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Ft(`Cannot call ${i} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var d=e.registeredClass.instancePrototype,m=d[t];return void 0===m||void 0===m.overloadTable&&m.className!==e.name&&m.argCount===r-2?(n.argCount=r-2,n.className=e.name,d[t]=n):(it(d,t,i),d[t].overloadTable[r-2]=n),_e([],c,(function(n){var s=Et(i,n,e,o,a,u);return void 0===d[t].overloadTable?(s.argCount=r-2,d[t]=s):d[t].overloadTable[r-2]=s,[]})),[]}))},Ub:(e,t)=>{ke(e,{name:t=Ae(t),fromWireType:e=>{var t=kt.toValue(e);return Dt(e),t},toWireType:(e,t)=>kt.toHandle(t),argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:null})},Pa:(e,t,r)=>{ke(e,{name:t=Ae(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Pe,readValueFromPointer:zt(t,r),destructorFunction:null})},ba:(e,t,r,i,n,o,a)=>{var s=Ct(t,r);e=Ae(e),n=yt(i,n),nt(e,(function(){Ft(`Cannot call ${e} due to unbound types`,s)}),t-1),_e([],s,(function(r){var i=[r[0],null].concat(r.slice(1));return pt(e,Et(e,i,null,n,o,a),t-1),[]}))},T:(e,t,r,i,n)=>{t=Ae(t),-1===n&&(n=4294967295);var o=e=>e;if(0===i){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");ke(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Pe,readValueFromPointer:Mt(t,r,0!==i),destructorFunction:null})},G:(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=C[e>>2],r=C[e+4>>2];return new i(v.buffer,r,t)}ke(e,{name:r=Ae(r),fromWireType:n,argPackAdvance:Pe,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},Oa:(e,t)=>{var r="std::string"===(t=Ae(t));ke(e,{name:t,fromWireType:e=>{var t,i=C[e>>2],n=e+4;if(r)for(var o=n,a=0;a<=i;++a){var s=n+a;if(a==i||0==y[s]){var u=pe(o,s-o);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),o=s+1}}else{var c=new Array(i);for(a=0;a<i;++a)c[a]=String.fromCharCode(y[n+a]);t=c.join("")}return _r(e),t},toWireType:(e,t)=>{var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Te("Cannot pass non-string to std::string"),i=r&&n?oe(t):t.length;var o=Er(4+i+1),a=o+4;if(C[o>>2]=i,r&&n)Ot(t,a,i+1);else if(n)for(var s=0;s<i;++s){var u=t.charCodeAt(s);u>255&&(_r(a),Te("String has UTF-16 code units that do not fit in 8 bits")),y[a+s]=u}else for(s=0;s<i;++s)y[a+s]=t[s];return null!==e&&e.push(_r,o),o},argPackAdvance:Pe,readValueFromPointer:dt,destructorFunction:e=>_r(e)})},Aa:(e,t,r)=>{var i,n,o,a,s;r=Ae(r),2===t?(i=Qt,n=Zt,a=Lt,o=()=>S,s=1):4===t&&(i=$t,n=Bt,a=jt,o=()=>C,s=2),ke(e,{name:r,fromWireType:e=>{for(var r,n=C[e>>2],a=o(),u=e+4,c=0;c<=n;++c){var d=e+4+c*t;if(c==n||0==a[d>>s]){var m=i(u,d-u);void 0===r?r=m:(r+=String.fromCharCode(0),r+=m),u=d+t}}return _r(e),r},toWireType:(e,i)=>{"string"!=typeof i&&Te(`Cannot pass non-string to C++ string type ${r}`);var o=a(i),u=Er(4+o+t);return C[u>>2]=o>>s,n(i,u+4,o+t),null!==e&&e.push(_r,u),u},argPackAdvance:Pe,readValueFromPointer:we,destructorFunction:e=>_r(e)})},ib:(e,t,r,i,n,o)=>{ve[e]={name:Ae(t),rawConstructor:yt(r,i),rawDestructor:yt(n,o),fields:[]}},gb:(e,t,r,i,n,o,a,s,u,c)=>{ve[e].fields.push({fieldName:Ae(t),getterReturnType:r,getter:yt(i,n),getterContext:o,setterArgumentType:a,setter:yt(s,u),setterContext:c})},Xb:(e,t)=>{ke(e,{isVoid:!0,name:t=Ae(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Sb:()=>!0,Db:()=>{throw 1/0},da:(e,t,r)=>{e=kt.toValue(e),t=Nt(t,"emval::as");var i=[],n=kt.toHandle(i);return C[r>>2]=n,t.toWireType(i,e)},wa:(e,t,r,i,n)=>(e=Ht[e])(t=kt.toValue(t),r=Wt(r),(e=>{var t=[];return C[e>>2]=kt.toHandle(t),t})(i),n),va:(e,t,r,i)=>{(e=Ht[e])(t=kt.toValue(t),r=Wt(r),null,i)},Ib:Dt,$a:e=>0===e?kt.toHandle(Ut()):(e=Wt(e),kt.toHandle(Ut()[e])),ca:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),i=0;i<e;++i)r[i]=Nt(C[t+4*i>>2],"parameter "+i);return r})(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Vt[n];if(void 0!==o)return o;for(var a=["retType"],s=[i],u="",c=0;c<e-1;++c)u+=(0!==c?", ":"")+"arg"+c,a.push("argType"+c),s.push(r[1+c]);var d="return function "+tt("methodCaller_"+n)+"(handle, name, destructors, args) {\n",m=0;for(c=0;c<e-1;++c)d+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(m?"+"+m:"")+");\n",m+=r[c+1].argPackAdvance;for(d+=" var rv = handle[name]("+u+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(d+=" argType"+c+".deleteObject(arg"+c+");\n");i.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",a.push(d);var l,h,f=bt(Function,a).apply(null,s);return l=f,h=Ht.length,Ht.push(l),o=h,Vt[n]=o,o},kb:(e,t)=>(e=kt.toValue(e),t=kt.toValue(t),kt.toHandle(e[t])),u:e=>{e>4&&(At.get(e).refcount+=1)},X:()=>kt.toHandle([]),U:e=>kt.toHandle(Wt(e)),H:()=>kt.toHandle({}),jb:e=>{var t=kt.toValue(e);ye(t),Dt(e)},Vb:(e,t,r)=>{e=kt.toValue(e),t=kt.toValue(t),r=kt.toValue(r),e[t]=r},S:(e,t)=>{var r=(e=Nt(e,"_emval_take_value")).readValueFromPointer(t);return kt.toHandle(r)},qb:function(e,t,r){var i=qt(e,t),n=new Date(1e3*i);F[r>>2]=n.getUTCSeconds(),F[r+4>>2]=n.getUTCMinutes(),F[r+8>>2]=n.getUTCHours(),F[r+12>>2]=n.getUTCDate(),F[r+16>>2]=n.getUTCMonth(),F[r+20>>2]=n.getUTCFullYear()-1900,F[r+24>>2]=n.getUTCDay();var o=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),a=(n.getTime()-o)/864e5|0;F[r+28>>2]=a},rb:function(e,t,r){var i=qt(e,t),n=new Date(1e3*i);F[r>>2]=n.getSeconds(),F[r+4>>2]=n.getMinutes(),F[r+8>>2]=n.getHours(),F[r+12>>2]=n.getDate(),F[r+16>>2]=n.getMonth(),F[r+20>>2]=n.getFullYear()-1900,F[r+24>>2]=n.getDay();var o=0|Xt(n);F[r+28>>2]=o,F[r+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),0,1),s=new Date(n.getFullYear(),6,1).getTimezoneOffset(),u=a.getTimezoneOffset(),c=0|(s!=u&&n.getTimezoneOffset()==Math.min(u,s));F[r+32>>2]=c},sb:function(e){var t=(()=>{var t=new Date(F[e+20>>2]+1900,F[e+16>>2],F[e+12>>2],F[e+8>>2],F[e+4>>2],F[e>>2],0),r=F[e+32>>2],i=t.getTimezoneOffset(),n=new Date(t.getFullYear(),0,1),o=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=Math.min(a,o);if(r<0)F[e+32>>2]=Number(o!=a&&s==i);else if(r>0!=(s==i)){var u=Math.max(a,o),c=r>0?s:u;t.setTime(t.getTime()+6e4*(c-i))}F[e+24>>2]=t.getDay();var d=0|Xt(t);return F[e+28>>2]=d,F[e>>2]=t.getSeconds(),F[e+4>>2]=t.getMinutes(),F[e+8>>2]=t.getHours(),F[e+12>>2]=t.getDate(),F[e+16>>2]=t.getMonth(),F[e+20>>2]=t.getYear(),t.getTime()/1e3})();return Ar((k=t,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)),t>>>0},pb:function(e,t,r,i,n,o,a){var s=qt(o,a);try{if(isNaN(s))return 61;var u=ge.getStreamFromFD(n);2&r&&ge.doMsync(e,u,t,i,s),fe.munmap(u)}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Fb:(e,t,r)=>{var i=(new Date).getFullYear(),n=new Date(i,0,1),o=new Date(i,6,1),a=n.getTimezoneOffset(),s=o.getTimezoneOffset(),u=Math.max(a,s);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*u,F[t>>2]=Number(a!=s);var d=c(n),m=c(o),l=Kt(d),h=Kt(m);s<a?(C[r>>2]=l,C[r+4>>2]=h):(C[r>>2]=h,C[r+4>>2]=l)},y:()=>{B("")},ab:(e,t,r)=>tr(e,t,r),ya:()=>Date.now(),Gb:()=>2147483648,ia:xt,Tb:(e,t,r)=>y.copyWithin(e,t,t+r),Eb:e=>{var t=y.length,r=2147483648;(e>>>=0)>r&&or();for(var i,n,o=1;o<=4;o*=2){var a=t*(1+.2/o);a=Math.min(a,e+100663296);var s=Math.min(r,(i=Math.max(e,a))+((n=65536)-i%n)%n);if(ar(s))return!0}or()},Mb:(e,t)=>{var r=0;return ur().forEach(((i,n)=>{var o=t+r;C[e+4*n>>2]=o,((e,t)=>{for(var r=0;r<e.length;++r)v[t++>>0]=e.charCodeAt(r);v[t>>0]=0})(i,o),r+=i.length+1})),0},Nb:(e,t)=>{var r=ur();C[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),C[t>>2]=i,0},Yb:dr,za:function(e){try{var t=ge.getStreamFromFD(e);return fe.close(t),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},Lb:function(e,t){try{var r=ge.getStreamFromFD(e),i=r.tty?2:fe.isDir(r.mode)?3:fe.isLink(r.mode)?7:4;return v[t>>0]=i,w[t+2>>1]=0,P=[0,(k=0,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[t+8>>2]=P[0],F[t+12>>2]=P[1],P=[0,(k=0,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[t+16>>2]=P[0],F[t+20>>2]=P[1],0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},La:function(e,t,r,i){try{var n=((e,t,r,i)=>{for(var n=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=fe.read(e,v,a,s,i);if(u<0)return-1;if(n+=u,u<s)break;"undefined"!=typeof i&&(i+=u)}return n})(ge.getStreamFromFD(e),t,r);return C[i>>2]=n,0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},tb:function(e,t,r,i,n){var o=qt(t,r);try{if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return fe.llseek(a,o,i),P=[a.position>>>0,(k=a.position,+Math.abs(k)>=1?k>0?+Math.floor(k/4294967296)>>>0:~~+Math.ceil((k-+(~~k>>>0))/4294967296)>>>0:0)],F[n>>2]=P[0],F[n+4>>2]=P[1],a.getdents&&0===o&&0===i&&(a.getdents=null),0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},xa:function(e,t,r,i){try{var n=((e,t,r,i)=>{for(var n=0,o=0;o<r;o++){var a=C[t>>2],s=C[t+4>>2];t+=8;var u=fe.write(e,v,a,s,i);if(u<0)return-1;n+=u,"undefined"!=typeof i&&(i+=u)}return n})(ge.getStreamFromFD(e),t,r);return C[i>>2]=n,0}catch(e){if("undefined"==typeof fe||"ErrnoError"!==e.name)throw e;return e.errno}},cb:function(){return vr(location.toString())},zb:(e,t)=>(ee(y.subarray(e,e+t)),0),bb:function(){return vr((e=Ur,self[e(365,"EdYz")][e(367,"xnEO")]()));var e},Ja:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},ua:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},B:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},q:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},x:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},ea:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},P:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},la:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},t:function(e){var t=Pr();try{return gt(e)()}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},i:function(e,t){var r=Pr();try{return gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},dc:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Ta:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},cc:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{return gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},b:function(e,t,r){var i=Pr();try{return gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Wa:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},f:function(e,t,r,i){var n=Pr();try{return gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},ta:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},k:function(e,t,r,i,n){var o=Pr();try{return gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},Ka:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},n:function(e,t,r,i,n,o){var a=Pr();try{return gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},w:function(e,t,r,i,n,o,a){var s=Pr();try{return gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Q:function(e,t,r,i,n,o,a,s){var u=Pr();try{return gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},E:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{return gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Z:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},ma:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},pa:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{return gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},mb:function(e,t,r,i,n,o,a){var s=Pr();try{return Ir(e,t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},xb:function(e,t,r,i){var n=Pr();try{return $r(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},ob:function(e){var t=Pr();try{return jr(e)}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},yb:function(e,t){var r=Pr();try{return Zr(e,t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},nb:function(e,t,r){var i=Pr();try{return Nr(e,t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},vb:function(e,t,r,i){var n=Pr();try{return Br(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},lb:function(e,t,r,i,n){var o=Pr();try{return Wr(e,t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},l:function(e){var t=Pr();try{gt(e)()}catch(e){if(zr(t),e!==e+0)throw e;kr(1,0)}},g:function(e,t){var r=Pr();try{gt(e)(t)}catch(e){if(zr(r),e!==e+0)throw e;kr(1,0)}},_b:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},na:function(e,t,r){var i=Pr();try{gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},Ha:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},d:function(e,t,r){var i=Pr();try{gt(e)(t,r)}catch(e){if(zr(i),e!==e+0)throw e;kr(1,0)}},$:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},Ya:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},$b:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},sa:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},V:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ba:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},J:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},aa:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},bc:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Fa:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},ha:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Da:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ga:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},e:function(e,t,r,i){var n=Pr();try{gt(e)(t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},A:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Va:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},ac:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},K:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},z:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},fa:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},ja:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},Qa:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},O:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},Ra:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},Ea:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Xa:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},j:function(e,t,r,i,n){var o=Pr();try{gt(e)(t,r,i,n)}catch(e){if(zr(o),e!==e+0)throw e;kr(1,0)}},ra:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},C:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},W:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},Sa:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},m:function(e,t,r,i,n,o){var a=Pr();try{gt(e)(t,r,i,n,o)}catch(e){if(zr(a),e!==e+0)throw e;kr(1,0)}},ec:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},v:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},Ua:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},M:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},p:function(e,t,r,i,n,o,a){var s=Pr();try{gt(e)(t,r,i,n,o,a)}catch(e){if(zr(s),e!==e+0)throw e;kr(1,0)}},qa:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},ka:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},r:function(e,t,r,i,n,o,a,s){var u=Pr();try{gt(e)(t,r,i,n,o,a,s)}catch(e){if(zr(u),e!==e+0)throw e;kr(1,0)}},F:function(e,t,r,i,n,o,a,s,u){var c=Pr();try{gt(e)(t,r,i,n,o,a,s,u)}catch(e){if(zr(c),e!==e+0)throw e;kr(1,0)}},Ca:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},N:function(e,t,r,i,n,o,a,s,u,c){var d=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c)}catch(e){if(zr(d),e!==e+0)throw e;kr(1,0)}},ga:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h){var f=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h)}catch(e){if(zr(f),e!==e+0)throw e;kr(1,0)}},Y:function(e,t,r,i,n,o,a,s,u,c,d){var m=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d)}catch(e){if(zr(m),e!==e+0)throw e;kr(1,0)}},Za:function(e,t,r,i,n,o,a,s,u,c,d,m){var l=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m)}catch(e){if(zr(l),e!==e+0)throw e;kr(1,0)}},_:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h){var f=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h)}catch(e){if(zr(f),e!==e+0)throw e;kr(1,0)}},oa:function(e,t,r,i,n,o,a,s,u,c,d,m,l,h,f,p){var g=Pr();try{gt(e)(t,r,i,n,o,a,s,u,c,d,m,l,h,f,p)}catch(e){if(zr(g),e!==e+0)throw e;kr(1,0)}},wb:function(e,t,r,i){var n=Pr();try{Lr(e,t,r,i)}catch(e){if(zr(n),e!==e+0)throw e;kr(1,0)}},R:e=>e,_a:pr,L:(e,t,r,i,n)=>pr(e,t,r,i),Zb:(e,t,r)=>{for(var i=pe(t),n="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,a=n.length;o<a;++o)i=i.replace(new RegExp("\\"+n[o],"g"),"\\"+n[o]);var s={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var u in s)i=i.replace(u,s[u]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var d in c)i=i.replace(d,"("+d+c[d]+")");var m=[];for(o=i.indexOf("%");o>=0;o=i.indexOf("%"))m.push(i[o+1]),i=i.replace(new RegExp("\\%"+i[o+1],"g"),"");var l=new RegExp("^"+i,"i").exec(pe(e));if(l){var h,f=function(){function e(e,t,r){return"number"!=typeof e||isNaN(e)?t:e>=t?e<=r?e:r:t}return{year:e(F[r+20>>2]+1900,1970,9999),month:e(F[r+16>>2],0,11),day:e(F[r+12>>2],1,31),hour:e(F[r+8>>2],0,23),min:e(F[r+4>>2],0,59),sec:e(F[r>>2],0,59)}}(),p=e=>{var t=m.indexOf(e);if(t>=0)return l[t+1]};if((h=p("S"))&&(f.sec=gr(h)),(h=p("M"))&&(f.min=gr(h)),h=p("H"))f.hour=gr(h);else if(h=p("I")){var g=gr(h);(h=p("p"))&&(g+="P"===h.toUpperCase()[0]?12:0),f.hour=g}if(h=p("Y"))f.year=gr(h);else if(h=p("y")){var v=gr(h);(h=p("C"))?v+=100*gr(h):v+=v<69?2e3:1900,f.year=v}if((h=p("m"))?f.month=gr(h)-1:(h=p("b"))&&(f.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[h.substring(0,3).toUpperCase()]||0),h=p("d"))f.day=gr(h);else if(h=p("j"))for(var y=gr(h),w=Yt(f.year),S=0;S<12;++S){var C=mr(w?lr:hr,S-1);y<=C+(w?lr:hr)[S]&&(f.day=y-C)}else if(h=p("a")){var b=h.substring(0,3).toUpperCase();if(h=p("U")){var E={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[b],_=gr(h);A=0===(x=new Date(f.year,0,1)).getDay()?fr(x,E+7*(_-1)):fr(x,7-x.getDay()+E+7*(_-1)),f.day=A.getDate(),f.month=A.getMonth()}else if(h=p("W")){var x,A;E={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[b],_=gr(h),A=1===(x=new Date(f.year,0,1)).getDay()?fr(x,E+7*(_-1)):fr(x,7-x.getDay()+1+E+7*(_-1)),f.day=A.getDate(),f.month=A.getMonth()}}var D=new Date(f.year,f.month,f.day,f.hour,f.min,f.sec,0);return F[r>>2]=D.getSeconds(),F[r+4>>2]=D.getMinutes(),F[r+8>>2]=D.getHours(),F[r+12>>2]=D.getDate(),F[r+16>>2]=D.getMonth(),F[r+20>>2]=D.getFullYear()-1900,F[r+24>>2]=D.getDay(),F[r+28>>2]=mr(Yt(D.getFullYear())?lr:hr,D.getMonth()-1)+D.getDate()-1,F[r+32>>2]=0,e+se(l[0]).length-1}return 0}},br=function(){var e,t,i,o,a={a:Cr};function s(e,t){var r,i=e.exports;return p=(br=i).fc,A(),_=br.ic,r=br.gc,M.unshift(r),$(),i}if(L(),n.instantiateWasm)try{return n.instantiateWasm(a,s)}catch(e){f(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return(e=l,t=D,i=a,o=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||j(t)||"function"!=typeof fetch?I(t,i,o):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,i).then(o,(function(e){return f(`wasm streaming compile failed: ${e}`),f("falling back to ArrayBuffer instantiation"),I(t,i,o)}))))).catch(r),{}}(),Er=n._malloc=e=>(Er=n._malloc=br.hc)(e),_r=n._free=e=>(_r=n._free=br.jc)(e),xr=()=>(xr=br.kc)(),Ar=e=>(Ar=br.lc)(e),Dr=e=>(Dr=br.mc)(e),Tr=(n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=br.nc)(),(e,t)=>(Tr=br.oc)(e,t)),kr=(e,t)=>(kr=br.pc)(e,t),Pr=()=>(Pr=br.qc)(),zr=e=>(zr=br.rc)(e),Mr=e=>(Mr=br.sc)(e),Or=e=>(Or=br.tc)(e),Rr=(e,t,r)=>(Rr=br.uc)(e,t,r),Qr=e=>(Qr=br.vc)(e),Zr=n.dynCall_ji=(e,t)=>(Zr=n.dynCall_ji=br.wc)(e,t),Lr=n.dynCall_vij=(e,t,r,i)=>(Lr=n.dynCall_vij=br.xc)(e,t,r,i),$r=n.dynCall_iij=(e,t,r,i)=>($r=n.dynCall_iij=br.yc)(e,t,r,i),Br=(n.dynCall_viijii=(e,t,r,i,o,a,s)=>(n.dynCall_viijii=br.zc)(e,t,r,i,o,a,s),n.dynCall_jiii=(e,t,r,i)=>(Br=n.dynCall_jiii=br.Ac)(e,t,r,i)),jr=(n.dynCall_jjj=(e,t,r,i,o)=>(n.dynCall_jjj=br.Bc)(e,t,r,i,o),n.dynCall_iiiijj=(e,t,r,i,o,a,s,u)=>(n.dynCall_iiiijj=br.Cc)(e,t,r,i,o,a,s,u),n.dynCall_viijj=(e,t,r,i,o,a,s)=>(n.dynCall_viijj=br.Dc)(e,t,r,i,o,a,s),n.dynCall_viiijjj=(e,t,r,i,o,a,s,u,c,d)=>(n.dynCall_viiijjj=br.Ec)(e,t,r,i,o,a,s,u,c,d),n.dynCall_jiji=(e,t,r,i,o)=>(n.dynCall_jiji=br.Fc)(e,t,r,i,o),n.dynCall_j=e=>(jr=n.dynCall_j=br.Gc)(e)),Nr=n.dynCall_jii=(e,t,r)=>(Nr=n.dynCall_jii=br.Hc)(e,t,r),Ir=n.dynCall_iiiiij=(e,t,r,i,o,a,s)=>(Ir=n.dynCall_iiiiij=br.Ic)(e,t,r,i,o,a,s),Wr=n.dynCall_jiiii=(e,t,r,i,o)=>(Wr=n.dynCall_jiiii=br.Jc)(e,t,r,i,o);function Hr(){function e(){Fr||(Fr=!0,n.calledRun=!0,x||(n.noFSInit||fe.init.initialized||fe.init(),fe.ignorePermissions=!1,ue.init(),U(M),t(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),O.unshift(e);var e;U(O)}()))}R>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),z.unshift(e);var e;U(z)}(),R>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_iiiiijj=(e,t,r,i,o,a,s,u,c)=>(n.dynCall_iiiiijj=br.Kc)(e,t,r,i,o,a,s,u,c),n.dynCall_iiiiiijj=(e,t,r,i,o,a,s,u,c,d)=>(n.dynCall_iiiiiijj=br.Lc)(e,t,r,i,o,a,s,u,c,d),n.___start_em_js=1370908,n.___stop_em_js=1371016,n.UTF8ToString=pe,n.stringToUTF8=Ot,n.lengthBytesUTF8=oe,n.allocateUTF8=vr,Z=function e(){Fr||Hr(),Fr||(Z=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function Ur(e,t){var r=Vr();return Ur=function(t,i){var n=r[t-=341];if(void 0===Ur.AkZkVo){var o=function(e){for(var t,r,i="",n="",o=0,a=0;r=e.charAt(a++);~r&&(t=o%4?64*t+r:r,o++%4)?i+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=i.length;s<u;s++)n+="%"+("00"+i.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(n)},a=function(e,t){var r,i,n=[],a=0,s="";for(e=o(e),i=0;i<256;i++)n[i]=i;for(i=0;i<256;i++)a=(a+n[i]+t.charCodeAt(i%t.length))%256,r=n[i],n[i]=n[a],n[a]=r;i=0,a=0;for(var u=0;u<e.length;u++)a=(a+n[i=(i+1)%256])%256,r=n[i],n[i]=n[a],n[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^n[(n[i]+n[a])%256]);return s};Ur.bOvgUa=a,e=arguments,Ur.AkZkVo=!0}var s=r[0],u=t+s,c=e[u];return c?n=c:(void 0===Ur.wJEVij&&(Ur.wJEVij=!0),n=Ur.bOvgUa(n,i),e[u]=n),n},Ur(e,t)}function Vr(){var e=["seBcM8owBLZcIWhcUCotWRmZ","W7ddHqLfF8kkW7ZcOa","W48tjmkBWP4kh2G","W6hcVwJcSmkysLVdH1pcPCkJWQG","qaqpomkDbc0","W6lcUrVdG8oNffldLq","W6vrW61yiZZdMSka","pSkjCCoikSkOWPDjdq","WOynWR3cRe/dL8krW5G","W7fKcSkLCCknmG","qfPky8oQxuTaWRvyW5ZdQbG","W40qe8kfWOaClvW","W6OAumk9w8kDW4m0","WQBcSmk0W5GYfmo8FZVdIZdcJSkp","WPFcHCo4W7JcNXOWpmoLWRHMja","lCkuWPNcPCkGWRPEWQnpDG","selcNmovBvtcRdRcVSo8WQOn","W5FdR8kJa8o3WQC1W4TbAwT7","WOSsW4NdGHFcTSoREW","nCoLyufur8o1WRe","WQNcQwVcOYWTwGbnWRO","ymonW73dOCkCWPLGWPi","WRhdLmkHW5lcOmoDDg7cUW","W7hcHZNdU8klW4SirJBdUCo0Cq","WQhcRMJcO1DwBszDWOSvgq","EbHKbmocW43dMff0W4VcS2O","A8kZnHGyfSoQWP43amkEbG"];return(Vr=function(){return e})()}Hr(),function(e,t){for(var r=Ur,i=e();;)try{if(156796==-parseInt(r(355,"^0!A"))/1*(parseInt(r(349,"eMb@"))/2)+parseInt(r(363,"r*RC"))/3+-parseInt(r(345,"EdYz"))/4*(parseInt(r(348,"qCh1"))/5)+parseInt(r(358,"uO^N"))/6*(parseInt(r(344,"!Z0U"))/7)+parseInt(r(346,"eD(2"))/8*(-parseInt(r(351,"eMb@"))/9)+-parseInt(r(366,"v4K["))/10*(parseInt(r(353,"YmZF"))/11)+-parseInt(r(364,"#knh"))/12*(-parseInt(r(356,"vCln"))/13))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Vr);var ighnua,qr=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),Yr=qr(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Yr)};return e()}));return Yr(),e.ready});e.exports=n},function(e,t){},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Ae})),r.d(t,"commands",(function(){return ze}));var i=r(0);class n{_marker(){}}class o extends n{constructor(e={}){super(),this.author="Created with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==e.author&&(this.author=e.author),void 0!==e.creator&&(this.creator=e.creator),void 0!==e.title&&(this.title=e.title),void 0!==e.subject&&(this.subject=e.subject),void 0!==e.keywords&&(this.keywords=e.keywords)}}class a extends n{constructor(e={}){super(),this.attributes=new o({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==e.attributes&&(this.attributes=new o(e.attributes)),void 0!==e.pageSize&&(this.pageSize=e.pageSize),void 0!==e.pageDirection&&(this.pageDirection=e.pageDirection),void 0!==e.pageFit&&(this.pageFit=e.pageFit),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.resamplingMethod&&(this.resamplingMethod=e.resamplingMethod)}}class s extends n{constructor(e={}){super(),this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.confirmationMethod&&(this.confirmationMethod=e.confirmationMethod),void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class u extends n{constructor(e={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class c extends n{constructor(e={}){super(),this.frameAccumulationConfiguration=new u({}),this.enableDetection=!0,this.incompleteResultHandling="ACCEPT",void 0!==e.frameAccumulationConfiguration&&(this.frameAccumulationConfiguration=new u(e.frameAccumulationConfiguration)),void 0!==e.enableDetection&&(this.enableDetection=e.enableDetection),void 0!==e.incompleteResultHandling&&(this.incompleteResultHandling=e.incompleteResultHandling)}}class d extends n{constructor(e={}){if(super(),void 0===e.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=e.symbolQuality,void 0===e.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=e.symbolRatio}}class m extends n{constructor(e={}){super(),this.qualityThresholds=[new d({symbolQuality:.5,symbolRatio:.5}),new d({symbolQuality:.7,symbolRatio:.3}),new d({symbolQuality:.85,symbolRatio:.3}),new d({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.detectOrientation=!1,this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==e.qualityThresholds&&(this.qualityThresholds=e.qualityThresholds.map((e=>new d(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.detectOrientation&&(this.detectOrientation=e.detectOrientation),void 0!==e.maxImageSize&&(this.maxImageSize=e.maxImageSize),void 0!==e.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=e.minEstimatedNumberOfSymbolsForDocument),void 0!==e.minProcessedFraction&&(this.minProcessedFraction=e.minProcessedFraction),void 0!==e.maxProcessedFraction&&(this.maxProcessedFraction=e.maxProcessedFraction),void 0!==e.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=e.earlyStopIfNSymbolsFound),void 0!==e.tileSize&&(this.tileSize=e.tileSize)}}var l;!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new h(e);case"CustomBinarizationFilter":return new f(e);case"ColorDocumentFilter":return new p(e);case"BrightnessFilter":return new g(e);case"ContrastFilter":return new v(e);case"GrayscaleFilter":return new y(e);case"LegacyFilter":return new w(e);case"WhiteBlackPointFilter":return new S(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class h extends n{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class f extends n{constructor(e={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class p extends n{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class g extends n{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class v extends n{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class y extends n{constructor(e={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class w extends n{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class S extends n{constructor(e={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}class F extends n{constructor(e={}){super(),this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}class C extends n{constructor(e={}){super(),this.isLive=!1,this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.acceptedAspectRatioScore=85,this.aspectRatios=[],this.ignoreOrientationMismatch=!1,void 0!==e.isLive&&(this.isLive=e.isLive),void 0!==e.acceptedAngleScore&&(this.acceptedAngleScore=e.acceptedAngleScore),void 0!==e.acceptedSizeScore&&(this.acceptedSizeScore=e.acceptedSizeScore),void 0!==e.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=e.acceptedBrightnessThreshold),void 0!==e.acceptedAspectRatioScore&&(this.acceptedAspectRatioScore=e.acceptedAspectRatioScore),void 0!==e.aspectRatios&&(this.aspectRatios=e.aspectRatios.map((e=>new F(e)))),void 0!==e.ignoreOrientationMismatch&&(this.ignoreOrientationMismatch=e.ignoreOrientationMismatch)}}var b;!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new E(e);case"PatternContentValidator":return new _(e);default:throw`Unknown child class name: ${t}`}}}(b||(b={}));class E extends n{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class _ extends n{constructor(e={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters),void 0===e.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=e.pattern,void 0!==e.matchSubstring&&(this.matchSubstring=e.matchSubstring)}}class x extends n{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new E({}),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==e.validator&&(this.validator=b.From(e.validator))}}class A extends n{constructor(e={}){super(),this.extractVINFromBarcode=!1,this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.extractVINFromBarcode&&(this.extractVINFromBarcode=e.extractVINFromBarcode),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}var D,T;!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new k(e);case"BarcodeFormatCode11Configuration":return new P(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new M(e);case"BarcodeFormatCode128Configuration":return new O(e);case"BarcodeFormatCode2Of5Configuration":return new R(e);case"BarcodeFormatDataBarConfiguration":return new Q(e);case"BarcodeFormatDataBarExpandedConfiguration":return new Z(e);case"BarcodeFormatDataBarLimitedConfiguration":return new L(e);case"BarcodeFormatITFConfiguration":return new $(e);case"BarcodeFormatMSIPlesseyConfiguration":return new B(e);case"BarcodeFormatUpcEanConfiguration":return new j(e);case"BarcodeFormatPharmaCodeConfiguration":return new N(e);case"BarcodeFormatAztecConfiguration":return new H(e);case"BarcodeFormatQRCodeConfiguration":return new U(e);case"BarcodeFormatPDF417Configuration":return new V(e);case"BarcodeFormatMicroPDF417Configuration":return new q(e);case"BarcodeFormatDataMatrixConfiguration":return new Y(e);case"BarcodeFormatMaxiCodeConfiguration":return new G(e);case"BarcodeFormatAustraliaPostConfiguration":return new J(e);case"BarcodeFormatJapanPostConfiguration":return new X(e);case"BarcodeFormatRoyalMailConfiguration":return new K(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ee(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new te(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new re(e);case"BarcodeFormatGS1CompositeConfiguration":return new ie(e);case"BarcodeFormatCommonOneDConfiguration":return new ne(e);case"BarcodeFormatCommonTwoDConfiguration":return new oe(e);case"BarcodeFormatCommonFourStateConfiguration":return new ae(e);case"BarcodeFormatCommonConfiguration":return new se(e);default:throw`Unknown child class name: ${t}`}}}(D||(D={})),function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new k(e);case"BarcodeFormatCode11Configuration":return new P(e);case"BarcodeFormatCode39Configuration":return new z(e);case"BarcodeFormatCode93Configuration":return new M(e);case"BarcodeFormatCode128Configuration":return new O(e);case"BarcodeFormatCode2Of5Configuration":return new R(e);case"BarcodeFormatDataBarConfiguration":return new Q(e);case"BarcodeFormatDataBarExpandedConfiguration":return new Z(e);case"BarcodeFormatDataBarLimitedConfiguration":return new L(e);case"BarcodeFormatITFConfiguration":return new $(e);case"BarcodeFormatMSIPlesseyConfiguration":return new B(e);case"BarcodeFormatUpcEanConfiguration":return new j(e);case"BarcodeFormatPharmaCodeConfiguration":return new N(e);default:throw`Unknown child class name: ${t}`}}}(T||(T={}));class k extends n{constructor(e={}){super(),this._type="BarcodeFormatCodabarConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.returnStartEnd&&(this.returnStartEnd=e.returnStartEnd)}}class P extends n{constructor(e={}){super(),this._type="BarcodeFormatCode11Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksum&&(this.checksum=e.checksum)}}class z extends n{constructor(e={}){super(),this._type="BarcodeFormatCode39Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.code32&&(this.code32=e.code32),void 0!==e.code39&&(this.code39=e.code39),void 0!==e.pzn&&(this.pzn=e.pzn),void 0!==e.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=e.tryCode39ExtendedMode),void 0!==e.useCode39CheckDigit&&(this.useCode39CheckDigit=e.useCode39CheckDigit)}}class M extends n{constructor(e={}){super(),this._type="BarcodeFormatCode93Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class O extends n{constructor(e={}){super(),this._type="BarcodeFormatCode128Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class R extends n{constructor(e={}){super(),this._type="BarcodeFormatCode2Of5Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.iata2of5&&(this.iata2of5=e.iata2of5),void 0!==e.code25&&(this.code25=e.code25),void 0!==e.industrial2of5&&(this.industrial2of5=e.industrial2of5),void 0!==e.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=e.useIATA2OF5Checksum)}}class Q extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Z extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarExpandedConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class L extends n{constructor(e={}){super(),this._type="BarcodeFormatDataBarLimitedConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class $ extends n{constructor(e={}){super(),this._type="BarcodeFormatITFConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class B extends n{constructor(e={}){super(),this._type="BarcodeFormatMSIPlesseyConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class j extends n{constructor(e={}){super(),this._type="BarcodeFormatUpcEanConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="ALLOW_ANY",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.ean8&&(this.ean8=e.ean8),void 0!==e.ean13&&(this.ean13=e.ean13),void 0!==e.upca&&(this.upca=e.upca),void 0!==e.upce&&(this.upce=e.upce),void 0!==e.extensions&&(this.extensions=e.extensions)}}class N extends n{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}var I,W;!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAztecConfiguration":return new H(e);case"BarcodeFormatQRCodeConfiguration":return new U(e);case"BarcodeFormatPDF417Configuration":return new V(e);case"BarcodeFormatMicroPDF417Configuration":return new q(e);case"BarcodeFormatDataMatrixConfiguration":return new Y(e);case"BarcodeFormatMaxiCodeConfiguration":return new G(e);default:throw`Unknown child class name: ${t}`}}}(I||(I={}));class H extends n{constructor(e={}){super(),this._type="BarcodeFormatAztecConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class U extends n{constructor(e={}){super(),this._type="BarcodeFormatQRCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.qr&&(this.qr=e.qr),void 0!==e.microQr&&(this.microQr=e.microQr),void 0!==e.rmqr&&(this.rmqr=e.rmqr)}}class V extends n{constructor(e={}){super(),this._type="BarcodeFormatPDF417Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class q extends n{constructor(e={}){super(),this._type="BarcodeFormatMicroPDF417Configuration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class Y extends n{constructor(e={}){super(),this._type="BarcodeFormatDataMatrixConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class G extends n{constructor(e={}){super(),this._type="BarcodeFormatMaxiCodeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAustraliaPostConfiguration":return new J(e);case"BarcodeFormatJapanPostConfiguration":return new X(e);case"BarcodeFormatRoyalMailConfiguration":return new K(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ee(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new te(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new re(e);default:throw`Unknown child class name: ${t}`}}}(W||(W={}));class J extends n{constructor(e={}){super(),this._type="BarcodeFormatAustraliaPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class X extends n{constructor(e={}){super(),this._type="BarcodeFormatJapanPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class K extends n{constructor(e={}){super(),this._type="BarcodeFormatRoyalMailConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class ee extends n{constructor(e={}){super(),this._type="BarcodeFormatRoyalTNTPostConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class te extends n{constructor(e={}){super(),this._type="BarcodeFormatUSPSIntelligentMailConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone)}}class re extends n{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeTwoTrackConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class ie extends n{constructor(e={}){super(),this._type="BarcodeFormatGS1CompositeConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class ne extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonOneDConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class oe extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonTwoDConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXI_CODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ae extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonFourStateConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class se extends n{constructor(e={}){super(),this._type="BarcodeFormatCommonConfiguration",this.regexFilter="",this.minimumSizeScore=0,this.addAdditionalQuietZone=!1,this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumSizeScore&&(this.minimumSizeScore=e.minimumSizeScore),void 0!==e.addAdditionalQuietZone&&(this.addAdditionalQuietZone=e.addAdditionalQuietZone),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ue extends n{constructor(e={}){super(),this.barcodeFormatConfigurations=[new se({})],this.extractedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.onlyAcceptDocuments=!1,this.returnBarcodeImage=!0,this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,void 0!==e.barcodeFormatConfigurations&&(this.barcodeFormatConfigurations=e.barcodeFormatConfigurations.map((e=>D.From(e)))),void 0!==e.extractedDocumentFormats&&(this.extractedDocumentFormats=e.extractedDocumentFormats.map((e=>e))),void 0!==e.onlyAcceptDocuments&&(this.onlyAcceptDocuments=e.onlyAcceptDocuments),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live)}}var ce;!function(e){e.From=function(e){const t=e._type;switch(t){case"DateValidationConfiguration":return new de(e);case"EuropeanHealthInsuranceCardConfiguration":return new le(e);case"MRZFallbackConfiguration":return new he(e);case"DocumentDataExtractorCommonConfiguration":return new fe(e);default:throw`Unknown child class name: ${t}`}}}(ce||(ce={}));class de extends n{constructor(e={}){if(super(),this._type="DateValidationConfiguration",this.minYear=0,this.maxYear=2999,void 0!==e.minYear&&(this.minYear=e.minYear),void 0!==e.maxYear&&(this.maxYear=e.maxYear),void 0===e.fieldTypeName)throw new Error("fieldTypeName must be present in constructor argument");this.fieldTypeName=e.fieldTypeName}}const me=["AUSTRIA","BELGIUM","BULGARIA","CROATIA","CYPRUS","CZECH_REPUBLIC","DENMARK","ESTONIA","FINLAND","FRANCE","GERMANY","GREECE","HUNGARY","IRELAND","ITALY","LATVIA","LITHUANIA","LUXEMBOURG","MALTA","NETHERLANDS","POLAND","PORTUGAL","ROMANIA","SLOVAKIA","SLOVENIA","SPAIN","SWEDEN","SWITZERLAND"];class le extends n{constructor(e={}){super(),this._type="EuropeanHealthInsuranceCardConfiguration",this.expectedCountry=null,void 0!==e.expectedCountry&&(this.expectedCountry=null!=e.expectedCountry&&me.includes(e.expectedCountry)?e.expectedCountry:null)}}class he extends n{constructor(e={}){super(),this._type="MRZFallbackConfiguration",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==e.acceptedCountries&&(this.acceptedCountries=e.acceptedCountries.map((e=>e))),void 0!==e.acceptedMRZTypes&&(this.acceptedMRZTypes=e.acceptedMRZTypes.map((e=>e)))}}class fe extends n{constructor(e={}){if(super(),this._type="DocumentDataExtractorCommonConfiguration",void 0===e.acceptedDocumentTypes)throw new Error("acceptedDocumentTypes must be present in constructor argument");this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e))}}class pe extends n{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class ge extends n{constructor(e={}){if(super(),this.resultAccumulationConfig=new s({}),this.fieldExcludeList=[],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new s(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0===e.configurations)throw new Error("configurations must be present in constructor argument");this.configurations=e.configurations.map((e=>ce.From(e)))}}var ve,ye;!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new we(e);case"UserFieldStringValue":return new Se(e);case"UserFieldIntValue":return new Fe(e);default:throw`Unknown child class name: ${t}`}}}(ve||(ve={}));class we extends n{constructor(e={}){if(super(),this._type="UserFieldDoubleValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Se extends n{constructor(e={}){if(super(),this._type="UserFieldStringValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Fe extends n{constructor(e={}){if(super(),this._type="UserFieldIntValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Ce extends n{constructor(e={}){if(super(),void 0===e.tag)throw new Error("tag must be present in constructor argument");if(this.tag=e.tag,void 0===e.name)throw new Error("name must be present in constructor argument");if(this.name=e.name,void 0===e.value)throw new Error("value must be present in constructor argument");this.value=ve.From(e.value)}}class be extends n{constructor(e={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==e.compression&&(this.compression=e.compression),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.zipCompressionLevel&&(this.zipCompressionLevel=e.zipCompressionLevel),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.userFields&&(this.userFields=e.userFields.map((e=>new Ce(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?l.From(e.binarizationFilter):null)}}(ye=be||(be={})).defaultCompression="LZW",ye.binaryDocumentOptimizedCompression="CCITT_T6";var Ee=function(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))};let _e;class xe extends Error{}class Ae{constructor(e){this.id=e}}const De={};function Te(e){const t=Math.random().toString(36);return De[t]=e,new Ae(t)}function ke(e){if(!De.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return De[e.id]}function Pe(e){const t=ke(e);t.delete&&t.delete(),delete De[e.id]}const ze={initialize:function(e,t,n,o,a){return Ee(this,void 0,void 0,(function*(){try{const{captureConsole:s,jpegQuality:u=80,requestSuffix:c=""}=a||{};s&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const d=r(2),m=r(3),l={locateFile:function(e,r){let n;return n=t?Object(i.c)(t)?t:"":o,e.endsWith(".worker.js")&&m?m.default:new URL(n+e+c,location.href).href}},h=Object(i.b)(a),f=h.includes("-threads");l.mainScriptUrlOrBlob=l.locateFile(`ScanbotSDK.Asm${h}.js`);let p;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&f){let e=[2147483648,805306368,536870912],t=134217728;const r=["barcode-scanner"],i=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=i,e.push(4*i));for(let r=0;r<e.length;r++){const i=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:i/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(l.wasmMemory=p),l.onAbort=function(e){const t="\nNo further calls to the SDK are possible until you destroy and reinitialize the SDK.";throw new xe("OOM"===e?"ScanbotSDK ran out of memory. "+t:"ScanbotSDK ran into an unexpected error: "+e+t)},yield d(l),_e=l,_e.initialize(e||"",n,u)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return Ee(this,void 0,void 0,(function*(){return _e.getLicenseInfo()}))},encodeJpeg:function(e){return Ee(this,void 0,void 0,(function*(){const t=Re(e);return Me(_e.encodeJpeg(t))}))},detectDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){const r=new _e.DocumentDetector(new C(t)),i=r.detect(Re(e));return r.delete(),Me(i)}))},detectAndCropDocument:function(e){return Ee(this,void 0,void 0,(function*(){let t=Me(_e.detectAndCropDocument(Re(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new _e.DocumentDetector(new C(e)))}))},documentScannerDetect:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).detect(Re(t)),t)}))},parseBarcodeDocument:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.parseBarcodeDocument(e,t))}))},createBarcodeScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new _e.BarcodeRecognizer(new ue(e)))}))},scanBarcodes:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t)),t)}))},beginPdf:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new _e.PdfGenerationContext(new a(e)))}))},addPageToPdf:function(e,t){return Ee(this,void 0,void 0,(function*(){Me(ke(e).addPage(Re(t)))}))},completePdf:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Pe(e)}}))},beginTiff:function(e){return Ee(this,void 0,void 0,(function*(){const t=new _e.TiffGenerationContext(new be(e));return Me(t.begin()),Te(t)}))},addPageToTiff:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).addPage(Re(t),r))}))},completeTiff:function(e){return Ee(this,void 0,void 0,(function*(){try{const t=ke(e);return Me(t.complete())}finally{Pe(e)}}))},createMRZScanner:function(e){return Ee(this,void 0,void 0,(function*(){e.incompleteResultHandling="REJECT",e.enableDetection=!1;return Te(new _e.MRZScannerContext(new c(e)))}))},scanMRZ:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).scan(Re(t)),t)}))},releaseObject:function(e){return Ee(this,void 0,void 0,(function*(){Pe(e)}))},createOcrEngine:function(){return Ee(this,void 0,void 0,(function*(){return Te(new _e.TLDROcrContext)}))},performOcr:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).performOcr(Re(t)))}))},createTextPatternScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new _e.GenericTextLineScanner(new x(e)))}))},scanTextLine:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t)),t)}))},cleanTextLineScanningQueue:function(e){return Ee(this,void 0,void 0,(function*(){ke(e).cleanRecognitionQueue()}))},createVinScanner:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new _e.VinScanner(new A(e)))}))},scanVin:function(e,t){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).run(Re(t)),t)}))},cleanVinScanningQueue:function(e){return Ee(this,void 0,void 0,(function*(){ke(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new _e.DocumentQualityAnalyzer(new m(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(ke(e).analyze(Re(t)))}))},imageApplyFilter:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageApplyFilter(Re(e),l.From(t)))}))},imageCrop:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageCrop(Re(e),t))}))},imageResize:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageResize(Re(e),t))}))},imageRotate:function(e,t){return Ee(this,void 0,void 0,(function*(){return Me(_e.imageRotate(Re(e),t))}))},documentDataExtractorCreate:function(e){return Ee(this,void 0,void 0,(function*(){return Te(new _e.GenericDocumentRecognizer(new ge(e)))}))},documentDataExtractorExtract:function(e,t,r){return Ee(this,void 0,void 0,(function*(){return Oe(ke(e).recognize(Re(t),new pe(r)),t)}))},version:function(){return Ee(this,void 0,void 0,(function*(){return"7.0.0-dev.4"}))},__hasModuleFunction:function(e){return Ee(this,void 0,void 0,(function*(){return _e.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return Ee(this,void 0,void 0,(function*(){return _e[e](...t)}))}};function Me(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Oe(e,t){return Object.assign(Object.assign({},Me(e)),{originalImage:t})}function Re(e){if(!e)throw new Error("null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;_e||"initialize"===t?(()=>Ee(this,void 0,void 0,(function*(){return yield ze[t].apply(null,r)})))().then((e=>{const t=Object(i.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{if(e instanceof xe)self.postMessage({ticket:n,unrecoverableError:e});else{const t="number"==typeof e?Error(_e.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,recoverableError:t})}})):self.postMessage({ticket:n,recoverableError:new Error("WASM module not loaded yet.")})}}]);
|