@matchain/matchid-sdk-react 0.1.53-alpha.2 → 0.1.53-alpha.3
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/dist/assets/icon/index.d.mts +4 -2
- package/dist/assets/icon/index.d.ts +4 -2
- package/dist/assets/icon/index.js +19 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +3 -1
- package/dist/{chunk-LHNKZISB.mjs → chunk-3USZ4ZZY.mjs} +20 -2
- package/dist/chunk-3USZ4ZZY.mjs.map +1 -0
- package/dist/{chunk-W5A6WY7Y.mjs → chunk-3YF3P77J.mjs} +46 -8
- package/dist/chunk-3YF3P77J.mjs.map +1 -0
- package/dist/{chunk-4A2YPGO3.mjs → chunk-4EVF2PXX.mjs} +2 -2
- package/dist/{chunk-MX7N57AH.mjs → chunk-OCQ2AIM3.mjs} +7 -2
- package/dist/{chunk-MX7N57AH.mjs.map → chunk-OCQ2AIM3.mjs.map} +1 -1
- package/dist/{chunk-FB5MHLWX.mjs → chunk-V2S54LGG.mjs} +2 -2
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +403 -346
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +5 -5
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +47 -44
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +5 -5
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +175 -172
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +5 -5
- package/dist/{index-K5vXmiRX.d.ts → index-BKHtf1Tu.d.ts} +1 -1
- package/dist/{index-DNJuiNdz.d.mts → index-BSUoL5Jo.d.mts} +2 -2
- package/dist/{index-Df-WlkXq.d.ts → index-BVO4Bt59.d.ts} +2 -2
- package/dist/{index-IwwXQ_QV.d.ts → index-CcN5ls1U.d.ts} +1 -1
- package/dist/{index-BsL6zo6a.d.ts → index-Cul4qlZl.d.ts} +1 -1
- package/dist/{index-yy3VTdFU.d.mts → index-CvVl_Xw1.d.mts} +2 -2
- package/dist/{index-BCGJczpk.d.mts → index-DXRsJY9h.d.mts} +1 -1
- package/dist/{index-Bil_db2f.d.mts → index-DgwlV4ve.d.ts} +1 -1
- package/dist/{index-iWHaT8HV.d.mts → index-DrEKzXYX.d.mts} +1 -1
- package/dist/{index-BS-NO8Y2.d.ts → index-EPwrSSOz.d.mts} +1 -1
- package/dist/{index-CZqdmQu1.d.mts → index-ba3VTkaV.d.mts} +1 -1
- package/dist/{index-B8cUP7cH.d.ts → index-lKJjj0w4.d.ts} +2 -2
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +442 -385
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -12
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-CZbR7ERa.d.mts → types-Bgd3Ac92.d.mts} +1 -1
- package/dist/{types-CZbR7ERa.d.ts → types-Bgd3Ac92.d.ts} +1 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +62 -59
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +2 -2
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -1
- package/example/dist/assets/ccip-nxE3Zma4.js +1 -0
- package/example/dist/assets/index-BFAv3rdU.css +1 -0
- package/example/dist/assets/index-DMWWRDPI.js +1658 -0
- package/example/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-LHNKZISB.mjs.map +0 -1
- package/dist/chunk-W5A6WY7Y.mjs.map +0 -1
- package/example/dist/assets/TransportWebHID-BEu7tC0r.js +0 -1
- package/example/dist/assets/bignumber-iG7K-qxw.js +0 -10
- package/example/dist/assets/ccip-a6wQ1Vcb.js +0 -1
- package/example/dist/assets/draggabilly-CRYR_S0q.js +0 -14
- package/example/dist/assets/index--dp9m9Ep.js +0 -1
- package/example/dist/assets/index-BDTHolFv.js +0 -569
- package/example/dist/assets/index-BZl59qLb.js +0 -179
- package/example/dist/assets/index-BmMbYNHO.js +0 -303
- package/example/dist/assets/index-C7cxVRDF.js +0 -1677
- package/example/dist/assets/index-CJk171Yb.js +0 -1
- package/example/dist/assets/index-CQiBesAa.js +0 -3
- package/example/dist/assets/index-D62loNA9.js +0 -3
- package/example/dist/assets/index-DqyX3FG6.js +0 -1
- package/example/dist/assets/index-Gy3FXGhr.css +0 -1
- package/example/dist/assets/inherits_browser-BlmhoU4v.js +0 -1
- package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +0 -38
- /package/dist/{chunk-4A2YPGO3.mjs.map → chunk-4EVF2PXX.mjs.map} +0 -0
- /package/dist/{chunk-FB5MHLWX.mjs.map → chunk-V2S54LGG.mjs.map} +0 -0
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import{g as Nt,t as ac,c as ke,s as We,r as i3,q as a3,a as sc,i as cc,u as s3,v as Hr,w as c3,e as u3,h as uc,x as fc,y as lc}from"./index-C7cxVRDF.js";import{i as Ze}from"./inherits_browser-BlmhoU4v.js";import{r as dc,a as Er,s as hc,c as pc,e as mc,g as gc,b as fi,h as vc,d as xc,f as yc}from"./bignumber-iG7K-qxw.js";function bc(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(n,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var f3={exports:{}},wn={},l3={exports:{}},d3={},oo={};const Cc=Nt(ac);var h3={},Kt={},Ie={},p3={exports:{}},Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DataItem=void 0;class _c{constructor(t,r){this.setTag=n=>{this.tag=n},this.clearTag=()=>{this.tag=void 0},this.getTag=()=>this.tag,this.getData=()=>this.data,this.data=t,this.tag=r}}Jt.DataItem=_c;(function(e){(function(t,r){e.exports?e.exports=r():t.CBOR=r()})(ke,function(){const{DataItem:t}=Jt;var r=function(){function n(h){this.$hex=h}n.prototype={length:function(){return this.$hex.length/2},toString:function(h){if(!h||h==="hex"||h===16)return this.$hex;if(h==="utf-8"){for(var b="",S=0;S<this.$hex.length;S+=2)b+="%"+this.$hex.substring(S,S+2);return decodeURIComponent(b)}if(h==="latin"){for(var b=[],S=0;S<this.$hex.length;S+=2)b.push(parseInt(this.$hex.substring(S,S+2),16));return String.fromCharCode.apply(String,b)}throw new Error("Unrecognised format: "+h)}},n.fromLatinString=function(h){for(var b="",S=0;S<h.length;S++){var I=h.charCodeAt(S).toString(16);I.length===1&&(I="0"+I),b+=I}return new n(b)},n.fromUtf8String=function(h){for(var b=encodeURIComponent(h),S="",I=0;I<b.length;I++)if(b.charAt(I)==="%")S+=b.substring(I+1,I+3),I+=2;else{var $=b.charCodeAt(I).toString(16);$.length<2&&($="0"+$),S+=$}return new n(S)};var o=[],a={},u=function(h){return function(){throw new Error(h+" not implemented")}};function s(){}s.prototype={peekByte:u("peekByte"),readByte:u("readByte"),readChunk:u("readChunk"),readFloat16:function(){var h=this.readUint16(),b=(h&32767)>>10,S=h&1023,I=h&32768;if(b===31)return S===0?I?-1/0:1/0:NaN;var $=b?Math.pow(2,b-25)*(1024+S):Math.pow(2,-24)*S;return I?-$:$},readFloat32:function(){var h=this.readUint32(),b=(h&2147483647)>>23,S=h&8388607,I=h&2147483648;if(b===255)return S===0?I?-1/0:1/0:NaN;var $=b?Math.pow(2,b-23-127)*(8388608+S):Math.pow(2,-149)*S;return I?-$:$},readFloat64:function(){var h=this.readUint32(),b=this.readUint32(),S=h>>20&2047,I=(h&1048575)*4294967296+b,$=h&2147483648;if(S===2047)return I===0?$?-1/0:1/0:NaN;var J=S?Math.pow(2,S-52-1023)*(4503599627370496+I):Math.pow(2,-1074)*I;return $?-J:J},readUint16:function(){return this.readByte()*256+this.readByte()},readUint32:function(){return this.readUint16()*65536+this.readUint16()},readUint64:function(){return this.readUint32()*4294967296+this.readUint32()}};function l(){}l.prototype={writeByte:u("writeByte"),result:u("result"),writeFloat16:u("writeFloat16"),writeFloat32:u("writeFloat32"),writeFloat64:u("writeFloat64"),writeUint16:function(h){this.writeByte(h>>8&255),this.writeByte(h&255)},writeUint32:function(h){this.writeUint16(h>>16&65535),this.writeUint16(h&65535)},writeUint64:function(h){if(h>=9007199254740992||h<=-9007199254740992)throw new Error("Cannot encode Uint64 of: "+h+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(h/4294967296)),this.writeUint32(h%4294967296)},writeString:u("writeString"),canWriteBinary:function(h){return!1},writeBinary:u("writeChunk")};function i(h){var b=h.readByte(),S=b>>5,I=b&31;return{type:S,value:I}}function c(h,b){var S=h.value;if(S<24)return S;if(S==24)return b.readByte();if(S==25)return b.readUint16();if(S==26)return b.readUint32();if(S==27)return b.readUint64();if(S==31)return null;u("Additional info: "+S)()}function f(h,b,S){S.writeByte(h<<5|b)}function d(h,b,S){var I=h<<5;b<24?S.writeByte(I|b):b<256?(S.writeByte(I|24),S.writeByte(b)):b<65536?(S.writeByte(I|25),S.writeUint16(b)):b<4294967296?(S.writeByte(I|26),S.writeUint32(b)):(S.writeByte(I|27),S.writeUint64(b))}var m=new Error;function v(h){var b=i(h);switch(b.type){case 0:return c(b,h);case 1:return-1-c(b,h);case 2:return h.readChunk(c(b,h));case 3:var S=h.readChunk(c(b,h));return S.toString("utf-8");case 4:case 5:var I=c(b,h),re=[];if(I!==null){b.type===5&&(I*=2);for(var $=0;$<I;$++)re[$]=v(h)}else for(var J;(J=v(h))!==m;)re.push(J);if(b.type===5){for(var oe={},$=0;$<re.length;$+=2)oe[re[$]]=re[$+1];return oe}else return re;case 6:var z=c(b,h),G=a[z],re=v(h);return G?G(re):re;case 7:if(b.value===25)return h.readFloat16();if(b.value===26)return h.readFloat32();if(b.value===27)return h.readFloat64();switch(c(b,h)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case null:return m;default:throw new Error("Unknown fixed value: "+b.value)}default:throw new Error("Unsupported header: "+JSON.stringify(b))}throw new Error("not implemented yet")}function _(h,b){for(var S=0;S<o.length;S++){var I=o[S].fn(h);if(I!==void 0)return d(6,o[S].tag,b),_(I,b)}if(h&&typeof h.toCBOR=="function"&&(h=h.toCBOR()),h===!1)d(7,20,b);else if(h===!0)d(7,21,b);else if(h===null)d(7,22,b);else if(h===void 0)d(7,23,b);else if(typeof h=="number")Math.floor(h)===h&&h<9007199254740992&&h>-9007199254740992?h<0?d(1,-1-h,b):d(0,h,b):(f(7,27,b),b.writeFloat64(h));else if(typeof h=="string")b.writeString(h,function(J){d(3,J,b)});else if(b.canWriteBinary(h))b.writeBinary(h,function(J){d(2,J,b)});else if(typeof h=="object")if(C.config.useToJSON&&typeof h.toJSON=="function"&&(h=h.toJSON()),Array.isArray(h)){d(4,h.length,b);for(var S=0;S<h.length;S++)_(h[S],b)}else{var $=Object.keys(h);d(5,$.length,b);for(var S=0;S<$.length;S++){const oe=parseInt($[S]);isNaN(oe)?(_($[S],b),_(h[$[S]],b)):(_(oe,b),_(h[$[S]],b))}}else throw new Error("CBOR encoding not supported: "+h)}var w=[],B=[],C={config:{useToJSON:!0},addWriter:function(h,b){typeof h=="string"?B.push(function(S){if(h===S)return b(S)}):B.push(h)},addReader:function(h,b){typeof h=="string"?w.push(function(S,I){if(h===I)return b(S,I)}):w.push(h)},encode:function(h,b){for(var S=0;S<B.length;S++){var I=B[S],$=I(b);if($)return _(h,$),$.result()}throw new Error("Unsupported output format: "+b)},encodeDataItem:function(h,b){for(var S=0;S<B.length;S++){var I=B[S],$=I(b);if($)return h.getTag()!==void 0?(_(h,$),$.result()):(_(h.getData(),$),$.result())}throw new Error("Unsupported output format: "+b)},decode:function(h,b){for(var S=0;S<w.length;S++){var I=w[S],$=I(h,b);if($)return v($)}throw new Error("Unsupported input format: "+b)},decodeToDataItem:function(h,b){for(var S=0;S<w.length;S++){var I=w[S],$=I(h,b);if($){const J=v($);return J instanceof t?J:new t(J)}}throw new Error("Unsupported input format: "+b)},addSemanticEncode:function(h,b){if(typeof h!="number"||h%1!==0||h<0)throw new Error("Tag must be a positive integer");return o.push({tag:h,fn:b}),this},addSemanticDecode:function(h,b){if(typeof h!="number"||h%1!==0||h<0)throw new Error("Tag must be a positive integer");return a[h]=b,this}};function x(h){this.buffer=h,this.pos=0}x.prototype=Object.create(s.prototype),x.prototype.peekByte=function(){return this.buffer[this.pos]},x.prototype.readByte=function(){return this.buffer[this.pos++]},x.prototype.readUint16=function(){var h=this.buffer.readUInt16BE(this.pos);return this.pos+=2,h},x.prototype.readUint32=function(){var h=this.buffer.readUInt32BE(this.pos);return this.pos+=4,h},x.prototype.readFloat32=function(){var h=this.buffer.readFloatBE(this.pos);return this.pos+=4,h},x.prototype.readFloat64=function(){var h=this.buffer.readDoubleBE(this.pos);return this.pos+=8,h},x.prototype.readChunk=function(h){var b=Buffer.alloc(h);return this.buffer.copy(b,0,this.pos,this.pos+=h),b};function P(h){this.byteLength=0,this.defaultBufferLength=16384,this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0,this.completeBuffers=[],this.stringFormat=h}P.prototype=Object.create(l.prototype),P.prototype.writeByte=function(h){this.latestBuffer[this.latestBufferOffset++]=h,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0),this.byteLength++},P.prototype.writeFloat32=function(h){var b=Buffer.alloc(4);b.writeFloatBE(h,0),this.writeBuffer(b)},P.prototype.writeFloat64=function(h){var b=Buffer.alloc(8);b.writeDoubleBE(h,0),this.writeBuffer(b)},P.prototype.writeString=function(h,b){var S=Buffer.from(h,"utf-8");b(S.length),this.writeBuffer(S)},P.prototype.canWriteBinary=function(h){return h instanceof Buffer},P.prototype.writeBinary=function(h,b){b(h.length),this.writeBuffer(h)},P.prototype.writeBuffer=function(h){if(!(h instanceof Buffer))throw new TypeError("BufferWriter only accepts Buffers");this.latestBufferOffset?this.latestBuffer.length-this.latestBufferOffset>=h.length?(h.copy(this.latestBuffer,this.latestBufferOffset),this.latestBufferOffset+=h.length,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0)):(this.completeBuffers.push(this.latestBuffer.slice(0,this.latestBufferOffset)),this.completeBuffers.push(h),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0):this.completeBuffers.push(h),this.byteLength+=h.length},P.prototype.result=function(){for(var h=Buffer.alloc(this.byteLength),b=0,S=0;S<this.completeBuffers.length;S++){var I=this.completeBuffers[S];I.copy(h,b,0,I.length),b+=I.length}return this.latestBufferOffset&&this.latestBuffer.copy(h,b,0,this.latestBufferOffset),this.stringFormat?h.toString(this.stringFormat):h},typeof Buffer=="function"&&(C.addReader(function(h,b){if(Buffer.isBuffer(h))return new x(h);if(b==="hex"||b==="base64"){var S=Buffer.from(h,b);return new x(S)}}),C.addWriter(function(h){if(!h||h==="buffer")return new P;if(h==="hex"||h==="base64")return new P(h)}));function R(h){this.hex=h,this.pos=0}R.prototype=Object.create(s.prototype),R.prototype.peekByte=function(){var h=this.hex.substring(this.pos,2);return parseInt(h,16)},R.prototype.readByte=function(){var h=this.hex.substring(this.pos,this.pos+2);return this.pos+=2,parseInt(h,16)},R.prototype.readChunk=function(h){var b=this.hex.substring(this.pos,this.pos+h*2);return this.pos+=h*2,typeof Buffer=="function"?Buffer.from(b,"hex"):new n(b)};function y(h){this.$hex="",this.finalFormat=h||"hex"}return y.prototype=Object.create(l.prototype),y.prototype.writeByte=function(h){if(h<0||h>255)throw new Error("Byte value out of range: "+h);var b=h.toString(16);b.length==1&&(b="0"+b),this.$hex+=b},y.prototype.canWriteBinary=function(h){return h instanceof n||typeof Buffer=="function"&&h instanceof Buffer},y.prototype.writeBinary=function(h,b){if(h instanceof n)b(h.length()),this.$hex+=h.$hex;else if(typeof Buffer=="function"&&h instanceof Buffer)b(h.length),this.$hex+=h.toString("hex");else throw new TypeError("HexWriter only accepts BinaryHex or Buffers")},y.prototype.result=function(){return this.finalFormat==="buffer"&&typeof Buffer=="function"?Buffer.from(this.$hex,"hex"):new n(this.$hex).toString(this.finalFormat)},y.prototype.writeString=function(h,b){var S=n.fromUtf8String(h);b(S.length()),this.$hex+=S.$hex},C.addReader(function(h,b){if(h instanceof n||h.$hex)return new R(h.$hex);if(b==="hex")return new R(h)}),C.addWriter(function(h){if(h==="hex")return new y}),C}();return r.addSemanticEncode(0,function(n){if(n instanceof Date)return n.toISOString()}).addSemanticDecode(0,function(n){return new Date(n)}).addSemanticDecode(1,function(n){return new Date(n)}),r})})(p3);var Bc=p3.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DataItem=e.addWriter=e.addReader=e.addSemanticEncode=e.addSemanticDecode=e.decodeToDataItem=e.encodeDataItem=void 0;var t=Bc;Object.defineProperty(e,"encodeDataItem",{enumerable:!0,get:function(){return t.encodeDataItem}}),Object.defineProperty(e,"decodeToDataItem",{enumerable:!0,get:function(){return t.decodeToDataItem}}),Object.defineProperty(e,"addSemanticDecode",{enumerable:!0,get:function(){return t.addSemanticDecode}}),Object.defineProperty(e,"addSemanticEncode",{enumerable:!0,get:function(){return t.addSemanticEncode}}),Object.defineProperty(e,"addReader",{enumerable:!0,get:function(){return t.addReader}}),Object.defineProperty(e,"addWriter",{enumerable:!0,get:function(){return t.addWriter}});var r=Jt;Object.defineProperty(e,"DataItem",{enumerable:!0,get:function(){return r.DataItem}})})(Ie);Object.defineProperty(Kt,"__esModule",{value:!0});Kt.patchTags=void 0;const on=Ie,Ri=[],wc=e=>{e.forEach(t=>{Ri.find(r=>r===t)||(on.addSemanticEncode(t,r=>{if(r instanceof on.DataItem&&r.getTag()===t)return r.getData()}),on.addSemanticDecode(t,r=>new on.DataItem(r,t)),Ri.push(t))})};Kt.patchTags=wc;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.RegistryTypes=Be.RegistryType=void 0;class $e{constructor(t,r){this.type=t,this.tag=r,this.getTag=()=>this.tag,this.getType=()=>this.type}}Be.RegistryType=$e;Be.RegistryTypes={UUID:new $e("uuid",37),BYTES:new $e("bytes",void 0),CRYPTO_HDKEY:new $e("crypto-hdkey",303),CRYPTO_KEYPATH:new $e("crypto-keypath",304),CRYPTO_COIN_INFO:new $e("crypto-coin-info",305),CRYPTO_ECKEY:new $e("crypto-eckey",306),CRYPTO_OUTPUT:new $e("crypto-output",308),CRYPTO_PSBT:new $e("crypto-psbt",310),CRYPTO_ACCOUNT:new $e("crypto-account",311),CRYPTO_MULTI_ACCOUNTS:new $e("crypto-multi-accounts",1103),QR_HARDWARE_CALL:new $e("qr-hardware-call",1201),KEY_DERIVATION_CALL:new $e("key-derivation-call",1301)};var Fn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptExpressions=e.ScriptExpression=void 0;class t{constructor(n,o){this.tag=n,this.expression=o,this.getTag=()=>this.tag,this.getExpression=()=>this.expression}}e.ScriptExpression=t,t.fromTag=r=>Object.values(e.ScriptExpressions).find(o=>o.getTag()===r),e.ScriptExpressions={SCRIPT_HASH:new t(400,"sh"),WITNESS_SCRIPT_HASH:new t(401,"wsh"),PUBLIC_KEY:new t(402,"pk"),PUBLIC_KEY_HASH:new t(403,"pkh"),WITNESS_PUBLIC_KEY_HASH:new t(404,"wpkh"),COMBO:new t(405,"combo"),MULTISIG:new t(406,"multi"),SORTED_MULTISIG:new t(407,"sortedmulti"),ADDRESS:new t(307,"addr"),RAW_SCRIPT:new t(408,"raw")}})(Fn);Object.defineProperty(h3,"__esModule",{value:!0});const kc=Kt,Pc=Be,Ec=Fn,Sc=Object.values(Pc.RegistryTypes).filter(e=>!!e.getTag()).map(e=>e.getTag()),Tc=Object.values(Ec.ScriptExpressions).map(e=>e.getTag());kc.patchTags(Sc.concat(Tc));var bt={},it=We.Buffer,m3=i3.Transform,Rc=Ze;function Bt(e){m3.call(this),this._block=it.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Rc(Bt,m3);Bt.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(o){n=o}r(n)};Bt.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};var Ic=typeof Uint8Array<"u",Ac=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(it.prototype instanceof Uint8Array||it.TYPED_ARRAY_SUPPORT);function Dc(e,t){if(e instanceof it)return e;if(typeof e=="string")return it.from(e,t);if(Ac&&ArrayBuffer.isView(e)){if(e.byteLength===0)return it.alloc(0);var r=it.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(Ic&&e instanceof Uint8Array||it.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return it.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}Bt.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");e=Dc(e,t);for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var a=0,u=e.length*8;u>0;++a)this._length[a]+=u,u=this._length[a]/4294967296|0,u>0&&(this._length[a]-=4294967296*u);return this};Bt.prototype._update=function(){throw new Error("_update is not implemented")};Bt.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};Bt.prototype._digest=function(){throw new Error("_digest is not implemented")};var g3=Bt,Oc=Ze,v3=g3,Mc=We.Buffer,Lc=new Array(16);function jn(){v3.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}Oc(jn,v3);jn.prototype._update=function(){for(var e=Lc,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a,n=this._b,o=this._c,a=this._d;r=De(r,n,o,a,e[0],3614090360,7),a=De(a,r,n,o,e[1],3905402710,12),o=De(o,a,r,n,e[2],606105819,17),n=De(n,o,a,r,e[3],3250441966,22),r=De(r,n,o,a,e[4],4118548399,7),a=De(a,r,n,o,e[5],1200080426,12),o=De(o,a,r,n,e[6],2821735955,17),n=De(n,o,a,r,e[7],4249261313,22),r=De(r,n,o,a,e[8],1770035416,7),a=De(a,r,n,o,e[9],2336552879,12),o=De(o,a,r,n,e[10],4294925233,17),n=De(n,o,a,r,e[11],2304563134,22),r=De(r,n,o,a,e[12],1804603682,7),a=De(a,r,n,o,e[13],4254626195,12),o=De(o,a,r,n,e[14],2792965006,17),n=De(n,o,a,r,e[15],1236535329,22),r=Oe(r,n,o,a,e[1],4129170786,5),a=Oe(a,r,n,o,e[6],3225465664,9),o=Oe(o,a,r,n,e[11],643717713,14),n=Oe(n,o,a,r,e[0],3921069994,20),r=Oe(r,n,o,a,e[5],3593408605,5),a=Oe(a,r,n,o,e[10],38016083,9),o=Oe(o,a,r,n,e[15],3634488961,14),n=Oe(n,o,a,r,e[4],3889429448,20),r=Oe(r,n,o,a,e[9],568446438,5),a=Oe(a,r,n,o,e[14],3275163606,9),o=Oe(o,a,r,n,e[3],4107603335,14),n=Oe(n,o,a,r,e[8],1163531501,20),r=Oe(r,n,o,a,e[13],2850285829,5),a=Oe(a,r,n,o,e[2],4243563512,9),o=Oe(o,a,r,n,e[7],1735328473,14),n=Oe(n,o,a,r,e[12],2368359562,20),r=Me(r,n,o,a,e[5],4294588738,4),a=Me(a,r,n,o,e[8],2272392833,11),o=Me(o,a,r,n,e[11],1839030562,16),n=Me(n,o,a,r,e[14],4259657740,23),r=Me(r,n,o,a,e[1],2763975236,4),a=Me(a,r,n,o,e[4],1272893353,11),o=Me(o,a,r,n,e[7],4139469664,16),n=Me(n,o,a,r,e[10],3200236656,23),r=Me(r,n,o,a,e[13],681279174,4),a=Me(a,r,n,o,e[0],3936430074,11),o=Me(o,a,r,n,e[3],3572445317,16),n=Me(n,o,a,r,e[6],76029189,23),r=Me(r,n,o,a,e[9],3654602809,4),a=Me(a,r,n,o,e[12],3873151461,11),o=Me(o,a,r,n,e[15],530742520,16),n=Me(n,o,a,r,e[2],3299628645,23),r=Le(r,n,o,a,e[0],4096336452,6),a=Le(a,r,n,o,e[7],1126891415,10),o=Le(o,a,r,n,e[14],2878612391,15),n=Le(n,o,a,r,e[5],4237533241,21),r=Le(r,n,o,a,e[12],1700485571,6),a=Le(a,r,n,o,e[3],2399980690,10),o=Le(o,a,r,n,e[10],4293915773,15),n=Le(n,o,a,r,e[1],2240044497,21),r=Le(r,n,o,a,e[8],1873313359,6),a=Le(a,r,n,o,e[15],4264355552,10),o=Le(o,a,r,n,e[6],2734768916,15),n=Le(n,o,a,r,e[13],1309151649,21),r=Le(r,n,o,a,e[4],4149444226,6),a=Le(a,r,n,o,e[11],3174756917,10),o=Le(o,a,r,n,e[2],718787259,15),n=Le(n,o,a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+o|0,this._d=this._d+a|0};jn.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Mc.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function $n(e,t){return e<<t|e>>>32-t}function De(e,t,r,n,o,a,u){return $n(e+(t&r|~t&n)+o+a|0,u)+t|0}function Oe(e,t,r,n,o,a,u){return $n(e+(t&n|r&~n)+o+a|0,u)+t|0}function Me(e,t,r,n,o,a,u){return $n(e+(t^r^n)+o+a|0,u)+t|0}function Le(e,t,r,n,o,a,u){return $n(e+(r^(t|~n))+o+a|0,u)+t|0}var Nc=jn,io=a3.Buffer,Uc=Ze,x3=g3,Fc=new Array(16),ur=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],fr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],lr=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],dr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],hr=[0,1518500249,1859775393,2400959708,2840853838],pr=[1352829926,1548603684,1836072691,2053994217,0];function qn(){x3.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}Uc(qn,x3);qn.prototype._update=function(){for(var e=Fc,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);for(var r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,u=this._e|0,s=this._a|0,l=this._b|0,i=this._c|0,c=this._d|0,f=this._e|0,d=0;d<80;d+=1){var m,v;d<16?(m=Ii(r,n,o,a,u,e[ur[d]],hr[0],lr[d]),v=Mi(s,l,i,c,f,e[fr[d]],pr[0],dr[d])):d<32?(m=Ai(r,n,o,a,u,e[ur[d]],hr[1],lr[d]),v=Oi(s,l,i,c,f,e[fr[d]],pr[1],dr[d])):d<48?(m=Di(r,n,o,a,u,e[ur[d]],hr[2],lr[d]),v=Di(s,l,i,c,f,e[fr[d]],pr[2],dr[d])):d<64?(m=Oi(r,n,o,a,u,e[ur[d]],hr[3],lr[d]),v=Ai(s,l,i,c,f,e[fr[d]],pr[3],dr[d])):(m=Mi(r,n,o,a,u,e[ur[d]],hr[4],lr[d]),v=Ii(s,l,i,c,f,e[fr[d]],pr[4],dr[d])),r=u,u=a,a=At(o,10),o=n,n=m,s=f,f=c,c=At(i,10),i=l,l=v}var _=this._b+o+c|0;this._b=this._c+a+f|0,this._c=this._d+u+s|0,this._d=this._e+r+l|0,this._e=this._a+n+i|0,this._a=_};qn.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=io.alloc?io.alloc(20):new io(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};function At(e,t){return e<<t|e>>>32-t}function Ii(e,t,r,n,o,a,u,s){return At(e+(t^r^n)+a+u|0,s)+o|0}function Ai(e,t,r,n,o,a,u,s){return At(e+(t&r|~t&n)+a+u|0,s)+o|0}function Di(e,t,r,n,o,a,u,s){return At(e+((t|~r)^n)+a+u|0,s)+o|0}function Oi(e,t,r,n,o,a,u,s){return At(e+(t&n|r&~n)+a+u|0,s)+o|0}function Mi(e,t,r,n,o,a,u,s){return At(e+(t^(r|~n))+a+u|0,s)+o|0}var jc=qn,y3={exports:{}},b3=We.Buffer;function zn(e,t){this._block=b3.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}zn.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=b3.from(e,t));for(var r=this._block,n=this._blockSize,o=e.length,a=this._len,u=0;u<o;){for(var s=a%n,l=Math.min(o-u,n-s),i=0;i<l;i++)r[s+i]=e[u+i];a+=l,u+=l,a%n===0&&this._update(r)}return this._len+=o,this};zn.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a};zn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Zt=zn,$c=Ze,C3=Zt,qc=We.Buffer,zc=[1518500249,1859775393,-1894007588,-899497514],Hc=new Array(80);function Gr(){this.init(),this._w=Hc,C3.call(this,64,56)}$c(Gr,C3);Gr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Gc(e){return e<<5|e>>>27}function Kc(e){return e<<30|e>>>2}function Wc(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Gr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,u=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var l=0;l<80;++l){var i=~~(l/20),c=Gc(r)+Wc(i,n,o,a)+u+t[l]+zc[i]|0;u=a,a=o,o=Kc(n),n=r,r=c}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0};Gr.prototype._hash=function(){var e=qc.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Vc=Gr,Yc=Ze,_3=Zt,Xc=We.Buffer,Qc=[1518500249,1859775393,-1894007588,-899497514],Jc=new Array(80);function Kr(){this.init(),this._w=Jc,_3.call(this,64,56)}Yc(Kr,_3);Kr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Zc(e){return e<<1|e>>>31}function e2(e){return e<<5|e>>>27}function t2(e){return e<<30|e>>>2}function r2(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Kr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,u=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=Zc(t[s-3]^t[s-8]^t[s-14]^t[s-16]);for(var l=0;l<80;++l){var i=~~(l/20),c=e2(r)+r2(i,n,o,a)+u+t[l]+Qc[i]|0;u=a,a=o,o=t2(n),n=r,r=c}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0};Kr.prototype._hash=function(){var e=Xc.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var n2=Kr,o2=Ze,B3=Zt,i2=We.Buffer,a2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s2=new Array(64);function Wr(){this.init(),this._w=s2,B3.call(this,64,56)}o2(Wr,B3);Wr.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function c2(e,t,r){return r^e&(t^r)}function u2(e,t,r){return e&t|r&(e|t)}function f2(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l2(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d2(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function h2(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Wr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,u=this._e|0,s=this._f|0,l=this._g|0,i=this._h|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<64;++c)t[c]=h2(t[c-2])+t[c-7]+d2(t[c-15])+t[c-16]|0;for(var f=0;f<64;++f){var d=i+l2(u)+c2(u,s,l)+a2[f]+t[f]|0,m=f2(r)+u2(r,n,o)|0;i=l,l=s,s=u,u=a+d|0,a=o,o=n,n=r,r=d+m|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=s+this._f|0,this._g=l+this._g|0,this._h=i+this._h|0};Wr.prototype._hash=function(){var e=i2.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var w3=Wr,p2=Ze,m2=w3,g2=Zt,v2=We.Buffer,x2=new Array(64);function Hn(){this.init(),this._w=x2,g2.call(this,64,56)}p2(Hn,m2);Hn.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Hn.prototype._hash=function(){var e=v2.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var y2=Hn,b2=Ze,k3=Zt,C2=We.Buffer,Li=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_2=new Array(160);function Vr(){this.init(),this._w=_2,k3.call(this,128,112)}b2(Vr,k3);Vr.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Ni(e,t,r){return r^e&(t^r)}function Ui(e,t,r){return e&t|r&(e|t)}function Fi(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function ji(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function B2(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function w2(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function k2(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function P2(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function Ee(e,t){return e>>>0<t>>>0?1:0}Vr.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,o=this._ch|0,a=this._dh|0,u=this._eh|0,s=this._fh|0,l=this._gh|0,i=this._hh|0,c=this._al|0,f=this._bl|0,d=this._cl|0,m=this._dl|0,v=this._el|0,_=this._fl|0,w=this._gl|0,B=this._hl|0,C=0;C<32;C+=2)t[C]=e.readInt32BE(C*4),t[C+1]=e.readInt32BE(C*4+4);for(;C<160;C+=2){var x=t[C-30],P=t[C-15*2+1],R=B2(x,P),y=w2(P,x);x=t[C-2*2],P=t[C-2*2+1];var h=k2(x,P),b=P2(P,x),S=t[C-7*2],I=t[C-7*2+1],$=t[C-16*2],J=t[C-16*2+1],oe=y+I|0,z=R+S+Ee(oe,y)|0;oe=oe+b|0,z=z+h+Ee(oe,b)|0,oe=oe+J|0,z=z+$+Ee(oe,J)|0,t[C]=z,t[C+1]=oe}for(var G=0;G<160;G+=2){z=t[G],oe=t[G+1];var re=Ui(r,n,o),N=Ui(c,f,d),Z=Fi(r,c),U=Fi(c,r),F=ji(u,v),q=ji(v,u),W=Li[G],te=Li[G+1],L=Ni(u,s,l),M=Ni(v,_,w),O=B+q|0,X=i+F+Ee(O,B)|0;O=O+M|0,X=X+L+Ee(O,M)|0,O=O+te|0,X=X+W+Ee(O,te)|0,O=O+oe|0,X=X+z+Ee(O,oe)|0;var V=U+N|0,Y=Z+re+Ee(V,U)|0;i=l,B=w,l=s,w=_,s=u,_=v,v=m+O|0,u=a+X+Ee(v,m)|0,a=o,m=d,o=n,d=f,n=r,f=c,c=O+V|0,r=X+Y+Ee(c,O)|0}this._al=this._al+c|0,this._bl=this._bl+f|0,this._cl=this._cl+d|0,this._dl=this._dl+m|0,this._el=this._el+v|0,this._fl=this._fl+_|0,this._gl=this._gl+w|0,this._hl=this._hl+B|0,this._ah=this._ah+r+Ee(this._al,c)|0,this._bh=this._bh+n+Ee(this._bl,f)|0,this._ch=this._ch+o+Ee(this._cl,d)|0,this._dh=this._dh+a+Ee(this._dl,m)|0,this._eh=this._eh+u+Ee(this._el,v)|0,this._fh=this._fh+s+Ee(this._fl,_)|0,this._gh=this._gh+l+Ee(this._gl,w)|0,this._hh=this._hh+i+Ee(this._hl,B)|0};Vr.prototype._hash=function(){var e=C2.allocUnsafe(64);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var P3=Vr,E2=Ze,S2=P3,T2=Zt,R2=We.Buffer,I2=new Array(160);function Gn(){this.init(),this._w=I2,T2.call(this,128,112)}E2(Gn,S2);Gn.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Gn.prototype._hash=function(){var e=R2.allocUnsafe(48);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var A2=Gn,Ut=y3.exports=function(t){t=t.toLowerCase();var r=Ut[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};Ut.sha=Vc;Ut.sha1=n2;Ut.sha224=y2;Ut.sha256=w3;Ut.sha384=A2;Ut.sha512=P3;var E3=y3.exports,at=We.Buffer,S3=i3.Transform,D2=dc().StringDecoder,O2=Ze;function et(e){S3.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}O2(et,S3);var M2=typeof Uint8Array<"u",L2=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(at.prototype instanceof Uint8Array||at.TYPED_ARRAY_SUPPORT);function N2(e,t){if(e instanceof at)return e;if(typeof e=="string")return at.from(e,t);if(L2&&ArrayBuffer.isView(e)){if(e.byteLength===0)return at.alloc(0);var r=at.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(M2&&e instanceof Uint8Array||at.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return at.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}et.prototype.update=function(e,t,r){var n=N2(e,t),o=this._update(n);return this.hashMode?this:(r&&(o=this._toString(o,r)),o)};et.prototype.setAutoPadding=function(){};et.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};et.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};et.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};et.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(o){n=o}finally{r(n)}};et.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)};et.prototype._finalOrDigest=function(e){var t=this.__final()||at.alloc(0);return e&&(t=this._toString(t,e,!0)),t};et.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new D2(t),this._encoding=t),this._encoding!==t)throw new Error("can’t switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n};var U2=et,F2=Ze,j2=Nc,$2=jc,q2=E3,T3=U2;function Kn(e){T3.call(this,"digest"),this._hash=e}F2(Kn,T3);Kn.prototype._update=function(e){this._hash.update(e)};Kn.prototype._final=function(){return this._hash.digest()};var z2=function(t){return t=t.toLowerCase(),t==="md5"?new j2:t==="rmd160"||t==="ripemd160"?new $2:new Kn(q2(t))},an=We.Buffer;function H2(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var o=e.charAt(n),a=o.charCodeAt(0);if(t[a]!==255)throw new TypeError(o+" is ambiguous");t[a]=n}var u=e.length,s=e.charAt(0),l=Math.log(u)/Math.log(256),i=Math.log(256)/Math.log(u);function c(m){if((Array.isArray(m)||m instanceof Uint8Array)&&(m=an.from(m)),!an.isBuffer(m))throw new TypeError("Expected Buffer");if(m.length===0)return"";for(var v=0,_=0,w=0,B=m.length;w!==B&&m[w]===0;)w++,v++;for(var C=(B-w)*i+1>>>0,x=new Uint8Array(C);w!==B;){for(var P=m[w],R=0,y=C-1;(P!==0||R<_)&&y!==-1;y--,R++)P+=256*x[y]>>>0,x[y]=P%u>>>0,P=P/u>>>0;if(P!==0)throw new Error("Non-zero carry");_=R,w++}for(var h=C-_;h!==C&&x[h]===0;)h++;for(var b=s.repeat(v);h<C;++h)b+=e.charAt(x[h]);return b}function f(m){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return an.alloc(0);for(var v=0,_=0,w=0;m[v]===s;)_++,v++;for(var B=(m.length-v)*l+1>>>0,C=new Uint8Array(B);v<m.length;){var x=t[m.charCodeAt(v)];if(x===255)return;for(var P=0,R=B-1;(x!==0||P<w)&&R!==-1;R--,P++)x+=u*C[R]>>>0,C[R]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");w=P,v++}for(var y=B-w;y!==B&&C[y]===0;)y++;var h=an.allocUnsafe(_+(B-y));h.fill(0,0,_);for(var b=_;y!==B;)h[b++]=C[y++];return h}function d(m){var v=f(m);if(v)return v;throw new Error("Non-base"+u+" character")}return{encode:c,decodeUnsafe:f,decode:d}}var G2=H2,K2=G2,W2="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",V2=K2(W2),ao=V2,Y2=We.Buffer,X2=function(e){function t(a){var u=e(a);return ao.encode(Y2.concat([a,u],a.length+4))}function r(a){var u=a.slice(0,-4),s=a.slice(-4),l=e(u);if(!(s[0]^l[0]|s[1]^l[1]|s[2]^l[2]|s[3]^l[3]))return u}function n(a){var u=ao.decodeUnsafe(a);if(u)return r(u)}function o(a){var u=ao.decode(a),s=r(u);if(!s)throw new Error("Invalid checksum");return s}return{encode:t,decode:o,decodeUnsafe:n}},$i=z2,Q2=X2;function J2(e){var t=$i("sha256").update(e).digest();return $i("sha256").update(t).digest()}var Z2=Q2(J2),kn={},Ae={},ut={},Wn={},je={};Object.defineProperty(je,"__esModule",{value:!0});je.InvalidChecksumError=je.InvalidSequenceComponentError=je.InvalidTypeError=je.InvalidPathLengthError=je.InvalidSchemeError=void 0;class eu extends Error{constructor(){super("Invalid Scheme"),this.name="InvalidSchemeError"}}je.InvalidSchemeError=eu;class tu extends Error{constructor(){super("Invalid Path"),this.name="InvalidPathLengthError"}}je.InvalidPathLengthError=tu;class ru extends Error{constructor(){super("Invalid Type"),this.name="InvalidTypeError"}}je.InvalidTypeError=ru;class nu extends Error{constructor(){super("Invalid Sequence Component"),this.name="InvalidSequenceComponentError"}}je.InvalidSequenceComponentError=nu;class ou extends Error{constructor(){super("Invalid Checksum"),this.name="InvalidChecksumError"}}je.InvalidChecksumError=ou;var ye={},Se={};/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/(function(e){var t=sc,r=cc,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=C,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var k=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(k,p),k.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function u(k){if(k>o)throw new RangeError('The value "'+k+'" is invalid for option "size"');var p=new Uint8Array(k);return Object.setPrototypeOf(p,s.prototype),p}function s(k,p,g){if(typeof k=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(k)}return l(k,p,g)}s.poolSize=8192;function l(k,p,g){if(typeof k=="string")return d(k,p);if(ArrayBuffer.isView(k))return v(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(de(k,ArrayBuffer)||k&&de(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(k,SharedArrayBuffer)||k&&de(k.buffer,SharedArrayBuffer)))return _(k,p,g);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=k.valueOf&&k.valueOf();if(E!=null&&E!==k)return s.from(E,p,g);var D=w(k);if(D)return D;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return s.from(k[Symbol.toPrimitive]("string"),p,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}s.from=function(k,p,g){return l(k,p,g)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function i(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function c(k,p,g){return i(k),k<=0?u(k):p!==void 0?typeof g=="string"?u(k).fill(p,g):u(k).fill(p):u(k)}s.alloc=function(k,p,g){return c(k,p,g)};function f(k){return i(k),u(k<0?0:B(k)|0)}s.allocUnsafe=function(k){return f(k)},s.allocUnsafeSlow=function(k){return f(k)};function d(k,p){if((typeof p!="string"||p==="")&&(p="utf8"),!s.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var g=x(k,p)|0,E=u(g),D=E.write(k,p);return D!==g&&(E=E.slice(0,D)),E}function m(k){for(var p=k.length<0?0:B(k.length)|0,g=u(p),E=0;E<p;E+=1)g[E]=k[E]&255;return g}function v(k){if(de(k,Uint8Array)){var p=new Uint8Array(k);return _(p.buffer,p.byteOffset,p.byteLength)}return m(k)}function _(k,p,g){if(p<0||k.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<p+(g||0))throw new RangeError('"length" is outside of buffer bounds');var E;return p===void 0&&g===void 0?E=new Uint8Array(k):g===void 0?E=new Uint8Array(k,p):E=new Uint8Array(k,p,g),Object.setPrototypeOf(E,s.prototype),E}function w(k){if(s.isBuffer(k)){var p=B(k.length)|0,g=u(p);return g.length===0||k.copy(g,0,0,p),g}if(k.length!==void 0)return typeof k.length!="number"||be(k.length)?u(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function B(k){if(k>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return k|0}function C(k){return+k!=k&&(k=0),s.alloc(+k)}s.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==s.prototype},s.compare=function(p,g){if(de(p,Uint8Array)&&(p=s.from(p,p.offset,p.byteLength)),de(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),!s.isBuffer(p)||!s.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===g)return 0;for(var E=p.length,D=g.length,j=0,H=Math.min(E,D);j<H;++j)if(p[j]!==g[j]){E=p[j],D=g[j];break}return E<D?-1:D<E?1:0},s.isEncoding=function(p){switch(String(p).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(p,g){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return s.alloc(0);var E;if(g===void 0)for(g=0,E=0;E<p.length;++E)g+=p[E].length;var D=s.allocUnsafe(g),j=0;for(E=0;E<p.length;++E){var H=p[E];if(de(H,Uint8Array))j+H.length>D.length?s.from(H).copy(D,j):Uint8Array.prototype.set.call(D,H,j);else if(s.isBuffer(H))H.copy(D,j);else throw new TypeError('"list" argument must be an Array of Buffers');j+=H.length}return D};function x(k,p){if(s.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||de(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);var g=k.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&g===0)return 0;for(var D=!1;;)switch(p){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return V(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return me(k).length;default:if(D)return E?-1:V(k).length;p=(""+p).toLowerCase(),D=!0}}s.byteLength=x;function P(k,p,g){var E=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,p>>>=0,g<=p))return"";for(k||(k="utf8");;)switch(k){case"hex":return U(this,p,g);case"utf8":case"utf-8":return z(this,p,g);case"ascii":return N(this,p,g);case"latin1":case"binary":return Z(this,p,g);case"base64":return oe(this,p,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,p,g);default:if(E)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),E=!0}}s.prototype._isBuffer=!0;function R(k,p,g){var E=k[p];k[p]=k[g],k[g]=E}s.prototype.swap16=function(){var p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var g=0;g<p;g+=2)R(this,g,g+1);return this},s.prototype.swap32=function(){var p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var g=0;g<p;g+=4)R(this,g,g+3),R(this,g+1,g+2);return this},s.prototype.swap64=function(){var p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var g=0;g<p;g+=8)R(this,g,g+7),R(this,g+1,g+6),R(this,g+2,g+5),R(this,g+3,g+4);return this},s.prototype.toString=function(){var p=this.length;return p===0?"":arguments.length===0?z(this,0,p):P.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(p){if(!s.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:s.compare(this,p)===0},s.prototype.inspect=function(){var p="",g=e.INSPECT_MAX_BYTES;return p=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(p+=" ... "),"<Buffer "+p+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(p,g,E,D,j){if(de(p,Uint8Array)&&(p=s.from(p,p.offset,p.byteLength)),!s.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(g===void 0&&(g=0),E===void 0&&(E=p?p.length:0),D===void 0&&(D=0),j===void 0&&(j=this.length),g<0||E>p.length||D<0||j>this.length)throw new RangeError("out of range index");if(D>=j&&g>=E)return 0;if(D>=j)return-1;if(g>=E)return 1;if(g>>>=0,E>>>=0,D>>>=0,j>>>=0,this===p)return 0;for(var H=j-D,se=E-g,T=Math.min(H,se),A=this.slice(D,j),K=p.slice(g,E),Q=0;Q<T;++Q)if(A[Q]!==K[Q]){H=A[Q],se=K[Q];break}return H<se?-1:se<H?1:0};function y(k,p,g,E,D){if(k.length===0)return-1;if(typeof g=="string"?(E=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,be(g)&&(g=D?0:k.length-1),g<0&&(g=k.length+g),g>=k.length){if(D)return-1;g=k.length-1}else if(g<0)if(D)g=0;else return-1;if(typeof p=="string"&&(p=s.from(p,E)),s.isBuffer(p))return p.length===0?-1:h(k,p,g,E,D);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?D?Uint8Array.prototype.indexOf.call(k,p,g):Uint8Array.prototype.lastIndexOf.call(k,p,g):h(k,[p],g,E,D);throw new TypeError("val must be string, number or Buffer")}function h(k,p,g,E,D){var j=1,H=k.length,se=p.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(k.length<2||p.length<2)return-1;j=2,H/=2,se/=2,g/=2}function T(ue,ie){return j===1?ue[ie]:ue.readUInt16BE(ie*j)}var A;if(D){var K=-1;for(A=g;A<H;A++)if(T(k,A)===T(p,K===-1?0:A-K)){if(K===-1&&(K=A),A-K+1===se)return K*j}else K!==-1&&(A-=A-K),K=-1}else for(g+se>H&&(g=H-se),A=g;A>=0;A--){for(var Q=!0,ee=0;ee<se;ee++)if(T(k,A+ee)!==T(p,ee)){Q=!1;break}if(Q)return A}return-1}s.prototype.includes=function(p,g,E){return this.indexOf(p,g,E)!==-1},s.prototype.indexOf=function(p,g,E){return y(this,p,g,E,!0)},s.prototype.lastIndexOf=function(p,g,E){return y(this,p,g,E,!1)};function b(k,p,g,E){g=Number(g)||0;var D=k.length-g;E?(E=Number(E),E>D&&(E=D)):E=D;var j=p.length;E>j/2&&(E=j/2);for(var H=0;H<E;++H){var se=parseInt(p.substr(H*2,2),16);if(be(se))return H;k[g+H]=se}return H}function S(k,p,g,E){return xe(V(p,k.length-g),k,g,E)}function I(k,p,g,E){return xe(Y(p),k,g,E)}function $(k,p,g,E){return xe(me(p),k,g,E)}function J(k,p,g,E){return xe(ne(p,k.length-g),k,g,E)}s.prototype.write=function(p,g,E,D){if(g===void 0)D="utf8",E=this.length,g=0;else if(E===void 0&&typeof g=="string")D=g,E=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(E)?(E=E>>>0,D===void 0&&(D="utf8")):(D=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var j=this.length-g;if((E===void 0||E>j)&&(E=j),p.length>0&&(E<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");D||(D="utf8");for(var H=!1;;)switch(D){case"hex":return b(this,p,g,E);case"utf8":case"utf-8":return S(this,p,g,E);case"ascii":case"latin1":case"binary":return I(this,p,g,E);case"base64":return $(this,p,g,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,p,g,E);default:if(H)throw new TypeError("Unknown encoding: "+D);D=(""+D).toLowerCase(),H=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(k,p,g){return p===0&&g===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(p,g))}function z(k,p,g){g=Math.min(k.length,g);for(var E=[],D=p;D<g;){var j=k[D],H=null,se=j>239?4:j>223?3:j>191?2:1;if(D+se<=g){var T,A,K,Q;switch(se){case 1:j<128&&(H=j);break;case 2:T=k[D+1],(T&192)===128&&(Q=(j&31)<<6|T&63,Q>127&&(H=Q));break;case 3:T=k[D+1],A=k[D+2],(T&192)===128&&(A&192)===128&&(Q=(j&15)<<12|(T&63)<<6|A&63,Q>2047&&(Q<55296||Q>57343)&&(H=Q));break;case 4:T=k[D+1],A=k[D+2],K=k[D+3],(T&192)===128&&(A&192)===128&&(K&192)===128&&(Q=(j&15)<<18|(T&63)<<12|(A&63)<<6|K&63,Q>65535&&Q<1114112&&(H=Q))}}H===null?(H=65533,se=1):H>65535&&(H-=65536,E.push(H>>>10&1023|55296),H=56320|H&1023),E.push(H),D+=se}return re(E)}var G=4096;function re(k){var p=k.length;if(p<=G)return String.fromCharCode.apply(String,k);for(var g="",E=0;E<p;)g+=String.fromCharCode.apply(String,k.slice(E,E+=G));return g}function N(k,p,g){var E="";g=Math.min(k.length,g);for(var D=p;D<g;++D)E+=String.fromCharCode(k[D]&127);return E}function Z(k,p,g){var E="";g=Math.min(k.length,g);for(var D=p;D<g;++D)E+=String.fromCharCode(k[D]);return E}function U(k,p,g){var E=k.length;(!p||p<0)&&(p=0),(!g||g<0||g>E)&&(g=E);for(var D="",j=p;j<g;++j)D+=_e[k[j]];return D}function F(k,p,g){for(var E=k.slice(p,g),D="",j=0;j<E.length-1;j+=2)D+=String.fromCharCode(E[j]+E[j+1]*256);return D}s.prototype.slice=function(p,g){var E=this.length;p=~~p,g=g===void 0?E:~~g,p<0?(p+=E,p<0&&(p=0)):p>E&&(p=E),g<0?(g+=E,g<0&&(g=0)):g>E&&(g=E),g<p&&(g=p);var D=this.subarray(p,g);return Object.setPrototypeOf(D,s.prototype),D};function q(k,p,g){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+p>g)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(p,g,E){p=p>>>0,g=g>>>0,E||q(p,g,this.length);for(var D=this[p],j=1,H=0;++H<g&&(j*=256);)D+=this[p+H]*j;return D},s.prototype.readUintBE=s.prototype.readUIntBE=function(p,g,E){p=p>>>0,g=g>>>0,E||q(p,g,this.length);for(var D=this[p+--g],j=1;g>0&&(j*=256);)D+=this[p+--g]*j;return D},s.prototype.readUint8=s.prototype.readUInt8=function(p,g){return p=p>>>0,g||q(p,1,this.length),this[p]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(p,g){return p=p>>>0,g||q(p,2,this.length),this[p]|this[p+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(p,g){return p=p>>>0,g||q(p,2,this.length),this[p]<<8|this[p+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(p,g){return p=p>>>0,g||q(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(p,g){return p=p>>>0,g||q(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},s.prototype.readIntLE=function(p,g,E){p=p>>>0,g=g>>>0,E||q(p,g,this.length);for(var D=this[p],j=1,H=0;++H<g&&(j*=256);)D+=this[p+H]*j;return j*=128,D>=j&&(D-=Math.pow(2,8*g)),D},s.prototype.readIntBE=function(p,g,E){p=p>>>0,g=g>>>0,E||q(p,g,this.length);for(var D=g,j=1,H=this[p+--D];D>0&&(j*=256);)H+=this[p+--D]*j;return j*=128,H>=j&&(H-=Math.pow(2,8*g)),H},s.prototype.readInt8=function(p,g){return p=p>>>0,g||q(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},s.prototype.readInt16LE=function(p,g){p=p>>>0,g||q(p,2,this.length);var E=this[p]|this[p+1]<<8;return E&32768?E|4294901760:E},s.prototype.readInt16BE=function(p,g){p=p>>>0,g||q(p,2,this.length);var E=this[p+1]|this[p]<<8;return E&32768?E|4294901760:E},s.prototype.readInt32LE=function(p,g){return p=p>>>0,g||q(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},s.prototype.readInt32BE=function(p,g){return p=p>>>0,g||q(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},s.prototype.readFloatLE=function(p,g){return p=p>>>0,g||q(p,4,this.length),r.read(this,p,!0,23,4)},s.prototype.readFloatBE=function(p,g){return p=p>>>0,g||q(p,4,this.length),r.read(this,p,!1,23,4)},s.prototype.readDoubleLE=function(p,g){return p=p>>>0,g||q(p,8,this.length),r.read(this,p,!0,52,8)},s.prototype.readDoubleBE=function(p,g){return p=p>>>0,g||q(p,8,this.length),r.read(this,p,!1,52,8)};function W(k,p,g,E,D,j){if(!s.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>D||p<j)throw new RangeError('"value" argument is out of bounds');if(g+E>k.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(p,g,E,D){if(p=+p,g=g>>>0,E=E>>>0,!D){var j=Math.pow(2,8*E)-1;W(this,p,g,E,j,0)}var H=1,se=0;for(this[g]=p&255;++se<E&&(H*=256);)this[g+se]=p/H&255;return g+E},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(p,g,E,D){if(p=+p,g=g>>>0,E=E>>>0,!D){var j=Math.pow(2,8*E)-1;W(this,p,g,E,j,0)}var H=E-1,se=1;for(this[g+H]=p&255;--H>=0&&(se*=256);)this[g+H]=p/se&255;return g+E},s.prototype.writeUint8=s.prototype.writeUInt8=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,1,255,0),this[g]=p&255,g+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,2,65535,0),this[g]=p&255,this[g+1]=p>>>8,g+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,2,65535,0),this[g]=p>>>8,this[g+1]=p&255,g+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,4,4294967295,0),this[g+3]=p>>>24,this[g+2]=p>>>16,this[g+1]=p>>>8,this[g]=p&255,g+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,4,4294967295,0),this[g]=p>>>24,this[g+1]=p>>>16,this[g+2]=p>>>8,this[g+3]=p&255,g+4},s.prototype.writeIntLE=function(p,g,E,D){if(p=+p,g=g>>>0,!D){var j=Math.pow(2,8*E-1);W(this,p,g,E,j-1,-j)}var H=0,se=1,T=0;for(this[g]=p&255;++H<E&&(se*=256);)p<0&&T===0&&this[g+H-1]!==0&&(T=1),this[g+H]=(p/se>>0)-T&255;return g+E},s.prototype.writeIntBE=function(p,g,E,D){if(p=+p,g=g>>>0,!D){var j=Math.pow(2,8*E-1);W(this,p,g,E,j-1,-j)}var H=E-1,se=1,T=0;for(this[g+H]=p&255;--H>=0&&(se*=256);)p<0&&T===0&&this[g+H+1]!==0&&(T=1),this[g+H]=(p/se>>0)-T&255;return g+E},s.prototype.writeInt8=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,1,127,-128),p<0&&(p=255+p+1),this[g]=p&255,g+1},s.prototype.writeInt16LE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,2,32767,-32768),this[g]=p&255,this[g+1]=p>>>8,g+2},s.prototype.writeInt16BE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,2,32767,-32768),this[g]=p>>>8,this[g+1]=p&255,g+2},s.prototype.writeInt32LE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,4,2147483647,-2147483648),this[g]=p&255,this[g+1]=p>>>8,this[g+2]=p>>>16,this[g+3]=p>>>24,g+4},s.prototype.writeInt32BE=function(p,g,E){return p=+p,g=g>>>0,E||W(this,p,g,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[g]=p>>>24,this[g+1]=p>>>16,this[g+2]=p>>>8,this[g+3]=p&255,g+4};function te(k,p,g,E,D,j){if(g+E>k.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function L(k,p,g,E,D){return p=+p,g=g>>>0,D||te(k,p,g,4),r.write(k,p,g,E,23,4),g+4}s.prototype.writeFloatLE=function(p,g,E){return L(this,p,g,!0,E)},s.prototype.writeFloatBE=function(p,g,E){return L(this,p,g,!1,E)};function M(k,p,g,E,D){return p=+p,g=g>>>0,D||te(k,p,g,8),r.write(k,p,g,E,52,8),g+8}s.prototype.writeDoubleLE=function(p,g,E){return M(this,p,g,!0,E)},s.prototype.writeDoubleBE=function(p,g,E){return M(this,p,g,!1,E)},s.prototype.copy=function(p,g,E,D){if(!s.isBuffer(p))throw new TypeError("argument should be a Buffer");if(E||(E=0),!D&&D!==0&&(D=this.length),g>=p.length&&(g=p.length),g||(g=0),D>0&&D<E&&(D=E),D===E||p.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(D<0)throw new RangeError("sourceEnd out of bounds");D>this.length&&(D=this.length),p.length-g<D-E&&(D=p.length-g+E);var j=D-E;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(g,E,D):Uint8Array.prototype.set.call(p,this.subarray(E,D),g),j},s.prototype.fill=function(p,g,E,D){if(typeof p=="string"){if(typeof g=="string"?(D=g,g=0,E=this.length):typeof E=="string"&&(D=E,E=this.length),D!==void 0&&typeof D!="string")throw new TypeError("encoding must be a string");if(typeof D=="string"&&!s.isEncoding(D))throw new TypeError("Unknown encoding: "+D);if(p.length===1){var j=p.charCodeAt(0);(D==="utf8"&&j<128||D==="latin1")&&(p=j)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(g<0||this.length<g||this.length<E)throw new RangeError("Out of range index");if(E<=g)return this;g=g>>>0,E=E===void 0?this.length:E>>>0,p||(p=0);var H;if(typeof p=="number")for(H=g;H<E;++H)this[H]=p;else{var se=s.isBuffer(p)?p:s.from(p,D),T=se.length;if(T===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(H=0;H<E-g;++H)this[H+g]=se[H%T]}return this};var O=/[^+/0-9A-Za-z-_]/g;function X(k){if(k=k.split("=")[0],k=k.trim().replace(O,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function V(k,p){p=p||1/0;for(var g,E=k.length,D=null,j=[],H=0;H<E;++H){if(g=k.charCodeAt(H),g>55295&&g<57344){if(!D){if(g>56319){(p-=3)>-1&&j.push(239,191,189);continue}else if(H+1===E){(p-=3)>-1&&j.push(239,191,189);continue}D=g;continue}if(g<56320){(p-=3)>-1&&j.push(239,191,189),D=g;continue}g=(D-55296<<10|g-56320)+65536}else D&&(p-=3)>-1&&j.push(239,191,189);if(D=null,g<128){if((p-=1)<0)break;j.push(g)}else if(g<2048){if((p-=2)<0)break;j.push(g>>6|192,g&63|128)}else if(g<65536){if((p-=3)<0)break;j.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((p-=4)<0)break;j.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return j}function Y(k){for(var p=[],g=0;g<k.length;++g)p.push(k.charCodeAt(g)&255);return p}function ne(k,p){for(var g,E,D,j=[],H=0;H<k.length&&!((p-=2)<0);++H)g=k.charCodeAt(H),E=g>>8,D=g%256,j.push(D),j.push(E);return j}function me(k){return t.toByteArray(X(k))}function xe(k,p,g,E){for(var D=0;D<E&&!(D+g>=p.length||D>=k.length);++D)p[D+g]=k[D];return D}function de(k,p){return k instanceof p||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===p.name}function be(k){return k!==k}var _e=function(){for(var k="0123456789abcdef",p=new Array(256),g=0;g<16;++g)for(var E=g*16,D=0;D<16;++D)p[E+D]=k[g]+k[D];return p}()})(Se);const tt=Se.Buffer.from&&Se.Buffer.alloc&&Se.Buffer.allocUnsafe&&Se.Buffer.allocUnsafeSlow?Se.Buffer.from:e=>new Se.Buffer(e);function rt(e,t){const r=(n,o)=>t(n,o)>>>0;return r.signed=t,r.unsigned=r,r.model=e,r}const R3=rt("crc1",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=~~t,n=0;for(let o=0;o<e.length;o++){const a=e[o];n+=a}return r+=n%256,r%256});let Oo=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];typeof Int32Array<"u"&&(Oo=new Int32Array(Oo));const I3=rt("crc-8",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=~~t;for(let n=0;n<e.length;n++){const o=e[n];r=Oo[(r^o)&255]&255}return r});let Mo=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];typeof Int32Array<"u"&&(Mo=new Int32Array(Mo));const A3=rt("dallas-1-wire",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=~~t;for(let n=0;n<e.length;n++){const o=e[n];r=Mo[(r^o)&255]&255}return r});let Lo=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(Lo=new Int32Array(Lo));const D3=rt("crc-16",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=~~t;for(let n=0;n<e.length;n++){const o=e[n];r=(Lo[(r^o)&255]^r>>8)&65535}return r});let No=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];typeof Int32Array<"u"&&(No=new Int32Array(No));const O3=rt("ccitt",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=typeof t<"u"?~~t:65535;for(let n=0;n<e.length;n++){const o=e[n];r=(No[(r>>8^o)&255]^r<<8)&65535}return r});let Uo=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(Uo=new Int32Array(Uo));const M3=rt("crc-16-modbus",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=typeof t<"u"?~~t:65535;for(let n=0;n<e.length;n++){const o=e[n];r=(Uo[(r^o)&255]^r>>8)&65535}return r}),L3=rt("xmodem",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=typeof t<"u"?~~t:0;for(let n=0;n<e.length;n++){const o=e[n];let a=r>>>8&255;a^=o&255,a^=a>>>4,r=r<<8&65535,r^=a,a=a<<5&65535,r^=a,a=a<<7&65535,r^=a}return r});let Fo=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];typeof Int32Array<"u"&&(Fo=new Int32Array(Fo));const N3=rt("kermit",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=typeof t<"u"?~~t:0;for(let n=0;n<e.length;n++){const o=e[n];r=(Fo[(r^o)&255]^r>>8)&65535}return r});let jo=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];typeof Int32Array<"u"&&(jo=new Int32Array(jo));const U3=rt("crc-24",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=typeof t<"u"?~~t:11994318;for(let n=0;n<e.length;n++){const o=e[n];r=(jo[(r>>16^o)&255]^r<<8)&16777215}return r});let $o=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&($o=new Int32Array($o));const F3=rt("crc-32",function(e,t){Se.Buffer.isBuffer(e)||(e=tt(e));let r=t===0?0:~~t^-1;for(let n=0;n<e.length;n++){const o=e[n];r=$o[(r^o)&255]^r>>>8}return r^-1});let qo=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(qo=new Int32Array(qo));const j3=rt("jam",function(e,t=-1){Se.Buffer.isBuffer(e)||(e=tt(e));let r=t===0?0:~~t;for(let n=0;n<e.length;n++){const o=e[n];r=qo[(r^o)&255]^r>>>8}return r}),iu={crc1:R3,crc8:I3,crc81wire:A3,crc16:D3,crc16ccitt:O3,crc16modbus:M3,crc16xmodem:L3,crc16kermit:N3,crc24:U3,crc32:F3,crcjam:j3},au=Object.freeze(Object.defineProperty({__proto__:null,crc1:R3,crc16:D3,crc16ccitt:O3,crc16kermit:N3,crc16modbus:M3,crc16xmodem:L3,crc24:U3,crc32:F3,crc8:I3,crc81wire:A3,crcjam:j3,default:iu},Symbol.toStringTag,{value:"Module"})),su=Nt(au);var cu=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.bufferXOR=ye.setDifference=ye.arrayContains=ye.arraysEqual=ye.hasPrefix=ye.isURType=ye.intToBytes=ye.toUint32=ye.getCRCHex=ye.getCRC=ye.split=ye.partition=ye.sha256Hash=void 0;const uu=cu(E3),$3=su,fu=e=>uu.default("sha256").update(e).digest();ye.sha256Hash=fu;const lu=(e,t)=>e.match(new RegExp(".{1,"+t+"}","g"))||[e];ye.partition=lu;const du=(e,t)=>[e.slice(0,-t),e.slice(-t)];ye.split=du;const hu=e=>$3.crc32(e);ye.getCRC=hu;const pu=e=>$3.crc32(e).toString(16).padStart(8,"0");ye.getCRCHex=pu;const mu=e=>e>>>0;ye.toUint32=mu;const gu=e=>{const t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!1),Buffer.from(t)};ye.intToBytes=gu;const vu=e=>e.split("").every((t,r)=>{let n=e.charCodeAt(r);return 97<=n&&n<=122||48<=n&&n<=57||n===45});ye.isURType=vu;const xu=(e,t)=>e.indexOf(t)===0;ye.hasPrefix=xu;const yu=(e,t)=>e.length!==t.length?!1:e.every(r=>t.includes(r));ye.arraysEqual=yu;const bu=(e,t)=>t.every(r=>e.includes(r));ye.arrayContains=bu;const Cu=(e,t)=>e.filter(r=>t.indexOf(r)<0);ye.setDifference=Cu;const _u=(e,t)=>{const r=Math.max(e.length,t.length),n=Buffer.allocUnsafe(r);for(let o=0;o<r;++o)n[o]=e[o]^t[o];return n};ye.bufferXOR=_u;var Dt={},q3={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.CBOR=r()})(ke,function(){var t=function(){function r(y){this.$hex=y}r.prototype={length:function(){return this.$hex.length/2},toString:function(y){if(!y||y==="hex"||y===16)return this.$hex;if(y==="utf-8"){for(var h="",b=0;b<this.$hex.length;b+=2)h+="%"+this.$hex.substring(b,b+2);return decodeURIComponent(h)}if(y==="latin"){for(var h=[],b=0;b<this.$hex.length;b+=2)h.push(parseInt(this.$hex.substring(b,b+2),16));return String.fromCharCode.apply(String,h)}throw new Error("Unrecognised format: "+y)}},r.fromLatinString=function(y){for(var h="",b=0;b<y.length;b++){var S=y.charCodeAt(b).toString(16);S.length===1&&(S="0"+S),h+=S}return new r(h)},r.fromUtf8String=function(y){for(var h=encodeURIComponent(y),b="",S=0;S<h.length;S++)if(h.charAt(S)==="%")b+=h.substring(S+1,S+3),S+=2;else{var I=h.charCodeAt(S).toString(16);I.length<2&&(I="0"+I),b+=I}return new r(b)};var n=[],o={},a=function(y){return function(){throw new Error(y+" not implemented")}};function u(){}u.prototype={peekByte:a("peekByte"),readByte:a("readByte"),readChunk:a("readChunk"),readFloat16:function(){var y=this.readUint16(),h=(y&32767)>>10,b=y&1023,S=y&32768;if(h===31)return b===0?S?-1/0:1/0:NaN;var I=h?Math.pow(2,h-25)*(1024+b):Math.pow(2,-24)*b;return S?-I:I},readFloat32:function(){var y=this.readUint32(),h=(y&2147483647)>>23,b=y&8388607,S=y&2147483648;if(h===255)return b===0?S?-1/0:1/0:NaN;var I=h?Math.pow(2,h-23-127)*(8388608+b):Math.pow(2,-149)*b;return S?-I:I},readFloat64:function(){var y=this.readUint32(),h=this.readUint32(),b=y>>20&2047,S=(y&1048575)*4294967296+h,I=y&2147483648;if(b===2047)return S===0?I?-1/0:1/0:NaN;var $=b?Math.pow(2,b-52-1023)*(4503599627370496+S):Math.pow(2,-1074)*S;return I?-$:$},readUint16:function(){return this.readByte()*256+this.readByte()},readUint32:function(){return this.readUint16()*65536+this.readUint16()},readUint64:function(){return this.readUint32()*4294967296+this.readUint32()}};function s(){}s.prototype={writeByte:a("writeByte"),result:a("result"),writeFloat16:a("writeFloat16"),writeFloat32:a("writeFloat32"),writeFloat64:a("writeFloat64"),writeUint16:function(y){this.writeByte(y>>8&255),this.writeByte(y&255)},writeUint32:function(y){this.writeUint16(y>>16&65535),this.writeUint16(y&65535)},writeUint64:function(y){if(y>=9007199254740992||y<=-9007199254740992)throw new Error("Cannot encode Uint64 of: "+y+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(y/4294967296)),this.writeUint32(y%4294967296)},writeString:a("writeString"),canWriteBinary:function(y){return!1},writeBinary:a("writeChunk")};function l(y){var h=y.readByte(),b=h>>5,S=h&31;return{type:b,value:S}}function i(y,h){var b=y.value;if(b<24)return b;if(b==24)return h.readByte();if(b==25)return h.readUint16();if(b==26)return h.readUint32();if(b==27)return h.readUint64();if(b==31)return null;a("Additional info: "+b)()}function c(y,h,b){b.writeByte(y<<5|h)}function f(y,h,b){var S=y<<5;h<24?b.writeByte(S|h):h<256?(b.writeByte(S|24),b.writeByte(h)):h<65536?(b.writeByte(S|25),b.writeUint16(h)):h<4294967296?(b.writeByte(S|26),b.writeUint32(h)):(b.writeByte(S|27),b.writeUint64(h))}var d=new Error;function m(y){var h=l(y);switch(h.type){case 0:return i(h,y);case 1:return-1-i(h,y);case 2:return y.readChunk(i(h,y));case 3:var b=y.readChunk(i(h,y));return b.toString("utf-8");case 4:case 5:var S=i(h,y),G=[];if(S!==null){h.type===5&&(S*=2);for(var I=0;I<S;I++)G[I]=m(y)}else for(var $;($=m(y))!==d;)G.push($);if(h.type===5){for(var J={},I=0;I<G.length;I+=2)J[G[I]]=G[I+1];return J}else return G;case 6:var oe=i(h,y),z=o[oe],G=m(y);return z?z(G):G;case 7:if(h.value===25)return y.readFloat16();if(h.value===26)return y.readFloat32();if(h.value===27)return y.readFloat64();switch(i(h,y)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case null:return d;default:throw new Error("Unknown fixed value: "+h.value)}default:throw new Error("Unsupported header: "+JSON.stringify(h))}throw new Error("not implemented yet")}function v(y,h){for(var b=0;b<n.length;b++){var S=n[b].fn(y);if(S!==void 0)return f(6,n[b].tag,h),v(S,h)}if(y&&typeof y.toCBOR=="function"&&(y=y.toCBOR()),y===!1)f(7,20,h);else if(y===!0)f(7,21,h);else if(y===null)f(7,22,h);else if(y===void 0)f(7,23,h);else if(typeof y=="number")Math.floor(y)===y&&y<9007199254740992&&y>-9007199254740992?y<0?f(1,-1-y,h):f(0,y,h):(c(7,27,h),h.writeFloat64(y));else if(typeof y=="string")h.writeString(y,function($){f(3,$,h)});else if(h.canWriteBinary(y))h.writeBinary(y,function($){f(2,$,h)});else if(typeof y=="object")if(B.config.useToJSON&&typeof y.toJSON=="function"&&(y=y.toJSON()),Array.isArray(y)){f(4,y.length,h);for(var b=0;b<y.length;b++)v(y[b],h)}else{var I=Object.keys(y);f(5,I.length,h);for(var b=0;b<I.length;b++)v(I[b],h),v(y[I[b]],h)}else throw new Error("CBOR encoding not supported: "+y)}var _=[],w=[],B={config:{useToJSON:!0},addWriter:function(y,h){typeof y=="string"?w.push(function(b){if(y===b)return h(b)}):w.push(y)},addReader:function(y,h){typeof y=="string"?_.push(function(b,S){if(y===S)return h(b,S)}):_.push(y)},encode:function(y,h){for(var b=0;b<w.length;b++){var S=w[b],I=S(h);if(I)return v(y,I),I.result()}throw new Error("Unsupported output format: "+h)},decode:function(y,h){for(var b=0;b<_.length;b++){var S=_[b],I=S(y,h);if(I)return m(I)}throw new Error("Unsupported input format: "+h)},addSemanticEncode:function(y,h){if(typeof y!="number"||y%1!==0||y<0)throw new Error("Tag must be a positive integer");return n.push({tag:y,fn:h}),this},addSemanticDecode:function(y,h){if(typeof y!="number"||y%1!==0||y<0)throw new Error("Tag must be a positive integer");return o[y]=h,this},Reader:u,Writer:s};function C(y){this.buffer=y,this.pos=0}C.prototype=Object.create(u.prototype),C.prototype.peekByte=function(){return this.buffer[this.pos]},C.prototype.readByte=function(){return this.buffer[this.pos++]},C.prototype.readUint16=function(){var y=this.buffer.readUInt16BE(this.pos);return this.pos+=2,y},C.prototype.readUint32=function(){var y=this.buffer.readUInt32BE(this.pos);return this.pos+=4,y},C.prototype.readFloat32=function(){var y=this.buffer.readFloatBE(this.pos);return this.pos+=4,y},C.prototype.readFloat64=function(){var y=this.buffer.readDoubleBE(this.pos);return this.pos+=8,y},C.prototype.readChunk=function(y){var h=Buffer.alloc(y);return this.buffer.copy(h,0,this.pos,this.pos+=y),h};function x(y){this.byteLength=0,this.defaultBufferLength=16384,this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0,this.completeBuffers=[],this.stringFormat=y}x.prototype=Object.create(s.prototype),x.prototype.writeByte=function(y){this.latestBuffer[this.latestBufferOffset++]=y,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0),this.byteLength++},x.prototype.writeFloat32=function(y){var h=Buffer.alloc(4);h.writeFloatBE(y,0),this.writeBuffer(h)},x.prototype.writeFloat64=function(y){var h=Buffer.alloc(8);h.writeDoubleBE(y,0),this.writeBuffer(h)},x.prototype.writeString=function(y,h){var b=Buffer.from(y,"utf-8");h(b.length),this.writeBuffer(b)},x.prototype.canWriteBinary=function(y){return y instanceof Buffer},x.prototype.writeBinary=function(y,h){h(y.length),this.writeBuffer(y)},x.prototype.writeBuffer=function(y){if(!(y instanceof Buffer))throw new TypeError("BufferWriter only accepts Buffers");this.latestBufferOffset?this.latestBuffer.length-this.latestBufferOffset>=y.length?(y.copy(this.latestBuffer,this.latestBufferOffset),this.latestBufferOffset+=y.length,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0)):(this.completeBuffers.push(this.latestBuffer.slice(0,this.latestBufferOffset)),this.completeBuffers.push(y),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0):this.completeBuffers.push(y),this.byteLength+=y.length},x.prototype.result=function(){for(var y=Buffer.alloc(this.byteLength),h=0,b=0;b<this.completeBuffers.length;b++){var S=this.completeBuffers[b];S.copy(y,h,0,S.length),h+=S.length}return this.latestBufferOffset&&this.latestBuffer.copy(y,h,0,this.latestBufferOffset),this.stringFormat?y.toString(this.stringFormat):y},typeof Buffer=="function"&&(B.addReader(function(y,h){if(y instanceof Buffer)return new C(y);if(h==="hex"||h==="base64"){var b=Buffer.from(y,h);return new C(b)}}),B.addWriter(function(y){if(!y||y==="buffer")return new x;if(y==="hex"||y==="base64")return new x(y)}));function P(y){this.hex=y,this.pos=0}P.prototype=Object.create(u.prototype),P.prototype.peekByte=function(){var y=this.hex.substring(this.pos,2);return parseInt(y,16)},P.prototype.readByte=function(){var y=this.hex.substring(this.pos,this.pos+2);return this.pos+=2,parseInt(y,16)},P.prototype.readChunk=function(y){var h=this.hex.substring(this.pos,this.pos+y*2);return this.pos+=y*2,typeof Buffer=="function"?Buffer.from(h,"hex"):new r(h)};function R(y){this.$hex="",this.finalFormat=y||"hex"}return R.prototype=Object.create(s.prototype),R.prototype.writeByte=function(y){if(y<0||y>255)throw new Error("Byte value out of range: "+y);var h=y.toString(16);h.length==1&&(h="0"+h),this.$hex+=h},R.prototype.canWriteBinary=function(y){return y instanceof r||typeof Buffer=="function"&&y instanceof Buffer},R.prototype.writeBinary=function(y,h){if(y instanceof r)h(y.length()),this.$hex+=y.$hex;else if(typeof Buffer=="function"&&y instanceof Buffer)h(y.length),this.$hex+=y.toString("hex");else throw new TypeError("HexWriter only accepts BinaryHex or Buffers")},R.prototype.result=function(){return this.finalFormat==="buffer"&&typeof Buffer=="function"?Buffer.from(this.$hex,"hex"):new r(this.$hex).toString(this.finalFormat)},R.prototype.writeString=function(y,h){var b=r.fromUtf8String(y);h(b.length()),this.$hex+=b.$hex},B.addReader(function(y,h){if(y instanceof r||y.$hex)return new P(y.$hex);if(h==="hex")return new P(y)}),B.addWriter(function(y){if(y==="hex")return new R}),B}();return t.addSemanticEncode(0,function(r){if(r instanceof Date)return r.toISOString()}).addSemanticDecode(0,function(r){return new Date(r)}).addSemanticDecode(1,function(r){return new Date(r)}),t})})(q3);var Bu=q3.exports;Object.defineProperty(Dt,"__esModule",{value:!0});Dt.cborDecode=Dt.cborEncode=void 0;const z3=Bu,wu=e=>z3.encode(e);Dt.cborEncode=wu;const ku=e=>z3.decode(Buffer.isBuffer(e)?e:Buffer.from(e,"hex"));Dt.cborDecode=ku;Object.defineProperty(Wn,"__esModule",{value:!0});const Pu=je,Eu=ye,qi=Dt;class Pn{constructor(t,r="bytes"){if(this._cborPayload=t,this._type=r,!Eu.isURType(this._type))throw new Pu.InvalidTypeError}static fromBuffer(t){return new Pn(qi.cborEncode(t))}static from(t,r){return Pn.fromBuffer(Buffer.from(t,r))}decodeCBOR(){return qi.cborDecode(this._cborPayload)}get type(){return this._type}get cbor(){return this._cborPayload}equals(t){return this.type===t.type&&this.cbor.equals(t.cbor)}}Wn.default=Pn;var li={},er={},so={exports:{}},co={},zi;function H3(){if(zi)return co;zi=1;function e(C){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},e(C)}function t(C,x,P){return Object.defineProperty(C,"prototype",{writable:!1}),C}function r(C,x){if(!(C instanceof x))throw new TypeError("Cannot call a class as a function")}function n(C,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(x&&x.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),Object.defineProperty(C,"prototype",{writable:!1}),x&&o(C,x)}function o(C,x){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,y){return R.__proto__=y,R},o(C,x)}function a(C){var x=l();return function(){var R=i(C),y;if(x){var h=i(this).constructor;y=Reflect.construct(R,arguments,h)}else y=R.apply(this,arguments);return u(this,y)}}function u(C,x){if(x&&(e(x)==="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(C)}function s(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}function l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function i(C){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(P){return P.__proto__||Object.getPrototypeOf(P)},i(C)}var c={},f,d;function m(C,x,P){P||(P=Error);function R(h,b,S){return typeof x=="string"?x:x(h,b,S)}var y=function(h){n(S,h);var b=a(S);function S(I,$,J){var oe;return r(this,S),oe=b.call(this,R(I,$,J)),oe.code=C,oe}return t(S)}(P);c[C]=y}function v(C,x){if(Array.isArray(C)){var P=C.length;return C=C.map(function(R){return String(R)}),P>2?"one of ".concat(x," ").concat(C.slice(0,P-1).join(", "),", or ")+C[P-1]:P===2?"one of ".concat(x," ").concat(C[0]," or ").concat(C[1]):"of ".concat(x," ").concat(C[0])}else return"of ".concat(x," ").concat(String(C))}function _(C,x,P){return C.substr(0,x.length)===x}function w(C,x,P){return(P===void 0||P>C.length)&&(P=C.length),C.substring(P-x.length,P)===x}function B(C,x,P){return typeof P!="number"&&(P=0),P+x.length>C.length?!1:C.indexOf(x,P)!==-1}return m("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),m("ERR_INVALID_ARG_TYPE",function(C,x,P){f===void 0&&(f=Sr()),f(typeof C=="string","'name' must be a string");var R;typeof x=="string"&&_(x,"not ")?(R="must not be",x=x.replace(/^not /,"")):R="must be";var y;if(w(C," argument"))y="The ".concat(C," ").concat(R," ").concat(v(x,"type"));else{var h=B(C,".")?"property":"argument";y='The "'.concat(C,'" ').concat(h," ").concat(R," ").concat(v(x,"type"))}return y+=". Received type ".concat(e(P)),y},TypeError),m("ERR_INVALID_ARG_VALUE",function(C,x){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";d===void 0&&(d=Er());var R=d.inspect(x);return R.length>128&&(R="".concat(R.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(P,". Received ").concat(R)},TypeError),m("ERR_INVALID_RETURN_VALUE",function(C,x,P){var R;return P&&P.constructor&&P.constructor.name?R="instance of ".concat(P.constructor.name):R="type ".concat(e(P)),"Expected ".concat(C,' to be returned from the "').concat(x,'"')+" function but got ".concat(R,".")},TypeError),m("ERR_MISSING_ARGS",function(){for(var C=arguments.length,x=new Array(C),P=0;P<C;P++)x[P]=arguments[P];f===void 0&&(f=Sr()),f(x.length>0,"At least one arg needs to be specified");var R="The ",y=x.length;switch(x=x.map(function(h){return'"'.concat(h,'"')}),y){case 1:R+="".concat(x[0]," argument");break;case 2:R+="".concat(x[0]," and ").concat(x[1]," arguments");break;default:R+=x.slice(0,y-1).join(", "),R+=", and ".concat(x[y-1]," arguments");break}return"".concat(R," must be specified")},TypeError),co.codes=c,co}var uo,Hi;function Su(){if(Hi)return uo;Hi=1;function e(U,F){var q=Object.keys(U);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(U);F&&(W=W.filter(function(te){return Object.getOwnPropertyDescriptor(U,te).enumerable})),q.push.apply(q,W)}return q}function t(U){for(var F=1;F<arguments.length;F++){var q=arguments[F]!=null?arguments[F]:{};F%2?e(Object(q),!0).forEach(function(W){r(U,W,q[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(q)):e(Object(q)).forEach(function(W){Object.defineProperty(U,W,Object.getOwnPropertyDescriptor(q,W))})}return U}function r(U,F,q){return F=u(F),F in U?Object.defineProperty(U,F,{value:q,enumerable:!0,configurable:!0,writable:!0}):U[F]=q,U}function n(U,F){if(!(U instanceof F))throw new TypeError("Cannot call a class as a function")}function o(U,F){for(var q=0;q<F.length;q++){var W=F[q];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(U,u(W.key),W)}}function a(U,F,q){return F&&o(U.prototype,F),Object.defineProperty(U,"prototype",{writable:!1}),U}function u(U){var F=s(U,"string");return C(F)==="symbol"?F:String(F)}function s(U,F){if(C(U)!=="object"||U===null)return U;var q=U[Symbol.toPrimitive];if(q!==void 0){var W=q.call(U,F||"default");if(C(W)!=="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(U)}function l(U,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(F&&F.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),F&&w(U,F)}function i(U){var F=v();return function(){var W=B(U),te;if(F){var L=B(this).constructor;te=Reflect.construct(W,arguments,L)}else te=W.apply(this,arguments);return c(this,te)}}function c(U,F){if(F&&(C(F)==="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(U)}function f(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function d(U){var F=typeof Map=="function"?new Map:void 0;return d=function(W){if(W===null||!_(W))return W;if(typeof W!="function")throw new TypeError("Super expression must either be null or a function");if(typeof F<"u"){if(F.has(W))return F.get(W);F.set(W,te)}function te(){return m(W,arguments,B(this).constructor)}return te.prototype=Object.create(W.prototype,{constructor:{value:te,enumerable:!1,writable:!0,configurable:!0}}),w(te,W)},d(U)}function m(U,F,q){return v()?m=Reflect.construct.bind():m=function(te,L,M){var O=[null];O.push.apply(O,L);var X=Function.bind.apply(te,O),V=new X;return M&&w(V,M.prototype),V},m.apply(null,arguments)}function v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _(U){return Function.toString.call(U).indexOf("[native code]")!==-1}function w(U,F){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(W,te){return W.__proto__=te,W},w(U,F)}function B(U){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},B(U)}function C(U){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},C(U)}var x=Er(),P=x.inspect,R=H3(),y=R.codes.ERR_INVALID_ARG_TYPE;function h(U,F,q){return(q===void 0||q>U.length)&&(q=U.length),U.substring(q-F.length,q)===F}function b(U,F){if(F=Math.floor(F),U.length==0||F==0)return"";var q=U.length*F;for(F=Math.floor(Math.log(F)/Math.log(2));F;)U+=U,F--;return U+=U.substring(0,q-U.length),U}var S="",I="",$="",J="",oe={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},z=10;function G(U){var F=Object.keys(U),q=Object.create(Object.getPrototypeOf(U));return F.forEach(function(W){q[W]=U[W]}),Object.defineProperty(q,"message",{value:U.message}),q}function re(U){return P(U,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(U,F,q){var W="",te="",L=0,M="",O=!1,X=re(U),V=X.split(`
|
|
7
|
-
`),Y=re(F).split(`
|
|
8
|
-
`),ne=0,me="";if(q==="strictEqual"&&C(U)==="object"&&C(F)==="object"&&U!==null&&F!==null&&(q="strictEqualObject"),V.length===1&&Y.length===1&&V[0]!==Y[0]){var xe=V[0].length+Y[0].length;if(xe<=z){if((C(U)!=="object"||U===null)&&(C(F)!=="object"||F===null)&&(U!==0||F!==0))return"".concat(oe[q],`
|
|
9
|
-
|
|
10
|
-
`)+"".concat(V[0]," !== ").concat(Y[0],`
|
|
11
|
-
`)}else if(q!=="strictEqualObject"){var de=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(xe<de){for(;V[0][ne]===Y[0][ne];)ne++;ne>2&&(me=`
|
|
12
|
-
`.concat(b(" ",ne),"^"),ne=0)}}}for(var be=V[V.length-1],_e=Y[Y.length-1];be===_e&&(ne++<2?M=`
|
|
13
|
-
`.concat(be).concat(M):W=be,V.pop(),Y.pop(),!(V.length===0||Y.length===0));)be=V[V.length-1],_e=Y[Y.length-1];var k=Math.max(V.length,Y.length);if(k===0){var p=X.split(`
|
|
14
|
-
`);if(p.length>30)for(p[26]="".concat(S,"...").concat(J);p.length>27;)p.pop();return"".concat(oe.notIdentical,`
|
|
15
|
-
|
|
16
|
-
`).concat(p.join(`
|
|
17
|
-
`),`
|
|
18
|
-
`)}ne>3&&(M=`
|
|
19
|
-
`.concat(S,"...").concat(J).concat(M),O=!0),W!==""&&(M=`
|
|
20
|
-
`.concat(W).concat(M),W="");var g=0,E=oe[q]+`
|
|
21
|
-
`.concat(I,"+ actual").concat(J," ").concat($,"- expected").concat(J),D=" ".concat(S,"...").concat(J," Lines skipped");for(ne=0;ne<k;ne++){var j=ne-L;if(V.length<ne+1)j>1&&ne>2&&(j>4?(te+=`
|
|
22
|
-
`.concat(S,"...").concat(J),O=!0):j>3&&(te+=`
|
|
23
|
-
`.concat(Y[ne-2]),g++),te+=`
|
|
24
|
-
`.concat(Y[ne-1]),g++),L=ne,W+=`
|
|
25
|
-
`.concat($,"-").concat(J," ").concat(Y[ne]),g++;else if(Y.length<ne+1)j>1&&ne>2&&(j>4?(te+=`
|
|
26
|
-
`.concat(S,"...").concat(J),O=!0):j>3&&(te+=`
|
|
27
|
-
`.concat(V[ne-2]),g++),te+=`
|
|
28
|
-
`.concat(V[ne-1]),g++),L=ne,te+=`
|
|
29
|
-
`.concat(I,"+").concat(J," ").concat(V[ne]),g++;else{var H=Y[ne],se=V[ne],T=se!==H&&(!h(se,",")||se.slice(0,-1)!==H);T&&h(H,",")&&H.slice(0,-1)===se&&(T=!1,se+=","),T?(j>1&&ne>2&&(j>4?(te+=`
|
|
30
|
-
`.concat(S,"...").concat(J),O=!0):j>3&&(te+=`
|
|
31
|
-
`.concat(V[ne-2]),g++),te+=`
|
|
32
|
-
`.concat(V[ne-1]),g++),L=ne,te+=`
|
|
33
|
-
`.concat(I,"+").concat(J," ").concat(se),W+=`
|
|
34
|
-
`.concat($,"-").concat(J," ").concat(H),g+=2):(te+=W,W="",(j===1||ne===0)&&(te+=`
|
|
35
|
-
`.concat(se),g++))}if(g>20&&ne<k-2)return"".concat(E).concat(D,`
|
|
36
|
-
`).concat(te,`
|
|
37
|
-
`).concat(S,"...").concat(J).concat(W,`
|
|
38
|
-
`)+"".concat(S,"...").concat(J)}return"".concat(E).concat(O?D:"",`
|
|
39
|
-
`).concat(te).concat(W).concat(M).concat(me)}var Z=function(U,F){l(W,U);var q=i(W);function W(te){var L;if(n(this,W),C(te)!=="object"||te===null)throw new y("options","Object",te);var M=te.message,O=te.operator,X=te.stackStartFn,V=te.actual,Y=te.expected,ne=Error.stackTraceLimit;if(Error.stackTraceLimit=0,M!=null)L=q.call(this,String(M));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(S="\x1B[34m",I="\x1B[32m",J="\x1B[39m",$="\x1B[31m"):(S="",I="",J="",$="")),C(V)==="object"&&V!==null&&C(Y)==="object"&&Y!==null&&"stack"in V&&V instanceof Error&&"stack"in Y&&Y instanceof Error&&(V=G(V),Y=G(Y)),O==="deepStrictEqual"||O==="strictEqual")L=q.call(this,N(V,Y,O));else if(O==="notDeepStrictEqual"||O==="notStrictEqual"){var me=oe[O],xe=re(V).split(`
|
|
40
|
-
`);if(O==="notStrictEqual"&&C(V)==="object"&&V!==null&&(me=oe.notStrictEqualObject),xe.length>30)for(xe[26]="".concat(S,"...").concat(J);xe.length>27;)xe.pop();xe.length===1?L=q.call(this,"".concat(me," ").concat(xe[0])):L=q.call(this,"".concat(me,`
|
|
41
|
-
|
|
42
|
-
`).concat(xe.join(`
|
|
43
|
-
`),`
|
|
44
|
-
`))}else{var de=re(V),be="",_e=oe[O];O==="notDeepEqual"||O==="notEqual"?(de="".concat(oe[O],`
|
|
45
|
-
|
|
46
|
-
`).concat(de),de.length>1024&&(de="".concat(de.slice(0,1021),"..."))):(be="".concat(re(Y)),de.length>512&&(de="".concat(de.slice(0,509),"...")),be.length>512&&(be="".concat(be.slice(0,509),"...")),O==="deepEqual"||O==="equal"?de="".concat(_e,`
|
|
47
|
-
|
|
48
|
-
`).concat(de,`
|
|
49
|
-
|
|
50
|
-
should equal
|
|
51
|
-
|
|
52
|
-
`):be=" ".concat(O," ").concat(be)),L=q.call(this,"".concat(de).concat(be))}return Error.stackTraceLimit=ne,L.generatedMessage=!M,Object.defineProperty(f(L),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),L.code="ERR_ASSERTION",L.actual=V,L.expected=Y,L.operator=O,Error.captureStackTrace&&Error.captureStackTrace(f(L),X),L.stack,L.name="AssertionError",c(L)}return a(W,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:F,value:function(L,M){return P(this,t(t({},M),{},{customInspect:!1,depth:0}))}}]),W}(d(Error),P.custom);return uo=Z,uo}var Gi=Object.prototype.toString,G3=function(t){var r=Gi.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Gi.call(t.callee)==="[object Function]"),n},fo,Ki;function Tu(){if(Ki)return fo;Ki=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=G3,o=Object.prototype.propertyIsEnumerable,a=!o.call({toString:null},"toString"),u=o.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var m=d.constructor;return m&&m.prototype===d},i={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!i["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(m){var v=m!==null&&typeof m=="object",_=r.call(m)==="[object Function]",w=n(m),B=v&&r.call(m)==="[object String]",C=[];if(!v&&!_&&!w)throw new TypeError("Object.keys called on a non-object");var x=u&&_;if(B&&m.length>0&&!t.call(m,0))for(var P=0;P<m.length;++P)C.push(String(P));if(w&&m.length>0)for(var R=0;R<m.length;++R)C.push(String(R));else for(var y in m)!(x&&y==="prototype")&&t.call(m,y)&&C.push(String(y));if(a)for(var h=f(m),b=0;b<s.length;++b)!(h&&s[b]==="constructor")&&t.call(m,s[b])&&C.push(s[b]);return C}}return fo=e,fo}var Ru=Array.prototype.slice,Iu=G3,Wi=Object.keys,mn=Wi?function(t){return Wi(t)}:Tu(),Vi=Object.keys;mn.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return Iu(n)?Vi(Ru.call(n)):Vi(n)})}else Object.keys=mn;return Object.keys||mn};var K3=mn,Au=K3,W3=hc(),V3=pc,gn=mc,Du=V3("Array.prototype.push"),Yi=V3("Object.prototype.propertyIsEnumerable"),Ou=W3?gn.getOwnPropertySymbols:null,Mu=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=gn(t);if(arguments.length===1)return n;for(var o=1;o<arguments.length;++o){var a=gn(arguments[o]),u=Au(a),s=W3&&(gn.getOwnPropertySymbols||Ou);if(s)for(var l=s(a),i=0;i<l.length;++i){var c=l[i];Yi(a,c)&&Du(u,c)}for(var f=0;f<u.length;++f){var d=u[f];if(Yi(a,d)){var m=a[d];n[d]=m}}}return n},lo=Mu,Lu=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var o=Object.assign({},r),a="";for(var u in o)a+=u;return e!==a},Nu=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},Uu=function(){return!Object.assign||Lu()||Nu()?lo:Object.assign},Xi=function(e){return e!==e},Y3=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||Xi(t)&&Xi(r))},Fu=Y3,di=function(){return typeof Object.is=="function"?Object.is:Fu},X3=gc,Q3=fi,ju=Q3(X3("String.prototype.indexOf")),$u=function(t,r){var n=X3(t,!!r);return typeof n=="function"&&ju(t,".prototype.")>-1?Q3(n):n},ho,Qi;function Vn(){if(Qi)return ho;Qi=1;var e=K3,t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,o=xc,a=function(i){return typeof i=="function"&&r.call(i)==="[object Function]"},u=vc(),s=function(i,c,f,d){if(c in i){if(d===!0){if(i[c]===f)return}else if(!a(d)||!d())return}u?o(i,c,f,!0):o(i,c,f)},l=function(i,c){var f=arguments.length>2?arguments[2]:{},d=e(c);t&&(d=n.call(d,Object.getOwnPropertySymbols(c)));for(var m=0;m<d.length;m+=1)s(i,d[m],c[d[m]],f[d[m]])};return l.supportsDescriptors=!!u,ho=l,ho}var po,Ji;function qu(){if(Ji)return po;Ji=1;var e=di,t=Vn();return po=function(){var n=e();return t(Object,{is:n},{is:function(){return Object.is!==n}}),n},po}var mo,Zi;function zu(){if(Zi)return mo;Zi=1;var e=Vn(),t=fi,r=Y3,n=di,o=qu(),a=t(n(),Object);return e(a,{getPolyfill:n,implementation:r,shim:o}),mo=a,mo}var go,ea;function J3(){return ea||(ea=1,go=function(t){return t!==t}),go}var vo,ta;function Z3(){if(ta)return vo;ta=1;var e=J3();return vo=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:e},vo}var xo,ra;function Hu(){if(ra)return xo;ra=1;var e=Vn(),t=Z3();return xo=function(){var n=t();return e(Number,{isNaN:n},{isNaN:function(){return Number.isNaN!==n}}),n},xo}var yo,na;function Gu(){if(na)return yo;na=1;var e=fi,t=Vn(),r=J3(),n=Z3(),o=Hu(),a=e(n(),Number);return t(a,{getPolyfill:n,implementation:r,shim:o}),yo=a,yo}var bo,oa;function Ku(){if(oa)return bo;oa=1;function e(T,A){return a(T)||o(T,A)||r(T,A)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
53
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r(T,A){if(T){if(typeof T=="string")return n(T,A);var K=Object.prototype.toString.call(T).slice(8,-1);if(K==="Object"&&T.constructor&&(K=T.constructor.name),K==="Map"||K==="Set")return Array.from(T);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return n(T,A)}}function n(T,A){(A==null||A>T.length)&&(A=T.length);for(var K=0,Q=new Array(A);K<A;K++)Q[K]=T[K];return Q}function o(T,A){var K=T==null?null:typeof Symbol<"u"&&T[Symbol.iterator]||T["@@iterator"];if(K!=null){var Q,ee,ue,ie,fe=[],he=!0,pe=!1;try{if(ue=(K=K.call(T)).next,A!==0)for(;!(he=(Q=ue.call(K)).done)&&(fe.push(Q.value),fe.length!==A);he=!0);}catch(we){pe=!0,ee=we}finally{try{if(!he&&K.return!=null&&(ie=K.return(),Object(ie)!==ie))return}finally{if(pe)throw ee}}return fe}}function a(T){if(Array.isArray(T))return T}function u(T){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},u(T)}var s=/a/g.flags!==void 0,l=function(A){var K=[];return A.forEach(function(Q){return K.push(Q)}),K},i=function(A){var K=[];return A.forEach(function(Q,ee){return K.push([ee,Q])}),K},c=Object.is?Object.is:zu(),f=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},d=Number.isNaN?Number.isNaN:Gu();function m(T){return T.call.bind(T)}var v=m(Object.prototype.hasOwnProperty),_=m(Object.prototype.propertyIsEnumerable),w=m(Object.prototype.toString),B=Er().types,C=B.isAnyArrayBuffer,x=B.isArrayBufferView,P=B.isDate,R=B.isMap,y=B.isRegExp,h=B.isSet,b=B.isNativeError,S=B.isBoxedPrimitive,I=B.isNumberObject,$=B.isStringObject,J=B.isBooleanObject,oe=B.isBigIntObject,z=B.isSymbolObject,G=B.isFloat32Array,re=B.isFloat64Array;function N(T){if(T.length===0||T.length>10)return!0;for(var A=0;A<T.length;A++){var K=T.charCodeAt(A);if(K<48||K>57)return!0}return T.length===10&&T>=Math.pow(2,32)}function Z(T){return Object.keys(T).filter(N).concat(f(T).filter(Object.prototype.propertyIsEnumerable.bind(T)))}/*!
|
|
54
|
-
* The buffer module from node.js, for the browser.
|
|
55
|
-
*
|
|
56
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/function U(T,A){if(T===A)return 0;for(var K=T.length,Q=A.length,ee=0,ue=Math.min(K,Q);ee<ue;++ee)if(T[ee]!==A[ee]){K=T[ee],Q=A[ee];break}return K<Q?-1:Q<K?1:0}var F=!0,q=!1,W=0,te=1,L=2,M=3;function O(T,A){return s?T.source===A.source&&T.flags===A.flags:RegExp.prototype.toString.call(T)===RegExp.prototype.toString.call(A)}function X(T,A){if(T.byteLength!==A.byteLength)return!1;for(var K=0;K<T.byteLength;K++)if(T[K]!==A[K])return!1;return!0}function V(T,A){return T.byteLength!==A.byteLength?!1:U(new Uint8Array(T.buffer,T.byteOffset,T.byteLength),new Uint8Array(A.buffer,A.byteOffset,A.byteLength))===0}function Y(T,A){return T.byteLength===A.byteLength&&U(new Uint8Array(T),new Uint8Array(A))===0}function ne(T,A){return I(T)?I(A)&&c(Number.prototype.valueOf.call(T),Number.prototype.valueOf.call(A)):$(T)?$(A)&&String.prototype.valueOf.call(T)===String.prototype.valueOf.call(A):J(T)?J(A)&&Boolean.prototype.valueOf.call(T)===Boolean.prototype.valueOf.call(A):oe(T)?oe(A)&&BigInt.prototype.valueOf.call(T)===BigInt.prototype.valueOf.call(A):z(A)&&Symbol.prototype.valueOf.call(T)===Symbol.prototype.valueOf.call(A)}function me(T,A,K,Q){if(T===A)return T!==0?!0:K?c(T,A):!0;if(K){if(u(T)!=="object")return typeof T=="number"&&d(T)&&d(A);if(u(A)!=="object"||T===null||A===null||Object.getPrototypeOf(T)!==Object.getPrototypeOf(A))return!1}else{if(T===null||u(T)!=="object")return A===null||u(A)!=="object"?T==A:!1;if(A===null||u(A)!=="object")return!1}var ee=w(T),ue=w(A);if(ee!==ue)return!1;if(Array.isArray(T)){if(T.length!==A.length)return!1;var ie=Z(T),fe=Z(A);return ie.length!==fe.length?!1:de(T,A,K,Q,te,ie)}if(ee==="[object Object]"&&(!R(T)&&R(A)||!h(T)&&h(A)))return!1;if(P(T)){if(!P(A)||Date.prototype.getTime.call(T)!==Date.prototype.getTime.call(A))return!1}else if(y(T)){if(!y(A)||!O(T,A))return!1}else if(b(T)||T instanceof Error){if(T.message!==A.message||T.name!==A.name)return!1}else if(x(T)){if(!K&&(G(T)||re(T))){if(!X(T,A))return!1}else if(!V(T,A))return!1;var he=Z(T),pe=Z(A);return he.length!==pe.length?!1:de(T,A,K,Q,W,he)}else{if(h(T))return!h(A)||T.size!==A.size?!1:de(T,A,K,Q,L);if(R(T))return!R(A)||T.size!==A.size?!1:de(T,A,K,Q,M);if(C(T)){if(!Y(T,A))return!1}else if(S(T)&&!ne(T,A))return!1}return de(T,A,K,Q,W)}function xe(T,A){return A.filter(function(K){return _(T,K)})}function de(T,A,K,Q,ee,ue){if(arguments.length===5){ue=Object.keys(T);var ie=Object.keys(A);if(ue.length!==ie.length)return!1}for(var fe=0;fe<ue.length;fe++)if(!v(A,ue[fe]))return!1;if(K&&arguments.length===5){var he=f(T);if(he.length!==0){var pe=0;for(fe=0;fe<he.length;fe++){var we=he[fe];if(_(T,we)){if(!_(A,we))return!1;ue.push(we),pe++}else if(_(A,we))return!1}var kt=f(A);if(he.length!==kt.length&&xe(A,kt).length!==pe)return!1}else{var Ft=f(A);if(Ft.length!==0&&xe(A,Ft).length!==0)return!1}}if(ue.length===0&&(ee===W||ee===te&&T.length===0||T.size===0))return!0;if(Q===void 0)Q={val1:new Map,val2:new Map,position:0};else{var sr=Q.val1.get(T);if(sr!==void 0){var ft=Q.val2.get(A);if(ft!==void 0)return sr===ft}Q.position++}Q.val1.set(T,Q.position),Q.val2.set(A,Q.position);var cr=j(T,A,K,ue,Q,ee);return Q.val1.delete(T),Q.val2.delete(A),cr}function be(T,A,K,Q){for(var ee=l(T),ue=0;ue<ee.length;ue++){var ie=ee[ue];if(me(A,ie,K,Q))return T.delete(ie),!0}return!1}function _e(T){switch(u(T)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":T=+T;case"number":if(d(T))return!1}return!0}function k(T,A,K){var Q=_e(K);return Q??(A.has(Q)&&!T.has(Q))}function p(T,A,K,Q,ee){var ue=_e(K);if(ue!=null)return ue;var ie=A.get(ue);return ie===void 0&&!A.has(ue)||!me(Q,ie,!1,ee)?!1:!T.has(ue)&&me(Q,ie,!1,ee)}function g(T,A,K,Q){for(var ee=null,ue=l(T),ie=0;ie<ue.length;ie++){var fe=ue[ie];if(u(fe)==="object"&&fe!==null)ee===null&&(ee=new Set),ee.add(fe);else if(!A.has(fe)){if(K||!k(T,A,fe))return!1;ee===null&&(ee=new Set),ee.add(fe)}}if(ee!==null){for(var he=l(A),pe=0;pe<he.length;pe++){var we=he[pe];if(u(we)==="object"&&we!==null){if(!be(ee,we,K,Q))return!1}else if(!K&&!T.has(we)&&!be(ee,we,K,Q))return!1}return ee.size===0}return!0}function E(T,A,K,Q,ee,ue){for(var ie=l(T),fe=0;fe<ie.length;fe++){var he=ie[fe];if(me(K,he,ee,ue)&&me(Q,A.get(he),ee,ue))return T.delete(he),!0}return!1}function D(T,A,K,Q){for(var ee=null,ue=i(T),ie=0;ie<ue.length;ie++){var fe=e(ue[ie],2),he=fe[0],pe=fe[1];if(u(he)==="object"&&he!==null)ee===null&&(ee=new Set),ee.add(he);else{var we=A.get(he);if(we===void 0&&!A.has(he)||!me(pe,we,K,Q)){if(K||!p(T,A,he,pe,Q))return!1;ee===null&&(ee=new Set),ee.add(he)}}}if(ee!==null){for(var kt=i(A),Ft=0;Ft<kt.length;Ft++){var sr=e(kt[Ft],2),ft=sr[0],cr=sr[1];if(u(ft)==="object"&&ft!==null){if(!E(ee,T,ft,cr,K,Q))return!1}else if(!K&&(!T.has(ft)||!me(T.get(ft),cr,!1,Q))&&!E(ee,T,ft,cr,!1,Q))return!1}return ee.size===0}return!0}function j(T,A,K,Q,ee,ue){var ie=0;if(ue===L){if(!g(T,A,K,ee))return!1}else if(ue===M){if(!D(T,A,K,ee))return!1}else if(ue===te)for(;ie<T.length;ie++)if(v(T,ie)){if(!v(A,ie)||!me(T[ie],A[ie],K,ee))return!1}else{if(v(A,ie))return!1;for(var fe=Object.keys(T);ie<fe.length;ie++){var he=fe[ie];if(!v(A,he)||!me(T[he],A[he],K,ee))return!1}return fe.length===Object.keys(A).length}for(ie=0;ie<Q.length;ie++){var pe=Q[ie];if(!me(T[pe],A[pe],K,ee))return!1}return!0}function H(T,A){return me(T,A,q)}function se(T,A){return me(T,A,F)}return bo={isDeepEqual:H,isDeepStrictEqual:se},bo}var ia;function Sr(){if(ia)return so.exports;ia=1;function e(L){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},e(L)}function t(L,M,O){return Object.defineProperty(L,"prototype",{writable:!1}),L}function r(L,M){if(!(L instanceof M))throw new TypeError("Cannot call a class as a function")}var n=H3(),o=n.codes,a=o.ERR_AMBIGUOUS_ARGUMENT,u=o.ERR_INVALID_ARG_TYPE,s=o.ERR_INVALID_ARG_VALUE,l=o.ERR_INVALID_RETURN_VALUE,i=o.ERR_MISSING_ARGS,c=Su(),f=Er(),d=f.inspect,m=Er().types,v=m.isPromise,_=m.isRegExp,w=Uu(),B=di(),C=$u("RegExp.prototype.test"),x,P;function R(){var L=Ku();x=L.isDeepEqual,P=L.isDeepStrictEqual}var y=!1,h=so.exports=J,b={};function S(L){throw L.message instanceof Error?L.message:new c(L)}function I(L,M,O,X,V){var Y=arguments.length,ne;if(Y===0)ne="Failed";else if(Y===1)O=L,L=void 0;else{if(y===!1){y=!0;var me=process.emitWarning?process.emitWarning:console.warn.bind(console);me("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}Y===2&&(X="!=")}if(O instanceof Error)throw O;var xe={actual:L,expected:M,operator:X===void 0?"fail":X,stackStartFn:V||I};O!==void 0&&(xe.message=O);var de=new c(xe);throw ne&&(de.message=ne,de.generatedMessage=!0),de}h.fail=I,h.AssertionError=c;function $(L,M,O,X){if(!O){var V=!1;if(M===0)V=!0,X="No value argument passed to `assert.ok()`";else if(X instanceof Error)throw X;var Y=new c({actual:O,expected:!0,message:X,operator:"==",stackStartFn:L});throw Y.generatedMessage=V,Y}}function J(){for(var L=arguments.length,M=new Array(L),O=0;O<L;O++)M[O]=arguments[O];$.apply(void 0,[J,M.length].concat(M))}h.ok=J,h.equal=function L(M,O,X){if(arguments.length<2)throw new i("actual","expected");M!=O&&S({actual:M,expected:O,message:X,operator:"==",stackStartFn:L})},h.notEqual=function L(M,O,X){if(arguments.length<2)throw new i("actual","expected");M==O&&S({actual:M,expected:O,message:X,operator:"!=",stackStartFn:L})},h.deepEqual=function L(M,O,X){if(arguments.length<2)throw new i("actual","expected");x===void 0&&R(),x(M,O)||S({actual:M,expected:O,message:X,operator:"deepEqual",stackStartFn:L})},h.notDeepEqual=function L(M,O,X){if(arguments.length<2)throw new i("actual","expected");x===void 0&&R(),x(M,O)&&S({actual:M,expected:O,message:X,operator:"notDeepEqual",stackStartFn:L})},h.deepStrictEqual=function L(M,O,X){if(arguments.length<2)throw new i("actual","expected");x===void 0&&R(),P(M,O)||S({actual:M,expected:O,message:X,operator:"deepStrictEqual",stackStartFn:L})},h.notDeepStrictEqual=oe;function oe(L,M,O){if(arguments.length<2)throw new i("actual","expected");x===void 0&&R(),P(L,M)&&S({actual:L,expected:M,message:O,operator:"notDeepStrictEqual",stackStartFn:oe})}h.strictEqual=function L(M,O,X){if(arguments.length<2)throw new i("actual","expected");B(M,O)||S({actual:M,expected:O,message:X,operator:"strictEqual",stackStartFn:L})},h.notStrictEqual=function L(M,O,X){if(arguments.length<2)throw new i("actual","expected");B(M,O)&&S({actual:M,expected:O,message:X,operator:"notStrictEqual",stackStartFn:L})};var z=t(function L(M,O,X){var V=this;r(this,L),O.forEach(function(Y){Y in M&&(X!==void 0&&typeof X[Y]=="string"&&_(M[Y])&&C(M[Y],X[Y])?V[Y]=X[Y]:V[Y]=M[Y])})});function G(L,M,O,X,V,Y){if(!(O in L)||!P(L[O],M[O])){if(!X){var ne=new z(L,V),me=new z(M,V,L),xe=new c({actual:ne,expected:me,operator:"deepStrictEqual",stackStartFn:Y});throw xe.actual=L,xe.expected=M,xe.operator=Y.name,xe}S({actual:L,expected:M,message:X,operator:Y.name,stackStartFn:Y})}}function re(L,M,O,X){if(typeof M!="function"){if(_(M))return C(M,L);if(arguments.length===2)throw new u("expected",["Function","RegExp"],M);if(e(L)!=="object"||L===null){var V=new c({actual:L,expected:M,message:O,operator:"deepStrictEqual",stackStartFn:X});throw V.operator=X.name,V}var Y=Object.keys(M);if(M instanceof Error)Y.push("name","message");else if(Y.length===0)throw new s("error",M,"may not be an empty object");return x===void 0&&R(),Y.forEach(function(ne){typeof L[ne]=="string"&&_(M[ne])&&C(M[ne],L[ne])||G(L,M,ne,O,Y,X)}),!0}return M.prototype!==void 0&&L instanceof M?!0:Error.isPrototypeOf(M)?!1:M.call({},L)===!0}function N(L){if(typeof L!="function")throw new u("fn","Function",L);try{L()}catch(M){return M}return b}function Z(L){return v(L)||L!==null&&e(L)==="object"&&typeof L.then=="function"&&typeof L.catch=="function"}function U(L){return Promise.resolve().then(function(){var M;if(typeof L=="function"){if(M=L(),!Z(M))throw new l("instance of Promise","promiseFn",M)}else if(Z(L))M=L;else throw new u("promiseFn",["Function","Promise"],L);return Promise.resolve().then(function(){return M}).then(function(){return b}).catch(function(O){return O})})}function F(L,M,O,X){if(typeof O=="string"){if(arguments.length===4)throw new u("error",["Object","Error","Function","RegExp"],O);if(e(M)==="object"&&M!==null){if(M.message===O)throw new a("error/message",'The error message "'.concat(M.message,'" is identical to the message.'))}else if(M===O)throw new a("error/message",'The error "'.concat(M,'" is identical to the message.'));X=O,O=void 0}else if(O!=null&&e(O)!=="object"&&typeof O!="function")throw new u("error",["Object","Error","Function","RegExp"],O);if(M===b){var V="";O&&O.name&&(V+=" (".concat(O.name,")")),V+=X?": ".concat(X):".";var Y=L.name==="rejects"?"rejection":"exception";S({actual:void 0,expected:O,operator:L.name,message:"Missing expected ".concat(Y).concat(V),stackStartFn:L})}if(O&&!re(M,O,X,L))throw M}function q(L,M,O,X){if(M!==b){if(typeof O=="string"&&(X=O,O=void 0),!O||re(M,O)){var V=X?": ".concat(X):".",Y=L.name==="doesNotReject"?"rejection":"exception";S({actual:M,expected:O,operator:L.name,message:"Got unwanted ".concat(Y).concat(V,`
|
|
59
|
-
`)+'Actual message: "'.concat(M&&M.message,'"'),stackStartFn:L})}throw M}}h.throws=function L(M){for(var O=arguments.length,X=new Array(O>1?O-1:0),V=1;V<O;V++)X[V-1]=arguments[V];F.apply(void 0,[L,N(M)].concat(X))},h.rejects=function L(M){for(var O=arguments.length,X=new Array(O>1?O-1:0),V=1;V<O;V++)X[V-1]=arguments[V];return U(M).then(function(Y){return F.apply(void 0,[L,Y].concat(X))})},h.doesNotThrow=function L(M){for(var O=arguments.length,X=new Array(O>1?O-1:0),V=1;V<O;V++)X[V-1]=arguments[V];q.apply(void 0,[L,N(M)].concat(X))},h.doesNotReject=function L(M){for(var O=arguments.length,X=new Array(O>1?O-1:0),V=1;V<O;V++)X[V-1]=arguments[V];return U(M).then(function(Y){return q.apply(void 0,[L,Y].concat(X))})},h.ifError=function L(M){if(M!=null){var O="ifError got unwanted exception: ";e(M)==="object"&&typeof M.message=="string"?M.message.length===0&&M.constructor?O+=M.constructor.name:O+=M.message:O+=d(M);var X=new c({actual:M,expected:null,operator:"ifError",message:O,stackStartFn:L}),V=M.stack;if(typeof V=="string"){var Y=V.split(`
|
|
60
|
-
`);Y.shift();for(var ne=X.stack.split(`
|
|
61
|
-
`),me=0;me<Y.length;me++){var xe=ne.indexOf(Y[me]);if(xe!==-1){ne=ne.slice(0,xe);break}}X.stack="".concat(ne.join(`
|
|
62
|
-
`),`
|
|
63
|
-
`).concat(Y.join(`
|
|
64
|
-
`))}throw X}};function W(L,M,O,X,V){if(!_(M))throw new u("regexp","RegExp",M);var Y=V==="match";if(typeof L!="string"||C(M,L)!==Y){if(O instanceof Error)throw O;var ne=!O;O=O||(typeof L!="string"?'The "string" argument must be of type string. Received type '+"".concat(e(L)," (").concat(d(L),")"):(Y?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(d(M),`. Input:
|
|
65
|
-
|
|
66
|
-
`).concat(d(L),`
|
|
67
|
-
`));var me=new c({actual:L,expected:M,message:O,operator:V,stackStartFn:X});throw me.generatedMessage=ne,me}}h.match=function L(M,O,X){W(M,O,X,L,"match")},h.doesNotMatch=function L(M,O,X){W(M,O,X,L,"doesNotMatch")};function te(){for(var L=arguments.length,M=new Array(L),O=0;O<L;O++)M[O]=arguments[O];$.apply(void 0,[te,M.length].concat(M))}return h.strict=w(te,h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict,so.exports}var hi={},pi={};const Wu=Nt(yc);var es={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ke,function(){var r=Math.imul,n=Math.clz32,o=Math.abs,a=Math.max,u=Math.floor;class s extends Array{constructor(i,c){if(super(i),this.sign=c,i>s.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(i){var c=Number.isFinite;if(typeof i=="number"){if(i===0)return s.__zero();if(s.__isOneDigitInt(i))return 0>i?s.__oneDigit(-i,!0):s.__oneDigit(i,!1);if(!c(i)||u(i)!==i)throw new RangeError("The number "+i+" cannot be converted to BigInt because it is not an integer");return s.__fromDouble(i)}if(typeof i=="string"){const f=s.__fromString(i);if(f===null)throw new SyntaxError("Cannot convert "+i+" to a BigInt");return f}if(typeof i=="boolean")return i===!0?s.__oneDigit(1,!1):s.__zero();if(typeof i=="object"){if(i.constructor===s)return i;const f=s.__toPrimitive(i);return s.BigInt(f)}throw new TypeError("Cannot convert "+i+" to a BigInt")}toDebugString(){const i=["BigInt["];for(const c of this)i.push((c&&(c>>>0).toString(16))+", ");return i.push("]"),i.join("")}toString(i=10){if(2>i||36<i)throw new RangeError("toString() radix argument must be between 2 and 36");return this.length===0?"0":i&i-1?s.__toStringGeneric(this,i,!1):s.__toStringBasePowerOfTwo(this,i)}static toNumber(i){const c=i.length;if(c===0)return 0;if(c===1){const b=i.__unsignedDigit(0);return i.sign?-b:b}const f=i.__digit(c-1),d=s.__clz30(f),m=30*c-d;if(1024<m)return i.sign?-1/0:1/0;let v=m-1,_=f,w=c-1;const B=d+3;let C=B===32?0:_<<B;C>>>=12;const x=B-12;let P=12<=B?0:_<<20+B,R=20+B;for(0<x&&0<w&&(w--,_=i.__digit(w),C|=_>>>30-x,P=_<<x+2,R=x+2);0<R&&0<w;)w--,_=i.__digit(w),P|=30<=R?_<<R-30:_>>>30-R,R-=30;const y=s.__decideRounding(i,R,w,_);if((y===1||y===0&&(1&P)==1)&&(P=P+1>>>0,P===0&&(C++,C>>>20!=0&&(C=0,v++,1023<v))))return i.sign?-1/0:1/0;const h=i.sign?-2147483648:0;return v=v+1023<<20,s.__kBitConversionInts[1]=h|v|C,s.__kBitConversionInts[0]=P,s.__kBitConversionDouble[0]}static unaryMinus(i){if(i.length===0)return i;const c=i.__copy();return c.sign=!i.sign,c}static bitwiseNot(i){return i.sign?s.__absoluteSubOne(i).__trim():s.__absoluteAddOne(i,!0)}static exponentiate(i,c){if(c.sign)throw new RangeError("Exponent must be positive");if(c.length===0)return s.__oneDigit(1,!1);if(i.length===0)return i;if(i.length===1&&i.__digit(0)===1)return i.sign&&!(1&c.__digit(0))?s.unaryMinus(i):i;if(1<c.length)throw new RangeError("BigInt too big");let f=c.__unsignedDigit(0);if(f===1)return i;if(f>=s.__kMaxLengthBits)throw new RangeError("BigInt too big");if(i.length===1&&i.__digit(0)===2){const v=1+(0|f/30),_=i.sign&&(1&f)!=0,w=new s(v,_);w.__initializeDigits();const B=1<<f%30;return w.__setDigit(v-1,B),w}let d=null,m=i;for(1&f&&(d=i),f>>=1;f!==0;f>>=1)m=s.multiply(m,m),1&f&&(d===null?d=m:d=s.multiply(d,m));return d}static multiply(i,c){if(i.length===0)return i;if(c.length===0)return c;let f=i.length+c.length;30<=i.__clzmsd()+c.__clzmsd()&&f--;const d=new s(f,i.sign!==c.sign);d.__initializeDigits();for(let m=0;m<i.length;m++)s.__multiplyAccumulate(c,i.__digit(m),d,m);return d.__trim()}static divide(i,c){if(c.length===0)throw new RangeError("Division by zero");if(0>s.__absoluteCompare(i,c))return s.__zero();const f=i.sign!==c.sign,d=c.__unsignedDigit(0);let m;if(c.length===1&&32767>=d){if(d===1)return f===i.sign?i:s.unaryMinus(i);m=s.__absoluteDivSmall(i,d,null)}else m=s.__absoluteDivLarge(i,c,!0,!1);return m.sign=f,m.__trim()}static remainder(i,c){if(c.length===0)throw new RangeError("Division by zero");if(0>s.__absoluteCompare(i,c))return i;const f=c.__unsignedDigit(0);if(c.length===1&&32767>=f){if(f===1)return s.__zero();const m=s.__absoluteModSmall(i,f);return m===0?s.__zero():s.__oneDigit(m,i.sign)}const d=s.__absoluteDivLarge(i,c,!1,!0);return d.sign=i.sign,d.__trim()}static add(i,c){const f=i.sign;return f===c.sign?s.__absoluteAdd(i,c,f):0<=s.__absoluteCompare(i,c)?s.__absoluteSub(i,c,f):s.__absoluteSub(c,i,!f)}static subtract(i,c){const f=i.sign;return f===c.sign?0<=s.__absoluteCompare(i,c)?s.__absoluteSub(i,c,f):s.__absoluteSub(c,i,!f):s.__absoluteAdd(i,c,f)}static leftShift(i,c){return c.length===0||i.length===0?i:c.sign?s.__rightShiftByAbsolute(i,c):s.__leftShiftByAbsolute(i,c)}static signedRightShift(i,c){return c.length===0||i.length===0?i:c.sign?s.__leftShiftByAbsolute(i,c):s.__rightShiftByAbsolute(i,c)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(i,c){return 0>s.__compareToBigInt(i,c)}static lessThanOrEqual(i,c){return 0>=s.__compareToBigInt(i,c)}static greaterThan(i,c){return 0<s.__compareToBigInt(i,c)}static greaterThanOrEqual(i,c){return 0<=s.__compareToBigInt(i,c)}static equal(i,c){if(i.sign!==c.sign||i.length!==c.length)return!1;for(let f=0;f<i.length;f++)if(i.__digit(f)!==c.__digit(f))return!1;return!0}static notEqual(i,c){return!s.equal(i,c)}static bitwiseAnd(i,c){if(!i.sign&&!c.sign)return s.__absoluteAnd(i,c).__trim();if(i.sign&&c.sign){const f=a(i.length,c.length)+1;let d=s.__absoluteSubOne(i,f);const m=s.__absoluteSubOne(c);return d=s.__absoluteOr(d,m,d),s.__absoluteAddOne(d,!0,d).__trim()}return i.sign&&([i,c]=[c,i]),s.__absoluteAndNot(i,s.__absoluteSubOne(c)).__trim()}static bitwiseXor(i,c){if(!i.sign&&!c.sign)return s.__absoluteXor(i,c).__trim();if(i.sign&&c.sign){const m=a(i.length,c.length),v=s.__absoluteSubOne(i,m),_=s.__absoluteSubOne(c);return s.__absoluteXor(v,_,v).__trim()}const f=a(i.length,c.length)+1;i.sign&&([i,c]=[c,i]);let d=s.__absoluteSubOne(c,f);return d=s.__absoluteXor(d,i,d),s.__absoluteAddOne(d,!0,d).__trim()}static bitwiseOr(i,c){const f=a(i.length,c.length);if(!i.sign&&!c.sign)return s.__absoluteOr(i,c).__trim();if(i.sign&&c.sign){let m=s.__absoluteSubOne(i,f);const v=s.__absoluteSubOne(c);return m=s.__absoluteAnd(m,v,m),s.__absoluteAddOne(m,!0,m).__trim()}i.sign&&([i,c]=[c,i]);let d=s.__absoluteSubOne(c,f);return d=s.__absoluteAndNot(d,i,d),s.__absoluteAddOne(d,!0,d).__trim()}static asIntN(i,c){if(c.length===0)return c;if(i=u(i),0>i)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(i===0)return s.__zero();if(i>=s.__kMaxLengthBits)return c;const f=0|(i+29)/30;if(c.length<f)return c;const d=c.__unsignedDigit(f-1),m=1<<(i-1)%30;if(c.length===f&&d<m)return c;if((d&m)!==m)return s.__truncateToNBits(i,c);if(!c.sign)return s.__truncateAndSubFromPowerOfTwo(i,c,!0);if(!(d&m-1)){for(let v=f-2;0<=v;v--)if(c.__digit(v)!==0)return s.__truncateAndSubFromPowerOfTwo(i,c,!1);return c.length===f&&d===m?c:s.__truncateToNBits(i,c)}return s.__truncateAndSubFromPowerOfTwo(i,c,!1)}static asUintN(i,c){if(c.length===0)return c;if(i=u(i),0>i)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(i===0)return s.__zero();if(c.sign){if(i>s.__kMaxLengthBits)throw new RangeError("BigInt too big");return s.__truncateAndSubFromPowerOfTwo(i,c,!1)}if(i>=s.__kMaxLengthBits)return c;const f=0|(i+29)/30;if(c.length<f)return c;const d=i%30;return c.length==f&&(d===0||!(c.__digit(f-1)>>>d))?c:s.__truncateToNBits(i,c)}static ADD(i,c){if(i=s.__toPrimitive(i),c=s.__toPrimitive(c),typeof i=="string")return typeof c!="string"&&(c=c.toString()),i+c;if(typeof c=="string")return i.toString()+c;if(i=s.__toNumeric(i),c=s.__toNumeric(c),s.__isBigInt(i)&&s.__isBigInt(c))return s.add(i,c);if(typeof i=="number"&&typeof c=="number")return i+c;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(i,c){return s.__compare(i,c,0)}static LE(i,c){return s.__compare(i,c,1)}static GT(i,c){return s.__compare(i,c,2)}static GE(i,c){return s.__compare(i,c,3)}static EQ(i,c){for(;;){if(s.__isBigInt(i))return s.__isBigInt(c)?s.equal(i,c):s.EQ(c,i);if(typeof i=="number"){if(s.__isBigInt(c))return s.__equalToNumber(c,i);if(typeof c!="object")return i==c;c=s.__toPrimitive(c)}else if(typeof i=="string"){if(s.__isBigInt(c))return i=s.__fromString(i),i!==null&&s.equal(i,c);if(typeof c!="object")return i==c;c=s.__toPrimitive(c)}else if(typeof i=="boolean"){if(s.__isBigInt(c))return s.__equalToNumber(c,+i);if(typeof c!="object")return i==c;c=s.__toPrimitive(c)}else if(typeof i=="symbol"){if(s.__isBigInt(c))return!1;if(typeof c!="object")return i==c;c=s.__toPrimitive(c)}else if(typeof i=="object"){if(typeof c=="object"&&c.constructor!==s)return i==c;i=s.__toPrimitive(i)}else return i==c}}static NE(i,c){return!s.EQ(i,c)}static __zero(){return new s(0,!1)}static __oneDigit(i,c){const f=new s(1,c);return f.__setDigit(0,i),f}__copy(){const i=new s(this.length,this.sign);for(let c=0;c<this.length;c++)i[c]=this[c];return i}__trim(){let i=this.length,c=this[i-1];for(;c===0;)i--,c=this[i-1],this.pop();return i===0&&(this.sign=!1),this}__initializeDigits(){for(let i=0;i<this.length;i++)this[i]=0}static __decideRounding(i,c,f,d){if(0<c)return-1;let m;if(0>c)m=-c-1;else{if(f===0)return-1;f--,d=i.__digit(f),m=29}let v=1<<m;if(!(d&v))return-1;if(v-=1,(d&v)!=0)return 1;for(;0<f;)if(f--,i.__digit(f)!==0)return 1;return 0}static __fromDouble(i){s.__kBitConversionDouble[0]=i;const c=2047&s.__kBitConversionInts[1]>>>20,f=c-1023,d=(0|f/30)+1,m=new s(d,0>i);let v=1048575&s.__kBitConversionInts[1]|1048576,_=s.__kBitConversionInts[0];const w=20,B=f%30;let C,x=0;if(20>B){const P=w-B;x=P+32,C=v>>>P,v=v<<32-P|_>>>P,_<<=32-P}else if(B===20)x=32,C=v,v=_,_=0;else{const P=B-w;x=32-P,C=v<<P|_>>>32-P,v=_<<P,_=0}m.__setDigit(d-1,C);for(let P=d-2;0<=P;P--)0<x?(x-=30,C=v>>>2,v=v<<30|_>>>2,_<<=30):C=0,m.__setDigit(P,C);return m.__trim()}static __isWhitespace(i){return 13>=i&&9<=i||(159>=i?i==32:131071>=i?i==160||i==5760:196607>=i?(i&=131071,10>=i||i==40||i==41||i==47||i==95||i==4096):i==65279)}static __fromString(i,c=0){let f=0;const d=i.length;let m=0;if(m===d)return s.__zero();let v=i.charCodeAt(m);for(;s.__isWhitespace(v);){if(++m===d)return s.__zero();v=i.charCodeAt(m)}if(v===43){if(++m===d)return null;v=i.charCodeAt(m),f=1}else if(v===45){if(++m===d)return null;v=i.charCodeAt(m),f=-1}if(c===0){if(c=10,v===48){if(++m===d)return s.__zero();if(v=i.charCodeAt(m),v===88||v===120){if(c=16,++m===d)return null;v=i.charCodeAt(m)}else if(v===79||v===111){if(c=8,++m===d)return null;v=i.charCodeAt(m)}else if(v===66||v===98){if(c=2,++m===d)return null;v=i.charCodeAt(m)}}}else if(c===16&&v===48){if(++m===d)return s.__zero();if(v=i.charCodeAt(m),v===88||v===120){if(++m===d)return null;v=i.charCodeAt(m)}}if(f!=0&&c!==10)return null;for(;v===48;){if(++m===d)return s.__zero();v=i.charCodeAt(m)}const _=d-m;let w=s.__kMaxBitsPerChar[c],B=s.__kBitsPerCharTableMultiplier-1;if(_>1073741824/w)return null;const C=w*_+B>>>s.__kBitsPerCharTableShift,x=new s(0|(C+29)/30,!1),P=10>c?c:10,R=10<c?c-10:0;if(c&c-1){x.__initializeDigits();let y=!1,h=0;do{let b=0,S=1;for(;;){let $;if(v-48>>>0<P)$=v-48;else if((32|v)-97>>>0<R)$=(32|v)-87;else{y=!0;break}const J=S*c;if(1073741823<J)break;if(S=J,b=b*c+$,h++,++m===d){y=!0;break}v=i.charCodeAt(m)}B=30*s.__kBitsPerCharTableMultiplier-1;const I=0|(w*h+B>>>s.__kBitsPerCharTableShift)/30;x.__inplaceMultiplyAdd(S,b,I)}while(!y)}else{w>>=s.__kBitsPerCharTableShift;const y=[],h=[];let b=!1;do{let S=0,I=0;for(;;){let $;if(v-48>>>0<P)$=v-48;else if((32|v)-97>>>0<R)$=(32|v)-87;else{b=!0;break}if(I+=w,S=S<<w|$,++m===d){b=!0;break}if(v=i.charCodeAt(m),30<I+w)break}y.push(S),h.push(I)}while(!b);s.__fillFromParts(x,y,h)}if(m!==d){if(!s.__isWhitespace(v))return null;for(m++;m<d;m++)if(v=i.charCodeAt(m),!s.__isWhitespace(v))return null}return x.sign=f==-1,x.__trim()}static __fillFromParts(i,c,f){let d=0,m=0,v=0;for(let _=c.length-1;0<=_;_--){const w=c[_],B=f[_];m|=w<<v,v+=B,v===30?(i.__setDigit(d++,m),v=0,m=0):30<v&&(i.__setDigit(d++,1073741823&m),v-=30,m=w>>>B-v)}if(m!==0){if(d>=i.length)throw new Error("implementation bug");i.__setDigit(d++,m)}for(;d<i.length;d++)i.__setDigit(d,0)}static __toStringBasePowerOfTwo(i,c){const f=i.length;let d=c-1;d=(85&d>>>1)+(85&d),d=(51&d>>>2)+(51&d),d=(15&d>>>4)+(15&d);const m=d,v=c-1,_=i.__digit(f-1),w=s.__clz30(_);let B=0|(30*f-w+m-1)/m;if(i.sign&&B++,268435456<B)throw new Error("string too long");const C=Array(B);let x=B-1,P=0,R=0;for(let h=0;h<f-1;h++){const b=i.__digit(h),S=(P|b<<R)&v;C[x--]=s.__kConversionChars[S];const I=m-R;for(P=b>>>I,R=30-I;R>=m;)C[x--]=s.__kConversionChars[P&v],P>>>=m,R-=m}const y=(P|_<<R)&v;for(C[x--]=s.__kConversionChars[y],P=_>>>m-R;P!==0;)C[x--]=s.__kConversionChars[P&v],P>>>=m;if(i.sign&&(C[x--]="-"),x!=-1)throw new Error("implementation bug");return C.join("")}static __toStringGeneric(i,c,f){const d=i.length;if(d===0)return"";if(d===1){let h=i.__unsignedDigit(0).toString(c);return f===!1&&i.sign&&(h="-"+h),h}const m=30*d-s.__clz30(i.__digit(d-1)),v=s.__kMaxBitsPerChar[c],_=v-1;let w=m*s.__kBitsPerCharTableMultiplier;w+=_-1,w=0|w/_;const B=w+1>>1,C=s.exponentiate(s.__oneDigit(c,!1),s.__oneDigit(B,!1));let x,P;const R=C.__unsignedDigit(0);if(C.length===1&&32767>=R){x=new s(i.length,!1),x.__initializeDigits();let h=0;for(let b=2*i.length-1;0<=b;b--){const S=h<<15|i.__halfDigit(b);x.__setHalfDigit(b,0|S/R),h=0|S%R}P=h.toString(c)}else{const h=s.__absoluteDivLarge(i,C,!0,!0);x=h.quotient;const b=h.remainder.__trim();P=s.__toStringGeneric(b,c,!0)}x.__trim();let y=s.__toStringGeneric(x,c,!0);for(;P.length<B;)P="0"+P;return f===!1&&i.sign&&(y="-"+y),y+P}static __unequalSign(i){return i?-1:1}static __absoluteGreater(i){return i?-1:1}static __absoluteLess(i){return i?1:-1}static __compareToBigInt(i,c){const f=i.sign;if(f!==c.sign)return s.__unequalSign(f);const d=s.__absoluteCompare(i,c);return 0<d?s.__absoluteGreater(f):0>d?s.__absoluteLess(f):0}static __compareToNumber(i,c){if(s.__isOneDigitInt(c)){const f=i.sign,d=0>c;if(f!==d)return s.__unequalSign(f);if(i.length===0){if(d)throw new Error("implementation bug");return c===0?0:-1}if(1<i.length)return s.__absoluteGreater(f);const m=o(c),v=i.__unsignedDigit(0);return v>m?s.__absoluteGreater(f):v<m?s.__absoluteLess(f):0}return s.__compareToDouble(i,c)}static __compareToDouble(i,c){if(c!==c)return c;if(c===1/0)return-1;if(c===-1/0)return 1;const f=i.sign;if(f!==0>c)return s.__unequalSign(f);if(c===0)throw new Error("implementation bug: should be handled elsewhere");if(i.length===0)return-1;s.__kBitConversionDouble[0]=c;const d=2047&s.__kBitConversionInts[1]>>>20;if(d==2047)throw new Error("implementation bug: handled elsewhere");const m=d-1023;if(0>m)return s.__absoluteGreater(f);const v=i.length;let _=i.__digit(v-1);const w=s.__clz30(_),B=30*v-w,C=m+1;if(B<C)return s.__absoluteLess(f);if(B>C)return s.__absoluteGreater(f);let x=1048576|1048575&s.__kBitConversionInts[1],P=s.__kBitConversionInts[0];const R=20,y=29-w;if(y!==(0|(B-1)%30))throw new Error("implementation bug");let h,b=0;if(20>y){const S=R-y;b=S+32,h=x>>>S,x=x<<32-S|P>>>S,P<<=32-S}else if(y===20)b=32,h=x,x=P,P=0;else{const S=y-R;b=32-S,h=x<<S|P>>>32-S,x=P<<S,P=0}if(_>>>=0,h>>>=0,_>h)return s.__absoluteGreater(f);if(_<h)return s.__absoluteLess(f);for(let S=v-2;0<=S;S--){0<b?(b-=30,h=x>>>2,x=x<<30|P>>>2,P<<=30):h=0;const I=i.__unsignedDigit(S);if(I>h)return s.__absoluteGreater(f);if(I<h)return s.__absoluteLess(f)}if(x!==0||P!==0){if(b===0)throw new Error("implementation bug");return s.__absoluteLess(f)}return 0}static __equalToNumber(i,c){return s.__isOneDigitInt(c)?c===0?i.length===0:i.length===1&&i.sign===0>c&&i.__unsignedDigit(0)===o(c):s.__compareToDouble(i,c)===0}static __comparisonResultToBool(i,c){return c===0?0>i:c===1?0>=i:c===2?0<i:c===3?0<=i:void 0}static __compare(i,c,f){if(i=s.__toPrimitive(i),c=s.__toPrimitive(c),typeof i=="string"&&typeof c=="string")switch(f){case 0:return i<c;case 1:return i<=c;case 2:return i>c;case 3:return i>=c}if(s.__isBigInt(i)&&typeof c=="string")return c=s.__fromString(c),c!==null&&s.__comparisonResultToBool(s.__compareToBigInt(i,c),f);if(typeof i=="string"&&s.__isBigInt(c))return i=s.__fromString(i),i!==null&&s.__comparisonResultToBool(s.__compareToBigInt(i,c),f);if(i=s.__toNumeric(i),c=s.__toNumeric(c),s.__isBigInt(i)){if(s.__isBigInt(c))return s.__comparisonResultToBool(s.__compareToBigInt(i,c),f);if(typeof c!="number")throw new Error("implementation bug");return s.__comparisonResultToBool(s.__compareToNumber(i,c),f)}if(typeof i!="number")throw new Error("implementation bug");if(s.__isBigInt(c))return s.__comparisonResultToBool(s.__compareToNumber(c,i),2^f);if(typeof c!="number")throw new Error("implementation bug");return f===0?i<c:f===1?i<=c:f===2?i>c:f===3?i>=c:void 0}__clzmsd(){return s.__clz30(this.__digit(this.length-1))}static __absoluteAdd(i,c,f){if(i.length<c.length)return s.__absoluteAdd(c,i,f);if(i.length===0)return i;if(c.length===0)return i.sign===f?i:s.unaryMinus(i);let d=i.length;(i.__clzmsd()===0||c.length===i.length&&c.__clzmsd()===0)&&d++;const m=new s(d,f);let v=0,_=0;for(;_<c.length;_++){const w=i.__digit(_)+c.__digit(_)+v;v=w>>>30,m.__setDigit(_,1073741823&w)}for(;_<i.length;_++){const w=i.__digit(_)+v;v=w>>>30,m.__setDigit(_,1073741823&w)}return _<m.length&&m.__setDigit(_,v),m.__trim()}static __absoluteSub(i,c,f){if(i.length===0)return i;if(c.length===0)return i.sign===f?i:s.unaryMinus(i);const d=new s(i.length,f);let m=0,v=0;for(;v<c.length;v++){const _=i.__digit(v)-c.__digit(v)-m;m=1&_>>>30,d.__setDigit(v,1073741823&_)}for(;v<i.length;v++){const _=i.__digit(v)-m;m=1&_>>>30,d.__setDigit(v,1073741823&_)}return d.__trim()}static __absoluteAddOne(i,c,f=null){const d=i.length;f===null?f=new s(d,c):f.sign=c;let m=1;for(let v=0;v<d;v++){const _=i.__digit(v)+m;m=_>>>30,f.__setDigit(v,1073741823&_)}return m!=0&&f.__setDigitGrow(d,1),f}static __absoluteSubOne(i,c){const f=i.length;c=c||f;const d=new s(c,!1);let m=1;for(let v=0;v<f;v++){const _=i.__digit(v)-m;m=1&_>>>30,d.__setDigit(v,1073741823&_)}if(m!=0)throw new Error("implementation bug");for(let v=f;v<c;v++)d.__setDigit(v,0);return d}static __absoluteAnd(i,c,f=null){let d=i.length,m=c.length,v=m;if(d<m){v=d;const B=i,C=d;i=c,d=m,c=B,m=C}let _=v;f===null?f=new s(_,!1):_=f.length;let w=0;for(;w<v;w++)f.__setDigit(w,i.__digit(w)&c.__digit(w));for(;w<_;w++)f.__setDigit(w,0);return f}static __absoluteAndNot(i,c,f=null){const d=i.length,m=c.length;let v=m;d<m&&(v=d);let _=d;f===null?f=new s(_,!1):_=f.length;let w=0;for(;w<v;w++)f.__setDigit(w,i.__digit(w)&~c.__digit(w));for(;w<d;w++)f.__setDigit(w,i.__digit(w));for(;w<_;w++)f.__setDigit(w,0);return f}static __absoluteOr(i,c,f=null){let d=i.length,m=c.length,v=m;if(d<m){v=d;const B=i,C=d;i=c,d=m,c=B,m=C}let _=d;f===null?f=new s(_,!1):_=f.length;let w=0;for(;w<v;w++)f.__setDigit(w,i.__digit(w)|c.__digit(w));for(;w<d;w++)f.__setDigit(w,i.__digit(w));for(;w<_;w++)f.__setDigit(w,0);return f}static __absoluteXor(i,c,f=null){let d=i.length,m=c.length,v=m;if(d<m){v=d;const B=i,C=d;i=c,d=m,c=B,m=C}let _=d;f===null?f=new s(_,!1):_=f.length;let w=0;for(;w<v;w++)f.__setDigit(w,i.__digit(w)^c.__digit(w));for(;w<d;w++)f.__setDigit(w,i.__digit(w));for(;w<_;w++)f.__setDigit(w,0);return f}static __absoluteCompare(i,c){const f=i.length-c.length;if(f!=0)return f;let d=i.length-1;for(;0<=d&&i.__digit(d)===c.__digit(d);)d--;return 0>d?0:i.__unsignedDigit(d)>c.__unsignedDigit(d)?1:-1}static __multiplyAccumulate(i,c,f,d){if(c===0)return;const m=32767&c,v=c>>>15;let _=0,w=0;for(let B,C=0;C<i.length;C++,d++){B=f.__digit(d);const x=i.__digit(C),P=32767&x,R=x>>>15,y=s.__imul(P,m),h=s.__imul(P,v),b=s.__imul(R,m),S=s.__imul(R,v);B+=w+y+_,_=B>>>30,B&=1073741823,B+=((32767&h)<<15)+((32767&b)<<15),_+=B>>>30,w=S+(h>>>15)+(b>>>15),f.__setDigit(d,1073741823&B)}for(;_!=0||w!==0;d++){let B=f.__digit(d);B+=_+w,w=0,_=B>>>30,f.__setDigit(d,1073741823&B)}}static __internalMultiplyAdd(i,c,f,d,m){let v=f,_=0;for(let w=0;w<d;w++){const B=i.__digit(w),C=s.__imul(32767&B,c),x=s.__imul(B>>>15,c),P=C+((32767&x)<<15)+_+v;v=P>>>30,_=x>>>15,m.__setDigit(w,1073741823&P)}if(m.length>d)for(m.__setDigit(d++,v+_);d<m.length;)m.__setDigit(d++,0);else if(v+_!==0)throw new Error("implementation bug")}__inplaceMultiplyAdd(i,c,f){f>this.length&&(f=this.length);const d=32767&i,m=i>>>15;let v=0,_=c;for(let w=0;w<f;w++){const B=this.__digit(w),C=32767&B,x=B>>>15,P=s.__imul(C,d),R=s.__imul(C,m),y=s.__imul(x,d),h=s.__imul(x,m);let b=_+P+v;v=b>>>30,b&=1073741823,b+=((32767&R)<<15)+((32767&y)<<15),v+=b>>>30,_=h+(R>>>15)+(y>>>15),this.__setDigit(w,1073741823&b)}if(v!=0||_!==0)throw new Error("implementation bug")}static __absoluteDivSmall(i,c,f=null){f===null&&(f=new s(i.length,!1));let d=0;for(let m,v=2*i.length-1;0<=v;v-=2){m=(d<<15|i.__halfDigit(v))>>>0;const _=0|m/c;d=0|m%c,m=(d<<15|i.__halfDigit(v-1))>>>0;const w=0|m/c;d=0|m%c,f.__setDigit(v>>>1,_<<15|w)}return f}static __absoluteModSmall(i,c){let f=0;for(let d=2*i.length-1;0<=d;d--)f=0|((f<<15|i.__halfDigit(d))>>>0)%c;return f}static __absoluteDivLarge(i,c,f,d){const m=c.__halfDigitLength(),v=c.length,_=i.__halfDigitLength()-m;let w=null;f&&(w=new s(_+2>>>1,!1),w.__initializeDigits());const B=new s(m+2>>>1,!1);B.__initializeDigits();const C=s.__clz15(c.__halfDigit(m-1));0<C&&(c=s.__specialLeftShift(c,C,0));const x=s.__specialLeftShift(i,C,1),P=c.__halfDigit(m-1);let R=0;for(let y,h=_;0<=h;h--){y=32767;const b=x.__halfDigit(h+m);if(b!==P){const I=(b<<15|x.__halfDigit(h+m-1))>>>0;y=0|I/P;let $=0|I%P;const J=c.__halfDigit(m-2),oe=x.__halfDigit(h+m-2);for(;s.__imul(y,J)>>>0>($<<16|oe)>>>0&&(y--,$+=P,!(32767<$)););}s.__internalMultiplyAdd(c,y,0,v,B);let S=x.__inplaceSub(B,h,m+1);S!==0&&(S=x.__inplaceAdd(c,h,m),x.__setHalfDigit(h+m,32767&x.__halfDigit(h+m)+S),y--),f&&(1&h?R=y<<15:w.__setDigit(h>>>1,R|y))}if(d)return x.__inplaceRightShift(C),f?{quotient:w,remainder:x}:x;if(f)return w;throw new Error("unreachable")}static __clz15(i){return s.__clz30(i)-15}__inplaceAdd(i,c,f){let d=0;for(let m=0;m<f;m++){const v=this.__halfDigit(c+m)+i.__halfDigit(m)+d;d=v>>>15,this.__setHalfDigit(c+m,32767&v)}return d}__inplaceSub(i,c,f){let d=0;if(1&c){c>>=1;let m=this.__digit(c),v=32767&m,_=0;for(;_<f-1>>>1;_++){const C=i.__digit(_),x=(m>>>15)-(32767&C)-d;d=1&x>>>15,this.__setDigit(c+_,(32767&x)<<15|32767&v),m=this.__digit(c+_+1),v=(32767&m)-(C>>>15)-d,d=1&v>>>15}const w=i.__digit(_),B=(m>>>15)-(32767&w)-d;if(d=1&B>>>15,this.__setDigit(c+_,(32767&B)<<15|32767&v),c+_+1>=this.length)throw new RangeError("out of bounds");!(1&f)&&(m=this.__digit(c+_+1),v=(32767&m)-(w>>>15)-d,d=1&v>>>15,this.__setDigit(c+i.length,1073709056&m|32767&v))}else{c>>=1;let m=0;for(;m<i.length-1;m++){const C=this.__digit(c+m),x=i.__digit(m),P=(32767&C)-(32767&x)-d;d=1&P>>>15;const R=(C>>>15)-(x>>>15)-d;d=1&R>>>15,this.__setDigit(c+m,(32767&R)<<15|32767&P)}const v=this.__digit(c+m),_=i.__digit(m),w=(32767&v)-(32767&_)-d;d=1&w>>>15;let B=0;!(1&f)&&(B=(v>>>15)-(_>>>15)-d,d=1&B>>>15),this.__setDigit(c+m,(32767&B)<<15|32767&w)}return d}__inplaceRightShift(i){if(i===0)return;let c=this.__digit(0)>>>i;const f=this.length-1;for(let d=0;d<f;d++){const m=this.__digit(d+1);this.__setDigit(d,1073741823&m<<30-i|c),c=m>>>i}this.__setDigit(f,c)}static __specialLeftShift(i,c,f){const d=i.length,m=new s(d+f,!1);if(c===0){for(let _=0;_<d;_++)m.__setDigit(_,i.__digit(_));return 0<f&&m.__setDigit(d,0),m}let v=0;for(let _=0;_<d;_++){const w=i.__digit(_);m.__setDigit(_,1073741823&w<<c|v),v=w>>>30-c}return 0<f&&m.__setDigit(d,v),m}static __leftShiftByAbsolute(i,c){const f=s.__toShiftAmount(c);if(0>f)throw new RangeError("BigInt too big");const d=0|f/30,m=f%30,v=i.length,_=m!==0&&i.__digit(v-1)>>>30-m!=0,w=v+d+(_?1:0),B=new s(w,i.sign);if(m===0){let C=0;for(;C<d;C++)B.__setDigit(C,0);for(;C<w;C++)B.__setDigit(C,i.__digit(C-d))}else{let C=0;for(let x=0;x<d;x++)B.__setDigit(x,0);for(let x=0;x<v;x++){const P=i.__digit(x);B.__setDigit(x+d,1073741823&P<<m|C),C=P>>>30-m}if(_)B.__setDigit(v+d,C);else if(C!==0)throw new Error("implementation bug")}return B.__trim()}static __rightShiftByAbsolute(i,c){const f=i.length,d=i.sign,m=s.__toShiftAmount(c);if(0>m)return s.__rightShiftByMaximum(d);const v=0|m/30,_=m%30;let w=f-v;if(0>=w)return s.__rightShiftByMaximum(d);let B=!1;if(d){if(i.__digit(v)&(1<<_)-1)B=!0;else for(let x=0;x<v;x++)if(i.__digit(x)!==0){B=!0;break}}B&&_===0&&!~i.__digit(f-1)&&w++;let C=new s(w,d);if(_===0){C.__setDigit(w-1,0);for(let x=v;x<f;x++)C.__setDigit(x-v,i.__digit(x))}else{let x=i.__digit(v)>>>_;const P=f-v-1;for(let R=0;R<P;R++){const y=i.__digit(R+v+1);C.__setDigit(R,1073741823&y<<30-_|x),x=y>>>_}C.__setDigit(P,x)}return B&&(C=s.__absoluteAddOne(C,!0,C)),C.__trim()}static __rightShiftByMaximum(i){return i?s.__oneDigit(1,!0):s.__zero()}static __toShiftAmount(i){if(1<i.length)return-1;const c=i.__unsignedDigit(0);return c>s.__kMaxLengthBits?-1:c}static __toPrimitive(i,c="default"){if(typeof i!="object"||i.constructor===s)return i;if(typeof Symbol<"u"&&typeof Symbol.toPrimitive=="symbol"){const m=i[Symbol.toPrimitive];if(m){const v=m(c);if(typeof v!="object")return v;throw new TypeError("Cannot convert object to primitive value")}}const f=i.valueOf;if(f){const m=f.call(i);if(typeof m!="object")return m}const d=i.toString;if(d){const m=d.call(i);if(typeof m!="object")return m}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(i){return s.__isBigInt(i)?i:+i}static __isBigInt(i){return typeof i=="object"&&i!==null&&i.constructor===s}static __truncateToNBits(i,c){const f=0|(i+29)/30,d=new s(f,c.sign),m=f-1;for(let _=0;_<m;_++)d.__setDigit(_,c.__digit(_));let v=c.__digit(m);if(i%30!=0){const _=32-i%30;v=v<<_>>>_}return d.__setDigit(m,v),d.__trim()}static __truncateAndSubFromPowerOfTwo(i,c,f){var d=Math.min;const m=0|(i+29)/30,v=new s(m,f);let _=0;const w=m-1;let B=0;for(const R=d(w,c.length);_<R;_++){const y=0-c.__digit(_)-B;B=1&y>>>30,v.__setDigit(_,1073741823&y)}for(;_<w;_++)v.__setDigit(_,0|1073741823&-B);let C=w<c.length?c.__digit(w):0;const x=i%30;let P;if(x==0)P=0-C-B,P&=1073741823;else{const R=32-x;C=C<<R>>>R;const y=1<<32-R;P=y-C-B,P&=y-1}return v.__setDigit(w,P),v.__trim()}__digit(i){return this[i]}__unsignedDigit(i){return this[i]>>>0}__setDigit(i,c){this[i]=0|c}__setDigitGrow(i,c){this[i]=0|c}__halfDigitLength(){const i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(i){return 32767&this[i>>>1]>>>15*(1&i)}__setHalfDigit(i,c){const f=i>>>1,d=this.__digit(f),m=1&i?32767&d|c<<15:1073709056&d|32767&c;this.__setDigit(f,m)}static __digitPow(i,c){let f=1;for(;0<c;)1&c&&(f*=i),c>>>=1,i*=i;return f}static __isOneDigitInt(i){return(1073741823&i)===i}}return s.__kMaxLength=33554432,s.__kMaxLengthBits=s.__kMaxLength<<5,s.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],s.__kBitsPerCharTableShift=5,s.__kBitsPerCharTableMultiplier=1<<s.__kBitsPerCharTableShift,s.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],s.__kBitConversionBuffer=new ArrayBuffer(8),s.__kBitConversionDouble=new Float64Array(s.__kBitConversionBuffer),s.__kBitConversionInts=new Int32Array(s.__kBitConversionBuffer),s.__clz30=n?function(l){return n(l)-2}:function(l){var i=Math.LN2,c=Math.log;return l===0?30:0|29-(0|c(l>>>0)/i)},s.__imul=r||function(l,i){return 0|l*i},s})})(es);var Vu=es.exports,ts=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pi,"__esModule",{value:!0});const Yu=ye,aa=ts(Wu),ce=ts(Vu),Xu=18446744073709552e3,sa=(e,t)=>ce.default.bitwiseXor(ce.default.asUintN(64,ce.default.leftShift(e,ce.default.BigInt(t))),ce.default.BigInt(ce.default.asUintN(64,ce.default.signedRightShift(e,ce.default.subtract(ce.default.BigInt(64),ce.default.BigInt(t))))));class Qu{constructor(t){this.next=()=>new aa.default(this.roll().toString()),this.nextDouble=()=>new aa.default(this.roll().toString()).div(Xu+1),this.nextInt=(n,o)=>Math.floor(this.nextDouble().toNumber()*(o-n+1)+n),this.nextByte=()=>this.nextInt(0,255),this.nextData=n=>[...new Array(n)].map(()=>this.nextByte());const r=Yu.sha256Hash(t);this.s=[ce.default.BigInt(0),ce.default.BigInt(0),ce.default.BigInt(0),ce.default.BigInt(0)],this.setS(r)}setS(t){for(let r=0;r<4;r++){let n=r*8,o=ce.default.BigInt(0);for(let a=0;a<8;a++)o=ce.default.asUintN(64,ce.default.leftShift(o,ce.default.BigInt(8))),o=ce.default.asUintN(64,ce.default.bitwiseOr(o,ce.default.BigInt(t[n+a])));this.s[r]=ce.default.asUintN(64,o)}}roll(){const t=ce.default.asUintN(64,ce.default.multiply(sa(ce.default.asUintN(64,ce.default.multiply(this.s[1],ce.default.BigInt(5))),7),ce.default.BigInt(9))),r=ce.default.asUintN(64,ce.default.leftShift(this.s[1],ce.default.BigInt(17)));return this.s[2]=ce.default.asUintN(64,ce.default.bitwiseXor(this.s[2],ce.default.BigInt(this.s[0]))),this.s[3]=ce.default.asUintN(64,ce.default.bitwiseXor(this.s[3],ce.default.BigInt(this.s[1]))),this.s[1]=ce.default.asUintN(64,ce.default.bitwiseXor(this.s[1],ce.default.BigInt(this.s[2]))),this.s[0]=ce.default.asUintN(64,ce.default.bitwiseXor(this.s[0],ce.default.BigInt(this.s[3]))),this.s[2]=ce.default.asUintN(64,ce.default.bitwiseXor(this.s[2],ce.default.BigInt(r))),this.s[3]=ce.default.asUintN(64,sa(this.s[3],45)),t}}pi.default=Qu;var Ju=function(e,t){var r=e.reduce(function(c,f){if(f<0)throw new Error("Probability must be a positive: p["+e.indexOf(f)+"]="+f);return c+f},0);if(r===0)throw new Error("Probability sum must be greater than zero.");for(var n=e.map(function(c){return c*t/r}),o={prob:new Array(t),alias:new Array(t)},a=[],u=[],s=t-1;s>=0;s--)n[s]<1?a.push(s):u.push(s);for(;a.length>0&&u.length>0;){var l=a.pop(),i=u.pop();o.prob[l]=n[l],o.alias[l]=i,n[i]=n[i]+n[l]-1,n[i]<1?a.push(i):u.push(i)}for(;u.length>0;)o.prob[u.pop()]=1;for(;a.length>0;)o.prob[a.pop()]=1;return o},ca=function(e,t,r){var n=Math.floor(r()*e.prob.length);return t[r()<e.prob[n]?n:e.alias[n]]},Zu=function(e,t,r,n){if(n===void 0&&(n=1),n===1)return ca(e,t,r);for(var o=[],a=0;a<n;a++)o.push(ca(e,t,r));return o},ef=function(e,t,r){if(r===void 0&&(r=Math.random),!Array.isArray(e))throw new Error("Probabilities must be an array.");if(e.length===0)throw new Error("Probabilities array must not be empty.");var n=e.length,o=t??Array.from({length:n},function(u,s){return s}),a=Ju(e,n);return{next:function(u){return u===void 0&&(u=1),Zu(a,o,r,u)}}};const tf=Object.freeze(Object.defineProperty({__proto__:null,default:ef},Symbol.toStringTag,{value:"Module"})),rf=Nt(tf);(function(e){var t=ke&&ke.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.chooseFragments=e.shuffle=e.chooseDegree=void 0;const r=ye,n=t(pi),o=t(rf),a=(l,i)=>{const c=[...new Array(l)].map((d,m)=>1/(m+1));return o.default(c,void 0,i.nextDouble).next()+1};e.chooseDegree=a;const u=(l,i)=>{let c=[...l],f=[];for(;c.length>0;){let d=i.nextInt(0,c.length-1),m=c[d];c.splice(d,1),f.push(m)}return f};e.shuffle=u;const s=(l,i,c)=>{if(l<=i)return[l-1];{const f=Buffer.concat([r.intToBytes(l),r.intToBytes(c)]),d=new n.default(f),m=e.chooseDegree(i,d),v=[...new Array(i)].map((w,B)=>B);return e.shuffle(v,d).slice(0,m)}};e.chooseFragments=s})(hi);var nf=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(er,"__esModule",{value:!0});er.FountainEncoderPart=void 0;const ht=nf(Sr()),mr=ye,of=hi,ua=Dt;class Yn{constructor(t,r,n,o,a){this._seqNum=t,this._seqLength=r,this._messageLength=n,this._checksum=o,this._fragment=a}get messageLength(){return this._messageLength}get fragment(){return this._fragment}get seqNum(){return this._seqNum}get seqLength(){return this._seqLength}get checksum(){return this._checksum}cbor(){const t=ua.cborEncode([this._seqNum,this._seqLength,this._messageLength,this._checksum,this._fragment]);return Buffer.from(t)}description(){return`seqNum:${this._seqNum}, seqLen:${this._seqLength}, messageLen:${this._messageLength}, checksum:${this._checksum}, data:${this._fragment.toString("hex")}`}static fromCBOR(t){const[r,n,o,a,u]=ua.cborDecode(t);return ht.default(typeof r=="number"),ht.default(typeof n=="number"),ht.default(typeof o=="number"),ht.default(typeof a=="number"),ht.default(Buffer.isBuffer(u)&&u.length>0),new Yn(r,n,o,a,Buffer.from(u))}}er.FountainEncoderPart=Yn;class En{constructor(t,r=100,n=0,o=10){const a=En.findNominalFragmentLength(t.length,o,r);this._messageLength=t.length,this._fragments=En.partitionMessage(t,a),this.fragmentLength=a,this.seqNum=mr.toUint32(n),this.checksum=mr.getCRC(t)}get fragmentsLength(){return this._fragments.length}get fragments(){return this._fragments}get messageLength(){return this._messageLength}isComplete(){return this.seqNum>=this._fragments.length}isSinglePart(){return this._fragments.length===1}seqLength(){return this._fragments.length}mix(t){return t.reduce((r,n)=>mr.bufferXOR(this._fragments[n],r),Buffer.alloc(this.fragmentLength,0))}nextPart(){this.seqNum=mr.toUint32(this.seqNum+1);const t=of.chooseFragments(this.seqNum,this._fragments.length,this.checksum),r=this.mix(t);return new Yn(this.seqNum,this._fragments.length,this._messageLength,this.checksum,r)}static findNominalFragmentLength(t,r,n){ht.default(t>0),ht.default(r>0),ht.default(n>=r);const o=Math.ceil(t/r);let a=0;for(let u=1;u<=o&&(a=Math.ceil(t/u),!(a<=n));u++);return a}static partitionMessage(t,r){let n=Buffer.from(t),o,a=[];for(;n.length>0;)[o,n]=mr.split(n,-r),o=Buffer.alloc(r,0).fill(o,0,o.length),a.push(o);return a}}er.default=En;var Xn={},af=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xn,"__esModule",{value:!0});const qt=af(Sr()),vn=ye,sf="ableacidalsoapexaquaarchatomauntawayaxisbackbaldbarnbeltbetabiasbluebodybragbrewbulbbuzzcalmcashcatschefcityclawcodecolacookcostcruxcurlcuspcyandarkdatadaysdelidicedietdoordowndrawdropdrumdulldutyeacheasyechoedgeepicevenexamexiteyesfactfairfernfigsfilmfishfizzflapflewfluxfoxyfreefrogfuelfundgalagamegeargemsgiftgirlglowgoodgraygrimgurugushgyrohalfhanghardhawkheathelphighhillholyhopehornhutsicedideaidleinchinkyintoirisironitemjadejazzjoinjoltjowljudojugsjumpjunkjurykeepkenokeptkeyskickkilnkingkitekiwiknoblamblavalazyleaflegsliarlimplionlistlogoloudloveluaulucklungmainmanymathmazememomenumeowmildmintmissmonknailnavyneednewsnextnoonnotenumbobeyoboeomitonyxopenovalowlspaidpartpeckplaypluspoempoolposepuffpumapurrquadquizraceramprealredorichroadrockroofrubyruinrunsrustsafesagascarsetssilkskewslotsoapsolosongstubsurfswantacotasktaxitenttiedtimetinytoiltombtoystriptunatwinuglyundouniturgeuservastveryvetovialvibeviewvisavoidvowswallwandwarmwaspwavewaxywebswhatwhenwhizwolfworkyankyawnyellyogayurtzapszerozestzinczonezoom";let sn=[];const cf=256,gt=4,uf=2;var Qe;(function(e){e.STANDARD="standard",e.URI="uri",e.MINIMAL="minimal"})(Qe||(Qe={}));const Sn=e=>sf.slice(e*gt,e*gt+gt),ff=e=>{const t=Sn(e);return`${t[0]}${t[gt-1]}`},rs=e=>{const t=vn.getCRCHex(Buffer.from(e,"hex"));return`${e}${t}`},fa=(e,t)=>{const r=rs(e);return Buffer.from(r,"hex").reduce((a,u)=>[...a,Sn(u)],[]).join(t)},lf=e=>{const t=rs(e);return Buffer.from(t,"hex").reduce((o,a)=>o+ff(a),"")},df=(e,t)=>{qt.default(e.length===t,"Invalid Bytewords: word.length does not match wordLength provided");const r=26;if(sn.length===0){const s=r*r;sn=[...new Array(s)].map(()=>-1);for(let l=0;l<cf;l++){const i=Sn(l);let c=i[0].charCodeAt(0)-97,d=(i[3].charCodeAt(0)-97)*r+c;sn[d]=l}}let n=e[0].toLowerCase().charCodeAt(0)-97,o=e[t==4?3:1].toLowerCase().charCodeAt(0)-97;qt.default(0<=n&&n<r&&0<=o&&o<r,"Invalid Bytewords: invalid word");let a=o*r+n,u=sn[a];if(qt.default(u!==-1,"Invalid Bytewords: value not in lookup table"),t==gt){const s=Sn(u);let l=e[1].toLowerCase(),i=e[2].toLowerCase();qt.default(l===s[1]&&i===s[2],"Invalid Bytewords: invalid middle letters of word")}return Buffer.from([u]).toString("hex")},Co=(e,t,r)=>{const o=(r==gt?e.split(t):vn.partition(e,2)).map(l=>df(l,r)).join("");qt.default(o.length>=5,"Invalid Bytewords: invalid decoded string length");const[a,u]=vn.split(Buffer.from(o,"hex"),4),s=vn.getCRCHex(a);return qt.default(s===u.toString("hex"),"Invalid Checksum"),a.toString("hex")},hf=(e,t=Qe.MINIMAL)=>{switch(t){case Qe.STANDARD:return Co(e," ",gt);case Qe.URI:return Co(e,"-",gt);case Qe.MINIMAL:return Co(e,"",uf);default:throw new Error(`Invalid style ${t}`)}},pf=(e,t=Qe.MINIMAL)=>{switch(t){case Qe.STANDARD:return fa(e," ");case Qe.URI:return fa(e,"-");case Qe.MINIMAL:return lf(e);default:throw new Error(`Invalid style ${t}`)}};Xn.default={decode:hf,encode:pf,STYLES:Qe};var ns=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(li,"__esModule",{value:!0});const mf=ns(er),cn=ns(Xn);class St{constructor(t,r,n,o){this.ur=t,this.fountainEncoder=new mf.default(t.cbor,r,n,o)}get fragmentsLength(){return this.fountainEncoder.fragmentsLength}get fragments(){return this.fountainEncoder.fragments}get messageLength(){return this.fountainEncoder.messageLength}get cbor(){return this.ur.cbor}encodeWhole(){return[...new Array(this.fragmentsLength)].map(()=>this.nextPart())}nextPart(){const t=this.fountainEncoder.nextPart();return this.fountainEncoder.isSinglePart()?St.encodeSinglePart(this.ur):St.encodePart(this.ur.type,t)}static encodeUri(t,r){const n=r.join("/");return[t,n].join(":")}static encodeUR(t){return St.encodeUri("ur",t)}static encodePart(t,r){const n=`${r.seqNum}-${r.seqLength}`,o=cn.default.encode(r.cbor().toString("hex"),cn.default.STYLES.MINIMAL);return St.encodeUR([t,n,o])}static encodeSinglePart(t){const r=cn.default.encode(t.cbor.toString("hex"),cn.default.STYLES.MINIMAL);return St.encodeUR([t.type,r])}}li.default=St;var mi={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.FountainDecoderPart=void 0;const jt=ye,gf=hi,vf=je;class Tr{constructor(t,r){this._indexes=t,this._fragment=r}get indexes(){return this._indexes}get fragment(){return this._fragment}static fromEncoderPart(t){const r=gf.chooseFragments(t.seqNum,t.seqLength,t.checksum),n=t.fragment;return new Tr(r,n)}isSimple(){return this.indexes.length===1}}Yr.FountainDecoderPart=Tr;class Qn{constructor(){this.result=void 0,this.expectedMessageLength=0,this.expectedChecksum=0,this.expectedFragmentLength=0,this.processedPartsCount=0,this.expectedPartIndexes=[],this.lastPartIndexes=[],this.queuedParts=[],this.receivedPartIndexes=[],this.mixedParts=[],this.simpleParts=[]}validatePart(t){if(this.expectedPartIndexes.length===0)[...new Array(t.seqLength)].forEach((r,n)=>this.expectedPartIndexes.push(n)),this.expectedMessageLength=t.messageLength,this.expectedChecksum=t.checksum,this.expectedFragmentLength=t.fragment.length;else if(this.expectedPartIndexes.length!==t.seqLength||this.expectedMessageLength!==t.messageLength||this.expectedChecksum!==t.checksum||this.expectedFragmentLength!==t.fragment.length)return!1;return!0}reducePartByPart(t,r){if(jt.arrayContains(t.indexes,r.indexes)){const n=jt.setDifference(t.indexes,r.indexes),o=jt.bufferXOR(t.fragment,r.fragment);return new Tr(n,o)}else return t}reduceMixedBy(t){const r=[];this.mixedParts.map(({value:n})=>this.reducePartByPart(n,t)).forEach(n=>{n.isSimple()?this.queuedParts.push(n):r.push({key:n.indexes,value:n})}),this.mixedParts=r}processSimplePart(t){const r=t.indexes[0];if(!this.receivedPartIndexes.includes(r))if(this.simpleParts.push({key:t.indexes,value:t}),this.receivedPartIndexes.push(r),jt.arraysEqual(this.receivedPartIndexes,this.expectedPartIndexes)){const n=this.simpleParts.map(({value:u})=>u).sort((u,s)=>u.indexes[0]-s.indexes[0]),o=Qn.joinFragments(n.map(u=>u.fragment),this.expectedMessageLength);jt.getCRC(o)===this.expectedChecksum?this.result=o:this.error=new vf.InvalidChecksumError}else this.reduceMixedBy(t)}processMixedPart(t){if(this.mixedParts.some(({key:n})=>jt.arraysEqual(n,t.indexes)))return;let r=this.simpleParts.reduce((n,{value:o})=>this.reducePartByPart(n,o),t);r=this.mixedParts.reduce((n,{value:o})=>this.reducePartByPart(n,o),r),r.isSimple()?this.queuedParts.push(r):(this.reduceMixedBy(r),this.mixedParts.push({key:r.indexes,value:r}))}processQueuedItem(){if(this.queuedParts.length===0)return;const t=this.queuedParts.shift();t.isSimple()?this.processSimplePart(t):this.processMixedPart(t)}receivePart(t){if(this.isComplete()||!this.validatePart(t))return!1;const r=Tr.fromEncoderPart(t);for(this.lastPartIndexes=r.indexes,this.queuedParts.push(r);!this.isComplete()&&this.queuedParts.length>0;)this.processQueuedItem();return this.processedPartsCount+=1,!0}isComplete(){return this.result!==void 0&&this.result.length>0}isSuccess(){return!!(this.error===void 0&&this.isComplete())}resultMessage(){return this.isSuccess()?this.result:Buffer.from([])}isFailure(){return this.error!==void 0}resultError(){return this.error?this.error.message:""}expectedPartCount(){return this.expectedPartIndexes.length}getExpectedPartIndexes(){return[...this.expectedPartIndexes]}getReceivedPartIndexes(){return[...this.receivedPartIndexes]}getLastPartIndexes(){return[...this.lastPartIndexes]}estimatedPercentComplete(){if(this.isComplete())return 1;const t=this.expectedPartCount();return t===0?0:Math.min(.99,this.processedPartsCount/(t*1.75))}getProgress(){if(this.isComplete())return 1;const t=this.expectedPartCount();return t===0?0:this.receivedPartIndexes.length/t}}Yr.default=Qn;Qn.joinFragments=(e,t)=>Buffer.concat(e).slice(0,t);var Jn=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mi,"__esModule",{value:!0});const xf=Jn(Yr),un=Jn(Xn),yf=Jn(Sr()),fn=ye,lt=je,_o=Jn(Wn),bf=er;class zt{constructor(t=new xf.default,r="bytes"){this.fountainDecoder=t,this.type=r,yf.default(fn.isURType(r),"Invalid UR type"),this.expected_type=""}static decodeBody(t,r){const n=un.default.decode(r,un.default.STYLES.MINIMAL);return new _o.default(Buffer.from(n,"hex"),t)}validatePart(t){return this.expected_type?this.expected_type===t:fn.isURType(t)?(this.expected_type=t,!0):!1}static decode(t){const[r,n]=this.parse(t);if(n.length===0)throw new lt.InvalidPathLengthError;const o=n[0];return zt.decodeBody(r,o)}static parse(t){const r=t.toLowerCase();if(r.slice(0,3)!=="ur:")throw new lt.InvalidSchemeError;const o=r.slice(3).split("/"),a=o[0];if(o.length<2)throw new lt.InvalidPathLengthError;if(!fn.isURType(a))throw new lt.InvalidTypeError;return[a,o.slice(1)]}static parseSequenceComponent(t){const r=t.split("-");if(r.length!==2)throw new lt.InvalidSequenceComponentError;const n=fn.toUint32(Number(r[0])),o=Number(r[1]);if(n<1||o<1)throw new lt.InvalidSequenceComponentError;return[n,o]}receivePart(t){if(this.result!==void 0)return!1;const[r,n]=zt.parse(t);if(!this.validatePart(r))return!1;if(n.length===1)return this.result=zt.decodeBody(r,n[0]),!0;if(n.length!==2)throw new lt.InvalidPathLengthError;const[o,a]=n,[u,s]=zt.parseSequenceComponent(o),l=un.default.decode(a,un.default.STYLES.MINIMAL),i=bf.FountainEncoderPart.fromCBOR(l);return u!==i.seqNum||s!==i.seqLength||!this.fountainDecoder.receivePart(i)?!1:(this.fountainDecoder.isSuccess()?this.result=new _o.default(this.fountainDecoder.resultMessage(),r):this.fountainDecoder.isFailure()&&(this.error=new lt.InvalidSchemeError),!0)}resultUR(){return this.result?this.result:new _o.default(Buffer.from([]))}isComplete(){return this.result&&this.result.cbor.length>0}isSuccess(){return!this.error&&this.isComplete()}isError(){return this.error!==void 0}resultError(){return this.error?this.error.message:""}expectedPartCount(){return this.fountainDecoder.expectedPartCount()}expectedPartIndexes(){return this.fountainDecoder.getExpectedPartIndexes()}receivedPartIndexes(){return this.fountainDecoder.getReceivedPartIndexes()}lastPartIndexes(){return this.fountainDecoder.getLastPartIndexes()}estimatedPercentComplete(){return this.fountainDecoder.estimatedPercentComplete()}getProgress(){return this.fountainDecoder.getProgress()}}mi.default=zt;var gi=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ut,"__esModule",{value:!0});ut.URDecoder=ut.UREncoder=ut.UR=void 0;const Cf=gi(Wn);ut.UR=Cf.default;const _f=gi(li);ut.UREncoder=_f.default;const Bf=gi(mi);ut.URDecoder=Bf.default;Object.defineProperty(Ae,"__esModule",{value:!0});Ae.RegistryItem=void 0;const la=ut,wf=Ie;class kf{constructor(){this.toCBOR=()=>{if(this.toDataItem()===void 0)throw new Error(`#[ur-registry][RegistryItem][fn.toCBOR]: registry ${this.getRegistryType()}'s method toDataItem returns undefined`);return wf.encodeDataItem(this.toDataItem())},this.toUR=()=>new la.UR(this.toCBOR(),this.getRegistryType().getType()),this.toUREncoder=(t,r,n)=>{const o=this.toUR();return new la.UREncoder(o,t,r,n)}}}Ae.RegistryItem=kf;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CryptoCoinInfo=e.Network=e.Type=void 0;const t=Ie,r=Ae,n=Be;var o;(function(l){l.type="1",l.network="2"})(o||(o={}));var a;(function(l){l[l.bitcoin=0]="bitcoin"})(a=e.Type||(e.Type={}));var u;(function(l){l[l.mainnet=0]="mainnet",l[l.testnet=1]="testnet"})(u=e.Network||(e.Network={}));class s extends r.RegistryItem{constructor(i,c){super(),this.type=i,this.network=c,this.getRegistryType=()=>n.RegistryTypes.CRYPTO_COIN_INFO,this.getType=()=>this.type||a.bitcoin,this.getNetwork=()=>this.network||u.mainnet,this.toDataItem=()=>{const f={};return this.type&&(f[o.type]=this.type),this.network&&(f[o.network]=this.network),new t.DataItem(f)}}}e.CryptoCoinInfo=s,s.fromDataItem=l=>{const i=l.getData(),c=i[o.type],f=i[o.network];return new s(c,f)},s.fromCBOR=l=>{const i=t.decodeToDataItem(l);return s.fromDataItem(i)}})(kn);var Ot={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.PathComponent=void 0;class Zn{constructor(t){if(this.getIndex=()=>this.index,this.isWildcard=()=>this.wildcard,this.isHardened=()=>this.hardened,this.index=t.index,this.hardened=t.hardened,this.index!==void 0?this.wildcard=!1:this.wildcard=!0,this.index&&this.index&Zn.HARDENED_BIT)throw new Error(`#[ur-registry][PathComponent][fn.constructor]: Invalid index ${this.index} - most significant bit cannot be set`)}}Wt.PathComponent=Zn;Zn.HARDENED_BIT=2147483648;Object.defineProperty(Ot,"__esModule",{value:!0});Ot.CryptoKeypath=void 0;const os=Ie,da=Wt,Pf=Ae,Ef=Be;var vt;(function(e){e[e.components=1]="components",e[e.source_fingerprint=2]="source_fingerprint",e[e.depth=3]="depth"})(vt||(vt={}));class Rr extends Pf.RegistryItem{constructor(t=[],r,n){super(),this.components=t,this.sourceFingerprint=r,this.depth=n,this.getRegistryType=()=>Ef.RegistryTypes.CRYPTO_KEYPATH,this.getPath=()=>this.components.length===0?void 0:this.components.map(a=>`${a.isWildcard()?"*":a.getIndex()}${a.isHardened()?"'":""}`).join("/"),this.getComponents=()=>this.components,this.getSourceFingerprint=()=>this.sourceFingerprint,this.getDepth=()=>this.depth,this.toDataItem=()=>{const o={},a=[];return this.components&&this.components.forEach(u=>{u.isWildcard()?a.push([]):a.push(u.getIndex()),a.push(u.isHardened())}),o[vt.components]=a,this.sourceFingerprint&&(o[vt.source_fingerprint]=this.sourceFingerprint.readUInt32BE(0)),this.depth!==void 0&&(o[vt.depth]=this.depth),new os.DataItem(o)}}}Ot.CryptoKeypath=Rr;Rr.fromDataItem=e=>{const t=e.getData(),r=[],n=t[vt.components];if(n)for(let s=0;s<n.length;s+=2){const l=n[s+1],i=n[s];typeof i=="number"?r.push(new da.PathComponent({index:i,hardened:l})):r.push(new da.PathComponent({hardened:l}))}const o=t[vt.source_fingerprint];let a;o&&(a=Buffer.alloc(4),a.writeUInt32BE(o,0));const u=t[vt.depth];return new Rr(r,a,u)};Rr.fromCBOR=e=>{const t=os.decodeToDataItem(e);return Rr.fromDataItem(t)};Object.defineProperty(bt,"__esModule",{value:!0});bt.CryptoHDKey=void 0;const Sf=Z2,Tf=kn,ha=Ot,is=Ie,Rf=Ae,If=Be;var Ce;(function(e){e[e.is_master=1]="is_master",e[e.is_private=2]="is_private",e[e.key_data=3]="key_data",e[e.chain_code=4]="chain_code",e[e.use_info=5]="use_info",e[e.origin=6]="origin",e[e.children=7]="children",e[e.parent_fingerprint=8]="parent_fingerprint",e[e.name=9]="name",e[e.note=10]="note"})(Ce||(Ce={}));class Ir extends Rf.RegistryItem{constructor(t){super(),this.isECKey=()=>!1,this.getKey=()=>this.key,this.getChainCode=()=>this.chainCode,this.isMaster=()=>this.master,this.isPrivateKey=()=>!!this.privateKey,this.getUseInfo=()=>this.useInfo,this.getOrigin=()=>this.origin,this.getChildren=()=>this.children,this.getParentFingerprint=()=>this.parentFingerprint,this.getName=()=>this.name,this.getNote=()=>this.note,this.getBip32Key=()=>{var r,n,o;let a,u,s=0,l=Buffer.alloc(4).fill(0);if(this.isMaster())a=Buffer.from("0488ADE4","hex"),u=0,s=0;else{u=((r=this.getOrigin())===null||r===void 0?void 0:r.getComponents().length)||((n=this.getOrigin())===null||n===void 0?void 0:n.getDepth());const m=(o=this.getOrigin())===null||o===void 0?void 0:o.getComponents(),v=m[m.length-1];v&&(s=v.isHardened()?v.getIndex()+2147483648:v.getIndex(),this.getParentFingerprint()&&(l=this.getParentFingerprint())),this.isPrivateKey()?a=Buffer.from("0488ADE4","hex"):a=Buffer.from("0488B21E","hex")}const i=Buffer.alloc(1);i.writeUInt8(u,0);const c=Buffer.alloc(4);c.writeUInt32BE(s,0);const f=this.getChainCode(),d=this.getKey();return Sf.encode(Buffer.concat([a,i,l,c,f,d]))},this.getRegistryType=()=>If.RegistryTypes.CRYPTO_HDKEY,this.getOutputDescriptorContent=()=>{var r,n,o,a,u,s,l;let i="";return this.getOrigin()&&!((r=this.getOrigin())===null||r===void 0)&&r.getSourceFingerprint()&&!((n=this.getOrigin())===null||n===void 0)&&n.getPath()&&(i+=`${(a=(o=this.getOrigin())===null||o===void 0?void 0:o.getSourceFingerprint())===null||a===void 0?void 0:a.toString("hex")}/${(u=this.getOrigin())===null||u===void 0?void 0:u.getPath()}`),i+=this.getBip32Key(),this.getChildren()&&!((s=this.getChildren())===null||s===void 0)&&s.getPath()&&(i+=`/${(l=this.getChildren())===null||l===void 0?void 0:l.getPath()}`),i},this.setupMasterKey=r=>{this.master=!0,this.key=r.key,this.chainCode=r.chainCode},this.setupDeriveKey=r=>{this.master=!1,this.privateKey=r.isPrivateKey,this.key=r.key,this.chainCode=r.chainCode,this.useInfo=r.useInfo,this.origin=r.origin,this.children=r.children,this.parentFingerprint=r.parentFingerprint,this.name=r.name,this.note=r.note},this.toDataItem=()=>{const r={};if(this.master)r[Ce.is_master]=!0,r[Ce.key_data]=this.key,r[Ce.chain_code]=this.chainCode;else{if(this.privateKey!==void 0&&(r[Ce.is_private]=this.privateKey),r[Ce.key_data]=this.key,this.chainCode&&(r[Ce.chain_code]=this.chainCode),this.useInfo){const n=this.useInfo.toDataItem();n.setTag(this.useInfo.getRegistryType().getTag()),r[Ce.use_info]=n}if(this.origin){const n=this.origin.toDataItem();n.setTag(this.origin.getRegistryType().getTag()),r[Ce.origin]=n}if(this.children){const n=this.children.toDataItem();n.setTag(this.children.getRegistryType().getTag()),r[Ce.children]=n}this.parentFingerprint&&(r[Ce.parent_fingerprint]=this.parentFingerprint.readUInt32BE(0)),this.name!==void 0&&(r[Ce.name]=this.name),this.note!==void 0&&(r[Ce.note]=this.note)}return new is.DataItem(r)},t.isMaster?this.setupMasterKey(t):this.setupDeriveKey(t)}}bt.CryptoHDKey=Ir;Ir.fromDataItem=e=>{const t=e.getData(),r=!!t[Ce.is_master],n=t[Ce.is_private],o=t[Ce.key_data],a=t[Ce.chain_code],u=t[Ce.use_info]?Tf.CryptoCoinInfo.fromDataItem(t[Ce.use_info]):void 0,s=t[Ce.origin]?ha.CryptoKeypath.fromDataItem(t[Ce.origin]):void 0,l=t[Ce.children]?ha.CryptoKeypath.fromDataItem(t[Ce.children]):void 0,i=t[Ce.parent_fingerprint];let c;i&&(c=Buffer.alloc(4),c.writeUInt32BE(i,0));const f=t[Ce.name],d=t[Ce.note];return new Ir({isMaster:r,isPrivateKey:n,key:o,chainCode:a,useInfo:u,origin:s,children:l,parentFingerprint:c,name:f,note:d})};Ir.fromCBOR=e=>{const t=is.decodeToDataItem(e);return Ir.fromDataItem(t)};var Mt={};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.CryptoECKey=void 0;const as=Ie,Af=Ae,Df=Be;var xt;(function(e){e[e.curve=1]="curve",e[e.private=2]="private",e[e.data=3]="data"})(xt||(xt={}));class Ar extends Af.RegistryItem{constructor(t){super(),this.isECKey=()=>!0,this.getCurve=()=>this.curve||0,this.isPrivateKey=()=>this.privateKey||!1,this.getData=()=>this.data,this.getRegistryType=()=>Df.RegistryTypes.CRYPTO_ECKEY,this.toDataItem=()=>{const r={};return this.curve&&(r[xt.curve]=this.curve),this.privateKey!==void 0&&(r[xt.private]=this.privateKey),r[xt.data]=this.data,new as.DataItem(r)},this.getOutputDescriptorContent=()=>this.data.toString("hex"),this.data=t.data,this.curve=t.curve,this.privateKey=t.privateKey||void 0}}Mt.CryptoECKey=Ar;Ar.fromDataItem=e=>{const t=e.getData(),r=t[xt.curve],n=t[xt.private],o=t[xt.data];if(!o)throw new Error(`#[ur-registry][CryptoECKey][fn.fromDataItem]: decoded [dataItem][#data.data] is undefined: ${e}`);return new Ar({data:o,curve:r,privateKey:n})};Ar.fromCBOR=e=>{const t=as.decodeToDataItem(e);return Ar.fromDataItem(t)};var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.Bytes=void 0;const ss=Ie,Of=Ae,Mf=Be;class Dr extends Of.RegistryItem{constructor(t){super(),this.bytes=t,this.getRegistryType=()=>Mf.RegistryTypes.BYTES,this.getData=()=>this.bytes,this.toDataItem=()=>new ss.DataItem(this.bytes)}}eo.Bytes=Dr;Dr.fromDataItem=e=>{const t=e.getData();if(!t)throw new Error(`#[ur-registry][Bytes][fn.fromDataItem]: decoded [dataItem][#data] is undefined: ${e}`);return new Dr(t)};Dr.fromCBOR=e=>{const t=ss.decodeToDataItem(e);return Dr.fromDataItem(t)};var Or={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.MultiKey=void 0;const Lf=Mt,Nf=bt,Uf=Jt,Ff=Ae,pa=Be;var Yt;(function(e){e[e.threshold=1]="threshold",e[e.keys=2]="keys"})(Yt||(Yt={}));class zo extends Ff.RegistryItem{constructor(t,r){super(),this.threshold=t,this.keys=r,this.getThreshold=()=>this.threshold,this.getKeys=()=>this.keys,this.toDataItem=()=>{const n={};n[Yt.threshold]=this.threshold;const o=this.keys.map(a=>{const u=a.toDataItem();return u.setTag(a.getRegistryType().getTag()),u});return n[Yt.keys]=o,new Uf.DataItem(n)},this.getOutputDescriptorContent=()=>[this.getThreshold(),this.keys.map(n=>n.getOutputDescriptorContent()).join(",")].join(",")}}Vt.MultiKey=zo;zo.fromDataItem=e=>{const t=e.getData(),r=t[Yt.threshold],n=t[Yt.keys],o=[];return n.forEach(a=>{a.getTag()===pa.RegistryTypes.CRYPTO_HDKEY.getTag()?o.push(Nf.CryptoHDKey.fromDataItem(a)):a.getTag()===pa.RegistryTypes.CRYPTO_ECKEY.getTag()&&o.push(Lf.CryptoECKey.fromDataItem(a))}),new zo(r,o)};Object.defineProperty(Or,"__esModule",{value:!0});Or.CryptoOutput=void 0;const Ho=Mt,Go=bt,vi=Ie,cs=Vt,jf=Ae,us=Be,Bo=Fn;class Tt extends jf.RegistryItem{constructor(t,r){super(),this.scriptExpressions=t,this.cryptoKey=r,this.getRegistryType=()=>us.RegistryTypes.CRYPTO_OUTPUT,this.getCryptoKey=()=>this.cryptoKey,this.getHDKey=()=>{if(this.cryptoKey instanceof Go.CryptoHDKey)return this.cryptoKey},this.getECKey=()=>{if(this.cryptoKey instanceof Ho.CryptoECKey)return this.cryptoKey},this.getMultiKey=()=>{if(this.cryptoKey instanceof cs.MultiKey)return this.cryptoKey},this.getScriptExpressions=()=>this.scriptExpressions,this._toOutputDescriptor=n=>n>=this.scriptExpressions.length?this.cryptoKey.getOutputDescriptorContent():`${this.scriptExpressions[n].getExpression()}(${this._toOutputDescriptor(n+1)})`,this.toString=()=>this._toOutputDescriptor(0),this.toDataItem=()=>{let n=this.cryptoKey.toDataItem();return(this.cryptoKey instanceof Ho.CryptoECKey||this.cryptoKey instanceof Go.CryptoHDKey)&&n.setTag(this.cryptoKey.getRegistryType().getTag()),[...this.scriptExpressions].reverse().forEach(a=>{const u=a.getTag();n.getTag()===void 0?n.setTag(u):n=new vi.DataItem(n,u)}),n}}}Or.CryptoOutput=Tt;Tt.fromDataItem=e=>{const t=[];let r=e;for(;;){let a=r.getTag();const u=Bo.ScriptExpression.fromTag(a);if(u)if(t.push(u),r.getData()instanceof vi.DataItem)r=r.getData(),a=r.getTag();else break;else break}const n=t.length;if(n>0&&(t[n-1].getExpression()===Bo.ScriptExpressions.MULTISIG.getExpression()||t[n-1].getExpression()===Bo.ScriptExpressions.SORTED_MULTISIG.getExpression())){const a=cs.MultiKey.fromDataItem(r);return new Tt(t,a)}if(r.getTag()===us.RegistryTypes.CRYPTO_HDKEY.getTag()){const a=Go.CryptoHDKey.fromDataItem(r);return new Tt(t,a)}else{const a=Ho.CryptoECKey.fromDataItem(r);return new Tt(t,a)}};Tt.fromCBOR=e=>{const t=vi.decodeToDataItem(e);return Tt.fromDataItem(t)};var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.CryptoPSBT=void 0;const fs=Ie,$f=Ae,qf=Be;class Lr extends $f.RegistryItem{constructor(t){super(),this.psbt=t,this.getRegistryType=()=>qf.RegistryTypes.CRYPTO_PSBT,this.getPSBT=()=>this.psbt,this.toDataItem=()=>new fs.DataItem(this.psbt)}}Mr.CryptoPSBT=Lr;Lr.fromDataItem=e=>{const t=e.getData();if(!t)throw new Error(`#[ur-registry][CryptoPSBT][fn.fromDataItem]: decoded [dataItem][#data] is undefined: ${e}`);return new Lr(t)};Lr.fromCBOR=e=>{const t=fs.decodeToDataItem(e);return Lr.fromDataItem(t)};var gr={},ma;function ga(){if(ma)return gr;ma=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.CryptoAccount=void 0;const e=to(),t=Ie,r=Ae,n=Be;var o;(function(u){u[u.masterFingerprint=1]="masterFingerprint",u[u.outputDescriptors=2]="outputDescriptors"})(o||(o={}));let a=class extends r.RegistryItem{constructor(s,l){super(),this.masterFingerprint=s,this.outputDescriptors=l,this.getRegistryType=()=>n.RegistryTypes.CRYPTO_ACCOUNT,this.getMasterFingerprint=()=>this.masterFingerprint,this.getOutputDescriptors=()=>this.outputDescriptors,this.toDataItem=()=>{const i={};return this.masterFingerprint&&(i[o.masterFingerprint]=this.masterFingerprint.readUInt32BE(0)),this.outputDescriptors&&(i[o.outputDescriptors]=this.outputDescriptors.map(c=>c.toDataItem())),new t.DataItem(i)}}};return gr.CryptoAccount=a,a.fromDataItem=u=>{const s=u.getData(),l=Buffer.alloc(4),i=s[o.masterFingerprint];i&&l.writeUInt32BE(i,0);const f=s[o.outputDescriptors].map(d=>e.CryptoOutput.fromDataItem(d));return new a(l,f)},a.fromCBOR=u=>{const s=t.decodeToDataItem(u);return a.fromDataItem(s)},gr}var vr={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.UnknownURTypeError=void 0;class zf extends Error{constructor(t){super(t)}}Xr.UnknownURTypeError=zf;var va;function xa(){if(va)return vr;va=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.URRegistryDecoder=void 0;const e=ut,t=to(),r=Be,n=Xr;class o extends e.URDecoder{constructor(){super(...arguments),this.resultRegistryType=()=>{const u=this.resultUR();switch(u.type){case r.RegistryTypes.BYTES.getType():return t.Bytes.fromCBOR(u.cbor);case r.RegistryTypes.CRYPTO_HDKEY.getType():return t.CryptoHDKey.fromCBOR(u.cbor);case r.RegistryTypes.CRYPTO_KEYPATH.getType():return t.CryptoKeypath.fromCBOR(u.cbor);case r.RegistryTypes.CRYPTO_COIN_INFO.getType():return t.CryptoCoinInfo.fromCBOR(u.cbor);case r.RegistryTypes.CRYPTO_ECKEY.getType():return t.CryptoECKey.fromCBOR(u.cbor);case r.RegistryTypes.CRYPTO_OUTPUT.getType():return t.CryptoOutput.fromCBOR(u.cbor);case r.RegistryTypes.CRYPTO_PSBT.getType():return t.CryptoPSBT.fromCBOR(u.cbor);case r.RegistryTypes.CRYPTO_ACCOUNT.getType():return t.CryptoAccount.fromCBOR(u.cbor);default:throw new n.UnknownURTypeError(`#[ur-registry][Decoder][fn.resultRegistryType]: registry type ${u.type} is not supported now`)}}}}return vr.URRegistryDecoder=o,vr}var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.CryptoMultiAccounts=void 0;const Hf=Be,Gf=bt,Kf=Ae,ls=Ie;var yt;(function(e){e[e.masterFingerprint=1]="masterFingerprint",e[e.keys=2]="keys",e[e.device=3]="device"})(yt||(yt={}));class Ur extends Kf.RegistryItem{constructor(t,r,n){super(),this.masterFingerprint=t,this.keys=r,this.device=n,this.getRegistryType=()=>Hf.RegistryTypes.CRYPTO_MULTI_ACCOUNTS,this.getMasterFingerprint=()=>this.masterFingerprint,this.getKeys=()=>this.keys,this.getDevice=()=>this.device,this.toDataItem=()=>{const o={};return this.masterFingerprint&&(o[yt.masterFingerprint]=this.masterFingerprint.readUInt32BE(0)),this.keys&&(o[yt.keys]=this.keys.map(a=>{const u=a.toDataItem();return u.setTag(a.getRegistryType().getTag()),u})),this.device&&(o[yt.device]=this.device),new ls.DataItem(o)}}}Nr.CryptoMultiAccounts=Ur;Ur.fromDataItem=e=>{const t=e.getData(),r=Buffer.alloc(4),n=t[yt.masterFingerprint];n&&r.writeUInt32BE(n,0);const a=t[yt.keys].map(s=>Gf.CryptoHDKey.fromDataItem(s)),u=t[yt.device];return new Ur(r,a,u)};Ur.fromCBOR=e=>{const t=ls.decodeToDataItem(e);return Ur.fromDataItem(t)};var wo={},ko={},ya;function ds(){return ya||(ya=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyDerivation=e.DerivationAlgorithm=e.Curve=void 0;const t=Be,r=Ae,n=Ie,o=Ot;var a;(function(i){i[i.keyPaths=1]="keyPaths",i[i.curve=2]="curve",i[i.algo=3]="algo",i[i.origin=4]="origin"})(a||(a={}));var u;(function(i){i.secp256k1="secp256k1",i.ed25519="ed25519"})(u=e.Curve||(e.Curve={}));var s;(function(i){i.slip10="slip10",i.bip32ed25519="bip32ed25519"})(s=e.DerivationAlgorithm||(e.DerivationAlgorithm={}));class l extends r.RegistryItem{constructor(c,f=u.secp256k1,d=s.slip10,m){super(),this.keypaths=c,this.curve=f,this.algo=d,this.origin=m,this.getRegistryType=()=>t.RegistryTypes.KEY_DERIVATION_CALL,this.getKeypaths=()=>this.keypaths,this.getCurve=()=>this.curve,this.getAlgo=()=>this.algo,this.getOrigin=()=>this.origin,this.toDataItem=()=>{const v={};return v[a.keyPaths]=this.keypaths.map(_=>{const w=_.toDataItem();return w.setTag(_.getRegistryType().getTag()),w}),v[a.curve]=this.curve,v[a.algo]=this.algo,this.origin&&(v[a.origin]=this.origin),new n.DataItem(v)}}}e.KeyDerivation=l,l.fromDataItem=i=>{const c=i.getData(),f=c[a.keyPaths].map(_=>o.CryptoKeypath.fromDataItem(_)),d=c[a.curve],m=c[a.algo],v=c[a.origin];return new l(f,d,m,v)},l.fromCBOR=i=>{const c=n.decodeToDataItem(i);return l.fromDataItem(c)}}(ko)),ko}var ba;function Wf(){return ba||(ba=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QRHardwareCall=e.QRHardwareCallName=void 0;const t=Be,r=Ae,n=Ie,o=ds();var a;(function(l){l[l.name=1]="name",l[l.params=2]="params"})(a||(a={}));var u;(function(l){l.KeyDerivation="key-derivation"})(u=e.QRHardwareCallName||(e.QRHardwareCallName={}));class s extends r.RegistryItem{constructor(i,c){super(),this.name=i,this.params=c,this.getRegistryType=()=>t.RegistryTypes.QR_HARDWARE_CALL,this.getName=()=>this.name,this.getParams=()=>this.params,this.toDataItem=()=>{const f={};f[a.name]=this.name;const d=this.params.toDataItem();return d.setTag(this.params.getRegistryType().getTag()),f[a.params]=d,new n.DataItem(f)}}}e.QRHardwareCall=s,s.fromDataItem=l=>{const i=l.getData(),c=i[a.name]||u.KeyDerivation;let f;switch(c){case u.KeyDerivation:f=o.KeyDerivation.fromDataItem(i[a.params])}return new s(c,f)},s.fromCBOR=l=>{const i=n.decodeToDataItem(l);return s.fromDataItem(i)}}(wo)),wo}var Po={},Ca;function Vf(){return Ca||(Ca=1,Object.defineProperty(Po,"__esModule",{value:!0})),Po}var _a;function to(){return _a||(_a=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Buffer=e.extend=e.PathComponent=e.ScriptExpressions=e.MultiKey=e.CryptoPSBT=e.CryptoOutput=e.CryptoECKey=e.CryptoCoinInfoNetwork=e.CryptoCoinInfoType=e.CryptoCoinInfo=e.CryptoKeypath=e.CryptoMultiAccounts=e.CryptoHDKey=e.CryptoAccount=e.Bytes=e.URRegistryDecoder=e.DataItem=void 0;const t=Cc,r=a3;Object.defineProperty(e,"Buffer",{enumerable:!0,get:function(){return r.Buffer}});const n=bt;Object.defineProperty(e,"CryptoHDKey",{enumerable:!0,get:function(){return n.CryptoHDKey}});const o=Ot;Object.defineProperty(e,"CryptoKeypath",{enumerable:!0,get:function(){return o.CryptoKeypath}});const a=kn;Object.defineProperty(e,"CryptoCoinInfo",{enumerable:!0,get:function(){return a.CryptoCoinInfo}}),Object.defineProperty(e,"CryptoCoinInfoType",{enumerable:!0,get:function(){return a.Type}}),Object.defineProperty(e,"CryptoCoinInfoNetwork",{enumerable:!0,get:function(){return a.Network}});const u=Mt;Object.defineProperty(e,"CryptoECKey",{enumerable:!0,get:function(){return u.CryptoECKey}});const s=eo;Object.defineProperty(e,"Bytes",{enumerable:!0,get:function(){return s.Bytes}});const l=Or;Object.defineProperty(e,"CryptoOutput",{enumerable:!0,get:function(){return l.CryptoOutput}});const i=Mr;Object.defineProperty(e,"CryptoPSBT",{enumerable:!0,get:function(){return i.CryptoPSBT}});const c=ga();Object.defineProperty(e,"CryptoAccount",{enumerable:!0,get:function(){return c.CryptoAccount}});const f=xa();Object.defineProperty(e,"URRegistryDecoder",{enumerable:!0,get:function(){return f.URRegistryDecoder}});const d=Vt;Object.defineProperty(e,"MultiKey",{enumerable:!0,get:function(){return d.MultiKey}});const m=Fn;Object.defineProperty(e,"ScriptExpressions",{enumerable:!0,get:function(){return m.ScriptExpressions}});const v=Wt;Object.defineProperty(e,"PathComponent",{enumerable:!0,get:function(){return v.PathComponent}});const _=Ae,w=Be,B=Ie;var C=Ie;Object.defineProperty(e,"DataItem",{enumerable:!0,get:function(){return C.DataItem}});const x=Kt,P=Nr;Object.defineProperty(e,"CryptoMultiAccounts",{enumerable:!0,get:function(){return P.CryptoMultiAccounts}});const R={URRegistryDecoder:f.URRegistryDecoder,Bytes:s.Bytes,CryptoAccount:c.CryptoAccount,CryptoHDKey:n.CryptoHDKey,CryptoMultiAccounts:P.CryptoMultiAccounts,CryptoKeypath:o.CryptoKeypath,CryptoCoinInfo:a.CryptoCoinInfo,CryptoCoinInfoType:a.Type,CryptoCoinInfoNetwork:a.Network,CryptoECKey:u.CryptoECKey,CryptoOutput:l.CryptoOutput,CryptoPSBT:i.CryptoPSBT,MultiKey:d.MultiKey,ScriptExpressions:m.ScriptExpressions,PathComponent:v.PathComponent},y={addReader:B.addReader,addSemanticDecode:B.addSemanticDecode,addSemanticEncode:B.addSemanticEncode,addWriter:B.addWriter,patchTags:x.patchTags},h={RegistryTypes:w.RegistryTypes,RegistryItem:_.RegistryItem,RegistryType:w.RegistryType,decodeToDataItem:B.decodeToDataItem,encodeDataItem:B.encodeDataItem,cbor:y};e.extend=h,t.__exportStar(Xr,e),t.__exportStar(xa(),e),t.__exportStar(Ie,e),t.__exportStar(ga(),e),t.__exportStar(Mr,e),t.__exportStar(bt,e),t.__exportStar(Nr,e),t.__exportStar(Wf(),e),t.__exportStar(ds(),e),t.__exportStar(Or,e),t.__exportStar(kn,e),t.__exportStar(Mt,e),t.__exportStar(Vt,e),t.__exportStar(Ot,e),t.__exportStar(h3,e),t.__exportStar(Wt,e),t.__exportStar(Ae,e),t.__exportStar(Be,e),t.__exportStar(Vf(),e),t.__exportStar(Kt,e),e.default=R}(oo)),oo}(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=to(),r=s3;const n={SOL_SIGN_REQUEST:new t.RegistryType("sol-sign-request",1101),SOL_SIGNATURE:new t.RegistryType("sol-signature",1102),SOL_NFT_ITEM:new t.RegistryType("sol-nft-item",1104)},{decodeToDataItem:o,RegistryTypes:a}=t.extend;var u,s;(u=e.SignType||(e.SignType={}))[u.Transaction=1]="Transaction",u[u.Message=2]="Message",function(w){w[w.requestId=1]="requestId",w[w.signData=2]="signData",w[w.derivationPath=3]="derivationPath",w[w.address=4]="address",w[w.origin=5]="origin",w[w.signType=6]="signType"}(s||(s={}));class l extends t.RegistryItem{constructor(B){super(),this.getRegistryType=()=>n.SOL_SIGN_REQUEST,this.getRequestId=()=>this.requestId,this.getSignData=()=>this.signData,this.getDerivationPath=()=>this.derivationPath.getPath(),this.getSignRequestAddress=()=>this.address,this.getOrigin=()=>this.origin,this.getSignType=()=>this.signType,this.toDataItem=()=>{const C={};this.requestId&&(C[s.requestId]=new t.DataItem(this.requestId,a.UUID.getTag())),this.address&&(C[s.address]=this.address),this.origin&&(C[s.origin]=this.origin),C[s.signData]=this.signData,C[s.signType]=this.signType;const x=this.derivationPath.toDataItem();return x.setTag(this.derivationPath.getRegistryType().getTag()),C[s.derivationPath]=x,new t.DataItem(C)},this.requestId=B.requestId,this.signData=B.signData,this.derivationPath=B.derivationPath,this.address=B.address,this.origin=B.origin,this.signType=B.signType}static constructSOLRequest(B,C,x,P,R,y,h){const b=C.replace(/[m|M]\//,"").split("/"),S=new t.CryptoKeypath(b.map(I=>{const $=parseInt(I.replace("'",""));let J=!1;return I.endsWith("'")&&(J=!0),new t.PathComponent({index:$,hardened:J})}),Buffer.from(x,"hex"));return new l({requestId:R?Buffer.from(r.parse(R)):void 0,signData:B,derivationPath:S,address:y?Buffer.from(y.replace("0x",""),"hex"):void 0,origin:h||void 0,signType:P})}}l.fromDataItem=w=>{const B=w.getData(),C=B[s.signData],x=t.CryptoKeypath.fromDataItem(B[s.derivationPath]),P=B[s.address]?B[s.address]:void 0,R=B[s.requestId]?B[s.requestId].getData():void 0;return new l({requestId:R,signData:C,derivationPath:x,address:P,origin:B[s.origin]?B[s.origin]:void 0,signType:B[s.signType]})},l.fromCBOR=w=>{const B=o(w);return l.fromDataItem(B)};const{RegistryTypes:i,decodeToDataItem:c}=t.extend;var f;(function(w){w[w.requestId=1]="requestId",w[w.signature=2]="signature"})(f||(f={}));class d extends t.RegistryItem{constructor(B,C){super(),this.getRegistryType=()=>n.SOL_SIGNATURE,this.getRequestId=()=>this.requestId,this.getSignature=()=>this.signature,this.toDataItem=()=>{const x={};return this.requestId&&(x[f.requestId]=new t.DataItem(this.requestId,i.UUID.getTag())),x[f.signature]=this.signature,new t.DataItem(x)},this.signature=B,this.requestId=C}}d.fromDataItem=w=>{const B=w.getData(),C=B[f.signature],x=B[f.requestId]?B[f.requestId].getData():void 0;return new d(C,x)},d.fromCBOR=w=>{const B=c(w);return d.fromDataItem(B)};const{decodeToDataItem:m}=t.extend;var v;(function(w){w[w.mintAddress=1]="mintAddress",w[w.collectionName=2]="collectionName",w[w.name=3]="name",w[w.mediaData=4]="mediaData"})(v||(v={}));class _ extends t.RegistryItem{constructor(B){super(),this.getRegistryType=()=>n.SOL_NFT_ITEM,this.getName=()=>this.name,this.getMediaData=()=>this.mediaData,this.getMintAddress=()=>this.mintAddress,this.getCollectionName=()=>this.collectionName,this.toDataItem=()=>{const C={};return C[v.name]=this.name,C[v.mintAddress]=this.mintAddress,C[v.collectionName]=this.collectionName,C[v.mediaData]=this.mediaData,new t.DataItem(C)},this.name=B.name,this.mintAddress=B.mintAddress,this.collectionName=B.collectionName,this.mediaData=B.mediaData}static constructETHNFTItem(B,C,x,P){return new _({mintAddress:B,collectionName:C,mediaData:P,name:x})}}_.fromDataItem=w=>{const B=w.getData();return new _({name:B[v.name],mintAddress:B[v.mintAddress],collectionName:B[v.collectionName],mediaData:B[v.mediaData]})},_.fromCBOR=w=>{const B=m(w);return _.fromDataItem(B)},t.patchTags(Object.values(n).filter(w=>!!w.getTag()).map(w=>w.getTag())),Object.keys(t).forEach(function(w){w!=="default"&&Object.defineProperty(e,w,{enumerable:!0,get:function(){return t[w]}})}),e.SOLNFTItem=_,e.SolSignRequest=l,e.SolSignature=d})(d3);l3.exports=d3;var Yf=l3.exports,hs={exports:{}},ps={},Ko={exports:{}},Lt={},ms={exports:{}},Xf="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Qf=Xf,Jf=Qf;function gs(){}function vs(){}vs.resetWarningCache=gs;var Zf=function(){function e(n,o,a,u,s,l){if(l!==Jf){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:vs,resetWarningCache:gs};return r.PropTypes=r,r};ms.exports=Zf();var xi=ms.exports,Wo={exports:{}},nt={},Vo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;/*!
|
|
68
|
-
* Adapted from jQuery UI core
|
|
69
|
-
*
|
|
70
|
-
* http://jqueryui.com
|
|
71
|
-
*
|
|
72
|
-
* Copyright 2014 jQuery Foundation and other contributors
|
|
73
|
-
* Released under the MIT license.
|
|
74
|
-
* http://jquery.org/license
|
|
75
|
-
*
|
|
76
|
-
* http://api.jqueryui.com/category/ui-core/
|
|
77
|
-
*/var r="none",n="contents",o=/^(input|select|textarea|button|object|iframe)$/;function a(f,d){return d.getPropertyValue("overflow")!=="visible"||f.scrollWidth<=0&&f.scrollHeight<=0}function u(f){var d=f.offsetWidth<=0&&f.offsetHeight<=0;if(d&&!f.innerHTML)return!0;try{var m=window.getComputedStyle(f),v=m.getPropertyValue("display");return d?v!==n&&a(f,m):v===r}catch{return console.warn("Failed to inspect element style"),!1}}function s(f){for(var d=f,m=f.getRootNode&&f.getRootNode();d&&d!==document.body;){if(m&&d===m&&(d=m.host.parentNode),u(d))return!1;d=d.parentNode}return!0}function l(f,d){var m=f.nodeName.toLowerCase(),v=o.test(m)&&!f.disabled||m==="a"&&f.href||d;return v&&s(f)}function i(f){var d=f.getAttribute("tabindex");d===null&&(d=void 0);var m=isNaN(d);return(m||d>=0)&&l(f,!m)}function c(f){var d=[].slice.call(f.querySelectorAll("*"),0).reduce(function(m,v){return m.concat(v.shadowRoot?c(v.shadowRoot):[v])},[]);return d.filter(i)}e.exports=t.default})(Vo,Vo.exports);var xs=Vo.exports;Object.defineProperty(nt,"__esModule",{value:!0});nt.resetState=n5;nt.log=o5;nt.handleBlur=Fr;nt.handleFocus=jr;nt.markForFocusLater=i5;nt.returnFocus=a5;nt.popWithoutFocus=s5;nt.setupScopedFocus=c5;nt.teardownScopedFocus=u5;var e5=xs,t5=r5(e5);function r5(e){return e&&e.__esModule?e:{default:e}}var Xt=[],Ht=null,Yo=!1;function n5(){Xt=[]}function o5(){}function Fr(){Yo=!0}function jr(){if(Yo){if(Yo=!1,!Ht)return;setTimeout(function(){if(!Ht.contains(document.activeElement)){var e=(0,t5.default)(Ht)[0]||Ht;e.focus()}},0)}}function i5(){Xt.push(document.activeElement)}function a5(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{Xt.length!==0&&(t=Xt.pop(),t.focus({preventScroll:e}));return}catch{console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function s5(){Xt.length>0&&Xt.pop()}function c5(e){Ht=e,window.addEventListener?(window.addEventListener("blur",Fr,!1),document.addEventListener("focus",jr,!0)):(window.attachEvent("onBlur",Fr),document.attachEvent("onFocus",jr))}function u5(){Ht=null,window.addEventListener?(window.removeEventListener("blur",Fr),document.removeEventListener("focus",jr)):(window.detachEvent("onBlur",Fr),document.detachEvent("onFocus",jr))}var Xo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=xs,n=o(r);function o(s){return s&&s.__esModule?s:{default:s}}function a(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return s.activeElement.shadowRoot?a(s.activeElement.shadowRoot):s.activeElement}function u(s,l){var i=(0,n.default)(s);if(!i.length){l.preventDefault();return}var c=void 0,f=l.shiftKey,d=i[0],m=i[i.length-1],v=a();if(s===v){if(!f)return;c=m}if(m===v&&!f&&(c=d),d===v&&f&&(c=m),c){l.preventDefault(),c.focus();return}var _=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),w=_!=null&&_[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(w){var B=i.indexOf(v);if(B>-1&&(B+=f?-1:1),c=i[B],typeof c>"u"){l.preventDefault(),c=f?m:d,c.focus();return}l.preventDefault(),c.focus()}}e.exports=t.default})(Xo,Xo.exports);var f5=Xo.exports,ot={},l5=function(){},d5=l5,Je={},ys={exports:{}};/*!
|
|
78
|
-
Copyright (c) 2015 Jed Watson.
|
|
79
|
-
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
80
|
-
All rights reserved.
|
|
81
|
-
*/(function(e){(function(){var t=!!(typeof window<"u"&&window.document&&window.document.createElement),r={canUseDOM:t,canUseWorkers:typeof Worker<"u",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=r:window.ExecutionEnvironment=r})()})(ys);var h5=ys.exports;Object.defineProperty(Je,"__esModule",{value:!0});Je.canUseDOM=Je.SafeNodeList=Je.SafeHTMLCollection=void 0;var p5=h5,m5=g5(p5);function g5(e){return e&&e.__esModule?e:{default:e}}var ro=m5.default,v5=ro.canUseDOM?window.HTMLElement:{};Je.SafeHTMLCollection=ro.canUseDOM?window.HTMLCollection:{};Je.SafeNodeList=ro.canUseDOM?window.NodeList:{};Je.canUseDOM=ro.canUseDOM;Je.default=v5;Object.defineProperty(ot,"__esModule",{value:!0});ot.resetState=_5;ot.log=B5;ot.assertNodeList=bs;ot.setElement=w5;ot.validateElement=yi;ot.hide=k5;ot.show=P5;ot.documentNotReadyOrSSRTesting=E5;var x5=d5,y5=C5(x5),b5=Je;function C5(e){return e&&e.__esModule?e:{default:e}}var He=null;function _5(){He&&(He.removeAttribute?He.removeAttribute("aria-hidden"):He.length!=null?He.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(He).forEach(function(e){return e.removeAttribute("aria-hidden")})),He=null}function B5(){}function bs(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function w5(e){var t=e;if(typeof t=="string"&&b5.canUseDOM){var r=document.querySelectorAll(t);bs(r,t),t=r}return He=t||He,He}function yi(e){var t=e||He;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,y5.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function k5(e){var t=!0,r=!1,n=void 0;try{for(var o=yi(e)[Symbol.iterator](),a;!(t=(a=o.next()).done);t=!0){var u=a.value;u.setAttribute("aria-hidden","true")}}catch(s){r=!0,n=s}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}}function P5(e){var t=!0,r=!1,n=void 0;try{for(var o=yi(e)[Symbol.iterator](),a;!(t=(a=o.next()).done);t=!0){var u=a.value;u.removeAttribute("aria-hidden")}}catch(s){r=!0,n=s}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}}function E5(){He=null}var tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.resetState=S5;tr.log=T5;var Br={},wr={};function Ba(e,t){e.classList.remove(t)}function S5(){var e=document.getElementsByTagName("html")[0];for(var t in Br)Ba(e,Br[t]);var r=document.body;for(var n in wr)Ba(r,wr[n]);Br={},wr={}}function T5(){}var R5=function(t,r){return t[r]||(t[r]=0),t[r]+=1,r},I5=function(t,r){return t[r]&&(t[r]-=1),r},A5=function(t,r,n){n.forEach(function(o){R5(r,o),t.add(o)})},D5=function(t,r,n){n.forEach(function(o){I5(r,o),r[o]===0&&t.remove(o)})};tr.add=function(t,r){return A5(t.classList,t.nodeName.toLowerCase()=="html"?Br:wr,r.split(" "))};tr.remove=function(t,r){return D5(t.classList,t.nodeName.toLowerCase()=="html"?Br:wr,r.split(" "))};var rr={};Object.defineProperty(rr,"__esModule",{value:!0});rr.log=M5;rr.resetState=L5;function O5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Cs=function e(){var t=this;O5(this,e),this.register=function(r){t.openInstances.indexOf(r)===-1&&(t.openInstances.push(r),t.emit("register"))},this.deregister=function(r){var n=t.openInstances.indexOf(r);n!==-1&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(r){t.subscribers.push(r)},this.emit=function(r){t.subscribers.forEach(function(n){return n(r,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},Tn=new Cs;function M5(){console.log("portalOpenInstances ----------"),console.log(Tn.openInstances.length),Tn.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function L5(){Tn=new Cs}rr.default=Tn;var bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.resetState=j5;bi.log=$5;var N5=rr,U5=F5(N5);function F5(e){return e&&e.__esModule?e:{default:e}}var Ue=void 0,Ve=void 0,It=[];function j5(){for(var e=[Ue,Ve],t=0;t<e.length;t++){var r=e[t];r&&r.parentNode&&r.parentNode.removeChild(r)}Ue=Ve=null,It=[]}function $5(){console.log("bodyTrap ----------"),console.log(It.length);for(var e=[Ue,Ve],t=0;t<e.length;t++){var r=e[t],n=r||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")}function wa(){It.length!==0&&It[It.length-1].focusContent()}function q5(e,t){!Ue&&!Ve&&(Ue=document.createElement("div"),Ue.setAttribute("data-react-modal-body-trap",""),Ue.style.position="absolute",Ue.style.opacity="0",Ue.setAttribute("tabindex","0"),Ue.addEventListener("focus",wa),Ve=Ue.cloneNode(),Ve.addEventListener("focus",wa)),It=t,It.length>0?(document.body.firstChild!==Ue&&document.body.insertBefore(Ue,document.body.firstChild),document.body.lastChild!==Ve&&document.body.appendChild(Ve)):(Ue.parentElement&&Ue.parentElement.removeChild(Ue),Ve.parentElement&&Ve.parentElement.removeChild(Ve))}U5.default.subscribe(q5);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var re=arguments[G];for(var N in re)Object.prototype.hasOwnProperty.call(re,N)&&(z[N]=re[N])}return z},n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},o=function(){function z(G,re){for(var N=0;N<re.length;N++){var Z=re[N];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(G,Z.key,Z)}}return function(G,re,N){return re&&z(G.prototype,re),N&&z(G,N),G}}(),a=Hr,u=xi,s=R(u),l=nt,i=P(l),c=f5,f=R(c),d=ot,m=P(d),v=tr,_=P(v),w=Je,B=R(w),C=rr,x=R(C);function P(z){if(z&&z.__esModule)return z;var G={};if(z!=null)for(var re in z)Object.prototype.hasOwnProperty.call(z,re)&&(G[re]=z[re]);return G.default=z,G}function R(z){return z&&z.__esModule?z:{default:z}}function y(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function h(z,G){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G&&(typeof G=="object"||typeof G=="function")?G:z}function b(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(z,G):z.__proto__=G)}var S={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},I=function(G){return G.code==="Tab"||G.keyCode===9},$=function(G){return G.code==="Escape"||G.keyCode===27},J=0,oe=function(z){b(G,z);function G(re){y(this,G);var N=h(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,re));return N.setOverlayRef=function(Z){N.overlay=Z,N.props.overlayRef&&N.props.overlayRef(Z)},N.setContentRef=function(Z){N.content=Z,N.props.contentRef&&N.props.contentRef(Z)},N.afterClose=function(){var Z=N.props,U=Z.appElement,F=Z.ariaHideApp,q=Z.htmlOpenClassName,W=Z.bodyOpenClassName,te=Z.parentSelector,L=te&&te().ownerDocument||document;W&&_.remove(L.body,W),q&&_.remove(L.getElementsByTagName("html")[0],q),F&&J>0&&(J-=1,J===0&&m.show(U)),N.props.shouldFocusAfterRender&&(N.props.shouldReturnFocusAfterClose?(i.returnFocus(N.props.preventScroll),i.teardownScopedFocus()):i.popWithoutFocus()),N.props.onAfterClose&&N.props.onAfterClose(),x.default.deregister(N)},N.open=function(){N.beforeOpen(),N.state.afterOpen&&N.state.beforeClose?(clearTimeout(N.closeTimer),N.setState({beforeClose:!1})):(N.props.shouldFocusAfterRender&&(i.setupScopedFocus(N.node),i.markForFocusLater()),N.setState({isOpen:!0},function(){N.openAnimationFrame=requestAnimationFrame(function(){N.setState({afterOpen:!0}),N.props.isOpen&&N.props.onAfterOpen&&N.props.onAfterOpen({overlayEl:N.overlay,contentEl:N.content})})}))},N.close=function(){N.props.closeTimeoutMS>0?N.closeWithTimeout():N.closeWithoutTimeout()},N.focusContent=function(){return N.content&&!N.contentHasFocus()&&N.content.focus({preventScroll:!0})},N.closeWithTimeout=function(){var Z=Date.now()+N.props.closeTimeoutMS;N.setState({beforeClose:!0,closesAt:Z},function(){N.closeTimer=setTimeout(N.closeWithoutTimeout,N.state.closesAt-Date.now())})},N.closeWithoutTimeout=function(){N.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},N.afterClose)},N.handleKeyDown=function(Z){I(Z)&&(0,f.default)(N.content,Z),N.props.shouldCloseOnEsc&&$(Z)&&(Z.stopPropagation(),N.requestClose(Z))},N.handleOverlayOnClick=function(Z){N.shouldClose===null&&(N.shouldClose=!0),N.shouldClose&&N.props.shouldCloseOnOverlayClick&&(N.ownerHandlesClose()?N.requestClose(Z):N.focusContent()),N.shouldClose=null},N.handleContentOnMouseUp=function(){N.shouldClose=!1},N.handleOverlayOnMouseDown=function(Z){!N.props.shouldCloseOnOverlayClick&&Z.target==N.overlay&&Z.preventDefault()},N.handleContentOnClick=function(){N.shouldClose=!1},N.handleContentOnMouseDown=function(){N.shouldClose=!1},N.requestClose=function(Z){return N.ownerHandlesClose()&&N.props.onRequestClose(Z)},N.ownerHandlesClose=function(){return N.props.onRequestClose},N.shouldBeClosed=function(){return!N.state.isOpen&&!N.state.beforeClose},N.contentHasFocus=function(){return document.activeElement===N.content||N.content.contains(document.activeElement)},N.buildClassName=function(Z,U){var F=(typeof U>"u"?"undefined":n(U))==="object"?U:{base:S[Z],afterOpen:S[Z]+"--after-open",beforeClose:S[Z]+"--before-close"},q=F.base;return N.state.afterOpen&&(q=q+" "+F.afterOpen),N.state.beforeClose&&(q=q+" "+F.beforeClose),typeof U=="string"&&U?q+" "+U:q},N.attributesFromObject=function(Z,U){return Object.keys(U).reduce(function(F,q){return F[Z+"-"+q]=U[q],F},{})},N.state={afterOpen:!1,beforeClose:!1},N.shouldClose=null,N.moveFromContentToOverlay=null,N}return o(G,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(N,Z){this.props.isOpen&&!N.isOpen?this.open():!this.props.isOpen&&N.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!Z.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var N=this.props,Z=N.appElement,U=N.ariaHideApp,F=N.htmlOpenClassName,q=N.bodyOpenClassName,W=N.parentSelector,te=W&&W().ownerDocument||document;q&&_.add(te.body,q),F&&_.add(te.getElementsByTagName("html")[0],F),U&&(J+=1,m.hide(Z)),x.default.register(this)}},{key:"render",value:function(){var N=this.props,Z=N.id,U=N.className,F=N.overlayClassName,q=N.defaultStyles,W=N.children,te=U?{}:q.content,L=F?{}:q.overlay;if(this.shouldBeClosed())return null;var M={ref:this.setOverlayRef,className:this.buildClassName("overlay",F),style:r({},L,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},O=r({id:Z,ref:this.setContentRef,style:r({},te,this.props.style.content),className:this.buildClassName("content",U),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),X=this.props.contentElement(O,W);return this.props.overlayElement(M,X)}}]),G}(a.Component);oe.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},oe.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(B.default),s.default.instanceOf(w.SafeHTMLCollection),s.default.instanceOf(w.SafeNodeList),s.default.arrayOf(s.default.instanceOf(B.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=oe,e.exports=t.default})(Wo,Wo.exports);var z5=Wo.exports;function _s(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Bs(e){function t(r){var n=this.constructor.getDerivedStateFromProps(e,r);return n??null}this.setState(t.bind(this))}function ws(e,t){try{var r=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}_s.__suppressDeprecationWarning=!0;Bs.__suppressDeprecationWarning=!0;ws.__suppressDeprecationWarning=!0;function H5(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var r=null,n=null,o=null;if(typeof t.componentWillMount=="function"?r="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),r!==null||n!==null||o!==null){var a=e.displayName||e.name,u=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
82
|
-
|
|
83
|
-
`+a+" uses "+u+" but also contains the following legacy lifecycles:"+(r!==null?`
|
|
84
|
-
`+r:"")+(n!==null?`
|
|
85
|
-
`+n:"")+(o!==null?`
|
|
86
|
-
`+o:"")+`
|
|
87
|
-
|
|
88
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
89
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=_s,t.componentWillReceiveProps=Bs),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=ws;var s=t.componentDidUpdate;t.componentDidUpdate=function(i,c,f){var d=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;s.call(this,i,c,d)}}return e}const G5=Object.freeze(Object.defineProperty({__proto__:null,polyfill:H5},Symbol.toStringTag,{value:"Module"})),K5=Nt(G5);Object.defineProperty(Lt,"__esModule",{value:!0});Lt.bodyOpenClassName=Lt.portalClassName=void 0;var ka=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W5=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),ks=Hr,Rn=Qr(ks),V5=c3,In=Qr(V5),Y5=xi,le=Qr(Y5),X5=z5,Pa=Qr(X5),Q5=ot,J5=e1(Q5),mt=Je,Ea=Qr(mt),Z5=K5;function e1(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Qr(e){return e&&e.__esModule?e:{default:e}}function t1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sa(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function r1(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var n1=Lt.portalClassName="ReactModalPortal",o1=Lt.bodyOpenClassName="ReactModal__Body--open",Et=mt.canUseDOM&&In.default.createPortal!==void 0,Ta=function(t){return document.createElement(t)},Ra=function(){return Et?In.default.createPortal:In.default.unstable_renderSubtreeIntoContainer};function ln(e){return e()}var Jr=function(e){r1(t,e);function t(){var r,n,o,a;t1(this,t);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return a=(n=(o=Sa(this,(r=t.__proto__||Object.getPrototypeOf(t)).call.apply(r,[this].concat(s))),o),o.removePortal=function(){!Et&&In.default.unmountComponentAtNode(o.node);var i=ln(o.props.parentSelector);i&&i.contains(o.node)?i.removeChild(o.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},o.portalRef=function(i){o.portal=i},o.renderPortal=function(i){var c=Ra(),f=c(o,Rn.default.createElement(Pa.default,ka({defaultStyles:t.defaultStyles},i)),o.node);o.portalRef(f)},n),Sa(o,a)}return W5(t,[{key:"componentDidMount",value:function(){if(mt.canUseDOM){Et||(this.node=Ta("div")),this.node.className=this.props.portalClassName;var n=ln(this.props.parentSelector);n.appendChild(this.node),!Et&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(n){var o=ln(n.parentSelector),a=ln(this.props.parentSelector);return{prevParent:o,nextParent:a}}},{key:"componentDidUpdate",value:function(n,o,a){if(mt.canUseDOM){var u=this.props,s=u.isOpen,l=u.portalClassName;n.portalClassName!==l&&(this.node.className=l);var i=a.prevParent,c=a.nextParent;c!==i&&(i.removeChild(this.node),c.appendChild(this.node)),!(!n.isOpen&&!s)&&!Et&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!mt.canUseDOM||!this.node||!this.portal)){var n=this.portal.state,o=Date.now(),a=n.isOpen&&this.props.closeTimeoutMS&&(n.closesAt||o+this.props.closeTimeoutMS);a?(n.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,a-o)):this.removePortal()}}},{key:"render",value:function(){if(!mt.canUseDOM||!Et)return null;!this.node&&Et&&(this.node=Ta("div"));var n=Ra();return n(Rn.default.createElement(Pa.default,ka({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(n){J5.setElement(n)}}]),t}(ks.Component);Jr.propTypes={isOpen:le.default.bool.isRequired,style:le.default.shape({content:le.default.object,overlay:le.default.object}),portalClassName:le.default.string,bodyOpenClassName:le.default.string,htmlOpenClassName:le.default.string,className:le.default.oneOfType([le.default.string,le.default.shape({base:le.default.string.isRequired,afterOpen:le.default.string.isRequired,beforeClose:le.default.string.isRequired})]),overlayClassName:le.default.oneOfType([le.default.string,le.default.shape({base:le.default.string.isRequired,afterOpen:le.default.string.isRequired,beforeClose:le.default.string.isRequired})]),appElement:le.default.oneOfType([le.default.instanceOf(Ea.default),le.default.instanceOf(mt.SafeHTMLCollection),le.default.instanceOf(mt.SafeNodeList),le.default.arrayOf(le.default.instanceOf(Ea.default))]),onAfterOpen:le.default.func,onRequestClose:le.default.func,closeTimeoutMS:le.default.number,ariaHideApp:le.default.bool,shouldFocusAfterRender:le.default.bool,shouldCloseOnOverlayClick:le.default.bool,shouldReturnFocusAfterClose:le.default.bool,preventScroll:le.default.bool,parentSelector:le.default.func,aria:le.default.object,data:le.default.object,role:le.default.string,contentLabel:le.default.string,shouldCloseOnEsc:le.default.bool,overlayRef:le.default.func,contentRef:le.default.func,id:le.default.string,overlayElement:le.default.func,contentElement:le.default.func};Jr.defaultProps={isOpen:!1,portalClassName:n1,bodyOpenClassName:o1,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(t,r){return Rn.default.createElement("div",t,r)},contentElement:function(t,r){return Rn.default.createElement("div",t,r)}};Jr.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}};(0,Z5.polyfill)(Jr);Lt.default=Jr;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Lt,n=o(r);function o(a){return a&&a.__esModule?a:{default:a}}t.default=n.default,e.exports=t.default})(Ko,Ko.exports);var i1=Ko.exports;/*! *****************************************************************************
|
|
90
|
-
Copyright (c) Microsoft Corporation.
|
|
91
|
-
|
|
92
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
93
|
-
purpose with or without fee is hereby granted.
|
|
94
|
-
|
|
95
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
96
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
97
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
98
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
99
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
100
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
101
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
102
|
-
***************************************************************************** */var Qo=function(e,t){return Qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Qo(e,t)};function ve(e,t){Qo(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function $r(e){return typeof e=="function"}var Ia=!1,Ge={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;""+t.stack}Ia=e},get useDeprecatedSynchronousErrorHandling(){return Ia}};function Gt(e){setTimeout(function(){throw e},0)}var An={closed:!0,next:function(e){},error:function(e){if(Ge.useDeprecatedSynchronousErrorHandling)throw e;Gt(e)},complete:function(){}},Ke=function(){return Array.isArray||function(e){return e&&typeof e.length=="number"}}();function Ci(e){return e!==null&&typeof e=="object"}var a1=function(){function e(t){return Error.call(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
103
|
-
`+t.map(function(r,n){return n+1+") "+r.toString()}).join(`
|
|
104
|
-
`):"",this.name="UnsubscriptionError",this.errors=t,this}return e.prototype=Object.create(Error.prototype),e}(),kr=a1,Pe=function(){function e(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this,n=r._parentOrParents,o=r._ctorUnsubscribe,a=r._unsubscribe,u=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(n!==null)for(var s=0;s<n.length;++s){var l=n[s];l.remove(this)}if($r(a)){o&&(this._unsubscribe=void 0);try{a.call(this)}catch(f){t=f instanceof kr?Aa(f.errors):[f]}}if(Ke(u))for(var s=-1,i=u.length;++s<i;){var c=u[s];if(Ci(c))try{c.unsubscribe()}catch(d){t=t||[],d instanceof kr?t=t.concat(Aa(d.errors)):t.push(d)}}if(t)throw new kr(t)}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||typeof r.unsubscribe!="function")return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;r=new e,r._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=r._parentOrParents;if(o===null)r._parentOrParents=this;else if(o instanceof e){if(o===this)return r;r._parentOrParents=[o,this]}else if(o.indexOf(this)===-1)o.push(this);else return r;var a=this._subscriptions;return a===null?this._subscriptions=[r]:a.push(r),r},e.prototype.remove=function(t){var r=this._subscriptions;if(r){var n=r.indexOf(t);n!==-1&&r.splice(n,1)}},e.EMPTY=function(t){return t.closed=!0,t}(new e),e}();function Aa(e){return e.reduce(function(t,r){return t.concat(r instanceof kr?r.errors:r)},[])}var Dn=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Fe=function(e){ve(t,e);function t(r,n,o){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=An;break;case 1:if(!r){a.destination=An;break}if(typeof r=="object"){r instanceof t?(a.syncErrorThrowable=r.syncErrorThrowable,a.destination=r,r.add(a)):(a.syncErrorThrowable=!0,a.destination=new Da(a,r));break}default:a.syncErrorThrowable=!0,a.destination=new Da(a,r,n,o);break}return a}return t.prototype[Dn]=function(){return this},t.create=function(r,n,o){var a=new t(r,n,o);return a.syncErrorThrowable=!1,a},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var r=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=r,this},t}(Pe),Da=function(e){ve(t,e);function t(r,n,o,a){var u=e.call(this)||this;u._parentSubscriber=r;var s,l=u;return $r(n)?s=n:n&&(s=n.next,o=n.error,a=n.complete,n!==An&&(l=Object.create(n),$r(l.unsubscribe)&&u.add(l.unsubscribe.bind(l)),l.unsubscribe=u.unsubscribe.bind(u))),u._context=l,u._next=s,u._error=o,u._complete=a,u}return t.prototype.next=function(r){if(!this.isStopped&&this._next){var n=this._parentSubscriber;!Ge.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?this.__tryOrUnsub(this._next,r):this.__tryOrSetError(n,this._next,r)&&this.unsubscribe()}},t.prototype.error=function(r){if(!this.isStopped){var n=this._parentSubscriber,o=Ge.useDeprecatedSynchronousErrorHandling;if(this._error)!o||!n.syncErrorThrowable?(this.__tryOrUnsub(this._error,r),this.unsubscribe()):(this.__tryOrSetError(n,this._error,r),this.unsubscribe());else if(n.syncErrorThrowable)o?(n.syncErrorValue=r,n.syncErrorThrown=!0):Gt(r),this.unsubscribe();else{if(this.unsubscribe(),o)throw r;Gt(r)}}},t.prototype.complete=function(){var r=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var o=function(){return r._complete.call(r._context)};!Ge.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?(this.__tryOrUnsub(o),this.unsubscribe()):(this.__tryOrSetError(n,o),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(r,n){try{r.call(this._context,n)}catch(o){if(this.unsubscribe(),Ge.useDeprecatedSynchronousErrorHandling)throw o;Gt(o)}},t.prototype.__tryOrSetError=function(r,n,o){if(!Ge.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,o)}catch(a){return Ge.useDeprecatedSynchronousErrorHandling?(r.syncErrorValue=a,r.syncErrorThrown=!0,!0):(Gt(a),!0)}return!1},t.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},t}(Fe);function _i(e){for(;e;){var t=e,r=t.closed,n=t.destination,o=t.isStopped;if(r||o)return!1;n&&n instanceof Fe?e=n:e=null}return!0}function s1(e,t,r){if(e){if(e instanceof Fe)return e;if(e[Dn])return e[Dn]()}return!e&&!t&&!r?new Fe(An):new Fe(e,t,r)}var nr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function qr(e){return e}function c1(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ps(e)}function Ps(e){return e.length===0?qr:e.length===1?e[0]:function(r){return e.reduce(function(n,o){return o(n)},r)}}var ge=function(){function e(t){this._isScalar=!1,t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var o=this.operator,a=s1(t,r,n);if(o?a.add(o.call(a,this.source)):a.add(this.source||Ge.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),Ge.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){Ge.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=r),_i(t)?t.error(r):console.warn(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Oa(r),new r(function(o,a){var u;u=n.subscribe(function(s){try{t(s)}catch(l){a(l),u&&u.unsubscribe()}},a,o)})},e.prototype._subscribe=function(t){var r=this.source;return r&&r.subscribe(t)},e.prototype[nr]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.length===0?this:Ps(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Oa(t),new t(function(n,o){var a;r.subscribe(function(u){return a=u},function(u){return o(u)},function(){return n(a)})})},e.create=function(t){return new e(t)},e}();function Oa(e){if(e||(e=Ge.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var u1=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),pt=u1,Es=function(e){ve(t,e);function t(r,n){var o=e.call(this)||this;return o.subject=r,o.subscriber=n,o.closed=!1,o}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var r=this.subject,n=r.observers;if(this.subject=null,!(!n||n.length===0||r.isStopped||r.closed)){var o=n.indexOf(this.subscriber);o!==-1&&n.splice(o,1)}}},t}(Pe),Ss=function(e){ve(t,e);function t(r){var n=e.call(this,r)||this;return n.destination=r,n}return t}(Fe),Zr=function(e){ve(t,e);function t(){var r=e.call(this)||this;return r.observers=[],r.closed=!1,r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype[Dn]=function(){return new Ss(this)},t.prototype.lift=function(r){var n=new Ma(this,this);return n.operator=r,n},t.prototype.next=function(r){if(this.closed)throw new pt;if(!this.isStopped)for(var n=this.observers,o=n.length,a=n.slice(),u=0;u<o;u++)a[u].next(r)},t.prototype.error=function(r){if(this.closed)throw new pt;this.hasError=!0,this.thrownError=r,this.isStopped=!0;for(var n=this.observers,o=n.length,a=n.slice(),u=0;u<o;u++)a[u].error(r);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new pt;this.isStopped=!0;for(var r=this.observers,n=r.length,o=r.slice(),a=0;a<n;a++)o[a].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(r){if(this.closed)throw new pt;return e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){if(this.closed)throw new pt;return this.hasError?(r.error(this.thrownError),Pe.EMPTY):this.isStopped?(r.complete(),Pe.EMPTY):(this.observers.push(r),new Es(this,r))},t.prototype.asObservable=function(){var r=new ge;return r.source=this,r},t.create=function(r,n){return new Ma(r,n)},t}(ge),Ma=function(e){ve(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n=this.destination;n&&n.next&&n.next(r)},t.prototype.error=function(r){var n=this.destination;n&&n.error&&this.destination.error(r)},t.prototype.complete=function(){var r=this.destination;r&&r.complete&&this.destination.complete()},t.prototype._subscribe=function(r){var n=this.source;return n?this.source.subscribe(r):Pe.EMPTY},t}(Zr);function f1(){return function(t){return t.lift(new l1(t))}}var l1=function(){function e(t){this.connectable=t}return e.prototype.call=function(t,r){var n=this.connectable;n._refCount++;var o=new d1(t,n),a=r.subscribe(o);return o.closed||(o.connection=n.connect()),a},e}(),d1=function(e){ve(t,e);function t(r,n){var o=e.call(this,r)||this;return o.connectable=n,o}return t.prototype._unsubscribe=function(){var r=this.connectable;if(!r){this.connection=null;return}this.connectable=null;var n=r._refCount;if(n<=0){this.connection=null;return}if(r._refCount=n-1,n>1){this.connection=null;return}var o=this.connection,a=r._connection;this.connection=null,a&&(!o||a===o)&&a.unsubscribe()},t}(Fe),h1=function(e){ve(t,e);function t(r,n){var o=e.call(this)||this;return o.source=r,o.subjectFactory=n,o._refCount=0,o._isComplete=!1,o}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var r=this._connection;return r||(this._isComplete=!1,r=this._connection=new Pe,r.add(this.source.subscribe(new p1(this.getSubject(),this))),r.closed&&(this._connection=null,r=Pe.EMPTY)),r},t.prototype.refCount=function(){return f1()(this)},t}(ge),p1=function(e){ve(t,e);function t(r,n){var o=e.call(this,r)||this;return o.connectable=n,o}return t.prototype._error=function(r){this._unsubscribe(),e.prototype._error.call(this,r)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var r=this.connectable;if(r){this.connectable=null;var n=r._connection;r._refCount=0,r._subject=null,r._connection=null,n&&n.unsubscribe()}},t}(Ss),m1=function(e){ve(t,e);function t(r,n,o){var a=e.call(this)||this;return a.key=r,a.groupSubject=n,a.refCountSubscription=o,a}return t.prototype._subscribe=function(r){var n=new Pe,o=this,a=o.refCountSubscription,u=o.groupSubject;return a&&!a.closed&&n.add(new g1(a)),n.add(u.subscribe(r)),n},t}(ge),g1=function(e){ve(t,e);function t(r){var n=e.call(this)||this;return n.parent=r,r.count++,n}return t.prototype.unsubscribe=function(){var r=this.parent;!r.closed&&!this.closed&&(e.prototype.unsubscribe.call(this),r.count-=1,r.count===0&&r.attemptedToUnsubscribe&&r.unsubscribe())},t}(Pe),v1=function(e){ve(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return n&&!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new pt;return this._value},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(Zr),x1=function(e){ve(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return this},t}(Pe),en=function(e){ve(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o.pending=!1,o}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(a,this.id,n),this},t.prototype.requestAsyncId=function(r,n,o){return o===void 0&&(o=0),setInterval(r.flush.bind(r,this),o)},t.prototype.recycleAsyncId=function(r,n,o){if(o===void 0&&(o=0),o!==null&&this.delay===o&&this.pending===!1)return n;clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var o=this._execute(r,n);if(o)return o;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var o=!1,a=void 0;try{this.work(r)}catch(u){o=!0,a=!!u&&u||new Error(u)}if(o)return this.unsubscribe(),a},t.prototype._unsubscribe=function(){var r=this.id,n=this.scheduler,o=n.actions,a=o.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,a!==-1&&o.splice(a,1),r!=null&&(this.id=this.recycleAsyncId(n,r,null)),this.delay=null},t}(x1),y1=function(e){ve(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,o){return o===void 0&&(o=0),o!==null&&o>0||o===null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,o):r.flush(this)},t}(en),Jo=function(){function e(t,r){r===void 0&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.SchedulerAction(this,t).schedule(n,r)},e.now=function(){return Date.now()},e}(),tn=function(e){ve(t,e);function t(r,n){n===void 0&&(n=Jo.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return t.prototype.schedule=function(r,n,o){return n===void 0&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(r){var n=this.actions;if(this.active){n.push(r);return}var o;this.active=!0;do if(o=r.execute(r.state,r.delay))break;while(r=n.shift());if(this.active=!1,o){for(;r=n.shift();)r.unsubscribe();throw o}},t}(Jo),b1=function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(tn),Ts=new b1(y1),Rs=Ts,Qt=new ge(function(e){return e.complete()});function Bi(e){return e?C1(e):Qt}function C1(e){return new ge(function(t){return e.schedule(function(){return t.complete()})})}function Ct(e){return e&&typeof e.schedule=="function"}var Is=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}};function wi(e,t){return new ge(function(r){var n=new Pe,o=0;return n.add(t.schedule(function(){if(o===e.length){r.complete();return}r.next(e[o++]),r.closed||n.add(this.schedule())})),n})}function rn(e,t){return t?wi(e,t):new ge(Is(e))}function ki(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return Ct(r)?(e.pop(),wi(e,r)):rn(e)}function As(e,t){return t?new ge(function(r){return t.schedule(_1,0,{error:e,subscriber:r})}):new ge(function(r){return r.error(e)})}function _1(e){var t=e.error,r=e.subscriber;r.error(t)}var Zo;Zo||(Zo={});var xn=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},e.prototype.do=function(t,r,n){var o=this.kind;switch(o){case"N":return t&&t(this.value);case"E":return r&&r(this.error);case"C":return n&&n()}},e.prototype.accept=function(t,r,n){return t&&typeof t.next=="function"?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this.kind;switch(t){case"N":return ki(this.value);case"E":return As(this.error);case"C":return Bi()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return typeof t<"u"?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}(),B1=function(e){ve(t,e);function t(r,n,o){o===void 0&&(o=0);var a=e.call(this,r)||this;return a.scheduler=n,a.delay=o,a}return t.dispatch=function(r){var n=r.notification,o=r.destination;n.observe(o),this.unsubscribe()},t.prototype.scheduleMessage=function(r){var n=this.destination;n.add(this.scheduler.schedule(t.dispatch,this.delay,new w1(r,this.destination)))},t.prototype._next=function(r){this.scheduleMessage(xn.createNext(r))},t.prototype._error=function(r){this.scheduleMessage(xn.createError(r)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(xn.createComplete()),this.unsubscribe()},t}(Fe),w1=function(){function e(t,r){this.notification=t,this.destination=r}return e}(),k1=function(e){ve(t,e);function t(r,n,o){r===void 0&&(r=Number.POSITIVE_INFINITY),n===void 0&&(n=Number.POSITIVE_INFINITY);var a=e.call(this)||this;return a.scheduler=o,a._events=[],a._infiniteTimeWindow=!1,a._bufferSize=r<1?1:r,a._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(a._infiniteTimeWindow=!0,a.next=a.nextInfiniteTimeWindow):a.next=a.nextTimeWindow,a}return t.prototype.nextInfiniteTimeWindow=function(r){if(!this.isStopped){var n=this._events;n.push(r),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,r)},t.prototype.nextTimeWindow=function(r){this.isStopped||(this._events.push(new P1(this._getNow(),r)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){var n=this._infiniteTimeWindow,o=n?this._events:this._trimBufferThenGetEvents(),a=this.scheduler,u=o.length,s;if(this.closed)throw new pt;if(this.isStopped||this.hasError?s=Pe.EMPTY:(this.observers.push(r),s=new Es(this,r)),a&&r.add(r=new B1(r,a)),n)for(var l=0;l<u&&!r.closed;l++)r.next(o[l]);else for(var l=0;l<u&&!r.closed;l++)r.next(o[l].value);return this.hasError?r.error(this.thrownError):this.isStopped&&r.complete(),s},t.prototype._getNow=function(){return(this.scheduler||Rs).now()},t.prototype._trimBufferThenGetEvents=function(){for(var r=this._getNow(),n=this._bufferSize,o=this._windowTime,a=this._events,u=a.length,s=0;s<u&&!(r-a[s].time<o);)s++;return u>n&&(s=Math.max(s,u-n)),s>0&&a.splice(0,s),a},t}(Zr),P1=function(){function e(t,r){this.time=t,this.value=r}return e}(),nn=function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.value=null,r.hasNext=!1,r.hasCompleted=!1,r}return t.prototype._subscribe=function(r){return this.hasError?(r.error(this.thrownError),Pe.EMPTY):this.hasCompleted&&this.hasNext?(r.next(this.value),r.complete(),Pe.EMPTY):e.prototype._subscribe.call(this,r)},t.prototype.next=function(r){this.hasCompleted||(this.value=r,this.hasNext=!0)},t.prototype.error=function(r){this.hasCompleted||e.prototype.error.call(this,r)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(Zr),E1=1,S1=function(){return Promise.resolve()}(),ei={};function La(e){return e in ei?(delete ei[e],!0):!1}var Na={setImmediate:function(e){var t=E1++;return ei[t]=!0,S1.then(function(){return La(t)&&e()}),t},clearImmediate:function(e){La(e)}},T1=function(e){ve(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o}return t.prototype.requestAsyncId=function(r,n,o){return o===void 0&&(o=0),o!==null&&o>0?e.prototype.requestAsyncId.call(this,r,n,o):(r.actions.push(this),r.scheduled||(r.scheduled=Na.setImmediate(r.flush.bind(r,null))))},t.prototype.recycleAsyncId=function(r,n,o){if(o===void 0&&(o=0),o!==null&&o>0||o===null&&this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);r.actions.length===0&&(Na.clearImmediate(n),r.scheduled=void 0)},t}(en),R1=function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this.active=!0,this.scheduled=void 0;var n=this.actions,o,a=-1,u=n.length;r=r||n.shift();do if(o=r.execute(r.state,r.delay))break;while(++a<u&&(r=n.shift()));if(this.active=!1,o){for(;++a<u&&(r=n.shift());)r.unsubscribe();throw o}},t}(tn),Ds=new R1(T1),I1=Ds,Os=new tn(en),On=Os,A1=function(e){ve(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o}return t.prototype.requestAsyncId=function(r,n,o){return o===void 0&&(o=0),o!==null&&o>0?e.prototype.requestAsyncId.call(this,r,n,o):(r.actions.push(this),r.scheduled||(r.scheduled=requestAnimationFrame(function(){return r.flush(null)})))},t.prototype.recycleAsyncId=function(r,n,o){if(o===void 0&&(o=0),o!==null&&o>0||o===null&&this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);r.actions.length===0&&(cancelAnimationFrame(n),r.scheduled=void 0)},t}(en),D1=function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this.active=!0,this.scheduled=void 0;var n=this.actions,o,a=-1,u=n.length;r=r||n.shift();do if(o=r.execute(r.state,r.delay))break;while(++a<u&&(r=n.shift()));if(this.active=!1,o){for(;++a<u&&(r=n.shift());)r.unsubscribe();throw o}},t}(tn),Ms=new D1(A1),O1=Ms,M1=function(e){ve(t,e);function t(r,n){r===void 0&&(r=Ls),n===void 0&&(n=Number.POSITIVE_INFINITY);var o=e.call(this,r,function(){return o.frame})||this;return o.maxFrames=n,o.frame=0,o.index=-1,o}return t.prototype.flush=function(){for(var r=this,n=r.actions,o=r.maxFrames,a,u;(u=n[0])&&u.delay<=o&&(n.shift(),this.frame=u.delay,!(a=u.execute(u.state,u.delay))););if(a){for(;u=n.shift();)u.unsubscribe();throw a}},t.frameTimeFactor=10,t}(tn),Ls=function(e){ve(t,e);function t(r,n,o){o===void 0&&(o=r.index+=1);var a=e.call(this,r,n)||this;return a.scheduler=r,a.work=n,a.index=o,a.active=!0,a.index=r.index=o,a}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(r,n)},t.prototype.requestAsyncId=function(r,n,o){o===void 0&&(o=0),this.delay=r.frame+o;var a=r.actions;return a.push(this),a.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(r,n,o){},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(en);function Ns(){}function L1(e){return!!e&&(e instanceof ge||typeof e.lift=="function"&&typeof e.subscribe=="function")}var N1=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),U1=N1,F1=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),j1=F1,$1=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}(),q1=$1;function or(e,t){return function(n){if(typeof e!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new z1(e,t))}}var z1=function(){function e(t,r){this.project=t,this.thisArg=r}return e.prototype.call=function(t,r){return r.subscribe(new H1(t,this.project,this.thisArg))},e}(),H1=function(e){ve(t,e);function t(r,n,o){var a=e.call(this,r)||this;return a.project=n,a.count=0,a.thisArg=o||a,a}return t.prototype._next=function(r){var n;try{n=this.project.call(this.thisArg,r,this.count++)}catch(o){this.destination.error(o);return}this.destination.next(n)},t}(Fe);function Us(e,t,r){if(t)if(Ct(t))r=t;else return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return Us(e,r).apply(void 0,n).pipe(or(function(a){return Ke(a)?t.apply(void 0,a):t(a)}))};return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=this,u,s={context:a,subject:u,callbackFunc:e,scheduler:r};return new ge(function(l){if(r){var c={args:n,subscriber:l,params:s};return r.schedule(G1,0,c)}else{if(!u){u=new nn;var i=function(){for(var f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];u.next(f.length<=1?f[0]:f),u.complete()};try{e.apply(a,n.concat([i]))}catch(f){_i(u)?u.error(f):console.warn(f)}}return u.subscribe(l)}})}}function G1(e){var t=this,r=e.args,n=e.subscriber,o=e.params,a=o.callbackFunc,u=o.context,s=o.scheduler,l=o.subject;if(!l){l=o.subject=new nn;var i=function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];var d=c.length<=1?c[0]:c;t.add(s.schedule(K1,0,{value:d,subject:l}))};try{a.apply(u,r.concat([i]))}catch(c){l.error(c)}}this.add(l.subscribe(n))}function K1(e){var t=e.value,r=e.subject;r.next(t),r.complete()}function Fs(e,t,r){if(t)if(Ct(t))r=t;else return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return Fs(e,r).apply(void 0,n).pipe(or(function(a){return Ke(a)?t.apply(void 0,a):t(a)}))};return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a={subject:void 0,args:n,callbackFunc:e,scheduler:r,context:this};return new ge(function(u){var s=a.context,l=a.subject;if(r)return r.schedule(W1,0,{params:a,subscriber:u,context:s});if(!l){l=a.subject=new nn;var i=function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];var d=c.shift();if(d){l.error(d);return}l.next(c.length<=1?c[0]:c),l.complete()};try{e.apply(s,n.concat([i]))}catch(c){_i(l)?l.error(c):console.warn(c)}}return l.subscribe(u)})}}function W1(e){var t=this,r=e.params,n=e.subscriber,o=e.context,a=r.callbackFunc,u=r.args,s=r.scheduler,l=r.subject;if(!l){l=r.subject=new nn;var i=function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];var d=c.shift();if(d)t.add(s.schedule(Ua,0,{err:d,subject:l}));else{var m=c.length<=1?c[0]:c;t.add(s.schedule(V1,0,{value:m,subject:l}))}};try{a.apply(o,u.concat([i]))}catch(c){this.add(s.schedule(Ua,0,{err:c,subject:l}))}}this.add(l.subscribe(n))}function V1(e){var t=e.value,r=e.subject;r.next(t),r.complete()}function Ua(e){var t=e.err,r=e.subject;r.error(t)}var js=function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.notifyNext=function(r,n,o,a,u){this.destination.next(n)},t.prototype.notifyError=function(r,n){this.destination.error(r)},t.prototype.notifyComplete=function(r){this.destination.complete()},t}(Fe),Y1=function(e){ve(t,e);function t(r,n,o){var a=e.call(this)||this;return a.parent=r,a.outerValue=n,a.outerIndex=o,a.index=0,a}return t.prototype._next=function(r){this.parent.notifyNext(this.outerValue,r,this.outerIndex,this.index++,this)},t.prototype._error=function(r){this.parent.notifyError(r,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(Fe),X1=function(e){return function(t){return e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Gt),t}};function Q1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var _t=Q1(),J1=function(e){return function(t){var r=e[_t]();do{var n=void 0;try{n=r.next()}catch(o){return t.error(o),t}if(n.done){t.complete();break}if(t.next(n.value),t.closed)break}while(!0);return typeof r.return=="function"&&t.add(function(){r.return&&r.return()}),t}},Z1=function(e){return function(t){var r=e[nr]();if(typeof r.subscribe!="function")throw new TypeError("Provided object does not correctly implement Symbol.observable");return r.subscribe(t)}},$s=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function qs(e){return!!e&&typeof e.subscribe!="function"&&typeof e.then=="function"}var zr=function(e){if(e&&typeof e[nr]=="function")return Z1(e);if($s(e))return Is(e);if(qs(e))return X1(e);if(e&&typeof e[_t]=="function")return J1(e);var t=Ci(e)?"an invalid object":"'"+e+"'",r="You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(r)};function zs(e,t,r,n,o){if(o===void 0&&(o=new Y1(e,r,n)),!o.closed)return t instanceof ge?t.subscribe(o):zr(t)(o)}var Fa={};function el(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return Ct(e[e.length-1])&&(n=e.pop()),typeof e[e.length-1]=="function"&&(r=e.pop()),e.length===1&&Ke(e[0])&&(e=e[0]),rn(e,n).lift(new tl(r))}var tl=function(){function e(t){this.resultSelector=t}return e.prototype.call=function(t,r){return r.subscribe(new rl(t,this.resultSelector))},e}(),rl=function(e){ve(t,e);function t(r,n){var o=e.call(this,r)||this;return o.resultSelector=n,o.active=0,o.values=[],o.observables=[],o}return t.prototype._next=function(r){this.values.push(Fa),this.observables.push(r)},t.prototype._complete=function(){var r=this.observables,n=r.length;if(n===0)this.destination.complete();else{this.active=n,this.toRespond=n;for(var o=0;o<n;o++){var a=r[o];this.add(zs(this,a,void 0,o))}}},t.prototype.notifyComplete=function(r){(this.active-=1)===0&&this.destination.complete()},t.prototype.notifyNext=function(r,n,o){var a=this.values,u=a[o],s=this.toRespond?u===Fa?--this.toRespond:this.toRespond:0;a[o]=n,s===0&&(this.resultSelector?this._tryResultSelector(a):this.destination.next(a.slice()))},t.prototype._tryResultSelector=function(r){var n;try{n=this.resultSelector.apply(this,r)}catch(o){this.destination.error(o);return}this.destination.next(n)},t}(js);function nl(e,t){return new ge(function(r){var n=new Pe;return n.add(t.schedule(function(){var o=e[nr]();n.add(o.subscribe({next:function(a){n.add(t.schedule(function(){return r.next(a)}))},error:function(a){n.add(t.schedule(function(){return r.error(a)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}function ol(e,t){return new ge(function(r){var n=new Pe;return n.add(t.schedule(function(){return e.then(function(o){n.add(t.schedule(function(){r.next(o),n.add(t.schedule(function(){return r.complete()}))}))},function(o){n.add(t.schedule(function(){return r.error(o)}))})})),n})}function il(e,t){if(!e)throw new Error("Iterable cannot be null");return new ge(function(r){var n=new Pe,o;return n.add(function(){o&&typeof o.return=="function"&&o.return()}),n.add(t.schedule(function(){o=e[_t](),n.add(t.schedule(function(){if(!r.closed){var a,u;try{var s=o.next();a=s.value,u=s.done}catch(l){r.error(l);return}u?r.complete():(r.next(a),this.schedule())}}))})),n})}function al(e){return e&&typeof e[nr]=="function"}function sl(e){return e&&typeof e[_t]=="function"}function Hs(e,t){if(e!=null){if(al(e))return nl(e,t);if(qs(e))return ol(e,t);if($s(e))return wi(e,t);if(sl(e)||typeof e=="string")return il(e,t)}throw new TypeError((e!==null&&typeof e||e)+" is not observable")}function ir(e,t){return t?Hs(e,t):e instanceof ge?e:new ge(zr(e))}var Gs=function(e){ve(t,e);function t(r){var n=e.call(this)||this;return n.parent=r,n}return t.prototype._next=function(r){this.parent.notifyNext(r)},t.prototype._error=function(r){this.parent.notifyError(r),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(Fe),Ks=function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.notifyNext=function(r){this.destination.next(r)},t.prototype.notifyError=function(r){this.destination.error(r)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(Fe);function Ws(e,t){if(!t.closed){if(e instanceof ge)return e.subscribe(t);var r;try{r=zr(e)(t)}catch(n){t.error(n)}return r}}function Vs(e,t,r){return r===void 0&&(r=Number.POSITIVE_INFINITY),typeof t=="function"?function(n){return n.pipe(Vs(function(o,a){return ir(e(o,a)).pipe(or(function(u,s){return t(o,u,a,s)}))},r))}:(typeof t=="number"&&(r=t),function(n){return n.lift(new cl(e,r))})}var cl=function(){function e(t,r){r===void 0&&(r=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=r}return e.prototype.call=function(t,r){return r.subscribe(new ul(t,this.project,this.concurrent))},e}(),ul=function(e){ve(t,e);function t(r,n,o){o===void 0&&(o=Number.POSITIVE_INFINITY);var a=e.call(this,r)||this;return a.project=n,a.concurrent=o,a.hasCompleted=!1,a.buffer=[],a.active=0,a.index=0,a}return t.prototype._next=function(r){this.active<this.concurrent?this._tryNext(r):this.buffer.push(r)},t.prototype._tryNext=function(r){var n,o=this.index++;try{n=this.project(r,o)}catch(a){this.destination.error(a);return}this.active++,this._innerSub(n)},t.prototype._innerSub=function(r){var n=new Gs(this),o=this.destination;o.add(n);var a=Ws(r,n);a!==n&&o.add(a)},t.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(r){this.destination.next(r)},t.prototype.notifyComplete=function(){var r=this.buffer;this.active--,r.length>0?this._next(r.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},t}(Ks);function Ys(e){return e===void 0&&(e=Number.POSITIVE_INFINITY),Vs(qr,e)}function fl(){return Ys(1)}function ll(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fl()(ki.apply(void 0,e))}function Xs(e){return new ge(function(t){var r;try{r=e()}catch(o){t.error(o);return}var n=r?ir(r):Bi();return n.subscribe(t)})}function dl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1){var r=e[0];if(Ke(r))return dn(r,null);if(Ci(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return dn(n.map(function(a){return r[a]}),n)}}if(typeof e[e.length-1]=="function"){var o=e.pop();return e=e.length===1&&Ke(e[0])?e[0]:e,dn(e,null).pipe(or(function(a){return o.apply(void 0,a)}))}return dn(e,null)}function dn(e,t){return new ge(function(r){var n=e.length;if(n===0){r.complete();return}for(var o=new Array(n),a=0,u=0,s=function(i){var c=ir(e[i]),f=!1;r.add(c.subscribe({next:function(d){f||(f=!0,u++),o[i]=d},error:function(d){return r.error(d)},complete:function(){a++,(a===n||!f)&&(u===n&&r.next(t?t.reduce(function(d,m,v){return d[m]=o[v],d},{}):o),r.complete())}}))},l=0;l<n;l++)s(l)})}function Qs(e,t,r,n){return $r(r)&&(n=r,r=void 0),n?Qs(e,t,r).pipe(or(function(o){return Ke(o)?n.apply(void 0,o):n(o)})):new ge(function(o){function a(u){arguments.length>1?o.next(Array.prototype.slice.call(arguments)):o.next(u)}Js(e,t,a,o,r)})}function Js(e,t,r,n,o){var a;if(ml(e)){var u=e;e.addEventListener(t,r,o),a=function(){return u.removeEventListener(t,r,o)}}else if(pl(e)){var s=e;e.on(t,r),a=function(){return s.off(t,r)}}else if(hl(e)){var l=e;e.addListener(t,r),a=function(){return l.removeListener(t,r)}}else if(e&&e.length)for(var i=0,c=e.length;i<c;i++)Js(e[i],t,r,n,o);else throw new TypeError("Invalid event target");n.add(a)}function hl(e){return e&&typeof e.addListener=="function"&&typeof e.removeListener=="function"}function pl(e){return e&&typeof e.on=="function"&&typeof e.off=="function"}function ml(e){return e&&typeof e.addEventListener=="function"&&typeof e.removeEventListener=="function"}function Zs(e,t,r){return r?Zs(e,t).pipe(or(function(n){return Ke(n)?r.apply(void 0,n):r(n)})):new ge(function(n){var o=function(){for(var u=[],s=0;s<arguments.length;s++)u[s]=arguments[s];return n.next(u.length===1?u[0]:u)},a;try{a=e(o)}catch(u){n.error(u);return}if($r(t))return function(){return t(o,a)}})}function gl(e,t,r,n,o){var a,u;if(arguments.length==1){var s=e;u=s.initialState,t=s.condition,r=s.iterate,a=s.resultSelector||qr,o=s.scheduler}else n===void 0||Ct(n)?(u=e,a=qr,o=n):(u=e,a=n);return new ge(function(l){var i=u;if(o)return o.schedule(vl,0,{subscriber:l,iterate:r,condition:t,resultSelector:a,state:i});do{if(t){var c=void 0;try{c=t(i)}catch(d){l.error(d);return}if(!c){l.complete();break}}var f=void 0;try{f=a(i)}catch(d){l.error(d);return}if(l.next(f),l.closed)break;try{i=r(i)}catch(d){l.error(d);return}}while(!0)})}function vl(e){var t=e.subscriber,r=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(a){t.error(a);return}else e.needIterate=!0;if(r){var n=void 0;try{n=r(e.state)}catch(a){t.error(a);return}if(!n){t.complete();return}if(t.closed)return}var o;try{o=e.resultSelector(e.state)}catch(a){t.error(a);return}if(!t.closed&&(t.next(o),!t.closed))return this.schedule(e)}}function xl(e,t,r){return t===void 0&&(t=Qt),r===void 0&&(r=Qt),Xs(function(){return e()?t:r})}function ti(e){return!Ke(e)&&e-parseFloat(e)+1>=0}function yl(e,t){return e===void 0&&(e=0),t===void 0&&(t=On),(!ti(e)||e<0)&&(e=0),(!t||typeof t.schedule!="function")&&(t=On),new ge(function(r){return r.add(t.schedule(bl,e,{subscriber:r,counter:0,period:e})),r})}function bl(e){var t=e.subscriber,r=e.counter,n=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:n},n)}function Cl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Number.POSITIVE_INFINITY,n=null,o=e[e.length-1];return Ct(o)?(n=e.pop(),e.length>1&&typeof e[e.length-1]=="number"&&(r=e.pop())):typeof o=="number"&&(r=e.pop()),n===null&&e.length===1&&e[0]instanceof ge?e[0]:Ys(r)(rn(e,n))}var e0=new ge(Ns);function _l(){return e0}function ri(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===0)return Qt;var r=e[0],n=e.slice(1);return e.length===1&&Ke(r)?ri.apply(void 0,r):new ge(function(o){var a=function(){return o.add(ri.apply(void 0,n).subscribe(o))};return ir(r).subscribe({next:function(u){o.next(u)},error:a,complete:a})})}function Bl(e,t){return t?new ge(function(r){var n=Object.keys(e),o=new Pe;return o.add(t.schedule(wl,0,{keys:n,index:0,subscriber:r,subscription:o,obj:e})),o}):new ge(function(r){for(var n=Object.keys(e),o=0;o<n.length&&!r.closed;o++){var a=n[o];e.hasOwnProperty(a)&&r.next([a,e[a]])}r.complete()})}function wl(e){var t=e.keys,r=e.index,n=e.subscriber,o=e.subscription,a=e.obj;if(!n.closed)if(r<t.length){var u=t[r];n.next([u,a[u]]),o.add(this.schedule({keys:t,index:r+1,subscriber:n,subscription:o,obj:a}))}else n.complete()}function kl(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function ja(e,t){return function(n){return n.lift(new Pl(e,t))}}var Pl=function(){function e(t,r){this.predicate=t,this.thisArg=r}return e.prototype.call=function(t,r){return r.subscribe(new El(t,this.predicate,this.thisArg))},e}(),El=function(e){ve(t,e);function t(r,n,o){var a=e.call(this,r)||this;return a.predicate=n,a.thisArg=o,a.count=0,a}return t.prototype._next=function(r){var n;try{n=this.predicate.call(this.thisArg,r,this.count++)}catch(o){this.destination.error(o);return}n&&this.destination.next(r)},t}(Fe);function Sl(e,t,r){return[ja(t,r)(new ge(zr(e))),ja(kl(t,r))(new ge(zr(e)))]}function Tl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===1)if(Ke(e[0]))e=e[0];else return e[0];return rn(e,void 0).lift(new Rl)}var Rl=function(){function e(){}return e.prototype.call=function(t,r){return r.subscribe(new Il(t))},e}(),Il=function(e){ve(t,e);function t(r){var n=e.call(this,r)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return t.prototype._next=function(r){this.observables.push(r)},t.prototype._complete=function(){var r=this.observables,n=r.length;if(n===0)this.destination.complete();else{for(var o=0;o<n&&!this.hasFirst;o++){var a=r[o],u=zs(this,a,void 0,o);this.subscriptions&&this.subscriptions.push(u),this.add(u)}this.observables=null}},t.prototype.notifyNext=function(r,n,o){if(!this.hasFirst){this.hasFirst=!0;for(var a=0;a<this.subscriptions.length;a++)if(a!==o){var u=this.subscriptions[a];u.unsubscribe(),this.remove(u)}this.subscriptions=null}this.destination.next(n)},t}(js);function Al(e,t,r){return e===void 0&&(e=0),new ge(function(n){t===void 0&&(t=e,e=0);var o=0,a=e;if(r)return r.schedule(Dl,0,{index:o,count:t,start:e,subscriber:n});do{if(o++>=t){n.complete();break}if(n.next(a++),n.closed)break}while(!0)})}function Dl(e){var t=e.start,r=e.index,n=e.count,o=e.subscriber;if(r>=n){o.complete();return}o.next(t),!o.closed&&(e.index=r+1,e.start=t+1,this.schedule(e))}function Ol(e,t,r){e===void 0&&(e=0);var n=-1;return ti(t)?n=Number(t)<1&&1||Number(t):Ct(t)&&(r=t),Ct(r)||(r=On),new ge(function(o){var a=ti(e)?e:+e-r.now();return r.schedule(Ml,a,{index:0,period:n,subscriber:o})})}function Ml(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(r===-1)return n.complete();e.index=t+1,this.schedule(e,r)}}function Ll(e,t){return new ge(function(r){var n;try{n=e()}catch(s){r.error(s);return}var o;try{o=t(n)}catch(s){r.error(s);return}var a=o?ir(o):Qt,u=a.subscribe(r);return function(){u.unsubscribe(),n&&n.unsubscribe()}})}function Nl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return typeof r=="function"&&e.pop(),rn(e,void 0).lift(new Ul(r))}var Ul=function(){function e(t){this.resultSelector=t}return e.prototype.call=function(t,r){return r.subscribe(new Fl(t,this.resultSelector))},e}(),Fl=function(e){ve(t,e);function t(r,n,o){var a=e.call(this,r)||this;return a.resultSelector=n,a.iterators=[],a.active=0,a.resultSelector=typeof n=="function"?n:void 0,a}return t.prototype._next=function(r){var n=this.iterators;Ke(r)?n.push(new $l(r)):typeof r[_t]=="function"?n.push(new jl(r[_t]())):n.push(new ql(this.destination,this,r))},t.prototype._complete=function(){var r=this.iterators,n=r.length;if(this.unsubscribe(),n===0){this.destination.complete();return}this.active=n;for(var o=0;o<n;o++){var a=r[o];if(a.stillUnsubscribed){var u=this.destination;u.add(a.subscribe())}else this.active--}},t.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},t.prototype.checkIterators=function(){for(var r=this.iterators,n=r.length,o=this.destination,a=0;a<n;a++){var u=r[a];if(typeof u.hasValue=="function"&&!u.hasValue())return}for(var s=!1,l=[],a=0;a<n;a++){var u=r[a],i=u.next();if(u.hasCompleted()&&(s=!0),i.done){o.complete();return}l.push(i.value)}this.resultSelector?this._tryresultSelector(l):o.next(l),s&&o.complete()},t.prototype._tryresultSelector=function(r){var n;try{n=this.resultSelector.apply(this,r)}catch(o){this.destination.error(o);return}this.destination.next(n)},t}(Fe),jl=function(){function e(t){this.iterator=t,this.nextResult=t.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},e.prototype.hasCompleted=function(){var t=this.nextResult;return!!(t&&t.done)},e}(),$l=function(){function e(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return e.prototype[_t]=function(){return this},e.prototype.next=function(t){var r=this.index++,n=this.array;return r<this.length?{value:n[r],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),ql=function(e){ve(t,e);function t(r,n,o){var a=e.call(this,r)||this;return a.parent=n,a.observable=o,a.stillUnsubscribed=!0,a.buffer=[],a.isComplete=!1,a}return t.prototype[_t]=function(){return this},t.prototype.next=function(){var r=this.buffer;return r.length===0&&this.isComplete?{value:null,done:!0}:{value:r.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(r){this.buffer.push(r),this.parent.checkIterators()},t.prototype.subscribe=function(){return Ws(this.observable,new Gs(this))},t}(Ks);const zl=Object.freeze(Object.defineProperty({__proto__:null,ArgumentOutOfRangeError:U1,AsyncSubject:nn,BehaviorSubject:v1,ConnectableObservable:h1,EMPTY:Qt,EmptyError:j1,GroupedObservable:m1,NEVER:e0,Notification:xn,get NotificationKind(){return Zo},ObjectUnsubscribedError:pt,Observable:ge,ReplaySubject:k1,Scheduler:Jo,Subject:Zr,Subscriber:Fe,Subscription:Pe,TimeoutError:q1,UnsubscriptionError:kr,VirtualAction:Ls,VirtualTimeScheduler:M1,animationFrame:O1,animationFrameScheduler:Ms,asap:I1,asapScheduler:Ds,async:On,asyncScheduler:Os,bindCallback:Us,bindNodeCallback:Fs,combineLatest:el,concat:ll,config:Ge,defer:Xs,empty:Bi,forkJoin:dl,from:ir,fromEvent:Qs,fromEventPattern:Zs,generate:gl,identity:qr,iif:xl,interval:yl,isObservable:L1,merge:Cl,never:_l,noop:Ns,observable:nr,of:ki,onErrorResumeNext:ri,pairs:Bl,partition:Sl,pipe:c1,queue:Rs,queueScheduler:Ts,race:Tl,range:Al,scheduled:Hs,throwError:As,timer:Ol,using:Ll,zip:Nl},Symbol.toStringTag,{value:"Module"})),Hl=Nt(zl);var t0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Gl=t0;function r0(e){this.mode=Gl.MODE_8BIT_BYTE,this.data=e}r0.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}};var Kl=r0,n0={L:1,M:0,Q:3,H:2},hn=n0;function st(e,t){this.totalCount=e,this.dataCount=t}st.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];st.getRSBlocks=function(e,t){var r=st.getRsBlockTable(e,t);if(r==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,o=new Array,a=0;a<n;a++)for(var u=r[a*3+0],s=r[a*3+1],l=r[a*3+2],i=0;i<u;i++)o.push(new st(s,l));return o};st.getRsBlockTable=function(e,t){switch(t){case hn.L:return st.RS_BLOCK_TABLE[(e-1)*4+0];case hn.M:return st.RS_BLOCK_TABLE[(e-1)*4+1];case hn.Q:return st.RS_BLOCK_TABLE[(e-1)*4+2];case hn.H:return st.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};var Wl=st;function o0(){this.buffer=new Array,this.length=0}o0.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Vl=o0,Ye={glog:function(e){if(e<1)throw new Error("glog("+e+")");return Ye.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return Ye.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var Re=0;Re<8;Re++)Ye.EXP_TABLE[Re]=1<<Re;for(var Re=8;Re<256;Re++)Ye.EXP_TABLE[Re]=Ye.EXP_TABLE[Re-4]^Ye.EXP_TABLE[Re-5]^Ye.EXP_TABLE[Re-6]^Ye.EXP_TABLE[Re-8];for(var Re=0;Re<255;Re++)Ye.LOG_TABLE[Ye.EXP_TABLE[Re]]=Re;var i0=Ye,Pt=i0;function yn(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&e[r]==0;)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}yn.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=Pt.gexp(Pt.glog(this.get(r))+Pt.glog(e.get(n)));return new yn(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=Pt.glog(this.get(0))-Pt.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<e.getLength();n++)r[n]^=Pt.gexp(Pt.glog(e.get(n))+t);return new yn(r,0).mod(e)}};var a0=yn,ze=t0,$a=a0,Yl=i0,dt={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Te={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;Te.getBCHDigit(t)-Te.getBCHDigit(Te.G15)>=0;)t^=Te.G15<<Te.getBCHDigit(t)-Te.getBCHDigit(Te.G15);return(e<<10|t)^Te.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;Te.getBCHDigit(t)-Te.getBCHDigit(Te.G18)>=0;)t^=Te.G18<<Te.getBCHDigit(t)-Te.getBCHDigit(Te.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=1;return t},getPatternPosition:function(e){return Te.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case dt.PATTERN000:return(t+r)%2==0;case dt.PATTERN001:return t%2==0;case dt.PATTERN010:return r%3==0;case dt.PATTERN011:return(t+r)%3==0;case dt.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case dt.PATTERN101:return t*r%2+t*r%3==0;case dt.PATTERN110:return(t*r%2+t*r%3)%2==0;case dt.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new $a([1],0),r=0;r<e;r++)t=t.multiply(new $a([1,Yl.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case ze.MODE_NUMBER:return 10;case ze.MODE_ALPHA_NUM:return 9;case ze.MODE_8BIT_BYTE:return 8;case ze.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case ze.MODE_NUMBER:return 12;case ze.MODE_ALPHA_NUM:return 11;case ze.MODE_8BIT_BYTE:return 16;case ze.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case ze.MODE_NUMBER:return 14;case ze.MODE_ALPHA_NUM:return 13;case ze.MODE_8BIT_BYTE:return 16;case ze.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var o=0;o<t;o++){for(var a=0,u=e.isDark(n,o),s=-1;s<=1;s++)if(!(n+s<0||t<=n+s))for(var l=-1;l<=1;l++)o+l<0||t<=o+l||s==0&&l==0||u==e.isDark(n+s,o+l)&&a++;a>5&&(r+=3+a-5)}for(var n=0;n<t-1;n++)for(var o=0;o<t-1;o++){var i=0;e.isDark(n,o)&&i++,e.isDark(n+1,o)&&i++,e.isDark(n,o+1)&&i++,e.isDark(n+1,o+1)&&i++,(i==0||i==4)&&(r+=3)}for(var n=0;n<t;n++)for(var o=0;o<t-6;o++)e.isDark(n,o)&&!e.isDark(n,o+1)&&e.isDark(n,o+2)&&e.isDark(n,o+3)&&e.isDark(n,o+4)&&!e.isDark(n,o+5)&&e.isDark(n,o+6)&&(r+=40);for(var o=0;o<t;o++)for(var n=0;n<t-6;n++)e.isDark(n,o)&&!e.isDark(n+1,o)&&e.isDark(n+2,o)&&e.isDark(n+3,o)&&e.isDark(n+4,o)&&!e.isDark(n+5,o)&&e.isDark(n+6,o)&&(r+=40);for(var c=0,o=0;o<t;o++)for(var n=0;n<t;n++)e.isDark(n,o)&&c++;var f=Math.abs(100*c/t/t-50)/5;return r+=f*10,r}},Xl=Te,Ql=Kl,s0=Wl,c0=Vl,wt=Xl,Jl=a0;function ct(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var qe=ct.prototype;qe.addData=function(e){var t=new Ql(e);this.dataList.push(t),this.dataCache=null};qe.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]};qe.getModuleCount=function(){return this.moduleCount};qe.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=s0.getRSBlocks(e,this.errorCorrectLevel),r=new c0,n=0,o=0;o<t.length;o++)n+=t[o].dataCount;for(var o=0;o<this.dataList.length;o++){var a=this.dataList[o];r.put(a.mode,4),r.put(a.getLength(),wt.getLengthInBits(a.mode,e)),a.write(r)}if(r.getLengthInBits()<=n*8)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())};qe.makeImpl=function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=ct.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)};qe.setupPositionProbePattern=function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)};qe.getBestMaskPattern=function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=wt.getLostPoint(this);(r==0||e>n)&&(e=n,t=r)}return t};qe.createMovieClip=function(e,t,r){var n=e.createEmptyMovieClip(t,r),o=1;this.make();for(var a=0;a<this.modules.length;a++)for(var u=a*o,s=0;s<this.modules[a].length;s++){var l=s*o,i=this.modules[a][s];i&&(n.beginFill(0,100),n.moveTo(l,u),n.lineTo(l+o,u),n.lineTo(l+o,u+o),n.lineTo(l,u+o),n.endFill())}return n};qe.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)};qe.setupPositionAdjustPattern=function(){for(var e=wt.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],o=e[r];if(this.modules[n][o]==null)for(var a=-2;a<=2;a++)for(var u=-2;u<=2;u++)a==-2||a==2||u==-2||u==2||a==0&&u==0?this.modules[n+a][o+u]=!0:this.modules[n+a][o+u]=!1}};qe.setupTypeNumber=function(e){for(var t=wt.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}};qe.setupTypeInfo=function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=wt.getBCHTypeInfo(r),o=0;o<15;o++){var a=!e&&(n>>o&1)==1;o<6?this.modules[o][8]=a:o<8?this.modules[o+1][8]=a:this.modules[this.moduleCount-15+o][8]=a}for(var o=0;o<15;o++){var a=!e&&(n>>o&1)==1;o<8?this.modules[8][this.moduleCount-o-1]=a:o<9?this.modules[8][15-o-1+1]=a:this.modules[8][15-o-1]=a}this.modules[this.moduleCount-8][8]=!e};qe.mapData=function(e,t){for(var r=-1,n=this.moduleCount-1,o=7,a=0,u=this.moduleCount-1;u>0;u-=2)for(u==6&&u--;;){for(var s=0;s<2;s++)if(this.modules[n][u-s]==null){var l=!1;a<e.length&&(l=(e[a]>>>o&1)==1);var i=wt.getMask(t,n,u-s);i&&(l=!l),this.modules[n][u-s]=l,o--,o==-1&&(a++,o=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}};ct.PAD0=236;ct.PAD1=17;ct.createData=function(e,t,r){for(var n=s0.getRSBlocks(e,t),o=new c0,a=0;a<r.length;a++){var u=r[a];o.put(u.mode,4),o.put(u.getLength(),wt.getLengthInBits(u.mode,e)),u.write(o)}for(var s=0,a=0;a<n.length;a++)s+=n[a].dataCount;if(o.getLengthInBits()>s*8)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+s*8+")");for(o.getLengthInBits()+4<=s*8&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=s*8||(o.put(ct.PAD0,8),o.getLengthInBits()>=s*8));)o.put(ct.PAD1,8);return ct.createBytes(o,n)};ct.createBytes=function(e,t){for(var r=0,n=0,o=0,a=new Array(t.length),u=new Array(t.length),s=0;s<t.length;s++){var l=t[s].dataCount,i=t[s].totalCount-l;n=Math.max(n,l),o=Math.max(o,i),a[s]=new Array(l);for(var c=0;c<a[s].length;c++)a[s][c]=255&e.buffer[c+r];r+=l;var f=wt.getErrorCorrectPolynomial(i),d=new Jl(a[s],f.getLength()-1),m=d.mod(f);u[s]=new Array(f.getLength()-1);for(var c=0;c<u[s].length;c++){var v=c+m.getLength()-u[s].length;u[s][c]=v>=0?m.get(v):0}}for(var _=0,c=0;c<t.length;c++)_+=t[c].totalCount;for(var w=new Array(_),B=0,c=0;c<n;c++)for(var s=0;s<t.length;s++)c<a[s].length&&(w[B++]=a[s][c]);for(var c=0;c<o;c++)for(var s=0;s<t.length;s++)c<u[s].length&&(w[B++]=u[s][c]);return w};var Zl=ct;function bn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bn=function(r){return typeof r}:bn=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},bn(e)}function Mn(){return Mn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mn.apply(this,arguments)}function qa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function u0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qa(r,!0).forEach(function(n){Rt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qa(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pi(e,t){if(e==null)return{};var r=e8(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function e8(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function f0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l0(e,t,r){return t&&t8(e.prototype,t),e}function d0(e,t){return t&&(bn(t)==="object"||typeof t=="function")?t:xr(e)}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ln(e)}function xr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ni(e,t)}function ni(e,t){return ni=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},ni(e,t)}function Rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xe=Hr,p0=Zl,m0=n0;function g0(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n<2048?(t+=String.fromCharCode(192|n>>6),t+=String.fromCharCode(128|n&63)):n<55296||n>=57344?(t+=String.fromCharCode(224|n>>12),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|n&63)):(r++,n=65536+((n&1023)<<10|e.charCodeAt(r)&1023),t+=String.fromCharCode(240|n>>18),t+=String.fromCharCode(128|n>>12&63),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|n&63))}return t}var Ei={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},Si=4,r8=.1;function v0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[];return e.forEach(function(n,o){var a=null;n.forEach(function(u,s){if(!u&&a!==null){r.push("M".concat(a+t," ").concat(o+t,"h").concat(s-a,"v1H").concat(a+t,"z")),a=null;return}if(s===n.length-1){if(!u)return;a===null?r.push("M".concat(s+t,",").concat(o+t," h1v1H").concat(s+t,"z")):r.push("M".concat(a+t,",").concat(o+t," h").concat(s+1-a,"v1H").concat(a+t,"z"));return}u&&a===null&&(a=s)})}),r.join("")}function x0(e,t){return e.slice().map(function(r,n){return n<t.y||n>=t.y+t.h?r:r.map(function(o,a){return a<t.x||a>=t.x+t.w?o:!1})})}function y0(e,t){var r=e.imageSettings,n=e.size,o=e.includeMargin;if(r==null)return null;var a=o?Si:0,u=t.length+a*2,s=Math.floor(n*r8),l=u/n,i=(r.width||s)*l,c=(r.height||s)*l,f=r.x==null?t.length/2-i/2:r.x*l,d=r.y==null?t.length/2-c/2:r.y*l,m=null;if(r.excavate){var v=Math.floor(f),_=Math.floor(d),w=Math.ceil(i+f-v),B=Math.ceil(c+d-_);m={x:v,y:_,w,h:B}}return{x:f,y:d,h:c,w:i,excavation:m}}var n8=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),b0=function(e){h0(t,e);function t(){var r,n;f0(this,t);for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];return n=d0(this,(r=Ln(t)).call.apply(r,[this].concat(a))),Rt(xr(n),"_canvas",void 0),Rt(xr(n),"_image",void 0),Rt(xr(n),"state",{imgLoaded:!1}),Rt(xr(n),"handleImageLoad",function(){n.setState({imgLoaded:!0})}),n}return l0(t,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"componentWillReceiveProps",value:function(n){var o,a,u=(o=this.props.imageSettings)===null||o===void 0?void 0:o.src,s=(a=n.imageSettings)===null||a===void 0?void 0:a.src;u!==s&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var n=this.props,o=n.value,a=n.size,u=n.level,s=n.bgColor,l=n.fgColor,i=n.includeMargin,c=n.imageSettings,f=new p0(-1,m0[u]);if(f.addData(g0(o)),f.make(),this._canvas!=null){var d=this._canvas,m=d.getContext("2d");if(!m)return;var v=f.modules;if(v===null)return;var _=i?Si:0,w=v.length+_*2,B=y0(this.props,v);c!=null&&B!=null&&B.excavation!=null&&(v=x0(v,B.excavation));var C=window.devicePixelRatio||1;d.height=d.width=a*C;var x=a/w*C;m.scale(x,x),m.fillStyle=s,m.fillRect(0,0,w,w),m.fillStyle=l,n8?m.fill(new Path2D(v0(v,_))):v.forEach(function(P,R){P.forEach(function(y,h){y&&m.fillRect(h+_,R+_,1,1)})}),this.state.imgLoaded&&this._image&&B!=null&&m.drawImage(this._image,B.x+_,B.y+_,B.w,B.h)}}},{key:"render",value:function(){var n=this,o=this.props;o.value;var a=o.size;o.level,o.bgColor,o.fgColor;var u=o.style;o.includeMargin;var s=o.imageSettings,l=Pi(o,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),i=u0({height:a,width:a},u),c=null,f=s&&s.src;return s!=null&&f!=null&&(c=Xe.createElement("img",{src:f,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(m){return n._image=m}})),Xe.createElement(Xe.Fragment,null,Xe.createElement("canvas",Mn({style:i,height:a,width:a,ref:function(m){return n._canvas=m}},l)),c)}}]),t}(Xe.PureComponent);Rt(b0,"defaultProps",Ei);var C0=function(e){h0(t,e);function t(){return f0(this,t),d0(this,Ln(t).apply(this,arguments))}return l0(t,[{key:"render",value:function(){var n=this.props,o=n.value,a=n.size,u=n.level,s=n.bgColor,l=n.fgColor,i=n.includeMargin,c=n.imageSettings,f=Pi(n,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),d=new p0(-1,m0[u]);d.addData(g0(o)),d.make();var m=d.modules;if(m===null)return null;var v=i?Si:0,_=m.length+v*2,w=y0(this.props,m),B=null;c!=null&&w!=null&&(w.excavation!=null&&(m=x0(m,w.excavation)),B=Xe.createElement("image",{xlinkHref:c.src,height:w.h,width:w.w,x:w.x+v,y:w.y+v,preserveAspectRatio:"none"}));var C=v0(m,v);return Xe.createElement("svg",Mn({shapeRendering:"crispEdges",height:a,width:a,viewBox:"0 0 ".concat(_," ").concat(_)},f),Xe.createElement("path",{fill:s,d:"M0,0 h".concat(_,"v").concat(_,"H0z")}),Xe.createElement("path",{fill:l,d:C}),B)}}]),t}(Xe.PureComponent);Rt(C0,"defaultProps",Ei);var _0=function(t){var r=t.renderAs,n=Pi(t,["renderAs"]),o=r==="svg"?C0:b0;return Xe.createElement(o,n)};_0.defaultProps=u0({renderAs:"canvas"},Ei);var o8=_0,Eo,za;function i8(){if(za)return Eo;za=1;function e(){this.name="NoVideoInputDevicesError",this.message="No video input devices found"}return e.prototype=new Error,Eo={NoVideoInputDevicesError:e},Eo}var So,Ha;function a8(){if(Ha)return So;Ha=1;var e=i8(),t=e.NoVideoInputDevicesError;function r(a,u,s){return a.length>0?a[0].deviceId:u.length==1||s=="user"?u[0].deviceId:u[1].deviceId}var n=function(u){return u=="environment"?/rear|back|environment/ig:/front|user|face/ig};function o(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r;return new Promise(function(s,l){var i=void 0;try{i=navigator.mediaDevices.enumerateDevices()}catch{l(new t)}i.then(function(c){var f=c.filter(function(v){return v.kind=="videoinput"});if(f.length<1){l(new t);return}var d=n(a),m=f.filter(function(v){var _=v.label;return d.test(_)});s(u(m,f,a))})})}return So={getDeviceId:o,getFacingModePattern:n},So}var To,Ga;function s8(){return Ga||(Ga=1,To=function(t,r,n){var o=[];return n.forEach(function(a){t[a]!=r[a]&&o.push(a)}),o}),To}var Ro,Ka;function c8(){return Ka||(Ka=1,Ro=function(t,r){t=t||[],r=r||{};try{return new Blob(t,r)}catch(u){if(u.name!=="TypeError")throw u;for(var n=window.BlobBuilder||window.MSBlobBuilder||window.MozBlobBuilder||window.WebKitBlobBuilder,o=new n,a=0;a<t.length;a+=1)o.append(t[a]);return o.getBlob(r.type)}}),Ro}let B0=!0,w0=!0;function yr(e,t,r){const n=e.match(t);return n&&n.length>=r&&parseInt(n[r],10)}function ar(e,t,r){if(!e.RTCPeerConnection)return;const n=e.RTCPeerConnection.prototype,o=n.addEventListener;n.addEventListener=function(u,s){if(u!==t)return o.apply(this,arguments);const l=i=>{const c=r(i);c&&(s.handleEvent?s.handleEvent(c):s(c))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(s,l),o.apply(this,[u,l])};const a=n.removeEventListener;n.removeEventListener=function(u,s){if(u!==t||!this._eventMap||!this._eventMap[t])return a.apply(this,arguments);if(!this._eventMap[t].has(s))return a.apply(this,arguments);const l=this._eventMap[t].get(s);return this._eventMap[t].delete(s),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[u,l])},Object.defineProperty(n,"on"+t,{get(){return this["_on"+t]},set(u){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),u&&this.addEventListener(t,this["_on"+t]=u)},enumerable:!0,configurable:!0})}function u8(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(B0=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function f8(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(w0=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function Ti(){if(typeof window=="object"){if(B0)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function no(e,t){w0&&console.warn(e+" is deprecated, please use "+t+" instead.")}function l8(e){const t={browser:null,version:null};if(typeof e>"u"||!e.navigator)return t.browser="Not a browser.",t;const{navigator:r}=e;if(r.mozGetUserMedia)t.browser="firefox",t.version=yr(r.userAgent,/Firefox\/(\d+)\./,1);else if(r.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=yr(r.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.mediaDevices&&r.userAgent.match(/Edge\/(\d+).(\d+)$/))t.browser="edge",t.version=yr(r.userAgent,/Edge\/(\d+).(\d+)$/,2);else if(e.RTCPeerConnection&&r.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=yr(r.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function Wa(e){return Object.prototype.toString.call(e)==="[object Object]"}function k0(e){return Wa(e)?Object.keys(e).reduce(function(t,r){const n=Wa(e[r]),o=n?k0(e[r]):e[r],a=n&&!Object.keys(o).length;return o===void 0||a?t:Object.assign(t,{[r]:o})},{}):e}function oi(e,t,r){!t||r.has(t.id)||(r.set(t.id,t),Object.keys(t).forEach(n=>{n.endsWith("Id")?oi(e,e.get(t[n]),r):n.endsWith("Ids")&&t[n].forEach(o=>{oi(e,e.get(o),r)})}))}function Va(e,t,r){const n=r?"outbound-rtp":"inbound-rtp",o=new Map;if(t===null)return o;const a=[];return e.forEach(u=>{u.type==="track"&&u.trackIdentifier===t.id&&a.push(u)}),a.forEach(u=>{e.forEach(s=>{s.type===n&&s.trackId===u.id&&oi(e,s,o)})}),o}const Ya=Ti;function P0(e,t){const r=e&&e.navigator;if(!r.mediaDevices)return;const n=function(s){if(typeof s!="object"||s.mandatory||s.optional)return s;const l={};return Object.keys(s).forEach(i=>{if(i==="require"||i==="advanced"||i==="mediaSource")return;const c=typeof s[i]=="object"?s[i]:{ideal:s[i]};c.exact!==void 0&&typeof c.exact=="number"&&(c.min=c.max=c.exact);const f=function(d,m){return d?d+m.charAt(0).toUpperCase()+m.slice(1):m==="deviceId"?"sourceId":m};if(c.ideal!==void 0){l.optional=l.optional||[];let d={};typeof c.ideal=="number"?(d[f("min",i)]=c.ideal,l.optional.push(d),d={},d[f("max",i)]=c.ideal,l.optional.push(d)):(d[f("",i)]=c.ideal,l.optional.push(d))}c.exact!==void 0&&typeof c.exact!="number"?(l.mandatory=l.mandatory||{},l.mandatory[f("",i)]=c.exact):["min","max"].forEach(d=>{c[d]!==void 0&&(l.mandatory=l.mandatory||{},l.mandatory[f(d,i)]=c[d])})}),s.advanced&&(l.optional=(l.optional||[]).concat(s.advanced)),l},o=function(s,l){if(t.version>=61)return l(s);if(s=JSON.parse(JSON.stringify(s)),s&&typeof s.audio=="object"){const i=function(c,f,d){f in c&&!(d in c)&&(c[d]=c[f],delete c[f])};s=JSON.parse(JSON.stringify(s)),i(s.audio,"autoGainControl","googAutoGainControl"),i(s.audio,"noiseSuppression","googNoiseSuppression"),s.audio=n(s.audio)}if(s&&typeof s.video=="object"){let i=s.video.facingMode;i=i&&(typeof i=="object"?i:{ideal:i});const c=t.version<66;if(i&&(i.exact==="user"||i.exact==="environment"||i.ideal==="user"||i.ideal==="environment")&&!(r.mediaDevices.getSupportedConstraints&&r.mediaDevices.getSupportedConstraints().facingMode&&!c)){delete s.video.facingMode;let f;if(i.exact==="environment"||i.ideal==="environment"?f=["back","rear"]:(i.exact==="user"||i.ideal==="user")&&(f=["front"]),f)return r.mediaDevices.enumerateDevices().then(d=>{d=d.filter(v=>v.kind==="videoinput");let m=d.find(v=>f.some(_=>v.label.toLowerCase().includes(_)));return!m&&d.length&&f.includes("back")&&(m=d[d.length-1]),m&&(s.video.deviceId=i.exact?{exact:m.deviceId}:{ideal:m.deviceId}),s.video=n(s.video),Ya("chrome: "+JSON.stringify(s)),l(s)})}s.video=n(s.video)}return Ya("chrome: "+JSON.stringify(s)),l(s)},a=function(s){return t.version>=64?s:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[s.name]||s.name,message:s.message,constraint:s.constraint||s.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},u=function(s,l,i){o(s,c=>{r.webkitGetUserMedia(c,l,f=>{i&&i(a(f))})})};if(r.getUserMedia=u.bind(r),r.mediaDevices.getUserMedia){const s=r.mediaDevices.getUserMedia.bind(r.mediaDevices);r.mediaDevices.getUserMedia=function(l){return o(l,i=>s(i).then(c=>{if(i.audio&&!c.getAudioTracks().length||i.video&&!c.getVideoTracks().length)throw c.getTracks().forEach(f=>{f.stop()}),new DOMException("","NotFoundError");return c},c=>Promise.reject(a(c))))}}}function d8(e,t){if(!(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices)&&e.navigator.mediaDevices){if(typeof t!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then(o=>{const a=n.video&&n.video.width,u=n.video&&n.video.height,s=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:o,maxFrameRate:s||3}},a&&(n.video.mandatory.maxWidth=a),u&&(n.video.mandatory.maxHeight=u),e.navigator.mediaDevices.getUserMedia(n)})}}}function E0(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function S0(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(r){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=r)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=n=>{n.stream.addEventListener("addtrack",o=>{let a;e.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(s=>s.track&&s.track.id===o.track.id):a={track:o.track};const u=new Event("track");u.track=o.track,u.receiver=a,u.transceiver={receiver:a},u.streams=[n.stream],this.dispatchEvent(u)}),n.stream.getTracks().forEach(o=>{let a;e.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(s=>s.track&&s.track.id===o.id):a={track:o};const u=new Event("track");u.track=o,u.receiver=a,u.transceiver={receiver:a},u.streams=[n.stream],this.dispatchEvent(u)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else ar(e,"track",t=>(t.transceiver||Object.defineProperty(t,"transceiver",{value:{receiver:t.receiver}}),t))}function T0(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(o,a){return{track:a,get dtmf(){return this._dtmf===void 0&&(a.kind==="audio"?this._dtmf=o.createDTMFSender(a):this._dtmf=null),this._dtmf},_pc:o}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const o=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(s,l){let i=o.apply(this,arguments);return i||(i=t(this,s),this._senders.push(i)),i};const a=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(s){a.apply(this,arguments);const l=this._senders.indexOf(s);l!==-1&&this._senders.splice(l,1)}}const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(a){this._senders=this._senders||[],r.apply(this,[a]),a.getTracks().forEach(u=>{this._senders.push(t(this,u))})};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(a){this._senders=this._senders||[],n.apply(this,[a]),a.getTracks().forEach(u=>{const s=this._senders.find(l=>l.track===u);s&&this._senders.splice(this._senders.indexOf(s),1)})}}else if(typeof e=="object"&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const n=t.apply(this,[]);return n.forEach(o=>o._pc=this),n},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function R0(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[n,o,a]=arguments;if(arguments.length>0&&typeof n=="function")return t.apply(this,arguments);if(t.length===0&&(arguments.length===0||typeof n!="function"))return t.apply(this,[]);const u=function(l){const i={};return l.result().forEach(f=>{const d={id:f.id,timestamp:f.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[f.type]||f.type};f.names().forEach(m=>{d[m]=f.stat(m)}),i[d.id]=d}),i},s=function(l){return new Map(Object.keys(l).map(i=>[i,l[i]]))};if(arguments.length>=2){const l=function(i){o(s(u(i)))};return t.apply(this,[l,n])}return new Promise((l,i)=>{t.apply(this,[function(c){l(s(u(c)))},i])}).then(o,a)}}function I0(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const r=e.RTCPeerConnection.prototype.getSenders;r&&(e.RTCPeerConnection.prototype.getSenders=function(){const a=r.apply(this,[]);return a.forEach(u=>u._pc=this),a});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const a=n.apply(this,arguments);return a._pc=this,a}),e.RTCRtpSender.prototype.getStats=function(){const a=this;return this._pc.getStats().then(u=>Va(u,a.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const r=e.RTCPeerConnection.prototype.getReceivers;r&&(e.RTCPeerConnection.prototype.getReceivers=function(){const o=r.apply(this,[]);return o.forEach(a=>a._pc=this),o}),ar(e,"track",n=>(n.receiver._pc=n.srcElement,n)),e.RTCRtpReceiver.prototype.getStats=function(){const o=this;return this._pc.getStats().then(a=>Va(a,o.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const n=arguments[0];let o,a,u;return this.getSenders().forEach(s=>{s.track===n&&(o?u=!0:o=s)}),this.getReceivers().forEach(s=>(s.track===n&&(a?u=!0:a=s),s.track===n)),u||o&&a?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):o?o.getStats():a?a.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function A0(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(u=>this._shimmedLocalStreams[u][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(u,s){if(!s)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const l=t.apply(this,arguments);return this._shimmedLocalStreams[s.id]?this._shimmedLocalStreams[s.id].indexOf(l)===-1&&this._shimmedLocalStreams[s.id].push(l):this._shimmedLocalStreams[s.id]=[s,l],l};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(u){this._shimmedLocalStreams=this._shimmedLocalStreams||{},u.getTracks().forEach(i=>{if(this.getSenders().find(f=>f.track===i))throw new DOMException("Track already exists.","InvalidAccessError")});const s=this.getSenders();r.apply(this,arguments);const l=this.getSenders().filter(i=>s.indexOf(i)===-1);this._shimmedLocalStreams[u.id]=[u].concat(l)};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(u){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[u.id],n.apply(this,arguments)};const o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(u){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},u&&Object.keys(this._shimmedLocalStreams).forEach(s=>{const l=this._shimmedLocalStreams[s].indexOf(u);l!==-1&&this._shimmedLocalStreams[s].splice(l,1),this._shimmedLocalStreams[s].length===1&&delete this._shimmedLocalStreams[s]}),o.apply(this,arguments)}}function D0(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return A0(e);const r=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const c=r.apply(this);return this._reverseStreams=this._reverseStreams||{},c.map(f=>this._reverseStreams[f.id])};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(c){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},c.getTracks().forEach(f=>{if(this.getSenders().find(m=>m.track===f))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[c.id]){const f=new e.MediaStream(c.getTracks());this._streams[c.id]=f,this._reverseStreams[f.id]=c,c=f}n.apply(this,[c])};const o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(c){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[c.id]||c]),delete this._reverseStreams[this._streams[c.id]?this._streams[c.id].id:c.id],delete this._streams[c.id]},e.RTCPeerConnection.prototype.addTrack=function(c,f){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const d=[].slice.call(arguments,1);if(d.length!==1||!d[0].getTracks().find(_=>_===c))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(_=>_.track===c))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const v=this._streams[f.id];if(v)v.addTrack(c),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const _=new e.MediaStream([c]);this._streams[f.id]=_,this._reverseStreams[_.id]=f,this.addStream(_)}return this.getSenders().find(_=>_.track===c)};function a(i,c){let f=c.sdp;return Object.keys(i._reverseStreams||[]).forEach(d=>{const m=i._reverseStreams[d],v=i._streams[m.id];f=f.replace(new RegExp(v.id,"g"),m.id)}),new RTCSessionDescription({type:c.type,sdp:f})}function u(i,c){let f=c.sdp;return Object.keys(i._reverseStreams||[]).forEach(d=>{const m=i._reverseStreams[d],v=i._streams[m.id];f=f.replace(new RegExp(m.id,"g"),v.id)}),new RTCSessionDescription({type:c.type,sdp:f})}["createOffer","createAnswer"].forEach(function(i){const c=e.RTCPeerConnection.prototype[i],f={[i](){const d=arguments;return arguments.length&&typeof arguments[0]=="function"?c.apply(this,[v=>{const _=a(this,v);d[0].apply(null,[_])},v=>{d[1]&&d[1].apply(null,v)},arguments[2]]):c.apply(this,arguments).then(v=>a(this,v))}};e.RTCPeerConnection.prototype[i]=f[i]});const s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?s.apply(this,arguments):(arguments[0]=u(this,arguments[0]),s.apply(this,arguments))};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const i=l.get.apply(this);return i.type===""?i:a(this,i)}}),e.RTCPeerConnection.prototype.removeTrack=function(c){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!c._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(c._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let d;Object.keys(this._streams).forEach(m=>{this._streams[m].getTracks().find(_=>c.track===_)&&(d=this._streams[m])}),d&&(d.getTracks().length===1?this.removeStream(this._reverseStreams[d.id]):d.removeTrack(c.track),this.dispatchEvent(new Event("negotiationneeded")))}}function ii(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){const n=e.RTCPeerConnection.prototype[r],o={[r](){return arguments[0]=new(r==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[r]=o[r]})}function O0(e,t){ar(e,"negotiationneeded",r=>{const n=r.target;if(!((t.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics==="plan-b")&&n.signalingState!=="stable"))return r})}const Xa=Object.freeze(Object.defineProperty({__proto__:null,fixNegotiationNeeded:O0,shimAddTrackRemoveTrack:D0,shimAddTrackRemoveTrackWithNative:A0,shimGetDisplayMedia:d8,shimGetSendersWithDtmf:T0,shimGetStats:R0,shimGetUserMedia:P0,shimMediaStream:E0,shimOnTrack:S0,shimPeerConnection:ii,shimSenderReceiverGetStats:I0},Symbol.toStringTag,{value:"Module"}));function h8(e,t){let r=!1;return e=JSON.parse(JSON.stringify(e)),e.filter(n=>{if(n&&(n.urls||n.url)){let o=n.urls||n.url;n.url&&!n.urls&&no("RTCIceServer.url","RTCIceServer.urls");const a=typeof o=="string";return a&&(o=[o]),o=o.filter(u=>{if(u.indexOf("stun:")===0)return!1;const s=u.startsWith("turn")&&!u.startsWith("turn:[")&&u.includes("transport=udp");return s&&!r?(r=!0,!0):s&&!r}),delete n.url,n.urls=a?o[0]:o,!!o.length}})}var M0={exports:{}};(function(e){var t={};t.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},t.localCName=t.generateIdentifier(),t.splitLines=function(r){return r.trim().split(`
|
|
105
|
-
`).map(function(n){return n.trim()})},t.splitSections=function(r){var n=r.split(`
|
|
106
|
-
m=`);return n.map(function(o,a){return(a>0?"m="+o:o).trim()+`\r
|
|
107
|
-
`})},t.getDescription=function(r){var n=t.splitSections(r);return n&&n[0]},t.getMediaSections=function(r){var n=t.splitSections(r);return n.shift(),n},t.matchPrefix=function(r,n){return t.splitLines(r).filter(function(o){return o.indexOf(n)===0})},t.parseCandidate=function(r){var n;r.indexOf("a=candidate:")===0?n=r.substring(12).split(" "):n=r.substring(10).split(" ");for(var o={foundation:n[0],component:parseInt(n[1],10),protocol:n[2].toLowerCase(),priority:parseInt(n[3],10),ip:n[4],address:n[4],port:parseInt(n[5],10),type:n[7]},a=8;a<n.length;a+=2)switch(n[a]){case"raddr":o.relatedAddress=n[a+1];break;case"rport":o.relatedPort=parseInt(n[a+1],10);break;case"tcptype":o.tcpType=n[a+1];break;case"ufrag":o.ufrag=n[a+1],o.usernameFragment=n[a+1];break;default:o[n[a]]=n[a+1];break}return o},t.writeCandidate=function(r){var n=[];n.push(r.foundation),n.push(r.component),n.push(r.protocol.toUpperCase()),n.push(r.priority),n.push(r.address||r.ip),n.push(r.port);var o=r.type;return n.push("typ"),n.push(o),o!=="host"&&r.relatedAddress&&r.relatedPort&&(n.push("raddr"),n.push(r.relatedAddress),n.push("rport"),n.push(r.relatedPort)),r.tcpType&&r.protocol.toLowerCase()==="tcp"&&(n.push("tcptype"),n.push(r.tcpType)),(r.usernameFragment||r.ufrag)&&(n.push("ufrag"),n.push(r.usernameFragment||r.ufrag)),"candidate:"+n.join(" ")},t.parseIceOptions=function(r){return r.substr(14).split(" ")},t.parseRtpMap=function(r){var n=r.substr(9).split(" "),o={payloadType:parseInt(n.shift(),10)};return n=n[0].split("/"),o.name=n[0],o.clockRate=parseInt(n[1],10),o.channels=n.length===3?parseInt(n[2],10):1,o.numChannels=o.channels,o},t.writeRtpMap=function(r){var n=r.payloadType;r.preferredPayloadType!==void 0&&(n=r.preferredPayloadType);var o=r.channels||r.numChannels||1;return"a=rtpmap:"+n+" "+r.name+"/"+r.clockRate+(o!==1?"/"+o:"")+`\r
|
|
108
|
-
`},t.parseExtmap=function(r){var n=r.substr(9).split(" ");return{id:parseInt(n[0],10),direction:n[0].indexOf("/")>0?n[0].split("/")[1]:"sendrecv",uri:n[1]}},t.writeExtmap=function(r){return"a=extmap:"+(r.id||r.preferredId)+(r.direction&&r.direction!=="sendrecv"?"/"+r.direction:"")+" "+r.uri+`\r
|
|
109
|
-
`},t.parseFmtp=function(r){for(var n={},o,a=r.substr(r.indexOf(" ")+1).split(";"),u=0;u<a.length;u++)o=a[u].trim().split("="),n[o[0].trim()]=o[1];return n},t.writeFmtp=function(r){var n="",o=r.payloadType;if(r.preferredPayloadType!==void 0&&(o=r.preferredPayloadType),r.parameters&&Object.keys(r.parameters).length){var a=[];Object.keys(r.parameters).forEach(function(u){r.parameters[u]?a.push(u+"="+r.parameters[u]):a.push(u)}),n+="a=fmtp:"+o+" "+a.join(";")+`\r
|
|
110
|
-
`}return n},t.parseRtcpFb=function(r){var n=r.substr(r.indexOf(" ")+1).split(" ");return{type:n.shift(),parameter:n.join(" ")}},t.writeRtcpFb=function(r){var n="",o=r.payloadType;return r.preferredPayloadType!==void 0&&(o=r.preferredPayloadType),r.rtcpFeedback&&r.rtcpFeedback.length&&r.rtcpFeedback.forEach(function(a){n+="a=rtcp-fb:"+o+" "+a.type+(a.parameter&&a.parameter.length?" "+a.parameter:"")+`\r
|
|
111
|
-
`}),n},t.parseSsrcMedia=function(r){var n=r.indexOf(" "),o={ssrc:parseInt(r.substr(7,n-7),10)},a=r.indexOf(":",n);return a>-1?(o.attribute=r.substr(n+1,a-n-1),o.value=r.substr(a+1)):o.attribute=r.substr(n+1),o},t.parseSsrcGroup=function(r){var n=r.substr(13).split(" ");return{semantics:n.shift(),ssrcs:n.map(function(o){return parseInt(o,10)})}},t.getMid=function(r){var n=t.matchPrefix(r,"a=mid:")[0];if(n)return n.substr(6)},t.parseFingerprint=function(r){var n=r.substr(14).split(" ");return{algorithm:n[0].toLowerCase(),value:n[1]}},t.getDtlsParameters=function(r,n){var o=t.matchPrefix(r+n,"a=fingerprint:");return{role:"auto",fingerprints:o.map(t.parseFingerprint)}},t.writeDtlsParameters=function(r,n){var o="a=setup:"+n+`\r
|
|
112
|
-
`;return r.fingerprints.forEach(function(a){o+="a=fingerprint:"+a.algorithm+" "+a.value+`\r
|
|
113
|
-
`}),o},t.parseCryptoLine=function(r){var n=r.substr(9).split(" ");return{tag:parseInt(n[0],10),cryptoSuite:n[1],keyParams:n[2],sessionParams:n.slice(3)}},t.writeCryptoLine=function(r){return"a=crypto:"+r.tag+" "+r.cryptoSuite+" "+(typeof r.keyParams=="object"?t.writeCryptoKeyParams(r.keyParams):r.keyParams)+(r.sessionParams?" "+r.sessionParams.join(" "):"")+`\r
|
|
114
|
-
`},t.parseCryptoKeyParams=function(r){if(r.indexOf("inline:")!==0)return null;var n=r.substr(7).split("|");return{keyMethod:"inline",keySalt:n[0],lifeTime:n[1],mkiValue:n[2]?n[2].split(":")[0]:void 0,mkiLength:n[2]?n[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(r){return r.keyMethod+":"+r.keySalt+(r.lifeTime?"|"+r.lifeTime:"")+(r.mkiValue&&r.mkiLength?"|"+r.mkiValue+":"+r.mkiLength:"")},t.getCryptoParameters=function(r,n){var o=t.matchPrefix(r+n,"a=crypto:");return o.map(t.parseCryptoLine)},t.getIceParameters=function(r,n){var o=t.matchPrefix(r+n,"a=ice-ufrag:")[0],a=t.matchPrefix(r+n,"a=ice-pwd:")[0];return o&&a?{usernameFragment:o.substr(12),password:a.substr(10)}:null},t.writeIceParameters=function(r){return"a=ice-ufrag:"+r.usernameFragment+`\r
|
|
115
|
-
a=ice-pwd:`+r.password+`\r
|
|
116
|
-
`},t.parseRtpParameters=function(r){for(var n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},o=t.splitLines(r),a=o[0].split(" "),u=3;u<a.length;u++){var s=a[u],l=t.matchPrefix(r,"a=rtpmap:"+s+" ")[0];if(l){var i=t.parseRtpMap(l),c=t.matchPrefix(r,"a=fmtp:"+s+" ");switch(i.parameters=c.length?t.parseFmtp(c[0]):{},i.rtcpFeedback=t.matchPrefix(r,"a=rtcp-fb:"+s+" ").map(t.parseRtcpFb),n.codecs.push(i),i.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(i.name.toUpperCase());break}}}return t.matchPrefix(r,"a=extmap:").forEach(function(f){n.headerExtensions.push(t.parseExtmap(f))}),n},t.writeRtpDescription=function(r,n){var o="";o+="m="+r+" ",o+=n.codecs.length>0?"9":"0",o+=" UDP/TLS/RTP/SAVPF ",o+=n.codecs.map(function(u){return u.preferredPayloadType!==void 0?u.preferredPayloadType:u.payloadType}).join(" ")+`\r
|
|
117
|
-
`,o+=`c=IN IP4 0.0.0.0\r
|
|
118
|
-
`,o+=`a=rtcp:9 IN IP4 0.0.0.0\r
|
|
119
|
-
`,n.codecs.forEach(function(u){o+=t.writeRtpMap(u),o+=t.writeFmtp(u),o+=t.writeRtcpFb(u)});var a=0;return n.codecs.forEach(function(u){u.maxptime>a&&(a=u.maxptime)}),a>0&&(o+="a=maxptime:"+a+`\r
|
|
120
|
-
`),o+=`a=rtcp-mux\r
|
|
121
|
-
`,n.headerExtensions&&n.headerExtensions.forEach(function(u){o+=t.writeExtmap(u)}),o},t.parseRtpEncodingParameters=function(r){var n=[],o=t.parseRtpParameters(r),a=o.fecMechanisms.indexOf("RED")!==-1,u=o.fecMechanisms.indexOf("ULPFEC")!==-1,s=t.matchPrefix(r,"a=ssrc:").map(function(d){return t.parseSsrcMedia(d)}).filter(function(d){return d.attribute==="cname"}),l=s.length>0&&s[0].ssrc,i,c=t.matchPrefix(r,"a=ssrc-group:FID").map(function(d){var m=d.substr(17).split(" ");return m.map(function(v){return parseInt(v,10)})});c.length>0&&c[0].length>1&&c[0][0]===l&&(i=c[0][1]),o.codecs.forEach(function(d){if(d.name.toUpperCase()==="RTX"&&d.parameters.apt){var m={ssrc:l,codecPayloadType:parseInt(d.parameters.apt,10)};l&&i&&(m.rtx={ssrc:i}),n.push(m),a&&(m=JSON.parse(JSON.stringify(m)),m.fec={ssrc:l,mechanism:u?"red+ulpfec":"red"},n.push(m))}}),n.length===0&&l&&n.push({ssrc:l});var f=t.matchPrefix(r,"b=");return f.length&&(f[0].indexOf("b=TIAS:")===0?f=parseInt(f[0].substr(7),10):f[0].indexOf("b=AS:")===0?f=parseInt(f[0].substr(5),10)*1e3*.95-50*40*8:f=void 0,n.forEach(function(d){d.maxBitrate=f})),n},t.parseRtcpParameters=function(r){var n={},o=t.matchPrefix(r,"a=ssrc:").map(function(s){return t.parseSsrcMedia(s)}).filter(function(s){return s.attribute==="cname"})[0];o&&(n.cname=o.value,n.ssrc=o.ssrc);var a=t.matchPrefix(r,"a=rtcp-rsize");n.reducedSize=a.length>0,n.compound=a.length===0;var u=t.matchPrefix(r,"a=rtcp-mux");return n.mux=u.length>0,n},t.parseMsid=function(r){var n,o=t.matchPrefix(r,"a=msid:");if(o.length===1)return n=o[0].substr(7).split(" "),{stream:n[0],track:n[1]};var a=t.matchPrefix(r,"a=ssrc:").map(function(u){return t.parseSsrcMedia(u)}).filter(function(u){return u.attribute==="msid"});if(a.length>0)return n=a[0].value.split(" "),{stream:n[0],track:n[1]}},t.parseSctpDescription=function(r){var n=t.parseMLine(r),o=t.matchPrefix(r,"a=max-message-size:"),a;o.length>0&&(a=parseInt(o[0].substr(19),10)),isNaN(a)&&(a=65536);var u=t.matchPrefix(r,"a=sctp-port:");if(u.length>0)return{port:parseInt(u[0].substr(12),10),protocol:n.fmt,maxMessageSize:a};var s=t.matchPrefix(r,"a=sctpmap:");if(s.length>0){var l=t.matchPrefix(r,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(l[0],10),protocol:l[1],maxMessageSize:a}}},t.writeSctpDescription=function(r,n){var o=[];return r.protocol!=="DTLS/SCTP"?o=["m="+r.kind+" 9 "+r.protocol+" "+n.protocol+`\r
|
|
122
|
-
`,`c=IN IP4 0.0.0.0\r
|
|
123
|
-
`,"a=sctp-port:"+n.port+`\r
|
|
124
|
-
`]:o=["m="+r.kind+" 9 "+r.protocol+" "+n.port+`\r
|
|
125
|
-
`,`c=IN IP4 0.0.0.0\r
|
|
126
|
-
`,"a=sctpmap:"+n.port+" "+n.protocol+` 65535\r
|
|
127
|
-
`],n.maxMessageSize!==void 0&&o.push("a=max-message-size:"+n.maxMessageSize+`\r
|
|
128
|
-
`),o.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,21)},t.writeSessionBoilerplate=function(r,n,o){var a,u=n!==void 0?n:2;r?a=r:a=t.generateSessionId();var s=o||"thisisadapterortc";return`v=0\r
|
|
129
|
-
o=`+s+" "+a+" "+u+` IN IP4 127.0.0.1\r
|
|
130
|
-
s=-\r
|
|
131
|
-
t=0 0\r
|
|
132
|
-
`},t.writeMediaSection=function(r,n,o,a){var u=t.writeRtpDescription(r.kind,n);if(u+=t.writeIceParameters(r.iceGatherer.getLocalParameters()),u+=t.writeDtlsParameters(r.dtlsTransport.getLocalParameters(),o==="offer"?"actpass":"active"),u+="a=mid:"+r.mid+`\r
|
|
133
|
-
`,r.direction?u+="a="+r.direction+`\r
|
|
134
|
-
`:r.rtpSender&&r.rtpReceiver?u+=`a=sendrecv\r
|
|
135
|
-
`:r.rtpSender?u+=`a=sendonly\r
|
|
136
|
-
`:r.rtpReceiver?u+=`a=recvonly\r
|
|
137
|
-
`:u+=`a=inactive\r
|
|
138
|
-
`,r.rtpSender){var s="msid:"+a.id+" "+r.rtpSender.track.id+`\r
|
|
139
|
-
`;u+="a="+s,u+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" "+s,r.sendEncodingParameters[0].rtx&&(u+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" "+s,u+="a=ssrc-group:FID "+r.sendEncodingParameters[0].ssrc+" "+r.sendEncodingParameters[0].rtx.ssrc+`\r
|
|
140
|
-
`)}return u+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" cname:"+t.localCName+`\r
|
|
141
|
-
`,r.rtpSender&&r.sendEncodingParameters[0].rtx&&(u+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" cname:"+t.localCName+`\r
|
|
142
|
-
`),u},t.getDirection=function(r,n){for(var o=t.splitLines(r),a=0;a<o.length;a++)switch(o[a]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return o[a].substr(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(r){var n=t.splitLines(r),o=n[0].split(" ");return o[0].substr(2)},t.isRejected=function(r){return r.split(" ",2)[1]==="0"},t.parseMLine=function(r){var n=t.splitLines(r),o=n[0].substr(2).split(" ");return{kind:o[0],port:parseInt(o[1],10),protocol:o[2],fmt:o.slice(3).join(" ")}},t.parseOLine=function(r){var n=t.matchPrefix(r,"o=")[0],o=n.substr(2).split(" ");return{username:o[0],sessionId:o[1],sessionVersion:parseInt(o[2],10),netType:o[3],addressType:o[4],address:o[5]}},t.isValidSDP=function(r){if(typeof r!="string"||r.length===0)return!1;for(var n=t.splitLines(r),o=0;o<n.length;o++)if(n[o].length<2||n[o].charAt(1)!=="=")return!1;return!0},e.exports=t})(M0);var L0=M0.exports;const Cn=u3(L0);var ae=L0;function p8(e){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type}function Qa(e,t,r,n,o){var a=ae.writeRtpDescription(e.kind,t);if(a+=ae.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=ae.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),r==="offer"?"actpass":o||"active"),a+="a=mid:"+e.mid+`\r
|
|
143
|
-
`,e.rtpSender&&e.rtpReceiver?a+=`a=sendrecv\r
|
|
144
|
-
`:e.rtpSender?a+=`a=sendonly\r
|
|
145
|
-
`:e.rtpReceiver?a+=`a=recvonly\r
|
|
146
|
-
`:a+=`a=inactive\r
|
|
147
|
-
`,e.rtpSender){var u=e.rtpSender._initialTrackId||e.rtpSender.track.id;e.rtpSender._initialTrackId=u;var s="msid:"+(n?n.id:"-")+" "+u+`\r
|
|
148
|
-
`;a+="a="+s,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+s,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+s,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+`\r
|
|
149
|
-
`)}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+ae.localCName+`\r
|
|
150
|
-
`,e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+ae.localCName+`\r
|
|
151
|
-
`),a}function m8(e,t){var r=!1;return e=JSON.parse(JSON.stringify(e)),e.filter(function(n){if(n&&(n.urls||n.url)){var o=n.urls||n.url;n.url&&!n.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var a=typeof o=="string";return a&&(o=[o]),o=o.filter(function(u){var s=u.indexOf("turn:")===0&&u.indexOf("transport=udp")!==-1&&u.indexOf("turn:[")===-1&&!r;return s?(r=!0,!0):u.indexOf("stun:")===0&&t>=14393&&u.indexOf("?transport=udp")===-1}),delete n.url,n.urls=a?o[0]:o,!!o.length}})}function pn(e,t){var r={codecs:[],headerExtensions:[],fecMechanisms:[]},n=function(a,u){a=parseInt(a,10);for(var s=0;s<u.length;s++)if(u[s].payloadType===a||u[s].preferredPayloadType===a)return u[s]},o=function(a,u,s,l){var i=n(a.parameters.apt,s),c=n(u.parameters.apt,l);return i&&c&&i.name.toLowerCase()===c.name.toLowerCase()};return e.codecs.forEach(function(a){for(var u=0;u<t.codecs.length;u++){var s=t.codecs[u];if(a.name.toLowerCase()===s.name.toLowerCase()&&a.clockRate===s.clockRate){if(a.name.toLowerCase()==="rtx"&&a.parameters&&s.parameters.apt&&!o(a,s,e.codecs,t.codecs))continue;s=JSON.parse(JSON.stringify(s)),s.numChannels=Math.min(a.numChannels,s.numChannels),r.codecs.push(s),s.rtcpFeedback=s.rtcpFeedback.filter(function(l){for(var i=0;i<a.rtcpFeedback.length;i++)if(a.rtcpFeedback[i].type===l.type&&a.rtcpFeedback[i].parameter===l.parameter)return!0;return!1});break}}}),e.headerExtensions.forEach(function(a){for(var u=0;u<t.headerExtensions.length;u++){var s=t.headerExtensions[u];if(a.uri===s.uri){r.headerExtensions.push(s);break}}}),r}function Ja(e,t,r){return{offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[t][e].indexOf(r)!==-1}function Io(e,t){var r=e.getRemoteCandidates().find(function(n){return t.foundation===n.foundation&&t.ip===n.ip&&t.port===n.port&&t.priority===n.priority&&t.protocol===n.protocol&&t.type===n.type});return r||e.addRemoteCandidate(t),!r}function Ne(e,t){var r=new Error(t);return r.name=e,r.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[e],r}var g8=function(e,t){function r(l,i){i.addTrack(l),i.dispatchEvent(new e.MediaStreamTrackEvent("addtrack",{track:l}))}function n(l,i){i.removeTrack(l),i.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:l}))}function o(l,i,c,f){var d=new Event("track");d.track=i,d.receiver=c,d.transceiver={receiver:c},d.streams=f,e.setTimeout(function(){l._dispatchEvent("track",d)})}var a=function(l){var i=this,c=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(d){i[d]=c[d].bind(c)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",l=JSON.parse(JSON.stringify(l||{})),this.usingBundle=l.bundlePolicy==="max-bundle",l.rtcpMuxPolicy==="negotiate")throw Ne("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(l.rtcpMuxPolicy||(l.rtcpMuxPolicy="require"),l.iceTransportPolicy){case"all":case"relay":break;default:l.iceTransportPolicy="all";break}switch(l.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:l.bundlePolicy="balanced";break}if(l.iceServers=m8(l.iceServers||[],t),this._iceGatherers=[],l.iceCandidatePoolSize)for(var f=l.iceCandidatePoolSize;f>0;f--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:l.iceServers,gatherPolicy:l.iceTransportPolicy}));else l.iceCandidatePoolSize=0;this._config=l,this.transceivers=[],this._sdpSessionId=ae.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(a.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(a.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),a.prototype.onicecandidate=null,a.prototype.onaddstream=null,a.prototype.ontrack=null,a.prototype.onremovestream=null,a.prototype.onsignalingstatechange=null,a.prototype.oniceconnectionstatechange=null,a.prototype.onconnectionstatechange=null,a.prototype.onicegatheringstatechange=null,a.prototype.onnegotiationneeded=null,a.prototype.ondatachannel=null,a.prototype._dispatchEvent=function(l,i){this._isClosed||(this.dispatchEvent(i),typeof this["on"+l]=="function"&&this["on"+l](i))},a.prototype._emitGatheringStateChange=function(){var l=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",l)},a.prototype.getConfiguration=function(){return this._config},a.prototype.getLocalStreams=function(){return this.localStreams},a.prototype.getRemoteStreams=function(){return this.remoteStreams},a.prototype._createTransceiver=function(l,i){var c=this.transceivers.length>0,f={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:l,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&c)f.iceTransport=this.transceivers[0].iceTransport,f.dtlsTransport=this.transceivers[0].dtlsTransport;else{var d=this._createIceAndDtlsTransports();f.iceTransport=d.iceTransport,f.dtlsTransport=d.dtlsTransport}return i||this.transceivers.push(f),f},a.prototype.addTrack=function(l,i){if(this._isClosed)throw Ne("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var c=this.transceivers.find(function(m){return m.track===l});if(c)throw Ne("InvalidAccessError","Track already exists.");for(var f,d=0;d<this.transceivers.length;d++)!this.transceivers[d].track&&this.transceivers[d].kind===l.kind&&(f=this.transceivers[d]);return f||(f=this._createTransceiver(l.kind)),this._maybeFireNegotiationNeeded(),this.localStreams.indexOf(i)===-1&&this.localStreams.push(i),f.track=l,f.stream=i,f.rtpSender=new e.RTCRtpSender(l,f.dtlsTransport),f.rtpSender},a.prototype.addStream=function(l){var i=this;if(t>=15025)l.getTracks().forEach(function(f){i.addTrack(f,l)});else{var c=l.clone();l.getTracks().forEach(function(f,d){var m=c.getTracks()[d];f.addEventListener("enabled",function(v){m.enabled=v.enabled})}),c.getTracks().forEach(function(f){i.addTrack(f,c)})}},a.prototype.removeTrack=function(l){if(this._isClosed)throw Ne("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(l instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var i=this.transceivers.find(function(d){return d.rtpSender===l});if(!i)throw Ne("InvalidAccessError","Sender was not created by this connection.");var c=i.stream;i.rtpSender.stop(),i.rtpSender=null,i.track=null,i.stream=null;var f=this.transceivers.map(function(d){return d.stream});f.indexOf(c)===-1&&this.localStreams.indexOf(c)>-1&&this.localStreams.splice(this.localStreams.indexOf(c),1),this._maybeFireNegotiationNeeded()},a.prototype.removeStream=function(l){var i=this;l.getTracks().forEach(function(c){var f=i.getSenders().find(function(d){return d.track===c});f&&i.removeTrack(f)})},a.prototype.getSenders=function(){return this.transceivers.filter(function(l){return!!l.rtpSender}).map(function(l){return l.rtpSender})},a.prototype.getReceivers=function(){return this.transceivers.filter(function(l){return!!l.rtpReceiver}).map(function(l){return l.rtpReceiver})},a.prototype._createIceGatherer=function(l,i){var c=this;if(i&&l>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var f=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(f,"state",{value:"new",writable:!0}),this.transceivers[l].bufferedCandidateEvents=[],this.transceivers[l].bufferCandidates=function(d){var m=!d.candidate||Object.keys(d.candidate).length===0;f.state=m?"completed":"gathering",c.transceivers[l].bufferedCandidateEvents!==null&&c.transceivers[l].bufferedCandidateEvents.push(d)},f.addEventListener("localcandidate",this.transceivers[l].bufferCandidates),f},a.prototype._gather=function(l,i){var c=this,f=this.transceivers[i].iceGatherer;if(!f.onlocalcandidate){var d=this.transceivers[i].bufferedCandidateEvents;this.transceivers[i].bufferedCandidateEvents=null,f.removeEventListener("localcandidate",this.transceivers[i].bufferCandidates),f.onlocalcandidate=function(m){if(!(c.usingBundle&&i>0)){var v=new Event("icecandidate");v.candidate={sdpMid:l,sdpMLineIndex:i};var _=m.candidate,w=!_||Object.keys(_).length===0;if(w)(f.state==="new"||f.state==="gathering")&&(f.state="completed");else{f.state==="new"&&(f.state="gathering"),_.component=1,_.ufrag=f.getLocalParameters().usernameFragment;var B=ae.writeCandidate(_);v.candidate=Object.assign(v.candidate,ae.parseCandidate(B)),v.candidate.candidate=B,v.candidate.toJSON=function(){return{candidate:v.candidate.candidate,sdpMid:v.candidate.sdpMid,sdpMLineIndex:v.candidate.sdpMLineIndex,usernameFragment:v.candidate.usernameFragment}}}var C=ae.getMediaSections(c._localDescription.sdp);w?C[v.candidate.sdpMLineIndex]+=`a=end-of-candidates\r
|
|
152
|
-
`:C[v.candidate.sdpMLineIndex]+="a="+v.candidate.candidate+`\r
|
|
153
|
-
`,c._localDescription.sdp=ae.getDescription(c._localDescription.sdp)+C.join("");var x=c.transceivers.every(function(P){return P.iceGatherer&&P.iceGatherer.state==="completed"});c.iceGatheringState!=="gathering"&&(c.iceGatheringState="gathering",c._emitGatheringStateChange()),w||c._dispatchEvent("icecandidate",v),x&&(c._dispatchEvent("icecandidate",new Event("icecandidate")),c.iceGatheringState="complete",c._emitGatheringStateChange())}},e.setTimeout(function(){d.forEach(function(m){f.onlocalcandidate(m)})},0)}},a.prototype._createIceAndDtlsTransports=function(){var l=this,i=new e.RTCIceTransport(null);i.onicestatechange=function(){l._updateIceConnectionState(),l._updateConnectionState()};var c=new e.RTCDtlsTransport(i);return c.ondtlsstatechange=function(){l._updateConnectionState()},c.onerror=function(){Object.defineProperty(c,"state",{value:"failed",writable:!0}),l._updateConnectionState()},{iceTransport:i,dtlsTransport:c}},a.prototype._disposeIceAndDtlsTransports=function(l){var i=this.transceivers[l].iceGatherer;i&&(delete i.onlocalcandidate,delete this.transceivers[l].iceGatherer);var c=this.transceivers[l].iceTransport;c&&(delete c.onicestatechange,delete this.transceivers[l].iceTransport);var f=this.transceivers[l].dtlsTransport;f&&(delete f.ondtlsstatechange,delete f.onerror,delete this.transceivers[l].dtlsTransport)},a.prototype._transceive=function(l,i,c){var f=pn(l.localCapabilities,l.remoteCapabilities);i&&l.rtpSender&&(f.encodings=l.sendEncodingParameters,f.rtcp={cname:ae.localCName,compound:l.rtcpParameters.compound},l.recvEncodingParameters.length&&(f.rtcp.ssrc=l.recvEncodingParameters[0].ssrc),l.rtpSender.send(f)),c&&l.rtpReceiver&&f.codecs.length>0&&(l.kind==="video"&&l.recvEncodingParameters&&t<15019&&l.recvEncodingParameters.forEach(function(d){delete d.rtx}),l.recvEncodingParameters.length?f.encodings=l.recvEncodingParameters:f.encodings=[{}],f.rtcp={compound:l.rtcpParameters.compound},l.rtcpParameters.cname&&(f.rtcp.cname=l.rtcpParameters.cname),l.sendEncodingParameters.length&&(f.rtcp.ssrc=l.sendEncodingParameters[0].ssrc),l.rtpReceiver.receive(f))},a.prototype.setLocalDescription=function(l){var i=this;if(["offer","answer"].indexOf(l.type)===-1)return Promise.reject(Ne("TypeError",'Unsupported type "'+l.type+'"'));if(!Ja("setLocalDescription",l.type,i.signalingState)||i._isClosed)return Promise.reject(Ne("InvalidStateError","Can not set local "+l.type+" in state "+i.signalingState));var c,f;if(l.type==="offer")c=ae.splitSections(l.sdp),f=c.shift(),c.forEach(function(m,v){var _=ae.parseRtpParameters(m);i.transceivers[v].localCapabilities=_}),i.transceivers.forEach(function(m,v){i._gather(m.mid,v)});else if(l.type==="answer"){c=ae.splitSections(i._remoteDescription.sdp),f=c.shift();var d=ae.matchPrefix(f,"a=ice-lite").length>0;c.forEach(function(m,v){var _=i.transceivers[v],w=_.iceGatherer,B=_.iceTransport,C=_.dtlsTransport,x=_.localCapabilities,P=_.remoteCapabilities,R=ae.isRejected(m)&&ae.matchPrefix(m,"a=bundle-only").length===0;if(!R&&!_.rejected){var y=ae.getIceParameters(m,f),h=ae.getDtlsParameters(m,f);d&&(h.role="server"),(!i.usingBundle||v===0)&&(i._gather(_.mid,v),B.state==="new"&&B.start(w,y,d?"controlling":"controlled"),C.state==="new"&&C.start(h));var b=pn(x,P);i._transceive(_,b.codecs.length>0,!1)}})}return i._localDescription={type:l.type,sdp:l.sdp},l.type==="offer"?i._updateSignalingState("have-local-offer"):i._updateSignalingState("stable"),Promise.resolve()},a.prototype.setRemoteDescription=function(l){var i=this;if(["offer","answer"].indexOf(l.type)===-1)return Promise.reject(Ne("TypeError",'Unsupported type "'+l.type+'"'));if(!Ja("setRemoteDescription",l.type,i.signalingState)||i._isClosed)return Promise.reject(Ne("InvalidStateError","Can not set remote "+l.type+" in state "+i.signalingState));var c={};i.remoteStreams.forEach(function(B){c[B.id]=B});var f=[],d=ae.splitSections(l.sdp),m=d.shift(),v=ae.matchPrefix(m,"a=ice-lite").length>0,_=ae.matchPrefix(m,"a=group:BUNDLE ").length>0;i.usingBundle=_;var w=ae.matchPrefix(m,"a=ice-options:")[0];return w?i.canTrickleIceCandidates=w.substr(14).split(" ").indexOf("trickle")>=0:i.canTrickleIceCandidates=!1,d.forEach(function(B,C){var x=ae.splitLines(B),P=ae.getKind(B),R=ae.isRejected(B)&&ae.matchPrefix(B,"a=bundle-only").length===0,y=x[0].substr(2).split(" ")[2],h=ae.getDirection(B,m),b=ae.parseMsid(B),S=ae.getMid(B)||ae.generateIdentifier();if(R||P==="application"&&(y==="DTLS/SCTP"||y==="UDP/DTLS/SCTP")){i.transceivers[C]={mid:S,kind:P,protocol:y,rejected:!0};return}!R&&i.transceivers[C]&&i.transceivers[C].rejected&&(i.transceivers[C]=i._createTransceiver(P,!0));var I,$,J,oe,z,G,re,N,Z,U=ae.parseRtpParameters(B),F,q;R||(F=ae.getIceParameters(B,m),q=ae.getDtlsParameters(B,m),q.role="client"),re=ae.parseRtpEncodingParameters(B);var W=ae.parseRtcpParameters(B),te=ae.matchPrefix(B,"a=end-of-candidates",m).length>0,L=ae.matchPrefix(B,"a=candidate:").map(function(Y){return ae.parseCandidate(Y)}).filter(function(Y){return Y.component===1});if((l.type==="offer"||l.type==="answer")&&!R&&_&&C>0&&i.transceivers[C]&&(i._disposeIceAndDtlsTransports(C),i.transceivers[C].iceGatherer=i.transceivers[0].iceGatherer,i.transceivers[C].iceTransport=i.transceivers[0].iceTransport,i.transceivers[C].dtlsTransport=i.transceivers[0].dtlsTransport,i.transceivers[C].rtpSender&&i.transceivers[C].rtpSender.setTransport(i.transceivers[0].dtlsTransport),i.transceivers[C].rtpReceiver&&i.transceivers[C].rtpReceiver.setTransport(i.transceivers[0].dtlsTransport)),l.type==="offer"&&!R){I=i.transceivers[C]||i._createTransceiver(P),I.mid=S,I.iceGatherer||(I.iceGatherer=i._createIceGatherer(C,_)),L.length&&I.iceTransport.state==="new"&&(te&&(!_||C===0)?I.iceTransport.setRemoteCandidates(L):L.forEach(function(Y){Io(I.iceTransport,Y)})),N=e.RTCRtpReceiver.getCapabilities(P),t<15019&&(N.codecs=N.codecs.filter(function(Y){return Y.name!=="rtx"})),G=I.sendEncodingParameters||[{ssrc:(2*C+2)*1001}];var M=!1;if(h==="sendrecv"||h==="sendonly"){if(M=!I.rtpReceiver,z=I.rtpReceiver||new e.RTCRtpReceiver(I.dtlsTransport,P),M){var O;Z=z.track,b&&b.stream==="-"||(b?(c[b.stream]||(c[b.stream]=new e.MediaStream,Object.defineProperty(c[b.stream],"id",{get:function(){return b.stream}})),Object.defineProperty(Z,"id",{get:function(){return b.track}}),O=c[b.stream]):(c.default||(c.default=new e.MediaStream),O=c.default)),O&&(r(Z,O),I.associatedRemoteMediaStreams.push(O)),f.push([Z,z,O])}}else I.rtpReceiver&&I.rtpReceiver.track&&(I.associatedRemoteMediaStreams.forEach(function(Y){var ne=Y.getTracks().find(function(me){return me.id===I.rtpReceiver.track.id});ne&&n(ne,Y)}),I.associatedRemoteMediaStreams=[]);I.localCapabilities=N,I.remoteCapabilities=U,I.rtpReceiver=z,I.rtcpParameters=W,I.sendEncodingParameters=G,I.recvEncodingParameters=re,i._transceive(i.transceivers[C],!1,M)}else if(l.type==="answer"&&!R){I=i.transceivers[C],$=I.iceGatherer,J=I.iceTransport,oe=I.dtlsTransport,z=I.rtpReceiver,G=I.sendEncodingParameters,N=I.localCapabilities,i.transceivers[C].recvEncodingParameters=re,i.transceivers[C].remoteCapabilities=U,i.transceivers[C].rtcpParameters=W,L.length&&J.state==="new"&&((v||te)&&(!_||C===0)?J.setRemoteCandidates(L):L.forEach(function(Y){Io(I.iceTransport,Y)})),(!_||C===0)&&(J.state==="new"&&J.start($,F,"controlling"),oe.state==="new"&&oe.start(q));var X=pn(I.localCapabilities,I.remoteCapabilities),V=X.codecs.filter(function(Y){return Y.name.toLowerCase()==="rtx"}).length;!V&&I.sendEncodingParameters[0].rtx&&delete I.sendEncodingParameters[0].rtx,i._transceive(I,h==="sendrecv"||h==="recvonly",h==="sendrecv"||h==="sendonly"),z&&(h==="sendrecv"||h==="sendonly")?(Z=z.track,b?(c[b.stream]||(c[b.stream]=new e.MediaStream),r(Z,c[b.stream]),f.push([Z,z,c[b.stream]])):(c.default||(c.default=new e.MediaStream),r(Z,c.default),f.push([Z,z,c.default]))):delete I.rtpReceiver}}),i._dtlsRole===void 0&&(i._dtlsRole=l.type==="offer"?"active":"passive"),i._remoteDescription={type:l.type,sdp:l.sdp},l.type==="offer"?i._updateSignalingState("have-remote-offer"):i._updateSignalingState("stable"),Object.keys(c).forEach(function(B){var C=c[B];if(C.getTracks().length){if(i.remoteStreams.indexOf(C)===-1){i.remoteStreams.push(C);var x=new Event("addstream");x.stream=C,e.setTimeout(function(){i._dispatchEvent("addstream",x)})}f.forEach(function(P){var R=P[0],y=P[1];C.id===P[2].id&&o(i,R,y,[C])})}}),f.forEach(function(B){B[2]||o(i,B[0],B[1],[])}),e.setTimeout(function(){i&&i.transceivers&&i.transceivers.forEach(function(B){B.iceTransport&&B.iceTransport.state==="new"&&B.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),B.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},a.prototype.close=function(){this.transceivers.forEach(function(l){l.iceTransport&&l.iceTransport.stop(),l.dtlsTransport&&l.dtlsTransport.stop(),l.rtpSender&&l.rtpSender.stop(),l.rtpReceiver&&l.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},a.prototype._updateSignalingState=function(l){this.signalingState=l;var i=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",i)},a.prototype._maybeFireNegotiationNeeded=function(){var l=this;this.signalingState!=="stable"||this.needNegotiation===!0||(this.needNegotiation=!0,e.setTimeout(function(){if(l.needNegotiation){l.needNegotiation=!1;var i=new Event("negotiationneeded");l._dispatchEvent("negotiationneeded",i)}},0))},a.prototype._updateIceConnectionState=function(){var l,i={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(f){f.iceTransport&&!f.rejected&&i[f.iceTransport.state]++}),l="new",i.failed>0?l="failed":i.checking>0?l="checking":i.disconnected>0?l="disconnected":i.new>0?l="new":i.connected>0?l="connected":i.completed>0&&(l="completed"),l!==this.iceConnectionState){this.iceConnectionState=l;var c=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",c)}},a.prototype._updateConnectionState=function(){var l,i={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(f){f.iceTransport&&f.dtlsTransport&&!f.rejected&&(i[f.iceTransport.state]++,i[f.dtlsTransport.state]++)}),i.connected+=i.completed,l="new",i.failed>0?l="failed":i.connecting>0?l="connecting":i.disconnected>0?l="disconnected":i.new>0?l="new":i.connected>0&&(l="connected"),l!==this.connectionState){this.connectionState=l;var c=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",c)}},a.prototype.createOffer=function(){var l=this;if(l._isClosed)return Promise.reject(Ne("InvalidStateError","Can not call createOffer after close"));var i=l.transceivers.filter(function(v){return v.kind==="audio"}).length,c=l.transceivers.filter(function(v){return v.kind==="video"}).length,f=arguments[0];if(f){if(f.mandatory||f.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");f.offerToReceiveAudio!==void 0&&(f.offerToReceiveAudio===!0?i=1:f.offerToReceiveAudio===!1?i=0:i=f.offerToReceiveAudio),f.offerToReceiveVideo!==void 0&&(f.offerToReceiveVideo===!0?c=1:f.offerToReceiveVideo===!1?c=0:c=f.offerToReceiveVideo)}for(l.transceivers.forEach(function(v){v.kind==="audio"?(i--,i<0&&(v.wantReceive=!1)):v.kind==="video"&&(c--,c<0&&(v.wantReceive=!1))});i>0||c>0;)i>0&&(l._createTransceiver("audio"),i--),c>0&&(l._createTransceiver("video"),c--);var d=ae.writeSessionBoilerplate(l._sdpSessionId,l._sdpSessionVersion++);l.transceivers.forEach(function(v,_){var w=v.track,B=v.kind,C=v.mid||ae.generateIdentifier();v.mid=C,v.iceGatherer||(v.iceGatherer=l._createIceGatherer(_,l.usingBundle));var x=e.RTCRtpSender.getCapabilities(B);t<15019&&(x.codecs=x.codecs.filter(function(R){return R.name!=="rtx"})),x.codecs.forEach(function(R){R.name==="H264"&&R.parameters["level-asymmetry-allowed"]===void 0&&(R.parameters["level-asymmetry-allowed"]="1"),v.remoteCapabilities&&v.remoteCapabilities.codecs&&v.remoteCapabilities.codecs.forEach(function(y){R.name.toLowerCase()===y.name.toLowerCase()&&R.clockRate===y.clockRate&&(R.preferredPayloadType=y.payloadType)})}),x.headerExtensions.forEach(function(R){var y=v.remoteCapabilities&&v.remoteCapabilities.headerExtensions||[];y.forEach(function(h){R.uri===h.uri&&(R.id=h.id)})});var P=v.sendEncodingParameters||[{ssrc:(2*_+1)*1001}];w&&t>=15019&&B==="video"&&!P[0].rtx&&(P[0].rtx={ssrc:P[0].ssrc+1}),v.wantReceive&&(v.rtpReceiver=new e.RTCRtpReceiver(v.dtlsTransport,B)),v.localCapabilities=x,v.sendEncodingParameters=P}),l._config.bundlePolicy!=="max-compat"&&(d+="a=group:BUNDLE "+l.transceivers.map(function(v){return v.mid}).join(" ")+`\r
|
|
154
|
-
`),d+=`a=ice-options:trickle\r
|
|
155
|
-
`,l.transceivers.forEach(function(v,_){d+=Qa(v,v.localCapabilities,"offer",v.stream,l._dtlsRole),d+=`a=rtcp-rsize\r
|
|
156
|
-
`,v.iceGatherer&&l.iceGatheringState!=="new"&&(_===0||!l.usingBundle)&&(v.iceGatherer.getLocalCandidates().forEach(function(w){w.component=1,d+="a="+ae.writeCandidate(w)+`\r
|
|
157
|
-
`}),v.iceGatherer.state==="completed"&&(d+=`a=end-of-candidates\r
|
|
158
|
-
`))});var m=new e.RTCSessionDescription({type:"offer",sdp:d});return Promise.resolve(m)},a.prototype.createAnswer=function(){var l=this;if(l._isClosed)return Promise.reject(Ne("InvalidStateError","Can not call createAnswer after close"));if(!(l.signalingState==="have-remote-offer"||l.signalingState==="have-local-pranswer"))return Promise.reject(Ne("InvalidStateError","Can not call createAnswer in signalingState "+l.signalingState));var i=ae.writeSessionBoilerplate(l._sdpSessionId,l._sdpSessionVersion++);l.usingBundle&&(i+="a=group:BUNDLE "+l.transceivers.map(function(d){return d.mid}).join(" ")+`\r
|
|
159
|
-
`),i+=`a=ice-options:trickle\r
|
|
160
|
-
`;var c=ae.getMediaSections(l._remoteDescription.sdp).length;l.transceivers.forEach(function(d,m){if(!(m+1>c)){if(d.rejected){d.kind==="application"?d.protocol==="DTLS/SCTP"?i+=`m=application 0 DTLS/SCTP 5000\r
|
|
161
|
-
`:i+="m=application 0 "+d.protocol+` webrtc-datachannel\r
|
|
162
|
-
`:d.kind==="audio"?i+=`m=audio 0 UDP/TLS/RTP/SAVPF 0\r
|
|
163
|
-
a=rtpmap:0 PCMU/8000\r
|
|
164
|
-
`:d.kind==="video"&&(i+=`m=video 0 UDP/TLS/RTP/SAVPF 120\r
|
|
165
|
-
a=rtpmap:120 VP8/90000\r
|
|
166
|
-
`),i+=`c=IN IP4 0.0.0.0\r
|
|
167
|
-
a=inactive\r
|
|
168
|
-
a=mid:`+d.mid+`\r
|
|
169
|
-
`;return}if(d.stream){var v;d.kind==="audio"?v=d.stream.getAudioTracks()[0]:d.kind==="video"&&(v=d.stream.getVideoTracks()[0]),v&&t>=15019&&d.kind==="video"&&!d.sendEncodingParameters[0].rtx&&(d.sendEncodingParameters[0].rtx={ssrc:d.sendEncodingParameters[0].ssrc+1})}var _=pn(d.localCapabilities,d.remoteCapabilities),w=_.codecs.filter(function(B){return B.name.toLowerCase()==="rtx"}).length;!w&&d.sendEncodingParameters[0].rtx&&delete d.sendEncodingParameters[0].rtx,i+=Qa(d,_,"answer",d.stream,l._dtlsRole),d.rtcpParameters&&d.rtcpParameters.reducedSize&&(i+=`a=rtcp-rsize\r
|
|
170
|
-
`)}});var f=new e.RTCSessionDescription({type:"answer",sdp:i});return Promise.resolve(f)},a.prototype.addIceCandidate=function(l){var i=this,c;return l&&!(l.sdpMLineIndex!==void 0||l.sdpMid)?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(f,d){if(i._remoteDescription)if(!l||l.candidate==="")for(var m=0;m<i.transceivers.length&&!(!i.transceivers[m].rejected&&(i.transceivers[m].iceTransport.addRemoteCandidate({}),c=ae.getMediaSections(i._remoteDescription.sdp),c[m]+=`a=end-of-candidates\r
|
|
171
|
-
`,i._remoteDescription.sdp=ae.getDescription(i._remoteDescription.sdp)+c.join(""),i.usingBundle));m++);else{var v=l.sdpMLineIndex;if(l.sdpMid){for(var _=0;_<i.transceivers.length;_++)if(i.transceivers[_].mid===l.sdpMid){v=_;break}}var w=i.transceivers[v];if(w){if(w.rejected)return f();var B=Object.keys(l.candidate).length>0?ae.parseCandidate(l.candidate):{};if(B.protocol==="tcp"&&(B.port===0||B.port===9)||B.component&&B.component!==1)return f();if((v===0||v>0&&w.iceTransport!==i.transceivers[0].iceTransport)&&!Io(w.iceTransport,B))return d(Ne("OperationError","Can not add ICE candidate"));var C=l.candidate.trim();C.indexOf("a=")===0&&(C=C.substr(2)),c=ae.getMediaSections(i._remoteDescription.sdp),c[v]+="a="+(B.type?C:"end-of-candidates")+`\r
|
|
172
|
-
`,i._remoteDescription.sdp=ae.getDescription(i._remoteDescription.sdp)+c.join("")}else return d(Ne("OperationError","Can not add ICE candidate"))}else return d(Ne("InvalidStateError","Can not add ICE candidate without a remote description"));f()})},a.prototype.getStats=function(l){if(l&&l instanceof e.MediaStreamTrack){var i=null;if(this.transceivers.forEach(function(f){f.rtpSender&&f.rtpSender.track===l?i=f.rtpSender:f.rtpReceiver&&f.rtpReceiver.track===l&&(i=f.rtpReceiver)}),!i)throw Ne("InvalidAccessError","Invalid selector.");return i.getStats()}var c=[];return this.transceivers.forEach(function(f){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(d){f[d]&&c.push(f[d].getStats())})}),Promise.all(c).then(function(f){var d=new Map;return f.forEach(function(m){m.forEach(function(v){d.set(v.id,v)})}),d})};var u=["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"];u.forEach(function(l){var i=e[l];if(i&&i.prototype&&i.prototype.getStats){var c=i.prototype.getStats;i.prototype.getStats=function(){return c.apply(this).then(function(f){var d=new Map;return Object.keys(f).forEach(function(m){f[m].type=p8(f[m]),d.set(m,f[m])}),d})}}});var s=["createOffer","createAnswer"];return s.forEach(function(l){var i=a.prototype[l];a.prototype[l]=function(){var c=arguments;return typeof c[0]=="function"||typeof c[1]=="function"?i.apply(this,[arguments[2]]).then(function(f){typeof c[0]=="function"&&c[0].apply(null,[f])},function(f){typeof c[1]=="function"&&c[1].apply(null,[f])}):i.apply(this,arguments)}}),s=["setLocalDescription","setRemoteDescription","addIceCandidate"],s.forEach(function(l){var i=a.prototype[l];a.prototype[l]=function(){var c=arguments;return typeof c[1]=="function"||typeof c[2]=="function"?i.apply(this,arguments).then(function(){typeof c[1]=="function"&&c[1].apply(null)},function(f){typeof c[2]=="function"&&c[2].apply(null,[f])}):i.apply(this,arguments)}}),["getStats"].forEach(function(l){var i=a.prototype[l];a.prototype[l]=function(){var c=arguments;return typeof c[1]=="function"?i.apply(this,arguments).then(function(){typeof c[1]=="function"&&c[1].apply(null)}):i.apply(this,arguments)}}),a};const v8=u3(g8);function N0(e){const t=e&&e.navigator,r=function(o){return{name:{PermissionDeniedError:"NotAllowedError"}[o.name]||o.name,message:o.message,constraint:o.constraint,toString(){return this.name}}},n=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(o){return n(o).catch(a=>Promise.reject(r(a)))}}function U0(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator)))}function ai(e,t){if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(o){return o}),e.RTCSessionDescription||(e.RTCSessionDescription=function(o){return o}),t.version<15025)){const n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set(o){n.set.call(this,o);const a=new Event("enabled");a.enabled=o,this.dispatchEvent(a)}})}e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)&&Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=new e.RTCDtmfSender(this):this.track.kind==="video"&&(this._dtmf=null)),this._dtmf}}),e.RTCDtmfSender&&!e.RTCDTMFSender&&(e.RTCDTMFSender=e.RTCDtmfSender);const r=v8(e,t.version);e.RTCPeerConnection=function(o){return o&&o.iceServers&&(o.iceServers=h8(o.iceServers,t.version),Ti("ICE servers after filtering:",o.iceServers)),new r(o)},e.RTCPeerConnection.prototype=r.prototype}function F0(e){e.RTCRtpSender&&!("replaceTrack"in e.RTCRtpSender.prototype)&&(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}const Za=Object.freeze(Object.defineProperty({__proto__:null,shimGetDisplayMedia:U0,shimGetUserMedia:N0,shimPeerConnection:ai,shimReplaceTrack:F0},Symbol.toStringTag,{value:"Module"}));function j0(e,t){const r=e&&e.navigator,n=e&&e.MediaStreamTrack;if(r.getUserMedia=function(o,a,u){no("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),r.mediaDevices.getUserMedia(o).then(a,u)},!(t.version>55&&"autoGainControl"in r.mediaDevices.getSupportedConstraints())){const o=function(u,s,l){s in u&&!(l in u)&&(u[l]=u[s],delete u[s])},a=r.mediaDevices.getUserMedia.bind(r.mediaDevices);if(r.mediaDevices.getUserMedia=function(u){return typeof u=="object"&&typeof u.audio=="object"&&(u=JSON.parse(JSON.stringify(u)),o(u.audio,"autoGainControl","mozAutoGainControl"),o(u.audio,"noiseSuppression","mozNoiseSuppression")),a(u)},n&&n.prototype.getSettings){const u=n.prototype.getSettings;n.prototype.getSettings=function(){const s=u.apply(this,arguments);return o(s,"mozAutoGainControl","autoGainControl"),o(s,"mozNoiseSuppression","noiseSuppression"),s}}if(n&&n.prototype.applyConstraints){const u=n.prototype.applyConstraints;n.prototype.applyConstraints=function(s){return this.kind==="audio"&&typeof s=="object"&&(s=JSON.parse(JSON.stringify(s)),o(s,"autoGainControl","mozAutoGainControl"),o(s,"noiseSuppression","mozNoiseSuppression")),u.apply(this,[s])}}}}function x8(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){const o=new DOMException("getDisplayMedia without video constraints is undefined");return o.name="NotFoundError",o.code=8,Promise.reject(o)}return n.video===!0?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}function $0(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function si(e,t){if(typeof e!="object"||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(o){const a=e.RTCPeerConnection.prototype[o],u={[o](){return arguments[0]=new(o==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),a.apply(this,arguments)}};e.RTCPeerConnection.prototype[o]=u[o]});const r={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[a,u,s]=arguments;return n.apply(this,[a||null]).then(l=>{if(t.version<53&&!u)try{l.forEach(i=>{i.type=r[i.type]||i.type})}catch(i){if(i.name!=="TypeError")throw i;l.forEach((c,f)=>{l.set(f,Object.assign({},c,{type:r[c.type]||c.type}))})}return l}).then(u,s)}}function q0(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const o=t.apply(this,[]);return o.forEach(a=>a._pc=this),o});const r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){const o=r.apply(this,arguments);return o._pc=this,o}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function z0(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const n=t.apply(this,[]);return n.forEach(o=>o._pc=this),n}),ar(e,"track",r=>(r.receiver._pc=r.srcElement,r)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function H0(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(r){no("removeStream","removeTrack"),this.getSenders().forEach(n=>{n.track&&r.getTracks().includes(n.track)&&this.removeTrack(n)})})}function G0(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function K0(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const n=arguments[1],o=n&&"sendEncodings"in n;o&&n.sendEncodings.forEach(u=>{if("rid"in u&&!/^[a-z0-9]{0,16}$/i.test(u.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in u&&!(parseFloat(u.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in u&&!(parseFloat(u.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const a=t.apply(this,arguments);if(o){const{sender:u}=a,s=u.getParameters();(!("encodings"in s)||s.encodings.length===1&&Object.keys(s.encodings[0]).length===0)&&(s.encodings=n.sendEncodings,u.sendEncodings=n.sendEncodings,this.setParametersPromises.push(u.setParameters(s).then(()=>{delete u.sendEncodings}).catch(()=>{delete u.sendEncodings})))}return a})}function W0(e){if(!(typeof e=="object"&&e.RTCRtpSender))return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const n=t.apply(this,arguments);return"encodings"in n||(n.encodings=[].concat(this.sendEncodings||[{}])),n})}function V0(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function Y0(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}const e3=Object.freeze(Object.defineProperty({__proto__:null,shimAddTransceiver:K0,shimCreateAnswer:Y0,shimCreateOffer:V0,shimGetDisplayMedia:x8,shimGetParameters:W0,shimGetUserMedia:j0,shimOnTrack:$0,shimPeerConnection:si,shimRTCDataChannel:G0,shimReceiverGetStats:z0,shimRemoveStream:H0,shimSenderGetStats:q0},Symbol.toStringTag,{value:"Module"}));function X0(e){if(!(typeof e!="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(n){this._localStreams||(this._localStreams=[]),this._localStreams.includes(n)||this._localStreams.push(n),n.getAudioTracks().forEach(o=>t.call(this,o,n)),n.getVideoTracks().forEach(o=>t.call(this,o,n))},e.RTCPeerConnection.prototype.addTrack=function(n,...o){return o&&o.forEach(a=>{this._localStreams?this._localStreams.includes(a)||this._localStreams.push(a):this._localStreams=[a]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(r){this._localStreams||(this._localStreams=[]);const n=this._localStreams.indexOf(r);if(n===-1)return;this._localStreams.splice(n,1);const o=r.getTracks();this.getSenders().forEach(a=>{o.includes(a.track)&&this.removeTrack(a)})})}}function Q0(e){if(!(typeof e!="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(r){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=r),this.addEventListener("track",this._onaddstreampoly=n=>{n.streams.forEach(o=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(o))return;this._remoteStreams.push(o);const a=new Event("addstream");a.stream=o,this.dispatchEvent(a)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const n=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(o){o.streams.forEach(a=>{if(n._remoteStreams||(n._remoteStreams=[]),n._remoteStreams.indexOf(a)>=0)return;n._remoteStreams.push(a);const u=new Event("addstream");u.stream=a,n.dispatchEvent(u)})}),t.apply(n,arguments)}}}function J0(e){if(typeof e!="object"||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,r=t.createOffer,n=t.createAnswer,o=t.setLocalDescription,a=t.setRemoteDescription,u=t.addIceCandidate;t.createOffer=function(i,c){const f=arguments.length>=2?arguments[2]:arguments[0],d=r.apply(this,[f]);return c?(d.then(i,c),Promise.resolve()):d},t.createAnswer=function(i,c){const f=arguments.length>=2?arguments[2]:arguments[0],d=n.apply(this,[f]);return c?(d.then(i,c),Promise.resolve()):d};let s=function(l,i,c){const f=o.apply(this,[l]);return c?(f.then(i,c),Promise.resolve()):f};t.setLocalDescription=s,s=function(l,i,c){const f=a.apply(this,[l]);return c?(f.then(i,c),Promise.resolve()):f},t.setRemoteDescription=s,s=function(l,i,c){const f=u.apply(this,[l]);return c?(f.then(i,c),Promise.resolve()):f},t.addIceCandidate=s}function Z0(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const r=t.mediaDevices,n=r.getUserMedia.bind(r);t.mediaDevices.getUserMedia=o=>n(ec(o))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(n,o,a){t.mediaDevices.getUserMedia(n).then(o,a)}).bind(t))}function ec(e){return e&&e.video!==void 0?Object.assign({},e,{video:k0(e.video)}):e}function tc(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(n,o){if(n&&n.iceServers){const a=[];for(let u=0;u<n.iceServers.length;u++){let s=n.iceServers[u];!s.hasOwnProperty("urls")&&s.hasOwnProperty("url")?(no("RTCIceServer.url","RTCIceServer.urls"),s=JSON.parse(JSON.stringify(s)),s.urls=s.url,delete s.url,a.push(s)):a.push(n.iceServers[u])}n.iceServers=a}return new t(n,o)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get(){return t.generateCertificate}})}function rc(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function nc(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(n){if(n){typeof n.offerToReceiveAudio<"u"&&(n.offerToReceiveAudio=!!n.offerToReceiveAudio);const o=this.getTransceivers().find(u=>u.receiver.track.kind==="audio");n.offerToReceiveAudio===!1&&o?o.direction==="sendrecv"?o.setDirection?o.setDirection("sendonly"):o.direction="sendonly":o.direction==="recvonly"&&(o.setDirection?o.setDirection("inactive"):o.direction="inactive"):n.offerToReceiveAudio===!0&&!o&&this.addTransceiver("audio"),typeof n.offerToReceiveVideo<"u"&&(n.offerToReceiveVideo=!!n.offerToReceiveVideo);const a=this.getTransceivers().find(u=>u.receiver.track.kind==="video");n.offerToReceiveVideo===!1&&a?a.direction==="sendrecv"?a.setDirection?a.setDirection("sendonly"):a.direction="sendonly":a.direction==="recvonly"&&(a.setDirection?a.setDirection("inactive"):a.direction="inactive"):n.offerToReceiveVideo===!0&&!a&&this.addTransceiver("video")}return t.apply(this,arguments)}}function oc(e){typeof e!="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}const t3=Object.freeze(Object.defineProperty({__proto__:null,shimAudioContext:oc,shimCallbacksAPI:J0,shimConstraints:ec,shimCreateOfferLegacy:nc,shimGetUserMedia:Z0,shimLocalStreamsAPI:X0,shimRTCIceServerUrls:tc,shimRemoteStreamsAPI:Q0,shimTrackEventTransceiver:rc},Symbol.toStringTag,{value:"Module"}));function _n(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(n){if(typeof n=="object"&&n.candidate&&n.candidate.indexOf("a=")===0&&(n=JSON.parse(JSON.stringify(n)),n.candidate=n.candidate.substr(2)),n.candidate&&n.candidate.length){const o=new t(n),a=Cn.parseCandidate(n.candidate),u=Object.assign(o,a);return u.toJSON=function(){return{candidate:u.candidate,sdpMid:u.sdpMid,sdpMLineIndex:u.sdpMLineIndex,usernameFragment:u.usernameFragment}},u}return new t(n)},e.RTCIceCandidate.prototype=t.prototype,ar(e,"icecandidate",r=>(r.candidate&&Object.defineProperty(r,"candidate",{value:new e.RTCIceCandidate(r.candidate),writable:"false"}),r))}function br(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp}});const r=function(s){if(!s||!s.sdp)return!1;const l=Cn.splitSections(s.sdp);return l.shift(),l.some(i=>{const c=Cn.parseMLine(i);return c&&c.kind==="application"&&c.protocol.indexOf("SCTP")!==-1})},n=function(s){const l=s.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(l===null||l.length<2)return-1;const i=parseInt(l[1],10);return i!==i?-1:i},o=function(s){let l=65536;return t.browser==="firefox"&&(t.version<57?s===-1?l=16384:l=2147483637:t.version<60?l=t.version===57?65535:65536:l=2147483637),l},a=function(s,l){let i=65536;t.browser==="firefox"&&t.version===57&&(i=65535);const c=Cn.matchPrefix(s.sdp,"a=max-message-size:");return c.length>0?i=parseInt(c[0].substr(19),10):t.browser==="firefox"&&l!==-1&&(i=2147483637),i},u=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,t.browser==="chrome"&&t.version>=76){const{sdpSemantics:l}=this.getConfiguration();l==="plan-b"&&Object.defineProperty(this,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp},enumerable:!0,configurable:!0})}if(r(arguments[0])){const l=n(arguments[0]),i=o(l),c=a(arguments[0],l);let f;i===0&&c===0?f=Number.POSITIVE_INFINITY:i===0||c===0?f=Math.max(i,c):f=Math.min(i,c);const d={};Object.defineProperty(d,"maxMessageSize",{get(){return f}}),this._sctp=d}return u.apply(this,arguments)}}function Cr(e){if(!(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype))return;function t(n,o){const a=n.send;n.send=function(){const s=arguments[0],l=s.length||s.size||s.byteLength;if(n.readyState==="open"&&o.sctp&&l>o.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+o.sctp.maxMessageSize+" bytes)");return a.apply(n,arguments)}}const r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const o=r.apply(this,arguments);return t(o,this),o},ar(e,"datachannel",n=>(t(n.channel,n.target),n))}function ci(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(r){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),r&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=r)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(r=>{const n=t[r];t[r]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=o=>{const a=o.target;if(a._lastConnectionState!==a.connectionState){a._lastConnectionState=a.connectionState;const u=new Event("connectionstatechange",o);a.dispatchEvent(u)}return o},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function ui(e,t){if(!e.RTCPeerConnection||t.browser==="chrome"&&t.version>=71||t.browser==="safari"&&t.version>=605)return;const r=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(o){if(o&&o.sdp&&o.sdp.indexOf(`
|
|
173
|
-
a=extmap-allow-mixed`)!==-1){const a=o.sdp.split(`
|
|
174
|
-
`).filter(u=>u.trim()!=="a=extmap-allow-mixed").join(`
|
|
175
|
-
`);e.RTCSessionDescription&&o instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:o.type,sdp:a}):o.sdp=a}return r.apply(this,arguments)}}function Bn(e,t){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;const r=e.RTCPeerConnection.prototype.addIceCandidate;!r||r.length===0||(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(t.browser==="chrome"&&t.version<78||t.browser==="firefox"&&t.version<68||t.browser==="safari")&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():r.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}const y8=Object.freeze(Object.defineProperty({__proto__:null,removeExtmapAllowMixed:ui,shimAddIceCandidateNullOrEmpty:Bn,shimConnectionState:ci,shimMaxMessageSize:br,shimRTCIceCandidate:_n,shimSendThrowTypeError:Cr},Symbol.toStringTag,{value:"Module"}));function b8({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0}){const r=Ti,n=l8(e),o={browserDetails:n,commonShim:y8,extractVersion:yr,disableLog:u8,disableWarnings:f8};switch(n.browser){case"chrome":if(!Xa||!ii||!t.shimChrome)return r("Chrome shim is not included in this adapter release."),o;if(n.version===null)return r("Chrome shim can not determine version, not shimming."),o;r("adapter.js shimming chrome."),o.browserShim=Xa,Bn(e,n),P0(e,n),E0(e),ii(e,n),S0(e),D0(e,n),T0(e),R0(e),I0(e),O0(e,n),_n(e),ci(e),br(e,n),Cr(e),ui(e,n);break;case"firefox":if(!e3||!si||!t.shimFirefox)return r("Firefox shim is not included in this adapter release."),o;r("adapter.js shimming firefox."),o.browserShim=e3,Bn(e,n),j0(e,n),si(e,n),$0(e),H0(e),q0(e),z0(e),G0(e),K0(e),W0(e),V0(e),Y0(e),_n(e),ci(e),br(e,n),Cr(e);break;case"edge":if(!Za||!ai||!t.shimEdge)return r("MS edge shim is not included in this adapter release."),o;r("adapter.js shimming edge."),o.browserShim=Za,N0(e),U0(e),ai(e,n),F0(e),br(e,n),Cr(e);break;case"safari":if(!t3||!t.shimSafari)return r("Safari shim is not included in this adapter release."),o;r("adapter.js shimming safari."),o.browserShim=t3,Bn(e,n),tc(e),nc(e),J0(e),X0(e),Q0(e),rc(e),Z0(e),oc(e),_n(e),br(e,n),Cr(e),ui(e,n);break;default:r("Unsupported browser!");break}return o}b8({window:typeof window>"u"?void 0:window});var Ao,r3;function C8(){if(r3)return Ao;r3=1;var e=Object.assign||function(w){for(var B=1;B<arguments.length;B++){var C=arguments[B];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(w[x]=C[x])}return w},t=function(){function w(B,C){for(var x=0;x<C.length;x++){var P=C[x];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(B,P.key,P)}}return function(B,C,x){return C&&w(B.prototype,C),x&&w(B,x),B}}(),r,n;function o(w,B){if(!(w instanceof B))throw new TypeError("Cannot call a class as a function")}function a(w,B){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:w}function u(w,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);w.prototype=Object.create(B&&B.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(w,B):w.__proto__=B)}var s=Hr,l=s.Component,i=xi,c=a8(),f=c.getDeviceId;c.getFacingModePattern;var d=s8(),m=c8(),v=m([`!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.jsQR=e():o.jsQR=e()}("undefined"!=typeof self?self:this,function(){return function(o){function e(t){if(r[t])return r[t].exports;var c=r[t]={i:t,l:!1,exports:{}};return o[t].call(c.exports,c,c.exports,e),c.l=!0,c.exports}var r={};return e.m=o,e.c=r,e.d=function(o,r,t){e.o(o,r)||Object.defineProperty(o,r,{configurable:!1,enumerable:!0,get:t})},e.n=function(o){var r=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(r,"a",r),r},e.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},e.p="",e(e.s=3)}([function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function o(o,e){this.width=e,this.height=o.length/e,this.data=o}return o.createEmpty=function(e,r){return new o(new Uint8ClampedArray(e*r),e)},o.prototype.get=function(o,e){return!(o<0||o>=this.width||e<0||e>=this.height)&&!!this.data[e*this.width+o]},o.prototype.set=function(o,e,r){this.data[e*this.width+o]=r?1:0},o.prototype.setRegion=function(o,e,r,t,c){for(var s=e;s<e+t;s++)for(var a=o;a<o+r;a++)this.set(a,s,!!c)},o}();e.BitMatrix=t},function(o,e,r){"use strict";function t(o,e){return o^e}Object.defineProperty(e,"__esModule",{value:!0});var c=r(2);e.addOrSubtractGF=t;var s=function(){function o(o,e,r){this.primitive=o,this.size=e,this.generatorBase=r,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var t=1,s=0;s<this.size;s++)this.expTable[s]=t,(t*=2)>=this.size&&(t=(t^this.primitive)&this.size-1);for(var s=0;s<this.size-1;s++)this.logTable[this.expTable[s]]=s;this.zero=new c.default(this,Uint8ClampedArray.from([0])),this.one=new c.default(this,Uint8ClampedArray.from([1]))}return o.prototype.multiply=function(o,e){return 0===o||0===e?0:this.expTable[(this.logTable[o]+this.logTable[e])%(this.size-1)]},o.prototype.inverse=function(o){if(0===o)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[o]-1]},o.prototype.buildMonomial=function(o,e){if(o<0)throw new Error("Invalid monomial degree less than 0");if(0===e)return this.zero;var r=new Uint8ClampedArray(o+1);return r[0]=e,new c.default(this,r)},o.prototype.log=function(o){if(0===o)throw new Error("Can't take log(0)");return this.logTable[o]},o.prototype.exp=function(o){return this.expTable[o]},o}();e.default=s},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=r(1),c=function(){function o(o,e){if(0===e.length)throw new Error("No coefficients.");this.field=o;var r=e.length;if(r>1&&0===e[0]){for(var t=1;t<r&&0===e[t];)t++;if(t===r)this.coefficients=o.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(r-t);for(var c=0;c<this.coefficients.length;c++)this.coefficients[c]=e[t+c]}}else this.coefficients=e}return o.prototype.degree=function(){return this.coefficients.length-1},o.prototype.isZero=function(){return 0===this.coefficients[0]},o.prototype.getCoefficient=function(o){return this.coefficients[this.coefficients.length-1-o]},o.prototype.addOrSubtract=function(e){if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,c=e.coefficients;r.length>c.length&&(n=[c,r],r=n[0],c=n[1]);for(var s=new Uint8ClampedArray(c.length),a=c.length-r.length,d=0;d<a;d++)s[d]=c[d];for(var d=a;d<c.length;d++)s[d]=t.addOrSubtractGF(r[d-a],c[d]);return new o(this.field,s);var n},o.prototype.multiply=function(e){if(0===e)return this.field.zero;if(1===e)return this;for(var r=this.coefficients.length,t=new Uint8ClampedArray(r),c=0;c<r;c++)t[c]=this.field.multiply(this.coefficients[c],e);return new o(this.field,t)},o.prototype.multiplyPoly=function(e){if(this.isZero()||e.isZero())return this.field.zero;for(var r=this.coefficients,c=r.length,s=e.coefficients,a=s.length,d=new Uint8ClampedArray(c+a-1),n=0;n<c;n++)for(var l=r[n],i=0;i<a;i++)d[n+i]=t.addOrSubtractGF(d[n+i],this.field.multiply(l,s[i]));return new o(this.field,d)},o.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Error("Invalid degree less than 0");if(0===r)return this.field.zero;for(var t=this.coefficients.length,c=new Uint8ClampedArray(t+e),s=0;s<t;s++)c[s]=this.field.multiply(this.coefficients[s],r);return new o(this.field,c)},o.prototype.evaluateAt=function(o){var e=0;if(0===o)return this.getCoefficient(0);var r=this.coefficients.length;if(1===o)return this.coefficients.forEach(function(o){e=t.addOrSubtractGF(e,o)}),e;e=this.coefficients[0];for(var c=1;c<r;c++)e=t.addOrSubtractGF(this.field.multiply(o,e),this.coefficients[c]);return e},o}();e.default=c},function(o,e,r){"use strict";function t(o){var e=n.locate(o);if(!e)return null;var r=d.extract(o,e),t=a.decode(r.matrix);return t?{binaryData:t.bytes,data:t.text,chunks:t.chunks,location:{topRightCorner:r.mappingFunction(e.dimension,0),topLeftCorner:r.mappingFunction(0,0),bottomRightCorner:r.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:r.mappingFunction(0,e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern}}:null}function c(o,e,r,c){void 0===c&&(c={});var a=l;Object.keys(a||{}).forEach(function(o){a[o]=c[o]||a[o]});var d="attemptBoth"===a.inversionAttempts||"invertFirst"===a.inversionAttempts,n="onlyInvert"===a.inversionAttempts||"invertFirst"===a.inversionAttempts,i=s.binarize(o,e,r,d),B=i.binarized,k=i.inverted,u=t(n?k:B);return u||"attemptBoth"!==a.inversionAttempts&&"invertFirst"!==a.inversionAttempts||(u=t(n?B:k)),u}Object.defineProperty(e,"__esModule",{value:!0});var s=r(4),a=r(5),d=r(11),n=r(12),l={inversionAttempts:"attemptBoth"};c.default=c,e.default=c},function(o,e,r){"use strict";function t(o,e,r){return o<e?e:o>r?r:o}function c(o,e,r,c){if(o.length!==e*r*4)throw new Error("Malformed data passed to binarizer.");for(var l=new n(e,r),i=0;i<e;i++)for(var B=0;B<r;B++){var k=o[4*(B*e+i)+0],u=o[4*(B*e+i)+1],C=o[4*(B*e+i)+2];l.set(i,B,.2126*k+.7152*u+.0722*C)}for(var m=Math.ceil(e/a),f=Math.ceil(r/a),w=new n(m,f),P=0;P<f;P++)for(var v=0;v<m;v++){for(var h=0,p=1/0,y=0,B=0;B<a;B++)for(var i=0;i<a;i++){var b=l.get(v*a+i,P*a+B);h+=b,p=Math.min(p,b),y=Math.max(y,b)}var g=h/Math.pow(a,2);if(y-p<=d&&(g=p/2,P>0&&v>0)){var x=(w.get(v,P-1)+2*w.get(v-1,P)+w.get(v-1,P-1))/4;p<x&&(g=x)}w.set(v,P,g)}var M=s.BitMatrix.createEmpty(e,r),L=null;c&&(L=s.BitMatrix.createEmpty(e,r));for(var P=0;P<f;P++)for(var v=0;v<m;v++){for(var N=t(v,2,m-3),I=t(P,2,f-3),h=0,O=-2;O<=2;O++)for(var z=-2;z<=2;z++)h+=w.get(N+O,I+z);for(var S=h/25,O=0;O<a;O++)for(var z=0;z<a;z++){var i=v*a+O,B=P*a+z,X=l.get(i,B);M.set(i,B,X<=S),c&&L.set(i,B,!(X<=S))}}return c?{binarized:M,inverted:L}:{binarized:M}}Object.defineProperty(e,"__esModule",{value:!0});var s=r(0),a=8,d=24,n=function(){function o(o,e){this.width=o,this.data=new Uint8ClampedArray(o*e)}return o.prototype.get=function(o,e){return this.data[e*this.width+o]},o.prototype.set=function(o,e,r){this.data[e*this.width+o]=r},o}();e.binarize=c},function(o,e,r){"use strict";function t(o,e){for(var r=o^e,t=0;r;)t++,r&=r-1;return t}function c(o,e){return e<<1|o}function s(o){var e=17+4*o.versionNumber,r=k.BitMatrix.createEmpty(e,e);r.setRegion(0,0,9,9,!0),r.setRegion(e-8,0,8,9,!0),r.setRegion(0,e-8,9,8,!0);for(var t=0,c=o.alignmentPatternCenters;t<c.length;t++)for(var s=c[t],a=0,d=o.alignmentPatternCenters;a<d.length;a++){var n=d[a];6===s&&6===n||6===s&&n===e-7||s===e-7&&6===n||r.setRegion(s-2,n-2,5,5,!0)}return r.setRegion(6,9,1,e-17,!0),r.setRegion(9,6,e-17,1,!0),o.versionNumber>6&&(r.setRegion(e-11,0,3,6,!0),r.setRegion(0,e-11,6,3,!0)),r}function a(o,e,r){for(var t=w[r.dataMask],a=o.height,d=s(e),n=[],l=0,i=0,B=!0,k=a-1;k>0;k-=2){6===k&&k--;for(var u=0;u<a;u++)for(var C=B?a-1-u:u,m=0;m<2;m++){var f=k-m;if(!d.get(f,C)){i++;var P=o.get(f,C);t({y:C,x:f})&&(P=!P),l=c(P,l),8===i&&(n.push(l),i=0,l=0)}}B=!B}return n}function d(o){var e=o.height,r=Math.floor((e-17)/4);if(r<=6)return m.VERSIONS[r-1];for(var s=0,a=5;a>=0;a--)for(var d=e-9;d>=e-11;d--)s=c(o.get(d,a),s);for(var n=0,d=5;d>=0;d--)for(var a=e-9;a>=e-11;a--)n=c(o.get(d,a),n);for(var l,i=1/0,B=0,k=m.VERSIONS;B<k.length;B++){var u=k[B];if(u.infoBits===s||u.infoBits===n)return u;var C=t(s,u.infoBits);C<i&&(l=u,i=C),C=t(n,u.infoBits),C<i&&(l=u,i=C)}return i<=3?l:void 0}function n(o){for(var e=0,r=0;r<=8;r++)6!==r&&(e=c(o.get(r,8),e));for(var s=7;s>=0;s--)6!==s&&(e=c(o.get(8,s),e));for(var a=o.height,d=0,s=a-1;s>=a-7;s--)d=c(o.get(8,s),d);for(var r=a-8;r<a;r++)d=c(o.get(r,8),d);for(var n=1/0,l=null,i=0,B=f;i<B.length;i++){var k=B[i],u=k.bits,C=k.formatInfo;if(u===e||u===d)return C;var m=t(e,u);m<n&&(l=C,n=m),e!==d&&(m=t(d,u))<n&&(l=C,n=m)}return n<=3?l:null}function l(o,e,r){var t=e.errorCorrectionLevels[r],c=[],s=0;if(t.ecBlocks.forEach(function(o){for(var e=0;e<o.numBlocks;e++)c.push({numDataCodewords:o.dataCodewordsPerBlock,codewords:[]}),s+=o.dataCodewordsPerBlock+t.ecCodewordsPerBlock}),o.length<s)return null;o=o.slice(0,s);for(var a=t.ecBlocks[0].dataCodewordsPerBlock,d=0;d<a;d++)for(var n=0,l=c;n<l.length;n++){var i=l[n];i.codewords.push(o.shift())}if(t.ecBlocks.length>1)for(var B=t.ecBlocks[0].numBlocks,k=t.ecBlocks[1].numBlocks,d=0;d<k;d++)c[B+d].codewords.push(o.shift());for(;o.length>0;)for(var u=0,C=c;u<C.length;u++){var i=C[u];i.codewords.push(o.shift())}return c}function i(o){var e=d(o);if(!e)return null;var r=n(o);if(!r)return null;var t=a(o,e,r),c=l(t,e,r.errorCorrectionLevel);if(!c)return null;for(var s=c.reduce(function(o,e){return o+e.numDataCodewords},0),i=new Uint8ClampedArray(s),B=0,k=0,m=c;k<m.length;k++){var f=m[k],w=C.decode(f.codewords,f.codewords.length-f.numDataCodewords);if(!w)return null;for(var P=0;P<f.numDataCodewords;P++)i[B++]=w[P]}try{return u.decode(i,e.versionNumber)}catch(o){return null}}function B(o){if(null==o)return null;var e=i(o);if(e)return e;for(var r=0;r<o.width;r++)for(var t=r+1;t<o.height;t++)o.get(r,t)!==o.get(t,r)&&(o.set(r,t,!o.get(r,t)),o.set(t,r,!o.get(t,r)));return i(o)}Object.defineProperty(e,"__esModule",{value:!0});var k=r(0),u=r(6),C=r(9),m=r(10),f=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],w=[function(o){return(o.y+o.x)%2==0},function(o){return o.y%2==0},function(o){return o.x%3==0},function(o){return(o.y+o.x)%3==0},function(o){return(Math.floor(o.y/2)+Math.floor(o.x/3))%2==0},function(o){return o.x*o.y%2+o.x*o.y%3==0},function(o){return(o.y*o.x%2+o.y*o.x%3)%2==0},function(o){return((o.y+o.x)%2+o.y*o.x%3)%2==0}];e.decode=B},function(o,e,r){"use strict";function t(o,e){for(var r=[],t="",c=[10,12,14][e],s=o.readBits(c);s>=3;){var a=o.readBits(10);if(a>=1e3)throw new Error("Invalid numeric value above 999");var d=Math.floor(a/100),n=Math.floor(a/10)%10,l=a%10;r.push(48+d,48+n,48+l),t+=d.toString()+n.toString()+l.toString(),s-=3}if(2===s){var a=o.readBits(7);if(a>=100)throw new Error("Invalid numeric value above 99");var d=Math.floor(a/10),n=a%10;r.push(48+d,48+n),t+=d.toString()+n.toString()}else if(1===s){var a=o.readBits(4);if(a>=10)throw new Error("Invalid numeric value above 9");r.push(48+a),t+=a.toString()}return{bytes:r,text:t}}function c(o,e){for(var r=[],t="",c=[9,11,13][e],s=o.readBits(c);s>=2;){var a=o.readBits(11),d=Math.floor(a/45),n=a%45;r.push(k[d].charCodeAt(0),k[n].charCodeAt(0)),t+=k[d]+k[n],s-=2}if(1===s){var d=o.readBits(6);r.push(k[d].charCodeAt(0)),t+=k[d]}return{bytes:r,text:t}}function s(o,e){for(var r=[],t="",c=[8,16,16][e],s=o.readBits(c),a=0;a<s;a++){var d=o.readBits(8);r.push(d)}try{t+=decodeURIComponent(r.map(function(o){return"%"+("0"+o.toString(16)).substr(-2)}).join(""))}catch(o){}return{bytes:r,text:t}}function a(o,e){for(var r=[],t="",c=[8,10,12][e],s=o.readBits(c),a=0;a<s;a++){var d=o.readBits(13),n=Math.floor(d/192)<<8|d%192;n+=n<7936?33088:49472,r.push(n>>8,255&n),t+=String.fromCharCode(i.shiftJISTable[n])}return{bytes:r,text:t}}function d(o,e){for(var r=new l.BitStream(o),d=e<=9?0:e<=26?1:2,i={text:"",bytes:[],chunks:[]};r.available()>=4;){var k=r.readBits(4);if(k===B.Terminator)return i;if(k===B.ECI)0===r.readBits(1)?i.chunks.push({type:n.ECI,assignmentNumber:r.readBits(7)}):0===r.readBits(1)?i.chunks.push({type:n.ECI,assignmentNumber:r.readBits(14)}):0===r.readBits(1)?i.chunks.push({type:n.ECI,assignmentNumber:r.readBits(21)}):i.chunks.push({type:n.ECI,assignmentNumber:-1});else if(k===B.Numeric){var u=t(r,d);i.text+=u.text,(w=i.bytes).push.apply(w,u.bytes),i.chunks.push({type:n.Numeric,text:u.text})}else if(k===B.Alphanumeric){var C=c(r,d);i.text+=C.text,(P=i.bytes).push.apply(P,C.bytes),i.chunks.push({type:n.Alphanumeric,text:C.text})}else if(k===B.Byte){var m=s(r,d);i.text+=m.text,(v=i.bytes).push.apply(v,m.bytes),i.chunks.push({type:n.Byte,bytes:m.bytes,text:m.text})}else if(k===B.Kanji){var f=a(r,d);i.text+=f.text,(h=i.bytes).push.apply(h,f.bytes),i.chunks.push({type:n.Kanji,bytes:f.bytes,text:f.text})}}var w,P,v,h}Object.defineProperty(e,"__esModule",{value:!0});var n,l=r(7),i=r(8);!function(o){o.Numeric="numeric",o.Alphanumeric="alphanumeric",o.Byte="byte",o.Kanji="kanji",o.ECI="eci"}(n=e.Mode||(e.Mode={}));var B;!function(o){o[o.Terminator=0]="Terminator",o[o.Numeric=1]="Numeric",o[o.Alphanumeric=2]="Alphanumeric",o[o.Byte=4]="Byte",o[o.Kanji=8]="Kanji",o[o.ECI=7]="ECI"}(B||(B={}));var k=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];e.decode=d},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function o(o){this.byteOffset=0,this.bitOffset=0,this.bytes=o}return o.prototype.readBits=function(o){if(o<1||o>32||o>this.available())throw new Error("Cannot read "+o.toString()+" bits");var e=0;if(this.bitOffset>0){var r=8-this.bitOffset,t=o<r?o:r,c=r-t,s=255>>8-t<<c;e=(this.bytes[this.byteOffset]&s)>>c,o-=t,this.bitOffset+=t,8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(o>0){for(;o>=8;)e=e<<8|255&this.bytes[this.byteOffset],this.byteOffset++,o-=8;if(o>0){var c=8-o,s=255>>c<<c;e=e<<o|(this.bytes[this.byteOffset]&s)>>c,this.bitOffset+=o}}return e},o.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},o}();e.BitStream=t},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,
|
|
176
|
-
36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,
|
|
177
|
-
39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,
|
|
178
|
-
59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}},function(o,e,r){"use strict";function t(o,e,r,t){e.degree()<r.degree()&&(w=[r,e],e=w[0],r=w[1]);for(var c=e,s=r,a=o.zero,d=o.one;s.degree()>=t/2;){var n=c,l=a;if(c=s,a=d,c.isZero())return null;s=n;for(var i=o.zero,B=c.getCoefficient(c.degree()),k=o.inverse(B);s.degree()>=c.degree()&&!s.isZero();){var u=s.degree()-c.degree(),C=o.multiply(s.getCoefficient(s.degree()),k);i=i.addOrSubtract(o.buildMonomial(u,C)),s=s.addOrSubtract(c.multiplyByMonomial(u,C))}if(d=i.multiplyPoly(a).addOrSubtract(l),s.degree()>=c.degree())return null}var m=d.getCoefficient(0);if(0===m)return null;var f=o.inverse(m);return[d.multiply(f),s.multiply(f)];var w}function c(o,e){var r=e.degree();if(1===r)return[e.getCoefficient(1)];for(var t=new Array(r),c=0,s=1;s<o.size&&c<r;s++)0===e.evaluateAt(s)&&(t[c]=o.inverse(s),c++);return c!==r?null:t}function s(o,e,r){for(var t=r.length,c=new Array(t),s=0;s<t;s++){for(var a=o.inverse(r[s]),n=1,l=0;l<t;l++)s!==l&&(n=o.multiply(n,d.addOrSubtractGF(1,o.multiply(r[l],a))));c[s]=o.multiply(e.evaluateAt(a),o.inverse(n)),0!==o.generatorBase&&(c[s]=o.multiply(c[s],a))}return c}function a(o,e){var r=new Uint8ClampedArray(o.length);r.set(o);for(var a=new d.default(285,256,0),l=new n.default(a,r),i=new Uint8ClampedArray(e),B=!1,k=0;k<e;k++){var u=l.evaluateAt(a.exp(k+a.generatorBase));i[i.length-1-k]=u,0!==u&&(B=!0)}if(!B)return r;var C=new n.default(a,i),m=t(a,a.buildMonomial(e,1),C,e);if(null===m)return null;var f=c(a,m[0]);if(null==f)return null;for(var w=s(a,m[1],f),P=0;P<f.length;P++){var v=r.length-1-a.log(f[P]);if(v<0)return null;r[v]=d.addOrSubtractGF(r[v],w[P])}return r}Object.defineProperty(e,"__esModule",{value:!0});var d=r(1),n=r(2);e.decode=a},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]},function(o,e,r){"use strict";function t(o,e,r,t){var c=o.x-e.x+r.x-t.x,s=o.y-e.y+r.y-t.y;if(0===c&&0===s)return{a11:e.x-o.x,a12:e.y-o.y,a13:0,a21:r.x-e.x,a22:r.y-e.y,a23:0,a31:o.x,a32:o.y,a33:1};var a=e.x-r.x,d=t.x-r.x,n=e.y-r.y,l=t.y-r.y,i=a*l-d*n,B=(c*l-d*s)/i,k=(a*s-c*n)/i;return{a11:e.x-o.x+B*e.x,a12:e.y-o.y+B*e.y,a13:B,a21:t.x-o.x+k*t.x,a22:t.y-o.y+k*t.y,a23:k,a31:o.x,a32:o.y,a33:1}}function c(o,e,r,c){var s=t(o,e,r,c);return{a11:s.a22*s.a33-s.a23*s.a32,a12:s.a13*s.a32-s.a12*s.a33,a13:s.a12*s.a23-s.a13*s.a22,a21:s.a23*s.a31-s.a21*s.a33,a22:s.a11*s.a33-s.a13*s.a31,a23:s.a13*s.a21-s.a11*s.a23,a31:s.a21*s.a32-s.a22*s.a31,a32:s.a12*s.a31-s.a11*s.a32,a33:s.a11*s.a22-s.a12*s.a21}}function s(o,e){return{a11:o.a11*e.a11+o.a21*e.a12+o.a31*e.a13,a12:o.a12*e.a11+o.a22*e.a12+o.a32*e.a13,a13:o.a13*e.a11+o.a23*e.a12+o.a33*e.a13,a21:o.a11*e.a21+o.a21*e.a22+o.a31*e.a23,a22:o.a12*e.a21+o.a22*e.a22+o.a32*e.a23,a23:o.a13*e.a21+o.a23*e.a22+o.a33*e.a23,a31:o.a11*e.a31+o.a21*e.a32+o.a31*e.a33,a32:o.a12*e.a31+o.a22*e.a32+o.a32*e.a33,a33:o.a13*e.a31+o.a23*e.a32+o.a33*e.a33}}function a(o,e){for(var r=c({x:3.5,y:3.5},{x:e.dimension-3.5,y:3.5},{x:e.dimension-6.5,y:e.dimension-6.5},{x:3.5,y:e.dimension-3.5}),a=t(e.topLeft,e.topRight,e.alignmentPattern,e.bottomLeft),n=s(a,r),l=d.BitMatrix.createEmpty(e.dimension,e.dimension),i=function(o,e){var r=n.a13*o+n.a23*e+n.a33;return{x:(n.a11*o+n.a21*e+n.a31)/r,y:(n.a12*o+n.a22*e+n.a32)/r}},B=0;B<e.dimension;B++)for(var k=0;k<e.dimension;k++){var u=k+.5,C=B+.5,m=i(u,C);l.set(k,B,o.get(Math.floor(m.x),Math.floor(m.y)))}return{matrix:l,mappingFunction:i}}Object.defineProperty(e,"__esModule",{value:!0});var d=r(0);e.extract=a},function(o,e,r){"use strict";function t(o){return o.reduce(function(o,e){return o+e})}function c(o,e,r){var t,c,s,a=C(o,e),d=C(e,r),n=C(o,r);return d>=a&&d>=n?(l=[e,o,r],t=l[0],c=l[1],s=l[2]):n>=d&&n>=a?(i=[o,e,r],t=i[0],c=i[1],s=i[2]):(B=[o,r,e],t=B[0],c=B[1],s=B[2]),(s.x-c.x)*(t.y-c.y)-(s.y-c.y)*(t.x-c.x)<0&&(k=[s,t],t=k[0],s=k[1]),{bottomLeft:t,topLeft:c,topRight:s};var l,i,B,k}function s(o,e,r,c){var s=(t(d(o,r,c,5))/7+t(d(o,e,c,5))/7+t(d(r,o,c,5))/7+t(d(e,o,c,5))/7)/4;if(s<1)throw new Error("Invalid module size");var a=Math.round(C(o,e)/s),n=Math.round(C(o,r)/s),l=Math.floor((a+n)/2)+7;switch(l%4){case 0:l++;break;case 2:l--}return{dimension:l,moduleSize:s}}function a(o,e,r,t){var c,s,a,d,n=[{x:Math.floor(o.x),y:Math.floor(o.y)}],l=Math.abs(e.y-o.y)>Math.abs(e.x-o.x);l?(c=Math.floor(o.y),s=Math.floor(o.x),a=Math.floor(e.y),d=Math.floor(e.x)):(c=Math.floor(o.x),s=Math.floor(o.y),a=Math.floor(e.x),d=Math.floor(e.y));for(var i=Math.abs(a-c),B=Math.abs(d-s),k=Math.floor(-i/2),u=c<a?1:-1,m=s<d?1:-1,f=!0,w=c,P=s;w!==a+u;w+=u){var v=l?P:w,h=l?w:P;if(r.get(v,h)!==f&&(f=!f,n.push({x:v,y:h}),n.length===t+1))break;if((k+=B)>0){if(P===d)break;P+=m,k-=i}}for(var p=[],y=0;y<t;y++)n[y]&&n[y+1]?p.push(C(n[y],n[y+1])):p.push(0);return p}function d(o,e,r,t){var c=e.y-o.y,s=e.x-o.x,d=a(o,e,r,Math.ceil(t/2)),n=a(o,{x:o.x-s,y:o.y-c},r,Math.ceil(t/2)),l=d.shift()+n.shift()-1;return(i=n.concat(l)).concat.apply(i,d);var i}function n(o,e){var r=t(o)/t(e),c=0;return e.forEach(function(e,t){c+=Math.pow(o[t]-e*r,2)}),{averageSize:r,error:c}}function l(o,e,r){try{var t=d(o,{x:-1,y:o.y},r,e.length),c=d(o,{x:o.x,y:-1},r,e.length),s={x:Math.max(0,o.x-o.y)-1,y:Math.max(0,o.y-o.x)-1},a=d(o,s,r,e.length),l={x:Math.min(r.width,o.x+o.y)+1,y:Math.min(r.height,o.y+o.x)+1},i=d(o,l,r,e.length),B=n(t,e),k=n(c,e),u=n(a,e),C=n(i,e),m=Math.sqrt(B.error*B.error+k.error*k.error+u.error*u.error+C.error*C.error),f=(B.averageSize+k.averageSize+u.averageSize+C.averageSize)/4;return m+(Math.pow(B.averageSize-f,2)+Math.pow(k.averageSize-f,2)+Math.pow(u.averageSize-f,2)+Math.pow(C.averageSize-f,2))/f}catch(o){return 1/0}}function i(o){for(var e=[],r=[],a=[],d=[],n=0;n<=o.height;n++)!function(c){for(var s=0,n=!1,l=[0,0,0,0,0],i=-1;i<=o.width;i++)!function(e){var a=o.get(e,c);if(a===n)s++;else{l=[l[1],l[2],l[3],l[4],s],s=1,n=a;var i=t(l)/7,B=Math.abs(l[0]-i)<i&&Math.abs(l[1]-i)<i&&Math.abs(l[2]-3*i)<3*i&&Math.abs(l[3]-i)<i&&Math.abs(l[4]-i)<i&&!a,C=t(l.slice(-3))/3,m=Math.abs(l[2]-C)<C&&Math.abs(l[3]-C)<C&&Math.abs(l[4]-C)<C&&a;if(B){var f=e-l[3]-l[4],w=f-l[2],P={startX:w,endX:f,y:c},v=r.filter(function(o){return w>=o.bottom.startX&&w<=o.bottom.endX||f>=o.bottom.startX&&w<=o.bottom.endX||w<=o.bottom.startX&&f>=o.bottom.endX&&l[2]/(o.bottom.endX-o.bottom.startX)<u&&l[2]/(o.bottom.endX-o.bottom.startX)>k});v.length>0?v[0].bottom=P:r.push({top:P,bottom:P})}if(m){var h=e-l[4],p=h-l[3],P={startX:p,y:c,endX:h},v=d.filter(function(o){return p>=o.bottom.startX&&p<=o.bottom.endX||h>=o.bottom.startX&&p<=o.bottom.endX||p<=o.bottom.startX&&h>=o.bottom.endX&&l[2]/(o.bottom.endX-o.bottom.startX)<u&&l[2]/(o.bottom.endX-o.bottom.startX)>k});v.length>0?v[0].bottom=P:d.push({top:P,bottom:P})}}}(i);e.push.apply(e,r.filter(function(o){return o.bottom.y!==c&&o.bottom.y-o.top.y>=2})),r=r.filter(function(o){return o.bottom.y===c}),a.push.apply(a,d.filter(function(o){return o.bottom.y!==c})),d=d.filter(function(o){return o.bottom.y===c})}(n);e.push.apply(e,r.filter(function(o){return o.bottom.y-o.top.y>=2})),a.push.apply(a,d);var i=e.filter(function(o){return o.bottom.y-o.top.y>=2}).map(function(e){var r=(e.top.startX+e.top.endX+e.bottom.startX+e.bottom.endX)/4,c=(e.top.y+e.bottom.y+1)/2;if(o.get(Math.round(r),Math.round(c))){
|
|
179
|
-
var s=[e.top.endX-e.top.startX,e.bottom.endX-e.bottom.startX,e.bottom.y-e.top.y+1],a=t(s)/s.length;return{score:l({x:Math.round(r),y:Math.round(c)},[1,1,3,1,1],o),x:r,y:c,size:a}}}).filter(function(o){return!!o}).sort(function(o,e){return o.score-e.score}).map(function(o,e,r){if(e>B)return null;var t=r.filter(function(o,r){return e!==r}).map(function(e){return{x:e.x,y:e.y,score:e.score+Math.pow(e.size-o.size,2)/o.size,size:e.size}}).sort(function(o,e){return o.score-e.score});if(t.length<2)return null;var c=o.score+t[0].score+t[1].score;return{points:[o].concat(t.slice(0,2)),score:c}}).filter(function(o){return!!o}).sort(function(o,e){return o.score-e.score});if(0===i.length)return null;var m,f,w=c(i[0].points[0],i[0].points[1],i[0].points[2]),P=w.topRight,v=w.topLeft,h=w.bottomLeft;try{L=s(v,P,h,o),m=L.dimension,f=L.moduleSize}catch(o){return null}var p={x:P.x-v.x+h.x,y:P.y-v.y+h.y},y=(C(v,h)+C(v,P))/2/f,b=1-3/y,g={x:v.x+b*(p.x-v.x),y:v.y+b*(p.y-v.y)},x=a.map(function(e){var r=(e.top.startX+e.top.endX+e.bottom.startX+e.bottom.endX)/4,c=(e.top.y+e.bottom.y+1)/2;if(o.get(Math.floor(r),Math.floor(c))){var s=[e.top.endX-e.top.startX,e.bottom.endX-e.bottom.startX,e.bottom.y-e.top.y+1];t(s);return{x:r,y:c,score:l({x:Math.floor(r),y:Math.floor(c)},[1,1,1],o)+C({x:r,y:c},g)}}}).filter(function(o){return!!o}).sort(function(o,e){return o.score-e.score}),M=y>=15&&x.length?x[0]:g;return{alignmentPattern:{x:M.x,y:M.y},bottomLeft:{x:h.x,y:h.y},dimension:m,topLeft:{x:v.x,y:v.y},topRight:{x:P.x,y:P.y}};var L}Object.defineProperty(e,"__esModule",{value:!0});var B=4,k=.5,u=1.5,C=function(o,e){return Math.sqrt(Math.pow(e.x-o.x,2)+Math.pow(e.y-o.y,2))};e.locate=i}]).default}),self.addEventListener("message",function(o){var e=jsQR(o.data.data,o.data.width,o.data.height);e?postMessage(e.data):postMessage(null)});`],{type:"application/javascript"}),_=["delay","legacyMode","facingMode"];return Ao=(n=r=function(w){u(B,w);function B(C){o(this,B);var x=a(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,C));return x.els={},x.state={mirrorVideo:!1},x.initiate=x.initiate.bind(x),x.initiateLegacyMode=x.initiateLegacyMode.bind(x),x.check=x.check.bind(x),x.handleVideo=x.handleVideo.bind(x),x.handleLoadStart=x.handleLoadStart.bind(x),x.handleInputChange=x.handleInputChange.bind(x),x.clearComponent=x.clearComponent.bind(x),x.handleReaderLoad=x.handleReaderLoad.bind(x),x.openImageDialog=x.openImageDialog.bind(x),x.handleWorkerMessage=x.handleWorkerMessage.bind(x),x.setRefFactory=x.setRefFactory.bind(x),x}return t(B,[{key:"componentDidMount",value:function(){this.worker=new Worker(URL.createObjectURL(v)),this.worker.onmessage=this.handleWorkerMessage,this.props.legacyMode?this.initiateLegacyMode():this.initiate()}},{key:"componentWillReceiveProps",value:function(x){var P=d(this.props,x,_),R=!0,y=!1,h=void 0;try{for(var b=P[Symbol.iterator](),S;!(R=(S=b.next()).done);R=!0){var I=S.value;if(I=="facingMode"){this.clearComponent(),this.initiate(x);break}else if(I=="delay")this.props.delay==!1&&!x.legacyMode&&(this.timeout=setTimeout(this.check,x.delay)),x.delay==!1&&clearTimeout(this.timeout);else if(I=="legacyMode"){this.props.legacyMode&&!x.legacyMode?(this.clearComponent(),this.initiate(x)):(this.clearComponent(),this.componentDidUpdate=this.initiateLegacyMode);break}}}catch($){y=!0,h=$}finally{try{!R&&b.return&&b.return()}finally{if(y)throw h}}}},{key:"shouldComponentUpdate",value:function(x,P){if(P!==this.state)return!0;var R=d(this.props,x,_);return R.length>0}},{key:"componentWillUnmount",value:function(){this.worker&&(this.worker.terminate(),this.worker=void 0),this.clearComponent()}},{key:"clearComponent",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0),this.stopCamera&&this.stopCamera(),this.reader&&this.reader.removeEventListener("load",this.handleReaderLoad),this.els.img&&this.els.img.removeEventListener("load",this.check)}},{key:"initiate",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,P=x.onError,R=x.facingMode,y=/firefox/i.test(navigator.userAgent),h={};navigator.mediaDevices&&typeof navigator.mediaDevices.getSupportedConstraints=="function"&&(h=navigator.mediaDevices.getSupportedConstraints());var b={};h.facingMode&&(b.facingMode={ideal:R}),h.frameRate&&(b.frameRate={ideal:25,min:10});var S=h.facingMode||y?Promise.resolve(x.constraints||b):f(R).then(function(I){return Object.assign({},{deviceId:I},x.constraints)});S.then(function(I){return navigator.mediaDevices.getUserMedia({video:I})}).then(this.handleVideo).catch(P)}},{key:"handleVideo",value:function(x){var P=this.els.preview,R=this.props.facingMode;if(!P)return setTimeout(this.handleVideo,200,x);(P||{}).srcObject!==void 0?P.srcObject=x:P.mozSrcObject!==void 0?P.mozSrcObject=x:window.URL.createObjectURL?P.src=window.URL.createObjectURL(x):window.webkitURL?P.src=window.webkitURL.createObjectURL(x):P.src=x,P.playsInline=!0;var y=x.getTracks()[0];this.stopCamera=y.stop.bind(y),P.addEventListener("loadstart",this.handleLoadStart),this.setState({mirrorVideo:R=="user",streamLabel:y.label})}},{key:"handleLoadStart",value:function(){var x=this.props,P=x.delay,R=x.onLoad,y=this.state,h=y.mirrorVideo,b=y.streamLabel,S=this.els.preview;S.play(),typeof R=="function"&&R({mirrorVideo:h,streamLabel:b}),typeof P=="number"&&(this.timeout=setTimeout(this.check,P)),S.removeEventListener("loadstart",this.handleLoadStart)}},{key:"check",value:function(){var x=this.props,P=x.legacyMode,R=x.resolution,y=x.delay,h=this.els,b=h.preview,S=h.canvas,I=h.img,$=Math.floor(P?I.naturalWidth:b.videoWidth),J=Math.floor(P?I.naturalHeight:b.videoHeight),oe=0,z=0;if(P){var G=$>J?$:J,re=R/G;J=re*J,$=re*$,S.width=$,S.height=J}else{var N=$<J?$:J,Z=R/N;J=Z*J,$=Z*$,z=(J-R)/2*-1,oe=($-R)/2*-1,S.width=R,S.height=R}var U=b&&b.readyState===b.HAVE_ENOUGH_DATA;if(P||U){var F=S.getContext("2d");F.drawImage(P?I:b,oe,z,$,J);var q=F.getImageData(0,0,S.width,S.height);this.worker.postMessage(q)}else this.timeout=setTimeout(this.check,y)}},{key:"handleWorkerMessage",value:function(x){var P=this.props,R=P.onScan,y=P.legacyMode,h=P.delay,b=x.data;R(b||null),!y&&typeof h=="number"&&this.worker&&(this.timeout=setTimeout(this.check,h))}},{key:"initiateLegacyMode",value:function(){this.reader=new FileReader,this.reader.addEventListener("load",this.handleReaderLoad),this.els.img.addEventListener("load",this.check,!1),this.componentDidUpdate=void 0,typeof this.props.onLoad=="function"&&this.props.onLoad()}},{key:"handleInputChange",value:function(x){var P=x.target.files[0];this.reader.readAsDataURL(P)}},{key:"handleReaderLoad",value:function(x){this.els.img.src=x.target.result}},{key:"openImageDialog",value:function(){this.els.input.click()}},{key:"setRefFactory",value:function(x){var P=this;return function(R){P.els[x]=R}}},{key:"render",value:function(){var x=this.props,P=x.style,R=x.className,y=x.onImageLoad,h=x.legacyMode,b=x.showViewFinder;x.facingMode;var S={overflow:"hidden",position:"relative",width:"100%",paddingTop:"100%"},I={display:"none"},$={top:0,left:0,display:"block",position:"absolute",overflow:"hidden",width:"100%",height:"100%"},J=e({},$,{objectFit:"cover",transform:this.state.mirrorVideo?"scaleX(-1)":void 0}),oe=e({},$,{objectFit:"scale-down"}),z={top:0,left:0,zIndex:1,boxSizing:"border-box",border:"50px solid rgba(0, 0, 0, 0.3)",boxShadow:"inset 0 0 0 5px rgba(255, 0, 0, 0.5)",position:"absolute",width:"100%",height:"100%"};return s.createElement("section",{className:R,style:P},s.createElement("section",{style:S},!h&&b?s.createElement("div",{style:z}):null,h?s.createElement("input",{style:I,type:"file",accept:"image/*",ref:this.setRefFactory("input"),onChange:this.handleInputChange}):null,h?s.createElement("img",{style:oe,ref:this.setRefFactory("img"),onLoad:y}):s.createElement("video",{style:J,ref:this.setRefFactory("preview")}),s.createElement("canvas",{style:I,ref:this.setRefFactory("canvas")})))}}]),B}(l),r.propTypes={onScan:i.func.isRequired,onError:i.func.isRequired,onLoad:i.func,onImageLoad:i.func,delay:i.oneOfType([i.number,i.bool]),facingMode:i.oneOf(["user","environment"]),legacyMode:i.bool,resolution:i.number,showViewFinder:i.bool,style:i.any,className:i.string,constraints:i.object},r.defaultProps={delay:500,resolution:600,facingMode:"environment",showViewFinder:!0,constraints:null},n),Ao}(function(e){function t(z){return z&&typeof z=="object"&&"default"in z?z.default:z}Object.defineProperty(e,"__esModule",{value:!0});var r=t(c3),n=Hr,o=t(n),a=t(i1),u=uc,s=Hl,l=t(o8),i=ut;const c=({size:z=200,data:G="",ecl:re="L"})=>o.createElement(l,{value:G,size:z,level:re});var f,d,m;(f=e.ReadStatus||(e.ReadStatus={})).canceled="canceled",f.success="success",(d=e.PlayStatus||(e.PlayStatus={})).canceled="canceled",d.success="success",(m=e.SupportedResult||(e.SupportedResult={})).UR_BYTES="bytes",m.UR_CRYPTO_HDKEY="crypto-hdkey",m.UR_CRYPTO_ACCOUNT="crypto-account",m.UR_ETH_SIGN_REQUEST="eth-sign-request",m.UR_ETH_SIGNATURE="eth-signature",m.UR_CRYPTO_MULTI_ACCOUNTS="crypto-multi-accounts",m.UR_SOL_SIGN_REQUEST="sol-sign-request",m.UR_SOL_SIGNATURE="sol-signature";const v={minWidth:"16rem",height:"3rem",background:"#784FFE",borderColor:"grey",borderRadius:"8px",borderWidth:1,color:"white",outline:"none",margin:2},_=z=>{const{onClick:G,children:re}=z;return o.createElement("button",{onClick:G,style:v},re)},w=z=>o.createElement("div",{style:{width:"100%",marginTop:"1rem",display:"flex",flexDirection:"row-reverse",alignItems:"center",justifyContent:"center"}},z.children),B=new i.UR(Buffer.from("NO DATA","utf-8"));class C extends Error{constructor(G){super(G),Object.setPrototypeOf(this,C.prototype)}}const x=()=>o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:{margin:"auto",display:"block",shapeRendering:"auto",animationPlayState:"running",animationDelay:"0s"},width:"200px",height:"200px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},o.createElement("circle",{cx:"50",cy:"50",fill:"none",stroke:"#9b9b9b",strokeWidth:"7",r:"35",strokeDasharray:"164.93361431346415 56.97787143782138",style:{animationPlayState:"running",animationDelay:"0s"}},o.createElement("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1",style:{animationPlayState:"running",animationDelay:"0s"}}))),P=o.lazy(()=>new Promise(function(z){z(function(G){if(G&&G.__esModule)return G;var re={};return G&&Object.keys(G).forEach(function(N){var Z=Object.getOwnPropertyDescriptor(G,N);Object.defineProperty(re,N,Z.get?Z:{enumerable:!0,get:function(){return G[N]}})}),re.default=G,re}(C8()))}));let R="";const y=z=>o.createElement("div",{style:{paddingLeft:"1rem"}},o.createElement("div",{style:{display:"flex",alignItems:"center",padding:0}},o.createElement("img",{style:{display:"inline-block"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAoCAYAAACfKfiZAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAKAAAAACc9ikyAAAD+ElEQVRYCb1WbWiNURw/Z9caY5SyrKzVhuUtZcYoJdZ8kMywGClG+WK+eJsPmogNKfZBxBbmAyPyEgvtA8UUX9inbVeb8AGTd8t2j9/vdp91ntPzPPd57h3/+t1z/uf/ev7nnP9zhUiMsmH2BOgF9ifmIjmrVpgrDWuScxfMeqUW2EqiB2sjgrlJTDsNZmHACqyP2xJzGcyq2iU4E7kTzFVw7fEw+Qbou9bn94K7FCIlgNFh6I7y0E8oAQ9/NlEBuAig71ifv4VspM1iiJnHHsGZyPohjmdzxzeu79acsyFJm8UQMnzbfONmUIvnsRTG4g3DWAM8B24DM4GkaR88WMGcxkYtQr2h+wl8niYPPJ0Aix+AU2Cu8UlmASRe0gHA1L1JYaLUBEPToc7v1hx7XdISTc/3tAiaXs+uE3K2ZdJaQE/MnLdDzvvhm3ij2wDTkc4vj3lLx/gmji7tqmL6voYNcRze17zwv4CemNuc/xt8NSoqsau5OfoD2TSAxDb+EXDTNdeX0igeHYSCaajzfGoWZWDidU90O84XWIZuYw4EvwDT0OK527GG8VUPfcuO4wPAsVvqt/MolIYDbsSmxLPUiS+gEpgBOH1Z+7HOC90MMBFXYnn0jM35S8hDrtZJCFgBluZEHB/bIWenc6XVV1Qo/MCxCoM2ucUi0lwubX4YfBng1TKvQ1426MWY1NSolAs94jJKVoYaOh2DbqGw3ddQqutqkGcooEG5rmHM+8DvMNZs7KVuUaiUWOUjOO0k9HIjSpzOq1RRv0xgus2jnTkONhxbKsZ4A7gFlMbWRChddMLtZ4v3O0YiojZvq8rkEbwCrOai278Dkw98BxYBLYD+anaB58sREzerosiAaMExjCbvl0KpooAV6HIx2IN1Bk8FTgF6cLDiCLCTk86z8mlKSCzBbr6S90NSooumiXYm8MjBgG+3KbZehXGygw6XmAQrEU0C77TETxII3ofA6zrrZR+PIAvoBrhTEnvAPIBJZAIdQLzS8r8BkxGTNqq5AxLHocQY8iYxOIKuwCu4Sxkr8B7g5bLoIiYMTjoExAtOvTqASYiORtmmJCohxRfyBv3GeqkVnDJWgLQQaAV45iw3k5oKsAMySb9UDcVaKuduUYWiX1xDObPJI/AHDBXhBsnvwiBZCXChAuA/nWdkQLxg0bJGOf8/tDtG9fxNKqNfisX4ZKamC/Gw/Zzs9e9GiL1Q5n0ICn6A5gQJ5KY7C4Ig33s90WibdXOsr3ud7wsoshcwiaAUPfegRm76syHgBylINaIX0c1hout8FecB/i/Uy23OedvZP/4Z5cDzSeAnYAZnK54P/BcahygHAD5dNh12tilAIPoLD0OnpwCV000AAAAASUVORK5CYII=",alt:""}),o.createElement("div",{style:{fontSize:"1.25rem",fontWeight:"bold",marginLeft:"1rem"}},"Sync Keystone")),o.createElement("ul",{style:{marginTop:"2rem",listStyleType:"none",padding:0,fontSize:"1rem"}},o.createElement("li",{style:{marginBottom:"0.75rem"}},"1. Turn on your Keystone hardware device"),o.createElement("li",{style:{marginBottom:"0.75rem"}},`2. Select your "${z.walletMode}" as your Watch-only wallet(Companion App)`),o.createElement("li",{style:{marginBottom:"0.75rem"}}," ",'3. Press the "Scan Keystone" button and scan the QR Code displayed on your Keystone hardware wallet'),o.createElement("li",{style:{marginBottom:"0.75rem"}}," ","4. Select account and check your watch-only wallet")),o.createElement("div",{style:{marginBottom:"1rem"}},o.createElement("a",{style:{marginTop:"1.25rem",color:"#784FFE",textDecoration:"none"},href:z.link,target:"_blank",rel:"noreferrer"},"Click here to view detailed tutorial")),o.createElement(_,{onClick:z.onButtonClick},"Sync Keystone")),h={overlay:{zIndex:999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",borderRadius:"10px",width:"37rem",marginRight:"-50%",transform:"translate(-50%, -50%)",postion:"relative"}};var b=()=>{const[z,{read:G,play:re,cameraReady:N}]=(()=>{const Z=n.useMemo(()=>new u.EventEmitter,[]),[U,F]=n.useState(!1),[q,W]=n.useState(""),[te,L]=n.useState(""),[M,O]=n.useState(null),[X,{play:V}]=(()=>{const[be,_e]=n.useState(B),[k,p]=n.useState(!1),[g,E]=n.useState(100),[D,j]=n.useState(400),[H,se]=n.useState(!1),[T,A]=n.useState(null),[K,Q]=n.useState(null),ee=n.useMemo(()=>new i.UREncoder(be,D),[be]),[ue,ie]=n.useState(ee.nextPart()),fe=n.useMemo(()=>new u.EventEmitter,[]);return n.useEffect(()=>{ee.cbor.toString("hex")!==B.cbor.toString("hex")&&p(!0)},[ee]),n.useEffect(()=>{const he=s.interval(g).subscribe(()=>{ie(ee.nextPart())});return()=>{he.unsubscribe()}},[g,ee]),[k?o.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},T&&o.createElement("p",{style:{fontSize:"1.25rem",fontWeight:"bold"}},T),o.createElement(c,{size:288,data:ue}),K&&o.createElement("p",{style:{fontSize:"1rem",textAlign:"center"}},K),o.createElement(w,null,o.createElement(_,{onClick:()=>{fe.emit("finish",!0)}},H?"Scan Keystone":"Finish"))):o.createElement("div",null),{play:(he,pe)=>new Promise(we=>{_e(he),pe&&(pe.refreshSpeed&&E(pe.refreshSpeed),pe.hasNext&&se(pe.hasNext),pe.title&&A(pe.title),pe.description&&Q(pe.description),pe.maxFragmentLength&&j(pe.maxFragmentLength)),fe.once("finish",()=>{_e(B),p(!1),E(100),we(e.PlayStatus.success)})})}]})(),[Y,{read:ne,cameraReady:me}]=(()=>{const[be,_e]=n.useState(!1),[k,p]=n.useState([]),[g,E]=n.useState(new i.URDecoder),[D,j]=n.useState(""),H=n.useMemo(()=>new u.EventEmitter,[]),[se,T]=n.useState(null),[A,K]=n.useState(0),[Q,ee]=n.useState(null),ue=()=>{E(new i.URDecoder),j("")};return[o.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},se&&o.createElement("p",{style:{fontSize:"1.25rem",fontWeight:"bold"}},se),Q&&o.createElement("p",{style:{fontSize:"1rem",textAlign:"center"}},Q),o.createElement(n.Suspense,{fallback:o.createElement("div",null)},o.createElement("div",{style:{position:"relative",width:"100%"}},be?null:o.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}},o.createElement(x,null)),o.createElement(P,{onScan:ie=>{ie&&(_e(!0),((fe,he)=>{try{if(g.isComplete()){const pe=g.resultUR();let we=!1;if(k.forEach(kt=>{if(kt===pe.type)return we=!0,void H.emit("read",{result:pe,status:"success"})}),!we)throw new C(`received ur type ${pe.type}, but expected [${k.join(",")}]`)}else g.receivePart(fe),K(g.getProgress())}catch(pe){j(pe instanceof C?he:pe.message)}})(ie,R))},delay:100,style:{width:"100%"},onError:ie=>{j(ie.message)}}))),o.createElement("p",null,(100*A).toFixed(0)," %"),D&&o.createElement("p",{style:{color:"red",fontSize:"1rem"}},D),o.createElement(w,null,o.createElement(_,{onClick:()=>{H.emit("read",{status:"canceled"})}},"Close"),D&&o.createElement(_,{onClick:()=>{ue()}},"Retry"))),{read:(ie,fe)=>new Promise(he=>{p(ie),fe&&(fe.title&&T(fe.title),fe.description&&ee(fe.description),R=fe.URTypeErrorMessage?fe.URTypeErrorMessage:""),H.once("read",pe=>{ue(),he(pe)})}),cameraReady:be}]})(),xe=()=>{O(null),L(""),W(""),F(!1)};var de;return[o.createElement(a,{isOpen:U,style:h},o.createElement("div",{onClick:()=>{Z.emit("close"),xe()}},o.createElement("img",{style:{position:"absolute",top:"1rem",right:"1rem"},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADKADAAQAAAABAAAADAAAAAATDPpdAAAAmklEQVQoFZWRwQ3DIAwAa4brJPBP80hnaD/lD5N0iYxEfRVBxBGRwsvgO2PZklJaReTrvX/eTk7O+VVKuTtgDRYVPyOeHAysAFV40jCGEB69aHN/YSRZGK4JVuKu5/DrToDoqnI9tOh4vXJ2Qlc96kSY2lTfWs0m9DCT0r3MSkUrXR9r3eBCNbuDrY/td23z7Vg3wQhGIgcD+wPGY2fPvHuWagAAAABJRU5ErkJggg=="})),o.createElement("div",{style:{width:"35rem",padding:18,flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#002237"}},(de=M)==="initial"?o.createElement(y,{walletMode:q,link:te,onButtonClick:()=>{O("read")}}):de==="read"?Y:de==="play"?X:null)),{play:(be,_e)=>new Promise(k=>{Z.once("close",()=>{k(e.PlayStatus.canceled)}),F(!0),O("play"),V(be,_e).then(()=>{xe(),k(e.PlayStatus.success)})}),read:async(be,_e)=>new Promise(k=>{Z.once("close",()=>{xe(),k({status:e.ReadStatus.canceled})}),_e.renderInitial?(W(_e.renderInitial.walletMode),L(_e.renderInitial.link),O("initial"),F(!0),ne(be,_e).then(p=>{xe(),k(p)})):(O("read"),F(!0),ne(be,_e).then(p=>{xe(),k(p)}))}),cameraReady:me}]})();return oe(G,re,N),z};let S,I,$,J=!1;const oe=(z,G,re)=>{J=!0,S=z,I=G,$=re};e.default={bootstrap:()=>{const z=document.getElementsByTagName("body").item(0),G=document.createElement("div");G.id="kv_sdk_container",z.appendChild(G),a.setAppElement("#kv_sdk_container"),r.render(o.createElement(b),G)},getSdk:()=>{if(J)return{read:S,play:I,cameraReady:$};throw new Error("SDK is not initialized")}}})(ps);hs.exports=ps;var _8=hs.exports;const B8=Nt(fc);function ic(e){return e&&typeof e=="object"&&"default"in e?e.default:e}Object.defineProperty(wn,"__esModule",{value:!0});var _r=Yf,$t=_8,n3=ic($t),w8=to(),k8=ic(lc),o3=s3,Do=B8;class Pr{constructor(){if(this.keystoneSDK=void 0,this.readCryptoMultiAccounts=async()=>{const t=await this.keystoneSDK.read([$t.SupportedResult.UR_CRYPTO_MULTI_ACCOUNTS],{title:"Sync Keystone",description:"Please scan the QR code displayed on your Keystone",renderInitial:{walletMode:"Solflare",link:"https://keyst.one/defi"},URTypeErrorMessage:"The scanned QR code is not the sync code from the Keystone hardware wallet. Please verify the code and try again"});if(t.status===$t.ReadStatus.success){const{result:r}=t;return w8.CryptoMultiAccounts.fromCBOR(r.cbor)}throw new Error("Reading canceled")},this.requestSignature=async(t,r,n)=>{if(await this.keystoneSDK.play(t.toUR(),{hasNext:!0,title:r,description:n,maxFragmentLength:400})===$t.PlayStatus.canceled)throw new Error("#ktek_error[play-cancel]: play canceled");const o=await this.keystoneSDK.read([$t.SupportedResult.UR_SOL_SIGNATURE],{title:"Scan Keystone",description:"Please scan the QR code displayed on your Keystone"});if(o.status===$t.ReadStatus.canceled)throw new Error("#ktek_error[read-cancel]: read signature canceled");return _r.SolSignature.fromCBOR(o.result.cbor)},Pr.instance)return Pr.instance;n3.bootstrap(),this.keystoneSDK=n3.getSdk(),Pr.instance=this}}class Nn{constructor(){this.getInteraction=()=>{throw new Error("KeystoneError#invalid_extends: method getInteraction not implemented, please extend BaseKeyring by overwriting this method.")},this.type="QR Hardware Wallet Device",this.requestSignature=async(t,r,n,o)=>{const a=await this.getInteraction().requestSignature(r,n,o),u=a.getRequestId(),s=a.getSignature();if(u&&o3.stringify(u)!==t)throw new Error("KeystoneError#invalid_data: read signature error: mismatched requestId");return s},this.getName=()=>this.name,this.keys=[],this.name="QR Hardware",this.initialized=!1,this.device="",this.xfp=""}async readKeyring(){const t=await this.getInteraction().readCryptoMultiAccounts();this.syncKeyring(t)}syncKeyring(t){var r;const n=t.getKeys();this.device=t.getDevice(),this.xfp=(r=t.getKeys()[0].getOrigin().getSourceFingerprint())==null?void 0:r.toString("hex"),this.name=t.getKeys()[0].getName(),this.keys=n.map((o,a)=>({hdPath:o.getOrigin().getPath(),pubKey:k8.encode(o.getKey()),index:a})),this.initialized=!0}syncKeyringData({xfp:t,keys:r,name:n="QR Hardware",device:o}){this.xfp=t,this.name=n,this.keys=r,this.device=o,this.initialized=!0}getAccounts(){return this.initialized?this.keys:[]}async signTransaction(t,r){const n=await this._getSignature(t,Buffer.from(r.serializeMessage()),_r.SignType.Transaction);return r.addSignature(new Do.PublicKey(t),n),r}async signMessage(t,r){return await this._getSignature(t,Buffer.from(r),_r.SignType.Message)}async createSignature(t,r){try{const n=Do.Message.from(r);if(Do.Transaction.populate(n,[]))return this._getSignature(t,Buffer.from(r),_r.SignType.Transaction)}catch{}return this.signMessage(t,r)}async _getSignature(t,r,n){const o=o3.v4(),a=this.getAccounts().find(s=>s.pubKey==t),u=_r.SolSignRequest.constructSOLRequest(r,a.hdPath,this.xfp,n,o);return this.requestSignature(o,u,"Scan with your Keystone",'After your Keystone has signed this message, click on "Scan Keystone" to receive the signature')}}Nn.type="QR Hardware Wallet Device";class Un extends Nn{constructor(){super(),this.getInteraction=()=>new Pr}static getEmptyKeyring(){return new Un}}Un.type=Nn.type,wn.BaseKeyring=Nn,wn.DefaultKeyring=Un;f3.exports=wn;var P8=f3.exports;const I8=bc({__proto__:null},[P8]);export{I8 as i};
|