@transmitsecurity/platform-web-sdk 1.17.1 → 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/idv.cjs ADDED
@@ -0,0 +1 @@
1
+ "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));const e=Symbol("MODULE_INITIALIZED"),t=new Map;function i(e,i){var n,r;null===(n=t.get(e))||void 0===n||n.forEach((r=e=>e(i),function(){try{return r(...arguments)}catch(e){console.log(e)}}))}let n=null;function r(e){n=e}var a=Object.freeze({__proto__:null,getInitConfig:function(){return n},get initConfig(){return n},setInitConfig:r});function o(t){r(t),i(e,void 0)}var s=Object.freeze({__proto__:null,initialize:o});function l(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?l(Object(i),!0).forEach((function(t){d(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;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 d(e,t,i){return(t=c(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function h(e,t){if(null==e)return{};var i,n,r=function(e,t){if(null==e)return{};var i,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function g(e,t){return Object.entries(t).reduce(((t,i)=>{let[n,r]=i;return u(u({},t),{},{[n]:p.isPrototypeOf(r)?new r(e.slug):"function"==typeof r?r.bind(e):"object"==typeof r&&!Array.isArray(r)&&r?g(e,r):r})}),{})}class p{constructor(e){this.slug=e}static create(e){return class extends p{constructor(t){super(t),Object.assign(this,g(this,e(this)))}}}}var f=Object.freeze({__proto__:null,Agent:p}),m=Object.freeze({__proto__:null,MODULE_INITIALIZED:e,emit:i,off:function(e,i){const n=t.get(e);if(!n)return;const r=n.indexOf(i);-1!==r&&n.splice(r,1)},on:function(e,i){var n;t.has(e)?null===(n=t.get(e))||void 0===n||n.push(i):t.set(e,[i])}});function _(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 x(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 v="tsec",b="general";function y(e){return e?b:n.clientId}function w(e){return function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}((e?sessionStorage:localStorage).getItem(v))}function E(e,t){const i=e?sessionStorage:localStorage,n=t(w(e));i.setItem(v,JSON.stringify(n))}var k=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:v,GENERAL_ID_KEY:b,getValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly),[r]=_(n,[this.slug.toString(),i]);return r[e]},hasValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral),n=w(!!t.sessionOnly);return x(n,[this.slug.toString(),i,e])},removeValue:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=y(!!t.isGeneral);E(!!t.sessionOnly,(t=>{const[n,r]=_(t,[this.slug.toString(),i]);return delete n[e],r}))},setValue:function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=y(!!i.isGeneral);E(!!i.sessionOnly,(i=>{const[r,a]=_(i,[this.slug.toString(),n]);return r[e]=t,a}))}});const A="RSA-PSS",C=async(e,t)=>await window.crypto.subtle.generateKey({name:e,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!1,t),D=async()=>await C("RSA-OAEP",["encrypt","decrypt"]),S=async()=>await C(A,["sign"]),T=async(e,t)=>{const i=(new TextEncoder).encode(t);return await window.crypto.subtle.sign({name:A,saltLength:32},e,i)};class I{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 n=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);n.onupgradeneeded=()=>{var t;const i=n.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"})},n.onsuccess=()=>{const r=n.result,a=r.transaction(e,(null==i?void 0:i.operation)||"readwrite"),o=a.objectStore(e);t(o),a.oncomplete=()=>{r.close()}}}put(e,t,i){return new Promise(((n,r)=>{this.queryObjectStore(e,(e=>{const a=e.put({key:t,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=e=>{r("Failed adding item to objectStore, err: "+e)}}))}))}add(e,t,i){return new Promise(((n,r)=>{this.queryObjectStore(e,(e=>{const a=e.add({key:t,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=e=>{const t=e.target.error;r(t)}}))}))}get(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.get(t);r.onsuccess=()=>{var e;r.result?i(null===(e=r.result)||void 0===e?void 0:e.value):i(void 0)},r.onerror=e=>{n("Failed adding item to objectStore, err: "+e)}}))}))}getAll(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.getAll(null,t);r.onsuccess=()=>{if(r.result){const e=r.result;(null==e?void 0:e.length)?i(e.map((e=>null==e?void 0:e.value))):i(e)}else i([])},r.onerror=e=>{n("Failed getting items, err: "+e)}}))}))}delete(e,t){return new Promise(((i,n)=>{this.queryObjectStore(e,(e=>{const r=e.delete(t);r.onsuccess=()=>{i()},r.onerror=e=>{n(`Failed deleting key: '${t}' from objectStore, err: `+e)}}))}))}clear(e){return new Promise(((t,i)=>{this.queryObjectStore(e,(e=>{const n=e.clear();n.onsuccess=()=>{t()},n.onerror=e=>{i("Failed clearing objectStore, err: "+e)}}))}))}}const M="platform",R="init",B="completed",F="RSA2048",z=[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,a,o,s;this.agent=e,this.keysType=t,this.options=i,this._extractingKeysPromise=null;const l=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=l||!(null===(a=this.options)||void 0===a?void 0:a.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=l?1:(null===(o=this.options)||void 0===o?void 0:o.dbVersion)||1,this.keysStoreName=l||!(null===(s=this.options)||void 0===s?void 0:s.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new I(l?M:e.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new I((l?M:e.slug)+`:${n.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 S():await D()}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:n}=await this.getPKRepresentations(i.publicKey);return this.publicKeyBase64=n,this.keyIdentifier=i.keyIdentifier,i})();try{return await this._extractingKeysPromise}finally{this._extractingKeysPromise=null}}async generateKeyPairData(e){const t=await this.generateKeyPair(),{arrayBufferKey:i}=await this.getPKRepresentations(t.publicKey),n=e||await this.calcKeyIdentifier(i);return u(u({},t),{},{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 n=24*i.expiryDays*60*60*1e3,r=e.createdDate&&e.createdDate>=i.startedAt?e.createdDate:i.startedAt;return Date.now()-r>n-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 t=this.getRotatedKeysRecordKey(),i=await this.getKeysData(),n=u(u({},i),{},{createdDate:i.createdDate||Date.now()});e=await this.saveKeyData(t,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 T(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:F,tenantId:this.options.keyRotation.tenantId}}async getRotationData(){var e,t;if(!(null===(t=null===(e=this.options)||void 0===e?void 0:e.keyRotation)||void 0===t?void 0:t.isEnabled))return;this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData();const i=await this.extractPendingRotatedKeysData();if(i){const{base64Key:e}=await this.getPKRepresentations(i.publicKey),{privateKey:t}=await this.extractKeysData(),n=u(u({},this.getBaseRotationPayload()),{},{newPublicKey:e,createdDate:i.createdDate,newPublicKeyType:F}),r=JSON.stringify(n);return{data:r,signature:await this.signPayload(r,t)}}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 T(t,e);return this.arrayBufferToBase64(i)}async handleRotateResponse(e){if(z.includes(e))if(e===R){const e=await this.extractPendingRotatedKeysData();if(e){await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKey());const t=u(u({},e),{},{confirmed:!1});await this.indexedDBClient.put(this.keysStoreName,this.getRotatedKeysRecordKey(),t),await this.indexedDBClient.delete(this.keysStoreName,this.getRotatedKeysRecordKeyPending());const{base64Key:i}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=i,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(),u(u({},e),{},{confirmed:!0}))}}}var P=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:D,generateRSASignKeyPair:S,signAssymetric:T,verifyAssymetric:async(e,t,i)=>{const n=(new TextEncoder).encode(t);return await window.crypto.subtle.verify(A,e,i,n)}}),N=Object.freeze({__proto__:null});const L=p.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 U=p.create((()=>u({exceptions:L},f)));class j{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 n=this.middlewares.map((e=>e(this)));Promise.all(n).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 j(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",n=new URL(i);n.search=(null==t?void 0:t.toString())||"",n.pathname=e;return n.href.replace(i,"")}const $={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function V(e,t,i){var n;const r=(a=t||{},encodeURI(JSON.stringify(a)).split(/%..|./).length-1);var a;return{method:e,headers:u(u(u({},{"X-TS-body-size":String(r)}),$),i||{}),body:null!==(n=t&&JSON.stringify(t||{}))&&void 0!==n?n:void 0}}function H(e,t,i,n,r){const a=K(e,n),o=V(t,i,r);return fetch(a,o)}async function G(e,t,i,n,r){let a;if(a=await H(e,t,i,n,r),!a.ok)throw new Error("Request failed");return a}var Z=Object.freeze({__proto__:null,httpDelete:async function(e,t){const i=await G(e,"DELETE",void 0,void 0,t);return u(u({data:await i.json()},i),{},{headers:i.headers})},httpGet:async function(e,t,i){const n=await G(e,"GET",void 0,t,i);return u(u({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(e,t,i,n){const r=await G(e,"POST",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},httpPut:async function(e,t,i,n){const r=await G(e,"PUT",t,i,n);return u(u({data:await r.json()},r),{},{headers:r.headers})},init:V}),Y=p.create((()=>({events:m,moduleMetadata:a,mainEntry:s,utils:U,storage:k,crypto:P,indexedDB:N,logger:q,http:Z}))),W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X={},Q={};function ee(e){let t=e.length;for(;--t>=0;)e[t]=0}const te=256,ie=286,ne=30,re=15,ae=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]),oe=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]),se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),le=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);ee(ue);const ce=new Array(60);ee(ce);const de=new Array(512);ee(de);const he=new Array(256);ee(he);const ge=new Array(29);ee(ge);const pe=new Array(ne);function fe(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let me,_e,xe;function ve(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}ee(pe);const be=e=>e<256?de[e]:de[256+(e>>>7)],ye=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},we=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,ye(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)=>{we(e,i[2*t],i[2*t+1])},ke=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},Ae=(e,t,i)=>{const n=new Array(16);let r,a,o=0;for(r=1;r<=re;r++)n[r]=o=o+i[r-1]<<1;for(a=0;a<=t;a++){let t=e[2*a+1];0!==t&&(e[2*a]=ke(n[t]++,t))}},Ce=e=>{let t;for(t=0;t<ie;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},De=e=>{e.bi_valid>8?ye(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Se=(e,t,i,n)=>{const r=2*t,a=2*i;return e[r]<e[a]||e[r]===e[a]&&n[t]<=n[i]},Te=(e,t,i)=>{const n=e.heap[i];let r=i<<1;for(;r<=e.heap_len&&(r<e.heap_len&&Se(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!Se(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n},Ie=(e,t,i)=>{let n,r,a,o,s=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],r=e.pending_buf[e.l_buf+s],s++,0===n?Ee(e,r,t):(a=he[r],Ee(e,a+te+1,t),o=ae[a],0!==o&&(r-=ge[a],we(e,r,o)),n--,a=be(n),Ee(e,a,i),o=oe[a],0!==o&&(n-=pe[a],we(e,n,o)))}while(s<e.last_lit);Ee(e,256,t)},Me=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,l,u=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)0!==i[2*o]?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):i[2*o+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,i[2*l]=1,e.depth[l]=0,e.opt_len--,r&&(e.static_len-=n[2*l+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)Te(e,i,o);l=a;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Te(e,i,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,i[2*l]=i[2*o]+i[2*s],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,i[2*o+1]=i[2*s+1]=l,e.heap[1]=l++,Te(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,c,d,h,g,p,f=0;for(h=0;h<=re;h++)e.bl_count[h]=0;for(i[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)c=e.heap[u],h=i[2*i[2*c+1]+1]+1,h>l&&(h=l,f++),i[2*c+1]=h,c>n||(e.bl_count[h]++,g=0,c>=s&&(g=o[c-s]),p=i[2*c],e.opt_len+=p*(h+g),a&&(e.static_len+=p*(r[2*c+1]+g)));if(0!==f){do{for(h=l-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,f-=2}while(f>0);for(h=l;0!==h;h--)for(c=e.bl_count[h];0!==c;)d=e.heap[--u],d>n||(i[2*d+1]!==h&&(e.opt_len+=(h-i[2*d+1])*i[2*d],i[2*d+1]=h),c--)}})(e,t),Ae(i,u,e.bl_count)},Re=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=t[2*(n+1)+1],++s<l&&r===o||(s<u?e.bl_tree[2*r]+=s:0!==r?(r!==a&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4))},Be=(e,t,i)=>{let n,r,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),n=0;n<=i;n++)if(r=o,o=t[2*(n+1)+1],!(++s<l&&r===o)){if(s<u)do{Ee(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==a&&(Ee(e,r,e.bl_tree),s--),Ee(e,16,e.bl_tree),we(e,s-3,2)):s<=10?(Ee(e,17,e.bl_tree),we(e,s-3,3)):(Ee(e,18,e.bl_tree),we(e,s-11,7));s=0,a=r,0===o?(l=138,u=3):r===o?(l=6,u=3):(l=7,u=4)}};let Fe=!1;const ze=(e,t,i,n)=>{we(e,0+(n?1:0),3),((e,t,i,n)=>{De(e),n&&(ye(e,i),ye(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};Q._tr_init=e=>{Fe||((()=>{let e,t,i,n,r;const a=new Array(16);for(i=0,n=0;n<28;n++)for(ge[n]=i,e=0;e<1<<ae[n];e++)he[i++]=n;for(he[i-1]=n,r=0,n=0;n<16;n++)for(pe[n]=r,e=0;e<1<<oe[n];e++)de[r++]=n;for(r>>=7;n<ne;n++)for(pe[n]=r<<7,e=0;e<1<<oe[n]-7;e++)de[256+r++]=n;for(t=0;t<=re;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(Ae(ue,287,a),e=0;e<ne;e++)ce[2*e+1]=5,ce[2*e]=ke(e,5);me=new fe(ue,ae,257,ie,re),_e=new fe(ce,oe,0,ne,re),xe=new fe(new Array(0),se,0,19,7)})(),Fe=!0),e.l_desc=new ve(e.dyn_ltree,me),e.d_desc=new ve(e.dyn_dtree,_e),e.bl_desc=new ve(e.bl_tree,xe),e.bi_buf=0,e.bi_valid=0,Ce(e)},Q._tr_stored_block=ze,Q._tr_flush_block=(e,t,i,n)=>{let r,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<te;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Me(e,e.l_desc),Me(e,e.d_desc),o=(e=>{let t;for(Re(e,e.dyn_ltree,e.l_desc.max_code),Re(e,e.dyn_dtree,e.d_desc.max_code),Me(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*le[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=i+5,i+4<=r&&-1!==t?ze(e,t,i,n):4===e.strategy||a===r?(we(e,2+(n?1:0),3),Ie(e,ue,ce)):(we(e,4+(n?1:0),3),((e,t,i,n)=>{let r;for(we(e,t-257,5),we(e,i-1,5),we(e,n-4,4),r=0;r<n;r++)we(e,e.bl_tree[2*le[r]+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),Ie(e,e.dyn_ltree,e.dyn_dtree)),Ce(e),n&&De(e)},Q._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*(he[i]+te+1)]++,e.dyn_dtree[2*be(t)]++),e.last_lit===e.lit_bufsize-1),Q._tr_align=e=>{we(e,2,3),Ee(e,256,ue),(e=>{16===e.bi_valid?(ye(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 Oe=(e,t,i,n)=>{let r=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{r=r+t[n++]|0,a=a+r|0}while(--o);r%=65521,a%=65521}return r|a<<16|0};const Pe=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Ne=(e,t,i,n)=>{const r=Pe,a=n+i;e^=-1;for(let i=n;i<a;i++)e=e>>>8^r[255&(e^t[i])];return-1^e},Le={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:je,_tr_stored_block:qe,_tr_flush_block:Ke,_tr_tally:$e,_tr_align:Ve}=Q,He=Oe,Ge=Ne,Ze=Le,{Z_NO_FLUSH:Ye,Z_PARTIAL_FLUSH:We,Z_FULL_FLUSH:Je,Z_FINISH:Xe,Z_BLOCK:Qe,Z_OK:et,Z_STREAM_END:tt,Z_STREAM_ERROR:it,Z_DATA_ERROR:nt,Z_BUF_ERROR:rt,Z_DEFAULT_COMPRESSION:at,Z_FILTERED:ot,Z_HUFFMAN_ONLY:st,Z_RLE:lt,Z_FIXED:ut,Z_DEFAULT_STRATEGY:ct,Z_UNKNOWN:dt,Z_DEFLATED:ht}=Ue,gt=258,pt=262,ft=103,mt=113,_t=666,xt=(e,t)=>(e.msg=Ze[t],t),vt=e=>(e<<1)-(e>4?9:0),bt=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let yt=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const wt=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)=>{Ke(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,wt(e.strm)},kt=(e,t)=>{e.pending_buf[e.pending++]=t},At=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ct=(e,t,i,n)=>{let r=e.avail_in;return r>n&&(r=n),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),i),1===e.state.wrap?e.adler=He(e.adler,t,r,i):2===e.state.wrap&&(e.adler=Ge(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)},Dt=(e,t)=>{let i,n,r=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-pt?e.strstart-(e.w_size-pt):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+gt;let g=u[a+o-1],p=u[a+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,u[i+o]===p&&u[i+o-1]===g&&u[i]===u[a]&&u[++i]===u[a+1]){a+=2,i++;do{}while(u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&u[++a]===u[++i]&&a<h);if(n=gt-(h-a),a=h-gt,n>o){if(e.match_start=t,o=n,n>=s)break;g=u[a+o-1],p=u[a+o]}}}while((t=d[t&c])>l&&0!=--r);return o<=e.lookahead?o:e.lookahead},St=e=>{const t=e.w_size;let i,n,r,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-pt)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do{r=e.head[--i],e.head[i]=r>=t?r-t:0}while(--n);n=t,i=n;do{r=e.prev[--i],e.prev[i]=r>=t?r-t:0}while(--n);a+=t}if(0===e.strm.avail_in)break;if(n=Ct(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=yt(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=yt(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<pt&&0!==e.strm.avail_in)},Tt=(e,t)=>{let i,n;for(;;){if(e.lookahead<pt){if(St(e),e.lookahead<pt&&t===Ye)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=yt(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-pt&&(e.match_length=Dt(e,i)),e.match_length>=3)if(n=$e(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=yt(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=yt(e,e.ins_h,e.window[e.strstart+1]);else n=$e(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(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},It=(e,t)=>{let i,n,r;for(;;){if(e.lookahead<pt){if(St(e),e.lookahead<pt&&t===Ye)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=yt(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-pt&&(e.match_length=Dt(e,i),e.match_length<=5&&(e.strategy===ot||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,n=$e(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=yt(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++,n&&(Et(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=$e(e,0,e.window[e.strstart-1]),n&&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&&(n=$e(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 Mt(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}const Rt=[new Mt(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(St(e),0===e.lookahead&&t===Ye)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+i;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Et(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-pt&&(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 Mt(4,4,8,4,Tt),new Mt(4,5,16,8,Tt),new Mt(4,6,32,32,Tt),new Mt(4,4,16,16,It),new Mt(8,16,32,32,It),new Mt(8,16,128,128,It),new Mt(8,32,128,256,It),new Mt(32,128,258,1024,It),new Mt(32,258,258,4096,It)];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=ht,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),bt(this.dyn_ltree),bt(this.dyn_dtree),bt(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),bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),bt(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 Ft=e=>{if(!e||!e.state)return xt(e,it);e.total_in=e.total_out=0,e.data_type=dt;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:mt,e.adler=2===t.wrap?0:1,t.last_flush=Ye,je(t),et},zt=e=>{const t=Ft(e);return t===et&&(e=>{e.window_size=2*e.w_size,bt(e.head),e.max_lazy_match=Rt[e.level].max_lazy,e.good_match=Rt[e.level].good_length,e.nice_match=Rt[e.level].nice_length,e.max_chain_length=Rt[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},Ot=(e,t,i,n,r,a)=>{if(!e)return it;let o=1;if(t===at&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||i!==ht||n<8||n>15||t<0||t>9||a<0||a>ut)return xt(e,it);8===n&&(n=9);const s=new Bt;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+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<<r+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,zt(e)};X.deflateInit=(e,t)=>Ot(e,t,ht,15,8,ct),X.deflateInit2=Ot,X.deflateReset=zt,X.deflateResetKeep=Ft,X.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?it:(e.state.gzhead=t,et):it,X.deflate=(e,t)=>{let i,n;if(!e||!e.state||t>Qe||t<0)return e?xt(e,it):it;const r=e.state;if(!e.output||!e.input&&0!==e.avail_in||r.status===_t&&t!==Xe)return xt(e,0===e.avail_out?rt:it);r.strm=e;const a=r.last_flush;if(r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kt(r,31),kt(r,139),kt(r,8),r.gzhead?(kt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kt(r,255&r.gzhead.time),kt(r,r.gzhead.time>>8&255),kt(r,r.gzhead.time>>16&255),kt(r,r.gzhead.time>>24&255),kt(r,9===r.level?2:r.strategy>=st||r.level<2?4:0),kt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kt(r,255&r.gzhead.extra.length),kt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ge(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kt(r,0),kt(r,0),kt(r,0),kt(r,0),kt(r,0),kt(r,9===r.level?2:r.strategy>=st||r.level<2?4:0),kt(r,3),r.status=mt);else{let t=ht+(r.w_bits-8<<4)<<8,i=-1;i=r.strategy>=st||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=i<<6,0!==r.strstart&&(t|=32),t+=31-t%31,r.status=mt,At(r,t),0!==r.strstart&&(At(r,e.adler>>>16),At(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending!==r.pending_buf_size));)kt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,kt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),wt(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,kt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ge(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.status=ft)}else r.status=ft;if(r.status===ft&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&wt(e),r.pending+2<=r.pending_buf_size&&(kt(r,255&e.adler),kt(r,e.adler>>8&255),e.adler=0,r.status=mt)):r.status=mt),0!==r.pending){if(wt(e),0===e.avail_out)return r.last_flush=-1,et}else if(0===e.avail_in&&vt(t)<=vt(a)&&t!==Xe)return xt(e,rt);if(r.status===_t&&0!==e.avail_in)return xt(e,rt);if(0!==e.avail_in||0!==r.lookahead||t!==Ye&&r.status!==_t){let i=r.strategy===st?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(St(e),0===e.lookahead)){if(t===Ye)return 1;break}if(e.match_length=0,i=$e(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})(r,t):r.strategy===lt?((e,t)=>{let i,n,r,a;const o=e.window;for(;;){if(e.lookahead<=gt){if(St(e),e.lookahead<=gt&&t===Ye)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,n=o[r],n===o[++r]&&n===o[++r]&&n===o[++r])){a=e.strstart+gt;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<a);e.match_length=gt-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=$e(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=$e(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})(r,t):Rt[r.level].func(r,t);if(3!==i&&4!==i||(r.status=_t),1===i||3===i)return 0===e.avail_out&&(r.last_flush=-1),et;if(2===i&&(t===We?Ve(r):t!==Qe&&(qe(r,0,0,!1),t===Je&&(bt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),wt(e),0===e.avail_out))return r.last_flush=-1,et}return t!==Xe?et:r.wrap<=0?tt:(2===r.wrap?(kt(r,255&e.adler),kt(r,e.adler>>8&255),kt(r,e.adler>>16&255),kt(r,e.adler>>24&255),kt(r,255&e.total_in),kt(r,e.total_in>>8&255),kt(r,e.total_in>>16&255),kt(r,e.total_in>>24&255)):(At(r,e.adler>>>16),At(r,65535&e.adler)),wt(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?et:tt)},X.deflateEnd=e=>{if(!e||!e.state)return it;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==ft&&t!==mt&&t!==_t?xt(e,it):(e.state=null,t===mt?xt(e,nt):et)},X.deflateSetDictionary=(e,t)=>{let i=t.length;if(!e||!e.state)return it;const n=e.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return it;if(1===r&&(e.adler=He(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===r&&(bt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.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,St(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,St(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,n.wrap=r,et},X.deflateInfo="pako deflate (from Nodeca project)";var Pt={};const Nt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Pt.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)Nt(i,t)&&(e[t]=i[t])}}return e},Pt.flattenChunks=e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,r=e.length;t<r;t++){let r=e[t];i.set(r,n),n+=r.length}return i};var Lt={};let Ut=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Ut=!1}const jt=new Uint8Array(256);for(let e=0;e<256;e++)jt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;jt[254]=jt[254]=1,Lt.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,a,o=e.length,s=0;for(r=0;r<o;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),a=0,r=0;a<s;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),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};Lt.buf2string=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,r;const a=new Array(2*i);for(r=0,n=0;n<i;){let t=e[n++];if(t<128){a[r++]=t;continue}let o=jt[t];if(o>4)a[r++]=65533,n+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&n<i;)t=t<<6|63&e[n++],o--;o>1?a[r++]=65533:t<65536?a[r++]=t:(t-=65536,a[r++]=55296|t>>10&1023,a[r++]=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 n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(a,r)},Lt.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+jt[e[i]]>t?i:t};const qt=X,Kt=Pt,$t=Lt,Vt=Le,Ht=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:Zt,Z_SYNC_FLUSH:Yt,Z_FULL_FLUSH:Wt,Z_FINISH:Jt,Z_OK:Xt,Z_STREAM_END:Qt,Z_DEFAULT_COMPRESSION:ei,Z_DEFAULT_STRATEGY:ti,Z_DEFLATED:ii}=Ue;function ni(e){this.options=Kt.assign({level:ei,method:ii,chunkSize:16384,windowBits:15,memLevel:8,strategy:ti},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 Ht,this.strm.avail_out=0;let i=qt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==Xt)throw new Error(Vt[i]);if(t.header&&qt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?$t.string2buf(t.dictionary):"[object ArrayBuffer]"===Gt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=qt.deflateSetDictionary(this.strm,e),i!==Xt)throw new Error(Vt[i]);this._dict_set=!0}}ni.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let r,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Jt:Zt,"string"==typeof e?i.input=$t.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(n),i.next_out=0,i.avail_out=n),(a===Yt||a===Wt)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(r=qt.deflate(i,a),r===Qt)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),r=qt.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===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=Kt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ri=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||Vt[i.err];return i.result}(e,t)};const ai=["enabled","userId"];var oi,si,li=["drs"];oi=li,si=162,function(e){for(;--e;)oi.push(oi.shift())}(++si);var ui,ci,di,hi=new Y((ui="0x0",li[ui-=0])),gi=["setItemSessionStorageSafe","removeItem","getItemLocalStorageSafe","FALLBACK_LOCAL_STORAGE","setItemLocalStorageSafe","localStorage","setItem","removeItemLocalStorageSafe","clientId","setClientId","getFullStorageKey","getItemSessionStorageSafe","sessionStorage","getItem","FALLBACK_SESSION_STORAGE"];ci=gi,di=293,function(e){for(;--e;)ci.push(ci.shift())}(++di);var pi=function(e,t){return gi[e-=0]};class fi{constructor(e){this.FALLBACK_SESSION_STORAGE={},this.FALLBACK_LOCAL_STORAGE={},this[pi("0x0")]=e}getClientId(){return this[pi("0x0")]}[pi("0x1")](e){this[pi("0x0")]=e}[pi("0x2")](e){return this.clientId+"_"+e}[pi("0x3")](e){const t=this[pi("0x2")](e);try{return window[pi("0x4")][pi("0x5")](t)}catch(e){return this[pi("0x6")][t]}}[pi("0x7")](e,t){const i=this[pi("0x2")](e);try{window[pi("0x4")].setItem(i,t)}catch(e){this[pi("0x6")][i]=t}}removeItemSessionStorageSafe(e){const t=this.getFullStorageKey(e);try{window.sessionStorage[pi("0x8")](t)}catch(e){this[pi("0x6")][t]=void 0}}[pi("0x9")](e){const t=this[pi("0x2")](e);try{return window.localStorage[pi("0x5")](t)}catch(e){return this[pi("0xa")][t]}}[pi("0xb")](e,t){const i=this.getFullStorageKey(e);try{window[pi("0xc")][pi("0xd")](i,t)}catch(e){this[pi("0xa")][i]=t}}[pi("0xe")](e){const t=this[pi("0x2")](e);try{window.localStorage.removeItem(t)}catch(e){this[pi("0xa")][t]=void 0}}}var mi,_i,xi=["pushLog","error","enabled","log","%s %s %s","stringify","push","now","unshift","map","catch","formatter","logPrefix","logsLimit","logs","middlewares","info"];mi=xi,_i=131,function(e){for(;--e;)mi.push(mi.shift())}(++_i);var vi=function(e,t){return xi[e-=0]};class bi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.enabled=e,this[vi("0x0")]="[AccountProtection SDK]",this[vi("0x1")]=1e4,this[vi("0x2")]=[],this[vi("0x3")]=[]}[vi("0x4")](e,t){this.pushLog(3,e,t)}warn(e,t){this[vi("0x5")](4,e,t)}[vi("0x6")](e,t){this[vi("0x5")](5,e,t)}flush(){const e=this[vi("0x2")];return this[vi("0x2")]=[],e}pushLog(e,t,i){this[vi("0x7")]&&console[vi("0x8")](vi("0x9"),this[vi("0x0")],t,JSON[vi("0xa")](i)),this[vi("0x2")][vi("0xb")]({timestamp:Date[vi("0xc")](),severity:e,text:JSON[vi("0xa")](u(u({},i),{},{message:t}),this.formatter)}),this[vi("0x2")].length>this.logsLimit&&this[vi("0x2")][vi("0xd")]();const n=this[vi("0x3")][vi("0xe")]((e=>e()));Promise.all(n)[vi("0xf")]((()=>{}))}[vi("0x10")](e,t){if(t instanceof Error){const{name:e,stack:i,message:n}=t;return{name:e,stack:i,message:n}}return t}}const yi=new bi;var wi,Ei,ki=["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"];wi=ki,Ei=459,function(e){for(;--e;)wi.push(wi.shift())}(++Ei);var Ai=function(e,t){return ki[e-=0]};const Ci=Ai("0x0"),Di=Ai("0x1");class Si{constructor(e,t){this[Ai("0x2")]=e,this[Ai("0x3")]=t,this.conf=this[Ai("0x4")]()}async[Ai("0x5")](e){try{const t=Ai("0x6")+e,i=await this[Ai("0x3")][Ai("0x7")](t);return null!=i?i:{}}catch(t){return yi[Ai("0x8")](Ai("0x9"),{clientId:e,error:t}),{}}}loadConf(){const e=this[Ai("0x2")][Ai("0xa")](Di);if(null!=e)try{return JSON[Ai("0xb")](e)}catch(e){yi.error(Ai("0xc"),{error:e})}return{}}[Ai("0xd")](){const e=this.getConfValue(Ci,0);return Date[Ai("0xe")]()-e>36e5}async[Ai("0xf")](e){if(!this[Ai("0xd")]())return!1;let t=await this[Ai("0x5")](e);return 0==Object[Ai("0x10")](t)[Ai("0x11")]?t=this[Ai("0x4")]():this.storageManager[Ai("0x12")](Di,JSON[Ai("0x13")](t)),this[Ai("0x14")]=t,!0}[Ai("0x15")](e,t){const i=void 0!==this[Ai("0x14")]?this.conf[e]:void 0;return null!=i?i:t}}var Ti,Ii,Mi=["EVENT_TYPE_INTERACTION","interaction","identification","desktop_web","mobile_web","EVENT_TYPE_ACTION","EVENT_TYPE_DEVICE"];Ti=Mi,Ii=439,function(e){for(;--e;)Ti.push(Ti.shift())}(++Ii);var Ri,Bi,Fi=function(e,t){return Mi[e-=0]};(Bi=Ri||(Ri={}))[Fi("0x0")]="action",Bi[Fi("0x1")]="device",Bi[Fi("0x2")]=Fi("0x3"),Bi.EVENT_TYPE_IDENTIFICATION=Fi("0x4");const zi=Fi("0x5"),Oi=Fi("0x6");var Pi,Ni,Li=["push","maintainLastXItems","splice"];Pi=Li,Ni=478,function(e){for(;--e;)Pi.push(Pi.shift())}(++Ni);var Ui=function(e,t){return Li[e-=0]};class ji{static[Ui("0x0")](e,t,i){return e.length>=t&&e[Ui("0x1")](0,1),e[Ui("0x2")](i),e}}var qi,Ki,$i=["maintainLastXItems","location","isTrusted","buffer","extractEventData","getData","now","extractButtonsPressedData","ctrlKey","altKey","shiftKey","buttons","data","detail","offsetX","sourceCapabilities","firesTouchEvents","target","bufferSize","collect","cancelable","composed","view"];qi=$i,Ki=394,function(e){for(;--e;)qi.push(qi.shift())}(++Ki);var Vi=function(e,t){return $i[e-=0]};class Hi{constructor(e){this.data=[],this[Vi("0x0")]=e}collect(e){const t=this[Vi("0x1")](e);ji.maintainLastXItems(this.data,this[Vi("0x0")],t)}[Vi("0x2")](){return this.data}[Vi("0x1")](e){return u({x:e.x,y:e.y,tspl:Date[Vi("0x3")]()},this[Vi("0x4")](e))}extractButtonsPressedData(e){return u(u(u(u({},e[Vi("0x5")]&&{ctrlKey:!0}),e[Vi("0x6")]&&{altKey:!0}),e[Vi("0x7")]&&{shiftKey:!0}),0!=e[Vi("0x8")]&&{buttons:e[Vi("0x8")]})}}class Gi{constructor(e){this[Vi("0x9")]=[],this[Vi("0x0")]=e}collect(e){var t;const i={x:e.x,y:e.y,timestamp:Date[Vi("0x3")](),mouseButtonType:e[Vi("0xa")],offsetX:e[Vi("0xb")],offsetY:e.offsetY,isPressed:null==(null===(t=e[Vi("0xc")])||void 0===t?void 0:t[Vi("0xd")])?null:!e[Vi("0xc")].firesTouchEvents,target_id:e[Vi("0xe")].id};ji.maintainLastXItems(this[Vi("0x9")],this[Vi("0x0")],i)}getData(){const e=[...this.data];return this[Vi("0x9")]=[],e}}class Zi{constructor(e){this[Vi("0x9")]=[],this[Vi("0xf")]=e}[Vi("0x10")](e){var t;const i={isTrusted:e.isTrusted,cancelable:e[Vi("0x11")],composed:e[Vi("0x12")],isView:!!e[Vi("0x13")],shiftKey:e.shiftKey,metaKey:e.metaKey,firesTouchEvents:null===(t=e[Vi("0xc")])||void 0===t?void 0:t[Vi("0xd")],timestamp:Date[Vi("0x3")]()};ji[Vi("0x14")](this[Vi("0x9")],this.bufferSize,i)}[Vi("0x2")](){const e=[...this[Vi("0x9")]];return this.data=[],e}}class Yi{constructor(e){this.data=[],this.bufferSize=e}[Vi("0x10")](e){var t;const i={isTrusted:e.isTrusted,cancelable:e[Vi("0x11")],composed:e.composed,isView:!!e[Vi("0x13")],location:e[Vi("0x15")],shiftKey:e[Vi("0x7")],firesTouchEvents:null===(t=e.sourceCapabilities)||void 0===t?void 0:t[Vi("0xd")],timestamp:Date[Vi("0x3")]()};ji[Vi("0x14")](this.data,this.bufferSize,i)}[Vi("0x2")](){const e=this[Vi("0x9")];return this[Vi("0x9")]=[],e}}class Wi{constructor(e){this.data=[],this[Vi("0xf")]=e}[Vi("0x10")](e){const t={isTrusted:e[Vi("0x16")],cancelable:e[Vi("0x11")],composed:e[Vi("0x12")],inputType:e.inputType,isView:!!e.view,timestamp:Date[Vi("0x3")]()};ji.maintainLastXItems(this.data,this.bufferSize,t)}getData(){const e=this.data;return this[Vi("0x9")]=[],e}}class Ji{constructor(e){this[Vi("0x9")]=[],this[Vi("0xf")]=e}[Vi("0x10")](e){const t={isTrusted:e[Vi("0x16")],cancelable:e[Vi("0x11")],composed:e[Vi("0x12")],timestamp:Date[Vi("0x3")]()};ji[Vi("0x14")](this[Vi("0x9")],this[Vi("0xf")],t)}[Vi("0x2")](){const e=this.data;return this.data=[],e}}var Xi,Qi,en=["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=en,Qi=394,function(e){for(;--e;)Xi.push(Xi.shift())}(++Qi);var tn=function(e,t){return en[e-=0]};const nn=tn("0x0"),rn=tn("0x1"),an=tn("0x2"),on=tn("0x3"),sn="mouseup",ln=tn("0x4"),un=tn("0x5"),cn=tn("0x6"),dn=tn("0x7"),hn=tn("0x8"),gn=["INPUT","SELECT","TEXTAREA"];class pn{constructor(e,t,i){this[tn("0x9")]=e,this.mouseEventsCollectionBuffer=t,this[tn("0xa")]=i,this[tn("0xb")]={[rn]:{eventTypesToAttach:[on,sn,ln],attributesMapper:e=>{var t;return{x:e.x,y:e.y,mouseButtonType:e[tn("0xc")],isPressed:null==(null===(t=e[tn("0xd")])||void 0===t?void 0:t.firesTouchEvents)?null:!e.sourceCapabilities[tn("0xe")],offsetX:e[tn("0xf")],offsetY:e[tn("0x10")],target_id:e.target.id}}},[an]:{attributesMapper:e=>({target_id:e.target.id,isTrusted:e[tn("0x11")],cancelable:e.cancelable,composed:e.composed,dropEffect:e[tn("0x12")][tn("0x13")],effectAllowed:e[tn("0x12")].effectAllowed})},[un]:{attributesMapper:e=>({target_id:e.target.id})},[on]:{continousCollectors:[new Hi(this[tn("0x14")])]},[sn]:{continousCollectors:[new Gi(1)]},[ln]:{continousCollectors:[new Gi(1)]},focusout:{eventTypesToAttach:[hn,cn,dn,nn],filter:this[tn("0x15")],attributesMapper:e=>{const{target:t,isTrusted:i,cancelable:n,composed:r}=e;return u({target_id:t.id,dataset_keys:Object[tn("0x16")](t[tn("0x17")]||{}),isTrusted:i,cancelable:n,composed:r},navigator.virtualKeyboard&&{navigator_virtualKeyboard:navigator[tn("0x18")].overlaysContent})}},[hn]:{filter:this[tn("0x15")],continousCollectors:[new Wi(50)]},[cn]:{filter:this.inputTypeFilter,continousCollectors:[new Yi(50)]},[dn]:{filter:this.inputTypeFilter,continousCollectors:[new Zi(50)]},[nn]:{continousCollectors:[new Ji(50)]}}}[tn("0x15")](e){var t;const i=null===(t=e[tn("0x19")])||void 0===t?void 0:t[tn("0x1a")];return gn[tn("0x1b")](i)}[tn("0x1c")](){for(const[e,t]of Object[tn("0x1d")](this[tn("0xb")]))if(!this[tn("0x9")][tn("0x1b")](e))try{this[tn("0x1e")](e,t)}catch(t){yi.error(tn("0x1f"),{error:t,eventType:e})}}[tn("0x20")](e,t){return!e[tn("0x20")]||e[tn("0x20")](t)}async[tn("0x21")](e,t,i){const{attributesMapper:n,continousCollectors:r}=e;if(!this[tn("0x20")](e,t))return!1;if(r)r.forEach((e=>{e.collect(t)}));else{const e=this[tn("0x22")](),r=this[tn("0x23")](i),a=u(u(u({},e),n(t)),r&&{attachedEventsData:r});await this.safeEventCallback(i,a)}return!0}[tn("0x1e")](e,t){window[tn("0x24")](e,(async i=>{try{await this.handleEvent(t,i,e)}catch(e){yi[tn("0x25")](tn("0x26"),{error:e})}}))}[tn("0x23")](e){let t;const i=this[tn("0xb")][e][tn("0x27")];return i&&(t={},i[tn("0x28")]((e=>{const{continousCollectors:i}=this[tn("0xb")][e];i&&i[tn("0x28")]((i=>t[e]=i[tn("0x29")]()))}))),t}getGenericAttributes(){return{location:window[tn("0x2a")][tn("0x2b")]}}}var fn,mn,_n=["mobile","wow64","setTimeout","race","catch","warn","name","finally","userAgentData","getHighEntropyValues","model","platform","platformVersion","bitness"];fn=_n,mn=232,function(e){for(;--e;)fn.push(fn.shift())}(++mn);var xn=function(e,t){return _n[e-=0]};function vn(){var e;return null===(e=navigator[xn("0x0")])||void 0===e?void 0:e[xn("0x1")](["architecture",xn("0x2"),xn("0x3"),xn("0x4"),"fullVersionList",xn("0x5"),xn("0x6"),xn("0x7"),"uaFullVersion"])}function bn(e,t){let i;const n=[Promise.resolve(e()).catch((()=>{})),new Promise(((e,n)=>i=window[xn("0x8")](n,t)))];return Promise[xn("0x9")](n)[xn("0xa")]((()=>yi[xn("0xb")]("executor reached timeout",{fnName:e[xn("0xc")]})))[xn("0xd")]((()=>clearTimeout(i)))}var yn,wn,En=["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"];yn=En,wn=324,function(e){for(;--e;)yn.push(yn.shift())}(++wn);var kn=function(e,t){return En[e-=0]};const An=kn("0x0"),Cn=kn("0x1"),Dn=e=>e?[...e][kn("0x2")](((e,t)=>e+Math[kn("0x3")](t)),0):0;class Sn{constructor(e,t,i){this.storageManager=e,this[kn("0x4")]=t,this.cryptoBinding=i}async calculate(){const e=this[kn("0x4")][kn("0x5")](An,[]),t=this[kn("0x4")][kn("0x5")](Cn,36e5),i=await new Tn(e,this[kn("0x6")])[kn("0x7")]();return this[kn("0x8")]=i,this[kn("0x9")][kn("0xa")](Cn,Date[kn("0xb")]()+t),i}async[kn("0xc")](){return Number(this[kn("0x9")].getItemLocalStorageSafe(Cn))<Date[kn("0xb")]()||!this[kn("0x8")]?await this[kn("0xd")]()||{}:this.lastDeviceData||{}}}class Tn{constructor(e,t){this[kn("0x0")]=e,this[kn("0x6")]=t,this[kn("0xe")]={battery:this.getBattery,brave:this[kn("0xf")],canvas:this[kn("0x10")],codecs:this[kn("0x11")],connection:this[kn("0x12")],cookieEnabled:this[kn("0x13")],cryptoRandomValues:this[kn("0x14")],deviceMemory:this[kn("0x15")],documentBasedKeys:this[kn("0x16")],hardwareConcurrency:this[kn("0x17")],indexedDB:this[kn("0x18")],fidoEnabled:this[kn("0x19")],languages:this.getLanguages,language:this[kn("0x1a")],timezoneOffset:this[kn("0x1b")],localStorage:this[kn("0x1c")],navigatorBasedKeys:this[kn("0x1d")],navigatorProduct:this.getNavigatorProduct,navigatorUserAgent:this[kn("0x1e")],navigatorUAData:this.getNavigatorUAData,navigatorHighEntropyData:this[kn("0x1f")],navigatorStorageEstimation:this.navigatorStorageEstimation,navigatorOnLine:this[kn("0x20")],navigatorIsUserActive:this.navigatorIsUserActive,math:this.getMathFingerprint,mediaMatch:this[kn("0x21")],openDatabase:this.getOpenDatabase,windowOrientation:this[kn("0x22")],platform:this[kn("0x23")],cpuClass:this[kn("0x24")],osClass:this.getOsCpu,addBehavior:this[kn("0x25")],productSub:this[kn("0x26")],mediaDevices:this[kn("0x27")],audioFingerprint:this.getAudioFingerprint,audioFingerprintExtended:this.getAudioFingerprintExtended,fonts:this.getFonts,performanceTiming:this[kn("0x28")],performanceMemory:this.getPerformanceMemory,plugins:this[kn("0x29")],screen:this[kn("0x2a")],sequentum:this[kn("0x2b")],sessionStorage:this[kn("0x2c")],referrer:this[kn("0x2d")],timezone:this[kn("0x2e")],touchSupport:this.getTouchSupport,vendor:this.getVendor,buildID:this[kn("0x2f")],webdriver:this.getWebDriver,webGlRenderer:this[kn("0x30")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this.getWindowOuter,webRTCDisabled:this.webRTCDisabled,cryptoBindingData:this[kn("0x31")][kn("0x32")](this),notificationState:this[kn("0x33")][kn("0x32")](this,kn("0x34")),geolocationState:this.getNavigatorPermissionsState[kn("0x32")](this,"geolocation"),isGeoLocationExists:this[kn("0x35")],isSendBeaconExists:this[kn("0x36")],navigatorPrototype:this.getNavigatorPrototype,installedRelatedApps:this[kn("0x37")],windowConstructorAliasTest:this[kn("0x38")],windowDocumentAuxVarsTest:this[kn("0x39")],CDPRuntimeDomainTest:this.CDPRuntimeDomainTest}}[kn("0x3a")](){let e=!1;const t=new(window[kn("0x3b")]);return window[kn("0x3c")][kn("0x3d")](t,kn("0x3e"),{configurable:!1,enumerable:!1,get:function(){return e=!0,""}}),window.console.debug(t[kn("0x3e")]),e}[kn("0x39")](){for(const e of window[kn("0x3c")][kn("0x3f")](window[kn("0x40")]))if("$chrome_asyncScriptInfo"==e||/^\$cdc_[a-zA-Z0-9]{22}_$/[kn("0x41")](e))return!0;for(const e of window[kn("0x3c")][kn("0x42")](window[kn("0x3c")][kn("0x43")](window[kn("0x40")]))){if(!e.value||void 0===e[kn("0x44")].cache_)continue;const t=window[kn("0x3c")].getOwnPropertyNames(window[kn("0x3c")][kn("0x45")](e[kn("0x44")])),i=["storeItem","retrieveItem",kn("0x46")];if(t[kn("0x47")](),i[kn("0x47")](),t[kn("0x48")](((e,t)=>e==i[t])))return!0}return!1}[kn("0x38")](){const e=window[kn("0x3c")][kn("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[kn("0x49")],window[kn("0x4a")],window.Symbol])if(t!=(null==e?void 0:e[kn("0x4b")])&&"token"!=t&&t!=kn("0x4c")&&window[t]===e)return!0}return!1}async dataPointsExtractor(){const e=this[kn("0x4d")]();return await this.collectPromisesData(e)}startPromisesLoop(){const e={};for(const[t,i]of Object.entries(this[kn("0xe")]))if(!this[kn("0x0")][kn("0x4e")](t))try{e[t]=bn(i,100)}catch(i){yi[kn("0x4f")]("worker throw error",{e:i,key:t}),e[t]=Promise.resolve()}return e}async[kn("0x50")](e){const t={};for(const[i,n]of Object[kn("0x51")](e))try{t[i]=await n}catch(e){yi.warn("worker promise rejected",{e:e,key:i}),t[i]=void 0}return t}[kn("0x13")](){const e=navigator.cookieEnabled;return Promise[kn("0x52")](e)}async[kn("0x19")](){return!!navigator[kn("0x53")]&&await window[kn("0x54")][kn("0x55")]()}getCryptoRandomValues(){const e=window.crypto.getRandomValues(new Uint8Array(16));return Array[kn("0x56")](e)}[kn("0x57")](){const e=null==window[kn("0x58")];return Promise[kn("0x52")](e)}[kn("0x59")](){const e=["chrome","safari",kn("0x5a"),"__gCrWeb","yandex",kn("0x5b"),kn("0x5c"),"__firefox__",kn("0x5d"),kn("0x5e"),kn("0x5f"),kn("0x60"),kn("0x61"),kn("0x62"),kn("0x63"),kn("0x64"),kn("0x65"),"callPhantom",kn("0x66"),kn("0x67"),kn("0x68"),kn("0x69"),kn("0x6a"),kn("0x6b"),kn("0x6c"),kn("0x6d"),kn("0x6e"),kn("0x6f"),kn("0x70"),"__driver_evaluate","__driver_unwrapped",kn("0x71"),kn("0x72"),kn("0x73"),"__lastWatirConfirm",kn("0x74"),kn("0x75"),"__selenium_unwrapped",kn("0x76"),"__webdriver_evaluate",kn("0x77"),kn("0x78"),kn("0x79"),"__webdriver_unwrapped",kn("0x7a"),kn("0x7b"),kn("0x7c"),kn("0x7d"),"cdc_adoQpoasnfa76pfcZLmcfl_Promise","cdc_adoQpoasnfa76pfcZLmcfl_Symbol",kn("0x7e"),kn("0x7f"),kn("0x80"),kn("0x81"),kn("0x82"),"watinExpressionError",kn("0x83")],t=[];for(const i of e){const e=window[i];void 0!==e&&null!=e&&t[kn("0x84")](i)}return Promise[kn("0x52")](t)}[kn("0x21")](){const e={"dynamic-range":[kn("0x85"),"standard"],"prefers-reduced-motion":[kn("0x86"),kn("0x2")],"prefers-contrast":[kn("0x86"),kn("0x85"),kn("0x87"),kn("0x88"),kn("0x89"),kn("0x8a")],"max-monochrome":["0","10",kn("0x8b"),kn("0x8c")],"forced-colors":["active",kn("0x8d")],"inverted-colors":[kn("0x8e"),kn("0x8d")],"color-gamut":[kn("0x8f"),"p3",kn("0x90")]},t={};for(const[i,n]of Object.entries(e))for(const e of n)t[i[kn("0x91")](/-/g,"_")+"_"+e.replace(/-/g,"_")]=window.matchMedia("("+i+": "+e+")")[kn("0x92")];return Promise[kn("0x52")](t)}[kn("0x93")](){const e=[Math[kn("0x97")](.12312423423423424),Math[kn("0x98")](1e308),(t=1e154,Math[kn("0x94")](t+Math[kn("0x95")](t*t-1))),Math[kn("0x99")](.12312423423423424),Math[kn("0x9a")](1),Math[kn("0x94")](1+Math[kn("0x95")](2)),Math[kn("0x9b")](.5),Math.log(3)/2,Math[kn("0x9c")](.5),Math[kn("0x9d")](-1e300),Math[kn("0x9e")](1),Math[kn("0x96")](1)-1/Math[kn("0x96")](1)/2,Math.cos(10.000000000123),Math[kn("0x9f")](1),(Math[kn("0x96")](1)+1/Math[kn("0x96")](1))/2,Math[kn("0xa0")](-1e300),Math[kn("0xa1")](1),(Math.exp(2)-1)/(Math.exp(2)+1),Math[kn("0x96")](1),Math[kn("0xa2")](1),Math[kn("0x96")](1)-1,Math[kn("0xa3")](10),Math[kn("0x94")](11),Math.PI**-100];var t;let i="";for(let t=0;t<e[kn("0xa4")];t++)i+=e[t][kn("0xa5")]();return Promise.resolve(Tn[kn("0xa6")](i))}getConnection(){const{connection:e}=navigator,t=(e=>{let{downlink:t,effectiveType:i,rtt:n,saveData:r}=e;return{downlink:t,effectiveType:i,rtt:n,saveData:r}})(e);return Promise.resolve(t)}[kn("0x2c")](){return Promise.resolve(!!window[kn("0xa7")])}[kn("0x1c")](){return Promise.resolve(!!window[kn("0xa8")])}[kn("0x2b")](){return-1!==window[kn("0xa9")][kn("0xa5")]().indexOf(kn("0xaa"))}[kn("0x1d")](){return[kn("0xab"),kn("0xac"),kn("0xad"),kn("0x75"),"__fxdriver_evaluate",kn("0xae"),kn("0xaf"),kn("0xb0"),kn("0x72"),"_Selenium_IDE_Recorder","_selenium",kn("0x6d"),kn("0xb1"),kn("0xb2"),kn("0xb3"),kn("0xb4"),kn("0xb5"),kn("0xb6"),kn("0xb7"),kn("0xb8"),kn("0x77"),kn("0x70"),kn("0x73"),kn("0xb9"),kn("0x74"),"$chrome_asyncScriptInfo",kn("0xba"),kn("0xbb")].filter((e=>navigator[e]))}[kn("0xbc")](){const e=navigator[kn("0xbd")];return Promise[kn("0x52")](e)}[kn("0x1e")](){return navigator.userAgent}[kn("0xbe")](){return navigator[kn("0xbf")]}[kn("0x1f")](){return vn()}[kn("0xc0")](){return navigator[kn("0xc1")][kn("0xc2")]()}[kn("0x20")](){return navigator[kn("0xc3")]}[kn("0xc4")](){return navigator.userActivation.isActive}async[kn("0x33")](e){try{const t=await navigator[kn("0xc5")].query({name:e});return null==t?void 0:t.state}catch(e){}}isGeoLocationExists(){return!!navigator[kn("0xc6")]}isSendBeaconFunction(){return typeof navigator[kn("0xc7")]===kn("0xc8")}[kn("0xc9")](){return{hardwareConcurrency:Object[kn("0xca")](Object[kn("0x45")](navigator),kn("0xcb"))[kn("0xcc")][kn("0xa5")](),languages:Object[kn("0xca")](Object[kn("0x45")](navigator),kn("0xcd"))[kn("0xcc")].toString()}}async[kn("0x37")](){if(typeof navigator[kn("0x37")]===kn("0xc8"))try{const{related_applications:e}=await navigator[kn("0x37")]();if(e&&Array[kn("0xce")](e))return e.map((e=>({platform:e[kn("0xcf")],url:e[kn("0xd0")]})))}catch(e){}}[kn("0x2d")](){return document[kn("0xd1")]}[kn("0x28")](){return performance.timing}[kn("0xd2")](){const{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}=performance.memory;return{jsHeapSizeLimit:e,totalJSHeapSize:t,usedJSHeapSize:i}}[kn("0x18")](){return Promise[kn("0x52")](!!window[kn("0xd3")])}getOpenDatabase(){const{openDatabase:e}=window;return Promise.resolve(!!e)}getTouchSupport(){const e=window[kn("0xd4")]&&document instanceof DocumentTouch,t={maxTouchPoints:navigator[kn("0xd5")]||navigator[kn("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[kn("0x84")]({type:e[i][kn("0xd7")],suffixes:e[i][kn("0xd8")]});return t}const t=[];for(let i=0;i<navigator[kn("0xd9")][kn("0xa4")];++i){const n=navigator.plugins[i];n&&t[kn("0x84")]({name:n[kn("0x4b")],description:n[kn("0xda")],mimeTypes:e(n)})}return Promise[kn("0x52")](t)}[kn("0x2a")](){const e=window.screen||screen,{availLeft:t}=e,{availTop:i}=e,n={availHeight:e[kn("0xdb")],availLeft:t,availTop:i,availWidth:e.availWidth,colorDepth:e[kn("0xdc")],height:e.height,width:e[kn("0xdd")],pixelDepth:e[kn("0xde")],orientationAngle:e.orientation&&e.orientation[kn("0xdf")],orientationType:e.orientation&&e.orientation.type,devicePixelRatio:window[kn("0xe0")]};return Promise[kn("0x52")](n)}static[kn("0xa6")](e){if(null==e)return;let t=0,i=0;const n=e[kn("0xa4")];for(;i<n;)t=(t<<5)-t+e[kn("0xe1")](i++)|0;return t}getWindowOuter(){const e={outerWidth:window[kn("0xe2")],outerHeight:window[kn("0xe3")]};return Promise[kn("0x52")](e)}[kn("0xe4")](){const e=navigator[kn("0xab")];return Promise[kn("0x52")](e)}getWindowOrientation(){const e=window[kn("0xe5")];return Promise.resolve(e)}[kn("0x23")](){const e=navigator.platform;return Promise[kn("0x52")](e)}[kn("0x24")](){const e=navigator.cpuClass;return Promise[kn("0x52")](e)}[kn("0xe6")](){const e=navigator.oscpu;return Promise[kn("0x52")](e)}[kn("0x25")](){const e=!!window[kn("0xe7")][kn("0xe8")].addBehavior;return Promise[kn("0x52")](e)}[kn("0x26")](){const e=navigator.productSub;return Promise[kn("0x52")](e)}async[kn("0x27")](){const e=await navigator[kn("0xe9")][kn("0xea")](),t=[];for(const i of e)t.push({kind:i[kn("0xeb")],label:i.label,deviceId:i.deviceId,groupId:i[kn("0xec")]});return t}async getAudioFingerprint(){const e=window[kn("0xed")]||window.webkitOfflineAudioContext;if(!e)return-1;const t=new e(1,5e3,44100),i=t[kn("0xee")]();i.type=kn("0xef"),i[kn("0xf0")][kn("0x44")]=1e4;const n=t.createDynamicsCompressor();n[kn("0xf1")][kn("0x44")]=-50,n.knee[kn("0x44")]=40,n[kn("0xf2")][kn("0x44")]=12,n[kn("0xf3")][kn("0x44")]=0,n[kn("0xf4")][kn("0x44")]=.25,i[kn("0xf5")](n),n[kn("0xf5")](t[kn("0xf6")]),i[kn("0xf7")](0);const r=new Promise((async(e,i)=>{t.oncomplete=t=>e(t[kn("0xf8")]);try{await t.startRendering()}catch(e){i(e)}})),a=(await r)[kn("0xf9")](0)[kn("0xfa")](4500);return Tn.getHash(a)}async getAudioFingerprintExtended(){var e;const t=window[kn("0xed")]||window[kn("0xfb")];if(!t)return{};const i=new t(1,5e3,44100),n=i.createOscillator();n[kn("0xd7")]=kn("0xef"),n[kn("0xf0")][kn("0x44")]=1e4;const r=i[kn("0xfc")]();r[kn("0xf1")].value=-50,r[kn("0xfd")].value=40,r.attack[kn("0x44")]=0;const a=i[kn("0xfe")]();n.connect(r),r.connect(a),r[kn("0xf5")](i[kn("0xf6")]),n[kn("0xf7")](0);try{await i[kn("0xff")](),r[kn("0x100")](),n.disconnect();const t=new Float32Array(a[kn("0x101")]);null===(e=a.getFloatFrequencyData)||void 0===e||e[kn("0x102")](a,t);const o=new Float32Array(a[kn("0x103")]);return"getFloatTimeDomainData"in a&&a[kn("0x104")](o),{gain:r[kn("0x105")][kn("0x44")]||r[kn("0x105")],freq:Dn(t),time:Dn(o)}}catch(e){return{}}}static[kn("0x106")](e){let t=0;for(let i=0;i<e[kn("0xa4")];++i)t+=Math[kn("0x3")](e[i]);return t}getFonts(){const e=kn("0x107"),t=[kn("0x108"),kn("0x109"),kn("0x10a")],i=[kn("0x10b"),kn("0x10c"),kn("0x10d"),kn("0x10e"),"Arial Unicode MS",kn("0x10f"),kn("0x110"),kn("0x111"),kn("0x112"),kn("0x113"),"Century","Century Gothic",kn("0x114"),"EUROSTILE","Franklin Gothic",kn("0x115"),"Futura Md BT",kn("0x116"),kn("0x117"),kn("0x118"),kn("0x119"),"Helvetica Neue",kn("0x11a"),kn("0x11b"),kn("0x11c"),kn("0x11d"),kn("0x11e"),kn("0x11f"),kn("0x120"),kn("0x121"),"MS Outlook",kn("0x122"),kn("0x123"),kn("0x124"),"MYRIAD PRO",kn("0x125"),"Meiryo UI","Microsoft Uighur",kn("0x126"),kn("0x127"),kn("0x128"),"Pristina",kn("0x129"),"Segoe UI Light",kn("0x12a"),kn("0x12b"),kn("0x12c"),kn("0x12d"),kn("0x12e"),kn("0x12f"),kn("0x130"),"ZWAdobeF"],n=document.createElement(kn("0x131"));n.style.visibility=kn("0x132");const r={},a={},o=t=>{const i=document[kn("0x133")](kn("0x134")),{style:r}=i;return r[kn("0x135")]="absolute",r[kn("0x136")]="0",r[kn("0x137")]="0",r.fontFamily=t,r[kn("0x138")]=kn("0x139"),i.textContent=e,n.appendChild(i),i},s=(e,t)=>o("'"+e+"',"+t),l=t.map(o),u=(()=>{const e={};for(const n of i)e[n]=t[kn("0x13a")]((e=>s(n,e)));return e})();document[kn("0x13d")][kn("0x13e")](n);try{for(let e=0;e<t[kn("0xa4")];e++)r[t[e]]=l[e].offsetWidth,a[t[e]]=l[e].offsetHeight;const e=i[kn("0x13f")]((e=>{return i=u[e],t.some(((e,t)=>i[t][kn("0x13b")]!==r[e]||i[t][kn("0x13c")]!==a[e]));var i}));return Promise.resolve(e)}finally{document[kn("0x13d")][kn("0x140")](n)}}[kn("0x1b")](){const e=(new Date)[kn("0x1b")]();return Promise.resolve(e)}[kn("0x1a")](){const e=navigator[kn("0x141")];return Promise.resolve(e)}[kn("0x142")](){const e=navigator[kn("0xcd")];return Promise[kn("0x52")](e)}[kn("0x17")](){const e=navigator[kn("0xcb")];return Promise.resolve(e)}[kn("0x15")](){const e=navigator[kn("0x143")];return Promise[kn("0x52")](e)}[kn("0x16")](){return[kn("0xad"),kn("0x75"),"__webdriver_script_function",kn("0x78"),kn("0x77"),"__fxdriver_evaluate",kn("0xae"),kn("0xaf"),kn("0xac"),kn("0xb0"),kn("0x72")][kn("0x13f")]((e=>document[e]))}[kn("0x2e")](){const e=Intl[kn("0x144")]()[kn("0x145")]()[kn("0x146")];return Promise[kn("0x52")](e)}[kn("0x147")](){const e=navigator.vendor;return Promise[kn("0x52")](e)}[kn("0x2f")](){const e=navigator[kn("0x148")];return Promise[kn("0x52")](e)}async getCanvasFingerprint(){const e=document[kn("0x133")](kn("0x162"));e[kn("0xdd")]=1,e[kn("0x149")]=1;const t=e[kn("0x163")]("2d"),i={winding:function(e){return e[kn("0x160")](0,0,10,10),e.rect(2,2,6,6),!e[kn("0x161")](5,5,"evenodd")}(t),geometry:function(e,t){e[kn("0xdd")]=122,e[kn("0x149")]=110,t[kn("0x155")]=kn("0x156");const i=[[kn("0x157"),40,40],[kn("0x158"),80,40],[kn("0x159"),60,80]];for(const[e,n,r]of i)t[kn("0x14c")]=e,t[kn("0x15a")](),t[kn("0x15b")](n,r,40,0,2*Math.PI,!0),t[kn("0x15c")](),t[kn("0x15d")]();return t[kn("0x14c")]=kn("0x15e"),t[kn("0x15b")](60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t[kn("0x15d")](kn("0x15f")),Tn[kn("0xa6")](e[kn("0x154")]())}(e,t),text:function(e,t){e[kn("0xdd")]=240,e[kn("0x149")]=60,t[kn("0x14a")]=kn("0x14b"),t[kn("0x14c")]=kn("0x14d"),t.fillRect(100,1,62,20),t[kn("0x14c")]=kn("0x14e"),t[kn("0x14f")]=kn("0x150");const i=kn("0x151")+String[kn("0x152")](55357,56835);return t[kn("0x153")](i,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t[kn("0x14f")]="18pt Arial",t[kn("0x153")](i,4,45),Tn[kn("0xa6")](e[kn("0x154")]())}(e,t)};return Promise[kn("0x52")](i)}async[kn("0x164")](){const e=await navigator[kn("0x164")]();return{charging:e[kn("0x165")],chargingTime:e[kn("0x166")],dischargingTime:e[kn("0x167")],level:e.level}}async[kn("0xf")](){return!!navigator[kn("0x168")]&&await navigator[kn("0x168")][kn("0x169")]()}async getWebGlRenderer(){const e=document[kn("0x133")](kn("0x162")),t=e.getContext(kn("0x16a"))||e[kn("0x163")]("webgl-experimental"),i=t.getExtension(kn("0x16b"));return Promise.resolve(t.getParameter(i[kn("0x16c")]))}async[kn("0x11")](){const e=document[kn("0x133")](kn("0x16d")),t={basic:""===e.canPlayType('video/mp4; codecs="avc1.42E01E"'),advanced:""===e[kn("0x16e")](kn("0x16f"))};return Promise[kn("0x52")](t)}async[kn("0x31")](){const{publicKey:e,keyIdentifier:t}=await this.cryptoBinding[kn("0x170")]();return{publicKey:e,keyIdentifier:t}}static[kn("0x171")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i.test(navigator[kn("0x172")])||null!=window[kn("0xe5")]||window[kn("0x173")](kn("0x174")).matches}}var In,Mn,Rn=["uncompressed","ALLOW","DENY","TRUST","compress","compressed"];In=Rn,Mn=490,function(e){for(;--e;)In.push(In.shift())}(++Mn);var Bn,Fn,zn,On,Pn=function(e,t){return Rn[e-=0]};(Fn=Bn||(Bn={}))[Pn("0x0")]=Pn("0x1"),Fn[Pn("0x2")]="uncompressed",(On=zn||(zn={}))[Pn("0x3")]=Pn("0x3"),On.CHALLENGE="CHALLENGE",On[Pn("0x4")]=Pn("0x4"),On[Pn("0x5")]=Pn("0x5");var Nn,Ln,Un=["encode","AES-GCM","encrypt","exportKey","raw","stringify","RSA-OAEP","arrayBufferToBase64","btoa","importPublicKey","jwk","parse","SHA-256","generateSymKey","configManager","crypto","subtle","generateKey","decrypt","encryptPayload"];Nn=Un,Ln=494,function(e){for(;--e;)Nn.push(Nn.shift())}(++Ln);var jn=function(e,t){return Un[e-=0]};class qn{constructor(e){this[jn("0x0")]=e}generateSymKey(){return window[jn("0x1")][jn("0x2")][jn("0x3")]({name:"AES-GCM",length:256},!0,["encrypt",jn("0x4")])}async[jn("0x5")](e,t){const i="string"==typeof e?(new TextEncoder)[jn("0x6")](e):e,n=window[jn("0x1")].getRandomValues(new Uint8Array(12)),r={name:jn("0x7"),iv:n},a=await window.crypto.subtle[jn("0x8")](r,t,i);return{payloadCipherText:this.arrayBufferToBase64(a),iv:n}}async encryptSymKeyBundle(e,t,i){const n=await window[jn("0x1")].subtle[jn("0x9")](jn("0xa"),e),r=this.arrayBufferToBase64(n),a=this.arrayBufferToBase64(t),o=(new TextEncoder)[jn("0x6")](JSON[jn("0xb")]({symKey:r,iv:a})),s=await window[jn("0x1")][jn("0x2")].encrypt({name:jn("0xc")},i,o);return this.arrayBufferToBase64(s)}[jn("0xd")](e){let t="";const i=new Uint8Array(e),n=i.byteLength;for(let e=0;e<n;e++)t+=String.fromCharCode(i[e]);return window[jn("0xe")](t)}[jn("0xf")](e){return window[jn("0x1")].subtle.importKey(jn("0x10"),JSON[jn("0x11")](e),{name:jn("0xc"),hash:jn("0x12")},!0,["encrypt"])}async[jn("0x8")](e,t){if(!window[jn("0x1")]||!window[jn("0x1")][jn("0x2")])throw new Error("crypto is not supported");const i=await this[jn("0x13")](),{payloadCipherText:n,iv:r}=await this[jn("0x5")](t,i),a=await this[jn("0xf")](e);return{encryptedData:n,encryptedKey:await this.encryptSymKeyBundle(i,r,a)}}}var Kn,$n,Vn=["client","SERVER","COMMUNICATION","communication","errorSpace","message","error","toString","name",", errorCode: ","errorCode","toLog"];Kn=Vn,$n=384,function(e){for(;--e;)Kn.push(Kn.shift())}(++$n);var Hn,Gn,Zn=function(e,t){return Vn[e-=0]};(Gn=Hn||(Hn={})).CLIENT=Zn("0x0"),Gn[Zn("0x1")]="server",Gn[Zn("0x2")]=Zn("0x3");class Yn extends Error{constructor(e,t,i){var n,r;super(),this.error=e,this[Zn("0x4")]=t,this.errorCode=i,this[Zn("0x5")]=(null===(n=this[Zn("0x6")])||void 0===n?void 0:n[Zn("0x5")])||this[Zn("0x6")][Zn("0x7")](),this.name=(null===(r=this.error)||void 0===r?void 0:r[Zn("0x8")])||Yn.name}[Zn("0x7")](){return"SDKError: "+this[Zn("0x5")]+(this[Zn("0x4")]?", errorSpace: "+this.errorSpace:"")+(this.errorCode?Zn("0x9")+this[Zn("0xa")]:"")}[Zn("0xb")](){return u(u({name:this[Zn("0x8")],message:this[Zn("0x5")]},this[Zn("0x4")]&&{errorSpace:this[Zn("0x4")]}),this[Zn("0xa")]&&{errorCode:this[Zn("0xa")]})}}var Wn,Jn,Xn=["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"];Wn=Xn,Jn=307,function(e){for(;--e;)Wn.push(Wn.shift())}(++Jn);var Qn=function(e,t){return Xn[e-=0]};const er=Qn("0x0"),tr=Qn("0x1"),ir=Qn("0x2"),nr=Qn("0x3"),rr=Qn("0x4"),ar=Qn("0x5"),or=Qn("0x6"),sr=Qn("0x7"),lr=Qn("0x8"),ur=[Ri.EVENT_TYPE_ACTION,Ri[Qn("0x9")]],cr=Qn("0xa");class dr{constructor(e,t,i,n,r,a,o,s){this[Qn("0xb")]=e,this.storageManager=t,this[Qn("0xc")]=i,this.requestsManager=n,this.identityManager=r,this[Qn("0xd")]=a,this[Qn("0xe")]=o,this[Qn("0xf")]=s,this[Qn("0x10")]=null,this[Qn("0x11")]=null,this[Qn("0x12")]=async(e,t)=>{try{const i=u({},u({interaction_type:e},t)),n={type:Ri[Qn("0x13")],attributes:i};return await this.emitEvent(n)}catch(e){}},this[Qn("0xf")]=s,this[Qn("0x14")]=[],this.crypto=new qn(e),this[Qn("0x15")]=new pn(this[Qn("0xb")][Qn("0x16")](ar,[]),this[Qn("0xb")].getConfValue(rr,100),this[Qn("0x12")]),this[Qn("0x17")]=Tn[Qn("0x17")](),this[Qn("0x18")]=this[Qn("0xb")].getConfValue(cr,[Ri[Qn("0x19")]]),this[Qn("0x1a")]=this[Qn("0xb")][Qn("0x16")]("maxLocalStoredEvents",4),this[Qn("0x1b")]=36e4,this[Qn("0x1c")]()}async emitEvent(e){e.index=this[Qn("0x1d")](),e.location=location[Qn("0x1e")](),e.platform=navigator[Qn("0x1f")],e[Qn("0x20")]="1.52.6",e[Qn("0xe")]=this.serverPath,e.tabId=this[Qn("0x21")][Qn("0x22")](),e[Qn("0x23")]=Date.now(),await this[Qn("0x24")](e);let t=0;this[Qn("0x18")][Qn("0x25")](e[Qn("0x26")])?t=this[Qn("0x27")](e):this[Qn("0x14")].push(e);const i=this[Qn("0xb")][Qn("0x16")](sr,2);if(this[Qn("0x14")][Qn("0x28")]+t>=i||ur[Qn("0x25")](e[Qn("0x26")])){this[Qn("0x11")]&&(clearTimeout(this[Qn("0x11")]),this.flushTimeoutHandle=null);try{return await this[Qn("0x29")]()}catch(t){throw yi.error(Qn("0x2a"),{clientId:this.identityManager.getClientId(),eventType:e[Qn("0x26")],error:t[Qn("0x2b")]?t[Qn("0x2c")]():t}),t}}if(!this[Qn("0x11")]&&this[Qn("0x14")].length>0){const t=this[Qn("0xb")][Qn("0x16")](lr,2),i=Math[Qn("0x2d")](t,30);this[Qn("0x11")]=setTimeout((()=>{this[Qn("0x11")]=null,this[Qn("0x29")]()[Qn("0x2e")]((t=>{yi[Qn("0x2f")](Qn("0x30"),{clientId:this[Qn("0x21")][Qn("0x31")](),eventType:e[Qn("0x26")],error:t[Qn("0x2b")]?t[Qn("0x2c")]():t})}))}),1e3*i)}return{}}async[Qn("0x32")](){try{return this.eventsQueue[Qn("0x28")]>0?await this[Qn("0x29")]():(await this[Qn("0x33")](!0),await this.flush())}catch(e){yi[Qn("0x2f")](Qn("0x34"),{e:e})}}async[Qn("0x1c")](){try{this[Qn("0x21")][Qn("0x35")]()&&await this[Qn("0x32")]()}catch(e){yi.error("Failed to polling data",{e:e})}finally{setTimeout((async()=>{await this.pollingSessionToken()}),this[Qn("0x1b")])}}async[Qn("0x24")](e){var t;if(!(null===(t=e.attributes)||void 0===t?void 0:t.navigatorHighEntropyData))try{e[Qn("0x36")][Qn("0x37")]=await vn()}catch(e){}}[Qn("0x38")](){const e=[],t=this[Qn("0x39")]();for(;this[Qn("0x14")].length;)e.push(this.eventsQueue[Qn("0x3a")]());return(null==t?void 0:t[Qn("0x28")])&&e.push(...t),e[Qn("0x3b")](((e,t)=>e[Qn("0x23")]-t[Qn("0x23")]))}async flush(){const e=this[Qn("0x38")]();if(0===e[Qn("0x28")])return{};const t={};t[Qn("0x3c")]=this.identityManager[Qn("0x31")](),t.deviceId=this[Qn("0x21")][Qn("0x3d")](),t[Qn("0x3e")]=this[Qn("0x21")][Qn("0x3f")](),t[Qn("0x40")]=this[Qn("0x17")]?Oi:zi,t.events=e;try{const{keyIdentifier:e}=await this.cryptoBinding[Qn("0x41")]();t[Qn("0x42")]=e}catch(e){yi[Qn("0x43")](Qn("0x44")+e)}this[Qn("0xf")]&&(t.sessionToken=!0);const i=await this[Qn("0x45")](t,!0),n=await this[Qn("0xd")][Qn("0x46")]();let r;n&&(r=[{type:"key_rotation_data",data:n[Qn("0x47")],signature:n[Qn("0x48")]}]);const a=await this[Qn("0x49")][Qn("0x4a")](Qn("0x4b"),u(u({},i),r?{headers:r}:{}));if(a[Qn("0x4c")]){const e=a[Qn("0x4c")][Qn("0x4d")]((e=>"key_rotation_status"===e[Qn("0x26")]));e&&e[Qn("0x4e")]&&this[Qn("0xd")][Qn("0x4f")](e[Qn("0x4e")])}return a[Qn("0x50")]&&this[Qn("0x21")][Qn("0x51")](a[Qn("0x50")]),a[Qn("0x52")]&&this.identityManager[Qn("0x53")](a[Qn("0x52")]),a[Qn("0x3e")]&&this[Qn("0x21")].setUserId(a[Qn("0x3e")]),this[Qn("0x54")](),a}async[Qn("0x45")](e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.configManager[Qn("0x16")](or,null);if(null===i&&t)return await this[Qn("0xb")].refreshConf(this[Qn("0x21")][Qn("0x31")]()),await this[Qn("0x45")](e);if(null===i)throw new Yn(new Error(Qn("0x55")),Hn[Qn("0x56")]);try{const t=JSON[Qn("0x57")](e),n=this[Qn("0x58")](t),r=n||t,{encryptedData:a,encryptedKey:o}=await this.crypto[Qn("0x59")](i,r);return{data:a,key:o,dataType:n?Bn.compress:Bn[Qn("0x5a")]}}catch(e){throw new Yn(e,Hn.CLIENT)}}[Qn("0x58")](e){try{return ri(e)}catch(e){yi[Qn("0x2f")](Qn("0x5b"),{clientId:this[Qn("0x21")][Qn("0x31")](),error:e})}}increaseEventIndex(){if(null===this[Qn("0x10")]){const e=this[Qn("0x5c")][Qn("0x5d")](ir),t=Number[Qn("0x5e")](e);this.eventIndex=Number.isNaN(t)?-1:t}return this.eventIndex++,this[Qn("0x5c")][Qn("0x5f")](ir,this[Qn("0x10")][Qn("0x1e")]()),this[Qn("0x10")]}[Qn("0x60")](){const e=this[Qn("0x5c")][Qn("0x5d")](er),t=this.storageManager[Qn("0x5d")](tr);return!e||!t||Date[Qn("0x61")]()-e>864e5||t!=this[Qn("0x21")][Qn("0x3d")]()}async[Qn("0x33")](e){if(!e&&!this.shouldSendDeviceEvent())return yi[Qn("0x62")]("no need to send device event"),!1;const t=await this[Qn("0xc")][Qn("0x63")](),i={type:Ri.EVENT_TYPE_DEVICE,attributes:t},n=await this[Qn("0x64")](i);return n&&(this[Qn("0x5c")][Qn("0x5f")](er,Date[Qn("0x61")]()),this.storageManager[Qn("0x5f")](tr,this[Qn("0x21")][Qn("0x3d")]())),n}async[Qn("0x65")](){const e="page_load";if(this[Qn("0xb")][Qn("0x16")](ar,[])[Qn("0x25")](e))return!1;const t=this[Qn("0x66")]();return await this[Qn("0x64")]({type:Ri.EVENT_TYPE_INTERACTION,attributes:u(u({interaction_type:e,location:window[Qn("0x67")].href,referrer:document[Qn("0x68")]},window[Qn("0x69")]&&{window_historyLength:window.history[Qn("0x28")]}),t&&{windowResources:t})}),!0}[Qn("0x66")](){try{const e=window[Qn("0x6a")][Qn("0x6b")](Qn("0x6c"));return e&&Array[Qn("0x6d")](e)?e.map((e=>({name:e[Qn("0x6e")],initiatorType:e[Qn("0x6f")]}))):void 0}catch(e){}}registerEventListeners(){this.interactionEventsManager.registerEventListeners(),this[Qn("0x21")][Qn("0x70")]()}[Qn("0x39")](){const e=this.storageManager[Qn("0x5d")](nr);return e?JSON[Qn("0x71")](e):[]}addEventToLocalStorage(e){const t=this[Qn("0x39")]();return ji.maintainLastXItems(t,this[Qn("0x1a")],e),this[Qn("0x5c")].setItemLocalStorageSafe(nr,JSON[Qn("0x57")](t)),t[Qn("0x28")]}[Qn("0x54")](){this[Qn("0x5c")][Qn("0x72")](nr)}}var hr,gr,pr=["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"];hr=pr,gr=426,function(e){for(;--e;)hr.push(hr.shift())}(++gr);var fr=function(e,t){return pr[e-=0]};const mr="rui",_r=fr("0x0"),xr=fr("0x1"),vr=fr("0x2"),br=fr("0x3"),yr=fr("0x4"),wr=fr("0x5");class Er{constructor(e,t,i){this[fr("0x6")]=e,this.configManager=t,this[fr("0x7")]=i,this[fr("0x8")](this[fr("0x7")])}[fr("0x9")](){this[fr("0xa")](),this[fr("0xb")]()}[fr("0xc")](){window[fr("0xd")](fr("0xe"),(async()=>this[fr("0xf")]()))}[fr("0x10")](){return this[fr("0x11")]}[fr("0x12")](e){this.deviceId!==e&&(yi[fr("0x13")](fr("0x14"),{deviceId:e}),this[fr("0x11")]=e,this.storageManager.setItemSessionStorageSafe(xr,e),this.storageManager[fr("0x15")](xr,e))}[fr("0xa")](){const e=this[fr("0x6")][fr("0x16")](xr)||this.storageManager[fr("0x17")](xr);return null!=e&&this.setDeviceId(e),e}getClientId(){return this.clientId}[fr("0x8")](e){this[fr("0x6")].getClientId()!=e&&this[fr("0x6")][fr("0x8")](e),this[fr("0x6")][fr("0x18")](_r,e)}[fr("0x19")](){if(Number(this[fr("0x6")].getItemLocalStorageSafe(vr))+this[fr("0x1a")][fr("0x1b")](wr,864e5)<Date[fr("0x1c")]())return this[fr("0x1d")](),null;const e=this.storageManager[fr("0x16")](mr);return null!=e?e:this[fr("0x6")][fr("0x17")](mr)}setUserId(e){this[fr("0x1e")]=e,this[fr("0x6")].setItemSessionStorageSafe(mr,e),this[fr("0x6")][fr("0x15")](mr,e),this.storageManager[fr("0x15")](vr,Date[fr("0x1c")]())}[fr("0x1d")](){this[fr("0x6")][fr("0x1f")](mr),this[fr("0x6")].removeItemLocalStorageSafe(mr),this[fr("0x6")][fr("0x20")](vr)}[fr("0xb")](){const e=this.storageManager[fr("0x16")](br);e?(this.storageManager[fr("0x1f")](br),this.tabId=e):this.tabId=Math.floor(Math[fr("0x21")]()*Number[fr("0x22")])[fr("0x23")]()}[fr("0x24")](){return this.tabId}saveTabIdOnUnload(){this.storageManager.setItemSessionStorageSafe(br,this.tabId)}[fr("0x25")](e){this[fr("0x6")][fr("0x15")](yr,e)}getSessionToken(){return this[fr("0x6")][fr("0x17")](yr)||this[fr("0x6")][fr("0x16")](yr)}[fr("0x26")](){var e;const t=this[fr("0x27")]();if(!t)return!0;try{const i=JSON[fr("0x28")](atob(t[fr("0x29")](".")[1]));let n=(null!==(e=i[fr("0x2a")])&&void 0!==e?e:i[fr("0x2b")])*(i.exp&&i[fr("0x2a")]<1e12?1e3:1);return i[fr("0x2a")]||(n+=9e5),Date[fr("0x1c")]()>=n}catch(e){return yi.error("Invalid JWT:",{error:e}),!0}}}var kr,Ar,Cr=["serverPath","postDataFromURL","POST","include","application/json","stringify","GET","callServer","fetch-api is not supported","CLIENT","json","status","message","COMMUNICATION","postData"];kr=Cr,Ar=134,function(e){for(;--e;)kr.push(kr.shift())}(++Ar);var Dr=function(e,t){return Cr[e-=0]};class Sr{constructor(e){this.serverPath=e}async[Dr("0x0")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.postDataFromURL(this[Dr("0x1")]+e,t,i)}async[Dr("0x2")](e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:Dr("0x3"),credentials:Dr("0x4"),headers:new Headers(u({"Content-Type":Dr("0x5")},i)),body:JSON[Dr("0x6")](t)};return await this.callServer(e,n)}async getData(e){const t=this[Dr("0x1")]+e,i={method:Dr("0x7"),credentials:"include"};return await this[Dr("0x8")](t,i)}async[Dr("0x8")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!("fetch"in window))throw new Yn(new Error(Dr("0x9")),Hn[Dr("0xa")]);try{const i=await fetch(e,t),n=await i[Dr("0xb")]();if(i.ok)return n;throw new Yn(new Error(n.message||i.statusText),Hn.SERVER,i[Dr("0xc")])}catch(e){if(!(e instanceof Yn))throw new Yn(new Error(e[Dr("0xd")]),Hn[Dr("0xe")]);throw e}}}var Tr,Ir,Mr=["stringify","string","throwError","validateSDKParams","keys","REQUIRED_SDK_PARAMS","filter","throwOrReturnResult"];Tr=Mr,Ir=113,function(e){for(;--e;)Tr.push(Tr.shift())}(++Ir);var Rr=function(e,t){return Mr[e-=0]};class Br{constructor(){this.REQUIRED_SDK_PARAMS={clientId:Rr("0x0")}}throwOrReturnResult(e,t,i){if(!e&&((null==t?void 0:t.logIfInvalid)&&yi.info(i),null==t?void 0:t[Rr("0x1")]))throw new Error(i);return e}[Rr("0x2")](e,t){const i=Object[Rr("0x3")](this[Rr("0x4")])[Rr("0x5")]((t=>typeof e[t]!=this.REQUIRED_SDK_PARAMS[t]));return this[Rr("0x6")](0==i.length,t,"Invalid SDK params was provided: "+JSON[Rr("0x7")](i))}}var Fr,zr,Or=["push","logsMinimumBatch","getConfValue","logsMinimumDelay","logs","now","lastTimeLogsSent","getClientId","floor","platform","postData","device/logs","requestsManager","identityManager","configManager","logMiddleware","reportLogs","middlewares"];Fr=Or,zr=426,function(e){for(;--e;)Fr.push(Fr.shift())}(++zr);var Pr=function(e,t){return Or[e-=0]};class Nr{constructor(e,t,i){this[Pr("0x0")]=e,this[Pr("0x1")]=t,this[Pr("0x2")]=i,this.lastTimeLogsSent=0,this[Pr("0x3")]=async()=>{try{await this[Pr("0x4")]()}catch(e){}},yi[Pr("0x5")][Pr("0x6")](this.logMiddleware)}async[Pr("0x4")](){if(!this[Pr("0x2")].getConfValue("enableLogsReporting",!1))return;const e=this[Pr("0x2")].getConfValue(Pr("0x7"),6),t=this.configManager[Pr("0x8")](Pr("0x9"),12e4);if(yi[Pr("0xa")].length<e||this.lastTimeLogsSent+t>Date[Pr("0xb")]())return;this[Pr("0xc")]=Date.now();const i=yi.flush(),n=this.identityManager[Pr("0xd")](),r=Math[Pr("0xe")](Date[Pr("0xb")]()/1e3),a={sdkVersion:"1.52.6",platform:navigator[Pr("0xf")],clientId:n,timestamp:r,logEntries:i};await this[Pr("0x0")][Pr("0x10")](Pr("0x11"),a)}}var Lr,Ur,jr=["getItemLocalStorageSafe","getDeviceId","getClientId","device/migrate-identifiers","requestsManager","postDataFromURL","deviceId","true","rimd","identityManager","storageManager","migrateIdentifiers"];Lr=jr,Ur=284,function(e){for(;--e;)Lr.push(Lr.shift())}(++Ur);var qr=function(e,t){return jr[e-=0]};const Kr=qr("0x0");class $r{constructor(e,t,i){this[qr("0x1")]=e,this.requestsManager=t,this[qr("0x2")]=i}async[qr("0x3")](e){if("true"!=this[qr("0x2")][qr("0x4")](Kr)){const t=this.identityManager[qr("0x5")](),i=this[qr("0x1")][qr("0x6")](),n=(e.endsWith("/")?e:e+"/")+qr("0x7"),r=await this[qr("0x8")][qr("0x9")](n,{deviceId:t,clientId:i});r[qr("0xa")]&&r.deviceId==t&&this[qr("0x2")].setItemLocalStorageSafe(Kr,qr("0xb"))}}}var Vr,Hr,Gr=["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"];Vr=Gr,Hr=405,function(e){for(;--e;)Vr.push(Vr.shift())}(++Hr);var Zr=function(e,t){return Gr[e-=0]};const Yr=[null,void 0,Zr("0x0"),"",0],Wr=Zr("0x1"),Jr=Zr("0x2"),Xr=Zr("0x3"),Qr=Zr("0x4"),ea=["email",Zr("0x5"),Zr("0x6"),Zr("0x7"),"national_id",Zr("0x8"),Zr("0x9"),Zr("0xa")];class ta{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this[Zr("0xb")]=null,this[Zr("0xc")]=null,this[Zr("0xd")]=!1,this.identifiersMigrationEnabled=!1,this[Zr("0xe")]=null,this.validationManager=new Br,ta[Zr("0xf")])throw new Error(Zr("0x10"));ta.initializedInstance=!0;const n=typeof t===Zr("0x11");this[Zr("0x12")]=n?t:e,this.options=n?{serverPath:e}:t,(i=this.options).serverPath||(i[Zr("0x13")]=Qr),this[Zr("0x14")][Zr("0x13")]=new URL(this[Zr("0x14")][Zr("0x13")]).toString(),this[Zr("0xe")]=this[Zr("0x14")][Zr("0xe")]||null,this[Zr("0x15")]=this[Zr("0x14")][Zr("0x15")],yi[Zr("0x16")]=!!this[Zr("0x14")].verbose,this[Zr("0x17")][Zr("0x18")](this,{throwError:!0,logIfInvalid:!0})||(this[Zr("0xc")]=Zr("0x19")),this[Zr("0x1a")]=new fi(this[Zr("0x12")]),this[Zr("0x1b")]=new Sr(this[Zr("0x14")][Zr("0x13")]),this[Zr("0x1c")]=new Si(this.storageManager,this[Zr("0x1b")]),this[Zr("0x1d")]=new Er(this[Zr("0x1a")],this[Zr("0x1c")],this[Zr("0x12")]),this[Zr("0x1d")][Zr("0x1e")](),this[Zr("0x1f")]=new $r(this[Zr("0x1d")],this.requestsManager,this[Zr("0x1a")]),this.enableSessionToken=this[Zr("0x14")][Zr("0xd")]||!1,this[Zr("0x20")]=new Nr(this[Zr("0x1b")],this[Zr("0x1d")],this[Zr("0x1c")])}[Zr("0x21")](e){const t=Date[Zr("0x22")]();return Zr("0x23")+(this.disabledReason||"unknown")+"_"+e+"_"+t}get[Zr("0x3")](){return this[Zr("0x1c")][Zr("0x24")](Xr,[])}async[Zr("0x25")](){return await this.isInitialized(),this[Zr("0x3")]}async getSessionToken(){if(!this[Zr("0xd")])throw new Error(Zr("0x26"));return await this[Zr("0x27")]()?(this[Zr("0x1d")][Zr("0x2a")]()&&await this[Zr("0x2b")][Zr("0x2c")](),this[Zr("0x1d")][Zr("0x2d")]()):(yi[Zr("0x28")](Zr("0x29")),{actionToken:this[Zr("0x21")]("session")})}async init(e){const t=typeof e!==Zr("0x2e")?e:null==e?void 0:e[Zr("0x2f")];return yi[Zr("0x28")](Zr("0x30")),this.initializationPromise=(async()=>{await this.configManager[Zr("0x31")](this[Zr("0x1d")][Zr("0x32")]());const e=this[Zr("0x1c")][Zr("0x24")](Zr("0x33"),null),i=this[Zr("0x1c")][Zr("0x24")]("keyRotation",null);if(this[Zr("0x34")]=hi.crypto[Zr("0x35")]("sign",(null==i?void 0:i.isEnabled)?{keyRotation:{isEnabled:!0,expiryDays:i[Zr("0x36")],startedAt:i.startedAt,tenantId:e}}:void 0),this.deviceDataManager=new Sn(this[Zr("0x1a")],this[Zr("0x1c")],this[Zr("0x34")]),this[Zr("0x2b")]=new dr(this[Zr("0x1c")],this.storageManager,this[Zr("0x37")],this[Zr("0x1b")],this[Zr("0x1d")],this[Zr("0x34")],this[Zr("0x14")][Zr("0x13")],this[Zr("0xd")]),null!==this.disabledReason)return!1;const n=this[Zr("0x1c")][Zr("0x24")]("sdkEnabled",void 0);return n?(this[Zr("0x39")]=this.identifiersMigrationEnabled||this[Zr("0x1c")][Zr("0x24")](Wr,!1),this[Zr("0x39")]&&this[Zr("0xe")]&&await this[Zr("0x1f")][Zr("0x3a")](this[Zr("0xe")]),yi.enabled=yi[Zr("0x16")]||!!this[Zr("0x1c")][Zr("0x24")]("verbose",!1),await this[Zr("0x2b")][Zr("0x3b")]()[Zr("0x3c")]((()=>{})),await this[Zr("0x2b")][Zr("0x3d")]()[Zr("0x3c")]((()=>{})),await this[Zr("0x3e")](t)[Zr("0x3c")]((()=>{})),this[Zr("0x2b")][Zr("0x3f")](),await this[Zr("0x2b")].flush()[Zr("0x3c")]((()=>{})),yi.info(Zr("0x40")),!0):(this[Zr("0xc")]=void 0===n?"missing_config":Zr("0x38"),!1)})(),await this[Zr("0xb")]}async[Zr("0x27")](){if(null===this[Zr("0xb")])return this.disabledReason||(this[Zr("0xc")]=Zr("0x41")),!1;const e=await this[Zr("0xb")];return e||this[Zr("0xc")]||(this[Zr("0xc")]=Zr("0x42")),e}async[Zr("0x43")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Date.now();if(!await this[Zr("0x27")]())return yi[Zr("0x28")]("SDK disabled"),{actionToken:this[Zr("0x21")]("action")};if(!this.actions[Zr("0x44")](e))return yi[Zr("0x45")]("Invalid action type",{actionType:e}),{actionToken:Hn.CLIENT+Zr("0x46")+e+"'_"+i};const n=null==t?void 0:t[Zr("0x47")];if(n&&!ea[Zr("0x44")](n))return yi[Zr("0x45")](Zr("0x48"),{claimedUserIdType:n}),{actionToken:Zr("0x49")+n+"_"+i};let r;this[Zr("0x1c")][Zr("0x24")](Jr,!1)&&(r=await this[Zr("0x37")][Zr("0x4a")]());const a=u({type:Ri.EVENT_TYPE_ACTION,attributes:u(u(u(u(u(u(u(u(u(u(u(u(u({action_type:e},(null==t?void 0:t[Zr("0x4b")])&&{correlation_id:t[Zr("0x4b")]}),(null==t?void 0:t.claimedUserId)&&{claimed_user_id:t[Zr("0x4c")]}),n&&{claimed_user_id_type:n}),(null==t?void 0:t[Zr("0x4d")])&&{public_key:t[Zr("0x4d")]}),(null==t?void 0:t[Zr("0x4e")])&&{extension_metadata:t[Zr("0x4e")]}),(null==t?void 0:t[Zr("0x4f")])&&{extension_device_attributes:t.extensionDeviceAttributes}),(null==t?void 0:t[Zr("0x50")])&&{suspicious_signals:t[Zr("0x50")]}),(null==t?void 0:t.suspiciousContext)&&{suspicious_context:t[Zr("0x51")]}),(null==t?void 0:t[Zr("0x52")])&&{download_file:t[Zr("0x52")]}),(null==t?void 0:t[Zr("0x53")])&&{upload_file:t.uploadFile}),this[Zr("0x15")]&&{platform_sdk_version:this[Zr("0x15")]}),(null==t?void 0:t[Zr("0x54")])&&{transactionData:t[Zr("0x54")]}),r)},(null==t?void 0:t[Zr("0x55")])&&{customAttributes:t[Zr("0x55")]});try{const e=await this[Zr("0x2b")][Zr("0x56")](a),{actionToken:t}=e;if(!t)throw new Yn(new Error(Zr("0x57")+("object"==typeof e?JSON[Zr("0x58")](e)[Zr("0x59")](15):e)),Hn[Zr("0x5a")]);return e}catch(t){return{actionToken:t instanceof Yn?t.errorSpace===Hn[Zr("0x5b")]?t[Zr("0x5c")]+Zr("0x5d")+e+"_"+t[Zr("0x5e")]+"_'"+t[Zr("0x5f")]+"'_"+i:t.errorSpace+Zr("0x5d")+e+"_'"+t[Zr("0x5f")]+"'_"+i:Zr("0x60")+e+"_"+i}}}async[Zr("0x61")](e){return await this[Zr("0x27")]()?this[Zr("0x3e")](e):(yi[Zr("0x28")]("SDK disabled"),!1)}async[Zr("0x3e")](e){if(Yr.includes(e))return yi[Zr("0x28")](Zr("0x62"),{userId:e}),!1;e=e[Zr("0x63")](),yi[Zr("0x28")](Zr("0x61"),{userId:e});const t=this[Zr("0x1d")].getUserId();return t===e||(this[Zr("0x1d")][Zr("0x64")](e),!!(await this[Zr("0x2b")][Zr("0x56")]({type:Ri[Zr("0x65")],attributes:{previous_user_id:t,user_id:e}}))[Zr("0x66")])}async[Zr("0x67")](){if(!await this[Zr("0x27")]())return yi[Zr("0x28")](Zr("0x29")),!1;const e=this.identityManager[Zr("0x68")]();return null!=e&&this[Zr("0x1d")][Zr("0x69")](),!!(await this[Zr("0x2b")][Zr("0x56")]({type:Ri[Zr("0x65")],attributes:{previous_user_id:e}})).deviceId}async[Zr("0x6a")](e){return await this[Zr("0x61")](e)}async[Zr("0x6b")](e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[Zr("0x6a")](e,t)}async clearUser(){return await this.unidentifiedUser()}}ta[Zr("0xf")]=!1,document[Zr("0x6e")](new CustomEvent(Zr("0x70")));var ia,na,ra=["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"];ia=ra,na=394,function(e){for(;--e;)ia.push(ia.shift())}(++na);var aa=function(e,t){return ra[e-=0]};let oa=null;hi[aa("0x0")].on(hi.events[aa("0x1")],(()=>{const{clientId:e,drs:t}=hi[aa("0x2")][aa("0x3")](),i=t||{},{enabled:n,userId:r}=i,a=h(i,ai);if(!1===n)return;const o=typeof window!==aa("0x4")&&window[aa("0x5")]||typeof globalThis!==aa("0x4")&&globalThis[aa("0x5")]||void 0;o&&(a[aa("0x6")]=o),oa=new ta(e,a),oa.init({userId:r})}));const sa=function(){return function(e){if(!e)throw new(hi[aa("0x7")][aa("0x8")][aa("0x9")])("not_initialized",aa("0xa"))}(oa),oa[aa("0x11")]()};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 ua={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 ca,da,ha,ga;!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"}(ca||(ca={})),function(e){var t;(t=e.image_type||(e.image_type={})).DOCUMENT_FRONT="document_front",t.DOCUMENT_BACK="document_back",t.SELFIE="selfie"}(da||(da={})),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"}(ha||(ha={})),function(e){var t;(t=e.client_type||(e.client_type={})).HOSTED_APP="hosted_app",t.MOBILE_SDK="mobile_sdk"}(ga||(ga={}));var pa={},fa={get exports(){return pa},set exports(e){pa=e}};!function(e,t){!function(i,n){var r="function",a="undefined",o="object",s="string",l="major",u="model",c="name",d="type",h="vendor",g="version",p="architecture",f="console",m="mobile",_="tablet",x="smarttv",v="wearable",b="embedded",y="Amazon",w="Apple",E="ASUS",k="BlackBerry",A="Browser",C="Chrome",D="Firefox",S="Google",T="Huawei",I="LG",M="Microsoft",R="Motorola",B="Opera",F="Samsung",z="Sharp",O="Sony",P="Xiaomi",N="Zebra",L="Facebook",U="Chromium OS",j="Mac OS",q=" Browser",K=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},$=function(e,t){return typeof e===s&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},G=function(e,t){for(var i,a,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],g=t[d+1];for(i=a=0;i<h.length&&!u&&h[i];)if(u=h[i++].exec(e))for(s=0;s<g.length;s++)c=u[++a],typeof(l=g[s])===o&&l.length>0?2===l.length?typeof l[1]==r?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==r||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}},Z=function(e,t){for(var i in t)if(typeof t[i]===o&&t[i].length>0){for(var r=0;r<t[i].length;r++)if($(t[i][r],e))return"?"===i?n:i}else if($(t[i],e))return"?"===i?n:i;return t.hasOwnProperty("*")?t["*"]:e},Y={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"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,g],[/opios[\/ ]+([\w\.]+)/i],[g,[c,B+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[g,[c,B+" GX"]],[/\bopr\/([\w\.]+)/i],[g,[c,B]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[g,[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,g],[/quark(?:pc)?\/([-\w\.]+)/i],[g,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[g,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[c,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[g,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[g,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[g,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[g,[c,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+A],g],[/\bfocus\/([\w\.]+)/i],[g,[c,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[g,[c,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[g,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[g,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[g,[c,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[g,[c,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[g,[c,D]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360"+q]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],g],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+q],g],[/samsungbrowser\/([\w\.]+)/i],[g,[c,F+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],g],[/metasr[\/ ]?([\d\.]+)/i],[g,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[c,g],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,L],g],[/(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,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[g,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[c,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,C+" WebView"],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[c,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,g],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[g,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[g,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[g,Z,{"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,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],g],[/(wolvic)\/([\w\.]+)/i],[c,g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[c,D+" 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,[g,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[g,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,V]]],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],[u,[h,F],[d,_]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,F],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,w],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,w],[d,_]],[/(macintosh);/i],[u,[h,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,z],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,T],[d,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,T],[d,m]],[/\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],[[u,/_/g," "],[h,P],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,P],[d,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[u,[h,"OPPO"],[d,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,m]],[/\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],[u,[h,R],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,R],[d,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,I],[d,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,I],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[u,[h,S],[d,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,S],[d,m]],[/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],[u,[h,O],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,O],[d,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,y],[d,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,y],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,k],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,E],[d,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,E],[d,m]],[/(nexus 9)/i],[u,[h,"HTC"],[d,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,m]],[/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],[u,[h,"TCL"],[d,_]],[/(itel) ((\w+))/i],[[h,V],u,[d,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[h,"Ulefone"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[h,"Nothing"],[d,m]],[/(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],[h,u,[d,m]],[/(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],[h,u,[d,_]],[/(surface duo)/i],[u,[h,M],[d,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[u,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,_]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,_]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,_]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,_]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,_]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,_]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,_]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,m]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,_]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,_]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,_]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,_]],[/(sprint) (\w+)/i],[h,u,[d,m]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,M],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,N],[d,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,N],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,x]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,F],[d,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,I],[d,x]],[/(apple) ?tv/i],[h,[u,w+" TV"],[d,x]],[/crkey/i],[[u,C+"cast"],[h,S],[d,x]],[/droid.+aft(\w+)( bui|\))/i],[u,[h,y],[d,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,z],[d,x]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,O],[d,x]],[/(mitv-\w{5}) bui/i],[u,[h,P],[d,x]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[d,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,H],[u,H],[d,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,f]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,f]],[/(playstation [345portablevi]+)/i],[u,[h,O],[d,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,M],[d,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[u,[h,F],[d,v]],[/((pebble))app/i],[h,u,[d,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,w],[d,v]],[/droid.+; (glass) \d/i],[u,[h,S],[d,v]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,N],[d,v]],[/(quest( \d| pro)?)/i],[u,[h,L],[d,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,b]],[/(aeobc)\b/i],[u,[h,y],[d,b]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,_]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[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,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,g],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[g,Z,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[g,Z,Y],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,j],[g,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[g,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,g],[/\(bb(10);/i],[g,[c,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[c,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[g,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[g,[c,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,U],g],[/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,g],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,g]]},J=function e(t,f){if(typeof t===o&&(f=t,t=n),!(this instanceof e))return new e(t,f).getResult();var x=typeof i!==a&&i.navigator?i.navigator:n,v=t||(x&&x.userAgent?x.userAgent:""),b=x&&x.userAgentData?x.userAgentData:n,y=f?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(W,f):W,w=x&&x.userAgent==v;return this.getBrowser=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.browser),e[l]=function(e){return typeof e===s?e.replace(/[^\d\.]/g,"").split(".")[0]:n}(e[g]),w&&x&&x.brave&&typeof x.brave.isBrave==r&&(e[c]="Brave"),e},this.getCPU=function(){var e={};return e[p]=n,G.call(e,v,y.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,G.call(e,v,y.device),w&&!e[d]&&b&&b.mobile&&(e[d]=m),w&&"Macintosh"==e[u]&&x&&typeof x.standalone!==a&&x.maxTouchPoints&&x.maxTouchPoints>2&&(e[u]="iPad",e[d]=_),e},this.getEngine=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.engine),e},this.getOS=function(){var e={};return e[c]=n,e[g]=n,G.call(e,v,y.os),w&&!e[c]&&b&&b.platform&&"Unknown"!=b.platform&&(e[c]=b.platform.replace(/chrome os/i,U).replace(/macos/i,j)),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 v},this.setUA=function(e){return v=typeof e===s&&e.length>500?H(e,500):e,this},this.setUA(v),this};J.VERSION="1.0.39",J.BROWSER=K([c,g,l]),J.CPU=K([p]),J.DEVICE=K([u,h,d,f,m,x,_,v,b]),J.ENGINE=J.OS=K([c,g]),e.exports&&(t=e.exports=J),t.UAParser=J;var X=typeof i!==a&&(i.jQuery||i.Zepto);if(X&&!X.ua){var Q=new J;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var i in t)X.ua[i]=t[i]}}}("object"==typeof window?window:W)}(fa,pa);const ma="1.4.8",_a=pa.UAParser(),xa=ma;function va(e,t){var i,n,r,a,o;return{Authorization:`Bearer ${t}`,"ts-sdk-version":xa,"ts-client-id":e,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(i=null==_a?void 0:_a.os)||void 0===i?void 0:i.name,"ts-os-version":null===(n=null==_a?void 0:_a.os)||void 0===n?void 0:n.version,"ts-device-model":null===(r=null==_a?void 0:_a.device)||void 0===r?void 0:r.model,"ts-manufacturer":null===(a=null==_a?void 0:_a.device)||void 0===a?void 0:a.vendor,"ts-browser":null===(o=null==_a?void 0:_a.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 ba="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ya=[],wa=[],Ea="undefined"!=typeof Uint8Array?Uint8Array:Array,ka=!1;function Aa(){ka=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,i=e.length;t<i;++t)ya[t]=e[t],wa[e.charCodeAt(t)]=t;wa["-".charCodeAt(0)]=62,wa["_".charCodeAt(0)]=63}function Ca(e,t,i){for(var n,r,a=[],o=t;o<i;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(ya[(r=n)>>18&63]+ya[r>>12&63]+ya[r>>6&63]+ya[63&r]);return a.join("")}function Da(e){var t;ka||Aa();for(var i=e.length,n=i%3,r="",a=[],o=16383,s=0,l=i-n;s<l;s+=o)a.push(Ca(e,s,s+o>l?l:s+o));return 1===n?(t=e[i-1],r+=ya[t>>2],r+=ya[t<<4&63],r+="=="):2===n&&(t=(e[i-2]<<8)+e[i-1],r+=ya[t>>10],r+=ya[t>>4&63],r+=ya[t<<2&63],r+="="),a.push(r),a.join("")}function Sa(e,t,i,n,r){var a,o,s=8*r-n-1,l=(1<<s)-1,u=l>>1,c=-7,d=i?r-1:0,h=i?-1:1,g=e[t+d];for(d+=h,a=g&(1<<-c)-1,g>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,n),a-=u}return(g?-1:1)*o*Math.pow(2,a-n)}function Ta(e,t,i,n,r,a){var o,s,l,u=8*a-r-1,c=(1<<u)-1,d=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,p=n?1:-1,f=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=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,r),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;e[i+g]=255&s,g+=p,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[i+g]=255&o,g+=p,o/=256,u-=8);e[i+g-p]|=128*f}var Ia={}.toString,Ma=Array.isArray||function(e){return"[object Array]"==Ia.call(e)};function Ra(){return Fa.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ba(e,t){if(Ra()<t)throw new RangeError("Invalid typed array length");return Fa.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Fa.prototype:(null===e&&(e=new Fa(t)),e.length=t),e}function Fa(e,t,i){if(!(Fa.TYPED_ARRAY_SUPPORT||this instanceof Fa))return new Fa(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 Pa(this,e)}return za(this,e,t,i)}function za(e,t,i,n){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,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n);Fa.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Fa.prototype:e=Na(e,t);return e}(e,t,i,n):"string"==typeof t?function(e,t,i){"string"==typeof i&&""!==i||(i="utf8");if(!Fa.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|ja(t,i);e=Ba(e,n);var r=e.write(t,i);r!==n&&(e=e.slice(0,r));return e}(e,t,i):function(e,t){if(Ua(t)){var i=0|La(t.length);return 0===(e=Ba(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||(n=t.length)!=n?Ba(e,0):Na(e,t);if("Buffer"===t.type&&Ma(t.data))return Na(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Oa(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 Pa(e,t){if(Oa(t),e=Ba(e,t<0?0:0|La(t)),!Fa.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function Na(e,t){var i=t.length<0?0:0|La(t.length);e=Ba(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function La(e){if(e>=Ra())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ra().toString(16)+" bytes");return 0|e}function Ua(e){return!(null==e||!e._isBuffer)}function ja(e,t){if(Ua(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 n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return fo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return mo(e).length;default:if(n)return fo(e).length;t=(""+t).toLowerCase(),n=!0}}function qa(e,t,i){var n=!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 no(this,t,i);case"utf8":case"utf-8":return Qa(this,t,i);case"ascii":return to(this,t,i);case"latin1":case"binary":return io(this,t,i);case"base64":return Xa(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ro(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Ka(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function $a(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=Fa.from(t,n)),Ua(t))return 0===t.length?-1:Va(e,t,i,n,r);if("number"==typeof t)return t&=255,Fa.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):Va(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function Va(e,t,i,n,r){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,i/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var c=-1;for(a=i;a<s;a++)if(u(e,a)===u(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(i+l>s&&(i=s-l),a=i;a>=0;a--){for(var d=!0,h=0;h<l;h++)if(u(e,a+h)!==u(t,h)){d=!1;break}if(d)return a}return-1}function Ha(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[i+o]=s}return o}function Ga(e,t,i,n){return _o(fo(t,e.length-i),e,i,n)}function Za(e,t,i,n){return _o(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function Ya(e,t,i,n){return Za(e,t,i,n)}function Wa(e,t,i,n){return _o(mo(t),e,i,n)}function Ja(e,t,i,n){return _o(function(e,t){for(var i,n,r,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(i=e.charCodeAt(o))>>8,r=i%256,a.push(r),a.push(n);return a}(t,e.length-i),e,i,n)}function Xa(e,t,i){return 0===t&&i===e.length?Da(e):Da(e.slice(t,i))}function Qa(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var a,o,s,l,u=e[r],c=null,d=u>239?4:u>223?3:u>191?2:1;if(r+d<=i)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[r+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[r+1],o=e[r+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[r+1],o=e[r+2],s=e[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=d}return function(e){var t=e.length;if(t<=eo)return String.fromCharCode.apply(String,e);var i="",n=0;for(;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=eo));return i}(n)}Fa.TYPED_ARRAY_SUPPORT=void 0===ba.TYPED_ARRAY_SUPPORT||ba.TYPED_ARRAY_SUPPORT,Ra(),Fa.poolSize=8192,Fa._augment=function(e){return e.__proto__=Fa.prototype,e},Fa.from=function(e,t,i){return za(null,e,t,i)},Fa.TYPED_ARRAY_SUPPORT&&(Fa.prototype.__proto__=Uint8Array.prototype,Fa.__proto__=Uint8Array),Fa.alloc=function(e,t,i){return function(e,t,i,n){return Oa(t),t<=0?Ba(e,t):void 0!==i?"string"==typeof n?Ba(e,t).fill(i,n):Ba(e,t).fill(i):Ba(e,t)}(null,e,t,i)},Fa.allocUnsafe=function(e){return Pa(null,e)},Fa.allocUnsafeSlow=function(e){return Pa(null,e)},Fa.isBuffer=function(e){return null!=e&&(!!e._isBuffer||xo(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&xo(e.slice(0,0))}(e))},Fa.compare=function(e,t){if(!Ua(e)||!Ua(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,a=Math.min(i,n);r<a;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},Fa.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}},Fa.concat=function(e,t){if(!Ma(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Fa.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=Fa.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var a=e[i];if(!Ua(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},Fa.byteLength=ja,Fa.prototype._isBuffer=!0,Fa.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)Ka(this,t,t+1);return this},Fa.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)Ka(this,t,t+3),Ka(this,t+1,t+2);return this},Fa.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)Ka(this,t,t+7),Ka(this,t+1,t+6),Ka(this,t+2,t+5),Ka(this,t+3,t+4);return this},Fa.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Qa(this,0,e):qa.apply(this,arguments)},Fa.prototype.equals=function(e){if(!Ua(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Fa.compare(this,e)},Fa.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+">"},Fa.prototype.compare=function(e,t,i,n,r){if(!Ua(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===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(n,r),u=e.slice(t,i),c=0;c<s;++c)if(l[c]!==u[c]){a=l[c],o=u[c];break}return a<o?-1:o<a?1:0},Fa.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},Fa.prototype.indexOf=function(e,t,i){return $a(this,e,t,i,!0)},Fa.prototype.lastIndexOf=function(e,t,i){return $a(this,e,t,i,!1)},Fa.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=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===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return Ha(this,e,t,i);case"utf8":case"utf-8":return Ga(this,e,t,i);case"ascii":return Za(this,e,t,i);case"latin1":case"binary":return Ya(this,e,t,i);case"base64":return Wa(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ja(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Fa.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var eo=4096;function to(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function io(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function no(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",a=t;a<i;++a)r+=po(e[a]);return r}function ro(e,t,i){for(var n=e.slice(t,i),r="",a=0;a<n.length;a+=2)r+=String.fromCharCode(n[a]+256*n[a+1]);return r}function ao(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 oo(e,t,i,n,r,a){if(!Ua(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function so(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-i,2);r<a;++r)e[i+r]=(t&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function lo(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-i,4);r<a;++r)e[i+r]=t>>>8*(n?r:3-r)&255}function uo(e,t,i,n,r,a){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function co(e,t,i,n,r){return r||uo(e,0,i,4),Ta(e,t,i,n,23,4),i+4}function ho(e,t,i,n,r){return r||uo(e,0,i,8),Ta(e,t,i,n,52,8),i+8}Fa.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Fa.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=Fa.prototype;else{var r=t-e;i=new Fa(r,void 0);for(var a=0;a<r;++a)i[a]=this[a+e]}return i},Fa.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||ao(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n},Fa.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||ao(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},Fa.prototype.readUInt8=function(e,t){return t||ao(e,1,this.length),this[e]},Fa.prototype.readUInt16LE=function(e,t){return t||ao(e,2,this.length),this[e]|this[e+1]<<8},Fa.prototype.readUInt16BE=function(e,t){return t||ao(e,2,this.length),this[e]<<8|this[e+1]},Fa.prototype.readUInt32LE=function(e,t){return t||ao(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Fa.prototype.readUInt32BE=function(e,t){return t||ao(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Fa.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||ao(e,t,this.length);for(var n=this[e],r=1,a=0;++a<t&&(r*=256);)n+=this[e+a]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},Fa.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||ao(e,t,this.length);for(var n=t,r=1,a=this[e+--n];n>0&&(r*=256);)a+=this[e+--n]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*t)),a},Fa.prototype.readInt8=function(e,t){return t||ao(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Fa.prototype.readInt16LE=function(e,t){t||ao(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},Fa.prototype.readInt16BE=function(e,t){t||ao(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},Fa.prototype.readInt32LE=function(e,t){return t||ao(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Fa.prototype.readInt32BE=function(e,t){return t||ao(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Fa.prototype.readFloatLE=function(e,t){return t||ao(e,4,this.length),Sa(this,e,!0,23,4)},Fa.prototype.readFloatBE=function(e,t){return t||ao(e,4,this.length),Sa(this,e,!1,23,4)},Fa.prototype.readDoubleLE=function(e,t){return t||ao(e,8,this.length),Sa(this,e,!0,52,8)},Fa.prototype.readDoubleBE=function(e,t){return t||ao(e,8,this.length),Sa(this,e,!1,52,8)},Fa.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||oo(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,a=0;for(this[t]=255&e;++a<i&&(r*=256);)this[t+a]=e/r&255;return t+i},Fa.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t|=0,i|=0,n)||oo(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+i},Fa.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,1,255,0),Fa.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Fa.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,2,65535,0),Fa.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):so(this,e,t,!0),t+2},Fa.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,2,65535,0),Fa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):so(this,e,t,!1),t+2},Fa.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,4,4294967295,0),Fa.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):lo(this,e,t,!0),t+4},Fa.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,4,4294967295,0),Fa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):lo(this,e,t,!1),t+4},Fa.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);oo(this,e,t,i,r-1,-r)}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},Fa.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);oo(this,e,t,i,r-1,-r)}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},Fa.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,1,127,-128),Fa.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Fa.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,2,32767,-32768),Fa.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):so(this,e,t,!0),t+2},Fa.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,2,32767,-32768),Fa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):so(this,e,t,!1),t+2},Fa.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,4,2147483647,-2147483648),Fa.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):lo(this,e,t,!0),t+4},Fa.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||oo(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Fa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):lo(this,e,t,!1),t+4},Fa.prototype.writeFloatLE=function(e,t,i){return co(this,e,t,!0,i)},Fa.prototype.writeFloatBE=function(e,t,i){return co(this,e,t,!1,i)},Fa.prototype.writeDoubleLE=function(e,t,i){return ho(this,e,t,!0,i)},Fa.prototype.writeDoubleBE=function(e,t,i){return ho(this,e,t,!1,i)},Fa.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===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(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var r,a=n-i;if(this===e&&i<t&&t<n)for(r=a-1;r>=0;--r)e[r+t]=this[r+i];else if(a<1e3||!Fa.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},Fa.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Fa.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}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=Ua(e)?e:fo(new Fa(e,n).toString()),s=o.length;for(a=0;a<i-t;++a)this[a+t]=o[a%s]}return this};var go=/[^+\/0-9A-Za-z-_]/g;function po(e){return e<16?"0"+e.toString(16):e.toString(16)}function fo(e,t){var i;t=t||1/0;for(var n=e.length,r=null,a=[],o=0;o<n;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=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 mo(e){return function(e){var t,i,n,r,a,o;ka||Aa();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 Ea(3*s/4-a),n=a>0?s-4:s;var l=0;for(t=0,i=0;t<n;t+=4,i+=3)r=wa[e.charCodeAt(t)]<<18|wa[e.charCodeAt(t+1)]<<12|wa[e.charCodeAt(t+2)]<<6|wa[e.charCodeAt(t+3)],o[l++]=r>>16&255,o[l++]=r>>8&255,o[l++]=255&r;return 2===a?(r=wa[e.charCodeAt(t)]<<2|wa[e.charCodeAt(t+1)]>>4,o[l++]=255&r):1===a&&(r=wa[e.charCodeAt(t)]<<10|wa[e.charCodeAt(t+1)]<<4|wa[e.charCodeAt(t+2)]>>2,o[l++]=r>>8&255,o[l++]=255&r),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(go,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _o(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function xo(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}const vo=e=>null!=e,bo=e=>"string"==typeof e,yo=e=>bo(e)&&""!==e,wo=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]),Eo=e=>e instanceof FormData,ko=e=>{const t=[],i=(e,n)=>{vo(n)&&(Array.isArray(n)?n.forEach((t=>{i(e,t)})):"object"==typeof n?Object.entries(n).forEach((t=>{let[n,r]=t;i(`${e}[${n}]`,r)})):((e,i)=>{t.push(`${encodeURIComponent(e)}=${encodeURIComponent(String(i))}`)})(e,n))};return Object.entries(e).forEach((e=>{let[t,n]=e;i(t,n)})),t.length>0?`?${t.join("&")}`:""},Ao=async(e,t)=>"function"==typeof t?t(e):t,Co=async(e,t)=>{const i=await Ao(t,e.TOKEN),n=await Ao(t,e.USERNAME),r=await Ao(t,e.PASSWORD),a=await Ao(t,e.HEADERS),o=Object.entries(u(u({Accept:"application/json"},a),t.headers)).filter((e=>{let[t,i]=e;return vo(i)})).reduce(((e,t)=>{let[i,n]=t;return u(u({},e),{},{[i]:String(n)})}),{});if(yo(i)&&(o.Authorization=`Bearer ${i}`),yo(n)&&yo(r)){const e=(e=>{try{return btoa(e)}catch(t){return Fa.from(e).toString("base64")}})(`${n}:${r}`);o.Authorization=`Basic ${e}`}return t.body&&(t.mediaType?o["Content-Type"]=t.mediaType:wo(t.body)?o["Content-Type"]=t.body.type||"application/octet-stream":bo(t.body)?o["Content-Type"]="text/plain":Eo(t.body)||(o["Content-Type"]="application/json")),new Headers(o)},Do=(e,t)=>new Promise((async(i,n)=>{try{const n=((e,t)=>{const i=e.ENCODE_PATH||encodeURI,n=null==t?void 0:t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,((e,n)=>{var r;return(null===(r=null==t?void 0:t.path)||void 0===r?void 0:r.hasOwnProperty(n))?i(String(t.path[n])):e})),r=`${e.BASE}${n}`;return t.query?`${r}${ko(t.query)}`:r})(e,t),r=(e=>{if(e.formData){const t=new FormData,i=(e,i)=>{bo(i)||wo(i)?t.append(e,i):t.append(e,JSON.stringify(i))};return Object.entries(e.formData).filter((e=>{let[t,i]=e;return vo(i)})).forEach((e=>{let[t,n]=e;Array.isArray(n)?n.forEach((e=>i(t,e))):i(t,n)})),t}})(t),a=(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):bo(e.body)||wo(e.body)||Eo(e.body)?e.body:JSON.stringify(e.body)})(t),o=await Co(e,t),s=await(async(e,t,i,n,r,a)=>{const o=new AbortController,s={headers:a,body:null!=n?n:r,method:t.method,signal:o.signal};return e.WITH_CREDENTIALS&&(s.credentials=e.CREDENTIALS),await fetch(i,s)})(e,t,n,a,r,o),l=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)}})(s),c=((e,t)=>{if(t){const i=e.headers.get(t);if(bo(i))return i}})(s,t.responseHeader),d={url:n,ok:s.ok,status:s.status,statusText:s.statusText,headers:s.headers,body:null!=c?c:l};((e,t)=>{var i,n;const r=u({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},e.errors)[t.status];if(r)throw new la(e,t,r);if(!t.ok){const r=null!==(i=t.status)&&void 0!==i?i:"unknown",a=null!==(n=t.statusText)&&void 0!==n?n:"unknown",o=(()=>{try{return JSON.stringify(t.body,null,2)}catch(e){return}})();throw new la(e,t,`Generic Error: status: ${r}; status text: ${a}; body: ${o}`)}})(t,d),i(d)}catch(e){n(e)}})),So=new Y("idv"),To=Symbol(),Io=Symbol(),Mo="verify-id-sdk";function Ro(e){return sessionStorage.getItem(e)}const Bo=new Map;function Fo(e,t){const i=Bo.get(e);So.events.emit(i,t)}function zo(e){Fo(To,e)}function Oo(e,t,i,n,r){zo({type:"verification-result",status:t,step:e,state:n,callbackUrl:r,sessionId:i})}function Po(e,t){zo({type:"capture-error",errorCode:t,step:e})}function No(e,t,i){zo({type:"api-request-error",errorCode:t,step:e,error:i})}function Lo(e,t){return Do(ua,e).catch((i=>(e.url.endsWith("/events")||No(t,"request-error",i.message),Promise.reject(i))))}async function Uo(e){var t;ua.HEADERS=va(e);const i=await function(e){return Lo({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}}Bo.set(To,To),Bo.set(Io,Io);var jo={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)}},qo={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 Ko=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,n){return e[i]=n,Fo(Io,{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:jo,mutations:qo,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var $o;function Vo(e){const t=[],i=function(e){var t,i,n,r;const a=e.stats.get($o.BLUR_DETECTION),o=e.stats.get($o.GLARE_DETECTION);if(!a&&!o||0===(null==a?void 0:a.durations.length)&&0===(null==o?void 0:o.durations.length))return;const s=Zo(null!==(t=null==a?void 0:a.durations)&&void 0!==t?t:null==o?void 0:o.durations),l=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:Go($o.BLUR_DETECTION),count_success:l,count_failure_glare:null!==(n=null==o?void 0:o.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(r=null==a?void 0:a.countFailed)&&void 0!==r?r:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(e);i&&t.push(i);for(const[i,n]of e.stats.entries())i!==$o.BLUR_DETECTION&&i!==$o.GLARE_DETECTION&&n.durations.length>0&&t.push(Ho(n,i));return e.frameHandleDurations.length>0&&t.push(function(e){const t=Zo(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 Ho(e,t){const i=Zo(e.durations);return{name:Go(t),count_success:e.countSuccess,count_failure:e.countFailed,avg_duration:i.duration_avg,std_duration:i.duration_std}}function Go(e){switch(e){case $o.BLUR_DETECTION:case $o.GLARE_DETECTION:return"blur_glare_detector";case $o.DOCUMENT_DETECTION:return"doc_detector";case $o.DOCUMENT_POSITION:return"doc_frame_detector";case $o.BARCODE_DETECTION:return"barcode_detector";case $o.FACE_DETECTION:return"face_detector";case $o.FACE_POSITION:return"face_frame_detector";default:return e}}function Zo(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,n=e.reduce(((e,t)=>e+t),0)/i;let r=0;for(let t=0;t<i;t++){const i=e[t];r+=Math.pow(i-n,2)}const a=Math.sqrt(r/(i-1));return{duration_avg:Math.round(n),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"}($o||($o={}));const Yo=new class{createUploadImageEvent(e,t,i,n){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(n)}}}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 n,r,a;const o={user_action_type:e,page_name:t,autocapture:!!i,autocapture_enabled:null!==(a=null===(r=null===(n=Ko.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&void 0!==a&&a};if(i){const e=Vo(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 Wo(e,t,i,n,r){i?(ua.HEADERS=va(n,t),await function(e,t,i){return Lo({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${e}/events`,path:{sid:e},body:t},i)}(i,r,e)):console.error("cannot send event, sessionId or startToken is not set")}const Jo=new class{handelEventData(e){if("session-id-acquired"===e.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const e=`${ua.BASE}/verify/api/v1/verification/${Ko.state.sessionId}/risk-session-token`,t=Ko.state.clientId,i=va(t,Ko.state.userToken);sa().then((t=>{So.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,n,r,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=Yo.createDrsInitFailureEvent(o,"init");Wo(null===(i=Ko.state)||void 0===i?void 0:i.step,null===(n=Ko.state)||void 0===n?void 0:n.userToken,null===(r=Ko.state)||void 0===r?void 0:r.sessionId,null===(a=Ko.state)||void 0===a?void 0:a.clientId,s).then((()=>{zo({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 Xo(e,t,i){const n=Yo.createErrorEvent(e,t,i);await Qo(i,n)}async function Qo(e,t){var i,n,r,a,o;const s=null===(i=Ko.state)||void 0===i?void 0:i.userToken,l=(null===(n=Ko.state)||void 0===n?void 0:n.sessionId)||(null===(r=Ko.state)||void 0===r?void 0:r.startToken),u=null===(a=Ko.state)||void 0===a?void 0:a.clientId,c=(null===(o=Ko.state)||void 0===o?void 0:o.step)||e;await Wo(c,s,l,u,t)}const es=function(){var e,t;(null===(t=null===(e=Ko.state.autoCaptureSettings)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.debug)&&console.log(...arguments)};var ts;!function(e){e.DOCUMENT_DETECTOR="document_detector",e.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",e.FACE_LANDMARK="face_landmark"}(ts||(ts={}));const is=["pdf417","qr_code"];class ns{constructor(){this.model=new BarcodeDetector({formats:is})}async detect(e){const t=await this.model.detect(e);return es("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 rs;!function(e){e.NOT_AVAILABLE="notAvailable",e.LOADING="loading",e.LOADED="loaded"}(rs||(rs={}));const as={[ts.DOCUMENT_DETECTOR]:{status:rs.LOADING},[ts.BLUR_GLARE_CLASSIFIER]:{status:rs.LOADING},[ts.FACE_LANDMARK]:{status:rs.LOADING}};const os=[ts.DOCUMENT_DETECTOR,ts.BLUR_GLARE_CLASSIFIER],ss=async()=>{let e=!1;for(;!e;){const t=Object.values(as).filter((e=>e.status===rs.NOT_AVAILABLE));if(t.length>0)throw new Error(`Model not available: ${t.join(", ")}`);if(e=os.every((e=>as[e].status===rs.LOADED)),e)return!0;await new Promise((e=>setTimeout(e,100)))}},ls=e=>"function"==typeof e,us=function(e){};So.events.on(So.events.MODULE_INITIALIZED,(function(){const{clientId:e,IDV:t}=So.moduleMetadata.getInitConfig();if(!e||!t)return!1;const i=(null==t?void 0:t.serverPath)&&(n=null==t?void 0:t.serverPath,r="/verify",(null==n?void 0:n.endsWith(r))?n.slice(0,n.length-r.length):n);var n,r;ua.BASE=i||window.location.origin,Ko.dispatch("setClientId",e),Ko.dispatch("setRootElement",(null==t?void 0:t.rootElement)||"root-element"),Ko.dispatch("setServerPath",null==t?void 0:t.serverPath),Ko.dispatch("setLanguage",null==t?void 0:t.language),Ko.dispatch("setCallback",null==t?void 0:t.callback),Ko.dispatch("setConsentVersion",null==t?void 0:t.consentVersion),Ko.dispatch("setMarkdownSupportText",null==t?void 0:t.markdownSupportText),Ko.dispatch("setVideoCaptureSettings",null==t?void 0:t.videoCaptureSettings),Ko.dispatch("setCdnHost",null==t?void 0:t.cdnHost),Ko.dispatch("setIsImageSigningEnabled",null==t?void 0:t.isImageSigningEnabled),(null==t?void 0:t.callbacks)&&(e=>{let{callbacks:t,callback:i}=e;ls(t.sessionGranted)&&(cs=t.sessionGranted);ls(t.sessionStarted)&&(ds=t.sessionStarted);ls(t.imageSubmitted)&&(hs=t.imageSubmitted);ls(t.processing)&&(gs=t.processing);ls(t.completed)&&(ps=t.completed);ls(t.recapture)&&(fs=t.recapture);ls(t.error)&&(ms=t.error);ls(i)&&(_s=i)})(t);return Ko.dispatch("setStartToken",null==t?void 0:t.startToken),Uo(Ko.state.clientId).then((e=>{!async function(e){if(null==e?void 0:e.autocapture_enabled){if("serviceWorker"in navigator)return Ko.dispatch("setAutoCaptureSettings",{enabled:!0,settings:e.autocapture_settings}),es("service worker available"),void navigator.serviceWorker.addEventListener("message",(e=>{if(e.data&&"MODEL_READY"===e.data.type){const t=e.data.modelName;as[t]={status:rs.LOADED,imageDimensions:e.data.imageDimensions,loadingStats:u(u({},e.data.stats),{},{modelName:t})}}else if(e.data&&"MODEL_LOAD_ERROR"===e.data.type){const t=e.data.modelName;as[t].status=rs.NOT_AVAILABLE,Xo(`${e.data.modelName} error: ${e.data.error}`,"model_load_error","init")}}));Xo("service worker not available","service_worker_not_available","init")}Ko.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:e.autocapture_settings})}(e)})),function(e){zo({type:"init",step:e})}("init"),!0})),So.events.on(To,(function(e){switch(Jo.handelEventData(e),_s(e),e.type){case"session-granted":cs({session:Ko.state.sessionId});break;case"session-id-acquired":ds({session:Ko.state.sessionId});break;case"capture-image-result":hs({session:Ko.state.sessionId},e.imageType);break;case"start-verification-processing":gs({session:Ko.state.sessionId});break;case"verification-complete":ps({session:Ko.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":ms({session:Ko.state.sessionId},e.errorCode,e.error);break;case"verification-recapture":fs({session:Ko.state.sessionId},e.reason)}}));let cs=us,ds=us,hs=us,gs=us,ps=us,fs=us,ms=us,_s=e=>{};async function xs(e,t,i){ua.HEADERS=va(i,t);var n;return(await(n=e,Lo({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}function vs(e){try{return JSON.parse(e)}catch(e){return console.error(e),null}}async function bs(e,t,i,n){ua.HEADERS=va(t);const r=await(a={start_token:e,accessed_from_desktop:!1,client_type:ga.client_type.MOBILE_SDK,consent:{granted:!0,document_id:i},image_signing_public_key:n},Lo({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:a,mediaType:"application/json"},"init"));var a;return{sessionId:r.body.session_id,userToken:r.body.user_token,requiredImages:r.body.required_images}}async function ys(e,t,i){let n,r,a;if(n)try{n=Ro(Mo);const e=JSON.parse(n);r=e.sessionId,a=e.userToken}catch(e){}try{let l;if(a){l=(await xs(r,a,i)).missing_images}else{const u=So.crypto.createCryptoBinding("sign"),c=await u.getPublicData(),d=await bs(e,i,t,c.publicKey);r=d.sessionId,a=d.userToken,l=d.requiredImages,n=JSON.stringify({sessionId:r,userToken:a}),o=Mo,s=n,sessionStorage.setItem(o,s)}return{requiredImages:l,sessionId:r.toString(),userToken:a.toString()}}catch(e){throw console.log("Error starting session"),console.error(e),e}var o,s}function ws(e){let{tagName:t,style:i,id:n="",className:r="",testid:a,options:o}=e;const s=document.createElement(t,o);return s.id=n,s.className=r,s.setAttribute("data-auto",a+"-auto"),Object.keys(i).forEach((e=>{s.style[e]=i[e]})),s}function Es(e,t){Array.isArray(t)?t.forEach((t=>{e.appendChild(t)})):e.appendChild(t)}const ks={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 As=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),n=1;n<t;n++)i[n-1]=arguments[n];let r=this.translations[e];return r||(r=e),r.replace(/{(\d+)}/g,(function(e,t){return void 0!==i[t]?i[t]:e}))}}(ks),Cs={en:ks,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 Ds=async(e,t,i,n,r,a)=>{var o,s,l,u,c,d,h;ua.HEADERS=va(i,t);const g=pa.UAParser();let p;if(Ko.state.isImageSigningEnabled){const e=So.crypto.createCryptoBinding("sign");p=await e.sign(n.data)}const f=await(m=e,_={image:{format:n.format,image_type:a,content:n.data,capture_margins:n.captureMargins,signature:p},device_info:{model:null===(o=null==g?void 0:g.device)||void 0===o?void 0:o.model,type:null===(s=null==g?void 0:g.device)||void 0===s?void 0:s.type,manufacturer:null===(l=null==g?void 0:g.device)||void 0===l?void 0:l.vendor,os:null===(u=null==g?void 0:g.os)||void 0===u?void 0:u.name,os_version:null===(c=null==g?void 0:g.os)||void 0===c?void 0:c.version,browser:null===(d=null==g?void 0:g.browser)||void 0===d?void 0:d.name,browser_version:null===(h=null==g?void 0:g.browser)||void 0===h?void 0:h.version,used_camera:null==r?void 0:r.selectedCamera,cameras:null==r?void 0:r.camerasInfo}},Lo({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:m},body:_,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"}},_.image.image_type));var m,_;const x=function(e,t){const i=[...e].find((e=>e.includes(t)));return void 0!==i?i[1]:void 0}(f.headers,"x-ts-processing-time-ms");return"ok"!==f.body.feedback&&console.error("Error",f),{missing_images:f.body.missing_images,feedback:f.body.feedback,custom_feedback:f.body.custom_feedback,has_barcode:f.body.has_barcode,serverProcessingTime:x}},Ss=()=>{const e=document.getElementById("overlay-frame");if(e){const t=e.getBoundingClientRect(),i=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+t.top,bottom:n+t.bottom,right:i+t.right,left:i+t.left}}},Ts=e=>["document_front","document_back"].includes(e)?"environment":"user";function Is(e){switch(e){case"document_front":return da.image_type.DOCUMENT_FRONT;case"document_back":return da.image_type.DOCUMENT_BACK;case"selfie":return da.image_type.SELFIE}}var Ms={},Rs={get exports(){return Ms},set exports(e){Ms=e}};Rs.exports=function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},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 n=i(1),r=i(7);i.d(t,"a",(function(){return r.a})),i.d(t,"d",(function(){return n.b}));var a=n.a.FACING_MODES,o=n.a.IMAGE_TYPES},function(e,t,i){var n=i(6);i.d(t,"a",(function(){return n.a}));var r=i(2);i.d(t,"b",(function(){return r.a}))},function(e,t,i){function n(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 r(e,t){var i={};try{n(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 n=e*parseFloat(i);return{imageWidth:n,imageHeight:t/(e/n)}}function l(e,t,i){return r(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 u(e,t){return e||t}function c(){var e=a();if(/iPad|iPhone|iPod/.test(e))return!0;var t=o();return!(!/Mac/.test(e)||!t)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:a(),_getHasTouchEvents:o(),getIsIOS:c()}}t.c=s,t.b=l,t.e=u,t.d=c,t.a=d;var h=i(3)},function(e,t,i){function n(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 l})),i.d(t,"b",(function(){return u})),i.d(t,"d",(function(){return c}));var r,a=["user","environment"],o={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],l={PNG:"png",JPG:"jpg"},u=(n(r={},"jpg","image/jpeg"),n(r,"png","image/png"),r),c={audio:!1,video:!0}},function(e,t,i){e.exports=i(5)},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(0);i.d(t,"FACING_MODES",(function(){return n.b})),i.d(t,"IMAGE_TYPES",(function(){return n.c})),i.d(t,"_getDebugPlatformInfo",(function(){return n.d}));var r=i(9);i.d(t,"downloadPhoto",(function(){return r.a})),t.default=n.a},function(e,t,i){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return s}));var r=i(2),a=i(3),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=function(){function e(){n(this,e)}return o(e,null,[{key:"getDataUri",value:function(e,t){var i=t.sizeFactor,n=t.imageType,a=t.imageCompression,o=t.isImageMirror,s=e.videoWidth,l=e.videoHeight,u=Object(r.c)(s,l,i),c=u.imageWidth,d=u.imageHeight,h=document.createElement("canvas");h.width=c,h.height=d;var g=h.getContext("2d");return o&&g.setTransform(-1,0,0,1,h.width,0),g.drawImage(e,0,0,c,d),Object(r.b)(h,n,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 n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,r={getUserMedia:function(e){return new Promise((function(t,i){n.call(navigator,e,t,i)}))}};e=Object.assign(n,r)}return e}},{key:"isSupportedFacingMode",value:function(){return e.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(t,i){if(!Object(r.e)(t,i))return a.d;var n=e.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.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 n=[{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(r.d)()?(console.warn("fallback to iOS constraints"),e.getIdealConstraints(t,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(a.video.advanced=n,a);if(i<n.length){var o=n.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 n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return l}));var r=i(1),a=i(8),o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=r.a.IMAGE_TYPES.PNG,l=function(){function e(t){n(this,e),this.videoElement=t,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=r.a.getWindowURL(),this.mediaDevices=r.a.getNavigatorMediaDevices()}return o(e,[{key:"_getStreamDevice",value:function(e,t){var i=this;return new Promise((function(n,a){var o=r.a.getIdealConstraints(e,t);i.mediaDevices.getUserMedia(o).then((function(e){i._gotStream(e),n(e)})).catch((function(e){a(e)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(e){var t=this,i=r.a.getMaxResolutionConstraints(e,this.numberOfMaxResolutionTry);if(null==i){var n={};return this._getStreamDevice(e,n)}return new Promise((function(n,r){t.mediaDevices.getUserMedia(i).then((function(e){t._gotStream(e),n(e)})).catch((function(i){setTimeout((function(){t.numberOfMaxResolutionTry+=1,t._getStreamDeviceMaxResolution(e).catch((function(){r(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 n=[];e.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.deviceId&&n.push(e)})),t(n)})).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 r.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 n})),i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return a}));var n=1,r=null,a=!1},function(e,t,i){var n=i(10);i.d(t,"a",(function(){return n.a}))},function(e,t,i){function n(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),r=new Uint8Array(n),a=0;a<t.length;a++)r[a]=t.charCodeAt(a);return new Blob([n],{type:i})}function r(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function a(e){var t=u.c.PNG;return"image/jpeg"===e&&(t=u.c.JPG),t}function o(e,t,i){return e+"-"+r(t,4)+"."+a(i)}function s(e,t,i){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=o(t,i,e.type),n.href=window.URL.createObjectURL(e);var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}function l(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(n(e),t,i)}t.a=l;var u=i(0)}]);var Bs=J(Ms);class Fs{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return Fs.instance||(Fs.instance=new Fs),Fs.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 zs=[{os:{name:"Android"},label:"2 0"}];async function Os(){const e=(await async function(){const e=Fs.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 Ps.some((e=>t.includes(e)))})),t=pa.UAParser(),i=e.find((e=>zs.find((i=>i.os.name===t.os.name&&e.label.includes(i.label)))));return i?{optionalCameras:e,selectedCamera:i}:{optionalCameras:e}}const Ps=["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"],Ns={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Ls={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Us=async e=>{var t,i;let n;return"environment"==e&&(n=await Os()),null!==(i=null===(t=null==n?void 0:n.selectedCamera)||void 0===t?void 0:t.deviceId)&&void 0!==i?i:e},js=(e,t)=>{var i,n;return"user"===e?null!==(i=null==t?void 0:t.selfieVideoConstraints)&&void 0!==i?i:Ls:null!==(n=null==t?void 0:t.environmentVideoConstraints)&&void 0!==n?n:Ns},qs=e=>{const t=ws({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},Ks={title:"other_error_code_title",message:"other_error_code_message"},$s={ok:Ks,document_face_not_found:Ks,restricted_criteria:Ks,other:Ks,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"}},Vs={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"}},Hs=(e,t)=>{const i=ws({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){Es(e,ws({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"})),Es(e,ws({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"})),Es(e,ws({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"})),Es(e,ws({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 Gs=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 Zs(){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 Ys={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)"}},Ws=e=>{let{text:t,level:i=1,style:n={},id:r,testid:a}=e;const o=ws({tagName:`h${i}`,style:u(u(u({},Ys.all),Ys[i]),n),id:r,testid:a});return o.textContent=t,o.id=r,o};var Js,Xs={};let Qs=null;try{Qs=(Js||(Js=1,function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(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 n={exec:()=>null};function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="string"==typeof e?e:e.source;const n={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(a.caret,"$1"),i=i.replace(e,r),n},getRegex:()=>new RegExp(i,t)};return n}const a={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")},o=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s=/(?:[*+-]|\d{1,9}[.)])/,l=r(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,s).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(),c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,s).getRegex(),f="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]*?(?:-->|$))/,_=r("^ {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",f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x=r(c).replace("hr",o).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",f).getRegex(),v={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",x).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:o,html:_,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:x,table:n,text:/^[^\n]+/},b=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",o).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",f).getRegex(),y=u(u({},v),{},{table:b,paragraph:r(c).replace("hr",o).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",b).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",f).getRegex()}),w=u(u({},v),{},{html:r("^ *(?: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:n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(c).replace("hr",o).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),E=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,k=/^( {2,}|\\)\n(?!\s*$)/,A="\\p{P}\\p{S}",C=r(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,A).getRegex(),D=r(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,A).getRegex(),S=r("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,A).getRegex(),T=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,A).getRegex(),I=r(/\\([punct])/,"gu").replace(/punct/g,A).getRegex(),M=r(/^<(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=r(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=r("^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(),F=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",F).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O=r(/^!?\[(label)\]\[(ref)\]/).replace("label",F).replace("ref",h).getRegex(),P=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),N={_backpedal:n,anyPunctuation:I,autolink:M,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:k,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:n,emStrongLDelim:D,emStrongRDelimAst:S,emStrongRDelimUnd:T,escape:E,link:z,nolink:P,punctuation:C,reflink:O,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",O).replace("nolink",P).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:n},L=u(u({},N),{},{link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",F).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F).getRegex()}),U=u(u({},N),{},{escape:r(E).replace("])","~|])").getRegex(),url:r(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),j=u(u({},U),{},{br:r(k).replace("{2,}","*").getRegex(),text:r(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),q={normal:v,gfm:y,pedantic:w},K={normal:N,gfm:U,breaks:j,pedantic:L},$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},V=e=>$[e];function H(e,t){if(t){if(a.escapeTest.test(e))return e.replace(a.escapeReplace,V)}else if(a.escapeTestNoEncode.test(e))return e.replace(a.escapeReplaceNoEncode,V);return e}function G(e){try{e=encodeURI(e).replace(a.percentDecode,"%")}catch(e){return null}return e}function Z(e,t){const i=e.replace(a.findPipe,((e,t,i)=>{let n=!1,r=t;for(;--r>=0&&"\\"===i[r];)n=!n;return n?"|":" |"})).split(a.splitPipe);let n=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(;n<i.length;n++)i[n]=i[n].trim().replace(a.slashPipe,"|");return i}function Y(e,t,i){const n=e.length;if(0===n)return"";let r=0;for(;r<n;){const a=e.charAt(n-r-1);if(a!==t||i){if(a===t||!i)break;r++}else r++}return e.slice(0,n-r)}function W(e,t,i,n,r){const a=t.href,o=t.title||null,s=e[1].replace(r.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:i,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:a,title:o,text:s}}class J{constructor(t){d(this,"options",void 0),d(this,"rules",void 0),d(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:Y(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t,i){const n=e.match(i.other.indentCodeCompensation);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(i.other.beginningSpace);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.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=Y(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:Y(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=Y(t[0],"\n").split("\n"),i="",n="";const r=[];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"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}\n${s}`:s,n=n?`${n}\n${l}`:l;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,r,!0),this.lexer.state.top=u,0===e.length)break;const c=r[r.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const t=c,a=t.raw+"\n"+e.join("\n"),o=this.blockquote(a);r[r.length-1]=o,i=i.substring(0,i.length-t.raw.length)+o.raw,n=n.substring(0,n.length-t.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const t=c,a=t.raw+"\n"+e.join("\n"),o=this.list(a);r[r.length-1]=o,i=i.substring(0,i.length-c.raw.length)+o.raw,n=n.substring(0,n.length-t.raw.length)+o.raw,e=a.substring(r[r.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,r={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const a=this.rules.other.listItemRegex(i);let o=!1;for(;e;){let i=!1,n="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),i=!0),!i){const t=this.rules.other.nextBulletRegex(d),i=this.rules.other.hrRegex(d),r=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){const h=e.split("\n",1)[0];let g;if(u=h,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),g=u):g=u.replace(this.rules.other.tabCharGlobal," "),r.test(u))break;if(a.test(u))break;if(o.test(u))break;if(t.test(u))break;if(i.test(u))break;if(g.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+g.slice(d);else{if(c)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(l))break;if(a.test(l))break;if(i.test(l))break;s+="\n"+u}c||u.trim()||(c=!0),n+=h+"\n",e=e.substring(h.length+1),l=g.slice(d)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(o=!0));let h,g=null;this.options.gfm&&(g=this.rules.other.listIsTask.exec(s),g&&(h="[ ] "!==g[0],s=s.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:n,task:!!g,checked:h,loose:!1,text:s,tokens:[]}),r.raw+=n}r.items[r.items.length-1].raw=r.items[r.items.length-1].raw.trimEnd(),r.items[r.items.length-1].text=r.items[r.items.length-1].text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),i=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=i}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}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"):"",n=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:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const i=Z(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=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===n.length){for(const e of n)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 r)a.rows.push(Z(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=Y(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 n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])i++;else if(e[n]===t[1]&&(i--,i<0))return n;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],n="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],n=e[3])}else n=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)),W(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},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 W(i,e,i[0],this.lexer,this.rules)}}emStrong(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(e);if(n&&(!n[3]||!i.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...n[0]].length-1;let r,a,o=i,s=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(a=[...r].length,n[3]||n[4]){o+=a;continue}if((n[5]||n[6])&&i%3&&!((i+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+a);if(Math.min(i,a)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}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),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&n&&(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,r;if("@"===t[2])e=t[0],r="mailto:"+e;else{let a;do{var i,n;a=t[0],t[0]=null!==(i=null===(n=this.rules.inline._backpedal.exec(t[0]))||void 0===n?void 0:n[0])&&void 0!==i?i:""}while(a!==t[0]);e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,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 X{constructor(t){d(this,"tokens",void 0),d(this,"options",void 0),d(this,"state",void 0),d(this,"tokenizer",void 0),d(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new J,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:a,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 X(t).lex(e)}static lexInline(e,t){return new X(t).inlineTokens(e)}lex(e){e=e.replace(a.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,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(a.tabCharGlobal," ").replace(a.spaceLine,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(t=i.call({lexer:this},e,r))&&(e=e.substring(t.raw.length),r.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&r.length>0?r[r.length-1].raw+="\n":r.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),i=r[r.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?r.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),r.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),i=r[r.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),r.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),r.push(t);else{var s;if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(n)))i=r[r.length-1],o&&"paragraph"===(null===(s=i)||void 0===s?void 0:s.type)?(i.raw+="\n"+t.raw,i.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(t),o=n.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),i=r[r.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):r.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,r}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,n,r,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,r.index)+"++"+l.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,l,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(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},i),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(n))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 Q{constructor(t){d(this,"options",void 0),d(this,"parser",void 0),this.options=t||e.defaults}space(e){return""}code(e){var t;let{text:i,lang:n,escaped:r}=e;const o=null===(t=(n||"").match(a.notSpaceStart))||void 0===t?void 0:t[0],s=i.replace(a.endingNewline,"")+"\n";return o?'<pre><code class="language-'+H(o)+'">'+(r?s:H(s,!0))+"</code></pre>\n":"<pre><code>"+(r?s:H(s,!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 n="";for(let t=0;t<e.items.length;t++){const i=e.items[t];n+=this.listitem(i)}const r=t?"ol":"ul";return"<"+r+(t&&1!==i?' start="'+i+'"':"")+">\n"+n+"</"+r+">\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+" "+H(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 n="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];i="";for(let e=0;e<r.length;e++)i+=this.tablecell(r[e]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</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>${H(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:n}=e;const r=this.parser.parseInline(n),a=G(t);if(null===a)return r;let o='<a href="'+(t=a)+'"';return i&&(o+=' title="'+H(i)+'"'),o+=">"+r+"</a>",o}image(e){let{href:t,title:i,text:n}=e;const r=G(t);if(null===r)return H(n);let a=`<img src="${t=r}" alt="${n}"`;return i&&(a+=` title="${H(i)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:H(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){d(this,"options",void 0),d(this,"renderer",void 0),d(this,"textRenderer",void 0),this.options=t||e.defaults,this.options.renderer=this.options.renderer||new Q,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 n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=r,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=r;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 r=a,o=this.renderer.text(r);for(;n+1<e.length&&"text"===e[n+1].type;)r=e[++n],o+="\n"+this.renderer.text(r);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 n=0;n<e.length;n++){const r=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=e||"";continue}}const a=r;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){d(this,"options",void 0),d(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?X.lex:X.lexInline}provideParser(){return this.block?te.parse:te.parseInline}}d(ie,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class ne{constructor(){d(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),d(this,"options",this.setOptions),d(this,"parse",this.parseMarkdown(!0)),d(this,"parseInline",this.parseMarkdown(!1)),d(this,"Parser",te),d(this,"Renderer",Q),d(this,"TextRenderer",ee),d(this,"Lexer",X),d(this,"Tokenizer",J),d(this,"Hooks",ie),this.use(...arguments)}walkTokens(e,t){let i=[];for(const r of e)switch(i=i.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const n of e.header)i=i.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;i=i.concat(this.walkTokens(e.items,t));break}default:{var n;const e=r;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[e.type]?this.defaults.extensions.childTokens[e.type].forEach((n=>{const r=e[n].flat(1/0);i=i.concat(this.walkTokens(r,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((t=>{const i=u({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.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,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let a=t.renderer.apply(this,n);return!1===a&&(a=i.apply(this,n)),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)})),i.extensions=e),t.renderer){const e=this.defaults.renderer||new Q(this.defaults);for(const i in t.renderer){if(!(i in e))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const n=i,r=t.renderer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o||""}}i.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new J(this.defaults);for(const i in t.tokenizer){if(!(i in e))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const n=i,r=t.tokenizer[n],a=e[n];e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new ie;for(const i in t.hooks){if(!(i in e))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const n=i,r=t.hooks[n],a=e[n];ie.passThroughHooks.has(i)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(r.call(e,t)).then((t=>a.call(e,t)));const i=r.call(e,t);return a.call(e,i)}:e[n]=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];let o=r.apply(e,i);return!1===o&&(o=a.apply(e,i)),o}}i.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,n=t.walkTokens;i.walkTokens=function(t){let i=[];return i.push(n.call(this,t)),e&&(i=i.concat(e.call(this,t))),i}}this.defaults=u(u({},this.defaults),i)})),this}setOptions(e){return this.defaults=u(u({},this.defaults),e),this}lexer(e,t){return X.lex(e,null!=t?t:this.defaults)}parser(e,t){return te.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,i)=>{const n=u({},i),r=u(u({},this.defaults),n),a=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===n.async)return a(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==t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const o=r.hooks?r.hooks.provideLexer():e?X.lex:X.lexInline,s=r.hooks?r.hooks.provideParser():e?te.parse:te.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then((e=>o(e,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>s(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(a);try{r.hooks&&(t=r.hooks.preprocess(t));let e=o(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let i=s(e,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(e){return a(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>"+H(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const re=new ne;function ae(e,t){return re.parse(e,t)}ae.options=ae.setOptions=function(e){return re.setOptions(e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(){return re.use(...arguments),ae.defaults=re.defaults,i(ae.defaults),ae},ae.walkTokens=function(e,t){return re.walkTokens(e,t)},ae.parseInline=re.parseInline,ae.Parser=te,ae.parser=te.parse,ae.Renderer=Q,ae.TextRenderer=ee,ae.Lexer=X,ae.lexer=X.lex,ae.Tokenizer=J,ae.Hooks=ie,ae.parse=ae;const oe=ae.options,se=ae.setOptions,le=ae.use,ue=ae.walkTokens,ce=ae.parseInline,de=ae,he=te.parse,ge=X.lex;e.Hooks=ie,e.Lexer=X,e.Marked=ne,e.Parser=te,e.Renderer=Q,e.TextRenderer=ee,e.Tokenizer=J,e.getDefaults=t,e.lexer=ge,e.marked=ae,e.options=oe,e.parse=de,e.parseInline=ce,e.parser=he,e.setOptions=se,e.use=le,e.walkTokens=ue}(Xs)),Xs).marked}catch(e){console.log("marked is not supported",e)}const el=Qs,tl=e=>{let{text:t,id:i,testid:n,clientHeight:r}=e;const a=!!r&&r<700,o=ws({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:n});return Es(o,Ws({text:t,level:a?6:5,style:{color:"white"}})),o};const il=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 nl;!function(e){e.INVALID="invalid",e.VALID="valid",e.ACCEPTED="accepted",e.REJECTED="rejected"}(nl||(nl={}));const rl="#ED3232",al="#01B678",ol="#FFF";const sl=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 ll(e){let{context:t,onDetect:i,frame:n,showError:r,isSelfie:a=!1}=e;const o=t.state.name;if(o===nl.REJECTED){r(function(e){switch(e){case $o.DOCUMENT_DETECTION:return"searching_document_autocapture";case $o.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case $o.BARCODE_DETECTION:return ca.feedback.BARCODE_NOT_FOUND;case $o.BLUR_DETECTION:return ca.feedback.BLUR;case $o.GLARE_DETECTION:return ca.feedback.GLARE;case $o.FACE_DETECTION:return ca.feedback.FACE_NOT_FOUND;case $o.FACE_POSITION:return ca.feedback.FACE_TOO_SMALL}}(t.invalidFramesCause));ul("border-color",t.invalidFramesCause===$o.DOCUMENT_DETECTION?ol:rl)}if(o===nl.VALID)if(a){ul("border-color",al);r(`capturing_face_autocapture${Math.ceil((t.validFramesThreshold-t.validFramesCounter)/t.validFramesThreshold*3)}`)}else r("capturing_in_progress_message"),ul("border-color",ol);o===nl.ACCEPTED&&(ul("border-color",ol),r(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await i({frame:n,suspendedPreview:!0,context:t}))}function ul(e,t){document.querySelectorAll('[id^="overlay-frame"]').forEach((i=>{i.style[e]=t}))}function cl(e){let t,i,n,{captureFrame:r,object:a,videoWidth:o,videoHeight:s,deviceWidth:l,deviceHeight:u,threshold:c,iouThreshold:d=.85}=e;if(o/s>=l/u){n=u/s;const e=(o*n-l)/2;t=a.x*n-e,i=a.y*n}else{n=l/o;const e=(s*n-u)/2;t=a.x*n,i=a.y*n-e}const h=t+a.width*n,g=i+a.height*n;!function(e,t,i,n){var r,a;if(null===(a=null===(r=Ko.state.autoCaptureSettings)||void 0===r?void 0:r.settings)||void 0===a?void 0:a.debug){const r=document.getElementById("image-preview-section"),a=document.getElementById("rectangle");if(a)a.style.width=`${i}px`,a.style.height=`${n}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=`${n}px`,a.style.left=`${e}px`,a.style.top=`${t}px`,r.appendChild(a)}}}(t,i,a.width*n,a.height*n);const p=function(e,t){const i=Math.max(e.left,t.left),n=Math.min(e.right,t.right),r=Math.max(e.top,t.top),a=n-i,o=Math.min(e.bottom,t.bottom)-r;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:r.top,left:r.left,bottom:r.bottom,right:r.right},{top:i,left:t,bottom:g,right:h}),f=p>d,m=a.width*n*(a.height*n)>c*(r.width*r.height);return f&&m}const dl=()=>{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=ws({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 Es(t,e),Es(t,Ws({text:"Retake",level:2,style:{color:"#FF8B8B",margin:"0",width:"100%"},id:"retake-image-text"})),t};const hl=()=>{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=ws({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 Es(t,e),Es(t,Ws({text:"Approve",level:2,style:{color:"#BBF7DD",margin:"0",width:"100%"},id:"check-circle-text"})),t},gl=e=>{let{step:t,setImage:i,camera:n}=e;var r,a,o,s;const l=Vs[t];(null===(r=Ko.state.autoCaptureSettings)||void 0===r?void 0:r.enabled)&&"selfie"===t&&(l.instructions="second_title_face_autocapture");const u=((e,t)=>ws({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"document-capture",className:t}))("document-capture",t),c=ws({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=ws({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(Ko.state.rootElementId);if(!h)throw new Error("Root element not found");const g=Hs(Ts(t),h);Es(c,il(t)),Es(c,g);const p=(()=>{const e=ws({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=Zs();return t.style.width="16px",t.style.height="16px",t.style.margin="0 10px",Es(e,t),Es(e,Ws({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),e})();Es(g,p),p.style.visibility="hidden";const f=tl({text:As.translate(l.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),m=(e=>{let{click:t,id:i,testid:n,color:r,withLoader:a}=e;if(a){const e=Gs();e.style.position="absolute",e.style.left="-7px",e.style.top="-7px",e.style.height="63px",e.style.width="63px";const a=ws({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"});return Es(a,e),a.addEventListener("click",t),a}{const e=ws({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(r||"white"),borderRadius:"40px"},id:i+"-outer",testid:n+"-outer"});return Es(e,ws({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:r||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:i+"-inner",testid:n+"-inner"})),e.addEventListener("click",t),e}})({click:()=>i({frame:sl(n.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(o=null===(a=Ko.state)||void 0===a?void 0:a.autoCaptureSettings)||void 0===o?void 0:o.enabled}),_=(()=>{const e=ws({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=hl();return Es(e,dl()),Es(e,t),e})(),x=(e=>{let{title:t,text:i,clientHeight:n,customTextColor:r}=e;const a=n<700,o=ws({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:a?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Ws({text:t,level:a?2:1,style:{color:r||"white",textAlign:"center",marginBottom:a?"4px":"10px"},id:"step-title"}),l=Ws({text:i,level:a?6:5,style:{color:r||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return Es(o,s),Es(o,l),o})({text:As.translate(l.instructions),title:As.translate(l.title),clientHeight:h.clientHeight}),v=(e=>{const t=e<700,i=ws({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:Ko.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=ws({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),r=Zs();r.style.width="16px",r.style.height="16px",r.style.margin="0 10px",Ko.state.markdownSupportText?Es(n,r):Es(i,r);const a=Ko.state.markdownSupportText&&null!=el?el.parse(Ko.state.markdownSupportText,{async:!1}):"",o=Ws({text:"",level:t?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Ws({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return a&&(s.innerHTML=a,Es(n,o)),Es(i,a?[n,s]:o),i})(h.clientHeight),b=(null===(s=Ko.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Gs():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}();b.style.display="none",Es(d,f),Es(d,x),Es(d,c),Es(d,v),Es(u,d);const y=ws({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});Es(y,b),Es(y,m),Es(y,_),Es(u,y),Es(u,n.videoElement);const w=ws({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===Ts(t)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const E=(e=>{const t=ws({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return t.appendChild(e),t})(w);return Es(u,E),{component:u,setLoadingMode:e=>{var t;m.style.display="none",v.style.visibility="hidden",b.style.display="block",(null===(t=Ko.state.autoCaptureSettings)||void 0===t?void 0:t.enabled)&&(b.style.height="63px",b.style.width="63px"),e&&(p.style.visibility="visible")},setApprovalRetakeButtons:e=>{let{approveAction:t,retakeAction:i}=e;var n,r;m.style.display="none",v.style.display="none",_.style.display="flex";const a=_.querySelector("#approve-image"),o=_.querySelector("#retake-image"),s=a.cloneNode(!0);null===(n=a.parentNode)||void 0===n||n.replaceChild(s,a),s.addEventListener("click",t);const l=o.cloneNode(!0);null===(r=o.parentNode)||void 0===r||r.replaceChild(l,o),l.addEventListener("click",i)},hideApprovalRetakeButtons:()=>{_.style.display="none",v.style.display="flex"},setPreviewImage:(e,t)=>{w.src=e,p.style.visibility="hidden",n.videoElement.style.display="none",m.style.display="none",v.style.visibility="hidden",E.style.display="block",b.style.display=t?"none":"block"},setLoadingComplete:()=>{b.style.display="none",p.style.visibility="hidden"},setAutoCapturingError:(e,t)=>{if(!e)return void(v.style.visibility="hidden");let i;i=e==ca.feedback.RESTRICTED_CRITERIA&&t?t:$s[e]?$s[e].message:As.translate(e)!==e?e:$s.other.message,document.getElementById("image-error-message").innerHTML=As.translate(i),v.style.visibility="visible"},enableVideoElement:()=>{m.style.display="block",n.videoElement.style.display="block",E.style.display="none",b.style.display="none"},setCapturingShowErrorMode:(e,t)=>{m.style.display="block",E.style.display="none",n.videoElement.style.display="block";const i=e==ca.feedback.RESTRICTED_CRITERIA,r=$s[e]||$s.other;document.getElementById("image-error-message").innerHTML=t&&i&&null!=el?el.parse(t,{async:!1}):As.translate(r.message),v.style.visibility="visible",p.style.visibility="hidden"},setTitleInstructionsMidStep:e=>{let{title:t,instructions:i}=e;t&&(document.getElementById("step-title").innerHTML=As.translate(t)),i&&(document.getElementById("step-instructions").innerHTML=As.translate(i))}}};class pl{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 fl(e,t,i))}}class fl{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 ml{constructor(){this.name=nl.ACCEPTED}async handleFrame(){return new pl}}class _l{constructor(){this.name=nl.VALID}async handleFrame(e){let{context:t,frame:i,deviceInfo:n,detectionStrategy:r}=e;const a=await r.validate({frame:i,deviceInfo:n});return a.isValid?(t.validFramesCounter++,t.validFramesCounter>=t.validFramesThreshold&&t.setState(new ml)):(t.validFramesCounter=0,t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new vl)),a}}class xl{constructor(){this.name=nl.REJECTED}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new _l),a):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep,t.setState(new vl),a):(t.invalidFramesCounter++,a)}}class vl{constructor(){this.name=nl.INVALID}async handleFrame(e){let{context:t,frame:i,detectionStrategy:n,deviceInfo:r}=e;const a=await n.validate({frame:i,deviceInfo:r});return a.isValid?(t.invalidFramesCounter=0,t.validFramesCounter=1,t.setState(new _l)):t.invalidFramesCause!==a.failedStep?(t.invalidFramesCounter=1,t.invalidFramesCause=a.failedStep):(t.invalidFramesCounter++,t.invalidFramesCounter>=t.invalidFramesThreshold&&t.setState(new xl)),a}}class bl{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 vl,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 yl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;const a=wl(t,n,r),o=await new Promise(((n,r)=>{navigator.serviceWorker.ready.then((o=>{var s;const l=t=>{t.data.type===e+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",l),n(t.data.result)),t.data.type===e+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",l),Xo(t.data.error.toString(),e,"error"),r(t.data.error))};navigator.serviceWorker.addEventListener("message",l),null===(s=o.active)||void 0===s||s.postMessage(u({type:e,imageData:a,height:t.height,width:t.width},i))}))}));return es(`****** in web-SDK return result for ${e}`,o),o}function wl(e,t,i){const n=document.createElement("canvas"),r=t||{height:e.height,width:e.width},a=n.getContext("2d");n.width=r.width,n.height=r.height,i?null==a||a.drawImage(e,i.x,i.y,i.width,i.height,0,0,r.width,r.height):null==a||a.drawImage(e,0,0,r.width,r.height);const o=null==a?void 0:a.getImageData(0,0,r.width,r.height);return n.remove(),o}async function El(e){if(e instanceof HTMLVideoElement&&e.paused)return[];return yl("DETECT_DOCUMENT",e,{},as[ts.DOCUMENT_DETECTOR].imageDimensions)}async function kl(e,t){return yl("BLUR_GLARE_CLASSIFY",e,{},as[ts.BLUR_GLARE_CLASSIFIER].imageDimensions,t)}const Al=function(){try{return new ns}catch(e){return es("Error initializing barcode model",e),Xo("Error initializing barcode model","barcode_model_not_supported","init"),null}}();class Cl{constructor(e){this.barcodeModel=null,this.hasBarcode=e,this.barcodeModel=Al}async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new pl;let a=Date.now();const o=null===(n=await El(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse($o.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=cl({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Ko.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:Ko.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-a,r.addStepResponse($o.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await kl(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse($o.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));if(r.addStepResponse($o.GLARE_DETECTION,!d,s),d)return r;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(r.addStepResponse($o.BARCODE_DETECTION,i,s),!i)return r}return r}}class Dl{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class Sl{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values($o).forEach((e=>{this.stats.set(e,new Dl)}))}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,n){const r=this.stats.get(e);if(!r)throw new Error(`Stat for step ${e} not found`);r.durations.push(t),r.countSuccess+=i,r.countFailed+=n}}let Tl=!1;const Il=e=>{Tl=e};class Ml{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new pl;let a=Date.now();const o=null===(n=await El(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse($o.DOCUMENT_DETECTION,void 0!==o,s),!o)return r;a=Date.now();const l=cl({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Ko.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:Ko.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-a,r.addStepResponse($o.DOCUMENT_POSITION,l,s),!l)return r;a=Date.now();const u=await kl(t,o);s=Date.now()-a;const c=u.some((e=>"blur"===e.class));if(r.addStepResponse($o.BLUR_DETECTION,!c,s),c)return r;const d=u.some((e=>"glare"===e.class));return r.addStepResponse($o.GLARE_DETECTION,!d,s),r}}let Rl=!1;const Bl=e=>{Rl=e};class Fl{async validate(e){let{frame:t,deviceInfo:i}=e;var n;const r=new pl;let a=Date.now();const o=null===(n=await async function(e){return e instanceof HTMLVideoElement&&e.paused?[]:yl("DETECT_FACE_LANDMARKS",e)}(t))||void 0===n?void 0:n[0];let s=Date.now()-a;if(r.addStepResponse($o.FACE_DETECTION,"face"===(null==o?void 0:o.class),s),!o)return r;a=Date.now();const l=cl({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:o,videoWidth:t.width,videoHeight:t.height,deviceWidth:i.width,deviceHeight:i.height,threshold:Ko.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:Ko.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-a,r.addStepResponse($o.FACE_POSITION,l,s),r}}let zl=!1;const Ol=e=>{zl=e};async function Pl(e,t){var i,n,r,a;let o="camera-error";if("NotAllowedError"===t.name){o="Permission dismissed"===t.message?"camera-permission-dismissed":"camera-permission-denied";const s=Yo.createCameraNotAllowedEvent(t.message,e);await Wo(null===(i=Ko.state)||void 0===i?void 0:i.step,null===(n=Ko.state)||void 0===n?void 0:n.userToken,null===(r=Ko.state)||void 0===r?void 0:r.sessionId,null===(a=Ko.state)||void 0===a?void 0:a.clientId,s),Ko.dispatch("setIsCapturingProcessStarted",!1)}Po(e,o)}function Nl(e){const t=(e=>{var t,i,n,r;const[a,o]=e.split(",");if(!a||!o)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(i=null===(t=a.split(";"))||void 0===t?void 0:t[0])||void 0===i?void 0:i.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const l=null===(r=s.split("/"))||void 0===r?void 0:r[1];if(!l)throw new Error("unable-to-parse-data-uri");return{data:o,format:l}})(e);return{image:{data:t.data,format:t.format,captureMargins:Ss()}}}let Ll=!1;const Ul=async()=>{const e=await xs(Ko.state.sessionId,Ko.state.userToken,Ko.state.clientId);jl(e)},jl=async e=>{var t;"expired"===(null==e?void 0:e.status)?No("processing","session-expired",`Session expired for session id: ${Ko.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(Ul,3e3)},ql=e=>{let{step:t}=e;var i,n,r;const a=null===(n=null===(i=Ko.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===n?void 0:n.enabled;let o=!1;const s=null===(r=Ko.state)||void 0===r?void 0:r.videoCaptureSettings,l=(e=>{let t,i,n=!1;const r=qs(e),a=new Bs(r),o=async()=>{n&&(await a.stopCamera(),a.stream&&a.stream.getTracks().forEach((e=>{"live"==e.readyState&&e.stop()})),n=!1)};return{videoStream:i,startVideoFeed:async e=>{var r,s,l;n&&await o(),"environment"==e&&(t=await Os());const u=null!==(s=null===(r=null==t?void 0:t.selectedCamera)||void 0===r?void 0:r.deviceId)&&void 0!==s?s:e,c=js(e,null===(l=Ko.state)||void 0===l?void 0:l.videoCaptureSettings);Fs.getInstance().stopStream(),i=await a.startCamera(u,c),n=!0},stopVideoFeed:o,videoElement:a.videoElement,getDataUri:a.getDataUri,getCameraInfo:()=>t}})(Ts(t));!function(e){zo({type:"page-load",step:e})}(t),Ul();const u=gl({step:t,setImage:c,camera:l});async function c(e){let{suspendedPreview:i=!1,frame:n,context:r}=e;n||(n=sl(l.videoElement)),"document_front"===t&&Bl(!1),"document_back"===t&&Il(!1),"selfie"===t&&Ol(!1);const a=Date.now(),c=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})))}}(l);if(!o)return;u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const g=(e=>e.toDataURL("image/jpeg"))(n);u.setPreviewImage(g,"selfie"===t),await l.stopVideoFeed(),"selfie"!==t?await h(i,g,c,a,null==r?void 0:r.stats):(u.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),u.setApprovalRetakeButtons({approveAction:async()=>{u.hideApprovalRetakeButtons(),await h(i,g,c,a,null==r?void 0:r.stats)},retakeAction:()=>{u.hideApprovalRetakeButtons(),d()}}))}function d(){"selfie"===t&&u.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),l.startVideoFeed(Ts(t)).then((()=>{o=!0,u.enableVideoElement(),a&&(u.setAutoCapturingError(null),g(t))})).catch((async e=>{throw await Pl(t,e),e}))}async function h(e,i,n,r,c){const h=[];!function(e){var i,n,r,a;const o=Yo.createUserActionEvent("capture_image",t,e);Wo(null===(i=Ko.state)||void 0===i?void 0:i.step,null===(n=Ko.state)||void 0===n?void 0:n.userToken,null===(r=Ko.state)||void 0===r?void 0:r.sessionId,null===(a=Ko.state)||void 0===a?void 0:a.clientId,o)}(c),function(e,t){zo({type:"capture-image",imageType:t,step:e})}(t,Is(t));try{const l=Date.now(),c=Nl(i);o=!1,h.push(Ds(Ko.state.sessionId,Ko.state.userToken,Ko.state.clientId,null==c?void 0:c.image,n,Is(t))),h.push(e?new Promise((e=>setTimeout(e,500))):Promise.resolve(null)),u.setLoadingMode(null==s?void 0:s.showLoadingBlock);const g=(await Promise.all(h))[0];if(Object.prototype.hasOwnProperty.call(g,"has_barcode")&&(Ll=g.has_barcode),async function(e){let{step:t,requestStartTime:i,imageProcessingStartTime:n,serverProcessingTime:r,userToken:a,sessionId:o,clientId:s}=e;const l=Date.now()-i,u=n?i-n:0,c=Yo.createUploadImageEvent(t,String(l),String(r),String(u));await Wo(t,a,o,s,c)}({step:t,requestStartTime:l,imageProcessingStartTime:r,serverProcessingTime:g.serverProcessingTime,userToken:Ko.state.userToken,sessionId:Ko.state.sessionId,clientId:Ko.state.clientId}),Ko.dispatch("setMissingImages",g.missing_images),u.setLoadingComplete(),function(e,t,i){zo({type:"capture-image-result",imageType:t,feedback:i,step:e})}(t,Is(t),g.feedback),"ok"!==g.feedback)return await async function(e){ul("border-color",rl),a?u.setAutoCapturingError(e.feedback,e.custom_feedback):u.setCapturingShowErrorMode(e.feedback,e.custom_feedback),await new Promise((e=>setTimeout(e,1e3))),ul("border-color",ol)}(g),void d();ul("border-color",al),await new Promise((e=>setTimeout(e,750))),ul("border-color",ol),Ko.dispatch("setStep",(e=>{let t;return t=e&&e.length>0?e.shift():"processing",t})(Ko.state.missingImages))}catch(e){u.setLoadingComplete(),u.setCapturingShowErrorMode(ca.feedback.OTHER),l.startVideoFeed(Ts(t)).then((()=>{o=!0})).catch((async e=>{throw await Pl(t,e),e})),Po(t,"failed-to-submit-image")}}async function g(e){if("document_front"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;es("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.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:n}=e;var r,a,o,s,l,u,c;const d=new bl(new Ml,null!==(o=null===(a=null===(r=Ko.state.autoCaptureSettings.settings)||void 0===r?void 0:r.stability)||void 0===a?void 0:a.numStableFrames)&&void 0!==o?o:2),h=new Sl;for(Bl(!0);d.state.name!==nl.ACCEPTED&&Rl;){const e=Date.now(),r=sl(t.videoElement),a={width:null!==(l=null===(s=t.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==l?l:0,height:null!==(c=null===(u=t.videoElement.getBoundingClientRect())||void 0===u?void 0:u.height)&&void 0!==c?c:0},o=await d.handleFrame({frame:r,deviceInfo:a}),g=Date.now()-e+50;h.addStats(o,g),d.stats=h,await ll({context:d,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}if("document_back"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;es("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.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:n,hasBarcode:r}=e;var a,o,s,l,u,c,d;const h=new bl(new Cl(r),null!==(s=null===(o=null===(a=Ko.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===o?void 0:o.numStableFrames)&&void 0!==s?s:2);Il(!0);const g=new Sl;for(;h.state.name!==nl.ACCEPTED&&Tl;){const e=Date.now(),r=sl(t.videoElement),a={width:null!==(u=null===(l=t.videoElement.getBoundingClientRect())||void 0===l?void 0:l.width)&&void 0!==u?u:0,height:null!==(d=null===(c=t.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==d?d:0},o=await h.handleFrame({frame:r,deviceInfo:a}),s=Date.now()-e+50;g.addStats(o,s),h.stats=g,await ll({context:h,onDetect:i,showError:n,frame:r}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError,hasBarcode:Ll})}if("selfie"===e){for(;!o||l.videoElement.paused;)await new Promise((e=>setTimeout(e,100)));return l.videoElement.onloadedmetadata=()=>{var e;es("video dimensions (width, height, orientation): ",l.videoElement.videoWidth,l.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:n}=e;var r,a,o,s;const l=new bl(new Fl,30);Ol(!0);const u=new Sl;for(;l.state.name!==nl.ACCEPTED&&zl;){const e=Date.now(),c=sl(t.videoElement),d={width:null!==(a=null===(r=t.videoElement.getBoundingClientRect())||void 0===r?void 0:r.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 l.handleFrame({frame:c,deviceInfo:d}),g=Date.now()-e;u.addStats(h,g),l.stats=u,await ll({context:l,onDetect:i,showError:n,frame:c,isSelfie:!0}),await new Promise((e=>setTimeout(e,50)))}}({camera:l,onDetect:c,showError:u.setAutoCapturingError})}}return a&&g(t),(async e=>{var t,i,n,r;const a=Yo.createPageViewEvent(e);await Wo(null===(t=Ko.state)||void 0===t?void 0:t.step,null===(i=Ko.state)||void 0===i?void 0:i.userToken,null===(n=Ko.state)||void 0===n?void 0:n.sessionId,null===(r=Ko.state)||void 0===r?void 0:r.clientId,a)})(t),l.startVideoFeed(Ts(t)).then((()=>{o=!0})).catch((async e=>{throw await Pl(t,e),e})),u.component},Kl=()=>{zo({type:"start-verification-processing",step:Ko.state.step}),Oo("processing","processing",Ko.state.sessionId);const e=$l("processing-verification");Es(e,tl({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const t=async()=>{const e=await xs(Ko.state.sessionId,Ko.state.userToken,Ko.state.clientId);r(e)},i=()=>{setTimeout(t,3e3)},n=async e=>{Ko.dispatch("setStep",e.status),Ko.dispatch("setStatus",e.status)},r=async e=>{var t,r,a;if(Ko.dispatch("setMissingImages",e.missing_images),e.status)if("complete"===(null==e?void 0:e.status)){Fs.getInstance().stopStream();const i=Yo.createProcessingCompleteEvent();await Wo(Ko.state.step,Ko.state.userToken,null===(t=Ko.state)||void 0===t?void 0:t.sessionId,null===(r=Ko.state)||void 0===r?void 0:r.clientId,i),n(e),Oo("complete",e.status,Ko.state.sessionId),function(e,t,i){zo({type:"verification-complete",step:e,sessionId:t,callbackUrl:i})}("complete",Ko.state.sessionId,e.callback_url),a=Mo,sessionStorage.removeItem(a)}else"recapture"===(null==e?void 0:e.status)?(n(e),Ko.dispatch("setIsCapturingProcessStarted",!1),Oo("recapture",e.status,Ko.state.sessionId),function(e,t,i){zo({type:"verification-recapture",step:e,sessionId:t,reason:i})}("recapture",e.status,e.recapture_reason)):"expired"===(null==e?void 0:e.status)?No("processing","session-expired",`Session expired for session id: ${Ko.state.sessionId}`):i();else"processing"!==e.state&&(n(e),i())};return t(),e},$l=e=>ws({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:e,testid:"processing-verification"});function Vl(e,t){var i;if(!e)return;null===(i=t.firstChild)||void 0===i||i.remove();const n=function(e){switch(e){case"processing":return Kl;case"document_front":case"document_back":case"selfie":return ql;default:throw new Error("Invalid step")}}(e);Es(t,n({step:e}))}function Hl(e){let{key:t,state:i}=e;const n=i.rootElementId,r=document.getElementById(n);"step"===t&&"complete"!==i.step&&"recapture"!==i.step&&Vl(i.step,r),r&&"processing"===i.step&&(r.style.visibility="hidden")}function Gl(){const e=vs(Ro(Mo));if(!vs)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 Ko.dispatch("setSessionId",t),Ko.dispatch("setUserToken",i),{sessionId:t,userToken:i}}async function Zl(){var e,t;if(null===(e=Ko.state.autoCaptureSettings)||void 0===e?void 0:e.enabled){const e=Date.now();try{await Jl(),es("all models loaded - auto-capture enabled")}catch(e){Ko.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(t=Ko.state.autoCaptureSettings)||void 0===t?void 0:t.settings}),es("Model loading did not complete on time:",e);Xo(`timed out loading models: ${os.filter((e=>as[e].status!==rs.LOADED)).map((e=>e)).join(", ")}`,"model_load_timeout","init")}const i=Object.values(as).filter((e=>e.status===rs.LOADED)).map((e=>e.loadingStats));!async function(e,t){const i=Yo.createSdkInitEvent(e,t);await Qo("init",i)}(Date.now()-e,i)}}async function Yl(e){var t;try{await Fs.getInstance().startNewStream({video:u(u({},js("environment",null===(t=Ko.state)||void 0===t?void 0:t.videoCaptureSettings)),{},{deviceId:await Us("environment")})}),function(e,t){zo({type:"session-id-acquired",step:e,sessionId:t})}("init",e),function(e,t,i){const n=document.getElementById(i);n.style.visibility="visible",Vl(e.shift(),n)}(Ko.state.missingImages,Ko.state.sessionId,Ko.state.rootElementId)}catch(e){await Pl("init",e)}}async function Wl(e){let{status:t,sessionId:i,userToken:n,missingImages:r,rootElementId:a,language:o}=e;!function(e,t){zo({type:"session-granted",step:e,sessionId:t})}("init",i),Ko.dispatch("setStatus",t),Ko.dispatch("setSessionId",i),Ko.dispatch("setUserToken",n),Ko.dispatch("setMissingImages",r),Ko.dispatch("setRootElement",a),Ko.dispatch("setLanguage",o),async function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";As.overrideLanguage(Cs[i]||Cs.en);let n=document.getElementById(t);if(!n){n=ws({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 `,Es(document.head,e),Es(document.body,n)}}(Ko.state.sessionId,Ko.state.rootElementId,Ko.state.language),function(){try{So.events.off(Io,Hl)}catch(e){}So.events.on(Io,Hl)}(),await Zl(),await Yl(i)}const Jl=async()=>{const e=Ko.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([ss(),new Promise(((t,i)=>setTimeout((()=>i(new Error(`Model loading timed out after ${e} ms`))),e)))])};async function Xl(e){if(Ko.state.isCapturingProcessStarted)return void Po(Ko.state.step,"trying-to-initialize-active-session");let t,i;if(e){const n=await async function(e){let t,i;try{const n=await ys(e,Ko.state.consentVersion,Ko.state.clientId);return t=n.sessionId,i=n.userToken,Ko.dispatch("setSessionId",t),Ko.dispatch("setUserToken",i),{sessionId:t,userToken:i}}catch(e){throw console.log("Error starting session"),console.error(e),e}}(e);t=n.sessionId,i=n.userToken}else{const e=Gl();t=e.sessionId,i=e.userToken}if(!t)return void Po(Ko.state.step,"other");const{missing_images:n,status:r}=await xs(t,i,Ko.state.clientId);return Ko.dispatch("setIsCapturingProcessStarted",!0),await Wl({status:r,sessionId:t,userToken:i,missingImages:n,rootElementId:Ko.state.rootElementId,language:Ko.state.language}),!0}async function Ql(e){try{return await Xl(e)}catch(e){throw console.log("Error starting session"),console.error(e),e}}async function eu(){try{return await async function(){if("recapture"===Ko.state.verificationStatus||"pending"===Ko.state.verificationStatus){const{sessionId:e,userToken:t}=Gl(),{missing_images:i,status:n}=await xs(e,t,Ko.state.clientId);return await Wl({status:n,sessionId:e,userToken:t,missingImages:i,rootElementId:Ko.state.rootElementId,language:Ko.state.language}),!0}Po(Ko.state.step,"trying-to-initialize-active-session")}()}catch(e){throw console.log("Error restarting session"),console.error(e),e}}async function tu(){return eu()}const iu=()=>ma;const nu={initialize:o,...Object.freeze({__proto__:null,recapture:eu,restart:tu,start:Ql,version:iu})};exports.PACKAGE_VERSION="1.17.1",exports.idv=nu,exports.initialize=o,exports.recapture=eu,exports.restart=tu,exports.start=Ql,exports.version=iu;