@transmitsecurity/platform-web-sdk 1.17.0 → 1.17.2-beta.0

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/index.esm.js CHANGED
@@ -1,3 +1,3 @@
1
- function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function t(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?e(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){if(null==e)return{};var i,r,n=function(e,t){if(null==e)return{};var i,r,n={},a=Object.keys(e);for(r=0;r<a.length;r++)i=a[r],t.indexOf(i)>=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)i=a[r],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function a(e,i){return Object.entries(i).reduce(((i,r)=>{let[n,s]=r;return t(t({},i),{},{[n]:o.isPrototypeOf(s)?new s(e.slug):"function"==typeof s?s.bind(e):"object"==typeof s&&!Array.isArray(s)&&s?a(e,s):s})}),{})}"undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));class o{constructor(e){this.slug=e}static create(e){return class extends o{constructor(t){super(t),Object.assign(this,a(this,e(this)))}}}}var s=Object.freeze({__proto__:null,Agent:o});const c=new Map;function d(e,t){var i,r;null===(i=c.get(e))||void 0===i||i.forEach((r=e=>e(t),function(){try{return r(...arguments)}catch(e){console.log(e)}}))}const u=Symbol("MODULE_INITIALIZED");var l=Object.freeze({__proto__:null,MODULE_INITIALIZED:u,emit:d,off:function(e,t){const i=c.get(e);if(!i)return;const r=i.indexOf(t);-1!==r&&i.splice(r,1)},on:function(e,t){var i;c.has(e)?null===(i=c.get(e))||void 0===i||i.push(t):c.set(e,[t])}});let h=null;function f(e){h=e}var p=Object.freeze({__proto__:null,getInitConfig:function(){return h},get initConfig(){return h},setInitConfig:f});function g(e){f(e),d(u,void 0)}var m=Object.freeze({__proto__:null,initialize:g});function b(e,t){const i=!e||"object"!=typeof e||Array.isArray(e)?{}:e;return[t.reduce(((e,t)=>{if(t in e){const i=e[t];if(null!==i&&"object"==typeof i&&!Array.isArray(i))return i}const i={};return e[t]=i,i}),i),i]}function v(e,t){let i=e;return t.every((e=>!(!i||"object"!=typeof i||Array.isArray(i)||!(e in i))&&(i=i[e],!0)),e)}const y="tsec",_="general";function w(e){return e?_:h.clientId}function x(e){return function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}((e?sessionStorage:localStorage).getItem(y))}function A(e,t){const i=e?sessionStorage:localStorage,r=t(x(e));i.setItem(y,JSON.stringify(r))}var E=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:y,GENERAL_ID_KEY:_,getValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=w(!!t.isGeneral),r=x(!!t.sessionOnly),[n]=b(r,[this.slug.toString(),i]);return n[e]},hasValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=w(!!t.isGeneral),r=x(!!t.sessionOnly);return v(r,[this.slug.toString(),i,e])},removeValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=w(!!t.isGeneral);A(!!t.sessionOnly,(t=>{const[r,n]=b(t,[this.slug.toString(),i]);return delete r[e],n}))},setValue:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=w(!!i.isGeneral);A(!!i.sessionOnly,(i=>{const[n,a]=b(i,[this.slug.toString(),r]);return n[e]=t,a}))}});const S="RSA-PSS",k=async(e,t)=>await window.crypto.subtle.generateKey({name:e,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!1,t),M=async()=>await k("RSA-OAEP",["encrypt","decrypt"]),C=async()=>await k(S,["sign"]),I=async(e,t)=>{const i=(new TextEncoder).encode(t);return await window.crypto.subtle.sign({name:S,saltLength:32},e,i)};class D{constructor(e,t,i){this.slug=e,this.dbName=t,this.dbVersion=i}queryObjectStore(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);r.onupgradeneeded=()=>{var t;const i=r.result;(null===(t=null==i?void 0:i.objectStoreNames)||void 0===t?void 0:t.contains)&&!i.objectStoreNames.contains(e)&&i.createObjectStore(e,{keyPath:"key"})},r.onsuccess=()=>{const n=r.result,a=n.transaction(e,(null==i?void 0:i.operation)||"readwrite"),o=a.objectStore(e);t(o),a.oncomplete=()=>{n.close()}}}put(e,t,i){return new Promise(((r,n)=>{this.queryObjectStore(e,(e=>{const a=e.put({key:t,value:i});a.onsuccess=()=>{r(a.result)},a.onerror=e=>{n("Failed adding item to objectStore, err: "+e)}}))}))}add(e,t,i){return new Promise(((r,n)=>{this.queryObjectStore(e,(e=>{const a=e.add({key:t,value:i});a.onsuccess=()=>{r(a.result)},a.onerror=e=>{const t=e.target.error;n(t)}}))}))}get(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.get(t);n.onsuccess=()=>{var e;n.result?i(null===(e=n.result)||void 0===e?void 0:e.value):i(void 0)},n.onerror=e=>{r("Failed adding item to objectStore, err: "+e)}}))}))}getAll(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.getAll(null,t);n.onsuccess=()=>{if(n.result){const e=n.result;(null==e?void 0:e.length)?i(e.map((e=>null==e?void 0:e.value))):i(e)}else i([])},n.onerror=e=>{r("Failed getting items, err: "+e)}}))}))}delete(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.delete(t);n.onsuccess=()=>{i()},n.onerror=e=>{r(`Failed deleting key: '${t}' from objectStore, err: `+e)}}))}))}clear(e){return new Promise(((t,i)=>{this.queryObjectStore(e,(e=>{const r=e.clear();r.onsuccess=()=>{t()},r.onerror=e=>{i("Failed clearing objectStore, err: "+e)}}))}))}}const T="platform",R="init",z="completed",B="RSA2048",P=[R,z];class O{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sign",i=arguments.length>2?arguments[2]:void 0;var r,n,a,o;this.agent=e,this.keysType=t,this.options=i,this._extractingKeysPromise=null;const s=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=s||!(null===(n=this.options)||void 0===n?void 0:n.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=s?1:(null===(a=this.options)||void 0===a?void 0:a.dbVersion)||1,this.keysStoreName=s||!(null===(o=this.options)||void 0===o?void 0:o.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new D(s?T:e.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new D((s?T:e.slug)+`:${h.clientId}`,this.keysDatabaseName,this.dbVersion)}getKeysRecordKey(){return`${this.keysType}_keys`}getRotatedKeysRecordKey(){return`rotated_${this.keysType}_keys`}getRotatedKeysRecordKeyPending(){return`rotated_pending_${this.keysType}_keys`}arrayBufferToBase64(e){return window.btoa(String.fromCharCode(...new Uint8Array(e)))}async getPKRepresentations(e){const t=await crypto.subtle.exportKey("spki",e);return{arrayBufferKey:t,base64Key:this.arrayBufferToBase64(t)}}async generateKeyPair(){return"sign"==this.keysType?await C():await M()}async calcKeyIdentifier(e){const t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}async extractKeysData(){if(this._extractingKeysPromise)return this._extractingKeysPromise;this._extractingKeysPromise=(async()=>{var e,t;const i=(null===(t=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===t?void 0:t.isEnabled)?await this.getRotatedKeysData():await this.getKeysData(),{base64Key:r}=await this.getPKRepresentations(i.publicKey);return this.publicKeyBase64=r,this.keyIdentifier=i.keyIdentifier,i})();try{return await this._extractingKeysPromise}finally{this._extractingKeysPromise=null}}async generateKeyPairData(e){const i=await this.generateKeyPair(),{arrayBufferKey:r}=await this.getPKRepresentations(i.publicKey),n=e||await this.calcKeyIdentifier(r);return t(t({},i),{},{keyIdentifier:n,createdDate:Date.now()})}shouldKeyBeRotated(e){var t;const i=null===(t=this.options)||void 0===t?void 0:t.keyRotation;if(!(null==i?void 0:i.isEnabled)||!i.expiryDays||void 0===i.startedAt)return!1;const r=24*i.expiryDays*60*60*1e3,n=e.createdDate&&e.createdDate>=i.startedAt?e.createdDate:i.startedAt;return Date.now()-n>r-2592e6}async extractMainKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getKeysRecordKey())}async extractFallbackMainKeysData(){return await this.indexedDBClientFallback.get(this.keysStoreName,this.getKeysRecordKey())}async extractRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKey())}async extractPendingRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKeyPending())}async saveKeyData(e,t){try{return await this.indexedDBClient.add(this.keysStoreName,e,t),t}catch(t){if(t instanceof DOMException&&"ConstraintError"===t.name){const t=await this.indexedDBClient.get(this.keysStoreName,e);if(t)return t}throw t}}async getKeysData(){const e=this.getKeysRecordKey();let t=await this.extractMainKeysData();if(t)return t;if(t=await this.extractFallbackMainKeysData(),t)return this.saveKeyData(e,t);const i=await this.generateKeyPairData();return this.saveKeyData(e,i)}async getOrCreateRotatedKeys(){let e=await this.extractRotatedKeysData();if(!e){const i=this.getRotatedKeysRecordKey(),r=await this.getKeysData(),n=t(t({},r),{},{createdDate:r.createdDate||Date.now()});e=await this.saveKeyData(i,n)}return e}async getRotatedKeysData(){const e=await this.getOrCreateRotatedKeys();if(this.shouldKeyBeRotated(e)){if(!await this.extractPendingRotatedKeysData()){const t=this.getRotatedKeysRecordKeyPending(),i=await this.generateKeyPairData(e.keyIdentifier);await this.saveKeyData(t,i)}}return e}async getPublicData(){return this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData(),{publicKey:this.publicKeyBase64,keyIdentifier:this.keyIdentifier}}async sign(e){if("sign"==this.keysType){const{privateKey:t}=await this.extractKeysData(),i=await I(t,e);return this.arrayBufferToBase64(i)}throw new Error("keysType must be 'sign' in order to use sign keys")}async clearKeys(){const e=this.getKeysRecordKey();await this.indexedDBClient.delete(this.keysStoreName,e)}getBaseRotationPayload(){return{keyIdentifier:this.keyIdentifier,slot:this.getRotatedKeysRecordKey(),publicKey:this.publicKeyBase64,publicKeyType:B,tenantId:this.options.keyRotation.tenantId}}async getRotationData(){var e,i;if(!(null===(i=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===i?void 0:i.isEnabled))return;this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData();const r=await this.extractPendingRotatedKeysData();if(r){const{base64Key:e}=await this.getPKRepresentations(r.publicKey),{privateKey:i}=await this.extractKeysData(),n=t(t({},this.getBaseRotationPayload()),{},{newPublicKey:e,createdDate:r.createdDate,newPublicKeyType:B}),a=JSON.stringify(n);return{data:a,signature:await this.signPayload(a,i)}}const n=await this.extractRotatedKeysData();if(n&&!1===n.confirmed){await this.extractKeysData();const e=JSON.stringify(this.getBaseRotationPayload());return{data:e,signature:await this.signPayload(e,n.privateKey)}}}async signPayload(e,t){const i=await I(t,e);return this.arrayBufferToBase64(i)}async handleRotateResponse(e){if(P.includes(e))if(e===R){const e=await this.extractPendingRotatedKeysData();if(e){await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKey());const i=t(t({},e),{},{confirmed:!1});await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),i),await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKeyPending());const{base64Key:r}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=r,this.keyIdentifier=e.keyIdentifier}}else if(e===z){const e=await this.extractRotatedKeysData();e&&!1===e.confirmed&&await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),t(t({},e),{},{confirmed:!0}))}}}var F=Object.freeze({__proto__:null,createCryptoBinding:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sign",t=arguments.length>1?arguments[1]:void 0;return new O(this,e,t)},generateRSAKeyPair:M,generateRSASignKeyPair:C,signAssymetric:I,verifyAssymetric:async(e,t,i)=>{const r=(new TextEncoder).encode(t);return await window.crypto.subtle.verify(S,e,i,r)}}),N=Object.freeze({__proto__:null});const L=o.create((e=>{class t extends Error{constructor(t,i){super(`${e.slug}-${t} ${i}`)}}return{TsError:t,TsInternalError:class extends t{constructor(e){super(e,"Internal error")}}}}));var j=o.create((()=>t({exceptions:L},s)));class U{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.agent=e,this.middlewares=t,this.logs=[]}info(e,t){this.pushLog(3,e,t)}warn(e,t){this.pushLog(4,e,t)}error(e,t){this.pushLog(5,e,t)}pushLog(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.logs.push({timestamp:Date.now(),module:this.agent.slug,severity:e,fields:i,message:t});const r=this.middlewares.map((e=>e(this)));Promise.all(r).catch((()=>{}))}}var q=Object.freeze({__proto__:null,consoleMiddleware:function(e){const t=e.logs[e.logs.length-1];console.log(`${t.severity} ${t.message}`,t.fields)},createSdkLogger:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new U(this,e)}});function K(e,t){if(!(null==e?void 0:e.trim()))return"";if(function(e){try{return new URL(e),!0}catch(e){return!1}}(e))return e;const i="http://mock.com",r=new URL(i);r.search=(null==t?void 0:t.toString())||"",r.pathname=e;return r.href.replace(i,"")}const H={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function V(e,i,r){var n;const a=(o=i||{},encodeURI(JSON.stringify(o)).split(/%..|./).length-1);var o;return{method:e,headers:t(t(t({},{"X-TS-body-size":String(a)}),H),r||{}),body:null!==(n=i&&JSON.stringify(i||{}))&&void 0!==n?n:void 0}}function $(e,t,i,r,n){const a=K(e,r),o=V(t,i,n);return fetch(a,o)}async function J(e,t,i,r,n){let a;if(a=await $(e,t,i,r,n),!a.ok)throw new Error("Request failed");return a}var G=Object.freeze({__proto__:null,httpDelete:async function(e,i){const r=await J(e,"DELETE",void 0,void 0,i);return t(t({data:await r.json()},r),{},{headers:r.headers})},httpGet:async function(e,i,r){const n=await J(e,"GET",void 0,i,r);return t(t({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(e,i,r,n){const a=await J(e,"POST",i,r,n);return t(t({data:await a.json()},a),{},{headers:a.headers})},httpPut:async function(e,i,r,n){const a=await J(e,"PUT",i,r,n);return t(t({data:await a.json()},a),{},{headers:a.headers})},init:V}),W=o.create((()=>({events:l,moduleMetadata:p,mainEntry:m,utils:j,storage:E,crypto:F,indexedDB:N,logger:q,http:G}))),Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Q(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];i.push.apply(i,arguments);var r=Function.bind.apply(t,i);return new r}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}var X={},ee={};function te(e){let t=e.length;for(;--t>=0;)e[t]=0}const ie=256,re=286,ne=30,ae=15,oe=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),se=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ce=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),de=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ue=new Array(576);te(ue);const le=new Array(60);te(le);const he=new Array(512);te(he);const fe=new Array(256);te(fe);const pe=new Array(29);te(pe);const ge=new Array(ne);function me(e,t,i,r,n){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}let be,ve,ye;function _e(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}te(ge);const we=e=>e<256?he[e]:he[256+(e>>>7)],xe=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Ae=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,xe(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},Ee=(e,t,i)=>{Ae(e,i[2*t],i[2*t+1])},Se=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},ke=(e,t,i)=>{const r=new Array(16);let n,a,o=0;for(n=1;n<=ae;n++)r[n]=o=o+i[n-1]<<1;for(a=0;a<=t;a++){let t=e[2*a+1];0!==t&&(e[2*a]=Se(r[t]++,t))}},Me=e=>{let t;for(t=0;t<re;t++)e.dyn_ltree[2*t]=0;for(t=0;t<ne;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},Ce=e=>{e.bi_valid>8?xe(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Ie=(e,t,i,r)=>{const n=2*t,a=2*i;return e[n]<e[a]||e[n]===e[a]&&r[t]<=r[i]},De=(e,t,i)=>{const r=e.heap[i];let n=i<<1;for(;n<=e.heap_len&&(n<e.heap_len&&Ie(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!Ie(t,r,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=r},Te=(e,t,i)=>{let r,n,a,o,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],n=e.pending_buf[e.l_buf+s],s++,0===r?Ee(e,n,t):(a=fe[n],Ee(e,a+ie+1,t),o=oe[a],0!==o&&(n-=pe[a],Ae(e,n,o)),r--,a=we(r),Ee(e,a,i),o=se[a],0!==o&&(r-=ge[a],Ae(e,r,o)))}while(s<e.last_lit);Ee(e,256,t)},Re=(e,t)=>{const i=t.dyn_tree,r=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,c,d=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)0!==i[2*o]?(e.heap[++e.heap_len]=d=o,e.depth[o]=0):i[2*o+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=d<2?++d:0,i[2*c]=1,e.depth[c]=0,e.opt_len--,n&&(e.static_len-=r[2*c+1]);for(t.max_code=d,o=e.heap_len>>1;o>=1;o--)De(e,i,o);c=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],De(e,i,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,i[2*c]=i[2*o]+i[2*s],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,i[2*o+1]=i[2*s+1]=c,e.heap[1]=c++,De(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,r=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let d,u,l,h,f,p,g=0;for(h=0;h<=ae;h++)e.bl_count[h]=0;for(i[2*e.heap[e.heap_max]+1]=0,d=e.heap_max+1;d<573;d++)u=e.heap[d],h=i[2*i[2*u+1]+1]+1,h>c&&(h=c,g++),i[2*u+1]=h,u>r||(e.bl_count[h]++,f=0,u>=s&&(f=o[u-s]),p=i[2*u],e.opt_len+=p*(h+f),a&&(e.static_len+=p*(n[2*u+1]+f)));if(0!==g){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(h=c;0!==h;h--)for(u=e.bl_count[h];0!==u;)l=e.heap[--d],l>r||(i[2*l+1]!==h&&(e.opt_len+=(h-i[2*l+1])*i[2*l],i[2*l+1]=h),u--)}})(e,t),ke(i,d,e.bl_count)},ze=(e,t,i)=>{let r,n,a=-1,o=t[1],s=0,c=7,d=4;for(0===o&&(c=138,d=3),t[2*(i+1)+1]=65535,r=0;r<=i;r++)n=o,o=t[2*(r+1)+1],++s<c&&n===o||(s<d?e.bl_tree[2*n]+=s:0!==n?(n!==a&&e.bl_tree[2*n]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=n,0===o?(c=138,d=3):n===o?(c=6,d=3):(c=7,d=4))},Be=(e,t,i)=>{let r,n,a=-1,o=t[1],s=0,c=7,d=4;for(0===o&&(c=138,d=3),r=0;r<=i;r++)if(n=o,o=t[2*(r+1)+1],!(++s<c&&n===o)){if(s<d)do{Ee(e,n,e.bl_tree)}while(0!=--s);else 0!==n?(n!==a&&(Ee(e,n,e.bl_tree),s--),Ee(e,16,e.bl_tree),Ae(e,s-3,2)):s<=10?(Ee(e,17,e.bl_tree),Ae(e,s-3,3)):(Ee(e,18,e.bl_tree),Ae(e,s-11,7));s=0,a=n,0===o?(c=138,d=3):n===o?(c=6,d=3):(c=7,d=4)}};let Pe=!1;const Oe=(e,t,i,r)=>{Ae(e,0+(r?1:0),3),((e,t,i,r)=>{Ce(e),r&&(xe(e,i),xe(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};ee._tr_init=e=>{Pe||((()=>{let e,t,i,r,n;const a=new Array(16);for(i=0,r=0;r<28;r++)for(pe[r]=i,e=0;e<1<<oe[r];e++)fe[i++]=r;for(fe[i-1]=r,n=0,r=0;r<16;r++)for(ge[r]=n,e=0;e<1<<se[r];e++)he[n++]=r;for(n>>=7;r<ne;r++)for(ge[r]=n<<7,e=0;e<1<<se[r]-7;e++)he[256+n++]=r;for(t=0;t<=ae;t++)a[t]=0;for(e=0;e<=143;)ue[2*e+1]=8,e++,a[8]++;for(;e<=255;)ue[2*e+1]=9,e++,a[9]++;for(;e<=279;)ue[2*e+1]=7,e++,a[7]++;for(;e<=287;)ue[2*e+1]=8,e++,a[8]++;for(ke(ue,287,a),e=0;e<ne;e++)le[2*e+1]=5,le[2*e]=Se(e,5);be=new me(ue,oe,257,re,ae),ve=new me(le,se,0,ne,ae),ye=new me(new Array(0),ce,0,19,7)})(),Pe=!0),e.l_desc=new _e(e.dyn_ltree,be),e.d_desc=new _e(e.dyn_dtree,ve),e.bl_desc=new _e(e.bl_tree,ye),e.bi_buf=0,e.bi_valid=0,Me(e)},ee._tr_stored_block=Oe,ee._tr_flush_block=(e,t,i,r)=>{let n,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<ie;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Re(e,e.l_desc),Re(e,e.d_desc),o=(e=>{let t;for(ze(e,e.dyn_ltree,e.l_desc.max_code),ze(e,e.dyn_dtree,e.d_desc.max_code),Re(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*de[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=i+5,i+4<=n&&-1!==t?Oe(e,t,i,r):4===e.strategy||a===n?(Ae(e,2+(r?1:0),3),Te(e,ue,le)):(Ae(e,4+(r?1:0),3),((e,t,i,r)=>{let n;for(Ae(e,t-257,5),Ae(e,i-1,5),Ae(e,r-4,4),n=0;n<r;n++)Ae(e,e.bl_tree[2*de[n]+1],3);Be(e,e.dyn_ltree,t-1),Be(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Te(e,e.dyn_ltree,e.dyn_dtree)),Me(e),r&&Ce(e)},ee._tr_tally=(e,t,i)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(fe[i]+ie+1)]++,e.dyn_dtree[2*we(t)]++),e.last_lit===e.lit_bufsize-1),ee._tr_align=e=>{Ae(e,2,3),Ee(e,256,ue),(e=>{16===e.bi_valid?(xe(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)};var Fe=(e,t,i,r)=>{let n=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{n=n+t[r++]|0,a=a+n|0}while(--o);n%=65521,a%=65521}return n|a<<16|0};const Ne=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Le=(e,t,i,r)=>{const n=Ne,a=r+i;e^=-1;for(let i=r;i<a;i++)e=e>>>8^n[255&(e^t[i])];return-1^e},je={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ue={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:qe,_tr_stored_block:Ke,_tr_flush_block:He,_tr_tally:Ve,_tr_align:$e}=ee,Je=Fe,Ge=Le,We=je,{Z_NO_FLUSH:Ze,Z_PARTIAL_FLUSH:Ye,Z_FULL_FLUSH:Qe,Z_FINISH:Xe,Z_BLOCK:et,Z_OK:tt,Z_STREAM_END:it,Z_STREAM_ERROR:rt,Z_DATA_ERROR:nt,Z_BUF_ERROR:at,Z_DEFAULT_COMPRESSION:ot,Z_FILTERED:st,Z_HUFFMAN_ONLY:ct,Z_RLE:dt,Z_FIXED:ut,Z_DEFAULT_STRATEGY:lt,Z_UNKNOWN:ht,Z_DEFLATED:ft}=Ue,pt=258,gt=262,mt=103,bt=113,vt=666,yt=(e,t)=>(e.msg=We[t],t),_t=e=>(e<<1)-(e>4?9:0),wt=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let xt=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const At=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},Et=(e,t)=>{He(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,At(e.strm)},St=(e,t)=>{e.pending_buf[e.pending++]=t},kt=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Mt=(e,t,i,r)=>{let n=e.avail_in;return n>r&&(n=r),0===n?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),i),1===e.state.wrap?e.adler=Je(e.adler,t,n,i):2===e.state.wrap&&(e.adler=Ge(e.adler,t,n,i)),e.next_in+=n,e.total_in+=n,n)},Ct=(e,t)=>{let i,r,n=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-gt?e.strstart-(e.w_size-gt):0,d=e.window,u=e.w_mask,l=e.prev,h=e.strstart+pt;let f=d[a+o-1],p=d[a+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,d[i+o]===p&&d[i+o-1]===f&&d[i]===d[a]&&d[++i]===d[a+1]){a+=2,i++;do{}while(d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&a<h);if(r=pt-(h-a),a=h-pt,r>o){if(e.match_start=t,o=r,r>=s)break;f=d[a+o-1],p=d[a+o]}}}while((t=l[t&u])>c&&0!=--n);return o<=e.lookahead?o:e.lookahead},It=e=>{const t=e.w_size;let i,r,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-gt)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,i=r;do{n=e.head[--i],e.head[i]=n>=t?n-t:0}while(--r);r=t,i=r;do{n=e.prev[--i],e.prev[i]=n>=t?n-t:0}while(--r);a+=t}if(0===e.strm.avail_in)break;if(r=Mt(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=xt(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=xt(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<gt&&0!==e.strm.avail_in)},Dt=(e,t)=>{let i,r;for(;;){if(e.lookahead<gt){if(It(e),e.lookahead<gt&&t===Ze)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-gt&&(e.match_length=Ct(e,i)),e.match_length>=3)if(r=Ve(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=xt(e,e.ins_h,e.window[e.strstart+1]);else r=Ve(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2},Tt=(e,t)=>{let i,r,n;for(;;){if(e.lookahead<gt){if(It(e),e.lookahead<gt&&t===Ze)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-gt&&(e.match_length=Ct(e,i),e.match_length<=5&&(e.strategy===st||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,r=Ve(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Et(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=Ve(e,0,e.window[e.strstart-1]),r&&Et(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Ve(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2};function Rt(e,t,i,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=r,this.func=n}const zt=[new Rt(0,0,0,0,((e,t)=>{let i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(It(e),0===e.lookahead&&t===Ze)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+i;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Et(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-gt&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Et(e,!1),e.strm.avail_out),1)})),new Rt(4,4,8,4,Dt),new Rt(4,5,16,8,Dt),new Rt(4,6,32,32,Dt),new Rt(4,4,16,16,Tt),new Rt(8,16,32,32,Tt),new Rt(8,16,128,128,Tt),new Rt(8,32,128,256,Tt),new Rt(32,128,258,1024,Tt),new Rt(32,258,258,4096,Tt)];function Bt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),wt(this.dyn_ltree),wt(this.dyn_dtree),wt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),wt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),wt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Pt=e=>{if(!e||!e.state)return yt(e,rt);e.total_in=e.total_out=0,e.data_type=ht;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:bt,e.adler=2===t.wrap?0:1,t.last_flush=Ze,qe(t),tt},Ot=e=>{const t=Pt(e);return t===tt&&(e=>{e.window_size=2*e.w_size,wt(e.head),e.max_lazy_match=zt[e.level].max_lazy,e.good_match=zt[e.level].good_length,e.nice_match=zt[e.level].nice_length,e.max_chain_length=zt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Ft=(e,t,i,r,n,a)=>{if(!e)return rt;let o=1;if(t===ot&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),n<1||n>9||i!==ft||r<8||r>15||t<0||t>9||a<0||a>ut)return yt(e,rt);8===r&&(r=9);const s=new Bt;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=i,Ot(e)};X.deflateInit=(e,t)=>Ft(e,t,ft,15,8,lt),X.deflateInit2=Ft,X.deflateReset=Ot,X.deflateResetKeep=Pt,X.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?rt:(e.state.gzhead=t,tt):rt,X.deflate=(e,t)=>{let i,r;if(!e||!e.state||t>et||t<0)return e?yt(e,rt):rt;const n=e.state;if(!e.output||!e.input&&0!==e.avail_in||n.status===vt&&t!==Xe)return yt(e,0===e.avail_out?at:rt);n.strm=e;const a=n.last_flush;if(n.last_flush=t,42===n.status)if(2===n.wrap)e.adler=0,St(n,31),St(n,139),St(n,8),n.gzhead?(St(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),St(n,255&n.gzhead.time),St(n,n.gzhead.time>>8&255),St(n,n.gzhead.time>>16&255),St(n,n.gzhead.time>>24&255),St(n,9===n.level?2:n.strategy>=ct||n.level<2?4:0),St(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(St(n,255&n.gzhead.extra.length),St(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Ge(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(St(n,0),St(n,0),St(n,0),St(n,0),St(n,0),St(n,9===n.level?2:n.strategy>=ct||n.level<2?4:0),St(n,3),n.status=bt);else{let t=ft+(n.w_bits-8<<4)<<8,i=-1;i=n.strategy>=ct||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=i<<6,0!==n.strstart&&(t|=32),t+=31-t%31,n.status=bt,kt(n,t),0!==n.strstart&&(kt(n,e.adler>>>16),kt(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),At(e),i=n.pending,n.pending!==n.pending_buf_size));)St(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),At(e),i=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,St(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),At(e),i=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,St(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),0===r&&(n.status=mt)}else n.status=mt;if(n.status===mt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&At(e),n.pending+2<=n.pending_buf_size&&(St(n,255&e.adler),St(n,e.adler>>8&255),e.adler=0,n.status=bt)):n.status=bt),0!==n.pending){if(At(e),0===e.avail_out)return n.last_flush=-1,tt}else if(0===e.avail_in&&_t(t)<=_t(a)&&t!==Xe)return yt(e,at);if(n.status===vt&&0!==e.avail_in)return yt(e,at);if(0!==e.avail_in||0!==n.lookahead||t!==Ze&&n.status!==vt){let i=n.strategy===ct?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(It(e),0===e.lookahead)){if(t===Ze)return 1;break}if(e.match_length=0,i=Ve(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===dt?((e,t)=>{let i,r,n,a;const o=e.window;for(;;){if(e.lookahead<=pt){if(It(e),e.lookahead<=pt&&t===Ze)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=e.strstart-1,r=o[n],r===o[++n]&&r===o[++n]&&r===o[++n])){a=e.strstart+pt;do{}while(r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&n<a);e.match_length=pt-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=Ve(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=Ve(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(n,t):zt[n.level].func(n,t);if(3!==i&&4!==i||(n.status=vt),1===i||3===i)return 0===e.avail_out&&(n.last_flush=-1),tt;if(2===i&&(t===Ye?$e(n):t!==et&&(Ke(n,0,0,!1),t===Qe&&(wt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),At(e),0===e.avail_out))return n.last_flush=-1,tt}return t!==Xe?tt:n.wrap<=0?it:(2===n.wrap?(St(n,255&e.adler),St(n,e.adler>>8&255),St(n,e.adler>>16&255),St(n,e.adler>>24&255),St(n,255&e.total_in),St(n,e.total_in>>8&255),St(n,e.total_in>>16&255),St(n,e.total_in>>24&255)):(kt(n,e.adler>>>16),kt(n,65535&e.adler)),At(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?tt:it)},X.deflateEnd=e=>{if(!e||!e.state)return rt;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==mt&&t!==bt&&t!==vt?yt(e,rt):(e.state=null,t===bt?yt(e,nt):tt)},X.deflateSetDictionary=(e,t)=>{let i=t.length;if(!e||!e.state)return rt;const r=e.state,n=r.wrap;if(2===n||1===n&&42!==r.status||r.lookahead)return rt;if(1===n&&(e.adler=Je(e.adler,t,i,0)),r.wrap=0,i>=r.w_size){0===n&&(wt(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(i-r.w_size,i),0),t=e,i=r.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,It(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=xt(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,It(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=n,tt},X.deflateInfo="pako deflate (from Nodeca project)";var Nt={};const Lt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Nt.assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)Lt(i,t)&&(e[t]=i[t])}}return e},Nt.flattenChunks=e=>{let t=0;for(let i=0,r=e.length;i<r;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,r=0,n=e.length;t<n;t++){let n=e[t];i.set(n,r),r+=n.length}return i};var jt={};let Ut=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Ut=!1}const qt=new Uint8Array(256);for(let e=0;e<256;e++)qt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;qt[254]=qt[254]=1,jt.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,r,n,a,o=e.length,s=0;for(n=0;n<o;n++)i=e.charCodeAt(n),55296==(64512&i)&&n+1<o&&(r=e.charCodeAt(n+1),56320==(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),n++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),a=0,n=0;a<s;n++)i=e.charCodeAt(n),55296==(64512&i)&&n+1<o&&(r=e.charCodeAt(n+1),56320==(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),n++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t};jt.buf2string=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,n;const a=new Array(2*i);for(n=0,r=0;r<i;){let t=e[r++];if(t<128){a[n++]=t;continue}let o=qt[t];if(o>4)a[n++]=65533,r+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&r<i;)t=t<<6|63&e[r++],o--;o>1?a[n++]=65533:t<65536?a[n++]=t:(t-=65536,a[n++]=55296|t>>10&1023,a[n++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ut)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return i})(a,n)},jt.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+qt[e[i]]>t?i:t};const Kt=X,Ht=Nt,Vt=jt,$t=je,Jt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Gt=Object.prototype.toString,{Z_NO_FLUSH:Wt,Z_SYNC_FLUSH:Zt,Z_FULL_FLUSH:Yt,Z_FINISH:Qt,Z_OK:Xt,Z_STREAM_END:ei,Z_DEFAULT_COMPRESSION:ti,Z_DEFAULT_STRATEGY:ii,Z_DEFLATED:ri}=Ue;function ni(e){this.options=Ht.assign({level:ti,method:ri,chunkSize:16384,windowBits:15,memLevel:8,strategy:ii},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jt,this.strm.avail_out=0;let i=Kt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Xt)throw new Error($t[i]);if(t.header&&Kt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Vt.string2buf(t.dictionary):"[object ArrayBuffer]"===Gt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=Kt.deflateSetDictionary(this.strm,e),i!==Xt)throw new Error($t[i]);this._dict_set=!0}}ni.prototype.push=function(e,t){const i=this.strm,r=this.options.chunkSize;let n,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Qt:Wt,"string"==typeof e?i.input=Vt.string2buf(e):"[object ArrayBuffer]"===Gt.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(r),i.next_out=0,i.avail_out=r),(a===Zt||a===Yt)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(n=Kt.deflate(i,a),n===ei)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),n=Kt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Xt;if(0!==i.avail_out){if(a>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},ni.prototype.onData=function(e){this.chunks.push(e)},ni.prototype.onEnd=function(e){e===Xt&&(this.result=Ht.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ai=function(e,t){return(t=t||{}).gzip=!0,function(e,t){const i=new ni(t);if(i.push(e,!0),i.err)throw i.msg||$t[i.err];return i.result}(e,t)};const oi=["enabled","userId"];var si,ci,di=["drs"];si=di,ci=391,function(e){for(;--e;)si.push(si.shift())}(++ci);var ui,li,hi,fi=new W((ui="0x0",di[ui-=0])),pi=["getItem","sessionStorage","setItem","removeItemSessionStorageSafe","removeItem","localStorage","FALLBACK_SESSION_STORAGE","FALLBACK_LOCAL_STORAGE","clientId","getClientId","getFullStorageKey","getItemSessionStorageSafe"];li=pi,hi=378,function(e){for(;--e;)li.push(li.shift())}(++hi);var gi=function(e,t){return pi[e-=0]};class mi{constructor(e){this[gi("0x0")]={},this[gi("0x1")]={},this[gi("0x2")]=e}[gi("0x3")](){return this[gi("0x2")]}setClientId(e){this[gi("0x2")]=e}[gi("0x4")](e){return this[gi("0x2")]+"_"+e}[gi("0x5")](e){const t=this[gi("0x4")](e);try{return window.sessionStorage[gi("0x6")](t)}catch(e){return this[gi("0x0")][t]}}setItemSessionStorageSafe(e,t){const i=this[gi("0x4")](e);try{window[gi("0x7")][gi("0x8")](i,t)}catch(e){this[gi("0x0")][i]=t}}[gi("0x9")](e){const t=this.getFullStorageKey(e);try{window[gi("0x7")][gi("0xa")](t)}catch(e){this.FALLBACK_SESSION_STORAGE[t]=void 0}}getItemLocalStorageSafe(e){const t=this.getFullStorageKey(e);try{return window.localStorage[gi("0x6")](t)}catch(e){return this.FALLBACK_LOCAL_STORAGE[t]}}setItemLocalStorageSafe(e,t){const i=this[gi("0x4")](e);try{window[gi("0xb")][gi("0x8")](i,t)}catch(e){this[gi("0x1")][i]=t}}removeItemLocalStorageSafe(e){const t=this[gi("0x4")](e);try{window.localStorage[gi("0xa")](t)}catch(e){this[gi("0x1")][t]=void 0}}}var bi,vi,yi=["pushLog","warn","error","flush","log","logPrefix","stringify","push","now","formatter","unshift","enabled","logsLimit","logs","middlewares","info"];bi=yi,vi=235,function(e){for(;--e;)bi.push(bi.shift())}(++vi);var _i=function(e,t){return yi[e-=0]};class wi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[_i("0x0")]=e,this.logPrefix="[AccountProtection SDK]",this[_i("0x1")]=1e4,this[_i("0x2")]=[],this[_i("0x3")]=[]}[_i("0x4")](e,t){this[_i("0x5")](3,e,t)}[_i("0x6")](e,t){this[_i("0x5")](4,e,t)}[_i("0x7")](e,t){this.pushLog(5,e,t)}[_i("0x8")](){const e=this[_i("0x2")];return this[_i("0x2")]=[],e}pushLog(e,i,r){this.enabled&&console[_i("0x9")]("%s %s %s",this[_i("0xa")],i,JSON[_i("0xb")](r)),this.logs[_i("0xc")]({timestamp:Date[_i("0xd")](),severity:e,text:JSON[_i("0xb")](t(t({},r),{},{message:i}),this[_i("0xe")])}),this[_i("0x2")].length>this[_i("0x1")]&&this.logs[_i("0xf")]();const n=this[_i("0x3")].map((e=>e()));Promise.all(n).catch((()=>{}))}[_i("0xe")](e,t){if(t instanceof Error){const{name:e,stack:i,message:r}=t;return{name:e,stack:i,message:r}}return t}}const xi=new wi;var Ai,Ei,Si=["refreshConf","keys","setItemLocalStorageSafe","stringify","timestamp","ric","storageManager","requestsManager","conf","loadConf","device/conf?tenantId=","error","error fetching config","getItemLocalStorageSafe","parse","error loading config","getConfValue"];Ai=Si,Ei=174,function(e){for(;--e;)Ai.push(Ai.shift())}(++Ei);var ki=function(e,t){return Si[e-=0]};const Mi=ki("0x0"),Ci=ki("0x1");class Ii{constructor(e,t){this[ki("0x2")]=e,this[ki("0x3")]=t,this[ki("0x4")]=this[ki("0x5")]()}async fetchConf(e){try{const t=ki("0x6")+e,i=await this[ki("0x3")].getData(t);return null!=i?i:{}}catch(t){return xi[ki("0x7")](ki("0x8"),{clientId:e,error:t}),{}}}[ki("0x5")](){const e=this[ki("0x2")][ki("0x9")](Ci);if(null!=e)try{return JSON[ki("0xa")](e)}catch(e){xi[ki("0x7")](ki("0xb"),{error:e})}return{}}shouldUpdateConf(){const e=this[ki("0xc")](Mi,0);return Date.now()-e>36e5}async[ki("0xd")](e){if(!this.shouldUpdateConf())return!1;let t=await this.fetchConf(e);return 0==Object[ki("0xe")](t).length?t=this.loadConf():this[ki("0x2")][ki("0xf")](Ci,JSON[ki("0x10")](t)),this[ki("0x4")]=t,!0}[ki("0xc")](e,t){const i=void 0!==this[ki("0x4")]?this[ki("0x4")][e]:void 0;return null!=i?i:t}}var Di,Ti,Ri=["EVENT_TYPE_INTERACTION","interaction","EVENT_TYPE_IDENTIFICATION","desktop_web","mobile_web","device"];Di=Ri,Ti=419,function(e){for(;--e;)Di.push(Di.shift())}(++Ti);var zi,Bi,Pi=function(e,t){return Ri[e-=0]};(Bi=zi||(zi={})).EVENT_TYPE_ACTION="action",Bi.EVENT_TYPE_DEVICE=Pi("0x0"),Bi[Pi("0x1")]=Pi("0x2"),Bi[Pi("0x3")]="identification";const Oi=Pi("0x4"),Fi=Pi("0x5");var Ni,Li,ji=["length","splice","push","maintainLastXItems"];Ni=ji,Li=131,function(e){for(;--e;)Ni.push(Ni.shift())}(++Li);var Ui=function(e,t){return ji[e-=0]};class qi{static[Ui("0x0")](e,t,i){return e[Ui("0x1")]>=t&&e[Ui("0x2")](0,1),e[Ui("0x3")](i),e}}var Ki,Hi,Vi=["location","shiftKey","inputType","view","data","buffer","collect","extractEventData","maintainLastXItems","getData","now","extractButtonsPressedData","altKey","buttons","offsetX","offsetY","firesTouchEvents","sourceCapabilities","target","isTrusted","cancelable","metaKey","bufferSize","composed"];Ki=Vi,Hi=292,function(e){for(;--e;)Ki.push(Ki.shift())}(++Hi);var $i=function(e,t){return Vi[e-=0]};class Ji{constructor(e){this[$i("0x0")]=[],this[$i("0x1")]=e}[$i("0x2")](e){const t=this[$i("0x3")](e);qi[$i("0x4")](this[$i("0x0")],this[$i("0x1")],t)}[$i("0x5")](){return this[$i("0x0")]}[$i("0x3")](e){return t({x:e.x,y:e.y,tspl:Date[$i("0x6")]()},this.extractButtonsPressedData(e))}[$i("0x7")](e){return t(t(t(t({},e.ctrlKey&&{ctrlKey:!0}),e[$i("0x8")]&&{altKey:!0}),e.shiftKey&&{shiftKey:!0}),0!=e.buttons&&{buttons:e[$i("0x9")]})}}class Gi{constructor(e){this[$i("0x0")]=[],this.buffer=e}[$i("0x2")](e){var t;const i={x:e.x,y:e.y,timestamp:Date[$i("0x6")](),mouseButtonType:e.detail,offsetX:e[$i("0xa")],offsetY:e[$i("0xb")],isPressed:null==(null===(t=e.sourceCapabilities)||void 0===t?void 0:t[$i("0xc")])?null:!e[$i("0xd")].firesTouchEvents,target_id:e[$i("0xe")].id};qi[$i("0x4")](this.data,this.buffer,i)}[$i("0x5")](){const e=[...this[$i("0x0")]];return this.data=[],e}}class Wi{constructor(e){this[$i("0x0")]=[],this.bufferSize=e}[$i("0x2")](e){var t;const i={isTrusted:e[$i("0xf")],cancelable:e[$i("0x10")],composed:e.composed,isView:!!e.view,shiftKey:e.shiftKey,metaKey:e[$i("0x11")],firesTouchEvents:null===(t=e[$i("0xd")])||void 0===t?void 0:t.firesTouchEvents,timestamp:Date[$i("0x6")]()};qi[$i("0x4")](this[$i("0x0")],this[$i("0x12")],i)}[$i("0x5")](){const e=[...this[$i("0x0")]];return this[$i("0x0")]=[],e}}class Zi{constructor(e){this.data=[],this.bufferSize=e}[$i("0x2")](e){var t;const i={isTrusted:e[$i("0xf")],cancelable:e[$i("0x10")],composed:e[$i("0x13")],isView:!!e.view,location:e[$i("0x14")],shiftKey:e[$i("0x15")],firesTouchEvents:null===(t=e[$i("0xd")])||void 0===t?void 0:t[$i("0xc")],timestamp:Date[$i("0x6")]()};qi[$i("0x4")](this[$i("0x0")],this.bufferSize,i)}[$i("0x5")](){const e=this[$i("0x0")];return this.data=[],e}}class Yi{constructor(e){this.data=[],this[$i("0x12")]=e}[$i("0x2")](e){const t={isTrusted:e[$i("0xf")],cancelable:e[$i("0x10")],composed:e[$i("0x13")],inputType:e[$i("0x16")],isView:!!e[$i("0x17")],timestamp:Date[$i("0x6")]()};qi[$i("0x4")](this[$i("0x0")],this[$i("0x12")],t)}[$i("0x5")](){const e=this[$i("0x0")];return this[$i("0x0")]=[],e}}class Qi{constructor(e){this[$i("0x0")]=[],this[$i("0x12")]=e}[$i("0x2")](e){const t={isTrusted:e.isTrusted,cancelable:e[$i("0x10")],composed:e.composed,timestamp:Date[$i("0x6")]()};qi[$i("0x4")](this[$i("0x0")],this[$i("0x12")],t)}[$i("0x5")](){const e=this[$i("0x0")];return this[$i("0x0")]=[],e}}var Xi,er,tr=["getGenericAttributes","getAttachedData","error","error adding interaction listener","eventTypesToAttach","getData","href","change","paste","mousemove","mouseup","mousedown","submit","keyup","input","focusout","SELECT","TEXTAREA","safeEventCallback","interactionEventsCollectorsData","detail","sourceCapabilities","firesTouchEvents","offsetX","offsetY","target","isTrusted","cancelable","composed","dropEffect","clipboardData","effectAllowed","mouseEventsCollectionBuffer","dataset","virtualKeyboard","inputTypeFilter","tagName","includes","entries","addSafeInteractionListener","Error while adding listener","filter","handleEvent","forEach"];Xi=tr,er=227,function(e){for(;--e;)Xi.push(Xi.shift())}(++er);var ir=function(e,t){return tr[e-=0]};const rr=ir("0x0"),nr=ir("0x1"),ar=ir("0x2"),or=ir("0x3"),sr=ir("0x4"),cr=ir("0x5"),dr=ir("0x6"),ur="keydown",lr=ir("0x7"),hr=ir("0x8"),fr=["INPUT",ir("0x9"),ir("0xa")];class pr{constructor(e,i,r){this.deviceEventDataCollectionIgnoreList=e,this.mouseEventsCollectionBuffer=i,this[ir("0xb")]=r,this[ir("0xc")]={click:{eventTypesToAttach:[ar,or,sr],attributesMapper:e=>{var t;return{x:e.x,y:e.y,mouseButtonType:e[ir("0xd")],isPressed:null==(null===(t=e[ir("0xe")])||void 0===t?void 0:t[ir("0xf")])?null:!e[ir("0xe")][ir("0xf")],offsetX:e[ir("0x10")],offsetY:e[ir("0x11")],target_id:e[ir("0x12")].id}}},[nr]:{attributesMapper:e=>({target_id:e.target.id,isTrusted:e[ir("0x13")],cancelable:e[ir("0x14")],composed:e[ir("0x15")],dropEffect:e.clipboardData[ir("0x16")],effectAllowed:e[ir("0x17")][ir("0x18")]})},[cr]:{attributesMapper:e=>({target_id:e[ir("0x12")].id})},[ar]:{continousCollectors:[new Ji(this[ir("0x19")])]},[or]:{continousCollectors:[new Gi(1)]},[sr]:{continousCollectors:[new Gi(1)]},[hr]:{eventTypesToAttach:[lr,dr,ur,rr],filter:this.inputTypeFilter,attributesMapper:e=>{const{target:i,isTrusted:r,cancelable:n,composed:a}=e;return t({target_id:i.id,dataset_keys:Object.keys(i[ir("0x1a")]||{}),isTrusted:r,cancelable:n,composed:a},navigator[ir("0x1b")]&&{navigator_virtualKeyboard:navigator[ir("0x1b")].overlaysContent})}},[lr]:{filter:this[ir("0x1c")],continousCollectors:[new Yi(50)]},[dr]:{filter:this[ir("0x1c")],continousCollectors:[new Zi(50)]},[ur]:{filter:this[ir("0x1c")],continousCollectors:[new Wi(50)]},[rr]:{continousCollectors:[new Qi(50)]}}}inputTypeFilter(e){var t;const i=null===(t=e[ir("0x12")])||void 0===t?void 0:t[ir("0x1d")];return fr[ir("0x1e")](i)}registerEventListeners(){for(const[e,t]of Object[ir("0x1f")](this[ir("0xc")]))if(!this.deviceEventDataCollectionIgnoreList[ir("0x1e")](e))try{this[ir("0x20")](e,t)}catch(t){xi.error(ir("0x21"),{error:t,eventType:e})}}[ir("0x22")](e,t){return!e.filter||e[ir("0x22")](t)}async[ir("0x23")](e,i,r){const{attributesMapper:n,continousCollectors:a}=e;if(!this[ir("0x22")](e,i))return!1;if(a)a[ir("0x24")]((e=>{e.collect(i)}));else{const e=this[ir("0x25")](),a=this[ir("0x26")](r),o=t(t(t({},e),n(i)),a&&{attachedEventsData:a});await this.safeEventCallback(r,o)}return!0}addSafeInteractionListener(e,t){window.addEventListener(e,(async i=>{try{await this[ir("0x23")](t,i,e)}catch(e){xi[ir("0x27")](ir("0x28"),{error:e})}}))}[ir("0x26")](e){let t;const i=this[ir("0xc")][e][ir("0x29")];return i&&(t={},i[ir("0x24")]((e=>{const{continousCollectors:i}=this[ir("0xc")][e];i&&i[ir("0x24")]((i=>t[e]=i[ir("0x2a")]()))}))),t}[ir("0x25")](){return{location:window.location[ir("0x2b")]}}}var gr,mr,br=["race","catch","warn","executor reached timeout","finally","getHighEntropyValues","model","platform","platformVersion","fullVersionList","bitness","mobile","wow64","resolve","setTimeout"];gr=br,mr=140,function(e){for(;--e;)gr.push(gr.shift())}(++mr);var vr=function(e,t){return br[e-=0]};function yr(){var e;return null===(e=navigator.userAgentData)||void 0===e?void 0:e[vr("0x0")](["architecture",vr("0x1"),vr("0x2"),vr("0x3"),vr("0x4"),vr("0x5"),vr("0x6"),vr("0x7"),"uaFullVersion"])}function _r(e,t){let i;const r=[Promise[vr("0x8")](e()).catch((()=>{})),new Promise(((e,r)=>i=window[vr("0x9")](r,t)))];return Promise[vr("0xa")](r)[vr("0xb")]((()=>xi[vr("0xc")](vr("0xd"),{fnName:e.name})))[vr("0xe")]((()=>clearTimeout(i)))}var wr,xr,Ar=["worker throw error","resolve","collectPromisesData","worker promise rejected","getCookieEnabled","getFIDOEnabled","credentials","PublicKeyCredential","crypto","getRandomValues","from","RTCPeerConnection","getWindowBasedKeys","chrome","safari","__crWeb","yandex","__yb","__ybro","__edgeTrackingPreventionStatistics","webkit","samsungAr","ucweb","UCShellJava","puffinDevice","_phantom","callPhantom","Buffer","emit","spawn","domAutomationController","domAutomation","__nightmare","_selenium","callSelenium","_Selenium_IDE_Recorder","__$webdriverAsyncExecutor","__driver_evaluate","__driver_unwrapped","__fxdriver_evaluate","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","__selenium_evaluate","__selenium_unwrapped","__webdriver__chr","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","__webdriver_unwrapped","awesomium","cdc_adoQpoasnfa76pfcZLmcfl_Array","cdc_adoQpoasnfa76pfcZLmcfl_Promise","chrome_asyncScriptInfo","OSMJIF","spynner_additional_js_loaded","watinExpressionError","watinExpressionResult","push","getMediaMatch","standard","no-preference","high","low","more","less","forced","100","active","none","inverted","rec2020","replace","matchMedia","matches","log","sqrt","exp","acos","acosh","asin","asinh","atanh","atan","sinh","cos","cosh","expm1","log1p","length","hashCodeString","getSessionStorage","sessionStorage","localStorage","external","toString","indexOf","Sequentum","webdriver","__fxdriver_unwrapped","calledSelenium","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","webdriver-evaluate","selenium-evaluate","webdriverCommand","webdriver-evaluate-response","__webdriverFunc","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker","filter","product","userAgent","userAgentData","storage","estimate","navigatorOnLine","userActivation","isActive","permissions","state","sendBeacon","getOwnPropertyDescriptor","hardwareConcurrency","languages","get","function","platform","url","referrer","memory","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","getPlugins","type","plugins","name","description","screen","availHeight","availWidth","height","pixelDepth","orientation","angle","devicePixelRatio","outerWidth","outerHeight","getCpuClass","getOsCpu","oscpu","HTMLElement","prototype","addBehavior","enumerateDevices","kind","label","groupId","OfflineAudioContext","webkitOfflineAudioContext","createOscillator","triangle","frequency","createDynamicsCompressor","knee","ratio","release","connect","destination","start","renderedBuffer","startRendering","getChannelData","subarray","getHash","threshold","attack","createAnalyser","disconnect","frequencyBinCount","getFloatFrequencyData","call","fftSize","getFloatTimeDomainData","reduction","abs","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","AvantGarde Bk BT","BankGothic Md BT","Calibri","Century","Century Gothic","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Levenim MT","Lucida Bright","Lucida Sans","MS Mincho","MS Outlook","MS Reference Specialty","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Minion Pro","Monotype Corsiva","PMingLiU","SCRIPTINA","Segoe UI Light","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","ZWAdobeF","createElement","style","visibility","hidden","span","top","left","fontSize","10px","textContent","appendChild","map","some","offsetWidth","offsetHeight","body","removeChild","language","DateTimeFormat","resolvedOptions","timeZone","vendor","getBuildID","buildID","width","textBaseline","alphabetic","fillStyle","#f60","#069","font",'11pt "Times New Roman"',"fillText","rgba(102, 204, 0, 0.2)","18pt Arial","globalCompositeOperation","multiply","#f2f","#2ff","arc","fill","#f9c","toDataURL","rect","getContext","charging","chargingTime","dischargingTime","level","brave","isBrave","canvas","webgl","webgl-experimental","getExtension","WEBGL_debug_renderer_info","getParameter","UNMASKED_RENDERER_WEBGL","getCodesTests","video","canPlayType",'video/mp4; codecs="avc1.42E01E"',"video/mp4;;Codecs =avc1.42E01E","getPublicData","isMobile","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","reduce","storageManager","configManager","cryptoBinding","calculate","getConfValue","dataPointsExtractor","lastDeviceData","now","getDeviceData","getItemLocalStorageSafe","dataPoints","getBattery","getBrave","getCanvasFingerprint","getConnection","getCryptoRandomValues","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getIndexedDB","getLanguages","getLanguage","getTimezoneOffset","getLocalStorage","getNavigatorBasedKeys","getNavigatorProduct","getNavigatorUAData","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorIsUserActive","getMathFingerprint","getOpenDatabase","getWindowOrientation","getPlatform","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprintExtended","getFonts","getPerformanceMemory","getScreen","hasSequentum","getReferrer","getTimezone","getTouchSupport","getVendor","getWebGlRenderer","getWindowOuter","webRTCDisabled","getCryptoBindingData","bind","getNavigatorPermissionsState","geolocation","isGeoLocationExists","isSendBeaconFunction","getNavigatorPrototype","getInstalledRelatedApps","windowConstructorAliasTest","CDPRuntimeDomainTest","Error","Object","console","debug","windowDocumentAuxVarsTest","getOwnPropertyNames","document","$chrome_asyncScriptInfo","values","value","cache_","getPrototypeOf","storeItem","retrieveItem","isNodeReachable_","sort","Promise","Symbol","token","getAsyncToken","startPromisesLoop","entries","includes","warn"];wr=Ar,xr=295,function(e){for(;--e;)wr.push(wr.shift())}(++xr);var Er=function(e,t){return Ar[e-=0]};const Sr=Er("0x0"),kr=Er("0x1"),Mr=e=>e?[...e][Er("0x2")](((e,t)=>e+Math.abs(t)),0):0;class Cr{constructor(e,t,i){this[Er("0x3")]=e,this[Er("0x4")]=t,this[Er("0x5")]=i}async[Er("0x6")](){const e=this[Er("0x4")][Er("0x7")](Sr,[]),t=this[Er("0x4")][Er("0x7")](kr,36e5),i=await new Ir(e,this[Er("0x5")])[Er("0x8")]();return this[Er("0x9")]=i,this[Er("0x3")].setItemLocalStorageSafe(kr,Date[Er("0xa")]()+t),i}async[Er("0xb")](){return Number(this[Er("0x3")][Er("0xc")](kr))<Date.now()||!this.lastDeviceData?await this.calculate():this[Er("0x9")]}}class Ir{constructor(e,t){this[Er("0x0")]=e,this[Er("0x5")]=t,this[Er("0xd")]={battery:this[Er("0xe")],brave:this[Er("0xf")],canvas:this[Er("0x10")],codecs:this.getCodesTests,connection:this[Er("0x11")],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this[Er("0x12")],deviceMemory:this[Er("0x13")],documentBasedKeys:this[Er("0x14")],hardwareConcurrency:this[Er("0x15")],indexedDB:this[Er("0x16")],fidoEnabled:this.getFIDOEnabled,languages:this[Er("0x17")],language:this[Er("0x18")],timezoneOffset:this[Er("0x19")],localStorage:this[Er("0x1a")],navigatorBasedKeys:this[Er("0x1b")],navigatorProduct:this[Er("0x1c")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this[Er("0x1d")],navigatorHighEntropyData:this[Er("0x1e")],navigatorStorageEstimation:this[Er("0x1f")],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this[Er("0x20")],math:this[Er("0x21")],mediaMatch:this.getMediaMatch,openDatabase:this[Er("0x22")],windowOrientation:this[Er("0x23")],platform:this[Er("0x24")],cpuClass:this.getCpuClass,osClass:this.getOsCpu,addBehavior:this[Er("0x25")],productSub:this[Er("0x26")],mediaDevices:this[Er("0x27")],audioFingerprint:this.getAudioFingerprint,audioFingerprintExtended:this[Er("0x28")],fonts:this[Er("0x29")],performanceTiming:this.getPerformanceTiming,performanceMemory:this[Er("0x2a")],plugins:this.getPlugins,screen:this[Er("0x2b")],sequentum:this[Er("0x2c")],sessionStorage:this.getSessionStorage,referrer:this[Er("0x2d")],timezone:this[Er("0x2e")],touchSupport:this[Er("0x2f")],vendor:this[Er("0x30")],buildID:this.getBuildID,webdriver:this.getWebDriver,webGlRenderer:this[Er("0x31")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this[Er("0x32")],webRTCDisabled:this[Er("0x33")],cryptoBindingData:this[Er("0x34")][Er("0x35")](this),notificationState:this[Er("0x36")].bind(this,"notifications"),geolocationState:this.getNavigatorPermissionsState[Er("0x35")](this,Er("0x37")),isGeoLocationExists:this[Er("0x38")],isSendBeaconExists:this[Er("0x39")],navigatorPrototype:this[Er("0x3a")],installedRelatedApps:this[Er("0x3b")],windowConstructorAliasTest:this[Er("0x3c")],windowDocumentAuxVarsTest:this.windowDocumentAuxVarsTest,CDPRuntimeDomainTest:this[Er("0x3d")]}}[Er("0x3d")](){let e=!1;const t=new(window[Er("0x3e")]);return window[Er("0x3f")].defineProperty(t,"stack",{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window[Er("0x40")][Er("0x41")](t.stack),e}[Er("0x42")](){for(const e of window[Er("0x3f")][Er("0x43")](window[Er("0x44")]))if(e==Er("0x45")||/^\$cdc_[a-zA-Z0-9]{22}_$/.test(e))return!0;for(const e of window[Er("0x3f")][Er("0x46")](window.Object.getOwnPropertyDescriptors(window[Er("0x44")]))){if(!e[Er("0x47")]||void 0===e[Er("0x47")][Er("0x48")])continue;const t=window.Object[Er("0x43")](window[Er("0x3f")][Er("0x49")](e[Er("0x47")])),i=[Er("0x4a"),Er("0x4b"),Er("0x4c")];if(t[Er("0x4d")](),i[Er("0x4d")](),t.every(((e,t)=>e==i[t])))return!0}return!1}[Er("0x3c")](){const e=window[Er("0x3f")].getOwnPropertyNames(window);for(const t of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/.test(t))return!0;for(const e of[window.Array,window[Er("0x4e")],window[Er("0x4f")]])if(t!=(null==e?void 0:e.name)&&t!=Er("0x50")&&t!=Er("0x51")&&window[t]===e)return!0}return!1}async[Er("0x8")](){const e=this.startPromisesLoop();return await this.collectPromisesData(e)}[Er("0x52")](){const e={};for(const[t,i]of Object[Er("0x53")](this[Er("0xd")]))if(!this.sdkDeviceDataCollectionIgnoreList[Er("0x54")](t))try{e[t]=_r(i,100)}catch(i){xi[Er("0x55")](Er("0x56"),{e:i,key:t}),e[t]=Promise[Er("0x57")]()}return e}async[Er("0x58")](e){const t={};for(const[i,r]of Object[Er("0x53")](e))try{t[i]=await r}catch(e){xi[Er("0x55")](Er("0x59"),{e:e,key:i}),t[i]=void 0}return t}[Er("0x5a")](){const e=navigator.cookieEnabled;return Promise[Er("0x57")](e)}async[Er("0x5b")](){return!!navigator[Er("0x5c")]&&await window[Er("0x5d")].isUserVerifyingPlatformAuthenticatorAvailable()}[Er("0x12")](){const e=window[Er("0x5e")][Er("0x5f")](new Uint8Array(16));return Array[Er("0x60")](e)}[Er("0x33")](){const e=null==window[Er("0x61")];return Promise[Er("0x57")](e)}[Er("0x62")](){const e=[Er("0x63"),Er("0x64"),Er("0x65"),"__gCrWeb",Er("0x66"),Er("0x67"),Er("0x68"),"__firefox__",Er("0x69"),Er("0x6a"),"oprt",Er("0x6b"),Er("0x6c"),Er("0x6d"),Er("0x6e"),Er("0x6f"),"__phantomas",Er("0x70"),Er("0x71"),Er("0x72"),Er("0x73"),Er("0x74"),Er("0x75"),Er("0x76"),Er("0x77"),"calledSelenium",Er("0x78"),Er("0x79"),Er("0x7a"),Er("0x7b"),Er("0x7c"),Er("0x7d"),"__fxdriver_unwrapped",Er("0x7e"),Er("0x7f"),Er("0x80"),Er("0x81"),Er("0x82"),Er("0x83"),Er("0x84"),Er("0x85"),Er("0x86"),Er("0x87"),Er("0x88"),"__webdriverFuncgeb",Er("0x89"),"calledPhantom",Er("0x8a"),Er("0x8b"),"cdc_adoQpoasnfa76pfcZLmcfl_Symbol",Er("0x8c"),"fmget_targets","geb",Er("0x8d"),Er("0x8e"),Er("0x8f"),Er("0x90")],t=[];for(const i of e){const e=window[i];void 0!==e&&null!=e&&t[Er("0x91")](i)}return Promise[Er("0x57")](t)}[Er("0x92")](){const e={"dynamic-range":["high",Er("0x93")],"prefers-reduced-motion":[Er("0x94"),Er("0x2")],"prefers-contrast":[Er("0x94"),Er("0x95"),Er("0x96"),Er("0x97"),Er("0x98"),Er("0x99")],"max-monochrome":["0","10",Er("0x9a"),"1000"],"forced-colors":[Er("0x9b"),Er("0x9c")],"inverted-colors":[Er("0x9d"),Er("0x9c")],"color-gamut":[Er("0x9e"),"p3","srgb"]},t={};for(const[i,r]of Object[Er("0x53")](e))for(const e of r)t[i[Er("0x9f")](/-/g,"_")+"_"+e[Er("0x9f")](/-/g,"_")]=window[Er("0xa0")]("("+i+": "+e+")")[Er("0xa1")];return Promise[Er("0x57")](t)}getMathFingerprint(){const e=[Math[Er("0xa5")](.12312423423423424),Math[Er("0xa6")](1e308),(t=1e154,Math[Er("0xa2")](t+Math[Er("0xa3")](t*t-1))),Math[Er("0xa7")](.12312423423423424),Math[Er("0xa8")](1),Math[Er("0xa2")](1+Math[Er("0xa3")](2)),Math[Er("0xa9")](.5),Math[Er("0xa2")](3)/2,Math[Er("0xaa")](.5),Math.sin(-1e300),Math[Er("0xab")](1),Math[Er("0xa4")](1)-1/Math[Er("0xa4")](1)/2,Math[Er("0xac")](10.000000000123),Math[Er("0xad")](1),(Math[Er("0xa4")](1)+1/Math.exp(1))/2,Math.tan(-1e300),Math.tanh(1),(Math[Er("0xa4")](2)-1)/(Math[Er("0xa4")](2)+1),Math[Er("0xa4")](1),Math[Er("0xae")](1),Math[Er("0xa4")](1)-1,Math[Er("0xaf")](10),Math[Er("0xa2")](11),Math.PI**-100];var t;let i="";for(let t=0;t<e[Er("0xb0")];t++)i+=e[t].toString();return Promise[Er("0x57")](Ir[Er("0xb1")](i))}[Er("0x11")](){const{connection:e}=navigator,t=(e=>{let{downlink:t,effectiveType:i,rtt:r,saveData:n}=e;return{downlink:t,effectiveType:i,rtt:r,saveData:n}})(e);return Promise[Er("0x57")](t)}[Er("0xb2")](){return Promise[Er("0x57")](!!window[Er("0xb3")])}[Er("0x1a")](){return Promise[Er("0x57")](!!window[Er("0xb4")])}[Er("0x2c")](){return-1!==window[Er("0xb5")][Er("0xb6")]()[Er("0xb7")](Er("0xb8"))}[Er("0x1b")](){return[Er("0xb9"),Er("0x7b"),Er("0x84"),Er("0x81"),Er("0x7d"),Er("0x7c"),"__webdriver_unwrapped",Er("0x82"),Er("0xba"),Er("0x79"),Er("0x77"),Er("0xbb"),Er("0xbc"),Er("0xbd"),"driver-evaluate",Er("0xbe"),Er("0xbf"),Er("0xc0"),Er("0xc1"),Er("0xc2"),"__webdriver_script_fn","__$webdriverAsyncExecutor",Er("0x7e"),"__lastWatirConfirm","__lastWatirPrompt",Er("0x45"),Er("0xc3"),Er("0xc4")][Er("0xc5")]((e=>navigator[e]))}[Er("0x1c")](){const e=navigator[Er("0xc6")];return Promise.resolve(e)}getNavigatorUserAgent(){return navigator[Er("0xc7")]}[Er("0x1d")](){return navigator[Er("0xc8")]}getNavigatorHighEntropyData(){return yr()}[Er("0x1f")](){return navigator[Er("0xc9")][Er("0xca")]()}[Er("0xcb")](){return navigator.onLine}[Er("0x20")](){return navigator[Er("0xcc")][Er("0xcd")]}async[Er("0x36")](e){try{const t=await navigator[Er("0xce")].query({name:e});return null==t?void 0:t[Er("0xcf")]}catch(e){}}[Er("0x38")](){return!!navigator.geolocation}[Er("0x39")](){return"function"==typeof navigator[Er("0xd0")]}[Er("0x3a")](){return{hardwareConcurrency:Object[Er("0xd1")](Object.getPrototypeOf(navigator),Er("0xd2")).get[Er("0xb6")](),languages:Object[Er("0xd1")](Object.getPrototypeOf(navigator),Er("0xd3"))[Er("0xd4")][Er("0xb6")]()}}async[Er("0x3b")](){if(typeof navigator[Er("0x3b")]===Er("0xd5"))try{const{related_applications:e}=await navigator[Er("0x3b")]();if(e&&Array.isArray(e))return e.map((e=>({platform:e[Er("0xd6")],url:e[Er("0xd7")]})))}catch(e){}}[Er("0x2d")](){return document[Er("0xd8")]}getPerformanceTiming(){return performance.timing}[Er("0x2a")](){const{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}=performance[Er("0xd9")];return{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}}[Er("0x16")](){return Promise[Er("0x57")](!!window[Er("0xda")])}getOpenDatabase(){const{openDatabase:e}=window;return Promise.resolve(!!e)}[Er("0x2f")](){const e=window[Er("0xdb")]&&document instanceof DocumentTouch,t={maxTouchPoints:navigator[Er("0xdc")]||navigator[Er("0xdd")]||0,documentTouch:e,ontouchstart:"ontouchstart"in window};return Promise[Er("0x57")](t)}[Er("0xde")](){function e(e){const t=[];for(let i=0;i<e[Er("0xb0")];++i)t[Er("0x91")]({type:e[i][Er("0xdf")],suffixes:e[i].suffixes});return t}const t=[];for(let i=0;i<navigator.plugins[Er("0xb0")];++i){const r=navigator[Er("0xe0")][i];r&&t[Er("0x91")]({name:r[Er("0xe1")],description:r[Er("0xe2")],mimeTypes:e(r)})}return Promise[Er("0x57")](t)}[Er("0x2b")](){const e=window[Er("0xe3")]||screen,{availLeft:t}=e,{availTop:i}=e,r={availHeight:e[Er("0xe4")],availLeft:t,availTop:i,availWidth:e[Er("0xe5")],colorDepth:e.colorDepth,height:e[Er("0xe6")],width:e.width,pixelDepth:e[Er("0xe7")],orientationAngle:e[Er("0xe8")]&&e[Er("0xe8")][Er("0xe9")],orientationType:e[Er("0xe8")]&&e[Er("0xe8")].type,devicePixelRatio:window[Er("0xea")]};return Promise[Er("0x57")](r)}static[Er("0xb1")](e){if(null==e)return;let t=0,i=0;const r=e[Er("0xb0")];for(;i<r;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t}[Er("0x32")](){const e={outerWidth:window[Er("0xeb")],outerHeight:window[Er("0xec")]};return Promise[Er("0x57")](e)}getWebDriver(){const e=navigator[Er("0xb9")];return Promise[Er("0x57")](e)}[Er("0x23")](){const e=window[Er("0xe8")];return Promise[Er("0x57")](e)}[Er("0x24")](){const e=navigator[Er("0xd6")];return Promise[Er("0x57")](e)}[Er("0xed")](){const e=navigator.cpuClass;return Promise[Er("0x57")](e)}[Er("0xee")](){const e=navigator[Er("0xef")];return Promise[Er("0x57")](e)}[Er("0x25")](){const e=!!window[Er("0xf0")][Er("0xf1")][Er("0xf2")];return Promise[Er("0x57")](e)}getProductSub(){const e=navigator.productSub;return Promise.resolve(e)}async getMediaDevices(){const e=await navigator.mediaDevices[Er("0xf3")](),t=[];for(const i of e)t.push({kind:i[Er("0xf4")],label:i[Er("0xf5")],deviceId:i.deviceId,groupId:i[Er("0xf6")]});return t}async getAudioFingerprint(){const e=window[Er("0xf7")]||window[Er("0xf8")];if(!e)return-1;const t=new e(1,5e3,44100),i=t[Er("0xf9")]();i[Er("0xdf")]=Er("0xfa"),i[Er("0xfb")][Er("0x47")]=1e4;const r=t[Er("0xfc")]();r.threshold.value=-50,r[Er("0xfd")].value=40,r[Er("0xfe")][Er("0x47")]=12,r.attack[Er("0x47")]=0,r[Er("0xff")][Er("0x47")]=.25,i[Er("0x100")](r),r[Er("0x100")](t[Er("0x101")]),i[Er("0x102")](0);const n=new Promise((async(e,i)=>{t.oncomplete=t=>e(t[Er("0x103")]);try{await t[Er("0x104")]()}catch(e){i(e)}})),a=(await n)[Er("0x105")](0)[Er("0x106")](4500);return Ir[Er("0x107")](a)}async[Er("0x28")](){var e;const t=window[Er("0xf7")]||window[Er("0xf8")];if(!t)return{};const i=new t(1,5e3,44100),r=i[Er("0xf9")]();r[Er("0xdf")]="triangle",r[Er("0xfb")][Er("0x47")]=1e4;const n=i[Er("0xfc")]();n[Er("0x108")][Er("0x47")]=-50,n[Er("0xfd")][Er("0x47")]=40,n[Er("0x109")][Er("0x47")]=0;const a=i[Er("0x10a")]();r[Er("0x100")](n),n[Er("0x100")](a),n[Er("0x100")](i[Er("0x101")]),r[Er("0x102")](0);try{await i[Er("0x104")](),n[Er("0x10b")](),r[Er("0x10b")]();const t=new Float32Array(a[Er("0x10c")]);null===(e=a[Er("0x10d")])||void 0===e||e[Er("0x10e")](a,t);const o=new Float32Array(a[Er("0x10f")]);return Er("0x110")in a&&a[Er("0x110")](o),{gain:n[Er("0x111")][Er("0x47")]||n[Er("0x111")],freq:Mr(t),time:Mr(o)}}catch(e){return{}}}static[Er("0x107")](e){let t=0;for(let i=0;i<e.length;++i)t+=Math[Er("0x112")](e[i]);return t}[Er("0x29")](){const e=[Er("0x113"),Er("0x114"),Er("0x115")],t=[Er("0x116"),Er("0x117"),Er("0x118"),"Arabic Typesetting","Arial Unicode MS",Er("0x119"),Er("0x11a"),"Batang","Bitstream Vera Sans Mono",Er("0x11b"),Er("0x11c"),Er("0x11d"),"Clarendon",Er("0x11e"),Er("0x11f"),Er("0x120"),Er("0x121"),Er("0x122"),"Gill Sans",Er("0x123"),Er("0x124"),Er("0x125"),Er("0x126"),"Leelawadee","Letter Gothic",Er("0x127"),Er("0x128"),Er("0x129"),"Menlo",Er("0x12a"),Er("0x12b"),Er("0x12c"),"MS UI Gothic",Er("0x12d"),Er("0x12e"),Er("0x12f"),Er("0x130"),"Microsoft Uighur",Er("0x131"),Er("0x132"),Er("0x133"),"Pristina",Er("0x134"),Er("0x135"),"Serifa","SimHei",Er("0x136"),Er("0x137"),Er("0x138"),Er("0x139"),"Vrinda",Er("0x13a")],i=document[Er("0x13b")]("div");i[Er("0x13c")][Er("0x13d")]=Er("0x13e");const r={},n={},a=e=>{const t=document[Er("0x13b")](Er("0x13f")),{style:r}=t;return r.position="absolute",r[Er("0x140")]="0",r[Er("0x141")]="0",r.fontFamily=e,r[Er("0x142")]=Er("0x143"),t[Er("0x144")]="mmMwWLliI0O&1",i[Er("0x145")](t),t},o=(e,t)=>a("'"+e+"',"+t),s=e[Er("0x146")](a),c=(()=>{const i={};for(const r of t)i[r]=e[Er("0x146")]((e=>o(r,e)));return i})();document.body[Er("0x145")](i);try{for(let t=0;t<e[Er("0xb0")];t++)r[e[t]]=s[t][Er("0x148")],n[e[t]]=s[t][Er("0x149")];const i=t.filter((t=>{return i=c[t],e[Er("0x147")](((e,t)=>i[t].offsetWidth!==r[e]||i[t].offsetHeight!==n[e]));var i}));return Promise[Er("0x57")](i)}finally{document[Er("0x14a")][Er("0x14b")](i)}}getTimezoneOffset(){const e=(new Date)[Er("0x19")]();return Promise[Er("0x57")](e)}[Er("0x18")](){const e=navigator[Er("0x14c")];return Promise[Er("0x57")](e)}[Er("0x17")](){const e=navigator[Er("0xd3")];return Promise[Er("0x57")](e)}[Er("0x15")](){const e=navigator[Er("0xd2")];return Promise[Er("0x57")](e)}[Er("0x13")](){const e=navigator.deviceMemory;return Promise.resolve(e)}[Er("0x14")](){return[Er("0x84"),Er("0x81"),Er("0x87"),Er("0x86"),Er("0x85"),Er("0x7d"),Er("0x7c"),"__webdriver_unwrapped",Er("0x7b"),"__selenium_unwrapped",Er("0xba")][Er("0xc5")]((e=>document[e]))}[Er("0x2e")](){const e=Intl[Er("0x14d")]()[Er("0x14e")]()[Er("0x14f")];return Promise.resolve(e)}[Er("0x30")](){const e=navigator[Er("0x150")];return Promise.resolve(e)}[Er("0x151")](){const e=navigator[Er("0x152")];return Promise[Er("0x57")](e)}async[Er("0x10")](){const e=document[Er("0x13b")]("canvas");e.width=1,e[Er("0xe6")]=1;const t=e[Er("0x167")]("2d"),i={winding:function(e){return e[Er("0x166")](0,0,10,10),e[Er("0x166")](2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(t),geometry:function(e,t){e[Er("0x153")]=122,e[Er("0xe6")]=110,t[Er("0x15e")]=Er("0x15f");const i=[[Er("0x160"),40,40],[Er("0x161"),80,40],["#ff2",60,80]];for(const[e,r,n]of i)t[Er("0x156")]=e,t.beginPath(),t[Er("0x162")](r,n,40,0,2*Math.PI,!0),t.closePath(),t[Er("0x163")]();return t[Er("0x156")]=Er("0x164"),t[Er("0x162")](60,60,60,0,2*Math.PI,!0),t[Er("0x162")](60,60,20,0,2*Math.PI,!0),t[Er("0x163")]("evenodd"),Ir[Er("0xb1")](e[Er("0x165")]())}(e,t),text:function(e,t){e[Er("0x153")]=240,e.height=60,t[Er("0x154")]=Er("0x155"),t[Er("0x156")]=Er("0x157"),t.fillRect(100,1,62,20),t[Er("0x156")]=Er("0x158"),t[Er("0x159")]=Er("0x15a");const i="Cwm fjordbank gly "+String.fromCharCode(55357,56835);return t[Er("0x15b")](i,2,15),t.fillStyle=Er("0x15c"),t[Er("0x159")]=Er("0x15d"),t.fillText(i,4,45),Ir[Er("0xb1")](e.toDataURL())}(e,t)};return Promise[Er("0x57")](i)}async getBattery(){const e=await navigator[Er("0xe")]();return{charging:e[Er("0x168")],chargingTime:e[Er("0x169")],dischargingTime:e[Er("0x16a")],level:e[Er("0x16b")]}}async[Er("0xf")](){return!!navigator[Er("0x16c")]&&await navigator[Er("0x16c")][Er("0x16d")]()}async[Er("0x31")](){const e=document[Er("0x13b")](Er("0x16e")),t=e[Er("0x167")](Er("0x16f"))||e.getContext(Er("0x170")),i=t[Er("0x171")](Er("0x172"));return Promise[Er("0x57")](t[Er("0x173")](i[Er("0x174")]))}async[Er("0x175")](){const e=document[Er("0x13b")](Er("0x176")),t={basic:""===e[Er("0x177")](Er("0x178")),advanced:""===e[Er("0x177")](Er("0x179"))};return Promise.resolve(t)}async[Er("0x34")](){const{publicKey:e,keyIdentifier:t}=await this.cryptoBinding[Er("0x17a")]();return{publicKey:e,keyIdentifier:t}}static[Er("0x17b")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator[Er("0xc7")])||null!=window[Er("0xe8")]||window[Er("0xa0")](Er("0x17c"))[Er("0xa1")]}}var Dr,Tr,Rr=["uncompressed","ALLOW","CHALLENGE","DENY","TRUST","compress","compressed"];Dr=Rr,Tr=271,function(e){for(;--e;)Dr.push(Dr.shift())}(++Tr);var zr,Br,Pr,Or,Fr=function(e,t){return Rr[e-=0]};(Br=zr||(zr={}))[Fr("0x0")]=Fr("0x1"),Br[Fr("0x2")]=Fr("0x2"),(Or=Pr||(Pr={}))[Fr("0x3")]=Fr("0x3"),Or.CHALLENGE=Fr("0x4"),Or[Fr("0x5")]="DENY",Or[Fr("0x6")]=Fr("0x6");var Nr,Lr,jr=["parse","SHA-256","crypto is not supported","generateSymKey","subtle","generateKey","AES-GCM","encrypt","decrypt","encryptPayload","string","encode","crypto","arrayBufferToBase64","encryptSymKeyBundle","exportKey","raw","stringify","RSA-OAEP","byteLength","fromCharCode","btoa","importPublicKey","importKey"];Nr=jr,Lr=483,function(e){for(;--e;)Nr.push(Nr.shift())}(++Lr);var Ur=function(e,t){return jr[e-=0]};class qr{constructor(e){this.configManager=e}[Ur("0x0")](){return window.crypto[Ur("0x1")][Ur("0x2")]({name:Ur("0x3"),length:256},!0,[Ur("0x4"),Ur("0x5")])}async[Ur("0x6")](e,t){const i=typeof e===Ur("0x7")?(new TextEncoder)[Ur("0x8")](e):e,r=window.crypto.getRandomValues(new Uint8Array(12)),n={name:Ur("0x3"),iv:r},a=await window[Ur("0x9")].subtle.encrypt(n,t,i);return{payloadCipherText:this[Ur("0xa")](a),iv:r}}async[Ur("0xb")](e,t,i){const r=await window[Ur("0x9")].subtle[Ur("0xc")](Ur("0xd"),e),n=this[Ur("0xa")](r),a=this[Ur("0xa")](t),o=(new TextEncoder)[Ur("0x8")](JSON[Ur("0xe")]({symKey:n,iv:a})),s=await window[Ur("0x9")][Ur("0x1")][Ur("0x4")]({name:Ur("0xf")},i,o);return this[Ur("0xa")](s)}[Ur("0xa")](e){let t="";const i=new Uint8Array(e),r=i[Ur("0x10")];for(let e=0;e<r;e++)t+=String[Ur("0x11")](i[e]);return window[Ur("0x12")](t)}[Ur("0x13")](e){return window[Ur("0x9")][Ur("0x1")][Ur("0x14")]("jwk",JSON[Ur("0x15")](e),{name:Ur("0xf"),hash:Ur("0x16")},!0,["encrypt"])}async[Ur("0x4")](e,t){if(!window[Ur("0x9")]||!window[Ur("0x9")][Ur("0x1")])throw new Error(Ur("0x17"));const i=await this[Ur("0x0")](),{payloadCipherText:r,iv:n}=await this.encryptPayload(t,i),a=await this[Ur("0x13")](e);return{encryptedData:r,encryptedKey:await this[Ur("0xb")](i,n,a)}}}var Kr,Hr,Vr=["error","name","toString","SDKError: ",", errorSpace: ","toLog","CLIENT","SERVER","server","COMMUNICATION","communication","errorSpace","errorCode","message"];Kr=Vr,Hr=468,function(e){for(;--e;)Kr.push(Kr.shift())}(++Hr);var $r,Jr,Gr=function(e,t){return Vr[e-=0]};(Jr=$r||($r={}))[Gr("0x0")]="client",Jr[Gr("0x1")]=Gr("0x2"),Jr[Gr("0x3")]=Gr("0x4");class Wr extends Error{constructor(e,t,i){var r,n;super(),this.error=e,this[Gr("0x5")]=t,this[Gr("0x6")]=i,this[Gr("0x7")]=(null===(r=this[Gr("0x8")])||void 0===r?void 0:r.message)||this[Gr("0x8")].toString(),this[Gr("0x9")]=(null===(n=this[Gr("0x8")])||void 0===n?void 0:n.name)||Wr[Gr("0x9")]}[Gr("0xa")](){return Gr("0xb")+this.message+(this[Gr("0x5")]?Gr("0xc")+this[Gr("0x5")]:"")+(this[Gr("0x6")]?", errorCode: "+this[Gr("0x6")]:"")}[Gr("0xd")](){return t(t({name:this[Gr("0x9")],message:this[Gr("0x7")]},this[Gr("0x5")]&&{errorSpace:this.errorSpace}),this[Gr("0x6")]&&{errorCode:this[Gr("0x6")]})}}var Zr,Yr,Qr=["identityManager","getTabId","timestamp","includes","type","addEventToLocalStorage","push","length","flushTimeoutHandle","flush","Error while emitting event","getClientId","errorCode","toLog","min","catch","Error while emitting event (delayed flush)","refreshSessionToken","sendDeviceDataEvent","Failed to refresh data","isTokenExpired","error","Failed to polling data","enrichUADataIfDoesNotExist","navigatorHighEntropyData","popAllEvents","pop","sort","clientId","deviceId","userId","getUserId","sdkPlatform","events","keyIdentifier","warn","sessionToken","buildEncryptedRequestBody","getRotationData","data","signature","postData","device/events","headers","find","value","setDeviceId","setUserId","cleanLocalStorageEvents","COMMUNICATION","stringify","uncompressed","increaseEventIndex","eventIndex","getItemLocalStorageSafe","parseInt","isNaN","setItemLocalStorageSafe","shouldSendDeviceEvent","now","info","no need to send device event","getDeviceData","emitEvent","getDeviceId","page_load","referrer","history","extractWindowRespurces","performance","getEntriesByType","resources","isArray","map","name","initiatorType","registerEventListeners","fetchEventsFromLocalStorage","parse","removeItemLocalStorageSafe","ddls","rei","mouseEventsCollectionBuffer","bufferSize","bufferInterval","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","configManager","storageManager","requestsManager","cryptoBinding","serverPath","enableSessionToken","safeEventCallback","EVENT_TYPE_INTERACTION","eventsQueue","crypto","interactionEventsManager","getConfValue","isMobile","eventTypesToStore","maxEventStored","pollingInterval","pollingSessionToken","index","location","toString","platform","sdkVersion","tabId"];Zr=Qr,Yr=410,function(e){for(;--e;)Zr.push(Zr.shift())}(++Yr);var Xr=function(e,t){return Qr[e-=0]};const en=Xr("0x0"),tn="lastDeviceInDeviceEvent",rn=Xr("0x1"),nn="lse",an=Xr("0x2"),on="deviceEventDataCollectionIgnoreList",sn=Xr("0x3"),cn=Xr("0x4"),dn=[zi.EVENT_TYPE_ACTION,zi[Xr("0x5")]],un=Xr("0x6");class ln{constructor(e,i,r,n,a,o,s,c){this[Xr("0x7")]=e,this[Xr("0x8")]=i,this.deviceDataManager=r,this[Xr("0x9")]=n,this.identityManager=a,this[Xr("0xa")]=o,this[Xr("0xb")]=s,this[Xr("0xc")]=c,this.eventIndex=null,this.flushTimeoutHandle=null,this[Xr("0xd")]=async(e,i)=>{try{const r=t({},t({interaction_type:e},i)),n={type:zi[Xr("0xe")],attributes:r};return await this.emitEvent(n)}catch(e){}},this.enableSessionToken=c,this[Xr("0xf")]=[],this[Xr("0x10")]=new qr(e),this[Xr("0x11")]=new pr(this.configManager[Xr("0x12")](on,[]),this[Xr("0x7")][Xr("0x12")](an,100),this.safeEventCallback),this[Xr("0x13")]=Ir.isMobile(),this[Xr("0x14")]=this[Xr("0x7")][Xr("0x12")](un,[zi.EVENT_TYPE_ACTION]),this[Xr("0x15")]=this.configManager[Xr("0x12")]("maxLocalStoredEvents",4),this[Xr("0x16")]=36e4,this[Xr("0x17")]()}async emitEvent(e){e[Xr("0x18")]=this.increaseEventIndex(),e[Xr("0x19")]=location[Xr("0x1a")](),e.platform=navigator[Xr("0x1b")],e[Xr("0x1c")]="1.52.0",e[Xr("0xb")]=this.serverPath,e[Xr("0x1d")]=this[Xr("0x1e")][Xr("0x1f")](),e[Xr("0x20")]=Date.now(),await this.enrichUADataIfDoesNotExist(e);let t=0;this[Xr("0x14")][Xr("0x21")](e[Xr("0x22")])?t=this[Xr("0x23")](e):this[Xr("0xf")][Xr("0x24")](e);const i=this[Xr("0x7")][Xr("0x12")](sn,2);if(this.eventsQueue[Xr("0x25")]+t>=i||dn[Xr("0x21")](e[Xr("0x22")])){this[Xr("0x26")]&&(clearTimeout(this.flushTimeoutHandle),this[Xr("0x26")]=null);try{return await this[Xr("0x27")]()}catch(t){throw xi.error(Xr("0x28"),{clientId:this[Xr("0x1e")][Xr("0x29")](),eventType:e[Xr("0x22")],error:t[Xr("0x2a")]?t[Xr("0x2b")]():t}),t}}if(!this.flushTimeoutHandle&&this[Xr("0xf")][Xr("0x25")]>0){const t=this[Xr("0x7")][Xr("0x12")](cn,2),i=Math[Xr("0x2c")](t,30);this.flushTimeoutHandle=setTimeout((()=>{this[Xr("0x26")]=null,this[Xr("0x27")]()[Xr("0x2d")]((t=>{xi.error(Xr("0x2e"),{clientId:this[Xr("0x1e")][Xr("0x29")](),eventType:e[Xr("0x22")],error:t[Xr("0x2a")]?t.toLog():t})}))}),1e3*i)}return{}}async[Xr("0x2f")](){try{return this[Xr("0xf")][Xr("0x25")]>0||await this[Xr("0x30")](!0),await this.flush()}catch(e){xi.error(Xr("0x31"),{e:e})}}async[Xr("0x17")](){try{this[Xr("0x1e")][Xr("0x32")]()&&await this[Xr("0x2f")]()}catch(e){xi[Xr("0x33")](Xr("0x34"),{e:e})}finally{setTimeout((async()=>{await this[Xr("0x17")]()}),this[Xr("0x16")])}}async[Xr("0x35")](e){var t;if(!(null===(t=e.attributes)||void 0===t?void 0:t.navigatorHighEntropyData))try{e.attributes[Xr("0x36")]=await yr()}catch(e){}}[Xr("0x37")](){const e=[],t=this.fetchEventsFromLocalStorage();for(;this.eventsQueue[Xr("0x25")];)e[Xr("0x24")](this[Xr("0xf")][Xr("0x38")]());return(null==t?void 0:t[Xr("0x25")])&&e[Xr("0x24")](...t),e[Xr("0x39")](((e,t)=>e[Xr("0x20")]-t[Xr("0x20")]))}async flush(){const e=this[Xr("0x37")]();if(0===e[Xr("0x25")])return{};const i={};i[Xr("0x3a")]=this[Xr("0x1e")][Xr("0x29")](),i[Xr("0x3b")]=this[Xr("0x1e")].getDeviceId(),i[Xr("0x3c")]=this[Xr("0x1e")][Xr("0x3d")](),i[Xr("0x3e")]=this[Xr("0x13")]?Fi:Oi,i[Xr("0x3f")]=e;try{const{keyIdentifier:e}=await this[Xr("0xa")].getPublicData();i[Xr("0x40")]=e}catch(e){xi[Xr("0x41")]("Crypto-binding is not supported. "+e)}this.enableSessionToken&&(i[Xr("0x42")]=!0);const r=await this[Xr("0x43")](i),n=await this[Xr("0xa")][Xr("0x44")]();let a;n&&(a=[{type:"key_rotation_data",data:n[Xr("0x45")],signature:n[Xr("0x46")]}]);const o=await this.requestsManager[Xr("0x47")](Xr("0x48"),t(t({},r),a?{headers:a}:{}));if(o[Xr("0x49")]){const e=o[Xr("0x49")][Xr("0x4a")]((e=>"key_rotation_status"===e[Xr("0x22")]));e&&e[Xr("0x4b")]&&this[Xr("0xa")].handleRotateResponse(e[Xr("0x4b")])}return o[Xr("0x3b")]&&this[Xr("0x1e")][Xr("0x4c")](o.deviceId),o[Xr("0x42")]&&this[Xr("0x1e")].setSessionToken(o[Xr("0x42")]),o[Xr("0x3c")]&&this[Xr("0x1e")][Xr("0x4d")](o[Xr("0x3c")]),this[Xr("0x4e")](),o}async buildEncryptedRequestBody(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this[Xr("0x7")][Xr("0x12")]("publicKey",null);if(null===i&&t)return await this[Xr("0x7")].refreshConf(this[Xr("0x1e")][Xr("0x29")]()),await this[Xr("0x43")](e);if(null===i)throw new Wr(new Error("Encryption error - missing public key"),$r[Xr("0x4f")]);try{const t=JSON[Xr("0x50")](e),r=this.compressData(t),n=r||t,{encryptedData:a,encryptedKey:o}=await this[Xr("0x10")].encrypt(i,n);return{data:a,key:o,dataType:r?zr.compress:zr[Xr("0x51")]}}catch(e){throw new Wr(e,$r.CLIENT)}}compressData(e){try{return ai(e)}catch(e){xi.error("Failed to compress data, sending the data to the service uncompressed",{clientId:this[Xr("0x1e")][Xr("0x29")](),error:e})}}[Xr("0x52")](){if(null===this[Xr("0x53")]){const e=this[Xr("0x8")][Xr("0x54")](rn),t=Number[Xr("0x55")](e);this[Xr("0x53")]=Number[Xr("0x56")](t)?-1:t}return this[Xr("0x53")]++,this[Xr("0x8")][Xr("0x57")](rn,this.eventIndex[Xr("0x1a")]()),this[Xr("0x53")]}[Xr("0x58")](){const e=this[Xr("0x8")][Xr("0x54")](en),t=this[Xr("0x8")][Xr("0x54")](tn);return!e||!t||Date[Xr("0x59")]()-e>864e5||t!=this[Xr("0x1e")].getDeviceId()}async[Xr("0x30")](e){if(!e&&!this.shouldSendDeviceEvent())return xi[Xr("0x5a")](Xr("0x5b")),!1;const t=await this.deviceDataManager[Xr("0x5c")](),i={type:zi.EVENT_TYPE_DEVICE,attributes:t},r=await this[Xr("0x5d")](i);return r&&(this.storageManager[Xr("0x57")](en,Date.now()),this[Xr("0x8")][Xr("0x57")](tn,this.identityManager[Xr("0x5e")]())),r}async sendPageLoadEvent(){const e=Xr("0x5f");if(this.configManager.getConfValue(on,[])[Xr("0x21")](e))return!1;const i=this.extractWindowRespurces();return await this.emitEvent({type:zi[Xr("0xe")],attributes:t(t({interaction_type:e,location:window[Xr("0x19")].href,referrer:document[Xr("0x60")]},window[Xr("0x61")]&&{window_historyLength:window[Xr("0x61")].length}),i&&{windowResources:i})}),!0}[Xr("0x62")](){try{const e=window[Xr("0x63")][Xr("0x64")](Xr("0x65"));return e&&Array[Xr("0x66")](e)?e[Xr("0x67")]((e=>({name:e[Xr("0x68")],initiatorType:e[Xr("0x69")]}))):void 0}catch(e){}}registerEventListeners(){this.interactionEventsManager[Xr("0x6a")](),this[Xr("0x1e")][Xr("0x6a")]()}[Xr("0x6b")](){const e=this[Xr("0x8")][Xr("0x54")](nn);return e?JSON[Xr("0x6c")](e):[]}[Xr("0x23")](e){const t=this.fetchEventsFromLocalStorage();return qi.maintainLastXItems(t,this[Xr("0x15")],e),this[Xr("0x8")].setItemLocalStorageSafe(nn,JSON.stringify(t)),t[Xr("0x25")]}cleanLocalStorageEvents(){this[Xr("0x8")][Xr("0x6d")](nn)}}var hn,fn,pn=["userId","removeItemSessionStorageSafe","removeItemLocalStorageSafe","tabId","random","setSessionToken","getSessionToken","parse","iat","exp","now","rti","rst","userIdStorageExpiry","configManager","setClientId","clientId","loadDeviceId","loadTabId","registerEventListeners","addEventListener","beforeunload","saveTabIdOnUnload","getDeviceId","setDeviceId","deviceId","info","Updating DeviceId","setItemSessionStorageSafe","storageManager","setItemLocalStorageSafe","getItemSessionStorageSafe","getItemLocalStorageSafe","getClientId","getUserId","getConfValue","setUserId"];hn=pn,fn=344,function(e){for(;--e;)hn.push(hn.shift())}(++fn);var gn=function(e,t){return pn[e-=0]};const mn="rui",bn="rdi",vn="rdit",yn=gn("0x0"),_n=gn("0x1"),wn=gn("0x2");class xn{constructor(e,t,i){this.storageManager=e,this[gn("0x3")]=t,this.clientId=i,this[gn("0x4")](this[gn("0x5")])}load(){this[gn("0x6")](),this[gn("0x7")]()}[gn("0x8")](){window[gn("0x9")](gn("0xa"),(async()=>this[gn("0xb")]()))}[gn("0xc")](){return this.deviceId}[gn("0xd")](e){this[gn("0xe")]!==e&&(xi[gn("0xf")](gn("0x10"),{deviceId:e}),this[gn("0xe")]=e,this.storageManager[gn("0x11")](bn,e),this[gn("0x12")][gn("0x13")](bn,e))}[gn("0x6")](){const e=this.storageManager[gn("0x14")](bn)||this[gn("0x12")][gn("0x15")](bn);return null!=e&&this[gn("0xd")](e),e}[gn("0x16")](){return this[gn("0x5")]}setClientId(e){this[gn("0x12")][gn("0x16")]()!=e&&this.storageManager[gn("0x4")](e),this[gn("0x12")].setItemSessionStorageSafe("rci",e)}[gn("0x17")](){if(Number(this[gn("0x12")].getItemLocalStorageSafe(vn))+this[gn("0x3")][gn("0x18")](wn,864e5)<Date.now())return this.removeUserId(),null;const e=this[gn("0x12")][gn("0x14")](mn);return null!=e?e:this[gn("0x12")][gn("0x15")](mn)}[gn("0x19")](e){this[gn("0x1a")]=e,this.storageManager[gn("0x11")](mn,e),this[gn("0x12")].setItemLocalStorageSafe(mn,e),this[gn("0x12")][gn("0x13")](vn,Date.now())}removeUserId(){this.storageManager[gn("0x1b")](mn),this[gn("0x12")][gn("0x1c")](mn),this[gn("0x12")][gn("0x1c")](vn)}[gn("0x7")](){const e=this.storageManager[gn("0x14")](yn);e?(this[gn("0x12")][gn("0x1b")](yn),this[gn("0x1d")]=e):this[gn("0x1d")]=Math.floor(Math[gn("0x1e")]()*Number.MAX_SAFE_INTEGER).toString()}getTabId(){return this[gn("0x1d")]}[gn("0xb")](){this[gn("0x12")][gn("0x11")](yn,this[gn("0x1d")])}[gn("0x1f")](e){this[gn("0x12")][gn("0x13")](_n,e)}getSessionToken(){return this[gn("0x12")].getItemLocalStorageSafe(_n)||this.storageManager[gn("0x14")](_n)}isTokenExpired(){var e;const t=this[gn("0x20")]();if(!t)return!0;try{const i=JSON[gn("0x21")](atob(t.split(".")[1]));let r=(null!==(e=i.exp)&&void 0!==e?e:i[gn("0x22")])*(i.exp&&i[gn("0x23")]<1e12?1e3:1);return i.exp||(r+=9e5),Date[gn("0x24")]()>=r}catch(e){return xi.error("Invalid JWT:",{error:e}),!0}}}var An,En,Sn=["stringify","callServer","getData","GET","fetch","fetch-api is not supported","CLIENT","statusText","status","message","COMMUNICATION","serverPath","postData","postDataFromURL","POST","include","application/json"];An=Sn,En=198,function(e){for(;--e;)An.push(An.shift())}(++En);var kn=function(e,t){return Sn[e-=0]};class Mn{constructor(e){this[kn("0x0")]=e}async[kn("0x1")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this[kn("0x2")](this[kn("0x0")]+e,t,i)}async[kn("0x2")](e,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:kn("0x3"),credentials:kn("0x4"),headers:new Headers(t({"Content-Type":kn("0x5")},r)),body:JSON[kn("0x6")](i)};return await this[kn("0x7")](e,n)}async[kn("0x8")](e){const t=this[kn("0x0")]+e,i={method:kn("0x9"),credentials:kn("0x4")};return await this[kn("0x7")](t,i)}async[kn("0x7")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(kn("0xa")in window))throw new Wr(new Error(kn("0xb")),$r[kn("0xc")]);try{const i=await fetch(e,t),r=await i.json();if(i.ok)return r;throw new Wr(new Error(r.message||i[kn("0xd")]),$r.SERVER,i[kn("0xe")])}catch(e){if(!(e instanceof Wr))throw new Wr(new Error(e[kn("0xf")]),$r[kn("0x10")]);throw e}}}var Cn,In,Dn=["filter","length","Invalid SDK params was provided: ","stringify","REQUIRED_SDK_PARAMS","string","throwOrReturnResult","info","throwError","validateSDKParams","keys"];Cn=Dn,In=224,function(e){for(;--e;)Cn.push(Cn.shift())}(++In);var Tn=function(e,t){return Dn[e-=0]};class Rn{constructor(){this[Tn("0x0")]={clientId:Tn("0x1")}}[Tn("0x2")](e,t,i){if(!e&&((null==t?void 0:t.logIfInvalid)&&xi[Tn("0x3")](i),null==t?void 0:t[Tn("0x4")]))throw new Error(i);return e}[Tn("0x5")](e,t){const i=Object[Tn("0x6")](this[Tn("0x0")])[Tn("0x7")]((t=>typeof e[t]!=this[Tn("0x0")][t]));return this[Tn("0x2")](0==i[Tn("0x8")],t,Tn("0x9")+JSON[Tn("0xa")](i))}}var zn,Bn,Pn=["platform","postData","device/logs","requestsManager","identityManager","configManager","lastTimeLogsSent","logMiddleware","reportLogs","middlewares","push","getConfValue","enableLogsReporting","logsMinimumDelay","logs","length","now","flush","getClientId","floor"];zn=Pn,Bn=363,function(e){for(;--e;)zn.push(zn.shift())}(++Bn);var On=function(e,t){return Pn[e-=0]};class Fn{constructor(e,t,i){this[On("0x0")]=e,this[On("0x1")]=t,this[On("0x2")]=i,this[On("0x3")]=0,this[On("0x4")]=async()=>{try{await this[On("0x5")]()}catch(e){}},xi[On("0x6")][On("0x7")](this[On("0x4")])}async[On("0x5")](){if(!this[On("0x2")][On("0x8")](On("0x9"),!1))return;const e=this[On("0x2")].getConfValue("logsMinimumBatch",6),t=this[On("0x2")][On("0x8")](On("0xa"),12e4);if(xi[On("0xb")][On("0xc")]<e||this[On("0x3")]+t>Date.now())return;this[On("0x3")]=Date[On("0xd")]();const i=xi[On("0xe")](),r=this[On("0x1")][On("0xf")](),n=Math[On("0x10")](Date[On("0xd")]()/1e3),a={sdkVersion:"1.52.0",platform:navigator[On("0x11")],clientId:r,timestamp:n,logEntries:i};await this[On("0x0")][On("0x12")](On("0x13"),a)}}var Nn,Ln,jn=["getClientId","device/migrate-identifiers","postDataFromURL","deviceId","storageManager","rimd","identityManager","migrateIdentifiers","getItemLocalStorageSafe","true","getDeviceId"];Nn=jn,Ln=258,function(e){for(;--e;)Nn.push(Nn.shift())}(++Ln);var Un=function(e,t){return jn[e-=0]};const qn=Un("0x0");class Kn{constructor(e,t,i){this[Un("0x1")]=e,this.requestsManager=t,this.storageManager=i}async[Un("0x2")](e){if(this.storageManager[Un("0x3")](qn)!=Un("0x4")){const t=this[Un("0x1")][Un("0x5")](),i=this[Un("0x1")][Un("0x6")](),r=(e.endsWith("/")?e:e+"/")+Un("0x7"),n=await this.requestsManager[Un("0x8")](r,{deviceId:t,clientId:i});n.deviceId&&n[Un("0x9")]==t&&this[Un("0xa")].setItemLocalStorageSafe(qn,Un("0x4"))}}}var Hn,Vn,$n=["identityManager","migrationsManager","storageManager","enableSessionToken","logsReporter","getConfValue","isInitialized","Session token is not enabled","now","info","SDK disabled","disabled_sdk_","eventsManager","refreshSessionToken","getSessionToken","init","object","userId","initializationPromise","refreshConf","tenantId","keyRotation","cryptoBinding","crypto","createCryptoBinding","sign","isEnabled","startedAt","deviceDataManager","enabled","sendDeviceDataEvent","catch","sendPageLoadEvent","updateUserId","registerEventListeners","triggerActionEvent","includes","warn","Invalid action type","CLIENT","claimedUserIdType","invalid_claimed_user_id_type_","getDeviceData","EVENT_TYPE_ACTION","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","uploadFile","transactionData","customAttributes","emitEvent","Unhandled SDK error. recieved eventResponse: ","errorSpace","SERVER","_error_","message","unexpected_error_","identifyUser","identifyUser called without a valid userid","getUserId","setUserId","EVENT_TYPE_IDENTIFICATION","deviceId","removeUserId","setAuthenticatedUser","setUser","unidentifiedUser","RiskID","TSAccountProtection","dispatchEvent","undefined","sdkEnabled","enableIdentifiersMigration","verbose","actions","https://collect.riskid.security/","email","phone_number","ssn","national_id","passport_number","drivers_license_number","other","isSDKDisabled","identifiersMigrationEnabled","firstPartyMigrationUrl","validationManager","initializedInstance","SDK already initialized","string","clientId","options","serverPath","toString","validateSDKParams","mainEntry","requestsManager","configManager"];Hn=$n,Vn=487,function(e){for(;--e;)Hn.push(Hn.shift())}(++Vn);var Jn=function(e,t){return $n[e-=0]};const Gn=[null,void 0,Jn("0x0"),"",0],Wn=Jn("0x1"),Zn=Jn("0x2"),Yn=Jn("0x3"),Qn=Jn("0x4"),Xn=Jn("0x5"),ea=[Jn("0x6"),Jn("0x7"),"account_id",Jn("0x8"),Jn("0x9"),Jn("0xa"),Jn("0xb"),Jn("0xc")];class ta{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this.initializationPromise=null,this[Jn("0xd")]=!1,this.enableSessionToken=!1,this[Jn("0xe")]=!1,this[Jn("0xf")]=null,this[Jn("0x10")]=new Rn,ta[Jn("0x11")])throw new Error(Jn("0x12"));ta[Jn("0x11")]=!0;const r=typeof t===Jn("0x13");this[Jn("0x14")]=r?t:e,this[Jn("0x15")]=r?{serverPath:e}:t,(i=this[Jn("0x15")])[Jn("0x16")]||(i[Jn("0x16")]=Xn),this[Jn("0x15")][Jn("0x16")]=new URL(this.options[Jn("0x16")])[Jn("0x17")](),this[Jn("0xf")]=this.options.firstPartyMigrationUrl||null,xi.enabled=!!this[Jn("0x15")].verbose,this[Jn("0x10")][Jn("0x18")](this,{throwError:!0,logIfInvalid:!0})||(this[Jn("0xd")]=!0),this.storageManager=new mi(this[Jn("0x14")]),this[Jn("0x1a")]=new Mn(this.options[Jn("0x16")]),this[Jn("0x1b")]=new Ii(this.storageManager,this.requestsManager),this[Jn("0x1c")]=new xn(this.storageManager,this.configManager,this[Jn("0x14")]),this[Jn("0x1c")].load(),this[Jn("0x1d")]=new Kn(this[Jn("0x1c")],this[Jn("0x1a")],this[Jn("0x1e")]),this[Jn("0x1f")]=this[Jn("0x15")][Jn("0x1f")]||!1,this[Jn("0x20")]=new Fn(this[Jn("0x1a")],this[Jn("0x1c")],this.configManager)}get[Jn("0x4")](){return this[Jn("0x1b")][Jn("0x21")](Qn,[])}async getActions(){return await this[Jn("0x22")](),this[Jn("0x4")]}async getSessionToken(){if(!this[Jn("0x1f")])throw new Error(Jn("0x23"));if(!await this[Jn("0x22")]()){const e=Date[Jn("0x24")]();return xi[Jn("0x25")](Jn("0x26")),{actionToken:Jn("0x27")+e}}return this[Jn("0x1c")].isTokenExpired()&&await this[Jn("0x28")][Jn("0x29")](),this[Jn("0x1c")][Jn("0x2a")]()}async[Jn("0x2b")](e){const t=typeof e!==Jn("0x2c")?e:null==e?void 0:e[Jn("0x2d")];return xi[Jn("0x25")]("sdk init started"),this[Jn("0x2e")]=(async()=>{await this.configManager[Jn("0x2f")](this[Jn("0x1c")].getClientId());const e=this[Jn("0x1b")].getConfValue(Jn("0x30"),null),i=this[Jn("0x1b")][Jn("0x21")](Jn("0x31"),null);return this[Jn("0x32")]=fi[Jn("0x33")][Jn("0x34")](Jn("0x35"),(null==i?void 0:i[Jn("0x36")])?{keyRotation:{isEnabled:!0,expiryDays:i.expiryDays,startedAt:i[Jn("0x37")],tenantId:e}}:void 0),this[Jn("0x38")]=new Cr(this[Jn("0x1e")],this[Jn("0x1b")],this[Jn("0x32")]),this[Jn("0x28")]=new ln(this[Jn("0x1b")],this[Jn("0x1e")],this[Jn("0x38")],this[Jn("0x1a")],this[Jn("0x1c")],this[Jn("0x32")],this.options.serverPath,this[Jn("0x1f")]),this.isSDKDisabled=this[Jn("0xd")]||!this[Jn("0x1b")][Jn("0x21")](Wn,!1),!this[Jn("0xd")]&&(this[Jn("0xe")]=this[Jn("0xe")]||this.configManager.getConfValue(Zn,!1),this[Jn("0xe")]&&this[Jn("0xf")]&&await this[Jn("0x1d")].migrateIdentifiers(this[Jn("0xf")]),xi[Jn("0x39")]=xi[Jn("0x39")]||!!this.configManager[Jn("0x21")](Yn,!1),await this[Jn("0x28")][Jn("0x3a")]()[Jn("0x3b")]((()=>{})),await this[Jn("0x28")][Jn("0x3c")]()[Jn("0x3b")]((()=>{})),await this[Jn("0x3d")](t)[Jn("0x3b")]((()=>{})),this.eventsManager[Jn("0x3e")](),await this.eventsManager.flush()[Jn("0x3b")]((()=>{})),xi.info("sdk init done"),!0)})(),await this[Jn("0x2e")]}async isInitialized(){return null!==this.initializationPromise&&await this[Jn("0x2e")]}async[Jn("0x3f")](e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Date[Jn("0x24")]();if(!await this[Jn("0x22")]())return xi[Jn("0x25")]("SDK disabled"),{actionToken:Jn("0x27")+r};if(!this[Jn("0x4")][Jn("0x40")](e))return xi[Jn("0x41")](Jn("0x42"),{actionType:e}),{actionToken:$r[Jn("0x43")]+"_error_'invalid action type - "+e+"'_"+r};const n=null==i?void 0:i[Jn("0x44")];if(n&&!ea.includes(n))return xi[Jn("0x41")]("Invalid claimedUserIdType",{claimedUserIdType:n}),{actionToken:Jn("0x45")+n+"_"+r};let a;this[Jn("0x1b")].getConfValue("enableDeviceAttributesInActions",!1)&&(a=await this[Jn("0x38")][Jn("0x46")]());const o=t({type:zi[Jn("0x47")],attributes:t(t(t(t(t(t(t(t(t(t(t(t({action_type:e},(null==i?void 0:i[Jn("0x48")])&&{correlation_id:i[Jn("0x48")]}),(null==i?void 0:i[Jn("0x49")])&&{claimed_user_id:i[Jn("0x49")]}),n&&{claimed_user_id_type:n}),(null==i?void 0:i[Jn("0x4a")])&&{public_key:i[Jn("0x4a")]}),(null==i?void 0:i[Jn("0x4b")])&&{extension_metadata:i.extensionMetadata}),(null==i?void 0:i.extensionDeviceAttributes)&&{extension_device_attributes:i[Jn("0x4c")]}),(null==i?void 0:i[Jn("0x4d")])&&{suspicious_signals:i[Jn("0x4d")]}),(null==i?void 0:i[Jn("0x4e")])&&{suspicious_context:i.suspiciousContext}),(null==i?void 0:i.downloadFile)&&{download_file:i[Jn("0x4f")]}),(null==i?void 0:i.uploadFile)&&{upload_file:i[Jn("0x50")]}),(null==i?void 0:i[Jn("0x51")])&&{transactionData:i.transactionData}),a)},(null==i?void 0:i.customAttributes)&&{customAttributes:i[Jn("0x52")]});try{const e=await this[Jn("0x28")][Jn("0x53")](o),{actionToken:t}=e;if(!t)throw new Wr(new Error(Jn("0x54")+(typeof e==Jn("0x2c")?JSON.stringify(e).slice(15):e)),$r.CLIENT);return e}catch(i){return{actionToken:i instanceof Wr?i[Jn("0x55")]===$r[Jn("0x56")]?i[Jn("0x55")]+Jn("0x57")+e+"_"+i.errorCode+"_'"+i[Jn("0x58")]+"'_"+r:i[Jn("0x55")]+Jn("0x57")+e+"_'"+i.message+"'_"+r:Jn("0x59")+e+"_"+r}}}async[Jn("0x5a")](e){return await this[Jn("0x22")]()?this.updateUserId(e):(xi[Jn("0x25")](Jn("0x26")),!1)}async[Jn("0x3d")](e){if(Gn[Jn("0x40")](e))return xi[Jn("0x25")](Jn("0x5b"),{userId:e}),!1;e=e.toString(),xi.info(Jn("0x5a"),{userId:e});const t=this[Jn("0x1c")][Jn("0x5c")]();return t===e||(this.identityManager[Jn("0x5d")](e),!!(await this[Jn("0x28")].emitEvent({type:zi[Jn("0x5e")],attributes:{previous_user_id:t,user_id:e}}))[Jn("0x5f")])}async unidentifiedUser(){if(!await this[Jn("0x22")]())return xi[Jn("0x25")](Jn("0x26")),!1;const e=this[Jn("0x1c")][Jn("0x5c")]();return null!=e&&this.identityManager[Jn("0x60")](),!!(await this[Jn("0x28")].emitEvent({type:zi[Jn("0x5e")],attributes:{previous_user_id:e}}))[Jn("0x5f")]}async[Jn("0x61")](e){return await this[Jn("0x5a")](e)}async[Jn("0x62")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[Jn("0x61")](e,t)}async clearUser(){return await this[Jn("0x63")]()}}ta[Jn("0x11")]=!1,document[Jn("0x66")](new CustomEvent("TSAccountProtectionReady"));var ia,ra,na=["events","MODULE_INITIALIZED","moduleMetadata","getInitConfig","init","utils","exceptions","TsError","not_initialized","tsPlatform not initialized","setUser","clearUser","identifyUser","unidentifiedUser","getSessionToken","identityManager","getDeviceId","getClientId","eventsManager","flush"];ia=na,ra=500,function(e){for(;--e;)ia.push(ia.shift())}(++ra);var aa=function(e,t){return na[e-=0]};let oa=null;function sa(e){if(!e)throw new(fi[aa("0x5")][aa("0x6")][aa("0x7")])(aa("0x8"),aa("0x9"))}fi.events.on(fi[aa("0x0")][aa("0x1")],(()=>{const{clientId:e,drs:t}=fi[aa("0x2")][aa("0x3")](),i=t||{},{enabled:r,userId:a}=i,o=n(i,oi);!1!==r&&(oa=new ta(e,o),oa[aa("0x4")]({userId:a}))}));const ca=function(){return sa(oa),oa[aa("0xe")]()},da={getDeviceId:()=>oa[aa("0xf")][aa("0x10")](),getClientId:()=>oa[aa("0xf")][aa("0x11")](),flush:()=>oa[aa("0x12")][aa("0x13")]()};var ua=Object.freeze({__proto__:null,__internal:da,clearUser:function(){return sa(oa),oa[aa("0xb")](...arguments)},getActions:function(){return sa(oa),oa.getActions()},getSessionToken:ca,identifyUser:function(){return sa(oa),oa[aa("0xc")](...arguments)},setAuthenticatedUser:function(){return sa(oa),oa.setAuthenticatedUser(...arguments)},setUser:function(){return sa(oa),oa[aa("0xa")](...arguments)},triggerActionEvent:function(){return sa(oa),oa.triggerActionEvent(...arguments)},unidentifiedUser:function(){return sa(oa),oa[aa("0xd")](...arguments)}});class la extends Error{constructor(e,t,i){super(i),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}}const ha={BASE:window.location.origin,VERSION:"",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var fa,pa,ga,ma;!function(e){var t;(t=e.feedback||(e.feedback={})).OK="ok",t.OTHER="other",t.DOCUMENT_NOT_FOUND="document_not_found",t.FACE_NOT_FOUND="face_not_found",t.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",t.OBSTRUCTED="obstructed",t.BLUR="blur",t.GLARE="glare",t.DOCUMENT_NOT_SUPPORTED="document_not_supported",t.DOCUMENT_NOT_MATCHING="document_not_matching",t.WRONG_DOCUMENT_SIDE="wrong_document_side",t.MULTI_FACE="multi_face",t.FACE_ROTATED="face_rotated",t.FACE_TOO_SMALL="face_too_small",t.FACE_TOO_CLOSE="face_too_close",t.CLOSED_EYES="closed_eyes",t.FACE_ANGLE_TOO_LARGE="face_angle_too_large",t.FACE_CLOSE_TO_BORDER="face_close_to_border",t.FACE_OCCLUDED="face_occluded",t.FACE_CROPPED="face_cropped",t.BARCODE_NOT_FOUND="barcode_not_found",t.GLARE_SELFIE="glare_selfie",t.BLUR_SELFIE="blur_selfie",t.RESTRICTED_CRITERIA="restricted_criteria"}(fa||(fa={})),function(e){var t;(t=e.image_type||(e.image_type={})).DOCUMENT_FRONT="document_front",t.DOCUMENT_BACK="document_back",t.SELFIE="selfie"}(pa||(pa={})),function(e){var t,i;(t=e.status||(e.status={})).PENDING="pending",t.CAPTURING="capturing",t.PROCESSING="processing",t.RECAPTURE="recapture",t.COMPLETE="complete",t.ERROR="error",t.EXPIRED="expired",(i=e.recapture_reason||(e.recapture_reason={})).IMAGE_MISSING="image_missing",i.DOCUMENT_EXPIRED="document_expired",i.DOCUMENT_NOT_SUPPORTED="document_not_supported",i.DOCUMENT_DAMAGED="document_damaged",i.POOR_IMAGE_QUALITY="poor_image_quality",i.DOCUMENT_NOT_FOUND="document_not_found",i.OBSTRUCTED="obstructed",i.BLUR="blur",i.GLARE="glare",i.DOCUMENT_NOT_MATCHING="document_not_matching",i.WRONG_DOCUMENT_SIDE="wrong_document_side",i.FACE_NOT_FOUND="face_not_found",i.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",i.INVALID_INPUT="invalid_input",i.MULTI_FACE="multi_face",i.FACE_ROTATED="face_rotated",i.FACE_TOO_SMALL="face_too_small",i.FACE_TOO_CLOSE="face_too_close",i.CLOSED_EYES="closed_eyes",i.FACE_ANGLE_TOO_LARGE="face_angle_too_large",i.FACE_CLOSE_TO_BORDER="face_close_to_border",i.FACE_OCCLUDED="face_occluded",i.FACE_CROPPED="face_cropped",i.BARCODE_NOT_FOUND="barcode_not_found",i.GLARE_SELFIE="glare_selfie",i.BLUR_SELFIE="blur_selfie",i.NO_FACE="no_face",i.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(ga||(ga={})),function(e){var t;(t=e.client_type||(e.client_type={})).HOSTED_APP="hosted_app",t.MOBILE_SDK="mobile_sdk"}(ma||(ma={}));var ba,va,ya={},_a={get exports(){return ya},set exports(e){ya=e}};ba=_a,va=ya,function(e,t){var i="function",r="undefined",n="object",a="string",o="major",s="model",c="name",d="type",u="vendor",l="version",h="architecture",f="console",p="mobile",g="tablet",m="smarttv",b="wearable",v="embedded",y="Amazon",_="Apple",w="ASUS",x="BlackBerry",A="Browser",E="Chrome",S="Firefox",k="Google",M="Huawei",C="LG",I="Microsoft",D="Motorola",T="Opera",R="Samsung",z="Sharp",B="Sony",P="Xiaomi",O="Zebra",F="Facebook",N="Chromium OS",L="Mac OS",j=" Browser",U=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},q=function(e,t){return typeof e===a&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===r?e:e.substring(0,500)},V=function(e,r){for(var a,o,s,c,d,u,l=0;l<r.length&&!d;){var h=r[l],f=r[l+1];for(a=o=0;a<h.length&&!d&&h[a];)if(d=h[a++].exec(e))for(s=0;s<f.length;s++)u=d[++o],typeof(c=f[s])===n&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,u):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=u?u.replace(c[1],c[2]):t:this[c[0]]=u?c[1].call(this,u,c[2]):t:4===c.length&&(this[c[0]]=u?c[3].call(this,u.replace(c[1],c[2])):t):this[c]=u||t;l+=2}},$=function(e,i){for(var r in i)if(typeof i[r]===n&&i[r].length>0){for(var a=0;a<i[r].length;a++)if(q(i[r][a],e))return"?"===r?t:r}else if(q(i[r],e))return"?"===r?t:r;return i.hasOwnProperty("*")?i["*"]:e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},G={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,l],[/opios[\/ ]+([\w\.]+)/i],[l,[c,T+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[l,[c,T+" GX"]],[/\bopr\/([\w\.]+)/i],[l,[c,T]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[l,[c,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,l],[/quark(?:pc)?\/([-\w\.]+)/i],[l,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[l,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[c,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[l,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[l,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[l,[c,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+A],l],[/\bfocus\/([\w\.]+)/i],[l,[c,S+" Focus"]],[/\bopt\/([\w\.]+)/i],[l,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[c,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[l,[c,S]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360"+j]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],l],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+j],l],[/samsungbrowser\/([\w\.]+)/i],[l,[c,R+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],l],[/metasr[\/ ]?([\d\.]+)/i],[l,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[c,l],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,F],l],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[l,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[c,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,E+" WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[c,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,l],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[l,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[l,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[l,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],l],[/(wolvic)\/([\w\.]+)/i],[c,l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[c,S+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,[l,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[l,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,K]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[u,R],[d,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[u,R],[d,p]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[u,_],[d,p]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[u,_],[d,g]],[/(macintosh);/i],[s,[u,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[u,z],[d,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[u,M],[d,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[u,M],[d,p]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[s,/_/g," "],[u,P],[d,p]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[u,P],[d,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[u,"OPPO"],[d,p]],[/\b(opd2\d{3}a?) bui/i],[s,[u,"OPPO"],[d,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[u,"Vivo"],[d,p]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[u,"Realme"],[d,p]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[u,D],[d,p]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[u,D],[d,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[u,C],[d,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[u,C],[d,p]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[u,"Lenovo"],[d,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[u,"Nokia"],[d,p]],[/(pixel c)\b/i],[s,[u,k],[d,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[u,k],[d,p]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,B],[d,p]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[u,B],[d,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[u,"OnePlus"],[d,p]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[u,y],[d,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[u,y],[d,p]],[/(playbook);[-\w\),; ]+(rim)/i],[s,u,[d,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[u,x],[d,p]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[u,w],[d,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[u,w],[d,p]],[/(nexus 9)/i],[s,[u,"HTC"],[d,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[s,/_/g," "],[d,p]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[u,"TCL"],[d,g]],[/(itel) ((\w+))/i],[[u,K],s,[d,$,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[u,"Acer"],[d,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[u,"Meizu"],[d,p]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[u,"Ulefone"],[d,p]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[u,"Nothing"],[d,p]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,s,[d,p]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,s,[d,g]],[/(surface duo)/i],[s,[u,I],[d,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[u,"Fairphone"],[d,p]],[/(u304aa)/i],[s,[u,"AT&T"],[d,p]],[/\bsie-(\w*)/i],[s,[u,"Siemens"],[d,p]],[/\b(rct\w+) b/i],[s,[u,"RCA"],[d,g]],[/\b(venue[\d ]{2,7}) b/i],[s,[u,"Dell"],[d,g]],[/\b(q(?:mv|ta)\w+) b/i],[s,[u,"Verizon"],[d,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[u,"Barnes & Noble"],[d,g]],[/\b(tm\d{3}\w+) b/i],[s,[u,"NuVision"],[d,g]],[/\b(k88) b/i],[s,[u,"ZTE"],[d,g]],[/\b(nx\d{3}j) b/i],[s,[u,"ZTE"],[d,p]],[/\b(gen\d{3}) b.+49h/i],[s,[u,"Swiss"],[d,p]],[/\b(zur\d{3}) b/i],[s,[u,"Swiss"],[d,g]],[/\b((zeki)?tb.*\b) b/i],[s,[u,"Zeki"],[d,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],s,[d,g]],[/\b(ns-?\w{0,9}) b/i],[s,[u,"Insignia"],[d,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[u,"NextBook"],[d,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],s,[d,p]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],s,[d,p]],[/\b(ph-1) /i],[s,[u,"Essential"],[d,p]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[u,"Envizen"],[d,g]],[/\b(trio[-\w\. ]+) b/i],[s,[u,"MachSpeed"],[d,g]],[/\btu_(1491) b/i],[s,[u,"Rotor"],[d,g]],[/(shield[\w ]+) b/i],[s,[u,"Nvidia"],[d,g]],[/(sprint) (\w+)/i],[u,s,[d,p]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,I],[d,p]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[u,O],[d,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[u,O],[d,p]],[/smart-tv.+(samsung)/i],[u,[d,m]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,R],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,C],[d,m]],[/(apple) ?tv/i],[u,[s,_+" TV"],[d,m]],[/crkey/i],[[s,E+"cast"],[u,k],[d,m]],[/droid.+aft(\w+)( bui|\))/i],[s,[u,y],[d,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[u,z],[d,m]],[/(bravia[\w ]+)( bui|\))/i],[s,[u,B],[d,m]],[/(mitv-\w{5}) bui/i],[s,[u,P],[d,m]],[/Hbbtv.*(technisat) (.*);/i],[u,s,[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,H],[s,H],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,s,[d,f]],[/droid.+; (shield) bui/i],[s,[u,"Nvidia"],[d,f]],[/(playstation [345portablevi]+)/i],[s,[u,B],[d,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[u,I],[d,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[s,[u,R],[d,b]],[/((pebble))app/i],[u,s,[d,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[u,_],[d,b]],[/droid.+; (glass) \d/i],[s,[u,k],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[s,[u,O],[d,b]],[/(quest( \d| pro)?)/i],[s,[u,F],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[d,v]],[/(aeobc)\b/i],[s,[u,y],[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[d,p]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[d,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,p]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,l],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[l,$,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,$,J],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,L],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[l,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,l],[/\(bb(10);/i],[l,[c,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[c,S+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[l,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[l,[c,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,N],l],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,l],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,l]]},W=function f(m,b){if(typeof m===n&&(b=m,m=t),!(this instanceof f))return new f(m,b).getResult();var v=typeof e!==r&&e.navigator?e.navigator:t,y=m||(v&&v.userAgent?v.userAgent:""),_=v&&v.userAgentData?v.userAgentData:t,w=b?function(e,t){var i={};for(var r in e)t[r]&&t[r].length%2==0?i[r]=t[r].concat(e[r]):i[r]=e[r];return i}(G,b):G,x=v&&v.userAgent==y;return this.getBrowser=function(){var e={};return e[c]=t,e[l]=t,V.call(e,y,w.browser),e[o]=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:t}(e[l]),x&&v&&v.brave&&typeof v.brave.isBrave==i&&(e[c]="Brave"),e},this.getCPU=function(){var e={};return e[h]=t,V.call(e,y,w.cpu),e},this.getDevice=function(){var e={};return e[u]=t,e[s]=t,e[d]=t,V.call(e,y,w.device),x&&!e[d]&&_&&_.mobile&&(e[d]=p),x&&"Macintosh"==e[s]&&v&&typeof v.standalone!==r&&v.maxTouchPoints&&v.maxTouchPoints>2&&(e[s]="iPad",e[d]=g),e},this.getEngine=function(){var e={};return e[c]=t,e[l]=t,V.call(e,y,w.engine),e},this.getOS=function(){var e={};return e[c]=t,e[l]=t,V.call(e,y,w.os),x&&!e[c]&&_&&_.platform&&"Unknown"!=_.platform&&(e[c]=_.platform.replace(/chrome os/i,N).replace(/macos/i,L)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(e){return y=typeof e===a&&e.length>500?H(e,500):e,this},this.setUA(y),this};W.VERSION="1.0.39",W.BROWSER=U([c,l,o]),W.CPU=U([h]),W.DEVICE=U([s,u,d,f,p,m,g,b,v]),W.ENGINE=W.OS=U([c,l]),ba.exports&&(va=ba.exports=W),va.UAParser=W;var Z=typeof e!==r&&(e.jQuery||e.Zepto);if(Z&&!Z.ua){var Y=new W;Z.ua=Y.getResult(),Z.ua.get=function(){return Y.getUA()},Z.ua.set=function(e){Y.setUA(e);var t=Y.getResult();for(var i in t)Z.ua[i]=t[i]}}}("object"==typeof window?window:Z);const wa="1.4.8",xa=ya.UAParser(),Aa=wa;function Ea(e,t){var i,r,n,a,o;return{Authorization:`Bearer ${t}`,"ts-sdk-version":Aa,"ts-client-id":e,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(i=null==xa?void 0:xa.os)||void 0===i?void 0:i.name,"ts-os-version":null===(r=null==xa?void 0:xa.os)||void 0===r?void 0:r.version,"ts-device-model":null===(n=null==xa?void 0:xa.device)||void 0===n?void 0:n.model,"ts-manufacturer":null===(a=null==xa?void 0:xa.device)||void 0===a?void 0:a.vendor,"ts-browser":null===(o=null==xa?void 0:xa.browser)||void 0===o?void 0:o.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var Sa="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ka=[],Ma=[],Ca="undefined"!=typeof Uint8Array?Uint8Array:Array,Ia=!1;function Da(){Ia=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,i=e.length;t<i;++t)ka[t]=e[t],Ma[e.charCodeAt(t)]=t;Ma["-".charCodeAt(0)]=62,Ma["_".charCodeAt(0)]=63}function Ta(e,t,i){for(var r,n,a=[],o=t;o<i;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(ka[(n=r)>>18&63]+ka[n>>12&63]+ka[n>>6&63]+ka[63&n]);return a.join("")}function Ra(e){var t;Ia||Da();for(var i=e.length,r=i%3,n="",a=[],o=16383,s=0,c=i-r;s<c;s+=o)a.push(Ta(e,s,s+o>c?c:s+o));return 1===r?(t=e[i-1],n+=ka[t>>2],n+=ka[t<<4&63],n+="=="):2===r&&(t=(e[i-2]<<8)+e[i-1],n+=ka[t>>10],n+=ka[t>>4&63],n+=ka[t<<2&63],n+="="),a.push(n),a.join("")}function za(e,t,i,r,n){var a,o,s=8*n-r-1,c=(1<<s)-1,d=c>>1,u=-7,l=i?n-1:0,h=i?-1:1,f=e[t+l];for(l+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+l],l+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+l],l+=h,u-=8);if(0===a)a=1-d;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=d}return(f?-1:1)*o*Math.pow(2,a-r)}function Ba(e,t,i,r,n,a){var o,s,c,d=8*a-n-1,u=(1<<d)-1,l=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(o++,c/=2),o+l>=u?(s=0,o=u):o+l>=1?(s=(t*c-1)*Math.pow(2,n),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,n),o=0));n>=8;e[i+f]=255&s,f+=p,s/=256,n-=8);for(o=o<<n|s,d+=n;d>0;e[i+f]=255&o,f+=p,o/=256,d-=8);e[i+f-p]|=128*g}var Pa={}.toString,Oa=Array.isArray||function(e){return"[object Array]"==Pa.call(e)};ja.TYPED_ARRAY_SUPPORT=void 0===Sa.TYPED_ARRAY_SUPPORT||Sa.TYPED_ARRAY_SUPPORT;var Fa=Na();function Na(){return ja.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function La(e,t){if(Na()<t)throw new RangeError("Invalid typed array length");return ja.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=ja.prototype:(null===e&&(e=new ja(t)),e.length=t),e}function ja(e,t,i){if(!(ja.TYPED_ARRAY_SUPPORT||this instanceof ja))return new ja(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Ka(this,e)}return Ua(this,e,t,i)}function Ua(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);ja.TYPED_ARRAY_SUPPORT?(e=t).__proto__=ja.prototype:e=Ha(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!ja.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Ja(t,i);e=La(e,r);var n=e.write(t,i);n!==r&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if($a(t)){var i=0|Va(t.length);return 0===(e=La(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?La(e,0):Ha(e,t);if("Buffer"===t.type&&Oa(t.data))return Ha(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function qa(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Ka(e,t){if(qa(t),e=La(e,t<0?0:0|Va(t)),!ja.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function Ha(e,t){var i=t.length<0?0:0|Va(t.length);e=La(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function Va(e){if(e>=Na())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Na().toString(16)+" bytes");return 0|e}function $a(e){return!(null==e||!e._isBuffer)}function Ja(e,t){if($a(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return wo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return xo(e).length;default:if(r)return wo(e).length;t=(""+t).toLowerCase(),r=!0}}function Ga(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return uo(this,t,i);case"utf8":case"utf-8":return ao(this,t,i);case"ascii":return so(this,t,i);case"latin1":case"binary":return co(this,t,i);case"base64":return no(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lo(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Wa(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function Za(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=ja.from(t,r)),$a(t))return 0===t.length?-1:Ya(e,t,i,r,n);if("number"==typeof t)return t&=255,ja.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):Ya(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function Ya(e,t,i,r,n){var a,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,i/=2}function d(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=i;a<s;a++)if(d(e,a)===d(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===c)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(i+c>s&&(i=s-c),a=i;a>=0;a--){for(var l=!0,h=0;h<c;h++)if(d(e,a+h)!==d(t,h)){l=!1;break}if(l)return a}return-1}function Qa(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function Xa(e,t,i,r){return Ao(wo(t,e.length-i),e,i,r)}function eo(e,t,i,r){return Ao(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function to(e,t,i,r){return eo(e,t,i,r)}function io(e,t,i,r){return Ao(xo(t),e,i,r)}function ro(e,t,i,r){return Ao(function(e,t){for(var i,r,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(i=e.charCodeAt(o))>>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function no(e,t,i){return 0===t&&i===e.length?Ra(e):Ra(e.slice(t,i))}function ao(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var a,o,s,c,d=e[n],u=null,l=d>239?4:d>223?3:d>191?2:1;if(n+l<=i)switch(l){case 1:d<128&&(u=d);break;case 2:128==(192&(a=e[n+1]))&&(c=(31&d)<<6|63&a)>127&&(u=c);break;case 3:a=e[n+1],o=e[n+2],128==(192&a)&&128==(192&o)&&(c=(15&d)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&d)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,l=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=l}return function(e){var t=e.length;if(t<=oo)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=oo));return i}(r)}ja.poolSize=8192,ja._augment=function(e){return e.__proto__=ja.prototype,e},ja.from=function(e,t,i){return Ua(null,e,t,i)},ja.TYPED_ARRAY_SUPPORT&&(ja.prototype.__proto__=Uint8Array.prototype,ja.__proto__=Uint8Array),ja.alloc=function(e,t,i){return function(e,t,i,r){return qa(t),t<=0?La(e,t):void 0!==i?"string"==typeof r?La(e,t).fill(i,r):La(e,t).fill(i):La(e,t)}(null,e,t,i)},ja.allocUnsafe=function(e){return Ka(null,e)},ja.allocUnsafeSlow=function(e){return Ka(null,e)},ja.isBuffer=Eo,ja.compare=function(e,t){if(!$a(e)||!$a(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},ja.isEncoding=function(e){switch(String(e).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}},ja.concat=function(e,t){if(!Oa(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return ja.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=ja.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var a=e[i];if(!$a(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,n),n+=a.length}return r},ja.byteLength=Ja,ja.prototype._isBuffer=!0,ja.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Wa(this,t,t+1);return this},ja.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Wa(this,t,t+3),Wa(this,t+1,t+2);return this},ja.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Wa(this,t,t+7),Wa(this,t+1,t+6),Wa(this,t+2,t+5),Wa(this,t+3,t+4);return this},ja.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?ao(this,0,e):Ga.apply(this,arguments)},ja.prototype.equals=function(e){if(!$a(e))throw new TypeError("Argument must be a Buffer");return this===e||0===ja.compare(this,e)},ja.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},ja.prototype.compare=function(e,t,i,r,n){if(!$a(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(n>>>=0)-(r>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,n),d=e.slice(t,i),u=0;u<s;++u)if(c[u]!==d[u]){a=c[u],o=d[u];break}return a<o?-1:o<a?1:0},ja.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},ja.prototype.indexOf=function(e,t,i){return Za(this,e,t,i,!0)},ja.prototype.lastIndexOf=function(e,t,i){return Za(this,e,t,i,!1)},ja.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return Qa(this,e,t,i);case"utf8":case"utf-8":return Xa(this,e,t,i);case"ascii":return eo(this,e,t,i);case"latin1":case"binary":return to(this,e,t,i);case"base64":return io(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ro(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},ja.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var oo=4096;function so(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function co(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function uo(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",a=t;a<i;++a)n+=_o(e[a]);return n}function lo(e,t,i){for(var r=e.slice(t,i),n="",a=0;a<r.length;a+=2)n+=String.fromCharCode(r[a]+256*r[a+1]);return n}function ho(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function fo(e,t,i,r,n,a){if(!$a(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function po(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-i,2);n<a;++n)e[i+n]=(t&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function go(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-i,4);n<a;++n)e[i+n]=t>>>8*(r?n:3-n)&255}function mo(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function bo(e,t,i,r,n){return n||mo(e,0,i,4),Ba(e,t,i,r,23,4),i+4}function vo(e,t,i,r,n){return n||mo(e,0,i,8),Ba(e,t,i,r,52,8),i+8}ja.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),ja.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=ja.prototype;else{var n=t-e;i=new ja(n,void 0);for(var a=0;a<n;++a)i[a]=this[a+e]}return i},ja.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||ho(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r},ja.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||ho(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},ja.prototype.readUInt8=function(e,t){return t||ho(e,1,this.length),this[e]},ja.prototype.readUInt16LE=function(e,t){return t||ho(e,2,this.length),this[e]|this[e+1]<<8},ja.prototype.readUInt16BE=function(e,t){return t||ho(e,2,this.length),this[e]<<8|this[e+1]},ja.prototype.readUInt32LE=function(e,t){return t||ho(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},ja.prototype.readUInt32BE=function(e,t){return t||ho(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},ja.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||ho(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},ja.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||ho(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},ja.prototype.readInt8=function(e,t){return t||ho(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},ja.prototype.readInt16LE=function(e,t){t||ho(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},ja.prototype.readInt16BE=function(e,t){t||ho(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},ja.prototype.readInt32LE=function(e,t){return t||ho(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},ja.prototype.readInt32BE=function(e,t){return t||ho(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},ja.prototype.readFloatLE=function(e,t){return t||ho(e,4,this.length),za(this,e,!0,23,4)},ja.prototype.readFloatBE=function(e,t){return t||ho(e,4,this.length),za(this,e,!1,23,4)},ja.prototype.readDoubleLE=function(e,t){return t||ho(e,8,this.length),za(this,e,!0,52,8)},ja.prototype.readDoubleBE=function(e,t){return t||ho(e,8,this.length),za(this,e,!1,52,8)},ja.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||fo(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a<i&&(n*=256);)this[t+a]=e/n&255;return t+i},ja.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||fo(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},ja.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,1,255,0),ja.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},ja.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,2,65535,0),ja.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):po(this,e,t,!0),t+2},ja.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,2,65535,0),ja.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):po(this,e,t,!1),t+2},ja.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,4,4294967295,0),ja.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):go(this,e,t,!0),t+4},ja.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,4,4294967295,0),ja.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):go(this,e,t,!1),t+4},ja.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);fo(this,e,t,i,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},ja.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);fo(this,e,t,i,n-1,-n)}var a=i-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},ja.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,1,127,-128),ja.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},ja.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,2,32767,-32768),ja.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):po(this,e,t,!0),t+2},ja.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,2,32767,-32768),ja.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):po(this,e,t,!1),t+2},ja.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,4,2147483647,-2147483648),ja.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):go(this,e,t,!0),t+4},ja.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||fo(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ja.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):go(this,e,t,!1),t+4},ja.prototype.writeFloatLE=function(e,t,i){return bo(this,e,t,!0,i)},ja.prototype.writeFloatBE=function(e,t,i){return bo(this,e,t,!1,i)},ja.prototype.writeDoubleLE=function(e,t,i){return vo(this,e,t,!0,i)},ja.prototype.writeDoubleBE=function(e,t,i){return vo(this,e,t,!1,i)},ja.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,a=r-i;if(this===e&&i<t&&t<r)for(n=a-1;n>=0;--n)e[n+t]=this[n+i];else if(a<1e3||!ja.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},ja.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!ja.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=$a(e)?e:wo(new ja(e,r).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var yo=/[^+\/0-9A-Za-z-_]/g;function _o(e){return e<16?"0"+e.toString(16):e.toString(16)}function wo(e,t){var i;t=t||1/0;for(var r=e.length,n=null,a=[],o=0;o<r;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function xo(e){return function(e){var t,i,r,n,a,o;Ia||Da();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Ca(3*s/4-a),r=a>0?s-4:s;var c=0;for(t=0,i=0;t<r;t+=4,i+=3)n=Ma[e.charCodeAt(t)]<<18|Ma[e.charCodeAt(t+1)]<<12|Ma[e.charCodeAt(t+2)]<<6|Ma[e.charCodeAt(t+3)],o[c++]=n>>16&255,o[c++]=n>>8&255,o[c++]=255&n;return 2===a?(n=Ma[e.charCodeAt(t)]<<2|Ma[e.charCodeAt(t+1)]>>4,o[c++]=255&n):1===a&&(n=Ma[e.charCodeAt(t)]<<10|Ma[e.charCodeAt(t+1)]<<4|Ma[e.charCodeAt(t+2)]>>2,o[c++]=n>>8&255,o[c++]=255&n),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(yo,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Ao(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function Eo(e){return null!=e&&(!!e._isBuffer||So(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&So(e.slice(0,0))}(e))}function So(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var ko=Object.freeze({__proto__:null,Buffer:ja,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),ja.alloc(+e)},isBuffer:Eo,kMaxLength:Fa});const Mo=e=>null!=e,Co=e=>"string"==typeof e,Io=e=>Co(e)&&""!==e,Do=e=>"object"==typeof e&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.arrayBuffer&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),To=e=>e instanceof FormData,Ro=e=>{const t=[],i=(e,r)=>{Mo(r)&&(Array.isArray(r)?r.forEach((t=>{i(e,t)})):"object"==typeof r?Object.entries(r).forEach((t=>{let[r,n]=t;i(`${e}[${r}]`,n)})):((e,i)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(i))}`)})(e,r))};return Object.entries(e).forEach((e=>{let[t,r]=e;i(t,r)})),t.length>0?`?${t.join("&")}`:""},zo=async(e,t)=>"function"==typeof t?t(e):t,Bo=async(e,i)=>{const r=await zo(i,e.TOKEN),n=await zo(i,e.USERNAME),a=await zo(i,e.PASSWORD),o=await zo(i,e.HEADERS),s=Object.entries(t(t({Accept:"application/json"},o),i.headers)).filter((e=>{let[t,i]=e;return Mo(i)})).reduce(((e,i)=>{let[r,n]=i;return t(t({},e),{},{[r]:String(n)})}),{});if(Io(r)&&(s.Authorization=`Bearer ${r}`),Io(n)&&Io(a)){const e=(e=>{try{return btoa(e)}catch(t){return ja.from(e).toString("base64")}})(`${n}:${a}`);s.Authorization=`Basic ${e}`}return i.body&&(i.mediaType?s["Content-Type"]=i.mediaType:Do(i.body)?s["Content-Type"]=i.body.type||"application/octet-stream":Co(i.body)?s["Content-Type"]="text/plain":To(i.body)||(s["Content-Type"]="application/json")),new Headers(s)},Po=(e,i)=>new Promise((async(r,n)=>{try{const n=((e,t)=>{const i=e.ENCODE_PATH||encodeURI,r=null==t?void 0:t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,r)=>{var n;return(null===(n=null==t?void 0:t.path)||void 0===n?void 0:n.hasOwnProperty(r))?i(String(t.path[r])):e})),n=`${e.BASE}${r}`;return t.query?`${n}${Ro(t.query)}`:n})(e,i),a=(e=>{if(e.formData){const t=new FormData,i=(e,i)=>{Co(i)||Do(i)?t.append(e,i):t.append(e,JSON.stringify(i))};return Object.entries(e.formData).filter((e=>{let[t,i]=e;return Mo(i)})).forEach((e=>{let[t,r]=e;Array.isArray(r)?r.forEach((e=>i(t,e))):i(t,r)})),t}})(i),o=(e=>{var t;if(void 0!==e.body)return(null===(t=e.mediaType)||void 0===t?void 0:t.includes("/json"))?JSON.stringify(e.body):Co(e.body)||Do(e.body)||To(e.body)?e.body:JSON.stringify(e.body)})(i),s=await Bo(e,i),c=await(async(e,t,i,r,n,a)=>{const o=new AbortController,s={headers:a,body:null!=r?r:n,method:t.method,signal:o.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),await fetch(i,s)})(e,i,n,o,a,s),d=await(async e=>{if(204!==e.status)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some((e=>t.toLowerCase().startsWith(e)))?await e.json():await e.text()}catch(e){console.error(e)}})(c),u=((e,t)=>{if(t){const i=e.headers.get(t);if(Co(i))return i}})(c,i.responseHeader),l={url:n,ok:c.ok,status:c.status,statusText:c.statusText,headers:c.headers,body:null!=u?u:d};((e,i)=>{var r,n;const a=t({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[i.status];if(a)throw new la(e,i,a);if(!i.ok){const t=null!==(r=i.status)&&void 0!==r?r:"unknown",a=null!==(n=i.statusText)&&void 0!==n?n:"unknown",o=(()=>{try{return JSON.stringify(i.body,null,2)}catch(e){return}})();throw new la(e,i,`Generic Error: status: ${t}; status text: ${a}; body: ${o}`)}})(i,l),r(l)}catch(e){n(e)}})),Oo=new W("idv"),Fo=Symbol(),No=Symbol(),Lo="verify-id-sdk";function jo(e){return sessionStorage.getItem(e)}const Uo=new Map;function qo(e,t){const i=Uo.get(e);Oo.events.emit(i,t)}function Ko(e){qo(Fo,e)}function Ho(e,t,i,r,n){Ko({type:"verification-result",status:t,step:e,state:r,callbackUrl:n,sessionId:i})}function Vo(e,t){Ko({type:"capture-error",errorCode:t,step:e})}function $o(e,t,i){Ko({type:"api-request-error",errorCode:t,step:e,error:i})}function Jo(e,t){return Po(ha,e).catch((i=>(e.url.endsWith("/events")||$o(t,"request-error",i.message),Promise.reject(i))))}async function Go(e){var t;ha.HEADERS=Ea(e);const i=await function(e){return Jo({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${e}`},"init")}(e);return{autocapture_settings:null!==(t=i.body.autocapture_settings)&&void 0!==t?t:void 0,autocapture_enabled:i.body.autocapture_enabled}}Uo.set(Fo,Fo),Uo.set(No,No);var Wo={setStep(e,t){e.commit("setStep",t)},setSessionId(e,t){e.commit("setSessionId",t)},setIsCapturingProcessStarted(e,t){e.commit("setIsCapturingProcessStarted",t)},setServerPath(e,t){e.commit("setServerPath",t)},setStartToken(e,t){e.commit("setStartToken",t)},setRootElement(e,t){e.commit("setRootElement",t)},setLanguage(e,t){e.commit("setLanguage",t)},setCallback(e,t){e.commit("setCallback",t)},setUserToken(e,t){e.commit("setUserToken",t)},setConsentVersion(e,t){e.commit("setConsentVersion",t)},setMissingImages(e,t){e.commit("setMissingImages",t)},setClientId(e,t){e.commit("setClientId",t)},setStatus(e,t){e.commit("setStatus",t)},setMarkdownSupportText(e,t){e.commit("setMarkdownSupportText",t)},setVideoCaptureSettings(e,t){e.commit("setVideoCaptureSettings",t)},setCdnHost(e,t){e.commit("setCdnHost",t)},setIsImageSigningEnabled(e,t){e.commit("setIsImageSigningEnabled",t)},setAutoCaptureSettings(e,t){e.commit("setAutoCaptureSettings",t)}},Zo={setStep:(e,t)=>(e.step=t,e),setSessionId:(e,t)=>(e.sessionId=t,e),setIsCapturingProcessStarted:(e,t)=>(e.isCapturingProcessStarted=t,e),setServerPath:(e,t)=>(e.serverPath=t,e),setStartToken:(e,t)=>(e.startToken=t,e),setRootElement:(e,t)=>(e.rootElementId=t,e),setLanguage:(e,t)=>(e.language=t,e),setCallback:(e,t)=>(e.callback=t,e),setUserToken:(e,t)=>(e.userToken=t,e),setConsentVersion:(e,t)=>(e.consentVersion=t,e),setMissingImages:(e,t)=>(e.missingImages=t,e),setClientId:(e,t)=>(e.clientId=t,e),setStatus:(e,t)=>(e.verificationStatus=t,e),setMarkdownSupportText:(e,t)=>(e.markdownSupportText=t,e),setVideoCaptureSettings:(e,t)=>(e.videoCaptureSettings=t,e),setCdnHost:(e,t)=>(e.cdnHost=t,e),setIsImageSigningEnabled:(e,t)=>(e.isImageSigningEnabled=t,e),setAutoCaptureSettings:(e,t)=>(e.autoCaptureSettings=t,e)};const Yo=new class{constructor(e){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(e,"actions")&&(this.actions=e.actions),Object.prototype.hasOwnProperty.call(e,"mutations")&&(this.mutations=e.mutations);const t=this;this.state=new Proxy(e.state||{},{get:function(e,t){return e[t]},set:function(e,i,r){return e[i]=r,qo(No,{key:i,state:e}),"mutation"!==t.status&&console.warn(`You should use a mutation to set ${String(i)}`),t.status="resting",!0}})}dispatch(e,t){return"function"!=typeof this.actions[e]?(console.error(`Action "${e} doesn't exist.`),!1):(this.status="action",this.actions[e](this,t),!0)}commit(e,t){if("function"!=typeof this.mutations[e])return console.info(`Mutation "${e}" doesn't exist`),!1;this.status="mutation";const i=this.mutations[e](this.state,t);return this.state=i,!0}}({actions:Wo,mutations:Zo,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var Qo;function Xo(e){const t=[],i=function(e){var t,i,r,n;const a=e.stats.get(Qo.BLUR_DETECTION),o=e.stats.get(Qo.GLARE_DETECTION);if(!a&&!o||0===(null==a?void 0:a.durations.length)&&0===(null==o?void 0:o.durations.length))return;const s=is(null!==(t=null==a?void 0:a.durations)&&void 0!==t?t:null==o?void 0:o.durations),c=a&&o?Math.min(a.countSuccess,o.countSuccess):null!==(i=null==a?void 0:a.countSuccess)&&void 0!==i?i:null==o?void 0:o.countSuccess;return{name:ts(Qo.BLUR_DETECTION),count_success:c,count_failure_glare:null!==(r=null==o?void 0:o.countFailed)&&void 0!==r?r:0,count_failure_blur:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(e);i&&t.push(i);for(const[i,r]of e.stats.entries())i!==Qo.BLUR_DETECTION&&i!==Qo.GLARE_DETECTION&&r.durations.length>0&&t.push(es(r,i));return e.frameHandleDurations.length>0&&t.push(function(e){const t=is(e.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(e.stableCounts.reduce(((e,t)=>e+t),0)/e.stableCounts.length),avg_duration:t.duration_avg,std_duration:t.duration_std}}(e)),t}function es(e,t){const i=is(e.durations);return{name:ts(t),count_success:e.countSuccess,count_failure:e.countFailed,avg_duration:i.duration_avg,std_duration:i.duration_std}}function ts(e){switch(e){case Qo.BLUR_DETECTION:case Qo.GLARE_DETECTION:return"blur_glare_detector";case Qo.DOCUMENT_DETECTION:return"doc_detector";case Qo.DOCUMENT_POSITION:return"doc_frame_detector";case Qo.BARCODE_DETECTION:return"barcode_detector";case Qo.FACE_DETECTION:return"face_detector";case Qo.FACE_POSITION:return"face_frame_detector";default:return e}}function is(e){var t;if(e.length<2)return{duration_avg:null!==(t=e[0])&&void 0!==t?t:0,duration_std:0};const i=e.length,r=e.reduce(((e,t)=>e+t),0)/i;let n=0;for(let t=0;t<i;t++){const i=e[t];n+=Math.pow(i-r,2)}const a=Math.sqrt(n/(i-1));return{duration_avg:Math.round(r),duration_std:Math.round(a)}}!function(e){e.DOCUMENT_DETECTION="document_detection",e.DOCUMENT_POSITION="document_position",e.GLARE_DETECTION="glare_detection",e.BLUR_DETECTION="blur_detection",e.BARCODE_DETECTION="barcode_detection",e.FACE_DETECTION="face_detection",e.FACE_POSITION="face_position"}(Qo||(Qo={}));const rs=new class{createUploadImageEvent(e,t,i,r){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:e,request_total_time_ms:String(t),request_processing_time_ms:String(i),request_build_time_ms:String(r)}}}createPageViewEvent(e){return{event_type:"page_view",page_view_req:{page_name:e}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(e,t){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(e),model_stats:this.convertModelStats(t)}}}convertModelStats(e){return e.map((e=>({model_name:e.modelName,init_duration:Math.round(e.initDuration),download_duration:Math.round(e.downloadDuration)})))}createUserActionEvent(e,t,i){var r,n,a;const o={user_action_type:e,page_name:t,autocapture:!!i,autocapture_enabled:null!==(a=null===(n=null===(r=Yo.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&void 0!==a&&a};if(i){const e=Xo(i);o.stats=e}return{event_type:"user_action",user_action_req:o}}createErrorEvent(e,t,i){return{event_type:"error",error_req:{error_name:t,error_description:e,step:i}}}createCameraNotAllowedEvent(e,t){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:e,step:t}}}createDrsInitFailureEvent(e,t){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:e,step:t}}}};async function ns(e,t,i,r,n){i?(ha.HEADERS=Ea(r,t),await function(e,t,i){return Jo({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${e}/events`,path:{sid:e},body:t},i)}(i,n,e)):console.error("cannot send event, sessionId or startToken is not set")}const as=new class{handelEventData(e){if("session-id-acquired"===e.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const e=`${ha.BASE}/verify/api/v1/verification/${Yo.state.sessionId}/risk-session-token`,t=Yo.state.clientId,i=Ea(t,Yo.state.userToken);ca().then((t=>{Oo.http.httpPost(e,{session_token:t},null,i).catch((t=>{throw console.log("unable to send session token to IDV",e),console.error(t),t}))})).catch((t=>{var i,r,n,a;console.log("unable to get session token from DRS",e),console.error(t);const o=(null==t?void 0:t.message)||"failed to initialize DRS",s=rs.createDrsInitFailureEvent(o,"init");ns(null===(i=Yo.state)||void 0===i?void 0:i.step,null===(r=Yo.state)||void 0===r?void 0:r.userToken,null===(n=Yo.state)||void 0===n?void 0:n.sessionId,null===(a=Yo.state)||void 0===a?void 0:a.clientId,s).then((()=>{Ko({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(e){throw console.log("Error sending risk session token"),console.error(e),e}}};async function os(e,t,i){const r=rs.createErrorEvent(e,t,i);await ss(i,r)}async function ss(e,t){var i,r,n,a,o;const s=null===(i=Yo.state)||void 0===i?void 0:i.userToken,c=(null===(r=Yo.state)||void 0===r?void 0:r.sessionId)||(null===(n=Yo.state)||void 0===n?void 0:n.startToken),d=null===(a=Yo.state)||void 0===a?void 0:a.clientId,u=(null===(o=Yo.state)||void 0===o?void 0:o.step)||e;await ns(u,s,c,d,t)}const cs=function(){var e,t;(null===(t=null===(e=Yo.state.autoCaptureSettings)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.debug)&&console.log(...arguments)};var ds;!function(e){e.DOCUMENT_DETECTOR="document_detector",e.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",e.FACE_LANDMARK="face_landmark"}(ds||(ds={}));const us=["pdf417","qr_code"];class ls{constructor(){this.model=new BarcodeDetector({formats:us})}async detect(e){const t=await this.model.detect(e);return cs("detectedBarcodes:",t),t.map((e=>({class:e.format,score:1,x:e.boundingBox.x,y:e.boundingBox.y,width:e.boundingBox.width,height:e.boundingBox.height,extra:e.rawValue})))}}var hs;!function(e){e.NOT_AVAILABLE="notAvailable",e.LOADING="loading",e.LOADED="loaded"}(hs||(hs={}));const fs={[ds.DOCUMENT_DETECTOR]:{status:hs.LOADING},[ds.BLUR_GLARE_CLASSIFIER]:{status:hs.LOADING},[ds.FACE_LANDMARK]:{status:hs.LOADING}};const ps=[ds.DOCUMENT_DETECTOR,ds.BLUR_GLARE_CLASSIFIER],gs=async()=>{let e=!1;for(;!e;){const t=Object.values(fs).filter((e=>e.status===hs.NOT_AVAILABLE));if(t.length>0)throw new Error(`Model not available: ${t.join(", ")}`);if(e=ps.every((e=>fs[e].status===hs.LOADED)),e)return!0;await new Promise((e=>setTimeout(e,100)))}},ms=e=>"function"==typeof e,bs=function(e){};Oo.events.on(Oo.events.MODULE_INITIALIZED,(function(){const{clientId:e,IDV:i}=Oo.moduleMetadata.getInitConfig();if(!e||!i)return!1;const r=(null==i?void 0:i.serverPath)&&(n=null==i?void 0:i.serverPath,a="/verify",(null==n?void 0:n.endsWith(a))?n.slice(0,n.length-a.length):n);var n,a;ha.BASE=r||window.location.origin,Yo.dispatch("setClientId",e),Yo.dispatch("setRootElement",(null==i?void 0:i.rootElement)||"root-element"),Yo.dispatch("setServerPath",null==i?void 0:i.serverPath),Yo.dispatch("setLanguage",null==i?void 0:i.language),Yo.dispatch("setCallback",null==i?void 0:i.callback),Yo.dispatch("setConsentVersion",null==i?void 0:i.consentVersion),Yo.dispatch("setMarkdownSupportText",null==i?void 0:i.markdownSupportText),Yo.dispatch("setVideoCaptureSettings",null==i?void 0:i.videoCaptureSettings),Yo.dispatch("setCdnHost",null==i?void 0:i.cdnHost),Yo.dispatch("setIsImageSigningEnabled",null==i?void 0:i.isImageSigningEnabled),(null==i?void 0:i.callbacks)&&(e=>{let{callbacks:t,callback:i}=e;ms(t.sessionGranted)&&(vs=t.sessionGranted);ms(t.sessionStarted)&&(ys=t.sessionStarted);ms(t.imageSubmitted)&&(_s=t.imageSubmitted);ms(t.processing)&&(ws=t.processing);ms(t.completed)&&(xs=t.completed);ms(t.recapture)&&(As=t.recapture);ms(t.error)&&(Es=t.error);ms(i)&&(Ss=i)})(i);return Yo.dispatch("setStartToken",null==i?void 0:i.startToken),Go(Yo.state.clientId).then((e=>{!async function(e){if(null==e?void 0:e.autocapture_enabled){if("serviceWorker"in navigator)return Yo.dispatch("setAutoCaptureSettings",{enabled:!0,settings:e.autocapture_settings}),cs("service worker available"),void navigator.serviceWorker.addEventListener("message",(e=>{if(e.data&&"MODEL_READY"===e.data.type){const i=e.data.modelName;fs[i]={status:hs.LOADED,imageDimensions:e.data.imageDimensions,loadingStats:t(t({},e.data.stats),{},{modelName:i})}}else if(e.data&&"MODEL_LOAD_ERROR"===e.data.type){const t=e.data.modelName;fs[t].status=hs.NOT_AVAILABLE,os(`${e.data.modelName} error: ${e.data.error}`,"model_load_error","init")}}));os("service worker not available","service_worker_not_available","init")}Yo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:e.autocapture_settings})}(e)})),function(e){Ko({type:"init",step:e})}("init"),!0})),Oo.events.on(Fo,(function(e){switch(as.handelEventData(e),Ss(e),e.type){case"session-granted":vs({session:Yo.state.sessionId});break;case"session-id-acquired":ys({session:Yo.state.sessionId});break;case"capture-image-result":_s({session:Yo.state.sessionId},e.imageType);break;case"start-verification-processing":ws({session:Yo.state.sessionId});break;case"verification-complete":xs({session:Yo.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Es({session:Yo.state.sessionId},e.errorCode,e.error);break;case"verification-recapture":As({session:Yo.state.sessionId},e.reason)}}));let vs=bs,ys=bs,_s=bs,ws=bs,xs=bs,As=bs,Es=bs,Ss=e=>{};async function ks(e,t,i){ha.HEADERS=Ea(i,t);var r;return(await(r=e,Jo({method:"GET",url:`/verify/api/v1/verification/${r}/status`,path:{sid:r},errors:{404:"Session not found"}},"processing"))).body}function Ms(e){try{return JSON.parse(e)}catch(e){return console.error(e),null}}async function Cs(e,t,i,r){ha.HEADERS=Ea(t);const n=await(a={start_token:e,accessed_from_desktop:!1,client_type:ma.client_type.MOBILE_SDK,consent:{granted:!0,document_id:i},image_signing_public_key:r},Jo({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:a,mediaType:"application/json"},"init"));var a;return{sessionId:n.body.session_id,userToken:n.body.user_token,requiredImages:n.body.required_images}}async function Is(e,t,i){let r,n,a;if(r)try{r=jo(Lo);const e=JSON.parse(r);n=e.sessionId,a=e.userToken}catch(e){}try{let o;if(a){o=(await ks(n,a,i)).missing_images}else{const s=Oo.crypto.createCryptoBinding("sign"),c=await s.getPublicData(),d=await Cs(e,i,t,c.publicKey);n=d.sessionId,a=d.userToken,o=d.requiredImages,r=JSON.stringify({sessionId:n,userToken:a}),function(e,t){sessionStorage.setItem(e,t)}(Lo,r)}return{requiredImages:o,sessionId:n.toString(),userToken:a.toString()}}catch(e){throw console.log("Error starting session"),console.error(e),e}}function Ds(e){let{tagName:t,style:i,id:r="",className:n="",testid:a,options:o}=e;const s=document.createElement(t,o);return s.id=r,s.className=n,s.setAttribute("data-auto",a+"-auto"),Object.keys(i).forEach((e=>{s.style[e]=i[e]})),s}function Ts(e,t){Array.isArray(t)?t.forEach((t=>{e.appendChild(t)})):e.appendChild(t)}const Rs={blur_message:"Please focus camera on the document before capturing",blur_title:"Blurred image",document_incorrect_position_message:"Please make sure the document is fully within the frame, and nothing covers it",document_incorrect_position_title:"Incorrect document position",document_not_found_message:"Make sure you capture a valid government issued ID",document_not_found_title:"Document not detected",document_not_matching_message:"Please make sure to capture the back side of the document",document_not_matching_title:"Back image mismatch",document_not_supported_message:"Please use a different government issued ID instead",document_not_supported_title:"Document not supported",capturing_in_progress_message:"Capturing, stay steady",capturing_in_progress_title:"Capturing in progress",face_not_found_message:"Ensure your face is not covered and fully visible",face_not_found_title:"Face not detected",glare_message:"Avoid any direct light reflecting with glare",glare_title:"Glare detected",main_title_document_back:"Back side",main_title_document_face:"Selfie",main_title_document_front:"Front side",obstructed_message:"Some of the document parts are covered or missing",obstructed_title:"Missing information",other_error_code_message:"Please try again",other_error_code_title:"An error occurred",page_header_document:"Scan document",loading_screen_small_title:"Preparing...",page_header_face:"Face Recognition",second_title_document_back:"Please place your document on a solid surface, back side up.",second_title_document_face:"Please position your face in the center of the oval below.",second_title_document_front:"Please place your document on a solid surface, photo side up.",wrong_document_side_message:"The wrong document side has been detected",wrong_document_side_title:"Wrong document side detected",face_angle_too_large_title:"your face is not directly aligned with the camera",face_angle_too_large_message:"Please take another photo with your face fully visible for accurate detection",face_close_to_border_title:"Your face is too close to the edge",face_close_to_border_message:"Please adjust your position and make sure your entire face is within the frame",face_too_small_title:"Your face is too distant from the edge",face_too_small_message:"Please move closer to the camera so your face is clearer and easier to detect",face_too_close_title:"Your face is too close ",face_too_close_message:"Please adjust your position and make sure your entire face is within the frame",face_cropped_title:"Your face is partially cropped",face_cropped_message:"Please adjust your position and make sure your entire face is within the frame for optimal",no_face_title:"Face not found",no_face_message:"Please move closer to the camera or adjust your position so your face is clearer and easier to detect",multi_face_title:"Multiple faces detected",multi_face_message:"Please make sure only one face is visible in the frame to proceed",blur_selfie_title:"The selfie is out of focus",blur_selfie_message:"Please try taking another one with clearer focus for better detection",glare_selfie_title:"Too much reflection in your selfie",glare_selfie_message:"Please try taking another photo with better lighting and without glare for accurate detection",closed_eyes_title:"It looks like your eyes are closed",closed_eyes_message:"Please retake the photo with your eyes open",face_occluded_title:"Your face is partially hidden",face_occluded_message:"Please take another photo with your face fully visible for accurate detection",face_rotated_title:"Your face is not directly aligned with the camera",face_rotated_message:"Please take another photo with your face fully visible for accurate detection",barcode_not_found_title:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",barcode_not_found_message:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",searching_document_autocapture:"Searching for document",capturing_document_autocapture:"Capturing, please hold steady",click_manual_autocapture:"Click to capture manually",glare_blur_issues_autocapture:"Please make sure there are no light reflections, and try again",doc_not_in_frame_issues_autocapture:"Please bring the document closer and ensure it is fully within the capture frame for a clear image.",doc_not_found_autocapture:"Looking for document",capturing_face_issue_closer:"Please move closer to the frame",second_title_face_autocapture:"Get ready! Your selfie will be auto-captured, or tap to capture it manually",capturing_face_autocapture3:"Capturing... please, hold steady for 3",capturing_face_autocapture2:"Capturing... please, hold steady for 2",capturing_face_autocapture1:"Capturing... please, hold steady for 1",selfie_approval_autocapture:"Great job! Approve your selfie to continue"};const zs=new class{constructor(e){this.translations=e,this.translations=new Proxy(this.translations,{get:function(e,t){return e[t]},set:function(e,t,i){return e[t]=i,!0}})}overrideLanguage(e){Object.assign(this.translations,e)}translate(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];let n=this.translations[e];return n||(n=e),n.replace(/{(\d+)}/g,(function(e,t){return void 0!==i[t]?i[t]:e}))}}(Rs),Bs={en:Rs,es:{blur_message:"Favor enfoca la cĆ”mara en tĆŗ cĆ©dula antes de la captura",blur_title:"Imagen borrosa",document_incorrect_position_message:"AsegĆŗrate de que la cĆ©dula estĆ© completamente dentro del marco y nada la cubra",document_incorrect_position_title:"Posición incorrecta del documento",capturing_in_progress_title:"Capturando en progreso",capturing_in_progress_message:"Capturando, mantente estable",document_not_found_message:"AsegĆŗrate de utilizar una cĆ©dula valida",document_not_found_title:"CĆ©dula no detectada",document_not_matching_message:"Favor AsegĆŗrate de capturar la parte trasera de tu cĆ©dula",document_not_matching_title:"Parte trasera no corresponde",document_not_supported_message:"Favor utliza tu cĆ©dula",document_not_supported_title:"CĆ©dula no compatible",face_not_found_message:"Asegurase de no tapar su rostro",face_not_found_title:"Selfie no detectada",glare_message:"Evite luz directa que pueda generar brillo",glare_title:"Demasiado brillo",main_title_document_back:"Parte trasera de tu cĆ©dula",main_title_document_face:"Tómate un Selfie",main_title_document_front:"Parte frontal de tu cĆ©dula",obstructed_message:"Parte de la cĆ©dula documento no estĆ” visible o falta información",obstructed_title:"Falta información",other_error_code_message:"Intenta nuevamente",other_error_code_title:"Ha ocurrido un error",page_header_document:"EscanĆ©a tu cĆ©dula",page_header_face:"Reconocimiento Facial",second_title_document_back:"AsegĆŗrate de poner su cĆ©dula en una superfice plana con la parte trasera visible.",second_title_document_face:"AsegĆŗrate de posicionar tu rostro en el centro del circulo.",second_title_document_front:"AsegĆŗrate de poner su cĆ©dula en una superfice plana con la parte frontal visible.",wrong_document_side_message:"Lado incorrecto de tu cĆ©dula ha sido detectado",wrong_document_side_title:"Lado de tu cĆ©dula incorrecto",face_angle_too_large_title:"Tu rostro no estĆ” directamente alineado con la cĆ”mara.",face_angle_too_large_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_close_to_border_title:"Tu rostro estĆ” demasiado cerca del borde.",face_close_to_border_message:"Por favor, cambia la posicion de tu rostro y asegĆŗrate de que todo tu rostro estĆ© dentro del marco.",face_too_small_title:"Tu rostro estĆ” demasiado lejos del borde.",face_too_small_message:"Por favor, acĆ©rcate mĆ”s a la cĆ”mara para que tu rostro estĆ© mĆ”s claro y sea mĆ”s fĆ”cil de detectar.",face_too_close_title:"Tu rostro estĆ” demasiado cerca",face_too_close_message:"Acomode la posición y asegĆŗrese de que toda su rostro estĆ© dentro del marco.",face_cropped_title:"Tu rostro estĆ” parcialmente recortado.",face_cropped_message:"Por favor, cambia tu posición y asegĆŗrate de que todo tu rostro estĆ© dentro del marco para una detección óptima.",no_face_title:"Rostro no encontrado.",no_face_message:"Por favor, acĆ©rcate mĆ”s a la cĆ”mara o ajusta tu posición para que tu rostro estĆ© mĆ”s claro y sea mĆ”s fĆ”cil de detectar.",multi_face_title:"Se detectaron mĆŗltiples rostros.",multi_face_message:"Por favor, asegĆŗrate de que solo haya un rostro visible en el marco para continuar.",blur_selfie_title:"El autorretrato estĆ” fuera de foco.",blur_selfie_message:"Por favor, intenta tomar una nueva imagen con un enfoque mĆ”s claro para una mejor detección.",glare_selfie_title:"Demasiado reflejo en tu autorretrato.",glare_selfie_message:"Por favor, intenta tomar otra foto con una mejor iluminación y sin brillos para una detección precisa.",closed_eyes_title:"Parece que tienes los ojos cerrados.",closed_eyes_message:"Por favor, vuelve a tomar la foto con los ojos abiertos.",face_occluded_title:"Tu rostro estĆ” parcialmente oculto.",face_occluded_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_rotated_title:"Tu rostro estĆ” fuera de foco.",face_rotated_message:"Por favor, intenta tomar otro con un enfoque mĆ”s claro para una mejor detección.",barcode_not_found_title:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar mĆ”s despejado.",barcode_not_found_message:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar mĆ”s despejado.",searching_document_autocapture:"Buscando la cedula",capturing_document_autocapture:"Capturando, por favor mantente quieto",click_manual_autocapture:"Haz clic para capturar manualmente",glare_blur_issues_autocapture:"Por favor, asegĆŗrate de que no haya reflejos de luz antes de intentarlo de nuevo",doc_not_in_frame_issues_autocapture:"Por favor, acerque la cedula y asegĆŗrese de que estĆ© completamente dentro del marco de captura para obtener una imagen clara",second_title_face_autocapture:"Ā”PrepĆ”rate! Tu selfie se capturarĆ” automĆ”ticamente, o toca para capturarla manualmente",capturing_face_autocapture3:"Capturando... por favor, mantente quieto durante 3",capturing_face_autocapture2:"Capturando... por favor, mantente quieto durante 2",capturing_face_autocapture1:"Capturando... por favor, mantente quieto durante 1",selfie_approval_autocapture:"Ā”Buen trabajo! Aprueba tu selfie para continuar"},pt:{blur_message:"Por favor, foque a cĆ¢mera no documento antes de capturar",blur_title:"Imagem borrada",document_incorrect_position_message:"Certifique-se de que o documento esteja totalmente dentro do quadro e nada o cubra",document_incorrect_position_title:"Posição incorreta do documento",document_not_found_message:"Certifique-se de capturar um documento vĆ”lido emitido pelo governo",document_not_found_title:"Documento nĆ£o detectado",document_not_matching_message:"Por favor, certifique-se de capturar o verso do documento",document_not_matching_title:"Imagem do verso incorreta",document_not_supported_message:"Por favor, utilize um documento diferente emitido pelo governo",document_not_supported_title:"Documento nĆ£o suportado",capturing_in_progress_message:"Capturando, mantenha-se firme",capturing_in_progress_title:"Captura em andamento",face_not_found_message:"Certifique-se de que seu rosto nĆ£o esteja coberto e esteja totalmente visĆ­vel",face_not_found_title:"Rosto nĆ£o detectado",glare_message:"Evite qualquer luz direta refletindo com brilho",glare_title:"Brilho detectado",main_title_document_back:"Verso",main_title_document_face:"Selfie",main_title_document_front:"Frente",obstructed_message:"Algumas partes do documento estĆ£o encobertas ou ausentes",obstructed_title:"InformaƧƵes incompletas",other_error_code_message:"Por favor, tente novamente",other_error_code_title:"Ocorreu um eprro",page_header_document:"Digitalizar o documento",page_header_face:"Reconhecimento facial",second_title_document_back:"Coloque o documento em uma superfĆ­cie sólida, com o verso voltado para cima.",second_title_document_face:"Por favor, posicione seu rosto no centro do oval abaixo.",second_title_document_front:"Coloque o documento em uma superfĆ­cie sólida, com a foto voltada para cima.",wrong_document_side_message:"O lado errado do documento foi detectado",wrong_document_side_title:"Lado incorreto do documento identificado",face_angle_too_large_title:"Seu rosto nĆ£o estĆ” diretamente alinhado com a cĆ¢mera.",face_angle_too_large_message:"Tire outra foto com seu rosto totalmente visĆ­vel para uma detecção precisa.",face_close_to_border_title:"Seu rosto estĆ” muito próximo da borda.",face_close_to_border_message:"Por favor, reposicione seu rosto e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_too_small_title:"Seu rosto estĆ” muito longe da borda.",face_too_small_message:"Aproxime-se da cĆ¢mera para que seu rosto fique mais claro e fĆ”cil de detectar.",face_too_close_title:"Seu rosto estĆ” muito perto",face_too_close_message:"Ajuste a posição e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_cropped_title:"Seu rosto estĆ” parcialmente cortado.",face_cropped_message:"Mude sua posição e certifique-se de que todo o seu rosto esteja dentro do enquadramento para uma detecção ideal.",no_face_title:"Rosto nĆ£o encontrado..",no_face_message:"Aproxime-se da cĆ¢mera ou ajuste sua posição para que seu rosto fique mais claro e fĆ”cil de detectar.",multi_face_title:"VĆ”rios rostos foram detectados.",multi_face_message:"Certifique-se de que haja apenas um rosto visĆ­vel no quadro para continuar.",blur_selfie_title:"O autorretrato estĆ” fora de foco.",blur_selfie_message:"Tente tirar uma nova imagem com foco mais claro para melhor detecção.",glare_selfie_title:"Muita reflexĆ£o em seu autorretrato.",glare_selfie_message:"Tente tirar outra foto com melhor iluminação e sem brilho para uma detecção precisa.",closed_eyes_title:"Parece que seus olhos estĆ£o fechados.",closed_eyes_message:"Por favor, tire a foto novamente com os olhos abertos.",face_occluded_title:"Seu rosto estĆ” parcialmente oculto.",face_occluded_message:"Tire outra foto com seu rosto totalmente visĆ­vel para uma detecção precisa.",face_rotated_title:"Seu rosto estĆ” fora de foco.",face_rotated_message:"Por favor, tente pegar outro com foco mais claro para melhor detecção.",barcode_not_found_title:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocĆ”-lo em um local mais claro.",barcode_not_found_message:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocĆ”-lo em um local mais claro.",searching_document_autocapture:"Buscando o documento",capturing_document_autocapture:"Capturando, por favor mantenha-se imóvel",click_manual_autocapture:"Clique para capturar manualmente.",glare_blur_issues_autocapture:"Por favor, certifique-se de que nĆ£o hĆ” reflexos de luz antes de tentar novamente",doc_not_in_frame_issues_autocapture:"Por favor, aproxime o documento e certifique-se de que estĆ” totalmente dentro da moldura de captura para uma imagem nĆ­tida",second_title_face_autocapture:"Prepare-se! Sua selfie serĆ” capturada automaticamente, ou toque para capturĆ”-la manualmente",capturing_face_autocapture3:"Capturando... por favor, fique parado por 3",capturing_face_autocapture2:"Capturando... por favor, fique parado por 2",capturing_face_autocapture1:"Capturando... por favor, fique parado por 1",selfie_approval_autocapture:"Ɠtimo trabalho! Aprove sua selfie para continuar"},frCa:{blur_message:"Veuillez faire la mise au point de l’appareil photo sur le document avant de le capturer",blur_title:"Image floue",document_not_found_message:"Munissez-vous d’une piĆØce d’identitĆ© valide dĆ©livrĆ©e par le gouvernement",document_not_found_title:"Document non dĆ©tectĆ©",document_not_matching_message:"Veillez Ć  capturer le verso du document",document_not_matching_title:"Non-concordance entre les images du recto et du verso",document_not_supported_message:"Veuillez utiliser une autre piĆØce d’identitĆ© dĆ©livrĆ©e par le gouvernement",document_not_supported_title:"Document non pris en charge",face_not_found_message:"Assurez-vous que votre visage n’est pas couvert et qu’il est entiĆØrement visible",face_not_found_title:"Visage non dĆ©tectĆ©",glare_message:"Ɖvitez la lumiĆØre directe qui pourrait se reflĆ©ter sur le document",glare_title:"Reflet dĆ©tectĆ©",main_title_document_back:"Verso",main_title_document_face:"Ɖgoportrait",main_title_document_front:"Face avant",obstructed_message:"Le document comporte des parties manquantes ou couvertes",obstructed_title:"Informations manquantes",other_error_code_message:"Veuillez rĆ©essayer",other_error_code_title:"Une erreur s’est produite",page_header_document:"NumĆ©riser le document",page_header_face:"Reconnaissance faciale",second_title_document_back:"Veuillez placer votre document sur une surface solide, le verso vers le haut.",second_title_document_face:"Veuillez positionner votre visage au centre de l’ovale ci-dessous.",second_title_document_front:"Veuillez placer votre document sur une surface solide, photo vers le haut.",wrong_document_side_message:"Le mauvais cĆ“tĆ© du document a Ć©tĆ© dĆ©tectĆ©",wrong_document_side_title:"Mauvais cĆ“tĆ© du document dĆ©tectĆ©",face_angle_too_large_title:"votre visage n’est pas directement alignĆ© avec l’appareil photo",face_angle_too_large_message:"Veuillez prendre une autre photo avec votre visage entiĆØrement visible pour une dĆ©tection prĆ©cise",face_close_to_border_title:"Votre visage est trop prĆØs du bord",face_close_to_border_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_too_small_title:"Votre visage est trop Ć©loignĆ© du bord",face_too_small_message:"Veuillez vous rapprocher de la camĆ©ra pour que votre visage soit plus clair et plus facile Ć  dĆ©tecter",face_too_close_title:"Votre visage est trop proche",face_too_close_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_cropped_title:"Votre visage est partiellement rognĆ©",face_cropped_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre pour optimiser",no_face_title:"Visage introuvable",no_face_message:"Veuillez vous rapprocher de la camĆ©ra ou ajuster votre position pour que votre visage soit plus clair et plus facile Ć  dĆ©tecter",multi_face_title:"Plusieurs visages dĆ©tectĆ©s",multi_face_message:"Veuillez vous assurer qu’un seul visage est visible dans le cadre pour continuer",blur_selfie_title:"L’égoportrait n’est pas net",blur_selfie_message:"Essayez d’en prendre un autre avec une mise au point plus claire pour une meilleure dĆ©tection",glare_selfie_title:"Trop de reflets sur votre Ć©goportrait",glare_selfie_message:"Veuillez essayer de prendre une autre photo avec un meilleur Ć©clairage et sans reflet pour une dĆ©tection prĆ©cise",closed_eyes_title:"Il semble que vos yeux soient fermĆ©s.",closed_eyes_message:"Veuillez reprendre la photo avec les yeux ouverts",face_occluded_title:"Votre visage est partiellement cachĆ©.",face_occluded_message:"Veuillez prendre une autre photo avec votre visage entiĆØrement visible pour une dĆ©tection prĆ©cise",face_rotated_title:"votre visage n’est pas directement alignĆ© avec l’appareil photo",face_rotated_message:"Veuillez prendre une autre photo avec votre visage entiĆØrement visible pour une dĆ©tection prĆ©cise",barcode_not_found_title:"Nous avons des difficultĆ©s Ć  capturer certains Ć©lĆ©ments importants de votre document. Veuillez essayer de le placer Ć  un endroit plus clair",barcode_not_found_message:"Nous avons des difficultĆ©s Ć  capturer certains Ć©lĆ©ments importants de votre document. Veuillez essayer de le placer Ć  un endroit plus clair",searching_document_autocapture:"Recherche du document",capturing_document_autocapture:"Capture en cours, veuillez rester immobile",click_manual_autocapture:"Cliquez pour capturer manuellement",glare_blur_issues_autocapture:"Veuillez vous assurer qu’il n’y a pas de reflets de lumiĆØre avant de rĆ©essayer",doc_not_in_frame_issues_autocapture:"Veuillez rapprocher le document et assurez-vous qu’il soit entiĆØrement dans le cadre de capture pour une image claire",second_title_face_autocapture:"PrĆ©parez-vous! Votre selfie sera capturĆ© automatiquement, ou appuyez pour le capturer manuellement",capturing_face_autocapture3:"Capture... en cours, veuillez rester immobile pendant 3",capturing_face_autocapture2:"Capture... en cours, veuillez rester immobile pendant 2",capturing_face_autocapture1:"Capture... en cours, veuillez rester immobile pendant 1",selfie_approval_autocapture:"Bon travail! Approuvez votre selfie pour continuer"}};const Ps=async(e,t,i,r,n,a)=>{var o,s,c,d,u,l,h;ha.HEADERS=Ea(i,t);const f=ya.UAParser();let p;if(Yo.state.isImageSigningEnabled){const e=Oo.crypto.createCryptoBinding("sign");p=await e.sign(r.data)}const g=await(m=e,b={image:{format:r.format,image_type:a,content:r.data,capture_margins:r.captureMargins,signature:p},device_info:{model:null===(o=null==f?void 0:f.device)||void 0===o?void 0:o.model,type:null===(s=null==f?void 0:f.device)||void 0===s?void 0:s.type,manufacturer:null===(c=null==f?void 0:f.device)||void 0===c?void 0:c.vendor,os:null===(d=null==f?void 0:f.os)||void 0===d?void 0:d.name,os_version:null===(u=null==f?void 0:f.os)||void 0===u?void 0:u.version,browser:null===(l=null==f?void 0:f.browser)||void 0===l?void 0:l.name,browser_version:null===(h=null==f?void 0:f.browser)||void 0===h?void 0:h.version,used_camera:null==n?void 0:n.selectedCamera,cameras:null==n?void 0:n.camerasInfo}},Jo({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:m},body:b,mediaType:"application/json",errors:{400:"Request is malformed or missing required fields",401:"Access token is malformed, missing data, or expired",404:"Session not found",409:"All required images were successfully submitted"}},b.image.image_type));var m,b;const v=function(e,t){const i=[...e].find((e=>e.includes(t)));return void 0!==i?i[1]:void 0}(g.headers,"x-ts-processing-time-ms");return"ok"!==g.body.feedback&&console.error("Error",g),{missing_images:g.body.missing_images,feedback:g.body.feedback,custom_feedback:g.body.custom_feedback,has_barcode:g.body.has_barcode,serverProcessingTime:v}},Os=()=>{const e=document.getElementById("overlay-frame");if(e){const t=e.getBoundingClientRect(),i=(3840-screen.width)/2,r=(2160-screen.height)/2;return{top:r+t.top,bottom:r+t.bottom,right:i+t.right,left:i+t.left}}},Fs=e=>["document_front","document_back"].includes(e)?"environment":"user";function Ns(e){switch(e){case"document_front":return pa.image_type.DOCUMENT_FRONT;case"document_back":return pa.image_type.DOCUMENT_BACK;case"selfie":return pa.image_type.SELFIE}}var Ls={},js={get exports(){return Ls},set exports(e){Ls=e}};js.exports=function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,i){i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o}));var r=i(1),n=i(7);i.d(t,"a",(function(){return n.a})),i.d(t,"d",(function(){return r.b}));var a=r.a.FACING_MODES,o=r.a.IMAGE_TYPES},function(e,t,i){var r=i(6);i.d(t,"a",(function(){return r.a}));var n=i(2);i.d(t,"b",(function(){return n.a}))},function(e,t,i){function r(e,t){if(!(t>=0&&t<=1))throw new Error(t+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(e))throw new Error(e+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function n(e,t){var i={};try{r(e,t),i.imageType=e,i.imageCompression=t}catch(e){console.error(e),console.error("default value of "+h.c.PNG+" is used"),i.imageType=h.c.PNG,i.imageCompression=null}return i}function a(){var e=window.navigator.platform,t=window.navigator.userAgent;return e||t}function o(){return"ontouchend"in document}function s(e,t,i){var r=e*parseFloat(i);return{imageWidth:r,imageHeight:t/(e/r)}}function c(e,t,i){return n(t,i).imageType===h.c.JPG?i?e.toDataURL(h.b[h.c.JPG],i):e.toDataURL(h.b[h.c.JPG]):e.toDataURL(h.b[t])}function d(e,t){return e||t}function u(){var e=a();if(/iPad|iPhone|iPod/.test(e))return!0;var t=o();return!(!/Mac/.test(e)||!t)}function l(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:a(),_getHasTouchEvents:o(),getIsIOS:u()}}t.c=s,t.b=c,t.e=d,t.d=u,t.a=l;var h=i(3)},function(e,t,i){function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,"e",(function(){return a})),i.d(t,"a",(function(){return o})),i.d(t,"f",(function(){return s})),i.d(t,"c",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"d",(function(){return u}));var n,a=["user","environment"],o={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],c={PNG:"png",JPG:"jpg"},d=(r(n={},"jpg","image/jpeg"),r(n,"png","image/png"),n),u={audio:!1,video:!0}},function(e,t,i){e.exports=i(5)},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=i(0);i.d(t,"FACING_MODES",(function(){return r.b})),i.d(t,"IMAGE_TYPES",(function(){return r.c})),i.d(t,"_getDebugPlatformInfo",(function(){return r.d}));var n=i(9);i.d(t,"downloadPhoto",(function(){return n.a})),t.default=r.a},function(e,t,i){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return s}));var n=i(2),a=i(3),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),s=function(){function e(){r(this,e)}return o(e,null,[{key:"getDataUri",value:function(e,t){var i=t.sizeFactor,r=t.imageType,a=t.imageCompression,o=t.isImageMirror,s=e.videoWidth,c=e.videoHeight,d=Object(n.c)(s,c,i),u=d.imageWidth,l=d.imageHeight,h=document.createElement("canvas");h.width=u,h.height=l;var f=h.getContext("2d");return o&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(e,0,0,u,l),Object(n.b)(h,r,a)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var e=null,t=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),i=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(t)e=navigator.mediaDevices;else if(i){var r=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,n={getUserMedia:function(e){return new Promise((function(t,i){r.call(navigator,e,t,i)}))}};e=Object.assign(r,n)}return e}},{key:"isSupportedFacingMode",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(t,i){if(!Object(n.e)(t,i))return a.d;var r=e.getNavigatorMediaDevices().getSupportedConstraints();if(!r.width||!r.height)return console.error("Constraint width or height not supported! fallback to default resolution"),a.d;var o=void 0,s=void 0;return t&&(a.e.includes(t)?o=t:s={exact:t}),{audio:!1,video:{facingMode:o,deviceId:s,width:i&&i.width,height:i&&i.height}}}},{key:"getMaxResolutionConstraints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",i);var r=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],a=e.getIdealConstraints(t,{});if(0===i)return Object(n.d)()?(console.warn("fallback to iOS constraints"),e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(a.video.advanced=r,a);if(i<r.length){var o=r.slice(0,-i);return a.video.advanced=o,a}return null}},{key:"FACING_MODES",get:function(){return a.a}},{key:"IMAGE_TYPES",get:function(){return a.c}}]),e}()},function(e,t,i){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return c}));var n=i(1),a=i(8),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),s=n.a.IMAGE_TYPES.PNG,c=function(){function e(t){r(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=n.a.getWindowURL(),this.mediaDevices=n.a.getNavigatorMediaDevices()}return o(e,[{key:"_getStreamDevice",value:function(e,t){var i=this;return new Promise((function(r,a){var o=n.a.getIdealConstraints(e,t);i.mediaDevices.getUserMedia(o).then((function(e){i._gotStream(e),r(e)})).catch((function(e){a(e)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(e){var t=this,i=n.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==i){var r={};return this._getStreamDevice(e,r)}return new Promise((function(r,n){t.mediaDevices.getUserMedia(i).then((function(e){t._gotStream(e),r(e)})).catch((function(i){setTimeout((function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch((function(){n(i)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(e){if("srcObject"in this.videoElement)this.videoElement.srcObject=e;else{var t=this.windowURL.createObjectURL(e);this.videoElement.src=t}}},{key:"_setSettings",value:function(e){this.settings=null;var t=e&&e.getTracks?e.getTracks():[];t.length>0&&t[0].getSettings&&(this.settings=t[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var e=this;return new Promise((function(t,i){var r=[];e.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.deviceId&&r.push(e)})),t(r)})).catch((function(e){i(e)}))}))}},{key:"_gotStream",value:function(e){this.stream=e,this._setSettings(e),this._setVideoSrc(e)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var e=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var t={video:!0};return e.mediaDevices.getUserMedia(t).then((function(e){setTimeout((function(){e.getTracks().forEach((function(e){e.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return e._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(e,t){var i=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return i._getStreamDevice(e,t)}))}},{key:"startCameraMaxResolution",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return e._getStreamDeviceMaxResolution(t)}))}},{key:"getDataUri",value:function(e){var t={sizeFactor:void 0===e.sizeFactor?a.c:e.sizeFactor,imageType:void 0===e.imageType?s:e.imageType,imageCompression:void 0===e.imageCompression?a.a:e.imageCompression,isImageMirror:void 0===e.isImageMirror?a.b:e.isImageMirror};return n.a.getDataUri(this.videoElement,t)}},{key:"stopCamera",value:function(){var e=this;return new Promise((function(t,i){e.stream&&(e.stream.getTracks().forEach((function(e){e.stop()})),e.videoElement.src="",e.stream=null,e._setSettings(null),t()),i(Error("no stream to stop!"))}))}}]),e}()},function(e,t,i){i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return a}));var r=1,n=null,a=!1},function(e,t,i){var r=i(10);i.d(t,"a",(function(){return r.a}))},function(e,t,i){function r(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(t.length),n=new Uint8Array(r),a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return new Blob([r],{type:i})}function n(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function a(e){var t=d.c.PNG;return"image/jpeg"===e&&(t=d.c.JPG),t}function o(e,t,i){return e+"-"+n(t,4)+"."+a(i)}function s(e,t,i){window.URL=window.webkitURL||window.URL;var r=document.createElement("a");r.download=o(t,i,e.type),r.href=window.URL.createObjectURL(e);var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(r(e),t,i)}t.a=c;var d=i(0)}]);var Us=Y(Ls);class qs{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return qs.instance||(qs.instance=new qs),qs.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((e=>"live"===e.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((e=>e.stop())),this.currentStream=null)}areConstraintsEqual(e){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(e)}async startNewStream(e){this.isStreaming()&&this.areConstraintsEqual(e)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(e),this.currentConstraints=e)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(e){throw console.error("Failed to enumerate devices:",e),e}}}const Ks=[{os:{name:"Android"},label:"2 0"}];async function Hs(){const e=(await async function(){const e=qs.getInstance();let t=await e.enumerateDevices();return t.filter((e=>"videoinput"===e.kind)).every((e=>""===e.label))&&(await e.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),t=await e.enumerateDevices(),e.stopStream()),t}()).filter((e=>{if(!(null==e?void 0:e.label)||"videoinput"!==e.kind||""===e.label)return!1;const t=e.label.toLowerCase();return Vs.some((e=>t.includes(e)))})),t=ya.UAParser(),i=e.find((e=>Ks.find((i=>i.os.name===t.os.name&&e.label.includes(i.label)))));return i?{optionalCameras:e,selectedCamera:i}:{optionalCameras:e}}const Vs=["rear","back","rück","arriĆØre","trasera","trĆ”s","traseira","posteriore","后面","後面","čƒŒé¢","åŽē½®","後置","背置","заГней","Ų§Ł„Ų®Ł„ŁŁŠŲ©","후","arka","achterzijde","หคัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","Ļ€ĪÆĻƒĻ‰","spate","hĆ”tsó","zadnĆ­","darrere","zadnĆ”","Š·Š°Š“Š½Ń","stražnja","belakang","ą¤¬ą„ˆą¤•","camera2 0, facing back"],$s={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Js={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Gs=async e=>{var t,i;let r;return"environment"==e&&(r=await Hs()),null!==(i=null===(t=null==r?void 0:r.selectedCamera)||void 0===t?void 0:t.deviceId)&&void 0!==i?i:e},Ws=(e,t)=>{var i,r;return"user"===e?null!==(i=null==t?void 0:t.selfieVideoConstraints)&&void 0!==i?i:Js:null!==(r=null==t?void 0:t.environmentVideoConstraints)&&void 0!==r?r:$s},Zs=e=>{const t=Ds({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return t.style.transform="user"===e?"scaleX(-1)":"",t.autoplay=!0,t.muted=!0,t.setAttribute("playsinline","true"),t},Ys={title:"other_error_code_title",message:"other_error_code_message"},Qs={ok:Ys,document_face_not_found:Ys,restricted_criteria:Ys,other:Ys,glare:{title:"glare_title",message:"glare_message"},document_not_found:{title:"document_not_found_title",message:"document_not_found_message"},blur:{title:"blur_title",message:"blur_message"},document_not_supported:{title:"document_not_supported_title",message:"document_not_supported_message"},obstructed:{title:"obstructed_title",message:"obstructed_message"},document_not_matching:{title:"document_not_matching_title",message:"document_not_matching_message"},face_not_found:{title:"face_not_found_title",message:"face_not_found_message"},wrong_document_side:{title:"wrong_document_side_title",message:"wrong_document_side_message"},glare_selfie:{title:"glare_selfie_title",message:"glare_selfie_message"},blur_selfie:{title:"blur_selfie_title",message:"blur_selfie_message"},multi_face:{title:"multi_face_title",message:"multi_face_message"},face_rotated:{title:"face_rotated_title",message:"face_rotated_message"},face_too_small:{title:"face_too_small_title",message:"face_too_small_message"},face_too_close:{title:"face_too_close_title",message:"face_too_close_message"},closed_eyes:{title:"closed_eyes_title",message:"closed_eyes_message"},face_angle_too_large:{title:"face_angle_too_large_title",message:"face_angle_too_large_message"},face_close_to_border:{title:"face_close_to_border_title",message:"face_close_to_border_message"},face_occluded:{title:"face_occluded_title",message:"face_occluded_message"},face_cropped:{title:"face_cropped_title",message:"face_cropped_message"},barcode_not_found:{title:"barcode_not_found_title",message:"barcode_not_found_message"}},Xs={loading_screen:{page:"page_header_document",title:"main_title_document_front",instructions:"loading_screen_small_title"},document_front:{page:"page_header_document",title:"main_title_document_front",instructions:"second_title_document_front"},document_back:{page:"page_header_document",title:"main_title_document_back",instructions:"second_title_document_back"},selfie:{page:"page_header_face",title:"main_title_document_face",instructions:"second_title_document_face"}},ec=(e,t)=>{const i=Ds({tagName:"div",style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative",zIndex:"1",background:"transparent",boxShadow:"0 0 0 1000px rgb(0 0 0 / 50%)",borderStyle:"solid",borderWidth:"1px",borderColor:"white"},id:`overlay-frame ${e}`,testid:`overlay-frame ${e}`});if("environment"===e){!function(e){Ts(e,Ds({tagName:"div",style:{position:"absolute",top:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-left",testid:"overlay-frame__top-left"})),Ts(e,Ds({tagName:"div",style:{position:"absolute",top:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-right",testid:"overlay-frame__top-right"})),Ts(e,Ds({tagName:"div",style:{position:"absolute",bottom:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-right",testid:"overlay-frame__bottom-right"})),Ts(e,Ds({tagName:"div",style:{position:"absolute",bottom:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"solid",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-left",testid:"overlay-frame__bottom-left"}))}(i);const e=.85*t.clientWidth;i.style.width=`${e}px`,i.style.height=.65*e+"px",i.style.maxHeight=.5*window.innerHeight+"px"}else{const e=t.clientWidth*(t.clientHeight<700?.8:.85);i.style.width=.8*e+"px",i.style.height=`${e}px`,i.style.minHeight=.8*e+"px",i.style.maxHeight=.5*window.innerHeight+"px",i.style.borderRadius="50%"}return i};const tc=e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 68 68"),t.innerHTML=`<style>.spinner-autocapture circle {animation: rotate 1.5s linear infinite;} @keyframes rotate { 50% {stroke-dashoffset: 94; stroke-dasharray: 6 57; } 100% { stroke-dashoffset: 188; stroke-dasharray: 51 12; }} </style> <g class="spinner-autocapture"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="${null!=e?e:"#fff"}" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>`,t};function ic(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","16px"),e.setAttribute("height","16px"),e.innerHTML='\n <path d="M8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16ZM8 4C8.41562 4 8.75 4.33437 8.75 4.75V8.25C8.75 8.66562 8.41562 9 8 9C7.58437 9 7.25 8.66562 7.25 8.25V4.75C7.25 4.33437 7.58437 4 8 4ZM9 11C9 11.5531 8.55313 12 8 12C7.44688 12 7 11.5531 7 11C7 10.4469 7.44688 10 8 10C8.55313 10 9 10.4469 9 11Z" fill="#F2F2F2"/>\n ',e}const rc={all:{color:"black",margin:"0"},1:{color:"white",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-bold)"},2:{color:"white",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)"},3:{color:"white",fontSize:"var(--font-size-xl)",fontWeight:"var(--font-weight-medium)"},4:{fontSize:"var(--font-size-lg)",fontWeight:"var(--font-weight-regular)"},5:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-light)"},6:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-light)"}},nc=e=>{let{text:i,level:r=1,style:n={},id:a,testid:o}=e;const s=Ds({tagName:`h${r}`,style:t(t(t({},rc.all),rc[r]),n),id:a,testid:o});return s.textContent=i,s.id=a,s};var ac,oc={};let sc=null;try{sc=(ac||(ac=1,function(e){function i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const a={exec:()=>null};function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="string"==typeof e?e:e.source;const r={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(s.caret,"$1"),i=i.replace(e,n),r},getRegex:()=>new RegExp(i,t)};return r}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,d=/(?:[*+-]|\d{1,9}[.)])/,u=o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,d).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),l=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,d).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,b=o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v=o(l).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),y={blockquote:o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",v).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:c,html:b,lheading:u,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:v,table:a,text:/^[^\n]+/},_=o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),w=t(t({},y),{},{table:_,paragraph:o(l).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),x=t(t({},y),{},{html:o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:o(l).replace("hr",c).replace("heading"," *#{1,6} *[^\n]").replace("lheading",u).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,E=/^( {2,}|\\)\n(?!\s*$)/,S="\\p{P}\\p{S}",k=o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,S).getRegex(),M=o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,S).getRegex(),C=o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,S).getRegex(),I=o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,S).getRegex(),D=o(/\\([punct])/,"gu").replace(/punct/g,S).getRegex(),T=o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),R=o(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),z=o("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",R).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),B=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",B).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O=o(/^!?\[(label)\]\[(ref)\]/).replace("label",B).replace("ref",h).getRegex(),F=o(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),N={_backpedal:a,anyPunctuation:D,autolink:T,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:E,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:a,emStrongLDelim:M,emStrongRDelimAst:C,emStrongRDelimUnd:I,escape:A,link:P,nolink:F,punctuation:k,reflink:O,reflinkSearch:o("reflink|nolink(?!\\()","g").replace("reflink",O).replace("nolink",F).getRegex(),tag:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:a},L=t(t({},N),{},{link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",B).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B).getRegex()}),j=t(t({},N),{},{escape:o(A).replace("])","~|])").getRegex(),url:o(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),U=t(t({},j),{},{br:o(E).replace("{2,}","*").getRegex(),text:o(j.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),q={normal:y,gfm:w,pedantic:x},K={normal:N,gfm:j,breaks:U,pedantic:L},H={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},V=e=>H[e];function $(e,t){if(t){if(s.escapeTest.test(e))return e.replace(s.escapeReplace,V)}else if(s.escapeTestNoEncode.test(e))return e.replace(s.escapeReplaceNoEncode,V);return e}function J(e){try{e=encodeURI(e).replace(s.percentDecode,"%")}catch(e){return null}return e}function G(e,t){const i=e.replace(s.findPipe,((e,t,i)=>{let r=!1,n=t;for(;--n>=0&&"\\"===i[n];)r=!r;return r?"|":" |"})).split(s.splitPipe);let r=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(s.slashPipe,"|");return i}function W(e,t,i){const r=e.length;if(0===r)return"";let n=0;for(;n<r;){const a=e.charAt(r-n-1);if(a!==t||i){if(a===t||!i)break;n++}else n++}return e.slice(0,r-n)}function Z(e,t,i,r,n){const a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:i,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,e}return{type:"image",raw:i,href:a,title:o,text:s}}class Y{constructor(t){r(this,"options",void 0),r(this,"rules",void 0),r(this,"lexer",void 0),this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:W(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t,i){const r=e.match(i.other.indentCodeCompensation);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(i.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=W(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:W(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=W(t[0],"\n").split("\n"),i="",r="";const n=[];for(;e.length>0;){let t=!1;const a=[];let o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else{if(t)break;a.push(e[o])}e=e.slice(o);const s=a.join("\n"),c=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${s}`:s,r=r?`${r}\n${c}`:c;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,n,!0),this.lexer.state.top=d,0===e.length)break;const u=n[n.length-1];if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){const t=u,a=t.raw+"\n"+e.join("\n"),o=this.blockquote(a);n[n.length-1]=o,i=i.substring(0,i.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if("list"!==(null==u?void 0:u.type));else{const t=u,a=t.raw+"\n"+e.join("\n"),o=this.list(a);n[n.length-1]=o,i=i.substring(0,i.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(n[n.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:n,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const r=i.length>1,n={type:"list",raw:"",ordered:r,start:r?+i.slice(0,-1):"",loose:!1,items:[]};i=r?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=r?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let o=!1;for(;e;){let i=!1,r="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),d=e.split("\n",1)[0],u=!c.trim(),l=0;if(this.options.pedantic?(l=2,s=c.trimStart()):u?l=t[1].length+1:(l=t[2].search(this.rules.other.nonSpaceChar),l=l>4?1:l,s=c.slice(l),l+=t[1].length),u&&this.rules.other.blankLine.test(d)&&(r+=d+"\n",e=e.substring(d.length+1),i=!0),!i){const t=this.rules.other.nextBulletRegex(l),i=this.rules.other.hrRegex(l),n=this.rules.other.fencesBeginRegex(l),a=this.rules.other.headingBeginRegex(l),o=this.rules.other.htmlBeginRegex(l);for(;e;){const h=e.split("\n",1)[0];let f;if(d=h,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),f=d):f=d.replace(this.rules.other.tabCharGlobal," "),n.test(d))break;if(a.test(d))break;if(o.test(d))break;if(t.test(d))break;if(i.test(d))break;if(f.search(this.rules.other.nonSpaceChar)>=l||!d.trim())s+="\n"+f.slice(l);else{if(u)break;if(c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(n.test(c))break;if(a.test(c))break;if(i.test(c))break;s+="\n"+d}u||d.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),c=f.slice(l)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:r,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),n.raw+=r}n.items[n.items.length-1].raw=n.items[n.items.length-1].raw.trimEnd(),n.items[n.items.length-1].text=n.items[n.items.length-1].text.trimEnd(),n.raw=n.raw.trimEnd();for(let e=0;e<n.items.length;e++)if(this.lexer.state.top=!1,n.items[e].tokens=this.lexer.blockTokens(n.items[e].text,[]),!n.loose){const t=n.items[e].tokens.filter((e=>"space"===e.type)),i=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));n.loose=i}if(n.loose)for(let e=0;e<n.items.length;e++)n.items[e].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const i=G(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]&&t[3].trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===r.length){for(const e of r)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<i.length;e++)a.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:a.align[e]});for(const e of n)a.rows.push(G(e,a.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=W(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&(i--,i<0))return r;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i.slice(1):i.slice(1,-1)),Z(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return Z(i,e,i[0],this.lexer,this.rules)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...r[0]].length-1;let n,a,o=i,s=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=c.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(a=[...n].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&i%3&&!((i+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...r[0]][0].length,c=e.slice(0,i+r.index+t+a);if(Math.min(i,a)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const d=c.slice(2,-2);return{type:"strong",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let a;do{var i,r;a=t[0],t[0]=null!==(i=null===(r=this.rules.inline._backpedal.exec(t[0]))||void 0===r?void 0:r[0])&&void 0!==i?i:""}while(a!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class Q{constructor(t){r(this,"tokens",void 0),r(this,"options",void 0),r(this,"state",void 0),r(this,"tokenizer",void 0),r(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new Y,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:s,block:q.normal,inline:K.normal};this.options.pedantic?(i.block=q.pedantic,i.inline=K.pedantic):this.options.gfm&&(i.block=q.gfm,this.options.breaks?i.inline=K.breaks:i.inline=K.gfm),this.tokenizer.rules=i}static get rules(){return{block:q,inline:K}}static lex(e,t){return new Q(t).lex(e)}static lexInline(e,t){return new Q(t).inlineTokens(e)}lex(e){e=e.replace(s.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e){let t,i,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(t=i.call({lexer:this},e,n))&&(e=e.substring(t.raw.length),n.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&n.length>0?n[n.length-1].raw+="\n":n.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=n[n.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?n.push(t):(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=n[n.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(i.raw+="\n"+t.raw,i.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),n.push(t);else{var o;if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))i=n[n.length-1],a&&"paragraph"===(null===(o=i)||void 0===o?void 0:o.type)?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=n[n.length-1],i&&"text"===i.type?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,n}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,i,r,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,n.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(t=i.call({lexer:this},e,s))&&(e=e.substring(t.raw.length),s.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),i=s[s.length-1],s.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),i=s[s.length-1],i&&"text"===t.type&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(t=this.tokenizer.emStrong(e,c,o))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),s.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(o=t.raw.slice(-1)),a=!0,i=s[s.length-1],i&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),s.push(t);return s}}class X{constructor(t){r(this,"options",void 0),r(this,"parser",void 0),this.options=t||e.defaults}space(e){return""}code(e){var t;let{text:i,lang:r,escaped:n}=e;const a=null===(t=(r||"").match(s.notSpaceStart))||void 0===t?void 0:t[0],o=i.replace(s.endingNewline,"")+"\n";return a?'<pre><code class="language-'+$(a)+'">'+(n?o:$(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:$(o,!0))+"</code></pre>\n"}blockquote(e){let{tokens:t}=e;return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:i}=e;return`<h${i}>${this.parser.parseInline(t)}</h${i}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,i=e.start;let r="";for(let t=0;t<e.items.length;t++){const i=e.items[t];r+=this.listitem(i)}const n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+r+"</"+n+">\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+$(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox(e){let{checked:t}=e;return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){let{tokens:t}=e;return`<p>${this.parser.parseInline(t)}</p>\n`}table(e){let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.tablecell(e.header[t]);t+=this.tablerow({text:i});let r="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];i="";for(let e=0;e<n.length;e++)i+=this.tablecell(n[e]);r+=this.tablerow({text:i})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow(e){let{text:t}=e;return`<tr>\n${t}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>\n`}strong(e){let{tokens:t}=e;return`<strong>${this.parser.parseInline(t)}</strong>`}em(e){let{tokens:t}=e;return`<em>${this.parser.parseInline(t)}</em>`}codespan(e){let{text:t}=e;return`<code>${$(t,!0)}</code>`}br(e){return"<br>"}del(e){let{tokens:t}=e;return`<del>${this.parser.parseInline(t)}</del>`}link(e){let{href:t,title:i,tokens:r}=e;const n=this.parser.parseInline(r),a=J(t);if(null===a)return n;let o='<a href="'+(t=a)+'"';return i&&(o+=' title="'+$(i)+'"'),o+=">"+n+"</a>",o}image(e){let{href:t,title:i,text:r}=e;const n=J(t);if(null===n)return $(r);let a=`<img src="${t=n}" alt="${r}"`;return i&&(a+=` title="${$(i)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$(e.text)}}class ee{strong(e){let{text:t}=e;return t}em(e){let{text:t}=e;return t}codespan(e){let{text:t}=e;return t}del(e){let{text:t}=e;return t}html(e){let{text:t}=e;return t}text(e){let{text:t}=e;return t}link(e){let{text:t}=e;return""+t}image(e){let{text:t}=e;return""+t}br(){return""}}class te{constructor(t){r(this,"options",void 0),r(this,"renderer",void 0),r(this,"textRenderer",void 0),this.options=t||e.defaults,this.options.renderer=this.options.renderer||new X,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ee}static parse(e,t){return new te(t).parse(e)}static parseInline(e,t){return new te(t).parseInline(e)}parse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i="";for(let r=0;r<e.length;r++){const n=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){const e=n,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){i+=t||"";continue}}const a=n;switch(a.type){case"space":i+=this.renderer.space(a);continue;case"hr":i+=this.renderer.hr(a);continue;case"heading":i+=this.renderer.heading(a);continue;case"code":i+=this.renderer.code(a);continue;case"table":i+=this.renderer.table(a);continue;case"blockquote":i+=this.renderer.blockquote(a);continue;case"list":i+=this.renderer.list(a);continue;case"html":i+=this.renderer.html(a);continue;case"paragraph":i+=this.renderer.paragraph(a);continue;case"text":{let n=a,o=this.renderer.text(n);for(;r+1<e.length&&"text"===e[r+1].type;)n=e[++r],o+="\n"+this.renderer.text(n);i+=t?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let r=0;r<e.length;r++){const n=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){const e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=e||"";continue}}const a=n;switch(a.type){case"escape":case"text":i+=t.text(a);break;case"html":i+=t.html(a);break;case"link":i+=t.link(a);break;case"image":i+=t.image(a);break;case"strong":i+=t.strong(a);break;case"em":i+=t.em(a);break;case"codespan":i+=t.codespan(a);break;case"br":i+=t.br(a);break;case"del":i+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}}class ie{constructor(t){r(this,"options",void 0),r(this,"block",void 0),this.options=t||e.defaults}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Q.lex:Q.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}r(ie,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class re{constructor(){r(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),r(this,"options",this.setOptions),r(this,"parse",this.parseMarkdown(!0)),r(this,"parseInline",this.parseMarkdown(!1)),r(this,"Parser",te),r(this,"Renderer",X),r(this,"TextRenderer",ee),r(this,"Lexer",Q),r(this,"Tokenizer",Y),r(this,"Hooks",ie),this.use(...arguments)}walkTokens(e,t){let i=[];for(const n of e)switch(i=i.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;i=i.concat(this.walkTokens(e.items,t));break}default:{var r;const e=n;null!==(r=this.defaults.extensions)&&void 0!==r&&null!==(r=r.childTokens)&&void 0!==r&&r[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const n=e[r].flat(1/0);i=i.concat(this.walkTokens(n,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return r.forEach((i=>{const r=t({},i);if(r.async=this.defaults.async||r.async||!1,i.extensions&&(i.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const i=e.renderers[t.name];e.renderers[t.name]=i?function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=t.renderer.apply(this,r);return!1===a&&(a=i.apply(this,r)),a}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const i=e[t.level];i?i.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),i.renderer){const e=this.defaults.renderer||new X(this.defaults);for(const t in i.renderer){if(!(t in e))throw new Error(`renderer '${t}' does not exist`);if(["options","parser"].includes(t))continue;const r=t,n=i.renderer[r],a=e[r];e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o||""}}r.renderer=e}if(i.tokenizer){const e=this.defaults.tokenizer||new Y(this.defaults);for(const t in i.tokenizer){if(!(t in e))throw new Error(`tokenizer '${t}' does not exist`);if(["options","rules","lexer"].includes(t))continue;const r=t,n=i.tokenizer[r],a=e[r];e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}r.tokenizer=e}if(i.hooks){const e=this.defaults.hooks||new ie;for(const t in i.hooks){if(!(t in e))throw new Error(`hook '${t}' does not exist`);if(["options","block"].includes(t))continue;const r=t,n=i.hooks[r],a=e[r];ie.passThroughHooks.has(t)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(n.call(e,t)).then((t=>a.call(e,t)));const i=n.call(e,t);return a.call(e,i)}:e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}r.hooks=e}if(i.walkTokens){const e=this.defaults.walkTokens,t=i.walkTokens;r.walkTokens=function(i){let r=[];return r.push(t.call(this,i)),e&&(r=r.concat(e.call(this,i))),r}}this.defaults=t(t({},this.defaults),r)})),this}setOptions(e){return this.defaults=t(t({},this.defaults),e),this}lexer(e,t){return Q.lex(e,null!=t?t:this.defaults)}parser(e,t){return te.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(i,r)=>{const n=t({},r),a=t(t({},this.defaults),n),o=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===n.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==i)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof i)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const s=a.hooks?a.hooks.provideLexer():e?Q.lex:Q.lexInline,c=a.hooks?a.hooks.provideParser():e?te.parse:te.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(i):i).then((e=>s(e,a))).then((e=>a.hooks?a.hooks.processAllTokens(e):e)).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>c(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(o);try{a.hooks&&(i=a.hooks.preprocess(i));let e=s(i,a);a.hooks&&(e=a.hooks.processAllTokens(e)),a.walkTokens&&this.walkTokens(e,a.walkTokens);let t=c(e,a);return a.hooks&&(t=a.hooks.postprocess(t)),t}catch(e){return o(e)}}}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+$(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const ne=new re;function ae(e,t){return ne.parse(e,t)}ae.options=ae.setOptions=function(e){return ne.setOptions(e),ae.defaults=ne.defaults,n(ae.defaults),ae},ae.getDefaults=i,ae.defaults=e.defaults,ae.use=function(){return ne.use(...arguments),ae.defaults=ne.defaults,n(ae.defaults),ae},ae.walkTokens=function(e,t){return ne.walkTokens(e,t)},ae.parseInline=ne.parseInline,ae.Parser=te,ae.parser=te.parse,ae.Renderer=X,ae.TextRenderer=ee,ae.Lexer=Q,ae.lexer=Q.lex,ae.Tokenizer=Y,ae.Hooks=ie,ae.parse=ae;const oe=ae.options,se=ae.setOptions,ce=ae.use,de=ae.walkTokens,ue=ae.parseInline,le=ae,he=te.parse,fe=Q.lex;e.Hooks=ie,e.Lexer=Q,e.Marked=re,e.Parser=te,e.Renderer=X,e.TextRenderer=ee,e.Tokenizer=Y,e.getDefaults=i,e.lexer=fe,e.marked=ae,e.options=oe,e.parse=le,e.parseInline=ue,e.parser=he,e.setOptions=se,e.use=ce,e.walkTokens=de}(oc)),oc).marked}catch(e){console.log("marked is not supported",e)}const cc=sc,dc=e=>{let{text:t,id:i,testid:r,clientHeight:n}=e;const a=!!n&&n<700,o=Ds({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:a?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:i,testid:r});return Ts(o,nc({text:t,level:a?6:5,style:{color:"white"}})),o};const uc=e=>{const t=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","270"),e.setAttribute("height","175"),e.setAttribute("viewBox","40 60 250 140"),e.innerHTML='\n <g transform="matrix(1,0,0,1,0,0)"><g id="12" opacity="1" style="mix-blend-mode:normal"><g><defs><clipPath id="12_clipPath" x="-50%" y="-50%" width="200%" height="200%"><path d="M0,260v-260h333v260z" fill="white" clip-rule="nonzero"></path></clipPath></defs><g clip-path="url(#12_clipPath)"><g transform="matrix(1,0,0,1,48,60)"><g id="83287" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83288" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83288_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij3rlyasnggflf" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83288_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij3rlyasnggflf)"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116.5)"><g id="83289" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83289_fill_path" d="M135,0l-135,23.5h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,2)"><g id="83290" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83290_fill_path" d="M0,2c0,-1 1,-2 2,-2h228c1,0 2,1 2,2v18h-232z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,228.54000000000002,62.99940000000001)"><g id="83291" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83291_fill_path" d="M227,-0.00002l-227,60.99934l226.99998,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,42)"><g id="83292" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83292_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h109c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,143,42)"><g id="83293" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83293_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h65c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,58)"><g id="83294" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83294_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,58)"><g id="83295" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83295_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,194,58)"><g id="83296" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83296_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h14c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,74)"><g id="83297" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83297_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h83c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,117,74)"><g id="83298" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83298_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,165,74)"><g id="83299" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83299_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h43c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,68,92)"><g id="83300" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83300_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,74,92)"><g id="83301" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83301_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,80,92)"><g id="83302" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83302_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,86,92)"><g id="83303" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83303_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,92,92)"><g id="83304" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83304_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,98,92)"><g id="83305" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83305_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,104,92)"><g id="83306" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83306_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,110,92)"><g id="83307" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83307_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,116,92)"><g id="83308" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83308_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,122,92)"><g id="83309" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83309_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,128,92)"><g id="83310" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83310_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,134,92)"><g id="83311" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83311_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,140,92)"><g id="83312" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83312_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,146,92)"><g id="83313" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83313_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,152,92)"><g id="83314" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83314_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,158,92)"><g id="83315" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83315_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,164,92)"><g id="83316" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83316_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,170,92)"><g id="83317" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83317_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116)"><g id="83318" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83318_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,21)"><g id="83320" opacity="0.2" style="mix-blend-mode:normal"><g><g><path id="83320_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g><g transform="matrix(1,0,0,1,48,60)"><g id="83268" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83269" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83269_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij4hmxrv43iz67" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83269_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4hmxrv43iz67)"></path></g></g></g></g><g transform="matrix(1,0,0,1,196,100)"><g id="83270" opacity="0.4" style="mix-blend-mode:normal"><g><g><defs><clipPath id="ligziij4roiiqcgytn" clipPathUnits="userSpaceOnUse"><path d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z"></path></clipPath></defs><path id="83270_stroke_path" d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="10" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4roiiqcgytn)"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,98)"><g id="83271" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83271_fill_path" d="M135,0l-135,40h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,1,1)"><g id="83272" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83272_fill_path" d="M0,2c0,-1 1,-2 2,-2h229c1,0 2,1 2,2v18h-233z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,42,74.4508)"><g id="83273" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83273_fill_path" d="M18.00001,0h-8c-5.5225,0 -10.00001,4.47496 -10.00001,9.99992c0,1.09999 0.895,1.99998 2,1.99998h24.00002c1.1045,0 2,-0.89549 2,-1.99998c0,-5.52496 -4.475,-9.99992 -10.00001,-9.99992z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,47.5999,54.4509)"><g id="83274" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83274_fill_path" d="M17.306,8.653c0,0.9077 -0.1428,1.8102 -0.4232,2.6738c-0.2804,0.8636 -0.6957,1.6778 -1.2296,2.4124c-0.5339,0.7346 -1.1794,1.3801 -1.914,1.914c-0.7346,0.5339 -1.5488,0.9492 -2.4124,1.2296c-0.8636,0.2804 -1.7661,0.4232 -2.6738,0.4232c-0.9077,0 -1.8102,-0.1428 -2.6738,-0.4232c-0.8636,-0.2804 -1.6778,-0.6957 -2.4124,-1.2296c-0.7346,-0.5339 -1.3801,-1.1794 -1.914,-1.914c-0.5339,-0.7346 -0.9492,-1.5488 -1.2296,-2.4124c-0.2804,-0.8636 -0.4232,-1.7661 -0.4232,-2.6738c0,-0.9077 0.1428,-1.8102 0.4232,-2.6738c0.2804,-0.8636 0.6957,-1.6778 1.2296,-2.4124c0.5339,-0.7346 1.1794,-1.3801 1.914,-1.914c0.7346,-0.5339 1.5488,-0.9492 2.4124,-1.2296c0.8636,-0.2804 1.7661,-0.4232 2.6738,-0.4232c0.9077,0 1.8102,0.1428 2.6738,0.4232c0.8636,0.2804 1.6778,0.6957 2.4124,1.2296c0.7346,0.5339 1.3801,1.1794 1.914,1.914c0.5339,0.7346 0.9492,1.5488 1.2296,2.4124c0.2804,0.8636 0.4232,1.7661 0.4232,2.6738z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,32,48)"><g id="83275" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83275_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83275_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,-1,1,6.123233995736766e-17,32,94)"><g id="83276" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83276_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83276_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(-1,2.4492935982947064e-16,-2.4492935982947064e-16,-1,79,94)"><g id="83277" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83277_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83277_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,79,48)"><g id="83278" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83278_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83278_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,47)"><g id="83279" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83279_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,47)"><g id="83280" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83280_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,67)"><g id="83281" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83281_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,67)"><g id="83282" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83282_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,87)"><g id="83283" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83283_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,87)"><g id="83284" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83284_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h51c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,137,9)"><g id="83285" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83285_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,92.4999,98.9985)"><g id="83286" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83286_fill_path" d="M90.49994,0l-90.49994,96.99852l90.49994,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,0,20)"><g id="83319" opacity="0" style="mix-blend-mode:normal"><g><g><path id="83319_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g></g></g></g></g><animateTransform href="#83287" attributeName="transform" type="translate" values="118 70;118 70;118 70;118 70;118 70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="scale" values="0 1;0 1;1.02 1;1 1;1 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="translate" values="-118 -70;-118 -70;-118 -70;-118 -70;-118 -70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="0 0;0 0;9.018099999999999 -4;9.018099999999999 -4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.42 0 0.15 1;0.42 0 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="113.5 30.4997;113.5 30.4997;113.5 30.4997;113.5 30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="scale" values="-1 -1;-1 -1;-0.88 -0.88;-0.88 -0.88" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animate href="#83320" attributeName="opacity" values="0.2;0.2;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.39;0.43;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate><animateTransform href="#83268" attributeName="transform" type="translate" values="117 75;117 75;117 75;117 75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="scale" values="1 1;1 1;0 1;0 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="translate" values="-117 -75;-117 -75;-117 -75;-117 -75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animate href="#83271_fill_path" attributeName="d" values="M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,-0.0042l-135.0142,40.0042h135.0142z;M135,-0.0364l-135.1228,40.0364h135.1228z;M135,-0.0975l-135.3292,40.0975h135.3292z;M135,-0.1848l-135.6236,40.1848h135.6236z;M135,-0.2958l-135.9982,40.2958h135.9982z;M135,-0.4285l-136.4462,40.4285h136.4462z;M135,-0.5812l-136.9617,40.5812h136.9617z;M135,-0.7525l-137.5397,40.7525h137.5397z;M135,-0.941l-138.176,40.941h138.176z;M135,-1.1457l-138.8667,41.1457h138.8667z;M135,-1.3655l-139.6085,41.3655h139.6085z;M135,-1.5996l-140.3986,41.5996h140.3986z;M135,-1.8472l-141.2343,41.8472h141.2343z;M135,-2.1077l-142.1134,42.1077h142.1134z;M135,-2.3804l-143.0339,42.3804h143.0339z;M135,-2.6649l-143.994,42.6649h143.994z;M135,-2.9607l-144.9922,42.9607h144.9922z;M135,-3.2673l-146.0272,43.2673h146.0272z;M135,-3.5846l-147.0978,43.5846h147.0978z;M135,-3.9121l-148.2031,43.9121h148.2031z;M135,-4.2497l-149.3424,44.2497h149.3424z;M135,-4.5972l-150.5153,44.5972h150.5153z;M135,-4.9545l-151.7213,44.9545h151.7213z;M135,-5.3218l-152.9607,45.3218h152.9607z;M135,-5.6991l-154.2341,45.6991h154.2341z;M135,-6.0868l-155.5427,46.0868h155.5427z;M135,-6.4858l-156.8893,46.4858h156.8893z;M135,-6.898l-158.2804,46.898h158.2804z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z" dur="2.6s" repeatCount="indefinite" keyTimes="0;0.007692307692307693;0.015384615384615385;0.023076923076923078;0.03076923076923077;0.038461538461538464;0.046153846153846156;0.05384615384615385;0.06153846153846154;0.06923076923076923;0.07692307692307693;0.08461538461538462;0.09230769230769231;0.1;0.1076923076923077;0.11538461538461539;0.12307692307692308;0.13076923076923078;0.13846153846153847;0.14615384615384616;0.15384615384615385;0.16153846153846155;0.16923076923076924;0.17692307692307693;0.18461538461538463;0.19230769230769232;0.2;0.2076923076923077;0.2153846153846154;0.2230769230769231;0.23076923076923078;0.23846153846153847;0.24615384615384617;0.25384615384615383;0.26153846153846155;0.2692307692307692;0.27692307692307694;0.2846153846153846;0.2923076923076923;0.3;0.3076923076923077;0.3153846153846154;0.3230769230769231;0.33076923076923076;0.3384615384615385;0.34615384615384615;0.35384615384615387;0.36153846153846153;0.36923076923076925;0.3769230769230769;0.38461538461538464;0.3923076923076923;0.4;0.4076923076923077;0.4153846153846154;0.4230769230769231;0.4307692307692308;0.43846153846153846;0.4461538461538462;0.45384615384615384;0.46153846153846156;0.46923076923076923;0.47692307692307695;0.4846153846153846;0.49230769230769234;0.5;0.5076923076923077;0.5153846153846153;0.5230769230769231;0.5307692307692308;0.5384615384615384;0.5461538461538461;0.5538461538461539;0.5615384615384615;0.5692307692307692;0.5769230769230769;0.5846153846153846;0.5923076923076923;0.6;0.6076923076923076;0.6153846153846154;0.6230769230769231;0.6307692307692307;0.6384615384615384;0.6461538461538462;0.6538461538461539;0.6615384615384615;0.6692307692307692;0.676923076923077;0.6846153846153846;0.6923076923076923;0.7;0.7076923076923077;0.7153846153846154;0.7230769230769231;0.7307692307692307;0.7384615384615385;0.7461538461538462;0.7538461538461538;0.7615384615384615;0.7692307692307693;0.7769230769230769;0.7846153846153846;0.7923076923076923;0.8;0.8076923076923077;0.8153846153846154;0.823076923076923;0.8307692307692308;0.8384615384615385;0.8461538461538461;0.8538461538461538;0.8615384615384616;0.8692307692307693;0.8769230769230769;0.8846153846153846;0.8923076923076924;0.9;0.9076923076923077;0.9153846153846154;0.9230769230769231;0.9307692307692308;0.9384615384615385;0.9461538461538461;0.9538461538461539;0.9615384615384616;0.9692307692307692;0.9769230769230769;0.9846153846153847;0.9923076923076923;1" fill="freeze"></animate><animateTransform href="#83285" attributeName="transform" type="translate" values="88 2;88 2;88 2;88 2;88 2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="scale" values="0.98 1;0.98 1;1 1;0.96 1;0.96 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="translate" values="-88 -2;-88 -2;-88 -2;-88 -2;-88 -2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewX" values="0;0;-4;-4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewY" values="0;0;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animate href="#83319" attributeName="opacity" values="0;0;0.18;0.18" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.31;0.36;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate>\n ',e}();return t.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_back"===e&&(t.style.opacity="1",setTimeout((()=>{t.style.opacity="0"}),5e3)),t};var lc;!function(e){e.INVALID="invalid",e.VALID="valid",e.ACCEPTED="accepted",e.REJECTED="rejected"}(lc||(lc={}));const hc="#ED3232",fc="#01B678",pc="#FFF";const gc=e=>{const t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight;return t.getContext("2d").drawImage(e,0,0,e.videoWidth,e.videoHeight),t};async function mc(e){let{context:t,onDetect:i,frame:r,showError:n,isSelfie:a=!1}=e;const o=t.state.name;if(o===lc.REJECTED){n(function(e){switch(e){case Qo.DOCUMENT_DETECTION:return"searching_document_autocapture";case Qo.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case Qo.BARCODE_DETECTION:return fa.feedback.BARCODE_NOT_FOUND;case Qo.BLUR_DETECTION:return fa.feedback.BLUR;case Qo.GLARE_DETECTION:return fa.feedback.GLARE;case Qo.FACE_DETECTION:return fa.feedback.FACE_NOT_FOUND;case Qo.FACE_POSITION:return fa.feedback.FACE_TOO_SMALL}}(t.invalidFramesCause));bc("border-color",t.invalidFramesCause===Qo.DOCUMENT_DETECTION?pc:hc)}if(o===lc.VALID)if(a){bc("border-color",fc);n(`capturing_face_autocapture${Math.ceil((t.validFramesThreshold-t.validFramesCounter)/t.validFramesThreshold*3)}`)}else n("capturing_in_progress_message"),bc("border-color",pc);o===lc.ACCEPTED&&(bc("border-color",pc),n(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await i({frame:r,suspendedPreview:!0,context:t}))}function bc(e,t){document.querySelectorAll('[id^="overlay-frame"]').forEach((i=>{i.style[e]=t}))}function vc(e){let t,i,r,{captureFrame:n,object:a,videoWidth:o,videoHeight:s,deviceWidth:c,deviceHeight:d,threshold:u,iouThreshold:l=.85}=e;if(o/s>=c/d){r=d/s;const e=(o*r-c)/2;t=a.x*r-e,i=a.y*r}else{r=c/o;const e=(s*r-d)/2;t=a.x*r,i=a.y*r-e}const h=t+a.width*r,f=i+a.height*r;!function(e,t,i,r){var n,a;if(null===(a=null===(n=Yo.state.autoCaptureSettings)||void 0===n?void 0:n.settings)||void 0===a?void 0:a.debug){const n=document.getElementById("image-preview-section"),a=document.getElementById("rectangle");if(a)a.style.width=`${i}px`,a.style.height=`${r}px`,a.style.left=`${e}px`,a.style.top=`${t}px`;else{const a=document.createElement("div");a.id="rectangle",a.style.position="absolute",a.style.border="1px solid yellow",a.style.width=`${i}px`,a.style.height=`${r}px`,a.style.left=`${e}px`,a.style.top=`${t}px`,n.appendChild(a)}}}(t,i,a.width*r,a.height*r);const p=function(e,t){const i=Math.max(e.left,t.left),r=Math.min(e.right,t.right),n=Math.max(e.top,t.top),a=r-i,o=Math.min(e.bottom,t.bottom)-n;if(a<=0||o<=0)return 0;const s=a*o;return s/((e.right-e.left)*(e.bottom-e.top)+(t.right-t.left)*(t.bottom-t.top)-s)}({top:n.top,left:n.left,bottom:n.bottom,right:n.right},{top:i,left:t,bottom:f,right:h}),g=p>l,m=a.width*r*(a.height*r)>u*(n.width*n.height);return g&&m}const yc=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.innerHTML='\n <path d="M10.7202 25.9524C9.81992 25.9524 9.08331 25.2158 9.08331 24.3155V11.2202C9.08331 10.3199 9.81992 9.58333 10.7202 9.58333C11.6205 9.58333 12.3571 10.3199 12.3571 11.2202V20.6938C16.3675 14.0337 23.662 9.58333 32 9.58333C44.6553 9.58333 54.9166 19.8447 54.9166 32.5C54.9166 45.1553 44.6553 55.4167 32 55.4167C23.8257 55.4167 16.654 51.1403 12.5924 44.6949C11.9274 43.631 12.7357 42.3214 13.994 42.3214C14.6079 42.3214 15.1603 42.6488 15.4979 43.1603C18.9968 48.5621 25.0841 52.1429 32 52.1429C42.8445 52.1429 51.6428 43.3445 51.6428 32.5C51.6428 21.6555 42.8445 12.8571 32 12.8571C24.726 12.8571 18.383 16.8062 14.9864 22.6786H23.8155C24.7158 22.6786 25.4524 23.4152 25.4524 24.3155C25.4524 25.2158 24.7158 25.9524 23.8155 25.9524H10.7202Z" fill="#FF8B8B"/> \n ',e}(),t=Ds({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"retake-image",testid:"retake-image"});return Ts(t,e),Ts(t,nc({text:"Retake",level:2,style:{color:"#FF8B8B",margin:"0",width:"100%"},id:"retake-image-text"})),t};const _c=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.innerHTML='\n <path d="M32.5 8.66666C38.6884 8.66666 44.6233 11.125 48.9992 15.5008C53.375 19.8767 55.8333 25.8116 55.8333 32C55.8333 38.1884 53.375 44.1233 48.9992 48.4992C44.6233 52.875 38.6884 55.3333 32.5 55.3333C26.3116 55.3333 20.3767 52.875 16.0009 48.4992C11.625 44.1233 9.16668 38.1884 9.16668 32C9.16668 25.8116 11.625 19.8767 16.0009 15.5008C20.3767 11.125 26.3116 8.66666 32.5 8.66666ZM32.5 58.6667C39.5725 58.6667 46.3552 55.8572 51.3562 50.8562C56.3572 45.8552 59.1667 39.0724 59.1667 32C59.1667 24.9276 56.3572 18.1448 51.3562 13.1438C46.3552 8.14284 39.5725 5.33333 32.5 5.33333C25.4276 5.33333 18.6448 8.14284 13.6438 13.1438C8.64286 18.1448 5.83334 24.9276 5.83334 32C5.83334 39.0724 8.64286 45.8552 13.6438 50.8562C18.6448 55.8572 25.4276 58.6667 32.5 58.6667ZM43.6771 26.5104C44.3229 25.8646 44.3229 24.8021 43.6771 24.1562C43.0313 23.5104 41.9688 23.5104 41.3229 24.1562L29.1667 36.3125L23.6771 30.8229C23.0313 30.1771 21.9688 30.1771 21.3229 30.8229C20.6771 31.4687 20.6771 32.5312 21.3229 33.1771L27.9896 39.8437C28.6354 40.4896 29.6979 40.4896 30.3438 39.8437L43.6771 26.5104Z" fill="#BBF7DD"/>\n ',e}(),t=Ds({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"approve-image",testid:"approve-image"});return Ts(t,e),Ts(t,nc({text:"Approve",level:2,style:{color:"#BBF7DD",margin:"0",width:"100%"},id:"check-circle-text"})),t},wc=e=>{let{step:t,setImage:i,camera:r}=e;var n,a,o,s;const c=Xs[t];(null===(n=Yo.state.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&"selfie"===t&&(c.instructions="second_title_face_autocapture");const d=((e,t)=>Ds({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"document-capture",className:t}))("document-capture",t),u=Ds({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),l=Ds({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(Yo.state.rootElementId);if(!h)throw new Error("Root element not found");const f=ec(Fs(t),h);Ts(u,uc(t)),Ts(u,f);const p=(()=>{const e=Ds({tagName:"div",style:{zIndex:"2",width:"80%",height:"50px",color:"white",display:"flex",alignItems:"center",backgroundColor:"#2E2E2E",justifyContent:"center",opacity:".9"},id:"loading-block",testid:"loading-block"}),t=ic();return t.style.width="16px",t.style.height="16px",t.style.margin="0 10px",Ts(e,t),Ts(e,nc({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),e})();Ts(f,p),p.style.visibility="hidden";const g=dc({text:zs.translate(c.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),m=(e=>{let{click:t,id:i,testid:r,color:n,withLoader:a}=e;if(a){const e=tc();e.style.position="absolute",e.style.left="-7px",e.style.top="-7px",e.style.height="63px",e.style.width="63px";const a=Ds({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:n||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:r+"-inner"});return Ts(a,e),a.addEventListener("click",t),a}{const e=Ds({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(n||"white"),borderRadius:"40px"},id:i+"-outer",testid:r+"-outer"});return Ts(e,Ds({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:n||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:r+"-inner"})),e.addEventListener("click",t),e}})({click:()=>i({frame:gc(r.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(o=null===(a=Yo.state)||void 0===a?void 0:a.autoCaptureSettings)||void 0===o?void 0:o.enabled}),b=(()=>{const e=Ds({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",alignItems:"center",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),t=_c();return Ts(e,yc()),Ts(e,t),e})(),v=(e=>{let{title:t,text:i,clientHeight:r,customTextColor:n}=e;const a=r<700,o=Ds({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:a?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=nc({text:t,level:a?2:1,style:{color:n||"white",textAlign:"center",marginBottom:a?"4px":"10px"},id:"step-title"}),c=nc({text:i,level:a?6:5,style:{color:n||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return Ts(o,s),Ts(o,c),o})({text:zs.translate(c.instructions),title:zs.translate(c.title),clientHeight:h.clientHeight}),y=(e=>{const t=e<700,i=Ds({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:Yo.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),r=Ds({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),n=ic();n.style.width="16px",n.style.height="16px",n.style.margin="0 10px",Yo.state.markdownSupportText?Ts(r,n):Ts(i,n);const a=Yo.state.markdownSupportText&&null!=cc?cc.parse(Yo.state.markdownSupportText,{async:!1}):"",o=nc({text:"",level:t?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=nc({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return a&&(s.innerHTML=a,Ts(r,o)),Ts(i,a?[r,s]:o),i})(h.clientHeight),_=(null===(s=Yo.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?tc():function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","65"),e.setAttribute("height","65"),e.setAttribute("viewBox","0 0 24 24"),e.innerHTML='\n <path fill="#ffffff" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="#ffffff" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/></path>\n ',e}();_.style.display="none",Ts(l,g),Ts(l,v),Ts(l,u),Ts(l,y),Ts(d,l);const w=Ds({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});Ts(w,_),Ts(w,m),Ts(w,b),Ts(d,w),Ts(d,r.videoElement);const x=Ds({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===Fs(t)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const A=(e=>{const t=Ds({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return t.appendChild(e),t})(x);return Ts(d,A),{component:d,setLoadingMode:e=>{var t;m.style.display="none",y.style.visibility="hidden",_.style.display="block",(null===(t=Yo.state.autoCaptureSettings)||void 0===t?void 0:t.enabled)&&(_.style.height="63px",_.style.width="63px"),e&&(p.style.visibility="visible")},setApprovalRetakeButtons:e=>{let{approveAction:t,retakeAction:i}=e;var r,n;m.style.display="none",y.style.display="none",b.style.display="flex";const a=b.querySelector("#approve-image"),o=b.querySelector("#retake-image"),s=a.cloneNode(!0);null===(r=a.parentNode)||void 0===r||r.replaceChild(s,a),s.addEventListener("click",t);const c=o.cloneNode(!0);null===(n=o.parentNode)||void 0===n||n.replaceChild(c,o),c.addEventListener("click",i)},hideApprovalRetakeButtons:()=>{b.style.display="none",y.style.display="flex"},setPreviewImage:(e,t)=>{x.src=e,p.style.visibility="hidden",r.videoElement.style.display="none",m.style.display="none",y.style.visibility="hidden",A.style.display="block",_.style.display=t?"none":"block"},setLoadingComplete:()=>{_.style.display="none",p.style.visibility="hidden"},setAutoCapturingError:(e,t)=>{if(!e)return void(y.style.visibility="hidden");let i;i=e==fa.feedback.RESTRICTED_CRITERIA&&t?t:Qs[e]?Qs[e].message:zs.translate(e)!==e?e:Qs.other.message,document.getElementById("image-error-message").innerHTML=zs.translate(i),y.style.visibility="visible"},enableVideoElement:()=>{m.style.display="block",r.videoElement.style.display="block",A.style.display="none",_.style.display="none"},setCapturingShowErrorMode:(e,t)=>{m.style.display="block",A.style.display="none",r.videoElement.style.display="block";const i=e==fa.feedback.RESTRICTED_CRITERIA,n=Qs[e]||Qs.other;document.getElementById("image-error-message").innerHTML=t&&i&&null!=cc?cc.parse(t,{async:!1}):zs.translate(n.message),y.style.visibility="visible",p.style.visibility="hidden"},setTitleInstructionsMidStep:e=>{let{title:t,instructions:i}=e;t&&(document.getElementById("step-title").innerHTML=zs.translate(t)),i&&(document.getElementById("step-instructions").innerHTML=zs.translate(i))}}};class xc{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t||(this.isValid=!1,this.failedStep=e),this.steps.push(new Ac(e,t,i))}}class Ac{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=e,this.success=t,this.duration=i}}class Ec{constructor(){this.name=lc.ACCEPTED}async handleFrame(){return new xc}}class Sc{constructor(){this.name=lc.VALID}async handleFrame(e){let{context:t,frame:i,deviceInfo:r,detectionStrategy:n}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.validFramesCounter++,t.validFramesCounter>=t.validFramesThreshold&&t.setState(new Ec)):(t.validFramesCounter=0,t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new Mc)),a}}class kc{constructor(){this.name=lc.REJECTED}async handleFrame(e){let{context:t,frame:i,detectionStrategy:r,deviceInfo:n}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new Sc),a):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new Mc),a):(t.invalidFramesCounter++,a)}}class Mc{constructor(){this.name=lc.INVALID}async handleFrame(e){let{context:t,frame:i,detectionStrategy:r,deviceInfo:n}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new Sc)):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep):(t.invalidFramesCounter++,t.invalidFramesCounter>=t.invalidFramesThreshold&&t.setState(new kc)),a}}class Cc{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=e,this.state=new Mc,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=t,this.invalidFramesThreshold=i}setState(e){this.state=e}async handleFrame(e){let{frame:t,deviceInfo:i}=e;return await this.state.handleFrame({context:this,frame:t,deviceInfo:i,detectionStrategy:this.detectionStrategy})}}async function Ic(e,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const o=Dc(i,n,a),s=await new Promise(((n,a)=>{navigator.serviceWorker.ready.then((s=>{var c;const d=t=>{t.data.type===e+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",d),n(t.data.result)),t.data.type===e+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",d),os(t.data.error.toString(),e,"error"),a(t.data.error))};navigator.serviceWorker.addEventListener("message",d),null===(c=s.active)||void 0===c||c.postMessage(t({type:e,imageData:o,height:i.height,width:i.width},r))}))}));return cs(`****** in web-SDK return result for ${e}`,s),s}function Dc(e,t,i){const r=document.createElement("canvas"),n=t||{height:e.height,width:e.width},a=r.getContext("2d");r.width=n.width,r.height=n.height,i?null==a||a.drawImage(e,i.x,i.y,i.width,i.height,0,0,n.width,n.height):null==a||a.drawImage(e,0,0,n.width,n.height);const o=null==a?void 0:a.getImageData(0,0,n.width,n.height);return r.remove(),o}async function Tc(e){if(e instanceof HTMLVideoElement&&e.paused)return[];return Ic("DETECT_DOCUMENT",e,{},fs[ds.DOCUMENT_DETECTOR].imageDimensions)}async function Rc(e,t){return Ic("BLUR_GLARE_CLASSIFY",e,{},fs[ds.BLUR_GLARE_CLASSIFIER].imageDimensions,t)}const zc=function(){try{return new ls}catch(e){return cs("Error initializing barcode model",e),os("Error initializing barcode model","barcode_model_not_supported","init"),null}}();class Bc{constructor(e){this.barcodeModel=null,this.hasBarcode=e,this.barcodeModel=zc}async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new xc;let a=Date.now();const o=null===(r=await Tc(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(Qo.DOCUMENT_DETECTION,void 0!==o,s),!o)return n;a=Date.now();const c=vc({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Yo.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:Yo.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-a,n.addStepResponse(Qo.DOCUMENT_POSITION,c,s),!c)return n;a=Date.now();const d=await Rc(t,o);s=Date.now()-a;const u=d.some((e=>"blur"===e.class));if(n.addStepResponse(Qo.BLUR_DETECTION,!u,s),u)return n;const l=d.some((e=>"glare"===e.class));if(n.addStepResponse(Qo.GLARE_DETECTION,!l,s),l)return n;if(this.barcodeModel&&this.hasBarcode){a=Date.now();const e=await this.barcodeModel.detect(t);s=Date.now()-a;const i=(null==e?void 0:e.length)>0;if(n.addStepResponse(Qo.BARCODE_DETECTION,i,s),!i)return n}return n}}class Pc{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Oc{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(Qo).forEach((e=>{this.stats.set(e,new Pc)}))}addStats(e,t){this.frameHandleDurations.push(t),e.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),e.steps.forEach((e=>{this.addStat(e.step,e.duration,e.success?1:0,e.success?0:1)}))}addStat(e,t,i,r){const n=this.stats.get(e);if(!n)throw new Error(`Stat for step ${e} not found`);n.durations.push(t),n.countSuccess+=i,n.countFailed+=r}}let Fc=!1;const Nc=e=>{Fc=e};class Lc{async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new xc;let a=Date.now();const o=null===(r=await Tc(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(Qo.DOCUMENT_DETECTION,void 0!==o,s),!o)return n;a=Date.now();const c=vc({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Yo.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:Yo.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-a,n.addStepResponse(Qo.DOCUMENT_POSITION,c,s),!c)return n;a=Date.now();const d=await Rc(t,o);s=Date.now()-a;const u=d.some((e=>"blur"===e.class));if(n.addStepResponse(Qo.BLUR_DETECTION,!u,s),u)return n;const l=d.some((e=>"glare"===e.class));return n.addStepResponse(Qo.GLARE_DETECTION,!l,s),n}}let jc=!1;const Uc=e=>{jc=e};class qc{async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new xc;let a=Date.now();const o=null===(r=await async function(e){return e instanceof HTMLVideoElement&&e.paused?[]:Ic("DETECT_FACE_LANDMARKS",e)}(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(Qo.FACE_DETECTION,"face"===(null==o?void 0:o.class),s),!o)return n;a=Date.now();const c=vc({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Yo.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:Yo.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-a,n.addStepResponse(Qo.FACE_POSITION,c,s),n}}let Kc=!1;const Hc=e=>{Kc=e};async function Vc(e,t){var i,r,n,a;let o="camera-error";if("NotAllowedError"===t.name){o="Permission dismissed"===t.message?"camera-permission-dismissed":"camera-permission-denied";const s=rs.createCameraNotAllowedEvent(t.message,e);await ns(null===(i=Yo.state)||void 0===i?void 0:i.step,null===(r=Yo.state)||void 0===r?void 0:r.userToken,null===(n=Yo.state)||void 0===n?void 0:n.sessionId,null===(a=Yo.state)||void 0===a?void 0:a.clientId,s),Yo.dispatch("setIsCapturingProcessStarted",!1)}Vo(e,o)}function $c(e){const t=(e=>{var t,i,r,n;const[a,o]=e.split(",");if(!a||!o)throw new Error("unable-to-parse-data-uri");const s=null===(r=null===(i=null===(t=a.split(";"))||void 0===t?void 0:t[0])||void 0===i?void 0:i.split(":"))||void 0===r?void 0:r[1];if(!s)throw new Error("unable-to-parse-data-uri");const c=null===(n=s.split("/"))||void 0===n?void 0:n[1];if(!c)throw new Error("unable-to-parse-data-uri");return{data:o,format:c}})(e);return{image:{data:t.data,format:t.format,captureMargins:Os()}}}let Jc=!1;const Gc=async()=>{const e=await ks(Yo.state.sessionId,Yo.state.userToken,Yo.state.clientId);Wc(e)},Wc=async e=>{var t;"expired"===(null==e?void 0:e.status)?$o("processing","session-expired",`Session expired for session id: ${Yo.state.sessionId}`):(null==e?void 0:e.missing_images)&&(null===(t=null==e?void 0:e.missing_images)||void 0===t?void 0:t.length)>0&&setTimeout(Gc,3e3)},Zc=e=>{let{step:t}=e;var i,r,n;const a=null===(r=null===(i=Yo.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===r?void 0:r.enabled;let o=!1;const s=null===(n=Yo.state)||void 0===n?void 0:n.videoCaptureSettings,c=(e=>{let t,i,r=!1;const n=Zs(e),a=new Us(n),o=async()=>{r&&(await a.stopCamera(),a.stream&&a.stream.getTracks().forEach((e=>{"live"==e.readyState&&e.stop()})),r=!1)};return{videoStream:i,startVideoFeed:async e=>{var n,s,c;r&&await o(),"environment"==e&&(t=await Hs());const d=null!==(s=null===(n=null==t?void 0:t.selectedCamera)||void 0===n?void 0:n.deviceId)&&void 0!==s?s:e,u=Ws(e,null===(c=Yo.state)||void 0===c?void 0:c.videoCaptureSettings);qs.getInstance().stopStream(),i=await a.startCamera(d,u),r=!0},stopVideoFeed:o,videoElement:a.videoElement,getDataUri:a.getDataUri,getCameraInfo:()=>t}})(Fs(t));!function(e){Ko({type:"page-load",step:e})}(t),Gc();const d=wc({step:t,setImage:u,camera:c});async function u(e){let{suspendedPreview:i=!1,frame:r,context:n}=e;r||(r=gc(c.videoElement)),"document_front"===t&&Uc(!1),"document_back"===t&&Nc(!1),"selfie"===t&&Hc(!1);const a=Date.now(),u=function(e){const t=e.getCameraInfo();return{selectedCamera:(null==t?void 0:t.selectedCamera)&&{label:t.selectedCamera.label},camerasInfo:(null==t?void 0:t.optionalCameras)&&t.optionalCameras.map((e=>({label:e.label})))}}(c);if(!o)return;d.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(e=>e.toDataURL("image/jpeg"))(r);d.setPreviewImage(f,"selfie"===t),await c.stopVideoFeed(),"selfie"!==t?await h(i,f,u,a,null==n?void 0:n.stats):(d.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),d.setApprovalRetakeButtons({approveAction:async()=>{d.hideApprovalRetakeButtons(),await h(i,f,u,a,null==n?void 0:n.stats)},retakeAction:()=>{d.hideApprovalRetakeButtons(),l()}}))}function l(){"selfie"===t&&d.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),c.startVideoFeed(Fs(t)).then((()=>{o=!0,d.enableVideoElement(),a&&(d.setAutoCapturingError(null),f(t))})).catch((async e=>{throw await Vc(t,e),e}))}async function h(e,i,r,n,u){const h=[];!function(e){var i,r,n,a;const o=rs.createUserActionEvent("capture_image",t,e);ns(null===(i=Yo.state)||void 0===i?void 0:i.step,null===(r=Yo.state)||void 0===r?void 0:r.userToken,null===(n=Yo.state)||void 0===n?void 0:n.sessionId,null===(a=Yo.state)||void 0===a?void 0:a.clientId,o)}(u),function(e,t){Ko({type:"capture-image",imageType:t,step:e})}(t,Ns(t));try{const c=Date.now(),u=$c(i);o=!1,h.push(Ps(Yo.state.sessionId,Yo.state.userToken,Yo.state.clientId,null==u?void 0:u.image,r,Ns(t))),h.push(e?new Promise((e=>setTimeout(e,500))):Promise.resolve(null)),d.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(await Promise.all(h))[0];if(Object.prototype.hasOwnProperty.call(f,"has_barcode")&&(Jc=f.has_barcode),async function(e){let{step:t,requestStartTime:i,imageProcessingStartTime:r,serverProcessingTime:n,userToken:a,sessionId:o,clientId:s}=e;const c=Date.now()-i,d=r?i-r:0,u=rs.createUploadImageEvent(t,String(c),String(n),String(d));await ns(t,a,o,s,u)}({step:t,requestStartTime:c,imageProcessingStartTime:n,serverProcessingTime:f.serverProcessingTime,userToken:Yo.state.userToken,sessionId:Yo.state.sessionId,clientId:Yo.state.clientId}),Yo.dispatch("setMissingImages",f.missing_images),d.setLoadingComplete(),function(e,t,i){Ko({type:"capture-image-result",imageType:t,feedback:i,step:e})}(t,Ns(t),f.feedback),"ok"!==f.feedback)return await async function(e){bc("border-color",hc),a?d.setAutoCapturingError(e.feedback,e.custom_feedback):d.setCapturingShowErrorMode(e.feedback,e.custom_feedback),await new Promise((e=>setTimeout(e,1e3))),bc("border-color",pc)}(f),void l();bc("border-color",fc),await new Promise((e=>setTimeout(e,750))),bc("border-color",pc),Yo.dispatch("setStep",(e=>{let t;return t=e&&e.length>0?e.shift():"processing",t})(Yo.state.missingImages))}catch(e){d.setLoadingComplete(),d.setCapturingShowErrorMode(fa.feedback.OTHER),c.startVideoFeed(Fs(t)).then((()=>{o=!0})).catch((async e=>{throw await Vc(t,e),e})),Vo(t,"failed-to-submit-image")}}async function f(e){if("document_front"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;cs("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:r}=e;var n,a,o,s,c,d,u;const l=new Cc(new Lc,null!==(o=null===(a=null===(n=Yo.state.autoCaptureSettings.settings)||void 0===n?void 0:n.stability)||void 0===a?void 0:a.numStableFrames)&&void 0!==o?o:2),h=new Oc;for(Uc(!0);l.state.name!==lc.ACCEPTED&&jc;){const e=Date.now(),n=gc(t.videoElement),a={width:null!==(c=null===(s=t.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==c?c:0,height:null!==(u=null===(d=t.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==u?u:0},o=await l.handleFrame({frame:n,deviceInfo:a}),f=Date.now()-e+50;h.addStats(o,f),l.stats=h,await mc({context:l,onDetect:i,showError:r,frame:n}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError})}if("document_back"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;cs("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:r,hasBarcode:n}=e;var a,o,s,c,d,u,l;const h=new Cc(new Bc(n),null!==(s=null===(o=null===(a=Yo.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===o?void 0:o.numStableFrames)&&void 0!==s?s:2);Nc(!0);const f=new Oc;for(;h.state.name!==lc.ACCEPTED&&Fc;){const e=Date.now(),n=gc(t.videoElement),a={width:null!==(d=null===(c=t.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==d?d:0,height:null!==(l=null===(u=t.videoElement.getBoundingClientRect())||void 0===u?void 0:u.height)&&void 0!==l?l:0},o=await h.handleFrame({frame:n,deviceInfo:a}),s=Date.now()-e+50;f.addStats(o,s),h.stats=f,await mc({context:h,onDetect:i,showError:r,frame:n}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError,hasBarcode:Jc})}if("selfie"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;cs("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:r}=e;var n,a,o,s;const c=new Cc(new qc,30);Hc(!0);const d=new Oc;for(;c.state.name!==lc.ACCEPTED&&Kc;){const e=Date.now(),u=gc(t.videoElement),l={width:null!==(a=null===(n=t.videoElement.getBoundingClientRect())||void 0===n?void 0:n.width)&&void 0!==a?a:0,height:null!==(s=null===(o=t.videoElement.getBoundingClientRect())||void 0===o?void 0:o.height)&&void 0!==s?s:0},h=await c.handleFrame({frame:u,deviceInfo:l}),f=Date.now()-e;d.addStats(h,f),c.stats=d,await mc({context:c,onDetect:i,showError:r,frame:u,isSelfie:!0}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError})}}return a&&f(t),(async e=>{var t,i,r,n;const a=rs.createPageViewEvent(e);await ns(null===(t=Yo.state)||void 0===t?void 0:t.step,null===(i=Yo.state)||void 0===i?void 0:i.userToken,null===(r=Yo.state)||void 0===r?void 0:r.sessionId,null===(n=Yo.state)||void 0===n?void 0:n.clientId,a)})(t),c.startVideoFeed(Fs(t)).then((()=>{o=!0})).catch((async e=>{throw await Vc(t,e),e})),d.component},Yc=()=>{Ko({type:"start-verification-processing",step:Yo.state.step}),Ho("processing","processing",Yo.state.sessionId);const e=Qc("processing-verification");Ts(e,dc({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const t=async()=>{const e=await ks(Yo.state.sessionId,Yo.state.userToken,Yo.state.clientId);n(e)},i=()=>{setTimeout(t,3e3)},r=async e=>{Yo.dispatch("setStep",e.status),Yo.dispatch("setStatus",e.status)},n=async e=>{var t,n;if(Yo.dispatch("setMissingImages",e.missing_images),e.status)if("complete"===(null==e?void 0:e.status)){qs.getInstance().stopStream();const i=rs.createProcessingCompleteEvent();await ns(Yo.state.step,Yo.state.userToken,null===(t=Yo.state)||void 0===t?void 0:t.sessionId,null===(n=Yo.state)||void 0===n?void 0:n.clientId,i),r(e),Ho("complete",e.status,Yo.state.sessionId),function(e,t,i){Ko({type:"verification-complete",step:e,sessionId:t,callbackUrl:i})}("complete",Yo.state.sessionId,e.callback_url),function(e){sessionStorage.removeItem(e)}(Lo)}else"recapture"===(null==e?void 0:e.status)?(r(e),Yo.dispatch("setIsCapturingProcessStarted",!1),Ho("recapture",e.status,Yo.state.sessionId),function(e,t,i){Ko({type:"verification-recapture",step:e,sessionId:t,reason:i})}("recapture",e.status,e.recapture_reason)):"expired"===(null==e?void 0:e.status)?$o("processing","session-expired",`Session expired for session id: ${Yo.state.sessionId}`):i();else"processing"!==e.state&&(r(e),i())};return t(),e},Qc=e=>Ds({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"processing-verification"});function Xc(e,t){var i;if(!e)return;null===(i=t.firstChild)||void 0===i||i.remove();const r=function(e){switch(e){case"processing":return Yc;case"document_front":case"document_back":case"selfie":return Zc;default:throw new Error("Invalid step")}}(e);Ts(t,r({step:e}))}function ed(e){let{key:t,state:i}=e;const r=i.rootElementId,n=document.getElementById(r);"step"===t&&"complete"!==i.step&&"recapture"!==i.step&&Xc(i.step,n),n&&"processing"===i.step&&(n.style.visibility="hidden")}function td(){const e=Ms(jo(Lo));if(!Ms)throw console.log("Error restarting session, stored session data is invalid or missing"),new Error("Error restarting session, stored session data is invalid or missing");const t=e.sessionId,i=e.userToken;return Yo.dispatch("setSessionId",t),Yo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}async function id(){var e,t;if(null===(e=Yo.state.autoCaptureSettings)||void 0===e?void 0:e.enabled){const e=Date.now();try{await ad(),cs("all models loaded - auto-capture enabled")}catch(e){Yo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(t=Yo.state.autoCaptureSettings)||void 0===t?void 0:t.settings}),cs("Model loading did not complete on time:",e);os(`timed out loading models: ${ps.filter((e=>fs[e].status!==hs.LOADED)).map((e=>e)).join(", ")}`,"model_load_timeout","init")}const i=Object.values(fs).filter((e=>e.status===hs.LOADED)).map((e=>e.loadingStats));!async function(e,t){const i=rs.createSdkInitEvent(e,t);await ss("init",i)}(Date.now()-e,i)}}async function rd(e){var i;try{await qs.getInstance().startNewStream({video:t(t({},Ws("environment",null===(i=Yo.state)||void 0===i?void 0:i.videoCaptureSettings)),{},{deviceId:await Gs("environment")})}),function(e,t){Ko({type:"session-id-acquired",step:e,sessionId:t})}("init",e),function(e,t,i){const r=document.getElementById(i);r.style.visibility="visible",Xc(e.shift(),r)}(Yo.state.missingImages,Yo.state.sessionId,Yo.state.rootElementId)}catch(e){await Vc("init",e)}}async function nd(e){let{status:t,sessionId:i,userToken:r,missingImages:n,rootElementId:a,language:o}=e;!function(e,t){Ko({type:"session-granted",step:e,sessionId:t})}("init",i),Yo.dispatch("setStatus",t),Yo.dispatch("setSessionId",i),Yo.dispatch("setUserToken",r),Yo.dispatch("setMissingImages",n),Yo.dispatch("setRootElement",a),Yo.dispatch("setLanguage",o),async function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";zs.overrideLanguage(Bs[i]||Bs.en);let r=document.getElementById(t);if(!r){r=Ds({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:t,testid:"root"});const e=document.createElement("style");e.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${t} #trigger-section {\n margin: 0 !important;\n }\n #${t} #page-header {\n height: 5% !important;\n }\n }\n `,Ts(document.head,e),Ts(document.body,r)}}(Yo.state.sessionId,Yo.state.rootElementId,Yo.state.language),function(){try{Oo.events.off(No,ed)}catch(e){}Oo.events.on(No,ed)}(),await id(),await rd(i)}const ad=async()=>{const e=Yo.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([gs(),new Promise(((t,i)=>setTimeout((()=>i(new Error(`Model loading timed out after ${e} ms`))),e)))])};async function od(e){if(Yo.state.isCapturingProcessStarted)return void Vo(Yo.state.step,"trying-to-initialize-active-session");let t,i;if(e){const r=await async function(e){let t,i;try{const r=await Is(e,Yo.state.consentVersion,Yo.state.clientId);return t=r.sessionId,i=r.userToken,Yo.dispatch("setSessionId",t),Yo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}catch(e){throw console.log("Error starting session"),console.error(e),e}}(e);t=r.sessionId,i=r.userToken}else{const e=td();t=e.sessionId,i=e.userToken}if(!t)return void Vo(Yo.state.step,"other");const{missing_images:r,status:n}=await ks(t,i,Yo.state.clientId);return Yo.dispatch("setIsCapturingProcessStarted",!0),await nd({status:n,sessionId:t,userToken:i,missingImages:r,rootElementId:Yo.state.rootElementId,language:Yo.state.language}),!0}async function sd(){try{return await async function(){if("recapture"===Yo.state.verificationStatus||"pending"===Yo.state.verificationStatus){const{sessionId:e,userToken:t}=td(),{missing_images:i,status:r}=await ks(e,t,Yo.state.clientId);return await nd({status:r,sessionId:e,userToken:t,missingImages:i,rootElementId:Yo.state.rootElementId,language:Yo.state.language}),!0}Vo(Yo.state.step,"trying-to-initialize-active-session")}()}catch(e){throw console.log("Error restarting session"),console.error(e),e}}var cd=Object.freeze({__proto__:null,recapture:sd,restart:async function(){return sd()},start:async function(e){try{return await od(e)}catch(e){throw console.log("Error starting session"),console.error(e),e}},version:()=>wa});class dd{static arrayBufferToBase64(e){return btoa(String.fromCharCode(...new Uint8Array(e)))}static base64ToArrayBuffer(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}static stringToBase64(e){return btoa(e)}static jsonToBase64(e){const t=JSON.stringify(e);return btoa(t)}static base64ToJson(e){const t=atob(e);return JSON.parse(t)}}const ud={log:console.log,error:console.error};var ld,hd;!function(e){e.NotInitialized="not_initialized",e.AuthenticationFailed="authentication_failed",e.AuthenticationAbortedTimeout="authentication_aborted_timeout",e.AuthenticationCanceled="webauthn_authentication_canceled",e.RegistrationFailed="registration_failed",e.AlreadyRegistered="username_already_registered",e.RegistrationAbortedTimeout="registration_aborted_timeout",e.RegistrationCanceled="webauthn_registration_canceled",e.AutofillAuthenticationAborted="autofill_authentication_aborted",e.AuthenticationProcessAlreadyActive="authentication_process_already_active",e.InvalidApprovalData="invalid_approval_data",e.FailedToInitCrossDeviceSession="cross_device_init_failed",e.FailedToGetCrossDeviceStatus="cross_device_status_failed",e.Unknown="unknown"}(ld||(ld={}));class fd extends Error{constructor(e,t){super(e),this.errorCode=ld.NotInitialized,this.data=t}}class pd extends fd{constructor(e,t){super(null!=e?e:"WebAuthnSdk is not initialized",t),this.errorCode=ld.NotInitialized}}class gd extends fd{constructor(e,t){super(null!=e?e:"Authentication failed with an error",t),this.errorCode=ld.AuthenticationFailed}}class md extends fd{constructor(e,t){super(null!=e?e:"Authentication was canceled by the user or got timeout",t),this.errorCode=ld.AuthenticationCanceled}}class bd extends fd{constructor(e,t){super(null!=e?e:"Registration failed with an error",t),this.errorCode=ld.RegistrationFailed}}class vd extends fd{constructor(e,t){super(null!=e?e:"Registration was canceled by the user or got timeout",t),this.errorCode=ld.RegistrationCanceled}}class yd extends fd{constructor(e){super(null!=e?e:"Autofill flow was aborted"),this.errorCode=ld.AutofillAuthenticationAborted}}class _d extends fd{constructor(e){super(null!=e?e:"Operation was aborted by timeout"),this.errorCode=ld.AutofillAuthenticationAborted}}class wd extends fd{constructor(e){super(null!=e?e:"Passkey with this username is already registered with the relying party."),this.errorCode=ld.AlreadyRegistered}}class xd extends fd{constructor(e,t){super(null!=e?e:"Authentication process is already active",t),this.errorCode=ld.AuthenticationProcessAlreadyActive}}class Ad extends fd{constructor(e,t){super(null!=e?e:"Invalid approval data",t),this.errorCode=ld.InvalidApprovalData}}class Ed extends fd{constructor(e,t){super(null!=e?e:"Failed to init cross device authentication",t),this.errorCode=ld.FailedToInitCrossDeviceSession}}class Sd extends fd{constructor(e,t){super(null!=e?e:"Failed to get cross device status",t),this.errorCode=ld.FailedToGetCrossDeviceStatus}}function kd(e){return e.errorCode&&Object.values(ld).includes(e.errorCode)}!function(e){e[e.persistent=0]="persistent",e[e.session=1]="session"}(hd||(hd={}));class Md{static get(e){return Md.getStorageMedium(Md.allowedKeys[e]).getItem(Md.getStorageKey(e))||void 0}static set(e,t){return Md.getStorageMedium(Md.allowedKeys[e]).setItem(Md.getStorageKey(e),t)}static remove(e){Md.getStorageMedium(Md.allowedKeys[e]).removeItem(Md.getStorageKey(e))}static clear(e){for(const[t,i]of Object.entries(Md.allowedKeys)){const r=t;e&&this.configurationKeys.includes(r)||Md.getStorageMedium(i).removeItem(Md.getStorageKey(r))}}static getStorageKey(e){return`WebAuthnSdk:${e}`}static getStorageMedium(e){return e===hd.session?sessionStorage:localStorage}}Md.allowedKeys={clientId:hd.session},Md.configurationKeys=["clientId"];class Cd{static isNewApiDomain(e){return e&&(this.newApiDomains.includes(e)||e.startsWith("api.")&&e.endsWith(".transmitsecurity.io"))}static dnsPrefetch(e){const t=document.createElement("link");t.rel="dns-prefetch",t.href=e,document.head.appendChild(t)}static preconnect(e,t){const i=document.createElement("link");i.rel="preconnect",i.href=e,t&&(i.crossOrigin="anonymous"),document.head.appendChild(i)}static warmupConnection(e){this.dnsPrefetch(e),this.preconnect(e,!1),this.preconnect(e,!0)}static init(e,t){var i,r;try{this._serverPath=new URL(t.serverPath),this.isNewApiDomain(null===(i=this._serverPath)||void 0===i?void 0:i.hostname)&&this.warmupConnection(this._serverPath.origin),this._apiPaths=null!==(r=t.webauthnApiPaths)&&void 0!==r?r:this.getDefaultPaths(),this._clientId=e,Md.set("clientId",e)}catch(e){throw new pd("Invalid options.serverPath",{error:e})}}static getDefaultPaths(){var e;const t=this.isNewApiDomain(null===(e=this._serverPath)||void 0===e?void 0:e.hostname)?"/cis":"";return{startAuthentication:`${t}/v1/auth/webauthn/authenticate/start`,startRegistration:`${t}/v1/auth/webauthn/register/start`,initCrossDeviceAuthentication:`${t}/v1/auth/webauthn/cross-device/authenticate/init`,startCrossDeviceAuthentication:`${t}/v1/auth/webauthn/cross-device/authenticate/start`,startCrossDeviceRegistration:`${t}/v1/auth/webauthn/cross-device/register/start`,getCrossDeviceTicketStatus:`${t}/v1/auth/webauthn/cross-device/status`,attachDeviceToCrossDeviceSession:`${t}/v1/auth/webauthn/cross-device/attach-device`}}static getApiPaths(){return this._apiPaths}static async sendRequest(e,t,i){ud.log(`[WebAuthn SDK] Calling ${t.method} ${e}...`);const r=new URL(this._serverPath);return r.pathname=e,i&&(r.search=i),fetch(r.toString(),t)}static async startRegistration(e){const i=await this.sendRequest(this._apiPaths.startRegistration,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t({client_id:this.getValidatedClientId(),username:e.username,display_name:e.displayName},e.timeout&&{timeout:e.timeout}),e.limitSingleCredentialToDevice&&{limit_single_credential_to_device:e.limitSingleCredentialToDevice}))});if(!(null==i?void 0:i.ok))throw new gd("Failed to start registration",null==i?void 0:i.body);return await i.json()}static async startAuthentication(e){const i=await this.sendRequest(this._apiPaths.startAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t(t({client_id:this.getValidatedClientId()},e.username&&{username:e.username}),e.approvalData&&{approval_data:e.approvalData}),e.timeout&&{timeout:e.timeout}))});if(!(null==i?void 0:i.ok))throw new gd("Failed to start authentication",null==i?void 0:i.body);return await i.json()}static async initCrossDeviceAuthentication(e){const i=await this.sendRequest(this._apiPaths.initCrossDeviceAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t({client_id:this.getValidatedClientId()},e.username&&{username:e.username}),e.approvalData&&{approval_data:e.approvalData}))});if(!(null==i?void 0:i.ok))throw new Ed(void 0,null==i?void 0:i.body);return await i.json()}static async getCrossDeviceTicketStatus(e){const t=await this.sendRequest(this._apiPaths.getCrossDeviceTicketStatus,{method:"GET"},`cross_device_ticket_id=${e.ticketId}`);if(!(null==t?void 0:t.ok))throw new Sd(void 0,null==t?void 0:t.body);return await t.json()}static async startCrossDeviceAuthentication(e){const t=await this.sendRequest(this._apiPaths.startCrossDeviceAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new gd("Failed to start cross device authentication",null==t?void 0:t.body);return await t.json()}static async startCrossDeviceRegistration(e){const t=await this.sendRequest(this._apiPaths.startCrossDeviceRegistration,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new bd("Failed to start cross device registration",null==t?void 0:t.body);return await t.json()}static async attachDeviceToCrossDeviceSession(e){const t=await this.sendRequest(this._apiPaths.attachDeviceToCrossDeviceSession,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new bd("Failed to attach device to cross device session",null==t?void 0:t.body);return await t.json()}static getValidatedClientId(){var e;const t=null!==(e=this._clientId)&&void 0!==e?e:Md.get("clientId");if(!t)throw new pd("Missing clientId");return t}}var Id,Dd,Td,Rd;Cd.newApiDomains=["api.idsec-dev.com","api.idsec-stg.com"],function(e){e.InputAutofill="input-autofill",e.Modal="modal"}(Id||(Id={})),function(e){e.Pending="pending",e.Scanned="scanned",e.Success="success",e.Error="error",e.Timeout="timeout",e.Aborted="aborted"}(Dd||(Dd={})),function(e){e.toAuthenticationError=e=>kd(e)?e:"NotAllowedError"===e.name?new md:"OperationError"===e.name?new xd(e.message):"SecurityError"===e.name?new gd(e.message):e===ld.AuthenticationAbortedTimeout?new _d:"AbortError"===e.name||e===ld.AutofillAuthenticationAborted?new yd:new gd("Something went wrong during authentication",{error:e}),e.toRegistrationError=e=>kd(e)?e:"NotAllowedError"===e.name?new vd:"SecurityError"===e.name?new bd(e.message):"InvalidStateError"===e.name?new wd:e===ld.RegistrationAbortedTimeout?new _d:new bd("Something went wrong during registration",{error:e})}(Td||(Td={})),function(e){e.processCredentialRequestOptions=e=>t(t({},e),{},{challenge:dd.base64ToArrayBuffer(e.challenge),allowCredentials:e.allowCredentials.map((e=>t(t({},e),{},{id:dd.base64ToArrayBuffer(e.id)})))}),e.processCredentialCreationOptions=(e,i)=>{var r;const n=JSON.parse(JSON.stringify(e));return n.challenge=dd.base64ToArrayBuffer(e.challenge),n.user.id=dd.base64ToArrayBuffer(e.user.id),(null==i?void 0:i.limitSingleCredentialToDevice)&&(n.excludeCredentials=null===(r=e.excludeCredentials)||void 0===r?void 0:r.map((e=>t(t({},e),{},{id:dd.base64ToArrayBuffer(e.id)})))),(null==i?void 0:i.registerAsDiscoverable)?(n.authenticatorSelection.residentKey="preferred",n.authenticatorSelection.requireResidentKey=!0):(n.authenticatorSelection.residentKey="discouraged",n.authenticatorSelection.requireResidentKey=!1),n.authenticatorSelection.authenticatorAttachment=(null==i?void 0:i.allowCrossPlatformAuthenticators)?void 0:"platform",n},e.encodeAuthenticationResult=e=>{const{authenticatorAttachment:t}=e,i=e.response;return{id:e.id,rawId:dd.arrayBufferToBase64(e.rawId),response:{authenticatorData:dd.arrayBufferToBase64(i.authenticatorData),clientDataJSON:dd.arrayBufferToBase64(i.clientDataJSON),signature:dd.arrayBufferToBase64(i.signature),userHandle:dd.arrayBufferToBase64(i.userHandle)},authenticatorAttachment:t,type:e.type}},e.encodeRegistrationResult=e=>{const{authenticatorAttachment:t}=e,i=e.response;return{id:e.id,rawId:dd.arrayBufferToBase64(e.rawId),response:{attestationObject:dd.arrayBufferToBase64(i.attestationObject),clientDataJSON:dd.arrayBufferToBase64(i.clientDataJSON)},authenticatorAttachment:t,type:e.type}}}(Rd||(Rd={}));class zd{async modal(e){try{const i=await this.performAuthentication(t(t({},e),{},{mediationType:Id.Modal}));return dd.jsonToBase64(i)}catch(e){throw Td.toAuthenticationError(e)}}activateAutofill(e,t){const{onSuccess:i,onError:r,onReady:n}=e;this.performAuthentication({username:t,mediationType:Id.InputAutofill,onReady:n}).then((e=>{i(dd.jsonToBase64(e))})).catch((e=>{const t=Td.toAuthenticationError(e);if(!r)throw t;r(t)}))}abortAutofill(){this.abortController&&this.abortController.abort(ld.AutofillAuthenticationAborted)}abortAuthentication(){this.abortController&&this.abortController.abort(ld.AuthenticationAbortedTimeout)}async performAuthentication(e){var t,i;const r="crossDeviceTicketId"in e?await Cd.startCrossDeviceAuthentication({ticketId:e.crossDeviceTicketId}):await Cd.startAuthentication({username:e.username,timeout:null===(t=e.options)||void 0===t?void 0:t.timeout}),n=r.credential_request_options,a=Rd.processCredentialRequestOptions(n),o=this.getMediatedCredentialRequest(a,e.mediationType);e.mediationType===Id.InputAutofill&&(null===(i=e.onReady)||void 0===i||i.call(e));const s=await navigator.credentials.get(o).catch((e=>{throw Td.toAuthenticationError(e)}));return{webauthnSessionId:r.webauthn_session_id,publicKeyCredential:Rd.encodeAuthenticationResult(s),userAgent:navigator.userAgent}}getMediatedCredentialRequest(e,t){const i={publicKey:e};return this.abortController=new AbortController,i.signal=this.abortController&&this.abortController.signal,t===Id.InputAutofill?i.mediation="conditional":e.timeout&&setTimeout((()=>{this.abortAuthentication()}),e.timeout),i}}class Bd{constructor(e,t){this.handler=e,this.intervalInMs=t}begin(){var e;this.intervalId=window.setInterval((e=this.handler,async function(){e.isRunning||(e.isRunning=!0,await e(...arguments),e.isRunning=!1)}),this.intervalInMs)}stop(){clearInterval(this.intervalId)}}const Pd=/^[A-Za-z0-9\-_.: ]*$/;function Od(e){if(e&&(!function(e){return Object.keys(e).length<=10}(e)||!function(e){const t=e=>"string"==typeof e,i=e=>Pd.test(e);return Object.keys(e).every((r=>t(r)&&t(e[r])&&i(r)&&i(e[r])))}(e)))throw ud.error("Failed validating approval data"),new Ad("Provided approval data should have 10 properties max. Also, it should contain only \n alphanumeric characters, numbers, and the special characters: '-', '_', '.'")}class Fd{constructor(e,i,r){this.authenticationHandler=e,this.registrationHandler=i,this.approvalHandler=r,this.init={registration:async e=>(this.ticketStatus=Dd.Pending,this.pollCrossDeviceSession(e.crossDeviceTicketId,e.handlers)),authentication:async e=>{const{username:i}=e,r=(await Cd.initCrossDeviceAuthentication(t({},i&&{username:i}))).cross_device_ticket_id;return this.ticketStatus=Dd.Pending,this.pollCrossDeviceSession(r,e.handlers)},approval:async e=>{const{username:t,approvalData:i}=e;Od(i);const r=(await Cd.initCrossDeviceAuthentication({username:t,approvalData:i})).cross_device_ticket_id;return this.ticketStatus=Dd.Pending,this.pollCrossDeviceSession(r,e.handlers)}},this.authenticate={modal:async e=>this.authenticationHandler.modal({crossDeviceTicketId:e})},this.approve={modal:async e=>this.approvalHandler.modal({crossDeviceTicketId:e})}}async register(e,t){return this.registrationHandler.register({crossDeviceTicketId:e},t)}async attachDevice(e){const i=await Cd.attachDeviceToCrossDeviceSession({ticketId:e});return t({status:i.status,startedAt:i.started_at},i.approval_data&&{approvalData:i.approval_data})}async pollCrossDeviceSession(e,t){return this.poller=new Bd((async()=>{var i,r;const n=await Cd.getCrossDeviceTicketStatus({ticketId:e}),a=n.status;if(a!==this.ticketStatus)switch(this.ticketStatus=a,a){case Dd.Scanned:await t.onDeviceAttach();break;case Dd.Error:case Dd.Timeout:case Dd.Aborted:await t.onFailure(n),null===(i=this.poller)||void 0===i||i.stop();break;case Dd.Success:if("onCredentialRegister"in t)await t.onCredentialRegister();else{if(!n.session_id)throw new Sd("Cross device session is complete without returning session_id",n);await t.onCredentialAuthenticate(n.session_id)}null===(r=this.poller)||void 0===r||r.stop()}}),1e3),this.poller.begin(),setTimeout((()=>{var e;null===(e=this.poller)||void 0===e||e.stop(),t.onFailure({status:Dd.Timeout})}),3e5),{crossDeviceTicketId:e,stop:()=>{var e;null===(e=this.poller)||void 0===e||e.stop()}}}}class Nd{async register(e,i){this.abortController=new AbortController;const r=t({allowCrossPlatformAuthenticators:!("crossDeviceTicketId"in e),registerAsDiscoverable:!0},i);try{const t="crossDeviceTicketId"in e?await Cd.startCrossDeviceRegistration({ticketId:e.crossDeviceTicketId}):await Cd.startRegistration({username:e.username,displayName:(null==i?void 0:i.displayName)||e.username,timeout:null==i?void 0:i.timeout,limitSingleCredentialToDevice:null==i?void 0:i.limitSingleCredentialToDevice}),n=Rd.processCredentialCreationOptions(t.credential_creation_options,r);setTimeout((()=>{this.abortRegistration()}),n.timeout);const a=await this.registerCredential(n),o={webauthnSessionId:t.webauthn_session_id,publicKeyCredential:a,userAgent:navigator.userAgent};return dd.jsonToBase64(o)}catch(e){throw Td.toRegistrationError(e)}}abortRegistration(){this.abortController&&this.abortController.abort(ld.RegistrationAbortedTimeout)}async registerCredential(e){const t=await navigator.credentials.create({publicKey:e,signal:this.abortController&&this.abortController.signal}).catch((e=>{throw Td.toRegistrationError(e)}));return Rd.encodeRegistrationResult(t)}}class Ld{async modal(e){try{const t=await this.performApproval(e);return dd.jsonToBase64(t)}catch(e){throw Td.toAuthenticationError(e)}}async performApproval(e){"approvalData"in e&&Od(e.approvalData);const t="crossDeviceTicketId"in e?await Cd.startCrossDeviceAuthentication({ticketId:e.crossDeviceTicketId}):await Cd.startAuthentication({username:e.username,approvalData:e.approvalData}),i=t.credential_request_options,r=Rd.processCredentialRequestOptions(i),n=await navigator.credentials.get({publicKey:r}).catch((e=>{throw Td.toAuthenticationError(e)}));return{webauthnSessionId:t.webauthn_session_id,publicKeyCredential:Rd.encodeAuthenticationResult(n),userAgent:navigator.userAgent}}}class jd{constructor(){this._initialized=!1,this._authenticationHandler=new zd,this._registrationHandler=new Nd,this._approvalHandler=new Ld,this._crossDeviceHandler=new Fd(this._authenticationHandler,this._registrationHandler,this._approvalHandler),this.authenticate={modal:async(e,t)=>(this.initCheck(),this._authenticationHandler.modal({username:e,options:t})),autofill:{activate:(e,t)=>(this.initCheck(),this._authenticationHandler.activateAutofill(e,t)),abort:()=>this._authenticationHandler.abortAutofill()}},this.approve={modal:async(e,t)=>(this.initCheck(),this._approvalHandler.modal({username:e,approvalData:t}))},this.register=async(e,t)=>(this.initCheck(),this._registrationHandler.register({username:e},t)),this.crossDevice={init:{registration:async e=>(this.initCheck(),this._crossDeviceHandler.init.registration(e)),authentication:async e=>(this.initCheck(),this._crossDeviceHandler.init.authentication(e)),approval:async e=>(this.initCheck(),this._crossDeviceHandler.init.approval(e))},authenticate:{modal:async e=>(this.initCheck(),this._crossDeviceHandler.authenticate.modal(e))},approve:{modal:async e=>(this.initCheck(),this._crossDeviceHandler.approve.modal(e))},register:async(e,t)=>(this.initCheck(),this._crossDeviceHandler.register(e,t)),attachDevice:async e=>(this.initCheck(),this._crossDeviceHandler.attachDevice(e))},this.isPlatformAuthenticatorSupported=async()=>{var e;try{return await(null===(e=jd.StaticPublicKeyCredential)||void 0===e?void 0:e.isUserVerifyingPlatformAuthenticatorAvailable())}catch(e){return!1}},this.isAutofillSupported=async()=>{var e,t;return!(!(null===(e=jd.StaticPublicKeyCredential)||void 0===e?void 0:e.isConditionalMediationAvailable)||!await(null===(t=jd.StaticPublicKeyCredential)||void 0===t?void 0:t.isConditionalMediationAvailable()))}}async init(e,t){try{if(!e)throw new pd("Invalid clientId",{clientId:e});if(t.webauthnApiPaths){const e=Cd.getDefaultPaths();if(function(e,t){const i=new Set(e),r=new Set(t);return[...e.filter((e=>!r.has(e))),...t.filter((e=>!i.has(e)))]}(Object.keys(t.webauthnApiPaths),Object.keys(e)).length)throw new pd("Invalid custom paths",{customApiPaths:t.webauthnApiPaths})}Cd.init(e,t),this._initialized=!0}catch(e){throw kd(e)?e:new pd("Failed to initialize SDK")}}getDefaultPaths(){return this.initCheck(),Cd.getDefaultPaths()}getApiPaths(){return this.initCheck(),Cd.getApiPaths()}initCheck(){if(!this._initialized)throw new pd}}jd.StaticPublicKeyCredential=window.PublicKeyCredential;const Ud=new W("webauthn"),qd=new jd;Ud.events.on(Ud.events.MODULE_INITIALIZED,(()=>{var e;const i=Ud.moduleMetadata.getInitConfig();if(!(null===(e=null==i?void 0:i.webauthn)||void 0===e?void 0:e.serverPath))return;const{clientId:r,webauthn:n}=i;qd.init(r,t({},n))}));const Kd={modal:async(e,t)=>(qd.initCheck(),qd.authenticate.modal(e,t)),autofill:{activate:(e,t)=>{qd.initCheck(),qd.authenticate.autofill.activate(e,t)},abort:()=>{qd.initCheck(),qd.authenticate.autofill.abort()}}},Hd={modal:async(e,t)=>(qd.initCheck(),qd.approve.modal(e,t))};async function Vd(e,t){return qd.initCheck(),qd.register(e,t)}const{crossDevice:$d}=qd,{isPlatformAuthenticatorSupported:Jd}=qd,{isAutofillSupported:Gd}=qd,{getDefaultPaths:Wd}=qd;window.localWebAuthnSDK=qd;var Zd=Object.freeze({__proto__:null,get WebauthnCrossDeviceStatus(){return Dd},approve:Hd,authenticate:Kd,crossDevice:$d,getDefaultPaths:Wd,isAutofillSupported:Gd,isPlatformAuthenticatorSupported:Jd,register:Vd});const Yd=new W("ido");var Qd,Xd,eu,tu,iu;!function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(Qd||(Qd={})),function(e){e.InvalidInitOptions="invalid_initialization_options",e.NotInitialized="not_initialized",e.NoActiveJourney="no_active_journey",e.NetworkError="network_error",e.ClientResponseNotValid="client_response_not_valid",e.ServerError="server_error",e.InvalidState="invalid_state",e.InvalidCredentials="invalid_credentials",e.ExpiredOTPPasscode="expired_otp_passcode",e.ExpiredValidationPasscode="expired_validation_passcode",e.MaxResendReached="expired_otp_passcode"}(Xd||(Xd={})),function(e){e.ClientInput="client_input",e.Cancel="cancel",e.Fail="failure",e.Custom="custom",e.Resend="resend"}(eu||(eu={})),function(e){e.JourneySuccess="journey_success",e.ClientInputRequired="client_input_required",e.ClientInputUpdateRequired="client_input_update_required",e.JourneyRejection="journey_rejection"}(tu||(tu={})),function(e){e.Rejection="action:rejection",e.Success="action:success",e.Information="action:information",e.DebugBreak="action:debug_break",e.WaitForAnotherDevice="action:wait_for_another_device",e.CryptoBindingRegistration="action:crypto_binding_registration",e.CryptoBindingValidation="action:crypto_binding_validation",e.RegisterDeviceAction="transmit_platform_device_registration",e.ValidateDeviceAction="transmit_platform_device_validation",e.WebAuthnRegistration="action:webauthn_registration",e.DrsTriggerAction="action:drs_trigger_action",e.IdentityVerification="action:id_verification",e.EmailOTPAuthentication="transmit_platform_email_otp_authentication",e.SmsOTPAuthentication="transmit_platform_sms_otp_authentication",e.EmailValidation="transmit_platform_email_validation",e.SmsValidation="transmit_platform_sms_validation",e.TotpRegistration="transmit_platform_totp_registration",e.TransactionSigningTOTP="transmit_platform_transaction_signing_totp",e.InvokeIDP="invoke_idp",e.WebAuthnTransactionSigning="transmit_platform_transaction_signing_webauthn",e.SelectOrganization="transmit_platform_select_organization",e.MobileApproveAuthentication="transmit_platform_mobile_approve_authentication"}(iu||(iu={}));const ru=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qd.Info;this.logLevel=e}setLogLevel(e){e<Qd.Debug||e>Qd.Error?this.error("Invalid log level"):this.logLevel=e}debug(e){this.logLevel<=Qd.Debug&&console.debug(`[DEBUG] ${e}`)}info(e){this.logLevel<=Qd.Info&&console.info(`[INFO] ${e}`)}warning(e){this.logLevel<=Qd.Warning&&console.warn(`[WARNING] ${e}`)}error(e){this.logLevel<=Qd.Error&&console.error(`[ERROR] ${e}`)}},nu={[iu.CryptoBindingRegistration]:"input",[iu.CryptoBindingValidation]:"input",[iu.RegisterDeviceAction]:"data",[iu.ValidateDeviceAction]:"data"},au="api/v2/",ou={path:"auth/sso"},su={path:"auth/anonymous_invoke"},cu={path:"auth/assert"},du={path:"auth/poll"},uu={path:"auth/create_debug_token"},lu={path:"auth/key_exchange"},hu={headers:{mandatory:!0,dummy:[{type:"correlation_id",correlation_id:"337BFFE6BEE7D694B8FA41F42B00742CA537DC398F79369A3A60E04D0EB2E8E1"}]},data:{mandatory:!0,dummy:{collection_result:{metadata:{timestamp:(new Date).getTime()},content:{}},policy_request_id:"LoginWithMenu"},large_dummy:{metadata:{timestamp:1679422144431},content:{device_details:{logged_users:1,persistence_mode:"persistent",device_id:"8951bd7b67a959e7b12b5018816f9ce4",os_type:"Mac OS",os_version:"10.15.7",device_model:"Chrome 111.0.0.0"},location:{enabled:!1},capabilities:{fido2_user_verifying_platform_authenticator_available:!0,audio_acquisition_supported:!0,finger_print_supported:!1,image_acquisition_supported:!1,persistent_keys_supported:!0,face_id_key_bio_protection_supported:!1,fido_client_present:!1,fido2_client_present:!0,dyadic_present:!1,installed_plugins:[]},collector_state:{accounts:"disabled",devicedetails:"active",contacts:"disabled",owner:"disabled",software:"disabled",location:"disabled",locationcountry:"disabled",bluetooth:"disabled",externalsdkdetails:"active",hwauthenticators:"active",capabilities:"active",fidoauthenticators:"disabled",largedata:"active",localenrollments:"active",devicefingerprint:"active",apppermissions:"disabled"},local_enrollments:{}},fp2:{user_agent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",webdriver:!0,language:"en-US",color_depth:30,device_memory:8,pixel_ratio:2,hardware_concurrency:12,screen_resolution:[1680,1050],available_screen_resolution:[1680,1025],timezone_offset:240,timezone:"America/New_York",session_storage:!0,local_storage:!0,indexed_db:!0,add_behavior:!1,open_database:!0,cpu_class:"not available",platform:"MacIntel",do_not_track:"not available",plugins:[["PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Chrome PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Chromium PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Microsoft Edge PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["WebKit built-in PDF","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]]],canvas:["canvas winding:yes","canvas fp:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAADICAYAAACwGnoBAAAAAXNSR0IArs4c6QAAIABJREFUeF7s3XeYXVW9//H3Omdaeu+FGgiE9BDAgmIBQRRQ4eIP0JCQmdC8YgHrZRQLAooSSjIpRMpVCZciiIAiKhoIpEMoUtILKaS3KWf/nu8+e0/2nDkzc+bMmckMfNbz8Ejm7L3W2q8zwT8++/tdjlY+PLz+wAhgKHA0MBjoB/QEDq9j+6uAzcAGYDXwFvA6sMzh1of3eHjtgWHA8ZH/7Qa0q+Mfu3VfHf9sA14Flof/63B7q/fn5fY5cAefo5V/hdqeBCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQggTYh4FrbLj2844BPAh8FTg4C81xucyewBygAeuRy4uhcrwF/6sx7Tw3lwMKT6LDtNDr7T2Sxf26GvRjwAvBP4G84Z0tmNLxivIwufJ9d5Mpodb/v7zNiPY4EJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAE2rRAqwgUPbyTgC8AnwMsQG+TYz7wEPAYUGeaPQr4MPCh4BWBQTl7VFvSln4I52wrdQ4F6Dkz10QSkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkMD7SOCQBegenlV/XwpMCtqzt0nWrcDdwKygR3yjH+IU4LPBqwPWqD43w8J029IcnLMt1hgK0HODrFkkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIIH3l0D9AXppaR6lpZX+I0f/vQkGHt5w4EqgJJNprNf4GnYzgA7EcWxhPz0pyuTWjK7ZxgG6UehfW0mCchK0J6/Be18G7gCmN3ilPYER5jd4JacDnw/CdDvpPXXsPQDxOBQ2vL/IrdOAO3HOtuwPC9C3056uHDyiveHNte0rttCRXmW7c/PCSH1/F+r6LJt72ja5di8BCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCCBNidQO1CcNPNo4lU/Ak7AeTvwXAc8twbnHUdl3jhmT9qVzVN6eFZf/W3g4kzvf43tXMW/6EIBf2Ud/+YcRvAgD3E653F4ptOkve6fbOBbvEARcZ7lc3ydefyW//AHPsWZ1N1XfRlwM3Bfg6sngEWA5dZ2lHsjOtPb+wHWzN7C9C8DO3fD3Bdg4Ttw3blwZO8GV09zwb3ALUyZftyR3pbfn83L/IY/ZDNPm7vnGYbyKa6BWGI40y5/JesHmDTzMPIqLwGOwnPjgd9QVlLmzze5bAKxxEA8Z9+Y/ZpcR1nJarK5J+sN6kYJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSKApAjUD9MllZ+K8J/DcNLZ3/W/mXlBOaWmMDX2/h+duIBHry8zJ7zZmQQ+vF3B9UHXemFv5DE9QwvF+oD2L15nAMfyOt/3wvEcOqtBLeI632MEznM1G9tKP+3iCM9MG6JuAHwdV55k/hIXoM4PDzhsRoEcXOAGYAHxmG9w2tykBejjrHeNLrrvyZFa1ugB9PV1ZS1fGszJz4gyutGr7uYyluPD8IqZ+7UAGt6S/ZHLZTJx3P2Ulz/qBufPuJq+yH55rT2XeLGYUn+Z3aljfbwUwl7KSb5DNPVlvUDdKQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAJNETgYoF9+Zzeq4quAFfTfMJrSUkt/D47JZc/iuYnMnGzhYEbDw7sK+CnQOaMbUi7qzN0NVoRnM294z38zD6tyf5qz2EE5XZmTNkC/Hfi+FYJntZidkN7ICvR06/TfBX1+B788F07LqgK9eta8kmv4CBt4thVVoO8jnzP4b67mWc5nYVbSDd3kymhaC/eSaU+SiC1hRvF3KJ4+FHgN532RRGwjzvs35QXdmHPpdoqn3w+Mo6zkWLK5p6EH0ecSkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkECzCBwMFIunX+6fle25S5lRPKfWapfNOI5YYj0wFRjmH/+diC3Eeb8hlojjuespK3ma4um39NhUOOL5x88teKRy5cfWsofx9OYuXuUIOvFTTuQJVnMfb/lnmc/k1Fpnmr/Bdn7CYu7jTT7NQAbRgV9wEovYwu94iy9zNKczkASeP6+1Y99DJcfSlR8yhnbEeYxVzOYNJnIsv+YVzmAgP2AMv+Zl/swaulHA62ynH+15MhKg38h4/sMO/sVGPs3R/IfR/IUYYDXo9u7APvDPDv8Y0A74D/AOcDzwFrANOBGqW8yHAfoQ8IPh7UBfwDrap+a5Nu/rwA7ACqUtKG8PWFZrnfN/B+3PhQsLoO+L0KcSThqS/OfNjfDnRfCpkbBtF7z4Fpx0DCx8GzZuh48Ng9NtTTt9/hpgC0f564xlLOuYzT104ABv+d/Vx/xK8G104G7mMMDfc3JUEqOEi1nCIE7jDW7hQd6hJ5O5hE/xOt/lz2yiE9/jPJYxgE/yOpfzDwbzHj/lLJ7jaH++…brB0xZVAGAtqpyy+87fNf4HUyf1sNzSz83GXvYnYKXM6qTDBVhJ29tL7uzrJF+rcOC5Dy8Hq5efB1QGSkNdigBLnWXzB/zn10h7RWRj1hcaCpHOK7cB1fwKc4cvBQCWL6UDjnPuTG//1SRguT7Vqy8CqoAWMXRFBQBWRaE0X3bu9kH/avgtoVv6ndkDVJq9tRY7wErc8bOvknxFBt+/csByS787LgGqxK1PMj2AlaStg6TOvmLQv3JLv9f+FVAlbnnS6QGspO0VOXerbBaF/PoNfwNUiVttIj2AlbjNZ2+W9l2XgVXiNptJD2CZsZpEUUC/AgBLv4dkgAJmFABYZqwmURTQrwDA0u8hGaCAGQUAlhmrSRQF9CsAsPR7SAYoYEYBgGXGahJFAf0K/B9qEBa1B23aowAAAABJRU5ErkJggg==","extensions:ANGLE_instanced_arrays;EXT_blend_minmax;EXT_color_buffer_half_float;EXT_disjoint_timer_query;EXT_float_blend;EXT_frag_depth;EXT_shader_texture_lod;EXT_texture_compression_rgtc;EXT_texture_filter_anisotropic;EXT_sRGB;KHR_parallel_shader_compile;OES_element_index_uint;OES_fbo_render_mipmap;OES_standard_derivatives;OES_texture_float;OES_texture_float_linear;OES_texture_half_float;OES_texture_half_float_linear;OES_vertex_array_object;WEBGL_color_buffer_float;WEBGL_compressed_texture_s3tc;WEBGL_compressed_texture_s3tc_srgb;WEBGL_debug_renderer_info;WEBGL_debug_shaders;WEBGL_depth_texture;WEBGL_draw_buffers;WEBGL_lose_context;WEBGL_multi_draw","webgl aliased line width range:[1, 1]","webgl aliased point size range:[1, 8191]","webgl alpha bits:8","webgl antialiasing:yes","webgl blue bits:8","webgl depth bits:24","webgl green bits:8","webgl max anisotropy:16","webgl max combined texture image units:32","webgl max cube map texture size:16384","webgl max fragment uniform vectors:1024","webgl max render buffer size:16384","webgl max texture image units:16","webgl max texture size:16384","webgl max varying vectors:32","webgl max vertex attribs:16","webgl max vertex texture image units:16","webgl max vertex uniform vectors:1024","webgl max viewport dims:[16384, 16384]","webgl red bits:8","webgl renderer:WebKit WebGL","webgl shading language version:WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)","webgl stencil bits:0","webgl vendor:WebKit","webgl version:WebGL 1.0 (OpenGL ES 2.0 Chromium)","webgl unmasked vendor:Google Inc. (ATI Technologies Inc.)","webgl unmasked renderer:ANGLE (ATI Technologies Inc., AMD Radeon Pro 560X OpenGL Engine, OpenGL 4.1)","webgl vertex shader high float precision:23","webgl vertex shader high float precision rangeMin:127","webgl vertex shader high float precision rangeMax:127","webgl vertex shader medium float precision:23","webgl vertex shader medium float precision rangeMin:127","webgl vertex shader medium float precision rangeMax:127","webgl vertex shader low float precision:23","webgl vertex shader low float precision rangeMin:127","webgl vertex shader low float precision rangeMax:127","webgl fragment shader high float precision:23","webgl fragment shader high float precision rangeMin:127","webgl fragment shader high float precision rangeMax:127","webgl fragment shader medium float precision:23","webgl fragment shader medium float precision rangeMin:127","webgl fragment shader medium float precision rangeMax:127","webgl fragment shader low float precision:23","webgl fragment shader low float precision rangeMin:127","webgl fragment shader low float precision rangeMax:127","webgl vertex shader high int precision:0","webgl vertex shader high int precision rangeMin:31","webgl vertex shader high int precision rangeMax:30","webgl vertex shader medium int precision:0","webgl vertex shader medium int precision rangeMin:31","webgl vertex shader medium int precision rangeMax:30","webgl vertex shader low int precision:0","webgl vertex shader low int precision rangeMin:31","webgl vertex shader low int precision rangeMax:30","webgl fragment shader high int precision:0","webgl fragment shader high int precision rangeMin:31","webgl fragment shader high int precision rangeMax:30","webgl fragment shader medium int precision:0","webgl fragment shader medium int precision rangeMin:31","webgl fragment shader medium int precision rangeMax:30","webgl fragment shader low int precision:0","webgl fragment shader low int precision rangeMin:31","webgl fragment shader low int precision rangeMax:30"],webgl_vendor_and_renderer:"Google Inc. (ATI Technologies Inc.)~ANGLE (ATI Technologies Inc., AMD Radeon Pro 560X OpenGL Engine, OpenGL 4.1)",ad_block:!1,has_lied_languages:!1,has_lied_resolution:!1,has_lied_os:!1,has_lied_browser:!1,touch_support:[0,!1,!1],fonts:["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Comic Sans MS","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","LUCIDA GRANDE","Microsoft Sans Serif","Monaco","Palatino","Tahoma","Times","Times New Roman","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],fonts_flash:"swf object not loaded",audio:"124.04347657808103",enumerate_devices:["id=;gid=;audioinput;","id=;gid=;videoinput;","id=;gid=;audiooutput;"]}},policy_request_id:"LoginWithMenu",params:{}}},fu=[{"control_flow.0":["assertion_id","type"]}];class pu extends Error{constructor(e,t){ru.error(`[ERROR] ${e}`),super(e),this.description=e,this.errorCode=t}static convertFromAssertionError(e){switch(e){case 28:return Xd.ClientResponseNotValid;case 29:case 31:case 35:return Xd.InvalidCredentials;case 30:return Xd.ExpiredOTPPasscode;case 32:return Xd.ExpiredValidationPasscode;case 33:return Xd.MaxResendReached;default:return Xd.ServerError}}}var gu,mu,bu;!function(e){e.JsonRejection="Json Rejection",e.TextRejection="Text Rejection",e.UpdateAction="Update Action",e.NextAction="Next Action",e.JourneyEnd="Journey End"}(gu||(gu={})),function(e){e.Pending="pending",e.Completed="completed",e.Rejected="rejected"}(mu||(mu={})),function(e){e.Form="form",e.LoginForm="login_form",e.Rejection="rejection",e.Information="information",e.DebugBreak="debug_break",e.WaitForTicket="wait_for_ticket",e.DrsTriggerAction="transmit_acp",e.IdentityVerification="kyc",e.WebAuthnRegistration="transmit_platform_web_authn_registration"}(bu||(bu={}));var vu={},yu="6.6.1",_u={},wu={},xu={get exports(){return wu},set exports(e){wu=e}},Au=Q(ko);!function(e,t){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function n(e,t,i){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var a;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Au.Buffer}catch(e){}function o(e,t){var i=e.charCodeAt(t);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function s(e,t,i){var r=o(e,i);return i-1>=t&&(r|=o(e,i-1)<<4),r}function c(e,t,i,r){for(var n=0,a=Math.min(e.length,i),o=t;o<a;o++){var s=e.charCodeAt(o)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},n.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},n.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,o,s=0;if("be"===r)for(n=e.length-1,a=0;n>=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n<e.length;n+=3)o=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},n.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,a=0,o=0;if("be"===i)for(r=e.length-1;r>=t;r-=2)n=s(e,t,r)<<a,this.words[o]|=67108863&n,a>=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)n=s(e,t,r)<<a,this.words[o]|=67108863&n,a>=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;this.strip()},n.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,o=a%r,s=Math.min(a,a-o)+i,d=0,u=i;u<s;u+=r)d=c(e,u,u+r,t),this.imuln(n),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(0!==o){var l=1;for(d=c(e,u,e.length,t),u=0;u<o;u++)l*=t;this.imuln(l),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,s=67108863&o,c=o/67108864|0;i.words[0]=s;for(var d=1;d<r;d++){for(var u=c>>>26,l=67108863&c,h=Math.min(d,t.length-1),f=Math.max(0,d-e.length+1);f<=h;f++){var p=d-f|0;u+=(o=(n=0|e.words[p])*(a=0|t.words[f])+l)/67108864|0,l=67108863&o}i.words[d]=0|l,c=0|u}return 0!==c?i.words[d]=0|c:i.length--,i.strip()}n.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=(16777215&(s<<n|a)).toString(16);a=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==a||o!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],f=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?g+r:d[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return i(void 0!==a),this.toArrayLike(a,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,d=new e(a),u=this.clone();if(c){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),d[s]=o;for(;s<a;s++)d[s]=0}else{for(s=0;s<a-n;s++)d[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),d[a-s-1]=o}return d},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++)this.words[r]=t.words[r]^i.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a<r.length;a++)t=(0|i.words[a])+(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;for(;0!==n&&a<i.length;a++)t=(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,o=0;o<r.length;o++)a=(t=(0|i.words[o])-(0|r.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<i.length;o++)a=(t=(0|i.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,i){var r,n,a,o=e.words,s=t.words,c=i.words,d=0,u=0|o[0],l=8191&u,h=u>>>13,f=0|o[1],p=8191&f,g=f>>>13,m=0|o[2],b=8191&m,v=m>>>13,y=0|o[3],_=8191&y,w=y>>>13,x=0|o[4],A=8191&x,E=x>>>13,S=0|o[5],k=8191&S,M=S>>>13,C=0|o[6],I=8191&C,D=C>>>13,T=0|o[7],R=8191&T,z=T>>>13,B=0|o[8],P=8191&B,O=B>>>13,F=0|o[9],N=8191&F,L=F>>>13,j=0|s[0],U=8191&j,q=j>>>13,K=0|s[1],H=8191&K,V=K>>>13,$=0|s[2],J=8191&$,G=$>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],ie=8191&te,re=te>>>13,ne=0|s[6],ae=8191&ne,oe=ne>>>13,se=0|s[7],ce=8191&se,de=se>>>13,ue=0|s[8],le=8191&ue,he=ue>>>13,fe=0|s[9],pe=8191&fe,ge=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(d+(r=Math.imul(l,U))|0)+((8191&(n=(n=Math.imul(l,q))+Math.imul(h,U)|0))<<13)|0;d=((a=Math.imul(h,q))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,U),n=(n=Math.imul(p,q))+Math.imul(g,U)|0,a=Math.imul(g,q);var be=(d+(r=r+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(h,H)|0))<<13)|0;d=((a=a+Math.imul(h,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,U),n=(n=Math.imul(b,q))+Math.imul(v,U)|0,a=Math.imul(v,q),r=r+Math.imul(p,H)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,V)|0;var ve=(d+(r=r+Math.imul(l,J)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(h,J)|0))<<13)|0;d=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,U),n=(n=Math.imul(_,q))+Math.imul(w,U)|0,a=Math.imul(w,q),r=r+Math.imul(b,H)|0,n=(n=n+Math.imul(b,V)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,V)|0,r=r+Math.imul(p,J)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,G)|0;var ye=(d+(r=r+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;d=((a=a+Math.imul(h,Y)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(A,U),n=(n=Math.imul(A,q))+Math.imul(E,U)|0,a=Math.imul(E,q),r=r+Math.imul(_,H)|0,n=(n=n+Math.imul(_,V)|0)+Math.imul(w,H)|0,a=a+Math.imul(w,V)|0,r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(g,Z)|0,a=a+Math.imul(g,Y)|0;var _e=(d+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(h,X)|0))<<13)|0;d=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(k,U),n=(n=Math.imul(k,q))+Math.imul(M,U)|0,a=Math.imul(M,q),r=r+Math.imul(A,H)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,V)|0,r=r+Math.imul(_,J)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Y)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,ee)|0;var we=(d+(r=r+Math.imul(l,ie)|0)|0)+((8191&(n=(n=n+Math.imul(l,re)|0)+Math.imul(h,ie)|0))<<13)|0;d=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(I,U),n=(n=Math.imul(I,q))+Math.imul(D,U)|0,a=Math.imul(D,q),r=r+Math.imul(k,H)|0,n=(n=n+Math.imul(k,V)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,V)|0,r=r+Math.imul(A,J)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,G)|0,r=r+Math.imul(_,Z)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Z)|0,a=a+Math.imul(w,Y)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(g,ie)|0,a=a+Math.imul(g,re)|0;var xe=(d+(r=r+Math.imul(l,ae)|0)|0)+((8191&(n=(n=n+Math.imul(l,oe)|0)+Math.imul(h,ae)|0))<<13)|0;d=((a=a+Math.imul(h,oe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,U),n=(n=Math.imul(R,q))+Math.imul(z,U)|0,a=Math.imul(z,q),r=r+Math.imul(I,H)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(D,H)|0,a=a+Math.imul(D,V)|0,r=r+Math.imul(k,J)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,G)|0,r=r+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(p,ae)|0,n=(n=n+Math.imul(p,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0;var Ae=(d+(r=r+Math.imul(l,ce)|0)|0)+((8191&(n=(n=n+Math.imul(l,de)|0)+Math.imul(h,ce)|0))<<13)|0;d=((a=a+Math.imul(h,de)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(P,U),n=(n=Math.imul(P,q))+Math.imul(O,U)|0,a=Math.imul(O,q),r=r+Math.imul(R,H)|0,n=(n=n+Math.imul(R,V)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,V)|0,r=r+Math.imul(I,J)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,G)|0,r=r+Math.imul(k,Z)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(A,X)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0,r=r+Math.imul(p,ce)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(g,ce)|0,a=a+Math.imul(g,de)|0;var Ee=(d+(r=r+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;d=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(N,U),n=(n=Math.imul(N,q))+Math.imul(L,U)|0,a=Math.imul(L,q),r=r+Math.imul(P,H)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,V)|0,r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,G)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,Y)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,ee)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(A,ie)|0,n=(n=n+Math.imul(A,re)|0)+Math.imul(E,ie)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,oe)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,oe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,de)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,de)|0,r=r+Math.imul(p,le)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(g,le)|0,a=a+Math.imul(g,he)|0;var Se=(d+(r=r+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,ge)|0)+Math.imul(h,pe)|0))<<13)|0;d=((a=a+Math.imul(h,ge)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(N,H),n=(n=Math.imul(N,V))+Math.imul(L,H)|0,a=Math.imul(L,V),r=r+Math.imul(P,J)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,Y)|0)+Math.imul(z,Z)|0,a=a+Math.imul(z,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(D,X)|0,a=a+Math.imul(D,ee)|0,r=r+Math.imul(k,ie)|0,n=(n=n+Math.imul(k,re)|0)+Math.imul(M,ie)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(A,ae)|0,n=(n=n+Math.imul(A,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,de)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,de)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,he)|0;var ke=(d+(r=r+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;d=((a=a+Math.imul(g,ge)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(N,J),n=(n=Math.imul(N,G))+Math.imul(L,J)|0,a=Math.imul(L,G),r=r+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,Y)|0,r=r+Math.imul(R,X)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(D,ie)|0,a=a+Math.imul(D,re)|0,r=r+Math.imul(k,ae)|0,n=(n=n+Math.imul(k,oe)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,r=r+Math.imul(A,ce)|0,n=(n=n+Math.imul(A,de)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,de)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,he)|0;var Me=(d+(r=r+Math.imul(b,pe)|0)|0)+((8191&(n=(n=n+Math.imul(b,ge)|0)+Math.imul(v,pe)|0))<<13)|0;d=((a=a+Math.imul(v,ge)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(N,Z),n=(n=Math.imul(N,Y))+Math.imul(L,Z)|0,a=Math.imul(L,Y),r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(z,ie)|0,a=a+Math.imul(z,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,oe)|0)+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,r=r+Math.imul(k,ce)|0,n=(n=n+Math.imul(k,de)|0)+Math.imul(M,ce)|0,a=a+Math.imul(M,de)|0,r=r+Math.imul(A,le)|0,n=(n=n+Math.imul(A,he)|0)+Math.imul(E,le)|0,a=a+Math.imul(E,he)|0;var Ce=(d+(r=r+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;d=((a=a+Math.imul(w,ge)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(L,X)|0,a=Math.imul(L,ee),r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(O,ie)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(R,ae)|0,n=(n=n+Math.imul(R,oe)|0)+Math.imul(z,ae)|0,a=a+Math.imul(z,oe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(D,ce)|0,a=a+Math.imul(D,de)|0,r=r+Math.imul(k,le)|0,n=(n=n+Math.imul(k,he)|0)+Math.imul(M,le)|0,a=a+Math.imul(M,he)|0;var Ie=(d+(r=r+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,ge)|0)+Math.imul(E,pe)|0))<<13)|0;d=((a=a+Math.imul(E,ge)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(N,ie),n=(n=Math.imul(N,re))+Math.imul(L,ie)|0,a=Math.imul(L,re),r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,oe)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,r=r+Math.imul(R,ce)|0,n=(n=n+Math.imul(R,de)|0)+Math.imul(z,ce)|0,a=a+Math.imul(z,de)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(D,le)|0,a=a+Math.imul(D,he)|0;var De=(d+(r=r+Math.imul(k,pe)|0)|0)+((8191&(n=(n=n+Math.imul(k,ge)|0)+Math.imul(M,pe)|0))<<13)|0;d=((a=a+Math.imul(M,ge)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(N,ae),n=(n=Math.imul(N,oe))+Math.imul(L,ae)|0,a=Math.imul(L,oe),r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,ce)|0,a=a+Math.imul(O,de)|0,r=r+Math.imul(R,le)|0,n=(n=n+Math.imul(R,he)|0)+Math.imul(z,le)|0,a=a+Math.imul(z,he)|0;var Te=(d+(r=r+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,ge)|0)+Math.imul(D,pe)|0))<<13)|0;d=((a=a+Math.imul(D,ge)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(N,ce),n=(n=Math.imul(N,de))+Math.imul(L,ce)|0,a=Math.imul(L,de),r=r+Math.imul(P,le)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(O,le)|0,a=a+Math.imul(O,he)|0;var Re=(d+(r=r+Math.imul(R,pe)|0)|0)+((8191&(n=(n=n+Math.imul(R,ge)|0)+Math.imul(z,pe)|0))<<13)|0;d=((a=a+Math.imul(z,ge)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(N,le),n=(n=Math.imul(N,he))+Math.imul(L,le)|0,a=Math.imul(L,he);var ze=(d+(r=r+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,ge)|0)+Math.imul(O,pe)|0))<<13)|0;d=((a=a+Math.imul(O,ge)|0)+(n>>>13)|0)+(ze>>>26)|0,ze&=67108863;var Be=(d+(r=Math.imul(N,pe))|0)+((8191&(n=(n=Math.imul(N,ge))+Math.imul(L,pe)|0))<<13)|0;return d=((a=Math.imul(L,ge))+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=me,c[1]=be,c[2]=ve,c[3]=ye,c[4]=_e,c[5]=we,c[6]=xe,c[7]=Ae,c[8]=Ee,c[9]=Se,c[10]=ke,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=De,c[15]=Te,c[16]=Re,c[17]=ze,c[18]=Be,0!==d&&(c[19]=d,i.length++),i};function p(e,t,i){return(new g).mulp(e,t,i)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),n.prototype.mulTo=function(e,t){var i,r=this.length+e.length;return i=10===this.length&&10===e.length?f(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a<i.length-1;a++){var o=n;n=0;for(var s=67108863&r,c=Math.min(a,t.length-1),d=Math.max(0,a-e.length+1);d<=c;d++){var u=a-d,l=(0|e.words[u])*(0|t.words[d]),h=67108863&l;s=67108863&(h=h+s|0),n+=(o=(o=o+(l/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}i.words[a]=s,r=o,o=n}return 0!==r?i.words[a]=r:i.length--,i.strip()}(this,e,t):p(this,e,t),i},g.prototype.makeRBT=function(e){for(var t=new Array(e),i=n.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,i,e);return t},g.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var r=0,n=0;n<t;n++)r|=(1&e)<<t-n-1,e>>=1;return r},g.prototype.permute=function(e,t,i,r,n,a){for(var o=0;o<a;o++)r[o]=t[e[o]],n[o]=i[e[o]]},g.prototype.transform=function(e,t,i,r,n,a){this.permute(a,e,t,i,r,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),d=Math.sin(2*Math.PI/s),u=0;u<n;u+=s)for(var l=c,h=d,f=0;f<o;f++){var p=i[u+f],g=r[u+f],m=i[u+f+o],b=r[u+f+o],v=l*m-h*b;b=l*b+h*m,m=v,i[u+f]=p+m,r[u+f]=g+b,i[u+f+o]=p-m,r[u+f+o]=g-b,f!==s&&(v=c*l-d*h,h=c*h+d*l,l=v)}},g.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=e[r];e[r]=e[i-r-1],e[i-r-1]=n,n=t[r],t[r]=-t[i-r-1],t[i-r-1]=-n}},g.prototype.normalize13b=function(e,t){for(var i=0,r=0;r<t/2;r++){var n=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+i;e[r]=67108863&n,i=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<n;++o)r[o]=0;i(0===a),i(0==(-8192&a))},g.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},g.prototype.mulp=function(e,t,i){var r=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(r),a=this.stub(r),o=new Array(r),s=new Array(r),c=new Array(r),d=new Array(r),u=new Array(r),l=new Array(r),h=i.words;h.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,d,r),this.transform(o,a,s,c,r,n),this.transform(d,a,u,l,r,n);for(var f=0;f<r;f++){var p=s[f]*u[f]-c[f]*l[f];c[f]=s[f]*l[f]+c[f]*u[f],s[f]=p}return this.conjugate(s,c,r),this.transform(s,c,h,a,r,n),this.conjugate(h,a,r),this.normalize13b(h,r),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,a=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var r=i/26|0,n=i%26;t[i]=(e.words[r]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr());if(++r<t.length)for(var a=i.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(i=i.mul(a));return i},n.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,c=(0|this.words[t])-s<<r;this.words[t]=c|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=r;if(n-=o,n=Math.max(0,n),c){for(var d=0;d<o;d++)c.words[d]=this.words[d];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,d=0;d<this.length;d++)this.words[d]=this.words[d+o];else this.words[0]=0,this.length=1;var u=0;for(d=this.length-1;d>=0&&(0!==u||d>=n);d--){var l=0|this.words[d];this.words[d]=u<<26-a|l>>>a,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,r){var n,a,o=e.length+r;this._expand(o);var s=0;for(n=0;n<e.length;n++){a=(0|this.words[n+r])+s;var c=(0|e.words[n])*t;s=((a-=67108863&c)>>26)-(c/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)s=(a=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&a;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n<this.length;n++)s=(a=-(0|this.words[n])+s)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),a=e,o=0|a.words[a.length-1];0!=(i=26-this._countBits(o))&&(a=a.ushln(i),r.iushln(i),o=0|a.words[a.length-1]);var s,c=r.length-a.length;if("mod"!==t){(s=new n(null)).length=c+1,s.words=new Array(s.length);for(var d=0;d<s.length;d++)s.words[d]=0}var u=r.clone()._ishlnsubmul(a,1,c);0===u.negative&&(r=u,s&&(s.words[c]=1));for(var l=c-1;l>=0;l--){var h=67108864*(0|r.words[a.length+l])+(0|r.words[a.length+l-1]);for(h=Math.min(h/o|0,67108863),r._ishlnsubmul(a,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(a,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},n.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},n.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new n(1),o=new n(0),s=new n(0),c=new n(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var u=r.clone(),l=t.clone();!t.isZero();){for(var h=0,f=1;0==(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(l)),a.iushrn(1),o.iushrn(1);for(var p=0,g=1;0==(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(d)}},n.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new n(1),s=new n(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new x(e)},n.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(v,b),v.prototype.split=function(e,t){for(var i=4194303,r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&i,n=10;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(o&i)<<4|a>>>22,a=o}a>>>=22,e.words[n-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(y,b),r(_,b),r(w,b),w.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},x.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},x.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new n(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);i(!a.isZero());var s=new n(1).toRed(this),c=s.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new n(2*u*u).toRed(this);0!==this.pow(u,d).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,a),h=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),p=o;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();i(m<p);var b=this.pow(l,new n(1).iushln(p-m-1));h=h.redMul(b),l=b.redSqr(),f=f.redMul(l),p=m}return h},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=e;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],e);var a=i[0],o=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var d=t.words[r],u=c-1;u>=0;u--){var l=d>>u&1;a!==i[0]&&(a=this.sqr(a)),0!==l||0!==o?(o<<=1,o|=l,(4==++s||0===r&&0===u)&&(a=this.mul(a,i[o]),s=0,o=0)):s=0}c=26}return a},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new A(e)},r(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=i.isub(r).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(xu,Z);var Eu=Su;function Su(e,t){if(!e)throw new Error(t||"Assertion failed")}Su.equal=function(e,t,i){if(e!=t)throw new Error(i||"Assertion failed: "+e+" != "+t)};var ku={};!function(e){var t=ku;function i(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)i[r]=0|e[r];return i}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)i.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var n=e.charCodeAt(r),a=n>>8,o=255&n;a?i.push(a,o):i.push(o)}return i},t.zero2=i,t.toHex=r,t.encode=function(e,t){return"hex"===t?r(e):e}}(),function(e){var t=_u,i=wu,r=Eu,n=ku;t.assert=r,t.toArray=n.toArray,t.zero2=n.zero2,t.toHex=n.toHex,t.encode=n.encode,t.getNAF=function(e,t,i){var r,n=new Array(Math.max(e.bitLength(),i)+1);for(r=0;r<n.length;r+=1)n[r]=0;var a=1<<t+1,o=e.clone();for(r=0;r<n.length;r++){var s,c=o.andln(a-1);o.isOdd()?(s=c>(a>>1)-1?(a>>1)-c:c,o.isubn(s)):s=0,n[r]=s,o.iushrn(1)}return n},t.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r,n=0,a=0;e.cmpn(-n)>0||t.cmpn(-a)>0;){var o,s,c=e.andln(3)+n&3,d=t.andln(3)+a&3;3===c&&(c=-1),3===d&&(d=-1),o=0==(1&c)?0:3!==(r=e.andln(7)+n&7)&&5!==r||2!==d?c:-c,i[0].push(o),s=0==(1&d)?0:3!==(r=t.andln(7)+a&7)&&5!==r||2!==c?d:-d,i[1].push(s),2*n===o+1&&(n=1-n),2*a===s+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return i},t.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new i(e,"hex","le")}}();var Mu,Cu={},Iu={get exports(){return Cu},set exports(e){Cu=e}},Du=Q(Object.freeze({__proto__:null,default:{}}));function Tu(e){this.rand=e}if(Iu.exports=function(e){return Mu||(Mu=new Tu(null)),Mu.generate(e)},Cu.Rand=Tu,Tu.prototype.generate=function(e){return this._rand(e)},Tu.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Tu.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?Tu.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(Tu.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Ru=Du;if("function"!=typeof Ru.randomBytes)throw new Error("Not supported");Tu.prototype._rand=function(e){return Ru.randomBytes(e)}}catch(e){}var zu={},Bu=wu,Pu=_u,Ou=Pu.getNAF,Fu=Pu.getJSF,Nu=Pu.assert;function Lu(e,t){this.type=e,this.p=new Bu(t.p,16),this.red=t.prime?Bu.red(t.prime):Bu.mont(this.p),this.zero=new Bu(0).toRed(this.red),this.one=new Bu(1).toRed(this.red),this.two=new Bu(2).toRed(this.red),this.n=t.n&&new Bu(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ju=Lu;function Uu(e,t){this.curve=e,this.type=t,this.precomputed=null}Lu.prototype.point=function(){throw new Error("Not implemented")},Lu.prototype.validate=function(){throw new Error("Not implemented")},Lu.prototype._fixedNafMul=function(e,t){Nu(e.precomputed);var i=e._getDoubles(),r=Ou(t,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var a,o,s=[];for(a=0;a<r.length;a+=i.step){o=0;for(var c=a+i.step-1;c>=a;c--)o=(o<<1)+r[c];s.push(o)}for(var d=this.jpoint(null,null,null),u=this.jpoint(null,null,null),l=n;l>0;l--){for(a=0;a<s.length;a++)(o=s[a])===l?u=u.mixedAdd(i.points[a]):o===-l&&(u=u.mixedAdd(i.points[a].neg()));d=d.add(u)}return d.toP()},Lu.prototype._wnafMul=function(e,t){var i=4,r=e._getNAFPoints(i);i=r.wnd;for(var n=r.points,a=Ou(t,i,this._bitLength),o=this.jpoint(null,null,null),s=a.length-1;s>=0;s--){for(var c=0;s>=0&&0===a[s];s--)c++;if(s>=0&&c++,o=o.dblp(c),s<0)break;var d=a[s];Nu(0!==d),o="affine"===e.type?d>0?o.mixedAdd(n[d-1>>1]):o.mixedAdd(n[-d-1>>1].neg()):d>0?o.add(n[d-1>>1]):o.add(n[-d-1>>1].neg())}return"affine"===e.type?o.toP():o},Lu.prototype._wnafMulAdd=function(e,t,i,r,n){var a,o,s,c=this._wnafT1,d=this._wnafT2,u=this._wnafT3,l=0;for(a=0;a<r;a++){var h=(s=t[a])._getNAFPoints(e);c[a]=h.wnd,d[a]=h.points}for(a=r-1;a>=1;a-=2){var f=a-1,p=a;if(1===c[f]&&1===c[p]){var g=[t[f],null,null,t[p]];0===t[f].y.cmp(t[p].y)?(g[1]=t[f].add(t[p]),g[2]=t[f].toJ().mixedAdd(t[p].neg())):0===t[f].y.cmp(t[p].y.redNeg())?(g[1]=t[f].toJ().mixedAdd(t[p]),g[2]=t[f].add(t[p].neg())):(g[1]=t[f].toJ().mixedAdd(t[p]),g[2]=t[f].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=Fu(i[f],i[p]);for(l=Math.max(b[0].length,l),u[f]=new Array(l),u[p]=new Array(l),o=0;o<l;o++){var v=0|b[0][o],y=0|b[1][o];u[f][o]=m[3*(v+1)+(y+1)],u[p][o]=0,d[f]=g}}else u[f]=Ou(i[f],c[f],this._bitLength),u[p]=Ou(i[p],c[p],this._bitLength),l=Math.max(u[f].length,l),l=Math.max(u[p].length,l)}var _=this.jpoint(null,null,null),w=this._wnafT4;for(a=l;a>=0;a--){for(var x=0;a>=0;){var A=!0;for(o=0;o<r;o++)w[o]=0|u[o][a],0!==w[o]&&(A=!1);if(!A)break;x++,a--}if(a>=0&&x++,_=_.dblp(x),a<0)break;for(o=0;o<r;o++){var E=w[o];0!==E&&(E>0?s=d[o][E-1>>1]:E<0&&(s=d[o][-E-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(a=0;a<r;a++)d[a]=null;return n?_:_.toP()},Lu.BasePoint=Uu,Uu.prototype.eq=function(){throw new Error("Not implemented")},Uu.prototype.validate=function(){return this.curve.validate(this)},Lu.prototype.decodePoint=function(e,t){e=Pu.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?Nu(e[e.length-1]%2==0):7===e[0]&&Nu(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format")},Uu.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Uu.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},Uu.prototype.encode=function(e,t){return Pu.encode(this._encode(t),e)},Uu.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Uu.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Uu.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<t;n+=e){for(var a=0;a<e;a++)r=r.dbl();i.push(r)}return{step:e,points:i}},Uu.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)t[n]=t[n-1].add(r);return{wnd:e,points:t}},Uu.prototype._getBeta=function(){return null},Uu.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t};var qu={},Ku={get exports(){return qu},set exports(e){qu=e}};"function"==typeof Object.create?Ku.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ku.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}};var Hu=wu,Vu=qu,$u=ju,Ju=_u.assert;function Gu(e){$u.call(this,"short",e),this.a=new Hu(e.a,16).toRed(this.red),this.b=new Hu(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Vu(Gu,$u);var Wu=Gu;function Zu(e,t,i,r){$u.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new Hu(t,16),this.y=new Hu(i,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Yu(e,t,i,r){$u.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Hu(0)):(this.x=new Hu(t,16),this.y=new Hu(i,16),this.z=new Hu(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Gu.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new Hu(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)i=new Hu(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?i=n[0]:(i=n[1],Ju(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map((function(e){return{a:new Hu(e.a,16),b:new Hu(e.b,16)}})):this._getEndoBasis(i)}}},Gu.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:Hu.mont(e),i=new Hu(2).toRed(t).redInvm(),r=i.redNeg(),n=new Hu(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(n).fromRed(),r.redSub(n).fromRed()]},Gu.prototype._getEndoBasis=function(e){for(var t,i,r,n,a,o,s,c,d,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),f=new Hu(1),p=new Hu(0),g=new Hu(0),m=new Hu(1),b=0;0!==l.cmpn(0);){var v=h.div(l);c=h.sub(v.mul(l)),d=g.sub(v.mul(f));var y=m.sub(v.mul(p));if(!r&&c.cmp(u)<0)t=s.neg(),i=f,r=c.neg(),n=d;else if(r&&2==++b)break;s=c,h=l,l=c,g=f,f=d,m=p,p=y}a=c.neg(),o=d;var _=r.sqr().add(n.sqr());return a.sqr().add(o.sqr()).cmp(_)>=0&&(a=t,o=i),r.negative&&(r=r.neg(),n=n.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:r,b:n},{a:a,b:o}]},Gu.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),o=n.mul(i.a),s=a.mul(r.a),c=n.mul(i.b),d=a.mul(r.b);return{k1:e.sub(o).sub(s),k2:c.add(d).neg()}},Gu.prototype.pointFromX=function(e,t){(e=new Hu(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var n=r.fromRed().isOdd();return(t&&!n||!t&&n)&&(r=r.redNeg()),this.point(e,r)},Gu.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},Gu.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*a]=s,r[2*a+1]=c,n[2*a]=o.k1,n[2*a+1]=o.k2}for(var d=this._wnafMulAdd(1,r,n,2*a,i),u=0;u<2*a;u++)r[u]=null,n[u]=null;return d},Vu(Zu,$u.BasePoint),Gu.prototype.point=function(e,t,i){return new Zu(this,e,t,i)},Gu.prototype.pointFromJSON=function(e,t){return Zu.fromJSON(this,e,t)},Zu.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,r=function(e){return i.point(e.x.redMul(i.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},Zu.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Zu.fromJSON=function(e,t,i){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],i);if(!t[2])return r;function n(t){return e.point(t[0],t[1],i)}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(n))}},r},Zu.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Zu.prototype.isInfinity=function(){return this.inf},Zu.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},Zu.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},Zu.prototype.getX=function(){return this.x.fromRed()},Zu.prototype.getY=function(){return this.y.fromRed()},Zu.prototype.mul=function(e){return e=new Hu(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Zu.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},Zu.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},Zu.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Zu.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t},Zu.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Vu(Yu,$u.BasePoint),Gu.prototype.jpoint=function(e,t,i){return new Yu(this,e,t,i)},Yu.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)},Yu.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Yu.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),s=r.redSub(n),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=s.redSqr(),u=d.redMul(s),l=r.redMul(d),h=c.redSqr().redIAdd(u).redISub(l).redISub(l),f=c.redMul(l.redISub(h)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,f,p)},Yu.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),o=i.redSub(r),s=n.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),d=c.redMul(o),u=i.redMul(c),l=s.redSqr().redIAdd(d).redISub(u).redISub(u),h=s.redMul(u.redISub(l)).redISub(n.redMul(d)),f=this.z.redMul(o);return this.curve.jpoint(l,h,f)},Yu.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var i=this;for(t=0;t<e;t++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,a=this.x,o=this.y,s=this.z,c=s.redSqr().redSqr(),d=o.redAdd(o);for(t=0;t<e;t++){var u=a.redSqr(),l=d.redSqr(),h=l.redSqr(),f=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(c)),p=a.redMul(l),g=f.redSqr().redISub(p.redAdd(p)),m=p.redISub(g),b=f.redMul(m);b=b.redIAdd(b).redISub(h);var v=d.redMul(s);t+1<e&&(c=c.redMul(h)),a=g,s=v,d=b}return this.curve.jpoint(a,d.redMul(n),s)},Yu.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Yu.prototype._zeroDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r),c=s.redSqr().redISub(o).redISub(o),d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),e=c,t=s.redMul(o.redISub(c)).redISub(d),i=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),f=this.x.redAdd(l).redSqr().redISub(u).redISub(h);f=f.redIAdd(f);var p=u.redAdd(u).redIAdd(u),g=p.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),e=g.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(m),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(e,t,i)},Yu.prototype._threeDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=s.redSqr().redISub(o).redISub(o);e=c;var d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),t=s.redMul(o.redISub(c)).redISub(d),i=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),f=this.x.redSub(u).redMul(this.x.redAdd(u));f=f.redAdd(f).redIAdd(f);var p=h.redIAdd(h),g=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(g),i=this.y.redAdd(this.z).redSqr().redISub(l).redISub(u);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=f.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,i)},Yu.prototype._dbl=function(){var e=this.curve.a,t=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),a=t.redSqr(),o=i.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n)),c=t.redAdd(t),d=(c=c.redIAdd(c)).redMul(o),u=s.redSqr().redISub(d.redAdd(d)),l=d.redISub(u),h=o.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=s.redMul(l).redISub(h),p=i.redAdd(i).redMul(r);return this.curve.jpoint(u,f,p)},Yu.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr(),r=t.redSqr(),n=e.redAdd(e).redIAdd(e),a=n.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=n.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(c),u=t.redMul(d);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.x.redMul(s).redISub(u);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(d.redMul(c.redISub(d)).redISub(o.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=this.z.redAdd(o).redSqr().redISub(i).redISub(s);return this.curve.jpoint(l,h,f)},Yu.prototype.mul=function(e,t){return e=new Hu(e,t),this.curve._wnafMul(this,e)},Yu.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),i=e.z.redSqr();if(0!==this.x.redMul(i).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),n=i.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(r)).cmpn(0)},Yu.prototype.eqXToP=function(e){var t=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(i))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},Yu.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Yu.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Qu=wu,Xu=qu,el=ju,tl=_u;function il(e){el.call(this,"mont",e),this.a=new Qu(e.a,16).toRed(this.red),this.b=new Qu(e.b,16).toRed(this.red),this.i4=new Qu(4).toRed(this.red).redInvm(),this.two=new Qu(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Xu(il,el);var rl=il;function nl(e,t,i){el.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Qu(t,16),this.z=new Qu(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}il.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},Xu(nl,el.BasePoint),il.prototype.decodePoint=function(e,t){return this.point(tl.toArray(e,t),1)},il.prototype.point=function(e,t){return new nl(this,e,t)},il.prototype.pointFromJSON=function(e){return nl.fromJSON(this,e)},nl.prototype.precompute=function(){},nl.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},nl.fromJSON=function(e,t){return new nl(e,t[0],t[1]||e.one)},nl.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},nl.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},nl.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},nl.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},nl.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),o=n.redMul(r),s=t.z.redMul(a.redAdd(o).redSqr()),c=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,c)},nl.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},nl.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},nl.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},nl.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},nl.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},nl.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var al=wu,ol=qu,sl=ju,cl=_u.assert;function dl(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,sl.call(this,"edwards",e),this.a=new al(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new al(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new al(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),cl(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}ol(dl,sl);var ul=dl;function ll(e,t,i,r,n){sl.BasePoint.call(this,e,"projective"),null===t&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new al(t,16),this.y=new al(i,16),this.z=r?new al(r,16):this.curve.one,this.t=n&&new al(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}dl.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},dl.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},dl.prototype.jpoint=function(e,t,i,r){return this.point(e,t,i,r)},dl.prototype.pointFromX=function(e,t){(e=new al(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),r=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),a=r.redMul(n.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=o.fromRed().isOdd();return(t&&!s||!t&&s)&&(o=o.redNeg()),this.point(e,o)},dl.prototype.pointFromY=function(e,t){(e=new al(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),r=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(n.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},dl.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),i=e.y.redSqr(),r=t.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(i)));return 0===r.cmp(n)},ol(ll,sl.BasePoint),dl.prototype.pointFromJSON=function(e){return ll.fromJSON(this,e)},dl.prototype.point=function(e,t,i,r){return new ll(this,e,t,i,r)},ll.fromJSON=function(e,t){return new ll(e,t[0],t[1],t[2])},ll.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},ll.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},ll.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),o=a.redSub(i),s=r.redSub(t),c=n.redMul(o),d=a.redMul(s),u=n.redMul(s),l=o.redMul(a);return this.curve.point(c,d,l,u)},ll.prototype._projDbl=function(){var e,t,i,r,n,a,o=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var d=(r=this.curve._mulA(s)).redAdd(c);this.zOne?(e=o.redSub(s).redSub(c).redMul(d.redSub(this.curve.two)),t=d.redMul(r.redSub(c)),i=d.redSqr().redSub(d).redSub(d)):(n=this.z.redSqr(),a=d.redSub(n).redISub(n),e=o.redSub(s).redISub(c).redMul(a),t=d.redMul(r.redSub(c)),i=d.redMul(a))}else r=s.redAdd(c),n=this.curve._mulC(this.z).redSqr(),a=r.redSub(n).redSub(n),e=this.curve._mulC(o.redISub(r)).redMul(a),t=this.curve._mulC(r).redMul(s.redISub(c)),i=r.redMul(a);return this.curve.point(e,t,i)},ll.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},ll.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),o=n.redSub(r),s=n.redAdd(r),c=i.redAdd(t),d=a.redMul(o),u=s.redMul(c),l=a.redMul(c),h=o.redMul(s);return this.curve.point(d,u,h,l)},ll.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),c=n.redSub(s),d=n.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=r.redMul(c).redMul(u);return this.curve.twisted?(t=r.redMul(d).redMul(o.redSub(this.curve._mulA(a))),i=c.redMul(d)):(t=r.redMul(d).redMul(o.redSub(a)),i=this.curve._mulC(c).redMul(d)),this.curve.point(l,t,i)},ll.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},ll.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},ll.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},ll.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},ll.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},ll.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},ll.prototype.getX=function(){return this.normalize(),this.x.fromRed()},ll.prototype.getY=function(){return this.normalize(),this.y.fromRed()},ll.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},ll.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},ll.prototype.toP=ll.prototype.normalize,ll.prototype.mixedAdd=ll.prototype.add,function(e){var t=e;t.base=ju,t.short=Wu,t.mont=rl,t.edwards=ul}(zu);var hl={},fl={},pl={},gl=Eu,ml=qu;function bl(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function vl(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function yl(e){return 1===e.length?"0"+e:e}function _l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}pl.inherits=ml,pl.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)i.push(parseInt(e[n]+e[n+1],16))}else for(var r=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?i[r++]=a:a<2048?(i[r++]=a>>6|192,i[r++]=63&a|128):bl(e,n)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++n)),i[r++]=a>>18|240,i[r++]=a>>12&63|128,i[r++]=a>>6&63|128,i[r++]=63&a|128):(i[r++]=a>>12|224,i[r++]=a>>6&63|128,i[r++]=63&a|128)}else for(n=0;n<e.length;n++)i[n]=0|e[n];return i},pl.toHex=function(e){for(var t="",i=0;i<e.length;i++)t+=yl(e[i].toString(16));return t},pl.htonl=vl,pl.toHex32=function(e,t){for(var i="",r=0;r<e.length;r++){var n=e[r];"little"===t&&(n=vl(n)),i+=_l(n.toString(16))}return i},pl.zero2=yl,pl.zero8=_l,pl.join32=function(e,t,i,r){var n=i-t;gl(n%4==0);for(var a=new Array(n/4),o=0,s=t;o<a.length;o++,s+=4){var c;c="big"===r?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],a[o]=c>>>0}return a},pl.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r<e.length;r++,n+=4){var a=e[r];"big"===t?(i[n]=a>>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a)}return i},pl.rotr32=function(e,t){return e>>>t|e<<32-t},pl.rotl32=function(e,t){return e<<t|e>>>32-t},pl.sum32=function(e,t){return e+t>>>0},pl.sum32_3=function(e,t,i){return e+t+i>>>0},pl.sum32_4=function(e,t,i,r){return e+t+i+r>>>0},pl.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0},pl.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,o=(a<r?1:0)+i+n;e[t]=o>>>0,e[t+1]=a},pl.sum64_hi=function(e,t,i,r){return(t+r>>>0<t?1:0)+e+i>>>0},pl.sum64_lo=function(e,t,i,r){return t+r>>>0},pl.sum64_4_hi=function(e,t,i,r,n,a,o,s){var c=0,d=t;return c+=(d=d+r>>>0)<t?1:0,c+=(d=d+a>>>0)<a?1:0,e+i+n+o+(c+=(d=d+s>>>0)<s?1:0)>>>0},pl.sum64_4_lo=function(e,t,i,r,n,a,o,s){return t+r+a+s>>>0},pl.sum64_5_hi=function(e,t,i,r,n,a,o,s,c,d){var u=0,l=t;return u+=(l=l+r>>>0)<t?1:0,u+=(l=l+a>>>0)<a?1:0,u+=(l=l+s>>>0)<s?1:0,e+i+n+o+c+(u+=(l=l+d>>>0)<d?1:0)>>>0},pl.sum64_5_lo=function(e,t,i,r,n,a,o,s,c,d){return t+r+a+s+d>>>0},pl.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},pl.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},pl.shr64_hi=function(e,t,i){return e>>>i},pl.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0};var wl={},xl=pl,Al=Eu;function El(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}wl.BlockHash=El,El.prototype.update=function(e,t){if(e=xl.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=xl.join32(e,0,e.length-i,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},El.prototype.digest=function(e){return this.update(this._pad()),Al(null===this.pending),this._digest(e)},El.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;a<this.padLength;a++)r[n++]=0;return r};var Sl={},kl={},Ml=pl.rotr32;function Cl(e,t,i){return e&t^~e&i}function Il(e,t,i){return e&t^e&i^t&i}function Dl(e,t,i){return e^t^i}kl.ft_1=function(e,t,i,r){return 0===e?Cl(t,i,r):1===e||3===e?Dl(t,i,r):2===e?Il(t,i,r):void 0},kl.ch32=Cl,kl.maj32=Il,kl.p32=Dl,kl.s0_256=function(e){return Ml(e,2)^Ml(e,13)^Ml(e,22)},kl.s1_256=function(e){return Ml(e,6)^Ml(e,11)^Ml(e,25)},kl.g0_256=function(e){return Ml(e,7)^Ml(e,18)^e>>>3},kl.g1_256=function(e){return Ml(e,17)^Ml(e,19)^e>>>10};var Tl=pl,Rl=wl,zl=kl,Bl=Tl.rotl32,Pl=Tl.sum32,Ol=Tl.sum32_5,Fl=zl.ft_1,Nl=Rl.BlockHash,Ll=[1518500249,1859775393,2400959708,3395469782];function jl(){if(!(this instanceof jl))return new jl;Nl.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Tl.inherits(jl,Nl);var Ul=jl;jl.blockSize=512,jl.outSize=160,jl.hmacStrength=80,jl.padLength=64,jl.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++)i[r]=e[t+r];for(;r<i.length;r++)i[r]=Bl(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);var n=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],c=this.h[4];for(r=0;r<i.length;r++){var d=~~(r/20),u=Ol(Bl(n,5),Fl(d,a,o,s),c,i[r],Ll[d]);c=s,s=o,o=Bl(a,30),a=n,n=u}this.h[0]=Pl(this.h[0],n),this.h[1]=Pl(this.h[1],a),this.h[2]=Pl(this.h[2],o),this.h[3]=Pl(this.h[3],s),this.h[4]=Pl(this.h[4],c)},jl.prototype._digest=function(e){return"hex"===e?Tl.toHex32(this.h,"big"):Tl.split32(this.h,"big")};var ql=pl,Kl=wl,Hl=kl,Vl=Eu,$l=ql.sum32,Jl=ql.sum32_4,Gl=ql.sum32_5,Wl=Hl.ch32,Zl=Hl.maj32,Yl=Hl.s0_256,Ql=Hl.s1_256,Xl=Hl.g0_256,eh=Hl.g1_256,th=Kl.BlockHash,ih=[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];function rh(){if(!(this instanceof rh))return new rh;th.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=ih,this.W=new Array(64)}ql.inherits(rh,th);var nh=rh;rh.blockSize=512,rh.outSize=256,rh.hmacStrength=192,rh.padLength=64,rh.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++)i[r]=e[t+r];for(;r<i.length;r++)i[r]=Jl(eh(i[r-2]),i[r-7],Xl(i[r-15]),i[r-16]);var n=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],c=this.h[4],d=this.h[5],u=this.h[6],l=this.h[7];for(Vl(this.k.length===i.length),r=0;r<i.length;r++){var h=Gl(l,Ql(c),Wl(c,d,u),this.k[r],i[r]),f=$l(Yl(n),Zl(n,a,o));l=u,u=d,d=c,c=$l(s,h),s=o,o=a,a=n,n=$l(h,f)}this.h[0]=$l(this.h[0],n),this.h[1]=$l(this.h[1],a),this.h[2]=$l(this.h[2],o),this.h[3]=$l(this.h[3],s),this.h[4]=$l(this.h[4],c),this.h[5]=$l(this.h[5],d),this.h[6]=$l(this.h[6],u),this.h[7]=$l(this.h[7],l)},rh.prototype._digest=function(e){return"hex"===e?ql.toHex32(this.h,"big"):ql.split32(this.h,"big")};var ah=pl,oh=nh;function sh(){if(!(this instanceof sh))return new sh;oh.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ah.inherits(sh,oh);var ch=sh;sh.blockSize=512,sh.outSize=224,sh.hmacStrength=192,sh.padLength=64,sh.prototype._digest=function(e){return"hex"===e?ah.toHex32(this.h.slice(0,7),"big"):ah.split32(this.h.slice(0,7),"big")};var dh=pl,uh=wl,lh=Eu,hh=dh.rotr64_hi,fh=dh.rotr64_lo,ph=dh.shr64_hi,gh=dh.shr64_lo,mh=dh.sum64,bh=dh.sum64_hi,vh=dh.sum64_lo,yh=dh.sum64_4_hi,_h=dh.sum64_4_lo,wh=dh.sum64_5_hi,xh=dh.sum64_5_lo,Ah=uh.BlockHash,Eh=[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];function Sh(){if(!(this instanceof Sh))return new Sh;Ah.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Eh,this.W=new Array(160)}dh.inherits(Sh,Ah);var kh=Sh;function Mh(e,t,i,r,n){var a=e&i^~e&n;return a<0&&(a+=4294967296),a}function Ch(e,t,i,r,n,a){var o=t&r^~t&a;return o<0&&(o+=4294967296),o}function Ih(e,t,i,r,n){var a=e&i^e&n^i&n;return a<0&&(a+=4294967296),a}function Dh(e,t,i,r,n,a){var o=t&r^t&a^r&a;return o<0&&(o+=4294967296),o}function Th(e,t){var i=hh(e,t,28)^hh(t,e,2)^hh(t,e,7);return i<0&&(i+=4294967296),i}function Rh(e,t){var i=fh(e,t,28)^fh(t,e,2)^fh(t,e,7);return i<0&&(i+=4294967296),i}function zh(e,t){var i=hh(e,t,14)^hh(e,t,18)^hh(t,e,9);return i<0&&(i+=4294967296),i}function Bh(e,t){var i=fh(e,t,14)^fh(e,t,18)^fh(t,e,9);return i<0&&(i+=4294967296),i}function Ph(e,t){var i=hh(e,t,1)^hh(e,t,8)^ph(e,t,7);return i<0&&(i+=4294967296),i}function Oh(e,t){var i=fh(e,t,1)^fh(e,t,8)^gh(e,t,7);return i<0&&(i+=4294967296),i}function Fh(e,t){var i=hh(e,t,19)^hh(t,e,29)^ph(e,t,6);return i<0&&(i+=4294967296),i}function Nh(e,t){var i=fh(e,t,19)^fh(t,e,29)^gh(e,t,6);return i<0&&(i+=4294967296),i}Sh.blockSize=1024,Sh.outSize=512,Sh.hmacStrength=192,Sh.padLength=128,Sh.prototype._prepareBlock=function(e,t){for(var i=this.W,r=0;r<32;r++)i[r]=e[t+r];for(;r<i.length;r+=2){var n=Fh(i[r-4],i[r-3]),a=Nh(i[r-4],i[r-3]),o=i[r-14],s=i[r-13],c=Ph(i[r-30],i[r-29]),d=Oh(i[r-30],i[r-29]),u=i[r-32],l=i[r-31];i[r]=yh(n,a,o,s,c,d,u,l),i[r+1]=_h(n,a,o,s,c,d,u,l)}},Sh.prototype._update=function(e,t){this._prepareBlock(e,t);var i=this.W,r=this.h[0],n=this.h[1],a=this.h[2],o=this.h[3],s=this.h[4],c=this.h[5],d=this.h[6],u=this.h[7],l=this.h[8],h=this.h[9],f=this.h[10],p=this.h[11],g=this.h[12],m=this.h[13],b=this.h[14],v=this.h[15];lh(this.k.length===i.length);for(var y=0;y<i.length;y+=2){var _=b,w=v,x=zh(l,h),A=Bh(l,h),E=Mh(l,h,f,p,g),S=Ch(l,h,f,p,g,m),k=this.k[y],M=this.k[y+1],C=i[y],I=i[y+1],D=wh(_,w,x,A,E,S,k,M,C,I),T=xh(_,w,x,A,E,S,k,M,C,I);_=Th(r,n),w=Rh(r,n),x=Ih(r,n,a,o,s),A=Dh(r,n,a,o,s,c);var R=bh(_,w,x,A),z=vh(_,w,x,A);b=g,v=m,g=f,m=p,f=l,p=h,l=bh(d,u,D,T),h=vh(u,u,D,T),d=s,u=c,s=a,c=o,a=r,o=n,r=bh(D,T,R,z),n=vh(D,T,R,z)}mh(this.h,0,r,n),mh(this.h,2,a,o),mh(this.h,4,s,c),mh(this.h,6,d,u),mh(this.h,8,l,h),mh(this.h,10,f,p),mh(this.h,12,g,m),mh(this.h,14,b,v)},Sh.prototype._digest=function(e){return"hex"===e?dh.toHex32(this.h,"big"):dh.split32(this.h,"big")};var Lh=pl,jh=kh;function Uh(){if(!(this instanceof Uh))return new Uh;jh.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Lh.inherits(Uh,jh);var qh=Uh;Uh.blockSize=1024,Uh.outSize=384,Uh.hmacStrength=192,Uh.padLength=128,Uh.prototype._digest=function(e){return"hex"===e?Lh.toHex32(this.h.slice(0,12),"big"):Lh.split32(this.h.slice(0,12),"big")},Sl.sha1=Ul,Sl.sha224=ch,Sl.sha256=nh,Sl.sha384=qh,Sl.sha512=kh;var Kh={},Hh=pl,Vh=wl,$h=Hh.rotl32,Jh=Hh.sum32,Gh=Hh.sum32_3,Wh=Hh.sum32_4,Zh=Vh.BlockHash;function Yh(){if(!(this instanceof Yh))return new Yh;Zh.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Qh(e,t,i,r){return e<=15?t^i^r:e<=31?t&i|~t&r:e<=47?(t|~i)^r:e<=63?t&r|i&~r:t^(i|~r)}function Xh(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function ef(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Hh.inherits(Yh,Zh),Kh.ripemd160=Yh,Yh.blockSize=512,Yh.outSize=160,Yh.hmacStrength=192,Yh.padLength=64,Yh.prototype._update=function(e,t){for(var i=this.h[0],r=this.h[1],n=this.h[2],a=this.h[3],o=this.h[4],s=i,c=r,d=n,u=a,l=o,h=0;h<80;h++){var f=Jh($h(Wh(i,Qh(h,r,n,a),e[tf[h]+t],Xh(h)),nf[h]),o);i=o,o=a,a=$h(n,10),n=r,r=f,f=Jh($h(Wh(s,Qh(79-h,c,d,u),e[rf[h]+t],ef(h)),af[h]),l),s=l,l=u,u=$h(d,10),d=c,c=f}f=Gh(this.h[1],n,u),this.h[1]=Gh(this.h[2],a,l),this.h[2]=Gh(this.h[3],o,s),this.h[3]=Gh(this.h[4],i,c),this.h[4]=Gh(this.h[0],r,d),this.h[0]=f},Yh.prototype._digest=function(e){return"hex"===e?Hh.toHex32(this.h,"little"):Hh.split32(this.h,"little")};var tf=[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],rf=[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],nf=[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],af=[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],of=pl,sf=Eu;function cf(e,t,i){if(!(this instanceof cf))return new cf(e,t,i);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(of.toArray(t,i))}var df,uf,lf=cf;cf.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),sf(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},cf.prototype.update=function(e,t){return this.inner.update(e,t),this},cf.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=fl;t.utils=pl,t.common=wl,t.sha=Sl,t.ripemd=Kh,t.hmac=lf,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(),function(e){var t,i=hl,r=fl,n=zu,a=_u.assert;function o(e){"short"===e.type?this.curve=new n.short(e):"edwards"===e.type?this.curve=new n.edwards(e):this.curve=new n.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=uf?df:(uf=1,df={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}();var hf=fl,ff=ku,pf=Eu;function gf(e){if(!(this instanceof gf))return new gf(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=ff.toArray(e.entropy,e.entropyEnc||"hex"),i=ff.toArray(e.nonce,e.nonceEnc||"hex"),r=ff.toArray(e.pers,e.persEnc||"hex");pf(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r)}var mf=gf;gf.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},gf.prototype._hmac=function(){return new hf.hmac(this.hash,this.K)},gf.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},gf.prototype.reseed=function(e,t,i,r){"string"!=typeof t&&(r=i,i=t,t=null),e=ff.toArray(e,t),i=ff.toArray(i,r),pf(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},gf.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=ff.toArray(i,r||"hex"),this._update(i));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var a=n.slice(0,e);return this._update(i),this._reseed++,ff.encode(a,t)};var bf=wu,vf=_u.assert;function yf(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var _f=yf;yf.fromPublic=function(e,t,i){return t instanceof yf?t:new yf(e,{pub:t,pubEnc:i})},yf.fromPrivate=function(e,t,i){return t instanceof yf?t:new yf(e,{priv:t,privEnc:i})},yf.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},yf.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},yf.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},yf.prototype._importPrivate=function(e,t){this.priv=new bf(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},yf.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?vf(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||vf(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},yf.prototype.derive=function(e){return e.validate()||vf(e.validate(),"public point not validated"),e.mul(this.priv).getX()},yf.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},yf.prototype.verify=function(e,t,i){return this.ec.verify(e,t,this,void 0,i)},yf.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var wf=wu,xf=_u,Af=xf.assert;function Ef(e,t){if(e instanceof Ef)return e;this._importDER(e,t)||(Af(e.r&&e.s,"Signature without r or s"),this.r=new wf(e.r,16),this.s=new wf(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Sf=Ef;function kf(){this.place=0}function Mf(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var n=0,a=0,o=t.place;a<r;a++,o++)n<<=8,n|=e[o],n>>>=0;return!(n<=127)&&(t.place=o,n)}function Cf(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t<i;)t++;return 0===t?e:e.slice(t)}function If(e,t){if(t<128)e.push(t);else{var i=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}Ef.prototype._importDER=function(e,t){e=xf.toArray(e,t);var i=new kf;if(48!==e[i.place++])return!1;var r=Mf(e,i);if(!1===r)return!1;if(r+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var n=Mf(e,i);if(!1===n)return!1;if(0!=(128&e[i.place]))return!1;var a=e.slice(i.place,n+i.place);if(i.place+=n,2!==e[i.place++])return!1;var o=Mf(e,i);if(!1===o)return!1;if(e.length!==o+i.place)return!1;if(0!=(128&e[i.place]))return!1;var s=e.slice(i.place,o+i.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new wf(a),this.s=new wf(s),this.recoveryParam=null,!0},Ef.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=Cf(t),i=Cf(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];If(r,t.length),(r=r.concat(t)).push(2),If(r,i.length);var n=r.concat(i),a=[48];return If(a,n.length),a=a.concat(n),xf.encode(a,e)};var Df=wu,Tf=mf,Rf=hl,zf=Cu,Bf=_u.assert,Pf=_f,Of=Sf;function Ff(e){if(!(this instanceof Ff))return new Ff(e);"string"==typeof e&&(Bf(Object.prototype.hasOwnProperty.call(Rf,e),"Unknown curve "+e),e=Rf[e]),e instanceof Rf.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Nf=Ff;Ff.prototype.keyPair=function(e){return new Pf(this,e)},Ff.prototype.keyFromPrivate=function(e,t){return Pf.fromPrivate(this,e,t)},Ff.prototype.keyFromPublic=function(e,t){return Pf.fromPublic(this,e,t)},Ff.prototype.genKeyPair=function(e){e||(e={});for(var t=new Tf({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||zf(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),r=this.n.sub(new Df(2));;){var n=new Df(t.generate(i));if(!(n.cmp(r)>0))return n.iaddn(1),this.keyFromPrivate(n)}},Ff.prototype._truncateToN=function(e,t,i){var r;if(Df.isBN(e)||"number"==typeof e)r=(e=new Df(e,16)).byteLength();else if("object"==typeof e)r=e.length,e=new Df(e,16);else{var n=e.toString();r=n.length+1>>>1,e=new Df(n,16)}"number"!=typeof i&&(i=8*r);var a=i-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Ff.prototype.sign=function(e,t,i,r){if("object"==typeof i&&(r=i,i=null),r||(r={}),"string"!=typeof e&&"number"!=typeof e&&!Df.isBN(e)){Bf("object"==typeof e&&e&&"number"==typeof e.length,"Expected message to be an array-like, a hex string, or a BN instance"),Bf(e.length>>>0===e.length);for(var n=0;n<e.length;n++)Bf((255&e[n])===e[n])}t=this.keyFromPrivate(t,i),e=this._truncateToN(e,!1,r.msgBitLength),Bf(!e.isNeg(),"Can not sign a negative message");var a=this.n.byteLength(),o=t.getPrivate().toArray("be",a),s=e.toArray("be",a);Bf(new Df(s).eq(e),"Can not sign message");for(var c=new Tf({hash:this.hash,entropy:o,nonce:s,pers:r.pers,persEnc:r.persEnc||"utf8"}),d=this.n.sub(new Df(1)),u=0;;u++){var l=r.k?r.k(u):new Df(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(d)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var f=h.getX(),p=f.umod(this.n);if(0!==p.cmpn(0)){var g=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var m=(h.getY().isOdd()?1:0)|(0!==f.cmp(p)?2:0);return r.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),m^=1),new Of({r:p,s:g,recoveryParam:m})}}}}}},Ff.prototype.verify=function(e,t,i,r,n){n||(n={}),e=this._truncateToN(e,!1,n.msgBitLength),i=this.keyFromPublic(i,r);var a=(t=new Of(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,c=o.invm(this.n),d=c.mul(e).umod(this.n),u=c.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(d,i.getPublic(),u)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(d,i.getPublic(),u)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},Ff.prototype.recoverPubKey=function(e,t,i,r){Bf((3&i)===i,"The recovery param is more than two bits"),t=new Of(t,r);var n=this.n,a=new Df(e),o=t.r,s=t.s,c=1&i,d=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");o=d?this.curve.pointFromX(o.add(this.curve.n),c):this.curve.pointFromX(o,c);var u=t.r.invm(n),l=n.sub(a).mul(u).umod(n),h=s.mul(u).umod(n);return this.g.mulAdd(l,o,h)},Ff.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new Of(t,r)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(i))return n}throw new Error("Unable to find valid recovery factor")};var Lf=_u,jf=Lf.assert,Uf=Lf.parseBytes,qf=Lf.cachedProperty;function Kf(e,t){this.eddsa=e,this._secret=Uf(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=Uf(t.pub)}Kf.fromPublic=function(e,t){return t instanceof Kf?t:new Kf(e,{pub:t})},Kf.fromSecret=function(e,t){return t instanceof Kf?t:new Kf(e,{secret:t})},Kf.prototype.secret=function(){return this._secret},qf(Kf,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),qf(Kf,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),qf(Kf,"privBytes",(function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),qf(Kf,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),qf(Kf,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),qf(Kf,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Kf.prototype.sign=function(e){return jf(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Kf.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Kf.prototype.getSecret=function(e){return jf(this._secret,"KeyPair is public only"),Lf.encode(this.secret(),e)},Kf.prototype.getPublic=function(e){return Lf.encode(this.pubBytes(),e)};var Hf=Kf,Vf=wu,$f=_u,Jf=$f.assert,Gf=$f.cachedProperty,Wf=$f.parseBytes;function Zf(e,t){this.eddsa=e,"object"!=typeof t&&(t=Wf(t)),Array.isArray(t)&&(Jf(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Jf(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Vf&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Gf(Zf,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Gf(Zf,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Gf(Zf,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Gf(Zf,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Zf.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Zf.prototype.toHex=function(){return $f.encode(this.toBytes(),"hex").toUpperCase()};var Yf=Zf,Qf=fl,Xf=hl,ep=_u,tp=ep.assert,ip=ep.parseBytes,rp=Hf,np=Yf;function ap(e){if(tp("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof ap))return new ap(e);e=Xf[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Qf.sha512}var op=ap;ap.prototype.sign=function(e,t){e=ip(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),o=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),s=r.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:s,Rencoded:a})},ap.prototype.verify=function(e,t,i){if(e=ip(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a)},ap.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return ep.intFromLE(e.digest()).umod(this.curve.n)},ap.prototype.keyFromPublic=function(e){return rp.fromPublic(this,e)},ap.prototype.keyFromSecret=function(e){return rp.fromSecret(this,e)},ap.prototype.makeSignature=function(e){return e instanceof np?e:new np(this,e)},ap.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},ap.prototype.decodePoint=function(e){var t=(e=ep.parseBytes(e)).length-1,i=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),n=ep.intFromLE(i);return this.curve.pointFromY(n,r)},ap.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},ap.prototype.decodeInt=function(e){return ep.intFromLE(e)},ap.prototype.isPoint=function(e){return e instanceof this.pointClass},function(e){var t=e;t.version=yu,t.utils=_u,t.rand=Cu,t.curve=zu,t.curves=hl,t.ec=Nf,t.eddsa=op}(vu);var sp,cp,dp={},up={get exports(){return dp},set exports(e){dp=e}};
1
+ function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function t(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?e(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){if(null==e)return{};var i,r,n=function(e,t){if(null==e)return{};var i,r,n={},a=Object.keys(e);for(r=0;r<a.length;r++)i=a[r],t.indexOf(i)>=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)i=a[r],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function a(e,i){return Object.entries(i).reduce(((i,r)=>{let[n,s]=r;return t(t({},i),{},{[n]:o.isPrototypeOf(s)?new s(e.slug):"function"==typeof s?s.bind(e):"object"==typeof s&&!Array.isArray(s)&&s?a(e,s):s})}),{})}"undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));class o{constructor(e){this.slug=e}static create(e){return class extends o{constructor(t){super(t),Object.assign(this,a(this,e(this)))}}}}var s=Object.freeze({__proto__:null,Agent:o});const c=new Map;function d(e,t){var i,r;null===(i=c.get(e))||void 0===i||i.forEach((r=e=>e(t),function(){try{return r(...arguments)}catch(e){console.log(e)}}))}const u=Symbol("MODULE_INITIALIZED");var l=Object.freeze({__proto__:null,MODULE_INITIALIZED:u,emit:d,off:function(e,t){const i=c.get(e);if(!i)return;const r=i.indexOf(t);-1!==r&&i.splice(r,1)},on:function(e,t){var i;c.has(e)?null===(i=c.get(e))||void 0===i||i.push(t):c.set(e,[t])}});let h=null;function f(e){h=e}var p=Object.freeze({__proto__:null,getInitConfig:function(){return h},get initConfig(){return h},setInitConfig:f});function g(e){f(e),d(u,void 0)}var m=Object.freeze({__proto__:null,initialize:g});function b(e,t){const i=!e||"object"!=typeof e||Array.isArray(e)?{}:e;return[t.reduce(((e,t)=>{if(t in e){const i=e[t];if(null!==i&&"object"==typeof i&&!Array.isArray(i))return i}const i={};return e[t]=i,i}),i),i]}function v(e,t){let i=e;return t.every((e=>!(!i||"object"!=typeof i||Array.isArray(i)||!(e in i))&&(i=i[e],!0)),e)}const y="tsec",_="general";function w(e){return e?_:h.clientId}function x(e){return function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}((e?sessionStorage:localStorage).getItem(y))}function A(e,t){const i=e?sessionStorage:localStorage,r=t(x(e));i.setItem(y,JSON.stringify(r))}var E=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:y,GENERAL_ID_KEY:_,getValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=w(!!t.isGeneral),r=x(!!t.sessionOnly),[n]=b(r,[this.slug.toString(),i]);return n[e]},hasValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=w(!!t.isGeneral),r=x(!!t.sessionOnly);return v(r,[this.slug.toString(),i,e])},removeValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=w(!!t.isGeneral);A(!!t.sessionOnly,(t=>{const[r,n]=b(t,[this.slug.toString(),i]);return delete r[e],n}))},setValue:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=w(!!i.isGeneral);A(!!i.sessionOnly,(i=>{const[n,a]=b(i,[this.slug.toString(),r]);return n[e]=t,a}))}});const S="RSA-PSS",k=async(e,t)=>await window.crypto.subtle.generateKey({name:e,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!1,t),M=async()=>await k("RSA-OAEP",["encrypt","decrypt"]),C=async()=>await k(S,["sign"]),I=async(e,t)=>{const i=(new TextEncoder).encode(t);return await window.crypto.subtle.sign({name:S,saltLength:32},e,i)};class D{constructor(e,t,i){this.slug=e,this.dbName=t,this.dbVersion=i}queryObjectStore(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);r.onupgradeneeded=()=>{var t;const i=r.result;(null===(t=null==i?void 0:i.objectStoreNames)||void 0===t?void 0:t.contains)&&!i.objectStoreNames.contains(e)&&i.createObjectStore(e,{keyPath:"key"})},r.onsuccess=()=>{const n=r.result,a=n.transaction(e,(null==i?void 0:i.operation)||"readwrite"),o=a.objectStore(e);t(o),a.oncomplete=()=>{n.close()}}}put(e,t,i){return new Promise(((r,n)=>{this.queryObjectStore(e,(e=>{const a=e.put({key:t,value:i});a.onsuccess=()=>{r(a.result)},a.onerror=e=>{n("Failed adding item to objectStore, err: "+e)}}))}))}add(e,t,i){return new Promise(((r,n)=>{this.queryObjectStore(e,(e=>{const a=e.add({key:t,value:i});a.onsuccess=()=>{r(a.result)},a.onerror=e=>{const t=e.target.error;n(t)}}))}))}get(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.get(t);n.onsuccess=()=>{var e;n.result?i(null===(e=n.result)||void 0===e?void 0:e.value):i(void 0)},n.onerror=e=>{r("Failed adding item to objectStore, err: "+e)}}))}))}getAll(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.getAll(null,t);n.onsuccess=()=>{if(n.result){const e=n.result;(null==e?void 0:e.length)?i(e.map((e=>null==e?void 0:e.value))):i(e)}else i([])},n.onerror=e=>{r("Failed getting items, err: "+e)}}))}))}delete(e,t){return new Promise(((i,r)=>{this.queryObjectStore(e,(e=>{const n=e.delete(t);n.onsuccess=()=>{i()},n.onerror=e=>{r(`Failed deleting key: '${t}' from objectStore, err: `+e)}}))}))}clear(e){return new Promise(((t,i)=>{this.queryObjectStore(e,(e=>{const r=e.clear();r.onsuccess=()=>{t()},r.onerror=e=>{i("Failed clearing objectStore, err: "+e)}}))}))}}const T="platform",R="init",B="completed",z="RSA2048",P=[R,B];class O{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sign",i=arguments.length>2?arguments[2]:void 0;var r,n,a,o;this.agent=e,this.keysType=t,this.options=i,this._extractingKeysPromise=null;const s=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=s||!(null===(n=this.options)||void 0===n?void 0:n.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=s?1:(null===(a=this.options)||void 0===a?void 0:a.dbVersion)||1,this.keysStoreName=s||!(null===(o=this.options)||void 0===o?void 0:o.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new D(s?T:e.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new D((s?T:e.slug)+`:${h.clientId}`,this.keysDatabaseName,this.dbVersion)}getKeysRecordKey(){return`${this.keysType}_keys`}getRotatedKeysRecordKey(){return`rotated_${this.keysType}_keys`}getRotatedKeysRecordKeyPending(){return`rotated_pending_${this.keysType}_keys`}arrayBufferToBase64(e){return window.btoa(String.fromCharCode(...new Uint8Array(e)))}async getPKRepresentations(e){const t=await crypto.subtle.exportKey("spki",e);return{arrayBufferKey:t,base64Key:this.arrayBufferToBase64(t)}}async generateKeyPair(){return"sign"==this.keysType?await C():await M()}async calcKeyIdentifier(e){const t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map((e=>e.toString(16).padStart(2,"0"))).join("")}async extractKeysData(){if(this._extractingKeysPromise)return this._extractingKeysPromise;this._extractingKeysPromise=(async()=>{var e,t;const i=(null===(t=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===t?void 0:t.isEnabled)?await this.getRotatedKeysData():await this.getKeysData(),{base64Key:r}=await this.getPKRepresentations(i.publicKey);return this.publicKeyBase64=r,this.keyIdentifier=i.keyIdentifier,i})();try{return await this._extractingKeysPromise}finally{this._extractingKeysPromise=null}}async generateKeyPairData(e){const i=await this.generateKeyPair(),{arrayBufferKey:r}=await this.getPKRepresentations(i.publicKey),n=e||await this.calcKeyIdentifier(r);return t(t({},i),{},{keyIdentifier:n,createdDate:Date.now()})}shouldKeyBeRotated(e){var t;const i=null===(t=this.options)||void 0===t?void 0:t.keyRotation;if(!(null==i?void 0:i.isEnabled)||!i.expiryDays||void 0===i.startedAt)return!1;const r=24*i.expiryDays*60*60*1e3,n=e.createdDate&&e.createdDate>=i.startedAt?e.createdDate:i.startedAt;return Date.now()-n>r-2592e6}async extractMainKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getKeysRecordKey())}async extractFallbackMainKeysData(){return await this.indexedDBClientFallback.get(this.keysStoreName,this.getKeysRecordKey())}async extractRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKey())}async extractPendingRotatedKeysData(){return await this.indexedDBClient.get(this.keysStoreName,this.getRotatedKeysRecordKeyPending())}async saveKeyData(e,t){try{return await this.indexedDBClient.add(this.keysStoreName,e,t),t}catch(t){if(t instanceof DOMException&&"ConstraintError"===t.name){const t=await this.indexedDBClient.get(this.keysStoreName,e);if(t)return t}throw t}}async getKeysData(){const e=this.getKeysRecordKey();let t=await this.extractMainKeysData();if(t)return t;if(t=await this.extractFallbackMainKeysData(),t)return this.saveKeyData(e,t);const i=await this.generateKeyPairData();return this.saveKeyData(e,i)}async getOrCreateRotatedKeys(){let e=await this.extractRotatedKeysData();if(!e){const i=this.getRotatedKeysRecordKey(),r=await this.getKeysData(),n=t(t({},r),{},{createdDate:r.createdDate||Date.now()});e=await this.saveKeyData(i,n)}return e}async getRotatedKeysData(){const e=await this.getOrCreateRotatedKeys();if(this.shouldKeyBeRotated(e)){if(!await this.extractPendingRotatedKeysData()){const t=this.getRotatedKeysRecordKeyPending(),i=await this.generateKeyPairData(e.keyIdentifier);await this.saveKeyData(t,i)}}return e}async getPublicData(){return this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData(),{publicKey:this.publicKeyBase64,keyIdentifier:this.keyIdentifier}}async sign(e){if("sign"==this.keysType){const{privateKey:t}=await this.extractKeysData(),i=await I(t,e);return this.arrayBufferToBase64(i)}throw new Error("keysType must be 'sign' in order to use sign keys")}async clearKeys(){const e=this.getKeysRecordKey();await this.indexedDBClient.delete(this.keysStoreName,e)}getBaseRotationPayload(){return{keyIdentifier:this.keyIdentifier,slot:this.getRotatedKeysRecordKey(),publicKey:this.publicKeyBase64,publicKeyType:z,tenantId:this.options.keyRotation.tenantId}}async getRotationData(){var e,i;if(!(null===(i=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===i?void 0:i.isEnabled))return;this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData();const r=await this.extractPendingRotatedKeysData();if(r){const{base64Key:e}=await this.getPKRepresentations(r.publicKey),{privateKey:i}=await this.extractKeysData(),n=t(t({},this.getBaseRotationPayload()),{},{newPublicKey:e,createdDate:r.createdDate,newPublicKeyType:z}),a=JSON.stringify(n);return{data:a,signature:await this.signPayload(a,i)}}const n=await this.extractRotatedKeysData();if(n&&!1===n.confirmed){await this.extractKeysData();const e=JSON.stringify(this.getBaseRotationPayload());return{data:e,signature:await this.signPayload(e,n.privateKey)}}}async signPayload(e,t){const i=await I(t,e);return this.arrayBufferToBase64(i)}async handleRotateResponse(e){if(P.includes(e))if(e===R){const e=await this.extractPendingRotatedKeysData();if(e){await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKey());const i=t(t({},e),{},{confirmed:!1});await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),i),await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKeyPending());const{base64Key:r}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=r,this.keyIdentifier=e.keyIdentifier}}else if(e===B){const e=await this.extractRotatedKeysData();e&&!1===e.confirmed&&await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),t(t({},e),{},{confirmed:!0}))}}}var F=Object.freeze({__proto__:null,createCryptoBinding:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sign",t=arguments.length>1?arguments[1]:void 0;return new O(this,e,t)},generateRSAKeyPair:M,generateRSASignKeyPair:C,signAssymetric:I,verifyAssymetric:async(e,t,i)=>{const r=(new TextEncoder).encode(t);return await window.crypto.subtle.verify(S,e,i,r)}}),N=Object.freeze({__proto__:null});const L=o.create((e=>{class t extends Error{constructor(t,i){super(`${e.slug}-${t} ${i}`)}}return{TsError:t,TsInternalError:class extends t{constructor(e){super(e,"Internal error")}}}}));var j=o.create((()=>t({exceptions:L},s)));class U{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.agent=e,this.middlewares=t,this.logs=[]}info(e,t){this.pushLog(3,e,t)}warn(e,t){this.pushLog(4,e,t)}error(e,t){this.pushLog(5,e,t)}pushLog(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.logs.push({timestamp:Date.now(),module:this.agent.slug,severity:e,fields:i,message:t});const r=this.middlewares.map((e=>e(this)));Promise.all(r).catch((()=>{}))}}var q=Object.freeze({__proto__:null,consoleMiddleware:function(e){const t=e.logs[e.logs.length-1];console.log(`${t.severity} ${t.message}`,t.fields)},createSdkLogger:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new U(this,e)}});function K(e,t){if(!(null==e?void 0:e.trim()))return"";if(function(e){try{return new URL(e),!0}catch(e){return!1}}(e))return e;const i="http://mock.com",r=new URL(i);r.search=(null==t?void 0:t.toString())||"",r.pathname=e;return r.href.replace(i,"")}const H={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function V(e,i,r){var n;const a=(o=i||{},encodeURI(JSON.stringify(o)).split(/%..|./).length-1);var o;return{method:e,headers:t(t(t({},{"X-TS-body-size":String(a)}),H),r||{}),body:null!==(n=i&&JSON.stringify(i||{}))&&void 0!==n?n:void 0}}function $(e,t,i,r,n){const a=K(e,r),o=V(t,i,n);return fetch(a,o)}async function J(e,t,i,r,n){let a;if(a=await $(e,t,i,r,n),!a.ok)throw new Error("Request failed");return a}var G=Object.freeze({__proto__:null,httpDelete:async function(e,i){const r=await J(e,"DELETE",void 0,void 0,i);return t(t({data:await r.json()},r),{},{headers:r.headers})},httpGet:async function(e,i,r){const n=await J(e,"GET",void 0,i,r);return t(t({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(e,i,r,n){const a=await J(e,"POST",i,r,n);return t(t({data:await a.json()},a),{},{headers:a.headers})},httpPut:async function(e,i,r,n){const a=await J(e,"PUT",i,r,n);return t(t({data:await a.json()},a),{},{headers:a.headers})},init:V}),W=o.create((()=>({events:l,moduleMetadata:p,mainEntry:m,utils:j,storage:E,crypto:F,indexedDB:N,logger:q,http:G}))),Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Q(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];i.push.apply(i,arguments);var r=Function.bind.apply(t,i);return new r}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}var X={},ee={};function te(e){let t=e.length;for(;--t>=0;)e[t]=0}const ie=256,re=286,ne=30,ae=15,oe=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),se=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ce=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),de=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ue=new Array(576);te(ue);const le=new Array(60);te(le);const he=new Array(512);te(he);const fe=new Array(256);te(fe);const pe=new Array(29);te(pe);const ge=new Array(ne);function me(e,t,i,r,n){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}let be,ve,ye;function _e(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}te(ge);const we=e=>e<256?he[e]:he[256+(e>>>7)],xe=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Ae=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,xe(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},Ee=(e,t,i)=>{Ae(e,i[2*t],i[2*t+1])},Se=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},ke=(e,t,i)=>{const r=new Array(16);let n,a,o=0;for(n=1;n<=ae;n++)r[n]=o=o+i[n-1]<<1;for(a=0;a<=t;a++){let t=e[2*a+1];0!==t&&(e[2*a]=Se(r[t]++,t))}},Me=e=>{let t;for(t=0;t<re;t++)e.dyn_ltree[2*t]=0;for(t=0;t<ne;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},Ce=e=>{e.bi_valid>8?xe(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Ie=(e,t,i,r)=>{const n=2*t,a=2*i;return e[n]<e[a]||e[n]===e[a]&&r[t]<=r[i]},De=(e,t,i)=>{const r=e.heap[i];let n=i<<1;for(;n<=e.heap_len&&(n<e.heap_len&&Ie(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!Ie(t,r,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=r},Te=(e,t,i)=>{let r,n,a,o,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],n=e.pending_buf[e.l_buf+s],s++,0===r?Ee(e,n,t):(a=fe[n],Ee(e,a+ie+1,t),o=oe[a],0!==o&&(n-=pe[a],Ae(e,n,o)),r--,a=we(r),Ee(e,a,i),o=se[a],0!==o&&(r-=ge[a],Ae(e,r,o)))}while(s<e.last_lit);Ee(e,256,t)},Re=(e,t)=>{const i=t.dyn_tree,r=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,c,d=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)0!==i[2*o]?(e.heap[++e.heap_len]=d=o,e.depth[o]=0):i[2*o+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=d<2?++d:0,i[2*c]=1,e.depth[c]=0,e.opt_len--,n&&(e.static_len-=r[2*c+1]);for(t.max_code=d,o=e.heap_len>>1;o>=1;o--)De(e,i,o);c=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],De(e,i,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,i[2*c]=i[2*o]+i[2*s],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,i[2*o+1]=i[2*s+1]=c,e.heap[1]=c++,De(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,r=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let d,u,l,h,f,p,g=0;for(h=0;h<=ae;h++)e.bl_count[h]=0;for(i[2*e.heap[e.heap_max]+1]=0,d=e.heap_max+1;d<573;d++)u=e.heap[d],h=i[2*i[2*u+1]+1]+1,h>c&&(h=c,g++),i[2*u+1]=h,u>r||(e.bl_count[h]++,f=0,u>=s&&(f=o[u-s]),p=i[2*u],e.opt_len+=p*(h+f),a&&(e.static_len+=p*(n[2*u+1]+f)));if(0!==g){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(h=c;0!==h;h--)for(u=e.bl_count[h];0!==u;)l=e.heap[--d],l>r||(i[2*l+1]!==h&&(e.opt_len+=(h-i[2*l+1])*i[2*l],i[2*l+1]=h),u--)}})(e,t),ke(i,d,e.bl_count)},Be=(e,t,i)=>{let r,n,a=-1,o=t[1],s=0,c=7,d=4;for(0===o&&(c=138,d=3),t[2*(i+1)+1]=65535,r=0;r<=i;r++)n=o,o=t[2*(r+1)+1],++s<c&&n===o||(s<d?e.bl_tree[2*n]+=s:0!==n?(n!==a&&e.bl_tree[2*n]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=n,0===o?(c=138,d=3):n===o?(c=6,d=3):(c=7,d=4))},ze=(e,t,i)=>{let r,n,a=-1,o=t[1],s=0,c=7,d=4;for(0===o&&(c=138,d=3),r=0;r<=i;r++)if(n=o,o=t[2*(r+1)+1],!(++s<c&&n===o)){if(s<d)do{Ee(e,n,e.bl_tree)}while(0!=--s);else 0!==n?(n!==a&&(Ee(e,n,e.bl_tree),s--),Ee(e,16,e.bl_tree),Ae(e,s-3,2)):s<=10?(Ee(e,17,e.bl_tree),Ae(e,s-3,3)):(Ee(e,18,e.bl_tree),Ae(e,s-11,7));s=0,a=n,0===o?(c=138,d=3):n===o?(c=6,d=3):(c=7,d=4)}};let Pe=!1;const Oe=(e,t,i,r)=>{Ae(e,0+(r?1:0),3),((e,t,i,r)=>{Ce(e),r&&(xe(e,i),xe(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};ee._tr_init=e=>{Pe||((()=>{let e,t,i,r,n;const a=new Array(16);for(i=0,r=0;r<28;r++)for(pe[r]=i,e=0;e<1<<oe[r];e++)fe[i++]=r;for(fe[i-1]=r,n=0,r=0;r<16;r++)for(ge[r]=n,e=0;e<1<<se[r];e++)he[n++]=r;for(n>>=7;r<ne;r++)for(ge[r]=n<<7,e=0;e<1<<se[r]-7;e++)he[256+n++]=r;for(t=0;t<=ae;t++)a[t]=0;for(e=0;e<=143;)ue[2*e+1]=8,e++,a[8]++;for(;e<=255;)ue[2*e+1]=9,e++,a[9]++;for(;e<=279;)ue[2*e+1]=7,e++,a[7]++;for(;e<=287;)ue[2*e+1]=8,e++,a[8]++;for(ke(ue,287,a),e=0;e<ne;e++)le[2*e+1]=5,le[2*e]=Se(e,5);be=new me(ue,oe,257,re,ae),ve=new me(le,se,0,ne,ae),ye=new me(new Array(0),ce,0,19,7)})(),Pe=!0),e.l_desc=new _e(e.dyn_ltree,be),e.d_desc=new _e(e.dyn_dtree,ve),e.bl_desc=new _e(e.bl_tree,ye),e.bi_buf=0,e.bi_valid=0,Me(e)},ee._tr_stored_block=Oe,ee._tr_flush_block=(e,t,i,r)=>{let n,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<ie;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Re(e,e.l_desc),Re(e,e.d_desc),o=(e=>{let t;for(Be(e,e.dyn_ltree,e.l_desc.max_code),Be(e,e.dyn_dtree,e.d_desc.max_code),Re(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*de[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=i+5,i+4<=n&&-1!==t?Oe(e,t,i,r):4===e.strategy||a===n?(Ae(e,2+(r?1:0),3),Te(e,ue,le)):(Ae(e,4+(r?1:0),3),((e,t,i,r)=>{let n;for(Ae(e,t-257,5),Ae(e,i-1,5),Ae(e,r-4,4),n=0;n<r;n++)Ae(e,e.bl_tree[2*de[n]+1],3);ze(e,e.dyn_ltree,t-1),ze(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Te(e,e.dyn_ltree,e.dyn_dtree)),Me(e),r&&Ce(e)},ee._tr_tally=(e,t,i)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(fe[i]+ie+1)]++,e.dyn_dtree[2*we(t)]++),e.last_lit===e.lit_bufsize-1),ee._tr_align=e=>{Ae(e,2,3),Ee(e,256,ue),(e=>{16===e.bi_valid?(xe(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)};var Fe=(e,t,i,r)=>{let n=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{n=n+t[r++]|0,a=a+n|0}while(--o);n%=65521,a%=65521}return n|a<<16|0};const Ne=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Le=(e,t,i,r)=>{const n=Ne,a=r+i;e^=-1;for(let i=r;i<a;i++)e=e>>>8^n[255&(e^t[i])];return-1^e},je={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ue={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:qe,_tr_stored_block:Ke,_tr_flush_block:He,_tr_tally:Ve,_tr_align:$e}=ee,Je=Fe,Ge=Le,We=je,{Z_NO_FLUSH:Ze,Z_PARTIAL_FLUSH:Ye,Z_FULL_FLUSH:Qe,Z_FINISH:Xe,Z_BLOCK:et,Z_OK:tt,Z_STREAM_END:it,Z_STREAM_ERROR:rt,Z_DATA_ERROR:nt,Z_BUF_ERROR:at,Z_DEFAULT_COMPRESSION:ot,Z_FILTERED:st,Z_HUFFMAN_ONLY:ct,Z_RLE:dt,Z_FIXED:ut,Z_DEFAULT_STRATEGY:lt,Z_UNKNOWN:ht,Z_DEFLATED:ft}=Ue,pt=258,gt=262,mt=103,bt=113,vt=666,yt=(e,t)=>(e.msg=We[t],t),_t=e=>(e<<1)-(e>4?9:0),wt=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let xt=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const At=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},Et=(e,t)=>{He(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,At(e.strm)},St=(e,t)=>{e.pending_buf[e.pending++]=t},kt=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Mt=(e,t,i,r)=>{let n=e.avail_in;return n>r&&(n=r),0===n?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),i),1===e.state.wrap?e.adler=Je(e.adler,t,n,i):2===e.state.wrap&&(e.adler=Ge(e.adler,t,n,i)),e.next_in+=n,e.total_in+=n,n)},Ct=(e,t)=>{let i,r,n=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-gt?e.strstart-(e.w_size-gt):0,d=e.window,u=e.w_mask,l=e.prev,h=e.strstart+pt;let f=d[a+o-1],p=d[a+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,d[i+o]===p&&d[i+o-1]===f&&d[i]===d[a]&&d[++i]===d[a+1]){a+=2,i++;do{}while(d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&d[++a]===d[++i]&&a<h);if(r=pt-(h-a),a=h-pt,r>o){if(e.match_start=t,o=r,r>=s)break;f=d[a+o-1],p=d[a+o]}}}while((t=l[t&u])>c&&0!=--n);return o<=e.lookahead?o:e.lookahead},It=e=>{const t=e.w_size;let i,r,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-gt)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,i=r;do{n=e.head[--i],e.head[i]=n>=t?n-t:0}while(--r);r=t,i=r;do{n=e.prev[--i],e.prev[i]=n>=t?n-t:0}while(--r);a+=t}if(0===e.strm.avail_in)break;if(r=Mt(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=xt(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=xt(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<gt&&0!==e.strm.avail_in)},Dt=(e,t)=>{let i,r;for(;;){if(e.lookahead<gt){if(It(e),e.lookahead<gt&&t===Ze)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-gt&&(e.match_length=Ct(e,i)),e.match_length>=3)if(r=Ve(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=xt(e,e.ins_h,e.window[e.strstart+1]);else r=Ve(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2},Tt=(e,t)=>{let i,r,n;for(;;){if(e.lookahead<gt){if(It(e),e.lookahead<gt&&t===Ze)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-gt&&(e.match_length=Ct(e,i),e.match_length<=5&&(e.strategy===st||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,r=Ve(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=xt(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Et(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=Ve(e,0,e.window[e.strstart-1]),r&&Et(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Ve(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2};function Rt(e,t,i,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=r,this.func=n}const Bt=[new Rt(0,0,0,0,((e,t)=>{let i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(It(e),0===e.lookahead&&t===Ze)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+i;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Et(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-gt&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Et(e,!1),e.strm.avail_out),1)})),new Rt(4,4,8,4,Dt),new Rt(4,5,16,8,Dt),new Rt(4,6,32,32,Dt),new Rt(4,4,16,16,Tt),new Rt(8,16,32,32,Tt),new Rt(8,16,128,128,Tt),new Rt(8,32,128,256,Tt),new Rt(32,128,258,1024,Tt),new Rt(32,258,258,4096,Tt)];function zt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),wt(this.dyn_ltree),wt(this.dyn_dtree),wt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),wt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),wt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Pt=e=>{if(!e||!e.state)return yt(e,rt);e.total_in=e.total_out=0,e.data_type=ht;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:bt,e.adler=2===t.wrap?0:1,t.last_flush=Ze,qe(t),tt},Ot=e=>{const t=Pt(e);return t===tt&&(e=>{e.window_size=2*e.w_size,wt(e.head),e.max_lazy_match=Bt[e.level].max_lazy,e.good_match=Bt[e.level].good_length,e.nice_match=Bt[e.level].nice_length,e.max_chain_length=Bt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},Ft=(e,t,i,r,n,a)=>{if(!e)return rt;let o=1;if(t===ot&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),n<1||n>9||i!==ft||r<8||r>15||t<0||t>9||a<0||a>ut)return yt(e,rt);8===r&&(r=9);const s=new zt;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=i,Ot(e)};X.deflateInit=(e,t)=>Ft(e,t,ft,15,8,lt),X.deflateInit2=Ft,X.deflateReset=Ot,X.deflateResetKeep=Pt,X.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?rt:(e.state.gzhead=t,tt):rt,X.deflate=(e,t)=>{let i,r;if(!e||!e.state||t>et||t<0)return e?yt(e,rt):rt;const n=e.state;if(!e.output||!e.input&&0!==e.avail_in||n.status===vt&&t!==Xe)return yt(e,0===e.avail_out?at:rt);n.strm=e;const a=n.last_flush;if(n.last_flush=t,42===n.status)if(2===n.wrap)e.adler=0,St(n,31),St(n,139),St(n,8),n.gzhead?(St(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),St(n,255&n.gzhead.time),St(n,n.gzhead.time>>8&255),St(n,n.gzhead.time>>16&255),St(n,n.gzhead.time>>24&255),St(n,9===n.level?2:n.strategy>=ct||n.level<2?4:0),St(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(St(n,255&n.gzhead.extra.length),St(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Ge(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(St(n,0),St(n,0),St(n,0),St(n,0),St(n,0),St(n,9===n.level?2:n.strategy>=ct||n.level<2?4:0),St(n,3),n.status=bt);else{let t=ft+(n.w_bits-8<<4)<<8,i=-1;i=n.strategy>=ct||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=i<<6,0!==n.strstart&&(t|=32),t+=31-t%31,n.status=bt,kt(n,t),0!==n.strstart&&(kt(n,e.adler>>>16),kt(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),At(e),i=n.pending,n.pending!==n.pending_buf_size));)St(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),At(e),i=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,St(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),At(e),i=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,St(n,r)}while(0!==r);n.gzhead.hcrc&&n.pending>i&&(e.adler=Ge(e.adler,n.pending_buf,n.pending-i,i)),0===r&&(n.status=mt)}else n.status=mt;if(n.status===mt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&At(e),n.pending+2<=n.pending_buf_size&&(St(n,255&e.adler),St(n,e.adler>>8&255),e.adler=0,n.status=bt)):n.status=bt),0!==n.pending){if(At(e),0===e.avail_out)return n.last_flush=-1,tt}else if(0===e.avail_in&&_t(t)<=_t(a)&&t!==Xe)return yt(e,at);if(n.status===vt&&0!==e.avail_in)return yt(e,at);if(0!==e.avail_in||0!==n.lookahead||t!==Ze&&n.status!==vt){let i=n.strategy===ct?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(It(e),0===e.lookahead)){if(t===Ze)return 1;break}if(e.match_length=0,i=Ve(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===dt?((e,t)=>{let i,r,n,a;const o=e.window;for(;;){if(e.lookahead<=pt){if(It(e),e.lookahead<=pt&&t===Ze)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=e.strstart-1,r=o[n],r===o[++n]&&r===o[++n]&&r===o[++n])){a=e.strstart+pt;do{}while(r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&n<a);e.match_length=pt-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=Ve(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=Ve(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(Et(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Xe?(Et(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Et(e,!1),0===e.strm.avail_out)?1:2})(n,t):Bt[n.level].func(n,t);if(3!==i&&4!==i||(n.status=vt),1===i||3===i)return 0===e.avail_out&&(n.last_flush=-1),tt;if(2===i&&(t===Ye?$e(n):t!==et&&(Ke(n,0,0,!1),t===Qe&&(wt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),At(e),0===e.avail_out))return n.last_flush=-1,tt}return t!==Xe?tt:n.wrap<=0?it:(2===n.wrap?(St(n,255&e.adler),St(n,e.adler>>8&255),St(n,e.adler>>16&255),St(n,e.adler>>24&255),St(n,255&e.total_in),St(n,e.total_in>>8&255),St(n,e.total_in>>16&255),St(n,e.total_in>>24&255)):(kt(n,e.adler>>>16),kt(n,65535&e.adler)),At(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?tt:it)},X.deflateEnd=e=>{if(!e||!e.state)return rt;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==mt&&t!==bt&&t!==vt?yt(e,rt):(e.state=null,t===bt?yt(e,nt):tt)},X.deflateSetDictionary=(e,t)=>{let i=t.length;if(!e||!e.state)return rt;const r=e.state,n=r.wrap;if(2===n||1===n&&42!==r.status||r.lookahead)return rt;if(1===n&&(e.adler=Je(e.adler,t,i,0)),r.wrap=0,i>=r.w_size){0===n&&(wt(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(i-r.w_size,i),0),t=e,i=r.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,It(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=xt(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,It(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=n,tt},X.deflateInfo="pako deflate (from Nodeca project)";var Nt={};const Lt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Nt.assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)Lt(i,t)&&(e[t]=i[t])}}return e},Nt.flattenChunks=e=>{let t=0;for(let i=0,r=e.length;i<r;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,r=0,n=e.length;t<n;t++){let n=e[t];i.set(n,r),r+=n.length}return i};var jt={};let Ut=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Ut=!1}const qt=new Uint8Array(256);for(let e=0;e<256;e++)qt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;qt[254]=qt[254]=1,jt.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,r,n,a,o=e.length,s=0;for(n=0;n<o;n++)i=e.charCodeAt(n),55296==(64512&i)&&n+1<o&&(r=e.charCodeAt(n+1),56320==(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),n++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),a=0,n=0;a<s;n++)i=e.charCodeAt(n),55296==(64512&i)&&n+1<o&&(r=e.charCodeAt(n+1),56320==(64512&r)&&(i=65536+(i-55296<<10)+(r-56320),n++)),i<128?t[a++]=i:i<2048?(t[a++]=192|i>>>6,t[a++]=128|63&i):i<65536?(t[a++]=224|i>>>12,t[a++]=128|i>>>6&63,t[a++]=128|63&i):(t[a++]=240|i>>>18,t[a++]=128|i>>>12&63,t[a++]=128|i>>>6&63,t[a++]=128|63&i);return t};jt.buf2string=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,n;const a=new Array(2*i);for(n=0,r=0;r<i;){let t=e[r++];if(t<128){a[n++]=t;continue}let o=qt[t];if(o>4)a[n++]=65533,r+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&r<i;)t=t<<6|63&e[r++],o--;o>1?a[n++]=65533:t<65536?a[n++]=t:(t-=65536,a[n++]=55296|t>>10&1023,a[n++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ut)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return i})(a,n)},jt.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+qt[e[i]]>t?i:t};const Kt=X,Ht=Nt,Vt=jt,$t=je,Jt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Gt=Object.prototype.toString,{Z_NO_FLUSH:Wt,Z_SYNC_FLUSH:Zt,Z_FULL_FLUSH:Yt,Z_FINISH:Qt,Z_OK:Xt,Z_STREAM_END:ei,Z_DEFAULT_COMPRESSION:ti,Z_DEFAULT_STRATEGY:ii,Z_DEFLATED:ri}=Ue;function ni(e){this.options=Ht.assign({level:ti,method:ri,chunkSize:16384,windowBits:15,memLevel:8,strategy:ii},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jt,this.strm.avail_out=0;let i=Kt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Xt)throw new Error($t[i]);if(t.header&&Kt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Vt.string2buf(t.dictionary):"[object ArrayBuffer]"===Gt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=Kt.deflateSetDictionary(this.strm,e),i!==Xt)throw new Error($t[i]);this._dict_set=!0}}ni.prototype.push=function(e,t){const i=this.strm,r=this.options.chunkSize;let n,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Qt:Wt,"string"==typeof e?i.input=Vt.string2buf(e):"[object ArrayBuffer]"===Gt.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(r),i.next_out=0,i.avail_out=r),(a===Zt||a===Yt)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(n=Kt.deflate(i,a),n===ei)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),n=Kt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Xt;if(0!==i.avail_out){if(a>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},ni.prototype.onData=function(e){this.chunks.push(e)},ni.prototype.onEnd=function(e){e===Xt&&(this.result=Ht.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ai=function(e,t){return(t=t||{}).gzip=!0,function(e,t){const i=new ni(t);if(i.push(e,!0),i.err)throw i.msg||$t[i.err];return i.result}(e,t)};const oi=["enabled","userId"];var si,ci,di=["drs"];si=di,ci=162,function(e){for(;--e;)si.push(si.shift())}(++ci);var ui,li,hi,fi=new W((ui="0x0",di[ui-=0])),pi=["setItemSessionStorageSafe","removeItem","getItemLocalStorageSafe","FALLBACK_LOCAL_STORAGE","setItemLocalStorageSafe","localStorage","setItem","removeItemLocalStorageSafe","clientId","setClientId","getFullStorageKey","getItemSessionStorageSafe","sessionStorage","getItem","FALLBACK_SESSION_STORAGE"];li=pi,hi=293,function(e){for(;--e;)li.push(li.shift())}(++hi);var gi=function(e,t){return pi[e-=0]};class mi{constructor(e){this.FALLBACK_SESSION_STORAGE={},this.FALLBACK_LOCAL_STORAGE={},this[gi("0x0")]=e}getClientId(){return this[gi("0x0")]}[gi("0x1")](e){this[gi("0x0")]=e}[gi("0x2")](e){return this.clientId+"_"+e}[gi("0x3")](e){const t=this[gi("0x2")](e);try{return window[gi("0x4")][gi("0x5")](t)}catch(e){return this[gi("0x6")][t]}}[gi("0x7")](e,t){const i=this[gi("0x2")](e);try{window[gi("0x4")].setItem(i,t)}catch(e){this[gi("0x6")][i]=t}}removeItemSessionStorageSafe(e){const t=this.getFullStorageKey(e);try{window.sessionStorage[gi("0x8")](t)}catch(e){this[gi("0x6")][t]=void 0}}[gi("0x9")](e){const t=this[gi("0x2")](e);try{return window.localStorage[gi("0x5")](t)}catch(e){return this[gi("0xa")][t]}}[gi("0xb")](e,t){const i=this.getFullStorageKey(e);try{window[gi("0xc")][gi("0xd")](i,t)}catch(e){this[gi("0xa")][i]=t}}[gi("0xe")](e){const t=this[gi("0x2")](e);try{window.localStorage.removeItem(t)}catch(e){this[gi("0xa")][t]=void 0}}}var bi,vi,yi=["pushLog","error","enabled","log","%s %s %s","stringify","push","now","unshift","map","catch","formatter","logPrefix","logsLimit","logs","middlewares","info"];bi=yi,vi=131,function(e){for(;--e;)bi.push(bi.shift())}(++vi);var _i=function(e,t){return yi[e-=0]};class wi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.enabled=e,this[_i("0x0")]="[AccountProtection SDK]",this[_i("0x1")]=1e4,this[_i("0x2")]=[],this[_i("0x3")]=[]}[_i("0x4")](e,t){this.pushLog(3,e,t)}warn(e,t){this[_i("0x5")](4,e,t)}[_i("0x6")](e,t){this[_i("0x5")](5,e,t)}flush(){const e=this[_i("0x2")];return this[_i("0x2")]=[],e}pushLog(e,i,r){this[_i("0x7")]&&console[_i("0x8")](_i("0x9"),this[_i("0x0")],i,JSON[_i("0xa")](r)),this[_i("0x2")][_i("0xb")]({timestamp:Date[_i("0xc")](),severity:e,text:JSON[_i("0xa")](t(t({},r),{},{message:i}),this.formatter)}),this[_i("0x2")].length>this.logsLimit&&this[_i("0x2")][_i("0xd")]();const n=this[_i("0x3")][_i("0xe")]((e=>e()));Promise.all(n)[_i("0xf")]((()=>{}))}[_i("0x10")](e,t){if(t instanceof Error){const{name:e,stack:i,message:r}=t;return{name:e,stack:i,message:r}}return t}}const xi=new wi;var Ai,Ei,Si=["requestsManager","loadConf","fetchConf","device/conf?tenantId=","getData","error","error fetching config","getItemLocalStorageSafe","parse","error loading config","shouldUpdateConf","now","refreshConf","keys","length","setItemLocalStorageSafe","stringify","conf","getConfValue","timestamp","ric","storageManager"];Ai=Si,Ei=459,function(e){for(;--e;)Ai.push(Ai.shift())}(++Ei);var ki=function(e,t){return Si[e-=0]};const Mi=ki("0x0"),Ci=ki("0x1");class Ii{constructor(e,t){this[ki("0x2")]=e,this[ki("0x3")]=t,this.conf=this[ki("0x4")]()}async[ki("0x5")](e){try{const t=ki("0x6")+e,i=await this[ki("0x3")][ki("0x7")](t);return null!=i?i:{}}catch(t){return xi[ki("0x8")](ki("0x9"),{clientId:e,error:t}),{}}}loadConf(){const e=this[ki("0x2")][ki("0xa")](Ci);if(null!=e)try{return JSON[ki("0xb")](e)}catch(e){xi.error(ki("0xc"),{error:e})}return{}}[ki("0xd")](){const e=this.getConfValue(Mi,0);return Date[ki("0xe")]()-e>36e5}async[ki("0xf")](e){if(!this[ki("0xd")]())return!1;let t=await this[ki("0x5")](e);return 0==Object[ki("0x10")](t)[ki("0x11")]?t=this[ki("0x4")]():this.storageManager[ki("0x12")](Ci,JSON[ki("0x13")](t)),this[ki("0x14")]=t,!0}[ki("0x15")](e,t){const i=void 0!==this[ki("0x14")]?this.conf[e]:void 0;return null!=i?i:t}}var Di,Ti,Ri=["EVENT_TYPE_INTERACTION","interaction","identification","desktop_web","mobile_web","EVENT_TYPE_ACTION","EVENT_TYPE_DEVICE"];Di=Ri,Ti=439,function(e){for(;--e;)Di.push(Di.shift())}(++Ti);var Bi,zi,Pi=function(e,t){return Ri[e-=0]};(zi=Bi||(Bi={}))[Pi("0x0")]="action",zi[Pi("0x1")]="device",zi[Pi("0x2")]=Pi("0x3"),zi.EVENT_TYPE_IDENTIFICATION=Pi("0x4");const Oi=Pi("0x5"),Fi=Pi("0x6");var Ni,Li,ji=["push","maintainLastXItems","splice"];Ni=ji,Li=478,function(e){for(;--e;)Ni.push(Ni.shift())}(++Li);var Ui=function(e,t){return ji[e-=0]};class qi{static[Ui("0x0")](e,t,i){return e.length>=t&&e[Ui("0x1")](0,1),e[Ui("0x2")](i),e}}var Ki,Hi,Vi=["maintainLastXItems","location","isTrusted","buffer","extractEventData","getData","now","extractButtonsPressedData","ctrlKey","altKey","shiftKey","buttons","data","detail","offsetX","sourceCapabilities","firesTouchEvents","target","bufferSize","collect","cancelable","composed","view"];Ki=Vi,Hi=394,function(e){for(;--e;)Ki.push(Ki.shift())}(++Hi);var $i=function(e,t){return Vi[e-=0]};class Ji{constructor(e){this.data=[],this[$i("0x0")]=e}collect(e){const t=this[$i("0x1")](e);qi.maintainLastXItems(this.data,this[$i("0x0")],t)}[$i("0x2")](){return this.data}[$i("0x1")](e){return t({x:e.x,y:e.y,tspl:Date[$i("0x3")]()},this[$i("0x4")](e))}extractButtonsPressedData(e){return t(t(t(t({},e[$i("0x5")]&&{ctrlKey:!0}),e[$i("0x6")]&&{altKey:!0}),e[$i("0x7")]&&{shiftKey:!0}),0!=e[$i("0x8")]&&{buttons:e[$i("0x8")]})}}class Gi{constructor(e){this[$i("0x9")]=[],this[$i("0x0")]=e}collect(e){var t;const i={x:e.x,y:e.y,timestamp:Date[$i("0x3")](),mouseButtonType:e[$i("0xa")],offsetX:e[$i("0xb")],offsetY:e.offsetY,isPressed:null==(null===(t=e[$i("0xc")])||void 0===t?void 0:t[$i("0xd")])?null:!e[$i("0xc")].firesTouchEvents,target_id:e[$i("0xe")].id};qi.maintainLastXItems(this[$i("0x9")],this[$i("0x0")],i)}getData(){const e=[...this.data];return this[$i("0x9")]=[],e}}class Wi{constructor(e){this[$i("0x9")]=[],this[$i("0xf")]=e}[$i("0x10")](e){var t;const i={isTrusted:e.isTrusted,cancelable:e[$i("0x11")],composed:e[$i("0x12")],isView:!!e[$i("0x13")],shiftKey:e.shiftKey,metaKey:e.metaKey,firesTouchEvents:null===(t=e[$i("0xc")])||void 0===t?void 0:t[$i("0xd")],timestamp:Date[$i("0x3")]()};qi[$i("0x14")](this[$i("0x9")],this.bufferSize,i)}[$i("0x2")](){const e=[...this[$i("0x9")]];return this.data=[],e}}class Zi{constructor(e){this.data=[],this.bufferSize=e}[$i("0x10")](e){var t;const i={isTrusted:e.isTrusted,cancelable:e[$i("0x11")],composed:e.composed,isView:!!e[$i("0x13")],location:e[$i("0x15")],shiftKey:e[$i("0x7")],firesTouchEvents:null===(t=e.sourceCapabilities)||void 0===t?void 0:t[$i("0xd")],timestamp:Date[$i("0x3")]()};qi[$i("0x14")](this.data,this.bufferSize,i)}[$i("0x2")](){const e=this[$i("0x9")];return this[$i("0x9")]=[],e}}class Yi{constructor(e){this.data=[],this[$i("0xf")]=e}[$i("0x10")](e){const t={isTrusted:e[$i("0x16")],cancelable:e[$i("0x11")],composed:e[$i("0x12")],inputType:e.inputType,isView:!!e.view,timestamp:Date[$i("0x3")]()};qi.maintainLastXItems(this.data,this.bufferSize,t)}getData(){const e=this.data;return this[$i("0x9")]=[],e}}class Qi{constructor(e){this[$i("0x9")]=[],this[$i("0xf")]=e}[$i("0x10")](e){const t={isTrusted:e[$i("0x16")],cancelable:e[$i("0x11")],composed:e[$i("0x12")],timestamp:Date[$i("0x3")]()};qi[$i("0x14")](this[$i("0x9")],this[$i("0xf")],t)}[$i("0x2")](){const e=this.data;return this.data=[],e}}var Xi,er,tr=["paste","mousemove","mousedown","submit","keyup","keydown","input","deviceEventDataCollectionIgnoreList","safeEventCallback","interactionEventsCollectorsData","detail","sourceCapabilities","firesTouchEvents","offsetX","offsetY","isTrusted","clipboardData","dropEffect","mouseEventsCollectionBuffer","inputTypeFilter","keys","dataset","virtualKeyboard","target","tagName","includes","registerEventListeners","entries","addSafeInteractionListener","Error while adding listener","filter","handleEvent","getGenericAttributes","getAttachedData","addEventListener","error","error adding interaction listener","eventTypesToAttach","forEach","getData","location","href","change","click"];Xi=tr,er=394,function(e){for(;--e;)Xi.push(Xi.shift())}(++er);var ir=function(e,t){return tr[e-=0]};const rr=ir("0x0"),nr=ir("0x1"),ar=ir("0x2"),or=ir("0x3"),sr="mouseup",cr=ir("0x4"),dr=ir("0x5"),ur=ir("0x6"),lr=ir("0x7"),hr=ir("0x8"),fr=["INPUT","SELECT","TEXTAREA"];class pr{constructor(e,i,r){this[ir("0x9")]=e,this.mouseEventsCollectionBuffer=i,this[ir("0xa")]=r,this[ir("0xb")]={[nr]:{eventTypesToAttach:[or,sr,cr],attributesMapper:e=>{var t;return{x:e.x,y:e.y,mouseButtonType:e[ir("0xc")],isPressed:null==(null===(t=e[ir("0xd")])||void 0===t?void 0:t.firesTouchEvents)?null:!e.sourceCapabilities[ir("0xe")],offsetX:e[ir("0xf")],offsetY:e[ir("0x10")],target_id:e.target.id}}},[ar]:{attributesMapper:e=>({target_id:e.target.id,isTrusted:e[ir("0x11")],cancelable:e.cancelable,composed:e.composed,dropEffect:e[ir("0x12")][ir("0x13")],effectAllowed:e[ir("0x12")].effectAllowed})},[dr]:{attributesMapper:e=>({target_id:e.target.id})},[or]:{continousCollectors:[new Ji(this[ir("0x14")])]},[sr]:{continousCollectors:[new Gi(1)]},[cr]:{continousCollectors:[new Gi(1)]},focusout:{eventTypesToAttach:[hr,ur,lr,rr],filter:this[ir("0x15")],attributesMapper:e=>{const{target:i,isTrusted:r,cancelable:n,composed:a}=e;return t({target_id:i.id,dataset_keys:Object[ir("0x16")](i[ir("0x17")]||{}),isTrusted:r,cancelable:n,composed:a},navigator.virtualKeyboard&&{navigator_virtualKeyboard:navigator[ir("0x18")].overlaysContent})}},[hr]:{filter:this[ir("0x15")],continousCollectors:[new Yi(50)]},[ur]:{filter:this.inputTypeFilter,continousCollectors:[new Zi(50)]},[lr]:{filter:this.inputTypeFilter,continousCollectors:[new Wi(50)]},[rr]:{continousCollectors:[new Qi(50)]}}}[ir("0x15")](e){var t;const i=null===(t=e[ir("0x19")])||void 0===t?void 0:t[ir("0x1a")];return fr[ir("0x1b")](i)}[ir("0x1c")](){for(const[e,t]of Object[ir("0x1d")](this[ir("0xb")]))if(!this[ir("0x9")][ir("0x1b")](e))try{this[ir("0x1e")](e,t)}catch(t){xi.error(ir("0x1f"),{error:t,eventType:e})}}[ir("0x20")](e,t){return!e[ir("0x20")]||e[ir("0x20")](t)}async[ir("0x21")](e,i,r){const{attributesMapper:n,continousCollectors:a}=e;if(!this[ir("0x20")](e,i))return!1;if(a)a.forEach((e=>{e.collect(i)}));else{const e=this[ir("0x22")](),a=this[ir("0x23")](r),o=t(t(t({},e),n(i)),a&&{attachedEventsData:a});await this.safeEventCallback(r,o)}return!0}[ir("0x1e")](e,t){window[ir("0x24")](e,(async i=>{try{await this.handleEvent(t,i,e)}catch(e){xi[ir("0x25")](ir("0x26"),{error:e})}}))}[ir("0x23")](e){let t;const i=this[ir("0xb")][e][ir("0x27")];return i&&(t={},i[ir("0x28")]((e=>{const{continousCollectors:i}=this[ir("0xb")][e];i&&i[ir("0x28")]((i=>t[e]=i[ir("0x29")]()))}))),t}getGenericAttributes(){return{location:window[ir("0x2a")][ir("0x2b")]}}}var gr,mr,br=["mobile","wow64","setTimeout","race","catch","warn","name","finally","userAgentData","getHighEntropyValues","model","platform","platformVersion","bitness"];gr=br,mr=232,function(e){for(;--e;)gr.push(gr.shift())}(++mr);var vr=function(e,t){return br[e-=0]};function yr(){var e;return null===(e=navigator[vr("0x0")])||void 0===e?void 0:e[vr("0x1")](["architecture",vr("0x2"),vr("0x3"),vr("0x4"),"fullVersionList",vr("0x5"),vr("0x6"),vr("0x7"),"uaFullVersion"])}function _r(e,t){let i;const r=[Promise.resolve(e()).catch((()=>{})),new Promise(((e,r)=>i=window[vr("0x8")](r,t)))];return Promise[vr("0x9")](r)[vr("0xa")]((()=>xi[vr("0xb")]("executor reached timeout",{fnName:e[vr("0xc")]})))[vr("0xd")]((()=>clearTimeout(i)))}var wr,xr,Ar=["getCryptoBindingData","bind","getNavigatorPermissionsState","notifications","isGeoLocationExists","isSendBeaconFunction","getInstalledRelatedApps","windowConstructorAliasTest","windowDocumentAuxVarsTest","CDPRuntimeDomainTest","Error","Object","defineProperty","stack","getOwnPropertyNames","document","test","values","getOwnPropertyDescriptors","value","getPrototypeOf","isNodeReachable_","sort","every","Array","Promise","name","getAsyncToken","startPromisesLoop","includes","warn","collectPromisesData","entries","resolve","credentials","PublicKeyCredential","isUserVerifyingPlatformAuthenticatorAvailable","from","webRTCDisabled","RTCPeerConnection","getWindowBasedKeys","__crWeb","__yb","__ybro","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice","_phantom","__phantomas","Buffer","emit","spawn","domAutomationController","domAutomation","__nightmare","_selenium","calledSelenium","callSelenium","_Selenium_IDE_Recorder","__$webdriverAsyncExecutor","__fxdriver_evaluate","__fxdriver_unwrapped","__lastWatirAlert","__lastWatirPrompt","__selenium_evaluate","__webdriver__chr","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","__webdriverFuncgeb","awesomium","calledPhantom","cdc_adoQpoasnfa76pfcZLmcfl_Array","chrome_asyncScriptInfo","fmget_targets","geb","OSMJIF","spynner_additional_js_loaded","watinExpressionResult","push","high","no-preference","low","more","less","forced","100","1000","none","inverted","rec2020","srgb","replace","matches","getMathFingerprint","log","sqrt","exp","acos","acosh","asin","asinh","atanh","atan","sin","sinh","cosh","tan","tanh","expm1","log1p","length","toString","hashCodeString","sessionStorage","localStorage","external","Sequentum","webdriver","__driver_evaluate","__webdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__selenium_unwrapped","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","driver-evaluate","webdriver-evaluate","selenium-evaluate","webdriverCommand","webdriver-evaluate-response","__webdriverFunc","__lastWatirConfirm","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker","getNavigatorProduct","product","getNavigatorUAData","userAgentData","navigatorStorageEstimation","storage","estimate","onLine","navigatorIsUserActive","permissions","geolocation","sendBeacon","function","getNavigatorPrototype","getOwnPropertyDescriptor","hardwareConcurrency","get","languages","isArray","platform","url","referrer","getPerformanceMemory","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","type","suffixes","plugins","description","availHeight","colorDepth","width","pixelDepth","angle","devicePixelRatio","charCodeAt","outerWidth","outerHeight","getWebDriver","orientation","getOsCpu","HTMLElement","prototype","mediaDevices","enumerateDevices","kind","groupId","OfflineAudioContext","createOscillator","triangle","frequency","threshold","ratio","attack","release","connect","destination","start","renderedBuffer","getChannelData","subarray","webkitOfflineAudioContext","createDynamicsCompressor","knee","createAnalyser","startRendering","disconnect","frequencyBinCount","call","fftSize","getFloatTimeDomainData","reduction","getHash","mmMwWLliI0O&1","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Clarendon","Futura Bk BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Reference Specialty","MS UI Gothic","MT Extra","Marlett","Minion Pro","Monotype Corsiva","PMingLiU","SCRIPTINA","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","div","hidden","createElement","span","position","top","left","fontSize","10px","map","offsetWidth","offsetHeight","body","appendChild","filter","removeChild","language","getLanguages","deviceMemory","DateTimeFormat","resolvedOptions","timeZone","getVendor","buildID","height","textBaseline","alphabetic","fillStyle","#f60","#069","font",'11pt "Times New Roman"',"Cwm fjordbank gly ","fromCharCode","fillText","toDataURL","globalCompositeOperation","multiply","#f2f","#2ff","#ff2","beginPath","arc","closePath","fill","#f9c","evenodd","rect","isPointInPath","canvas","getContext","getBattery","charging","chargingTime","dischargingTime","brave","isBrave","webgl","WEBGL_debug_renderer_info","UNMASKED_RENDERER_WEBGL","video","canPlayType","video/mp4;;Codecs =avc1.42E01E","getPublicData","isMobile","userAgent","matchMedia","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","reduce","abs","configManager","getConfValue","cryptoBinding","dataPointsExtractor","lastDeviceData","storageManager","setItemLocalStorageSafe","now","getDeviceData","calculate","dataPoints","getBrave","getCanvasFingerprint","getCodesTests","getConnection","getCookieEnabled","getCryptoRandomValues","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getIndexedDB","getFIDOEnabled","getLanguage","getTimezoneOffset","getLocalStorage","getNavigatorBasedKeys","getNavigatorUserAgent","getNavigatorHighEntropyData","navigatorOnLine","getMediaMatch","getWindowOrientation","getPlatform","getCpuClass","getAddBehavior","getProductSub","getMediaDevices","getPerformanceTiming","getPlugins","getScreen","hasSequentum","getSessionStorage","getReferrer","getTimezone","getBuildID","getWebGlRenderer"];wr=Ar,xr=324,function(e){for(;--e;)wr.push(wr.shift())}(++xr);var Er=function(e,t){return Ar[e-=0]};const Sr=Er("0x0"),kr=Er("0x1"),Mr=e=>e?[...e][Er("0x2")](((e,t)=>e+Math[Er("0x3")](t)),0):0;class Cr{constructor(e,t,i){this.storageManager=e,this[Er("0x4")]=t,this.cryptoBinding=i}async calculate(){const e=this[Er("0x4")][Er("0x5")](Sr,[]),t=this[Er("0x4")][Er("0x5")](kr,36e5),i=await new Ir(e,this[Er("0x6")])[Er("0x7")]();return this[Er("0x8")]=i,this[Er("0x9")][Er("0xa")](kr,Date[Er("0xb")]()+t),i}async[Er("0xc")](){return Number(this[Er("0x9")].getItemLocalStorageSafe(kr))<Date[Er("0xb")]()||!this[Er("0x8")]?await this[Er("0xd")]()||{}:this.lastDeviceData||{}}}class Ir{constructor(e,t){this[Er("0x0")]=e,this[Er("0x6")]=t,this[Er("0xe")]={battery:this.getBattery,brave:this[Er("0xf")],canvas:this[Er("0x10")],codecs:this[Er("0x11")],connection:this[Er("0x12")],cookieEnabled:this[Er("0x13")],cryptoRandomValues:this[Er("0x14")],deviceMemory:this[Er("0x15")],documentBasedKeys:this[Er("0x16")],hardwareConcurrency:this[Er("0x17")],indexedDB:this[Er("0x18")],fidoEnabled:this[Er("0x19")],languages:this.getLanguages,language:this[Er("0x1a")],timezoneOffset:this[Er("0x1b")],localStorage:this[Er("0x1c")],navigatorBasedKeys:this[Er("0x1d")],navigatorProduct:this.getNavigatorProduct,navigatorUserAgent:this[Er("0x1e")],navigatorUAData:this.getNavigatorUAData,navigatorHighEntropyData:this[Er("0x1f")],navigatorStorageEstimation:this.navigatorStorageEstimation,navigatorOnLine:this[Er("0x20")],navigatorIsUserActive:this.navigatorIsUserActive,math:this.getMathFingerprint,mediaMatch:this[Er("0x21")],openDatabase:this.getOpenDatabase,windowOrientation:this[Er("0x22")],platform:this[Er("0x23")],cpuClass:this[Er("0x24")],osClass:this.getOsCpu,addBehavior:this[Er("0x25")],productSub:this[Er("0x26")],mediaDevices:this[Er("0x27")],audioFingerprint:this.getAudioFingerprint,audioFingerprintExtended:this.getAudioFingerprintExtended,fonts:this.getFonts,performanceTiming:this[Er("0x28")],performanceMemory:this.getPerformanceMemory,plugins:this[Er("0x29")],screen:this[Er("0x2a")],sequentum:this[Er("0x2b")],sessionStorage:this[Er("0x2c")],referrer:this[Er("0x2d")],timezone:this[Er("0x2e")],touchSupport:this.getTouchSupport,vendor:this.getVendor,buildID:this[Er("0x2f")],webdriver:this.getWebDriver,webGlRenderer:this[Er("0x30")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this.getWindowOuter,webRTCDisabled:this.webRTCDisabled,cryptoBindingData:this[Er("0x31")][Er("0x32")](this),notificationState:this[Er("0x33")][Er("0x32")](this,Er("0x34")),geolocationState:this.getNavigatorPermissionsState[Er("0x32")](this,"geolocation"),isGeoLocationExists:this[Er("0x35")],isSendBeaconExists:this[Er("0x36")],navigatorPrototype:this.getNavigatorPrototype,installedRelatedApps:this[Er("0x37")],windowConstructorAliasTest:this[Er("0x38")],windowDocumentAuxVarsTest:this[Er("0x39")],CDPRuntimeDomainTest:this.CDPRuntimeDomainTest}}[Er("0x3a")](){let e=!1;const t=new(window[Er("0x3b")]);return window[Er("0x3c")][Er("0x3d")](t,Er("0x3e"),{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window.console.debug(t[Er("0x3e")]),e}[Er("0x39")](){for(const e of window[Er("0x3c")][Er("0x3f")](window[Er("0x40")]))if("$chrome_asyncScriptInfo"==e||/^\$cdc_[a-zA-Z0-9]{22}_$/[Er("0x41")](e))return!0;for(const e of window[Er("0x3c")][Er("0x42")](window[Er("0x3c")][Er("0x43")](window[Er("0x40")]))){if(!e.value||void 0===e[Er("0x44")].cache_)continue;const t=window[Er("0x3c")].getOwnPropertyNames(window[Er("0x3c")][Er("0x45")](e[Er("0x44")])),i=["storeItem","retrieveItem",Er("0x46")];if(t[Er("0x47")](),i[Er("0x47")](),t[Er("0x48")](((e,t)=>e==i[t])))return!0}return!1}[Er("0x38")](){const e=window[Er("0x3c")][Er("0x3f")](window);for(const t of e){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/.test(t))return!0;for(const e of[window[Er("0x49")],window[Er("0x4a")],window.Symbol])if(t!=(null==e?void 0:e[Er("0x4b")])&&"token"!=t&&t!=Er("0x4c")&&window[t]===e)return!0}return!1}async dataPointsExtractor(){const e=this[Er("0x4d")]();return await this.collectPromisesData(e)}startPromisesLoop(){const e={};for(const[t,i]of Object.entries(this[Er("0xe")]))if(!this[Er("0x0")][Er("0x4e")](t))try{e[t]=_r(i,100)}catch(i){xi[Er("0x4f")]("worker throw error",{e:i,key:t}),e[t]=Promise.resolve()}return e}async[Er("0x50")](e){const t={};for(const[i,r]of Object[Er("0x51")](e))try{t[i]=await r}catch(e){xi.warn("worker promise rejected",{e:e,key:i}),t[i]=void 0}return t}[Er("0x13")](){const e=navigator.cookieEnabled;return Promise[Er("0x52")](e)}async[Er("0x19")](){return!!navigator[Er("0x53")]&&await window[Er("0x54")][Er("0x55")]()}getCryptoRandomValues(){const e=window.crypto.getRandomValues(new Uint8Array(16));return Array[Er("0x56")](e)}[Er("0x57")](){const e=null==window[Er("0x58")];return Promise[Er("0x52")](e)}[Er("0x59")](){const e=["chrome","safari",Er("0x5a"),"__gCrWeb","yandex",Er("0x5b"),Er("0x5c"),"__firefox__",Er("0x5d"),Er("0x5e"),Er("0x5f"),Er("0x60"),Er("0x61"),Er("0x62"),Er("0x63"),Er("0x64"),Er("0x65"),"callPhantom",Er("0x66"),Er("0x67"),Er("0x68"),Er("0x69"),Er("0x6a"),Er("0x6b"),Er("0x6c"),Er("0x6d"),Er("0x6e"),Er("0x6f"),Er("0x70"),"__driver_evaluate","__driver_unwrapped",Er("0x71"),Er("0x72"),Er("0x73"),"__lastWatirConfirm",Er("0x74"),Er("0x75"),"__selenium_unwrapped",Er("0x76"),"__webdriver_evaluate",Er("0x77"),Er("0x78"),Er("0x79"),"__webdriver_unwrapped",Er("0x7a"),Er("0x7b"),Er("0x7c"),Er("0x7d"),"cdc_adoQpoasnfa76pfcZLmcfl_Promise","cdc_adoQpoasnfa76pfcZLmcfl_Symbol",Er("0x7e"),Er("0x7f"),Er("0x80"),Er("0x81"),Er("0x82"),"watinExpressionError",Er("0x83")],t=[];for(const i of e){const e=window[i];void 0!==e&&null!=e&&t[Er("0x84")](i)}return Promise[Er("0x52")](t)}[Er("0x21")](){const e={"dynamic-range":[Er("0x85"),"standard"],"prefers-reduced-motion":[Er("0x86"),Er("0x2")],"prefers-contrast":[Er("0x86"),Er("0x85"),Er("0x87"),Er("0x88"),Er("0x89"),Er("0x8a")],"max-monochrome":["0","10",Er("0x8b"),Er("0x8c")],"forced-colors":["active",Er("0x8d")],"inverted-colors":[Er("0x8e"),Er("0x8d")],"color-gamut":[Er("0x8f"),"p3",Er("0x90")]},t={};for(const[i,r]of Object.entries(e))for(const e of r)t[i[Er("0x91")](/-/g,"_")+"_"+e.replace(/-/g,"_")]=window.matchMedia("("+i+": "+e+")")[Er("0x92")];return Promise[Er("0x52")](t)}[Er("0x93")](){const e=[Math[Er("0x97")](.12312423423423424),Math[Er("0x98")](1e308),(t=1e154,Math[Er("0x94")](t+Math[Er("0x95")](t*t-1))),Math[Er("0x99")](.12312423423423424),Math[Er("0x9a")](1),Math[Er("0x94")](1+Math[Er("0x95")](2)),Math[Er("0x9b")](.5),Math.log(3)/2,Math[Er("0x9c")](.5),Math[Er("0x9d")](-1e300),Math[Er("0x9e")](1),Math[Er("0x96")](1)-1/Math[Er("0x96")](1)/2,Math.cos(10.000000000123),Math[Er("0x9f")](1),(Math[Er("0x96")](1)+1/Math[Er("0x96")](1))/2,Math[Er("0xa0")](-1e300),Math[Er("0xa1")](1),(Math.exp(2)-1)/(Math.exp(2)+1),Math[Er("0x96")](1),Math[Er("0xa2")](1),Math[Er("0x96")](1)-1,Math[Er("0xa3")](10),Math[Er("0x94")](11),Math.PI**-100];var t;let i="";for(let t=0;t<e[Er("0xa4")];t++)i+=e[t][Er("0xa5")]();return Promise.resolve(Ir[Er("0xa6")](i))}getConnection(){const{connection:e}=navigator,t=(e=>{let{downlink:t,effectiveType:i,rtt:r,saveData:n}=e;return{downlink:t,effectiveType:i,rtt:r,saveData:n}})(e);return Promise.resolve(t)}[Er("0x2c")](){return Promise.resolve(!!window[Er("0xa7")])}[Er("0x1c")](){return Promise.resolve(!!window[Er("0xa8")])}[Er("0x2b")](){return-1!==window[Er("0xa9")][Er("0xa5")]().indexOf(Er("0xaa"))}[Er("0x1d")](){return[Er("0xab"),Er("0xac"),Er("0xad"),Er("0x75"),"__fxdriver_evaluate",Er("0xae"),Er("0xaf"),Er("0xb0"),Er("0x72"),"_Selenium_IDE_Recorder","_selenium",Er("0x6d"),Er("0xb1"),Er("0xb2"),Er("0xb3"),Er("0xb4"),Er("0xb5"),Er("0xb6"),Er("0xb7"),Er("0xb8"),Er("0x77"),Er("0x70"),Er("0x73"),Er("0xb9"),Er("0x74"),"$chrome_asyncScriptInfo",Er("0xba"),Er("0xbb")].filter((e=>navigator[e]))}[Er("0xbc")](){const e=navigator[Er("0xbd")];return Promise[Er("0x52")](e)}[Er("0x1e")](){return navigator.userAgent}[Er("0xbe")](){return navigator[Er("0xbf")]}[Er("0x1f")](){return yr()}[Er("0xc0")](){return navigator[Er("0xc1")][Er("0xc2")]()}[Er("0x20")](){return navigator[Er("0xc3")]}[Er("0xc4")](){return navigator.userActivation.isActive}async[Er("0x33")](e){try{const t=await navigator[Er("0xc5")].query({name:e});return null==t?void 0:t.state}catch(e){}}isGeoLocationExists(){return!!navigator[Er("0xc6")]}isSendBeaconFunction(){return typeof navigator[Er("0xc7")]===Er("0xc8")}[Er("0xc9")](){return{hardwareConcurrency:Object[Er("0xca")](Object[Er("0x45")](navigator),Er("0xcb"))[Er("0xcc")][Er("0xa5")](),languages:Object[Er("0xca")](Object[Er("0x45")](navigator),Er("0xcd"))[Er("0xcc")].toString()}}async[Er("0x37")](){if(typeof navigator[Er("0x37")]===Er("0xc8"))try{const{related_applications:e}=await navigator[Er("0x37")]();if(e&&Array[Er("0xce")](e))return e.map((e=>({platform:e[Er("0xcf")],url:e[Er("0xd0")]})))}catch(e){}}[Er("0x2d")](){return document[Er("0xd1")]}[Er("0x28")](){return performance.timing}[Er("0xd2")](){const{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}=performance.memory;return{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}}[Er("0x18")](){return Promise[Er("0x52")](!!window[Er("0xd3")])}getOpenDatabase(){const{openDatabase:e}=window;return Promise.resolve(!!e)}getTouchSupport(){const e=window[Er("0xd4")]&&document instanceof DocumentTouch,t={maxTouchPoints:navigator[Er("0xd5")]||navigator[Er("0xd6")]||0,documentTouch:e,ontouchstart:"ontouchstart"in window};return Promise.resolve(t)}getPlugins(){function e(e){const t=[];for(let i=0;i<e.length;++i)t[Er("0x84")]({type:e[i][Er("0xd7")],suffixes:e[i][Er("0xd8")]});return t}const t=[];for(let i=0;i<navigator[Er("0xd9")][Er("0xa4")];++i){const r=navigator.plugins[i];r&&t[Er("0x84")]({name:r[Er("0x4b")],description:r[Er("0xda")],mimeTypes:e(r)})}return Promise[Er("0x52")](t)}[Er("0x2a")](){const e=window.screen||screen,{availLeft:t}=e,{availTop:i}=e,r={availHeight:e[Er("0xdb")],availLeft:t,availTop:i,availWidth:e.availWidth,colorDepth:e[Er("0xdc")],height:e.height,width:e[Er("0xdd")],pixelDepth:e[Er("0xde")],orientationAngle:e.orientation&&e.orientation[Er("0xdf")],orientationType:e.orientation&&e.orientation.type,devicePixelRatio:window[Er("0xe0")]};return Promise[Er("0x52")](r)}static[Er("0xa6")](e){if(null==e)return;let t=0,i=0;const r=e[Er("0xa4")];for(;i<r;)t=(t<<5)-t+e[Er("0xe1")](i++)|0;return t}getWindowOuter(){const e={outerWidth:window[Er("0xe2")],outerHeight:window[Er("0xe3")]};return Promise[Er("0x52")](e)}[Er("0xe4")](){const e=navigator[Er("0xab")];return Promise[Er("0x52")](e)}getWindowOrientation(){const e=window[Er("0xe5")];return Promise.resolve(e)}[Er("0x23")](){const e=navigator.platform;return Promise[Er("0x52")](e)}[Er("0x24")](){const e=navigator.cpuClass;return Promise[Er("0x52")](e)}[Er("0xe6")](){const e=navigator.oscpu;return Promise[Er("0x52")](e)}[Er("0x25")](){const e=!!window[Er("0xe7")][Er("0xe8")].addBehavior;return Promise[Er("0x52")](e)}[Er("0x26")](){const e=navigator.productSub;return Promise[Er("0x52")](e)}async[Er("0x27")](){const e=await navigator[Er("0xe9")][Er("0xea")](),t=[];for(const i of e)t.push({kind:i[Er("0xeb")],label:i.label,deviceId:i.deviceId,groupId:i[Er("0xec")]});return t}async getAudioFingerprint(){const e=window[Er("0xed")]||window.webkitOfflineAudioContext;if(!e)return-1;const t=new e(1,5e3,44100),i=t[Er("0xee")]();i.type=Er("0xef"),i[Er("0xf0")][Er("0x44")]=1e4;const r=t.createDynamicsCompressor();r[Er("0xf1")][Er("0x44")]=-50,r.knee[Er("0x44")]=40,r[Er("0xf2")][Er("0x44")]=12,r[Er("0xf3")][Er("0x44")]=0,r[Er("0xf4")][Er("0x44")]=.25,i[Er("0xf5")](r),r[Er("0xf5")](t[Er("0xf6")]),i[Er("0xf7")](0);const n=new Promise((async(e,i)=>{t.oncomplete=t=>e(t[Er("0xf8")]);try{await t.startRendering()}catch(e){i(e)}})),a=(await n)[Er("0xf9")](0)[Er("0xfa")](4500);return Ir.getHash(a)}async getAudioFingerprintExtended(){var e;const t=window[Er("0xed")]||window[Er("0xfb")];if(!t)return{};const i=new t(1,5e3,44100),r=i.createOscillator();r[Er("0xd7")]=Er("0xef"),r[Er("0xf0")][Er("0x44")]=1e4;const n=i[Er("0xfc")]();n[Er("0xf1")].value=-50,n[Er("0xfd")].value=40,n.attack[Er("0x44")]=0;const a=i[Er("0xfe")]();r.connect(n),n.connect(a),n[Er("0xf5")](i[Er("0xf6")]),r[Er("0xf7")](0);try{await i[Er("0xff")](),n[Er("0x100")](),r.disconnect();const t=new Float32Array(a[Er("0x101")]);null===(e=a.getFloatFrequencyData)||void 0===e||e[Er("0x102")](a,t);const o=new Float32Array(a[Er("0x103")]);return"getFloatTimeDomainData"in a&&a[Er("0x104")](o),{gain:n[Er("0x105")][Er("0x44")]||n[Er("0x105")],freq:Mr(t),time:Mr(o)}}catch(e){return{}}}static[Er("0x106")](e){let t=0;for(let i=0;i<e[Er("0xa4")];++i)t+=Math[Er("0x3")](e[i]);return t}getFonts(){const e=Er("0x107"),t=[Er("0x108"),Er("0x109"),Er("0x10a")],i=[Er("0x10b"),Er("0x10c"),Er("0x10d"),Er("0x10e"),"Arial Unicode MS",Er("0x10f"),Er("0x110"),Er("0x111"),Er("0x112"),Er("0x113"),"Century","Century Gothic",Er("0x114"),"EUROSTILE","Franklin Gothic",Er("0x115"),"Futura Md BT",Er("0x116"),Er("0x117"),Er("0x118"),Er("0x119"),"Helvetica Neue",Er("0x11a"),Er("0x11b"),Er("0x11c"),Er("0x11d"),Er("0x11e"),Er("0x11f"),Er("0x120"),Er("0x121"),"MS Outlook",Er("0x122"),Er("0x123"),Er("0x124"),"MYRIAD PRO",Er("0x125"),"Meiryo UI","Microsoft Uighur",Er("0x126"),Er("0x127"),Er("0x128"),"Pristina",Er("0x129"),"Segoe UI Light",Er("0x12a"),Er("0x12b"),Er("0x12c"),Er("0x12d"),Er("0x12e"),Er("0x12f"),Er("0x130"),"ZWAdobeF"],r=document.createElement(Er("0x131"));r.style.visibility=Er("0x132");const n={},a={},o=t=>{const i=document[Er("0x133")](Er("0x134")),{style:n}=i;return n[Er("0x135")]="absolute",n[Er("0x136")]="0",n[Er("0x137")]="0",n.fontFamily=t,n[Er("0x138")]=Er("0x139"),i.textContent=e,r.appendChild(i),i},s=(e,t)=>o("'"+e+"',"+t),c=t.map(o),d=(()=>{const e={};for(const r of i)e[r]=t[Er("0x13a")]((e=>s(r,e)));return e})();document[Er("0x13d")][Er("0x13e")](r);try{for(let e=0;e<t[Er("0xa4")];e++)n[t[e]]=c[e].offsetWidth,a[t[e]]=c[e].offsetHeight;const e=i[Er("0x13f")]((e=>{return i=d[e],t.some(((e,t)=>i[t][Er("0x13b")]!==n[e]||i[t][Er("0x13c")]!==a[e]));var i}));return Promise.resolve(e)}finally{document[Er("0x13d")][Er("0x140")](r)}}[Er("0x1b")](){const e=(new Date)[Er("0x1b")]();return Promise.resolve(e)}[Er("0x1a")](){const e=navigator[Er("0x141")];return Promise.resolve(e)}[Er("0x142")](){const e=navigator[Er("0xcd")];return Promise[Er("0x52")](e)}[Er("0x17")](){const e=navigator[Er("0xcb")];return Promise.resolve(e)}[Er("0x15")](){const e=navigator[Er("0x143")];return Promise[Er("0x52")](e)}[Er("0x16")](){return[Er("0xad"),Er("0x75"),"__webdriver_script_function",Er("0x78"),Er("0x77"),"__fxdriver_evaluate",Er("0xae"),Er("0xaf"),Er("0xac"),Er("0xb0"),Er("0x72")][Er("0x13f")]((e=>document[e]))}[Er("0x2e")](){const e=Intl[Er("0x144")]()[Er("0x145")]()[Er("0x146")];return Promise[Er("0x52")](e)}[Er("0x147")](){const e=navigator.vendor;return Promise[Er("0x52")](e)}[Er("0x2f")](){const e=navigator[Er("0x148")];return Promise[Er("0x52")](e)}async getCanvasFingerprint(){const e=document[Er("0x133")](Er("0x162"));e[Er("0xdd")]=1,e[Er("0x149")]=1;const t=e[Er("0x163")]("2d"),i={winding:function(e){return e[Er("0x160")](0,0,10,10),e.rect(2,2,6,6),!e[Er("0x161")](5,5,"evenodd")}(t),geometry:function(e,t){e[Er("0xdd")]=122,e[Er("0x149")]=110,t[Er("0x155")]=Er("0x156");const i=[[Er("0x157"),40,40],[Er("0x158"),80,40],[Er("0x159"),60,80]];for(const[e,r,n]of i)t[Er("0x14c")]=e,t[Er("0x15a")](),t[Er("0x15b")](r,n,40,0,2*Math.PI,!0),t[Er("0x15c")](),t[Er("0x15d")]();return t[Er("0x14c")]=Er("0x15e"),t[Er("0x15b")](60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t[Er("0x15d")](Er("0x15f")),Ir[Er("0xa6")](e[Er("0x154")]())}(e,t),text:function(e,t){e[Er("0xdd")]=240,e[Er("0x149")]=60,t[Er("0x14a")]=Er("0x14b"),t[Er("0x14c")]=Er("0x14d"),t.fillRect(100,1,62,20),t[Er("0x14c")]=Er("0x14e"),t[Er("0x14f")]=Er("0x150");const i=Er("0x151")+String[Er("0x152")](55357,56835);return t[Er("0x153")](i,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t[Er("0x14f")]="18pt Arial",t[Er("0x153")](i,4,45),Ir[Er("0xa6")](e[Er("0x154")]())}(e,t)};return Promise[Er("0x52")](i)}async[Er("0x164")](){const e=await navigator[Er("0x164")]();return{charging:e[Er("0x165")],chargingTime:e[Er("0x166")],dischargingTime:e[Er("0x167")],level:e.level}}async[Er("0xf")](){return!!navigator[Er("0x168")]&&await navigator[Er("0x168")][Er("0x169")]()}async getWebGlRenderer(){const e=document[Er("0x133")](Er("0x162")),t=e.getContext(Er("0x16a"))||e[Er("0x163")]("webgl-experimental"),i=t.getExtension(Er("0x16b"));return Promise.resolve(t.getParameter(i[Er("0x16c")]))}async[Er("0x11")](){const e=document[Er("0x133")](Er("0x16d")),t={basic:""===e.canPlayType('video/mp4; codecs="avc1.42E01E"'),advanced:""===e[Er("0x16e")](Er("0x16f"))};return Promise[Er("0x52")](t)}async[Er("0x31")](){const{publicKey:e,keyIdentifier:t}=await this.cryptoBinding[Er("0x170")]();return{publicKey:e,keyIdentifier:t}}static[Er("0x171")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator[Er("0x172")])||null!=window[Er("0xe5")]||window[Er("0x173")](Er("0x174")).matches}}var Dr,Tr,Rr=["uncompressed","ALLOW","DENY","TRUST","compress","compressed"];Dr=Rr,Tr=490,function(e){for(;--e;)Dr.push(Dr.shift())}(++Tr);var Br,zr,Pr,Or,Fr=function(e,t){return Rr[e-=0]};(zr=Br||(Br={}))[Fr("0x0")]=Fr("0x1"),zr[Fr("0x2")]="uncompressed",(Or=Pr||(Pr={}))[Fr("0x3")]=Fr("0x3"),Or.CHALLENGE="CHALLENGE",Or[Fr("0x4")]=Fr("0x4"),Or[Fr("0x5")]=Fr("0x5");var Nr,Lr,jr=["encode","AES-GCM","encrypt","exportKey","raw","stringify","RSA-OAEP","arrayBufferToBase64","btoa","importPublicKey","jwk","parse","SHA-256","generateSymKey","configManager","crypto","subtle","generateKey","decrypt","encryptPayload"];Nr=jr,Lr=494,function(e){for(;--e;)Nr.push(Nr.shift())}(++Lr);var Ur=function(e,t){return jr[e-=0]};class qr{constructor(e){this[Ur("0x0")]=e}generateSymKey(){return window[Ur("0x1")][Ur("0x2")][Ur("0x3")]({name:"AES-GCM",length:256},!0,["encrypt",Ur("0x4")])}async[Ur("0x5")](e,t){const i="string"==typeof e?(new TextEncoder)[Ur("0x6")](e):e,r=window[Ur("0x1")].getRandomValues(new Uint8Array(12)),n={name:Ur("0x7"),iv:r},a=await window.crypto.subtle[Ur("0x8")](n,t,i);return{payloadCipherText:this.arrayBufferToBase64(a),iv:r}}async encryptSymKeyBundle(e,t,i){const r=await window[Ur("0x1")].subtle[Ur("0x9")](Ur("0xa"),e),n=this.arrayBufferToBase64(r),a=this.arrayBufferToBase64(t),o=(new TextEncoder)[Ur("0x6")](JSON[Ur("0xb")]({symKey:n,iv:a})),s=await window[Ur("0x1")][Ur("0x2")].encrypt({name:Ur("0xc")},i,o);return this.arrayBufferToBase64(s)}[Ur("0xd")](e){let t="";const i=new Uint8Array(e),r=i.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(i[e]);return window[Ur("0xe")](t)}[Ur("0xf")](e){return window[Ur("0x1")].subtle.importKey(Ur("0x10"),JSON[Ur("0x11")](e),{name:Ur("0xc"),hash:Ur("0x12")},!0,["encrypt"])}async[Ur("0x8")](e,t){if(!window[Ur("0x1")]||!window[Ur("0x1")][Ur("0x2")])throw new Error("crypto is not supported");const i=await this[Ur("0x13")](),{payloadCipherText:r,iv:n}=await this[Ur("0x5")](t,i),a=await this[Ur("0xf")](e);return{encryptedData:r,encryptedKey:await this.encryptSymKeyBundle(i,n,a)}}}var Kr,Hr,Vr=["client","SERVER","COMMUNICATION","communication","errorSpace","message","error","toString","name",", errorCode: ","errorCode","toLog"];Kr=Vr,Hr=384,function(e){for(;--e;)Kr.push(Kr.shift())}(++Hr);var $r,Jr,Gr=function(e,t){return Vr[e-=0]};(Jr=$r||($r={})).CLIENT=Gr("0x0"),Jr[Gr("0x1")]="server",Jr[Gr("0x2")]=Gr("0x3");class Wr extends Error{constructor(e,t,i){var r,n;super(),this.error=e,this[Gr("0x4")]=t,this.errorCode=i,this[Gr("0x5")]=(null===(r=this[Gr("0x6")])||void 0===r?void 0:r[Gr("0x5")])||this[Gr("0x6")][Gr("0x7")](),this.name=(null===(n=this.error)||void 0===n?void 0:n[Gr("0x8")])||Wr.name}[Gr("0x7")](){return"SDKError: "+this[Gr("0x5")]+(this[Gr("0x4")]?", errorSpace: "+this.errorSpace:"")+(this.errorCode?Gr("0x9")+this[Gr("0xa")]:"")}[Gr("0xb")](){return t(t({name:this[Gr("0x8")],message:this[Gr("0x5")]},this[Gr("0x4")]&&{errorSpace:this[Gr("0x4")]}),this[Gr("0xa")]&&{errorCode:this[Gr("0xa")]})}}var Zr,Yr,Qr=["type","addEventToLocalStorage","length","flush","Error while emitting event","errorCode","toLog","min","catch","error","Error while emitting event (delayed flush)","getClientId","refreshSessionToken","sendDeviceDataEvent","Failed to refresh data","isTokenExpired","attributes","navigatorHighEntropyData","popAllEvents","fetchEventsFromLocalStorage","pop","sort","clientId","getDeviceId","userId","getUserId","sdkPlatform","getPublicData","keyIdentifier","warn","Crypto-binding is not supported. ","buildEncryptedRequestBody","getRotationData","data","signature","requestsManager","postData","device/events","headers","find","value","handleRotateResponse","deviceId","setDeviceId","sessionToken","setSessionToken","cleanLocalStorageEvents","Encryption error - missing public key","COMMUNICATION","stringify","compressData","encrypt","uncompressed","Failed to compress data, sending the data to the service uncompressed","storageManager","getItemLocalStorageSafe","parseInt","setItemLocalStorageSafe","shouldSendDeviceEvent","now","info","getDeviceData","emitEvent","sendPageLoadEvent","extractWindowRespurces","location","referrer","history","performance","getEntriesByType","resources","isArray","name","initiatorType","registerEventListeners","parse","removeItemLocalStorageSafe","ddls","lastDeviceInDeviceEvent","rei","lse","mouseEventsCollectionBuffer","deviceEventDataCollectionIgnoreList","publicKey","bufferSize","bufferInterval","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","configManager","deviceDataManager","cryptoBinding","serverPath","enableSessionToken","eventIndex","flushTimeoutHandle","safeEventCallback","EVENT_TYPE_INTERACTION","eventsQueue","interactionEventsManager","getConfValue","isMobile","eventTypesToStore","EVENT_TYPE_ACTION","maxEventStored","pollingInterval","pollingSessionToken","increaseEventIndex","toString","platform","sdkVersion","identityManager","getTabId","timestamp","enrichUADataIfDoesNotExist","includes"];Zr=Qr,Yr=307,function(e){for(;--e;)Zr.push(Zr.shift())}(++Yr);var Xr=function(e,t){return Qr[e-=0]};const en=Xr("0x0"),tn=Xr("0x1"),rn=Xr("0x2"),nn=Xr("0x3"),an=Xr("0x4"),on=Xr("0x5"),sn=Xr("0x6"),cn=Xr("0x7"),dn=Xr("0x8"),un=[Bi.EVENT_TYPE_ACTION,Bi[Xr("0x9")]],ln=Xr("0xa");class hn{constructor(e,i,r,n,a,o,s,c){this[Xr("0xb")]=e,this.storageManager=i,this[Xr("0xc")]=r,this.requestsManager=n,this.identityManager=a,this[Xr("0xd")]=o,this[Xr("0xe")]=s,this[Xr("0xf")]=c,this[Xr("0x10")]=null,this[Xr("0x11")]=null,this[Xr("0x12")]=async(e,i)=>{try{const r=t({},t({interaction_type:e},i)),n={type:Bi[Xr("0x13")],attributes:r};return await this.emitEvent(n)}catch(e){}},this[Xr("0xf")]=c,this[Xr("0x14")]=[],this.crypto=new qr(e),this[Xr("0x15")]=new pr(this[Xr("0xb")][Xr("0x16")](on,[]),this[Xr("0xb")].getConfValue(an,100),this[Xr("0x12")]),this[Xr("0x17")]=Ir[Xr("0x17")](),this[Xr("0x18")]=this[Xr("0xb")].getConfValue(ln,[Bi[Xr("0x19")]]),this[Xr("0x1a")]=this[Xr("0xb")][Xr("0x16")]("maxLocalStoredEvents",4),this[Xr("0x1b")]=36e4,this[Xr("0x1c")]()}async emitEvent(e){e.index=this[Xr("0x1d")](),e.location=location[Xr("0x1e")](),e.platform=navigator[Xr("0x1f")],e[Xr("0x20")]="1.52.6",e[Xr("0xe")]=this.serverPath,e.tabId=this[Xr("0x21")][Xr("0x22")](),e[Xr("0x23")]=Date.now(),await this[Xr("0x24")](e);let t=0;this[Xr("0x18")][Xr("0x25")](e[Xr("0x26")])?t=this[Xr("0x27")](e):this[Xr("0x14")].push(e);const i=this[Xr("0xb")][Xr("0x16")](cn,2);if(this[Xr("0x14")][Xr("0x28")]+t>=i||un[Xr("0x25")](e[Xr("0x26")])){this[Xr("0x11")]&&(clearTimeout(this[Xr("0x11")]),this.flushTimeoutHandle=null);try{return await this[Xr("0x29")]()}catch(t){throw xi.error(Xr("0x2a"),{clientId:this.identityManager.getClientId(),eventType:e[Xr("0x26")],error:t[Xr("0x2b")]?t[Xr("0x2c")]():t}),t}}if(!this[Xr("0x11")]&&this[Xr("0x14")].length>0){const t=this[Xr("0xb")][Xr("0x16")](dn,2),i=Math[Xr("0x2d")](t,30);this[Xr("0x11")]=setTimeout((()=>{this[Xr("0x11")]=null,this[Xr("0x29")]()[Xr("0x2e")]((t=>{xi[Xr("0x2f")](Xr("0x30"),{clientId:this[Xr("0x21")][Xr("0x31")](),eventType:e[Xr("0x26")],error:t[Xr("0x2b")]?t[Xr("0x2c")]():t})}))}),1e3*i)}return{}}async[Xr("0x32")](){try{return this.eventsQueue[Xr("0x28")]>0?await this[Xr("0x29")]():(await this[Xr("0x33")](!0),await this.flush())}catch(e){xi[Xr("0x2f")](Xr("0x34"),{e:e})}}async[Xr("0x1c")](){try{this[Xr("0x21")][Xr("0x35")]()&&await this[Xr("0x32")]()}catch(e){xi.error("Failed to polling data",{e:e})}finally{setTimeout((async()=>{await this.pollingSessionToken()}),this[Xr("0x1b")])}}async[Xr("0x24")](e){var t;if(!(null===(t=e.attributes)||void 0===t?void 0:t.navigatorHighEntropyData))try{e[Xr("0x36")][Xr("0x37")]=await yr()}catch(e){}}[Xr("0x38")](){const e=[],t=this[Xr("0x39")]();for(;this[Xr("0x14")].length;)e.push(this.eventsQueue[Xr("0x3a")]());return(null==t?void 0:t[Xr("0x28")])&&e.push(...t),e[Xr("0x3b")](((e,t)=>e[Xr("0x23")]-t[Xr("0x23")]))}async flush(){const e=this[Xr("0x38")]();if(0===e[Xr("0x28")])return{};const i={};i[Xr("0x3c")]=this.identityManager[Xr("0x31")](),i.deviceId=this[Xr("0x21")][Xr("0x3d")](),i[Xr("0x3e")]=this[Xr("0x21")][Xr("0x3f")](),i[Xr("0x40")]=this[Xr("0x17")]?Fi:Oi,i.events=e;try{const{keyIdentifier:e}=await this.cryptoBinding[Xr("0x41")]();i[Xr("0x42")]=e}catch(e){xi[Xr("0x43")](Xr("0x44")+e)}this[Xr("0xf")]&&(i.sessionToken=!0);const r=await this[Xr("0x45")](i,!0),n=await this[Xr("0xd")][Xr("0x46")]();let a;n&&(a=[{type:"key_rotation_data",data:n[Xr("0x47")],signature:n[Xr("0x48")]}]);const o=await this[Xr("0x49")][Xr("0x4a")](Xr("0x4b"),t(t({},r),a?{headers:a}:{}));if(o[Xr("0x4c")]){const e=o[Xr("0x4c")][Xr("0x4d")]((e=>"key_rotation_status"===e[Xr("0x26")]));e&&e[Xr("0x4e")]&&this[Xr("0xd")][Xr("0x4f")](e[Xr("0x4e")])}return o[Xr("0x50")]&&this[Xr("0x21")][Xr("0x51")](o[Xr("0x50")]),o[Xr("0x52")]&&this.identityManager[Xr("0x53")](o[Xr("0x52")]),o[Xr("0x3e")]&&this[Xr("0x21")].setUserId(o[Xr("0x3e")]),this[Xr("0x54")](),o}async[Xr("0x45")](e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.configManager[Xr("0x16")](sn,null);if(null===i&&t)return await this[Xr("0xb")].refreshConf(this[Xr("0x21")][Xr("0x31")]()),await this[Xr("0x45")](e);if(null===i)throw new Wr(new Error(Xr("0x55")),$r[Xr("0x56")]);try{const t=JSON[Xr("0x57")](e),r=this[Xr("0x58")](t),n=r||t,{encryptedData:a,encryptedKey:o}=await this.crypto[Xr("0x59")](i,n);return{data:a,key:o,dataType:r?Br.compress:Br[Xr("0x5a")]}}catch(e){throw new Wr(e,$r.CLIENT)}}[Xr("0x58")](e){try{return ai(e)}catch(e){xi[Xr("0x2f")](Xr("0x5b"),{clientId:this[Xr("0x21")][Xr("0x31")](),error:e})}}increaseEventIndex(){if(null===this[Xr("0x10")]){const e=this[Xr("0x5c")][Xr("0x5d")](rn),t=Number[Xr("0x5e")](e);this.eventIndex=Number.isNaN(t)?-1:t}return this.eventIndex++,this[Xr("0x5c")][Xr("0x5f")](rn,this[Xr("0x10")][Xr("0x1e")]()),this[Xr("0x10")]}[Xr("0x60")](){const e=this[Xr("0x5c")][Xr("0x5d")](en),t=this.storageManager[Xr("0x5d")](tn);return!e||!t||Date[Xr("0x61")]()-e>864e5||t!=this[Xr("0x21")][Xr("0x3d")]()}async[Xr("0x33")](e){if(!e&&!this.shouldSendDeviceEvent())return xi[Xr("0x62")]("no need to send device event"),!1;const t=await this[Xr("0xc")][Xr("0x63")](),i={type:Bi.EVENT_TYPE_DEVICE,attributes:t},r=await this[Xr("0x64")](i);return r&&(this[Xr("0x5c")][Xr("0x5f")](en,Date[Xr("0x61")]()),this.storageManager[Xr("0x5f")](tn,this[Xr("0x21")][Xr("0x3d")]())),r}async[Xr("0x65")](){const e="page_load";if(this[Xr("0xb")][Xr("0x16")](on,[])[Xr("0x25")](e))return!1;const i=this[Xr("0x66")]();return await this[Xr("0x64")]({type:Bi.EVENT_TYPE_INTERACTION,attributes:t(t({interaction_type:e,location:window[Xr("0x67")].href,referrer:document[Xr("0x68")]},window[Xr("0x69")]&&{window_historyLength:window.history[Xr("0x28")]}),i&&{windowResources:i})}),!0}[Xr("0x66")](){try{const e=window[Xr("0x6a")][Xr("0x6b")](Xr("0x6c"));return e&&Array[Xr("0x6d")](e)?e.map((e=>({name:e[Xr("0x6e")],initiatorType:e[Xr("0x6f")]}))):void 0}catch(e){}}registerEventListeners(){this.interactionEventsManager.registerEventListeners(),this[Xr("0x21")][Xr("0x70")]()}[Xr("0x39")](){const e=this.storageManager[Xr("0x5d")](nn);return e?JSON[Xr("0x71")](e):[]}addEventToLocalStorage(e){const t=this[Xr("0x39")]();return qi.maintainLastXItems(t,this[Xr("0x1a")],e),this[Xr("0x5c")].setItemLocalStorageSafe(nn,JSON[Xr("0x57")](t)),t[Xr("0x28")]}[Xr("0x54")](){this[Xr("0x5c")][Xr("0x72")](nn)}}var fn,pn,gn=["beforeunload","saveTabIdOnUnload","getDeviceId","deviceId","setDeviceId","info","Updating DeviceId","setItemLocalStorageSafe","getItemSessionStorageSafe","getItemLocalStorageSafe","setItemSessionStorageSafe","getUserId","configManager","getConfValue","now","removeUserId","userId","removeItemSessionStorageSafe","removeItemLocalStorageSafe","random","MAX_SAFE_INTEGER","toString","getTabId","setSessionToken","isTokenExpired","getSessionToken","parse","split","exp","iat","rci","rdi","rdit","rti","rst","userIdStorageExpiry","storageManager","clientId","setClientId","load","loadDeviceId","loadTabId","registerEventListeners","addEventListener"];fn=gn,pn=426,function(e){for(;--e;)fn.push(fn.shift())}(++pn);var mn=function(e,t){return gn[e-=0]};const bn="rui",vn=mn("0x0"),yn=mn("0x1"),_n=mn("0x2"),wn=mn("0x3"),xn=mn("0x4"),An=mn("0x5");class En{constructor(e,t,i){this[mn("0x6")]=e,this.configManager=t,this[mn("0x7")]=i,this[mn("0x8")](this[mn("0x7")])}[mn("0x9")](){this[mn("0xa")](),this[mn("0xb")]()}[mn("0xc")](){window[mn("0xd")](mn("0xe"),(async()=>this[mn("0xf")]()))}[mn("0x10")](){return this[mn("0x11")]}[mn("0x12")](e){this.deviceId!==e&&(xi[mn("0x13")](mn("0x14"),{deviceId:e}),this[mn("0x11")]=e,this.storageManager.setItemSessionStorageSafe(yn,e),this.storageManager[mn("0x15")](yn,e))}[mn("0xa")](){const e=this[mn("0x6")][mn("0x16")](yn)||this.storageManager[mn("0x17")](yn);return null!=e&&this.setDeviceId(e),e}getClientId(){return this.clientId}[mn("0x8")](e){this[mn("0x6")].getClientId()!=e&&this[mn("0x6")][mn("0x8")](e),this[mn("0x6")][mn("0x18")](vn,e)}[mn("0x19")](){if(Number(this[mn("0x6")].getItemLocalStorageSafe(_n))+this[mn("0x1a")][mn("0x1b")](An,864e5)<Date[mn("0x1c")]())return this[mn("0x1d")](),null;const e=this.storageManager[mn("0x16")](bn);return null!=e?e:this[mn("0x6")][mn("0x17")](bn)}setUserId(e){this[mn("0x1e")]=e,this[mn("0x6")].setItemSessionStorageSafe(bn,e),this[mn("0x6")][mn("0x15")](bn,e),this.storageManager[mn("0x15")](_n,Date[mn("0x1c")]())}[mn("0x1d")](){this[mn("0x6")][mn("0x1f")](bn),this[mn("0x6")].removeItemLocalStorageSafe(bn),this[mn("0x6")][mn("0x20")](_n)}[mn("0xb")](){const e=this.storageManager[mn("0x16")](wn);e?(this.storageManager[mn("0x1f")](wn),this.tabId=e):this.tabId=Math.floor(Math[mn("0x21")]()*Number[mn("0x22")])[mn("0x23")]()}[mn("0x24")](){return this.tabId}saveTabIdOnUnload(){this.storageManager.setItemSessionStorageSafe(wn,this.tabId)}[mn("0x25")](e){this[mn("0x6")][mn("0x15")](xn,e)}getSessionToken(){return this[mn("0x6")][mn("0x17")](xn)||this[mn("0x6")][mn("0x16")](xn)}[mn("0x26")](){var e;const t=this[mn("0x27")]();if(!t)return!0;try{const i=JSON[mn("0x28")](atob(t[mn("0x29")](".")[1]));let r=(null!==(e=i[mn("0x2a")])&&void 0!==e?e:i[mn("0x2b")])*(i.exp&&i[mn("0x2a")]<1e12?1e3:1);return i[mn("0x2a")]||(r+=9e5),Date[mn("0x1c")]()>=r}catch(e){return xi.error("Invalid JWT:",{error:e}),!0}}}var Sn,kn,Mn=["serverPath","postDataFromURL","POST","include","application/json","stringify","GET","callServer","fetch-api is not supported","CLIENT","json","status","message","COMMUNICATION","postData"];Sn=Mn,kn=134,function(e){for(;--e;)Sn.push(Sn.shift())}(++kn);var Cn=function(e,t){return Mn[e-=0]};class In{constructor(e){this.serverPath=e}async[Cn("0x0")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.postDataFromURL(this[Cn("0x1")]+e,t,i)}async[Cn("0x2")](e,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:Cn("0x3"),credentials:Cn("0x4"),headers:new Headers(t({"Content-Type":Cn("0x5")},r)),body:JSON[Cn("0x6")](i)};return await this.callServer(e,n)}async getData(e){const t=this[Cn("0x1")]+e,i={method:Cn("0x7"),credentials:"include"};return await this[Cn("0x8")](t,i)}async[Cn("0x8")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!("fetch"in window))throw new Wr(new Error(Cn("0x9")),$r[Cn("0xa")]);try{const i=await fetch(e,t),r=await i[Cn("0xb")]();if(i.ok)return r;throw new Wr(new Error(r.message||i.statusText),$r.SERVER,i[Cn("0xc")])}catch(e){if(!(e instanceof Wr))throw new Wr(new Error(e[Cn("0xd")]),$r[Cn("0xe")]);throw e}}}var Dn,Tn,Rn=["stringify","string","throwError","validateSDKParams","keys","REQUIRED_SDK_PARAMS","filter","throwOrReturnResult"];Dn=Rn,Tn=113,function(e){for(;--e;)Dn.push(Dn.shift())}(++Tn);var Bn=function(e,t){return Rn[e-=0]};class zn{constructor(){this.REQUIRED_SDK_PARAMS={clientId:Bn("0x0")}}throwOrReturnResult(e,t,i){if(!e&&((null==t?void 0:t.logIfInvalid)&&xi.info(i),null==t?void 0:t[Bn("0x1")]))throw new Error(i);return e}[Bn("0x2")](e,t){const i=Object[Bn("0x3")](this[Bn("0x4")])[Bn("0x5")]((t=>typeof e[t]!=this.REQUIRED_SDK_PARAMS[t]));return this[Bn("0x6")](0==i.length,t,"Invalid SDK params was provided: "+JSON[Bn("0x7")](i))}}var Pn,On,Fn=["push","logsMinimumBatch","getConfValue","logsMinimumDelay","logs","now","lastTimeLogsSent","getClientId","floor","platform","postData","device/logs","requestsManager","identityManager","configManager","logMiddleware","reportLogs","middlewares"];Pn=Fn,On=426,function(e){for(;--e;)Pn.push(Pn.shift())}(++On);var Nn=function(e,t){return Fn[e-=0]};class Ln{constructor(e,t,i){this[Nn("0x0")]=e,this[Nn("0x1")]=t,this[Nn("0x2")]=i,this.lastTimeLogsSent=0,this[Nn("0x3")]=async()=>{try{await this[Nn("0x4")]()}catch(e){}},xi[Nn("0x5")][Nn("0x6")](this.logMiddleware)}async[Nn("0x4")](){if(!this[Nn("0x2")].getConfValue("enableLogsReporting",!1))return;const e=this[Nn("0x2")].getConfValue(Nn("0x7"),6),t=this.configManager[Nn("0x8")](Nn("0x9"),12e4);if(xi[Nn("0xa")].length<e||this.lastTimeLogsSent+t>Date[Nn("0xb")]())return;this[Nn("0xc")]=Date.now();const i=xi.flush(),r=this.identityManager[Nn("0xd")](),n=Math[Nn("0xe")](Date[Nn("0xb")]()/1e3),a={sdkVersion:"1.52.6",platform:navigator[Nn("0xf")],clientId:r,timestamp:n,logEntries:i};await this[Nn("0x0")][Nn("0x10")](Nn("0x11"),a)}}var jn,Un,qn=["getItemLocalStorageSafe","getDeviceId","getClientId","device/migrate-identifiers","requestsManager","postDataFromURL","deviceId","true","rimd","identityManager","storageManager","migrateIdentifiers"];jn=qn,Un=284,function(e){for(;--e;)jn.push(jn.shift())}(++Un);var Kn=function(e,t){return qn[e-=0]};const Hn=Kn("0x0");class Vn{constructor(e,t,i){this[Kn("0x1")]=e,this.requestsManager=t,this[Kn("0x2")]=i}async[Kn("0x3")](e){if("true"!=this[Kn("0x2")][Kn("0x4")](Hn)){const t=this.identityManager[Kn("0x5")](),i=this[Kn("0x1")][Kn("0x6")](),r=(e.endsWith("/")?e:e+"/")+Kn("0x7"),n=await this[Kn("0x8")][Kn("0x9")](r,{deviceId:t,clientId:i});n[Kn("0xa")]&&n.deviceId==t&&this[Kn("0x2")].setItemLocalStorageSafe(Hn,Kn("0xb"))}}}var $n,Jn,Gn=["userId","sdk init started","refreshConf","getClientId","tenantId","cryptoBinding","createCryptoBinding","expiryDays","deviceDataManager","config_disabled","identifiersMigrationEnabled","migrateIdentifiers","sendDeviceDataEvent","catch","sendPageLoadEvent","updateUserId","registerEventListeners","sdk init done","init_not_called","init_failed","triggerActionEvent","includes","warn","_error_'invalid action type - ","claimedUserIdType","Invalid claimedUserIdType","invalid_claimed_user_id_type_","getDeviceData","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","uploadFile","transactionData","customAttributes","emitEvent","Unhandled SDK error. Received eventResponse: ","stringify","slice","CLIENT","SERVER","errorSpace","_error_","errorCode","message","unexpected_error_","identifyUser","identifyUser called without a valid userid","toString","setUserId","EVENT_TYPE_IDENTIFICATION","deviceId","unidentifiedUser","getUserId","removeUserId","setAuthenticatedUser","setUser","RiskID","TSAccountProtection","dispatchEvent","RiskIDReady","TSAccountProtectionReady","undefined","enableIdentifiersMigration","enableDeviceAttributesInActions","actions","https://collect.riskid.security/","phone_number","account_id","ssn","passport_number","drivers_license_number","other","initializationPromise","disabledReason","enableSessionToken","firstPartyMigrationUrl","initializedInstance","SDK already initialized","string","clientId","serverPath","options","platformSdkVersion","enabled","validationManager","validateSDKParams","invalid_params","storageManager","requestsManager","configManager","identityManager","load","migrationsManager","logsReporter","generateDisabledToken","now","disabled_sdk_","getConfValue","getActions","Session token is not enabled","isInitialized","info","SDK disabled","isTokenExpired","eventsManager","refreshSessionToken","getSessionToken","object"];$n=Gn,Jn=405,function(e){for(;--e;)$n.push($n.shift())}(++Jn);var Wn=function(e,t){return Gn[e-=0]};const Zn=[null,void 0,Wn("0x0"),"",0],Yn=Wn("0x1"),Qn=Wn("0x2"),Xn=Wn("0x3"),ea=Wn("0x4"),ta=["email",Wn("0x5"),Wn("0x6"),Wn("0x7"),"national_id",Wn("0x8"),Wn("0x9"),Wn("0xa")];class ia{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this[Wn("0xb")]=null,this[Wn("0xc")]=null,this[Wn("0xd")]=!1,this.identifiersMigrationEnabled=!1,this[Wn("0xe")]=null,this.validationManager=new zn,ia[Wn("0xf")])throw new Error(Wn("0x10"));ia.initializedInstance=!0;const r=typeof t===Wn("0x11");this[Wn("0x12")]=r?t:e,this.options=r?{serverPath:e}:t,(i=this.options).serverPath||(i[Wn("0x13")]=ea),this[Wn("0x14")][Wn("0x13")]=new URL(this[Wn("0x14")][Wn("0x13")]).toString(),this[Wn("0xe")]=this[Wn("0x14")][Wn("0xe")]||null,this[Wn("0x15")]=this[Wn("0x14")][Wn("0x15")],xi[Wn("0x16")]=!!this[Wn("0x14")].verbose,this[Wn("0x17")][Wn("0x18")](this,{throwError:!0,logIfInvalid:!0})||(this[Wn("0xc")]=Wn("0x19")),this[Wn("0x1a")]=new mi(this[Wn("0x12")]),this[Wn("0x1b")]=new In(this[Wn("0x14")][Wn("0x13")]),this[Wn("0x1c")]=new Ii(this.storageManager,this[Wn("0x1b")]),this[Wn("0x1d")]=new En(this[Wn("0x1a")],this[Wn("0x1c")],this[Wn("0x12")]),this[Wn("0x1d")][Wn("0x1e")](),this[Wn("0x1f")]=new Vn(this[Wn("0x1d")],this.requestsManager,this[Wn("0x1a")]),this.enableSessionToken=this[Wn("0x14")][Wn("0xd")]||!1,this[Wn("0x20")]=new Ln(this[Wn("0x1b")],this[Wn("0x1d")],this[Wn("0x1c")])}[Wn("0x21")](e){const t=Date[Wn("0x22")]();return Wn("0x23")+(this.disabledReason||"unknown")+"_"+e+"_"+t}get[Wn("0x3")](){return this[Wn("0x1c")][Wn("0x24")](Xn,[])}async[Wn("0x25")](){return await this.isInitialized(),this[Wn("0x3")]}async getSessionToken(){if(!this[Wn("0xd")])throw new Error(Wn("0x26"));return await this[Wn("0x27")]()?(this[Wn("0x1d")][Wn("0x2a")]()&&await this[Wn("0x2b")][Wn("0x2c")](),this[Wn("0x1d")][Wn("0x2d")]()):(xi[Wn("0x28")](Wn("0x29")),{actionToken:this[Wn("0x21")]("session")})}async init(e){const t=typeof e!==Wn("0x2e")?e:null==e?void 0:e[Wn("0x2f")];return xi[Wn("0x28")](Wn("0x30")),this.initializationPromise=(async()=>{await this.configManager[Wn("0x31")](this[Wn("0x1d")][Wn("0x32")]());const e=this[Wn("0x1c")][Wn("0x24")](Wn("0x33"),null),i=this[Wn("0x1c")][Wn("0x24")]("keyRotation",null);if(this[Wn("0x34")]=fi.crypto[Wn("0x35")]("sign",(null==i?void 0:i.isEnabled)?{keyRotation:{isEnabled:!0,expiryDays:i[Wn("0x36")],startedAt:i.startedAt,tenantId:e}}:void 0),this.deviceDataManager=new Cr(this[Wn("0x1a")],this[Wn("0x1c")],this[Wn("0x34")]),this[Wn("0x2b")]=new hn(this[Wn("0x1c")],this.storageManager,this[Wn("0x37")],this[Wn("0x1b")],this[Wn("0x1d")],this[Wn("0x34")],this[Wn("0x14")][Wn("0x13")],this[Wn("0xd")]),null!==this.disabledReason)return!1;const r=this[Wn("0x1c")][Wn("0x24")]("sdkEnabled",void 0);return r?(this[Wn("0x39")]=this.identifiersMigrationEnabled||this[Wn("0x1c")][Wn("0x24")](Yn,!1),this[Wn("0x39")]&&this[Wn("0xe")]&&await this[Wn("0x1f")][Wn("0x3a")](this[Wn("0xe")]),xi.enabled=xi[Wn("0x16")]||!!this[Wn("0x1c")][Wn("0x24")]("verbose",!1),await this[Wn("0x2b")][Wn("0x3b")]()[Wn("0x3c")]((()=>{})),await this[Wn("0x2b")][Wn("0x3d")]()[Wn("0x3c")]((()=>{})),await this[Wn("0x3e")](t)[Wn("0x3c")]((()=>{})),this[Wn("0x2b")][Wn("0x3f")](),await this[Wn("0x2b")].flush()[Wn("0x3c")]((()=>{})),xi.info(Wn("0x40")),!0):(this[Wn("0xc")]=void 0===r?"missing_config":Wn("0x38"),!1)})(),await this[Wn("0xb")]}async[Wn("0x27")](){if(null===this[Wn("0xb")])return this.disabledReason||(this[Wn("0xc")]=Wn("0x41")),!1;const e=await this[Wn("0xb")];return e||this[Wn("0xc")]||(this[Wn("0xc")]=Wn("0x42")),e}async[Wn("0x43")](e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Date.now();if(!await this[Wn("0x27")]())return xi[Wn("0x28")]("SDK disabled"),{actionToken:this[Wn("0x21")]("action")};if(!this.actions[Wn("0x44")](e))return xi[Wn("0x45")]("Invalid action type",{actionType:e}),{actionToken:$r.CLIENT+Wn("0x46")+e+"'_"+r};const n=null==i?void 0:i[Wn("0x47")];if(n&&!ta[Wn("0x44")](n))return xi[Wn("0x45")](Wn("0x48"),{claimedUserIdType:n}),{actionToken:Wn("0x49")+n+"_"+r};let a;this[Wn("0x1c")][Wn("0x24")](Qn,!1)&&(a=await this[Wn("0x37")][Wn("0x4a")]());const o=t({type:Bi.EVENT_TYPE_ACTION,attributes:t(t(t(t(t(t(t(t(t(t(t(t(t({action_type:e},(null==i?void 0:i[Wn("0x4b")])&&{correlation_id:i[Wn("0x4b")]}),(null==i?void 0:i.claimedUserId)&&{claimed_user_id:i[Wn("0x4c")]}),n&&{claimed_user_id_type:n}),(null==i?void 0:i[Wn("0x4d")])&&{public_key:i[Wn("0x4d")]}),(null==i?void 0:i[Wn("0x4e")])&&{extension_metadata:i[Wn("0x4e")]}),(null==i?void 0:i[Wn("0x4f")])&&{extension_device_attributes:i.extensionDeviceAttributes}),(null==i?void 0:i[Wn("0x50")])&&{suspicious_signals:i[Wn("0x50")]}),(null==i?void 0:i.suspiciousContext)&&{suspicious_context:i[Wn("0x51")]}),(null==i?void 0:i[Wn("0x52")])&&{download_file:i[Wn("0x52")]}),(null==i?void 0:i[Wn("0x53")])&&{upload_file:i.uploadFile}),this[Wn("0x15")]&&{platform_sdk_version:this[Wn("0x15")]}),(null==i?void 0:i[Wn("0x54")])&&{transactionData:i[Wn("0x54")]}),a)},(null==i?void 0:i[Wn("0x55")])&&{customAttributes:i[Wn("0x55")]});try{const e=await this[Wn("0x2b")][Wn("0x56")](o),{actionToken:t}=e;if(!t)throw new Wr(new Error(Wn("0x57")+("object"==typeof e?JSON[Wn("0x58")](e)[Wn("0x59")](15):e)),$r[Wn("0x5a")]);return e}catch(i){return{actionToken:i instanceof Wr?i.errorSpace===$r[Wn("0x5b")]?i[Wn("0x5c")]+Wn("0x5d")+e+"_"+i[Wn("0x5e")]+"_'"+i[Wn("0x5f")]+"'_"+r:i.errorSpace+Wn("0x5d")+e+"_'"+i[Wn("0x5f")]+"'_"+r:Wn("0x60")+e+"_"+r}}}async[Wn("0x61")](e){return await this[Wn("0x27")]()?this[Wn("0x3e")](e):(xi[Wn("0x28")]("SDK disabled"),!1)}async[Wn("0x3e")](e){if(Zn.includes(e))return xi[Wn("0x28")](Wn("0x62"),{userId:e}),!1;e=e[Wn("0x63")](),xi[Wn("0x28")](Wn("0x61"),{userId:e});const t=this[Wn("0x1d")].getUserId();return t===e||(this[Wn("0x1d")][Wn("0x64")](e),!!(await this[Wn("0x2b")][Wn("0x56")]({type:Bi[Wn("0x65")],attributes:{previous_user_id:t,user_id:e}}))[Wn("0x66")])}async[Wn("0x67")](){if(!await this[Wn("0x27")]())return xi[Wn("0x28")](Wn("0x29")),!1;const e=this.identityManager[Wn("0x68")]();return null!=e&&this[Wn("0x1d")][Wn("0x69")](),!!(await this[Wn("0x2b")][Wn("0x56")]({type:Bi[Wn("0x65")],attributes:{previous_user_id:e}})).deviceId}async[Wn("0x6a")](e){return await this[Wn("0x61")](e)}async[Wn("0x6b")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[Wn("0x6a")](e,t)}async clearUser(){return await this.unidentifiedUser()}}ia[Wn("0xf")]=!1,document[Wn("0x6e")](new CustomEvent(Wn("0x70")));var ra,na,aa=["moduleMetadata","getInitConfig","undefined","__PLATFORM_SDK_VERSION__","platformSdkVersion","utils","exceptions","TsError","tsPlatform not initialized","triggerActionEvent","setAuthenticatedUser","clearUser","identifyUser","unidentifiedUser","getActions","getSessionToken","identityManager","getClientId","eventsManager","flush","events","MODULE_INITIALIZED"];ra=aa,na=394,function(e){for(;--e;)ra.push(ra.shift())}(++na);var oa=function(e,t){return aa[e-=0]};let sa=null;function ca(e){if(!e)throw new(fi[oa("0x7")][oa("0x8")][oa("0x9")])("not_initialized",oa("0xa"))}fi[oa("0x0")].on(fi.events[oa("0x1")],(()=>{const{clientId:e,drs:t}=fi[oa("0x2")][oa("0x3")](),i=t||{},{enabled:r,userId:a}=i,o=n(i,oi);if(!1===r)return;const s=typeof window!==oa("0x4")&&window[oa("0x5")]||typeof globalThis!==oa("0x4")&&globalThis[oa("0x5")]||void 0;s&&(o[oa("0x6")]=s),sa=new ia(e,o),sa.init({userId:a})}));const da=function(){return ca(sa),sa[oa("0x11")]()},ua={getDeviceId:()=>sa[oa("0x12")].getDeviceId(),getClientId:()=>sa.identityManager[oa("0x13")](),flush:()=>sa[oa("0x14")][oa("0x15")]()};var la=Object.freeze({__proto__:null,__internal:ua,clearUser:function(){return ca(sa),sa[oa("0xd")](...arguments)},getActions:function(){return ca(sa),sa[oa("0x10")]()},getSessionToken:da,identifyUser:function(){return ca(sa),sa[oa("0xe")](...arguments)},setAuthenticatedUser:function(){return ca(sa),sa[oa("0xc")](...arguments)},setUser:function(){return ca(sa),sa.setUser(...arguments)},triggerActionEvent:function(){return ca(sa),sa[oa("0xb")](...arguments)},unidentifiedUser:function(){return ca(sa),sa[oa("0xf")](...arguments)}});class ha extends Error{constructor(e,t,i){super(i),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}}const fa={BASE:window.location.origin,VERSION:"",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var pa,ga,ma,ba;!function(e){var t;(t=e.feedback||(e.feedback={})).OK="ok",t.OTHER="other",t.DOCUMENT_NOT_FOUND="document_not_found",t.FACE_NOT_FOUND="face_not_found",t.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",t.OBSTRUCTED="obstructed",t.BLUR="blur",t.GLARE="glare",t.DOCUMENT_NOT_SUPPORTED="document_not_supported",t.DOCUMENT_NOT_MATCHING="document_not_matching",t.WRONG_DOCUMENT_SIDE="wrong_document_side",t.MULTI_FACE="multi_face",t.FACE_ROTATED="face_rotated",t.FACE_TOO_SMALL="face_too_small",t.FACE_TOO_CLOSE="face_too_close",t.CLOSED_EYES="closed_eyes",t.FACE_ANGLE_TOO_LARGE="face_angle_too_large",t.FACE_CLOSE_TO_BORDER="face_close_to_border",t.FACE_OCCLUDED="face_occluded",t.FACE_CROPPED="face_cropped",t.BARCODE_NOT_FOUND="barcode_not_found",t.GLARE_SELFIE="glare_selfie",t.BLUR_SELFIE="blur_selfie",t.RESTRICTED_CRITERIA="restricted_criteria"}(pa||(pa={})),function(e){var t;(t=e.image_type||(e.image_type={})).DOCUMENT_FRONT="document_front",t.DOCUMENT_BACK="document_back",t.SELFIE="selfie"}(ga||(ga={})),function(e){var t,i;(t=e.status||(e.status={})).PENDING="pending",t.CAPTURING="capturing",t.PROCESSING="processing",t.RECAPTURE="recapture",t.COMPLETE="complete",t.ERROR="error",t.EXPIRED="expired",(i=e.recapture_reason||(e.recapture_reason={})).IMAGE_MISSING="image_missing",i.DOCUMENT_EXPIRED="document_expired",i.DOCUMENT_NOT_SUPPORTED="document_not_supported",i.DOCUMENT_DAMAGED="document_damaged",i.POOR_IMAGE_QUALITY="poor_image_quality",i.DOCUMENT_NOT_FOUND="document_not_found",i.OBSTRUCTED="obstructed",i.BLUR="blur",i.GLARE="glare",i.DOCUMENT_NOT_MATCHING="document_not_matching",i.WRONG_DOCUMENT_SIDE="wrong_document_side",i.FACE_NOT_FOUND="face_not_found",i.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",i.INVALID_INPUT="invalid_input",i.MULTI_FACE="multi_face",i.FACE_ROTATED="face_rotated",i.FACE_TOO_SMALL="face_too_small",i.FACE_TOO_CLOSE="face_too_close",i.CLOSED_EYES="closed_eyes",i.FACE_ANGLE_TOO_LARGE="face_angle_too_large",i.FACE_CLOSE_TO_BORDER="face_close_to_border",i.FACE_OCCLUDED="face_occluded",i.FACE_CROPPED="face_cropped",i.BARCODE_NOT_FOUND="barcode_not_found",i.GLARE_SELFIE="glare_selfie",i.BLUR_SELFIE="blur_selfie",i.NO_FACE="no_face",i.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(ma||(ma={})),function(e){var t;(t=e.client_type||(e.client_type={})).HOSTED_APP="hosted_app",t.MOBILE_SDK="mobile_sdk"}(ba||(ba={}));var va,ya,_a={},wa={get exports(){return _a},set exports(e){_a=e}};va=wa,ya=_a,function(e,t){var i="function",r="undefined",n="object",a="string",o="major",s="model",c="name",d="type",u="vendor",l="version",h="architecture",f="console",p="mobile",g="tablet",m="smarttv",b="wearable",v="embedded",y="Amazon",_="Apple",w="ASUS",x="BlackBerry",A="Browser",E="Chrome",S="Firefox",k="Google",M="Huawei",C="LG",I="Microsoft",D="Motorola",T="Opera",R="Samsung",B="Sharp",z="Sony",P="Xiaomi",O="Zebra",F="Facebook",N="Chromium OS",L="Mac OS",j=" Browser",U=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},q=function(e,t){return typeof e===a&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===r?e:e.substring(0,500)},V=function(e,r){for(var a,o,s,c,d,u,l=0;l<r.length&&!d;){var h=r[l],f=r[l+1];for(a=o=0;a<h.length&&!d&&h[a];)if(d=h[a++].exec(e))for(s=0;s<f.length;s++)u=d[++o],typeof(c=f[s])===n&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,u):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=u?u.replace(c[1],c[2]):t:this[c[0]]=u?c[1].call(this,u,c[2]):t:4===c.length&&(this[c[0]]=u?c[3].call(this,u.replace(c[1],c[2])):t):this[c]=u||t;l+=2}},$=function(e,i){for(var r in i)if(typeof i[r]===n&&i[r].length>0){for(var a=0;a<i[r].length;a++)if(q(i[r][a],e))return"?"===r?t:r}else if(q(i[r],e))return"?"===r?t:r;return i.hasOwnProperty("*")?i["*"]:e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},G={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,l],[/opios[\/ ]+([\w\.]+)/i],[l,[c,T+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[l,[c,T+" GX"]],[/\bopr\/([\w\.]+)/i],[l,[c,T]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[l,[c,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,l],[/quark(?:pc)?\/([-\w\.]+)/i],[l,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[l,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[c,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[l,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[l,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[l,[c,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+A],l],[/\bfocus\/([\w\.]+)/i],[l,[c,S+" Focus"]],[/\bopt\/([\w\.]+)/i],[l,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[c,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[l,[c,S]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360"+j]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],l],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+j],l],[/samsungbrowser\/([\w\.]+)/i],[l,[c,R+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],l],[/metasr[\/ ]?([\d\.]+)/i],[l,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[c,l],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,F],l],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[l,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[c,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,E+" WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[c,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,l],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[l,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[l,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[l,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],l],[/(wolvic)\/([\w\.]+)/i],[c,l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[c,S+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,[l,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[l,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,K]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[u,R],[d,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[u,R],[d,p]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[u,_],[d,p]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[u,_],[d,g]],[/(macintosh);/i],[s,[u,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[u,B],[d,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[u,M],[d,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[u,M],[d,p]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[s,/_/g," "],[u,P],[d,p]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[u,P],[d,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[u,"OPPO"],[d,p]],[/\b(opd2\d{3}a?) bui/i],[s,[u,"OPPO"],[d,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[u,"Vivo"],[d,p]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[u,"Realme"],[d,p]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[u,D],[d,p]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[u,D],[d,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[u,C],[d,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[u,C],[d,p]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[u,"Lenovo"],[d,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[u,"Nokia"],[d,p]],[/(pixel c)\b/i],[s,[u,k],[d,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[u,k],[d,p]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,z],[d,p]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[u,z],[d,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[u,"OnePlus"],[d,p]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[u,y],[d,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[u,y],[d,p]],[/(playbook);[-\w\),; ]+(rim)/i],[s,u,[d,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[u,x],[d,p]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[u,w],[d,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[u,w],[d,p]],[/(nexus 9)/i],[s,[u,"HTC"],[d,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[s,/_/g," "],[d,p]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[u,"TCL"],[d,g]],[/(itel) ((\w+))/i],[[u,K],s,[d,$,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[u,"Acer"],[d,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[u,"Meizu"],[d,p]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[u,"Ulefone"],[d,p]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[u,"Nothing"],[d,p]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,s,[d,p]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,s,[d,g]],[/(surface duo)/i],[s,[u,I],[d,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[u,"Fairphone"],[d,p]],[/(u304aa)/i],[s,[u,"AT&T"],[d,p]],[/\bsie-(\w*)/i],[s,[u,"Siemens"],[d,p]],[/\b(rct\w+) b/i],[s,[u,"RCA"],[d,g]],[/\b(venue[\d ]{2,7}) b/i],[s,[u,"Dell"],[d,g]],[/\b(q(?:mv|ta)\w+) b/i],[s,[u,"Verizon"],[d,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[u,"Barnes & Noble"],[d,g]],[/\b(tm\d{3}\w+) b/i],[s,[u,"NuVision"],[d,g]],[/\b(k88) b/i],[s,[u,"ZTE"],[d,g]],[/\b(nx\d{3}j) b/i],[s,[u,"ZTE"],[d,p]],[/\b(gen\d{3}) b.+49h/i],[s,[u,"Swiss"],[d,p]],[/\b(zur\d{3}) b/i],[s,[u,"Swiss"],[d,g]],[/\b((zeki)?tb.*\b) b/i],[s,[u,"Zeki"],[d,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],s,[d,g]],[/\b(ns-?\w{0,9}) b/i],[s,[u,"Insignia"],[d,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[u,"NextBook"],[d,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],s,[d,p]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],s,[d,p]],[/\b(ph-1) /i],[s,[u,"Essential"],[d,p]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[u,"Envizen"],[d,g]],[/\b(trio[-\w\. ]+) b/i],[s,[u,"MachSpeed"],[d,g]],[/\btu_(1491) b/i],[s,[u,"Rotor"],[d,g]],[/(shield[\w ]+) b/i],[s,[u,"Nvidia"],[d,g]],[/(sprint) (\w+)/i],[u,s,[d,p]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,I],[d,p]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[u,O],[d,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[u,O],[d,p]],[/smart-tv.+(samsung)/i],[u,[d,m]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,R],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,C],[d,m]],[/(apple) ?tv/i],[u,[s,_+" TV"],[d,m]],[/crkey/i],[[s,E+"cast"],[u,k],[d,m]],[/droid.+aft(\w+)( bui|\))/i],[s,[u,y],[d,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[u,B],[d,m]],[/(bravia[\w ]+)( bui|\))/i],[s,[u,z],[d,m]],[/(mitv-\w{5}) bui/i],[s,[u,P],[d,m]],[/Hbbtv.*(technisat) (.*);/i],[u,s,[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,H],[s,H],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,s,[d,f]],[/droid.+; (shield) bui/i],[s,[u,"Nvidia"],[d,f]],[/(playstation [345portablevi]+)/i],[s,[u,z],[d,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[u,I],[d,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[s,[u,R],[d,b]],[/((pebble))app/i],[u,s,[d,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[u,_],[d,b]],[/droid.+; (glass) \d/i],[s,[u,k],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[s,[u,O],[d,b]],[/(quest( \d| pro)?)/i],[s,[u,F],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[d,v]],[/(aeobc)\b/i],[s,[u,y],[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[d,p]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[d,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,p]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,l],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[l,$,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,$,J],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,L],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[l,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,l],[/\(bb(10);/i],[l,[c,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[c,S+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[l,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[l,[c,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,N],l],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,l],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,l]]},W=function f(m,b){if(typeof m===n&&(b=m,m=t),!(this instanceof f))return new f(m,b).getResult();var v=typeof e!==r&&e.navigator?e.navigator:t,y=m||(v&&v.userAgent?v.userAgent:""),_=v&&v.userAgentData?v.userAgentData:t,w=b?function(e,t){var i={};for(var r in e)t[r]&&t[r].length%2==0?i[r]=t[r].concat(e[r]):i[r]=e[r];return i}(G,b):G,x=v&&v.userAgent==y;return this.getBrowser=function(){var e={};return e[c]=t,e[l]=t,V.call(e,y,w.browser),e[o]=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:t}(e[l]),x&&v&&v.brave&&typeof v.brave.isBrave==i&&(e[c]="Brave"),e},this.getCPU=function(){var e={};return e[h]=t,V.call(e,y,w.cpu),e},this.getDevice=function(){var e={};return e[u]=t,e[s]=t,e[d]=t,V.call(e,y,w.device),x&&!e[d]&&_&&_.mobile&&(e[d]=p),x&&"Macintosh"==e[s]&&v&&typeof v.standalone!==r&&v.maxTouchPoints&&v.maxTouchPoints>2&&(e[s]="iPad",e[d]=g),e},this.getEngine=function(){var e={};return e[c]=t,e[l]=t,V.call(e,y,w.engine),e},this.getOS=function(){var e={};return e[c]=t,e[l]=t,V.call(e,y,w.os),x&&!e[c]&&_&&_.platform&&"Unknown"!=_.platform&&(e[c]=_.platform.replace(/chrome os/i,N).replace(/macos/i,L)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(e){return y=typeof e===a&&e.length>500?H(e,500):e,this},this.setUA(y),this};W.VERSION="1.0.39",W.BROWSER=U([c,l,o]),W.CPU=U([h]),W.DEVICE=U([s,u,d,f,p,m,g,b,v]),W.ENGINE=W.OS=U([c,l]),va.exports&&(ya=va.exports=W),ya.UAParser=W;var Z=typeof e!==r&&(e.jQuery||e.Zepto);if(Z&&!Z.ua){var Y=new W;Z.ua=Y.getResult(),Z.ua.get=function(){return Y.getUA()},Z.ua.set=function(e){Y.setUA(e);var t=Y.getResult();for(var i in t)Z.ua[i]=t[i]}}}("object"==typeof window?window:Z);const xa="1.4.8",Aa=_a.UAParser(),Ea=xa;function Sa(e,t){var i,r,n,a,o;return{Authorization:`Bearer ${t}`,"ts-sdk-version":Ea,"ts-client-id":e,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(i=null==Aa?void 0:Aa.os)||void 0===i?void 0:i.name,"ts-os-version":null===(r=null==Aa?void 0:Aa.os)||void 0===r?void 0:r.version,"ts-device-model":null===(n=null==Aa?void 0:Aa.device)||void 0===n?void 0:n.model,"ts-manufacturer":null===(a=null==Aa?void 0:Aa.device)||void 0===a?void 0:a.vendor,"ts-browser":null===(o=null==Aa?void 0:Aa.browser)||void 0===o?void 0:o.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var ka="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ma=[],Ca=[],Ia="undefined"!=typeof Uint8Array?Uint8Array:Array,Da=!1;function Ta(){Da=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,i=e.length;t<i;++t)Ma[t]=e[t],Ca[e.charCodeAt(t)]=t;Ca["-".charCodeAt(0)]=62,Ca["_".charCodeAt(0)]=63}function Ra(e,t,i){for(var r,n,a=[],o=t;o<i;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(Ma[(n=r)>>18&63]+Ma[n>>12&63]+Ma[n>>6&63]+Ma[63&n]);return a.join("")}function Ba(e){var t;Da||Ta();for(var i=e.length,r=i%3,n="",a=[],o=16383,s=0,c=i-r;s<c;s+=o)a.push(Ra(e,s,s+o>c?c:s+o));return 1===r?(t=e[i-1],n+=Ma[t>>2],n+=Ma[t<<4&63],n+="=="):2===r&&(t=(e[i-2]<<8)+e[i-1],n+=Ma[t>>10],n+=Ma[t>>4&63],n+=Ma[t<<2&63],n+="="),a.push(n),a.join("")}function za(e,t,i,r,n){var a,o,s=8*n-r-1,c=(1<<s)-1,d=c>>1,u=-7,l=i?n-1:0,h=i?-1:1,f=e[t+l];for(l+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+l],l+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+l],l+=h,u-=8);if(0===a)a=1-d;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=d}return(f?-1:1)*o*Math.pow(2,a-r)}function Pa(e,t,i,r,n,a){var o,s,c,d=8*a-n-1,u=(1<<d)-1,l=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(o++,c/=2),o+l>=u?(s=0,o=u):o+l>=1?(s=(t*c-1)*Math.pow(2,n),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,n),o=0));n>=8;e[i+f]=255&s,f+=p,s/=256,n-=8);for(o=o<<n|s,d+=n;d>0;e[i+f]=255&o,f+=p,o/=256,d-=8);e[i+f-p]|=128*g}var Oa={}.toString,Fa=Array.isArray||function(e){return"[object Array]"==Oa.call(e)};Ua.TYPED_ARRAY_SUPPORT=void 0===ka.TYPED_ARRAY_SUPPORT||ka.TYPED_ARRAY_SUPPORT;var Na=La();function La(){return Ua.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ja(e,t){if(La()<t)throw new RangeError("Invalid typed array length");return Ua.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Ua.prototype:(null===e&&(e=new Ua(t)),e.length=t),e}function Ua(e,t,i){if(!(Ua.TYPED_ARRAY_SUPPORT||this instanceof Ua))return new Ua(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Ha(this,e)}return qa(this,e,t,i)}function qa(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r);Ua.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Ua.prototype:e=Va(e,t);return e}(e,t,i,r):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!Ua.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Ga(t,i);e=ja(e,r);var n=e.write(t,i);n!==r&&(e=e.slice(0,n));return e}(e,t,i):function(e,t){if(Ja(t)){var i=0|$a(t.length);return 0===(e=ja(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?ja(e,0):Va(e,t);if("Buffer"===t.type&&Fa(t.data))return Va(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Ka(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Ha(e,t){if(Ka(t),e=ja(e,t<0?0:0|$a(t)),!Ua.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function Va(e,t){var i=t.length<0?0:0|$a(t.length);e=ja(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function $a(e){if(e>=La())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+La().toString(16)+" bytes");return 0|e}function Ja(e){return!(null==e||!e._isBuffer)}function Ga(e,t){if(Ja(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return xo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Ao(e).length;default:if(r)return xo(e).length;t=(""+t).toLowerCase(),r=!0}}function Wa(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return lo(this,t,i);case"utf8":case"utf-8":return oo(this,t,i);case"ascii":return co(this,t,i);case"latin1":case"binary":return uo(this,t,i);case"base64":return ao(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ho(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Za(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function Ya(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=Ua.from(t,r)),Ja(t))return 0===t.length?-1:Qa(e,t,i,r,n);if("number"==typeof t)return t&=255,Ua.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):Qa(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function Qa(e,t,i,r,n){var a,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,i/=2}function d(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=i;a<s;a++)if(d(e,a)===d(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===c)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(i+c>s&&(i=s-c),a=i;a>=0;a--){for(var l=!0,h=0;h<c;h++)if(d(e,a+h)!==d(t,h)){l=!1;break}if(l)return a}return-1}function Xa(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function eo(e,t,i,r){return Eo(xo(t,e.length-i),e,i,r)}function to(e,t,i,r){return Eo(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function io(e,t,i,r){return to(e,t,i,r)}function ro(e,t,i,r){return Eo(Ao(t),e,i,r)}function no(e,t,i,r){return Eo(function(e,t){for(var i,r,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(i=e.charCodeAt(o))>>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function ao(e,t,i){return 0===t&&i===e.length?Ba(e):Ba(e.slice(t,i))}function oo(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var a,o,s,c,d=e[n],u=null,l=d>239?4:d>223?3:d>191?2:1;if(n+l<=i)switch(l){case 1:d<128&&(u=d);break;case 2:128==(192&(a=e[n+1]))&&(c=(31&d)<<6|63&a)>127&&(u=c);break;case 3:a=e[n+1],o=e[n+2],128==(192&a)&&128==(192&o)&&(c=(15&d)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&d)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,l=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=l}return function(e){var t=e.length;if(t<=so)return String.fromCharCode.apply(String,e);var i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=so));return i}(r)}Ua.poolSize=8192,Ua._augment=function(e){return e.__proto__=Ua.prototype,e},Ua.from=function(e,t,i){return qa(null,e,t,i)},Ua.TYPED_ARRAY_SUPPORT&&(Ua.prototype.__proto__=Uint8Array.prototype,Ua.__proto__=Uint8Array),Ua.alloc=function(e,t,i){return function(e,t,i,r){return Ka(t),t<=0?ja(e,t):void 0!==i?"string"==typeof r?ja(e,t).fill(i,r):ja(e,t).fill(i):ja(e,t)}(null,e,t,i)},Ua.allocUnsafe=function(e){return Ha(null,e)},Ua.allocUnsafeSlow=function(e){return Ha(null,e)},Ua.isBuffer=So,Ua.compare=function(e,t){if(!Ja(e)||!Ja(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},Ua.isEncoding=function(e){switch(String(e).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}},Ua.concat=function(e,t){if(!Fa(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Ua.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=Ua.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var a=e[i];if(!Ja(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,n),n+=a.length}return r},Ua.byteLength=Ga,Ua.prototype._isBuffer=!0,Ua.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Za(this,t,t+1);return this},Ua.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Za(this,t,t+3),Za(this,t+1,t+2);return this},Ua.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Za(this,t,t+7),Za(this,t+1,t+6),Za(this,t+2,t+5),Za(this,t+3,t+4);return this},Ua.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?oo(this,0,e):Wa.apply(this,arguments)},Ua.prototype.equals=function(e){if(!Ja(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Ua.compare(this,e)},Ua.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Ua.prototype.compare=function(e,t,i,r,n){if(!Ja(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(n>>>=0)-(r>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,n),d=e.slice(t,i),u=0;u<s;++u)if(c[u]!==d[u]){a=c[u],o=d[u];break}return a<o?-1:o<a?1:0},Ua.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},Ua.prototype.indexOf=function(e,t,i){return Ya(this,e,t,i,!0)},Ua.prototype.lastIndexOf=function(e,t,i){return Ya(this,e,t,i,!1)},Ua.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return Xa(this,e,t,i);case"utf8":case"utf-8":return eo(this,e,t,i);case"ascii":return to(this,e,t,i);case"latin1":case"binary":return io(this,e,t,i);case"base64":return ro(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return no(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},Ua.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var so=4096;function co(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function uo(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function lo(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",a=t;a<i;++a)n+=wo(e[a]);return n}function ho(e,t,i){for(var r=e.slice(t,i),n="",a=0;a<r.length;a+=2)n+=String.fromCharCode(r[a]+256*r[a+1]);return n}function fo(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function po(e,t,i,r,n,a){if(!Ja(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function go(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-i,2);n<a;++n)e[i+n]=(t&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function mo(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-i,4);n<a;++n)e[i+n]=t>>>8*(r?n:3-n)&255}function bo(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function vo(e,t,i,r,n){return n||bo(e,0,i,4),Pa(e,t,i,r,23,4),i+4}function yo(e,t,i,r,n){return n||bo(e,0,i,8),Pa(e,t,i,r,52,8),i+8}Ua.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),Ua.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=Ua.prototype;else{var n=t-e;i=new Ua(n,void 0);for(var a=0;a<n;++a)i[a]=this[a+e]}return i},Ua.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||fo(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r},Ua.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||fo(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},Ua.prototype.readUInt8=function(e,t){return t||fo(e,1,this.length),this[e]},Ua.prototype.readUInt16LE=function(e,t){return t||fo(e,2,this.length),this[e]|this[e+1]<<8},Ua.prototype.readUInt16BE=function(e,t){return t||fo(e,2,this.length),this[e]<<8|this[e+1]},Ua.prototype.readUInt32LE=function(e,t){return t||fo(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Ua.prototype.readUInt32BE=function(e,t){return t||fo(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Ua.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||fo(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);)r+=this[e+a]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},Ua.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||fo(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},Ua.prototype.readInt8=function(e,t){return t||fo(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Ua.prototype.readInt16LE=function(e,t){t||fo(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},Ua.prototype.readInt16BE=function(e,t){t||fo(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},Ua.prototype.readInt32LE=function(e,t){return t||fo(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Ua.prototype.readInt32BE=function(e,t){return t||fo(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Ua.prototype.readFloatLE=function(e,t){return t||fo(e,4,this.length),za(this,e,!0,23,4)},Ua.prototype.readFloatBE=function(e,t){return t||fo(e,4,this.length),za(this,e,!1,23,4)},Ua.prototype.readDoubleLE=function(e,t){return t||fo(e,8,this.length),za(this,e,!0,52,8)},Ua.prototype.readDoubleBE=function(e,t){return t||fo(e,8,this.length),za(this,e,!1,52,8)},Ua.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||po(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a<i&&(n*=256);)this[t+a]=e/n&255;return t+i},Ua.prototype.writeUIntBE=function(e,t,i,r){(e=+e,t|=0,i|=0,r)||po(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},Ua.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,1,255,0),Ua.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Ua.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,2,65535,0),Ua.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):go(this,e,t,!0),t+2},Ua.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,2,65535,0),Ua.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):go(this,e,t,!1),t+2},Ua.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,4,4294967295,0),Ua.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):mo(this,e,t,!0),t+4},Ua.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,4,4294967295,0),Ua.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):mo(this,e,t,!1),t+4},Ua.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);po(this,e,t,i,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a<i&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Ua.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);po(this,e,t,i,n-1,-n)}var a=i-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+i},Ua.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,1,127,-128),Ua.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Ua.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,2,32767,-32768),Ua.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):go(this,e,t,!0),t+2},Ua.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,2,32767,-32768),Ua.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):go(this,e,t,!1),t+2},Ua.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,4,2147483647,-2147483648),Ua.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):mo(this,e,t,!0),t+4},Ua.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||po(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Ua.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):mo(this,e,t,!1),t+4},Ua.prototype.writeFloatLE=function(e,t,i){return vo(this,e,t,!0,i)},Ua.prototype.writeFloatBE=function(e,t,i){return vo(this,e,t,!1,i)},Ua.prototype.writeDoubleLE=function(e,t,i){return yo(this,e,t,!0,i)},Ua.prototype.writeDoubleBE=function(e,t,i){return yo(this,e,t,!1,i)},Ua.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,a=r-i;if(this===e&&i<t&&t<r)for(n=a-1;n>=0;--n)e[n+t]=this[n+i];else if(a<1e3||!Ua.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},Ua.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Ua.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=Ja(e)?e:xo(new Ua(e,r).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var _o=/[^+\/0-9A-Za-z-_]/g;function wo(e){return e<16?"0"+e.toString(16):e.toString(16)}function xo(e,t){var i;t=t||1/0;for(var r=e.length,n=null,a=[],o=0;o<r;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function Ao(e){return function(e){var t,i,r,n,a,o;Da||Ta();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Ia(3*s/4-a),r=a>0?s-4:s;var c=0;for(t=0,i=0;t<r;t+=4,i+=3)n=Ca[e.charCodeAt(t)]<<18|Ca[e.charCodeAt(t+1)]<<12|Ca[e.charCodeAt(t+2)]<<6|Ca[e.charCodeAt(t+3)],o[c++]=n>>16&255,o[c++]=n>>8&255,o[c++]=255&n;return 2===a?(n=Ca[e.charCodeAt(t)]<<2|Ca[e.charCodeAt(t+1)]>>4,o[c++]=255&n):1===a&&(n=Ca[e.charCodeAt(t)]<<10|Ca[e.charCodeAt(t+1)]<<4|Ca[e.charCodeAt(t+2)]>>2,o[c++]=n>>8&255,o[c++]=255&n),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(_o,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Eo(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function So(e){return null!=e&&(!!e._isBuffer||ko(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ko(e.slice(0,0))}(e))}function ko(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Mo=Object.freeze({__proto__:null,Buffer:Ua,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),Ua.alloc(+e)},isBuffer:So,kMaxLength:Na});const Co=e=>null!=e,Io=e=>"string"==typeof e,Do=e=>Io(e)&&""!==e,To=e=>"object"==typeof e&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.arrayBuffer&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),Ro=e=>e instanceof FormData,Bo=e=>{const t=[],i=(e,r)=>{Co(r)&&(Array.isArray(r)?r.forEach((t=>{i(e,t)})):"object"==typeof r?Object.entries(r).forEach((t=>{let[r,n]=t;i(`${e}[${r}]`,n)})):((e,i)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(i))}`)})(e,r))};return Object.entries(e).forEach((e=>{let[t,r]=e;i(t,r)})),t.length>0?`?${t.join("&")}`:""},zo=async(e,t)=>"function"==typeof t?t(e):t,Po=async(e,i)=>{const r=await zo(i,e.TOKEN),n=await zo(i,e.USERNAME),a=await zo(i,e.PASSWORD),o=await zo(i,e.HEADERS),s=Object.entries(t(t({Accept:"application/json"},o),i.headers)).filter((e=>{let[t,i]=e;return Co(i)})).reduce(((e,i)=>{let[r,n]=i;return t(t({},e),{},{[r]:String(n)})}),{});if(Do(r)&&(s.Authorization=`Bearer ${r}`),Do(n)&&Do(a)){const e=(e=>{try{return btoa(e)}catch(t){return Ua.from(e).toString("base64")}})(`${n}:${a}`);s.Authorization=`Basic ${e}`}return i.body&&(i.mediaType?s["Content-Type"]=i.mediaType:To(i.body)?s["Content-Type"]=i.body.type||"application/octet-stream":Io(i.body)?s["Content-Type"]="text/plain":Ro(i.body)||(s["Content-Type"]="application/json")),new Headers(s)},Oo=(e,i)=>new Promise((async(r,n)=>{try{const n=((e,t)=>{const i=e.ENCODE_PATH||encodeURI,r=null==t?void 0:t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,r)=>{var n;return(null===(n=null==t?void 0:t.path)||void 0===n?void 0:n.hasOwnProperty(r))?i(String(t.path[r])):e})),n=`${e.BASE}${r}`;return t.query?`${n}${Bo(t.query)}`:n})(e,i),a=(e=>{if(e.formData){const t=new FormData,i=(e,i)=>{Io(i)||To(i)?t.append(e,i):t.append(e,JSON.stringify(i))};return Object.entries(e.formData).filter((e=>{let[t,i]=e;return Co(i)})).forEach((e=>{let[t,r]=e;Array.isArray(r)?r.forEach((e=>i(t,e))):i(t,r)})),t}})(i),o=(e=>{var t;if(void 0!==e.body)return(null===(t=e.mediaType)||void 0===t?void 0:t.includes("/json"))?JSON.stringify(e.body):Io(e.body)||To(e.body)||Ro(e.body)?e.body:JSON.stringify(e.body)})(i),s=await Po(e,i),c=await(async(e,t,i,r,n,a)=>{const o=new AbortController,s={headers:a,body:null!=r?r:n,method:t.method,signal:o.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),await fetch(i,s)})(e,i,n,o,a,s),d=await(async e=>{if(204!==e.status)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some((e=>t.toLowerCase().startsWith(e)))?await e.json():await e.text()}catch(e){console.error(e)}})(c),u=((e,t)=>{if(t){const i=e.headers.get(t);if(Io(i))return i}})(c,i.responseHeader),l={url:n,ok:c.ok,status:c.status,statusText:c.statusText,headers:c.headers,body:null!=u?u:d};((e,i)=>{var r,n;const a=t({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[i.status];if(a)throw new ha(e,i,a);if(!i.ok){const t=null!==(r=i.status)&&void 0!==r?r:"unknown",a=null!==(n=i.statusText)&&void 0!==n?n:"unknown",o=(()=>{try{return JSON.stringify(i.body,null,2)}catch(e){return}})();throw new ha(e,i,`Generic Error: status: ${t}; status text: ${a}; body: ${o}`)}})(i,l),r(l)}catch(e){n(e)}})),Fo=new W("idv"),No=Symbol(),Lo=Symbol(),jo="verify-id-sdk";function Uo(e){return sessionStorage.getItem(e)}const qo=new Map;function Ko(e,t){const i=qo.get(e);Fo.events.emit(i,t)}function Ho(e){Ko(No,e)}function Vo(e,t,i,r,n){Ho({type:"verification-result",status:t,step:e,state:r,callbackUrl:n,sessionId:i})}function $o(e,t){Ho({type:"capture-error",errorCode:t,step:e})}function Jo(e,t,i){Ho({type:"api-request-error",errorCode:t,step:e,error:i})}function Go(e,t){return Oo(fa,e).catch((i=>(e.url.endsWith("/events")||Jo(t,"request-error",i.message),Promise.reject(i))))}async function Wo(e){var t;fa.HEADERS=Sa(e);const i=await function(e){return Go({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${e}`},"init")}(e);return{autocapture_settings:null!==(t=i.body.autocapture_settings)&&void 0!==t?t:void 0,autocapture_enabled:i.body.autocapture_enabled}}qo.set(No,No),qo.set(Lo,Lo);var Zo={setStep(e,t){e.commit("setStep",t)},setSessionId(e,t){e.commit("setSessionId",t)},setIsCapturingProcessStarted(e,t){e.commit("setIsCapturingProcessStarted",t)},setServerPath(e,t){e.commit("setServerPath",t)},setStartToken(e,t){e.commit("setStartToken",t)},setRootElement(e,t){e.commit("setRootElement",t)},setLanguage(e,t){e.commit("setLanguage",t)},setCallback(e,t){e.commit("setCallback",t)},setUserToken(e,t){e.commit("setUserToken",t)},setConsentVersion(e,t){e.commit("setConsentVersion",t)},setMissingImages(e,t){e.commit("setMissingImages",t)},setClientId(e,t){e.commit("setClientId",t)},setStatus(e,t){e.commit("setStatus",t)},setMarkdownSupportText(e,t){e.commit("setMarkdownSupportText",t)},setVideoCaptureSettings(e,t){e.commit("setVideoCaptureSettings",t)},setCdnHost(e,t){e.commit("setCdnHost",t)},setIsImageSigningEnabled(e,t){e.commit("setIsImageSigningEnabled",t)},setAutoCaptureSettings(e,t){e.commit("setAutoCaptureSettings",t)}},Yo={setStep:(e,t)=>(e.step=t,e),setSessionId:(e,t)=>(e.sessionId=t,e),setIsCapturingProcessStarted:(e,t)=>(e.isCapturingProcessStarted=t,e),setServerPath:(e,t)=>(e.serverPath=t,e),setStartToken:(e,t)=>(e.startToken=t,e),setRootElement:(e,t)=>(e.rootElementId=t,e),setLanguage:(e,t)=>(e.language=t,e),setCallback:(e,t)=>(e.callback=t,e),setUserToken:(e,t)=>(e.userToken=t,e),setConsentVersion:(e,t)=>(e.consentVersion=t,e),setMissingImages:(e,t)=>(e.missingImages=t,e),setClientId:(e,t)=>(e.clientId=t,e),setStatus:(e,t)=>(e.verificationStatus=t,e),setMarkdownSupportText:(e,t)=>(e.markdownSupportText=t,e),setVideoCaptureSettings:(e,t)=>(e.videoCaptureSettings=t,e),setCdnHost:(e,t)=>(e.cdnHost=t,e),setIsImageSigningEnabled:(e,t)=>(e.isImageSigningEnabled=t,e),setAutoCaptureSettings:(e,t)=>(e.autoCaptureSettings=t,e)};const Qo=new class{constructor(e){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(e,"actions")&&(this.actions=e.actions),Object.prototype.hasOwnProperty.call(e,"mutations")&&(this.mutations=e.mutations);const t=this;this.state=new Proxy(e.state||{},{get:function(e,t){return e[t]},set:function(e,i,r){return e[i]=r,Ko(Lo,{key:i,state:e}),"mutation"!==t.status&&console.warn(`You should use a mutation to set ${String(i)}`),t.status="resting",!0}})}dispatch(e,t){return"function"!=typeof this.actions[e]?(console.error(`Action "${e} doesn't exist.`),!1):(this.status="action",this.actions[e](this,t),!0)}commit(e,t){if("function"!=typeof this.mutations[e])return console.info(`Mutation "${e}" doesn't exist`),!1;this.status="mutation";const i=this.mutations[e](this.state,t);return this.state=i,!0}}({actions:Zo,mutations:Yo,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var Xo;function es(e){const t=[],i=function(e){var t,i,r,n;const a=e.stats.get(Xo.BLUR_DETECTION),o=e.stats.get(Xo.GLARE_DETECTION);if(!a&&!o||0===(null==a?void 0:a.durations.length)&&0===(null==o?void 0:o.durations.length))return;const s=rs(null!==(t=null==a?void 0:a.durations)&&void 0!==t?t:null==o?void 0:o.durations),c=a&&o?Math.min(a.countSuccess,o.countSuccess):null!==(i=null==a?void 0:a.countSuccess)&&void 0!==i?i:null==o?void 0:o.countSuccess;return{name:is(Xo.BLUR_DETECTION),count_success:c,count_failure_glare:null!==(r=null==o?void 0:o.countFailed)&&void 0!==r?r:0,count_failure_blur:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(e);i&&t.push(i);for(const[i,r]of e.stats.entries())i!==Xo.BLUR_DETECTION&&i!==Xo.GLARE_DETECTION&&r.durations.length>0&&t.push(ts(r,i));return e.frameHandleDurations.length>0&&t.push(function(e){const t=rs(e.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(e.stableCounts.reduce(((e,t)=>e+t),0)/e.stableCounts.length),avg_duration:t.duration_avg,std_duration:t.duration_std}}(e)),t}function ts(e,t){const i=rs(e.durations);return{name:is(t),count_success:e.countSuccess,count_failure:e.countFailed,avg_duration:i.duration_avg,std_duration:i.duration_std}}function is(e){switch(e){case Xo.BLUR_DETECTION:case Xo.GLARE_DETECTION:return"blur_glare_detector";case Xo.DOCUMENT_DETECTION:return"doc_detector";case Xo.DOCUMENT_POSITION:return"doc_frame_detector";case Xo.BARCODE_DETECTION:return"barcode_detector";case Xo.FACE_DETECTION:return"face_detector";case Xo.FACE_POSITION:return"face_frame_detector";default:return e}}function rs(e){var t;if(e.length<2)return{duration_avg:null!==(t=e[0])&&void 0!==t?t:0,duration_std:0};const i=e.length,r=e.reduce(((e,t)=>e+t),0)/i;let n=0;for(let t=0;t<i;t++){const i=e[t];n+=Math.pow(i-r,2)}const a=Math.sqrt(n/(i-1));return{duration_avg:Math.round(r),duration_std:Math.round(a)}}!function(e){e.DOCUMENT_DETECTION="document_detection",e.DOCUMENT_POSITION="document_position",e.GLARE_DETECTION="glare_detection",e.BLUR_DETECTION="blur_detection",e.BARCODE_DETECTION="barcode_detection",e.FACE_DETECTION="face_detection",e.FACE_POSITION="face_position"}(Xo||(Xo={}));const ns=new class{createUploadImageEvent(e,t,i,r){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:e,request_total_time_ms:String(t),request_processing_time_ms:String(i),request_build_time_ms:String(r)}}}createPageViewEvent(e){return{event_type:"page_view",page_view_req:{page_name:e}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(e,t){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(e),model_stats:this.convertModelStats(t)}}}convertModelStats(e){return e.map((e=>({model_name:e.modelName,init_duration:Math.round(e.initDuration),download_duration:Math.round(e.downloadDuration)})))}createUserActionEvent(e,t,i){var r,n,a;const o={user_action_type:e,page_name:t,autocapture:!!i,autocapture_enabled:null!==(a=null===(n=null===(r=Qo.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&void 0!==a&&a};if(i){const e=es(i);o.stats=e}return{event_type:"user_action",user_action_req:o}}createErrorEvent(e,t,i){return{event_type:"error",error_req:{error_name:t,error_description:e,step:i}}}createCameraNotAllowedEvent(e,t){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:e,step:t}}}createDrsInitFailureEvent(e,t){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:e,step:t}}}};async function as(e,t,i,r,n){i?(fa.HEADERS=Sa(r,t),await function(e,t,i){return Go({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${e}/events`,path:{sid:e},body:t},i)}(i,n,e)):console.error("cannot send event, sessionId or startToken is not set")}const os=new class{handelEventData(e){if("session-id-acquired"===e.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const e=`${fa.BASE}/verify/api/v1/verification/${Qo.state.sessionId}/risk-session-token`,t=Qo.state.clientId,i=Sa(t,Qo.state.userToken);da().then((t=>{Fo.http.httpPost(e,{session_token:t},null,i).catch((t=>{throw console.log("unable to send session token to IDV",e),console.error(t),t}))})).catch((t=>{var i,r,n,a;console.log("unable to get session token from DRS",e),console.error(t);const o=(null==t?void 0:t.message)||"failed to initialize DRS",s=ns.createDrsInitFailureEvent(o,"init");as(null===(i=Qo.state)||void 0===i?void 0:i.step,null===(r=Qo.state)||void 0===r?void 0:r.userToken,null===(n=Qo.state)||void 0===n?void 0:n.sessionId,null===(a=Qo.state)||void 0===a?void 0:a.clientId,s).then((()=>{Ho({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(e){throw console.log("Error sending risk session token"),console.error(e),e}}};async function ss(e,t,i){const r=ns.createErrorEvent(e,t,i);await cs(i,r)}async function cs(e,t){var i,r,n,a,o;const s=null===(i=Qo.state)||void 0===i?void 0:i.userToken,c=(null===(r=Qo.state)||void 0===r?void 0:r.sessionId)||(null===(n=Qo.state)||void 0===n?void 0:n.startToken),d=null===(a=Qo.state)||void 0===a?void 0:a.clientId,u=(null===(o=Qo.state)||void 0===o?void 0:o.step)||e;await as(u,s,c,d,t)}const ds=function(){var e,t;(null===(t=null===(e=Qo.state.autoCaptureSettings)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.debug)&&console.log(...arguments)};var us;!function(e){e.DOCUMENT_DETECTOR="document_detector",e.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",e.FACE_LANDMARK="face_landmark"}(us||(us={}));const ls=["pdf417","qr_code"];class hs{constructor(){this.model=new BarcodeDetector({formats:ls})}async detect(e){const t=await this.model.detect(e);return ds("detectedBarcodes:",t),t.map((e=>({class:e.format,score:1,x:e.boundingBox.x,y:e.boundingBox.y,width:e.boundingBox.width,height:e.boundingBox.height,extra:e.rawValue})))}}var fs;!function(e){e.NOT_AVAILABLE="notAvailable",e.LOADING="loading",e.LOADED="loaded"}(fs||(fs={}));const ps={[us.DOCUMENT_DETECTOR]:{status:fs.LOADING},[us.BLUR_GLARE_CLASSIFIER]:{status:fs.LOADING},[us.FACE_LANDMARK]:{status:fs.LOADING}};const gs=[us.DOCUMENT_DETECTOR,us.BLUR_GLARE_CLASSIFIER],ms=async()=>{let e=!1;for(;!e;){const t=Object.values(ps).filter((e=>e.status===fs.NOT_AVAILABLE));if(t.length>0)throw new Error(`Model not available: ${t.join(", ")}`);if(e=gs.every((e=>ps[e].status===fs.LOADED)),e)return!0;await new Promise((e=>setTimeout(e,100)))}},bs=e=>"function"==typeof e,vs=function(e){};Fo.events.on(Fo.events.MODULE_INITIALIZED,(function(){const{clientId:e,IDV:i}=Fo.moduleMetadata.getInitConfig();if(!e||!i)return!1;const r=(null==i?void 0:i.serverPath)&&(n=null==i?void 0:i.serverPath,a="/verify",(null==n?void 0:n.endsWith(a))?n.slice(0,n.length-a.length):n);var n,a;fa.BASE=r||window.location.origin,Qo.dispatch("setClientId",e),Qo.dispatch("setRootElement",(null==i?void 0:i.rootElement)||"root-element"),Qo.dispatch("setServerPath",null==i?void 0:i.serverPath),Qo.dispatch("setLanguage",null==i?void 0:i.language),Qo.dispatch("setCallback",null==i?void 0:i.callback),Qo.dispatch("setConsentVersion",null==i?void 0:i.consentVersion),Qo.dispatch("setMarkdownSupportText",null==i?void 0:i.markdownSupportText),Qo.dispatch("setVideoCaptureSettings",null==i?void 0:i.videoCaptureSettings),Qo.dispatch("setCdnHost",null==i?void 0:i.cdnHost),Qo.dispatch("setIsImageSigningEnabled",null==i?void 0:i.isImageSigningEnabled),(null==i?void 0:i.callbacks)&&(e=>{let{callbacks:t,callback:i}=e;bs(t.sessionGranted)&&(ys=t.sessionGranted);bs(t.sessionStarted)&&(_s=t.sessionStarted);bs(t.imageSubmitted)&&(ws=t.imageSubmitted);bs(t.processing)&&(xs=t.processing);bs(t.completed)&&(As=t.completed);bs(t.recapture)&&(Es=t.recapture);bs(t.error)&&(Ss=t.error);bs(i)&&(ks=i)})(i);return Qo.dispatch("setStartToken",null==i?void 0:i.startToken),Wo(Qo.state.clientId).then((e=>{!async function(e){if(null==e?void 0:e.autocapture_enabled){if("serviceWorker"in navigator)return Qo.dispatch("setAutoCaptureSettings",{enabled:!0,settings:e.autocapture_settings}),ds("service worker available"),void navigator.serviceWorker.addEventListener("message",(e=>{if(e.data&&"MODEL_READY"===e.data.type){const i=e.data.modelName;ps[i]={status:fs.LOADED,imageDimensions:e.data.imageDimensions,loadingStats:t(t({},e.data.stats),{},{modelName:i})}}else if(e.data&&"MODEL_LOAD_ERROR"===e.data.type){const t=e.data.modelName;ps[t].status=fs.NOT_AVAILABLE,ss(`${e.data.modelName} error: ${e.data.error}`,"model_load_error","init")}}));ss("service worker not available","service_worker_not_available","init")}Qo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:e.autocapture_settings})}(e)})),function(e){Ho({type:"init",step:e})}("init"),!0})),Fo.events.on(No,(function(e){switch(os.handelEventData(e),ks(e),e.type){case"session-granted":ys({session:Qo.state.sessionId});break;case"session-id-acquired":_s({session:Qo.state.sessionId});break;case"capture-image-result":ws({session:Qo.state.sessionId},e.imageType);break;case"start-verification-processing":xs({session:Qo.state.sessionId});break;case"verification-complete":As({session:Qo.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Ss({session:Qo.state.sessionId},e.errorCode,e.error);break;case"verification-recapture":Es({session:Qo.state.sessionId},e.reason)}}));let ys=vs,_s=vs,ws=vs,xs=vs,As=vs,Es=vs,Ss=vs,ks=e=>{};async function Ms(e,t,i){fa.HEADERS=Sa(i,t);var r;return(await(r=e,Go({method:"GET",url:`/verify/api/v1/verification/${r}/status`,path:{sid:r},errors:{404:"Session not found"}},"processing"))).body}function Cs(e){try{return JSON.parse(e)}catch(e){return console.error(e),null}}async function Is(e,t,i,r){fa.HEADERS=Sa(t);const n=await(a={start_token:e,accessed_from_desktop:!1,client_type:ba.client_type.MOBILE_SDK,consent:{granted:!0,document_id:i},image_signing_public_key:r},Go({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:a,mediaType:"application/json"},"init"));var a;return{sessionId:n.body.session_id,userToken:n.body.user_token,requiredImages:n.body.required_images}}async function Ds(e,t,i){let r,n,a;if(r)try{r=Uo(jo);const e=JSON.parse(r);n=e.sessionId,a=e.userToken}catch(e){}try{let o;if(a){o=(await Ms(n,a,i)).missing_images}else{const s=Fo.crypto.createCryptoBinding("sign"),c=await s.getPublicData(),d=await Is(e,i,t,c.publicKey);n=d.sessionId,a=d.userToken,o=d.requiredImages,r=JSON.stringify({sessionId:n,userToken:a}),function(e,t){sessionStorage.setItem(e,t)}(jo,r)}return{requiredImages:o,sessionId:n.toString(),userToken:a.toString()}}catch(e){throw console.log("Error starting session"),console.error(e),e}}function Ts(e){let{tagName:t,style:i,id:r="",className:n="",testid:a,options:o}=e;const s=document.createElement(t,o);return s.id=r,s.className=n,s.setAttribute("data-auto",a+"-auto"),Object.keys(i).forEach((e=>{s.style[e]=i[e]})),s}function Rs(e,t){Array.isArray(t)?t.forEach((t=>{e.appendChild(t)})):e.appendChild(t)}const Bs={blur_message:"Please focus camera on the document before capturing",blur_title:"Blurred image",document_incorrect_position_message:"Please make sure the document is fully within the frame, and nothing covers it",document_incorrect_position_title:"Incorrect document position",document_not_found_message:"Make sure you capture a valid government issued ID",document_not_found_title:"Document not detected",document_not_matching_message:"Please make sure to capture the back side of the document",document_not_matching_title:"Back image mismatch",document_not_supported_message:"Please use a different government issued ID instead",document_not_supported_title:"Document not supported",capturing_in_progress_message:"Capturing, stay steady",capturing_in_progress_title:"Capturing in progress",face_not_found_message:"Ensure your face is not covered and fully visible",face_not_found_title:"Face not detected",glare_message:"Avoid any direct light reflecting with glare",glare_title:"Glare detected",main_title_document_back:"Back side",main_title_document_face:"Selfie",main_title_document_front:"Front side",obstructed_message:"Some of the document parts are covered or missing",obstructed_title:"Missing information",other_error_code_message:"Please try again",other_error_code_title:"An error occurred",page_header_document:"Scan document",loading_screen_small_title:"Preparing...",page_header_face:"Face Recognition",second_title_document_back:"Please place your document on a solid surface, back side up.",second_title_document_face:"Please position your face in the center of the oval below.",second_title_document_front:"Please place your document on a solid surface, photo side up.",wrong_document_side_message:"The wrong document side has been detected",wrong_document_side_title:"Wrong document side detected",face_angle_too_large_title:"your face is not directly aligned with the camera",face_angle_too_large_message:"Please take another photo with your face fully visible for accurate detection",face_close_to_border_title:"Your face is too close to the edge",face_close_to_border_message:"Please adjust your position and make sure your entire face is within the frame",face_too_small_title:"Your face is too distant from the edge",face_too_small_message:"Please move closer to the camera so your face is clearer and easier to detect",face_too_close_title:"Your face is too close ",face_too_close_message:"Please adjust your position and make sure your entire face is within the frame",face_cropped_title:"Your face is partially cropped",face_cropped_message:"Please adjust your position and make sure your entire face is within the frame for optimal",no_face_title:"Face not found",no_face_message:"Please move closer to the camera or adjust your position so your face is clearer and easier to detect",multi_face_title:"Multiple faces detected",multi_face_message:"Please make sure only one face is visible in the frame to proceed",blur_selfie_title:"The selfie is out of focus",blur_selfie_message:"Please try taking another one with clearer focus for better detection",glare_selfie_title:"Too much reflection in your selfie",glare_selfie_message:"Please try taking another photo with better lighting and without glare for accurate detection",closed_eyes_title:"It looks like your eyes are closed",closed_eyes_message:"Please retake the photo with your eyes open",face_occluded_title:"Your face is partially hidden",face_occluded_message:"Please take another photo with your face fully visible for accurate detection",face_rotated_title:"Your face is not directly aligned with the camera",face_rotated_message:"Please take another photo with your face fully visible for accurate detection",barcode_not_found_title:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",barcode_not_found_message:"We are having trouble capturing some important elements of your document, Please try placing it in a clearer spot",searching_document_autocapture:"Searching for document",capturing_document_autocapture:"Capturing, please hold steady",click_manual_autocapture:"Click to capture manually",glare_blur_issues_autocapture:"Please make sure there are no light reflections, and try again",doc_not_in_frame_issues_autocapture:"Please bring the document closer and ensure it is fully within the capture frame for a clear image.",doc_not_found_autocapture:"Looking for document",capturing_face_issue_closer:"Please move closer to the frame",second_title_face_autocapture:"Get ready! Your selfie will be auto-captured, or tap to capture it manually",capturing_face_autocapture3:"Capturing... please, hold steady for 3",capturing_face_autocapture2:"Capturing... please, hold steady for 2",capturing_face_autocapture1:"Capturing... please, hold steady for 1",selfie_approval_autocapture:"Great job! Approve your selfie to continue"};const zs=new class{constructor(e){this.translations=e,this.translations=new Proxy(this.translations,{get:function(e,t){return e[t]},set:function(e,t,i){return e[t]=i,!0}})}overrideLanguage(e){Object.assign(this.translations,e)}translate(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];let n=this.translations[e];return n||(n=e),n.replace(/{(\d+)}/g,(function(e,t){return void 0!==i[t]?i[t]:e}))}}(Bs),Ps={en:Bs,es:{blur_message:"Favor enfoca la cĆ”mara en tĆŗ cĆ©dula antes de la captura",blur_title:"Imagen borrosa",document_incorrect_position_message:"AsegĆŗrate de que la cĆ©dula estĆ© completamente dentro del marco y nada la cubra",document_incorrect_position_title:"Posición incorrecta del documento",capturing_in_progress_title:"Capturando en progreso",capturing_in_progress_message:"Capturando, mantente estable",document_not_found_message:"AsegĆŗrate de utilizar una cĆ©dula valida",document_not_found_title:"CĆ©dula no detectada",document_not_matching_message:"Favor AsegĆŗrate de capturar la parte trasera de tu cĆ©dula",document_not_matching_title:"Parte trasera no corresponde",document_not_supported_message:"Favor utliza tu cĆ©dula",document_not_supported_title:"CĆ©dula no compatible",face_not_found_message:"Asegurase de no tapar su rostro",face_not_found_title:"Selfie no detectada",glare_message:"Evite luz directa que pueda generar brillo",glare_title:"Demasiado brillo",main_title_document_back:"Parte trasera de tu cĆ©dula",main_title_document_face:"Tómate un Selfie",main_title_document_front:"Parte frontal de tu cĆ©dula",obstructed_message:"Parte de la cĆ©dula documento no estĆ” visible o falta información",obstructed_title:"Falta información",other_error_code_message:"Intenta nuevamente",other_error_code_title:"Ha ocurrido un error",page_header_document:"EscanĆ©a tu cĆ©dula",page_header_face:"Reconocimiento Facial",second_title_document_back:"AsegĆŗrate de poner su cĆ©dula en una superfice plana con la parte trasera visible.",second_title_document_face:"AsegĆŗrate de posicionar tu rostro en el centro del circulo.",second_title_document_front:"AsegĆŗrate de poner su cĆ©dula en una superfice plana con la parte frontal visible.",wrong_document_side_message:"Lado incorrecto de tu cĆ©dula ha sido detectado",wrong_document_side_title:"Lado de tu cĆ©dula incorrecto",face_angle_too_large_title:"Tu rostro no estĆ” directamente alineado con la cĆ”mara.",face_angle_too_large_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_close_to_border_title:"Tu rostro estĆ” demasiado cerca del borde.",face_close_to_border_message:"Por favor, cambia la posicion de tu rostro y asegĆŗrate de que todo tu rostro estĆ© dentro del marco.",face_too_small_title:"Tu rostro estĆ” demasiado lejos del borde.",face_too_small_message:"Por favor, acĆ©rcate mĆ”s a la cĆ”mara para que tu rostro estĆ© mĆ”s claro y sea mĆ”s fĆ”cil de detectar.",face_too_close_title:"Tu rostro estĆ” demasiado cerca",face_too_close_message:"Acomode la posición y asegĆŗrese de que toda su rostro estĆ© dentro del marco.",face_cropped_title:"Tu rostro estĆ” parcialmente recortado.",face_cropped_message:"Por favor, cambia tu posición y asegĆŗrate de que todo tu rostro estĆ© dentro del marco para una detección óptima.",no_face_title:"Rostro no encontrado.",no_face_message:"Por favor, acĆ©rcate mĆ”s a la cĆ”mara o ajusta tu posición para que tu rostro estĆ© mĆ”s claro y sea mĆ”s fĆ”cil de detectar.",multi_face_title:"Se detectaron mĆŗltiples rostros.",multi_face_message:"Por favor, asegĆŗrate de que solo haya un rostro visible en el marco para continuar.",blur_selfie_title:"El autorretrato estĆ” fuera de foco.",blur_selfie_message:"Por favor, intenta tomar una nueva imagen con un enfoque mĆ”s claro para una mejor detección.",glare_selfie_title:"Demasiado reflejo en tu autorretrato.",glare_selfie_message:"Por favor, intenta tomar otra foto con una mejor iluminación y sin brillos para una detección precisa.",closed_eyes_title:"Parece que tienes los ojos cerrados.",closed_eyes_message:"Por favor, vuelve a tomar la foto con los ojos abiertos.",face_occluded_title:"Tu rostro estĆ” parcialmente oculto.",face_occluded_message:"Por favor, toma otra foto con tu rostro completamente visible para una detección precisa.",face_rotated_title:"Tu rostro estĆ” fuera de foco.",face_rotated_message:"Por favor, intenta tomar otro con un enfoque mĆ”s claro para una mejor detección.",barcode_not_found_title:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar mĆ”s despejado.",barcode_not_found_message:"Estamos teniendo problemas para capturar algunos elementos importantes de su documento, Intente colocarlo en un lugar mĆ”s despejado.",searching_document_autocapture:"Buscando la cedula",capturing_document_autocapture:"Capturando, por favor mantente quieto",click_manual_autocapture:"Haz clic para capturar manualmente",glare_blur_issues_autocapture:"Por favor, asegĆŗrate de que no haya reflejos de luz antes de intentarlo de nuevo",doc_not_in_frame_issues_autocapture:"Por favor, acerque la cedula y asegĆŗrese de que estĆ© completamente dentro del marco de captura para obtener una imagen clara",second_title_face_autocapture:"Ā”PrepĆ”rate! Tu selfie se capturarĆ” automĆ”ticamente, o toca para capturarla manualmente",capturing_face_autocapture3:"Capturando... por favor, mantente quieto durante 3",capturing_face_autocapture2:"Capturando... por favor, mantente quieto durante 2",capturing_face_autocapture1:"Capturando... por favor, mantente quieto durante 1",selfie_approval_autocapture:"Ā”Buen trabajo! Aprueba tu selfie para continuar"},pt:{blur_message:"Por favor, foque a cĆ¢mera no documento antes de capturar",blur_title:"Imagem borrada",document_incorrect_position_message:"Certifique-se de que o documento esteja totalmente dentro do quadro e nada o cubra",document_incorrect_position_title:"Posição incorreta do documento",document_not_found_message:"Certifique-se de capturar um documento vĆ”lido emitido pelo governo",document_not_found_title:"Documento nĆ£o detectado",document_not_matching_message:"Por favor, certifique-se de capturar o verso do documento",document_not_matching_title:"Imagem do verso incorreta",document_not_supported_message:"Por favor, utilize um documento diferente emitido pelo governo",document_not_supported_title:"Documento nĆ£o suportado",capturing_in_progress_message:"Capturando, mantenha-se firme",capturing_in_progress_title:"Captura em andamento",face_not_found_message:"Certifique-se de que seu rosto nĆ£o esteja coberto e esteja totalmente visĆ­vel",face_not_found_title:"Rosto nĆ£o detectado",glare_message:"Evite qualquer luz direta refletindo com brilho",glare_title:"Brilho detectado",main_title_document_back:"Verso",main_title_document_face:"Selfie",main_title_document_front:"Frente",obstructed_message:"Algumas partes do documento estĆ£o encobertas ou ausentes",obstructed_title:"InformaƧƵes incompletas",other_error_code_message:"Por favor, tente novamente",other_error_code_title:"Ocorreu um eprro",page_header_document:"Digitalizar o documento",page_header_face:"Reconhecimento facial",second_title_document_back:"Coloque o documento em uma superfĆ­cie sólida, com o verso voltado para cima.",second_title_document_face:"Por favor, posicione seu rosto no centro do oval abaixo.",second_title_document_front:"Coloque o documento em uma superfĆ­cie sólida, com a foto voltada para cima.",wrong_document_side_message:"O lado errado do documento foi detectado",wrong_document_side_title:"Lado incorreto do documento identificado",face_angle_too_large_title:"Seu rosto nĆ£o estĆ” diretamente alinhado com a cĆ¢mera.",face_angle_too_large_message:"Tire outra foto com seu rosto totalmente visĆ­vel para uma detecção precisa.",face_close_to_border_title:"Seu rosto estĆ” muito próximo da borda.",face_close_to_border_message:"Por favor, reposicione seu rosto e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_too_small_title:"Seu rosto estĆ” muito longe da borda.",face_too_small_message:"Aproxime-se da cĆ¢mera para que seu rosto fique mais claro e fĆ”cil de detectar.",face_too_close_title:"Seu rosto estĆ” muito perto",face_too_close_message:"Ajuste a posição e certifique-se de que todo o seu rosto esteja dentro da moldura.",face_cropped_title:"Seu rosto estĆ” parcialmente cortado.",face_cropped_message:"Mude sua posição e certifique-se de que todo o seu rosto esteja dentro do enquadramento para uma detecção ideal.",no_face_title:"Rosto nĆ£o encontrado..",no_face_message:"Aproxime-se da cĆ¢mera ou ajuste sua posição para que seu rosto fique mais claro e fĆ”cil de detectar.",multi_face_title:"VĆ”rios rostos foram detectados.",multi_face_message:"Certifique-se de que haja apenas um rosto visĆ­vel no quadro para continuar.",blur_selfie_title:"O autorretrato estĆ” fora de foco.",blur_selfie_message:"Tente tirar uma nova imagem com foco mais claro para melhor detecção.",glare_selfie_title:"Muita reflexĆ£o em seu autorretrato.",glare_selfie_message:"Tente tirar outra foto com melhor iluminação e sem brilho para uma detecção precisa.",closed_eyes_title:"Parece que seus olhos estĆ£o fechados.",closed_eyes_message:"Por favor, tire a foto novamente com os olhos abertos.",face_occluded_title:"Seu rosto estĆ” parcialmente oculto.",face_occluded_message:"Tire outra foto com seu rosto totalmente visĆ­vel para uma detecção precisa.",face_rotated_title:"Seu rosto estĆ” fora de foco.",face_rotated_message:"Por favor, tente pegar outro com foco mais claro para melhor detecção.",barcode_not_found_title:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocĆ”-lo em um local mais claro.",barcode_not_found_message:"Estamos tendo problemas para capturar alguns elementos importantes do seu documento, Experimente colocĆ”-lo em um local mais claro.",searching_document_autocapture:"Buscando o documento",capturing_document_autocapture:"Capturando, por favor mantenha-se imóvel",click_manual_autocapture:"Clique para capturar manualmente.",glare_blur_issues_autocapture:"Por favor, certifique-se de que nĆ£o hĆ” reflexos de luz antes de tentar novamente",doc_not_in_frame_issues_autocapture:"Por favor, aproxime o documento e certifique-se de que estĆ” totalmente dentro da moldura de captura para uma imagem nĆ­tida",second_title_face_autocapture:"Prepare-se! Sua selfie serĆ” capturada automaticamente, ou toque para capturĆ”-la manualmente",capturing_face_autocapture3:"Capturando... por favor, fique parado por 3",capturing_face_autocapture2:"Capturando... por favor, fique parado por 2",capturing_face_autocapture1:"Capturando... por favor, fique parado por 1",selfie_approval_autocapture:"Ɠtimo trabalho! Aprove sua selfie para continuar"},frCa:{blur_message:"Veuillez faire la mise au point de l’appareil photo sur le document avant de le capturer",blur_title:"Image floue",document_not_found_message:"Munissez-vous d’une piĆØce d’identitĆ© valide dĆ©livrĆ©e par le gouvernement",document_not_found_title:"Document non dĆ©tectĆ©",document_not_matching_message:"Veillez Ć  capturer le verso du document",document_not_matching_title:"Non-concordance entre les images du recto et du verso",document_not_supported_message:"Veuillez utiliser une autre piĆØce d’identitĆ© dĆ©livrĆ©e par le gouvernement",document_not_supported_title:"Document non pris en charge",face_not_found_message:"Assurez-vous que votre visage n’est pas couvert et qu’il est entiĆØrement visible",face_not_found_title:"Visage non dĆ©tectĆ©",glare_message:"Ɖvitez la lumiĆØre directe qui pourrait se reflĆ©ter sur le document",glare_title:"Reflet dĆ©tectĆ©",main_title_document_back:"Verso",main_title_document_face:"Ɖgoportrait",main_title_document_front:"Face avant",obstructed_message:"Le document comporte des parties manquantes ou couvertes",obstructed_title:"Informations manquantes",other_error_code_message:"Veuillez rĆ©essayer",other_error_code_title:"Une erreur s’est produite",page_header_document:"NumĆ©riser le document",page_header_face:"Reconnaissance faciale",second_title_document_back:"Veuillez placer votre document sur une surface solide, le verso vers le haut.",second_title_document_face:"Veuillez positionner votre visage au centre de l’ovale ci-dessous.",second_title_document_front:"Veuillez placer votre document sur une surface solide, photo vers le haut.",wrong_document_side_message:"Le mauvais cĆ“tĆ© du document a Ć©tĆ© dĆ©tectĆ©",wrong_document_side_title:"Mauvais cĆ“tĆ© du document dĆ©tectĆ©",face_angle_too_large_title:"votre visage n’est pas directement alignĆ© avec l’appareil photo",face_angle_too_large_message:"Veuillez prendre une autre photo avec votre visage entiĆØrement visible pour une dĆ©tection prĆ©cise",face_close_to_border_title:"Votre visage est trop prĆØs du bord",face_close_to_border_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_too_small_title:"Votre visage est trop Ć©loignĆ© du bord",face_too_small_message:"Veuillez vous rapprocher de la camĆ©ra pour que votre visage soit plus clair et plus facile Ć  dĆ©tecter",face_too_close_title:"Votre visage est trop proche",face_too_close_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre",face_cropped_title:"Votre visage est partiellement rognĆ©",face_cropped_message:"Veuillez ajuster votre position et vous assurer que l’ensemble de votre visage se trouve dans le cadre pour optimiser",no_face_title:"Visage introuvable",no_face_message:"Veuillez vous rapprocher de la camĆ©ra ou ajuster votre position pour que votre visage soit plus clair et plus facile Ć  dĆ©tecter",multi_face_title:"Plusieurs visages dĆ©tectĆ©s",multi_face_message:"Veuillez vous assurer qu’un seul visage est visible dans le cadre pour continuer",blur_selfie_title:"L’égoportrait n’est pas net",blur_selfie_message:"Essayez d’en prendre un autre avec une mise au point plus claire pour une meilleure dĆ©tection",glare_selfie_title:"Trop de reflets sur votre Ć©goportrait",glare_selfie_message:"Veuillez essayer de prendre une autre photo avec un meilleur Ć©clairage et sans reflet pour une dĆ©tection prĆ©cise",closed_eyes_title:"Il semble que vos yeux soient fermĆ©s.",closed_eyes_message:"Veuillez reprendre la photo avec les yeux ouverts",face_occluded_title:"Votre visage est partiellement cachĆ©.",face_occluded_message:"Veuillez prendre une autre photo avec votre visage entiĆØrement visible pour une dĆ©tection prĆ©cise",face_rotated_title:"votre visage n’est pas directement alignĆ© avec l’appareil photo",face_rotated_message:"Veuillez prendre une autre photo avec votre visage entiĆØrement visible pour une dĆ©tection prĆ©cise",barcode_not_found_title:"Nous avons des difficultĆ©s Ć  capturer certains Ć©lĆ©ments importants de votre document. Veuillez essayer de le placer Ć  un endroit plus clair",barcode_not_found_message:"Nous avons des difficultĆ©s Ć  capturer certains Ć©lĆ©ments importants de votre document. Veuillez essayer de le placer Ć  un endroit plus clair",searching_document_autocapture:"Recherche du document",capturing_document_autocapture:"Capture en cours, veuillez rester immobile",click_manual_autocapture:"Cliquez pour capturer manuellement",glare_blur_issues_autocapture:"Veuillez vous assurer qu’il n’y a pas de reflets de lumiĆØre avant de rĆ©essayer",doc_not_in_frame_issues_autocapture:"Veuillez rapprocher le document et assurez-vous qu’il soit entiĆØrement dans le cadre de capture pour une image claire",second_title_face_autocapture:"PrĆ©parez-vous! Votre selfie sera capturĆ© automatiquement, ou appuyez pour le capturer manuellement",capturing_face_autocapture3:"Capture... en cours, veuillez rester immobile pendant 3",capturing_face_autocapture2:"Capture... en cours, veuillez rester immobile pendant 2",capturing_face_autocapture1:"Capture... en cours, veuillez rester immobile pendant 1",selfie_approval_autocapture:"Bon travail! Approuvez votre selfie pour continuer"}};const Os=async(e,t,i,r,n,a)=>{var o,s,c,d,u,l,h;fa.HEADERS=Sa(i,t);const f=_a.UAParser();let p;if(Qo.state.isImageSigningEnabled){const e=Fo.crypto.createCryptoBinding("sign");p=await e.sign(r.data)}const g=await(m=e,b={image:{format:r.format,image_type:a,content:r.data,capture_margins:r.captureMargins,signature:p},device_info:{model:null===(o=null==f?void 0:f.device)||void 0===o?void 0:o.model,type:null===(s=null==f?void 0:f.device)||void 0===s?void 0:s.type,manufacturer:null===(c=null==f?void 0:f.device)||void 0===c?void 0:c.vendor,os:null===(d=null==f?void 0:f.os)||void 0===d?void 0:d.name,os_version:null===(u=null==f?void 0:f.os)||void 0===u?void 0:u.version,browser:null===(l=null==f?void 0:f.browser)||void 0===l?void 0:l.name,browser_version:null===(h=null==f?void 0:f.browser)||void 0===h?void 0:h.version,used_camera:null==n?void 0:n.selectedCamera,cameras:null==n?void 0:n.camerasInfo}},Go({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:m},body:b,mediaType:"application/json",errors:{400:"Request is malformed or missing required fields",401:"Access token is malformed, missing data, or expired",404:"Session not found",409:"All required images were successfully submitted"}},b.image.image_type));var m,b;const v=function(e,t){const i=[...e].find((e=>e.includes(t)));return void 0!==i?i[1]:void 0}(g.headers,"x-ts-processing-time-ms");return"ok"!==g.body.feedback&&console.error("Error",g),{missing_images:g.body.missing_images,feedback:g.body.feedback,custom_feedback:g.body.custom_feedback,has_barcode:g.body.has_barcode,serverProcessingTime:v}},Fs=()=>{const e=document.getElementById("overlay-frame");if(e){const t=e.getBoundingClientRect(),i=(3840-screen.width)/2,r=(2160-screen.height)/2;return{top:r+t.top,bottom:r+t.bottom,right:i+t.right,left:i+t.left}}},Ns=e=>["document_front","document_back"].includes(e)?"environment":"user";function Ls(e){switch(e){case"document_front":return ga.image_type.DOCUMENT_FRONT;case"document_back":return ga.image_type.DOCUMENT_BACK;case"selfie":return ga.image_type.SELFIE}}var js={},Us={get exports(){return js},set exports(e){js=e}};Us.exports=function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,i){i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o}));var r=i(1),n=i(7);i.d(t,"a",(function(){return n.a})),i.d(t,"d",(function(){return r.b}));var a=r.a.FACING_MODES,o=r.a.IMAGE_TYPES},function(e,t,i){var r=i(6);i.d(t,"a",(function(){return r.a}));var n=i(2);i.d(t,"b",(function(){return n.a}))},function(e,t,i){function r(e,t){if(!(t>=0&&t<=1))throw new Error(t+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(e))throw new Error(e+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function n(e,t){var i={};try{r(e,t),i.imageType=e,i.imageCompression=t}catch(e){console.error(e),console.error("default value of "+h.c.PNG+" is used"),i.imageType=h.c.PNG,i.imageCompression=null}return i}function a(){var e=window.navigator.platform,t=window.navigator.userAgent;return e||t}function o(){return"ontouchend"in document}function s(e,t,i){var r=e*parseFloat(i);return{imageWidth:r,imageHeight:t/(e/r)}}function c(e,t,i){return n(t,i).imageType===h.c.JPG?i?e.toDataURL(h.b[h.c.JPG],i):e.toDataURL(h.b[h.c.JPG]):e.toDataURL(h.b[t])}function d(e,t){return e||t}function u(){var e=a();if(/iPad|iPhone|iPod/.test(e))return!0;var t=o();return!(!/Mac/.test(e)||!t)}function l(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:a(),_getHasTouchEvents:o(),getIsIOS:u()}}t.c=s,t.b=c,t.e=d,t.d=u,t.a=l;var h=i(3)},function(e,t,i){function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,"e",(function(){return a})),i.d(t,"a",(function(){return o})),i.d(t,"f",(function(){return s})),i.d(t,"c",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"d",(function(){return u}));var n,a=["user","environment"],o={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],c={PNG:"png",JPG:"jpg"},d=(r(n={},"jpg","image/jpeg"),r(n,"png","image/png"),n),u={audio:!1,video:!0}},function(e,t,i){e.exports=i(5)},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var r=i(0);i.d(t,"FACING_MODES",(function(){return r.b})),i.d(t,"IMAGE_TYPES",(function(){return r.c})),i.d(t,"_getDebugPlatformInfo",(function(){return r.d}));var n=i(9);i.d(t,"downloadPhoto",(function(){return n.a})),t.default=r.a},function(e,t,i){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return s}));var n=i(2),a=i(3),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),s=function(){function e(){r(this,e)}return o(e,null,[{key:"getDataUri",value:function(e,t){var i=t.sizeFactor,r=t.imageType,a=t.imageCompression,o=t.isImageMirror,s=e.videoWidth,c=e.videoHeight,d=Object(n.c)(s,c,i),u=d.imageWidth,l=d.imageHeight,h=document.createElement("canvas");h.width=u,h.height=l;var f=h.getContext("2d");return o&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(e,0,0,u,l),Object(n.b)(h,r,a)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var e=null,t=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),i=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(t)e=navigator.mediaDevices;else if(i){var r=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,n={getUserMedia:function(e){return new Promise((function(t,i){r.call(navigator,e,t,i)}))}};e=Object.assign(r,n)}return e}},{key:"isSupportedFacingMode",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(t,i){if(!Object(n.e)(t,i))return a.d;var r=e.getNavigatorMediaDevices().getSupportedConstraints();if(!r.width||!r.height)return console.error("Constraint width or height not supported! fallback to default resolution"),a.d;var o=void 0,s=void 0;return t&&(a.e.includes(t)?o=t:s={exact:t}),{audio:!1,video:{facingMode:o,deviceId:s,width:i&&i.width,height:i&&i.height}}}},{key:"getMaxResolutionConstraints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",i);var r=[{width:{min:640}},{width:{min:800}},{width:{min:900}},{width:{min:1024}},{width:{min:1080}},{width:{min:1280}},{width:{min:1920}},{width:{min:2560}},{width:{min:3840}}],a=e.getIdealConstraints(t,{});if(0===i)return Object(n.d)()?(console.warn("fallback to iOS constraints"),e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(a.video.advanced=r,a);if(i<r.length){var o=r.slice(0,-i);return a.video.advanced=o,a}return null}},{key:"FACING_MODES",get:function(){return a.a}},{key:"IMAGE_TYPES",get:function(){return a.c}}]),e}()},function(e,t,i){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return c}));var n=i(1),a=i(8),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),s=n.a.IMAGE_TYPES.PNG,c=function(){function e(t){r(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=n.a.getWindowURL(),this.mediaDevices=n.a.getNavigatorMediaDevices()}return o(e,[{key:"_getStreamDevice",value:function(e,t){var i=this;return new Promise((function(r,a){var o=n.a.getIdealConstraints(e,t);i.mediaDevices.getUserMedia(o).then((function(e){i._gotStream(e),r(e)})).catch((function(e){a(e)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(e){var t=this,i=n.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==i){var r={};return this._getStreamDevice(e,r)}return new Promise((function(r,n){t.mediaDevices.getUserMedia(i).then((function(e){t._gotStream(e),r(e)})).catch((function(i){setTimeout((function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch((function(){n(i)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(e){if("srcObject"in this.videoElement)this.videoElement.srcObject=e;else{var t=this.windowURL.createObjectURL(e);this.videoElement.src=t}}},{key:"_setSettings",value:function(e){this.settings=null;var t=e&&e.getTracks?e.getTracks():[];t.length>0&&t[0].getSettings&&(this.settings=t[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var e=this;return new Promise((function(t,i){var r=[];e.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.deviceId&&r.push(e)})),t(r)})).catch((function(e){i(e)}))}))}},{key:"_gotStream",value:function(e){this.stream=e,this._setSettings(e),this._setVideoSrc(e)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var e=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var t={video:!0};return e.mediaDevices.getUserMedia(t).then((function(e){setTimeout((function(){e.getTracks().forEach((function(e){e.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return e._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(e,t){var i=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return i._getStreamDevice(e,t)}))}},{key:"startCameraMaxResolution",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return e._getStreamDeviceMaxResolution(t)}))}},{key:"getDataUri",value:function(e){var t={sizeFactor:void 0===e.sizeFactor?a.c:e.sizeFactor,imageType:void 0===e.imageType?s:e.imageType,imageCompression:void 0===e.imageCompression?a.a:e.imageCompression,isImageMirror:void 0===e.isImageMirror?a.b:e.isImageMirror};return n.a.getDataUri(this.videoElement,t)}},{key:"stopCamera",value:function(){var e=this;return new Promise((function(t,i){e.stream&&(e.stream.getTracks().forEach((function(e){e.stop()})),e.videoElement.src="",e.stream=null,e._setSettings(null),t()),i(Error("no stream to stop!"))}))}}]),e}()},function(e,t,i){i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return a}));var r=1,n=null,a=!1},function(e,t,i){var r=i(10);i.d(t,"a",(function(){return r.a}))},function(e,t,i){function r(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(t.length),n=new Uint8Array(r),a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return new Blob([r],{type:i})}function n(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function a(e){var t=d.c.PNG;return"image/jpeg"===e&&(t=d.c.JPG),t}function o(e,t,i){return e+"-"+n(t,4)+"."+a(i)}function s(e,t,i){window.URL=window.webkitURL||window.URL;var r=document.createElement("a");r.download=o(t,i,e.type),r.href=window.URL.createObjectURL(e);var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(r(e),t,i)}t.a=c;var d=i(0)}]);var qs=Y(js);class Ks{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return Ks.instance||(Ks.instance=new Ks),Ks.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((e=>"live"===e.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((e=>e.stop())),this.currentStream=null)}areConstraintsEqual(e){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(e)}async startNewStream(e){this.isStreaming()&&this.areConstraintsEqual(e)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(e),this.currentConstraints=e)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(e){throw console.error("Failed to enumerate devices:",e),e}}}const Hs=[{os:{name:"Android"},label:"2 0"}];async function Vs(){const e=(await async function(){const e=Ks.getInstance();let t=await e.enumerateDevices();return t.filter((e=>"videoinput"===e.kind)).every((e=>""===e.label))&&(await e.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),t=await e.enumerateDevices(),e.stopStream()),t}()).filter((e=>{if(!(null==e?void 0:e.label)||"videoinput"!==e.kind||""===e.label)return!1;const t=e.label.toLowerCase();return $s.some((e=>t.includes(e)))})),t=_a.UAParser(),i=e.find((e=>Hs.find((i=>i.os.name===t.os.name&&e.label.includes(i.label)))));return i?{optionalCameras:e,selectedCamera:i}:{optionalCameras:e}}const $s=["rear","back","rück","arriĆØre","trasera","trĆ”s","traseira","posteriore","后面","後面","čƒŒé¢","åŽē½®","後置","背置","заГней","Ų§Ł„Ų®Ł„ŁŁŠŲ©","후","arka","achterzijde","หคัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","Ļ€ĪÆĻƒĻ‰","spate","hĆ”tsó","zadnĆ­","darrere","zadnĆ”","Š·Š°Š“Š½Ń","stražnja","belakang","ą¤¬ą„ˆą¤•","camera2 0, facing back"],Js={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Gs={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Ws=async e=>{var t,i;let r;return"environment"==e&&(r=await Vs()),null!==(i=null===(t=null==r?void 0:r.selectedCamera)||void 0===t?void 0:t.deviceId)&&void 0!==i?i:e},Zs=(e,t)=>{var i,r;return"user"===e?null!==(i=null==t?void 0:t.selfieVideoConstraints)&&void 0!==i?i:Gs:null!==(r=null==t?void 0:t.environmentVideoConstraints)&&void 0!==r?r:Js},Ys=e=>{const t=Ts({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return t.style.transform="user"===e?"scaleX(-1)":"",t.autoplay=!0,t.muted=!0,t.setAttribute("playsinline","true"),t},Qs={title:"other_error_code_title",message:"other_error_code_message"},Xs={ok:Qs,document_face_not_found:Qs,restricted_criteria:Qs,other:Qs,glare:{title:"glare_title",message:"glare_message"},document_not_found:{title:"document_not_found_title",message:"document_not_found_message"},blur:{title:"blur_title",message:"blur_message"},document_not_supported:{title:"document_not_supported_title",message:"document_not_supported_message"},obstructed:{title:"obstructed_title",message:"obstructed_message"},document_not_matching:{title:"document_not_matching_title",message:"document_not_matching_message"},face_not_found:{title:"face_not_found_title",message:"face_not_found_message"},wrong_document_side:{title:"wrong_document_side_title",message:"wrong_document_side_message"},glare_selfie:{title:"glare_selfie_title",message:"glare_selfie_message"},blur_selfie:{title:"blur_selfie_title",message:"blur_selfie_message"},multi_face:{title:"multi_face_title",message:"multi_face_message"},face_rotated:{title:"face_rotated_title",message:"face_rotated_message"},face_too_small:{title:"face_too_small_title",message:"face_too_small_message"},face_too_close:{title:"face_too_close_title",message:"face_too_close_message"},closed_eyes:{title:"closed_eyes_title",message:"closed_eyes_message"},face_angle_too_large:{title:"face_angle_too_large_title",message:"face_angle_too_large_message"},face_close_to_border:{title:"face_close_to_border_title",message:"face_close_to_border_message"},face_occluded:{title:"face_occluded_title",message:"face_occluded_message"},face_cropped:{title:"face_cropped_title",message:"face_cropped_message"},barcode_not_found:{title:"barcode_not_found_title",message:"barcode_not_found_message"}},ec={loading_screen:{page:"page_header_document",title:"main_title_document_front",instructions:"loading_screen_small_title"},document_front:{page:"page_header_document",title:"main_title_document_front",instructions:"second_title_document_front"},document_back:{page:"page_header_document",title:"main_title_document_back",instructions:"second_title_document_back"},selfie:{page:"page_header_face",title:"main_title_document_face",instructions:"second_title_document_face"}},tc=(e,t)=>{const i=Ts({tagName:"div",style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative",zIndex:"1",background:"transparent",boxShadow:"0 0 0 1000px rgb(0 0 0 / 50%)",borderStyle:"solid",borderWidth:"1px",borderColor:"white"},id:`overlay-frame ${e}`,testid:`overlay-frame ${e}`});if("environment"===e){!function(e){Rs(e,Ts({tagName:"div",style:{position:"absolute",top:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"none",borderBottomStyle:"none",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-left",testid:"overlay-frame__top-left"})),Rs(e,Ts({tagName:"div",style:{position:"absolute",top:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__top-right",testid:"overlay-frame__top-right"})),Rs(e,Ts({tagName:"div",style:{position:"absolute",bottom:"-2px",right:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"none",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-right",testid:"overlay-frame__bottom-right"})),Rs(e,Ts({tagName:"div",style:{position:"absolute",bottom:"-2px",left:"-2px",width:"20px",height:"20px",backgroundColor:"transparent",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"solid",borderLeftStyle:"solid",borderColor:"white",borderWidth:"4px"},id:"overlay-frame__bottom-left",testid:"overlay-frame__bottom-left"}))}(i);const e=.85*t.clientWidth;i.style.width=`${e}px`,i.style.height=.65*e+"px",i.style.maxHeight=.5*window.innerHeight+"px"}else{const e=t.clientWidth*(t.clientHeight<700?.8:.85);i.style.width=.8*e+"px",i.style.height=`${e}px`,i.style.minHeight=.8*e+"px",i.style.maxHeight=.5*window.innerHeight+"px",i.style.borderRadius="50%"}return i};const ic=e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("viewBox","0 0 68 68"),t.innerHTML=`<style>.spinner-autocapture circle {animation: rotate 1.5s linear infinite;} @keyframes rotate { 50% {stroke-dashoffset: 94; stroke-dasharray: 6 57; } 100% { stroke-dashoffset: 188; stroke-dasharray: 51 12; }} </style> <g class="spinner-autocapture"> <circle cx="34" cy="34" fill="none" r="30" stroke-width="4" stroke="${null!=e?e:"#fff"}" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>`,t};function rc(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","16px"),e.setAttribute("height","16px"),e.innerHTML='\n <path d="M8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16ZM8 4C8.41562 4 8.75 4.33437 8.75 4.75V8.25C8.75 8.66562 8.41562 9 8 9C7.58437 9 7.25 8.66562 7.25 8.25V4.75C7.25 4.33437 7.58437 4 8 4ZM9 11C9 11.5531 8.55313 12 8 12C7.44688 12 7 11.5531 7 11C7 10.4469 7.44688 10 8 10C8.55313 10 9 10.4469 9 11Z" fill="#F2F2F2"/>\n ',e}const nc={all:{color:"black",margin:"0"},1:{color:"white",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-bold)"},2:{color:"white",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)"},3:{color:"white",fontSize:"var(--font-size-xl)",fontWeight:"var(--font-weight-medium)"},4:{fontSize:"var(--font-size-lg)",fontWeight:"var(--font-weight-regular)"},5:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-light)"},6:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-light)"}},ac=e=>{let{text:i,level:r=1,style:n={},id:a,testid:o}=e;const s=Ts({tagName:`h${r}`,style:t(t(t({},nc.all),nc[r]),n),id:a,testid:o});return s.textContent=i,s.id=a,s};var oc,sc={};let cc=null;try{cc=(oc||(oc=1,function(e){function i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const a={exec:()=>null};function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="string"==typeof e?e:e.source;const r={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(s.caret,"$1"),i=i.replace(e,n),r},getRegex:()=>new RegExp(i,t)};return r}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,d=/(?:[*+-]|\d{1,9}[.)])/,u=o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,d).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),l=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,d).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,b=o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v=o(l).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),y={blockquote:o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",v).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:c,html:b,lheading:u,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:v,table:a,text:/^[^\n]+/},_=o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),w=t(t({},y),{},{table:_,paragraph:o(l).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),x=t(t({},y),{},{html:o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:o(l).replace("hr",c).replace("heading"," *#{1,6} *[^\n]").replace("lheading",u).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,E=/^( {2,}|\\)\n(?!\s*$)/,S="\\p{P}\\p{S}",k=o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,S).getRegex(),M=o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,S).getRegex(),C=o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,S).getRegex(),I=o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,S).getRegex(),D=o(/\\([punct])/,"gu").replace(/punct/g,S).getRegex(),T=o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),R=o(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=o("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",R).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),z=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O=o(/^!?\[(label)\]\[(ref)\]/).replace("label",z).replace("ref",h).getRegex(),F=o(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),N={_backpedal:a,anyPunctuation:D,autolink:T,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:E,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:a,emStrongLDelim:M,emStrongRDelimAst:C,emStrongRDelimUnd:I,escape:A,link:P,nolink:F,punctuation:k,reflink:O,reflinkSearch:o("reflink|nolink(?!\\()","g").replace("reflink",O).replace("nolink",F).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:a},L=t(t({},N),{},{link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",z).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z).getRegex()}),j=t(t({},N),{},{escape:o(A).replace("])","~|])").getRegex(),url:o(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),U=t(t({},j),{},{br:o(E).replace("{2,}","*").getRegex(),text:o(j.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),q={normal:y,gfm:w,pedantic:x},K={normal:N,gfm:j,breaks:U,pedantic:L},H={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},V=e=>H[e];function $(e,t){if(t){if(s.escapeTest.test(e))return e.replace(s.escapeReplace,V)}else if(s.escapeTestNoEncode.test(e))return e.replace(s.escapeReplaceNoEncode,V);return e}function J(e){try{e=encodeURI(e).replace(s.percentDecode,"%")}catch(e){return null}return e}function G(e,t){const i=e.replace(s.findPipe,((e,t,i)=>{let r=!1,n=t;for(;--n>=0&&"\\"===i[n];)r=!r;return r?"|":" |"})).split(s.splitPipe);let r=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(s.slashPipe,"|");return i}function W(e,t,i){const r=e.length;if(0===r)return"";let n=0;for(;n<r;){const a=e.charAt(r-n-1);if(a!==t||i){if(a===t||!i)break;n++}else n++}return e.slice(0,r-n)}function Z(e,t,i,r,n){const a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:i,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,e}return{type:"image",raw:i,href:a,title:o,text:s}}class Y{constructor(t){r(this,"options",void 0),r(this,"rules",void 0),r(this,"lexer",void 0),this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:W(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t,i){const r=e.match(i.other.indentCodeCompensation);if(null===r)return t;const n=r[1];return t.split("\n").map((e=>{const t=e.match(i.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=W(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:W(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=W(t[0],"\n").split("\n"),i="",r="";const n=[];for(;e.length>0;){let t=!1;const a=[];let o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else{if(t)break;a.push(e[o])}e=e.slice(o);const s=a.join("\n"),c=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${s}`:s,r=r?`${r}\n${c}`:c;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,n,!0),this.lexer.state.top=d,0===e.length)break;const u=n[n.length-1];if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){const t=u,a=t.raw+"\n"+e.join("\n"),o=this.blockquote(a);n[n.length-1]=o,i=i.substring(0,i.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if("list"!==(null==u?void 0:u.type));else{const t=u,a=t.raw+"\n"+e.join("\n"),o=this.list(a);n[n.length-1]=o,i=i.substring(0,i.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(n[n.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:n,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const r=i.length>1,n={type:"list",raw:"",ordered:r,start:r?+i.slice(0,-1):"",loose:!1,items:[]};i=r?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=r?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let o=!1;for(;e;){let i=!1,r="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),d=e.split("\n",1)[0],u=!c.trim(),l=0;if(this.options.pedantic?(l=2,s=c.trimStart()):u?l=t[1].length+1:(l=t[2].search(this.rules.other.nonSpaceChar),l=l>4?1:l,s=c.slice(l),l+=t[1].length),u&&this.rules.other.blankLine.test(d)&&(r+=d+"\n",e=e.substring(d.length+1),i=!0),!i){const t=this.rules.other.nextBulletRegex(l),i=this.rules.other.hrRegex(l),n=this.rules.other.fencesBeginRegex(l),a=this.rules.other.headingBeginRegex(l),o=this.rules.other.htmlBeginRegex(l);for(;e;){const h=e.split("\n",1)[0];let f;if(d=h,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),f=d):f=d.replace(this.rules.other.tabCharGlobal," "),n.test(d))break;if(a.test(d))break;if(o.test(d))break;if(t.test(d))break;if(i.test(d))break;if(f.search(this.rules.other.nonSpaceChar)>=l||!d.trim())s+="\n"+f.slice(l);else{if(u)break;if(c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(n.test(c))break;if(a.test(c))break;if(i.test(c))break;s+="\n"+d}u||d.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),c=f.slice(l)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:r,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),n.raw+=r}n.items[n.items.length-1].raw=n.items[n.items.length-1].raw.trimEnd(),n.items[n.items.length-1].text=n.items[n.items.length-1].text.trimEnd(),n.raw=n.raw.trimEnd();for(let e=0;e<n.items.length;e++)if(this.lexer.state.top=!1,n.items[e].tokens=this.lexer.blockTokens(n.items[e].text,[]),!n.loose){const t=n.items[e].tokens.filter((e=>"space"===e.type)),i=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));n.loose=i}if(n.loose)for(let e=0;e<n.items.length;e++)n.items[e].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const i=G(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]&&t[3].trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===r.length){for(const e of r)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<i.length;e++)a.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:a.align[e]});for(const e of n)a.rows.push(G(e,a.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=W(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&(i--,i<0))return r;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i.slice(1):i.slice(1,-1)),Z(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return Z(i,e,i[0],this.lexer,this.rules)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...r[0]].length-1;let n,a,o=i,s=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=c.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(a=[...n].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&i%3&&!((i+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...r[0]][0].length,c=e.slice(0,i+r.index+t+a);if(Math.min(i,a)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const d=c.slice(2,-2);return{type:"strong",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let a;do{var i,r;a=t[0],t[0]=null!==(i=null===(r=this.rules.inline._backpedal.exec(t[0]))||void 0===r?void 0:r[0])&&void 0!==i?i:""}while(a!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class Q{constructor(t){r(this,"tokens",void 0),r(this,"options",void 0),r(this,"state",void 0),r(this,"tokenizer",void 0),r(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new Y,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:s,block:q.normal,inline:K.normal};this.options.pedantic?(i.block=q.pedantic,i.inline=K.pedantic):this.options.gfm&&(i.block=q.gfm,this.options.breaks?i.inline=K.breaks:i.inline=K.gfm),this.tokenizer.rules=i}static get rules(){return{block:q,inline:K}}static lex(e,t){return new Q(t).lex(e)}static lexInline(e,t){return new Q(t).inlineTokens(e)}lex(e){e=e.replace(s.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e){let t,i,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(t=i.call({lexer:this},e,n))&&(e=e.substring(t.raw.length),n.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&n.length>0?n[n.length-1].raw+="\n":n.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=n[n.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?n.push(t):(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=n[n.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(i.raw+="\n"+t.raw,i.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),n.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),n.push(t);else{var o;if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r)))i=n[n.length-1],a&&"paragraph"===(null===(o=i)||void 0===o?void 0:o.type)?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=n[n.length-1],i&&"text"===i.type?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,n}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,i,r,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,n.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(t=i.call({lexer:this},e,s))&&(e=e.substring(t.raw.length),s.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),i=s[s.length-1],s.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),i=s[s.length-1],i&&"text"===t.type&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(t=this.tokenizer.emStrong(e,c,o))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),s.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),s.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(o=t.raw.slice(-1)),a=!0,i=s[s.length-1],i&&"text"===i.type?(i.raw+=t.raw,i.text+=t.text):s.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),s.push(t);return s}}class X{constructor(t){r(this,"options",void 0),r(this,"parser",void 0),this.options=t||e.defaults}space(e){return""}code(e){var t;let{text:i,lang:r,escaped:n}=e;const a=null===(t=(r||"").match(s.notSpaceStart))||void 0===t?void 0:t[0],o=i.replace(s.endingNewline,"")+"\n";return a?'<pre><code class="language-'+$(a)+'">'+(n?o:$(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:$(o,!0))+"</code></pre>\n"}blockquote(e){let{tokens:t}=e;return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:i}=e;return`<h${i}>${this.parser.parseInline(t)}</h${i}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,i=e.start;let r="";for(let t=0;t<e.items.length;t++){const i=e.items[t];r+=this.listitem(i)}const n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+r+"</"+n+">\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+$(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox(e){let{checked:t}=e;return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){let{tokens:t}=e;return`<p>${this.parser.parseInline(t)}</p>\n`}table(e){let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.tablecell(e.header[t]);t+=this.tablerow({text:i});let r="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];i="";for(let e=0;e<n.length;e++)i+=this.tablecell(n[e]);r+=this.tablerow({text:i})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow(e){let{text:t}=e;return`<tr>\n${t}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>\n`}strong(e){let{tokens:t}=e;return`<strong>${this.parser.parseInline(t)}</strong>`}em(e){let{tokens:t}=e;return`<em>${this.parser.parseInline(t)}</em>`}codespan(e){let{text:t}=e;return`<code>${$(t,!0)}</code>`}br(e){return"<br>"}del(e){let{tokens:t}=e;return`<del>${this.parser.parseInline(t)}</del>`}link(e){let{href:t,title:i,tokens:r}=e;const n=this.parser.parseInline(r),a=J(t);if(null===a)return n;let o='<a href="'+(t=a)+'"';return i&&(o+=' title="'+$(i)+'"'),o+=">"+n+"</a>",o}image(e){let{href:t,title:i,text:r}=e;const n=J(t);if(null===n)return $(r);let a=`<img src="${t=n}" alt="${r}"`;return i&&(a+=` title="${$(i)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$(e.text)}}class ee{strong(e){let{text:t}=e;return t}em(e){let{text:t}=e;return t}codespan(e){let{text:t}=e;return t}del(e){let{text:t}=e;return t}html(e){let{text:t}=e;return t}text(e){let{text:t}=e;return t}link(e){let{text:t}=e;return""+t}image(e){let{text:t}=e;return""+t}br(){return""}}class te{constructor(t){r(this,"options",void 0),r(this,"renderer",void 0),r(this,"textRenderer",void 0),this.options=t||e.defaults,this.options.renderer=this.options.renderer||new X,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ee}static parse(e,t){return new te(t).parse(e)}static parseInline(e,t){return new te(t).parseInline(e)}parse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i="";for(let r=0;r<e.length;r++){const n=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){const e=n,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){i+=t||"";continue}}const a=n;switch(a.type){case"space":i+=this.renderer.space(a);continue;case"hr":i+=this.renderer.hr(a);continue;case"heading":i+=this.renderer.heading(a);continue;case"code":i+=this.renderer.code(a);continue;case"table":i+=this.renderer.table(a);continue;case"blockquote":i+=this.renderer.blockquote(a);continue;case"list":i+=this.renderer.list(a);continue;case"html":i+=this.renderer.html(a);continue;case"paragraph":i+=this.renderer.paragraph(a);continue;case"text":{let n=a,o=this.renderer.text(n);for(;r+1<e.length&&"text"===e[r+1].type;)n=e[++r],o+="\n"+this.renderer.text(n);i+=t?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let r=0;r<e.length;r++){const n=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){const e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=e||"";continue}}const a=n;switch(a.type){case"escape":case"text":i+=t.text(a);break;case"html":i+=t.html(a);break;case"link":i+=t.link(a);break;case"image":i+=t.image(a);break;case"strong":i+=t.strong(a);break;case"em":i+=t.em(a);break;case"codespan":i+=t.codespan(a);break;case"br":i+=t.br(a);break;case"del":i+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}}class ie{constructor(t){r(this,"options",void 0),r(this,"block",void 0),this.options=t||e.defaults}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Q.lex:Q.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}r(ie,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class re{constructor(){r(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),r(this,"options",this.setOptions),r(this,"parse",this.parseMarkdown(!0)),r(this,"parseInline",this.parseMarkdown(!1)),r(this,"Parser",te),r(this,"Renderer",X),r(this,"TextRenderer",ee),r(this,"Lexer",Q),r(this,"Tokenizer",Y),r(this,"Hooks",ie),this.use(...arguments)}walkTokens(e,t){let i=[];for(const n of e)switch(i=i.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;i=i.concat(this.walkTokens(e.items,t));break}default:{var r;const e=n;null!==(r=this.defaults.extensions)&&void 0!==r&&null!==(r=r.childTokens)&&void 0!==r&&r[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const n=e[r].flat(1/0);i=i.concat(this.walkTokens(n,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return r.forEach((i=>{const r=t({},i);if(r.async=this.defaults.async||r.async||!1,i.extensions&&(i.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const i=e.renderers[t.name];e.renderers[t.name]=i?function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=t.renderer.apply(this,r);return!1===a&&(a=i.apply(this,r)),a}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const i=e[t.level];i?i.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),i.renderer){const e=this.defaults.renderer||new X(this.defaults);for(const t in i.renderer){if(!(t in e))throw new Error(`renderer '${t}' does not exist`);if(["options","parser"].includes(t))continue;const r=t,n=i.renderer[r],a=e[r];e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o||""}}r.renderer=e}if(i.tokenizer){const e=this.defaults.tokenizer||new Y(this.defaults);for(const t in i.tokenizer){if(!(t in e))throw new Error(`tokenizer '${t}' does not exist`);if(["options","rules","lexer"].includes(t))continue;const r=t,n=i.tokenizer[r],a=e[r];e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}r.tokenizer=e}if(i.hooks){const e=this.defaults.hooks||new ie;for(const t in i.hooks){if(!(t in e))throw new Error(`hook '${t}' does not exist`);if(["options","block"].includes(t))continue;const r=t,n=i.hooks[r],a=e[r];ie.passThroughHooks.has(t)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(n.call(e,t)).then((t=>a.call(e,t)));const i=n.call(e,t);return a.call(e,i)}:e[r]=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];let o=n.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}r.hooks=e}if(i.walkTokens){const e=this.defaults.walkTokens,t=i.walkTokens;r.walkTokens=function(i){let r=[];return r.push(t.call(this,i)),e&&(r=r.concat(e.call(this,i))),r}}this.defaults=t(t({},this.defaults),r)})),this}setOptions(e){return this.defaults=t(t({},this.defaults),e),this}lexer(e,t){return Q.lex(e,null!=t?t:this.defaults)}parser(e,t){return te.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(i,r)=>{const n=t({},r),a=t(t({},this.defaults),n),o=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===n.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==i)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof i)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const s=a.hooks?a.hooks.provideLexer():e?Q.lex:Q.lexInline,c=a.hooks?a.hooks.provideParser():e?te.parse:te.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(i):i).then((e=>s(e,a))).then((e=>a.hooks?a.hooks.processAllTokens(e):e)).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>c(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(o);try{a.hooks&&(i=a.hooks.preprocess(i));let e=s(i,a);a.hooks&&(e=a.hooks.processAllTokens(e)),a.walkTokens&&this.walkTokens(e,a.walkTokens);let t=c(e,a);return a.hooks&&(t=a.hooks.postprocess(t)),t}catch(e){return o(e)}}}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+$(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const ne=new re;function ae(e,t){return ne.parse(e,t)}ae.options=ae.setOptions=function(e){return ne.setOptions(e),ae.defaults=ne.defaults,n(ae.defaults),ae},ae.getDefaults=i,ae.defaults=e.defaults,ae.use=function(){return ne.use(...arguments),ae.defaults=ne.defaults,n(ae.defaults),ae},ae.walkTokens=function(e,t){return ne.walkTokens(e,t)},ae.parseInline=ne.parseInline,ae.Parser=te,ae.parser=te.parse,ae.Renderer=X,ae.TextRenderer=ee,ae.Lexer=Q,ae.lexer=Q.lex,ae.Tokenizer=Y,ae.Hooks=ie,ae.parse=ae;const oe=ae.options,se=ae.setOptions,ce=ae.use,de=ae.walkTokens,ue=ae.parseInline,le=ae,he=te.parse,fe=Q.lex;e.Hooks=ie,e.Lexer=Q,e.Marked=re,e.Parser=te,e.Renderer=X,e.TextRenderer=ee,e.Tokenizer=Y,e.getDefaults=i,e.lexer=fe,e.marked=ae,e.options=oe,e.parse=le,e.parseInline=ue,e.parser=he,e.setOptions=se,e.use=ce,e.walkTokens=de}(sc)),sc).marked}catch(e){console.log("marked is not supported",e)}const dc=cc,uc=e=>{let{text:t,id:i,testid:r,clientHeight:n}=e;const a=!!n&&n<700,o=Ts({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:a?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:i,testid:r});return Rs(o,ac({text:t,level:a?6:5,style:{color:"white"}})),o};const lc=e=>{const t=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","270"),e.setAttribute("height","175"),e.setAttribute("viewBox","40 60 250 140"),e.innerHTML='\n <g transform="matrix(1,0,0,1,0,0)"><g id="12" opacity="1" style="mix-blend-mode:normal"><g><defs><clipPath id="12_clipPath" x="-50%" y="-50%" width="200%" height="200%"><path d="M0,260v-260h333v260z" fill="white" clip-rule="nonzero"></path></clipPath></defs><g clip-path="url(#12_clipPath)"><g transform="matrix(1,0,0,1,48,60)"><g id="83287" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83288" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83288_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij3rlyasnggflf" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83288_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij3rlyasnggflf)"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116.5)"><g id="83289" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83289_fill_path" d="M135,0l-135,23.5h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,2)"><g id="83290" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83290_fill_path" d="M0,2c0,-1 1,-2 2,-2h228c1,0 2,1 2,2v18h-232z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,228.54000000000002,62.99940000000001)"><g id="83291" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83291_fill_path" d="M227,-0.00002l-227,60.99934l226.99998,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,42)"><g id="83292" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83292_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h109c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,143,42)"><g id="83293" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83293_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h65c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,58)"><g id="83294" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83294_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,58)"><g id="83295" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83295_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,194,58)"><g id="83296" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83296_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h14c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,24,74)"><g id="83297" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83297_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h83c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,117,74)"><g id="83298" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83298_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,165,74)"><g id="83299" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83299_fill_path" d="M1,6c-0.55228,0 -1,-0.44772 -1,-1v-4c0,-0.55228 0.44772,-1 1,-1h43c0.55228,0 1,0.44772 1,1v4c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,68,92)"><g id="83300" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83300_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,74,92)"><g id="83301" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83301_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,80,92)"><g id="83302" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83302_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,86,92)"><g id="83303" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83303_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,92,92)"><g id="83304" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83304_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,98,92)"><g id="83305" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83305_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,104,92)"><g id="83306" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83306_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,110,92)"><g id="83307" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83307_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,116,92)"><g id="83308" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83308_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,122,92)"><g id="83309" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83309_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,128,92)"><g id="83310" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83310_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,134,92)"><g id="83311" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83311_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,140,92)"><g id="83312" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83312_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,146,92)"><g id="83313" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83313_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,152,92)"><g id="83314" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83314_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,158,92)"><g id="83315" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83315_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,164,92)"><g id="83316" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83316_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,170,92)"><g id="83317" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83317_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h18c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,97,116)"><g id="83318" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83318_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h38c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,2,21)"><g id="83320" opacity="0.2" style="mix-blend-mode:normal"><g><g><path id="83320_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g><g transform="matrix(1,0,0,1,48,60)"><g id="83268" opacity="1" style="mix-blend-mode:normal"><g><g><g transform="matrix(1,0,0,1,0,0)"><g id="83269" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83269_fill_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><defs><clipPath id="ligziij4hmxrv43iz67" clipPathUnits="userSpaceOnUse"><path d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z"></path></clipPath></defs><path id="83269_stroke_path" d="M4,140c-2.20914,0 -4,-1.79086 -4,-4v-132c0,-2.20914 1.79086,-4 4,-4h228c2.20914,0 4,1.79086 4,4v132c0,2.20914 -1.79086,4 -4,4z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="4" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4hmxrv43iz67)"></path></g></g></g></g><g transform="matrix(1,0,0,1,196,100)"><g id="83270" opacity="0.4" style="mix-blend-mode:normal"><g><g><defs><clipPath id="ligziij4roiiqcgytn" clipPathUnits="userSpaceOnUse"><path d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z"></path></clipPath></defs><path id="83270_stroke_path" d="M24,12c0,1.2588 -0.198,2.5104 -0.5868,3.708c-0.3888,1.1976 -0.9648,2.3268 -1.7052,3.3456c-0.7404,1.0188 -1.6356,1.914 -2.6544,2.6544c-1.0188,0.7404 -2.148,1.3164 -3.3456,1.7052c-1.1976,0.3888 -2.4492,0.5868 -3.708,0.5868c-1.2588,0 -2.5104,-0.198 -3.708,-0.5868c-1.1976,-0.3888 -2.3268,-0.9648 -3.3456,-1.7052c-1.0188,-0.7404 -1.914,-1.6356 -2.6544,-2.6544c-0.7404,-1.0188 -1.3164,-2.148 -1.7052,-3.3456c-0.3888,-1.1976 -0.5868,-2.4492 -0.5868,-3.708c0,-1.2588 0.198,-2.5104 0.5868,-3.708c0.3888,-1.1976 0.9648,-2.3268 1.7052,-3.3456c0.7404,-1.0188 1.6356,-1.914 2.6544,-2.6544c1.0188,-0.7404 2.148,-1.3164 3.3456,-1.7052c1.1976,-0.3888 2.4492,-0.5868 3.708,-0.5868c1.2588,0 2.5104,0.198 3.708,0.5868c1.1976,0.3888 2.3268,0.9648 3.3456,1.7052c1.0188,0.7404 1.914,1.6356 2.6544,2.6544c0.7404,1.0188 1.3164,2.148 1.7052,3.3456c0.3888,1.1976 0.5868,2.4492 0.5868,3.708z" fill="none" stroke="rgb(195, 205, 255)" stroke-width="10" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1" clip-path="url(#ligziij4roiiqcgytn)"></path></g></g></g></g><g transform="matrix(1,0,0,1,98,98)"><g id="83271" opacity="0.4" style="mix-blend-mode:normal"><g><g><path id="83271_fill_path" d="M135,0l-135,40h135z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,1,1)"><g id="83272" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83272_fill_path" d="M0,2c0,-1 1,-2 2,-2h229c1,0 2,1 2,2v18h-233z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,42,74.4508)"><g id="83273" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83273_fill_path" d="M18.00001,0h-8c-5.5225,0 -10.00001,4.47496 -10.00001,9.99992c0,1.09999 0.895,1.99998 2,1.99998h24.00002c1.1045,0 2,-0.89549 2,-1.99998c0,-5.52496 -4.475,-9.99992 -10.00001,-9.99992z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,47.5999,54.4509)"><g id="83274" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83274_fill_path" d="M17.306,8.653c0,0.9077 -0.1428,1.8102 -0.4232,2.6738c-0.2804,0.8636 -0.6957,1.6778 -1.2296,2.4124c-0.5339,0.7346 -1.1794,1.3801 -1.914,1.914c-0.7346,0.5339 -1.5488,0.9492 -2.4124,1.2296c-0.8636,0.2804 -1.7661,0.4232 -2.6738,0.4232c-0.9077,0 -1.8102,-0.1428 -2.6738,-0.4232c-0.8636,-0.2804 -1.6778,-0.6957 -2.4124,-1.2296c-0.7346,-0.5339 -1.3801,-1.1794 -1.914,-1.914c-0.5339,-0.7346 -0.9492,-1.5488 -1.2296,-2.4124c-0.2804,-0.8636 -0.4232,-1.7661 -0.4232,-2.6738c0,-0.9077 0.1428,-1.8102 0.4232,-2.6738c0.2804,-0.8636 0.6957,-1.6778 1.2296,-2.4124c0.5339,-0.7346 1.1794,-1.3801 1.914,-1.914c0.7346,-0.5339 1.5488,-0.9492 2.4124,-1.2296c0.8636,-0.2804 1.7661,-0.4232 2.6738,-0.4232c0.9077,0 1.8102,0.1428 2.6738,0.4232c0.8636,0.2804 1.6778,0.6957 2.4124,1.2296c0.7346,0.5339 1.3801,1.1794 1.914,1.914c0.5339,0.7346 0.9492,1.5488 1.2296,2.4124c0.2804,0.8636 0.4232,1.7661 0.4232,2.6738z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,32,48)"><g id="83275" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83275_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83275_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,-1,1,6.123233995736766e-17,32,94)"><g id="83276" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83276_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83276_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(-1,2.4492935982947064e-16,-2.4492935982947064e-16,-1,79,94)"><g id="83277" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83277_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83277_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,79,48)"><g id="83278" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83278_fill_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path><path id="83278_stroke_path" d="M12,0c0,0 -7.7348,0 -8,0c-0.2652,0 -0.5204,0.0252 -0.7804,0.0768c-0.26,0.0516 -0.5052,0.126 -0.7504,0.2276c-0.2452,0.1016 -0.4712,0.2224 -0.6916,0.3696c-0.2204,0.1472 -0.4184,0.31 -0.606,0.4976c-0.1876,0.1876 -0.3504,0.3856 -0.4976,0.606c-0.1472,0.2204 -0.268,0.4464 -0.3696,0.6916c-0.1016,0.2452 -0.176,0.4904 -0.2276,0.7504c-0.0516,0.26 -0.0768,0.5152 -0.0768,0.7804c0,0.2652 0,8 0,8" fill="none" stroke="rgb(195, 205, 255)" stroke-width="2" stroke-linecap="butt" stroke-linejoin="butt" stroke-dasharray="0 0" stroke-opacity="1"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,47)"><g id="83279" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83279_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,47)"><g id="83280" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83280_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,67)"><g id="83281" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83281_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,67)"><g id="83282" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83282_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h64c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,100,87)"><g id="83283" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83283_fill_path" d="M4,8c-2.20914,0 -4,-1.79086 -4,-4v0c0,-2.20914 1.79086,-4 4,-4v0c2.20914,0 4,1.79086 4,4v0c0,2.20914 -1.79086,4 -4,4z" fill-rule="nonzero" fill="rgb(105, 129, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,116,87)"><g id="83284" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83284_fill_path" d="M1,8c-0.55228,0 -1,-0.44772 -1,-1v-6c0,-0.55228 0.44772,-1 1,-1h51c0.55228,0 1,0.44772 1,1v6c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(195, 205, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,137,9)"><g id="83285" opacity="1" style="mix-blend-mode:normal"><g><g><path id="83285_fill_path" d="M1,4c-0.55228,0 -1,-0.44772 -1,-1v-2c0,-0.55228 0.44772,-1 1,-1h86c0.55228,0 1,0.44772 1,1v2c0,0.55228 -0.44772,1 -1,1z" fill-rule="nonzero" fill="rgb(244, 247, 251)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(-1,0,0,-1,92.4999,98.9985)"><g id="83286" opacity="0.2" style="mix-blend-mode:lighten"><g><g><path id="83286_fill_path" d="M90.49994,0l-90.49994,96.99852l90.49994,0.00002z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g><g transform="matrix(1,0,0,1,0,20)"><g id="83319" opacity="0" style="mix-blend-mode:normal"><g><g><path id="83319_fill_path" d="M0,118v-118h234v118z" fill-rule="nonzero" fill="rgb(255, 255, 255)" fill-opacity="1" style="mix-blend-mode:NORMAL"></path></g></g></g></g></g></g></g></g></g></g></g></g><animateTransform href="#83287" attributeName="transform" type="translate" values="118 70;118 70;118 70;118 70;118 70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="scale" values="0 1;0 1;1.02 1;1 1;1 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83287" attributeName="transform" type="translate" values="-118 -70;-118 -70;-118 -70;-118 -70;-118 -70" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.61;0.66;1" keySplines="0.0664 0.4423 0.15 1;0.0664 0.4423 0.1 1;0.0664 0.4423 0.1 1;0.5 0.35 0.1 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="0 0;0 0;9.018099999999999 -4;9.018099999999999 -4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.42 0 0.15 1;0.42 0 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="113.5 30.4997;113.5 30.4997;113.5 30.4997;113.5 30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="scale" values="-1 -1;-1 -1;-0.88 -0.88;-0.88 -0.88" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83291" attributeName="transform" type="translate" values="-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997;-113.5 -30.4997" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.37;0.52;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animateTransform><animate href="#83320" attributeName="opacity" values="0.2;0.2;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.39;0.43;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate><animateTransform href="#83268" attributeName="transform" type="translate" values="117 75;117 75;117 75;117 75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="scale" values="1 1;1 1;0 1;0 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83268" attributeName="transform" type="translate" values="-117 -75;-117 -75;-117 -75;-117 -75" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.37;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.8 0.15;0.5 0.35 0.8 0.15" additive="sum" fill="freeze"></animateTransform><animate href="#83271_fill_path" attributeName="d" values="M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,0l-135,40h135z;M135,-0.0042l-135.0142,40.0042h135.0142z;M135,-0.0364l-135.1228,40.0364h135.1228z;M135,-0.0975l-135.3292,40.0975h135.3292z;M135,-0.1848l-135.6236,40.1848h135.6236z;M135,-0.2958l-135.9982,40.2958h135.9982z;M135,-0.4285l-136.4462,40.4285h136.4462z;M135,-0.5812l-136.9617,40.5812h136.9617z;M135,-0.7525l-137.5397,40.7525h137.5397z;M135,-0.941l-138.176,40.941h138.176z;M135,-1.1457l-138.8667,41.1457h138.8667z;M135,-1.3655l-139.6085,41.3655h139.6085z;M135,-1.5996l-140.3986,41.5996h140.3986z;M135,-1.8472l-141.2343,41.8472h141.2343z;M135,-2.1077l-142.1134,42.1077h142.1134z;M135,-2.3804l-143.0339,42.3804h143.0339z;M135,-2.6649l-143.994,42.6649h143.994z;M135,-2.9607l-144.9922,42.9607h144.9922z;M135,-3.2673l-146.0272,43.2673h146.0272z;M135,-3.5846l-147.0978,43.5846h147.0978z;M135,-3.9121l-148.2031,43.9121h148.2031z;M135,-4.2497l-149.3424,44.2497h149.3424z;M135,-4.5972l-150.5153,44.5972h150.5153z;M135,-4.9545l-151.7213,44.9545h151.7213z;M135,-5.3218l-152.9607,45.3218h152.9607z;M135,-5.6991l-154.2341,45.6991h154.2341z;M135,-6.0868l-155.5427,46.0868h155.5427z;M135,-6.4858l-156.8893,46.4858h156.8893z;M135,-6.898l-158.2804,46.898h158.2804z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z;M135,-7.1112l-159,47.1112h159z" dur="2.6s" repeatCount="indefinite" keyTimes="0;0.007692307692307693;0.015384615384615385;0.023076923076923078;0.03076923076923077;0.038461538461538464;0.046153846153846156;0.05384615384615385;0.06153846153846154;0.06923076923076923;0.07692307692307693;0.08461538461538462;0.09230769230769231;0.1;0.1076923076923077;0.11538461538461539;0.12307692307692308;0.13076923076923078;0.13846153846153847;0.14615384615384616;0.15384615384615385;0.16153846153846155;0.16923076923076924;0.17692307692307693;0.18461538461538463;0.19230769230769232;0.2;0.2076923076923077;0.2153846153846154;0.2230769230769231;0.23076923076923078;0.23846153846153847;0.24615384615384617;0.25384615384615383;0.26153846153846155;0.2692307692307692;0.27692307692307694;0.2846153846153846;0.2923076923076923;0.3;0.3076923076923077;0.3153846153846154;0.3230769230769231;0.33076923076923076;0.3384615384615385;0.34615384615384615;0.35384615384615387;0.36153846153846153;0.36923076923076925;0.3769230769230769;0.38461538461538464;0.3923076923076923;0.4;0.4076923076923077;0.4153846153846154;0.4230769230769231;0.4307692307692308;0.43846153846153846;0.4461538461538462;0.45384615384615384;0.46153846153846156;0.46923076923076923;0.47692307692307695;0.4846153846153846;0.49230769230769234;0.5;0.5076923076923077;0.5153846153846153;0.5230769230769231;0.5307692307692308;0.5384615384615384;0.5461538461538461;0.5538461538461539;0.5615384615384615;0.5692307692307692;0.5769230769230769;0.5846153846153846;0.5923076923076923;0.6;0.6076923076923076;0.6153846153846154;0.6230769230769231;0.6307692307692307;0.6384615384615384;0.6461538461538462;0.6538461538461539;0.6615384615384615;0.6692307692307692;0.676923076923077;0.6846153846153846;0.6923076923076923;0.7;0.7076923076923077;0.7153846153846154;0.7230769230769231;0.7307692307692307;0.7384615384615385;0.7461538461538462;0.7538461538461538;0.7615384615384615;0.7692307692307693;0.7769230769230769;0.7846153846153846;0.7923076923076923;0.8;0.8076923076923077;0.8153846153846154;0.823076923076923;0.8307692307692308;0.8384615384615385;0.8461538461538461;0.8538461538461538;0.8615384615384616;0.8692307692307693;0.8769230769230769;0.8846153846153846;0.8923076923076924;0.9;0.9076923076923077;0.9153846153846154;0.9230769230769231;0.9307692307692308;0.9384615384615385;0.9461538461538461;0.9538461538461539;0.9615384615384616;0.9692307692307692;0.9769230769230769;0.9846153846153847;0.9923076923076923;1" fill="freeze"></animate><animateTransform href="#83285" attributeName="transform" type="translate" values="88 2;88 2;88 2;88 2;88 2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="scale" values="0.98 1;0.98 1;1 1;0.96 1;0.96 1" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83285" attributeName="transform" type="translate" values="-88 -2;-88 -2;-88 -2;-88 -2;-88 -2" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.12;0.27;0.33;1" keySplines="0.42 0 0.15 1;0.42 0 0.48 1;0.42 0 0.48 1;0.5 0.35 0.48 1" additive="sum" fill="freeze"></animateTransform><animateTransform href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewX" values="0;0;-4;-4" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="skewY" values="0;0;0;0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animateTransform xlink:href="#83286" href="#83286" attributeName="transform" type="translate" values="0 0;0 0;0 0;0 0" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.09;0.32;1" keySplines="0.42 0 0.15 1;0.42 0 1 1;0.5 0.35 1 1" additive="sum" fill="freeze"></animateTransform><animate href="#83319" attributeName="opacity" values="0;0;0.18;0.18" dur="2.6s" repeatCount="indefinite" calcMode="spline" keyTimes="0;0.31;0.36;1" keySplines="0.5 0.35 0.15 1;0.5 0.35 0.15 1;0.5 0.35 0.15 1" additive="sum" fill="freeze"></animate>\n ',e}();return t.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_back"===e&&(t.style.opacity="1",setTimeout((()=>{t.style.opacity="0"}),5e3)),t};var hc;!function(e){e.INVALID="invalid",e.VALID="valid",e.ACCEPTED="accepted",e.REJECTED="rejected"}(hc||(hc={}));const fc="#ED3232",pc="#01B678",gc="#FFF";const mc=e=>{const t=document.createElement("canvas");t.width=e.videoWidth,t.height=e.videoHeight;return t.getContext("2d").drawImage(e,0,0,e.videoWidth,e.videoHeight),t};async function bc(e){let{context:t,onDetect:i,frame:r,showError:n,isSelfie:a=!1}=e;const o=t.state.name;if(o===hc.REJECTED){n(function(e){switch(e){case Xo.DOCUMENT_DETECTION:return"searching_document_autocapture";case Xo.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case Xo.BARCODE_DETECTION:return pa.feedback.BARCODE_NOT_FOUND;case Xo.BLUR_DETECTION:return pa.feedback.BLUR;case Xo.GLARE_DETECTION:return pa.feedback.GLARE;case Xo.FACE_DETECTION:return pa.feedback.FACE_NOT_FOUND;case Xo.FACE_POSITION:return pa.feedback.FACE_TOO_SMALL}}(t.invalidFramesCause));vc("border-color",t.invalidFramesCause===Xo.DOCUMENT_DETECTION?gc:fc)}if(o===hc.VALID)if(a){vc("border-color",pc);n(`capturing_face_autocapture${Math.ceil((t.validFramesThreshold-t.validFramesCounter)/t.validFramesThreshold*3)}`)}else n("capturing_in_progress_message"),vc("border-color",gc);o===hc.ACCEPTED&&(vc("border-color",gc),n(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await i({frame:r,suspendedPreview:!0,context:t}))}function vc(e,t){document.querySelectorAll('[id^="overlay-frame"]').forEach((i=>{i.style[e]=t}))}function yc(e){let t,i,r,{captureFrame:n,object:a,videoWidth:o,videoHeight:s,deviceWidth:c,deviceHeight:d,threshold:u,iouThreshold:l=.85}=e;if(o/s>=c/d){r=d/s;const e=(o*r-c)/2;t=a.x*r-e,i=a.y*r}else{r=c/o;const e=(s*r-d)/2;t=a.x*r,i=a.y*r-e}const h=t+a.width*r,f=i+a.height*r;!function(e,t,i,r){var n,a;if(null===(a=null===(n=Qo.state.autoCaptureSettings)||void 0===n?void 0:n.settings)||void 0===a?void 0:a.debug){const n=document.getElementById("image-preview-section"),a=document.getElementById("rectangle");if(a)a.style.width=`${i}px`,a.style.height=`${r}px`,a.style.left=`${e}px`,a.style.top=`${t}px`;else{const a=document.createElement("div");a.id="rectangle",a.style.position="absolute",a.style.border="1px solid yellow",a.style.width=`${i}px`,a.style.height=`${r}px`,a.style.left=`${e}px`,a.style.top=`${t}px`,n.appendChild(a)}}}(t,i,a.width*r,a.height*r);const p=function(e,t){const i=Math.max(e.left,t.left),r=Math.min(e.right,t.right),n=Math.max(e.top,t.top),a=r-i,o=Math.min(e.bottom,t.bottom)-n;if(a<=0||o<=0)return 0;const s=a*o;return s/((e.right-e.left)*(e.bottom-e.top)+(t.right-t.left)*(t.bottom-t.top)-s)}({top:n.top,left:n.left,bottom:n.bottom,right:n.right},{top:i,left:t,bottom:f,right:h}),g=p>l,m=a.width*r*(a.height*r)>u*(n.width*n.height);return g&&m}const _c=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.innerHTML='\n <path d="M10.7202 25.9524C9.81992 25.9524 9.08331 25.2158 9.08331 24.3155V11.2202C9.08331 10.3199 9.81992 9.58333 10.7202 9.58333C11.6205 9.58333 12.3571 10.3199 12.3571 11.2202V20.6938C16.3675 14.0337 23.662 9.58333 32 9.58333C44.6553 9.58333 54.9166 19.8447 54.9166 32.5C54.9166 45.1553 44.6553 55.4167 32 55.4167C23.8257 55.4167 16.654 51.1403 12.5924 44.6949C11.9274 43.631 12.7357 42.3214 13.994 42.3214C14.6079 42.3214 15.1603 42.6488 15.4979 43.1603C18.9968 48.5621 25.0841 52.1429 32 52.1429C42.8445 52.1429 51.6428 43.3445 51.6428 32.5C51.6428 21.6555 42.8445 12.8571 32 12.8571C24.726 12.8571 18.383 16.8062 14.9864 22.6786H23.8155C24.7158 22.6786 25.4524 23.4152 25.4524 24.3155C25.4524 25.2158 24.7158 25.9524 23.8155 25.9524H10.7202Z" fill="#FF8B8B"/> \n ',e}(),t=Ts({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"retake-image",testid:"retake-image"});return Rs(t,e),Rs(t,ac({text:"Retake",level:2,style:{color:"#FF8B8B",margin:"0",width:"100%"},id:"retake-image-text"})),t};const wc=()=>{const e=function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","64px"),e.setAttribute("height","64px"),e.innerHTML='\n <path d="M32.5 8.66666C38.6884 8.66666 44.6233 11.125 48.9992 15.5008C53.375 19.8767 55.8333 25.8116 55.8333 32C55.8333 38.1884 53.375 44.1233 48.9992 48.4992C44.6233 52.875 38.6884 55.3333 32.5 55.3333C26.3116 55.3333 20.3767 52.875 16.0009 48.4992C11.625 44.1233 9.16668 38.1884 9.16668 32C9.16668 25.8116 11.625 19.8767 16.0009 15.5008C20.3767 11.125 26.3116 8.66666 32.5 8.66666ZM32.5 58.6667C39.5725 58.6667 46.3552 55.8572 51.3562 50.8562C56.3572 45.8552 59.1667 39.0724 59.1667 32C59.1667 24.9276 56.3572 18.1448 51.3562 13.1438C46.3552 8.14284 39.5725 5.33333 32.5 5.33333C25.4276 5.33333 18.6448 8.14284 13.6438 13.1438C8.64286 18.1448 5.83334 24.9276 5.83334 32C5.83334 39.0724 8.64286 45.8552 13.6438 50.8562C18.6448 55.8572 25.4276 58.6667 32.5 58.6667ZM43.6771 26.5104C44.3229 25.8646 44.3229 24.8021 43.6771 24.1562C43.0313 23.5104 41.9688 23.5104 41.3229 24.1562L29.1667 36.3125L23.6771 30.8229C23.0313 30.1771 21.9688 30.1771 21.3229 30.8229C20.6771 31.4687 20.6771 32.5312 21.3229 33.1771L27.9896 39.8437C28.6354 40.4896 29.6979 40.4896 30.3438 39.8437L43.6771 26.5104Z" fill="#BBF7DD"/>\n ',e}(),t=Ts({tagName:"button",style:{zIndex:"2",width:"fit-content",display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"transparent",border:"none"},id:"approve-image",testid:"approve-image"});return Rs(t,e),Rs(t,ac({text:"Approve",level:2,style:{color:"#BBF7DD",margin:"0",width:"100%"},id:"check-circle-text"})),t},xc=e=>{let{step:t,setImage:i,camera:r}=e;var n,a,o,s;const c=ec[t];(null===(n=Qo.state.autoCaptureSettings)||void 0===n?void 0:n.enabled)&&"selfie"===t&&(c.instructions="second_title_face_autocapture");const d=((e,t)=>Ts({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"document-capture",className:t}))("document-capture",t),u=Ts({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),l=Ts({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(Qo.state.rootElementId);if(!h)throw new Error("Root element not found");const f=tc(Ns(t),h);Rs(u,lc(t)),Rs(u,f);const p=(()=>{const e=Ts({tagName:"div",style:{zIndex:"2",width:"80%",height:"50px",color:"white",display:"flex",alignItems:"center",backgroundColor:"#2E2E2E",justifyContent:"center",opacity:".9"},id:"loading-block",testid:"loading-block"}),t=rc();return t.style.width="16px",t.style.height="16px",t.style.margin="0 10px",Rs(e,t),Rs(e,ac({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),e})();Rs(f,p),p.style.visibility="hidden";const g=uc({text:zs.translate(c.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),m=(e=>{let{click:t,id:i,testid:r,color:n,withLoader:a}=e;if(a){const e=ic();e.style.position="absolute",e.style.left="-7px",e.style.top="-7px",e.style.height="63px",e.style.width="63px";const a=Ts({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:n||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:r+"-inner"});return Rs(a,e),a.addEventListener("click",t),a}{const e=Ts({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(n||"white"),borderRadius:"40px"},id:i+"-outer",testid:r+"-outer"});return Rs(e,Ts({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:n||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:r+"-inner"})),e.addEventListener("click",t),e}})({click:()=>i({frame:mc(r.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(o=null===(a=Qo.state)||void 0===a?void 0:a.autoCaptureSettings)||void 0===o?void 0:o.enabled}),b=(()=>{const e=Ts({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",alignItems:"center",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),t=wc();return Rs(e,_c()),Rs(e,t),e})(),v=(e=>{let{title:t,text:i,clientHeight:r,customTextColor:n}=e;const a=r<700,o=Ts({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:a?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=ac({text:t,level:a?2:1,style:{color:n||"white",textAlign:"center",marginBottom:a?"4px":"10px"},id:"step-title"}),c=ac({text:i,level:a?6:5,style:{color:n||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return Rs(o,s),Rs(o,c),o})({text:zs.translate(c.instructions),title:zs.translate(c.title),clientHeight:h.clientHeight}),y=(e=>{const t=e<700,i=Ts({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:Qo.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),r=Ts({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),n=rc();n.style.width="16px",n.style.height="16px",n.style.margin="0 10px",Qo.state.markdownSupportText?Rs(r,n):Rs(i,n);const a=Qo.state.markdownSupportText&&null!=dc?dc.parse(Qo.state.markdownSupportText,{async:!1}):"",o=ac({text:"",level:t?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=ac({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return a&&(s.innerHTML=a,Rs(r,o)),Rs(i,a?[r,s]:o),i})(h.clientHeight),_=(null===(s=Qo.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?ic():function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","65"),e.setAttribute("height","65"),e.setAttribute("viewBox","0 0 24 24"),e.innerHTML='\n <path fill="#ffffff" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="#ffffff" d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"><animateTransform attributeName="transform" type="rotate" dur="0.75s" values="0 12 12;360 12 12" repeatCount="indefinite"/></path>\n ',e}();_.style.display="none",Rs(l,g),Rs(l,v),Rs(l,u),Rs(l,y),Rs(d,l);const w=Ts({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});Rs(w,_),Rs(w,m),Rs(w,b),Rs(d,w),Rs(d,r.videoElement);const x=Ts({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===Ns(t)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const A=(e=>{const t=Ts({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return t.appendChild(e),t})(x);return Rs(d,A),{component:d,setLoadingMode:e=>{var t;m.style.display="none",y.style.visibility="hidden",_.style.display="block",(null===(t=Qo.state.autoCaptureSettings)||void 0===t?void 0:t.enabled)&&(_.style.height="63px",_.style.width="63px"),e&&(p.style.visibility="visible")},setApprovalRetakeButtons:e=>{let{approveAction:t,retakeAction:i}=e;var r,n;m.style.display="none",y.style.display="none",b.style.display="flex";const a=b.querySelector("#approve-image"),o=b.querySelector("#retake-image"),s=a.cloneNode(!0);null===(r=a.parentNode)||void 0===r||r.replaceChild(s,a),s.addEventListener("click",t);const c=o.cloneNode(!0);null===(n=o.parentNode)||void 0===n||n.replaceChild(c,o),c.addEventListener("click",i)},hideApprovalRetakeButtons:()=>{b.style.display="none",y.style.display="flex"},setPreviewImage:(e,t)=>{x.src=e,p.style.visibility="hidden",r.videoElement.style.display="none",m.style.display="none",y.style.visibility="hidden",A.style.display="block",_.style.display=t?"none":"block"},setLoadingComplete:()=>{_.style.display="none",p.style.visibility="hidden"},setAutoCapturingError:(e,t)=>{if(!e)return void(y.style.visibility="hidden");let i;i=e==pa.feedback.RESTRICTED_CRITERIA&&t?t:Xs[e]?Xs[e].message:zs.translate(e)!==e?e:Xs.other.message,document.getElementById("image-error-message").innerHTML=zs.translate(i),y.style.visibility="visible"},enableVideoElement:()=>{m.style.display="block",r.videoElement.style.display="block",A.style.display="none",_.style.display="none"},setCapturingShowErrorMode:(e,t)=>{m.style.display="block",A.style.display="none",r.videoElement.style.display="block";const i=e==pa.feedback.RESTRICTED_CRITERIA,n=Xs[e]||Xs.other;document.getElementById("image-error-message").innerHTML=t&&i&&null!=dc?dc.parse(t,{async:!1}):zs.translate(n.message),y.style.visibility="visible",p.style.visibility="hidden"},setTitleInstructionsMidStep:e=>{let{title:t,instructions:i}=e;t&&(document.getElementById("step-title").innerHTML=zs.translate(t)),i&&(document.getElementById("step-instructions").innerHTML=zs.translate(i))}}};class Ac{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t||(this.isValid=!1,this.failedStep=e),this.steps.push(new Ec(e,t,i))}}class Ec{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=e,this.success=t,this.duration=i}}class Sc{constructor(){this.name=hc.ACCEPTED}async handleFrame(){return new Ac}}class kc{constructor(){this.name=hc.VALID}async handleFrame(e){let{context:t,frame:i,deviceInfo:r,detectionStrategy:n}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.validFramesCounter++,t.validFramesCounter>=t.validFramesThreshold&&t.setState(new Sc)):(t.validFramesCounter=0,t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new Cc)),a}}class Mc{constructor(){this.name=hc.REJECTED}async handleFrame(e){let{context:t,frame:i,detectionStrategy:r,deviceInfo:n}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new kc),a):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new Cc),a):(t.invalidFramesCounter++,a)}}class Cc{constructor(){this.name=hc.INVALID}async handleFrame(e){let{context:t,frame:i,detectionStrategy:r,deviceInfo:n}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new kc)):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep):(t.invalidFramesCounter++,t.invalidFramesCounter>=t.invalidFramesThreshold&&t.setState(new Mc)),a}}class Ic{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=e,this.state=new Cc,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=t,this.invalidFramesThreshold=i}setState(e){this.state=e}async handleFrame(e){let{frame:t,deviceInfo:i}=e;return await this.state.handleFrame({context:this,frame:t,deviceInfo:i,detectionStrategy:this.detectionStrategy})}}async function Dc(e,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const o=Tc(i,n,a),s=await new Promise(((n,a)=>{navigator.serviceWorker.ready.then((s=>{var c;const d=t=>{t.data.type===e+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",d),n(t.data.result)),t.data.type===e+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",d),ss(t.data.error.toString(),e,"error"),a(t.data.error))};navigator.serviceWorker.addEventListener("message",d),null===(c=s.active)||void 0===c||c.postMessage(t({type:e,imageData:o,height:i.height,width:i.width},r))}))}));return ds(`****** in web-SDK return result for ${e}`,s),s}function Tc(e,t,i){const r=document.createElement("canvas"),n=t||{height:e.height,width:e.width},a=r.getContext("2d");r.width=n.width,r.height=n.height,i?null==a||a.drawImage(e,i.x,i.y,i.width,i.height,0,0,n.width,n.height):null==a||a.drawImage(e,0,0,n.width,n.height);const o=null==a?void 0:a.getImageData(0,0,n.width,n.height);return r.remove(),o}async function Rc(e){if(e instanceof HTMLVideoElement&&e.paused)return[];return Dc("DETECT_DOCUMENT",e,{},ps[us.DOCUMENT_DETECTOR].imageDimensions)}async function Bc(e,t){return Dc("BLUR_GLARE_CLASSIFY",e,{},ps[us.BLUR_GLARE_CLASSIFIER].imageDimensions,t)}const zc=function(){try{return new hs}catch(e){return ds("Error initializing barcode model",e),ss("Error initializing barcode model","barcode_model_not_supported","init"),null}}();class Pc{constructor(e){this.barcodeModel=null,this.hasBarcode=e,this.barcodeModel=zc}async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new Ac;let a=Date.now();const o=null===(r=await Rc(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(Xo.DOCUMENT_DETECTION,void 0!==o,s),!o)return n;a=Date.now();const c=yc({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Qo.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:Qo.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-a,n.addStepResponse(Xo.DOCUMENT_POSITION,c,s),!c)return n;a=Date.now();const d=await Bc(t,o);s=Date.now()-a;const u=d.some((e=>"blur"===e.class));if(n.addStepResponse(Xo.BLUR_DETECTION,!u,s),u)return n;const l=d.some((e=>"glare"===e.class));if(n.addStepResponse(Xo.GLARE_DETECTION,!l,s),l)return n;if(this.barcodeModel&&this.hasBarcode){a=Date.now();const e=await this.barcodeModel.detect(t);s=Date.now()-a;const i=(null==e?void 0:e.length)>0;if(n.addStepResponse(Xo.BARCODE_DETECTION,i,s),!i)return n}return n}}class Oc{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Fc{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(Xo).forEach((e=>{this.stats.set(e,new Oc)}))}addStats(e,t){this.frameHandleDurations.push(t),e.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),e.steps.forEach((e=>{this.addStat(e.step,e.duration,e.success?1:0,e.success?0:1)}))}addStat(e,t,i,r){const n=this.stats.get(e);if(!n)throw new Error(`Stat for step ${e} not found`);n.durations.push(t),n.countSuccess+=i,n.countFailed+=r}}let Nc=!1;const Lc=e=>{Nc=e};class jc{async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new Ac;let a=Date.now();const o=null===(r=await Rc(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(Xo.DOCUMENT_DETECTION,void 0!==o,s),!o)return n;a=Date.now();const c=yc({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Qo.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:Qo.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-a,n.addStepResponse(Xo.DOCUMENT_POSITION,c,s),!c)return n;a=Date.now();const d=await Bc(t,o);s=Date.now()-a;const u=d.some((e=>"blur"===e.class));if(n.addStepResponse(Xo.BLUR_DETECTION,!u,s),u)return n;const l=d.some((e=>"glare"===e.class));return n.addStepResponse(Xo.GLARE_DETECTION,!l,s),n}}let Uc=!1;const qc=e=>{Uc=e};class Kc{async validate(e){let{frame:t,deviceInfo:i}=e;var r;const n=new Ac;let a=Date.now();const o=null===(r=await async function(e){return e instanceof HTMLVideoElement&&e.paused?[]:Dc("DETECT_FACE_LANDMARKS",e)}(t))||void 0===r?void 0:r[0];let s=Date.now()-a;if(n.addStepResponse(Xo.FACE_DETECTION,"face"===(null==o?void 0:o.class),s),!o)return n;a=Date.now();const c=yc({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Qo.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:Qo.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-a,n.addStepResponse(Xo.FACE_POSITION,c,s),n}}let Hc=!1;const Vc=e=>{Hc=e};async function $c(e,t){var i,r,n,a;let o="camera-error";if("NotAllowedError"===t.name){o="Permission dismissed"===t.message?"camera-permission-dismissed":"camera-permission-denied";const s=ns.createCameraNotAllowedEvent(t.message,e);await as(null===(i=Qo.state)||void 0===i?void 0:i.step,null===(r=Qo.state)||void 0===r?void 0:r.userToken,null===(n=Qo.state)||void 0===n?void 0:n.sessionId,null===(a=Qo.state)||void 0===a?void 0:a.clientId,s),Qo.dispatch("setIsCapturingProcessStarted",!1)}$o(e,o)}function Jc(e){const t=(e=>{var t,i,r,n;const[a,o]=e.split(",");if(!a||!o)throw new Error("unable-to-parse-data-uri");const s=null===(r=null===(i=null===(t=a.split(";"))||void 0===t?void 0:t[0])||void 0===i?void 0:i.split(":"))||void 0===r?void 0:r[1];if(!s)throw new Error("unable-to-parse-data-uri");const c=null===(n=s.split("/"))||void 0===n?void 0:n[1];if(!c)throw new Error("unable-to-parse-data-uri");return{data:o,format:c}})(e);return{image:{data:t.data,format:t.format,captureMargins:Fs()}}}let Gc=!1;const Wc=async()=>{const e=await Ms(Qo.state.sessionId,Qo.state.userToken,Qo.state.clientId);Zc(e)},Zc=async e=>{var t;"expired"===(null==e?void 0:e.status)?Jo("processing","session-expired",`Session expired for session id: ${Qo.state.sessionId}`):(null==e?void 0:e.missing_images)&&(null===(t=null==e?void 0:e.missing_images)||void 0===t?void 0:t.length)>0&&setTimeout(Wc,3e3)},Yc=e=>{let{step:t}=e;var i,r,n;const a=null===(r=null===(i=Qo.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===r?void 0:r.enabled;let o=!1;const s=null===(n=Qo.state)||void 0===n?void 0:n.videoCaptureSettings,c=(e=>{let t,i,r=!1;const n=Ys(e),a=new qs(n),o=async()=>{r&&(await a.stopCamera(),a.stream&&a.stream.getTracks().forEach((e=>{"live"==e.readyState&&e.stop()})),r=!1)};return{videoStream:i,startVideoFeed:async e=>{var n,s,c;r&&await o(),"environment"==e&&(t=await Vs());const d=null!==(s=null===(n=null==t?void 0:t.selectedCamera)||void 0===n?void 0:n.deviceId)&&void 0!==s?s:e,u=Zs(e,null===(c=Qo.state)||void 0===c?void 0:c.videoCaptureSettings);Ks.getInstance().stopStream(),i=await a.startCamera(d,u),r=!0},stopVideoFeed:o,videoElement:a.videoElement,getDataUri:a.getDataUri,getCameraInfo:()=>t}})(Ns(t));!function(e){Ho({type:"page-load",step:e})}(t),Wc();const d=xc({step:t,setImage:u,camera:c});async function u(e){let{suspendedPreview:i=!1,frame:r,context:n}=e;r||(r=mc(c.videoElement)),"document_front"===t&&qc(!1),"document_back"===t&&Lc(!1),"selfie"===t&&Vc(!1);const a=Date.now(),u=function(e){const t=e.getCameraInfo();return{selectedCamera:(null==t?void 0:t.selectedCamera)&&{label:t.selectedCamera.label},camerasInfo:(null==t?void 0:t.optionalCameras)&&t.optionalCameras.map((e=>({label:e.label})))}}(c);if(!o)return;d.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(e=>e.toDataURL("image/jpeg"))(r);d.setPreviewImage(f,"selfie"===t),await c.stopVideoFeed(),"selfie"!==t?await h(i,f,u,a,null==n?void 0:n.stats):(d.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),d.setApprovalRetakeButtons({approveAction:async()=>{d.hideApprovalRetakeButtons(),await h(i,f,u,a,null==n?void 0:n.stats)},retakeAction:()=>{d.hideApprovalRetakeButtons(),l()}}))}function l(){"selfie"===t&&d.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),c.startVideoFeed(Ns(t)).then((()=>{o=!0,d.enableVideoElement(),a&&(d.setAutoCapturingError(null),f(t))})).catch((async e=>{throw await $c(t,e),e}))}async function h(e,i,r,n,u){const h=[];!function(e){var i,r,n,a;const o=ns.createUserActionEvent("capture_image",t,e);as(null===(i=Qo.state)||void 0===i?void 0:i.step,null===(r=Qo.state)||void 0===r?void 0:r.userToken,null===(n=Qo.state)||void 0===n?void 0:n.sessionId,null===(a=Qo.state)||void 0===a?void 0:a.clientId,o)}(u),function(e,t){Ho({type:"capture-image",imageType:t,step:e})}(t,Ls(t));try{const c=Date.now(),u=Jc(i);o=!1,h.push(Os(Qo.state.sessionId,Qo.state.userToken,Qo.state.clientId,null==u?void 0:u.image,r,Ls(t))),h.push(e?new Promise((e=>setTimeout(e,500))):Promise.resolve(null)),d.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(await Promise.all(h))[0];if(Object.prototype.hasOwnProperty.call(f,"has_barcode")&&(Gc=f.has_barcode),async function(e){let{step:t,requestStartTime:i,imageProcessingStartTime:r,serverProcessingTime:n,userToken:a,sessionId:o,clientId:s}=e;const c=Date.now()-i,d=r?i-r:0,u=ns.createUploadImageEvent(t,String(c),String(n),String(d));await as(t,a,o,s,u)}({step:t,requestStartTime:c,imageProcessingStartTime:n,serverProcessingTime:f.serverProcessingTime,userToken:Qo.state.userToken,sessionId:Qo.state.sessionId,clientId:Qo.state.clientId}),Qo.dispatch("setMissingImages",f.missing_images),d.setLoadingComplete(),function(e,t,i){Ho({type:"capture-image-result",imageType:t,feedback:i,step:e})}(t,Ls(t),f.feedback),"ok"!==f.feedback)return await async function(e){vc("border-color",fc),a?d.setAutoCapturingError(e.feedback,e.custom_feedback):d.setCapturingShowErrorMode(e.feedback,e.custom_feedback),await new Promise((e=>setTimeout(e,1e3))),vc("border-color",gc)}(f),void l();vc("border-color",pc),await new Promise((e=>setTimeout(e,750))),vc("border-color",gc),Qo.dispatch("setStep",(e=>{let t;return t=e&&e.length>0?e.shift():"processing",t})(Qo.state.missingImages))}catch(e){d.setLoadingComplete(),d.setCapturingShowErrorMode(pa.feedback.OTHER),c.startVideoFeed(Ns(t)).then((()=>{o=!0})).catch((async e=>{throw await $c(t,e),e})),$o(t,"failed-to-submit-image")}}async function f(e){if("document_front"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;ds("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:r}=e;var n,a,o,s,c,d,u;const l=new Ic(new jc,null!==(o=null===(a=null===(n=Qo.state.autoCaptureSettings.settings)||void 0===n?void 0:n.stability)||void 0===a?void 0:a.numStableFrames)&&void 0!==o?o:2),h=new Fc;for(qc(!0);l.state.name!==hc.ACCEPTED&&Uc;){const e=Date.now(),n=mc(t.videoElement),a={width:null!==(c=null===(s=t.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==c?c:0,height:null!==(u=null===(d=t.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==u?u:0},o=await l.handleFrame({frame:n,deviceInfo:a}),f=Date.now()-e+50;h.addStats(o,f),l.stats=h,await bc({context:l,onDetect:i,showError:r,frame:n}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError})}if("document_back"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;ds("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:r,hasBarcode:n}=e;var a,o,s,c,d,u,l;const h=new Ic(new Pc(n),null!==(s=null===(o=null===(a=Qo.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===o?void 0:o.numStableFrames)&&void 0!==s?s:2);Lc(!0);const f=new Fc;for(;h.state.name!==hc.ACCEPTED&&Nc;){const e=Date.now(),n=mc(t.videoElement),a={width:null!==(d=null===(c=t.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==d?d:0,height:null!==(l=null===(u=t.videoElement.getBoundingClientRect())||void 0===u?void 0:u.height)&&void 0!==l?l:0},o=await h.handleFrame({frame:n,deviceInfo:a}),s=Date.now()-e+50;f.addStats(o,s),h.stats=f,await bc({context:h,onDetect:i,showError:r,frame:n}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError,hasBarcode:Gc})}if("selfie"===e){for(;!o||c.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return c.videoElement.onloadedmetadata=()=>{var e;ds("video dimensions (width, height, orientation): ",c.videoElement.videoWidth,c.videoElement.videoHeight,null===(e=null===window||void 0===window?void 0:window.screen)||void 0===e?void 0:e.orientation)},await async function(e){let{camera:t,onDetect:i,showError:r}=e;var n,a,o,s;const c=new Ic(new Kc,30);Vc(!0);const d=new Fc;for(;c.state.name!==hc.ACCEPTED&&Hc;){const e=Date.now(),u=mc(t.videoElement),l={width:null!==(a=null===(n=t.videoElement.getBoundingClientRect())||void 0===n?void 0:n.width)&&void 0!==a?a:0,height:null!==(s=null===(o=t.videoElement.getBoundingClientRect())||void 0===o?void 0:o.height)&&void 0!==s?s:0},h=await c.handleFrame({frame:u,deviceInfo:l}),f=Date.now()-e;d.addStats(h,f),c.stats=d,await bc({context:c,onDetect:i,showError:r,frame:u,isSelfie:!0}),await new Promise((e=>setTimeout(e,50)))}}({camera:c,onDetect:u,showError:d.setAutoCapturingError})}}return a&&f(t),(async e=>{var t,i,r,n;const a=ns.createPageViewEvent(e);await as(null===(t=Qo.state)||void 0===t?void 0:t.step,null===(i=Qo.state)||void 0===i?void 0:i.userToken,null===(r=Qo.state)||void 0===r?void 0:r.sessionId,null===(n=Qo.state)||void 0===n?void 0:n.clientId,a)})(t),c.startVideoFeed(Ns(t)).then((()=>{o=!0})).catch((async e=>{throw await $c(t,e),e})),d.component},Qc=()=>{Ho({type:"start-verification-processing",step:Qo.state.step}),Vo("processing","processing",Qo.state.sessionId);const e=Xc("processing-verification");Rs(e,uc({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const t=async()=>{const e=await Ms(Qo.state.sessionId,Qo.state.userToken,Qo.state.clientId);n(e)},i=()=>{setTimeout(t,3e3)},r=async e=>{Qo.dispatch("setStep",e.status),Qo.dispatch("setStatus",e.status)},n=async e=>{var t,n;if(Qo.dispatch("setMissingImages",e.missing_images),e.status)if("complete"===(null==e?void 0:e.status)){Ks.getInstance().stopStream();const i=ns.createProcessingCompleteEvent();await as(Qo.state.step,Qo.state.userToken,null===(t=Qo.state)||void 0===t?void 0:t.sessionId,null===(n=Qo.state)||void 0===n?void 0:n.clientId,i),r(e),Vo("complete",e.status,Qo.state.sessionId),function(e,t,i){Ho({type:"verification-complete",step:e,sessionId:t,callbackUrl:i})}("complete",Qo.state.sessionId,e.callback_url),function(e){sessionStorage.removeItem(e)}(jo)}else"recapture"===(null==e?void 0:e.status)?(r(e),Qo.dispatch("setIsCapturingProcessStarted",!1),Vo("recapture",e.status,Qo.state.sessionId),function(e,t,i){Ho({type:"verification-recapture",step:e,sessionId:t,reason:i})}("recapture",e.status,e.recapture_reason)):"expired"===(null==e?void 0:e.status)?Jo("processing","session-expired",`Session expired for session id: ${Qo.state.sessionId}`):i();else"processing"!==e.state&&(r(e),i())};return t(),e},Xc=e=>Ts({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"processing-verification"});function ed(e,t){var i;if(!e)return;null===(i=t.firstChild)||void 0===i||i.remove();const r=function(e){switch(e){case"processing":return Qc;case"document_front":case"document_back":case"selfie":return Yc;default:throw new Error("Invalid step")}}(e);Rs(t,r({step:e}))}function td(e){let{key:t,state:i}=e;const r=i.rootElementId,n=document.getElementById(r);"step"===t&&"complete"!==i.step&&"recapture"!==i.step&&ed(i.step,n),n&&"processing"===i.step&&(n.style.visibility="hidden")}function id(){const e=Cs(Uo(jo));if(!Cs)throw console.log("Error restarting session, stored session data is invalid or missing"),new Error("Error restarting session, stored session data is invalid or missing");const t=e.sessionId,i=e.userToken;return Qo.dispatch("setSessionId",t),Qo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}async function rd(){var e,t;if(null===(e=Qo.state.autoCaptureSettings)||void 0===e?void 0:e.enabled){const e=Date.now();try{await od(),ds("all models loaded - auto-capture enabled")}catch(e){Qo.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(t=Qo.state.autoCaptureSettings)||void 0===t?void 0:t.settings}),ds("Model loading did not complete on time:",e);ss(`timed out loading models: ${gs.filter((e=>ps[e].status!==fs.LOADED)).map((e=>e)).join(", ")}`,"model_load_timeout","init")}const i=Object.values(ps).filter((e=>e.status===fs.LOADED)).map((e=>e.loadingStats));!async function(e,t){const i=ns.createSdkInitEvent(e,t);await cs("init",i)}(Date.now()-e,i)}}async function nd(e){var i;try{await Ks.getInstance().startNewStream({video:t(t({},Zs("environment",null===(i=Qo.state)||void 0===i?void 0:i.videoCaptureSettings)),{},{deviceId:await Ws("environment")})}),function(e,t){Ho({type:"session-id-acquired",step:e,sessionId:t})}("init",e),function(e,t,i){const r=document.getElementById(i);r.style.visibility="visible",ed(e.shift(),r)}(Qo.state.missingImages,Qo.state.sessionId,Qo.state.rootElementId)}catch(e){await $c("init",e)}}async function ad(e){let{status:t,sessionId:i,userToken:r,missingImages:n,rootElementId:a,language:o}=e;!function(e,t){Ho({type:"session-granted",step:e,sessionId:t})}("init",i),Qo.dispatch("setStatus",t),Qo.dispatch("setSessionId",i),Qo.dispatch("setUserToken",r),Qo.dispatch("setMissingImages",n),Qo.dispatch("setRootElement",a),Qo.dispatch("setLanguage",o),async function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";zs.overrideLanguage(Ps[i]||Ps.en);let r=document.getElementById(t);if(!r){r=Ts({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:t,testid:"root"});const e=document.createElement("style");e.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${t} #trigger-section {\n margin: 0 !important;\n }\n #${t} #page-header {\n height: 5% !important;\n }\n }\n `,Rs(document.head,e),Rs(document.body,r)}}(Qo.state.sessionId,Qo.state.rootElementId,Qo.state.language),function(){try{Fo.events.off(Lo,td)}catch(e){}Fo.events.on(Lo,td)}(),await rd(),await nd(i)}const od=async()=>{const e=Qo.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([ms(),new Promise(((t,i)=>setTimeout((()=>i(new Error(`Model loading timed out after ${e} ms`))),e)))])};async function sd(e){if(Qo.state.isCapturingProcessStarted)return void $o(Qo.state.step,"trying-to-initialize-active-session");let t,i;if(e){const r=await async function(e){let t,i;try{const r=await Ds(e,Qo.state.consentVersion,Qo.state.clientId);return t=r.sessionId,i=r.userToken,Qo.dispatch("setSessionId",t),Qo.dispatch("setUserToken",i),{sessionId:t,userToken:i}}catch(e){throw console.log("Error starting session"),console.error(e),e}}(e);t=r.sessionId,i=r.userToken}else{const e=id();t=e.sessionId,i=e.userToken}if(!t)return void $o(Qo.state.step,"other");const{missing_images:r,status:n}=await Ms(t,i,Qo.state.clientId);return Qo.dispatch("setIsCapturingProcessStarted",!0),await ad({status:n,sessionId:t,userToken:i,missingImages:r,rootElementId:Qo.state.rootElementId,language:Qo.state.language}),!0}async function cd(){try{return await async function(){if("recapture"===Qo.state.verificationStatus||"pending"===Qo.state.verificationStatus){const{sessionId:e,userToken:t}=id(),{missing_images:i,status:r}=await Ms(e,t,Qo.state.clientId);return await ad({status:r,sessionId:e,userToken:t,missingImages:i,rootElementId:Qo.state.rootElementId,language:Qo.state.language}),!0}$o(Qo.state.step,"trying-to-initialize-active-session")}()}catch(e){throw console.log("Error restarting session"),console.error(e),e}}var dd=Object.freeze({__proto__:null,recapture:cd,restart:async function(){return cd()},start:async function(e){try{return await sd(e)}catch(e){throw console.log("Error starting session"),console.error(e),e}},version:()=>xa});class ud{static arrayBufferToBase64(e){return btoa(String.fromCharCode(...new Uint8Array(e)))}static base64ToArrayBuffer(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}static stringToBase64(e){return btoa(e)}static jsonToBase64(e){const t=JSON.stringify(e);return btoa(t)}static base64ToJson(e){const t=atob(e);return JSON.parse(t)}}const ld={log:console.log,error:console.error};var hd,fd;!function(e){e.NotInitialized="not_initialized",e.AuthenticationFailed="authentication_failed",e.AuthenticationAbortedTimeout="authentication_aborted_timeout",e.AuthenticationCanceled="webauthn_authentication_canceled",e.RegistrationFailed="registration_failed",e.AlreadyRegistered="username_already_registered",e.RegistrationAbortedTimeout="registration_aborted_timeout",e.RegistrationCanceled="webauthn_registration_canceled",e.AutofillAuthenticationAborted="autofill_authentication_aborted",e.AuthenticationProcessAlreadyActive="authentication_process_already_active",e.InvalidApprovalData="invalid_approval_data",e.FailedToInitCrossDeviceSession="cross_device_init_failed",e.FailedToGetCrossDeviceStatus="cross_device_status_failed",e.Unknown="unknown"}(hd||(hd={}));class pd extends Error{constructor(e,t){super(e),this.errorCode=hd.NotInitialized,this.data=t}}class gd extends pd{constructor(e,t){super(null!=e?e:"WebAuthnSdk is not initialized",t),this.errorCode=hd.NotInitialized}}class md extends pd{constructor(e,t){super(null!=e?e:"Authentication failed with an error",t),this.errorCode=hd.AuthenticationFailed}}class bd extends pd{constructor(e,t){super(null!=e?e:"Authentication was canceled by the user or got timeout",t),this.errorCode=hd.AuthenticationCanceled}}class vd extends pd{constructor(e,t){super(null!=e?e:"Registration failed with an error",t),this.errorCode=hd.RegistrationFailed}}class yd extends pd{constructor(e,t){super(null!=e?e:"Registration was canceled by the user or got timeout",t),this.errorCode=hd.RegistrationCanceled}}class _d extends pd{constructor(e){super(null!=e?e:"Autofill flow was aborted"),this.errorCode=hd.AutofillAuthenticationAborted}}class wd extends pd{constructor(e){super(null!=e?e:"Operation was aborted by timeout"),this.errorCode=hd.AutofillAuthenticationAborted}}class xd extends pd{constructor(e){super(null!=e?e:"Passkey with this username is already registered with the relying party."),this.errorCode=hd.AlreadyRegistered}}class Ad extends pd{constructor(e,t){super(null!=e?e:"Authentication process is already active",t),this.errorCode=hd.AuthenticationProcessAlreadyActive}}class Ed extends pd{constructor(e,t){super(null!=e?e:"Invalid approval data",t),this.errorCode=hd.InvalidApprovalData}}class Sd extends pd{constructor(e,t){super(null!=e?e:"Failed to init cross device authentication",t),this.errorCode=hd.FailedToInitCrossDeviceSession}}class kd extends pd{constructor(e,t){super(null!=e?e:"Failed to get cross device status",t),this.errorCode=hd.FailedToGetCrossDeviceStatus}}function Md(e){return e.errorCode&&Object.values(hd).includes(e.errorCode)}!function(e){e[e.persistent=0]="persistent",e[e.session=1]="session"}(fd||(fd={}));class Cd{static get(e){return Cd.getStorageMedium(Cd.allowedKeys[e]).getItem(Cd.getStorageKey(e))||void 0}static set(e,t){return Cd.getStorageMedium(Cd.allowedKeys[e]).setItem(Cd.getStorageKey(e),t)}static remove(e){Cd.getStorageMedium(Cd.allowedKeys[e]).removeItem(Cd.getStorageKey(e))}static clear(e){for(const[t,i]of Object.entries(Cd.allowedKeys)){const r=t;e&&this.configurationKeys.includes(r)||Cd.getStorageMedium(i).removeItem(Cd.getStorageKey(r))}}static getStorageKey(e){return`WebAuthnSdk:${e}`}static getStorageMedium(e){return e===fd.session?sessionStorage:localStorage}}Cd.allowedKeys={clientId:fd.session},Cd.configurationKeys=["clientId"];class Id{static isNewApiDomain(e){return e&&(this.newApiDomains.includes(e)||e.startsWith("api.")&&e.endsWith(".transmitsecurity.io"))}static dnsPrefetch(e){const t=document.createElement("link");t.rel="dns-prefetch",t.href=e,document.head.appendChild(t)}static preconnect(e,t){const i=document.createElement("link");i.rel="preconnect",i.href=e,t&&(i.crossOrigin="anonymous"),document.head.appendChild(i)}static warmupConnection(e){this.dnsPrefetch(e),this.preconnect(e,!1),this.preconnect(e,!0)}static init(e,t){var i,r;try{this._serverPath=new URL(t.serverPath),this.isNewApiDomain(null===(i=this._serverPath)||void 0===i?void 0:i.hostname)&&this.warmupConnection(this._serverPath.origin),this._apiPaths=null!==(r=t.webauthnApiPaths)&&void 0!==r?r:this.getDefaultPaths(),this._clientId=e,Cd.set("clientId",e)}catch(e){throw new gd("Invalid options.serverPath",{error:e})}}static getDefaultPaths(){var e;const t=this.isNewApiDomain(null===(e=this._serverPath)||void 0===e?void 0:e.hostname)?"/cis":"";return{startAuthentication:`${t}/v1/auth/webauthn/authenticate/start`,startRegistration:`${t}/v1/auth/webauthn/register/start`,initCrossDeviceAuthentication:`${t}/v1/auth/webauthn/cross-device/authenticate/init`,startCrossDeviceAuthentication:`${t}/v1/auth/webauthn/cross-device/authenticate/start`,startCrossDeviceRegistration:`${t}/v1/auth/webauthn/cross-device/register/start`,getCrossDeviceTicketStatus:`${t}/v1/auth/webauthn/cross-device/status`,attachDeviceToCrossDeviceSession:`${t}/v1/auth/webauthn/cross-device/attach-device`}}static getApiPaths(){return this._apiPaths}static async sendRequest(e,t,i){ld.log(`[WebAuthn SDK] Calling ${t.method} ${e}...`);const r=new URL(this._serverPath);return r.pathname=e,i&&(r.search=i),fetch(r.toString(),t)}static async startRegistration(e){const i=await this.sendRequest(this._apiPaths.startRegistration,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t({client_id:this.getValidatedClientId(),username:e.username,display_name:e.displayName},e.timeout&&{timeout:e.timeout}),e.limitSingleCredentialToDevice&&{limit_single_credential_to_device:e.limitSingleCredentialToDevice}))});if(!(null==i?void 0:i.ok))throw new md("Failed to start registration",null==i?void 0:i.body);return await i.json()}static async startAuthentication(e){const i=await this.sendRequest(this._apiPaths.startAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t(t({client_id:this.getValidatedClientId()},e.username&&{username:e.username}),e.approvalData&&{approval_data:e.approvalData}),e.timeout&&{timeout:e.timeout}))});if(!(null==i?void 0:i.ok))throw new md("Failed to start authentication",null==i?void 0:i.body);return await i.json()}static async initCrossDeviceAuthentication(e){const i=await this.sendRequest(this._apiPaths.initCrossDeviceAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t({client_id:this.getValidatedClientId()},e.username&&{username:e.username}),e.approvalData&&{approval_data:e.approvalData}))});if(!(null==i?void 0:i.ok))throw new Sd(void 0,null==i?void 0:i.body);return await i.json()}static async getCrossDeviceTicketStatus(e){const t=await this.sendRequest(this._apiPaths.getCrossDeviceTicketStatus,{method:"GET"},`cross_device_ticket_id=${e.ticketId}`);if(!(null==t?void 0:t.ok))throw new kd(void 0,null==t?void 0:t.body);return await t.json()}static async startCrossDeviceAuthentication(e){const t=await this.sendRequest(this._apiPaths.startCrossDeviceAuthentication,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new md("Failed to start cross device authentication",null==t?void 0:t.body);return await t.json()}static async startCrossDeviceRegistration(e){const t=await this.sendRequest(this._apiPaths.startCrossDeviceRegistration,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new vd("Failed to start cross device registration",null==t?void 0:t.body);return await t.json()}static async attachDeviceToCrossDeviceSession(e){const t=await this.sendRequest(this._apiPaths.attachDeviceToCrossDeviceSession,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cross_device_ticket_id:e.ticketId})});if(!(null==t?void 0:t.ok))throw new vd("Failed to attach device to cross device session",null==t?void 0:t.body);return await t.json()}static getValidatedClientId(){var e;const t=null!==(e=this._clientId)&&void 0!==e?e:Cd.get("clientId");if(!t)throw new gd("Missing clientId");return t}}var Dd,Td,Rd,Bd;Id.newApiDomains=["api.idsec-dev.com","api.idsec-stg.com"],function(e){e.InputAutofill="input-autofill",e.Modal="modal"}(Dd||(Dd={})),function(e){e.Pending="pending",e.Scanned="scanned",e.Success="success",e.Error="error",e.Timeout="timeout",e.Aborted="aborted"}(Td||(Td={})),function(e){e.toAuthenticationError=e=>Md(e)?e:"NotAllowedError"===e.name?new bd:"OperationError"===e.name?new Ad(e.message):"SecurityError"===e.name?new md(e.message):e===hd.AuthenticationAbortedTimeout?new wd:"AbortError"===e.name||e===hd.AutofillAuthenticationAborted?new _d:new md("Something went wrong during authentication",{error:e}),e.toRegistrationError=e=>Md(e)?e:"NotAllowedError"===e.name?new yd:"SecurityError"===e.name?new vd(e.message):"InvalidStateError"===e.name?new xd:e===hd.RegistrationAbortedTimeout?new wd:new vd("Something went wrong during registration",{error:e})}(Rd||(Rd={})),function(e){e.processCredentialRequestOptions=e=>t(t({},e),{},{challenge:ud.base64ToArrayBuffer(e.challenge),allowCredentials:e.allowCredentials.map((e=>t(t({},e),{},{id:ud.base64ToArrayBuffer(e.id)})))}),e.processCredentialCreationOptions=(e,i)=>{var r;const n=JSON.parse(JSON.stringify(e));return n.challenge=ud.base64ToArrayBuffer(e.challenge),n.user.id=ud.base64ToArrayBuffer(e.user.id),(null==i?void 0:i.limitSingleCredentialToDevice)&&(n.excludeCredentials=null===(r=e.excludeCredentials)||void 0===r?void 0:r.map((e=>t(t({},e),{},{id:ud.base64ToArrayBuffer(e.id)})))),(null==i?void 0:i.registerAsDiscoverable)?(n.authenticatorSelection.residentKey="preferred",n.authenticatorSelection.requireResidentKey=!0):(n.authenticatorSelection.residentKey="discouraged",n.authenticatorSelection.requireResidentKey=!1),n.authenticatorSelection.authenticatorAttachment=(null==i?void 0:i.allowCrossPlatformAuthenticators)?void 0:"platform",n},e.encodeAuthenticationResult=e=>{const{authenticatorAttachment:t}=e,i=e.response;return{id:e.id,rawId:ud.arrayBufferToBase64(e.rawId),response:{authenticatorData:ud.arrayBufferToBase64(i.authenticatorData),clientDataJSON:ud.arrayBufferToBase64(i.clientDataJSON),signature:ud.arrayBufferToBase64(i.signature),userHandle:ud.arrayBufferToBase64(i.userHandle)},authenticatorAttachment:t,type:e.type}},e.encodeRegistrationResult=e=>{const{authenticatorAttachment:t}=e,i=e.response;return{id:e.id,rawId:ud.arrayBufferToBase64(e.rawId),response:{attestationObject:ud.arrayBufferToBase64(i.attestationObject),clientDataJSON:ud.arrayBufferToBase64(i.clientDataJSON)},authenticatorAttachment:t,type:e.type}}}(Bd||(Bd={}));class zd{async modal(e){try{const i=await this.performAuthentication(t(t({},e),{},{mediationType:Dd.Modal}));return ud.jsonToBase64(i)}catch(e){throw Rd.toAuthenticationError(e)}}activateAutofill(e,t){const{onSuccess:i,onError:r,onReady:n}=e;this.performAuthentication({username:t,mediationType:Dd.InputAutofill,onReady:n}).then((e=>{i(ud.jsonToBase64(e))})).catch((e=>{const t=Rd.toAuthenticationError(e);if(!r)throw t;r(t)}))}abortAutofill(){this.abortController&&this.abortController.abort(hd.AutofillAuthenticationAborted)}abortAuthentication(){this.abortController&&this.abortController.abort(hd.AuthenticationAbortedTimeout)}async performAuthentication(e){var t,i;const r="crossDeviceTicketId"in e?await Id.startCrossDeviceAuthentication({ticketId:e.crossDeviceTicketId}):await Id.startAuthentication({username:e.username,timeout:null===(t=e.options)||void 0===t?void 0:t.timeout}),n=r.credential_request_options,a=Bd.processCredentialRequestOptions(n),o=this.getMediatedCredentialRequest(a,e.mediationType);e.mediationType===Dd.InputAutofill&&(null===(i=e.onReady)||void 0===i||i.call(e));const s=await navigator.credentials.get(o).catch((e=>{throw Rd.toAuthenticationError(e)}));return{webauthnSessionId:r.webauthn_session_id,publicKeyCredential:Bd.encodeAuthenticationResult(s),userAgent:navigator.userAgent}}getMediatedCredentialRequest(e,t){const i={publicKey:e};return this.abortController=new AbortController,i.signal=this.abortController&&this.abortController.signal,t===Dd.InputAutofill?i.mediation="conditional":e.timeout&&setTimeout((()=>{this.abortAuthentication()}),e.timeout),i}}class Pd{constructor(e,t){this.handler=e,this.intervalInMs=t}begin(){var e;this.intervalId=window.setInterval((e=this.handler,async function(){e.isRunning||(e.isRunning=!0,await e(...arguments),e.isRunning=!1)}),this.intervalInMs)}stop(){clearInterval(this.intervalId)}}const Od=/^[A-Za-z0-9\-_.: ]*$/;function Fd(e){if(e&&(!function(e){return Object.keys(e).length<=10}(e)||!function(e){const t=e=>"string"==typeof e,i=e=>Od.test(e);return Object.keys(e).every((r=>t(r)&&t(e[r])&&i(r)&&i(e[r])))}(e)))throw ld.error("Failed validating approval data"),new Ed("Provided approval data should have 10 properties max. Also, it should contain only \n alphanumeric characters, numbers, and the special characters: '-', '_', '.'")}class Nd{constructor(e,i,r){this.authenticationHandler=e,this.registrationHandler=i,this.approvalHandler=r,this.init={registration:async e=>(this.ticketStatus=Td.Pending,this.pollCrossDeviceSession(e.crossDeviceTicketId,e.handlers)),authentication:async e=>{const{username:i}=e,r=(await Id.initCrossDeviceAuthentication(t({},i&&{username:i}))).cross_device_ticket_id;return this.ticketStatus=Td.Pending,this.pollCrossDeviceSession(r,e.handlers)},approval:async e=>{const{username:t,approvalData:i}=e;Fd(i);const r=(await Id.initCrossDeviceAuthentication({username:t,approvalData:i})).cross_device_ticket_id;return this.ticketStatus=Td.Pending,this.pollCrossDeviceSession(r,e.handlers)}},this.authenticate={modal:async e=>this.authenticationHandler.modal({crossDeviceTicketId:e})},this.approve={modal:async e=>this.approvalHandler.modal({crossDeviceTicketId:e})}}async register(e,t){return this.registrationHandler.register({crossDeviceTicketId:e},t)}async attachDevice(e){const i=await Id.attachDeviceToCrossDeviceSession({ticketId:e});return t({status:i.status,startedAt:i.started_at},i.approval_data&&{approvalData:i.approval_data})}async pollCrossDeviceSession(e,t){return this.poller=new Pd((async()=>{var i,r;const n=await Id.getCrossDeviceTicketStatus({ticketId:e}),a=n.status;if(a!==this.ticketStatus)switch(this.ticketStatus=a,a){case Td.Scanned:await t.onDeviceAttach();break;case Td.Error:case Td.Timeout:case Td.Aborted:await t.onFailure(n),null===(i=this.poller)||void 0===i||i.stop();break;case Td.Success:if("onCredentialRegister"in t)await t.onCredentialRegister();else{if(!n.session_id)throw new kd("Cross device session is complete without returning session_id",n);await t.onCredentialAuthenticate(n.session_id)}null===(r=this.poller)||void 0===r||r.stop()}}),1e3),this.poller.begin(),setTimeout((()=>{var e;null===(e=this.poller)||void 0===e||e.stop(),t.onFailure({status:Td.Timeout})}),3e5),{crossDeviceTicketId:e,stop:()=>{var e;null===(e=this.poller)||void 0===e||e.stop()}}}}class Ld{async register(e,i){this.abortController=new AbortController;const r=t({allowCrossPlatformAuthenticators:!("crossDeviceTicketId"in e),registerAsDiscoverable:!0},i);try{const t="crossDeviceTicketId"in e?await Id.startCrossDeviceRegistration({ticketId:e.crossDeviceTicketId}):await Id.startRegistration({username:e.username,displayName:(null==i?void 0:i.displayName)||e.username,timeout:null==i?void 0:i.timeout,limitSingleCredentialToDevice:null==i?void 0:i.limitSingleCredentialToDevice}),n=Bd.processCredentialCreationOptions(t.credential_creation_options,r);setTimeout((()=>{this.abortRegistration()}),n.timeout);const a=await this.registerCredential(n),o={webauthnSessionId:t.webauthn_session_id,publicKeyCredential:a,userAgent:navigator.userAgent};return ud.jsonToBase64(o)}catch(e){throw Rd.toRegistrationError(e)}}abortRegistration(){this.abortController&&this.abortController.abort(hd.RegistrationAbortedTimeout)}async registerCredential(e){const t=await navigator.credentials.create({publicKey:e,signal:this.abortController&&this.abortController.signal}).catch((e=>{throw Rd.toRegistrationError(e)}));return Bd.encodeRegistrationResult(t)}}class jd{async modal(e){try{const t=await this.performApproval(e);return ud.jsonToBase64(t)}catch(e){throw Rd.toAuthenticationError(e)}}async performApproval(e){"approvalData"in e&&Fd(e.approvalData);const t="crossDeviceTicketId"in e?await Id.startCrossDeviceAuthentication({ticketId:e.crossDeviceTicketId}):await Id.startAuthentication({username:e.username,approvalData:e.approvalData}),i=t.credential_request_options,r=Bd.processCredentialRequestOptions(i),n=await navigator.credentials.get({publicKey:r}).catch((e=>{throw Rd.toAuthenticationError(e)}));return{webauthnSessionId:t.webauthn_session_id,publicKeyCredential:Bd.encodeAuthenticationResult(n),userAgent:navigator.userAgent}}}class Ud{constructor(){this._initialized=!1,this._authenticationHandler=new zd,this._registrationHandler=new Ld,this._approvalHandler=new jd,this._crossDeviceHandler=new Nd(this._authenticationHandler,this._registrationHandler,this._approvalHandler),this.authenticate={modal:async(e,t)=>(this.initCheck(),this._authenticationHandler.modal({username:e,options:t})),autofill:{activate:(e,t)=>(this.initCheck(),this._authenticationHandler.activateAutofill(e,t)),abort:()=>this._authenticationHandler.abortAutofill()}},this.approve={modal:async(e,t)=>(this.initCheck(),this._approvalHandler.modal({username:e,approvalData:t}))},this.register=async(e,t)=>(this.initCheck(),this._registrationHandler.register({username:e},t)),this.crossDevice={init:{registration:async e=>(this.initCheck(),this._crossDeviceHandler.init.registration(e)),authentication:async e=>(this.initCheck(),this._crossDeviceHandler.init.authentication(e)),approval:async e=>(this.initCheck(),this._crossDeviceHandler.init.approval(e))},authenticate:{modal:async e=>(this.initCheck(),this._crossDeviceHandler.authenticate.modal(e))},approve:{modal:async e=>(this.initCheck(),this._crossDeviceHandler.approve.modal(e))},register:async(e,t)=>(this.initCheck(),this._crossDeviceHandler.register(e,t)),attachDevice:async e=>(this.initCheck(),this._crossDeviceHandler.attachDevice(e))},this.isPlatformAuthenticatorSupported=async()=>{var e;try{return await(null===(e=Ud.StaticPublicKeyCredential)||void 0===e?void 0:e.isUserVerifyingPlatformAuthenticatorAvailable())}catch(e){return!1}},this.isAutofillSupported=async()=>{var e,t;return!(!(null===(e=Ud.StaticPublicKeyCredential)||void 0===e?void 0:e.isConditionalMediationAvailable)||!await(null===(t=Ud.StaticPublicKeyCredential)||void 0===t?void 0:t.isConditionalMediationAvailable()))}}async init(e,t){try{if(!e)throw new gd("Invalid clientId",{clientId:e});if(t.webauthnApiPaths){const e=Id.getDefaultPaths();if(function(e,t){const i=new Set(e),r=new Set(t);return[...e.filter((e=>!r.has(e))),...t.filter((e=>!i.has(e)))]}(Object.keys(t.webauthnApiPaths),Object.keys(e)).length)throw new gd("Invalid custom paths",{customApiPaths:t.webauthnApiPaths})}Id.init(e,t),this._initialized=!0}catch(e){throw Md(e)?e:new gd("Failed to initialize SDK")}}getDefaultPaths(){return this.initCheck(),Id.getDefaultPaths()}getApiPaths(){return this.initCheck(),Id.getApiPaths()}initCheck(){if(!this._initialized)throw new gd}}Ud.StaticPublicKeyCredential=window.PublicKeyCredential;const qd=new W("webauthn"),Kd=new Ud;qd.events.on(qd.events.MODULE_INITIALIZED,(()=>{var e;const i=qd.moduleMetadata.getInitConfig();if(!(null===(e=null==i?void 0:i.webauthn)||void 0===e?void 0:e.serverPath))return;const{clientId:r,webauthn:n}=i;Kd.init(r,t({},n))}));const Hd={modal:async(e,t)=>(Kd.initCheck(),Kd.authenticate.modal(e,t)),autofill:{activate:(e,t)=>{Kd.initCheck(),Kd.authenticate.autofill.activate(e,t)},abort:()=>{Kd.initCheck(),Kd.authenticate.autofill.abort()}}},Vd={modal:async(e,t)=>(Kd.initCheck(),Kd.approve.modal(e,t))};async function $d(e,t){return Kd.initCheck(),Kd.register(e,t)}const{crossDevice:Jd}=Kd,{isPlatformAuthenticatorSupported:Gd}=Kd,{isAutofillSupported:Wd}=Kd,{getDefaultPaths:Zd}=Kd;window.localWebAuthnSDK=Kd;var Yd=Object.freeze({__proto__:null,get WebauthnCrossDeviceStatus(){return Td},approve:Vd,authenticate:Hd,crossDevice:Jd,getDefaultPaths:Zd,isAutofillSupported:Wd,isPlatformAuthenticatorSupported:Gd,register:$d});const Qd=new W("ido");var Xd,eu,tu,iu,ru;!function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(Xd||(Xd={})),function(e){e.InvalidInitOptions="invalid_initialization_options",e.NotInitialized="not_initialized",e.NoActiveJourney="no_active_journey",e.NetworkError="network_error",e.ClientResponseNotValid="client_response_not_valid",e.ServerError="server_error",e.InvalidState="invalid_state",e.InvalidCredentials="invalid_credentials",e.ExpiredOTPPasscode="expired_otp_passcode",e.ExpiredValidationPasscode="expired_validation_passcode",e.MaxResendReached="expired_otp_passcode"}(eu||(eu={})),function(e){e.ClientInput="client_input",e.Cancel="cancel",e.Fail="failure",e.Custom="custom",e.Resend="resend"}(tu||(tu={})),function(e){e.JourneySuccess="journey_success",e.ClientInputRequired="client_input_required",e.ClientInputUpdateRequired="client_input_update_required",e.JourneyRejection="journey_rejection"}(iu||(iu={})),function(e){e.Rejection="action:rejection",e.Success="action:success",e.Information="action:information",e.DebugBreak="action:debug_break",e.WaitForAnotherDevice="action:wait_for_another_device",e.CryptoBindingRegistration="action:crypto_binding_registration",e.CryptoBindingValidation="action:crypto_binding_validation",e.RegisterDeviceAction="transmit_platform_device_registration",e.ValidateDeviceAction="transmit_platform_device_validation",e.WebAuthnRegistration="action:webauthn_registration",e.DrsTriggerAction="action:drs_trigger_action",e.IdentityVerification="action:id_verification",e.EmailOTPAuthentication="transmit_platform_email_otp_authentication",e.SmsOTPAuthentication="transmit_platform_sms_otp_authentication",e.EmailValidation="transmit_platform_email_validation",e.SmsValidation="transmit_platform_sms_validation",e.TotpRegistration="transmit_platform_totp_registration",e.TransactionSigningTOTP="transmit_platform_transaction_signing_totp",e.InvokeIDP="invoke_idp",e.WebAuthnTransactionSigning="transmit_platform_transaction_signing_webauthn",e.SelectOrganization="transmit_platform_select_organization",e.MobileApproveAuthentication="transmit_platform_mobile_approve_authentication"}(ru||(ru={}));const nu=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xd.Info;this.logLevel=e}setLogLevel(e){e<Xd.Debug||e>Xd.Error?this.error("Invalid log level"):this.logLevel=e}debug(e){this.logLevel<=Xd.Debug&&console.debug(`[DEBUG] ${e}`)}info(e){this.logLevel<=Xd.Info&&console.info(`[INFO] ${e}`)}warning(e){this.logLevel<=Xd.Warning&&console.warn(`[WARNING] ${e}`)}error(e){this.logLevel<=Xd.Error&&console.error(`[ERROR] ${e}`)}},au={[ru.CryptoBindingRegistration]:"input",[ru.CryptoBindingValidation]:"input",[ru.RegisterDeviceAction]:"data",[ru.ValidateDeviceAction]:"data"},ou="api/v2/",su={path:"auth/sso"},cu={path:"auth/anonymous_invoke"},du={path:"auth/assert"},uu={path:"auth/poll"},lu={path:"auth/create_debug_token"},hu={path:"auth/key_exchange"},fu={headers:{mandatory:!0,dummy:[{type:"correlation_id",correlation_id:"337BFFE6BEE7D694B8FA41F42B00742CA537DC398F79369A3A60E04D0EB2E8E1"}]},data:{mandatory:!0,dummy:{collection_result:{metadata:{timestamp:(new Date).getTime()},content:{}},policy_request_id:"LoginWithMenu"},large_dummy:{metadata:{timestamp:1679422144431},content:{device_details:{logged_users:1,persistence_mode:"persistent",device_id:"8951bd7b67a959e7b12b5018816f9ce4",os_type:"Mac OS",os_version:"10.15.7",device_model:"Chrome 111.0.0.0"},location:{enabled:!1},capabilities:{fido2_user_verifying_platform_authenticator_available:!0,audio_acquisition_supported:!0,finger_print_supported:!1,image_acquisition_supported:!1,persistent_keys_supported:!0,face_id_key_bio_protection_supported:!1,fido_client_present:!1,fido2_client_present:!0,dyadic_present:!1,installed_plugins:[]},collector_state:{accounts:"disabled",devicedetails:"active",contacts:"disabled",owner:"disabled",software:"disabled",location:"disabled",locationcountry:"disabled",bluetooth:"disabled",externalsdkdetails:"active",hwauthenticators:"active",capabilities:"active",fidoauthenticators:"disabled",largedata:"active",localenrollments:"active",devicefingerprint:"active",apppermissions:"disabled"},local_enrollments:{}},fp2:{user_agent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",webdriver:!0,language:"en-US",color_depth:30,device_memory:8,pixel_ratio:2,hardware_concurrency:12,screen_resolution:[1680,1050],available_screen_resolution:[1680,1025],timezone_offset:240,timezone:"America/New_York",session_storage:!0,local_storage:!0,indexed_db:!0,add_behavior:!1,open_database:!0,cpu_class:"not available",platform:"MacIntel",do_not_track:"not available",plugins:[["PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Chrome PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Chromium PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["Microsoft Edge PDF Viewer","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]],["WebKit built-in PDF","Portable Document Format",[["application/pdf","pdf"],["text/pdf","pdf"]]]],canvas:["canvas winding:yes","canvas fp:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAADICAYAAACwGnoBAAAAAXNSR0IArs4c6QAAIABJREFUeF7s3XeYXVW9//H3Omdaeu+FGgiE9BDAgmIBQRRQ4eIP0JCQmdC8YgHrZRQLAooSSjIpRMpVCZciiIAiKhoIpEMoUtILKaS3KWf/nu8+e0/2nDkzc+bMmckMfNbz8Ejm7L3W2q8zwT8++/tdjlY+PLz+wAhgKHA0MBjoB/QEDq9j+6uAzcAGYDXwFvA6sMzh1of3eHjtgWHA8ZH/7Qa0q+Mfu3VfHf9sA14Flof/63B7q/fn5fY5cAefo5V/hdqeBCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQggTYh4FrbLj2844BPAh8FTg4C81xucyewBygAeuRy4uhcrwF/6sx7Tw3lwMKT6LDtNDr7T2Sxf26GvRjwAvBP4G84Z0tmNLxivIwufJ9d5Mpodb/v7zNiPY4EJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAE2rRAqwgUPbyTgC8AnwMsQG+TYz7wEPAYUGeaPQr4MPCh4BWBQTl7VFvSln4I52wrdQ4F6Dkz10QSkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkMD7SOCQBegenlV/XwpMCtqzt0nWrcDdwKygR3yjH+IU4LPBqwPWqD43w8J029IcnLMt1hgK0HODrFkkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIIH3l0D9AXppaR6lpZX+I0f/vQkGHt5w4EqgJJNprNf4GnYzgA7EcWxhPz0pyuTWjK7ZxgG6UehfW0mCchK0J6/Be18G7gCmN3ilPYER5jd4JacDnw/CdDvpPXXsPQDxOBQ2vL/IrdOAO3HOtuwPC9C3056uHDyiveHNte0rttCRXmW7c/PCSH1/F+r6LJt72ja5di8BCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCCBNidQO1CcNPNo4lU/Ak7AeTvwXAc8twbnHUdl3jhmT9qVzVN6eFZf/W3g4kzvf43tXMW/6EIBf2Ud/+YcRvAgD3E653F4ptOkve6fbOBbvEARcZ7lc3ydefyW//AHPsWZ1N1XfRlwM3Bfg6sngEWA5dZ2lHsjOtPb+wHWzN7C9C8DO3fD3Bdg4Ttw3blwZO8GV09zwb3ALUyZftyR3pbfn83L/IY/ZDNPm7vnGYbyKa6BWGI40y5/JesHmDTzMPIqLwGOwnPjgd9QVlLmzze5bAKxxEA8Z9+Y/ZpcR1nJarK5J+sN6kYJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSKApAjUD9MllZ+K8J/DcNLZ3/W/mXlBOaWmMDX2/h+duIBHry8zJ7zZmQQ+vF3B9UHXemFv5DE9QwvF+oD2L15nAMfyOt/3wvEcOqtBLeI632MEznM1G9tKP+3iCM9MG6JuAHwdV55k/hIXoM4PDzhsRoEcXOAGYAHxmG9w2tykBejjrHeNLrrvyZFa1ugB9PV1ZS1fGszJz4gyutGr7uYyluPD8IqZ+7UAGt6S/ZHLZTJx3P2Ulz/qBufPuJq+yH55rT2XeLGYUn+Z3aljfbwUwl7KSb5DNPVlvUDdKQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAJNETgYoF9+Zzeq4quAFfTfMJrSUkt/D47JZc/iuYnMnGzhYEbDw7sK+CnQOaMbUi7qzN0NVoRnM294z38zD6tyf5qz2EE5XZmTNkC/Hfi+FYJntZidkN7ICvR06/TfBX1+B788F07LqgK9eta8kmv4CBt4thVVoO8jnzP4b67mWc5nYVbSDd3kymhaC/eSaU+SiC1hRvF3KJ4+FHgN532RRGwjzvs35QXdmHPpdoqn3w+Mo6zkWLK5p6EH0ecSkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkECzCBwMFIunX+6fle25S5lRPKfWapfNOI5YYj0wFRjmH/+diC3Eeb8hlojjuespK3ma4um39NhUOOL5x88teKRy5cfWsofx9OYuXuUIOvFTTuQJVnMfb/lnmc/k1Fpnmr/Bdn7CYu7jTT7NQAbRgV9wEovYwu94iy9zNKczkASeP6+1Y99DJcfSlR8yhnbEeYxVzOYNJnIsv+YVzmAgP2AMv+Zl/swaulHA62ynH+15MhKg38h4/sMO/sVGPs3R/IfR/IUYYDXo9u7APvDPDv8Y0A74D/AOcDzwFrANOBGqW8yHAfoQ8IPh7UBfwDrap+a5Nu/rwA7ACqUtKG8PWFZrnfN/B+3PhQsLoO+L0KcSThqS/OfNjfDnRfCpkbBtF7z4Fpx0DCx8GzZuh48Ng9NtTTt9/hpgC0f564xlLOuYzT104ABv+d/Vx/xK8G104G7mMMDfc3JUEqOEi1nCIE7jDW7hQd6hJ5O5hE/xOt/lz2yiE9/jPJYxgE/yOpfzDwbzHj/lLJ7jaH++…brB0xZVAGAtqpyy+87fNf4HUyf1sNzSz83GXvYnYKXM6qTDBVhJ29tL7uzrJF+rcOC5Dy8Hq5efB1QGSkNdigBLnWXzB/zn10h7RWRj1hcaCpHOK7cB1fwKc4cvBQCWL6UDjnPuTG//1SRguT7Vqy8CqoAWMXRFBQBWRaE0X3bu9kH/avgtoVv6ndkDVJq9tRY7wErc8bOvknxFBt+/csByS787LgGqxK1PMj2AlaStg6TOvmLQv3JLv9f+FVAlbnnS6QGspO0VOXerbBaF/PoNfwNUiVttIj2AlbjNZ2+W9l2XgVXiNptJD2CZsZpEUUC/AgBLv4dkgAJmFABYZqwmURTQrwDA0u8hGaCAGQUAlhmrSRQF9CsAsPR7SAYoYEYBgGXGahJFAf0K/B9qEBa1B23aowAAAABJRU5ErkJggg==","extensions:ANGLE_instanced_arrays;EXT_blend_minmax;EXT_color_buffer_half_float;EXT_disjoint_timer_query;EXT_float_blend;EXT_frag_depth;EXT_shader_texture_lod;EXT_texture_compression_rgtc;EXT_texture_filter_anisotropic;EXT_sRGB;KHR_parallel_shader_compile;OES_element_index_uint;OES_fbo_render_mipmap;OES_standard_derivatives;OES_texture_float;OES_texture_float_linear;OES_texture_half_float;OES_texture_half_float_linear;OES_vertex_array_object;WEBGL_color_buffer_float;WEBGL_compressed_texture_s3tc;WEBGL_compressed_texture_s3tc_srgb;WEBGL_debug_renderer_info;WEBGL_debug_shaders;WEBGL_depth_texture;WEBGL_draw_buffers;WEBGL_lose_context;WEBGL_multi_draw","webgl aliased line width range:[1, 1]","webgl aliased point size range:[1, 8191]","webgl alpha bits:8","webgl antialiasing:yes","webgl blue bits:8","webgl depth bits:24","webgl green bits:8","webgl max anisotropy:16","webgl max combined texture image units:32","webgl max cube map texture size:16384","webgl max fragment uniform vectors:1024","webgl max render buffer size:16384","webgl max texture image units:16","webgl max texture size:16384","webgl max varying vectors:32","webgl max vertex attribs:16","webgl max vertex texture image units:16","webgl max vertex uniform vectors:1024","webgl max viewport dims:[16384, 16384]","webgl red bits:8","webgl renderer:WebKit WebGL","webgl shading language version:WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)","webgl stencil bits:0","webgl vendor:WebKit","webgl version:WebGL 1.0 (OpenGL ES 2.0 Chromium)","webgl unmasked vendor:Google Inc. (ATI Technologies Inc.)","webgl unmasked renderer:ANGLE (ATI Technologies Inc., AMD Radeon Pro 560X OpenGL Engine, OpenGL 4.1)","webgl vertex shader high float precision:23","webgl vertex shader high float precision rangeMin:127","webgl vertex shader high float precision rangeMax:127","webgl vertex shader medium float precision:23","webgl vertex shader medium float precision rangeMin:127","webgl vertex shader medium float precision rangeMax:127","webgl vertex shader low float precision:23","webgl vertex shader low float precision rangeMin:127","webgl vertex shader low float precision rangeMax:127","webgl fragment shader high float precision:23","webgl fragment shader high float precision rangeMin:127","webgl fragment shader high float precision rangeMax:127","webgl fragment shader medium float precision:23","webgl fragment shader medium float precision rangeMin:127","webgl fragment shader medium float precision rangeMax:127","webgl fragment shader low float precision:23","webgl fragment shader low float precision rangeMin:127","webgl fragment shader low float precision rangeMax:127","webgl vertex shader high int precision:0","webgl vertex shader high int precision rangeMin:31","webgl vertex shader high int precision rangeMax:30","webgl vertex shader medium int precision:0","webgl vertex shader medium int precision rangeMin:31","webgl vertex shader medium int precision rangeMax:30","webgl vertex shader low int precision:0","webgl vertex shader low int precision rangeMin:31","webgl vertex shader low int precision rangeMax:30","webgl fragment shader high int precision:0","webgl fragment shader high int precision rangeMin:31","webgl fragment shader high int precision rangeMax:30","webgl fragment shader medium int precision:0","webgl fragment shader medium int precision rangeMin:31","webgl fragment shader medium int precision rangeMax:30","webgl fragment shader low int precision:0","webgl fragment shader low int precision rangeMin:31","webgl fragment shader low int precision rangeMax:30"],webgl_vendor_and_renderer:"Google Inc. (ATI Technologies Inc.)~ANGLE (ATI Technologies Inc., AMD Radeon Pro 560X OpenGL Engine, OpenGL 4.1)",ad_block:!1,has_lied_languages:!1,has_lied_resolution:!1,has_lied_os:!1,has_lied_browser:!1,touch_support:[0,!1,!1],fonts:["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Comic Sans MS","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","LUCIDA GRANDE","Microsoft Sans Serif","Monaco","Palatino","Tahoma","Times","Times New Roman","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],fonts_flash:"swf object not loaded",audio:"124.04347657808103",enumerate_devices:["id=;gid=;audioinput;","id=;gid=;videoinput;","id=;gid=;audiooutput;"]}},policy_request_id:"LoginWithMenu",params:{}}},pu=[{"control_flow.0":["assertion_id","type"]}];class gu extends Error{constructor(e,t){nu.error(`[ERROR] ${e}`),super(e),this.description=e,this.errorCode=t}static convertFromAssertionError(e){switch(e){case 28:return eu.ClientResponseNotValid;case 29:case 31:case 35:return eu.InvalidCredentials;case 30:return eu.ExpiredOTPPasscode;case 32:return eu.ExpiredValidationPasscode;case 33:return eu.MaxResendReached;default:return eu.ServerError}}}var mu,bu,vu;!function(e){e.JsonRejection="Json Rejection",e.TextRejection="Text Rejection",e.UpdateAction="Update Action",e.NextAction="Next Action",e.JourneyEnd="Journey End"}(mu||(mu={})),function(e){e.Pending="pending",e.Completed="completed",e.Rejected="rejected"}(bu||(bu={})),function(e){e.Form="form",e.LoginForm="login_form",e.Rejection="rejection",e.Information="information",e.DebugBreak="debug_break",e.WaitForTicket="wait_for_ticket",e.DrsTriggerAction="transmit_acp",e.IdentityVerification="kyc",e.WebAuthnRegistration="transmit_platform_web_authn_registration"}(vu||(vu={}));var yu={},_u="6.6.1",wu={},xu={},Au={get exports(){return xu},set exports(e){xu=e}},Eu=Q(Mo);!function(e,t){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function n(e,t,i){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var a;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Eu.Buffer}catch(e){}function o(e,t){var i=e.charCodeAt(t);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function s(e,t,i){var r=o(e,i);return i-1>=t&&(r|=o(e,i-1)<<4),r}function c(e,t,i,r){for(var n=0,a=Math.min(e.length,i),o=t;o<a;o++){var s=e.charCodeAt(o)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,r):(this._parseBase(e,t,n),"le"===r&&this._initArray(this.toArray(),t,r)))},n.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},n.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,o,s=0;if("be"===r)for(n=e.length-1,a=0;n>=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n<e.length;n+=3)o=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},n.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,a=0,o=0;if("be"===i)for(r=e.length-1;r>=t;r-=2)n=s(e,t,r)<<a,this.words[o]|=67108863&n,a>=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)n=s(e,t,r)<<a,this.words[o]|=67108863&n,a>=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;this.strip()},n.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,o=a%r,s=Math.min(a,a-o)+i,d=0,u=i;u<s;u+=r)d=c(e,u,u+r,t),this.imuln(n),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(0!==o){var l=1;for(d=c(e,u,e.length,t),u=0;u<o;u++)l*=t;this.imuln(l),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,s=67108863&o,c=o/67108864|0;i.words[0]=s;for(var d=1;d<r;d++){for(var u=c>>>26,l=67108863&c,h=Math.min(d,t.length-1),f=Math.max(0,d-e.length+1);f<=h;f++){var p=d-f|0;u+=(o=(n=0|e.words[p])*(a=0|t.words[f])+l)/67108864|0,l=67108863&o}i.words[d]=0|l,c=0|u}return 0!==c?i.words[d]=0|c:i.length--,i.strip()}n.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=(16777215&(s<<n|a)).toString(16);a=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==a||o!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],f=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?g+r:d[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return i(void 0!==a),this.toArrayLike(a,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,d=new e(a),u=this.clone();if(c){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),d[s]=o;for(;s<a;s++)d[s]=0}else{for(s=0;s<a-n;s++)d[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),d[a-s-1]=o}return d},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++)this.words[r]=t.words[r]^i.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a<r.length;a++)t=(0|i.words[a])+(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;for(;0!==n&&a<i.length;a++)t=(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,o=0;o<r.length;o++)a=(t=(0|i.words[o])-(0|r.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<i.length;o++)a=(t=(0|i.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,i){var r,n,a,o=e.words,s=t.words,c=i.words,d=0,u=0|o[0],l=8191&u,h=u>>>13,f=0|o[1],p=8191&f,g=f>>>13,m=0|o[2],b=8191&m,v=m>>>13,y=0|o[3],_=8191&y,w=y>>>13,x=0|o[4],A=8191&x,E=x>>>13,S=0|o[5],k=8191&S,M=S>>>13,C=0|o[6],I=8191&C,D=C>>>13,T=0|o[7],R=8191&T,B=T>>>13,z=0|o[8],P=8191&z,O=z>>>13,F=0|o[9],N=8191&F,L=F>>>13,j=0|s[0],U=8191&j,q=j>>>13,K=0|s[1],H=8191&K,V=K>>>13,$=0|s[2],J=8191&$,G=$>>>13,W=0|s[3],Z=8191&W,Y=W>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],ie=8191&te,re=te>>>13,ne=0|s[6],ae=8191&ne,oe=ne>>>13,se=0|s[7],ce=8191&se,de=se>>>13,ue=0|s[8],le=8191&ue,he=ue>>>13,fe=0|s[9],pe=8191&fe,ge=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(d+(r=Math.imul(l,U))|0)+((8191&(n=(n=Math.imul(l,q))+Math.imul(h,U)|0))<<13)|0;d=((a=Math.imul(h,q))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,U),n=(n=Math.imul(p,q))+Math.imul(g,U)|0,a=Math.imul(g,q);var be=(d+(r=r+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(h,H)|0))<<13)|0;d=((a=a+Math.imul(h,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,U),n=(n=Math.imul(b,q))+Math.imul(v,U)|0,a=Math.imul(v,q),r=r+Math.imul(p,H)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,V)|0;var ve=(d+(r=r+Math.imul(l,J)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(h,J)|0))<<13)|0;d=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,U),n=(n=Math.imul(_,q))+Math.imul(w,U)|0,a=Math.imul(w,q),r=r+Math.imul(b,H)|0,n=(n=n+Math.imul(b,V)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,V)|0,r=r+Math.imul(p,J)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,G)|0;var ye=(d+(r=r+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(h,Z)|0))<<13)|0;d=((a=a+Math.imul(h,Y)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(A,U),n=(n=Math.imul(A,q))+Math.imul(E,U)|0,a=Math.imul(E,q),r=r+Math.imul(_,H)|0,n=(n=n+Math.imul(_,V)|0)+Math.imul(w,H)|0,a=a+Math.imul(w,V)|0,r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(g,Z)|0,a=a+Math.imul(g,Y)|0;var _e=(d+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(h,X)|0))<<13)|0;d=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(k,U),n=(n=Math.imul(k,q))+Math.imul(M,U)|0,a=Math.imul(M,q),r=r+Math.imul(A,H)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,V)|0,r=r+Math.imul(_,J)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,Y)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Y)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,ee)|0;var we=(d+(r=r+Math.imul(l,ie)|0)|0)+((8191&(n=(n=n+Math.imul(l,re)|0)+Math.imul(h,ie)|0))<<13)|0;d=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(I,U),n=(n=Math.imul(I,q))+Math.imul(D,U)|0,a=Math.imul(D,q),r=r+Math.imul(k,H)|0,n=(n=n+Math.imul(k,V)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,V)|0,r=r+Math.imul(A,J)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,G)|0,r=r+Math.imul(_,Z)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Z)|0,a=a+Math.imul(w,Y)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(g,ie)|0,a=a+Math.imul(g,re)|0;var xe=(d+(r=r+Math.imul(l,ae)|0)|0)+((8191&(n=(n=n+Math.imul(l,oe)|0)+Math.imul(h,ae)|0))<<13)|0;d=((a=a+Math.imul(h,oe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,U),n=(n=Math.imul(R,q))+Math.imul(B,U)|0,a=Math.imul(B,q),r=r+Math.imul(I,H)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(D,H)|0,a=a+Math.imul(D,V)|0,r=r+Math.imul(k,J)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,G)|0,r=r+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(p,ae)|0,n=(n=n+Math.imul(p,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0;var Ae=(d+(r=r+Math.imul(l,ce)|0)|0)+((8191&(n=(n=n+Math.imul(l,de)|0)+Math.imul(h,ce)|0))<<13)|0;d=((a=a+Math.imul(h,de)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(P,U),n=(n=Math.imul(P,q))+Math.imul(O,U)|0,a=Math.imul(O,q),r=r+Math.imul(R,H)|0,n=(n=n+Math.imul(R,V)|0)+Math.imul(B,H)|0,a=a+Math.imul(B,V)|0,r=r+Math.imul(I,J)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,G)|0,r=r+Math.imul(k,Z)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(A,X)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0,r=r+Math.imul(p,ce)|0,n=(n=n+Math.imul(p,de)|0)+Math.imul(g,ce)|0,a=a+Math.imul(g,de)|0;var Ee=(d+(r=r+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;d=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(N,U),n=(n=Math.imul(N,q))+Math.imul(L,U)|0,a=Math.imul(L,q),r=r+Math.imul(P,H)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,V)|0,r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,G)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,G)|0,r=r+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,Y)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,ee)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(A,ie)|0,n=(n=n+Math.imul(A,re)|0)+Math.imul(E,ie)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,oe)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,oe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,de)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,de)|0,r=r+Math.imul(p,le)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(g,le)|0,a=a+Math.imul(g,he)|0;var Se=(d+(r=r+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,ge)|0)+Math.imul(h,pe)|0))<<13)|0;d=((a=a+Math.imul(h,ge)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(N,H),n=(n=Math.imul(N,V))+Math.imul(L,H)|0,a=Math.imul(L,V),r=r+Math.imul(P,J)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,Y)|0)+Math.imul(B,Z)|0,a=a+Math.imul(B,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(D,X)|0,a=a+Math.imul(D,ee)|0,r=r+Math.imul(k,ie)|0,n=(n=n+Math.imul(k,re)|0)+Math.imul(M,ie)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(A,ae)|0,n=(n=n+Math.imul(A,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,de)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,de)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,he)|0;var ke=(d+(r=r+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;d=((a=a+Math.imul(g,ge)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(N,J),n=(n=Math.imul(N,G))+Math.imul(L,J)|0,a=Math.imul(L,G),r=r+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,Y)|0,r=r+Math.imul(R,X)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(B,X)|0,a=a+Math.imul(B,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(D,ie)|0,a=a+Math.imul(D,re)|0,r=r+Math.imul(k,ae)|0,n=(n=n+Math.imul(k,oe)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,r=r+Math.imul(A,ce)|0,n=(n=n+Math.imul(A,de)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,de)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,he)|0;var Me=(d+(r=r+Math.imul(b,pe)|0)|0)+((8191&(n=(n=n+Math.imul(b,ge)|0)+Math.imul(v,pe)|0))<<13)|0;d=((a=a+Math.imul(v,ge)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(N,Z),n=(n=Math.imul(N,Y))+Math.imul(L,Z)|0,a=Math.imul(L,Y),r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(R,ie)|0,n=(n=n+Math.imul(R,re)|0)+Math.imul(B,ie)|0,a=a+Math.imul(B,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,oe)|0)+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,r=r+Math.imul(k,ce)|0,n=(n=n+Math.imul(k,de)|0)+Math.imul(M,ce)|0,a=a+Math.imul(M,de)|0,r=r+Math.imul(A,le)|0,n=(n=n+Math.imul(A,he)|0)+Math.imul(E,le)|0,a=a+Math.imul(E,he)|0;var Ce=(d+(r=r+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;d=((a=a+Math.imul(w,ge)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,ee))+Math.imul(L,X)|0,a=Math.imul(L,ee),r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(O,ie)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(R,ae)|0,n=(n=n+Math.imul(R,oe)|0)+Math.imul(B,ae)|0,a=a+Math.imul(B,oe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(D,ce)|0,a=a+Math.imul(D,de)|0,r=r+Math.imul(k,le)|0,n=(n=n+Math.imul(k,he)|0)+Math.imul(M,le)|0,a=a+Math.imul(M,he)|0;var Ie=(d+(r=r+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,ge)|0)+Math.imul(E,pe)|0))<<13)|0;d=((a=a+Math.imul(E,ge)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(N,ie),n=(n=Math.imul(N,re))+Math.imul(L,ie)|0,a=Math.imul(L,re),r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,oe)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,r=r+Math.imul(R,ce)|0,n=(n=n+Math.imul(R,de)|0)+Math.imul(B,ce)|0,a=a+Math.imul(B,de)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(D,le)|0,a=a+Math.imul(D,he)|0;var De=(d+(r=r+Math.imul(k,pe)|0)|0)+((8191&(n=(n=n+Math.imul(k,ge)|0)+Math.imul(M,pe)|0))<<13)|0;d=((a=a+Math.imul(M,ge)|0)+(n>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(N,ae),n=(n=Math.imul(N,oe))+Math.imul(L,ae)|0,a=Math.imul(L,oe),r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(O,ce)|0,a=a+Math.imul(O,de)|0,r=r+Math.imul(R,le)|0,n=(n=n+Math.imul(R,he)|0)+Math.imul(B,le)|0,a=a+Math.imul(B,he)|0;var Te=(d+(r=r+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,ge)|0)+Math.imul(D,pe)|0))<<13)|0;d=((a=a+Math.imul(D,ge)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(N,ce),n=(n=Math.imul(N,de))+Math.imul(L,ce)|0,a=Math.imul(L,de),r=r+Math.imul(P,le)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(O,le)|0,a=a+Math.imul(O,he)|0;var Re=(d+(r=r+Math.imul(R,pe)|0)|0)+((8191&(n=(n=n+Math.imul(R,ge)|0)+Math.imul(B,pe)|0))<<13)|0;d=((a=a+Math.imul(B,ge)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(N,le),n=(n=Math.imul(N,he))+Math.imul(L,le)|0,a=Math.imul(L,he);var Be=(d+(r=r+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,ge)|0)+Math.imul(O,pe)|0))<<13)|0;d=((a=a+Math.imul(O,ge)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863;var ze=(d+(r=Math.imul(N,pe))|0)+((8191&(n=(n=Math.imul(N,ge))+Math.imul(L,pe)|0))<<13)|0;return d=((a=Math.imul(L,ge))+(n>>>13)|0)+(ze>>>26)|0,ze&=67108863,c[0]=me,c[1]=be,c[2]=ve,c[3]=ye,c[4]=_e,c[5]=we,c[6]=xe,c[7]=Ae,c[8]=Ee,c[9]=Se,c[10]=ke,c[11]=Me,c[12]=Ce,c[13]=Ie,c[14]=De,c[15]=Te,c[16]=Re,c[17]=Be,c[18]=ze,0!==d&&(c[19]=d,i.length++),i};function p(e,t,i){return(new g).mulp(e,t,i)}function g(e,t){this.x=e,this.y=t}Math.imul||(f=h),n.prototype.mulTo=function(e,t){var i,r=this.length+e.length;return i=10===this.length&&10===e.length?f(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a<i.length-1;a++){var o=n;n=0;for(var s=67108863&r,c=Math.min(a,t.length-1),d=Math.max(0,a-e.length+1);d<=c;d++){var u=a-d,l=(0|e.words[u])*(0|t.words[d]),h=67108863&l;s=67108863&(h=h+s|0),n+=(o=(o=o+(l/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}i.words[a]=s,r=o,o=n}return 0!==r?i.words[a]=r:i.length--,i.strip()}(this,e,t):p(this,e,t),i},g.prototype.makeRBT=function(e){for(var t=new Array(e),i=n.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,i,e);return t},g.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var r=0,n=0;n<t;n++)r|=(1&e)<<t-n-1,e>>=1;return r},g.prototype.permute=function(e,t,i,r,n,a){for(var o=0;o<a;o++)r[o]=t[e[o]],n[o]=i[e[o]]},g.prototype.transform=function(e,t,i,r,n,a){this.permute(a,e,t,i,r,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),d=Math.sin(2*Math.PI/s),u=0;u<n;u+=s)for(var l=c,h=d,f=0;f<o;f++){var p=i[u+f],g=r[u+f],m=i[u+f+o],b=r[u+f+o],v=l*m-h*b;b=l*b+h*m,m=v,i[u+f]=p+m,r[u+f]=g+b,i[u+f+o]=p-m,r[u+f+o]=g-b,f!==s&&(v=c*l-d*h,h=c*h+d*l,l=v)}},g.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=e[r];e[r]=e[i-r-1],e[i-r-1]=n,n=t[r],t[r]=-t[i-r-1],t[i-r-1]=-n}},g.prototype.normalize13b=function(e,t){for(var i=0,r=0;r<t/2;r++){var n=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+i;e[r]=67108863&n,i=n<67108864?0:n/67108864|0}return e},g.prototype.convert13b=function(e,t,r,n){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<n;++o)r[o]=0;i(0===a),i(0==(-8192&a))},g.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},g.prototype.mulp=function(e,t,i){var r=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(r),a=this.stub(r),o=new Array(r),s=new Array(r),c=new Array(r),d=new Array(r),u=new Array(r),l=new Array(r),h=i.words;h.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,d,r),this.transform(o,a,s,c,r,n),this.transform(d,a,u,l,r,n);for(var f=0;f<r;f++){var p=s[f]*u[f]-c[f]*l[f];c[f]=s[f]*l[f]+c[f]*u[f],s[f]=p}return this.conjugate(s,c,r),this.transform(s,c,h,a,r,n),this.conjugate(h,a,r),this.normalize13b(h,r),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,a=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var r=i/26|0,n=i%26;t[i]=(e.words[r]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr());if(++r<t.length)for(var a=i.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(i=i.mul(a));return i},n.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,c=(0|this.words[t])-s<<r;this.words[t]=c|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,r){var n;i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=r;if(n-=o,n=Math.max(0,n),c){for(var d=0;d<o;d++)c.words[d]=this.words[d];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,d=0;d<this.length;d++)this.words[d]=this.words[d+o];else this.words[0]=0,this.length=1;var u=0;for(d=this.length-1;d>=0&&(0!==u||d>=n);d--){var l=0|this.words[d];this.words[d]=u<<26-a|l>>>a,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,r){var n,a,o=e.length+r;this._expand(o);var s=0;for(n=0;n<e.length;n++){a=(0|this.words[n+r])+s;var c=(0|e.words[n])*t;s=((a-=67108863&c)>>26)-(c/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)s=(a=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&a;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n<this.length;n++)s=(a=-(0|this.words[n])+s)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),a=e,o=0|a.words[a.length-1];0!=(i=26-this._countBits(o))&&(a=a.ushln(i),r.iushln(i),o=0|a.words[a.length-1]);var s,c=r.length-a.length;if("mod"!==t){(s=new n(null)).length=c+1,s.words=new Array(s.length);for(var d=0;d<s.length;d++)s.words[d]=0}var u=r.clone()._ishlnsubmul(a,1,c);0===u.negative&&(r=u,s&&(s.words[c]=1));for(var l=c-1;l>=0;l--){var h=67108864*(0|r.words[a.length+l])+(0|r.words[a.length+l-1]);for(h=Math.min(h/o|0,67108863),r._ishlnsubmul(a,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(a,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},n.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},n.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new n(1),o=new n(0),s=new n(0),c=new n(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var u=r.clone(),l=t.clone();!t.isZero();){for(var h=0,f=1;0==(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(l)),a.iushrn(1),o.iushrn(1);for(var p=0,g=1;0==(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(c)):(r.isub(t),s.isub(a),c.isub(o))}return{a:s,b:c,gcd:r.iushln(d)}},n.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new n(1),s=new n(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,u=1;0==(t.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(t.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new x(e)},n.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(v,b),v.prototype.split=function(e,t){for(var i=4194303,r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&i,n=10;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(o&i)<<4|a>>>22,a=o}a>>>=22,e.words[n-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(y,b),r(_,b),r(w,b),w.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},x.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},x.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new n(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);i(!a.isZero());var s=new n(1).toRed(this),c=s.redNeg(),d=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new n(2*u*u).toRed(this);0!==this.pow(u,d).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,a),h=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),p=o;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();i(m<p);var b=this.pow(l,new n(1).iushln(p-m-1));h=h.redMul(b),l=b.redSqr(),f=f.redMul(l),p=m}return h},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=e;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],e);var a=i[0],o=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var d=t.words[r],u=c-1;u>=0;u--){var l=d>>u&1;a!==i[0]&&(a=this.sqr(a)),0!==l||0!==o?(o<<=1,o|=l,(4==++s||0===r&&0===u)&&(a=this.mul(a,i[o]),s=0,o=0)):s=0}c=26}return a},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new A(e)},r(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=i.isub(r).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Au,Z);var Su=ku;function ku(e,t){if(!e)throw new Error(t||"Assertion failed")}ku.equal=function(e,t,i){if(e!=t)throw new Error(i||"Assertion failed: "+e+" != "+t)};var Mu={};!function(e){var t=Mu;function i(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)i[r]=0|e[r];return i}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)i.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var n=e.charCodeAt(r),a=n>>8,o=255&n;a?i.push(a,o):i.push(o)}return i},t.zero2=i,t.toHex=r,t.encode=function(e,t){return"hex"===t?r(e):e}}(),function(e){var t=wu,i=xu,r=Su,n=Mu;t.assert=r,t.toArray=n.toArray,t.zero2=n.zero2,t.toHex=n.toHex,t.encode=n.encode,t.getNAF=function(e,t,i){var r,n=new Array(Math.max(e.bitLength(),i)+1);for(r=0;r<n.length;r+=1)n[r]=0;var a=1<<t+1,o=e.clone();for(r=0;r<n.length;r++){var s,c=o.andln(a-1);o.isOdd()?(s=c>(a>>1)-1?(a>>1)-c:c,o.isubn(s)):s=0,n[r]=s,o.iushrn(1)}return n},t.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r,n=0,a=0;e.cmpn(-n)>0||t.cmpn(-a)>0;){var o,s,c=e.andln(3)+n&3,d=t.andln(3)+a&3;3===c&&(c=-1),3===d&&(d=-1),o=0==(1&c)?0:3!==(r=e.andln(7)+n&7)&&5!==r||2!==d?c:-c,i[0].push(o),s=0==(1&d)?0:3!==(r=t.andln(7)+a&7)&&5!==r||2!==c?d:-d,i[1].push(s),2*n===o+1&&(n=1-n),2*a===s+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return i},t.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new i(e,"hex","le")}}();var Cu,Iu={},Du={get exports(){return Iu},set exports(e){Iu=e}},Tu=Q(Object.freeze({__proto__:null,default:{}}));function Ru(e){this.rand=e}if(Du.exports=function(e){return Cu||(Cu=new Ru(null)),Cu.generate(e)},Iu.Rand=Ru,Ru.prototype.generate=function(e){return this._rand(e)},Ru.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Ru.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?Ru.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(Ru.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Bu=Tu;if("function"!=typeof Bu.randomBytes)throw new Error("Not supported");Ru.prototype._rand=function(e){return Bu.randomBytes(e)}}catch(e){}var zu={},Pu=xu,Ou=wu,Fu=Ou.getNAF,Nu=Ou.getJSF,Lu=Ou.assert;function ju(e,t){this.type=e,this.p=new Pu(t.p,16),this.red=t.prime?Pu.red(t.prime):Pu.mont(this.p),this.zero=new Pu(0).toRed(this.red),this.one=new Pu(1).toRed(this.red),this.two=new Pu(2).toRed(this.red),this.n=t.n&&new Pu(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Uu=ju;function qu(e,t){this.curve=e,this.type=t,this.precomputed=null}ju.prototype.point=function(){throw new Error("Not implemented")},ju.prototype.validate=function(){throw new Error("Not implemented")},ju.prototype._fixedNafMul=function(e,t){Lu(e.precomputed);var i=e._getDoubles(),r=Fu(t,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var a,o,s=[];for(a=0;a<r.length;a+=i.step){o=0;for(var c=a+i.step-1;c>=a;c--)o=(o<<1)+r[c];s.push(o)}for(var d=this.jpoint(null,null,null),u=this.jpoint(null,null,null),l=n;l>0;l--){for(a=0;a<s.length;a++)(o=s[a])===l?u=u.mixedAdd(i.points[a]):o===-l&&(u=u.mixedAdd(i.points[a].neg()));d=d.add(u)}return d.toP()},ju.prototype._wnafMul=function(e,t){var i=4,r=e._getNAFPoints(i);i=r.wnd;for(var n=r.points,a=Fu(t,i,this._bitLength),o=this.jpoint(null,null,null),s=a.length-1;s>=0;s--){for(var c=0;s>=0&&0===a[s];s--)c++;if(s>=0&&c++,o=o.dblp(c),s<0)break;var d=a[s];Lu(0!==d),o="affine"===e.type?d>0?o.mixedAdd(n[d-1>>1]):o.mixedAdd(n[-d-1>>1].neg()):d>0?o.add(n[d-1>>1]):o.add(n[-d-1>>1].neg())}return"affine"===e.type?o.toP():o},ju.prototype._wnafMulAdd=function(e,t,i,r,n){var a,o,s,c=this._wnafT1,d=this._wnafT2,u=this._wnafT3,l=0;for(a=0;a<r;a++){var h=(s=t[a])._getNAFPoints(e);c[a]=h.wnd,d[a]=h.points}for(a=r-1;a>=1;a-=2){var f=a-1,p=a;if(1===c[f]&&1===c[p]){var g=[t[f],null,null,t[p]];0===t[f].y.cmp(t[p].y)?(g[1]=t[f].add(t[p]),g[2]=t[f].toJ().mixedAdd(t[p].neg())):0===t[f].y.cmp(t[p].y.redNeg())?(g[1]=t[f].toJ().mixedAdd(t[p]),g[2]=t[f].add(t[p].neg())):(g[1]=t[f].toJ().mixedAdd(t[p]),g[2]=t[f].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=Nu(i[f],i[p]);for(l=Math.max(b[0].length,l),u[f]=new Array(l),u[p]=new Array(l),o=0;o<l;o++){var v=0|b[0][o],y=0|b[1][o];u[f][o]=m[3*(v+1)+(y+1)],u[p][o]=0,d[f]=g}}else u[f]=Fu(i[f],c[f],this._bitLength),u[p]=Fu(i[p],c[p],this._bitLength),l=Math.max(u[f].length,l),l=Math.max(u[p].length,l)}var _=this.jpoint(null,null,null),w=this._wnafT4;for(a=l;a>=0;a--){for(var x=0;a>=0;){var A=!0;for(o=0;o<r;o++)w[o]=0|u[o][a],0!==w[o]&&(A=!1);if(!A)break;x++,a--}if(a>=0&&x++,_=_.dblp(x),a<0)break;for(o=0;o<r;o++){var E=w[o];0!==E&&(E>0?s=d[o][E-1>>1]:E<0&&(s=d[o][-E-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(a=0;a<r;a++)d[a]=null;return n?_:_.toP()},ju.BasePoint=qu,qu.prototype.eq=function(){throw new Error("Not implemented")},qu.prototype.validate=function(){return this.curve.validate(this)},ju.prototype.decodePoint=function(e,t){e=Ou.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?Lu(e[e.length-1]%2==0):7===e[0]&&Lu(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format")},qu.prototype.encodeCompressed=function(e){return this.encode(e,!0)},qu.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},qu.prototype.encode=function(e,t){return Ou.encode(this._encode(t),e)},qu.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},qu.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},qu.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<t;n+=e){for(var a=0;a<e;a++)r=r.dbl();i.push(r)}return{step:e,points:i}},qu.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)t[n]=t[n-1].add(r);return{wnd:e,points:t}},qu.prototype._getBeta=function(){return null},qu.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t};var Ku={},Hu={get exports(){return Ku},set exports(e){Ku=e}};"function"==typeof Object.create?Hu.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Hu.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}};var Vu=xu,$u=Ku,Ju=Uu,Gu=wu.assert;function Wu(e){Ju.call(this,"short",e),this.a=new Vu(e.a,16).toRed(this.red),this.b=new Vu(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}$u(Wu,Ju);var Zu=Wu;function Yu(e,t,i,r){Ju.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new Vu(t,16),this.y=new Vu(i,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Qu(e,t,i,r){Ju.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Vu(0)):(this.x=new Vu(t,16),this.y=new Vu(i,16),this.z=new Vu(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Wu.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new Vu(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)i=new Vu(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?i=n[0]:(i=n[1],Gu(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map((function(e){return{a:new Vu(e.a,16),b:new Vu(e.b,16)}})):this._getEndoBasis(i)}}},Wu.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:Vu.mont(e),i=new Vu(2).toRed(t).redInvm(),r=i.redNeg(),n=new Vu(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(n).fromRed(),r.redSub(n).fromRed()]},Wu.prototype._getEndoBasis=function(e){for(var t,i,r,n,a,o,s,c,d,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),f=new Vu(1),p=new Vu(0),g=new Vu(0),m=new Vu(1),b=0;0!==l.cmpn(0);){var v=h.div(l);c=h.sub(v.mul(l)),d=g.sub(v.mul(f));var y=m.sub(v.mul(p));if(!r&&c.cmp(u)<0)t=s.neg(),i=f,r=c.neg(),n=d;else if(r&&2==++b)break;s=c,h=l,l=c,g=f,f=d,m=p,p=y}a=c.neg(),o=d;var _=r.sqr().add(n.sqr());return a.sqr().add(o.sqr()).cmp(_)>=0&&(a=t,o=i),r.negative&&(r=r.neg(),n=n.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:r,b:n},{a:a,b:o}]},Wu.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),o=n.mul(i.a),s=a.mul(r.a),c=n.mul(i.b),d=a.mul(r.b);return{k1:e.sub(o).sub(s),k2:c.add(d).neg()}},Wu.prototype.pointFromX=function(e,t){(e=new Vu(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var n=r.fromRed().isOdd();return(t&&!n||!t&&n)&&(r=r.redNeg()),this.point(e,r)},Wu.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},Wu.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*a]=s,r[2*a+1]=c,n[2*a]=o.k1,n[2*a+1]=o.k2}for(var d=this._wnafMulAdd(1,r,n,2*a,i),u=0;u<2*a;u++)r[u]=null,n[u]=null;return d},$u(Yu,Ju.BasePoint),Wu.prototype.point=function(e,t,i){return new Yu(this,e,t,i)},Wu.prototype.pointFromJSON=function(e,t){return Yu.fromJSON(this,e,t)},Yu.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,r=function(e){return i.point(e.x.redMul(i.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},Yu.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Yu.fromJSON=function(e,t,i){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],i);if(!t[2])return r;function n(t){return e.point(t[0],t[1],i)}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(n))}},r},Yu.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Yu.prototype.isInfinity=function(){return this.inf},Yu.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},Yu.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},Yu.prototype.getX=function(){return this.x.fromRed()},Yu.prototype.getY=function(){return this.y.fromRed()},Yu.prototype.mul=function(e){return e=new Vu(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Yu.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},Yu.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},Yu.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Yu.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t},Yu.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},$u(Qu,Ju.BasePoint),Wu.prototype.jpoint=function(e,t,i){return new Qu(this,e,t,i)},Qu.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)},Qu.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Qu.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),s=r.redSub(n),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=s.redSqr(),u=d.redMul(s),l=r.redMul(d),h=c.redSqr().redIAdd(u).redISub(l).redISub(l),f=c.redMul(l.redISub(h)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,f,p)},Qu.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),o=i.redSub(r),s=n.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),d=c.redMul(o),u=i.redMul(c),l=s.redSqr().redIAdd(d).redISub(u).redISub(u),h=s.redMul(u.redISub(l)).redISub(n.redMul(d)),f=this.z.redMul(o);return this.curve.jpoint(l,h,f)},Qu.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var i=this;for(t=0;t<e;t++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,a=this.x,o=this.y,s=this.z,c=s.redSqr().redSqr(),d=o.redAdd(o);for(t=0;t<e;t++){var u=a.redSqr(),l=d.redSqr(),h=l.redSqr(),f=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(c)),p=a.redMul(l),g=f.redSqr().redISub(p.redAdd(p)),m=p.redISub(g),b=f.redMul(m);b=b.redIAdd(b).redISub(h);var v=d.redMul(s);t+1<e&&(c=c.redMul(h)),a=g,s=v,d=b}return this.curve.jpoint(a,d.redMul(n),s)},Qu.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Qu.prototype._zeroDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r),c=s.redSqr().redISub(o).redISub(o),d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),e=c,t=s.redMul(o.redISub(c)).redISub(d),i=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),f=this.x.redAdd(l).redSqr().redISub(u).redISub(h);f=f.redIAdd(f);var p=u.redAdd(u).redIAdd(u),g=p.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),e=g.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(m),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(e,t,i)},Qu.prototype._threeDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=s.redSqr().redISub(o).redISub(o);e=c;var d=a.redIAdd(a);d=(d=d.redIAdd(d)).redIAdd(d),t=s.redMul(o.redISub(c)).redISub(d),i=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),f=this.x.redSub(u).redMul(this.x.redAdd(u));f=f.redAdd(f).redIAdd(f);var p=h.redIAdd(h),g=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(g),i=this.y.redAdd(this.z).redSqr().redISub(l).redISub(u);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=f.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,i)},Qu.prototype._dbl=function(){var e=this.curve.a,t=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),a=t.redSqr(),o=i.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n)),c=t.redAdd(t),d=(c=c.redIAdd(c)).redMul(o),u=s.redSqr().redISub(d.redAdd(d)),l=d.redISub(u),h=o.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=s.redMul(l).redISub(h),p=i.redAdd(i).redMul(r);return this.curve.jpoint(u,f,p)},Qu.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr(),r=t.redSqr(),n=e.redAdd(e).redIAdd(e),a=n.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=n.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(c),u=t.redMul(d);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.x.redMul(s).redISub(u);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(d.redMul(c.redISub(d)).redISub(o.redMul(s)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var f=this.z.redAdd(o).redSqr().redISub(i).redISub(s);return this.curve.jpoint(l,h,f)},Qu.prototype.mul=function(e,t){return e=new Vu(e,t),this.curve._wnafMul(this,e)},Qu.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),i=e.z.redSqr();if(0!==this.x.redMul(i).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),n=i.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(r)).cmpn(0)},Qu.prototype.eqXToP=function(e){var t=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(i))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},Qu.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Qu.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Xu=xu,el=Ku,tl=Uu,il=wu;function rl(e){tl.call(this,"mont",e),this.a=new Xu(e.a,16).toRed(this.red),this.b=new Xu(e.b,16).toRed(this.red),this.i4=new Xu(4).toRed(this.red).redInvm(),this.two=new Xu(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}el(rl,tl);var nl=rl;function al(e,t,i){tl.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Xu(t,16),this.z=new Xu(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}rl.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},el(al,tl.BasePoint),rl.prototype.decodePoint=function(e,t){return this.point(il.toArray(e,t),1)},rl.prototype.point=function(e,t){return new al(this,e,t)},rl.prototype.pointFromJSON=function(e){return al.fromJSON(this,e)},al.prototype.precompute=function(){},al.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},al.fromJSON=function(e,t){return new al(e,t[0],t[1]||e.one)},al.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},al.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},al.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},al.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},al.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),o=n.redMul(r),s=t.z.redMul(a.redAdd(o).redSqr()),c=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,c)},al.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},al.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},al.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},al.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},al.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},al.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var ol=xu,sl=Ku,cl=Uu,dl=wu.assert;function ul(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,cl.call(this,"edwards",e),this.a=new ol(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new ol(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new ol(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),dl(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}sl(ul,cl);var ll=ul;function hl(e,t,i,r,n){cl.BasePoint.call(this,e,"projective"),null===t&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new ol(t,16),this.y=new ol(i,16),this.z=r?new ol(r,16):this.curve.one,this.t=n&&new ol(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}ul.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},ul.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},ul.prototype.jpoint=function(e,t,i,r){return this.point(e,t,i,r)},ul.prototype.pointFromX=function(e,t){(e=new ol(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),r=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),a=r.redMul(n.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=o.fromRed().isOdd();return(t&&!s||!t&&s)&&(o=o.redNeg()),this.point(e,o)},ul.prototype.pointFromY=function(e,t){(e=new ol(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),r=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(n.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},ul.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),i=e.y.redSqr(),r=t.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(i)));return 0===r.cmp(n)},sl(hl,cl.BasePoint),ul.prototype.pointFromJSON=function(e){return hl.fromJSON(this,e)},ul.prototype.point=function(e,t,i,r){return new hl(this,e,t,i,r)},hl.fromJSON=function(e,t){return new hl(e,t[0],t[1],t[2])},hl.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},hl.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},hl.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),o=a.redSub(i),s=r.redSub(t),c=n.redMul(o),d=a.redMul(s),u=n.redMul(s),l=o.redMul(a);return this.curve.point(c,d,l,u)},hl.prototype._projDbl=function(){var e,t,i,r,n,a,o=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var d=(r=this.curve._mulA(s)).redAdd(c);this.zOne?(e=o.redSub(s).redSub(c).redMul(d.redSub(this.curve.two)),t=d.redMul(r.redSub(c)),i=d.redSqr().redSub(d).redSub(d)):(n=this.z.redSqr(),a=d.redSub(n).redISub(n),e=o.redSub(s).redISub(c).redMul(a),t=d.redMul(r.redSub(c)),i=d.redMul(a))}else r=s.redAdd(c),n=this.curve._mulC(this.z).redSqr(),a=r.redSub(n).redSub(n),e=this.curve._mulC(o.redISub(r)).redMul(a),t=this.curve._mulC(r).redMul(s.redISub(c)),i=r.redMul(a);return this.curve.point(e,t,i)},hl.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},hl.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),o=n.redSub(r),s=n.redAdd(r),c=i.redAdd(t),d=a.redMul(o),u=s.redMul(c),l=a.redMul(c),h=o.redMul(s);return this.curve.point(d,u,h,l)},hl.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),c=n.redSub(s),d=n.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=r.redMul(c).redMul(u);return this.curve.twisted?(t=r.redMul(d).redMul(o.redSub(this.curve._mulA(a))),i=c.redMul(d)):(t=r.redMul(d).redMul(o.redSub(a)),i=this.curve._mulC(c).redMul(d)),this.curve.point(l,t,i)},hl.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},hl.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},hl.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},hl.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},hl.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},hl.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},hl.prototype.getX=function(){return this.normalize(),this.x.fromRed()},hl.prototype.getY=function(){return this.normalize(),this.y.fromRed()},hl.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},hl.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},hl.prototype.toP=hl.prototype.normalize,hl.prototype.mixedAdd=hl.prototype.add,function(e){var t=e;t.base=Uu,t.short=Zu,t.mont=nl,t.edwards=ll}(zu);var fl={},pl={},gl={},ml=Su,bl=Ku;function vl(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function yl(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function _l(e){return 1===e.length?"0"+e:e}function wl(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}gl.inherits=bl,gl.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)i.push(parseInt(e[n]+e[n+1],16))}else for(var r=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?i[r++]=a:a<2048?(i[r++]=a>>6|192,i[r++]=63&a|128):vl(e,n)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++n)),i[r++]=a>>18|240,i[r++]=a>>12&63|128,i[r++]=a>>6&63|128,i[r++]=63&a|128):(i[r++]=a>>12|224,i[r++]=a>>6&63|128,i[r++]=63&a|128)}else for(n=0;n<e.length;n++)i[n]=0|e[n];return i},gl.toHex=function(e){for(var t="",i=0;i<e.length;i++)t+=_l(e[i].toString(16));return t},gl.htonl=yl,gl.toHex32=function(e,t){for(var i="",r=0;r<e.length;r++){var n=e[r];"little"===t&&(n=yl(n)),i+=wl(n.toString(16))}return i},gl.zero2=_l,gl.zero8=wl,gl.join32=function(e,t,i,r){var n=i-t;ml(n%4==0);for(var a=new Array(n/4),o=0,s=t;o<a.length;o++,s+=4){var c;c="big"===r?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],a[o]=c>>>0}return a},gl.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r<e.length;r++,n+=4){var a=e[r];"big"===t?(i[n]=a>>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a)}return i},gl.rotr32=function(e,t){return e>>>t|e<<32-t},gl.rotl32=function(e,t){return e<<t|e>>>32-t},gl.sum32=function(e,t){return e+t>>>0},gl.sum32_3=function(e,t,i){return e+t+i>>>0},gl.sum32_4=function(e,t,i,r){return e+t+i+r>>>0},gl.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0},gl.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,o=(a<r?1:0)+i+n;e[t]=o>>>0,e[t+1]=a},gl.sum64_hi=function(e,t,i,r){return(t+r>>>0<t?1:0)+e+i>>>0},gl.sum64_lo=function(e,t,i,r){return t+r>>>0},gl.sum64_4_hi=function(e,t,i,r,n,a,o,s){var c=0,d=t;return c+=(d=d+r>>>0)<t?1:0,c+=(d=d+a>>>0)<a?1:0,e+i+n+o+(c+=(d=d+s>>>0)<s?1:0)>>>0},gl.sum64_4_lo=function(e,t,i,r,n,a,o,s){return t+r+a+s>>>0},gl.sum64_5_hi=function(e,t,i,r,n,a,o,s,c,d){var u=0,l=t;return u+=(l=l+r>>>0)<t?1:0,u+=(l=l+a>>>0)<a?1:0,u+=(l=l+s>>>0)<s?1:0,e+i+n+o+c+(u+=(l=l+d>>>0)<d?1:0)>>>0},gl.sum64_5_lo=function(e,t,i,r,n,a,o,s,c,d){return t+r+a+s+d>>>0},gl.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},gl.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},gl.shr64_hi=function(e,t,i){return e>>>i},gl.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0};var xl={},Al=gl,El=Su;function Sl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}xl.BlockHash=Sl,Sl.prototype.update=function(e,t){if(e=Al.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=Al.join32(e,0,e.length-i,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},Sl.prototype.digest=function(e){return this.update(this._pad()),El(null===this.pending),this._digest(e)},Sl.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;a<this.padLength;a++)r[n++]=0;return r};var kl={},Ml={},Cl=gl.rotr32;function Il(e,t,i){return e&t^~e&i}function Dl(e,t,i){return e&t^e&i^t&i}function Tl(e,t,i){return e^t^i}Ml.ft_1=function(e,t,i,r){return 0===e?Il(t,i,r):1===e||3===e?Tl(t,i,r):2===e?Dl(t,i,r):void 0},Ml.ch32=Il,Ml.maj32=Dl,Ml.p32=Tl,Ml.s0_256=function(e){return Cl(e,2)^Cl(e,13)^Cl(e,22)},Ml.s1_256=function(e){return Cl(e,6)^Cl(e,11)^Cl(e,25)},Ml.g0_256=function(e){return Cl(e,7)^Cl(e,18)^e>>>3},Ml.g1_256=function(e){return Cl(e,17)^Cl(e,19)^e>>>10};var Rl=gl,Bl=xl,zl=Ml,Pl=Rl.rotl32,Ol=Rl.sum32,Fl=Rl.sum32_5,Nl=zl.ft_1,Ll=Bl.BlockHash,jl=[1518500249,1859775393,2400959708,3395469782];function Ul(){if(!(this instanceof Ul))return new Ul;Ll.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Rl.inherits(Ul,Ll);var ql=Ul;Ul.blockSize=512,Ul.outSize=160,Ul.hmacStrength=80,Ul.padLength=64,Ul.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++)i[r]=e[t+r];for(;r<i.length;r++)i[r]=Pl(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);var n=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],c=this.h[4];for(r=0;r<i.length;r++){var d=~~(r/20),u=Fl(Pl(n,5),Nl(d,a,o,s),c,i[r],jl[d]);c=s,s=o,o=Pl(a,30),a=n,n=u}this.h[0]=Ol(this.h[0],n),this.h[1]=Ol(this.h[1],a),this.h[2]=Ol(this.h[2],o),this.h[3]=Ol(this.h[3],s),this.h[4]=Ol(this.h[4],c)},Ul.prototype._digest=function(e){return"hex"===e?Rl.toHex32(this.h,"big"):Rl.split32(this.h,"big")};var Kl=gl,Hl=xl,Vl=Ml,$l=Su,Jl=Kl.sum32,Gl=Kl.sum32_4,Wl=Kl.sum32_5,Zl=Vl.ch32,Yl=Vl.maj32,Ql=Vl.s0_256,Xl=Vl.s1_256,eh=Vl.g0_256,th=Vl.g1_256,ih=Hl.BlockHash,rh=[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];function nh(){if(!(this instanceof nh))return new nh;ih.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=rh,this.W=new Array(64)}Kl.inherits(nh,ih);var ah=nh;nh.blockSize=512,nh.outSize=256,nh.hmacStrength=192,nh.padLength=64,nh.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++)i[r]=e[t+r];for(;r<i.length;r++)i[r]=Gl(th(i[r-2]),i[r-7],eh(i[r-15]),i[r-16]);var n=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],c=this.h[4],d=this.h[5],u=this.h[6],l=this.h[7];for($l(this.k.length===i.length),r=0;r<i.length;r++){var h=Wl(l,Xl(c),Zl(c,d,u),this.k[r],i[r]),f=Jl(Ql(n),Yl(n,a,o));l=u,u=d,d=c,c=Jl(s,h),s=o,o=a,a=n,n=Jl(h,f)}this.h[0]=Jl(this.h[0],n),this.h[1]=Jl(this.h[1],a),this.h[2]=Jl(this.h[2],o),this.h[3]=Jl(this.h[3],s),this.h[4]=Jl(this.h[4],c),this.h[5]=Jl(this.h[5],d),this.h[6]=Jl(this.h[6],u),this.h[7]=Jl(this.h[7],l)},nh.prototype._digest=function(e){return"hex"===e?Kl.toHex32(this.h,"big"):Kl.split32(this.h,"big")};var oh=gl,sh=ah;function ch(){if(!(this instanceof ch))return new ch;sh.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}oh.inherits(ch,sh);var dh=ch;ch.blockSize=512,ch.outSize=224,ch.hmacStrength=192,ch.padLength=64,ch.prototype._digest=function(e){return"hex"===e?oh.toHex32(this.h.slice(0,7),"big"):oh.split32(this.h.slice(0,7),"big")};var uh=gl,lh=xl,hh=Su,fh=uh.rotr64_hi,ph=uh.rotr64_lo,gh=uh.shr64_hi,mh=uh.shr64_lo,bh=uh.sum64,vh=uh.sum64_hi,yh=uh.sum64_lo,_h=uh.sum64_4_hi,wh=uh.sum64_4_lo,xh=uh.sum64_5_hi,Ah=uh.sum64_5_lo,Eh=lh.BlockHash,Sh=[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];function kh(){if(!(this instanceof kh))return new kh;Eh.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Sh,this.W=new Array(160)}uh.inherits(kh,Eh);var Mh=kh;function Ch(e,t,i,r,n){var a=e&i^~e&n;return a<0&&(a+=4294967296),a}function Ih(e,t,i,r,n,a){var o=t&r^~t&a;return o<0&&(o+=4294967296),o}function Dh(e,t,i,r,n){var a=e&i^e&n^i&n;return a<0&&(a+=4294967296),a}function Th(e,t,i,r,n,a){var o=t&r^t&a^r&a;return o<0&&(o+=4294967296),o}function Rh(e,t){var i=fh(e,t,28)^fh(t,e,2)^fh(t,e,7);return i<0&&(i+=4294967296),i}function Bh(e,t){var i=ph(e,t,28)^ph(t,e,2)^ph(t,e,7);return i<0&&(i+=4294967296),i}function zh(e,t){var i=fh(e,t,14)^fh(e,t,18)^fh(t,e,9);return i<0&&(i+=4294967296),i}function Ph(e,t){var i=ph(e,t,14)^ph(e,t,18)^ph(t,e,9);return i<0&&(i+=4294967296),i}function Oh(e,t){var i=fh(e,t,1)^fh(e,t,8)^gh(e,t,7);return i<0&&(i+=4294967296),i}function Fh(e,t){var i=ph(e,t,1)^ph(e,t,8)^mh(e,t,7);return i<0&&(i+=4294967296),i}function Nh(e,t){var i=fh(e,t,19)^fh(t,e,29)^gh(e,t,6);return i<0&&(i+=4294967296),i}function Lh(e,t){var i=ph(e,t,19)^ph(t,e,29)^mh(e,t,6);return i<0&&(i+=4294967296),i}kh.blockSize=1024,kh.outSize=512,kh.hmacStrength=192,kh.padLength=128,kh.prototype._prepareBlock=function(e,t){for(var i=this.W,r=0;r<32;r++)i[r]=e[t+r];for(;r<i.length;r+=2){var n=Nh(i[r-4],i[r-3]),a=Lh(i[r-4],i[r-3]),o=i[r-14],s=i[r-13],c=Oh(i[r-30],i[r-29]),d=Fh(i[r-30],i[r-29]),u=i[r-32],l=i[r-31];i[r]=_h(n,a,o,s,c,d,u,l),i[r+1]=wh(n,a,o,s,c,d,u,l)}},kh.prototype._update=function(e,t){this._prepareBlock(e,t);var i=this.W,r=this.h[0],n=this.h[1],a=this.h[2],o=this.h[3],s=this.h[4],c=this.h[5],d=this.h[6],u=this.h[7],l=this.h[8],h=this.h[9],f=this.h[10],p=this.h[11],g=this.h[12],m=this.h[13],b=this.h[14],v=this.h[15];hh(this.k.length===i.length);for(var y=0;y<i.length;y+=2){var _=b,w=v,x=zh(l,h),A=Ph(l,h),E=Ch(l,h,f,p,g),S=Ih(l,h,f,p,g,m),k=this.k[y],M=this.k[y+1],C=i[y],I=i[y+1],D=xh(_,w,x,A,E,S,k,M,C,I),T=Ah(_,w,x,A,E,S,k,M,C,I);_=Rh(r,n),w=Bh(r,n),x=Dh(r,n,a,o,s),A=Th(r,n,a,o,s,c);var R=vh(_,w,x,A),B=yh(_,w,x,A);b=g,v=m,g=f,m=p,f=l,p=h,l=vh(d,u,D,T),h=yh(u,u,D,T),d=s,u=c,s=a,c=o,a=r,o=n,r=vh(D,T,R,B),n=yh(D,T,R,B)}bh(this.h,0,r,n),bh(this.h,2,a,o),bh(this.h,4,s,c),bh(this.h,6,d,u),bh(this.h,8,l,h),bh(this.h,10,f,p),bh(this.h,12,g,m),bh(this.h,14,b,v)},kh.prototype._digest=function(e){return"hex"===e?uh.toHex32(this.h,"big"):uh.split32(this.h,"big")};var jh=gl,Uh=Mh;function qh(){if(!(this instanceof qh))return new qh;Uh.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}jh.inherits(qh,Uh);var Kh=qh;qh.blockSize=1024,qh.outSize=384,qh.hmacStrength=192,qh.padLength=128,qh.prototype._digest=function(e){return"hex"===e?jh.toHex32(this.h.slice(0,12),"big"):jh.split32(this.h.slice(0,12),"big")},kl.sha1=ql,kl.sha224=dh,kl.sha256=ah,kl.sha384=Kh,kl.sha512=Mh;var Hh={},Vh=gl,$h=xl,Jh=Vh.rotl32,Gh=Vh.sum32,Wh=Vh.sum32_3,Zh=Vh.sum32_4,Yh=$h.BlockHash;function Qh(){if(!(this instanceof Qh))return new Qh;Yh.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Xh(e,t,i,r){return e<=15?t^i^r:e<=31?t&i|~t&r:e<=47?(t|~i)^r:e<=63?t&r|i&~r:t^(i|~r)}function ef(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function tf(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Vh.inherits(Qh,Yh),Hh.ripemd160=Qh,Qh.blockSize=512,Qh.outSize=160,Qh.hmacStrength=192,Qh.padLength=64,Qh.prototype._update=function(e,t){for(var i=this.h[0],r=this.h[1],n=this.h[2],a=this.h[3],o=this.h[4],s=i,c=r,d=n,u=a,l=o,h=0;h<80;h++){var f=Gh(Jh(Zh(i,Xh(h,r,n,a),e[rf[h]+t],ef(h)),af[h]),o);i=o,o=a,a=Jh(n,10),n=r,r=f,f=Gh(Jh(Zh(s,Xh(79-h,c,d,u),e[nf[h]+t],tf(h)),of[h]),l),s=l,l=u,u=Jh(d,10),d=c,c=f}f=Wh(this.h[1],n,u),this.h[1]=Wh(this.h[2],a,l),this.h[2]=Wh(this.h[3],o,s),this.h[3]=Wh(this.h[4],i,c),this.h[4]=Wh(this.h[0],r,d),this.h[0]=f},Qh.prototype._digest=function(e){return"hex"===e?Vh.toHex32(this.h,"little"):Vh.split32(this.h,"little")};var rf=[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],nf=[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],af=[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],of=[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],sf=gl,cf=Su;function df(e,t,i){if(!(this instanceof df))return new df(e,t,i);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(sf.toArray(t,i))}var uf,lf,hf=df;df.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),cf(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},df.prototype.update=function(e,t){return this.inner.update(e,t),this},df.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=pl;t.utils=gl,t.common=xl,t.sha=kl,t.ripemd=Hh,t.hmac=hf,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(),function(e){var t,i=fl,r=pl,n=zu,a=wu.assert;function o(e){"short"===e.type?this.curve=new n.short(e):"edwards"===e.type?this.curve=new n.edwards(e):this.curve=new n.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=lf?uf:(lf=1,uf={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}();var ff=pl,pf=Mu,gf=Su;function mf(e){if(!(this instanceof mf))return new mf(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=pf.toArray(e.entropy,e.entropyEnc||"hex"),i=pf.toArray(e.nonce,e.nonceEnc||"hex"),r=pf.toArray(e.pers,e.persEnc||"hex");gf(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r)}var bf=mf;mf.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},mf.prototype._hmac=function(){return new ff.hmac(this.hash,this.K)},mf.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},mf.prototype.reseed=function(e,t,i,r){"string"!=typeof t&&(r=i,i=t,t=null),e=pf.toArray(e,t),i=pf.toArray(i,r),gf(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},mf.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=pf.toArray(i,r||"hex"),this._update(i));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var a=n.slice(0,e);return this._update(i),this._reseed++,pf.encode(a,t)};var vf=xu,yf=wu.assert;function _f(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var wf=_f;_f.fromPublic=function(e,t,i){return t instanceof _f?t:new _f(e,{pub:t,pubEnc:i})},_f.fromPrivate=function(e,t,i){return t instanceof _f?t:new _f(e,{priv:t,privEnc:i})},_f.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},_f.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},_f.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},_f.prototype._importPrivate=function(e,t){this.priv=new vf(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},_f.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?yf(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||yf(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},_f.prototype.derive=function(e){return e.validate()||yf(e.validate(),"public point not validated"),e.mul(this.priv).getX()},_f.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},_f.prototype.verify=function(e,t,i){return this.ec.verify(e,t,this,void 0,i)},_f.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var xf=xu,Af=wu,Ef=Af.assert;function Sf(e,t){if(e instanceof Sf)return e;this._importDER(e,t)||(Ef(e.r&&e.s,"Signature without r or s"),this.r=new xf(e.r,16),this.s=new xf(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var kf=Sf;function Mf(){this.place=0}function Cf(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var n=0,a=0,o=t.place;a<r;a++,o++)n<<=8,n|=e[o],n>>>=0;return!(n<=127)&&(t.place=o,n)}function If(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t<i;)t++;return 0===t?e:e.slice(t)}function Df(e,t){if(t<128)e.push(t);else{var i=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}Sf.prototype._importDER=function(e,t){e=Af.toArray(e,t);var i=new Mf;if(48!==e[i.place++])return!1;var r=Cf(e,i);if(!1===r)return!1;if(r+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var n=Cf(e,i);if(!1===n)return!1;if(0!=(128&e[i.place]))return!1;var a=e.slice(i.place,n+i.place);if(i.place+=n,2!==e[i.place++])return!1;var o=Cf(e,i);if(!1===o)return!1;if(e.length!==o+i.place)return!1;if(0!=(128&e[i.place]))return!1;var s=e.slice(i.place,o+i.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new xf(a),this.s=new xf(s),this.recoveryParam=null,!0},Sf.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=If(t),i=If(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];Df(r,t.length),(r=r.concat(t)).push(2),Df(r,i.length);var n=r.concat(i),a=[48];return Df(a,n.length),a=a.concat(n),Af.encode(a,e)};var Tf=xu,Rf=bf,Bf=fl,zf=Iu,Pf=wu.assert,Of=wf,Ff=kf;function Nf(e){if(!(this instanceof Nf))return new Nf(e);"string"==typeof e&&(Pf(Object.prototype.hasOwnProperty.call(Bf,e),"Unknown curve "+e),e=Bf[e]),e instanceof Bf.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Lf=Nf;Nf.prototype.keyPair=function(e){return new Of(this,e)},Nf.prototype.keyFromPrivate=function(e,t){return Of.fromPrivate(this,e,t)},Nf.prototype.keyFromPublic=function(e,t){return Of.fromPublic(this,e,t)},Nf.prototype.genKeyPair=function(e){e||(e={});for(var t=new Rf({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||zf(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),r=this.n.sub(new Tf(2));;){var n=new Tf(t.generate(i));if(!(n.cmp(r)>0))return n.iaddn(1),this.keyFromPrivate(n)}},Nf.prototype._truncateToN=function(e,t,i){var r;if(Tf.isBN(e)||"number"==typeof e)r=(e=new Tf(e,16)).byteLength();else if("object"==typeof e)r=e.length,e=new Tf(e,16);else{var n=e.toString();r=n.length+1>>>1,e=new Tf(n,16)}"number"!=typeof i&&(i=8*r);var a=i-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Nf.prototype.sign=function(e,t,i,r){if("object"==typeof i&&(r=i,i=null),r||(r={}),"string"!=typeof e&&"number"!=typeof e&&!Tf.isBN(e)){Pf("object"==typeof e&&e&&"number"==typeof e.length,"Expected message to be an array-like, a hex string, or a BN instance"),Pf(e.length>>>0===e.length);for(var n=0;n<e.length;n++)Pf((255&e[n])===e[n])}t=this.keyFromPrivate(t,i),e=this._truncateToN(e,!1,r.msgBitLength),Pf(!e.isNeg(),"Can not sign a negative message");var a=this.n.byteLength(),o=t.getPrivate().toArray("be",a),s=e.toArray("be",a);Pf(new Tf(s).eq(e),"Can not sign message");for(var c=new Rf({hash:this.hash,entropy:o,nonce:s,pers:r.pers,persEnc:r.persEnc||"utf8"}),d=this.n.sub(new Tf(1)),u=0;;u++){var l=r.k?r.k(u):new Tf(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(d)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var f=h.getX(),p=f.umod(this.n);if(0!==p.cmpn(0)){var g=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var m=(h.getY().isOdd()?1:0)|(0!==f.cmp(p)?2:0);return r.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),m^=1),new Ff({r:p,s:g,recoveryParam:m})}}}}}},Nf.prototype.verify=function(e,t,i,r,n){n||(n={}),e=this._truncateToN(e,!1,n.msgBitLength),i=this.keyFromPublic(i,r);var a=(t=new Ff(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,c=o.invm(this.n),d=c.mul(e).umod(this.n),u=c.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(d,i.getPublic(),u)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(d,i.getPublic(),u)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},Nf.prototype.recoverPubKey=function(e,t,i,r){Pf((3&i)===i,"The recovery param is more than two bits"),t=new Ff(t,r);var n=this.n,a=new Tf(e),o=t.r,s=t.s,c=1&i,d=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");o=d?this.curve.pointFromX(o.add(this.curve.n),c):this.curve.pointFromX(o,c);var u=t.r.invm(n),l=n.sub(a).mul(u).umod(n),h=s.mul(u).umod(n);return this.g.mulAdd(l,o,h)},Nf.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new Ff(t,r)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(i))return n}throw new Error("Unable to find valid recovery factor")};var jf=wu,Uf=jf.assert,qf=jf.parseBytes,Kf=jf.cachedProperty;function Hf(e,t){this.eddsa=e,this._secret=qf(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=qf(t.pub)}Hf.fromPublic=function(e,t){return t instanceof Hf?t:new Hf(e,{pub:t})},Hf.fromSecret=function(e,t){return t instanceof Hf?t:new Hf(e,{secret:t})},Hf.prototype.secret=function(){return this._secret},Kf(Hf,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Kf(Hf,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Kf(Hf,"privBytes",(function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),Kf(Hf,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Kf(Hf,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Kf(Hf,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Hf.prototype.sign=function(e){return Uf(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Hf.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Hf.prototype.getSecret=function(e){return Uf(this._secret,"KeyPair is public only"),jf.encode(this.secret(),e)},Hf.prototype.getPublic=function(e){return jf.encode(this.pubBytes(),e)};var Vf=Hf,$f=xu,Jf=wu,Gf=Jf.assert,Wf=Jf.cachedProperty,Zf=Jf.parseBytes;function Yf(e,t){this.eddsa=e,"object"!=typeof t&&(t=Zf(t)),Array.isArray(t)&&(Gf(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Gf(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof $f&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Wf(Yf,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Wf(Yf,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Wf(Yf,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Wf(Yf,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Yf.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Yf.prototype.toHex=function(){return Jf.encode(this.toBytes(),"hex").toUpperCase()};var Qf=Yf,Xf=pl,ep=fl,tp=wu,ip=tp.assert,rp=tp.parseBytes,np=Vf,ap=Qf;function op(e){if(ip("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof op))return new op(e);e=ep[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Xf.sha512}var sp=op;op.prototype.sign=function(e,t){e=rp(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),o=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),s=r.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:s,Rencoded:a})},op.prototype.verify=function(e,t,i){if(e=rp(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a)},op.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return tp.intFromLE(e.digest()).umod(this.curve.n)},op.prototype.keyFromPublic=function(e){return np.fromPublic(this,e)},op.prototype.keyFromSecret=function(e){return np.fromSecret(this,e)},op.prototype.makeSignature=function(e){return e instanceof ap?e:new ap(this,e)},op.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},op.prototype.decodePoint=function(e){var t=(e=tp.parseBytes(e)).length-1,i=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),n=tp.intFromLE(i);return this.curve.pointFromY(n,r)},op.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},op.prototype.decodeInt=function(e){return tp.intFromLE(e)},op.prototype.isPoint=function(e){return e instanceof this.pointClass},function(e){var t=e;t.version=_u,t.utils=wu,t.rand=Iu,t.curve=zu,t.curves=fl,t.ec=Lf,t.eddsa=sp}(yu);var cp,dp,up={},lp={get exports(){return up},set exports(e){up=e}};
2
2
  /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
3
- !function(e,t){!function(t){function i(e){return parseInt(e)===e}function r(e){if(!i(e.length))return!1;for(var t=0;t<e.length;t++)if(!i(e[t])||e[t]<0||e[t]>255)return!1;return!0}function n(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(i(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function a(e){return new Uint8Array(e)}function o(e,t,i,r,n){null==r&&null==n||(e=e.slice?e.slice(r,n):Array.prototype.slice.call(e,r,n)),t.set(e,i)}var s,c={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i<e.length;){var r=e.charCodeAt(i++);37===r?(t.push(parseInt(e.substr(i,2),16)),i+=2):t.push(r)}return n(t)},fromBytes:function(e){for(var t=[],i=0;i<e.length;){var r=e[i];r<128?(t.push(String.fromCharCode(r)),i++):r>191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},d=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},fromBytes:function(e){for(var t=[],i=0;i<e.length;i++){var r=e[i];t.push(s[(240&r)>>4]+s[15&r])}return t.join("")}}),u={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],g=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],b=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],_=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],x=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],S=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function k(e){for(var t=[],i=0;i<e.length;i+=4)t.push(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]);return t}var M=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:n(t,!0)}),this._prepare()};M.prototype._prepare=function(){var e=u[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var i,r=4*(e+1),n=this.key.length/4,a=k(this.key);for(t=0;t<n;t++)i=t>>2,this._Ke[i][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var o,s=0,c=n;c<r;){if(o=a[n-1],a[0]^=h[o>>16&255]<<24^h[o>>8&255]<<16^h[255&o]<<8^h[o>>24&255]^l[s]<<24,s+=1,8!=n)for(t=1;t<n;t++)a[t]^=a[t-1];else{for(t=1;t<n/2;t++)a[t]^=a[t-1];o=a[n/2-1],a[n/2]^=h[255&o]^h[o>>8&255]<<8^h[o>>16&255]<<16^h[o>>24&255]<<24;for(t=n/2+1;t<n;t++)a[t]^=a[t-1]}for(t=0;t<n&&c<r;)d=c>>2,f=c%4,this._Ke[d][f]=a[t],this._Kd[e-d][f]=a[t++],c++}for(var d=1;d<e;d++)for(var f=0;f<4;f++)o=this._Kd[d][f],this._Kd[d][f]=x[o>>24&255]^A[o>>16&255]^E[o>>8&255]^S[255&o]},M.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],r=k(e),n=0;n<4;n++)r[n]^=this._Ke[0][n];for(var o=1;o<t;o++){for(n=0;n<4;n++)i[n]=p[r[n]>>24&255]^g[r[(n+1)%4]>>16&255]^m[r[(n+2)%4]>>8&255]^b[255&r[(n+3)%4]]^this._Ke[o][n];r=i.slice()}var s,c=a(16);for(n=0;n<4;n++)s=this._Ke[t][n],c[4*n]=255&(h[r[n]>>24&255]^s>>24),c[4*n+1]=255&(h[r[(n+1)%4]>>16&255]^s>>16),c[4*n+2]=255&(h[r[(n+2)%4]>>8&255]^s>>8),c[4*n+3]=255&(h[255&r[(n+3)%4]]^s);return c},M.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],r=k(e),n=0;n<4;n++)r[n]^=this._Kd[0][n];for(var o=1;o<t;o++){for(n=0;n<4;n++)i[n]=v[r[n]>>24&255]^y[r[(n+3)%4]>>16&255]^_[r[(n+2)%4]>>8&255]^w[255&r[(n+1)%4]]^this._Kd[o][n];r=i.slice()}var s,c=a(16);for(n=0;n<4;n++)s=this._Kd[t][n],c[4*n]=255&(f[r[n]>>24&255]^s>>24),c[4*n+1]=255&(f[r[(n+3)%4]>>16&255]^s>>16),c[4*n+2]=255&(f[r[(n+2)%4]>>8&255]^s>>8),c[4*n+3]=255&(f[255&r[(n+1)%4]]^s);return c};var C=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new M(t)};C.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16)o(e,i,0,r,r+16),o(i=this._aes.encrypt(i),t,r);return t},C.prototype.decrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16)o(e,i,0,r,r+16),o(i=this._aes.decrypt(i),t,r);return t};var I=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else i=a(16);this._lastCipherblock=n(i,!0),this._aes=new M(t)};I.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16){o(e,i,0,r,r+16);for(var s=0;s<16;s++)i[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(i),o(this._lastCipherblock,t,r)}return t},I.prototype.decrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16){o(e,i,0,r,r+16),i=this._aes.decrypt(i);for(var s=0;s<16;s++)t[r+s]=i[s]^this._lastCipherblock[s];o(e,this._lastCipherblock,0,r,r+16)}return t};var D=function e(t,i,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 size)")}else i=a(16);r||(r=1),this.segmentSize=r,this._shiftRegister=n(i,!0),this._aes=new M(t)};D.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,i=n(e,!0),r=0;r<i.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)i[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(i,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return i},D.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,i=n(e,!0),r=0;r<i.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)i[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(e,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return i};var T=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else i=a(16);this._lastPrecipher=n(i,!0),this._lastPrecipherIndex=16,this._aes=new M(t)};T.prototype.encrypt=function(e){for(var t=n(e,!0),i=0;i<t.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},T.prototype.decrypt=T.prototype.encrypt;var R=function e(t){if(!(this instanceof e))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=a(16),this.setValue(t)):this.setBytes(t)};R.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},R.prototype.setBytes=function(e){if(16!=(e=n(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},R.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var z=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",i instanceof R||(i=new R(i)),this._counter=i,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new M(t)};z.prototype.encrypt=function(e){for(var t=n(e,!0),i=0;i<t.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[i]^=this._remainingCounter[this._remainingCounterIndex++];return t},z.prototype.decrypt=z.prototype.encrypt;var B={AES:M,Counter:R,ModeOfOperation:{ecb:C,cbc:I,cfb:D,ofb:T,ctr:z},utils:{hex:d,utf8:c},padding:{pkcs7:{pad:function(e){var t=16-(e=n(e,!0)).length%16,i=a(e.length+t);o(e,i);for(var r=e.length;r<i.length;r++)i[r]=t;return i},strip:function(e){if((e=n(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,r=0;r<t;r++)if(e[i+r]!==t)throw new Error("PKCS#7 invalid padding byte");var s=a(i);return o(e,s,0,0,i),s}}},_arrayTest:{coerceArray:n,createArray:a,copyArray:o}};e.exports=B}()}(up);class lp{getExchangeRequestHeader(){if(!this.kp){const e={entropy:this.generateRandomHexString(192),entropyEnc:"hex"};this.kp=this.ec.genKeyPair(e)}return{type:"key_exchange",scheme:3,y:this.jsArrayToBase64(this.kp.getPublic().encode("array",!1))}}async processExchangeResponseHeader(e){if(e.scheme!=this.scheme)throw"Unsupported crypto scheme "+e.scheme;this.sessionId=e.crypto_session_id;const t=this.kp.derive(this.ec.keyFromPublic(atob(e.y)).getPublic()).toArray("be",32),i=new Uint8Array(t),r=await crypto.subtle.digest("SHA-256",i);this.aesKey=Array.from(new Uint8Array(r))}isReady(){return!(!this.aesKey||!this.sessionId)}decryptResponse(e){let t=null;if(e.headers.forEach((function(e){"encryption"==e.type&&(t=e)})),t){const i=this.base64ToJsArray(t.iv),r=new dp.ModeOfOperation.cbc(this.aesKey,i),n=this.base64ToJsArray(e.data),a=r.decrypt(n);let o=dp.utils.utf8.fromBytes(a);o=this.pkcs7Unpad(o),e.data=JSON.parse(o)}return e}encryptRequest(e){const t=this.generateRandomHexString(32),i=dp.utils.hex.toBytes(t),r={type:"encryption",iv:this.hexToBase64(t),crypto_session_id:this.sessionId},n=e.headers.map((e=>this.encryptStringToBase64(JSON.stringify(e),i))),a=JSON.stringify(e.data),o=this.encryptStringToBase64(a,i);e.headers=[r],e.enc_headers=n,e.data=o}encryptStringToBase64(e,t){const i=new dp.ModeOfOperation.cbc(this.aesKey,t),r=dp.utils.utf8.toBytes(e),n=this.pkcs7Pad(r),a=[...i.encrypt(n)];return this.jsArrayToBase64(a)}toJson(){return{scheme:3,session_id:this.sessionId,key:this.jsArrayToBase64(this.aesKey)}}static fromJson(e){return new lp(e)}jsArrayToBase64(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return btoa(t)}base64ToJsArray(e){const t=atob(e),i=[];for(let e=0;e<t.length;e++)i.push(t.charCodeAt(e));return i}pkcs7Pad(e){const t=16-e.length%16,i=new Uint8Array(e.length+t);i.set(e,0);for(let r=0;r<t;r++)i[e.length+r]=t;return i}pkcs7Unpad(e){try{const t=e.charCodeAt(e.length-1);if(t<1||t>16)throw new mp(`Invalid padding length: ${t}`);if(e.length<t)throw new mp("Input string shorter than padding length");for(let i=1;i<=t;i++){if(e.charCodeAt(e.length-i)!==t)throw new mp("Invalid padding values")}return e.slice(0,-t)}catch(e){if(e instanceof mp)throw e;throw new mp(`Failed to unpad data: ${e instanceof Error?e.message:String(e)}`)}}constructor(e){if(this.scheme=3,this.ecCurveName="p256",this.ec=new vu.ec(this.ecCurveName),e&&(this.sessionId=e.session_id,this.aesKey=this.base64ToJsArray(e.key),!this.isReady()))throw new Error("Internal: Can't deserialize crypto session")}generateRandomHexString(e){const t=new Uint8Array(e);crypto.getRandomValues(t);let i="";const r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];for(let e=0;e<t.length;e++){i+=r[15&t[e]]}return i}hexToBase64(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";let i=0,r=0,n="";for(let a=0;a<e.length;a++)if(i=(i<<4)+parseInt(e[a],16),r+=4,r>=6){n+=t[i>>r-6],r-=6,i&=255>>8-r}if(r){n+=t[i<<6-r]}for(;n.length%4;)n+="=";return n}}class hp{constructor(e,t){this.encrypted=e,this.cryptoSession=t}isReady(){var e;return(null===(e=this.cryptoSession)||void 0===e?void 0:e.isReady())||!1}async exchangeKeyAndEncryptRequest(e,t,i,r,n,a){if(!t.isReady()){const i=["aid","clientId"],n=new URLSearchParams(Array.from(r.searchParams.entries()).filter((e=>{let[t,r]=e;return i.includes(t)})));await t.performKeyExchange(e,n)}return t.promisePossiblyEncryptedTransportRequest(new gp(i,r,n.data,n.headers,a))}async performKeyExchange(e,i){const r={r:"Hello Encrypted World"},n=new URL(e+lu.path+"?"+i.toString()),a=new gp("POST",n,r,[],{"Content-Type":"application/json"}),o=this.promisePossiblyEncryptedTransportRequest(a);let s;const c=await fetch(o.url.toString(),{body:JSON.stringify(null==o?void 0:o.body),method:"POST",headers:o.headers,credentials:"include"});if(!c.ok)throw new Error("Request failed");let d;s=t(t({data:await c.json()},c),{},{headers:c.headers});try{d=s.data}catch(e){throw new Error(`Unsupported resposne format: ${e}`)}await this.postprocessResponse(d),d=this.possiblyDecryptResponse(d);const u=d.data;if(JSON.stringify(u)!==JSON.stringify(r))throw new Error("Key exchange failed");return Promise.resolve()}async postprocessResponse(e){var t;if(e.headers){const i=e.headers.find((e=>"key_exchange"==e.type));if(i)return null===(t=this.cryptoSession)||void 0===t?void 0:t.processExchangeResponseHeader(i)}}promisePossiblyEncryptedTransportRequest(e){const t={headers:e.envelopeHeaders,data:e.body};return this.encryptEnvelopedMessageIfNeeded(t),new fp(e.url.toString(),e.method,t,void 0,e.httpHeaders)}possiblyDecryptResponse(e){return this.cryptoSession&&(e=this.cryptoSession.decryptResponse(e)),e}encryptEnvelopedMessageIfNeeded(e){var t;const i=this.generateKeyExchangeHeaderIfNeeded();(null===(t=this.cryptoSession)||void 0===t?void 0:t.isReady())&&this.cryptoSession.encryptRequest(e),i&&e.headers.push(i)}generateKeyExchangeHeaderIfNeeded(){return this.encrypted&&!this.cryptoSession?(this.cryptoSession=new lp,this.cryptoSession.getExchangeRequestHeader()):null}}class fp{constructor(e,t,i,r,n){this.url=e,this.httpMethod=t,this.body=i,this.params=r,this.headers=n}}class pp{addEnvelopeHeader(e){this._envelopeHeaders.push(e)}get method(){return this._requestMethod}get url(){return this._url}get body(){return this._requestBody}get envelopeHeaders(){return this._envelopeHeaders}get httpHeaders(){return this._httpHeaders}constructor(e,t,i,r,n){if(!t||!i)throw new Error("Internal - Invalid arguments for constructing session message");this._requestMethod=e,this._url=t,this._requestBody=i,this._envelopeHeaders=r||[],this._httpHeaders=n}}class gp extends pp{static from(e,t,i,r){return new gp(e,t,i.data,i.headers,r)}}class mp extends Error{constructor(e){super(e),this.name="PaddingError",Object.setPrototypeOf(this,mp.prototype)}}class bp{constructor(e){this.urlBaseString=e+"/"+au}convertHttpResponseToRawServiceResponse(e){const{status:t,statusText:i,body:r}=e;return this.rawFrom(t,i,r)}rawFrom(e,t,i){const{error_code:r,error_message:n,headers:a,data:o}=i;return{status:e,statusText:t,error_code:r,error_message:n,headers:a,data:this.buildAggregatedData(o)}}buildAggregatedData(e){switch(null==e?void 0:e.state){case mu.Pending:fu.forEach((i=>{const[[r,n]]=Object.entries(i),a=((e,t,i)=>{if(!e||"object"!=typeof e)return i;const r=Array.isArray(t)?t:t.split(".");let n=e;for(let e=0;e<r.length;e++)if(n=n[r[e]],void 0===n)return i;return n})(e,r);if(a){const i={};n.forEach((e=>{e in a&&(i[e]=a[e])})),e=t(t({},e),i)}}));break;case mu.Rejected:e.type=bu.Rejection}return e}async sendRequest(e,i,r,n){if(!(this.urlBaseString.toString().length>au.length&&e))throw new Error("bad input");const a=new URL(this.urlBaseString);a.pathname+=e,ru.debug(`Got Full URL: ${a.toString()}`),Object.keys(i).map((e=>a.searchParams.append(e,i[e]))),ru.debug(`Request body: ${r}`);let o=new fp(a.toString(),"POST",r,a.searchParams,{"Content-type":"application/json;charset=UTF-8"});try{n.encrypted&&(o=await n.exchangeKeyAndEncryptRequest(this.urlBaseString,n,o.httpMethod,new URL(o.url),o.body,o.headers));const e=await fetch(o.url.toString(),{body:JSON.stringify(o.body),method:"POST",headers:o.headers,credentials:"include"});let i;const r=await e.json();if(n.encrypted){const e=r;n.postprocessResponse(e),i=n.possiblyDecryptResponse(e)}else i=r;return this.convertHttpResponseToRawServiceResponse(t(t({},e),{},{body:i}))}catch(e){throw new pu("Error occurred while retrieving response from server",Xd.NetworkError)}}}!function(e){e.Active="Active",e.Success="Journey Ended with Success",e.Rejected="Journey Ended with Rejection",e.Aborted="Journey aborted by client"}(sp||(sp={})),function(e){e.ClientSdk="Client SDK Journey",e.SSO="SSO Journey"}(cp||(cp={}));class vp extends hp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;super(r,n),this.journeyType=e,this.sdkData=t,this.additionalParams=i,this.encrypted=r,this.cryptoSession=n,this.state=sp.Active}getQueryParams(){let e={};return this.deviceId&&(e.did=this.deviceId),this.sessionId&&(e.sid=this.sessionId),e}getInternalHeaders(){const e=[];return this.userId&&e.push({type:"uid",uid:this.userId}),e}toJson(){var e;return{journeyType:this.journeyType,challenge:this.challenge,assertionId:this.assertionId,userId:this.userId,sessionId:this.sessionId,deviceId:this.deviceId,actionType:this.actionType,additionalParams:this.additionalParams,sdkData:this.sdkData,encrypted:this.encrypted,cryptoSession:null===(e=this.cryptoSession)||void 0===e?void 0:e.toJson()}}getInvocationData(){const e=hu.data.dummy;return this.additionalParams&&Object.keys(this.additionalParams).length>0&&(e.params=this.additionalParams),this.sdkData&&Object.keys(this.sdkData).length>0&&(e.sdk_data=this.sdkData),e}complete(){if(this.isCompletedState())throw Error(`Cannot complete an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=sp.Success,this.cryptoSession=void 0}reject(){if(this.isCompletedState())throw Error(`Cannot reject an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=sp.Rejected,this.cryptoSession=void 0}abort(){if(this.isCompletedState())throw Error(`Cannot abort an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=sp.Aborted,this.cryptoSession=void 0}active(){if(this.isCompletedState())throw Error(`Cannot run a completed journey. Current state: ${this.state.toString()}`);this.state=sp.Active}isCompletedState(){return this.state===sp.Success||this.state===sp.Rejected||this.state===sp.Aborted}}class yp extends vp{constructor(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;if(super(cp.ClientSdk,t,i,r,n),this.journeyId=e,!this.journeyId)throw Error("Journey ID must be provided")}getInvocationData(){const e=super.getInvocationData();return e.policy_request_id=this.journeyId,e}getInvocationPath(){return su.path}toJson(){return t(t({},super.toJson()),{},{journeyId:this.journeyId})}}class _p extends vp{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;super(cp.SSO,t,{},i,r),this.interactionId=e}getInvocationPath(){return ou.path}getQueryParams(){return t(t({},super.getQueryParams()),{},{ssoInteractionId:this.interactionId})}toJson(){return t(t({},super.toJson()),{},{interactionId:this.interactionId})}}const wp=["assertion_id","type","escapes","form_id","vendor_name"],xp=[...wp,"challenge","assertion_error_code","assertion_error_message","assertions_complete","state","control_flow","rejection_data"],Ap={[eu.Cancel]:eu.Cancel,[eu.Fail]:eu.Fail},Ep=["data"],Sp=["json_data"];class kp{constructor(e){var t,i,r;this.rawResponse=e;const[{escapes:n,form_id:a}]=null!==(i=null===(t=e.data)||void 0===t?void 0:t.control_flow)&&void 0!==i?i:[{}];this.escapes=n,this.data=null!==(r=e.data)&&void 0!==r?r:{},this.formId=a}generateServiceResponse(e,i){var r,n;const a=this.getType(),o=this.getJourneyStepId(e);return t(t({type:a,journeyStepId:o,errorData:this.getErrorData(),data:this.getData(o),clientResponseOptions:this.getClientResponseActions()},i),{},{redirectUrl:null===(n=null===(r=this.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.url})}getActionType(){return this.data.type}getChallenge(){return this.data.challenge}getAssertionId(){return this.data.assertion_id}getJourneyState(){var e,t,i;let r;if((null===(e=this.rawResponse)||void 0===e?void 0:e.status)>=400)r=gu.TextRejection;else switch(this.data.state){case mu.Completed:r=gu.JourneyEnd;break;case mu.Rejected:r=gu.JsonRejection;break;case mu.Pending:r=(null===(i=null===(t=this.rawResponse)||void 0===t?void 0:t.data)||void 0===i?void 0:i.control_flow)?gu.NextAction:gu.UpdateAction;break;default:r=gu.JsonRejection}return r}getType(){let e=tu.JourneyRejection;return this.data.assertions_complete?e=tu.JourneySuccess:this.data.state===mu.Pending?e=tu.ClientInputRequired:16==this.data.assertion_error_code?e=tu.ClientInputUpdateRequired:4001===this.rawResponse.error_code&&(e=tu.JourneyRejection),e}getData(e){var i,r;const[a]=null!==(i=this.data.control_flow)&&void 0!==i?i:[{}],o=null!==(r=this.data)&&void 0!==r?r:{},{data:s}=o,c=n(o,Ep),d=null!=s?s:{},{json_data:u}=d,l=n(d,Sp);return this.removeFields(a,wp),this.data=t(t(t(t(t({},c),a),u&&{json_data:u}),Object.keys(l).length&&{data:l}),this.rejectionReason&&{rejectionReason:this.rejectionReason}),this.removeFields(this.data,xp),this.manipulateDataForJourneyStep(e),this.data}manipulateDataForJourneyStep(e){e===iu.InvokeIDP&&(this.data.authorization_url=this.generateAuthorizationUrlFromResponseData(this.data),delete this.data.authorization_parameters,delete this.data.authorization_endpoint)}generateAuthorizationUrlFromResponseData(e){const{authorization_endpoint:t,authorization_parameters:i}=e,r=Object.keys(i).map((e=>{const t=i[e]instanceof Object?JSON.stringify(i[e]):i[e];return`${e}=${encodeURIComponent(t)}`})).join("&"),n=new URL(t);return n.search=r,n}getErrorData(){if(this.data.assertion_error_code&&0!=this.data.assertion_error_code){const e=pu.convertFromAssertionError(this.data.assertion_error_code);return new pu(this.data.assertion_error_message,e)}}removeFields(e,t){for(const i of t)i in e&&delete e[i]}getJourneyStepId(e){const t=this.getType();if(t===tu.JourneyRejection)return this.rejectionReason=this.rawResponse.error_message,iu.Rejection;if(t===tu.JourneySuccess)return iu.Success;switch(e){case bu.Form:case bu.LoginForm:return this.formIdToStepId()||this.formId||e;case bu.Information:return iu.Information;case bu.DebugBreak:return iu.DebugBreak;case bu.WaitForTicket:return iu.WaitForAnotherDevice;case bu.Rejection:return iu.Rejection;case bu.DrsTriggerAction:return iu.DrsTriggerAction;case bu.IdentityVerification:return iu.IdentityVerification;case bu.WebAuthnRegistration:return iu.WebAuthnRegistration;default:return e||""}}formIdToStepId(){return this.formId}getClientResponseActions(){var e;const i={[eu.ClientInput]:{type:eu.ClientInput,id:"client_input",label:"Client Input"}};return null===(e=this.escapes)||void 0===e||e.forEach((e=>{let{id:r,display_name:n,schema:a}=e;var o;const s=null!==(o=Ap[r])&&void 0!==o?o:eu.Custom;i[r]=t({type:s,id:r,label:n||r},a&&{schema:a})})),i}}class Mp extends Error{constructor(){super("Missing response data")}}class Cp extends Error{constructor(e,t){super("Action of type "+e+" cannot have response from type "+t)}}const Ip=new D("ido","sdkDataDB",1);async function Dp(e){try{return await Ip.get("sdkDataStore",e)}catch(e){console.error("Error retrieving SDK data:",e)}}const Tp=new class{constructor(){this.correlationId="",this.getIdentifier=(e,t)=>{var i;const r=null===(i=e.headers.find((e=>t in e)))||void 0===i?void 0:i[t];return ru.debug(`Getting identifier ${t} from response, value: ${r}`),r}}async init(e,t){if(!e||!t)throw new pu("Invalid initialization configuration",Xd.InvalidInitOptions);const{serverPath:i,logLevel:r,pollingTimeout:n,resource:a,locale:o}=t;if(!i)throw new pu("Invalid initialization options",Xd.InvalidInitOptions);ru.setLogLevel(null!=r?r:Qd.Info),this.pollingTimeout=null!=n?n:3,this.clientId=e,a&&(this.resource=a),o&&(this.locale=o),this.serverPath=i,this.api=new bp(this.serverPath),ru.info("IdoSdk initialized successfully")}async startJourney(e,t){var i,r;const{additionalParams:n,correlationId:a}=null!=t?t:{};this.correlationId=null!=a?a:crypto.randomUUID();const o=await Dp("sdk_data"),s=(null===(i=this.journey)||void 0===i?void 0:i.encrypted)||(null==t?void 0:t.encrypted)||!1,c=(null===(r=this.journey)||void 0===r?void 0:r.isReady())?this.journey.cryptoSession:void 0,d=new yp(e,o,n,s,c);return this.invokeJourney(d)}async startSsoJourney(e,t){var i,r;this.correlationId=e;const n=await Dp("sdk_data"),a=(null===(i=this.journey)||void 0===i?void 0:i.encrypted)||(null==t?void 0:t.encrypted)||!1,o=(null===(r=this.journey)||void 0===r?void 0:r.isReady())?this.journey.cryptoSession:void 0,s=new _p(e,n,a,o);return this.invokeJourney(s)}async submitClientResponse(e,t){var i,r,n,a,o,s,c;if(!this.journey)throw new pu("Error occurred while trying to submit client response since no journey is active",Xd.NoActiveJourney);const d={assertion_id:null===(i=this.journey)||void 0===i?void 0:i.assertionId,action:null===(r=this.journey)||void 0===r?void 0:r.actionType,assert:"action",input:t};if((null==t?void 0:t.fch)||(d.fch=null===(n=this.journey)||void 0===n?void 0:n.challenge),e===eu.ClientInput)switch(null===(a=this.lastServiceResponse)||void 0===a?void 0:a.journeyStepId){case iu.CryptoBindingRegistration:case iu.RegisterDeviceAction:case iu.CryptoBindingValidation:case iu.ValidateDeviceAction:await this.handleCryptoBindingStep(d);break;case iu.WaitForAnotherDevice:return await this.handleWaitForAnotherDeviceAction(d);case iu.DrsTriggerAction:case iu.IdentityVerification:case iu.WebAuthnRegistration:case iu.SmsOTPAuthentication:case iu.EmailOTPAuthentication:case iu.EmailValidation:case iu.SmsValidation:case iu.WebAuthnTransactionSigning:case iu.SelectOrganization:this.handleDataAction(d,t);break;case iu.TotpRegistration:this.handleDataAction(d,{});break;case iu.InvokeIDP:case iu.MobileApproveAuthentication:this.handleDataAction(d,t)}else if(e===eu.Resend)switch(null===(o=this.lastServiceResponse)||void 0===o?void 0:o.journeyStepId){case iu.SmsOTPAuthentication:case iu.EmailOTPAuthentication:case iu.EmailValidation:case iu.SmsValidation:case iu.MobileApproveAuthentication:this.handleResendAssertion(d);break;default:throw new Cp(null===(s=this.lastServiceResponse)||void 0===s?void 0:s.journeyStepId,e)}else eu.Cancel,this.handleClientResponseOption(e,t,d);try{let e={headers:await this.getInternalHeaders(),data:d};const t=await(null===(c=this.api)||void 0===c?void 0:c.sendRequest(cu.path,this.getQueryParams(),e,this.journey));if(!t)throw new Mp;return await this.handleServiceResponse(t)}catch(e){throw this.rejectJourney(),e}}handleClientResponseOption(e,t,i){delete i.input,i.assert="escape",i.data={escape_id:e,escape_params:t}}handleResendAssertion(e){delete e.input,delete e.data,e.assert="resend"}async handleCryptoBindingStep(e){const t=Yd.crypto.createCryptoBinding("sign"),i=await this.handleCryptoBindingFieldValue(t);this.handleCryptoBindingActionPayload(e,i)}handleCryptoBindingActionPayload(e,i){const r=nu[this.lastServiceResponse.journeyStepId];e[r]=t(t({},e[r]),{},{"ts:idosdk:device":i})}handleDataAction(e,t){delete e.input,e.assert="data",e.data=t}async handleCryptoBindingFieldValue(e){var t,i,r,n,a,o,s,c,d;switch(null===(t=this.lastServiceResponse)||void 0===t?void 0:t.journeyStepId){case iu.CryptoBindingRegistration:case iu.RegisterDeviceAction:const{keyIdentifier:t,publicKey:u}=null!==(i=await e.getPublicData())&&void 0!==i?i:{};return{platform_device_id:t,platform_device_key:u};case iu.CryptoBindingValidation:case iu.ValidateDeviceAction:const{keyIdentifier:l}=null!==(r=await e.getPublicData())&&void 0!==r?r:{};return{platform_device_id:l,signature:await e.sign(null!==(s=null===(o=null===(a=null===(n=this.lastServiceResponse)||void 0===n?void 0:n.data)||void 0===a?void 0:a.app_data)||void 0===o?void 0:o.challenge)&&void 0!==s?s:null===(d=null===(c=this.lastServiceResponse)||void 0===c?void 0:c.data)||void 0===d?void 0:d.device_challenge)}}}async handleWaitForAnotherDeviceAction(e){var t,i,r,n;const a=await this.getInternalHeaders(),o=await(null===(t=this.api)||void 0===t?void 0:t.sendRequest(du.path,this.getQueryParams(),{headers:a,data:{polling_timeout:this.pollingTimeout,ticket_id:null===(i=this.lastServiceResponse)||void 0===i?void 0:i.data.raw_ticket_id,type:"ticket"}},this.journey));if(!0===(null===(r=null==o?void 0:o.data)||void 0===r?void 0:r.change_detected)){const t=await(null===(n=this.api)||void 0===n?void 0:n.sendRequest(cu.path,this.getQueryParams(),{headers:a,data:e},this.journey));if(!t)throw new Mp;return this.handleServiceResponse(t)}return this.lastServiceResponse}async handleServiceResponse(e){var i,r,n,a,o,s;const c=new kp(e),d=c.getJourneyState();this.handleJourneyState(d),(null===(r=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===r?void 0:r.sdk_data)&&(await async function(e,i){try{const r=t(t({},await Dp(e)),i);await Ip.put("sdkDataStore",e,r)}catch(e){console.error("Error saving SDK data:",e)}}("sdk_data",e.data.data.sdk_data),delete e.data.data.sdk_data),this.journey.assertionId=null!==(n=c.getAssertionId())&&void 0!==n?n:this.journey.assertionId,this.journey.actionType=null!==(a=c.getActionType())&&void 0!==a?a:this.journey.actionType,this.journey.challenge=null!==(o=c.getChallenge())&&void 0!==o?o:this.journey.challenge;const{clientResponseOptions:u,data:l}=null!==(s=this.lastServiceResponse)&&void 0!==s?s:{},h=d===gu.UpdateAction?{clientResponseOptions:u,data:l}:{};let f=c.generateServiceResponse(this.journey.actionType,h);switch(this.lastServiceResponse=f,f.journeyStepId){case iu.ValidateDeviceAction:case iu.RegisterDeviceAction:if(d!==gu.NextAction)throw new Error(`Journey rejected on ${f.journeyStepId} device action, with ${f.errorData}`);f=await this.submitClientResponse(eu.ClientInput,f.data);break;default:this.handleJourneySuccess(f)}return f}handleJourneySuccess(e){var t,i;null===(i=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===i||i.url,e.type===tu.JourneySuccess&&(e.token=e.data.token,delete e.data.token)}serializeState(){if(!this.lastServiceResponse||!this.journey)throw new pu("Error occurred while trying to serialize state since no journey is active",Xd.NoActiveJourney);return btoa(encodeURIComponent(JSON.stringify({journey:this.journey.toJson(),serviceResponse:this.lastServiceResponse})))}restoreFromSerializedState(e){var t;const{journey:i,serviceResponse:r}=JSON.parse(decodeURIComponent(null!==(t=atob(e))&&void 0!==t?t:{}));if(!i||!r)throw new pu("Invalid serialized state",Xd.InvalidState);if(this.lastServiceResponse=r,this.journey=function(e){let t,i;switch(e.cryptoSession&&(i=lp.fromJson(e.cryptoSession)),e.journeyType){case cp.ClientSdk:t=new yp(e.journeyId,e.sdkData,e.additionalParams,e.encrypted,i);break;case cp.SSO:t=new _p(e.interactionId,e.sdkData,e.encrypted,i);break;default:throw Error(`error when trying to deserialize Journey Json - unknown journey type ${e.journeyType}`)}return t.challenge=e.challenge,t.assertionId=e.assertionId,t.userId=e.userId,t.sessionId=e.sessionId,t.deviceId=e.deviceId,t.actionType=e.actionType,t}(i),this.journey.encrypted&&!this.journey.isReady())throw new pu("Failed to restore encryption context after redirection",Xd.InvalidState);return this.correlationId=i.correlationId,r}async getInternalHeaders(){const e=[];this.journey&&e.push(...this.journey.getInternalHeaders()),this.correlationId&&e.push({type:"correlation_id",correlation_id:this.correlationId});const t=await this.getDeviceHeader();return t&&e.push(t),e}async getDeviceHeader(){var e,t;try{const i=Yd.crypto.createCryptoBinding("sign"),{keyIdentifier:r,publicKey:n}=null!==(e=await i.getPublicData())&&void 0!==e?e:{};return r&&n?{type:"device",device:{device_key_id:r,device_public_key:n,device_type:"web",device_os:navigator.platform.toLowerCase(),device_os_version:(null===(t=navigator.userAgent.match(/(?:Version|Edge|Chrome|Firefox|Safari)\/(\d+\.\d+)/))||void 0===t?void 0:t[1])||"unknown",device_manufacturer:navigator.vendor||"unknown",device_model:navigator.platform||"unknown"}}:null}catch(e){return ru.error("Failed to create device header"),null}}getQueryParams(){var e,i;const r=t({aid:"default_application",clientId:this.clientId,locale:window.navigator.language||"en-US"},this.journey?this.journey.getQueryParams():{});return(null===(e=this.journey)||void 0===e?void 0:e.deviceId)&&(r.did=this.journey.deviceId),(null===(i=this.journey)||void 0===i?void 0:i.sessionId)&&(r.sid=this.journey.sessionId),this.resource&&(r.resource=this.resource),this.locale&&(r.locale=this.locale),r}async invokeJourney(e){var t,i,r;this.journey=e;const n=await this.getInternalHeaders(),a={data:e.getInvocationData(),headers:n};try{const e=await(null===(i=null===(t=null===window||void 0===window?void 0:window.tsPlatform)||void 0===t?void 0:t.drs)||void 0===i?void 0:i.getSessionToken());e&&a.headers.push(this.buildDrsSessionTokenSdkHeader(e))}catch(e){ru.warning(`Could not obtain DRS session token: ${e}`)}try{const t=await(null===(r=this.api)||void 0===r?void 0:r.sendRequest(e.getInvocationPath(),this.getQueryParams(),a,this.journey));if(!t)throw new Mp;return e.userId=this.getIdentifier(t,"uid"),e.sessionId=this.getIdentifier(t,"session_id"),e.deviceId=this.getIdentifier(t,"device_id"),e.active(),this.handleServiceResponse(t)}catch(e){throw this.rejectJourney(),e}}buildDrsSessionTokenSdkHeader(e){return{type:"drs_session_token",drs_session_token:{token:e}}}handleJourneyState(e){switch(e){case gu.TextRejection:case gu.JsonRejection:this.rejectJourney();break;case gu.JourneyEnd:this.completeJourney();break;case gu.NextAction:case gu.UpdateAction:break;default:throw Error(`Unhandled service response state: ${e}`)}}completeJourney(){var e;null===(e=this.journey)||void 0===e||e.complete()}rejectJourney(){var e;null===(e=this.journey)||void 0===e||e.reject()}async generateDebugPin(){var e;if(!this.journey)throw new pu("Error occurred while trying to generate debug pin since no journey is active",Xd.NoActiveJourney);const t=await this.getInternalHeaders(),i=await(null===(e=this.api)||void 0===e?void 0:e.sendRequest(uu.path,this.getQueryParams(),{headers:t,data:{}},this.journey));if(!i)throw new Mp;return i.data.debug_pin}};Yd.events.on(Yd.events.MODULE_INITIALIZED,(async()=>{var e;const t=Yd.moduleMetadata.getInitConfig();if(!(null===(e=null==t?void 0:t.ido)||void 0===e?void 0:e.serverPath))return;const{clientId:i,ido:r}=t;await Tp.init(i,r)})),function(){var e,t;const i="undefined"!=typeof window&&"undefined"!=typeof document;if("undefined"!=typeof globalThis&&void 0!==globalThis.process&&(null===(t=null===(e=globalThis.process)||void 0===e?void 0:e.versions)||void 0===t?void 0:t.node)&&!i)throw new Error("\n🚫 @TransmitSecurity/web-sdk is a BROWSER-ONLY package.\n\nāŒ Node.js environments are not supported.\nāœ… Use this package in web browsers only.\n\nFor more information, visit: https://github.com/transmitsecurity-dev/ciam-web-sdk#browser-only\n");i||console.warn("āš ļø @TransmitSecurity/web-sdk: Browser environment not detected. Some features may not work correctly.")}();const Rp={drs:ua,idv:cd};var zp=new class{constructor(){this.factories=Rp,Object.assign(this,ua),Object.assign(this,cd)}};const Bp="1.17.0";export{Bp as PACKAGE_VERSION,Kd as authenticate,$d as crossDevice,zp as default,ua as drs,Wd as getDefaultPaths,Tp as ido,cd as idv,g as initialize,Gd as isAutofillSupported,Jd as isPlatformAuthenticatorSupported,Vd as register,Zd as webauthn};
3
+ !function(e,t){!function(t){function i(e){return parseInt(e)===e}function r(e){if(!i(e.length))return!1;for(var t=0;t<e.length;t++)if(!i(e[t])||e[t]<0||e[t]>255)return!1;return!0}function n(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(i(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function a(e){return new Uint8Array(e)}function o(e,t,i,r,n){null==r&&null==n||(e=e.slice?e.slice(r,n):Array.prototype.slice.call(e,r,n)),t.set(e,i)}var s,c={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i<e.length;){var r=e.charCodeAt(i++);37===r?(t.push(parseInt(e.substr(i,2),16)),i+=2):t.push(r)}return n(t)},fromBytes:function(e){for(var t=[],i=0;i<e.length;){var r=e[i];r<128?(t.push(String.fromCharCode(r)),i++):r>191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},d=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},fromBytes:function(e){for(var t=[],i=0;i<e.length;i++){var r=e[i];t.push(s[(240&r)>>4]+s[15&r])}return t.join("")}}),u={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],g=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],b=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],_=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],x=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],S=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function k(e){for(var t=[],i=0;i<e.length;i+=4)t.push(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]);return t}var M=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:n(t,!0)}),this._prepare()};M.prototype._prepare=function(){var e=u[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var i,r=4*(e+1),n=this.key.length/4,a=k(this.key);for(t=0;t<n;t++)i=t>>2,this._Ke[i][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var o,s=0,c=n;c<r;){if(o=a[n-1],a[0]^=h[o>>16&255]<<24^h[o>>8&255]<<16^h[255&o]<<8^h[o>>24&255]^l[s]<<24,s+=1,8!=n)for(t=1;t<n;t++)a[t]^=a[t-1];else{for(t=1;t<n/2;t++)a[t]^=a[t-1];o=a[n/2-1],a[n/2]^=h[255&o]^h[o>>8&255]<<8^h[o>>16&255]<<16^h[o>>24&255]<<24;for(t=n/2+1;t<n;t++)a[t]^=a[t-1]}for(t=0;t<n&&c<r;)d=c>>2,f=c%4,this._Ke[d][f]=a[t],this._Kd[e-d][f]=a[t++],c++}for(var d=1;d<e;d++)for(var f=0;f<4;f++)o=this._Kd[d][f],this._Kd[d][f]=x[o>>24&255]^A[o>>16&255]^E[o>>8&255]^S[255&o]},M.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],r=k(e),n=0;n<4;n++)r[n]^=this._Ke[0][n];for(var o=1;o<t;o++){for(n=0;n<4;n++)i[n]=p[r[n]>>24&255]^g[r[(n+1)%4]>>16&255]^m[r[(n+2)%4]>>8&255]^b[255&r[(n+3)%4]]^this._Ke[o][n];r=i.slice()}var s,c=a(16);for(n=0;n<4;n++)s=this._Ke[t][n],c[4*n]=255&(h[r[n]>>24&255]^s>>24),c[4*n+1]=255&(h[r[(n+1)%4]>>16&255]^s>>16),c[4*n+2]=255&(h[r[(n+2)%4]>>8&255]^s>>8),c[4*n+3]=255&(h[255&r[(n+3)%4]]^s);return c},M.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],r=k(e),n=0;n<4;n++)r[n]^=this._Kd[0][n];for(var o=1;o<t;o++){for(n=0;n<4;n++)i[n]=v[r[n]>>24&255]^y[r[(n+3)%4]>>16&255]^_[r[(n+2)%4]>>8&255]^w[255&r[(n+1)%4]]^this._Kd[o][n];r=i.slice()}var s,c=a(16);for(n=0;n<4;n++)s=this._Kd[t][n],c[4*n]=255&(f[r[n]>>24&255]^s>>24),c[4*n+1]=255&(f[r[(n+3)%4]>>16&255]^s>>16),c[4*n+2]=255&(f[r[(n+2)%4]>>8&255]^s>>8),c[4*n+3]=255&(f[255&r[(n+1)%4]]^s);return c};var C=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new M(t)};C.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16)o(e,i,0,r,r+16),o(i=this._aes.encrypt(i),t,r);return t},C.prototype.decrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16)o(e,i,0,r,r+16),o(i=this._aes.decrypt(i),t,r);return t};var I=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else i=a(16);this._lastCipherblock=n(i,!0),this._aes=new M(t)};I.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16){o(e,i,0,r,r+16);for(var s=0;s<16;s++)i[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(i),o(this._lastCipherblock,t,r)}return t},I.prototype.decrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=a(e.length),i=a(16),r=0;r<e.length;r+=16){o(e,i,0,r,r+16),i=this._aes.decrypt(i);for(var s=0;s<16;s++)t[r+s]=i[s]^this._lastCipherblock[s];o(e,this._lastCipherblock,0,r,r+16)}return t};var D=function e(t,i,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 size)")}else i=a(16);r||(r=1),this.segmentSize=r,this._shiftRegister=n(i,!0),this._aes=new M(t)};D.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,i=n(e,!0),r=0;r<i.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)i[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(i,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return i},D.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,i=n(e,!0),r=0;r<i.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)i[r+a]^=t[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(e,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return i};var T=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",i){if(16!=i.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else i=a(16);this._lastPrecipher=n(i,!0),this._lastPrecipherIndex=16,this._aes=new M(t)};T.prototype.encrypt=function(e){for(var t=n(e,!0),i=0;i<t.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},T.prototype.decrypt=T.prototype.encrypt;var R=function e(t){if(!(this instanceof e))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=a(16),this.setValue(t)):this.setBytes(t)};R.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},R.prototype.setBytes=function(e){if(16!=(e=n(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},R.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var B=function e(t,i){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",i instanceof R||(i=new R(i)),this._counter=i,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new M(t)};B.prototype.encrypt=function(e){for(var t=n(e,!0),i=0;i<t.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[i]^=this._remainingCounter[this._remainingCounterIndex++];return t},B.prototype.decrypt=B.prototype.encrypt;var z={AES:M,Counter:R,ModeOfOperation:{ecb:C,cbc:I,cfb:D,ofb:T,ctr:B},utils:{hex:d,utf8:c},padding:{pkcs7:{pad:function(e){var t=16-(e=n(e,!0)).length%16,i=a(e.length+t);o(e,i);for(var r=e.length;r<i.length;r++)i[r]=t;return i},strip:function(e){if((e=n(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,r=0;r<t;r++)if(e[i+r]!==t)throw new Error("PKCS#7 invalid padding byte");var s=a(i);return o(e,s,0,0,i),s}}},_arrayTest:{coerceArray:n,createArray:a,copyArray:o}};e.exports=z}()}(lp);class hp{getExchangeRequestHeader(){if(!this.kp){const e={entropy:this.generateRandomHexString(192),entropyEnc:"hex"};this.kp=this.ec.genKeyPair(e)}return{type:"key_exchange",scheme:3,y:this.jsArrayToBase64(this.kp.getPublic().encode("array",!1))}}async processExchangeResponseHeader(e){if(e.scheme!=this.scheme)throw"Unsupported crypto scheme "+e.scheme;this.sessionId=e.crypto_session_id;const t=this.kp.derive(this.ec.keyFromPublic(atob(e.y)).getPublic()).toArray("be",32),i=new Uint8Array(t),r=await crypto.subtle.digest("SHA-256",i);this.aesKey=Array.from(new Uint8Array(r))}isReady(){return!(!this.aesKey||!this.sessionId)}decryptResponse(e){let t=null;if(e.headers.forEach((function(e){"encryption"==e.type&&(t=e)})),t){const i=this.base64ToJsArray(t.iv),r=new up.ModeOfOperation.cbc(this.aesKey,i),n=this.base64ToJsArray(e.data),a=r.decrypt(n);let o=up.utils.utf8.fromBytes(a);o=this.pkcs7Unpad(o),e.data=JSON.parse(o)}return e}encryptRequest(e){const t=this.generateRandomHexString(32),i=up.utils.hex.toBytes(t),r={type:"encryption",iv:this.hexToBase64(t),crypto_session_id:this.sessionId},n=e.headers.map((e=>this.encryptStringToBase64(JSON.stringify(e),i))),a=JSON.stringify(e.data),o=this.encryptStringToBase64(a,i);e.headers=[r],e.enc_headers=n,e.data=o}encryptStringToBase64(e,t){const i=new up.ModeOfOperation.cbc(this.aesKey,t),r=up.utils.utf8.toBytes(e),n=this.pkcs7Pad(r),a=[...i.encrypt(n)];return this.jsArrayToBase64(a)}toJson(){return{scheme:3,session_id:this.sessionId,key:this.jsArrayToBase64(this.aesKey)}}static fromJson(e){return new hp(e)}jsArrayToBase64(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return btoa(t)}base64ToJsArray(e){const t=atob(e),i=[];for(let e=0;e<t.length;e++)i.push(t.charCodeAt(e));return i}pkcs7Pad(e){const t=16-e.length%16,i=new Uint8Array(e.length+t);i.set(e,0);for(let r=0;r<t;r++)i[e.length+r]=t;return i}pkcs7Unpad(e){try{const t=e.charCodeAt(e.length-1);if(t<1||t>16)throw new bp(`Invalid padding length: ${t}`);if(e.length<t)throw new bp("Input string shorter than padding length");for(let i=1;i<=t;i++){if(e.charCodeAt(e.length-i)!==t)throw new bp("Invalid padding values")}return e.slice(0,-t)}catch(e){if(e instanceof bp)throw e;throw new bp(`Failed to unpad data: ${e instanceof Error?e.message:String(e)}`)}}constructor(e){if(this.scheme=3,this.ecCurveName="p256",this.ec=new yu.ec(this.ecCurveName),e&&(this.sessionId=e.session_id,this.aesKey=this.base64ToJsArray(e.key),!this.isReady()))throw new Error("Internal: Can't deserialize crypto session")}generateRandomHexString(e){const t=new Uint8Array(e);crypto.getRandomValues(t);let i="";const r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];for(let e=0;e<t.length;e++){i+=r[15&t[e]]}return i}hexToBase64(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";let i=0,r=0,n="";for(let a=0;a<e.length;a++)if(i=(i<<4)+parseInt(e[a],16),r+=4,r>=6){n+=t[i>>r-6],r-=6,i&=255>>8-r}if(r){n+=t[i<<6-r]}for(;n.length%4;)n+="=";return n}}class fp{constructor(e,t){this.encrypted=e,this.cryptoSession=t}isReady(){var e;return(null===(e=this.cryptoSession)||void 0===e?void 0:e.isReady())||!1}async exchangeKeyAndEncryptRequest(e,t,i,r,n,a){if(!t.isReady()){const i=["aid","clientId"],n=new URLSearchParams(Array.from(r.searchParams.entries()).filter((e=>{let[t,r]=e;return i.includes(t)})));await t.performKeyExchange(e,n)}return t.promisePossiblyEncryptedTransportRequest(new mp(i,r,n.data,n.headers,a))}async performKeyExchange(e,i){const r={r:"Hello Encrypted World"},n=new URL(e+hu.path+"?"+i.toString()),a=new mp("POST",n,r,[],{"Content-Type":"application/json"}),o=this.promisePossiblyEncryptedTransportRequest(a);let s;const c=await fetch(o.url.toString(),{body:JSON.stringify(null==o?void 0:o.body),method:"POST",headers:o.headers,credentials:"include"});if(!c.ok)throw new Error("Request failed");let d;s=t(t({data:await c.json()},c),{},{headers:c.headers});try{d=s.data}catch(e){throw new Error(`Unsupported resposne format: ${e}`)}await this.postprocessResponse(d),d=this.possiblyDecryptResponse(d);const u=d.data;if(JSON.stringify(u)!==JSON.stringify(r))throw new Error("Key exchange failed");return Promise.resolve()}async postprocessResponse(e){var t;if(e.headers){const i=e.headers.find((e=>"key_exchange"==e.type));if(i)return null===(t=this.cryptoSession)||void 0===t?void 0:t.processExchangeResponseHeader(i)}}promisePossiblyEncryptedTransportRequest(e){const t={headers:e.envelopeHeaders,data:e.body};return this.encryptEnvelopedMessageIfNeeded(t),new pp(e.url.toString(),e.method,t,void 0,e.httpHeaders)}possiblyDecryptResponse(e){return this.cryptoSession&&(e=this.cryptoSession.decryptResponse(e)),e}encryptEnvelopedMessageIfNeeded(e){var t;const i=this.generateKeyExchangeHeaderIfNeeded();(null===(t=this.cryptoSession)||void 0===t?void 0:t.isReady())&&this.cryptoSession.encryptRequest(e),i&&e.headers.push(i)}generateKeyExchangeHeaderIfNeeded(){return this.encrypted&&!this.cryptoSession?(this.cryptoSession=new hp,this.cryptoSession.getExchangeRequestHeader()):null}}class pp{constructor(e,t,i,r,n){this.url=e,this.httpMethod=t,this.body=i,this.params=r,this.headers=n}}class gp{addEnvelopeHeader(e){this._envelopeHeaders.push(e)}get method(){return this._requestMethod}get url(){return this._url}get body(){return this._requestBody}get envelopeHeaders(){return this._envelopeHeaders}get httpHeaders(){return this._httpHeaders}constructor(e,t,i,r,n){if(!t||!i)throw new Error("Internal - Invalid arguments for constructing session message");this._requestMethod=e,this._url=t,this._requestBody=i,this._envelopeHeaders=r||[],this._httpHeaders=n}}class mp extends gp{static from(e,t,i,r){return new mp(e,t,i.data,i.headers,r)}}class bp extends Error{constructor(e){super(e),this.name="PaddingError",Object.setPrototypeOf(this,bp.prototype)}}class vp{constructor(e){this.urlBaseString=e+"/"+ou}convertHttpResponseToRawServiceResponse(e){const{status:t,statusText:i,body:r}=e;return this.rawFrom(t,i,r)}rawFrom(e,t,i){const{error_code:r,error_message:n,headers:a,data:o}=i;return{status:e,statusText:t,error_code:r,error_message:n,headers:a,data:this.buildAggregatedData(o)}}buildAggregatedData(e){switch(null==e?void 0:e.state){case bu.Pending:pu.forEach((i=>{const[[r,n]]=Object.entries(i),a=((e,t,i)=>{if(!e||"object"!=typeof e)return i;const r=Array.isArray(t)?t:t.split(".");let n=e;for(let e=0;e<r.length;e++)if(n=n[r[e]],void 0===n)return i;return n})(e,r);if(a){const i={};n.forEach((e=>{e in a&&(i[e]=a[e])})),e=t(t({},e),i)}}));break;case bu.Rejected:e.type=vu.Rejection}return e}async sendRequest(e,i,r,n){if(!(this.urlBaseString.toString().length>ou.length&&e))throw new Error("bad input");const a=new URL(this.urlBaseString);a.pathname+=e,nu.debug(`Got Full URL: ${a.toString()}`),Object.keys(i).map((e=>a.searchParams.append(e,i[e]))),nu.debug(`Request body: ${r}`);let o=new pp(a.toString(),"POST",r,a.searchParams,{"Content-type":"application/json;charset=UTF-8"});try{n.encrypted&&(o=await n.exchangeKeyAndEncryptRequest(this.urlBaseString,n,o.httpMethod,new URL(o.url),o.body,o.headers));const e=await fetch(o.url.toString(),{body:JSON.stringify(o.body),method:"POST",headers:o.headers,credentials:"include"});let i;const r=await e.json();if(n.encrypted){const e=r;n.postprocessResponse(e),i=n.possiblyDecryptResponse(e)}else i=r;return this.convertHttpResponseToRawServiceResponse(t(t({},e),{},{body:i}))}catch(e){throw new gu("Error occurred while retrieving response from server",eu.NetworkError)}}}!function(e){e.Active="Active",e.Success="Journey Ended with Success",e.Rejected="Journey Ended with Rejection",e.Aborted="Journey aborted by client"}(cp||(cp={})),function(e){e.ClientSdk="Client SDK Journey",e.SSO="SSO Journey"}(dp||(dp={}));class yp extends fp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;super(r,n),this.journeyType=e,this.sdkData=t,this.additionalParams=i,this.encrypted=r,this.cryptoSession=n,this.state=cp.Active}getQueryParams(){let e={};return this.deviceId&&(e.did=this.deviceId),this.sessionId&&(e.sid=this.sessionId),e}getInternalHeaders(){const e=[];return this.userId&&e.push({type:"uid",uid:this.userId}),e}toJson(){var e;return{journeyType:this.journeyType,challenge:this.challenge,assertionId:this.assertionId,userId:this.userId,sessionId:this.sessionId,deviceId:this.deviceId,actionType:this.actionType,additionalParams:this.additionalParams,sdkData:this.sdkData,encrypted:this.encrypted,cryptoSession:null===(e=this.cryptoSession)||void 0===e?void 0:e.toJson()}}getInvocationData(){const e=fu.data.dummy;return this.additionalParams&&Object.keys(this.additionalParams).length>0&&(e.params=this.additionalParams),this.sdkData&&Object.keys(this.sdkData).length>0&&(e.sdk_data=this.sdkData),e}complete(){if(this.isCompletedState())throw Error(`Cannot complete an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=cp.Success,this.cryptoSession=void 0}reject(){if(this.isCompletedState())throw Error(`Cannot reject an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=cp.Rejected,this.cryptoSession=void 0}abort(){if(this.isCompletedState())throw Error(`Cannot abort an already completed journey. Current state: ${this.state.toString()}`);this.challenge=void 0,this.state=cp.Aborted,this.cryptoSession=void 0}active(){if(this.isCompletedState())throw Error(`Cannot run a completed journey. Current state: ${this.state.toString()}`);this.state=cp.Active}isCompletedState(){return this.state===cp.Success||this.state===cp.Rejected||this.state===cp.Aborted}}class _p extends yp{constructor(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;if(super(dp.ClientSdk,t,i,r,n),this.journeyId=e,!this.journeyId)throw Error("Journey ID must be provided")}getInvocationData(){const e=super.getInvocationData();return e.policy_request_id=this.journeyId,e}getInvocationPath(){return cu.path}toJson(){return t(t({},super.toJson()),{},{journeyId:this.journeyId})}}class wp extends yp{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;super(dp.SSO,t,{},i,r),this.interactionId=e}getInvocationPath(){return su.path}getQueryParams(){return t(t({},super.getQueryParams()),{},{ssoInteractionId:this.interactionId})}toJson(){return t(t({},super.toJson()),{},{interactionId:this.interactionId})}}const xp=["assertion_id","type","escapes","form_id","vendor_name"],Ap=[...xp,"challenge","assertion_error_code","assertion_error_message","assertions_complete","state","control_flow","rejection_data"],Ep={[tu.Cancel]:tu.Cancel,[tu.Fail]:tu.Fail},Sp=["data"],kp=["json_data"];class Mp{constructor(e){var t,i,r;this.rawResponse=e;const[{escapes:n,form_id:a}]=null!==(i=null===(t=e.data)||void 0===t?void 0:t.control_flow)&&void 0!==i?i:[{}];this.escapes=n,this.data=null!==(r=e.data)&&void 0!==r?r:{},this.formId=a}generateServiceResponse(e,i){var r,n;const a=this.getType(),o=this.getJourneyStepId(e);return t(t({type:a,journeyStepId:o,errorData:this.getErrorData(),data:this.getData(o),clientResponseOptions:this.getClientResponseActions()},i),{},{redirectUrl:null===(n=null===(r=this.data)||void 0===r?void 0:r.data)||void 0===n?void 0:n.url})}getActionType(){return this.data.type}getChallenge(){return this.data.challenge}getAssertionId(){return this.data.assertion_id}getJourneyState(){var e,t,i;let r;if((null===(e=this.rawResponse)||void 0===e?void 0:e.status)>=400)r=mu.TextRejection;else switch(this.data.state){case bu.Completed:r=mu.JourneyEnd;break;case bu.Rejected:r=mu.JsonRejection;break;case bu.Pending:r=(null===(i=null===(t=this.rawResponse)||void 0===t?void 0:t.data)||void 0===i?void 0:i.control_flow)?mu.NextAction:mu.UpdateAction;break;default:r=mu.JsonRejection}return r}getType(){let e=iu.JourneyRejection;return this.data.assertions_complete?e=iu.JourneySuccess:this.data.state===bu.Pending?e=iu.ClientInputRequired:16==this.data.assertion_error_code?e=iu.ClientInputUpdateRequired:4001===this.rawResponse.error_code&&(e=iu.JourneyRejection),e}getData(e){var i,r;const[a]=null!==(i=this.data.control_flow)&&void 0!==i?i:[{}],o=null!==(r=this.data)&&void 0!==r?r:{},{data:s}=o,c=n(o,Sp),d=null!=s?s:{},{json_data:u}=d,l=n(d,kp);return this.removeFields(a,xp),this.data=t(t(t(t(t({},c),a),u&&{json_data:u}),Object.keys(l).length&&{data:l}),this.rejectionReason&&{rejectionReason:this.rejectionReason}),this.removeFields(this.data,Ap),this.manipulateDataForJourneyStep(e),this.data}manipulateDataForJourneyStep(e){e===ru.InvokeIDP&&(this.data.authorization_url=this.generateAuthorizationUrlFromResponseData(this.data),delete this.data.authorization_parameters,delete this.data.authorization_endpoint)}generateAuthorizationUrlFromResponseData(e){const{authorization_endpoint:t,authorization_parameters:i}=e,r=Object.keys(i).map((e=>{const t=i[e]instanceof Object?JSON.stringify(i[e]):i[e];return`${e}=${encodeURIComponent(t)}`})).join("&"),n=new URL(t);return n.search=r,n}getErrorData(){if(this.data.assertion_error_code&&0!=this.data.assertion_error_code){const e=gu.convertFromAssertionError(this.data.assertion_error_code);return new gu(this.data.assertion_error_message,e)}}removeFields(e,t){for(const i of t)i in e&&delete e[i]}getJourneyStepId(e){const t=this.getType();if(t===iu.JourneyRejection)return this.rejectionReason=this.rawResponse.error_message,ru.Rejection;if(t===iu.JourneySuccess)return ru.Success;switch(e){case vu.Form:case vu.LoginForm:return this.formIdToStepId()||this.formId||e;case vu.Information:return ru.Information;case vu.DebugBreak:return ru.DebugBreak;case vu.WaitForTicket:return ru.WaitForAnotherDevice;case vu.Rejection:return ru.Rejection;case vu.DrsTriggerAction:return ru.DrsTriggerAction;case vu.IdentityVerification:return ru.IdentityVerification;case vu.WebAuthnRegistration:return ru.WebAuthnRegistration;default:return e||""}}formIdToStepId(){return this.formId}getClientResponseActions(){var e;const i={[tu.ClientInput]:{type:tu.ClientInput,id:"client_input",label:"Client Input"}};return null===(e=this.escapes)||void 0===e||e.forEach((e=>{let{id:r,display_name:n,schema:a}=e;var o;const s=null!==(o=Ep[r])&&void 0!==o?o:tu.Custom;i[r]=t({type:s,id:r,label:n||r},a&&{schema:a})})),i}}class Cp extends Error{constructor(){super("Missing response data")}}class Ip extends Error{constructor(e,t){super("Action of type "+e+" cannot have response from type "+t)}}const Dp=new D("ido","sdkDataDB",1);async function Tp(e){try{return await Dp.get("sdkDataStore",e)}catch(e){console.error("Error retrieving SDK data:",e)}}const Rp=new class{constructor(){this.correlationId="",this.getIdentifier=(e,t)=>{var i;const r=null===(i=e.headers.find((e=>t in e)))||void 0===i?void 0:i[t];return nu.debug(`Getting identifier ${t} from response, value: ${r}`),r}}async init(e,t){if(!e||!t)throw new gu("Invalid initialization configuration",eu.InvalidInitOptions);const{serverPath:i,logLevel:r,pollingTimeout:n,resource:a,locale:o}=t;if(!i)throw new gu("Invalid initialization options",eu.InvalidInitOptions);nu.setLogLevel(null!=r?r:Xd.Info),this.pollingTimeout=null!=n?n:3,this.clientId=e,a&&(this.resource=a),o&&(this.locale=o),this.serverPath=i,this.api=new vp(this.serverPath),nu.info("IdoSdk initialized successfully")}async startJourney(e,t){var i,r;const{additionalParams:n,correlationId:a}=null!=t?t:{};this.correlationId=null!=a?a:crypto.randomUUID();const o=await Tp("sdk_data"),s=(null===(i=this.journey)||void 0===i?void 0:i.encrypted)||(null==t?void 0:t.encrypted)||!1,c=(null===(r=this.journey)||void 0===r?void 0:r.isReady())?this.journey.cryptoSession:void 0,d=new _p(e,o,n,s,c);return this.invokeJourney(d)}async startSsoJourney(e,t){var i,r;this.correlationId=e;const n=await Tp("sdk_data"),a=(null===(i=this.journey)||void 0===i?void 0:i.encrypted)||(null==t?void 0:t.encrypted)||!1,o=(null===(r=this.journey)||void 0===r?void 0:r.isReady())?this.journey.cryptoSession:void 0,s=new wp(e,n,a,o);return this.invokeJourney(s)}async submitClientResponse(e,t){var i,r,n,a,o,s,c;if(!this.journey)throw new gu("Error occurred while trying to submit client response since no journey is active",eu.NoActiveJourney);const d={assertion_id:null===(i=this.journey)||void 0===i?void 0:i.assertionId,action:null===(r=this.journey)||void 0===r?void 0:r.actionType,assert:"action",input:t};if((null==t?void 0:t.fch)||(d.fch=null===(n=this.journey)||void 0===n?void 0:n.challenge),e===tu.ClientInput)switch(null===(a=this.lastServiceResponse)||void 0===a?void 0:a.journeyStepId){case ru.CryptoBindingRegistration:case ru.RegisterDeviceAction:case ru.CryptoBindingValidation:case ru.ValidateDeviceAction:await this.handleCryptoBindingStep(d);break;case ru.WaitForAnotherDevice:return await this.handleWaitForAnotherDeviceAction(d);case ru.DrsTriggerAction:case ru.IdentityVerification:case ru.WebAuthnRegistration:case ru.SmsOTPAuthentication:case ru.EmailOTPAuthentication:case ru.EmailValidation:case ru.SmsValidation:case ru.WebAuthnTransactionSigning:case ru.SelectOrganization:this.handleDataAction(d,t);break;case ru.TotpRegistration:this.handleDataAction(d,{});break;case ru.InvokeIDP:case ru.MobileApproveAuthentication:this.handleDataAction(d,t)}else if(e===tu.Resend)switch(null===(o=this.lastServiceResponse)||void 0===o?void 0:o.journeyStepId){case ru.SmsOTPAuthentication:case ru.EmailOTPAuthentication:case ru.EmailValidation:case ru.SmsValidation:case ru.MobileApproveAuthentication:this.handleResendAssertion(d);break;default:throw new Ip(null===(s=this.lastServiceResponse)||void 0===s?void 0:s.journeyStepId,e)}else tu.Cancel,this.handleClientResponseOption(e,t,d);try{let e={headers:await this.getInternalHeaders(),data:d};const t=await(null===(c=this.api)||void 0===c?void 0:c.sendRequest(du.path,this.getQueryParams(),e,this.journey));if(!t)throw new Cp;return await this.handleServiceResponse(t)}catch(e){throw this.rejectJourney(),e}}handleClientResponseOption(e,t,i){delete i.input,i.assert="escape",i.data={escape_id:e,escape_params:t}}handleResendAssertion(e){delete e.input,delete e.data,e.assert="resend"}async handleCryptoBindingStep(e){const t=Qd.crypto.createCryptoBinding("sign"),i=await this.handleCryptoBindingFieldValue(t);this.handleCryptoBindingActionPayload(e,i)}handleCryptoBindingActionPayload(e,i){const r=au[this.lastServiceResponse.journeyStepId];e[r]=t(t({},e[r]),{},{"ts:idosdk:device":i})}handleDataAction(e,t){delete e.input,e.assert="data",e.data=t}async handleCryptoBindingFieldValue(e){var t,i,r,n,a,o,s,c,d;switch(null===(t=this.lastServiceResponse)||void 0===t?void 0:t.journeyStepId){case ru.CryptoBindingRegistration:case ru.RegisterDeviceAction:const{keyIdentifier:t,publicKey:u}=null!==(i=await e.getPublicData())&&void 0!==i?i:{};return{platform_device_id:t,platform_device_key:u};case ru.CryptoBindingValidation:case ru.ValidateDeviceAction:const{keyIdentifier:l}=null!==(r=await e.getPublicData())&&void 0!==r?r:{};return{platform_device_id:l,signature:await e.sign(null!==(s=null===(o=null===(a=null===(n=this.lastServiceResponse)||void 0===n?void 0:n.data)||void 0===a?void 0:a.app_data)||void 0===o?void 0:o.challenge)&&void 0!==s?s:null===(d=null===(c=this.lastServiceResponse)||void 0===c?void 0:c.data)||void 0===d?void 0:d.device_challenge)}}}async handleWaitForAnotherDeviceAction(e){var t,i,r,n;const a=await this.getInternalHeaders(),o=await(null===(t=this.api)||void 0===t?void 0:t.sendRequest(uu.path,this.getQueryParams(),{headers:a,data:{polling_timeout:this.pollingTimeout,ticket_id:null===(i=this.lastServiceResponse)||void 0===i?void 0:i.data.raw_ticket_id,type:"ticket"}},this.journey));if(!0===(null===(r=null==o?void 0:o.data)||void 0===r?void 0:r.change_detected)){const t=await(null===(n=this.api)||void 0===n?void 0:n.sendRequest(du.path,this.getQueryParams(),{headers:a,data:e},this.journey));if(!t)throw new Cp;return this.handleServiceResponse(t)}return this.lastServiceResponse}async handleServiceResponse(e){var i,r,n,a,o,s;const c=new Mp(e),d=c.getJourneyState();this.handleJourneyState(d),(null===(r=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===r?void 0:r.sdk_data)&&(await async function(e,i){try{const r=t(t({},await Tp(e)),i);await Dp.put("sdkDataStore",e,r)}catch(e){console.error("Error saving SDK data:",e)}}("sdk_data",e.data.data.sdk_data),delete e.data.data.sdk_data),this.journey.assertionId=null!==(n=c.getAssertionId())&&void 0!==n?n:this.journey.assertionId,this.journey.actionType=null!==(a=c.getActionType())&&void 0!==a?a:this.journey.actionType,this.journey.challenge=null!==(o=c.getChallenge())&&void 0!==o?o:this.journey.challenge;const{clientResponseOptions:u,data:l}=null!==(s=this.lastServiceResponse)&&void 0!==s?s:{},h=d===mu.UpdateAction?{clientResponseOptions:u,data:l}:{};let f=c.generateServiceResponse(this.journey.actionType,h);switch(this.lastServiceResponse=f,f.journeyStepId){case ru.ValidateDeviceAction:case ru.RegisterDeviceAction:if(d!==mu.NextAction)throw new Error(`Journey rejected on ${f.journeyStepId} device action, with ${f.errorData}`);f=await this.submitClientResponse(tu.ClientInput,f.data);break;default:this.handleJourneySuccess(f)}return f}handleJourneySuccess(e){var t,i;null===(i=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===i||i.url,e.type===iu.JourneySuccess&&(e.token=e.data.token,delete e.data.token)}serializeState(){if(!this.lastServiceResponse||!this.journey)throw new gu("Error occurred while trying to serialize state since no journey is active",eu.NoActiveJourney);return btoa(encodeURIComponent(JSON.stringify({journey:this.journey.toJson(),serviceResponse:this.lastServiceResponse})))}restoreFromSerializedState(e){var t;const{journey:i,serviceResponse:r}=JSON.parse(decodeURIComponent(null!==(t=atob(e))&&void 0!==t?t:{}));if(!i||!r)throw new gu("Invalid serialized state",eu.InvalidState);if(this.lastServiceResponse=r,this.journey=function(e){let t,i;switch(e.cryptoSession&&(i=hp.fromJson(e.cryptoSession)),e.journeyType){case dp.ClientSdk:t=new _p(e.journeyId,e.sdkData,e.additionalParams,e.encrypted,i);break;case dp.SSO:t=new wp(e.interactionId,e.sdkData,e.encrypted,i);break;default:throw Error(`error when trying to deserialize Journey Json - unknown journey type ${e.journeyType}`)}return t.challenge=e.challenge,t.assertionId=e.assertionId,t.userId=e.userId,t.sessionId=e.sessionId,t.deviceId=e.deviceId,t.actionType=e.actionType,t}(i),this.journey.encrypted&&!this.journey.isReady())throw new gu("Failed to restore encryption context after redirection",eu.InvalidState);return this.correlationId=i.correlationId,r}async getInternalHeaders(){const e=[];this.journey&&e.push(...this.journey.getInternalHeaders()),this.correlationId&&e.push({type:"correlation_id",correlation_id:this.correlationId});const t=await this.getDeviceHeader();return t&&e.push(t),e}async getDeviceHeader(){var e,t;try{const i=Qd.crypto.createCryptoBinding("sign"),{keyIdentifier:r,publicKey:n}=null!==(e=await i.getPublicData())&&void 0!==e?e:{};return r&&n?{type:"device",device:{device_key_id:r,device_public_key:n,device_type:"web",device_os:navigator.platform.toLowerCase(),device_os_version:(null===(t=navigator.userAgent.match(/(?:Version|Edge|Chrome|Firefox|Safari)\/(\d+\.\d+)/))||void 0===t?void 0:t[1])||"unknown",device_manufacturer:navigator.vendor||"unknown",device_model:navigator.platform||"unknown"}}:null}catch(e){return nu.error("Failed to create device header"),null}}getQueryParams(){var e,i;const r=t({aid:"default_application",clientId:this.clientId,locale:window.navigator.language||"en-US"},this.journey?this.journey.getQueryParams():{});return(null===(e=this.journey)||void 0===e?void 0:e.deviceId)&&(r.did=this.journey.deviceId),(null===(i=this.journey)||void 0===i?void 0:i.sessionId)&&(r.sid=this.journey.sessionId),this.resource&&(r.resource=this.resource),this.locale&&(r.locale=this.locale),r}async invokeJourney(e){var t,i,r;this.journey=e;const n=await this.getInternalHeaders(),a={data:e.getInvocationData(),headers:n};try{const e=await(null===(i=null===(t=null===window||void 0===window?void 0:window.tsPlatform)||void 0===t?void 0:t.drs)||void 0===i?void 0:i.getSessionToken());e&&a.headers.push(this.buildDrsSessionTokenSdkHeader(e))}catch(e){nu.warning(`Could not obtain DRS session token: ${e}`)}try{const t=await(null===(r=this.api)||void 0===r?void 0:r.sendRequest(e.getInvocationPath(),this.getQueryParams(),a,this.journey));if(!t)throw new Cp;return e.userId=this.getIdentifier(t,"uid"),e.sessionId=this.getIdentifier(t,"session_id"),e.deviceId=this.getIdentifier(t,"device_id"),e.active(),this.handleServiceResponse(t)}catch(e){throw this.rejectJourney(),e}}buildDrsSessionTokenSdkHeader(e){return{type:"drs_session_token",drs_session_token:{token:e}}}handleJourneyState(e){switch(e){case mu.TextRejection:case mu.JsonRejection:this.rejectJourney();break;case mu.JourneyEnd:this.completeJourney();break;case mu.NextAction:case mu.UpdateAction:break;default:throw Error(`Unhandled service response state: ${e}`)}}completeJourney(){var e;null===(e=this.journey)||void 0===e||e.complete()}rejectJourney(){var e;null===(e=this.journey)||void 0===e||e.reject()}async generateDebugPin(){var e;if(!this.journey)throw new gu("Error occurred while trying to generate debug pin since no journey is active",eu.NoActiveJourney);const t=await this.getInternalHeaders(),i=await(null===(e=this.api)||void 0===e?void 0:e.sendRequest(lu.path,this.getQueryParams(),{headers:t,data:{}},this.journey));if(!i)throw new Cp;return i.data.debug_pin}};Qd.events.on(Qd.events.MODULE_INITIALIZED,(async()=>{var e;const t=Qd.moduleMetadata.getInitConfig();if(!(null===(e=null==t?void 0:t.ido)||void 0===e?void 0:e.serverPath))return;const{clientId:i,ido:r}=t;await Rp.init(i,r)})),function(){var e,t;const i="undefined"!=typeof window&&"undefined"!=typeof document;if("undefined"!=typeof globalThis&&void 0!==globalThis.process&&(null===(t=null===(e=globalThis.process)||void 0===e?void 0:e.versions)||void 0===t?void 0:t.node)&&!i)throw new Error("\n🚫 @TransmitSecurity/web-sdk is a BROWSER-ONLY package.\n\nāŒ Node.js environments are not supported.\nāœ… Use this package in web browsers only.\n\nFor more information, visit: https://github.com/transmitsecurity-dev/ciam-web-sdk#browser-only\n");i||console.warn("āš ļø @TransmitSecurity/web-sdk: Browser environment not detected. Some features may not work correctly.")}();const Bp={drs:la,idv:dd};var zp=new class{constructor(){this.factories=Bp,Object.assign(this,la),Object.assign(this,dd)}};const Pp="1.17.1";export{Pp as PACKAGE_VERSION,Hd as authenticate,Jd as crossDevice,zp as default,la as drs,Zd as getDefaultPaths,Rp as ido,dd as idv,g as initialize,Wd as isAutofillSupported,Gd as isPlatformAuthenticatorSupported,$d as register,Yd as webauthn};