@transmitsecurity/platform-web-sdk 2.0.0 → 2.0.1

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 CHANGED
@@ -1 +1 @@
1
- "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));var t=require("./common.cjs"),e=require("./common.cjs");function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c={},l={};function d(t){let e=t.length;for(;--e>=0;)t[e]=0}const h=256,f=286,p=30,g=15,m=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]),w=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]),y=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),v=new Array(576);d(v);const E=new Array(60);d(E);const b=new Array(512);d(b);const A=new Array(256);d(A);const C=new Array(29);d(C);const x=new Array(p);function I(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}let S,T,D;function O(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}d(x);const R=t=>t<256?b[t]:b[256+(t>>>7)],M=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},N=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,M(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},k=(t,e,r)=>{N(t,r[2*e],r[2*e+1])},P=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},B=(t,e,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=g;o++)n[o]=a=a+r[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=P(n[e]++,e))}},F=t=>{let e;for(e=0;e<f;e++)t.dyn_ltree[2*e]=0;for(e=0;e<p;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},L=t=>{t.bi_valid>8?M(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,r,n)=>{const o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]},U=(t,e,r)=>{const n=t.heap[r];let o=r<<1;for(;o<=t.heap_len&&(o<t.heap_len&&z(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!z(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n},V=(t,e,r)=>{let n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?k(t,o,e):(i=A[o],k(t,i+h+1,e),a=m[i],0!==a&&(o-=C[i],N(t,o,a)),n--,i=R(n),k(t,i,r),a=w[i],0!==a&&(n-=x[i],N(t,n,a)))}while(s<t.last_lit);k(t,256,e)},H=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)U(t,r,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,U(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,l,d,h,f,p,m=0;for(h=0;h<=g;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)l=t.heap[c],h=r[2*r[2*l+1]+1]+1,h>u&&(h=u,m++),r[2*l+1]=h,l>n||(t.bl_count[h]++,f=0,l>=s&&(f=a[l-s]),p=r[2*l],t.opt_len+=p*(h+f),i&&(t.static_len+=p*(o[2*l+1]+f)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(l=t.bl_count[h];0!==l;)d=t.heap[--c],d>n||(r[2*d+1]!==h&&(t.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),l--)}})(t,e),B(r,c,t.bl_count)},j=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},G=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<u&&o===a)){if(s<c)do{k(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(k(t,o,t.bl_tree),s--),k(t,16,t.bl_tree),N(t,s-3,2)):s<=10?(k(t,17,t.bl_tree),N(t,s-3,3)):(k(t,18,t.bl_tree),N(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let W=!1;const X=(t,e,r,n)=>{N(t,0+(n?1:0),3),((t,e,r,n)=>{L(t),n&&(M(t,r),M(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};l._tr_init=t=>{W||((()=>{let t,e,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(C[n]=r,t=0;t<1<<m[n];t++)A[r++]=n;for(A[r-1]=n,o=0,n=0;n<16;n++)for(x[n]=o,t=0;t<1<<w[n];t++)b[o++]=n;for(o>>=7;n<p;n++)for(x[n]=o<<7,t=0;t<1<<w[n]-7;t++)b[256+o++]=n;for(e=0;e<=g;e++)i[e]=0;for(t=0;t<=143;)v[2*t+1]=8,t++,i[8]++;for(;t<=255;)v[2*t+1]=9,t++,i[9]++;for(;t<=279;)v[2*t+1]=7,t++,i[7]++;for(;t<=287;)v[2*t+1]=8,t++,i[8]++;for(B(v,287,i),t=0;t<p;t++)E[2*t+1]=5,E[2*t]=P(t,5);S=new I(v,m,257,f,g),T=new I(E,w,0,p,g),D=new I(new Array(0),y,0,19,7)})(),W=!0),t.l_desc=new O(t.dyn_ltree,S),t.d_desc=new O(t.dyn_dtree,T),t.bl_desc=new O(t.bl_tree,D),t.bi_buf=0,t.bi_valid=0,F(t)},l._tr_stored_block=X,l._tr_flush_block=(t,e,r,n)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<h;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),H(t,t.l_desc),H(t,t.d_desc),a=(t=>{let e;for(j(t,t.dyn_ltree,t.l_desc.max_code),j(t,t.dyn_dtree,t.d_desc.max_code),H(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*_[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?X(t,e,r,n):4===t.strategy||i===o?(N(t,2+(n?1:0),3),V(t,v,E)):(N(t,4+(n?1:0),3),((t,e,r,n)=>{let o;for(N(t,e-257,5),N(t,r-1,5),N(t,n-4,4),o=0;o<n;o++)N(t,t.bl_tree[2*_[o]+1],3);G(t,t.dyn_ltree,e-1),G(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),V(t,t.dyn_ltree,t.dyn_dtree)),F(t),n&&L(t)},l._tr_tally=(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+h+1)]++,t.dyn_dtree[2*R(e)]++),t.last_lit===t.lit_bufsize-1),l._tr_align=t=>{N(t,2,3),k(t,256,v),(t=>{16===t.bi_valid?(M(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var Y=(t,e,r,n)=>{let o=65535&t|0,i=t>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+e[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0};const Z=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var q=(t,e,r,n)=>{const o=Z,i=n+r;t^=-1;for(let r=n;r<i;r++)t=t>>>8^o[255&(t^e[r])];return-1^t},K={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"},$={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:Q,_tr_stored_block:J,_tr_flush_block:tt,_tr_tally:et,_tr_align:rt}=l,nt=Y,ot=q,it=K,{Z_NO_FLUSH:at,Z_PARTIAL_FLUSH:st,Z_FULL_FLUSH:ut,Z_FINISH:ct,Z_BLOCK:lt,Z_OK:dt,Z_STREAM_END:ht,Z_STREAM_ERROR:ft,Z_DATA_ERROR:pt,Z_BUF_ERROR:gt,Z_DEFAULT_COMPRESSION:mt,Z_FILTERED:wt,Z_HUFFMAN_ONLY:yt,Z_RLE:_t,Z_FIXED:vt,Z_DEFAULT_STRATEGY:Et,Z_UNKNOWN:bt,Z_DEFLATED:At}=$,Ct=258,xt=262,It=103,St=113,Tt=666,Dt=(t,e)=>(t.msg=it[e],e),Ot=t=>(t<<1)-(t>4?9:0),Rt=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let Mt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const Nt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},kt=(t,e)=>{tt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Nt(t.strm)},Pt=(t,e)=>{t.pending_buf[t.pending++]=e},Bt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Ft=(t,e,r,n)=>{let o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),r),1===t.state.wrap?t.adler=nt(t.adler,e,o,r):2===t.state.wrap&&(t.adler=ot(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)},Lt=(t,e)=>{let r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-xt?t.strstart-(t.w_size-xt):0,c=t.window,l=t.w_mask,d=t.prev,h=t.strstart+Ct;let f=c[i+a-1],p=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<h);if(n=Ct-(h-i),i=h-Ct,n>a){if(t.match_start=e,a=n,n>=s)break;f=c[i+a-1],p=c[i+a]}}}while((e=d[e&l])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},zt=t=>{const e=t.w_size;let r,n,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-xt)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{o=t.head[--r],t.head[r]=o>=e?o-e:0}while(--n);n=e,r=n;do{o=t.prev[--r],t.prev[r]=o>=e?o-e:0}while(--n);i+=e}if(0===t.strm.avail_in)break;if(n=Ft(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Mt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Mt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<xt&&0!==t.strm.avail_in)},Ut=(t,e)=>{let r,n;for(;;){if(t.lookahead<xt){if(zt(t),t.lookahead<xt&&e===at)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Mt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-xt&&(t.match_length=Lt(t,r)),t.match_length>=3)if(n=et(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Mt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Mt(t,t.ins_h,t.window[t.strstart+1]);else n=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===ct?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2},Vt=(t,e)=>{let r,n,o;for(;;){if(t.lookahead<xt){if(zt(t),t.lookahead<xt&&e===at)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Mt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-xt&&(t.match_length=Lt(t,r),t.match_length<=5&&(t.strategy===wt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=et(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=Mt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(kt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=et(t,0,t.window[t.strstart-1]),n&&kt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=et(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===ct?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2};function Ht(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}const jt=[new Ht(0,0,0,0,((t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(zt(t),0===t.lookahead&&e===at)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,kt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-xt&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===ct?(kt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(kt(t,!1),t.strm.avail_out),1)})),new Ht(4,4,8,4,Ut),new Ht(4,5,16,8,Ut),new Ht(4,6,32,32,Ut),new Ht(4,4,16,16,Vt),new Ht(8,16,32,32,Vt),new Ht(8,16,128,128,Vt),new Ht(8,32,128,256,Vt),new Ht(32,128,258,1024,Vt),new Ht(32,258,258,4096,Vt)];function Gt(){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=At,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),Rt(this.dyn_ltree),Rt(this.dyn_dtree),Rt(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),Rt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Rt(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 Wt=t=>{if(!t||!t.state)return Dt(t,ft);t.total_in=t.total_out=0,t.data_type=bt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:St,t.adler=2===e.wrap?0:1,e.last_flush=at,Q(e),dt},Xt=t=>{const e=Wt(t);return e===dt&&(t=>{t.window_size=2*t.w_size,Rt(t.head),t.max_lazy_match=jt[t.level].max_lazy,t.good_match=jt[t.level].good_length,t.nice_match=jt[t.level].nice_length,t.max_chain_length=jt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},Yt=(t,e,r,n,o,i)=>{if(!t)return ft;let a=1;if(e===mt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==At||n<8||n>15||e<0||e>9||i<0||i>vt)return Dt(t,ft);8===n&&(n=9);const s=new Gt;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+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<<o+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=e,s.strategy=i,s.method=r,Xt(t)};c.deflateInit=(t,e)=>Yt(t,e,At,15,8,Et),c.deflateInit2=Yt,c.deflateReset=Xt,c.deflateResetKeep=Wt,c.deflateSetHeader=(t,e)=>t&&t.state?2!==t.state.wrap?ft:(t.state.gzhead=e,dt):ft,c.deflate=(t,e)=>{let r,n;if(!t||!t.state||e>lt||e<0)return t?Dt(t,ft):ft;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||o.status===Tt&&e!==ct)return Dt(t,0===t.avail_out?gt:ft);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,Pt(o,31),Pt(o,139),Pt(o,8),o.gzhead?(Pt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),Pt(o,255&o.gzhead.time),Pt(o,o.gzhead.time>>8&255),Pt(o,o.gzhead.time>>16&255),Pt(o,o.gzhead.time>>24&255),Pt(o,9===o.level?2:o.strategy>=yt||o.level<2?4:0),Pt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(Pt(o,255&o.gzhead.extra.length),Pt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=ot(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(Pt(o,0),Pt(o,0),Pt(o,0),Pt(o,0),Pt(o,0),Pt(o,9===o.level?2:o.strategy>=yt||o.level<2?4:0),Pt(o,3),o.status=St);else{let e=At+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=yt||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=r<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=St,Bt(o,e),0!==o.strstart&&(Bt(o,t.adler>>>16),Bt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(t.adler=ot(t.adler,o.pending_buf,o.pending-r,r)),Nt(t),r=o.pending,o.pending!==o.pending_buf_size));)Pt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(t.adler=ot(t.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=ot(t.adler,o.pending_buf,o.pending-r,r)),Nt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,Pt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=ot(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=ot(t.adler,o.pending_buf,o.pending-r,r)),Nt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,Pt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=ot(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=It)}else o.status=It;if(o.status===It&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Nt(t),o.pending+2<=o.pending_buf_size&&(Pt(o,255&t.adler),Pt(o,t.adler>>8&255),t.adler=0,o.status=St)):o.status=St),0!==o.pending){if(Nt(t),0===t.avail_out)return o.last_flush=-1,dt}else if(0===t.avail_in&&Ot(e)<=Ot(i)&&e!==ct)return Dt(t,gt);if(o.status===Tt&&0!==t.avail_in)return Dt(t,gt);if(0!==t.avail_in||0!==o.lookahead||e!==at&&o.status!==Tt){let r=o.strategy===yt?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(zt(t),0===t.lookahead)){if(e===at)return 1;break}if(t.match_length=0,r=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===ct?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===_t?((t,e)=>{let r,n,o,i;const a=t.window;for(;;){if(t.lookahead<=Ct){if(zt(t),t.lookahead<=Ct&&e===at)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=t.strstart+Ct;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=Ct-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=et(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(kt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===ct?(kt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(kt(t,!1),0===t.strm.avail_out)?1:2})(o,e):jt[o.level].func(o,e);if(3!==r&&4!==r||(o.status=Tt),1===r||3===r)return 0===t.avail_out&&(o.last_flush=-1),dt;if(2===r&&(e===st?rt(o):e!==lt&&(J(o,0,0,!1),e===ut&&(Rt(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),Nt(t),0===t.avail_out))return o.last_flush=-1,dt}return e!==ct?dt:o.wrap<=0?ht:(2===o.wrap?(Pt(o,255&t.adler),Pt(o,t.adler>>8&255),Pt(o,t.adler>>16&255),Pt(o,t.adler>>24&255),Pt(o,255&t.total_in),Pt(o,t.total_in>>8&255),Pt(o,t.total_in>>16&255),Pt(o,t.total_in>>24&255)):(Bt(o,t.adler>>>16),Bt(o,65535&t.adler)),Nt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?dt:ht)},c.deflateEnd=t=>{if(!t||!t.state)return ft;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==It&&e!==St&&e!==Tt?Dt(t,ft):(t.state=null,e===St?Dt(t,pt):dt)},c.deflateSetDictionary=(t,e)=>{let r=e.length;if(!t||!t.state)return ft;const n=t.state,o=n.wrap;if(2===o||1===o&&42!==n.status||n.lookahead)return ft;if(1===o&&(t.adler=nt(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Rt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,zt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Mt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,zt(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,t.next_in=a,t.input=s,t.avail_in=i,n.wrap=o,dt},c.deflateInfo="pako deflate (from Nodeca project)";var Zt={};const qt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Zt.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)qt(r,e)&&(t[e]=r[e])}}return t},Zt.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,o=t.length;e<o;e++){let o=t[e];r.set(o,n),n+=o.length}return r};var Kt={};let $t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){$t=!1}const Qt=new Uint8Array(256);for(let t=0;t<256;t++)Qt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Qt[254]=Qt[254]=1,Kt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e};Kt.buf2string=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,o;const i=new Array(2*r);for(o=0,n=0;n<r;){let e=t[n++];if(e<128){i[o++]=e;continue}let a=Qt[e];if(a>4)i[o++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&$t)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(i,o)},Kt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Qt[t[r]]>e?r:e};const Jt=c,te=Zt,ee=Kt,re=K,ne=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},oe=Object.prototype.toString,{Z_NO_FLUSH:ie,Z_SYNC_FLUSH:ae,Z_FULL_FLUSH:se,Z_FINISH:ue,Z_OK:ce,Z_STREAM_END:le,Z_DEFAULT_COMPRESSION:de,Z_DEFAULT_STRATEGY:he,Z_DEFLATED:fe}=$;function pe(t){this.options=te.assign({level:de,method:fe,chunkSize:16384,windowBits:15,memLevel:8,strategy:he},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ne,this.strm.avail_out=0;let r=Jt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==ce)throw new Error(re[r]);if(e.header&&Jt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?ee.string2buf(e.dictionary):"[object ArrayBuffer]"===oe.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Jt.deflateSetDictionary(this.strm,t),r!==ce)throw new Error(re[r]);this._dict_set=!0}}pe.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?ue:ie,"string"==typeof t?r.input=ee.string2buf(t):"[object ArrayBuffer]"===oe.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===ae||i===se)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=Jt.deflate(r,i),o===le)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=Jt.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===ce;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pe.prototype.onData=function(t){this.chunks.push(t)},pe.prototype.onEnd=function(t){t===ce&&(this.result=te.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ge=function(t,e){return(e=e||{}).gzip=!0,function(t,e){const r=new pe(e);if(r.push(t,!0),r.err)throw r.msg||re[r.err];return r.result}(t,e)};const me=["enabled","userId","serverPath"];var we,ye,_e=["drs"];we=_e,ye=428,function(t){for(;--t;)we.push(we.shift())}(++ye);var ve,Ee,be,Ae=new t((ve="0x0",_e[ve-=0])),Ce=["removeItemSessionStorageSafe","removeItem","localStorage","FALLBACK_LOCAL_STORAGE","setItemLocalStorageSafe","clientId","getFullStorageKey","sessionStorage","getItem","FALLBACK_SESSION_STORAGE","setItemSessionStorageSafe","setItem"];Ee=Ce,be=365,function(t){for(;--t;)Ee.push(Ee.shift())}(++be);var xe=function(t,e){return Ce[t-=0]};class Ie{constructor(t){this.FALLBACK_SESSION_STORAGE={},this.FALLBACK_LOCAL_STORAGE={},this.clientId=t}getClientId(){return this[xe("0x0")]}setClientId(t){this[xe("0x0")]=t}getFullStorageKey(t){return this.clientId+"_"+t}getItemSessionStorageSafe(t){const e=this[xe("0x1")](t);try{return window[xe("0x2")][xe("0x3")](e)}catch(t){return this[xe("0x4")][e]}}[xe("0x5")](t,e){const r=this[xe("0x1")](t);try{window[xe("0x2")][xe("0x6")](r,e)}catch(t){this[xe("0x4")][r]=e}}[xe("0x7")](t){const e=this[xe("0x1")](t);try{window.sessionStorage[xe("0x8")](e)}catch(t){this[xe("0x4")][e]=void 0}}getItemLocalStorageSafe(t){const e=this[xe("0x1")](t);try{return window[xe("0x9")].getItem(e)}catch(t){return this[xe("0xa")][e]}}[xe("0xb")](t,e){const r=this[xe("0x1")](t);try{window[xe("0x9")][xe("0x6")](r,e)}catch(t){this[xe("0xa")][r]=e}}removeItemLocalStorageSafe(t){const e=this.getFullStorageKey(t);try{window[xe("0x9")][xe("0x8")](e)}catch(t){this.FALLBACK_LOCAL_STORAGE[e]=void 0}}}var Se,Te,De=["now","formatter","length","unshift","all","catch","enabled","[AccountProtection SDK]","logsLimit","logs","middlewares","info","pushLog","error","flush","log","%s %s %s","logPrefix","stringify","push"];Se=De,Te=306,function(t){for(;--t;)Se.push(Se.shift())}(++Te);var Oe=function(t,e){return De[t-=0]};class Re{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[Oe("0x0")]=t,this.logPrefix=Oe("0x1"),this[Oe("0x2")]=1e4,this[Oe("0x3")]=[],this[Oe("0x4")]=[]}[Oe("0x5")](t,e){this[Oe("0x6")](3,t,e)}warn(t,e){this[Oe("0x6")](4,t,e)}[Oe("0x7")](t,e){this.pushLog(5,t,e)}[Oe("0x8")](){const t=this[Oe("0x3")];return this[Oe("0x3")]=[],t}[Oe("0x6")](t,e,r){this[Oe("0x0")]&&console[Oe("0x9")](Oe("0xa"),this[Oe("0xb")],e,JSON[Oe("0xc")](r)),this[Oe("0x3")][Oe("0xd")]({timestamp:Date[Oe("0xe")](),severity:t,text:JSON[Oe("0xc")](n(n({},r),{},{message:e}),this[Oe("0xf")])}),this.logs[Oe("0x10")]>this[Oe("0x2")]&&this.logs[Oe("0x11")]();const o=this[Oe("0x4")].map((t=>t()));Promise[Oe("0x12")](o)[Oe("0x13")]((()=>{}))}[Oe("0xf")](t,e){if(e instanceof Error){const{name:t,stack:r,message:n}=e;return{name:t,stack:r,message:n}}return e}}const Me=new Re;var Ne,ke,Pe=["race","warn","executor reached timeout","finally","getHighEntropyValues","architecture","model","platform","platformVersion","fullVersionList","uaFullVersion","resolve"];Ne=Pe,ke=160,function(t){for(;--t;)Ne.push(Ne.shift())}(++ke);var Be=function(t,e){return Pe[t-=0]};function Fe(){var t;return null===(t=navigator.userAgentData)||void 0===t?void 0:t[Be("0x0")]([Be("0x1"),Be("0x2"),Be("0x3"),Be("0x4"),Be("0x5"),"bitness","mobile","wow64",Be("0x6")])}function Le(t,e){let r;const n=[Promise[Be("0x7")](t()).catch((()=>{})),new Promise(((t,n)=>r=window.setTimeout(n,e)))];return Promise[Be("0x8")](n).catch((()=>Me[Be("0x9")](Be("0xa"),{fnName:t.name})))[Be("0xb")]((()=>clearTimeout(r)))}var ze,Ue,Ve=["filter","product","userAgent","storage","userActivation","isActive","permissions","query","state","sendBeacon","function","hardwareConcurrency","get","getOwnPropertyDescriptor","languages","isArray","map","platform","referrer","timing","memory","indexedDB","DocumentTouch","ontouchstart","type","suffixes","plugins","description","availWidth","height","orientation","charCodeAt","outerWidth","outerHeight","getPlatform","cpuClass","oscpu","HTMLElement","addBehavior","productSub","mediaDevices","enumerateDevices","kind","deviceId","groupId","OfflineAudioContext","createOscillator","triangle","frequency","threshold","knee","ratio","attack","release","connect","destination","oncomplete","renderedBuffer","subarray","getHash","webkitOfflineAudioContext","createDynamicsCompressor","createAnalyser","start","startRendering","disconnect","frequencyBinCount","getFloatFrequencyData","call","fftSize","getFloatTimeDomainData","reduction","mmMwWLliI0O&1","monospace","serif","sans-serif-thin","Agency FB","Arial Unicode MS","AvantGarde Bk BT","Batang","Bitstream Vera Sans Mono","EUROSTILE","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","Haettenschweiler","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","Segoe UI Light","SimHei","Small Fonts","Staccato222 BT","Univers CE 55 Medium","Vrinda","ZWAdobeF","createElement","div","hidden","position","absolute","textContent","some","offsetWidth","offsetHeight","appendChild","body","removeChild","deviceMemory","resolvedOptions","timeZone","getVendor","buildID","width","alphabetic","#f60","fillStyle","#069",'11pt "Times New Roman"',"Cwm fjordbank gly ","fromCharCode","fillText","font","18pt Arial","toDataURL","globalCompositeOperation","#f2f","#2ff","#ff2","closePath","fill","#f9c","arc","evenodd","rect","getContext","getBattery","charging","chargingTime","dischargingTime","level","brave","isBrave","getWebGlRenderer","canvas","webgl","webgl-experimental","getExtension","UNMASKED_RENDERER_WEBGL","video","canPlayType","video/mp4;;Codecs =avc1.42E01E","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","reduce","abs","configManager","calculate","getConfValue","cryptoBinding","lastDeviceData","storageManager","setItemLocalStorageSafe","now","getDeviceData","dataPoints","getBrave","getCodesTests","getConnection","getCookieEnabled","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getIndexedDB","getFIDOEnabled","getLanguages","getLanguage","getTimezoneOffset","getLocalStorage","getNavigatorProduct","getNavigatorUAData","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorOnLine","navigatorIsUserActive","getMathFingerprint","getOpenDatabase","getWindowOrientation","getCpuClass","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprint","getAudioFingerprintExtended","getPerformanceTiming","getPerformanceMemory","getPlugins","getScreen","hasSequentum","getSessionStorage","getReferrer","getTimezone","getTouchSupport","getBuildID","getWebDriver","getWindowBasedKeys","getWindowOuter","webRTCDisabled","getCryptoBindingData","bind","getNavigatorPermissionsState","notifications","geolocation","isGeoLocationExists","isSendBeaconFunction","getNavigatorPrototype","getInstalledRelatedApps","windowConstructorAliasTest","windowDocumentAuxVarsTest","CDPRuntimeDomainTest","Error","Object","defineProperty","stack","console","debug","document","$chrome_asyncScriptInfo","values","getOwnPropertyDescriptors","value","cache_","getOwnPropertyNames","getPrototypeOf","storeItem","retrieveItem","isNodeReachable_","sort","every","test","Array","Promise","Symbol","name","getAsyncToken","dataPointsExtractor","startPromisesLoop","entries","includes","resolve","warn","cookieEnabled","credentials","PublicKeyCredential","crypto","getRandomValues","RTCPeerConnection","chrome","safari","__gCrWeb","yandex","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","_phantom","__phantomas","callPhantom","Buffer","emit","__nightmare","_selenium","calledSelenium","callSelenium","__driver_evaluate","__driver_unwrapped","__fxdriver_evaluate","__lastWatirAlert","__selenium_evaluate","__selenium_unwrapped","__webdriver__chr","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","calledPhantom","cdc_adoQpoasnfa76pfcZLmcfl_Promise","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","chrome_asyncScriptInfo","geb","OSMJIF","watinExpressionError","push","getMediaMatch","high","standard","no-preference","more","less","1000","active","none","inverted","rec2020","srgb","replace","matchMedia","matches","sqrt","log","exp","acosh","asinh","atan","cos","cosh","tanh","expm1","log1p","length","hashCodeString","localStorage","external","toString","Sequentum","getNavigatorBasedKeys","webdriver","__webdriver_unwrapped","__fxdriver_unwrapped","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","driver-evaluate","webdriver-evaluate","webdriverCommand","webdriver-evaluate-response","__webdriverFunc","__$webdriverAsyncExecutor","__lastWatirPrompt","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker"];ze=Ve,Ue=168,function(t){for(;--t;)ze.push(ze.shift())}(++Ue);var He=function(t,e){return Ve[t-=0]};const je=He("0x0"),Ge=He("0x1"),We=t=>t?[...t][He("0x2")](((t,e)=>t+Math[He("0x3")](e)),0):0;class Xe{constructor(t,e,r){this.storageManager=t,this[He("0x4")]=e,this.cryptoBinding=r}async[He("0x5")](){const t=this[He("0x4")][He("0x6")](je,[]),e=this[He("0x4")][He("0x6")](Ge,36e5),r=await new Ye(t,this[He("0x7")]).dataPointsExtractor();return this[He("0x8")]=r,this[He("0x9")][He("0xa")](Ge,Date[He("0xb")]()+e),r}async[He("0xc")](){return Number(this[He("0x9")].getItemLocalStorageSafe(Ge))<Date[He("0xb")]()||!this[He("0x8")]?await this.calculate()||{}:this[He("0x8")]||{}}}class Ye{constructor(t,e){this.sdkDeviceDataCollectionIgnoreList=t,this[He("0x7")]=e,this[He("0xd")]={battery:this.getBattery,brave:this[He("0xe")],canvas:this.getCanvasFingerprint,codecs:this[He("0xf")],connection:this[He("0x10")],cookieEnabled:this[He("0x11")],cryptoRandomValues:this.getCryptoRandomValues,deviceMemory:this[He("0x12")],documentBasedKeys:this[He("0x13")],hardwareConcurrency:this[He("0x14")],indexedDB:this[He("0x15")],fidoEnabled:this[He("0x16")],languages:this[He("0x17")],language:this[He("0x18")],timezoneOffset:this[He("0x19")],localStorage:this[He("0x1a")],navigatorBasedKeys:this.getNavigatorBasedKeys,navigatorProduct:this[He("0x1b")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this[He("0x1c")],navigatorHighEntropyData:this[He("0x1d")],navigatorStorageEstimation:this[He("0x1e")],navigatorOnLine:this[He("0x1f")],navigatorIsUserActive:this[He("0x20")],math:this[He("0x21")],mediaMatch:this.getMediaMatch,openDatabase:this[He("0x22")],windowOrientation:this[He("0x23")],platform:this.getPlatform,cpuClass:this[He("0x24")],osClass:this.getOsCpu,addBehavior:this[He("0x25")],productSub:this[He("0x26")],mediaDevices:this[He("0x27")],audioFingerprint:this[He("0x28")],audioFingerprintExtended:this[He("0x29")],fonts:this.getFonts,performanceTiming:this[He("0x2a")],performanceMemory:this[He("0x2b")],plugins:this[He("0x2c")],screen:this[He("0x2d")],sequentum:this[He("0x2e")],sessionStorage:this[He("0x2f")],referrer:this[He("0x30")],timezone:this[He("0x31")],touchSupport:this[He("0x32")],vendor:this.getVendor,buildID:this[He("0x33")],webdriver:this[He("0x34")],webGlRenderer:this.getWebGlRenderer,windowBasedKeys:this[He("0x35")],windowOuter:this[He("0x36")],webRTCDisabled:this[He("0x37")],cryptoBindingData:this[He("0x38")][He("0x39")](this),notificationState:this[He("0x3a")].bind(this,He("0x3b")),geolocationState:this.getNavigatorPermissionsState[He("0x39")](this,He("0x3c")),isGeoLocationExists:this[He("0x3d")],isSendBeaconExists:this[He("0x3e")],navigatorPrototype:this[He("0x3f")],installedRelatedApps:this[He("0x40")],windowConstructorAliasTest:this[He("0x41")],windowDocumentAuxVarsTest:this[He("0x42")],CDPRuntimeDomainTest:this[He("0x43")]}}[He("0x43")](){let t=!1;const e=new(window[He("0x44")]);return window[He("0x45")][He("0x46")](e,He("0x47"),{configurable:!1,enumerable:!1,get:function(){return t=!0,""}}),window[He("0x48")][He("0x49")](e[He("0x47")]),t}windowDocumentAuxVarsTest(){for(const t of window[He("0x45")].getOwnPropertyNames(window[He("0x4a")]))if(t==He("0x4b")||/^\$cdc_[a-zA-Z0-9]{22}_$/.test(t))return!0;for(const t of window[He("0x45")][He("0x4c")](window[He("0x45")][He("0x4d")](window.document))){if(!t[He("0x4e")]||void 0===t[He("0x4e")][He("0x4f")])continue;const e=window.Object[He("0x50")](window[He("0x45")][He("0x51")](t.value)),r=[He("0x52"),He("0x53"),He("0x54")];if(e[He("0x55")](),r.sort(),e[He("0x56")](((t,e)=>t==r[e])))return!0}return!1}[He("0x41")](){const t=window[He("0x45")].getOwnPropertyNames(window);for(const e of t){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[He("0x57")](e))return!0;for(const t of[window[He("0x58")],window[He("0x59")],window[He("0x5a")]])if(e!=(null==t?void 0:t[He("0x5b")])&&"token"!=e&&e!=He("0x5c")&&window[e]===t)return!0}return!1}async[He("0x5d")](){const t=this[He("0x5e")]();return await this.collectPromisesData(t)}[He("0x5e")](){const t={};for(const[e,r]of Object[He("0x5f")](this[He("0xd")]))if(!this[He("0x0")][He("0x60")](e))try{t[e]=Le(r,100)}catch(r){Me.warn("worker throw error",{e:r,key:e}),t[e]=Promise[He("0x61")]()}return t}async collectPromisesData(t){const e={};for(const[r,n]of Object[He("0x5f")](t))try{e[r]=await n}catch(t){Me[He("0x62")]("worker promise rejected",{e:t,key:r}),e[r]=void 0}return e}getCookieEnabled(){const t=navigator[He("0x63")];return Promise[He("0x61")](t)}async[He("0x16")](){return!!navigator[He("0x64")]&&await window[He("0x65")].isUserVerifyingPlatformAuthenticatorAvailable()}getCryptoRandomValues(){const t=window[He("0x66")][He("0x67")](new Uint8Array(16));return Array.from(t)}[He("0x37")](){const t=null==window[He("0x68")];return Promise[He("0x61")](t)}getWindowBasedKeys(){const t=[He("0x69"),He("0x6a"),"__crWeb",He("0x6b"),He("0x6c"),"__yb",He("0x6d"),He("0x6e"),He("0x6f"),He("0x70"),He("0x71"),He("0x72"),He("0x73"),He("0x74"),"puffinDevice",He("0x75"),He("0x76"),He("0x77"),He("0x78"),He("0x79"),"spawn","domAutomationController","domAutomation",He("0x7a"),He("0x7b"),He("0x7c"),He("0x7d"),"_Selenium_IDE_Recorder","__$webdriverAsyncExecutor",He("0x7e"),He("0x7f"),He("0x80"),"__fxdriver_unwrapped",He("0x81"),"__lastWatirConfirm","__lastWatirPrompt",He("0x82"),He("0x83"),He("0x84"),He("0x85"),He("0x86"),He("0x87"),He("0x88"),"__webdriver_unwrapped","__webdriverFuncgeb","awesomium",He("0x89"),"cdc_adoQpoasnfa76pfcZLmcfl_Array",He("0x8a"),He("0x8b"),He("0x8c"),"fmget_targets",He("0x8d"),He("0x8e"),"spynner_additional_js_loaded",He("0x8f"),"watinExpressionResult"],e=[];for(const r of t){const t=window[r];void 0!==t&&null!=t&&e[He("0x90")](r)}return Promise[He("0x61")](e)}[He("0x91")](){const t={"dynamic-range":[He("0x92"),He("0x93")],"prefers-reduced-motion":[He("0x94"),He("0x2")],"prefers-contrast":[He("0x94"),"high","low",He("0x95"),He("0x96"),"forced"],"max-monochrome":["0","10","100",He("0x97")],"forced-colors":[He("0x98"),He("0x99")],"inverted-colors":[He("0x9a"),He("0x99")],"color-gamut":[He("0x9b"),"p3",He("0x9c")]},e={};for(const[r,n]of Object[He("0x5f")](t))for(const t of n)e[r.replace(/-/g,"_")+"_"+t[He("0x9d")](/-/g,"_")]=window[He("0x9e")]("("+r+": "+t+")")[He("0x9f")];return Promise[He("0x61")](e)}[He("0x21")](){const t=[Math.acos(.12312423423423424),Math[He("0xa3")](1e308),(e=1e154,Math.log(e+Math[He("0xa0")](e*e-1))),Math.asin(.12312423423423424),Math[He("0xa4")](1),Math[He("0xa1")](1+Math.sqrt(2)),Math.atanh(.5),Math.log(3)/2,Math[He("0xa5")](.5),Math.sin(-1e300),Math.sinh(1),Math[He("0xa2")](1)-1/Math[He("0xa2")](1)/2,Math[He("0xa6")](10.000000000123),Math[He("0xa7")](1),(Math[He("0xa2")](1)+1/Math[He("0xa2")](1))/2,Math.tan(-1e300),Math[He("0xa8")](1),(Math.exp(2)-1)/(Math[He("0xa2")](2)+1),Math[He("0xa2")](1),Math[He("0xa9")](1),Math[He("0xa2")](1)-1,Math[He("0xaa")](10),Math[He("0xa1")](11),Math.PI**-100];var e;let r="";for(let e=0;e<t[He("0xab")];e++)r+=t[e].toString();return Promise[He("0x61")](Ye[He("0xac")](r))}[He("0x10")](){const{connection:t}=navigator,e=(t=>{let{downlink:e,effectiveType:r,rtt:n,saveData:o}=t;return{downlink:e,effectiveType:r,rtt:n,saveData:o}})(t);return Promise[He("0x61")](e)}[He("0x2f")](){return Promise[He("0x61")](!!window.sessionStorage)}[He("0x1a")](){return Promise[He("0x61")](!!window[He("0xad")])}[He("0x2e")](){return-1!==window[He("0xae")][He("0xaf")]().indexOf(He("0xb0"))}[He("0xb1")](){return[He("0xb2"),"__driver_evaluate",He("0x85"),He("0x82"),"__fxdriver_evaluate",He("0x7f"),He("0xb3"),"__selenium_unwrapped",He("0xb4"),"_Selenium_IDE_Recorder",He("0x7b"),"calledSelenium",He("0xb5"),He("0xb6"),He("0xb7"),He("0xb8"),"selenium-evaluate",He("0xb9"),He("0xba"),He("0xbb"),"__webdriver_script_fn",He("0xbc"),"__lastWatirAlert","__lastWatirConfirm",He("0xbd"),He("0x4b"),He("0xbe"),He("0xbf")][He("0xc0")]((t=>navigator[t]))}getNavigatorProduct(){const t=navigator[He("0xc1")];return Promise.resolve(t)}getNavigatorUserAgent(){return navigator[He("0xc2")]}getNavigatorUAData(){return navigator.userAgentData}getNavigatorHighEntropyData(){return Fe()}[He("0x1e")](){return navigator[He("0xc3")].estimate()}[He("0x1f")](){return navigator.onLine}[He("0x20")](){return navigator[He("0xc4")][He("0xc5")]}async[He("0x3a")](t){try{const e=await navigator[He("0xc6")][He("0xc7")]({name:t});return null==e?void 0:e[He("0xc8")]}catch(t){}}[He("0x3d")](){return!!navigator[He("0x3c")]}[He("0x3e")](){return typeof navigator[He("0xc9")]===He("0xca")}[He("0x3f")](){return{hardwareConcurrency:Object.getOwnPropertyDescriptor(Object[He("0x51")](navigator),He("0xcb"))[He("0xcc")][He("0xaf")](),languages:Object[He("0xcd")](Object[He("0x51")](navigator),He("0xce")).get[He("0xaf")]()}}async[He("0x40")](){if("function"==typeof navigator[He("0x40")])try{const{related_applications:t}=await navigator[He("0x40")]();if(t&&Array[He("0xcf")](t))return t[He("0xd0")]((t=>({platform:t[He("0xd1")],url:t.url})))}catch(t){}}getReferrer(){return document[He("0xd2")]}[He("0x2a")](){return performance[He("0xd3")]}getPerformanceMemory(){const{jsHeapSizeLimit:t,totalJSHeapSize:e,usedJSHeapSize:r}=performance[He("0xd4")];return{jsHeapSizeLimit:t,totalJSHeapSize:e,usedJSHeapSize:r}}getIndexedDB(){return Promise.resolve(!!window[He("0xd5")])}[He("0x22")](){const{openDatabase:t}=window;return Promise[He("0x61")](!!t)}getTouchSupport(){const t=window[He("0xd6")]&&document instanceof DocumentTouch,e={maxTouchPoints:navigator.maxTouchPoints||navigator.msMaxTouchPoints||0,documentTouch:t,ontouchstart:He("0xd7")in window};return Promise[He("0x61")](e)}[He("0x2c")](){function t(t){const e=[];for(let r=0;r<t[He("0xab")];++r)e[He("0x90")]({type:t[r][He("0xd8")],suffixes:t[r][He("0xd9")]});return e}const e=[];for(let r=0;r<navigator.plugins[He("0xab")];++r){const n=navigator[He("0xda")][r];n&&e.push({name:n[He("0x5b")],description:n[He("0xdb")],mimeTypes:t(n)})}return Promise[He("0x61")](e)}[He("0x2d")](){const t=window.screen||screen,{availLeft:e}=t,{availTop:r}=t,n={availHeight:t.availHeight,availLeft:e,availTop:r,availWidth:t[He("0xdc")],colorDepth:t.colorDepth,height:t[He("0xdd")],width:t.width,pixelDepth:t.pixelDepth,orientationAngle:t[He("0xde")]&&t[He("0xde")].angle,orientationType:t.orientation&&t[He("0xde")][He("0xd8")],devicePixelRatio:window.devicePixelRatio};return Promise[He("0x61")](n)}static[He("0xac")](t){if(null==t)return;let e=0,r=0;const n=t[He("0xab")];for(;r<n;)e=(e<<5)-e+t[He("0xdf")](r++)|0;return e}[He("0x36")](){const t={outerWidth:window[He("0xe0")],outerHeight:window[He("0xe1")]};return Promise.resolve(t)}[He("0x34")](){const t=navigator[He("0xb2")];return Promise[He("0x61")](t)}[He("0x23")](){const t=window[He("0xde")];return Promise[He("0x61")](t)}[He("0xe2")](){const t=navigator[He("0xd1")];return Promise[He("0x61")](t)}[He("0x24")](){const t=navigator[He("0xe3")];return Promise[He("0x61")](t)}getOsCpu(){const t=navigator[He("0xe4")];return Promise.resolve(t)}[He("0x25")](){const t=!!window[He("0xe5")].prototype[He("0xe6")];return Promise.resolve(t)}getProductSub(){const t=navigator[He("0xe7")];return Promise.resolve(t)}async getMediaDevices(){const t=await navigator[He("0xe8")][He("0xe9")](),e=[];for(const r of t)e.push({kind:r[He("0xea")],label:r.label,deviceId:r[He("0xeb")],groupId:r[He("0xec")]});return e}async[He("0x28")](){const t=window[He("0xed")]||window.webkitOfflineAudioContext;if(!t)return-1;const e=new t(1,5e3,44100),r=e[He("0xee")]();r[He("0xd8")]=He("0xef"),r[He("0xf0")][He("0x4e")]=1e4;const n=e.createDynamicsCompressor();n[He("0xf1")][He("0x4e")]=-50,n[He("0xf2")].value=40,n[He("0xf3")][He("0x4e")]=12,n[He("0xf4")][He("0x4e")]=0,n[He("0xf5")][He("0x4e")]=.25,r[He("0xf6")](n),n[He("0xf6")](e[He("0xf7")]),r.start(0);const o=new Promise((async(t,r)=>{e[He("0xf8")]=e=>t(e[He("0xf9")]);try{await e.startRendering()}catch(t){r(t)}})),i=(await o).getChannelData(0)[He("0xfa")](4500);return Ye[He("0xfb")](i)}async[He("0x29")](){var t;const e=window.OfflineAudioContext||window[He("0xfc")];if(!e)return{};const r=new e(1,5e3,44100),n=r[He("0xee")]();n[He("0xd8")]=He("0xef"),n.frequency[He("0x4e")]=1e4;const o=r[He("0xfd")]();o[He("0xf1")][He("0x4e")]=-50,o.knee[He("0x4e")]=40,o[He("0xf4")].value=0;const i=r[He("0xfe")]();n.connect(o),o[He("0xf6")](i),o[He("0xf6")](r[He("0xf7")]),n[He("0xff")](0);try{await r[He("0x100")](),o[He("0x101")](),n[He("0x101")]();const e=new Float32Array(i[He("0x102")]);null===(t=i[He("0x103")])||void 0===t||t[He("0x104")](i,e);const a=new Float32Array(i[He("0x105")]);return"getFloatTimeDomainData"in i&&i[He("0x106")](a),{gain:o[He("0x107")][He("0x4e")]||o[He("0x107")],freq:We(e),time:We(a)}}catch(t){return{}}}static[He("0xfb")](t){let e=0;for(let r=0;r<t.length;++r)e+=Math.abs(t[r]);return e}getFonts(){const t=He("0x108"),e=[He("0x109"),"sans-serif",He("0x10a")],r=[He("0x10b"),"ARNO PRO",He("0x10c"),"Arabic Typesetting",He("0x10d"),He("0x10e"),"BankGothic Md BT",He("0x10f"),He("0x110"),"Calibri","Century","Century Gothic","Clarendon",He("0x111"),"Franklin Gothic",He("0x112"),He("0x113"),He("0x114"),He("0x115"),"HELV",He("0x116"),"Helvetica Neue",He("0x117"),He("0x118"),He("0x119"),He("0x11a"),"Lucida Bright","Lucida Sans",He("0x11b"),He("0x11c"),He("0x11d"),He("0x11e"),He("0x11f"),He("0x120"),He("0x121"),"Marlett",He("0x122"),He("0x123"),He("0x124"),He("0x125"),He("0x126"),He("0x127"),"SCRIPTINA",He("0x128"),"Serifa",He("0x129"),He("0x12a"),He("0x12b"),"TRAJAN PRO",He("0x12c"),He("0x12d"),He("0x12e")],n=document[He("0x12f")](He("0x130"));n.style.visibility=He("0x131");const o={},i={},a=e=>{const r=document[He("0x12f")]("span"),{style:o}=r;return o[He("0x132")]=He("0x133"),o.top="0",o.left="0",o.fontFamily=e,o.fontSize="10px",r[He("0x134")]=t,n.appendChild(r),r},s=(t,e)=>a("'"+t+"',"+e),u=e[He("0xd0")](a),c=(()=>{const t={};for(const n of r)t[n]=e.map((t=>s(n,t)));return t})();document.body[He("0x138")](n);try{for(let t=0;t<e[He("0xab")];t++)o[e[t]]=u[t].offsetWidth,i[e[t]]=u[t][He("0x137")];const t=r[He("0xc0")]((t=>{return r=c[t],e[He("0x135")](((t,e)=>r[e][He("0x136")]!==o[t]||r[e][He("0x137")]!==i[t]));var r}));return Promise[He("0x61")](t)}finally{document[He("0x139")][He("0x13a")](n)}}[He("0x19")](){const t=(new Date)[He("0x19")]();return Promise[He("0x61")](t)}[He("0x18")](){const t=navigator.language;return Promise[He("0x61")](t)}[He("0x17")](){const t=navigator[He("0xce")];return Promise[He("0x61")](t)}[He("0x14")](){const t=navigator[He("0xcb")];return Promise[He("0x61")](t)}getDeviceMemory(){const t=navigator[He("0x13b")];return Promise[He("0x61")](t)}getDocumentBasedKeys(){return[He("0x85"),"__selenium_evaluate",He("0x88"),He("0x87"),He("0x86"),He("0x80"),He("0x7f"),He("0xb3"),He("0x7e"),He("0x83"),He("0xb4")].filter((t=>document[t]))}[He("0x31")](){const t=Intl.DateTimeFormat()[He("0x13c")]()[He("0x13d")];return Promise[He("0x61")](t)}[He("0x13e")](){const t=navigator.vendor;return Promise.resolve(t)}[He("0x33")](){const t=navigator[He("0x13f")];return Promise[He("0x61")](t)}async getCanvasFingerprint(){const t=document[He("0x12f")]("canvas");t[He("0x140")]=1,t[He("0xdd")]=1;const e=t[He("0x156")]("2d"),r={winding:function(t){return t.rect(0,0,10,10),t[He("0x155")](2,2,6,6),!t.isPointInPath(5,5,"evenodd")}(e),geometry:function(t,e){t[He("0x140")]=122,t.height=110,e[He("0x14c")]="multiply";const r=[[He("0x14d"),40,40],[He("0x14e"),80,40],[He("0x14f"),60,80]];for(const[t,n,o]of r)e[He("0x143")]=t,e.beginPath(),e.arc(n,o,40,0,2*Math.PI,!0),e[He("0x150")](),e[He("0x151")]();return e.fillStyle=He("0x152"),e[He("0x153")](60,60,60,0,2*Math.PI,!0),e[He("0x153")](60,60,20,0,2*Math.PI,!0),e[He("0x151")](He("0x154")),Ye.hashCodeString(t[He("0x14b")]())}(t,e),text:function(t,e){t[He("0x140")]=240,t[He("0xdd")]=60,e.textBaseline=He("0x141"),e.fillStyle=He("0x142"),e.fillRect(100,1,62,20),e[He("0x143")]=He("0x144"),e.font=He("0x145");const r=He("0x146")+String[He("0x147")](55357,56835);return e[He("0x148")](r,2,15),e[He("0x143")]="rgba(102, 204, 0, 0.2)",e[He("0x149")]=He("0x14a"),e.fillText(r,4,45),Ye[He("0xac")](t[He("0x14b")]())}(t,e)};return Promise[He("0x61")](r)}async[He("0x157")](){const t=await navigator[He("0x157")]();return{charging:t[He("0x158")],chargingTime:t[He("0x159")],dischargingTime:t[He("0x15a")],level:t[He("0x15b")]}}async getBrave(){return!!navigator[He("0x15c")]&&await navigator[He("0x15c")][He("0x15d")]()}async[He("0x15e")](){const t=document.createElement(He("0x15f")),e=t[He("0x156")](He("0x160"))||t[He("0x156")](He("0x161")),r=e[He("0x162")]("WEBGL_debug_renderer_info");return Promise.resolve(e.getParameter(r[He("0x163")]))}async[He("0xf")](){const t=document[He("0x12f")](He("0x164")),e={basic:""===t[He("0x165")]('video/mp4; codecs="avc1.42E01E"'),advanced:""===t[He("0x165")](He("0x166"))};return Promise[He("0x61")](e)}async[He("0x38")](){const{publicKey:t,keyIdentifier:e}=await this[He("0x7")].getPublicData();return{publicKey:t,keyIdentifier:e}}static isMobile(){return/iPhone|iPad|iPod|Android|MiuiBrowser/i[He("0x57")](navigator.userAgent)||null!=window[He("0xde")]||window[He("0x9e")](He("0x167"))[He("0x9f")]}}var Ze,qe,Ke=["EVENT_TYPE_INTERACTION","EVENT_TYPE_IDENTIFICATION","mobile_web","EVENT_TYPE_ACTION","action","device"];Ze=Ke,qe=345,function(t){for(;--t;)Ze.push(Ze.shift())}(++qe);var $e,Qe,Je=function(t,e){return Ke[t-=0]};(Qe=$e||($e={}))[Je("0x0")]=Je("0x1"),Qe.EVENT_TYPE_DEVICE=Je("0x2"),Qe[Je("0x3")]="interaction",Qe[Je("0x4")]="identification";const tr="desktop_web",er=Je("0x5");var rr,nr,or=["error loading config","shouldUpdateConf","getConfValue","now","refreshConf","keys","length","setItemLocalStorageSafe","stringify","timestamp","ric","storageManager","requestsManager","conf","loadConf","isMobile","device/conf?tenantId=","&type=","getData","error","error fetching config","getItemLocalStorageSafe","parse"];rr=or,nr=400,function(t){for(;--t;)rr.push(rr.shift())}(++nr);var ir=function(t,e){return or[t-=0]};const ar=ir("0x0"),sr=ir("0x1");class ur{constructor(t,e){this[ir("0x2")]=t,this[ir("0x3")]=e,this[ir("0x4")]=this[ir("0x5")]()}async fetchConf(t){try{const e=Ye[ir("0x6")]()?er:tr,r=ir("0x7")+t+ir("0x8")+e,n=await this[ir("0x3")][ir("0x9")](r);return null!=n?n:{}}catch(e){return Me[ir("0xa")](ir("0xb"),{clientId:t,error:e}),{}}}[ir("0x5")](){const t=this[ir("0x2")][ir("0xc")](sr);if(null!=t)try{return JSON[ir("0xd")](t)}catch(t){Me[ir("0xa")](ir("0xe"),{error:t})}return{}}[ir("0xf")](){const t=this[ir("0x10")](ar,0);return Date[ir("0x11")]()-t>36e5}async[ir("0x12")](t){if(!this[ir("0xf")]())return!1;let e=await this.fetchConf(t);return 0==Object[ir("0x13")](e)[ir("0x14")]?e=this[ir("0x5")]():this[ir("0x2")][ir("0x15")](sr,JSON[ir("0x16")](e)),this[ir("0x4")]=e,!0}[ir("0x10")](t,e){const r=void 0!==this[ir("0x4")]?this[ir("0x4")][t]:void 0;return null!=r?r:e}}var cr,lr,dr=["maintainLastXItems","length","push","base64UrlEncode","encode","replace","base64ToBase64Url"];cr=dr,lr=203,function(t){for(;--t;)cr.push(cr.shift())}(++lr);var hr=function(t,e){return dr[t-=0]};class fr{static[hr("0x0")](t,e,r){return t[hr("0x1")]>=e&&t.splice(0,1),t[hr("0x2")](r),t}static[hr("0x3")](t){const e=(new TextEncoder)[hr("0x4")](t),r=String.fromCharCode(...e);return btoa(r)[hr("0x5")](/\+/g,"-")[hr("0x5")](/\//g,"_")[hr("0x5")](/=/g,"")}static[hr("0x6")](t){return t[hr("0x5")](/\+/g,"-")[hr("0x5")](/\//g,"_")[hr("0x5")](/=/g,"")}}var pr,gr,mr=["firesTouchEvents","target","isTrusted","cancelable","sourceCapabilities","composed","location","inputType","data","buffer","collect","extractEventData","maintainLastXItems","getData","now","extractButtonsPressedData","ctrlKey","altKey","shiftKey","buttons","bufferSize","getTimeOrigin","timeStamp","function","getCoalescedEvents","length","forEach","offsetX","offsetY"];pr=mr,gr=443,function(t){for(;--t;)pr.push(pr.shift())}(++gr);var wr=function(t,e){return mr[t-=0]};class yr{constructor(t){this[wr("0x0")]=[],this[wr("0x1")]=t}[wr("0x2")](t){const e=this[wr("0x3")](t);fr[wr("0x4")](this[wr("0x0")],this[wr("0x1")],e)}[wr("0x5")](){return this[wr("0x0")]}[wr("0x3")](t){return n({x:t.x,y:t.y,tspl:Date[wr("0x6")]()},this.extractButtonsPressedData(t))}[wr("0x7")](t){return n(n(n(n({},t[wr("0x8")]&&{ctrlKey:!0}),t[wr("0x9")]&&{altKey:!0}),t[wr("0xa")]&&{shiftKey:!0}),0!=t[wr("0xb")]&&{buttons:t[wr("0xb")]})}}class _r{constructor(t){this[wr("0x0")]=[],this[wr("0xc")]=t}[wr("0x2")](t){var e;const r=this[wr("0xd")]()+(null!==(e=t[wr("0xe")])&&void 0!==e?e:performance[wr("0x6")]());if(typeof t.getCoalescedEvents===wr("0xf")){const e=t[wr("0x10")]();if(e&&e[wr("0x11")]>0)return void e[wr("0x12")]((t=>{const e=this.extractEventData(t,r,!0);fr[wr("0x4")](this[wr("0x0")],this[wr("0xc")],e)}))}const n=this[wr("0x3")](t,r,!1);fr[wr("0x4")](this[wr("0x0")],this[wr("0xc")],n)}[wr("0x5")](){return this[wr("0x0")]}[wr("0xd")](){var t;return null!==(t=performance.timeOrigin)&&void 0!==t?t:Date.now()-performance.now()}[wr("0x3")](t,e,r){var o;const i=n({x:t.x,y:t.y,timestampHighRes:this[wr("0xd")]()+(null!==(o=t.timeStamp)&&void 0!==o?o:performance[wr("0x6")]())},this.extractButtonsPressedData(t));return r&&(i.parentId=e),i}[wr("0x7")](t){return n(n(n(n({},t[wr("0x8")]&&{ctrlKey:!0}),t[wr("0x9")]&&{altKey:!0}),t.shiftKey&&{shiftKey:!0}),0!=t[wr("0xb")]&&{buttons:t.buttons})}}class vr{constructor(t){this.data=[],this[wr("0x1")]=t}collect(t){var e;const r={x:t.x,y:t.y,timestamp:Date[wr("0x6")](),mouseButtonType:t.detail,offsetX:t[wr("0x13")],offsetY:t[wr("0x14")],isPressed:null==(null===(e=t.sourceCapabilities)||void 0===e?void 0:e[wr("0x15")])?null:!t.sourceCapabilities[wr("0x15")],target_id:t[wr("0x16")].id};fr.maintainLastXItems(this.data,this[wr("0x1")],r)}[wr("0x5")](){const t=[...this[wr("0x0")]];return this[wr("0x0")]=[],t}}class Er{constructor(t){this[wr("0x0")]=[],this.bufferSize=t}[wr("0x2")](t){var e;const r={isTrusted:t[wr("0x17")],cancelable:t[wr("0x18")],composed:t.composed,isView:!!t.view,shiftKey:t[wr("0xa")],metaKey:t.metaKey,firesTouchEvents:null===(e=t[wr("0x19")])||void 0===e?void 0:e[wr("0x15")],timestamp:Date[wr("0x6")]()};fr.maintainLastXItems(this.data,this.bufferSize,r)}[wr("0x5")](){const t=[...this[wr("0x0")]];return this[wr("0x0")]=[],t}}class br{constructor(t){this[wr("0x0")]=[],this[wr("0xc")]=t}[wr("0x2")](t){var e;const r={isTrusted:t[wr("0x17")],cancelable:t.cancelable,composed:t[wr("0x1a")],isView:!!t.view,location:t[wr("0x1b")],shiftKey:t[wr("0xa")],firesTouchEvents:null===(e=t[wr("0x19")])||void 0===e?void 0:e[wr("0x15")],timestamp:Date[wr("0x6")]()};fr[wr("0x4")](this[wr("0x0")],this[wr("0xc")],r)}[wr("0x5")](){const t=this.data;return this[wr("0x0")]=[],t}}class Ar{constructor(t){this.data=[],this[wr("0xc")]=t}[wr("0x2")](t){const e={isTrusted:t[wr("0x17")],cancelable:t[wr("0x18")],composed:t[wr("0x1a")],inputType:t[wr("0x1c")],isView:!!t.view,timestamp:Date.now()};fr.maintainLastXItems(this[wr("0x0")],this[wr("0xc")],e)}[wr("0x5")](){const t=this[wr("0x0")];return this.data=[],t}}class Cr{constructor(t){this[wr("0x0")]=[],this[wr("0xc")]=t}collect(t){const e={isTrusted:t.isTrusted,cancelable:t.cancelable,composed:t[wr("0x1a")],timestamp:Date[wr("0x6")]()};fr[wr("0x4")](this.data,this.bufferSize,e)}[wr("0x5")](){const t=this.data;return this.data=[],t}}var xr,Ir,Sr=["change","click","paste","mousemove","mouseup","mousedown","keyup","input","focusout","pointerevents","INPUT","SELECT","TEXTAREA","storageManager","mouseEventsCollectionBuffer","moveEventType","detectMoveEventType","interactionEventsCollectorsData","sourceCapabilities","firesTouchEvents","offsetY","target","cancelable","composed","clipboardData","effectAllowed","inputTypeFilter","keys","dataset","virtualKeyboard","overlaysContent","undefined","PointerEvent","selectMoveEventTypeBasedOnRollout","getItemLocalStorageSafe","pointerMoveRolloutPercentage","random","persistRolloutAndMoveEventTypeSelections","getStoredMoveEventType","setItemLocalStorageSafe","tagName","includes","registerEventListeners","entries","error","filter","handleEvent","collect","getAttachedData","addSafeInteractionListener","addEventListener","error adding interaction listener","eventTypesToAttach","forEach","getData","getGenericAttributes","location","href"];xr=Sr,Ir=406,function(t){for(;--t;)xr.push(xr.shift())}(++Ir);var Tr=function(t,e){return Sr[t-=0]};const Dr=Tr("0x0"),Or=Tr("0x1"),Rr=Tr("0x2"),Mr=Tr("0x3"),Nr="pointermove",kr=Tr("0x4"),Pr=Tr("0x5"),Br=Tr("0x6"),Fr="keydown",Lr=Tr("0x7"),zr=Tr("0x8"),Ur=Tr("0x9"),Vr=[Tr("0xa"),Tr("0xb"),Tr("0xc")],Hr="pecrp",jr="cmet";class Gr{constructor(t,e,r,o,i){this[Tr("0xd")]=o,this.deviceEventDataCollectionIgnoreList=t,this[Tr("0xe")]=e,this.safeEventCallback=r,this.pointerMoveRolloutPercentage=i,this[Tr("0xf")]=this[Tr("0x10")](),this[Tr("0x11")]={[Or]:{eventTypesToAttach:[this[Tr("0xf")],kr,Pr],attributesMapper:t=>{var e;return{x:t.x,y:t.y,mouseButtonType:t.detail,isPressed:null==(null===(e=t[Tr("0x12")])||void 0===e?void 0:e[Tr("0x13")])?null:!t.sourceCapabilities[Tr("0x13")],offsetX:t.offsetX,offsetY:t[Tr("0x14")],target_id:t.target.id}}},[Rr]:{attributesMapper:t=>({target_id:t[Tr("0x15")].id,isTrusted:t.isTrusted,cancelable:t[Tr("0x16")],composed:t[Tr("0x17")],dropEffect:t[Tr("0x18")].dropEffect,effectAllowed:t[Tr("0x18")][Tr("0x19")]})},submit:{attributesMapper:t=>({target_id:t[Tr("0x15")].id})},[Mr]:{continousCollectors:[new yr(this[Tr("0xe")])]},[Nr]:{continousCollectors:[new _r(this[Tr("0xe")])]},[kr]:{continousCollectors:[new vr(1)]},[Pr]:{continousCollectors:[new vr(1)]},[zr]:{eventTypesToAttach:[Lr,Br,Fr,Dr],filter:this[Tr("0x1a")],attributesMapper:t=>{const{target:e,isTrusted:r,cancelable:o,composed:i}=t;return n({target_id:e.id,dataset_keys:Object[Tr("0x1b")](e[Tr("0x1c")]||{}),isTrusted:r,cancelable:o,composed:i},navigator[Tr("0x1d")]&&{navigator_virtualKeyboard:navigator[Tr("0x1d")][Tr("0x1e")]})}},[Lr]:{filter:this[Tr("0x1a")],continousCollectors:[new Ar(50)]},[Br]:{filter:this.inputTypeFilter,continousCollectors:[new br(50)]},[Fr]:{filter:this[Tr("0x1a")],continousCollectors:[new Er(50)]},[Dr]:{continousCollectors:[new Cr(50)]}}}[Tr("0x10")](){return typeof window!==Tr("0x1f")&&window[Tr("0x20")]?this[Tr("0x21")]():Mr}[Tr("0x21")](){const t=this[Tr("0xd")][Tr("0x22")](Hr);if((null!=t?Number(t):null)!==this[Tr("0x23")]){const t=Math[Tr("0x24")]()<this[Tr("0x23")]/100?Nr:Mr;return this[Tr("0x25")](t),t}return this[Tr("0x26")]()}persistRolloutAndMoveEventTypeSelections(t){this[Tr("0xd")][Tr("0x27")](Hr,this[Tr("0x23")]),this[Tr("0xd")][Tr("0x27")](jr,t)}[Tr("0x26")](){const t=this[Tr("0xd")][Tr("0x22")](jr);return(e=t)===Nr||e===Mr?t:Mr;var e}[Tr("0x1a")](t){var e;const r=null===(e=t[Tr("0x15")])||void 0===e?void 0:e[Tr("0x28")];return Vr[Tr("0x29")](r)}[Tr("0x2a")](){for(const[t,e]of Object[Tr("0x2b")](this.interactionEventsCollectorsData))if(!this.deviceEventDataCollectionIgnoreList[Tr("0x29")](t)&&!(t===Mr&&this[Tr("0xf")]===Nr||t===Nr&&this.moveEventType===Mr))try{this.addSafeInteractionListener(t,e)}catch(e){Me[Tr("0x2c")]("Error while adding listener",{error:e,eventType:t})}}filter(t,e){return!t[Tr("0x2d")]||t[Tr("0x2d")](e)}async[Tr("0x2e")](t,e,r){const{attributesMapper:o,continousCollectors:i}=t;if(!this[Tr("0x2d")](t,e))return!1;if(i)i.forEach((t=>{t[Tr("0x2f")](e)}));else{const t=this.getGenericAttributes(),i=this[Tr("0x30")](r),a=n(n(n({},t),o(e)),i&&{attachedEventsData:i});await this.safeEventCallback(r,a)}return!0}[Tr("0x31")](t,e){window[Tr("0x32")](t,(async r=>{try{await this[Tr("0x2e")](e,r,t)}catch(t){Me[Tr("0x2c")](Tr("0x33"),{error:t})}}))}getAttachedData(t){let e;const r=this.interactionEventsCollectorsData[t][Tr("0x34")];return r&&(e={},r.forEach((t=>{const{continousCollectors:r}=this[Tr("0x11")][t];if(r){const n=t===Nr?Ur:t;r[Tr("0x35")]((t=>e[n]=t[Tr("0x36")]()))}}))),e}[Tr("0x37")](){return{location:window[Tr("0x38")][Tr("0x39")]}}}var Wr,Xr,Yr=["CHALLENGE","DENY","TRUST","compress","compressed","uncompressed","ALLOW"];Wr=Yr,Xr=234,function(t){for(;--t;)Wr.push(Wr.shift())}(++Xr);var Zr,qr,Kr,$r,Qr=function(t,e){return Yr[t-=0]};(qr=Zr||(Zr={}))[Qr("0x0")]=Qr("0x1"),qr[Qr("0x2")]="uncompressed",($r=Kr||(Kr={}))[Qr("0x3")]=Qr("0x3"),$r[Qr("0x4")]=Qr("0x4"),$r[Qr("0x5")]="DENY",$r[Qr("0x6")]=Qr("0x6");var Jr,tn,en=["RSA-OAEP","fromCharCode","btoa","importPublicKey","importKey","parse","SHA-256","crypto is not supported","generateSymKey","crypto","subtle","generateKey","AES-GCM","encrypt","decrypt","encryptPayload","string","getRandomValues","arrayBufferToBase64","encryptSymKeyBundle","exportKey","encode"];Jr=en,tn=360,function(t){for(;--t;)Jr.push(Jr.shift())}(++tn);var rn=function(t,e){return en[t-=0]};class nn{constructor(t){this.configManager=t}[rn("0x0")](){return window[rn("0x1")][rn("0x2")][rn("0x3")]({name:rn("0x4"),length:256},!0,[rn("0x5"),rn("0x6")])}async[rn("0x7")](t,e){const r=typeof t===rn("0x8")?(new TextEncoder).encode(t):t,n=window.crypto[rn("0x9")](new Uint8Array(12)),o={name:rn("0x4"),iv:n},i=await window.crypto[rn("0x2")].encrypt(o,e,r);return{payloadCipherText:this[rn("0xa")](i),iv:n}}async[rn("0xb")](t,e,r){const n=await window[rn("0x1")][rn("0x2")][rn("0xc")]("raw",t),o=this[rn("0xa")](n),i=this.arrayBufferToBase64(e),a=(new TextEncoder)[rn("0xd")](JSON.stringify({symKey:o,iv:i})),s=await window.crypto[rn("0x2")][rn("0x5")]({name:rn("0xe")},r,a);return this[rn("0xa")](s)}arrayBufferToBase64(t){let e="";const r=new Uint8Array(t),n=r.byteLength;for(let t=0;t<n;t++)e+=String[rn("0xf")](r[t]);return window[rn("0x10")](e)}[rn("0x11")](t){return window.crypto[rn("0x2")][rn("0x12")]("jwk",JSON[rn("0x13")](t),{name:"RSA-OAEP",hash:rn("0x14")},!0,["encrypt"])}async[rn("0x5")](t,e){if(!window[rn("0x1")]||!window[rn("0x1")].subtle)throw new Error(rn("0x15"));const r=await this[rn("0x0")](),{payloadCipherText:n,iv:o}=await this[rn("0x7")](e,r),i=await this[rn("0x11")](t);return{encryptedData:n,encryptedKey:await this[rn("0xb")](r,o,i)}}}var on,an,sn=["server","COMMUNICATION","error","message","name","toString","SDKError: ","errorSpace","errorCode",", errorCode: ","toLog","CLIENT","SERVER"];on=sn,an=479,function(t){for(;--t;)on.push(on.shift())}(++an);var un,cn,ln=function(t,e){return sn[t-=0]};(cn=un||(un={}))[ln("0x0")]="client",cn[ln("0x1")]=ln("0x2"),cn[ln("0x3")]="communication";class dn extends Error{constructor(t,e,r){var n,o;super(),this[ln("0x4")]=t,this.errorSpace=e,this.errorCode=r,this[ln("0x5")]=(null===(n=this[ln("0x4")])||void 0===n?void 0:n.message)||this[ln("0x4")].toString(),this[ln("0x6")]=(null===(o=this[ln("0x4")])||void 0===o?void 0:o[ln("0x6")])||dn.name}[ln("0x7")](){return ln("0x8")+this[ln("0x5")]+(this[ln("0x9")]?", errorSpace: "+this[ln("0x9")]:"")+(this[ln("0xa")]?ln("0xb")+this.errorCode:"")}[ln("0xc")](){return n(n({name:this[ln("0x6")],message:this.message},this[ln("0x9")]&&{errorSpace:this[ln("0x9")]}),this[ln("0xa")]&&{errorCode:this.errorCode})}}var hn,fn,pn=["filter","join"];hn=pn,fn=354,function(t){for(;--t;)hn.push(hn.shift())}(++fn);var gn,mn,wn=function(t,e){return pn[t-=0]},yn=["getPublicData","Crypto-binding is not supported. ","sessionToken","buildEncryptedRequestBody","data","signature","postData","device/events","headers","find","handleRotateResponse","setDeviceId","setSessionToken","setUserId","actionToken","cleanupSentEvents","refreshConf","Encryption error - missing public key","COMMUNICATION","compressData","crypto","encrypt","compress","uncompressed","CLIENT","Failed to compress data, sending the data to the service uncompressed","getItemLocalStorageSafe","parseInt","EVENT_TYPE_DEVICE","setItemLocalStorageSafe","sendPageLoadEvent","page_load","extractWindowRespurces","location","href","referrer","history","resources","map","name","initiatorType","registerEventListeners","[Lightweight] Skipping interaction event tracking in lightweight mode","getPayload","[Lightweight] getPayload() can only be called in lightweight mode","[Lightweight] Building fresh device payload","getDeviceData","[Lightweight] Failed to collect device data","[Lightweight] Device payload built successfully","getPayloadWithAction","[Lightweight] Building fresh payload","clearQueue","warn","[Lightweight] clearQueue() called in standard mode - ignoring","[Lightweight] Event queue cleared","Failed to parse events from localStorage","maintainLastXItems","stringify","cleanLocalStorageEvents","removeItemLocalStorageSafe","add","filter","ddls","lastDeviceInDeviceEvent","rei","lse","mouseEventsCollectionBuffer","deviceEventDataCollectionIgnoreList","publicKey","bufferSize","bufferInterval","EVENT_TYPE_ACTION","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","maxLocalStoredEvents","key_rotation_data","key_rotation_status","pendingQueueEnabled","configManager","getConfValue","enablePendingQueue","storageManager","deviceDataManager","requestsManager","identityManager","cryptoBinding","enableSessionToken","tier","eventIndex","eventIdMap","flushLock","processingEvents","actionTokenCache","ACTION_TOKEN_CACHE_TTL","flushTimeoutHandle","safeEventCallback","EVENT_TYPE_INTERACTION","eventsQueue","interactionEventsManager","isMobile","eventTypesToStore","maxEventStored","pollingInterval","has","type","getDeviceId","getUserId","timestamp","index","attributes","set","getActionEventCacheKey","userId","action_type","correlationId","getCachedActionToken","get","now","delete","token","cacheActionToken","includes","size","keys","value","emitEvent","increaseEventIndex","toString","platform","serverPath","getTabId","enrichUADataIfDoesNotExist","lightweight","info","Returning cached action token","length","Error while emitting event","getClientId","errorCode","min","flush","error","Error while emitting event (delayed flush)","toLog","refreshSessionToken","sendDeviceDataEvent","Failed to refresh data","pollingSessionToken","navigatorHighEntropyData","pop","generateEventIdentifier","push","fetchEventsFromLocalStorage","forEach","sort","popAllEvents","clientId","deviceId","sdkPlatform"];gn=yn,mn=380,function(t){for(;--t;)gn.push(gn.shift())}(++mn);var _n=function(t,e){return yn[t-=0]};const vn=_n("0x0"),En=_n("0x1"),bn=_n("0x2"),An=_n("0x3"),Cn=_n("0x4"),xn=_n("0x5"),In=_n("0x6"),Sn=_n("0x7"),Tn=_n("0x8"),Dn=[$e[_n("0x9")],$e[_n("0xa")]],On=_n("0xb"),Rn=_n("0xc"),Mn=_n("0xd"),Nn=_n("0xe");class kn{get[_n("0xf")](){return this[_n("0x10")][_n("0x11")](_n("0x12"),!1)}constructor(t,e,r,o,i,a,s,u){let c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"standard";this[_n("0x10")]=t,this[_n("0x13")]=e,this[_n("0x14")]=r,this[_n("0x15")]=o,this[_n("0x16")]=i,this[_n("0x17")]=a,this.serverPath=s,this[_n("0x18")]=u,this[_n("0x19")]=c,this[_n("0x1a")]=null,this[_n("0x1b")]=new WeakMap,this[_n("0x1c")]=!1,this[_n("0x1d")]=new Map,this[_n("0x1e")]=new Map,this[_n("0x1f")]=36e5,this.ACTION_TOKEN_CACHE_MAX_SIZE=100,this[_n("0x20")]=null,this[_n("0x21")]=async(t,e)=>{try{const r=n({},n({interaction_type:t},e)),o={type:$e[_n("0x22")],attributes:r};return await this.emitEvent(o)}catch(t){}},this[_n("0x18")]=u,this[_n("0x23")]=[],this.crypto=new nn(t),this[_n("0x24")]=new Gr(this[_n("0x10")][_n("0x11")](xn,[]),this[_n("0x10")].getConfValue(Cn,100),this[_n("0x21")],this.storageManager,this[_n("0x10")].getConfValue("pointerEventRolloutPercentage",0)),this[_n("0x25")]=Ye.isMobile(),this[_n("0x26")]=this[_n("0x10")][_n("0x11")](On,[$e.EVENT_TYPE_ACTION]),this[_n("0x27")]=this.configManager[_n("0x11")](Rn,4),this[_n("0x28")]=36e4,this.pollingSessionToken()}generateEventIdentifier(t){var e;if(this[_n("0x1b")][_n("0x29")](t))return this[_n("0x1b")].get(t);const r=[t[_n("0x2a")]||"",this.identityManager.getClientId(),this.identityManager[_n("0x2b")]()||"",this.identityManager[_n("0x2c")]()||"",t[_n("0x2d")],void 0!==(n=t[_n("0x2e")])?n:"",(null===(e=t[_n("0x2f")])||void 0===e?void 0:e.action_type)||""][wn("0x0")]((t=>""!==t))[wn("0x1")]("-");var n;return this[_n("0x1b")][_n("0x30")](t,r),r}[_n("0x31")](t){var e;return((null==t?void 0:t[_n("0x2a")])||"")+"-"+(this[_n("0x16")].getClientId()||"")+"-"+(this[_n("0x16")][_n("0x2b")]()||"")+"-"+((null==t?void 0:t[_n("0x32")])||this[_n("0x16")][_n("0x2c")]()||"")+"-"+((null===(e=null==t?void 0:t[_n("0x2f")])||void 0===e?void 0:e[_n("0x33")])||(null==t?void 0:t[_n("0x34")])||"")}[_n("0x35")](t){if(!Dn.includes(null==t?void 0:t[_n("0x2a")]))return null;const e=this[_n("0x31")](t),r=this[_n("0x1e")][_n("0x36")](e);return r?Date[_n("0x37")]()-r[_n("0x2d")]>this.ACTION_TOKEN_CACHE_TTL?(this[_n("0x1e")][_n("0x38")](e),null):r[_n("0x39")]:null}[_n("0x3a")](t,e){if(!Dn[_n("0x3b")](null==t?void 0:t[_n("0x2a")])||!e)return;if(this[_n("0x1e")][_n("0x3c")]>=this.ACTION_TOKEN_CACHE_MAX_SIZE){const t=this[_n("0x1e")][_n("0x3d")]().next()[_n("0x3e")];this[_n("0x1e")][_n("0x38")](t)}const r=this.getActionEventCacheKey(t);this[_n("0x1e")].set(r,{token:e,timestamp:Date[_n("0x37")]()})}async[_n("0x3f")](t){t[_n("0x2e")]=this[_n("0x40")](),t.location=location[_n("0x41")](),t[_n("0x42")]=navigator[_n("0x42")],t.sdkVersion="2.0.1",t.serverPath=this[_n("0x43")],t.tabId=this.identityManager[_n("0x44")](),t[_n("0x2d")]=Date[_n("0x37")](),await this[_n("0x45")](t);let e=0;if(this[_n("0x26")][_n("0x3b")](t[_n("0x2a")])?e=this.addEventToLocalStorage(t):this.eventsQueue.push(t),this[_n("0x19")]===_n("0x46"))return{};if(this.pendingQueueEnabled&&Dn.includes(null==t?void 0:t[_n("0x2a")])){const e=this[_n("0x35")](t);if(e)return Me[_n("0x47")](_n("0x48"),{actionType:t.type,correlationId:t[_n("0x34")]}),{actionToken:e}}const r=this[_n("0x10")][_n("0x11")](Sn,2);if(this[_n("0x23")][_n("0x49")]+e>=r||Dn.includes(t.type)){this.flushTimeoutHandle&&(clearTimeout(this.flushTimeoutHandle),this[_n("0x20")]=null);try{return await this.flush()}catch(e){throw Me.error(_n("0x4a"),{clientId:this[_n("0x16")][_n("0x4b")](),eventType:t[_n("0x2a")],error:e[_n("0x4c")]?e.toLog():e}),e}}if(!this[_n("0x20")]&&this.eventsQueue[_n("0x49")]>0){const e=this[_n("0x10")][_n("0x11")](Tn,2),r=Math[_n("0x4d")](e,30);this.flushTimeoutHandle=setTimeout((()=>{this.flushTimeoutHandle=null,this[_n("0x4e")]().catch((e=>{Me[_n("0x4f")](_n("0x50"),{clientId:this.identityManager[_n("0x4b")](),eventType:t[_n("0x2a")],error:e[_n("0x4c")]?e[_n("0x51")]():e})}))}),1e3*r)}return{}}async[_n("0x52")](){try{return this[_n("0x23")][_n("0x49")]>0||await this[_n("0x53")](!0),await this[_n("0x4e")]()}catch(t){Me[_n("0x4f")](_n("0x54"),{e:t})}}async[_n("0x55")](){try{this[_n("0x16")].isTokenExpired()&&await this[_n("0x52")]()}catch(t){Me[_n("0x4f")]("Failed to polling data",{e:t})}finally{setTimeout((async()=>{await this.pollingSessionToken()}),this[_n("0x28")])}}async[_n("0x45")](t){var e;if(!(null===(e=t[_n("0x2f")])||void 0===e?void 0:e[_n("0x56")]))try{t[_n("0x2f")].navigatorHighEntropyData=await Fe()}catch(t){}}popAllEvents(){if(this[_n("0xf")]){const t=[],e=new Set;for(;this[_n("0x23")][_n("0x49")];){const r=this.eventsQueue[_n("0x57")]();if(!r)break;const n=this[_n("0x58")](r);this[_n("0x1d")][_n("0x29")](n)||e.has(n)||(e.add(n),t[_n("0x59")](r))}const r=this[_n("0x5a")]();return(null==r?void 0:r.length)&&r[_n("0x5b")]((r=>{const n=this.generateEventIdentifier(r);this.processingEvents[_n("0x29")](n)||e[_n("0x29")](n)||(e.add(n),t[_n("0x59")](r))})),t[_n("0x5c")](((t,e)=>t.timestamp-e[_n("0x2d")]))}{const t=[],e=this[_n("0x5a")]();for(;this.eventsQueue[_n("0x49")];){const e=this[_n("0x23")][_n("0x57")]();if(!e)break;t[_n("0x59")](e)}return(null==e?void 0:e[_n("0x49")])&&t.push(...e),t[_n("0x5c")](((t,e)=>t[_n("0x2d")]-e[_n("0x2d")]))}}async[_n("0x4e")](){let t=[];if(this.pendingQueueEnabled){for(;this[_n("0x1c")];)await new Promise((t=>setTimeout(t,10)));this[_n("0x1c")]=!0;try{if(t=this[_n("0x5d")](),0===t[_n("0x49")])return{};t.forEach((t=>{const e=this[_n("0x58")](t);this[_n("0x1d")].set(e,t)}))}finally{this[_n("0x1c")]=!1}}else if(t=this.popAllEvents(),0===t[_n("0x49")])return{};const e={};e[_n("0x5e")]=this[_n("0x16")][_n("0x4b")](),e[_n("0x5f")]=this.identityManager[_n("0x2b")](),e.userId=this.identityManager.getUserId(),e[_n("0x60")]=this[_n("0x25")]?er:tr,e.events=t;try{const{keyIdentifier:t}=await this.cryptoBinding[_n("0x61")]();e.keyIdentifier=t}catch(t){Me.warn(_n("0x62")+t)}this[_n("0x18")]&&(e[_n("0x63")]=!0);try{const r=await this[_n("0x64")](e,!0),o=await this[_n("0x17")].getRotationData();let i;o&&(i=[{type:Mn,data:o[_n("0x65")],signature:o[_n("0x66")]}]);const a=await this[_n("0x15")][_n("0x67")](_n("0x68"),n(n({},r),i?{headers:i}:{}));if(a[_n("0x69")]){const t=a[_n("0x69")][_n("0x6a")]((t=>t.type===Nn));t&&t[_n("0x3e")]&&this[_n("0x17")][_n("0x6b")](t[_n("0x3e")])}return a[_n("0x5f")]&&this.identityManager[_n("0x6c")](a[_n("0x5f")]),a.sessionToken&&this.identityManager[_n("0x6d")](a[_n("0x63")]),a.userId&&this[_n("0x16")][_n("0x6e")](a.userId),this.pendingQueueEnabled?(t[_n("0x5b")]((t=>{Dn.includes(t[_n("0x2a")])&&a[_n("0x6f")]&&this[_n("0x3a")](t,a[_n("0x6f")])})),this[_n("0x70")](t),t.forEach((t=>{const e=this[_n("0x58")](t);this.processingEvents[_n("0x38")](e)}))):this.cleanLocalStorageEvents(),a}catch(e){throw this[_n("0xf")]&&t[_n("0x5b")]((t=>{const e=this.generateEventIdentifier(t);this[_n("0x1d")][_n("0x38")](e)})),e}}async buildEncryptedRequestBody(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this[_n("0x10")][_n("0x11")](In,null);if(null===r&&e)return await this[_n("0x10")][_n("0x71")](this[_n("0x16")].getClientId()),await this[_n("0x64")](t);if(null===r)throw new dn(new Error(_n("0x72")),un[_n("0x73")]);try{const e=JSON.stringify(t),n=this[_n("0x74")](e),o=n||e,{encryptedData:i,encryptedKey:a}=await this[_n("0x75")][_n("0x76")](r,o);return{data:i,key:a,dataType:n?Zr[_n("0x77")]:Zr[_n("0x78")]}}catch(t){throw new dn(t,un[_n("0x79")])}}[_n("0x74")](t){try{return ge(t)}catch(t){Me[_n("0x4f")](_n("0x7a"),{clientId:this[_n("0x16")][_n("0x4b")](),error:t})}}[_n("0x40")](){if(null===this[_n("0x1a")]){const t=this[_n("0x13")][_n("0x7b")](bn),e=Number[_n("0x7c")](t);this[_n("0x1a")]=Number.isNaN(e)?-1:e}return this[_n("0x1a")]++,this[_n("0x13")].setItemLocalStorageSafe(bn,this[_n("0x1a")][_n("0x41")]()),this[_n("0x1a")]}shouldSendDeviceEvent(){const t=this.storageManager[_n("0x7b")](vn),e=this[_n("0x13")][_n("0x7b")](En);return!t||!e||Date[_n("0x37")]()-t>864e5||e!=this[_n("0x16")][_n("0x2b")]()}async[_n("0x53")](t){if(!t&&!this.shouldSendDeviceEvent())return Me.info("no need to send device event"),!1;const e=await this[_n("0x14")].getDeviceData(),r={type:$e[_n("0x7d")],attributes:e},n=await this[_n("0x3f")](r);return n&&(this[_n("0x13")][_n("0x7e")](vn,Date.now()),this.storageManager[_n("0x7e")](En,this[_n("0x16")].getDeviceId())),n}async[_n("0x7f")](){const t=_n("0x80");if(this[_n("0x10")][_n("0x11")](xn,[])[_n("0x3b")](t))return!1;const e=this[_n("0x81")]();return await this[_n("0x3f")]({type:$e.EVENT_TYPE_INTERACTION,attributes:n(n({interaction_type:t,location:window[_n("0x82")][_n("0x83")],referrer:document[_n("0x84")]},window[_n("0x85")]&&{window_historyLength:window[_n("0x85")][_n("0x49")]}),e&&{windowResources:e})}),!0}[_n("0x81")](){try{const t=window.performance.getEntriesByType(_n("0x86"));return t&&Array.isArray(t)?t[_n("0x87")]((t=>({name:t[_n("0x88")],initiatorType:t[_n("0x89")]}))):void 0}catch(t){}}[_n("0x8a")](){"lightweight"===this[_n("0x19")]?Me[_n("0x47")](_n("0x8b")):this[_n("0x24")][_n("0x8a")](),this.identityManager[_n("0x8a")]()}async[_n("0x8c")](){if(this[_n("0x19")]!==_n("0x46"))throw new Error(_n("0x8d"));let t;Me[_n("0x47")](_n("0x8e"));try{t=await this[_n("0x14")][_n("0x8f")]()}catch(t){throw Me[_n("0x4f")](_n("0x90"),{error:t}),new Error(_n("0x90"))}const e=[{type:$e[_n("0x7d")],attributes:t,timestamp:Date[_n("0x37")](),index:this.increaseEventIndex(),location:location[_n("0x41")](),platform:navigator[_n("0x42")],sdkVersion:"2.0.1",serverPath:this[_n("0x43")],tabId:this[_n("0x16")][_n("0x44")]()}],r={clientId:this.identityManager.getClientId(),deviceId:this[_n("0x16")][_n("0x2b")](),userId:this[_n("0x16")][_n("0x2c")](),sdkPlatform:this[_n("0x25")]?er:tr,events:e};return Me[_n("0x47")](_n("0x91"),{totalEvents:e[_n("0x49")]}),r}async[_n("0x92")](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("lightweight"!==this[_n("0x19")])throw new Error("[Lightweight] getPayloadWithAction() can only be called in lightweight mode");Me[_n("0x47")](_n("0x93"),{actionType:t});const r={type:$e.EVENT_TYPE_ACTION,attributes:n({action_type:t},e),timestamp:Date.now(),index:this[_n("0x40")](),location:location[_n("0x41")](),platform:navigator.platform,sdkVersion:"2.0.1",serverPath:this.serverPath,tabId:this.identityManager[_n("0x44")]()},o=await this.deviceDataManager[_n("0x8f")](),i=[r,{type:$e[_n("0x7d")],attributes:o,timestamp:Date[_n("0x37")](),index:this[_n("0x40")](),location:location.toString(),platform:navigator.platform,sdkVersion:"2.0.1",serverPath:this.serverPath,tabId:this.identityManager[_n("0x44")]()}],a={clientId:this[_n("0x16")][_n("0x4b")](),deviceId:this[_n("0x16")].getDeviceId(),userId:this.identityManager.getUserId(),sdkPlatform:this[_n("0x25")]?er:tr,events:i};return Me[_n("0x47")]("[Lightweight] Payload built successfully",{actionType:t,totalEvents:i[_n("0x49")]}),a}getAllQueuedEvents(){return[...this[_n("0x23")],...this[_n("0x5a")]()][_n("0x5c")](((t,e)=>(t.timestamp||0)-(e[_n("0x2d")]||0)))}[_n("0x94")](){this[_n("0x19")]===_n("0x46")?(this[_n("0x23")]=[],this.storageManager.removeItemLocalStorageSafe(An),Me[_n("0x47")](_n("0x97"))):Me[_n("0x95")](_n("0x96"))}[_n("0x5a")](){const t=this[_n("0x13")][_n("0x7b")](An);if(!t)return[];try{return JSON.parse(t)}catch(t){return Me.error(_n("0x98"),{error:t}),[]}}addEventToLocalStorage(t){const e=this.fetchEventsFromLocalStorage();return fr[_n("0x99")](e,this[_n("0x27")],t),this[_n("0x13")].setItemLocalStorageSafe(An,JSON[_n("0x9a")](e)),e[_n("0x49")]}[_n("0x9b")](){this[_n("0x13")][_n("0x9c")](An)}[_n("0x70")](t){if(0===t.length)return;const e=this[_n("0x5a")]();if(!e||0===e.length)return;const r=new Set;for(const e of t)r[_n("0x9d")](this.generateEventIdentifier(e));const n=e[_n("0x9e")]((t=>!r[_n("0x29")](this[_n("0x58")](t))));n[_n("0x49")]!==e.length&&(n[_n("0x49")]>0?this[_n("0x13")][_n("0x7e")](An,JSON.stringify(n)):this[_n("0x13")].removeItemLocalStorageSafe(An))}}var Pn,Bn,Fn=["getPublicData","RS256","JWT","stringify","base64ToBase64Url","error","Failed to generate secure session token:","isTokenExpired","parse","iat","exp","rui","rci","rdi","rdit","rti","rst","userIdStorageExpiry","1.0","configManager","clientId","cryptoBinding","setCryptoBinding","load","loadDeviceId","addEventListener","beforeunload","saveTabIdOnUnload","getDeviceId","setDeviceId","deviceId","info","Updating DeviceId","setItemSessionStorageSafe","setItemLocalStorageSafe","storageManager","getItemSessionStorageSafe","getClientId","setClientId","getUserId","getConfValue","now","removeUserId","getItemLocalStorageSafe","setUserId","userId","removeItemSessionStorageSafe","loadTabId","tabId","floor","random","toString","getSessionToken","getSecureSessionToken","expirationSeconds","CryptoBinding not available for secure session token generation","warn","No backend session token available"];Pn=Fn,Bn=127,function(t){for(;--t;)Pn.push(Pn.shift())}(++Bn);var Ln=function(t,e){return Fn[t-=0]};const zn=Ln("0x0"),Un=Ln("0x1"),Vn=Ln("0x2"),Hn=Ln("0x3"),jn=Ln("0x4"),Gn=Ln("0x5"),Wn=Ln("0x6"),Xn=Ln("0x7");class Yn{constructor(t,e,r){this.storageManager=t,this[Ln("0x8")]=e,this[Ln("0x9")]=r,this[Ln("0xa")]=null,this.setClientId(this[Ln("0x9")])}[Ln("0xb")](t){this[Ln("0xa")]=t}[Ln("0xc")](){this[Ln("0xd")](),this.loadTabId()}registerEventListeners(){window[Ln("0xe")](Ln("0xf"),(async()=>this[Ln("0x10")]()))}[Ln("0x11")](){return this.deviceId}[Ln("0x12")](t){this[Ln("0x13")]!==t&&(Me[Ln("0x14")](Ln("0x15"),{deviceId:t}),this[Ln("0x13")]=t,this.storageManager[Ln("0x16")](Vn,t),this.storageManager[Ln("0x17")](Vn,t))}[Ln("0xd")](){const t=this[Ln("0x18")][Ln("0x19")](Vn)||this[Ln("0x18")].getItemLocalStorageSafe(Vn);return null!=t&&this[Ln("0x12")](t),t}[Ln("0x1a")](){return this[Ln("0x9")]}setClientId(t){this[Ln("0x18")][Ln("0x1a")]()!=t&&this.storageManager[Ln("0x1b")](t),this[Ln("0x18")].setItemSessionStorageSafe(Un,t)}[Ln("0x1c")](){if(Number(this[Ln("0x18")].getItemLocalStorageSafe(Hn))+this.configManager[Ln("0x1d")](Wn,864e5)<Date[Ln("0x1e")]())return this[Ln("0x1f")](),null;const t=this.storageManager[Ln("0x19")](zn);return null!=t?t:this[Ln("0x18")][Ln("0x20")](zn)}[Ln("0x21")](t){this[Ln("0x22")]=t,this[Ln("0x18")].setItemSessionStorageSafe(zn,t),this[Ln("0x18")].setItemLocalStorageSafe(zn,t),this[Ln("0x18")][Ln("0x17")](Hn,Date[Ln("0x1e")]())}[Ln("0x1f")](){this[Ln("0x18")][Ln("0x23")](zn),this[Ln("0x18")].removeItemLocalStorageSafe(zn),this.storageManager.removeItemLocalStorageSafe(Hn)}[Ln("0x24")](){const t=this[Ln("0x18")].getItemSessionStorageSafe(jn);t?(this.storageManager[Ln("0x23")](jn),this[Ln("0x25")]=t):this[Ln("0x25")]=Math[Ln("0x26")](Math[Ln("0x27")]()*Number.MAX_SAFE_INTEGER)[Ln("0x28")]()}getTabId(){return this.tabId}[Ln("0x10")](){this[Ln("0x18")][Ln("0x16")](jn,this[Ln("0x25")])}setSessionToken(t){this[Ln("0x18")][Ln("0x17")](Gn,t)}[Ln("0x29")](){return this[Ln("0x18")][Ln("0x20")](Gn)||this[Ln("0x18")][Ln("0x19")](Gn)}async[Ln("0x2a")](t){var e,r;const o=null!==(e=null==t?void 0:t.actionType)&&void 0!==e?e:null,i=null!==(r=null==t?void 0:t[Ln("0x2b")])&&void 0!==r?r:300;if(!this.cryptoBinding)return Me.warn(Ln("0x2c")),null;const a=this[Ln("0x29")]();if(!a)return Me[Ln("0x2d")](Ln("0x2e")),null;try{const{publicKey:t}=await this.cryptoBinding[Ln("0x2f")](),e=Math[Ln("0x26")](Date[Ln("0x1e")]()/1e3),r=e+i,s=n({backendSessionToken:a,securedToken:!0,version:Xn,clientParams:{clientId:this[Ln("0x1a")](),deviceId:this[Ln("0x11")](),userId:this[Ln("0x1c")]()},iat:e,exp:r,publicKey:t},o&&{actionType:o}),u={alg:Ln("0x30"),typ:Ln("0x31")},c=fr.base64UrlEncode(JSON[Ln("0x32")](u))+"."+fr.base64UrlEncode(JSON[Ln("0x32")](s)),l=await this.cryptoBinding.sign(c);return c+"."+fr[Ln("0x33")](l)}catch(t){return Me[Ln("0x34")](Ln("0x35"),{error:t}),null}}[Ln("0x36")](){var t;const e=this[Ln("0x29")]();if(!e)return!0;try{const r=JSON[Ln("0x37")](atob(e.split(".")[1]));let n=(null!==(t=r.exp)&&void 0!==t?t:r[Ln("0x38")])*(r[Ln("0x39")]&&r[Ln("0x39")]<1e12?1e3:1);return r[Ln("0x39")]||(n+=9e5),Date.now()>=n}catch(t){return Me[Ln("0x34")]("Invalid JWT:",{error:t}),!0}}}var Zn,qn,Kn=["fetch-api is not supported","json","message","statusText","SERVER","status","COMMUNICATION","serverPath","postData","postDataFromURL","POST","include","application/json","stringify","getData","GET","callServer"];Zn=Kn,qn=279,function(t){for(;--t;)Zn.push(Zn.shift())}(++qn);var $n=function(t,e){return Kn[t-=0]};class Qn{constructor(t){this[$n("0x0")]=t}async[$n("0x1")](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this[$n("0x2")](this.serverPath+t,e,r)}async postDataFromURL(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={method:$n("0x3"),credentials:$n("0x4"),headers:new Headers(n({"Content-Type":$n("0x5")},r)),body:JSON[$n("0x6")](e)};return await this.callServer(t,o)}async[$n("0x7")](t){const e=this[$n("0x0")]+t,r={method:$n("0x8"),credentials:$n("0x4")};return await this[$n("0x9")](e,r)}async[$n("0x9")](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!("fetch"in window))throw new dn(new Error($n("0xa")),un.CLIENT);try{const r=await fetch(t,e),n=await r[$n("0xb")]();if(r.ok)return n;throw new dn(new Error(n[$n("0xc")]||r[$n("0xd")]),un[$n("0xe")],r[$n("0xf")])}catch(t){if(!(t instanceof dn))throw new dn(new Error(t.message),un[$n("0x10")]);throw t}}}var Jn,to,eo=["info","keys","filter","options","serverPath","string","push","length","Invalid SDK params was provided: ","stringify","REQUIRED_SDK_PARAMS","throwOrReturnResult","logIfInvalid"];Jn=eo,to=361,function(t){for(;--t;)Jn.push(Jn.shift())}(++to);var ro=function(t,e){return eo[t-=0]};class no{constructor(){this[ro("0x0")]={clientId:"string"}}[ro("0x1")](t,e,r){if(!t&&((null==e?void 0:e[ro("0x2")])&&Me[ro("0x3")](r),null==e?void 0:e.throwError))throw new Error(r);return t}validateSDKParams(t,e){var r,n;const o=Object[ro("0x4")](this.REQUIRED_SDK_PARAMS)[ro("0x5")]((e=>typeof t[e]!=this.REQUIRED_SDK_PARAMS[e])),i=null!==(n=null===(r=t[ro("0x6")])||void 0===r?void 0:r[ro("0x7")])&&void 0!==n?n:t[ro("0x7")];return typeof i===ro("0x8")&&i||o[ro("0x9")](ro("0x7")),this[ro("0x1")](0==o[ro("0xa")],e,ro("0xb")+JSON[ro("0xc")](o))}}var oo,io,ao=["enableLogsReporting","logsMinimumBatch","logsMinimumDelay","logs","now","flush","getClientId","floor","platform","postData","device/logs","identityManager","configManager","lastTimeLogsSent","logMiddleware","reportLogs","middlewares","push","getConfValue"];oo=ao,io=220,function(t){for(;--t;)oo.push(oo.shift())}(++io);var so=function(t,e){return ao[t-=0]};class uo{constructor(t,e,r){this.requestsManager=t,this[so("0x0")]=e,this[so("0x1")]=r,this[so("0x2")]=0,this[so("0x3")]=async()=>{try{await this[so("0x4")]()}catch(t){}},Me[so("0x5")][so("0x6")](this[so("0x3")])}async[so("0x4")](){if(!this[so("0x1")][so("0x7")](so("0x8"),!1))return;const t=this[so("0x1")][so("0x7")](so("0x9"),6),e=this.configManager[so("0x7")](so("0xa"),12e4);if(Me[so("0xb")].length<t||this[so("0x2")]+e>Date[so("0xc")]())return;this[so("0x2")]=Date[so("0xc")]();const r=Me[so("0xd")](),n=this[so("0x0")][so("0xe")](),o=Math[so("0xf")](Date[so("0xc")]()/1e3),i={sdkVersion:"2.0.1",platform:navigator[so("0x10")],clientId:n,timestamp:o,logEntries:r};await this.requestsManager[so("0x11")](so("0x12"),i)}}var co,lo,ho=["deviceId","setItemLocalStorageSafe","rimd","identityManager","requestsManager","migrateIdentifiers","storageManager","getItemLocalStorageSafe","true","getClientId","endsWith","device/migrate-identifiers","postDataFromURL"];co=ho,lo=210,function(t){for(;--t;)co.push(co.shift())}(++lo);var fo=function(t,e){return ho[t-=0]};const po=fo("0x0");class go{constructor(t,e,r){this[fo("0x1")]=t,this[fo("0x2")]=e,this.storageManager=r}async[fo("0x3")](t){if(this[fo("0x4")][fo("0x5")](po)!=fo("0x6")){const e=this[fo("0x1")].getDeviceId(),r=this[fo("0x1")][fo("0x7")](),n=(t[fo("0x8")]("/")?t:t+"/")+fo("0x9"),o=await this.requestsManager[fo("0xa")](n,{deviceId:e,clientId:r});o[fo("0xb")]&&o[fo("0xb")]==e&&this.storageManager[fo("0xc")](po,fo("0x6"))}}}var mo,wo,yo=["EVENT_TYPE_ACTION","claimedUserId","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","transactionData","customAttributes","Unhandled SDK error. Received eventResponse: ","errorSpace","errorCode","message","_error_","unexpected_error_","[Lightweight] identifyUser() cannot be used in lightweight tier.","identifyUser called without a valid userid","identifyUser","getUserId","emitEvent","EVENT_TYPE_IDENTIFICATION","deviceId","clearUser","unidentifiedUser","[Lightweight] unidentifiedUser() cannot be used in lightweight tier.","removeUserId","getSecureSessionToken","RiskID","TSAccountProtection","dispatchEvent","RiskIDReady","TSAccountProtectionReady","undefined","sdkEnabled","verbose","enableDeviceAttributesInActions","actions","email","phone_number","ssn","national_id","passport_number","other","initializationPromise","disabledReason","enableSessionToken","identifiersMigrationEnabled","tier","standard","validationManager","initializedInstance","SDK already initialized","clientId","options","serverPath","string","trim","serverPath is required","firstPartyMigrationUrl","lightweight","[Lightweight] SDK initialized in lightweight mode","enabled","validateSDKParams","invalid_params","mainEntry","storageManager","requestsManager","configManager","identityManager","load","hasOwnClientId","logsReporter","generateDisabledToken","now","disabled_sdk_","unknown","getActions","Session token is not enabled","SDK disabled","session","isTokenExpired","eventsManager","refreshSessionToken","[Lightweight] getPayload() can only be used in lightweight tier","getPayload","[Lightweight] clearQueue() can only be used in lightweight tier","clearQueue","init","object","userId","info","sdk init started","refreshConf","getConfValue","keyRotation","isEnabled","expiryDays","startedAt","fallbackClientId","createCryptoBinding","keys","length","deviceDataManager","cryptoBinding","missing_config","config_disabled","catch","sendPageLoadEvent","updateUserId","registerEventListeners","flush","sdk init done","init_not_called","init_failed","triggerActionEvent","[Lightweight] triggerActionEvent() cannot be used in lightweight tier. Use getPayload() instead.","isInitialized","action","includes","CLIENT","claimedUserIdType","warn","invalid_claimed_user_id_type_","getDeviceData"];mo=yo,wo=156,function(t){for(;--t;)mo.push(mo.shift())}(++wo);var _o=function(t,e){return yo[t-=0]};const vo=[null,void 0,_o("0x0"),"",0],Eo=_o("0x1"),bo=_o("0x2"),Ao=_o("0x3"),Co=_o("0x4"),xo=[_o("0x5"),_o("0x6"),"account_id",_o("0x7"),_o("0x8"),_o("0x9"),"drivers_license_number",_o("0xa")];class Io{constructor(t,e){if(this[_o("0xb")]=null,this[_o("0xc")]=null,this[_o("0xd")]=!1,this[_o("0xe")]=!1,this.firstPartyMigrationUrl=null,this.hasOwnClientId=!1,this[_o("0xf")]=_o("0x10"),this[_o("0x11")]=new no,Io[_o("0x12")])throw new Error(_o("0x13"));Io[_o("0x12")]=!0;const r="string"==typeof e;if(this[_o("0x14")]=r?e:t,this.options=r?{serverPath:t}:e,!this[_o("0x15")]||typeof this[_o("0x15")][_o("0x16")]!==_o("0x17")||!this[_o("0x15")].serverPath[_o("0x18")]())throw new Error(_o("0x19"));this[_o("0x15")][_o("0x16")]=new URL(this.options[_o("0x16")]).toString(),this[_o("0x1a")]=this[_o("0x15")][_o("0x1a")]||null,this[_o("0xf")]=this.options[_o("0xf")]||_o("0x10"),this[_o("0xf")]===_o("0x1b")&&Me.info(_o("0x1c"),{serverPath:this[_o("0x15")][_o("0x16")]}),Me[_o("0x1d")]=!!this[_o("0x15")][_o("0x2")],this.validationManager[_o("0x1e")](this,{throwError:!0,logIfInvalid:!0})||(this[_o("0xc")]=_o("0x1f")),this[_o("0x21")]=new Ie(this[_o("0x14")]),this[_o("0x22")]=new Qn(this[_o("0x15")][_o("0x16")]),this[_o("0x23")]=new ur(this[_o("0x21")],this.requestsManager),this[_o("0x24")]=new Yn(this.storageManager,this[_o("0x23")],this[_o("0x14")]),this[_o("0x24")][_o("0x25")](),this.migrationsManager=new go(this[_o("0x24")],this[_o("0x22")],this[_o("0x21")]),this.enableSessionToken=this[_o("0x15")].enableSessionToken||!1,this[_o("0x26")]=this[_o("0x15")][_o("0x26")]||!1,this[_o("0x27")]=new uo(this[_o("0x22")],this.identityManager,this[_o("0x23")])}[_o("0x28")](t){const e=Date[_o("0x29")]();return _o("0x2a")+(this[_o("0xc")]||_o("0x2b"))+"_"+t+"_"+e}get[_o("0x4")](){return this[_o("0x23")].getConfValue(Co,[])}async[_o("0x2c")](){return await this.isInitialized(),this[_o("0x4")]}async getSessionToken(){if("lightweight"===this[_o("0xf")])throw new Error("[Lightweight] getSessionToken() cannot be used in lightweight tier. Session tokens are not supported in lightweight mode.");if(!this[_o("0xd")])throw new Error(_o("0x2d"));return await this.isInitialized()?(this[_o("0x24")][_o("0x30")]()&&await this[_o("0x31")][_o("0x32")](),this[_o("0x24")].getSessionToken()):(Me.info(_o("0x2e")),this[_o("0x28")](_o("0x2f")))}async getPayload(){if(this.tier!==_o("0x1b"))throw new Error(_o("0x33"));return await this.isInitialized(),await this.eventsManager[_o("0x34")]()}clearQueue(){if(this[_o("0xf")]!==_o("0x1b"))throw new Error(_o("0x35"));this[_o("0x31")][_o("0x36")]()}async[_o("0x37")](t){const e=typeof t!==_o("0x38")?t:null==t?void 0:t[_o("0x39")];return Me[_o("0x3a")](_o("0x3b")),this[_o("0xb")]=(async()=>{await this[_o("0x23")][_o("0x3c")](this.identityManager.getClientId());const t=this[_o("0x23")].getConfValue("tenantId",null),r=this[_o("0x23")][_o("0x3d")](_o("0x3e"),null),n={};if((null==r?void 0:r[_o("0x3f")])&&(n[_o("0x3e")]={isEnabled:!0,expiryDays:r[_o("0x40")],startedAt:r[_o("0x41")],tenantId:t}),this[_o("0x26")]&&(n[_o("0x42")]=this[_o("0x14")]),this.cryptoBinding=Ae.crypto[_o("0x43")]("sign",Object[_o("0x44")](n)[_o("0x45")]>0?n:void 0),this[_o("0x24")].setCryptoBinding(this.cryptoBinding),this[_o("0x46")]=new Xe(this[_o("0x21")],this[_o("0x23")],this[_o("0x47")]),this[_o("0x31")]=new kn(this[_o("0x23")],this[_o("0x21")],this[_o("0x46")],this[_o("0x22")],this[_o("0x24")],this[_o("0x47")],this[_o("0x15")].serverPath,this[_o("0xd")],this.tier),null!==this[_o("0xc")])return!1;const o=this[_o("0x23")][_o("0x3d")](Eo,void 0);return o?(this[_o("0xe")]=this[_o("0xe")]||this[_o("0x23")].getConfValue("enableIdentifiersMigration",!1),this[_o("0xe")]&&this[_o("0x1a")]&&await this.migrationsManager.migrateIdentifiers(this[_o("0x1a")]),Me[_o("0x1d")]=Me[_o("0x1d")]||!!this[_o("0x23")][_o("0x3d")](bo,!1),this[_o("0xf")]!==_o("0x1b")?(await this.eventsManager.sendDeviceDataEvent()[_o("0x4a")]((()=>{})),await this[_o("0x31")][_o("0x4b")]()[_o("0x4a")]((()=>{})),await this[_o("0x4c")](e)[_o("0x4a")]((()=>{})),this[_o("0x31")][_o("0x4d")](),await this.eventsManager[_o("0x4e")]().catch((()=>{}))):Me.info("[Lightweight] Skipping auto-event collection and event listeners"),Me[_o("0x3a")](_o("0x4f")),!0):(this[_o("0xc")]=_o(void 0===o?"0x48":"0x49"),!1)})(),await this[_o("0xb")]}async isInitialized(){if(null===this.initializationPromise)return this.disabledReason||(this[_o("0xc")]=_o("0x50")),!1;const t=await this[_o("0xb")];return t||this[_o("0xc")]||(this[_o("0xc")]=_o("0x51")),t}async[_o("0x52")](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("lightweight"===this[_o("0xf")])throw new Error(_o("0x53"));const r=Date[_o("0x29")]();if(!await this[_o("0x54")]())return Me[_o("0x3a")](_o("0x2e")),{actionToken:this.generateDisabledToken(_o("0x55"))};if(!this[_o("0x4")][_o("0x56")](t))return Me.warn("Invalid action type",{actionType:t}),{actionToken:un[_o("0x57")]+"_error_'invalid action type - "+t+"'_"+r};const o=null==e?void 0:e[_o("0x58")];if(o&&!xo[_o("0x56")](o))return Me[_o("0x59")]("Invalid claimedUserIdType",{claimedUserIdType:o}),{actionToken:_o("0x5a")+o+"_"+r};let i;this.configManager.getConfValue(Ao,!1)&&(i=await this[_o("0x46")][_o("0x5b")]());const a=n({type:$e[_o("0x5c")],attributes:n(n(n(n(n(n(n(n(n(n(n(n(n({action_type:t},(null==e?void 0:e.correlationId)&&{correlation_id:e.correlationId}),(null==e?void 0:e.claimedUserId)&&{claimed_user_id:e[_o("0x5d")]}),o&&{claimed_user_id_type:o}),(null==e?void 0:e.publicKey)&&{public_key:e.publicKey}),(null==e?void 0:e[_o("0x5e")])&&{extension_metadata:e[_o("0x5e")]}),(null==e?void 0:e[_o("0x5f")])&&{extension_device_attributes:e.extensionDeviceAttributes}),(null==e?void 0:e[_o("0x60")])&&{suspicious_signals:e[_o("0x60")]}),(null==e?void 0:e[_o("0x61")])&&{suspicious_context:e[_o("0x61")]}),(null==e?void 0:e.downloadFile)&&{download_file:e[_o("0x62")]}),(null==e?void 0:e.uploadFile)&&{upload_file:e.uploadFile}),(null==e?void 0:e[_o("0x63")])&&{transactionData:e[_o("0x63")]}),"undefined"!=typeof PACKAGE_VERSION&&{platform_sdk_version:PACKAGE_VERSION}),i)},(null==e?void 0:e.customAttributes)&&{customAttributes:e[_o("0x64")]});try{const t=await this[_o("0x31")].emitEvent(a),{actionToken:e}=t;if(!e)throw new dn(new Error(_o("0x65")+(typeof t==_o("0x38")?JSON.stringify(t).slice(15):t)),un[_o("0x57")]);return t}catch(e){return{actionToken:e instanceof dn?e[_o("0x66")]===un.SERVER?e[_o("0x66")]+"_error_"+t+"_"+e[_o("0x67")]+"_'"+e[_o("0x68")]+"'_"+r:e[_o("0x66")]+_o("0x69")+t+"_'"+e[_o("0x68")]+"'_"+r:_o("0x6a")+t+"_"+r}}}async identifyUser(t){if(this[_o("0xf")]===_o("0x1b"))throw new Error(_o("0x6b"));return await this.isInitialized()?this.updateUserId(t):(Me.info(_o("0x2e")),!1)}async[_o("0x4c")](t){if(vo[_o("0x56")](t))return Me.info(_o("0x6c"),{userId:t}),!1;t=t.toString(),Me[_o("0x3a")](_o("0x6d"),{userId:t});const e=this.identityManager[_o("0x6e")]();return e===t||(this[_o("0x24")].setUserId(t),!!(await this[_o("0x31")][_o("0x6f")]({type:$e[_o("0x70")],attributes:{previous_user_id:e,user_id:t}}))[_o("0x71")])}async setAuthenticatedUser(t){return await this[_o("0x54")]()?this[_o("0x4c")](t):(Me.info("SDK disabled"),!1)}async[_o("0x72")](){if(!await this[_o("0x54")]())return Me[_o("0x3a")](_o("0x2e")),!1;const t=this.identityManager[_o("0x6e")]();return null!=t&&this.identityManager.removeUserId(),!!(await this.eventsManager.emitEvent({type:$e.EVENT_TYPE_IDENTIFICATION,attributes:{previous_user_id:t}})).deviceId}async[_o("0x73")](){if("lightweight"===this[_o("0xf")])throw new Error(_o("0x74"));if(!await this.isInitialized())return Me[_o("0x3a")](_o("0x2e")),!1;const t=this.identityManager.getUserId();return null!=t&&this.identityManager[_o("0x75")](),!!(await this.eventsManager[_o("0x6f")]({type:$e[_o("0x70")],attributes:{previous_user_id:t}}))[_o("0x71")]}async[_o("0x76")](){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;if(!this[_o("0xd")])throw new Error("Session token is not enabled");return await this[_o("0x54")]()?(this[_o("0x24")][_o("0x30")]()&&await this.eventsManager[_o("0x32")](),await this[_o("0x24")][_o("0x76")]({actionType:t,expirationSeconds:e})||this[_o("0x28")](_o("0x2f"))):(Me[_o("0x3a")](_o("0x2e")),this[_o("0x28")](_o("0x2f")))}}Io[_o("0x12")]=!1,document[_o("0x79")](new CustomEvent(_o("0x7b")));var So,To,Do=["not_initialized","tsPlatform not initialized","triggerActionEvent","clearUser","getPayload","identityManager","getClientId","flush","events","MODULE_INITIALIZED","getInitConfig","clientId","init","utils","TsError"];So=Do,To=353,function(t){for(;--t;)So.push(So.shift())}(++To);var Oo=function(t,e){return Do[t-=0]};let Ro=null;Ae[Oo("0x0")].on(Ae[Oo("0x0")][Oo("0x1")],(()=>{const{clientId:t,drs:e}=Ae.moduleMetadata[Oo("0x2")](),r=e||{},{enabled:o,userId:i,serverPath:s}=r,u=a(r,me);if(!1===o)return;const c=(null==e?void 0:e[Oo("0x3")])||t,l=!!(null==e?void 0:e[Oo("0x3")]);Ro=new Io(c,n(n({},u),{},{hasOwnClientId:l,serverPath:s})),Ro[Oo("0x4")]({userId:i})}));const Mo=function(){return function(t){if(!t)throw new(Ae[Oo("0x5")].exceptions[Oo("0x6")])(Oo("0x7"),Oo("0x8"))}(Ro),Ro.getSessionToken()};class No extends Error{constructor(t,e,r){super(r),this.name="ApiError",this.url=e.url,this.status=e.status,this.statusText=e.statusText,this.body=e.body,this.request=t}}const ko={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 Po,Bo,Fo,Lo;!function(t){var e;(e=t.feedback||(t.feedback={})).OK="ok",e.OTHER="other",e.DOCUMENT_NOT_FOUND="document_not_found",e.FACE_NOT_FOUND="face_not_found",e.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",e.OBSTRUCTED="obstructed",e.BLUR="blur",e.GLARE="glare",e.DOCUMENT_NOT_SUPPORTED="document_not_supported",e.DOCUMENT_NOT_MATCHING="document_not_matching",e.WRONG_DOCUMENT_SIDE="wrong_document_side",e.MULTI_FACE="multi_face",e.FACE_ROTATED="face_rotated",e.FACE_TOO_SMALL="face_too_small",e.FACE_TOO_CLOSE="face_too_close",e.CLOSED_EYES="closed_eyes",e.FACE_ANGLE_TOO_LARGE="face_angle_too_large",e.FACE_CLOSE_TO_BORDER="face_close_to_border",e.FACE_OCCLUDED="face_occluded",e.FACE_CROPPED="face_cropped",e.BARCODE_NOT_FOUND="barcode_not_found",e.GLARE_SELFIE="glare_selfie",e.BLUR_SELFIE="blur_selfie",e.RESTRICTED_CRITERIA="restricted_criteria",e.UNCLASSIFIABLE="unclassifiable"}(Po||(Po={})),function(t){var e;(e=t.image_type||(t.image_type={})).DOCUMENT_FRONT="document_front",e.DOCUMENT_BACK="document_back",e.SELFIE="selfie"}(Bo||(Bo={})),function(t){var e,r;(e=t.status||(t.status={})).PENDING="pending",e.CAPTURING="capturing",e.PROCESSING="processing",e.RECAPTURE="recapture",e.COMPLETE="complete",e.ERROR="error",e.EXPIRED="expired",(r=t.recapture_reason||(t.recapture_reason={})).IMAGE_MISSING="image_missing",r.DOCUMENT_EXPIRED="document_expired",r.DOCUMENT_NOT_SUPPORTED="document_not_supported",r.DOCUMENT_DAMAGED="document_damaged",r.POOR_IMAGE_QUALITY="poor_image_quality",r.DOCUMENT_NOT_FOUND="document_not_found",r.OBSTRUCTED="obstructed",r.BLUR="blur",r.GLARE="glare",r.DOCUMENT_NOT_MATCHING="document_not_matching",r.WRONG_DOCUMENT_SIDE="wrong_document_side",r.FACE_NOT_FOUND="face_not_found",r.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",r.INVALID_INPUT="invalid_input",r.MULTI_FACE="multi_face",r.FACE_ROTATED="face_rotated",r.FACE_TOO_SMALL="face_too_small",r.FACE_TOO_CLOSE="face_too_close",r.CLOSED_EYES="closed_eyes",r.FACE_ANGLE_TOO_LARGE="face_angle_too_large",r.FACE_CLOSE_TO_BORDER="face_close_to_border",r.FACE_OCCLUDED="face_occluded",r.FACE_CROPPED="face_cropped",r.BARCODE_NOT_FOUND="barcode_not_found",r.GLARE_SELFIE="glare_selfie",r.BLUR_SELFIE="blur_selfie",r.NO_FACE="no_face",r.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(Fo||(Fo={})),function(t){var e;(e=t.client_type||(t.client_type={})).HOSTED_APP="hosted_app",e.MOBILE_SDK="mobile_sdk"}(Lo||(Lo={}));var zo={},Uo={get exports(){return zo},set exports(t){zo=t}};!function(t,e){!function(r,n){var o="function",i="undefined",a="object",s="string",u="major",c="model",l="name",d="type",h="vendor",f="version",p="architecture",g="console",m="mobile",w="tablet",y="smarttv",_="wearable",v="embedded",E="Amazon",b="Apple",A="ASUS",C="BlackBerry",x="Browser",I="Chrome",S="Firefox",T="Google",D="Huawei",O="LG",R="Microsoft",M="Motorola",N="Opera",k="Samsung",P="Sharp",B="Sony",F="Xiaomi",L="Zebra",z="Facebook",U="Chromium OS",V="Mac OS",H=" Browser",j=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},G=function(t,e){return typeof t===s&&-1!==W(e).indexOf(W(t))},W=function(t){return t.toLowerCase()},X=function(t,e){if(typeof t===s)return t=t.replace(/^\s\s*/,""),typeof e===i?t:t.substring(0,500)},Y=function(t,e){for(var r,i,s,u,c,l,d=0;d<e.length&&!c;){var h=e[d],f=e[d+1];for(r=i=0;r<h.length&&!c&&h[r];)if(c=h[r++].exec(t))for(s=0;s<f.length;s++)l=c[++i],typeof(u=f[s])===a&&u.length>0?2===u.length?typeof u[1]==o?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==o||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):n:this[u[0]]=l?u[1].call(this,l,u[2]):n:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):n):this[u]=l||n;d+=2}},Z=function(t,e){for(var r in e)if(typeof e[r]===a&&e[r].length>0){for(var o=0;o<e[r].length;o++)if(G(e[r][o],t))return"?"===r?n:r}else if(G(e[r],t))return"?"===r?n:r;return e.hasOwnProperty("*")?e["*"]:t},q={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"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,N+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[l,N+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[l,N]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[l,"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],[l,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[l,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],f],[/\bfocus\/([\w\.]+)/i],[f,[l,S+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[f,[l,S]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360"+H]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+H],f],[/samsungbrowser\/([\w\.]+)/i],[f,[l,k+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,z],f],[/(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],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,I+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,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],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/(wolvic)\/([\w\.]+)/i],[l,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,S+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,W]],[/((?: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/,"",W]],[/(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,W]]],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],[c,[h,k],[d,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,k],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,b],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,b],[d,w]],[/(macintosh);/i],[c,[h,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,P],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,D],[d,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,D],[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],[[c,/_/g," "],[h,F],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,F],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[h,"OPPO"],[d,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[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],[c,[h,M],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,M],[d,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,O],[d,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,O],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,T],[d,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,T],[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],[c,[h,B],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,B],[d,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,E],[d,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,E],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,C],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,A],[d,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,A],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/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],[c,[h,"TCL"],[d,w]],[/(itel) ((\w+))/i],[[h,W],c,[d,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[h,"Ulefone"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[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,c,[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,c,[d,w]],[/(surface duo)/i],[c,[h,R],[d,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,w]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,w]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,w]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,w]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,w]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,w]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,w]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,w]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,w]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,R],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,L],[d,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,L],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,y]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,k],[d,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,O],[d,y]],[/(apple) ?tv/i],[h,[c,b+" TV"],[d,y]],[/crkey/i],[[c,I+"cast"],[h,T],[d,y]],[/droid.+aft(\w+)( bui|\))/i],[c,[h,E],[d,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,P],[d,y]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,B],[d,y]],[/(mitv-\w{5}) bui/i],[c,[h,F],[d,y]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,X],[c,X],[d,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,g]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[h,B],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,R],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[h,k],[d,_]],[/((pebble))app/i],[h,c,[d,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,b],[d,_]],[/droid.+; (glass) \d/i],[c,[h,T],[d,_]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,L],[d,_]],[/(quest( \d| pro)?)/i],[c,[h,z],[d,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,v]],[/(aeobc)\b/i],[c,[h,E],[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"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],[l,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[f,Z,q]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Z,q],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,V],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,f],[/\(bb(10);/i],[f,[l,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,S+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[l,I+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,U],f],[/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],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,f]]},$=function t(e,g){if(typeof e===a&&(g=e,e=n),!(this instanceof t))return new t(e,g).getResult();var y=typeof r!==i&&r.navigator?r.navigator:n,_=e||(y&&y.userAgent?y.userAgent:""),v=y&&y.userAgentData?y.userAgentData:n,E=g?function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r}(K,g):K,b=y&&y.userAgent==_;return this.getBrowser=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,_,E.browser),t[u]=function(t){return typeof t===s?t.replace(/[^\d\.]/g,"").split(".")[0]:n}(t[f]),b&&y&&y.brave&&typeof y.brave.isBrave==o&&(t[l]="Brave"),t},this.getCPU=function(){var t={};return t[p]=n,Y.call(t,_,E.cpu),t},this.getDevice=function(){var t={};return t[h]=n,t[c]=n,t[d]=n,Y.call(t,_,E.device),b&&!t[d]&&v&&v.mobile&&(t[d]=m),b&&"Macintosh"==t[c]&&y&&typeof y.standalone!==i&&y.maxTouchPoints&&y.maxTouchPoints>2&&(t[c]="iPad",t[d]=w),t},this.getEngine=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,_,E.engine),t},this.getOS=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,_,E.os),b&&!t[l]&&v&&v.platform&&"Unknown"!=v.platform&&(t[l]=v.platform.replace(/chrome os/i,U).replace(/macos/i,V)),t},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 _},this.setUA=function(t){return _=typeof t===s&&t.length>500?X(t,500):t,this},this.setUA(_),this};$.VERSION="1.0.39",$.BROWSER=j([l,f,u]),$.CPU=j([p]),$.DEVICE=j([c,h,d,g,m,y,w,_,v]),$.ENGINE=$.OS=j([l,f]),t.exports&&(e=t.exports=$),e.UAParser=$;var Q=typeof r!==i&&(r.jQuery||r.Zepto);if(Q&&!Q.ua){var J=new $;Q.ua=J.getResult(),Q.ua.get=function(){return J.getUA()},Q.ua.set=function(t){J.setUA(t);var e=J.getResult();for(var r in e)Q.ua[r]=e[r]}}}("object"==typeof window?window:s)}(Uo,zo);const Vo="1.4.21",Ho=zo.UAParser(),jo=Vo;function Go(t,e){var r,n,o,i,a;return{Authorization:`Bearer ${e}`,"ts-sdk-version":jo,"ts-client-id":t,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(r=null==Ho?void 0:Ho.os)||void 0===r?void 0:r.name,"ts-os-version":null===(n=null==Ho?void 0:Ho.os)||void 0===n?void 0:n.version,"ts-device-model":null===(o=null==Ho?void 0:Ho.device)||void 0===o?void 0:o.model,"ts-manufacturer":null===(i=null==Ho?void 0:Ho.device)||void 0===i?void 0:i.vendor,"ts-browser":null===(a=null==Ho?void 0:Ho.browser)||void 0===a?void 0:a.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var Wo="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Xo=[],Yo=[],Zo="undefined"!=typeof Uint8Array?Uint8Array:Array,qo=!1;function Ko(){qo=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)Xo[e]=t[e],Yo[t.charCodeAt(e)]=e;Yo["-".charCodeAt(0)]=62,Yo["_".charCodeAt(0)]=63}function $o(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Xo[(o=n)>>18&63]+Xo[o>>12&63]+Xo[o>>6&63]+Xo[63&o]);return i.join("")}function Qo(t){var e;qo||Ko();for(var r=t.length,n=r%3,o="",i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push($o(t,s,s+a>u?u:s+a));return 1===n?(e=t[r-1],o+=Xo[e>>2],o+=Xo[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=Xo[e>>10],o+=Xo[e>>4&63],o+=Xo[e<<2&63],o+="="),i.push(o),i.join("")}function Jo(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?o-1:0,h=r?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+t[e+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+d],d+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)}function ti(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(e*u-1)*Math.pow(2,o),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[r+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*g}var ei={}.toString,ri=Array.isArray||function(t){return"[object Array]"==ei.call(t)};function ni(){return ii.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function oi(t,e){if(ni()<e)throw new RangeError("Invalid typed array length");return ii.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=ii.prototype:(null===t&&(t=new ii(e)),t.length=e),t}function ii(t,e,r){if(!(ii.TYPED_ARRAY_SUPPORT||this instanceof ii))return new ii(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return ui(this,t)}return ai(this,t,e,r)}function ai(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);ii.TYPED_ARRAY_SUPPORT?(t=e).__proto__=ii.prototype:t=ci(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!ii.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|hi(e,r);t=oi(t,n);var o=t.write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(di(e)){var r=0|li(e.length);return 0===(t=oi(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?oi(t,0):ci(t,e);if("Buffer"===e.type&&ri(e.data))return ci(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function si(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function ui(t,e){if(si(e),t=oi(t,e<0?0:0|li(e)),!ii.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function ci(t,e){var r=e.length<0?0:0|li(e.length);t=oi(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function li(t){if(t>=ni())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ni().toString(16)+" bytes");return 0|t}function di(t){return!(null==t||!t._isBuffer)}function hi(t,e){if(di(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return zi(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ui(t).length;default:if(n)return zi(t).length;e=(""+e).toLowerCase(),n=!0}}function fi(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Ti(this,e,r);case"utf8":case"utf-8":return Ci(this,e,r);case"ascii":return Ii(this,e,r);case"latin1":case"binary":return Si(this,e,r);case"base64":return Ai(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Di(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function pi(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function gi(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=ii.from(e,n)),di(e))return 0===e.length?-1:mi(t,e,r,n,o);if("number"==typeof e)return e&=255,ii.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):mi(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function mi(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var d=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){d=!1;break}if(d)return i}return-1}function wi(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function yi(t,e,r,n){return Vi(zi(e,t.length-r),t,r,n)}function _i(t,e,r,n){return Vi(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function vi(t,e,r,n){return _i(t,e,r,n)}function Ei(t,e,r,n){return Vi(Ui(e),t,r,n)}function bi(t,e,r,n){return Vi(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function Ai(t,e,r){return 0===e&&r===t.length?Qo(t):Qo(t.slice(e,r))}function Ci(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,c=t[o],l=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=d}return function(t){var e=t.length;if(e<=xi)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=xi));return r}(n)}ii.TYPED_ARRAY_SUPPORT=void 0===Wo.TYPED_ARRAY_SUPPORT||Wo.TYPED_ARRAY_SUPPORT,ni(),ii.poolSize=8192,ii._augment=function(t){return t.__proto__=ii.prototype,t},ii.from=function(t,e,r){return ai(null,t,e,r)},ii.TYPED_ARRAY_SUPPORT&&(ii.prototype.__proto__=Uint8Array.prototype,ii.__proto__=Uint8Array),ii.alloc=function(t,e,r){return function(t,e,r,n){return si(e),e<=0?oi(t,e):void 0!==r?"string"==typeof n?oi(t,e).fill(r,n):oi(t,e).fill(r):oi(t,e)}(null,t,e,r)},ii.allocUnsafe=function(t){return ui(null,t)},ii.allocUnsafeSlow=function(t){return ui(null,t)},ii.isBuffer=function(t){return null!=t&&(!!t._isBuffer||Hi(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Hi(t.slice(0,0))}(t))},ii.compare=function(t,e){if(!di(t)||!di(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},ii.isEncoding=function(t){switch(String(t).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}},ii.concat=function(t,e){if(!ri(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return ii.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=ii.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!di(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},ii.byteLength=hi,ii.prototype._isBuffer=!0,ii.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)pi(this,e,e+1);return this},ii.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)pi(this,e,e+3),pi(this,e+1,e+2);return this},ii.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)pi(this,e,e+7),pi(this,e+1,e+6),pi(this,e+2,e+5),pi(this,e+3,e+4);return this},ii.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Ci(this,0,t):fi.apply(this,arguments)},ii.prototype.equals=function(t){if(!di(t))throw new TypeError("Argument must be a Buffer");return this===t||0===ii.compare(this,t)},ii.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},ii.prototype.compare=function(t,e,r,n,o){if(!di(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(n,o),c=t.slice(e,r),l=0;l<s;++l)if(u[l]!==c[l]){i=u[l],a=c[l];break}return i<a?-1:a<i?1:0},ii.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},ii.prototype.indexOf=function(t,e,r){return gi(this,t,e,r,!0)},ii.prototype.lastIndexOf=function(t,e,r){return gi(this,t,e,r,!1)},ii.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return wi(this,t,e,r);case"utf8":case"utf-8":return yi(this,t,e,r);case"ascii":return _i(this,t,e,r);case"latin1":case"binary":return vi(this,t,e,r);case"base64":return Ei(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bi(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},ii.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var xi=4096;function Ii(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function Si(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function Ti(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=Li(t[i]);return o}function Di(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function Oi(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function Ri(t,e,r,n,o,i){if(!di(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Mi(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function Ni(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function ki(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Pi(t,e,r,n,o){return o||ki(t,0,r,4),ti(t,e,r,n,23,4),r+4}function Bi(t,e,r,n,o){return o||ki(t,0,r,8),ti(t,e,r,n,52,8),r+8}ii.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),ii.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=ii.prototype;else{var o=e-t;r=new ii(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},ii.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||Oi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},ii.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||Oi(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},ii.prototype.readUInt8=function(t,e){return e||Oi(t,1,this.length),this[t]},ii.prototype.readUInt16LE=function(t,e){return e||Oi(t,2,this.length),this[t]|this[t+1]<<8},ii.prototype.readUInt16BE=function(t,e){return e||Oi(t,2,this.length),this[t]<<8|this[t+1]},ii.prototype.readUInt32LE=function(t,e){return e||Oi(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},ii.prototype.readUInt32BE=function(t,e){return e||Oi(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},ii.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||Oi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},ii.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||Oi(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},ii.prototype.readInt8=function(t,e){return e||Oi(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},ii.prototype.readInt16LE=function(t,e){e||Oi(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},ii.prototype.readInt16BE=function(t,e){e||Oi(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},ii.prototype.readInt32LE=function(t,e){return e||Oi(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},ii.prototype.readInt32BE=function(t,e){return e||Oi(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},ii.prototype.readFloatLE=function(t,e){return e||Oi(t,4,this.length),Jo(this,t,!0,23,4)},ii.prototype.readFloatBE=function(t,e){return e||Oi(t,4,this.length),Jo(this,t,!1,23,4)},ii.prototype.readDoubleLE=function(t,e){return e||Oi(t,8,this.length),Jo(this,t,!0,52,8)},ii.prototype.readDoubleBE=function(t,e){return e||Oi(t,8,this.length),Jo(this,t,!1,52,8)},ii.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Ri(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},ii.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Ri(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},ii.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,1,255,0),ii.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},ii.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,2,65535,0),ii.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Mi(this,t,e,!0),e+2},ii.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,2,65535,0),ii.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Mi(this,t,e,!1),e+2},ii.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,4,4294967295,0),ii.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):Ni(this,t,e,!0),e+4},ii.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,4,4294967295,0),ii.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Ni(this,t,e,!1),e+4},ii.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);Ri(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},ii.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);Ri(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},ii.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,1,127,-128),ii.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},ii.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,2,32767,-32768),ii.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Mi(this,t,e,!0),e+2},ii.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,2,32767,-32768),ii.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Mi(this,t,e,!1),e+2},ii.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,4,2147483647,-2147483648),ii.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Ni(this,t,e,!0),e+4},ii.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||Ri(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),ii.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Ni(this,t,e,!1),e+4},ii.prototype.writeFloatLE=function(t,e,r){return Pi(this,t,e,!0,r)},ii.prototype.writeFloatBE=function(t,e,r){return Pi(this,t,e,!1,r)},ii.prototype.writeDoubleLE=function(t,e,r){return Bi(this,t,e,!0,r)},ii.prototype.writeDoubleBE=function(t,e,r){return Bi(this,t,e,!1,r)},ii.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!ii.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},ii.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!ii.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=di(t)?t:zi(new ii(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var Fi=/[^+\/0-9A-Za-z-_]/g;function Li(t){return t<16?"0"+t.toString(16):t.toString(16)}function zi(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Ui(t){return function(t){var e,r,n,o,i,a;qo||Ko();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new Zo(3*s/4-i),n=i>0?s-4:s;var u=0;for(e=0,r=0;e<n;e+=4,r+=3)o=Yo[t.charCodeAt(e)]<<18|Yo[t.charCodeAt(e+1)]<<12|Yo[t.charCodeAt(e+2)]<<6|Yo[t.charCodeAt(e+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=Yo[t.charCodeAt(e)]<<2|Yo[t.charCodeAt(e+1)]>>4,a[u++]=255&o):1===i&&(o=Yo[t.charCodeAt(e)]<<10|Yo[t.charCodeAt(e+1)]<<4|Yo[t.charCodeAt(e+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Fi,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Vi(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Hi(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}const ji=t=>null!=t,Gi=t=>"string"==typeof t,Wi=t=>Gi(t)&&""!==t,Xi=t=>"object"==typeof t&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.arrayBuffer&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),Yi=t=>t instanceof FormData,Zi=t=>{const e=[],r=(t,n)=>{ji(n)&&(Array.isArray(n)?n.forEach((e=>{r(t,e)})):"object"==typeof n?Object.entries(n).forEach((e=>{let[n,o]=e;r(`${t}[${n}]`,o)})):((t,r)=>{e.push(`${encodeURIComponent(t)}=${encodeURIComponent(String(r))}`)})(t,n))};return Object.entries(t).forEach((t=>{let[e,n]=t;r(e,n)})),e.length>0?`?${e.join("&")}`:""},qi=async(t,e)=>"function"==typeof e?e(t):e,Ki=async(t,e)=>{const r=await qi(e,t.TOKEN),o=await qi(e,t.USERNAME),i=await qi(e,t.PASSWORD),a=await qi(e,t.HEADERS),s=Object.entries(n(n({Accept:"application/json"},a),e.headers)).filter((t=>{let[e,r]=t;return ji(r)})).reduce(((t,e)=>{let[r,o]=e;return n(n({},t),{},{[r]:String(o)})}),{});if(Wi(r)&&(s.Authorization=`Bearer ${r}`),Wi(o)&&Wi(i)){const t=(t=>{try{return btoa(t)}catch(e){return ii.from(t).toString("base64")}})(`${o}:${i}`);s.Authorization=`Basic ${t}`}return e.body&&(e.mediaType?s["Content-Type"]=e.mediaType:Xi(e.body)?s["Content-Type"]=e.body.type||"application/octet-stream":Gi(e.body)?s["Content-Type"]="text/plain":Yi(e.body)||(s["Content-Type"]="application/json")),new Headers(s)},$i=(t,e)=>new Promise((async(r,o)=>{try{const o=((t,e)=>{const r=t.ENCODE_PATH||encodeURI,n=null==e?void 0:e.url.replace("{api-version}",t.VERSION).replace(/{(.*?)}/g,((t,n)=>{var o;return(null===(o=null==e?void 0:e.path)||void 0===o?void 0:o.hasOwnProperty(n))?r(String(e.path[n])):t})),o=`${t.BASE}${n}`;return e.query?`${o}${Zi(e.query)}`:o})(t,e),i=(t=>{if(t.formData){const e=new FormData,r=(t,r)=>{Gi(r)||Xi(r)?e.append(t,r):e.append(t,JSON.stringify(r))};return Object.entries(t.formData).filter((t=>{let[e,r]=t;return ji(r)})).forEach((t=>{let[e,n]=t;Array.isArray(n)?n.forEach((t=>r(e,t))):r(e,n)})),e}})(e),a=(t=>{var e;if(void 0!==t.body)return(null===(e=t.mediaType)||void 0===e?void 0:e.includes("/json"))?JSON.stringify(t.body):Gi(t.body)||Xi(t.body)||Yi(t.body)?t.body:JSON.stringify(t.body)})(e),s=await Ki(t,e),u=await(async(t,e,r,n,o,i)=>{const a=new AbortController,s={headers:i,body:null!=n?n:o,method:e.method,signal:a.signal};return t.WITH_CREDENTIALS&&(s.credentials=t.CREDENTIALS),await fetch(r,s)})(t,e,o,a,i,s),c=await(async t=>{if(204!==t.status)try{const e=t.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some((t=>e.toLowerCase().startsWith(t)))?await t.json():await t.text()}catch(t){console.error(t)}})(u),l=((t,e)=>{if(e){const r=t.headers.get(e);if(Gi(r))return r}})(u,e.responseHeader),d={url:o,ok:u.ok,status:u.status,statusText:u.statusText,headers:u.headers,body:null!=l?l:c};((t,e)=>{var r,o;const i=n({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(i)throw new No(t,e,i);if(!e.ok){const n=null!==(r=e.status)&&void 0!==r?r:"unknown",i=null!==(o=e.statusText)&&void 0!==o?o:"unknown",a=(()=>{try{return JSON.stringify(e.body,null,2)}catch(t){return}})();throw new No(t,e,`Generic Error: status: ${n}; status text: ${i}; body: ${a}`)}})(e,d),r(d)}catch(t){o(t)}})),Qi=new t("idv"),Ji=Symbol(),ta=Symbol(),ea="verify-id-sdk";function ra(t){return sessionStorage.getItem(t)}const na=new Map;function oa(t,e){const r=na.get(t);Qi.events.emit(r,e)}function ia(t){oa(Ji,t)}function aa(t,e,r,n,o){ia({type:"verification-result",status:e,step:t,state:n,callbackUrl:o,sessionId:r})}function sa(t,e){ia({type:"capture-error",errorCode:e,step:t})}function ua(t,e,r){ia({type:"api-request-error",errorCode:e,step:t,error:r})}function ca(t,e){return $i(ko,t).catch((r=>(t.url.endsWith("/events")||ua(e,"request-error",r.message),Promise.reject(r))))}async function la(t){var e;ko.HEADERS=Go(t);const r=await function(t){return ca({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${t}`},"init")}(t);return{autocapture_settings:null!==(e=r.body.autocapture_settings)&&void 0!==e?e:void 0,autocapture_enabled:r.body.autocapture_enabled,strings:r.body.strings}}na.set(Ji,Ji),na.set(ta,ta);var da={setStep(t,e){t.commit("setStep",e)},setSessionId(t,e){t.commit("setSessionId",e)},setIsCapturingProcessStarted(t,e){t.commit("setIsCapturingProcessStarted",e)},setServerPath(t,e){t.commit("setServerPath",e)},setStartToken(t,e){t.commit("setStartToken",e)},setRootElement(t,e){t.commit("setRootElement",e)},setLanguage(t,e){t.commit("setLanguage",e)},setCallback(t,e){t.commit("setCallback",e)},setUserToken(t,e){t.commit("setUserToken",e)},setConsentVersion(t,e){t.commit("setConsentVersion",e)},setMissingImages(t,e){t.commit("setMissingImages",e)},setClientId(t,e){t.commit("setClientId",e)},setStatus(t,e){t.commit("setStatus",e)},setMarkdownSupportText(t,e){t.commit("setMarkdownSupportText",e)},setVideoCaptureSettings(t,e){t.commit("setVideoCaptureSettings",e)},setCdnHost(t,e){t.commit("setCdnHost",e)},setIsImageSigningEnabled(t,e){t.commit("setIsImageSigningEnabled",e)},setAutoCaptureSettings(t,e){t.commit("setAutoCaptureSettings",e)}},ha={setStep:(t,e)=>(t.step=e,t),setSessionId:(t,e)=>(t.sessionId=e,t),setIsCapturingProcessStarted:(t,e)=>(t.isCapturingProcessStarted=e,t),setServerPath:(t,e)=>(t.serverPath=e,t),setStartToken:(t,e)=>(t.startToken=e,t),setRootElement:(t,e)=>(t.rootElementId=e,t),setLanguage:(t,e)=>(t.language=e,t),setCallback:(t,e)=>(t.callback=e,t),setUserToken:(t,e)=>(t.userToken=e,t),setConsentVersion:(t,e)=>(t.consentVersion=e,t),setMissingImages:(t,e)=>(t.missingImages=e,t),setClientId:(t,e)=>(t.clientId=e,t),setStatus:(t,e)=>(t.verificationStatus=e,t),setMarkdownSupportText:(t,e)=>(t.markdownSupportText=e,t),setVideoCaptureSettings:(t,e)=>(t.videoCaptureSettings=e,t),setCdnHost:(t,e)=>(t.cdnHost=e,t),setIsImageSigningEnabled:(t,e)=>(t.isImageSigningEnabled=e,t),setAutoCaptureSettings:(t,e)=>(t.autoCaptureSettings=e,t)};const fa=new class{constructor(t){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(t,"actions")&&(this.actions=t.actions),Object.prototype.hasOwnProperty.call(t,"mutations")&&(this.mutations=t.mutations);const e=this;this.state=new Proxy(t.state||{},{get:function(t,e){return t[e]},set:function(t,r,n){return t[r]=n,oa(ta,{key:r,state:t}),"mutation"!==e.status&&console.warn(`You should use a mutation to set ${String(r)}`),e.status="resting",!0}})}dispatch(t,e){return"function"!=typeof this.actions[t]?(console.error(`Action "${t} doesn't exist.`),!1):(this.status="action",this.actions[t](this,e),!0)}commit(t,e){if("function"!=typeof this.mutations[t])return console.info(`Mutation "${t}" doesn't exist`),!1;this.status="mutation";const r=this.mutations[t](this.state,e);return this.state=r,!0}}({actions:da,mutations:ha,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var pa;function ga(t){const e=[],r=function(t){var e,r,n,o;const i=t.stats.get(pa.BLUR_DETECTION),a=t.stats.get(pa.GLARE_DETECTION);if(!i&&!a||0===(null==i?void 0:i.durations.length)&&0===(null==a?void 0:a.durations.length))return;const s=ya(null!==(e=null==i?void 0:i.durations)&&void 0!==e?e:null==a?void 0:a.durations),u=i&&a?Math.min(i.countSuccess,a.countSuccess):null!==(r=null==i?void 0:i.countSuccess)&&void 0!==r?r:null==a?void 0:a.countSuccess;return{name:wa(pa.BLUR_DETECTION),count_success:u,count_failure_glare:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(o=null==i?void 0:i.countFailed)&&void 0!==o?o:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(t);r&&e.push(r);for(const[r,n]of t.stats.entries())r!==pa.BLUR_DETECTION&&r!==pa.GLARE_DETECTION&&n.durations.length>0&&e.push(ma(n,r));return t.frameHandleDurations.length>0&&e.push(function(t){const e=ya(t.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(t.stableCounts.reduce(((t,e)=>t+e),0)/t.stableCounts.length),avg_duration:e.duration_avg,std_duration:e.duration_std}}(t)),e}function ma(t,e){const r=ya(t.durations);return{name:wa(e),count_success:t.countSuccess,count_failure:t.countFailed,avg_duration:r.duration_avg,std_duration:r.duration_std}}function wa(t){switch(t){case pa.BLUR_DETECTION:case pa.GLARE_DETECTION:return"blur_glare_detector";case pa.DOCUMENT_DETECTION:return"doc_detector";case pa.DOCUMENT_POSITION:return"doc_frame_detector";case pa.BARCODE_DETECTION:return"barcode_detector";case pa.FACE_DETECTION:return"face_detector";case pa.FACE_POSITION:return"face_frame_detector";default:return t}}function ya(t){var e;if(t.length<2)return{duration_avg:null!==(e=t[0])&&void 0!==e?e:0,duration_std:0};const r=t.length,n=t.reduce(((t,e)=>t+e),0)/r;let o=0;for(let e=0;e<r;e++){const r=t[e];o+=Math.pow(r-n,2)}const i=Math.sqrt(o/(r-1));return{duration_avg:Math.round(n),duration_std:Math.round(i)}}!function(t){t.DOCUMENT_DETECTION="document_detection",t.DOCUMENT_POSITION="document_position",t.GLARE_DETECTION="glare_detection",t.BLUR_DETECTION="blur_detection",t.BARCODE_DETECTION="barcode_detection",t.FACE_DETECTION="face_detection",t.FACE_POSITION="face_position"}(pa||(pa={}));const _a=new class{createUploadImageEvent(t,e,r,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:t,request_total_time_ms:String(e),request_processing_time_ms:String(r),request_build_time_ms:String(n)}}}createPageViewEvent(t){return{event_type:"page_view",page_view_req:{page_name:t}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(t,e){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(t),model_stats:this.convertModelStats(e)}}}convertModelStats(t){return t.map((t=>({model_name:t.modelName,init_duration:Math.round(t.initDuration),download_duration:Math.round(t.downloadDuration)})))}createUserActionEvent(t,e,r){var n,o,i;const a={user_action_type:t,page_name:e,autocapture:!!r,autocapture_enabled:null!==(i=null===(o=null===(n=fa.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&void 0!==i&&i};if(r){const t=ga(r);a.stats=t}return{event_type:"user_action",user_action_req:a}}createErrorEvent(t,e,r){return{event_type:"error",error_req:{error_name:e,error_description:t,step:r}}}createCameraNotAllowedEvent(t,e){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:t,step:e}}}createDrsInitFailureEvent(t,e){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:t,step:e}}}};async function va(t,e,r,n,o){r?(ko.HEADERS=Go(n,e),await function(t,e,r){return ca({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${t}/events`,path:{sid:t},body:e},r)}(r,o,t)):console.error("cannot send event, sessionId or startToken is not set")}const Ea=new class{handelEventData(t){if("session-id-acquired"===t.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const t=`${ko.BASE}/verify/api/v1/verification/${fa.state.sessionId}/risk-session-token`,e=fa.state.clientId,r=Go(e,fa.state.userToken);Mo().then((e=>{Qi.http.httpPost(t,{session_token:e},null,r).catch((e=>{throw console.log("unable to send session token to IDV",t),console.error(e),e}))})).catch((e=>{var r,n,o,i;console.log("unable to get session token from DRS",t),console.error(e);const a=(null==e?void 0:e.message)||"failed to initialize DRS",s=_a.createDrsInitFailureEvent(a,"init");va(null===(r=fa.state)||void 0===r?void 0:r.step,null===(n=fa.state)||void 0===n?void 0:n.userToken,null===(o=fa.state)||void 0===o?void 0:o.sessionId,null===(i=fa.state)||void 0===i?void 0:i.clientId,s).then((()=>{ia({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(t){throw console.log("Error sending risk session token"),console.error(t),t}}};async function ba(t,e,r){const n=_a.createErrorEvent(t,e,r);await Aa(r,n)}async function Aa(t,e){var r,n,o,i,a;const s=null===(r=fa.state)||void 0===r?void 0:r.userToken,u=(null===(n=fa.state)||void 0===n?void 0:n.sessionId)||(null===(o=fa.state)||void 0===o?void 0:o.startToken),c=null===(i=fa.state)||void 0===i?void 0:i.clientId,l=(null===(a=fa.state)||void 0===a?void 0:a.step)||t;await va(l,s,u,c,e)}const Ca=function(){var t,e;(null===(e=null===(t=fa.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===e?void 0:e.debug)&&console.log(...arguments)},xa={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",approve_button:"Approve",retake_button:"Retake"};const Ia=new class{constructor(t){this.translations=t,this.translations=new Proxy(this.translations,{get:function(t,e){return t[e]},set:function(t,e,r){return t[e]=r,!0}})}overrideLanguage(t){Object.assign(this.translations,t)}translate(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let o=this.translations[t];return o||(o=t),o.replace(/{(\d+)}/g,(function(t,e){return void 0!==r[e]?r[e]:t}))}}(xa),Sa={en:xa,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",approve_button:"Aprobar",retake_button:"Volver a tomar"},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",approve_button:"Aprovar",retake_button:"Tirar novamente"},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",approve_button:"Approuver",retake_button:"Reprendre"}};var Ta;!function(t){t.DOCUMENT_DETECTOR="document_detector",t.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",t.FACE_LANDMARK="face_landmark"}(Ta||(Ta={}));var Da,Oa,Ra=(Da=function(t,e){return Da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Da(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Da(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Ma=function(t){function e(e,r){var n,o,i,a=this.constructor,s=t.call(this,e,r)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),n=s,o=a.prototype,(i=Object.setPrototypeOf)?i(n,o):n.__proto__=o,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(s),s}return Ra(e,t),e}(Error),Na=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ka=function(t){function e(e){void 0===e&&(e=void 0);var r=t.call(this,e)||this;return r.message=e,r}return Na(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(Ma),Pa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ba=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Pa(e,t),e.kind="ArgumentException",e}(ka),Fa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),La=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fa(e,t),e.kind="IllegalArgumentException",e}(ka),za=function(){function t(t){if(this.binarizer=t,null===t)throw new La("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,o){var i=this.binarizer.getLuminanceSource().crop(e,r,n,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),Ua=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ua(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(ka),Ha=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),ja=function(){function t(){}return t.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Ga=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ga(e,t),e.kind="IndexOutOfBoundsException",e}(ka),Xa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ya=function(t){function e(e,r){void 0===e&&(e=void 0),void 0===r&&(r=void 0);var n=t.call(this,r)||this;return n.index=e,n.message=r,n}return Xa(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(Wa),Za=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qa=function(){function t(){}return t.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},t.fillWithin=function(e,r,n,o){t.rangeCheck(e.length,r,n);for(var i=r;i<n;i++)e[i]=o},t.rangeCheck=function(t,e,r){if(e>r)throw new La("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new Ya(e);if(r>t)throw new Ya(r)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,r){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(r)}))},t.createInt32Array=function(t,e,r){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(r)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){var e,r;if(null===t)return 0;var n=1;try{for(var o=Za(t),i=o.next();!i.done;i=o.next()){n=31*n+i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},t.copyOfRange=function(t,e,r){var n=r-e,o=new Int32Array(n);return ja.arraycopy(t,e,o,0,n),o},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=n(r,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Ka=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!==(e=t<<16)&&(r-=16,t=e),0!==(e=t<<8)&&(r-=8,t=e),0!==(e=t<<4)&&(r-=4,t=e),0!==(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),$a=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);ja.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var a=32*n+Ka.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var a=32*n+Ka.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new La;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,i=r;i<=n;i++){var a=(2<<(i<n?31:31&e))-(1<<(i>r?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new La;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=n;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>n?0:31&t))&4294967295;if((i[a]&s)!==(r?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new La("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new La("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[r+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var i=n[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*r){var a=32*r-this.size,s=t[0]>>>a;for(o=1;o<r;o++){var u=t[o];s|=u<<32-a,t[o-1]=s,s=u>>>a}t[r-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&qa.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+qa.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)0==(7&e)&&(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t.prototype.toArray=function(){for(var t=[],e=0,r=this.size;e<r;e++)t.push(this.get(e));return t},t}();!function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ENABLE_CODE_39_EXTENDED_MODE=7]="ENABLE_CODE_39_EXTENDED_MODE",t[t.ASSUME_GS1=8]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=9]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=10]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=11]="ALLOWED_EAN_EXTENSIONS"}(Oa||(Oa={}));var Qa,Ja=Oa,ts=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),es=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ts(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(ka),rs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(Qa||(Qa={}));var ns,os=function(){function t(e,r,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var u=this.values,c=0,l=u.length;c!==l;c++){var d=u[c];t.VALUES_TO_ECI.set(d,this)}try{for(var h=rs(a),f=h.next();!f.done;f=h.next()){var p=f.value;t.NAME_TO_ECI.set(p,this)}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new es("incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new es("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new es("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(Qa.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(Qa.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(Qa.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(Qa.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(Qa.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(Qa.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(Qa.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(Qa.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(Qa.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(Qa.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(Qa.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(Qa.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(Qa.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(Qa.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(Qa.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(Qa.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(Qa.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(Qa.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(Qa.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(Qa.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(Qa.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(Qa.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(Qa.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(Qa.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(Qa.Big5,28,"Big5"),t.GB18030=new t(Qa.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(Qa.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),is=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),as=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return is(e,t),e.kind="UnsupportedOperationException",e}(ka),ss=function(){function t(){}return t.decode=function(t,e){var r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof os?t:os.getCharacterSetECIByName(t)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(os.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new as("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(os.UTF8)||t.equals(os.ISO8859_1)||t.equals(os.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),r=[],n=0;n<e.length;n++)r.push(e[n].charCodeAt(0));return new Uint8Array(r)},t}(),us=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var r=e?e.getName():this.ISO88591;return ss.decode(new Uint8Array([t]),r)},t.guessEncoding=function(e,r){if(null!=r&&void 0!==r.get(Ja.CHARACTER_SET))return r.get(Ja.CHARACTER_SET).toString();for(var n=e.length,o=!0,i=!0,a=!0,s=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,g=0,m=0,w=0,y=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],_=0;_<n&&(o||i||a);_++){var v=255&e[_];a&&(s>0?0==(128&v)?a=!1:s--:0!=(128&v)&&(0==(64&v)?a=!1:(s++,0==(32&v)?u++:(s++,0==(16&v)?c++:(s++,0==(8&v)?l++:a=!1))))),o&&(v>127&&v<160?o=!1:v>159&&(v<192||215===v||247===v)&&w++),i&&(d>0?v<64||127===v||v>252?i=!1:d--:128===v||160===v||v>239?i=!1:v>160&&v<224?(h++,p=0,++f>g&&(g=f)):v>127?(d++,f=0,++p>m&&(m=p)):(f=0,p=0))}return a&&s>0&&(a=!1),i&&d>0&&(i=!1),a&&(y||u+c+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===h||10*w>=n?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=-1;function o(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[n];break;case"c":u=e[n][0];break;case"f":u=parseFloat(e[n]).toFixed(t);break;case"p":u=parseFloat(e[n]).toPrecision(t);break;case"e":u=parseFloat(e[n]).toExponential(t);break;case"x":u=parseInt(e[n]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[n],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==r?u+d:d+u;return u}}var i=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return t.replace(i,o)},t.getBytes=function(t,e){return ss.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=os.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=os.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=os.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),cs=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=us.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,r){for(var n=e;e<e+r;n++)this.append(t[n]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substring(0,t)+e+this.value.substring(t)},t}(),ls=function(){function t(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new La("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,o=new t(n,r),i=0;i<r;i++)for(var a=e[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,r,n){if(null===e)throw new La("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,u=0,c=0;c<e.length;)if("\n"===e.charAt(c)||"\r"===e.charAt(c)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new La("row lengths do not match");a=i,u++}c++}else if(e.substring(c,c+r.length)===r)c+=r.length,o[i]=!0,i++;else{if(e.substring(c,c+n.length)!==n)throw new La("illegal character encountered: "+e.substring(c));c+=n.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new La("row lengths do not match");u++}for(var l=new t(s,u),d=0;d<i;d++)o[d]&&l.set(Math.floor(d%s),Math.floor(d/s));return l},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return 0!=(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new La("input matrix dimensions do not match");for(var e=new $a(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*r,s=t.getRow(o,e).getBitArray(),u=0;u<r;u++)n[a+u]^=s[u]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new La("Left and top must be nonnegative");if(n<1||r<1)throw new La("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new La("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,u=e;u<i;u++)for(var c=u*a,l=t;l<o;l++)s[c+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new $a(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){ja.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new $a(t),n=new $a(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,s=-1,u=0;u<e;u++)for(var c=0;c<r;c++){var l=n[u*r+c];if(0!==l){if(u<i&&(i=u),u>s&&(s=u),32*c<o){for(var d=0;0==(l<<31-d&4294967295);)d++;32*c+d<o&&(o=32*c+d)}if(32*c+31>a){for(d=31;l>>>d==0;)d--;32*c+d>a&&(a=32*c+d)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,i=e[r],a=0;0==(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),i=e[r],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&qa.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+qa.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){for(var n=new cs,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)n.append(this.get(a,o)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),ds=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ds(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(ka),fs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ps=function(t){function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return fs(e,t),e.prototype.getBlackRow=function(t,r){var n=this.getLuminanceSource(),o=n.getWidth();null==r||r.getSize()<o?r=new $a(o):r.clear(),this.initArrays(o);for(var i=n.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<u&&r.set(s);else{var c=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var d=255&i[s+1];(4*l-c-d)/2<u&&r.set(s),c=l,l=d}}return r},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),r=t.getWidth(),n=t.getHeight(),o=new ls(r,n);this.initArrays(r);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(n*a/5),u=t.getRow(s,this.luminances),c=Math.floor(4*r/5),l=Math.floor(r/5);l<c;l++){i[(255&u[l])>>e.LUMINANCE_SHIFT]++}var d=e.estimateBlackPoint(i),h=t.getMatrix();for(a=0;a<n;a++){var f=a*r;for(l=0;l<r;l++){(255&h[f+l])<d&&o.set(l,a)}}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var r=this.buckets,n=0;n<e.LUMINANCE_BUCKETS;n++)r[n]=0},e.estimateBlackPoint=function(t){for(var r=t.length,n=0,o=0,i=0,a=0;a<r;a++)t[a]>i&&(o=a,i=t[a]),t[a]>n&&(n=t[a]);var s=0,u=0;for(a=0;a<r;a++){var c=a-o;(f=t[a]*c*c)>u&&(s=a,u=f)}if(o>s){var l=o;o=s,s=l}if(s-o<=r/16)throw new hs;var d=s-1,h=-1;for(a=s-1;a>o;a--){var f,p=a-o;(f=p*p*(s-a)*(n-t[a]))>h&&(d=a,h=f)}return d<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Ha),gs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ms=function(t){function e(e){var r=t.call(this,e)||this;return r.matrix=null,r}return gs(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),o=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=r.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;0!=(n&e.BLOCK_SIZE_MASK)&&a++;var s=o>>e.BLOCK_SIZE_POWER;0!=(o&e.BLOCK_SIZE_MASK)&&s++;var u=e.calculateBlackPoints(i,a,s,n,o),c=new ls(n,o);e.calculateThresholdForBlock(i,a,s,n,o,u,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,r,n,o,i,a,s){for(var u=i-e.BLOCK_SIZE,c=o-e.BLOCK_SIZE,l=0;l<n;l++){var d=l<<e.BLOCK_SIZE_POWER;d>u&&(d=u);for(var h=e.cap(l,2,n-3),f=0;f<r;f++){var p=f<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var g=e.cap(f,2,r-3),m=0,w=-2;w<=2;w++){var y=a[h+w];m+=y[g-2]+y[g-1]+y[g]+y[g+1]+y[g+2]}var _=m/25;e.thresholdBlock(t,p,d,_,o,s)}}},e.cap=function(t,e,r){return t<e?e:t>r?r:t},e.thresholdBlock=function(t,r,n,o,i,a){for(var s=0,u=n*i+r;s<e.BLOCK_SIZE;s++,u+=i)for(var c=0;c<e.BLOCK_SIZE;c++)(255&t[u+c])<=o&&a.set(r+c,n+s)},e.calculateBlackPoints=function(t,r,n,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,u=new Array(n),c=0;c<n;c++){u[c]=new Int32Array(r);var l=c<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var d=0;d<r;d++){var h=d<<e.BLOCK_SIZE_POWER;h>s&&(h=s);for(var f=0,p=255,g=0,m=0,w=l*o+h;m<e.BLOCK_SIZE;m++,w+=o){for(var y=0;y<e.BLOCK_SIZE;y++){var _=255&t[w+y];f+=_,_<p&&(p=_),_>g&&(g=_)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,w+=o;m<e.BLOCK_SIZE;m++,w+=o)for(y=0;y<e.BLOCK_SIZE;y++)f+=255&t[w+y]}var v=f>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(v=p/2,c>0&&d>0)){var E=(u[c-1][d]+2*u[c][d-1]+u[c-1][d-1])/4;p<E&&(v=E)}u[c][d]=v}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(ps),ws=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,n){throw new as("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new as("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new as("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new cs,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i=255&n[o],a=void 0;a=i<64?"#":i<128?"+":i<192?".":" ",e.append(a)}e.append("\n")}return e.toString()},t}(),ys=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_s=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return ys(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,o){return new e(this.delegate.crop(t,r,n,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(ws),vs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Es=function(t){function e(r,n){void 0===n&&(n=!1);var o=t.call(this,r.width,r.height)||this;return o.canvas=r,o.tempCanvasElement=null,o.buffer=e.makeBufferFromCanvasImageData(r,n),o}return vs(e,t),e.makeBufferFromCanvasImageData=function(t,r){void 0===r&&(r=!1);var n=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height,r)},e.toGrayscaleBuffer=function(t,r,n,o){void 0===o&&(o=!1);var i=new Uint8ClampedArray(r*n);if(e.FRAME_INDEX=!e.FRAME_INDEX,e.FRAME_INDEX||!o)for(var a=0,s=0,u=t.length;a<u;a+=4,s++){var c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=c}else{a=0,s=0;for(var l=t.length;a<l;a+=4,s++){c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=255-c}}return i},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new La("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement(),n=r.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),u=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return r.width=s,r.height=u,n.translate(s/2,u/2),n.rotate(o),n.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new _s(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e.FRAME_INDEX=!0,e}(ws),bs=function(){function t(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),As=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Cs=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},xs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Is=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return As(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return Cs(this,(function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=xs(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return As(this,void 0,void 0,(function(){return Cs(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new bs(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return As(this,void 0,void 0,(function(){var e;return Cs(this,(function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return As(this,void 0,void 0,(function(){return Cs(this,(function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return As(this,void 0,void 0,(function(){var r;return Cs(this,(function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return As(this,void 0,void 0,(function(){var r;return Cs(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return As(this,void 0,void 0,(function(){var r;return Cs(this,(function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return As(this,void 0,void 0,(function(){return Cs(this,(function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,r){return As(this,void 0,void 0,(function(){var n;return Cs(this,(function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,r){return As(this,void 0,void 0,(function(){var n;return Cs(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,r){return As(this,void 0,void 0,(function(){var n;return Cs(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return As(this,void 0,void 0,(function(){var r;return Cs(this,(function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(r,n){return e.playVideoOnLoad(t,(function(){return r()}))}))},t.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return As(this,void 0,void 0,(function(){return Cs(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ba("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ba("element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new Ba("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new Ba("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new Ba("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new Ba("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new Ba("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new Ba("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new Ba("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new Ba("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return As(this,void 0,void 0,(function(){return Cs(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return As(this,void 0,void 0,(function(){return Cs(this,(function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function o(i,a){if(n._stopAsyncDecode)return a(new hs("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{i(n.decode(t))}catch(t){if(e&&t instanceof hs||(t instanceof Va||t instanceof es)&&r)return setTimeout(o,n._timeBetweenDecodingAttempts,i,a);a(t)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;!function n(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(n,r.timeBetweenScansMillis)}catch(t){e(null,t),(t instanceof Va||t instanceof es||t instanceof hs)&&setTimeout(n,r._timeBetweenDecodingAttempts)}}()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){this.getCaptureCanvasContext(t);var e=!1;t instanceof HTMLVideoElement?(this.drawFrameOnCanvas(t),e=!0):this.drawImageOnCanvas(t);var r=this.getCaptureCanvas(t),n=new Es(r,e),o=new ms(n);return new za(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t),r=void 0;try{r=e.getContext("2d",{willReadFrequently:!0})}catch(t){r=e.getContext("2d")}this.captureCanvasContext=r}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.drawImageOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),Ss=function(){function t(t,e,r,n,o,i){void 0===r&&(r=null==e?0:8*e.length),void 0===i&&(i=ja.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=null==i?ja.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new Array(e.length+t.length);ja.arraycopy(e,0,r,0,e.length),ja.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(ns||(ns={}));var Ts,Ds=ns;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(Ts||(Ts={}));var Os,Rs=Ts,Ms=function(){function t(t,e,r,n,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),Ns=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new La;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),ks=function(){function t(t,e){if(0===e.length)throw new La;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),ja.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var n=0,o=r.length;n!==o;n++){var i=r[n];e=Ns.addOrSubtract(e,i)}return e}e=r[0];var a=r.length,s=this.field;for(n=1;n<a;n++)e=Ns.addOrSubtract(s.multiply(t,e),r[n]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new La("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;ja.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=Ns.addOrSubtract(r[s-a],n[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new La("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,u=0;u<n;u++)for(var c=r[u],l=0;l<i;l++)a[u+l]=Ns.addOrSubtract(a[u+l],s.multiply(c,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,o=new Int32Array(r),i=this.coefficients,a=0;a<r;a++)o[a]=n.multiply(i[a],e);return new t(n,o)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new La;if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],r);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new La("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new La("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var a=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),u=t.multiplyByMonomial(a,s),c=e.buildMonomial(a,s);r=r.addOrSubtract(c),n=n.addOrSubtract(u)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),Ps=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ps(e,t),e.kind="ArithmeticException",e}(ka),Fs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ls=function(t){function e(e,r,n){var o=t.call(this)||this;o.primitive=e,o.size=r,o.generatorBase=n;for(var i=new Int32Array(r),a=1,s=0;s<r;s++)i[s]=a,(a*=2)>=r&&(a^=e,a&=r-1);o.expTable=i;var u=new Int32Array(r);for(s=0;s<r-1;s++)u[i[s]]=s;return o.logTable=u,o.zero=new ks(o,Int32Array.from([0])),o.one=new ks(o,Int32Array.from([1])),o}return Fs(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new La;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new ks(this,r)},e.prototype.inverse=function(t){if(0===t)throw new Bs;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Ka.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(Ns),zs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Us=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zs(e,t),e.kind="ReedSolomonException",e}(ka),Vs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vs(e,t),e.kind="IllegalStateException",e}(ka),js=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var r=this.field,n=new ks(r,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=n.evaluateAt(r.exp(a+r.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var u=new ks(r,o),c=this.runEuclideanAlgorithm(r.buildMonomial(e,1),u,e),l=c[0],d=c[1],h=this.findErrorLocations(l),f=this.findErrorMagnitudes(d,h);for(a=0;a<h.length;a++){var p=t.length-1-r.log(h[a]);if(p<0)throw new Us("Bad error location");t[p]=Ls.addOrSubtract(t[p],f[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,i=t,a=e,s=o.getZero(),u=o.getOne();a.getDegree()>=(r/2|0);){var c=i,l=s;if(s=u,(i=a).isZero())throw new Us("r_{i-1} was zero");a=c;for(var d=o.getZero(),h=i.getCoefficient(i.getDegree()),f=o.inverse(h);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),f);d=d.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(u=d.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new Hs("Division algorithm failed to reduce polynomial?")}var m=u.getCoefficient(0);if(0===m)throw new Us("sigmaTilde(0) was zero");var w=o.inverse(m);return[u.multiplyScalar(w),a.multiplyScalar(w)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,i=1;i<o.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=o.inverse(i),n++);if(n!==e)throw new Us("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(t,e){for(var r=e.length,n=new Int32Array(r),o=this.field,i=0;i<r;i++){for(var a=o.inverse(e[i]),s=1,u=0;u<r;u++)if(i!==u){var c=o.multiply(e[u],a),l=0==(1&c)?1|c:-2&c;s=o.multiply(s,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(Os||(Os={}));var Gs=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),o=this.correctBits(n),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new Ms(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var r=e.length,n=Os.UPPER,o=Os.UPPER,i="",a=0;a<r;)if(o===Os.BINARY){if(r-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(r-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var u=0;u<s;u++){if(r-a<8){a=r;break}var c=t.readCode(e,a,8);i+=us.castAsNonUtf8Char(c),a+=8}o=n}else{var l=o===Os.DIGIT?4:5;if(r-a<l)break;c=t.readCode(e,a,l);a+=l;var d=t.getCharacter(o,c);d.startsWith("CTRL_")?(n=o,o=t.getTable(d.charAt(5)),"L"===d.charAt(6)&&(n=o)):(i+=d,o=n)}return i},t.getTable=function(t){switch(t){case"L":return Os.LOWER;case"P":return Os.PUNCT;case"M":return Os.MIXED;case"D":return Os.DIGIT;case"B":return Os.BINARY;default:return Os.UPPER}},t.getCharacter=function(e,r){switch(e){case Os.UPPER:return t.UPPER_TABLE[r];case Os.LOWER:return t.LOWER_TABLE[r];case Os.MIXED:return t.MIXED_TABLE[r];case Os.PUNCT:return t.PUNCT_TABLE[r];case Os.DIGIT:return t.DIGIT_TABLE[r];default:throw new Hs("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Ls.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Ls.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Ls.AZTEC_DATA_10):(n=12,r=Ls.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/n;if(i<o)throw new es;for(var a=e.length%n,s=new Int32Array(i),u=0;u<i;u++,a+=n)s[u]=t.readCode(e,a,n);try{new js(r).decode(s,i-o)}catch(t){throw new es(t)}var c=(1<<n)-1,l=0;for(u=0;u<o;u++){if(0===(f=s[u])||f===c)throw new es;1!==f&&f!==c-1||l++}var d=new Array(o*n-l),h=0;for(u=0;u<o;u++){var f;if(1===(f=s[u])||f===c-1)d.fill(f>1,h,h+n-1),h+=n-1;else for(var p=n-1;p>=0;--p)d[h++]=0!=(f&1<<p)}return d},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,o=new Int32Array(n),i=new Array(this.totalBitsInLayer(r,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=n+1+2*Ka.truncDivision(Ka.truncDivision(n,2)-1,15),u=n/2,c=Ka.truncDivision(s,2);for(a=0;a<u;a++){var l=a+Ka.truncDivision(a,15);o[u-a-1]=c-l-1,o[u+a]=c+l+1}}a=0;for(var d=0;a<r;a++){for(var h=4*(r-a)+(e?9:12),f=2*a,p=n-1-f,g=0;g<h;g++)for(var m=2*g,w=0;w<2;w++)i[d+m+w]=t.get(o[f+w],o[f+g]),i[d+2*h+m+w]=t.get(o[f+g],o[p-w]),i[d+4*h+m+w]=t.get(o[p-w],o[p-g]),i[d+6*h+m+w]=t.get(o[p-g],o[f+w]);d+=8*h}return i},t.readCode=function(t,e,r){for(var n=0,o=e;o<e+r;o++)n<<=1,t[o]&&(n|=1);return n},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~","","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),Ws=function(){function t(){}return t.round=function(t){return isNaN(t)?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++){e+=t[r]}return e},t}(),Xs=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Ys=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Xs.floatToIntBits(this.x)+Xs.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(r=t[0],e=t[1],n=t[2]):a>=i&&a>=o?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var s=e;e=n,n=s}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return Ws.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},t}(),Zs=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),qs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ks=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.compact=n,a.nbDatablocks=o,a.nbLayers=i,a}return qs(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Zs),$s=function(){function t(e,r,n,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==r&&(r=t.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=r/2|0;if(this.leftInit=n-i,this.rightInit=n+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new hs}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,i=!0,a=!1,s=!1,u=!1,c=!1,l=!1,d=this.width,h=this.height;i;){i=!1;for(var f=!0;(f||!s)&&e<d;)(f=this.containsBlackPoint(r,n,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=d){o=!0;break}for(var p=!0;(p||!u)&&n<h;)(p=this.containsBlackPoint(t,e,n,!0))?(n++,i=!0,u=!0):u||n++;if(n>=h){o=!0;break}for(var g=!0;(g||!c)&&t>=0;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,i=!0,c=!0):c||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&r>=0;)(m=this.containsBlackPoint(t,e,r,!0))?(r--,i=!0,l=!0):l||r--;if(r<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var w=e-t,y=null,_=1;null===y&&_<w;_++)y=this.getBlackPointOnSegment(t,n-_,t+_,n);if(null==y)throw new hs;var v=null;for(_=1;null===v&&_<w;_++)v=this.getBlackPointOnSegment(t,r+_,t+_,r);if(null==v)throw new hs;var E=null;for(_=1;null===E&&_<w;_++)E=this.getBlackPointOnSegment(e,r+_,e-_,r);if(null==E)throw new hs;var b=null;for(_=1;null===b&&_<w;_++)b=this.getBlackPointOnSegment(e,n-_,e-_,n);if(null==b)throw new hs;return this.centerEdges(b,y,E,v)}throw new hs},t.prototype.getBlackPointOnSegment=function(t,e,r,n){for(var o=Ws.round(Ws.distance(t,e,r,n)),i=(r-t)/o,a=(n-e)/o,s=this.image,u=0;u<o;u++){var c=Ws.round(t+u*i),l=Ws.round(e+u*a);if(s.get(c,l))return new Ys(c,l)}return null},t.prototype.centerEdges=function(e,r,n,o){var i=e.getX(),a=e.getY(),s=r.getX(),u=r.getY(),c=n.getX(),l=n.getY(),d=o.getX(),h=o.getY(),f=t.CORR;return i<this.width/2?[new Ys(d-f,h+f),new Ys(s+f,u+f),new Ys(c-f,l-f),new Ys(i+f,a-f)]:[new Ys(d+f,h+f),new Ys(s+f,u-f),new Ys(c-f,l+f),new Ys(i-f,a-f)]},t.prototype.containsBlackPoint=function(t,e,r,n){var o=this.image;if(n){for(var i=t;i<=e;i++)if(o.get(i,r))return!0}else for(var a=t;a<=e;a++)if(o.get(r,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),Qs=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),n=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new hs;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}o=!0;for(i=e.length-2;i>=0&&o;i-=2){a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new hs;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}},t}(),Js=function(){function t(t,e,r,n,o,i,a,s,u){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m){var w=t.quadrilateralToSquare(e,r,n,o,i,a,s,u);return t.squareToQuadrilateral(c,l,d,h,f,p,g,m).times(w)},t.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=0;d<e;d+=2){var h=t[d],f=t[d+1],p=o*h+s*f+l;t[d]=(r*h+i*f+u)/p,t[d+1]=(n*h+a*f+c)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=t.length,h=0;h<d;h++){var f=t[h],p=e[h],g=o*f+s*p+l;t[h]=(r*f+i*p+u)/g,e[h]=(n*f+a*p+c)/g}},t.squareToQuadrilateral=function(e,r,n,o,i,a,s,u){var c=e-n+i-s,l=r-o+a-u;if(0===c&&0===l)return new t(n-e,i-n,e,o-r,a-o,r,0,0,1);var d=n-i,h=s-i,f=o-a,p=u-a,g=d*p-h*f,m=(c*p-h*l)/g,w=(d*l-c*f)/g;return new t(n-e+m*n,s-e+w*s,e,o-r+m*o,u-r+w*u,r,m,w,1)},t.quadrilateralToSquare=function(e,r,n,o,i,a,s,u){return t.squareToQuadrilateral(e,r,n,o,i,a,s,u).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),eu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e.prototype.sampleGrid=function(t,e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m,w,y){var _=Js.quadrilateralToQuadrilateral(n,o,i,a,s,u,c,l,d,h,f,p,g,m,w,y);return this.sampleGridWithTransform(t,e,r,_)},e.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new hs;for(var o=new ls(e,r),i=new Float32Array(2*e),a=0;a<r;a++){for(var s=i.length,u=a+.5,c=0;c<s;c+=2)i[c]=c/2+.5,i[c+1]=u;n.transformPoints(i),Qs.checkAndNudgePoints(t,i);try{for(c=0;c<s;c+=2)t.get(Math.floor(i[c]),Math.floor(i[c+1]))&&o.set(c/2,a)}catch(t){throw new hs}}return o},e}(Qs),ru=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new eu,t}(),nu=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new Ys(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),ou=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){var n=r[0];r[0]=r[2],r[2]=n}this.extractParameters(r);var o=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new Ks(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new hs;var e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);for(var n=0,o=0;o<4;o++){var i=r[(this.shift+o)%4];this.compact?(n<<=7,n+=i>>1&127):(n<<=10,n+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var r=0;t.forEach((function(t,n,o){r=(r<<3)+((t>>e-2<<1)+(1&t))})),r=((1&r)<<11)+(r>>1);for(var n=0;n<4;n++)if(Ka.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new hs},t.prototype.getCorrectedParameterData=function(t,e){var r,n;e?(r=7,n=2):(r=10,n=4);for(var o=r-n,i=new Int32Array(r),a=r-1;a>=0;--a)i[a]=15&t,t>>=4;try{new js(Ls.AZTEC_PARAM).decode(i,o)}catch(t){throw new hs}var s=0;for(a=0;a<n;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,r=t,n=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(r,i,1,1),u=this.getFirstDifferent(n,i,-1,1),c=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(c,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,u,c))break}e=a,r=s,n=u,o=c,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new hs;this.compact=5===this.nbCenterLayers;var d=new Ys(e.getX()+.5,e.getY()-.5),h=new Ys(r.getX()+.5,r.getY()+.5),f=new Ys(n.getX()-.5,n.getY()+.5),p=new Ys(o.getX()-.5,o.getY()-.5);return this.expandSquare([d,h,f,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,r,n;try{t=(u=new $s(this.image).detect())[0],e=u[1],r=u[2],n=u[3]}catch(a){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new nu(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new nu(o+7,i+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new nu(o-7,i+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new nu(o-7,i-7),!1,-1,-1).toResultPoint()}var a=Ws.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Ws.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{var u;t=(u=new $s(this.image,15,a,s).detect())[0],e=u[1],r=u[2],n=u[3]}catch(o){t=this.getFirstDifferent(new nu(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new nu(a+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new nu(a-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new nu(a-7,s-7),!1,-1,-1).toResultPoint()}return a=Ws.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Ws.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new nu(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,r,n,o){var i=ru.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,u=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,u,s,u,u,s,u,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,r){for(var n=0,o=this.distanceResultPoint(t,e),i=o/r,a=t.getX(),s=t.getY(),u=i*(e.getX()-t.getX())/o,c=i*(e.getY()-t.getY())/o,l=0;l<r;l++)this.image.get(Ws.round(a+l*u),Ws.round(s+l*c))&&(n|=1<<r-l-1);return n},t.prototype.isWhiteOrBlackRectangle=function(t,e,r,n){t=new nu(t.getX()-3,t.getY()+3),e=new nu(e.getX()-3,e.getY()-3),r=new nu(r.getX()+3,r.getY()-3),n=new nu(n.getX()+3,n.getY()+3);var o=this.getColor(n,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&((i=this.getColor(e,r))===o&&(i=this.getColor(r,n))===o)},t.prototype.getColor=function(t,e){for(var r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,o=(e.getY()-t.getY())/r,i=0,a=t.getX(),s=t.getY(),u=this.image.get(t.getX(),t.getY()),c=Math.ceil(r),l=0;l<c;l++)a+=n,s+=o,this.image.get(Ws.round(a),Ws.round(s))!==u&&i++;var d=i/r;return d>.1&&d<.9?0:d<=.1===u?1:-1},t.prototype.getFirstDifferent=function(t,e,r,n){for(var o=t.getX()+r,i=t.getY()+n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r,i+=n;for(o-=r,i-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r;for(o-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=n;return new nu(o,i-=n)},t.prototype.expandSquare=function(t,e,r){var n=r/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,u=new Ys(a+n*o,s+n*i),c=new Ys(a-n*o,s-n*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[u,new Ys(a+n*o,s+n*i),c,new Ys(a-n*o,s-n*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=Ws.round(t.getX()),r=Ws.round(t.getY());return this.isValid(e,r)},t.prototype.distancePoint=function(t,e){return Ws.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return Ws.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Ka.truncDivision(this.nbLayers-4,8)+1)+15},t}(),iu=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var r=null,n=new ou(t.getBlackMatrix()),o=null,i=null;try{o=(a=n.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Gs).decode(a)}catch(t){r=t}if(null==i)try{var a;o=(a=n.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Gs).decode(a)}catch(t){if(null!=r)throw r;throw t}var s=new Ss(i.getText(),i.getRawBytes(),i.getNumBits(),o,Ds.AZTEC,ja.currentTimeMillis()),u=i.getByteSegments();null!=u&&s.putMetadata(Rs.BYTE_SEGMENTS,u);var c=i.getECLevel();return null!=c&&s.putMetadata(Rs.ERROR_CORRECTION_LEVEL,c),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var r=t.get(Ja.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((function(t,e,n){r.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),au=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new iu,e)||this}au(e,t)}(Is);var su=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(c){if(e&&!0===e.get(Ja.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),o=n.getResultMetadata(),i=270;null!==o&&!0===o.get(Rs.ORIENTATION)&&(i+=o.get(Rs.ORIENTATION)%360),n.putMetadata(Rs.ORIENTATION,i);var a=n.getResultPoints();if(null!==a)for(var s=r.getHeight(),u=0;u<a.length;u++)a[u]=new Ys(s-a[u].getY()-1,a[u].getX());return n}throw new hs}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,n=t.getWidth(),o=t.getHeight(),i=new $a(n),a=e&&!0===e.get(Ja.TRY_HARDER),s=Math.max(1,o>>(a?8:5));r=a?o:15;for(var u=Math.trunc(o/2),c=0;c<r;c++){var l=Math.trunc((c+1)/2),d=u+s*(0==(1&c)?l:-l);if(d<0||d>=o)break;try{i=t.getBlackRow(d,i)}catch(t){continue}for(var h=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(Ja.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach((function(t,e){return r.set(e,t)})),r.delete(Ja.NEED_RESULT_POINT_CALLBACK),e=r}try{var o=f.decodeRow(d,i,e);if(1===t){o.putMetadata(Rs.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new Ys(n-a[0].getX()-1,a[0].getY()),a[1]=new Ys(n-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(t){}},f=this,p=0;p<2;p++){var g=h(p);if("object"==typeof g)return g.value}}throw new hs},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new hs;for(var a=!t.get(e),s=0,u=e;u<i;){if(t.get(u)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}u++}if(s!==n&&(s!==n-1||u!==i))throw new hs},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new hs;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return Number.POSITIVE_INFINITY;u+=h}return u/o},t}(),uu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),cu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return uu(e,t),e.findStartPattern=function(t){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=n,s=!1,u=n;u<r;u++)if(t.get(u)!==s)i[o]++;else{if(5===o){for(var c=e.MAX_AVG_VARIANCE,l=-1,d=e.CODE_START_A;d<=e.CODE_START_C;d++){var h=su.patternMatchVariance(i,e.CODE_PATTERNS[d],e.MAX_INDIVIDUAL_VARIANCE);h<c&&(c=h,l=d)}if(l>=0&&t.isRange(Math.max(0,a-(u-a)/2),a,!1))return Int32Array.from([a,u,l]);a+=i[0]+i[1],(i=i.slice(2,i.length))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new hs},e.decodeCode=function(t,r,n){su.recordPattern(t,n,r);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],u=this.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,i=a)}if(i>=0)return i;throw new hs},e.prototype.decodeRow=function(t,r,n){var o,i=n&&!0===n.get(Ja.ASSUME_GS1),a=e.findStartPattern(r),s=a[2],u=0,c=new Uint8Array(20);switch(c[u++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new es}for(var l=!1,d=!1,h="",f=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,w=0,y=s,_=0,v=!0,E=!1,b=!1;!l;){var A=d;switch(d=!1,m=w,w=e.decodeCode(r,g,p),c[u++]=w,w!==e.CODE_STOP&&(v=!0),w!==e.CODE_STOP&&(y+=++_*w),f=p,p+=g.reduce((function(t,e){return t+e}),0),w){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new es}switch(o){case e.CODE_CODE_A:if(w<64)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else if(w<96)h+=b===E?String.fromCharCode(w-64):String.fromCharCode(w+64),b=!1;else switch(w!==e.CODE_STOP&&(v=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(w<96)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),b=!1;else switch(w!==e.CODE_STOP&&(v=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(w<100)w<10&&(h+="0"),h+=w;else switch(w!==e.CODE_STOP&&(v=!1),w){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}A&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var C=p-f;if(p=r.getNextUnset(p),!r.isRange(p,Math.min(r.getSize(),p+(p-f)/2),!1))throw new hs;if((y-=_*m)%103!==m)throw new Va;var x=h.length;if(0===x)throw new hs;x>0&&v&&(h=o===e.CODE_CODE_C?h.substring(0,x-2):h.substring(0,x-1));for(var I=(a[1]+a[0])/2,S=f+C/2,T=c.length,D=new Uint8Array(T),O=0;O<T;O++)D[O]=c[O];var R=[new Ys(I,t),new Ys(S,t)];return new Ss(h,D,0,R,Ds.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(su),lu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),du=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hu=function(t){function e(e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.call(this)||this;return n.usingCheckDigit=e,n.extendedMode=r,n.decodeRowResult="",n.counters=new Int32Array(9),n}return lu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.counters;u.fill(0),this.decodeRowResult="";var c,l,d=e.findAsteriskPattern(r,u),h=r.getNextSet(d[1]),f=r.getSize();do{e.recordPattern(r,h,u);var p=e.toNarrowWidePattern(u);if(p<0)throw new hs;c=e.patternToChar(p),this.decodeRowResult+=c,l=h;try{for(var g=(o=void 0,du(u)),m=g.next();!m.done;m=g.next()){h+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}h=r.getNextSet(h)}while("*"!==c);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var w,y=0;try{for(var _=du(u),v=_.next();!v.done;v=_.next()){y+=v.value}}catch(t){a={error:t}}finally{try{v&&!v.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}if(h!==f&&2*(h-l-y)<y)throw new hs;if(this.usingCheckDigit){for(var E=this.decodeRowResult.length-1,b=0,A=0;A<E;A++)b+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(A));if(this.decodeRowResult.charAt(E)!==e.ALPHABET_STRING.charAt(b%43))throw new Va;this.decodeRowResult=this.decodeRowResult.substring(0,E)}if(0===this.decodeRowResult.length)throw new hs;w=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var C=(d[1]+d[0])/2,x=l+y/2;return new Ss(w,null,0,[new Ys(C,t),new Ys(x,t)],Ds.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,r){for(var n=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,u=r.length,c=o;c<n;c++)if(t.get(c)!==s)r[i]++;else{if(i===u-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((c-a)/2)),a,!1))return[a,c];a+=r[0]+r[1],r.copyWithin(0,2,2+i-1),r[i-1]=0,r[i]=0,i--}else i++;r[i]=1,s=!s}throw new hs},e.toNarrowWidePattern=function(t){var e,r,n,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,du(t)),u=s.next();!u.done;u=s.next()){(h=u.value)<a&&h>i&&(a=h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}i=a,n=0;for(var c=0,l=0,d=0;d<o;d++){(h=t[d])>i&&(l|=1<<o-1-d,n++,c+=h)}if(3===n){for(d=0;d<o&&n>0;d++){var h;if((h=t[d])>i&&(n--,2*h>=c))return-1}return l}}while(n>3);return-1},e.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);if(t===e.ASTERISK_ENCODING)return"*";throw new hs},e.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(n+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new es;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new es;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new es;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new es;a=":"}}r+=a,n++}else r+=o}return r},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(su),fu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gu=function(t){function e(){var e=t.call(this)||this;return e.decodeRowResult="",e.counters=new Int32Array(6),e}return fu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u,c,l=this.findAsteriskPattern(r),d=r.getNextSet(l[1]),h=r.getSize(),f=this.counters;f.fill(0),this.decodeRowResult="";do{e.recordPattern(r,d,f);var p=this.toPattern(f);if(p<0)throw new hs;u=this.patternToChar(p),this.decodeRowResult+=u,c=d;try{for(var g=(o=void 0,pu(f)),m=g.next();!m.done;m=g.next()){d+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=r.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var w=0;try{for(var y=pu(f),_=y.next();!_.done;_=y.next()){w+=_.value}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}if(d===h||!r.get(d))throw new hs;if(this.decodeRowResult.length<2)throw new hs;this.checkChecksums(this.decodeRowResult),this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-2);var v=this.decodeExtended(this.decodeRowResult),E=(l[1]+l[0])/2,b=c+w/2;return new Ss(v,null,0,[new Ys(E,t),new Ys(b,t)],Ds.CODE_93,(new Date).getTime())},e.prototype.findAsteriskPattern=function(t){var r=t.getSize(),n=t.getNextSet(0);this.counters.fill(0);for(var o=this.counters,i=n,a=!1,s=o.length,u=0,c=n;c<r;c++)if(t.get(c)!==a)o[u]++;else{if(u===s-1){if(this.toPattern(o)===e.ASTERISK_ENCODING)return new Int32Array([i,c]);i+=o[0]+o[1],o.copyWithin(0,2,2+u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,a=!a}throw new hs},e.prototype.toPattern=function(t){var e,r,n=0;try{for(var o=pu(t),i=o.next();!i.done;i=o.next()){n+=i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}for(var a=0,s=t.length,u=0;u<s;u++){var c=Math.round(9*t[u]/n);if(c<1||c>4)return-1;if(0==(1&u))for(var l=0;l<c;l++)a=a<<1|1;else a<<=c}return a},e.prototype.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);throw new hs},e.prototype.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if(o>="a"&&o<="d"){if(n>=e-1)throw new es;var i=t.charAt(n+1),a="\0";switch(o){case"d":if(!(i>="A"&&i<="Z"))throw new es;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"a":if(!(i>="A"&&i<="Z"))throw new es;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"b":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if(!(i>="X"&&i<="Z"))throw new es;a=String.fromCharCode(127)}break;case"c":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new es;a=":"}}r+=a,n++}else r+=o}return r},e.prototype.checkChecksums=function(t){var e=t.length;this.checkOneChecksum(t,e-2,20),this.checkOneChecksum(t,e-1,15)},e.prototype.checkOneChecksum=function(t,r,n){for(var o=1,i=0,a=r-1;a>=0;a--)i+=o*e.ALPHABET_STRING.indexOf(t.charAt(a)),++o>n&&(o=1);if(t.charAt(r)!==e.ALPHABET_STRING[i%47])throw new Va},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",e.CHARACTER_ENCODINGS=[276,328,324,322,296,292,290,336,274,266,424,420,418,404,402,394,360,356,354,308,282,344,332,326,300,278,436,434,428,422,406,410,364,358,310,314,302,468,466,458,366,374,430,294,474,470,306,350],e.ASTERISK_ENCODING=e.CHARACTER_ENCODINGS[47],e}(su),mu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return mu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a=this.decodeStart(r),s=this.decodeEnd(r),u=new cs;e.decodeMiddle(r,a[1],s[0],u);var c=u.toString(),l=null;null!=n&&(l=n.get(Ja.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var d=c.length,h=!1,f=0;try{for(var p=wu(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(d===m){h=!0;break}m>f&&(f=m)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!h&&d>f&&(h=!0),!h)throw new es;var w=[new Ys(a[1],t),new Ys(s[0],t)];return new Ss(c,null,0,w,Ds.ITF,(new Date).getTime())},e.decodeMiddle=function(t,r,n,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);r<n;){su.recordPattern(t,r,i);for(var u=0;u<5;u++){var c=2*u;a[u]=i[c],s[u]=i[c+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){r+=t}))}},e.prototype.decodeStart=function(t){var r=e.skipWhiteSpace(t),n=e.findGuardPattern(t,r,e.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(t,n[0]),n},e.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;r>0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new hs},e.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new hs;return r},e.prototype.decodeEnd=function(t){t.reverse();try{var r=e.skipWhiteSpace(t),n=void 0;try{n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof hs&&(n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,n[0]);var o=n[0];return n[0]=t.getSize()-n[1],n[1]=t.getSize()-o,n}finally{t.reverse()}},e.findGuardPattern=function(t,r,n){var o=n.length,i=new Int32Array(o),a=t.getSize(),s=!1,u=0,c=r;i.fill(0);for(var l=r;l<a;l++)if(t.get(l)!==s)i[u]++;else{if(u===o-1){if(su.patternMatchVariance(i,n,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,l];c+=i[0]+i[1],ja.arraycopy(i,2,i,0,u-1),i[u-1]=0,i[u]=0,u--}else u++;i[u]=1,s=!s}throw new hs},e.decodeDigit=function(t){for(var r=e.MAX_AVG_VARIANCE,n=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=su.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<r?(r=s,n=i):s===r&&(n=-1)}if(n>=0)return n%10;throw new hs},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(su),_u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return _u(e,t),e.findStartGuardPattern=function(t){for(var r,n=!1,o=0,i=Int32Array.from([0,0,0]);!n;){i=Int32Array.from([0,0,0]);var a=(r=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=r[1])-a);s>=0&&(n=t.isRange(s,a,!1))}return r},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new es;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new es;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))},e.findGuardPattern=function(t,r,n,o,i){for(var a=t.getSize(),s=0,u=r=n?t.getNextUnset(r):t.getNextSet(r),c=o.length,l=n,d=r;d<a;d++)if(t.get(d)!==l)i[s]++;else{if(s===c-1){if(su.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,d]);u+=i[0]+i[1];for(var h=i.slice(2,i.length),f=0;f<s-1;f++)i[f]=h[f];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new hs},e.decodeDigit=function(t,r,n,o){this.recordPattern(t,n,r);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,u=0;u<s;u++){var c=o[u],l=su.patternMatchVariance(r,c,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=u)}if(a>=0)return a;throw new hs},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(su),Eu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bu=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Ys((n[0]+n[1])/2,e),new Ys(i,e)],c=new Ss(a,null,0,u,Ds.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),u=r[1],c=0,l=0;l<5&&u<s;l++){var d=vu.decodeDigit(e,a,u,vu.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,Eu(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<4-l),4!==l&&(u=e.getNextSet(u),u=e.getNextUnset(u))}if(5!==n.length)throw new hs;var p=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==p)throw new hs;return u},t.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new hs},t.parseExtensionString=function(e){if(5!==e.length)return null;var r=t.parseExtension5String(e);return null==r?null:new Map([[Rs.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())},t}(),Au=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cu=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new Ys((n[0]+n[1])/2,e),new Ys(i,e)],c=new Ss(a,null,0,u,Ds.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(t,e,r){var n,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],u=0,c=0;c<2&&s<a;c++){var l=vu.decodeDigit(t,i,s,vu.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var d=(n=void 0,Au(i)),h=d.next();!h.done;h=d.next()){s+=h.value}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}l>=10&&(u|=1<<1-c),1!==c&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==r.length)throw new hs;if(parseInt(r.toString())%4!==u)throw new hs;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[Rs.ISSUE_NUMBER,parseInt(t)]])},t}(),xu=function(){function t(){}return t.decodeRow=function(t,e,r){var n=vu.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new bu).decodeRow(t,e,n)}catch(r){return(new Cu).decodeRow(t,e,n)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),Iu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Su=function(t){function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var n=10;n<20;n++){for(var o=e.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[n]=i}return r}return Iu(e,t),e.prototype.decodeRow=function(t,r,n){var o=e.findStartGuardPattern(r),i=null==n?null:n.get(Ja.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new Ys((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(r,o,this.decodeRowStringBuffer),u=s.rowOffset,c=s.resultString;if(null!=i){var l=new Ys(u,t);i.foundPossibleResultPoint(l)}var d=e.decodeEnd(r,u);if(null!=i){var h=new Ys((d[0]+d[1])/2,t);i.foundPossibleResultPoint(h)}var f=d[1],p=f+(f-d[0]);if(p>=r.getSize()||!r.isRange(f,p,!1))throw new hs;var g=c.toString();if(g.length<8)throw new es;if(!e.checkChecksum(g))throw new Va;var m=(o[1]+o[0])/2,w=(d[1]+d[0])/2,y=this.getBarcodeFormat(),_=[new Ys(m,t),new Ys(w,t)],v=new Ss(g,null,0,_,y,(new Date).getTime()),E=0;try{var b=xu.decodeRow(t,r,d[1]);v.putMetadata(Rs.UPC_EAN_EXTENSION,b.getText()),v.putAllMetadata(b.getResultMetadata()),v.addResultPoints(b.getResultPoints()),E=b.getText().length}catch(t){}var A=null==n?null:n.get(Ja.ALLOWED_EAN_EXTENSIONS);if(null!=A){var C=!1;for(var x in A)if(E.toString()===x){C=!0;break}if(!C)throw new hs}return y===Ds.EAN_13||Ds.UPC_A,v},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new es;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new es;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(vu),Tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Du=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ou=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return Tu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a,s,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=t.getSize(),l=r[1],d=0,h=0;h<6&&l<c;h++){var f=Su.decodeDigit(t,u,l,Su.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var p=(o=void 0,Du(u)),g=p.next();!g.done;g=p.next()){l+=g.value}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}f>=10&&(d|=1<<5-h)}n=e.determineFirstDigit(n,d),l=Su.findGuardPattern(t,l,!0,Su.MIDDLE_PATTERN,new Int32Array(Su.MIDDLE_PATTERN.length).fill(0))[1];for(h=0;h<6&&l<c;h++){f=Su.decodeDigit(t,u,l,Su.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var m=(a=void 0,Du(u)),w=m.next();!w.done;w=m.next()){l+=w.value}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:n}},e.prototype.getBarcodeFormat=function(){return Ds.EAN_13},e.determineFirstDigit=function(t,e){for(var r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return t=String.fromCharCode("0".charCodeAt(0)+r)+t;throw new hs},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(Su),Ru=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return Ru(e,t),e.prototype.decodeMiddle=function(t,e,r){var n,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=t.getSize(),c=e[1],l=0;l<4&&c<u;l++){var d=Su.decodeDigit(t,s,c,Su.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var h=(n=void 0,Mu(s)),f=h.next();!f.done;f=h.next()){c+=f.value}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}c=Su.findGuardPattern(t,c,!0,Su.MIDDLE_PATTERN,new Int32Array(Su.MIDDLE_PATTERN.length).fill(0))[1];for(l=0;l<4&&c<u;l++){d=Su.decodeDigit(t,s,c,Su.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var p=(i=void 0,Mu(s)),g=p.next();!g.done;g=p.next()){c+=g.value}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:c,resultString:r}},e.prototype.getBarcodeFormat=function(){return Ds.EAN_8},e}(Su),ku=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new Ou,e}return ku(e,t),e.prototype.getBarcodeFormat=function(){return Ds.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))},e.prototype.decodeMiddle=function(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var r=new Ss(e.substring(1),null,null,t.getResultPoints(),Ds.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new hs},e.prototype.reset=function(){this.ean13Reader.reset()},e}(Su),Bu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Lu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return Bu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=r[1],c=0,l=0;l<6&&u<s;l++){var d=e.decodeDigit(t,a,u,e.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,Fu(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<5-l)}return e.determineNumSysAndCheckDigit(new cs(n),c),u},e.prototype.decodeEnd=function(t,r){return e.findGuardPatternWithoutCounters(t,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return Su.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var r=0;r<=1;r++)for(var n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw hs.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return Ds.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),r=new cs;r.append(t.charAt(0));var n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(Su),zu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Uu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vu=function(t){function e(e){var r=t.call(this)||this,n=null==e?null:e.get(Ja.POSSIBLE_FORMATS),o=[];return null!=n&&(n.indexOf(Ds.EAN_13)>-1&&o.push(new Ou),n.indexOf(Ds.UPC_A)>-1&&o.push(new Pu),n.indexOf(Ds.EAN_8)>-1&&o.push(new Nu),n.indexOf(Ds.UPC_E)>-1&&o.push(new Lu)),0===o.length&&(o.push(new Ou),o.push(new Pu),o.push(new Nu),o.push(new Lu)),r.readers=o,r}return zu(e,t),e.prototype.decodeRow=function(t,e,r){var n,o;try{for(var i=Uu(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var u=s.decodeRow(t,e,r),c=u.getBarcodeFormat()===Ds.EAN_13&&"0"===u.getText().charAt(0),l=null==r?null:r.get(Ja.POSSIBLE_FORMATS),d=null==l||l.includes(Ds.UPC_A);if(c&&d){var h=u.getRawBytes(),f=new Ss(u.getText().substring(1),h,h?h.length:null,u.getResultPoints(),Ds.UPC_A);return f.putAllMetadata(u.getResultMetadata()),f}return u}catch(t){}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new hs},e.prototype.reset=function(){var t,e;try{for(var r=Uu(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(su),Hu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ju=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CODA_BAR_CHAR_SET={nnnnnww:"0",nnnnwwn:"1",nnnwnnw:"2",wwnnnnn:"3",nnwnnwn:"4",wnnnnwn:"5",nwnnnnw:"6",nwnnwnn:"7",nwwnnnn:"8",wnnwnnn:"9",nnnwwnn:"-",nnwwnnn:"$",wnnnwnw:":",wnwnnnw:"/",wnwnwnn:".",nnwwwww:"+",nnwwnwn:"A",nwnwnnw:"B",nnnwnww:"C",nnnwwwn:"D"},e}return Hu(e,t),e.prototype.decodeRow=function(t,e,r){var n=this.getValidRowData(e);if(!n)throw new hs;var o=this.codaBarDecodeRow(n.row);if(!o)throw new hs;return new Ss(o,null,0,[new Ys(n.left,t),new Ys(n.right,t)],Ds.CODABAR,(new Date).getTime())},e.prototype.getValidRowData=function(t){var e=t.toArray(),r=e.indexOf(!0);if(-1===r)return null;var n=e.lastIndexOf(!0);if(n<=r)return null;for(var o=[],i=(e=e.slice(r,n+1))[0],a=1,s=1;s<e.length;s++)e[s]===i?a++:(i=e[s],o.push(a),a=1);return o.push(a),o.length<23&&(o.length+1)%8!=0?null:{row:o,left:r,right:n}},e.prototype.codaBarDecodeRow=function(t){for(var e=[],r=Math.ceil(t.reduce((function(t,e){return(t+e)/2}),0));t.length>0;){var n=t.splice(0,8).splice(0,7).map((function(t){return t<r?"n":"w"})).join("");if(void 0===this.CODA_BAR_CHAR_SET[n])return null;e.push(this.CODA_BAR_CHAR_SET[n])}var o=e.join("");return this.validCodaBarString(o)?o:null},e.prototype.validCodaBarString=function(t){return/^[A-D].{1,}[A-D]$/.test(t)},e}(su),Gu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xu=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Gu(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,r){for(var n=0;n<r.length;n++)if(su.patternMatchVariance(t,r[n],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return n;throw new hs},e.count=function(t){return Ws.sum(new Int32Array(t))},e.increment=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]>n&&(n=e[o],r=o);t[r]++},e.decrement=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]<n&&(n=e[o],r=o);t[r]--},e.isFinderPattern=function(t){var r,n,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var u=Wu(t),c=u.next();!c.done;c=u.next()){var l=c.value;l>s&&(s=l),l<a&&(a=l)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(su),Yu=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),Zu=function(){function t(t,e,r,n,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new Ys(r,o)),this.resultPoints.push(new Ys(n,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),qu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ku=function(){function t(){}return t.getRSSvalue=function(e,r,n){var o,i,a=0;try{for(var s=qu(e),u=s.next();!u.done;u=s.next()){a+=u.value}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var c=0,l=0,d=e.length,h=0;h<d-1;h++){var f=void 0;for(f=1,l|=1<<h;f<e[h];f++,l&=~(1<<h)){var p=t.combins(a-f-1,d-h-2);if(n&&0===l&&a-f-(d-h-1)>=d-h-1&&(p-=t.combins(a-f-(d-h),d-h-2)),d-h-1>1){for(var g=0,m=a-f-(d-h-2);m>r;m--)g+=t.combins(a-f-m-1,d-h-3);p-=g*(d-1-h)}else a-f>r&&p--;c+=p}a-=f}return c},t.combins=function(t,e){var r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);for(var o=1,i=1,a=t;a>r;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},t}(),$u=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=new $a(12*e),n=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)0!=(o&1<<i)&&r.set(n),n++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),u=11;u>=0;--u)0!=(s&1<<u)&&r.set(n),n++;if(null!==a.getRightChar()){var c=a.getRightChar().getValue();for(u=11;u>=0;--u)0!=(c&1<<u)&&r.set(n),n++}}return r},t}(),Qu=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Ju=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),tc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ec=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return tc(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Ju),rc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nc=function(t){function e(e,r,n){var o=t.call(this,e)||this;return n?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=r,o}return rc(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Ju),oc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ic=function(t){function e(e,r,n){var o=t.call(this,e)||this;if(r<0||r>10||n<0||n>10)throw new es;return o.firstDigit=r,o.secondDigit=n,o}return oc(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Ju),ac=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sc=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,o,i,a,s,u,c;if(!e)return null;if(e.length<2)throw new hs;var l=e.substring(0,2);try{for(var d=ac(t.TWO_DIGIT_DATA_LENGTH),h=d.next();!h.done;h=d.next()){if((E=h.value)[0]===l)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,E[2],e):t.processFixedAI(2,E[1],e)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new hs;var f=e.substring(0,3);try{for(var p=ac(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next()){if((E=g.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,E[2],e):t.processFixedAI(3,E[1],e)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=ac(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),w=m.next();!w.done;w=m.next()){if((E=w.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new hs;var y=e.substring(0,4);try{for(var _=ac(t.FOUR_DIGIT_DATA_LENGTH),v=_.next();!v.done;v=_.next()){var E;if((E=v.value)[0]===y)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){u={error:t}}finally{try{v&&!v.done&&(c=_.return)&&c.call(_)}finally{if(u)throw u.error}}throw new hs},t.processFixedAI=function(e,r,n){if(n.length<e)throw new hs;var o=n.substring(0,e);if(n.length<e+r)throw new hs;var i=n.substring(e,e+r),a=n.substring(e+r),s="("+o+")"+i,u=t.parseFieldsInGeneralPurpose(a);return null==u?s:s+u},t.processVariableAI=function(e,r,n){var o,i=n.substring(0,e);o=n.length<e+r?n.length:e+r;var a=n.substring(e,o),s=n.substring(o),u="("+i+")"+a,c=t.parseFieldsInGeneralPurpose(s);return null==c?u:u+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),uc=function(){function t(t){this.buffer=new cs,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=sc.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),n=o.isRemaining()?""+o.getRemainingValue():null,r===o.getNewPosition())break;r=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new ic(this.information.getSize(),0===e?ic.FNC1:e-1,ic.FNC1)}var r=this.extractNumericValueFromBitArray(t,7);return new ic(t+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;o<r;++o)t.get(e+o)&&(n|=1<<r-o-1);return n},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var r=this.parseBlocks();return null!=r&&r.isRemaining()?new nc(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new nc(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var r=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),!(r!==this.current.getPosition())&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new nc(this.current.getPosition(),this.buffer.toString()):new nc(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new Qu(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1()){e=new nc(this.current.getPosition(),this.buffer.toString());return new Qu(!0,e)}this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new Qu(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new nc(this.current.getPosition(),this.buffer.toString());return new Qu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new Qu(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new nc(this.current.getPosition(),this.buffer.toString());return new Qu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new Qu(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new ec(t+5,ec.FNC1);if(e>=5&&e<15)return new ec(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new ec(t+7,""+(n+1));if(n>=90&&n<116)return new ec(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new es}return new ec(t+8,r)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new ec(t+5,ec.FNC1);if(e>=5&&e<15)return new ec(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new ec(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new Hs("Decoding invalid alphanumeric value: "+n)}return new ec(t+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),cc=function(){function t(t){this.information=t,this.generalDecoder=new uc(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),lc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dc=function(t){function e(e){return t.call(this,e)||this}return lc(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},e.prototype.encodeCompressedGtinWithoutAI=function(t,r,n){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,n)},e.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=0==(1&n)?3*o:o}10===(r=10-r%10)&&(r=0),t.append(r)},e.GTIN_SIZE=40,e}(cc),hc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fc=function(t){function e(e){return t.call(this,e)||this}return hc(e,t),e.prototype.parseInformation=function(){var t=new cs;t.append("(01)");var r=t.length(),n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(n),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(dc),pc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gc=function(t){function e(e){return t.call(this,e)||this}return pc(e,t),e.prototype.parseInformation=function(){var t=new cs;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(cc),mc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wc=function(t){function e(e){return t.call(this,e)||this}return mc(e,t),e.prototype.encodeCompressedWeight=function(t,e,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);for(var o=this.checkWeight(n),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}(dc),yc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_c=function(t){function e(e){return t.call(this,e)||this}return yc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+wc.GTIN_SIZE+e.WEIGHT_SIZE)throw new hs;var t=new cs;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+wc.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(wc),vc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ec=function(t){function e(e){return t.call(this,e)||this}return vc(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(_c),bc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ac=function(t){function e(e){return t.call(this,e)||this}return bc(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(_c),Cc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xc=function(t){function e(e){return t.call(this,e)||this}return Cc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+dc.GTIN_SIZE)throw new hs;var t=new cs;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+dc.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(r),t.append(")");var n=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+dc.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(n.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(dc),Ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sc=function(t){function e(e){return t.call(this,e)||this}return Ic(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+dc.GTIN_SIZE)throw new hs;var t=new cs;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+dc.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(r),t.append(")");var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+dc.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);n/100==0&&t.append("0"),n/10==0&&t.append("0"),t.append(n);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+dc.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(dc),Tc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dc=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.dateCode=n,o.firstAIdigits=r,o}return Tc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new hs;var t=new cs;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(38400!==n){t.append("("),t.append(this.dateCode),t.append(")");var o=n%32,i=(n/=32)%12+1,a=n/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(wc);var Oc=function(){function t(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t&&(t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern))},t.equalsOrNull=function(e,r){return null===e?null===r:t.equals(e,r)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),Rc=function(){function t(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t&&(this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed)},t.prototype.checkEqualitity=function(t,e){var r;if(t&&e)return t.forEach((function(t,n){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r},t}(),Mc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kc=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return Mc(e,t),e.prototype.decodeRow=function(t,r,n){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,r))}catch(t){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof hs){if(!this.pairs.length)throw new hs;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new hs},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(t){console.log(t)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,r){for(var n,o,i=r;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(n=void 0,Nc(t)),u=s.next();!u.done;u=s.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(t){console.log(t)}}}throw new hs},e.isValidSequence=function(t){var r,n;try{for(var o=Nc(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,u=0;u<t.length;u++)if(t[u].getFinderPattern().getValue()!==a[u]){s=!1;break}if(s)return!0}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(t,r){for(var n=0,o=!1,i=!1;n<this.rows.length;){var a=this.rows[n];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),n++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new Rc(this.pairs,t,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var r,n,o,i,a,s;try{for(var u=Nc(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.getPairs().length!==t.length){try{for(var d=(o=void 0,Nc(l.getPairs())),h=d.next();!h.done;h=d.next()){var f=h.value,p=!1;try{for(var g=(a=void 0,Nc(t)),m=g.next();!m.done;m=g.next()){var w=m.value;if(Oc.equals(f,w)){p=!0;break}}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}p||!1}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.isPartialRow=function(t,e){var r,n,o,i,a,s;try{for(var u=Nc(e),c=u.next();!c.done;c=u.next()){var l=c.value,d=!0;try{for(var h=(o=void 0,Nc(t)),f=h.next();!f.done;f=h.next()){var p=f.value,g=!1;try{for(var m=(a=void 0,Nc(l.getPairs())),w=m.next();!w.done;w=m.next()){var y=w.value;if(p.equals(y)){g=!0;break}}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){d=!1;break}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(d)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new fc(t);if(!t.get(2))return new gc(t);switch(uc.extractNumericValueFromBitArray(t,1,4)){case 4:return new Ec(t);case 5:return new Ac(t)}switch(uc.extractNumericValueFromBitArray(t,1,5)){case 12:return new xc(t);case 13:return new Sc(t)}switch(uc.extractNumericValueFromBitArray(t,1,7)){case 56:return new Dc(t,"310","11");case 57:return new Dc(t,"320","11");case 58:return new Dc(t,"310","13");case 59:return new Dc(t,"320","13");case 60:return new Dc(t,"310","15");case 61:return new Dc(t,"320","15");case 62:return new Dc(t,"310","17");case 63:return new Dc(t,"320","17")}}catch(e){throw console.log(e),new Hs("unknown decoder: "+t)}}($u.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),o=[r[0],r[1],n[0],n[1]];return new Ss(e,null,null,o,Ds.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null===r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);n+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(n+=s.getChecksumPortion(),o++)}return 211*(o-4)+(n%=211)===e.getValue()},e.getNextSecondBar=function(t,e){var r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r},e.prototype.retrieveNextPair=function(t,r,n){var o,i=r.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,r,s),null===(o=this.parseFoundFinderPattern(t,n,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var u,c=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new hs;try{u=this.decodeDataCharacter(t,o,i,!1)}catch(t){u=null,console.log(t)}return new Oc(c,u,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,r,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();if(n>=0)i=n;else if(this.isEmptyPair(r))i=0;else{i=r[r.length-1].getFinderPattern().getStartEnd()[1]}var s=r.length%2!=0;this.startFromEven&&(s=!s);for(var u=!1;i<a&&(u=!t.get(i));)i++;for(var c=0,l=i,d=i;d<a;d++)if(t.get(d)!==u)o[c]++;else{if(3===c){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=d);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,c--}else c++;o[c]=1,u=!u}throw new hs},e.reverseCounters=function(t){for(var e=t.length,r=0;r<e/2;++r){var n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}},e.prototype.parseFoundFinderPattern=function(t,r,n){var o,i,a;if(n){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,c=this.getDecodeFinderCounters();ja.arraycopy(c,0,c,1,c.length-1),c[0]=o;try{u=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch(t){return null}return new Zu(u,[i,a],i,a,r)},e.prototype.decodeDataCharacter=function(t,r,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,r.getStartEnd()[0],i);else{e.recordPattern(t,r.getStartEnd()[1],i);for(var s=0,u=i.length-1;s<u;s++,u--){var c=i[s];i[s]=i[u],i[u]=c}}var l=Ws.sum(new Int32Array(i))/17,d=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(l-d)/d>.3)throw new hs;var h=this.getOddCounts(),f=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,w=m+.5;if(w<1){if(m<.3)throw new hs;w=1}else if(w>8){if(m>8.7)throw new hs;w=8}var y=s/2;0==(1&s)?(h[y]=w,p[y]=m-w):(f[y]=w,g[y]=m-w)}this.adjustOddEvenCounts(17);var _=4*r.getValue()+(n?0:2)+(o?0:1)-1,v=0,E=0;for(s=h.length-1;s>=0;s--){if(e.isNotA1left(r,n,o)){var b=e.WEIGHTS[_][2*s];E+=h[s]*b}v+=h[s]}var A=0;for(s=f.length-1;s>=0;s--)if(e.isNotA1left(r,n,o)){b=e.WEIGHTS[_][2*s+1];A+=f[s]*b}var C=E+A;if(0!=(1&v)||v>13||v<4)throw new hs;var x=(13-v)/2,I=e.SYMBOL_WIDEST[x],S=9-I,T=Ku.getRSSvalue(h,I,!0),D=Ku.getRSSvalue(f,S,!1),O=e.EVEN_TOTAL_SUBSET[x],R=e.GSUM[x];return new Yu(T*O+D+R,C)},e.isNotA1left=function(t,e,r){return!(0===t.getValue()&&e&&r)},e.prototype.adjustOddEvenCounts=function(t){var r=Ws.sum(new Int32Array(this.getOddCounts())),n=Ws.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;r>13?i=!0:r<4&&(o=!0);var a=!1,s=!1;n>13?s=!0:n<4&&(a=!0);var u=r+n-t,c=1==(1&r),l=0==(1&n);if(1===u)if(c){if(l)throw new hs;i=!0}else{if(!l)throw new hs;s=!0}else if(-1===u)if(c){if(l)throw new hs;o=!0}else{if(!l)throw new hs;a=!0}else{if(0!==u)throw new hs;if(c){if(!l)throw new hs;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new hs}if(o){if(i)throw new hs;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new hs;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Xu),Pc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bc=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.count=0,o.finderPattern=n,o}return Pc(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Yu),Fc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return Fc(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.decodePair(r,!1,t,n);e.addOrTally(this.possibleLeftPairs,u),r.reverse();var c=this.decodePair(r,!0,t,n);e.addOrTally(this.possibleRightPairs,c),r.reverse();try{for(var l=Lc(this.possibleLeftPairs),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.getCount()>1)try{for(var f=(a=void 0,Lc(this.possibleRightPairs)),p=f.next();!p.done;p=f.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(h,g))return e.constructResult(h,g)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new hs},e.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var i=Lc(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new cs,i=13-n.length;i>0;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=0==(1&i)?3*s:s}10===(a=10-a%10)&&(a=0),o.append(a.toString());var u=t.getFinderPattern().getResultPoints(),c=e.getFinderPattern().getResultPoints();return new Ss(o.toString(),null,0,[u[0],u[1],c[0],c[1]],Ds.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n},e.prototype.decodePair=function(t,e,r,n){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,r,e,o),a=null==n?null:n.get(Ja.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new Ys(s,r))}var u=this.decodeDataCharacter(t,i,!0),c=this.decodeDataCharacter(t,i,!1);return new Bc(1597*u.getValue()+c.getValue(),u.getChecksumPortion()+4*c.getChecksumPortion(),i)}catch(t){return null}},e.prototype.decodeDataCharacter=function(t,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)su.recordPatternInReverse(t,r.getStartEnd()[0],o);else{su.recordPattern(t,r.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var u=o[a];o[a]=o[s],o[s]=u}}var c=n?16:15,l=Ws.sum(new Int32Array(o))/c,d=this.getOddCounts(),h=this.getEvenCounts(),f=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var w=Math.floor(a/2);0==(1&a)?(d[w]=m,f[w]=g-m):(h[w]=m,p[w]=g-m)}this.adjustOddEvenCounts(n,c);var y=0,_=0;for(a=d.length-1;a>=0;a--)_*=9,_+=d[a],y+=d[a];var v=0,E=0;for(a=h.length-1;a>=0;a--)v*=9,v+=h[a],E+=h[a];var b=_+3*v;if(n){if(0!=(1&y)||y>12||y<4)throw new hs;var A=(12-y)/2,C=9-(D=e.OUTSIDE_ODD_WIDEST[A]),x=Ku.getRSSvalue(d,D,!1),I=Ku.getRSSvalue(h,C,!0),S=e.OUTSIDE_EVEN_TOTAL_SUBSET[A],T=e.OUTSIDE_GSUM[A];return new Yu(x*S+I+T,b)}if(0!=(1&E)||E>10||E<4)throw new hs;A=(10-E)/2,C=9-(D=e.INSIDE_ODD_WIDEST[A]),x=Ku.getRSSvalue(d,D,!0),I=Ku.getRSSvalue(h,C,!1);var D,O=e.INSIDE_ODD_TOTAL_SUBSET[A];T=e.INSIDE_GSUM[A];return new Yu(I*O+x+T,b)},e.prototype.findFinderPattern=function(t,e){var r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var n=t.getSize(),o=!1,i=0;i<n&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,u=i;u<n;u++)if(t.get(u)!==o)r[a]++;else{if(3===a){if(Xu.isFinderPattern(r))return[s,u];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,o=!o}throw new hs},e.prototype.parseFoundFinderPattern=function(t,r,n,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);ja.arraycopy(u,0,c,1,u.length-1),c[0]=s;var l=this.parseFinderValue(c,e.FINDER_PATTERNS),d=a,h=o[1];return n&&(d=t.getSize()-1-d,h=t.getSize()-1-h),new Zu(l,[a,o[1]],d,h,r)},e.prototype.adjustOddEvenCounts=function(t,e){var r=Ws.sum(new Int32Array(this.getOddCounts())),n=Ws.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(r>12?i=!0:r<4&&(o=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?i=!0:r<5&&(o=!0),n>10?s=!0:n<4&&(a=!0));var u=r+n-e,c=(1&r)==(t?1:0),l=1==(1&n);if(1===u)if(c){if(l)throw new hs;i=!0}else{if(!l)throw new hs;s=!0}else if(-1===u)if(c){if(l)throw new hs;o=!0}else{if(!l)throw new hs;a=!0}else{if(0!==u)throw new hs;if(c){if(!l)throw new hs;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new hs}if(o){if(i)throw new hs;Xu.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Xu.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new hs;Xu.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Xu.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Xu),Uc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vc=function(t){function e(e){var r=t.call(this)||this;r.readers=[];var n=e?e.get(Ja.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(Ja.ASSUME_CODE_39_CHECK_DIGIT),i=e&&void 0!==e.get(Ja.ENABLE_CODE_39_EXTENDED_MODE);return n&&((n.includes(Ds.EAN_13)||n.includes(Ds.UPC_A)||n.includes(Ds.EAN_8)||n.includes(Ds.UPC_E))&&r.readers.push(new Vu(e)),n.includes(Ds.CODE_39)&&r.readers.push(new hu(o,i)),n.includes(Ds.CODE_93)&&r.readers.push(new gu),n.includes(Ds.CODE_128)&&r.readers.push(new cu),n.includes(Ds.ITF)&&r.readers.push(new yu),n.includes(Ds.CODABAR)&&r.readers.push(new ju),n.includes(Ds.RSS_14)&&r.readers.push(new zc),n.includes(Ds.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new kc))),0===r.readers.length&&(r.readers.push(new Vu(e)),r.readers.push(new hu),r.readers.push(new gu),r.readers.push(new Vu(e)),r.readers.push(new cu),r.readers.push(new yu),r.readers.push(new zc)),r}return Uc(e,t),e.prototype.decodeRow=function(t,e,r){for(var n=0;n<this.readers.length;n++)try{return this.readers[n].decodeRow(t,e,r)}catch(t){}throw new hs},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(su),Hc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return void 0===e&&(e=500),t.call(this,new Vc(r),e,r)||this}Hc(e,t)}(Is);var jc,Gc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wc=function(){function t(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Xc=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Yc=function(){function t(t,e,r,n,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=o,this.ecBlocks=i;var u=0,c=i.getECCodewords(),l=i.getECBlocks();try{for(var d=Gc(l),h=d.next();!h.done;h=d.next()){var f=h.value;u+=f.getCount()*(f.getDataCodewords()+c)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,o;if(0!=(1&e)||0!=(1&r))throw new es;try{for(var i=Gc(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new es},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Wc(5,new Xc(1,3))),new t(2,12,12,10,10,new Wc(7,new Xc(1,5))),new t(3,14,14,12,12,new Wc(10,new Xc(1,8))),new t(4,16,16,14,14,new Wc(12,new Xc(1,12))),new t(5,18,18,16,16,new Wc(14,new Xc(1,18))),new t(6,20,20,18,18,new Wc(18,new Xc(1,22))),new t(7,22,22,20,20,new Wc(20,new Xc(1,30))),new t(8,24,24,22,22,new Wc(24,new Xc(1,36))),new t(9,26,26,24,24,new Wc(28,new Xc(1,44))),new t(10,32,32,14,14,new Wc(36,new Xc(1,62))),new t(11,36,36,16,16,new Wc(42,new Xc(1,86))),new t(12,40,40,18,18,new Wc(48,new Xc(1,114))),new t(13,44,44,20,20,new Wc(56,new Xc(1,144))),new t(14,48,48,22,22,new Wc(68,new Xc(1,174))),new t(15,52,52,24,24,new Wc(42,new Xc(2,102))),new t(16,64,64,14,14,new Wc(56,new Xc(2,140))),new t(17,72,72,16,16,new Wc(36,new Xc(4,92))),new t(18,80,80,18,18,new Wc(48,new Xc(4,114))),new t(19,88,88,20,20,new Wc(56,new Xc(4,144))),new t(20,96,96,22,22,new Wc(68,new Xc(4,174))),new t(21,104,104,24,24,new Wc(56,new Xc(6,136))),new t(22,120,120,18,18,new Wc(68,new Xc(6,175))),new t(23,132,132,20,20,new Wc(62,new Xc(8,163))),new t(24,144,144,22,22,new Wc(62,new Xc(8,156),new Xc(2,155))),new t(25,8,18,6,16,new Wc(7,new Xc(1,5))),new t(26,8,32,6,14,new Wc(11,new Xc(1,10))),new t(27,12,26,10,24,new Wc(14,new Xc(1,16))),new t(28,12,36,10,16,new Wc(18,new Xc(1,22))),new t(29,16,36,14,16,new Wc(24,new Xc(1,32))),new t(30,16,48,14,22,new Wc(28,new Xc(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),Zc=function(){function t(e){var r=e.getHeight();if(r<8||r>144||0!=(1&r))throw new es;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new ls(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return Yc.getVersionForDimensions(e,r)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,u=!1,c=!1;do{if(r!==o||0!==n||a)if(r!==o-2||0!==n||0==(3&i)||s)if(r!==o+4||2!==n||0!=(7&i)||u)if(r!==o-2||0!==n||4!=(7&i)||c){do{r<o&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r-=2,n+=2}while(r>=0&&n<i);r+=1,n+=3;do{r>=0&&n<i&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r+=2,n-=2}while(r<o&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,i),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner3(o,i),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner2(o,i),r-=2,n+=2,s=!0;else t[e++]=255&this.readCorner1(o,i),r-=2,n+=2,a=!0}while(r<o||n<i);if(e!==this.version.getTotalCodewords())throw new es;return t},t.prototype.readModule=function(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,r,n){var o=0;return this.readModule(t-2,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-2,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e,r,n)&&(o|=1),o<<=1,this.readModule(t,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t,e,r,n)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.readCorner2=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner3=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner4=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new La("Dimension of bitMatrix must match the version size");for(var n=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/n|0,a=r/o|0,s=new ls(a*o,i*n),u=0;u<i;++u)for(var c=u*n,l=0;l<a;++l)for(var d=l*o,h=0;h<n;++h)for(var f=u*(n+2)+1+h,p=c+h,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,f)){var w=d+g;s.set(w,p)}}return s},t}(),qc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Kc=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r){var n,o,i,a,s=r.getECBlocks(),u=0,c=s.getECBlocks();try{for(var l=qc(c),d=l.next();!d.done;d=l.next()){u+=(m=d.value).getCount()}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var h=new Array(u),f=0;try{for(var p=qc(c),g=p.next();!g.done;g=p.next())for(var m=g.value,w=0;w<m.getCount();w++){var y=m.getDataCodewords(),_=s.getECCodewords()+y;h[f++]=new t(y,new Uint8Array(_))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var v=h[0].codewords.length-s.getECCodewords(),E=v-1,b=0;for(w=0;w<E;w++)for(var A=0;A<f;A++)h[A].codewords[w]=e[b++];var C=24===r.getVersionNumber(),x=C?8:f;for(A=0;A<x;A++)h[A].codewords[v-1]=e[b++];var I=h[0].codewords.length;for(w=v;w<I;w++)for(A=0;A<f;A++){var S=C?(A+8)%f:A,T=C&&S>7?w-1:w;h[S].codewords[T]=e[b++]}if(b!==e.length)throw new La;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),$c=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new La(""+t);var e=0,r=this.bitOffset,n=this.byteOffset,o=this.bytes;if(r>0){var i=8-r,a=t<i?t:i,s=255>>8-a<<(u=i-a);e=(o[n]&s)>>u,t-=a,8===(r+=a)&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&o[n],n++,t-=8;if(t>0){var u;s=255>>(u=8-t)<<u;e=e<<t|(o[n]&s)>>u,r+=t}}return this.bitOffset=r,this.byteOffset=n,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(jc||(jc={}));var Qc,Jc=function(){function t(){}return t.decode=function(t){var e=new $c(t),r=new cs,n=new cs,o=new Array,i=jc.ASCII_ENCODE;do{if(i===jc.ASCII_ENCODE)i=this.decodeAsciiSegment(e,r,n);else{switch(i){case jc.C40_ENCODE:this.decodeC40Segment(e,r);break;case jc.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case jc.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case jc.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case jc.BASE256_ENCODE:this.decodeBase256Segment(e,r,o);break;default:throw new es}i=jc.ASCII_ENCODE}}while(i!==jc.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new Ms(t,r.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,r){var n=!1;do{var o=t.readBits(8);if(0===o)throw new es;if(o<=128)return n&&(o+=128),e.append(String.fromCharCode(o-1)),jc.ASCII_ENCODE;if(129===o)return jc.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return jc.C40_ENCODE;case 231:return jc.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return jc.ANSIX12_ENCODE;case 239:return jc.TEXT_ENCODE;case 240:return jc.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new es}}while(t.available()>0);return jc.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new es;var u=this.C40_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length){u=this.C40_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new es}o=0;break;case 3:r?(e.append(String.fromCharCode(s+224)),r=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new es}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new es;var u=this.TEXT_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length){u=this.TEXT_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new es}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new es;u=this.TEXT_SHIFT3_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u),o=0;break;default:throw new es}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var r=[];do{if(8===t.available())return;var n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(var o=0;o<3;o++){var i=r[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new es;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);r[0]=o,n-=1600*o,o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var r=0;r<4;r++){var n=t.readBits(6);if(31===n){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}0==(32&n)&&(n|=64),e.append(String.fromCharCode(n))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,r){var n,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((n=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new es;for(var a=new Uint8Array(n),s=0;s<n;s++){if(t.available()<8)throw new es;a[s]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(ss.decode(a,us.ISO88591))}catch(t){throw new Hs("Platform does not support required encoding: "+t.message)}},t.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],t}(),tl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},el=function(){function t(){this.rsDecoder=new js(Ls.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,r,n=new Zc(t),o=n.getVersion(),i=n.readCodewords(),a=Kc.getDataBlocks(i,o),s=0;try{for(var u=tl(a),c=u.next();!c.done;c=u.next()){s+=c.value.getNumDataCodewords()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),d=a.length,h=0;h<d;h++){var f=a[h],p=f.getCodewords(),g=f.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*d+h]=p[m]}return Jc.decode(l)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Va}for(var n=0;n<e;n++)t[n]=r[n]},t}(),rl=function(){function t(t){this.image=t,this.rectangleDetector=new $s(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if((r=this.detectSolid2(r))[3]=this.correctTopRight(r),!r[3])throw new hs;var n=(r=this.shiftToModuleCenter(r))[0],o=r[1],i=r[2],a=r[3],s=this.transitionsBetween(n,a)+1,u=this.transitionsBetween(i,a)+1;1==(1&s)&&(s+=1),1==(1&u)&&(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var c=t.sampleGrid(this.image,n,o,i,a,s,u);return new Zs(c,[n,o,i,a])},t.shiftPoint=function(t,e,r){var n=(e.getX()-t.getX())/(r+1),o=(e.getY()-t.getY())/(r+1);return new Ys(t.getX()+n,t.getY()+o)},t.moveAway=function(t,e,r){var n=t.getX(),o=t.getY();return n<e?n-=1:n+=1,o<r?o-=1:o+=1,new Ys(n,o)},t.prototype.detectSolid1=function(t){var e=t[0],r=t[1],n=t[3],o=t[2],i=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,o),u=this.transitionsBetween(o,e),c=i,l=[o,e,r,n];return c>a&&(c=a,l[0]=e,l[1]=r,l[2]=n,l[3]=o),c>s&&(c=s,l[0]=r,l[1]=n,l[2]=o,l[3]=e),c>u&&(l[0]=n,l[1]=o,l[2]=e,l[3]=r),l},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=t.shiftPoint(n,o,4*(a+1)),u=t.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,r)<this.transitionsBetween(u,i)?(e[0]=r,e[1]=n,e[2]=o,e[3]=i):(e[0]=n,e[1]=o,e[2]=i,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=this.transitionsBetween(n,i),u=t.shiftPoint(r,n,4*(s+1)),c=t.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(c,i);var l=new Ys(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),d=new Ys(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1));return this.isValid(l)?this.isValid(d)?this.transitionsBetween(u,l)+this.transitionsBetween(c,l)>this.transitionsBetween(u,d)+this.transitionsBetween(c,d)?l:d:l:this.isValid(d)?d:null},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i)+1,s=this.transitionsBetween(o,i)+1,u=t.shiftPoint(r,n,4*s),c=t.shiftPoint(o,n,4*a);1==(1&(a=this.transitionsBetween(u,i)+1))&&(a+=1),1==(1&(s=this.transitionsBetween(c,i)+1))&&(s+=1);var l,d,h=(r.getX()+n.getX()+o.getX()+i.getX())/4,f=(r.getY()+n.getY()+o.getY()+i.getY())/4;return r=t.moveAway(r,h,f),n=t.moveAway(n,h,f),o=t.moveAway(o,h,f),i=t.moveAway(i,h,f),u=t.shiftPoint(r,n,4*s),u=t.shiftPoint(u,i,4*a),l=t.shiftPoint(n,r,4*s),l=t.shiftPoint(l,o,4*a),c=t.shiftPoint(o,i,4*s),c=t.shiftPoint(c,n,4*a),d=t.shiftPoint(i,o,4*s),[u,l,c,d=t.shiftPoint(d,r,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,r,n,o,i,a){return ru.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),n.getX(),n.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(t,e){var r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-n)>Math.abs(o-r);if(a){var s=r;r=n,n=s,s=o,o=i,i=s}for(var u=Math.abs(o-r),c=Math.abs(i-n),l=-u/2,d=n<i?1:-1,h=r<o?1:-1,f=0,p=this.image.get(a?n:r,a?r:n),g=r,m=n;g!==o;g+=h){var w=this.image.get(a?m:g,a?g:m);if(w!==p&&(f++,p=w),(l+=c)>0){if(m===i)break;m+=d,l-=u}}return f},t}(),nl=function(){function t(){this.decoder=new el}return t.prototype.decode=function(e,r){var n,o;if(void 0===r&&(r=null),null!=r&&r.has(Ja.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new rl(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),u=new Ss(n.getText(),s,8*s.length,o,Ds.DATA_MATRIX,ja.currentTimeMillis()),c=n.getByteSegments();null!=c&&u.putMetadata(Rs.BYTE_SEGMENTS,c);var l=n.getECLevel();return null!=l&&u.putMetadata(Rs.ERROR_CORRECTION_LEVEL,l),u},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new hs;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=(r[0]-a+1)/n,u=(i-o+1)/n;if(s<=0||u<=0)throw new hs;var c=n/2;o+=c,a+=c;for(var l=new ls(s,u),d=0;d<u;d++)for(var h=o+d*n,f=0;f<s;f++)t.get(a+f*n,h)&&l.set(f,d);return l},t.moduleSize=function(t,e){for(var r=e.getWidth(),n=t[0],o=t[1];n<r&&e.get(n,o);)n++;if(n===r)throw new hs;var i=n-t[0];if(0===i)throw new hs;return i},t.NO_POINTS=[],t}(),ol=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new nl,e)||this}ol(e,t)}(Is),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}(Qc||(Qc={}));var il,al=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Ba(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new La;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(Qc.L,"L",1),t.M=new t(Qc.M,"M",0),t.Q=new t(Qc.Q,"Q",3),t.H=new t(Qc.H,"H",2),t}(),sl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ul=function(){function t(t){this.errorCorrectionLevel=al.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Ka.bitCount(t^e)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return null!==n?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=sl(t.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var c=u.value,l=c[0];if(l===e||l===r)return new t(c[1]);var d=t.numBitsDiffering(e,l);d<i&&(a=c[1],i=d),e!==r&&(d=t.numBitsDiffering(r,l))<i&&(a=c[1],i=d)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),cl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ll=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,r=0,n=this.ecBlocks;try{for(var o=cl(n),i=o.next();!i.done;i=o.next()){r+=i.value.getCount()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),dl=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),hl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},fl=function(){function t(t,e){for(var r,n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var c=hl(u),l=c.next();!l.done;l=c.next()){var d=l.value;a+=d.getCount()*(d.getDataCodewords()+s)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new es;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new es}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new La;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=ul.numBitsDiffering(e,i);a<r&&(n=o+7,r=a)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new ls(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,n=0;n<r;n++)for(var o=this.alignmentPatternCenters[n]-2,i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new ll(7,new dl(1,19)),new ll(10,new dl(1,16)),new ll(13,new dl(1,13)),new ll(17,new dl(1,9))),new t(2,Int32Array.from([6,18]),new ll(10,new dl(1,34)),new ll(16,new dl(1,28)),new ll(22,new dl(1,22)),new ll(28,new dl(1,16))),new t(3,Int32Array.from([6,22]),new ll(15,new dl(1,55)),new ll(26,new dl(1,44)),new ll(18,new dl(2,17)),new ll(22,new dl(2,13))),new t(4,Int32Array.from([6,26]),new ll(20,new dl(1,80)),new ll(18,new dl(2,32)),new ll(26,new dl(2,24)),new ll(16,new dl(4,9))),new t(5,Int32Array.from([6,30]),new ll(26,new dl(1,108)),new ll(24,new dl(2,43)),new ll(18,new dl(2,15),new dl(2,16)),new ll(22,new dl(2,11),new dl(2,12))),new t(6,Int32Array.from([6,34]),new ll(18,new dl(2,68)),new ll(16,new dl(4,27)),new ll(24,new dl(4,19)),new ll(28,new dl(4,15))),new t(7,Int32Array.from([6,22,38]),new ll(20,new dl(2,78)),new ll(18,new dl(4,31)),new ll(18,new dl(2,14),new dl(4,15)),new ll(26,new dl(4,13),new dl(1,14))),new t(8,Int32Array.from([6,24,42]),new ll(24,new dl(2,97)),new ll(22,new dl(2,38),new dl(2,39)),new ll(22,new dl(4,18),new dl(2,19)),new ll(26,new dl(4,14),new dl(2,15))),new t(9,Int32Array.from([6,26,46]),new ll(30,new dl(2,116)),new ll(22,new dl(3,36),new dl(2,37)),new ll(20,new dl(4,16),new dl(4,17)),new ll(24,new dl(4,12),new dl(4,13))),new t(10,Int32Array.from([6,28,50]),new ll(18,new dl(2,68),new dl(2,69)),new ll(26,new dl(4,43),new dl(1,44)),new ll(24,new dl(6,19),new dl(2,20)),new ll(28,new dl(6,15),new dl(2,16))),new t(11,Int32Array.from([6,30,54]),new ll(20,new dl(4,81)),new ll(30,new dl(1,50),new dl(4,51)),new ll(28,new dl(4,22),new dl(4,23)),new ll(24,new dl(3,12),new dl(8,13))),new t(12,Int32Array.from([6,32,58]),new ll(24,new dl(2,92),new dl(2,93)),new ll(22,new dl(6,36),new dl(2,37)),new ll(26,new dl(4,20),new dl(6,21)),new ll(28,new dl(7,14),new dl(4,15))),new t(13,Int32Array.from([6,34,62]),new ll(26,new dl(4,107)),new ll(22,new dl(8,37),new dl(1,38)),new ll(24,new dl(8,20),new dl(4,21)),new ll(22,new dl(12,11),new dl(4,12))),new t(14,Int32Array.from([6,26,46,66]),new ll(30,new dl(3,115),new dl(1,116)),new ll(24,new dl(4,40),new dl(5,41)),new ll(20,new dl(11,16),new dl(5,17)),new ll(24,new dl(11,12),new dl(5,13))),new t(15,Int32Array.from([6,26,48,70]),new ll(22,new dl(5,87),new dl(1,88)),new ll(24,new dl(5,41),new dl(5,42)),new ll(30,new dl(5,24),new dl(7,25)),new ll(24,new dl(11,12),new dl(7,13))),new t(16,Int32Array.from([6,26,50,74]),new ll(24,new dl(5,98),new dl(1,99)),new ll(28,new dl(7,45),new dl(3,46)),new ll(24,new dl(15,19),new dl(2,20)),new ll(30,new dl(3,15),new dl(13,16))),new t(17,Int32Array.from([6,30,54,78]),new ll(28,new dl(1,107),new dl(5,108)),new ll(28,new dl(10,46),new dl(1,47)),new ll(28,new dl(1,22),new dl(15,23)),new ll(28,new dl(2,14),new dl(17,15))),new t(18,Int32Array.from([6,30,56,82]),new ll(30,new dl(5,120),new dl(1,121)),new ll(26,new dl(9,43),new dl(4,44)),new ll(28,new dl(17,22),new dl(1,23)),new ll(28,new dl(2,14),new dl(19,15))),new t(19,Int32Array.from([6,30,58,86]),new ll(28,new dl(3,113),new dl(4,114)),new ll(26,new dl(3,44),new dl(11,45)),new ll(26,new dl(17,21),new dl(4,22)),new ll(26,new dl(9,13),new dl(16,14))),new t(20,Int32Array.from([6,34,62,90]),new ll(28,new dl(3,107),new dl(5,108)),new ll(26,new dl(3,41),new dl(13,42)),new ll(30,new dl(15,24),new dl(5,25)),new ll(28,new dl(15,15),new dl(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new ll(28,new dl(4,116),new dl(4,117)),new ll(26,new dl(17,42)),new ll(28,new dl(17,22),new dl(6,23)),new ll(30,new dl(19,16),new dl(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new ll(28,new dl(2,111),new dl(7,112)),new ll(28,new dl(17,46)),new ll(30,new dl(7,24),new dl(16,25)),new ll(24,new dl(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new ll(30,new dl(4,121),new dl(5,122)),new ll(28,new dl(4,47),new dl(14,48)),new ll(30,new dl(11,24),new dl(14,25)),new ll(30,new dl(16,15),new dl(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new ll(30,new dl(6,117),new dl(4,118)),new ll(28,new dl(6,45),new dl(14,46)),new ll(30,new dl(11,24),new dl(16,25)),new ll(30,new dl(30,16),new dl(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new ll(26,new dl(8,106),new dl(4,107)),new ll(28,new dl(8,47),new dl(13,48)),new ll(30,new dl(7,24),new dl(22,25)),new ll(30,new dl(22,15),new dl(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new ll(28,new dl(10,114),new dl(2,115)),new ll(28,new dl(19,46),new dl(4,47)),new ll(28,new dl(28,22),new dl(6,23)),new ll(30,new dl(33,16),new dl(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new ll(30,new dl(8,122),new dl(4,123)),new ll(28,new dl(22,45),new dl(3,46)),new ll(30,new dl(8,23),new dl(26,24)),new ll(30,new dl(12,15),new dl(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new ll(30,new dl(3,117),new dl(10,118)),new ll(28,new dl(3,45),new dl(23,46)),new ll(30,new dl(4,24),new dl(31,25)),new ll(30,new dl(11,15),new dl(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new ll(30,new dl(7,116),new dl(7,117)),new ll(28,new dl(21,45),new dl(7,46)),new ll(30,new dl(1,23),new dl(37,24)),new ll(30,new dl(19,15),new dl(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new ll(30,new dl(5,115),new dl(10,116)),new ll(28,new dl(19,47),new dl(10,48)),new ll(30,new dl(15,24),new dl(25,25)),new ll(30,new dl(23,15),new dl(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new ll(30,new dl(13,115),new dl(3,116)),new ll(28,new dl(2,46),new dl(29,47)),new ll(30,new dl(42,24),new dl(1,25)),new ll(30,new dl(23,15),new dl(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new ll(30,new dl(17,115)),new ll(28,new dl(10,46),new dl(23,47)),new ll(30,new dl(10,24),new dl(35,25)),new ll(30,new dl(19,15),new dl(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new ll(30,new dl(17,115),new dl(1,116)),new ll(28,new dl(14,46),new dl(21,47)),new ll(30,new dl(29,24),new dl(19,25)),new ll(30,new dl(11,15),new dl(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new ll(30,new dl(13,115),new dl(6,116)),new ll(28,new dl(14,46),new dl(23,47)),new ll(30,new dl(44,24),new dl(7,25)),new ll(30,new dl(59,16),new dl(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new ll(30,new dl(12,121),new dl(7,122)),new ll(28,new dl(12,47),new dl(26,48)),new ll(30,new dl(39,24),new dl(14,25)),new ll(30,new dl(22,15),new dl(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new ll(30,new dl(6,121),new dl(14,122)),new ll(28,new dl(6,47),new dl(34,48)),new ll(30,new dl(46,24),new dl(10,25)),new ll(30,new dl(2,15),new dl(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new ll(30,new dl(17,122),new dl(4,123)),new ll(28,new dl(29,46),new dl(14,47)),new ll(30,new dl(49,24),new dl(10,25)),new ll(30,new dl(24,15),new dl(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new ll(30,new dl(4,122),new dl(18,123)),new ll(28,new dl(13,46),new dl(32,47)),new ll(30,new dl(48,24),new dl(14,25)),new ll(30,new dl(42,15),new dl(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new ll(30,new dl(20,117),new dl(4,118)),new ll(28,new dl(40,47),new dl(7,48)),new ll(30,new dl(43,24),new dl(22,25)),new ll(30,new dl(10,15),new dl(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new ll(30,new dl(19,118),new dl(6,119)),new ll(28,new dl(18,47),new dl(31,48)),new ll(30,new dl(34,24),new dl(34,25)),new ll(30,new dl(20,15),new dl(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(il||(il={}));var pl,gl=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var r=0;r<e;r++)for(var n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)},t.values=new Map([[il.DATA_MASK_000,new t(il.DATA_MASK_000,(function(t,e){return 0==(t+e&1)}))],[il.DATA_MASK_001,new t(il.DATA_MASK_001,(function(t,e){return 0==(1&t)}))],[il.DATA_MASK_010,new t(il.DATA_MASK_010,(function(t,e){return e%3==0}))],[il.DATA_MASK_011,new t(il.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[il.DATA_MASK_100,new t(il.DATA_MASK_100,(function(t,e){return 0==(Math.floor(t/2)+Math.floor(e/3)&1)}))],[il.DATA_MASK_101,new t(il.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[il.DATA_MASK_110,new t(il.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[il.DATA_MASK_111,new t(il.DATA_MASK_111,(function(t,e){return 0==(t+e+t*e%3&1)}))]]),t}(),ml=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new es;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var r=5;r>=0;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),o=0,i=n-7;for(r=n-1;r>=i;r--)o=this.copyBit(8,r,o);for(e=n-8;e<n;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=ul.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new es},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return fl.getVersionForNumber(e);for(var r=0,n=t-11,o=5;o>=0;o--)for(var i=t-9;i>=n;i--)r=this.copyBit(i,o,r);var a=fl.decodeVersionInformation(r);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;r=0;for(i=5;i>=0;i--)for(o=t-9;o>=n;o--)r=this.copyBit(i,o,r);if(null!==(a=fl.decodeVersionInformation(r))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new es},t.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=gl.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,u=0,c=0,l=n-1;l>0;l-=2){6===l&&l--;for(var d=0;d<n;d++)for(var h=i?n-1-d:d,f=0;f<2;f++)o.get(l-f,h)||(c++,u<<=1,this.bitMatrix.get(l-f,h)&&(u|=1),8===c&&(a[s++]=u,c=0,u=0));i=!i}if(s!==e.getTotalCodewords())throw new es;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=gl.values.get(this.parsedFormatInfo.getDataMask()),e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,r=t.getWidth();e<r;e++)for(var n=e+1,o=t.getHeight();n<o;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))},t}(),wl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yl=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r,n){var o,i,a,s;if(e.length!==r.getTotalCodewords())throw new La;var u=r.getECBlocksForLevel(n),c=0,l=u.getECBlocks();try{for(var d=wl(l),h=d.next();!h.done;h=d.next()){c+=(w=h.value).getCount()}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var f=new Array(c),p=0;try{for(var g=wl(l),m=g.next();!m.done;m=g.next())for(var w=m.value,y=0;y<w.getCount();y++){var _=w.getDataCodewords(),v=u.getECCodewordsPerBlock()+_;f[p++]=new t(_,new Uint8Array(v))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var E=f[0].codewords.length,b=f.length-1;b>=0;){if(f[b].codewords.length===E)break;b--}b++;var A=E-u.getECCodewordsPerBlock(),C=0;for(y=0;y<A;y++)for(var x=0;x<p;x++)f[x].codewords[y]=e[C++];for(x=b;x<p;x++)f[x].codewords[A]=e[C++];var I=f[0].codewords.length;for(y=A;y<I;y++)for(x=0;x<p;x++){var S=x<b?y:y+1;f[x].codewords[S]=e[C++]}return f},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(pl||(pl={}));var _l,vl,El=function(){function t(e,r,n,o){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(void 0===r)throw new La;return r},t.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(pl.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(pl.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(pl.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(pl.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(pl.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(pl.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(pl.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(pl.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(pl.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(pl.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),bl=function(){function t(){}return t.decode=function(e,r,n,o){var i=new $c(e),a=new cs,s=new Array,u=-1,c=-1;try{var l=null,d=!1,h=void 0;do{if(i.available()<4)h=El.TERMINATOR;else{var f=i.readBits(4);h=El.forBits(f)}switch(h){case El.TERMINATOR:break;case El.FNC1_FIRST_POSITION:case El.FNC1_SECOND_POSITION:d=!0;break;case El.STRUCTURED_APPEND:if(i.available()<16)throw new es;u=i.readBits(8),c=i.readBits(8);break;case El.ECI:var p=t.parseECIValue(i);if(null===(l=os.getCharacterSetECIByValue(p)))throw new es;break;case El.HANZI:var g=i.readBits(4),m=i.readBits(h.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var w=i.readBits(h.getCharacterCountBits(r));switch(h){case El.NUMERIC:t.decodeNumericSegment(i,a,w);break;case El.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,w,d);break;case El.BYTE:t.decodeByteSegment(i,a,w,l,s,o);break;case El.KANJI:t.decodeKanjiSegment(i,a,w);break;default:throw new es}}}while(h!==El.TERMINATOR)}catch(t){throw new es}return new Ms(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),u,c)},t.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new es;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,n[o]=a>>8&255,n[o+1]=255&a,o+=2,r--}try{e.append(ss.decode(n,us.GB2312))}catch(t){throw new es(t)}},t.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new es;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,n[o]=a>>8,n[o+1]=a,o+=2,r--}try{e.append(ss.decode(n,us.SHIFT_JIS))}catch(t){throw new es(t)}},t.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new es;for(var a,s=new Uint8Array(r),u=0;u<r;u++)s[u]=t.readBits(8);a=null===n?us.guessEncoding(s,i):n.getName();try{e.append(ss.decode(s,a))}catch(t){throw new es(t)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new es;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,o){for(var i=r.length();n>1;){if(e.available()<11)throw new es;var a=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(a/45))),r.append(t.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new es;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<r.length();s++)"%"===r.charAt(s)&&(s<r.length()-1&&"%"===r.charAt(s+1)?r.deleteCharAt(s+1):r.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new es;var o=e.readBits(10);if(o>=1e3)throw new es;r.append(t.toAlphaNumericChar(Math.floor(o/100))),r.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),r.append(t.toAlphaNumericChar(o%10)),n-=3}if(2===n){if(e.available()<7)throw new es;var i=e.readBits(7);if(i>=100)throw new es;r.append(t.toAlphaNumericChar(Math.floor(i/10))),r.append(t.toAlphaNumericChar(i%10))}else if(1===n){if(e.available()<4)throw new es;var a=e.readBits(4);if(a>=10)throw new es;r.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(0==(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new es},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),Al=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),Cl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xl=function(){function t(){this.rsDecoder=new js(Ls.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(ls.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var r=new ml(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new Al(!0)),o}catch(t){if(null!==n)throw n;throw t}},t.prototype.decodeBitMatrixParser=function(t,e){var r,n,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),u=t.readCodewords(),c=yl.getDataBlocks(u,a,s),l=0;try{for(var d=Cl(c),h=d.next();!h.done;h=d.next()){l+=(w=h.value).getNumDataCodewords()}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}var f=new Uint8Array(l),p=0;try{for(var g=Cl(c),m=g.next();!m.done;m=g.next()){var w,y=(w=m.value).getCodewords(),_=w.getNumDataCodewords();this.correctErrors(y,_);for(var v=0;v<_;v++)f[p++]=y[v]}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return bl.decode(f,a,s,e)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Va}for(var n=0;n<e;n++)t[n]=r[n]},t}(),Il=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sl=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.estimatedModuleSize=n,o}return Il(e,t),e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){return new e((this.getX()+r)/2,(this.getY()+t)/2,(this.estimatedModuleSize+n)/2)},e}(Ys),Tl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Dl=function(){function t(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=n+(0==(1&a)?Math.floor((a+1)/2):-Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var u=t;u<r&&!i.get(u,s);)u++;for(var c=0;u<r;){if(i.get(u,s))if(1===c)o[1]++;else if(2===c){var l;if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,u)))return l;o[0]=o[2],o[1]=1,o[2]=0,c=1}else o[++c]++;else 1===c&&c++,o[c]++;u++}if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,r)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new hs},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,r=e/2,n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=e;u>=0&&i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&!i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u)&&s[1]<=n;)s[1]++,u++;if(u===a||s[1]>n)return NaN;for(;u<a&&!i.get(r,u)&&s[2]<=n;)s[2]++,u++;if(s[2]>n)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),u=this.crossCheckVertical(r,s,2*e[1],a);if(!isNaN(u)){var c=(e[0]+e[1]+e[2])/3;try{for(var l=Tl(this.possibleCenters),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.aboutEquals(c,u,s))return h.combineEstimate(u,s,c)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var f=new Sl(s,u,c);this.possibleCenters.push(f),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(f)}return null},t}(),Ol=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rl=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.estimatedModuleSize=n,i.count=o,void 0===o&&(i.count=1),i}return Ol(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){var o=this.count+1;return new e((this.count*this.getX()+r)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+n)/o,o)},e}(Ys),Ml=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),Nl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kl=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=null!=e&&void 0!==e.get(Ja.TRY_HARDER),n=null!=e&&void 0!==e.get(Ja.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var u=!1,c=new Int32Array(5),l=s-1;l<i&&!u;l+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,h=0;h<a;h++)if(o.get(h,l))1==(1&d)&&d++,c[d]++;else if(0==(1&d))if(4===d)if(t.foundPatternCross(c)){if(!0!==this.handlePossibleCenter(c,l,h,n)){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)u=this.haveMultiplyConfirmedCenters();else{var f=this.findRowSkip();f>c[2]&&(l+=f-c[2]-s,h=a-1)}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;else c[d]++;if(t.foundPatternCross(c))!0===this.handlePossibleCenter(c,l,a,n)&&(s=c[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return Ys.orderBestPatterns(p),new Ml(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,r,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&r>=a&&s.get(r-a,e-a);)i[2]++,a++;if(e<a||r<a)return!1;for(;e>=a&&r>=a&&!s.get(r-a,e-a)&&i[1]<=n;)i[1]++,a++;if(e<a||r<a||i[1]>n)return!1;for(;e>=a&&r>=a&&s.get(r-a,e-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var u=s.getHeight(),c=s.getWidth();for(a=1;e+a<u&&r+a<c&&s.get(r+a,e+a);)i[2]++,a++;if(e+a>=u||r+a>=c)return!1;for(;e+a<u&&r+a<c&&!s.get(r+a,e+a)&&i[3]<n;)i[3]++,a++;if(e+a>=u||r+a>=c||i[3]>=n)return!1;for(;e+a<u&&r+a<c&&s.get(r+a,e+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,r,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(r,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(r,u)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(r,u)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(u,r);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,r)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(u,r)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(u,r);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,r)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(u,r)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var u=i/7,c=!1,l=this.possibleCenters,d=0,h=l.length;d<h;d++){var f=l[d];if(f.aboutEquals(u,s,a)){l[d]=f.combineEstimate(s,a,u),c=!0;break}}if(!c){var p=new Rl(a,s,u);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=Nl(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=Nl(this.possibleCenters),c=u.next();!c.done;c=u.next()){(p=c.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,d=0;try{for(var h=Nl(this.possibleCenters),f=h.next();!f.done;f=h.next()){var p=f.value;d+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}return d<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,r,n,o=this.possibleCenters.length;if(o<3)throw new hs;var i,a=this.possibleCenters;if(o>3){var s=0,u=0;try{for(var c=Nl(this.possibleCenters),l=c.next();!l.done;l=c.next()){var d=l.value.getEstimatedModuleSize();s+=d,u+=d*d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}i=s/o;var h=Math.sqrt(u/o-i*i);a.sort((function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?-1:r>n?1:0}));for(var f=Math.max(.2*i,h),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>f&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=Nl(a),w=m.next();!w.done;w=m.next()){s+=w.value.getEstimatedModuleSize()}}catch(t){r={error:t}}finally{try{w&&!w.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?1:r>n?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),Pl=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(Ja.NEED_RESULT_POINT_CALLBACK);var e=new kl(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(r,n,o);if(i<1)throw new hs("No pattern found in proccess finder.");var a=t.computeDimension(r,n,o,i),s=fl.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var l=n.getX()-r.getX()+o.getX(),d=n.getY()-r.getY()+o.getY(),h=1-3/u,f=Math.floor(r.getX()+h*(l-r.getX())),p=Math.floor(r.getY()+h*(d-r.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(i,f,p,g);break}catch(t){if(!(t instanceof hs))throw t}var m=t.createTransform(r,n,o,c,a),w=t.sampleGrid(this.image,m,a);return new Zs(w,null===c?[o,r,n]:[o,r,n,c])},t.createTransform=function(t,e,r,n,o){var i,a,s,u,c=o-3.5;return null!==n?(i=n.getX(),a=n.getY(),u=s=c-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),s=c,u=c),Js.quadrilateralToQuadrilateral(3.5,3.5,c,3.5,s,u,3.5,c,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},t.sampleGrid=function(t,e,r){return ru.getInstance().sampleGridWithTransform(t,r,r,e)},t.computeDimension=function(t,e,r,n){var o=Ws.round(Ys.distance(t,e)/n),i=Ws.round(Ys.distance(t,r)/n),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new hs("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,r,n){var o=this.sizeOfBlackWhiteBlackRun(t,e,r,n),i=1,a=t-(r-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(n-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),s=Math.abs(n-e),u=-a/2,c=t<r?1:-1,l=e<n?1:-1,d=0,h=r+c,f=t,p=e;f!==h;f+=c){var g=o?p:f,m=o?f:p;if(1===d===this.image.get(g,m)){if(2===d)return Ws.distance(f,p,t,e);d++}if((u+=s)>0){if(p===n)break;p+=l,u-=a}}return 2===d?Ws.distance(r+c,n,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,r,n){var o=Math.floor(n*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new hs("Alignment top exceeds estimated module size.");var s=Math.max(0,r-o),u=Math.min(this.image.getHeight()-1,r+o);if(u-s<3*t)throw new hs("Alignment bottom exceeds estimated module size.");return new Dl(this.image,i,s,a-i,u-s,t,this.resultPointCallback).find()},t}(),Bl=function(){function t(){this.decoder=new xl}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,o;if(null!=r&&void 0!==r.get(Ja.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,r),o=t.NO_POINTS}else{var a=new Pl(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(a.getBits(),r),o=a.getPoints()}n.getOther()instanceof Al&&n.getOther().applyMirroredCorrection(o);var s=new Ss(n.getText(),n.getRawBytes(),void 0,o,Ds.QR_CODE,void 0),u=n.getByteSegments();null!==u&&s.putMetadata(Rs.BYTE_SEGMENTS,u);var c=n.getECLevel();return null!==c&&s.putMetadata(Rs.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(Rs.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(Rs.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new hs;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(a>=s||o>=i)throw new hs;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new hs;var u=Math.round((s-a+1)/n),c=Math.round((i-o+1)/n);if(u<=0||c<=0)throw new hs;if(c!==u)throw new hs;var l=Math.floor(n/2);o+=l;var d=(a+=l)+Math.floor((u-1)*n)-s;if(d>0){if(d>l)throw new hs;a-=d}var h=o+Math.floor((c-1)*n)-i;if(h>0){if(h>l)throw new hs;o-=h}for(var f=new ls(u,c),p=0;p<c;p++)for(var g=o+Math.floor(p*n),m=0;m<u;m++)t.get(a+Math.floor(m*n),g)&&f.set(m,p);return f},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===n||i===r)throw new hs;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),Fl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ll=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return Ws.sum(t)},t.toIntArray=function(e){var r,n;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=Fl(e),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.getCodeword=function(e){var r=qa.binarySearch(t.SYMBOL_TABLE,262143&e);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),zl=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Ul=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vl=function(){function t(){}return t.detectMultiple=function(e,r,n){var o=e.getBlackMatrix(),i=t.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(n,o)),new zl(o,i)},t.detect=function(e,r){for(var n,o,i=new Array,a=0,s=0,u=!1;a<r.getHeight();){var c=t.findVertices(r,a,s);if(null!=c[0]||null!=c[3]){if(u=!0,i.push(c),!e)break;null!=c[2]?(s=Math.trunc(c[2].getX()),a=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),a=Math.trunc(c[4].getY()))}else{if(!u)break;u=!1,s=0;try{for(var l=(n=void 0,Ul(i)),d=l.next();!d.done;d=l.next()){var h=d.value;null!=h[1]&&(a=Math.trunc(Math.max(a,h[1].getY()))),null!=h[3]&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,r,n){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),r=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},t.findRowsWithPattern=function(e,r,n,o,i,a){for(var s=new Array(4),u=!1,c=new Int32Array(a.length);o<r;o+=t.ROW_STEP){if(null!=(f=t.findGuardPattern(e,i,o,n,!1,a,c))){for(;o>0;){if(null==(h=t.findGuardPattern(e,i,--o,n,!1,a,c))){o++;break}f=h}s[0]=new Ys(f[0],o),s[1]=new Ys(f[1],o),u=!0;break}}var l=o+1;if(u){for(var d=0,h=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<r;l++){var f;if(null!=(f=t.findGuardPattern(e,h[0],l,n,!1,a,c))&&Math.abs(h[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(h[1]-f[1])<t.MAX_PATTERN_DRIFT)h=f,d=0;else{if(d>t.SKIPPED_ROW_COUNT_MAX)break;d++}}l-=d+1,s[2]=new Ys(h[0],l),s[3]=new Ys(h[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&qa.fill(s,null),s},t.findGuardPattern=function(e,r,n,o,i,a,s){qa.fillWithin(s,0,s.length,0);for(var u=r,c=0;e.get(u,n)&&u>0&&c++<t.MAX_PIXEL_DRIFT;)u--;for(var l=u,d=0,h=a.length,f=i;l<o;l++){if(e.get(l,n)!==f)s[d]++;else{if(d===h-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([u,l]);u+=s[0]+s[1],ja.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,f=!f}}return d===h-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([u,l-1]):null},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return 1/0;u+=h}return u/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Hl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jl=function(){function t(t,e){if(0===e.length)throw new La;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-n),ja.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var n=0;try{for(var o=Hl(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;n=this.field.add(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}for(var s=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)s=this.field.add(this.field.multiply(t,s),this.coefficients[c]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new La("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;ja.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(r[s-a],n[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new La("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new La("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var u=r[s],c=0;c<i;c++)a[s+c]=this.field.add(a[s+c],this.field.multiply(u,o[c]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var r=this.coefficients.length,n=new Int32Array(r),o=0;o<r;o++)n[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new La;if(0===r)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+e),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],r);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new cs,e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Gl=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new La;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new Bs;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Wl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xl=function(t){function e(e,r){var n=t.call(this)||this;n.modulus=e,n.expTable=new Int32Array(e),n.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)n.expTable[i]=o,o=o*r%e;for(i=0;i<e-1;i++)n.logTable[n.expTable[i]]=i;return n.zero=new jl(n,new Int32Array([0])),n.one=new jl(n,new Int32Array([1])),n}return Wl(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new La;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new jl(this,r)},e.PDF417_GF=new e(Ll.NUMBER_OF_CODEWORDS,3),e}(Gl),Yl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zl=function(){function t(){this.field=Xl.PDF417_GF}return t.prototype.decode=function(t,e,r){for(var n,o,i=new jl(this.field,t),a=new Int32Array(e),s=!1,u=e;u>0;u--){var c=i.evaluateAt(this.field.exp(u));a[e-u]=c,0!==c&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=r)try{for(var d=Yl(r),h=d.next();!h.done;h=d.next()){var f=h.value,p=this.field.exp(t.length-1-f),g=new jl(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}var m=new jl(this.field,a),w=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),y=w[0],_=w[1],v=this.findErrorLocations(y),E=this.findErrorMagnitudes(_,y,v);for(u=0;u<v.length;u++){var b=t.length-1-this.field.log(v[u]);if(b<0)throw Va.getChecksumInstance();t[b]=this.field.subtract(t[b],E[u])}return v.length},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(r/2);){var u=o,c=a;if(a=s,(o=i).isZero())throw Va.getChecksumInstance();i=u;for(var l=this.field.getZero(),d=o.getCoefficient(o.getDegree()),h=this.field.inverse(d);i.getDegree()>=o.getDegree()&&!i.isZero();){var f=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),h);l=l.add(this.field.buildMonomial(f,p)),i=i.subtract(o.multiplyByMonomial(f,p))}s=l.multiply(a).subtract(c).negative()}var g=s.getCoefficient(0);if(0===g)throw Va.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,o=1;o<this.field.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=this.field.inverse(o),n++);if(n!==e)throw Va.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),i=1;i<=n;i++)o[n-i]=this.field.multiply(i,e.getCoefficient(i));var a=new jl(this.field,o),s=r.length,u=new Int32Array(s);for(i=0;i<s;i++){var c=this.field.inverse(r[i]),l=this.field.subtract(0,t.evaluateAt(c)),d=this.field.inverse(a.evaluateAt(c));u[i]=this.field.multiply(l,d)}return u},t}(),ql=function(){function t(e,r,n,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,o,i)}return t.prototype.constructor_1=function(t,e,r,n,o){var i=null==e||null==r,a=null==n||null==o;if(i&&a)throw new hs;i?(e=new Ys(0,n.getY()),r=new Ys(0,o.getY())):a&&(n=new Ys(t.getWidth()-1,e.getY()),o=new Ys(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,r){return null==e?r:null==r?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var u=n?this.topLeft:this.topRight,c=Math.trunc(u.getY()-e);c<0&&(c=0);var l=new Ys(u.getX(),c);n?o=l:a=l}if(r>0){var d=n?this.bottomLeft:this.bottomRight,h=Math.trunc(d.getY()+r);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var f=new Ys(d.getX(),h);n?i=f:s=f}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Kl=function(){function t(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),$l=function(){function t(){this.buffer=""}return t.form=function(t,e){var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[r];break;case"c":u=e[r][0];break;case"f":u=parseFloat(e[r]).toFixed(t);break;case"p":u=parseFloat(e[r]).toPrecision(t);break;case"e":u=parseFloat(e[r]).toExponential(t);break;case"x":u=parseInt(e[r]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==n?u+d:d+u;return u}}))},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Ql=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jl=function(){function t(t){this.boundingBox=new ql(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(null!=r)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(e)-n;if(o>=0&&null!=(r=this.codewords[o]))return r;if((o=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(r=this.codewords[o]))return r}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,r=new $l,n=0;try{for(var o=Ql(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?r.format("%3d: %3d|%3d%n",n++,a.getRowNumber(),a.getValue()):r.format("%3d: | %n",n++)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),td=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ed=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},rd=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,r=-1,n=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>r?(r=i(),(n=[]).push(o())):i()===r&&n.push(o())};try{for(var i=td(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=ed(a.value,2);o(s[0],s[1])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return Ll.toIntArray(n)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),nd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),od=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},id=function(t){function e(e,r){var n=t.call(this,e)||this;return n._isLeft=r,n}return nd(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var r=od(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,u=1,c=0,l=i;l<a;l++)if(null!=e[l]){var d=e[l],h=d.getRowNumber()-s;if(0===h)c++;else if(1===h)u=Math.max(u,c),c=1,s=d.getRowNumber();else if(h<0||d.getRowNumber()>=t.getRowCount()||h>l)e[l]=null;else{for(var f=void 0,p=(f=u>2?(u-2)*h:h)>=l,g=1;g<=f&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=d.getRowNumber(),c=1)}}},e.prototype.getRowHeights=function(){var t,e,r=this.getBarcodeMetadata();if(null==r)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);var n=new Int32Array(r.getRowCount());try{for(var o=od(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1,u=o;u<i;u++)if(null!=a[u]){var c=a[u];c.setRowNumberAsRowIndicatorColumn();var l=c.getRowNumber()-s;0===l||(1===l?s=c.getRowNumber():c.getRowNumber()>=t.getRowCount()?a[u]=null:s=c.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new rd,o=new rd,i=new rd,a=new rd;try{for(var s=od(r),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=c){c.setRowNumberAsRowIndicatorColumn();var l=c.getValue()%30,d=c.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:n.setValue(l+1)}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||n.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<Ll.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>Ll.MAX_ROWS_IN_BARCODE)return null;var h=new Kl(n.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(r,h),h},e.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(null!=t[r]){var o=n.getValue()%30,i=n.getRowNumber();if(i>e.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:o+1!==e.getColumnCount()&&(t[r]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(Jl),ad=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sd=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=Ll.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var r=this.detectionResultColumns[e].getCodewords(),n=0;n<r.length;n++)null!=r[n]&&(r[n].hasValidRowNumber()||this.adjustRowNumbers(e,n,r));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(var n=1;n<=this.barcodeColumnCount;n++){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o&&(o.setRowNumber(t[r].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[n].getCodewords()[r]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,r,n){var o,i;if(null!=this.detectionResultColumns[e-1]){var a=n[r],s=this.detectionResultColumns[e-1].getCodewords(),u=s;null!=this.detectionResultColumns[e+1]&&(u=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[r],c[3]=u[r],r>0&&(c[0]=n[r-1],c[4]=s[r-1],c[5]=u[r-1]),r>1&&(c[8]=n[r-2],c[10]=s[r-2],c[11]=u[r-2]),r<n.length-1&&(c[1]=n[r+1],c[6]=s[r+1],c[7]=u[r+1]),r<n.length-2&&(c[9]=n[r+2],c[12]=s[r+2],c[13]=u[r+2]);try{for(var l=ad(c),d=l.next();!d.done;d=l.next()){var h=d.value;if(t.adjustRowNumber(a,h))return}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}},t.adjustRowNumber=function(t,e){return null!=e&&(!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new $l,r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(var n=0;n<this.barcodeColumnCount+2;n++)if(null!=this.detectionResultColumns[n]){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),ud=function(){function t(e,r,n,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),cd=function(){function t(){}return t.initialize=function(){for(var e=0;e<Ll.SYMBOL_TABLE.length;e++)for(var r=Ll.SYMBOL_TABLE[e],n=1&r,o=0;o<Ll.BARS_IN_MODULE;o++){for(var i=0;(1&r)===n;)i+=1,r>>=1;n=1&r,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(Ll.BARS_IN_MODULE)),t.RATIOS_TABLE[e][Ll.BARS_IN_MODULE-o-1]=Math.fround(i/Ll.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==r?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=Ws.sum(t),r=new Int32Array(Ll.BARS_IN_MODULE),n=0,o=0,i=0;i<Ll.MODULES_IN_CODEWORD;i++){var a=e/(2*Ll.MODULES_IN_CODEWORD)+i*e/Ll.MODULES_IN_CODEWORD;o+t[n]<=a&&(o+=t[n],n++),r[n]++}return r},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return-1===Ll.getCodeword(r)?-1:r},t.getBitValue=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=0;n<t[r];n++)e=e<<1|(r%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var r=Ws.sum(e),n=new Array(Ll.BARS_IN_MODULE);if(r>1)for(var o=0;o<n.length;o++)n[o]=Math.fround(e[o]/r);var i=Xs.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var u=0,c=t.RATIOS_TABLE[s],l=0;l<Ll.BARS_IN_MODULE;l++){var d=Math.fround(c[l]-n[l]);if((u+=Math.fround(d*d))>=i)break}u<i&&(i=u,a=Ll.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(Ll.SYMBOL_TABLE.length).map((function(t){return new Array(Ll.BARS_IN_MODULE)})),t}(),ld=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),dd=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),hd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hd(e,t),e.kind="NullPointerException",e}(ka),pd=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new fd;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new Wa;if(0!==r)for(var n=0;n<r;n++)this.write(t[e+n])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),gd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),md=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gd(e,t),e}(ka),wd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yd=function(t){function e(e){void 0===e&&(e=32);var r=t.call(this)||this;if(r.count=0,e<0)throw new La("Negative initial size: "+e);return r.buf=new Uint8Array(e),r}return wd(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new md;e=Ka.MAX_VALUE}this.buf=qa.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new Wa;this.ensureCapacity(this.count+r),ja.arraycopy(t,e,this.buf,this.count,r),this.count+=r},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return qa.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(pd);function _d(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==Wo)return Wo.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function vd(t){if(void 0===vl&&(vl=_d()),null===vl)throw new Error("BigInt is not supported!");return vl(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(_l||(_l={}));var Ed=function(){function t(){}return t.decode=function(e,r){var n=new cs(""),o=os.ISO8859_1;n.enableDecoding(o);for(var i=1,a=e[i++],s=new ld;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,n);break;case t.ECI_CHARSET:os.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new es;default:i--,i=t.textCompaction(e,i,n)}if(!(i<e.length))throw es.getFormatInstance();a=e[i++]}if(0===n.length())throw es.getFormatInstance();var u=new Ms(null,n.toString(),null,r);return u.setOther(s),u},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw es.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,r++)o[i]=e[r];n.setSegmentIndex(Ka.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new cs;r=t.textCompaction(e,r,a),n.setFileId(a.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new cs;r=t.textCompaction(e,r+1,u),n.setFileName(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new cs;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new cs;r=t.textCompaction(e,r+1,l),n.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new cs;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(Ka.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var h=new cs;r=t.numericCompaction(e,r+1,h),n.setTimestamp(dd.parseLong(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var f=new cs;r=t.numericCompaction(e,r+1,f),n.setChecksum(Ka.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new cs;r=t.numericCompaction(e,r+1,p),n.setFileSize(dd.parseLong(p.toString()));break;default:throw es.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw es.getFormatInstance()}if(-1!==s){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(qa.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var o=new Int32Array(2*(e[0]-r)),i=new Int32Array(2*(e[0]-r)),a=0,s=!1;r<e[0]&&!s;){var u=e[r++];if(u<t.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=e[r++],i[a]=u,a++}}return t.decodeTextCompaction(o,i,a,n),r},t.decodeTextCompaction=function(e,r,n,o){for(var i=_l.ALPHA,a=_l.ALPHA,s=0;s<n;){var u=e[s],c="";switch(i){case _l.ALPHA:if(u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.LL:i=_l.LOWER;break;case t.ML:i=_l.MIXED;break;case t.PS:a=i,i=_l.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=_l.ALPHA}break;case _l.LOWER:if(u<26)c=String.fromCharCode(97+u);else switch(u){case 26:c=" ";break;case t.AS:a=i,i=_l.ALPHA_SHIFT;break;case t.ML:i=_l.MIXED;break;case t.PS:a=i,i=_l.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=_l.ALPHA}break;case _l.MIXED:if(u<t.PL)c=t.MIXED_CHARS[u];else switch(u){case t.PL:i=_l.PUNCT;break;case 26:c=" ";break;case t.LL:i=_l.LOWER;break;case t.AL:i=_l.ALPHA;break;case t.PS:a=i,i=_l.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=_l.ALPHA}break;case _l.PUNCT:if(u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=_l.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=_l.ALPHA}break;case _l.ALPHA_SHIFT:if(i=a,u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=_l.ALPHA}break;case _l.PUNCT_SHIFT:if(i=a,u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=_l.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=_l.ALPHA}}""!==c&&o.append(c),s++}},t.byteCompaction=function(e,r,n,o,i){var a=new yd,s=0,u=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),d=r[o++];o<r[0]&&!c;)switch(l[s++]=d,u=900*u+d,d=r[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0;break;default:if(s%5==0&&s>0){for(var h=0;h<6;++h)a.write(Number(vd(u)>>vd(8*(5-h))));u=0,s=0}}o===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=d);for(var f=0;f<s;f++)a.write(l[f]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<r[0]&&!c;){var p=r[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0}if(s%5==0&&s>0){for(h=0;h<6;++h)a.write(Number(vd(u)>>vd(8*(5-h))));u=0,s=0}}}return i.append(ss.decode(a.toByteArray(),n)),o},t.numericCompaction=function(e,r,n){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!i;){var s=e[r++];if(r===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(t.decodeBase900toBase10(a,o)),o=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=vd(0),o=0;o<r;o++)n+=t.EXP900[r-o-1]*vd(e[o]);var i=n.toString();if("1"!==i.charAt(0))throw new es;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=_d()?function(){var t=[];t[0]=vd(1);var e=vd(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),bd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ad=function(){function t(){}return t.decode=function(e,r,n,o,i,a,s){for(var u,c=new ql(e,r,n,o,i),l=null,d=null,h=!0;;h=!1){if(null!=r&&(l=t.getRowIndicatorColumn(e,c,r,!0,a,s)),null!=o&&(d=t.getRowIndicatorColumn(e,c,o,!1,a,s)),null==(u=t.merge(l,d)))throw hs.getNotFoundInstance();var f=u.getBoundingBox();if(!h||null==f||!(f.getMinY()<c.getMinY()||f.getMaxY()>c.getMaxY()))break;c=f}u.setBoundingBox(c);var p=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,l),u.setDetectionResultColumn(p,d);for(var g=null!=l,m=1;m<=p;m++){var w=g?m:p-m;if(void 0===u.getDetectionResultColumn(w)){var y=void 0;y=0===w||w===p?new id(c,0===w):new Jl(c),u.setDetectionResultColumn(w,y);for(var _=-1,v=_,E=c.getMinY();E<=c.getMaxY();E++){if((_=t.getStartColumn(u,w,E,g))<0||_>c.getMaxX()){if(-1===v)continue;_=v}var b=t.detectCodeword(e,c.getMinX(),c.getMaxX(),g,_,E,a,s);null!=b&&(y.setCodeword(E,b),v=_,a=Math.min(a,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(u)},t.merge=function(e,r){if(null==e&&null==r)return null;var n=t.getBarcodeMetadata(e,r);if(null==n)return null;var o=ql.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new sd(n,o)},t.adjustBoundingBox=function(e){var r,n;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=bd(o),u=s.next();!u.done;u=s.next()){var c=u.value;if(a+=i-c,c>0)break}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var l=e.getCodewords(),d=0;a>0&&null==l[d];d++)a--;var h=0;for(d=o.length-1;d>=0&&(h+=i-o[d],!(o[d]>0));d--);for(d=l.length-1;h>0&&null==l[d];d--)h--;return e.getBoundingBox().addMissingRows(a,h,e.isLeft())},t.getMax=function(t){var e,r,n=-1;try{for(var o=bd(t),i=o.next();!i.done;i=o.next()){var a=i.value;n=Math.max(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.getBarcodeMetadata=function(t,e){var r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,r,n,o,i,a){for(var s=new id(r,o),u=0;u<2;u++)for(var c=0===u?1:-1,l=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=c){var h=t.detectCodeword(e,0,e.getWidth(),o,l,d,i,a);null!=h&&(s.setCodeword(d,h),l=o?h.getStartX():h.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],o=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>Ll.MAX_CODEWORDS_IN_BARCODE)throw hs.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var u=0;u<e.getBarcodeColumnCount();u++){var c=r[s][u+1].getValue(),l=s*e.getBarcodeColumnCount()+u;0===c.length?n.push(l):1===c.length?o[l]=c[0]:(a.push(l),i.push(c))}for(var d=new Array(i.length),h=0;h<d.length;h++)d[h]=i[h];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,Ll.toIntArray(n),Ll.toIntArray(a),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)r[o[u]]=i[u][a[u]];try{return t.decodeCodewords(r,e,n)}catch(t){if(!(t instanceof Va))throw t}if(0===a.length)throw Va.getChecksumInstance();for(u=0;u<a.length;u++){if(a[u]<i[u].length-1){a[u]++;break}if(a[u]=0,u===a.length-1)throw Va.getChecksumInstance()}}throw Va.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,r,n,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new rd;var u=0;try{for(var c=bd(t.getDetectionResultColumns()),l=c.next();!l.done;l=c.next()){var d=l.value;if(null!=d)try{for(var h=(n=void 0,bd(d.getCodewords())),f=h.next();!f.done;f=h.next()){var p=f.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][u].setValue(p.getValue())}}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}u++}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,o){var i,a,s=o?1:-1,u=null;if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodeword(n)),null!=u)return o?u.getEndX():u.getStartX();if(null!=(u=e.getDetectionResultColumn(r).getCodewordNearby(n)))return o?u.getStartX():u.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),null!=u)return o?u.getEndX():u.getStartX();for(var c=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var l=(i=void 0,bd(e.getDetectionResultColumn(r).getCodewords())),d=l.next();!d.done;d=l.next()){var h=d.value;if(null!=h)return(o?h.getEndX():h.getStartX())+s*c*(h.getEndX()-h.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}c++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,o,i,a,s,u){i=t.adjustCodewordStartColumn(e,r,n,o,i,a);var c,l=t.getModuleBitCount(e,r,n,o,i,a);if(null==l)return null;var d=Ws.sum(l);if(o)c=i+d;else{for(var h=0;h<l.length/2;h++){var f=l[h];l[h]=l[l.length-1-h],l[l.length-1-h]=f}i=(c=i)-d}if(!t.checkCodewordSkew(d,s,u))return null;var p=cd.getDecodedValue(l),g=Ll.getCodeword(p);return-1===g?null:new ud(i,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,s=new Int32Array(8),u=0,c=n?1:-1,l=n;(n?a<r:a>=e)&&u<s.length;)t.get(a,i)===l?(s[u]++,a+=c):(u++,l=!l);return u===s.length||a===(n?r:e)&&u===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,r,n,o,i,a){for(var s=i,u=o?-1:1,c=0;c<2;c++){for(;(o?s>=r:s<n)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(0===e.length)throw es.getFormatInstance();var o=1<<r+1,i=t.correctErrors(e,n,o);t.verifyCodewordCount(e,o);var a=Ed.decode(e,""+r);return a.setErrorsCorrected(i),a.setErasures(n.length),a},t.correctErrors=function(e,r,n){if(null!=r&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw Va.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw es.getFormatInstance();var r=t[0];if(r>t.length)throw es.getFormatInstance();if(0===r){if(!(e<t.length))throw es.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),r=0,n=e.length-1;!((1&t)!==r&&(r=1&t,--n<0));)e[n]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new $l,r=0;r<t.length;r++){e.format("Row %2d: ",r);for(var n=0;n<t[r].length;n++){var o=t[r][n];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new Zl,t}(),Cd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xd=function(){function t(){}return t.prototype.decode=function(e,r){void 0===r&&(r=null);var n=t.decode(e,r,!1);if(null==n||0===n.length||null==n[0])throw hs.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){void 0===r&&(r=null);try{return t.decode(e,r,!0)}catch(t){if(t instanceof es||t instanceof Va)throw hs.getNotFoundInstance();throw t}},t.decode=function(e,r,n){var o,i,a=new Array,s=Vl.detectMultiple(e,r,n);try{for(var u=Cd(s.getPoints()),c=u.next();!c.done;c=u.next()){var l=c.value,d=Ad.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),h=new Ss(d.getText(),d.getRawBytes(),void 0,l,Ds.PDF_417);h.putMetadata(Rs.ERROR_CORRECTION_LEVEL,d.getECLevel());var f=d.getOther();null!=f&&h.putMetadata(Rs.PDF417_EXTRA_METADATA,f),a.push(h)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Ka.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*Ll.MODULES_IN_CODEWORD/Ll.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*Ll.MODULES_IN_CODEWORD/Ll.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*Ll.MODULES_IN_CODEWORD/Ll.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*Ll.MODULES_IN_CODEWORD/Ll.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),Id=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Id(e,t),e.kind="ReaderException",e}(ka),Td=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Dd=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(Ja.TRY_HARDER),r=null==t?null:t.get(Ja.POSSIBLE_FORMATS),n=new Array;if(null!=r){var o=r.some((function(t){return t===Ds.UPC_A||t===Ds.UPC_E||t===Ds.EAN_13||t===Ds.EAN_8||t===Ds.CODABAR||t===Ds.CODE_39||t===Ds.CODE_93||t===Ds.CODE_128||t===Ds.ITF||t===Ds.RSS_14||t===Ds.RSS_EXPANDED}));o&&!e&&n.push(new Vc(t)),r.includes(Ds.QR_CODE)&&n.push(new Bl),r.includes(Ds.DATA_MATRIX)&&n.push(new nl),r.includes(Ds.AZTEC)&&n.push(new iu),r.includes(Ds.PDF_417)&&n.push(new xd),o&&e&&n.push(new Vc(t))}0===n.length&&(e||n.push(new Vc(t)),n.push(new Bl),n.push(new nl),n.push(new iu),n.push(new xd),e&&n.push(new Vc(t))),this.readers=n},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=Td(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new Sd("No readers where selected, nothing can be read.");try{for(var n=Td(this.readers),o=n.next();!o.done;o=n.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(t){if(t instanceof Sd)continue}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new hs("No MultiFormat Readers were able to detect the code.")},t}(),Od=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=500);var n=new Dd;return n.setHints(e),t.call(this,n,r)||this}Od(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(Is);var Rd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new xd,e)||this}Rd(e,t)}(Is);var Md,Nd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Bl,e)||this}Nd(e,t)}(Is),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.DATA_MATRIX_COMPACT=3]="DATA_MATRIX_COMPACT",t[t.MIN_SIZE=4]="MIN_SIZE",t[t.MAX_SIZE=5]="MAX_SIZE",t[t.MARGIN=6]="MARGIN",t[t.PDF417_COMPACT=7]="PDF417_COMPACT",t[t.PDF417_COMPACTION=8]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=9]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=10]="AZTEC_LAYERS",t[t.QR_VERSION=11]="QR_VERSION",t[t.GS1_FORMAT=12]="GS1_FORMAT",t[t.FORCE_C40=13]="FORCE_C40"}(Md||(Md={}));var kd=Md,Pd=function(){function t(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new ks(t,Int32Array.from([1])))}return t.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],n=this.field,o=e.length;o<=t;o++){var i=r.multiply(new ks(n,Int32Array.from([1,n.exp(o-1+n.getGeneratorBase())])));e.push(i),r=i}return e[t]},t.prototype.encode=function(t,e){if(0===e)throw new La("No error correction bytes");var r=t.length-e;if(r<=0)throw new La("No data bytes provided");var n=this.buildGenerator(e),o=new Int32Array(r);ja.arraycopy(t,0,o,0,r);for(var i=new ks(this.field,o),a=(i=i.multiplyByMonomial(e,1)).divide(n)[1].getCoefficients(),s=e-a.length,u=0;u<s;u++)t[r+u]=0;ja.arraycopy(a,0,t,r+s,a.length)},t}(),Bd=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=n[a],u=0;u<o-1;u++){var c=s[u];c===s[u+1]&&c===n[a+1][u]&&c===n[a+1][u+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=n[a];s+6<o&&1===u[s]&&0===u[s+1]&&1===u[s+2]&&1===u[s+3]&&1===u[s+4]&&0===u[s+5]&&1===u[s+6]&&(t.isWhiteHorizontal(u,s-4,s)||t.isWhiteHorizontal(u,s+7,s+11))&&r++,a+6<i&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(t.isWhiteVertical(n,s,a-4,a)||t.isWhiteVertical(n,s,a+7,a+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(var n=e;n<r;n++)if(1===t[n])return!1;return!0},t.isWhiteVertical=function(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(var o=r;o<n;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=n[a],u=0;u<o;u++)1===s[u]&&r++;var c=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*r-c)/c)*t.N4},t.getDataMaskBit=function(t,e,r){var n,o;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:n=(1&(o=r*e))+o%3;break;case 6:n=(1&(o=r*e))+o%3&1;break;case 7:n=(o=r*e)%3+(r+e&1)&1;break;default:throw new La("Invalid mask pattern: "+t)}return 0===n},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,o=r?e.getHeight():e.getWidth(),i=r?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var u=0,c=-1,l=0;l<i;l++){var d=r?a[s][l]:a[l][s];d===c?u++:(u>=5&&(n+=t.N1+(u-5)),u=1,c=d)}u>=5&&(n+=t.N1+(u-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),Fd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ld=function(){function t(t,e){this.width=t,this.height=e;for(var r=new Array(e),n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(t,e){return this.bytes[e][t]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},t.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},t.prototype.clear=function(t){var e,r;try{for(var n=Fd(this.bytes),o=n.next();!o.done;o=n.next()){var i=o.value;qa.fill(i,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width)return!1;if(this.height!==r.height)return!1;for(var n=0,o=this.height;n<o;++n)for(var i=this.bytes[n],a=r.bytes[n],s=0,u=this.width;s<u;++s)if(i[s]!==a[s])return!1;return!0},t.prototype.toString=function(){for(var t=new cs,e=0,r=this.height;e<r;++e){for(var n=this.bytes[e],o=0,i=this.width;o<i;++o)switch(n[o]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append(" ")}t.append("\n")}return t.toString()},t}(),zd=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new cs;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),Ud=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ud(e,t),e.kind="WriterException",e}(ka),Hd=function(){function t(){}return t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,r,n,o,i){t.clearMatrix(i),t.embedBasicPatterns(n,i),t.embedTypeInfo(r,o,i),t.maybeEmbedVersionInfo(n,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var o=new $a;t.makeTypeInfoBits(e,r,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=t.TYPE_INFO_COORDINATES[i],c=u[0],l=u[1];if(n.setBoolean(c,l,s),i<8){var d=n.getWidth()-i-1,h=8;n.setBoolean(d,h,s)}else{d=8,h=n.getHeight()-7+(i-8);n.setBoolean(d,h,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new $a;t.makeVersionInfoBits(e,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,r.setBoolean(i,r.getHeight()-11+a,s),r.setBoolean(r.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,r,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var u=0;u<2;++u){var c=a-u;if(t.isEmpty(n.get(c,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==r&&Bd.getDataMaskBit(r,c,s)&&(l=!l),n.setBoolean(c,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new Vd("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Ka.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,r){if(0===r)throw new La("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!zd.isValidMaskPattern(r))throw new Vd("Invalid mask pattern");var o=e.getBits()<<3|r;n.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);n.appendBits(i,10);var a=new $a;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new Vd("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),18!==r.getSize())throw new Vd("should not happen but we got: "+r.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new Vd;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var o=0;o<8;++o){if(!t.isEmpty(n.get(e+o,r)))throw new Vd;n.setNumber(e+o,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var o=0;o<7;++o){if(!t.isEmpty(n.get(e,r+o)))throw new Vd;n.setNumber(e,r+o,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPattern=function(e,r,n){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e);t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var u=0;u!==a;u++){var c=o[u];c>=0&&t.isEmpty(r.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),jd=function(){function t(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),Gd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function t(){}t.calculateMaskPenalty=function(t){return Bd.applyMaskPenaltyRule1(t)+Bd.applyMaskPenaltyRule2(t)+Bd.applyMaskPenaltyRule3(t)+Bd.applyMaskPenaltyRule4(t)},t.encode=function(e,r,n){void 0===n&&(n=null);var o=t.DEFAULT_BYTE_MODE_ENCODING,i=null!==n&&void 0!==n.get(kd.CHARACTER_SET);i&&(o=n.get(kd.CHARACTER_SET).toString());var a=this.chooseMode(e,o),s=new $a;if(a===El.BYTE&&(i||t.DEFAULT_BYTE_MODE_ENCODING!==o)){var u=os.getCharacterSetECIByName(o);void 0!==u&&this.appendECI(u,s)}this.appendModeInfo(a,s);var c,l=new $a;if(this.appendBytes(e,a,l,o),null!==n&&void 0!==n.get(kd.QR_VERSION)){var d=Number.parseInt(n.get(kd.QR_VERSION).toString(),10);c=fl.getVersionForNumber(d);var h=this.calculateBitsNeeded(a,s,l,c);if(!this.willFit(h,c,r))throw new Vd("Data too big for requested version")}else c=this.recommendVersion(r,a,s,l);var f=new $a;f.appendBitArray(s);var p=a===El.BYTE?l.getSizeInBytes():e.length;this.appendLengthInfo(p,c,a,f),f.appendBitArray(l);var g=c.getECBlocksForLevel(r),m=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(m,f);var w=this.interleaveWithECBytes(f,c.getTotalCodewords(),m,g.getNumBlocks()),y=new zd;y.setECLevel(r),y.setMode(a),y.setVersion(c);var _=c.getDimensionForVersion(),v=new Ld(_,_),E=this.chooseMaskPattern(w,r,c,v);return y.setMaskPattern(E),Hd.buildMatrix(w,r,c,E,v),y.setMatrix(v),y},t.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,fl.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},t.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(void 0===r&&(r=null),os.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return El.KANJI;for(var n=!1,o=!1,i=0,a=e.length;i<a;++i){var s=e.charAt(i);if(t.isDigit(s))n=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return El.BYTE;o=!0}}return o?El.ALPHANUMERIC:n?El.NUMERIC:El.BYTE},t.isOnlyDoubleByteKanji=function(t){var e;try{e=ss.encode(t,os.SJIS)}catch(t){return!1}var r=e.length;if(r%2!=0)return!1;for(var n=0;n<r;n+=2){var o=255&e[n];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},t.chooseMaskPattern=function(t,e,r,n){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<zd.NUM_MASK_PATTERNS;a++){Hd.buildMatrix(t,e,r,a,n);var s=this.calculateMaskPenalty(n);s<o&&(o=s,i=a)}return i},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var o=fl.getVersionForNumber(n);if(t.willFit(e,o,r))return o}throw new Vd("Data too big")},t.willFit=function(t,e,r){return e.getTotalCodewords()-e.getECBlocksForLevel(r).getTotalECCodewords()>=(t+7)/8},t.terminateBits=function(t,e){var r=8*t;if(e.getSize()>r)throw new Vd("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()<r;++n)e.appendBit(!1);var o=7&e.getSize();if(o>0)for(n=o;n<8;n++)e.appendBit(!1);var i=t-e.getSizeInBytes();for(n=0;n<i;++n)e.appendBits(0==(1&n)?236:17,8);if(e.getSize()!==r)throw new Vd("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(t,e,r,n,o,i){if(n>=r)throw new Vd("Block ID too large");var a=t%r,s=r-a,u=Math.floor(t/r),c=u+1,l=Math.floor(e/r),d=l+1,h=u-l,f=c-d;if(h!==f)throw new Vd("EC bytes mismatch");if(r!==s+a)throw new Vd("RS blocks mismatch");if(t!==(l+h)*s+(d+f)*a)throw new Vd("Total bytes mismatch");n<s?(o[0]=l,i[0]=h):(o[0]=d,i[0]=f)},t.interleaveWithECBytes=function(e,r,n,o){var i,a,s,u;if(e.getSizeInBytes()!==n)throw new Vd("Number of bits and data bytes does not match");for(var c=0,l=0,d=0,h=new Array,f=0;f<o;++f){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,o,f,p,g);var m=p[0],w=new Uint8Array(m);e.toBytes(8*c,w,0,m);var y=t.generateECBytes(w,g[0]);h.push(new jd(w,y)),l=Math.max(l,m),d=Math.max(d,y.length),c+=p[0]}if(n!==c)throw new Vd("Data bytes does not match offset");var _=new $a;for(f=0;f<l;++f)try{for(var v=(i=void 0,Gd(h)),E=v.next();!E.done;E=v.next()){f<(w=E.value.getDataBytes()).length&&_.appendBits(w[f],8)}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(f=0;f<d;++f)try{for(var b=(s=void 0,Gd(h)),A=b.next();!A.done;A=b.next()){f<(y=A.value.getErrorCorrectionBytes()).length&&_.appendBits(y[f],8)}}catch(t){s={error:t}}finally{try{A&&!A.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(r!==_.getSizeInBytes())throw new Vd("Interleaving error: "+r+" and "+_.getSizeInBytes()+" differ.");return _},t.generateECBytes=function(t,e){for(var r=t.length,n=new Int32Array(r+e),o=0;o<r;o++)n[o]=255&t[o];new Pd(Ls.QR_CODE_FIELD_256).encode(n,e);var i=new Uint8Array(e);for(o=0;o<e;o++)i[o]=n[r+o];return i},t.appendModeInfo=function(t,e){e.appendBits(t.getBits(),4)},t.appendLengthInfo=function(t,e,r,n){var o=r.getCharacterCountBits(e);if(t>=1<<o)throw new Vd(t+" is bigger than "+((1<<o)-1));n.appendBits(t,o)},t.appendBytes=function(e,r,n,o){switch(r){case El.NUMERIC:t.appendNumericBytes(e,n);break;case El.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case El.BYTE:t.append8BitBytes(e,n,o);break;case El.KANJI:t.appendKanjiBytes(e,n);break;default:throw new Vd("Invalid mode: "+r)}},t.getDigit=function(t){return t.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getDigit(e.charAt(o));if(o+2<n){var a=t.getDigit(e.charAt(o+1)),s=t.getDigit(e.charAt(o+2));r.appendBits(100*i+10*a+s,10),o+=3}else if(o+1<n){a=t.getDigit(e.charAt(o+1));r.appendBits(10*i+a,7),o+=2}else r.appendBits(i,4),o++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getAlphanumericCode(e.charCodeAt(o));if(-1===i)throw new Vd;if(o+1<n){var a=t.getAlphanumericCode(e.charCodeAt(o+1));if(-1===a)throw new Vd;r.appendBits(45*i+a,11),o+=2}else r.appendBits(i,6),o++}},t.append8BitBytes=function(t,e,r){var n;try{n=ss.encode(t,r)}catch(t){throw new Vd(t)}for(var o=0,i=n.length;o!==i;o++){var a=n[o];e.appendBits(a,8)}},t.appendKanjiBytes=function(t,e){var r;try{r=ss.encode(t,os.SJIS)}catch(t){throw new Vd(t)}for(var n=r.length,o=0;o<n;o+=2){var i=(255&r[o])<<8&4294967295|255&r[o+1],a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new Vd("Invalid byte sequence");var s=192*(a>>8)+(255&a);e.appendBits(s,13)}},t.appendECI=function(t,e){e.appendBits(El.ECI.getBits(),4),e.appendBits(t.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=os.UTF8.getName()}();var Wd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s,u){var c=t.call(this,a,s)||this;if(c.yuvData=e,c.dataWidth=r,c.dataHeight=n,c.left=o,c.top=i,o+a>r||i+s>n)throw new La("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(a,s),c}Wd(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new La("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return ja.arraycopy(this.yuvData,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return ja.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;ja.arraycopy(this.yuvData,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+r,n,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,n=new Int32Array(t*r),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<r;a++){for(var s=a*t,u=0;u<t;u++){var c=255&o[i+u*e.THUMBNAIL_SCALE_FACTOR];n[s+u]=4278190080|65793*c}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return n},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var r=this.yuvData,n=0,o=this.top*this.dataWidth+this.left;n<e;n++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var u=r[a];r[a]=r[s],r[s]=u}},e.prototype.invert=function(){return new _s(this)},e.THUMBNAIL_SCALE_FACTOR=2}(ws);var Xd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s){var u=t.call(this,r,n)||this;if(u.dataWidth=o,u.dataHeight=i,u.left=a,u.top=s,4===e.BYTES_PER_ELEMENT){for(var c=r*n,l=new Uint8ClampedArray(c),d=0;d<c;d++){var h=e[d],f=h>>16&255,p=h>>7&510,g=255&h;l[d]=(f+p+g)/4&255}u.luminances=l}else u.luminances=e;if(void 0===o&&(u.dataWidth=r),void 0===i&&(u.dataHeight=n),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+r>u.dataWidth||u.top+n>u.dataHeight)throw new La("Crop rectangle does not fit within image data.");return u}Xd(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new La("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return ja.arraycopy(this.luminances,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return ja.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;ja.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.luminances,n,o,this.dataWidth,this.dataHeight,this.left+t,this.top+r)},e.prototype.invert=function(){return new _s(this)}}(ws);var Yd,Zd,qd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return qd(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)},e}(os),$d=function(){function t(){}return t.ISO_8859_1=os.ISO8859_1,t}();Yd=function(t,e){for(var r=1,n=0;n<255;n++)e[n]=r,t[r]=n,(r*=2)>=256&&(r^=301);return{LOG:t,ALOG:e}}([],[]),Yd.LOG,Yd.ALOG,function(t){t[t.FORCE_NONE=0]="FORCE_NONE",t[t.FORCE_SQUARE=1]="FORCE_SQUARE",t[t.FORCE_RECTANGLE=2]="FORCE_RECTANGLE"}(Zd||(Zd={}));var Qd,Jd="[)>05",th="[)>06",eh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 0},t.prototype.encode=function(t){if(mh.determineConsecutiveDigitCount(t.getMessage(),t.pos)>=2)t.writeCodeword(this.encodeASCIIDigits(t.getMessage().charCodeAt(t.pos),t.getMessage().charCodeAt(t.pos+1))),t.pos+=2;else{var e=t.getCurrentChar(),r=mh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode());if(r!==this.getEncodingMode())switch(r){case 5:return t.writeCodeword(231),void t.signalEncoderChange(5);case 1:return t.writeCodeword(230),void t.signalEncoderChange(1);case 3:t.writeCodeword(238),t.signalEncoderChange(3);break;case 2:t.writeCodeword(239),t.signalEncoderChange(2);break;case 4:t.writeCodeword(240),t.signalEncoderChange(4);break;default:throw new Error("Illegal mode: "+r)}else mh.isExtendedASCII(e)?(t.writeCodeword(235),t.writeCodeword(e-128+1),t.pos++):(t.writeCodeword(e+1),t.pos++)}},t.prototype.encodeASCIIDigits=function(t,e){if(mh.isDigit(t)&&mh.isDigit(e))return 10*(t-48)+(e-48)+130;throw new Error("not digits: "+t+e)},t}(),rh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 5},t.prototype.encode=function(t){var e=new cs;for(e.append(0);t.hasMoreCharacters();){var r=t.getCurrentChar();if(e.append(r),t.pos++,mh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}var n=e.length()-1,o=t.getCodewordCount()+n+1;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o>0;if(t.hasMoreCharacters()||i)if(n<=249)e.setCharAt(0,us.getCharAt(n));else{if(!(n<=1555))throw new Error("Message length not in valid ranges: "+n);e.setCharAt(0,us.getCharAt(Math.floor(n/250)+249)),e.insert(1,us.getCharAt(n%250))}var a=0;for(r=e.length();a<r;a++)t.writeCodeword(this.randomize255State(e.charAt(a).charCodeAt(0),t.getCodewordCount()+1))},t.prototype.randomize255State=function(t,e){var r=t+(149*e%255+1);return r<=255?r:r-256},t}(),nh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 1},t.prototype.encodeMaximal=function(t){for(var e=new cs,r=0,n=t.pos,o=0;t.hasMoreCharacters();){var i=t.getCurrentChar();t.pos++,r=this.encodeChar(i,e),e.length()%3==0&&(n=t.pos,o=e.length())}if(o!==e.length()){var a=Math.floor(e.length()/3*2),s=Math.floor(t.getCodewordCount()+a+1);t.updateSymbolInfo(s);var u=t.getSymbolInfo().getDataCapacity()-s,c=Math.floor(e.length()%3);(2===c&&2!==u||1===c&&(r>3||1!==u))&&(t.pos=n)}e.length()>0&&t.writeCodeword(230),this.handleEOD(t,e)},t.prototype.encode=function(t){for(var e=new cs;t.hasMoreCharacters();){var r=t.getCurrentChar();t.pos++;var n=this.encodeChar(r,e),o=2*Math.floor(e.length()/3),i=t.getCodewordCount()+o;t.updateSymbolInfo(i);var a=t.getSymbolInfo().getDataCapacity()-i;if(!t.hasMoreCharacters()){var s=new cs;for(e.length()%3==2&&2!==a&&(n=this.backtrackOneCharacter(t,e,s,n));e.length()%3==1&&(n>3||1!==a);)n=this.backtrackOneCharacter(t,e,s,n);break}if(e.length()%3==0)if(mh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},t.prototype.backtrackOneCharacter=function(t,e,r,n){var o=e.length(),i=e.toString().substring(0,o-n);e.setLengthToZero(),e.append(i),t.pos--;var a=t.getCurrentChar();return n=this.encodeChar(a,r),t.resetSymbolInfo(),n},t.prototype.writeNextTriplet=function(t,e){t.writeCodewords(this.encodeToCodewords(e.toString()));var r=e.toString().substring(3);e.setLengthToZero(),e.append(r)},t.prototype.handleEOD=function(t,e){var r=Math.floor(e.length()/3*2),n=e.length()%3,o=t.getCodewordCount()+r;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o;if(2===n){for(e.append("\0");e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254)}else if(1===i&&1===n){for(;e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254),t.pos--}else{if(0!==n)throw new Error("Unexpected case. Please report!");for(;e.length()>=3;)this.writeNextTriplet(t,e);(i>0||t.hasMoreCharacters())&&t.writeCodeword(254)}t.signalEncoderChange(0)},t.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0))return e.append(t-65+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t<=127)return e.append(2),e.append(t-96),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},t.prototype.encodeToCodewords=function(t){var e=1600*t.charCodeAt(0)+40*t.charCodeAt(1)+t.charCodeAt(2)+1,r=e/256,n=e%256,o=new cs;return o.append(r),o.append(n),o.toString()},t}(),oh=function(){function t(){}return t.prototype.getEncodingMode=function(){return 4},t.prototype.encode=function(t){for(var e=new cs;t.hasMoreCharacters();){var r=t.getCurrentChar();if(this.encodeChar(r,e),t.pos++,e.length()>=4){t.writeCodewords(this.encodeToCodewords(e.toString()));var n=e.toString().substring(4);if(e.setLengthToZero(),e.append(n),mh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}}e.append(us.getCharAt(31)),this.handleEOD(t,e)},t.prototype.handleEOD=function(t,e){try{var r=e.length();if(0===r)return;if(1===r){t.updateSymbolInfo();var n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),o=t.getRemainingCharacters();if(o>n&&(t.updateSymbolInfo(t.getCodewordCount()+1),n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount()),o<=n&&n<=2)return}if(r>4)throw new Error("Count must not exceed 4");var i=r-1,a=this.encodeToCodewords(e.toString()),s=!t.hasMoreCharacters()&&i<=2;if(i<=2)t.updateSymbolInfo(t.getCodewordCount()+i),(n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount())>=3&&(s=!1,t.updateSymbolInfo(t.getCodewordCount()+a.length));s?(t.resetSymbolInfo(),t.pos-=i):t.writeCodewords(a)}finally{t.signalEncoderChange(0)}},t.prototype.encodeChar=function(t,e){t>=" ".charCodeAt(0)&&t<="?".charCodeAt(0)?e.append(t):t>="@".charCodeAt(0)&&t<="^".charCodeAt(0)?e.append(us.getCharAt(t-64)):mh.illegalCharacter(us.getCharAt(t))},t.prototype.encodeToCodewords=function(t){var e=t.length;if(0===e)throw new Error("StringBuilder must not be empty");var r=(t.charAt(0).charCodeAt(0)<<18)+((e>=2?t.charAt(1).charCodeAt(0):0)<<12)+((e>=3?t.charAt(2).charCodeAt(0):0)<<6)+(e>=4?t.charAt(3).charCodeAt(0):0),n=r>>16&255,o=r>>8&255,i=255&r,a=new cs;return a.append(n),e>=2&&a.append(o),e>=3&&a.append(i),a.toString()},t}(),ih=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ah=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sh=function(){function t(t,e,r,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=0),this.rectangular=t,this.dataCapacity=e,this.errorCodewords=r,this.matrixWidth=n,this.matrixHeight=o,this.dataRegions=i,this.rsBlockData=a,this.rsBlockError=s}return t.lookup=function(t,e,r,n,o){var i,a;void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!0);try{for(var s=ah(ch),u=s.next();!u.done;u=s.next()){var c=u.value;if((1!==e||!c.rectangular)&&((2!==e||c.rectangular)&&(null==r||!(c.getSymbolWidth()<r.getWidth()||c.getSymbolHeight()<r.getHeight()))&&(null==n||!(c.getSymbolWidth()>n.getWidth()||c.getSymbolHeight()>n.getHeight()))&&t<=c.dataCapacity))return c}}catch(t){i={error:t}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(o)throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: "+t);return null},t.prototype.getHorizontalDataRegions=function(){switch(this.dataRegions){case 1:return 1;case 2:case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getVerticalDataRegions=function(){switch(this.dataRegions){case 1:case 2:return 1;case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getSymbolDataWidth=function(){return this.getHorizontalDataRegions()*this.matrixWidth},t.prototype.getSymbolDataHeight=function(){return this.getVerticalDataRegions()*this.matrixHeight},t.prototype.getSymbolWidth=function(){return this.getSymbolDataWidth()+2*this.getHorizontalDataRegions()},t.prototype.getSymbolHeight=function(){return this.getSymbolDataHeight()+2*this.getVerticalDataRegions()},t.prototype.getCodewordCount=function(){return this.dataCapacity+this.errorCodewords},t.prototype.getInterleavedBlockCount=function(){return this.rsBlockData?this.dataCapacity/this.rsBlockData:1},t.prototype.getDataCapacity=function(){return this.dataCapacity},t.prototype.getErrorCodewords=function(){return this.errorCodewords},t.prototype.getDataLengthForInterleavedBlock=function(t){return this.rsBlockData},t.prototype.getErrorLengthForInterleavedBlock=function(t){return this.rsBlockError},t}(),uh=function(t){function e(){return t.call(this,!1,1558,620,22,22,36,-1,62)||this}return ih(e,t),e.prototype.getInterleavedBlockCount=function(){return 10},e.prototype.getDataLengthForInterleavedBlock=function(t){return t<=8?156:155},e}(sh),ch=[new sh(!1,3,5,8,8,1),new sh(!1,5,7,10,10,1),new sh(!0,5,7,16,6,1),new sh(!1,8,10,12,12,1),new sh(!0,10,11,14,6,2),new sh(!1,12,12,14,14,1),new sh(!0,16,14,24,10,1),new sh(!1,18,14,16,16,1),new sh(!1,22,18,18,18,1),new sh(!0,22,18,16,10,2),new sh(!1,30,20,20,20,1),new sh(!0,32,24,16,14,2),new sh(!1,36,24,22,22,1),new sh(!1,44,28,24,24,1),new sh(!0,49,28,22,14,2),new sh(!1,62,36,14,14,4),new sh(!1,86,42,16,16,4),new sh(!1,114,48,18,18,4),new sh(!1,144,56,20,20,4),new sh(!1,174,68,22,22,4),new sh(!1,204,84,24,24,4,102,42),new sh(!1,280,112,14,14,16,140,56),new sh(!1,368,144,16,16,16,92,36),new sh(!1,456,192,18,18,16,114,48),new sh(!1,576,224,20,20,16,144,56),new sh(!1,696,272,22,22,16,174,68),new sh(!1,816,336,24,24,16,136,56),new sh(!1,1050,408,18,18,36,175,68),new sh(!1,1304,496,20,20,36,163,62),new uh],lh=function(){function t(t){this.msg=t,this.pos=0,this.skipAtEnd=0;for(var e=t.split("").map((function(t){return t.charCodeAt(0)})),r=new cs,n=0,o=e.length;n<o;n++){var i=String.fromCharCode(255&e[n]);if("?"===i&&"?"!==t.charAt(n))throw new Error("Message contains characters outside ISO-8859-1 encoding.");r.append(i)}this.msg=r.toString(),this.shape=0,this.codewords=new cs,this.newEncoding=-1}return t.prototype.setSymbolShape=function(t){this.shape=t},t.prototype.setSizeConstraints=function(t,e){this.minSize=t,this.maxSize=e},t.prototype.getMessage=function(){return this.msg},t.prototype.setSkipAtEnd=function(t){this.skipAtEnd=t},t.prototype.getCurrentChar=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCurrent=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCodewords=function(){return this.codewords},t.prototype.writeCodewords=function(t){this.codewords.append(t)},t.prototype.writeCodeword=function(t){this.codewords.append(t)},t.prototype.getCodewordCount=function(){return this.codewords.length()},t.prototype.getNewEncoding=function(){return this.newEncoding},t.prototype.signalEncoderChange=function(t){this.newEncoding=t},t.prototype.resetEncoderSignal=function(){this.newEncoding=-1},t.prototype.hasMoreCharacters=function(){return this.pos<this.getTotalMessageCharCount()},t.prototype.getTotalMessageCharCount=function(){return this.msg.length-this.skipAtEnd},t.prototype.getRemainingCharacters=function(){return this.getTotalMessageCharCount()-this.pos},t.prototype.getSymbolInfo=function(){return this.symbolInfo},t.prototype.updateSymbolInfo=function(t){void 0===t&&(t=this.getCodewordCount()),(null==this.symbolInfo||t>this.symbolInfo.getDataCapacity())&&(this.symbolInfo=sh.lookup(t,this.shape,this.minSize,this.maxSize,!0))},t.prototype.resetSymbolInfo=function(){this.symbolInfo=null},t}(),dh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dh(e,t),e.prototype.getEncodingMode=function(){return 3},e.prototype.encode=function(t){for(var e=new cs;t.hasMoreCharacters();){var r=t.getCurrentChar();if(t.pos++,this.encodeChar(r,e),e.length()%3==0)if(this.writeNextTriplet(t,e),mh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},e.prototype.encodeChar=function(t,e){switch(t){case 13:e.append(0);break;case"*".charCodeAt(0):e.append(1);break;case">".charCodeAt(0):e.append(2);break;case" ".charCodeAt(0):e.append(3);break;default:t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)?e.append(t-48+4):t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?e.append(t-65+14):mh.illegalCharacter(us.getCharAt(t))}return 1},e.prototype.handleEOD=function(t,e){t.updateSymbolInfo();var r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),n=e.length();t.pos-=n,(t.getRemainingCharacters()>1||r>1||t.getRemainingCharacters()!==r)&&t.writeCodeword(254),t.getNewEncoding()<0&&t.signalEncoderChange(0)},e}(nh),fh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ph=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fh(e,t),e.prototype.getEncodingMode=function(){return 2},e.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="a".charCodeAt(0)&&t<="z".charCodeAt(0))return e.append(t-97+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t>="[".charCodeAt(0)&&t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t==="`".charCodeAt(0))return e.append(2),e.append(0),2;if(t<="Z".charCodeAt(0))return e.append(2),e.append(t-65+1),2;if(t<=127)return e.append(2),e.append(t-123+27),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},e}(nh),gh=function(){function t(){}return t.randomize253State=function(t){var e=129+(149*t%253+1);return e<=254?e:e-254},t.encodeHighLevel=function(t,e,r,n,o){void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!1);var i=new nh,a=[new eh,i,new ph,new hh,new oh,new rh],s=new lh(t);s.setSymbolShape(e),s.setSizeConstraints(r,n),t.startsWith(Jd)&&t.endsWith("")?(s.writeCodeword(236),s.setSkipAtEnd(2),s.pos+=Jd.length):t.startsWith(th)&&t.endsWith("")&&(s.writeCodeword(237),s.setSkipAtEnd(2),s.pos+=th.length);var u=0;for(o&&(i.encodeMaximal(s),u=s.getNewEncoding(),s.resetEncoderSignal());s.hasMoreCharacters();)a[u].encode(s),s.getNewEncoding()>=0&&(u=s.getNewEncoding(),s.resetEncoderSignal());var c=s.getCodewordCount();s.updateSymbolInfo();var l=s.getSymbolInfo().getDataCapacity();c<l&&0!==u&&5!==u&&4!==u&&s.writeCodeword("þ");var d=s.getCodewords();for(d.length()<l&&d.append(129);d.length()<l;)d.append(this.randomize253State(d.length()+1));return s.getCodewords().toString()},t.lookAheadTest=function(t,e,r){var n=this.lookAheadTestIntern(t,e,r);if(3===r&&3===n){for(var o=Math.min(e+3,t.length),i=e;i<o;i++)if(!this.isNativeX12(t.charCodeAt(i)))return 0}else if(4===r&&4===n)for(o=Math.min(e+4,t.length),i=e;i<o;i++)if(!this.isNativeEDIFACT(t.charCodeAt(i)))return 0;return n},t.lookAheadTestIntern=function(t,e,r){if(e>=t.length)return r;var n;0===r?n=[0,1,1,1,1,1.25]:(n=[1,2,2,2,2,2.25])[r]=0;for(var o=0,i=new Uint8Array(6),a=[];;){if(e+o===t.length){qa.fill(i,0),qa.fill(a,0);var s=this.findMinimums(n,a,Ka.MAX_VALUE,i),u=this.getMinimumCount(i);if(a[0]===s)return 0;if(1===u){if(i[5]>0)return 5;if(i[4]>0)return 4;if(i[2]>0)return 2;if(i[3]>0)return 3}return 1}var c=t.charCodeAt(e+o);if(o++,this.isDigit(c)?n[0]+=.5:this.isExtendedASCII(c)?(n[0]=Math.ceil(n[0]),n[0]+=2):(n[0]=Math.ceil(n[0]),n[0]++),this.isNativeC40(c)?n[1]+=2/3:this.isExtendedASCII(c)?n[1]+=8/3:n[1]+=4/3,this.isNativeText(c)?n[2]+=2/3:this.isExtendedASCII(c)?n[2]+=8/3:n[2]+=4/3,this.isNativeX12(c)?n[3]+=2/3:this.isExtendedASCII(c)?n[3]+=13/3:n[3]+=10/3,this.isNativeEDIFACT(c)?n[4]+=3/4:this.isExtendedASCII(c)?n[4]+=4.25:n[4]+=3.25,this.isSpecialB256(c)?n[5]+=4:n[5]++,o>=4){if(qa.fill(i,0),qa.fill(a,0),this.findMinimums(n,a,Ka.MAX_VALUE,i),a[0]<this.min(a[5],a[1],a[2],a[3],a[4]))return 0;if(a[5]<a[0]||a[5]+1<this.min(a[1],a[2],a[3],a[4]))return 5;if(a[4]+1<this.min(a[5],a[1],a[2],a[3],a[0]))return 4;if(a[2]+1<this.min(a[5],a[1],a[4],a[3],a[0]))return 2;if(a[3]+1<this.min(a[5],a[1],a[4],a[2],a[0]))return 3;if(a[1]+1<this.min(a[0],a[5],a[4],a[2])){if(a[1]<a[3])return 1;if(a[1]===a[3]){for(var l=e+o+1;l<t.length;){var d=t.charCodeAt(l);if(this.isX12TermSep(d))return 3;if(!this.isNativeX12(d))break;l++}return 1}}}}},t.min=function(t,e,r,n,o){var i=Math.min(t,Math.min(e,Math.min(r,n)));return void 0===o?i:Math.min(i,o)},t.findMinimums=function(t,e,r,n){for(var o=0;o<6;o++){var i=e[o]=Math.ceil(t[o]);r>i&&(r=i,qa.fill(n,0)),r===i&&(n[o]=n[o]+1)}return r},t.getMinimumCount=function(t){for(var e=0,r=0;r<6;r++)e+=t[r];return e||0},t.isDigit=function(t){return t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)},t.isExtendedASCII=function(t){return t>=128&&t<=255},t.isNativeC40=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isNativeText=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)},t.isNativeX12=function(t){return this.isX12TermSep(t)||t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isX12TermSep=function(t){return 13===t||t==="*".charCodeAt(0)||t===">".charCodeAt(0)},t.isNativeEDIFACT=function(t){return t>=" ".charCodeAt(0)&&t<="^".charCodeAt(0)},t.isSpecialB256=function(t){return!1},t.determineConsecutiveDigitCount=function(t,e){void 0===e&&(e=0);for(var r=t.length,n=e;n<r&&this.isDigit(t.charCodeAt(n));)n++;return n-e},t.illegalCharacter=function(t){var e=Ka.toHexString(t.charCodeAt(0));throw e="0000".substring(0,4-e.length)+e,new Error("Illegal character: "+t+" (0x"+e+")")},t}(),mh=gh,wh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yh=function(){function t(t){this.charset=t,this.name=t.name}return t.prototype.canEncode=function(t){try{return null!=ss.encode(t,this.charset)}catch(t){return!1}},t}(),_h=function(){function t(t,e,r){var n,o,i,a,s,u;this.ENCODERS=["IBM437","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","windows-1250","windows-1251","windows-1252","windows-1256","Shift_JIS"].map((function(t){return new yh(Kd.forName(t))})),this.encoders=[];var c=[];c.push(new yh($d.ISO_8859_1));for(var l=null!=e&&e.name.startsWith("UTF"),d=0;d<t.length;d++){var h=!1;try{for(var f=(n=void 0,wh(c)),p=f.next();!p.done;p=f.next()){var g=p.value,m=t.charAt(d);if(m.charCodeAt(0)===r||g.canEncode(m)){h=!0;break}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(!h)try{for(var w=(i=void 0,wh(this.ENCODERS)),y=w.next();!y.done;y=w.next()){if((g=y.value).canEncode(t.charAt(d))){c.push(g),h=!0;break}}}catch(t){i={error:t}}finally{try{y&&!y.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}h||(l=!0)}if(1!==c.length||l){this.encoders=[];var _=0;try{for(var v=wh(c),E=v.next();!E.done;E=v.next()){g=E.value;this.encoders[_++]=g}}catch(t){s={error:t}}finally{try{E&&!E.done&&(u=v.return)&&u.call(v)}finally{if(s)throw s.error}}}else this.encoders=[c[0]];var b=-1;if(null!=e)for(d=0;d<this.encoders.length;d++)if(null!=this.encoders[d]&&e.name===this.encoders[d].name){b=d;break}this.priorityEncoderIndex=b}return t.prototype.length=function(){return this.encoders.length},t.prototype.getCharsetName=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].name},t.prototype.getCharset=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].charset},t.prototype.getECIValue=function(t){return this.encoders[t].charset.getValueIdentifier()},t.prototype.getPriorityEncoderIndex=function(){return this.priorityEncoderIndex},t.prototype.canEncode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return!0},t.prototype.encode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return ss.encode(us.getCharAt(t),this.encoders[e].name)},t}(),vh=function(){function t(t,e,r){this.fnc1=r;var n=new _h(t,e,r);if(1===n.length())for(var o=0;o<this.bytes.length;o++){var i=t.charAt(o).charCodeAt(0);this.bytes[o]=i===r?1e3:i}else this.bytes=this.encodeMinimally(t,n,r)}return t.prototype.getFNC1Character=function(){return this.fnc1},t.prototype.length=function(){return this.bytes.length},t.prototype.haveNCharacters=function(t,e){if(t+e-1>=this.bytes.length)return!1;for(var r=0;r<e;r++)if(this.isECI(t+r))return!1;return!0},t.prototype.charAt=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(this.isECI(t))throw new Error("value at "+t+" is not a character but an ECI");return this.isFNC1(t)?this.fnc1:this.bytes[t]},t.prototype.subSequence=function(t,e){if(t<0||t>e||e>this.length())throw new Error(""+t);for(var r=new cs,n=t;n<e;n++){if(this.isECI(n))throw new Error("value at "+n+" is not a character but an ECI");r.append(this.charAt(n))}return r.toString()},t.prototype.isECI=function(t){if(t<0||t>=this.length())throw new Error(""+t);return this.bytes[t]>255&&this.bytes[t]<=999},t.prototype.isFNC1=function(t){if(t<0||t>=this.length())throw new Error(""+t);return 1e3===this.bytes[t]},t.prototype.getECIValue=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(!this.isECI(t))throw new Error("value at "+t+" is not an ECI but a character");return this.bytes[t]-256},t.prototype.addEdge=function(t,e,r){(null==t[e][r.encoderIndex]||t[e][r.encoderIndex].cachedTotalSize>r.cachedTotalSize)&&(t[e][r.encoderIndex]=r)},t.prototype.addEdges=function(t,e,r,n,o,i){var a=t.charAt(n).charCodeAt(0),s=0,u=e.length();e.getPriorityEncoderIndex()>=0&&(a===i||e.canEncode(a,e.getPriorityEncoderIndex()))&&(u=(s=e.getPriorityEncoderIndex())+1);for(var c=s;c<u;c++)(a===i||e.canEncode(a,c))&&this.addEdge(r,n+1,new Eh(a,e,c,o,i))},t.prototype.encodeMinimally=function(t,e,r){var n=t.length,o=new(Eh[n+1][e.length()]);this.addEdges(t,e,o,0,null,r);for(var i=1;i<=n;i++){for(var a=0;a<e.length();a++)null!=o[i][a]&&i<n&&this.addEdges(t,e,o,i,o[i][a],r);for(a=0;a<e.length();a++)o[i-1][a]=null}var s=-1,u=Ka.MAX_VALUE;for(a=0;a<e.length();a++)if(null!=o[n][a]){var c=o[n][a];c.cachedTotalSize<u&&(u=c.cachedTotalSize,s=a)}if(s<0)throw new Error('Failed to encode "'+t+'"');for(var l=[],d=o[n][s];null!=d;){if(d.isFNC1())l.unshift(1e3);else{var h=e.encode(d.c,d.encoderIndex);for(i=h.length-1;i>=0;i--)l.unshift(255&h[i])}(null===d.previous?0:d.previous.encoderIndex)!==d.encoderIndex&&l.unshift(256+e.getECIValue(d.encoderIndex)),d=d.previous}var f=[];for(i=0;i<f.length;i++)f[i]=l[i];return f},t}(),Eh=function(){function t(t,e,r,n,o){this.c=t,this.encoderSet=e,this.encoderIndex=r,this.previous=n,this.fnc1=o,this.c=t===o?1e3:t;var i=this.isFNC1()?1:e.encode(t,r).length;(null===n?0:n.encoderIndex)!==r&&(i+=3),null!=n&&(i+=n.cachedTotalSize),this.cachedTotalSize=i}return t.prototype.isFNC1=function(){return 1e3===this.c},t}(),bh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.ASCII=0]="ASCII",t[t.C40=1]="C40",t[t.TEXT=2]="TEXT",t[t.X12=3]="X12",t[t.EDF=4]="EDF",t[t.B256=5]="B256"}(Qd||(Qd={})),function(t){function e(e,r,n,o,i){var a=t.call(this,e,r,n)||this;return a.shape=o,a.macroId=i,a}bh(e,t),e.prototype.getMacroId=function(){return this.macroId},e.prototype.getShapeHint=function(){return this.shape}}(vh);var Ah=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),Ch=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xh=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.value=r,o.bitCount=n,o}return Ch(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,r){return new e(this,t,r)},e.prototype.addBinaryShift=function(t,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,r)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Ka.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(Ah),Ih=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=r,o.binaryShiftByteCount=n,o}Ih(e,t),e.prototype.appendTo=function(t,e){for(var r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)},e.prototype.addBinaryShift=function(t,r){return new e(this,t,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(xh);new xh(null,0,0);var Sh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){var e,r;try{for(var n=Sh(t),o=n.next();!o.done;o=n.next()){var i=o.value;qa.fill(i,-1)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(qa.createInt32Array(6,6)),function(t){var e=us.getCharCode(" "),r=us.getCharCode("."),n=us.getCharCode(",");t[0][e]=1;for(var o=us.getCharCode("Z"),i=us.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=us.getCharCode("z"),u=us.getCharCode("a");for(a=u;a<=s;a++)t[1][a]=a-u+2;t[2][e]=1;var c=us.getCharCode("9"),l=us.getCharCode("0");for(a=l;a<=c;a++)t[2][a]=a-l+2;t[2][n]=12,t[2][r]=13;for(var d=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],h=0;h<d.length;h++)t[3][us.getCharCode(d[h])]=h;var f=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(h=0;h<f.length;h++)us.getCharCode(f[h])>0&&(t[4][us.getCharCode(f[h])]=h)}(qa.createInt32Array(5,256));var Th=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dh=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return Th(e,t),e.makeBufferFromCanvasImageData=function(t){var r;try{r=t.getContext("2d",{willReadFrequently:!0})}catch(e){r=t.getContext("2d")}if(!r)throw new Error("Couldn't get canvas context.");var n=r.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;if(0===t[o+3])s=255;else s=306*t[o]+601*t[o+1]+117*t[o+2]+512>>10;n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new La("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new _s(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var n=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*o+Math.abs(Math.sin(n))*i),s=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);r.width=a,r.height=s;var u=r.getContext("2d");if(!u)throw new Error("Could not create a Canvas Context element.");return u.translate(a/2,s/2),u.rotate(n),u.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(ws);function Oh(){return"undefined"!=typeof navigator}function Rh(){return!!(Oh()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var Mh=function(){return Mh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Mh.apply(this,arguments)},Nh=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},kh=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ph=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bh={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},Fh=function(){function t(t,e,r){void 0===e&&(e=new Map),void 0===r&&(r={}),this.reader=t,this.hints=e,this.options=Mh(Mh({},Bh),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(Ja.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(t){console.error("got interrupted by new loading request")}},t.mediaStreamSetTorch=function(t,e){return Nh(this,void 0,void 0,(function(){return kh(this,(function(r){switch(r.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return r.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var r,n,o=e.getVideoTracks();try{for(var i=Ph(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(t){return console.error(t),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ba("element with id '".concat(t,"' not found"));if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ba("element with id '".concat(t,"' must be an ").concat(e," element"));return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var r=document.createElement("video");return r.width=200,r.height=200,r}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var r=document.createElement("img");return r.width=200,r.height=200,r}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var r=t.createVideoElement(e);return r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new Dh(t),r=new ms(e);return new za(r)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimensions!")},t.createCaptureCanvas=function(e){if(!e)throw new Ba("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var r=document.createElement("canvas"),n=t.getMediaElementDimensions(e),o=n.width,i=n.height;return r.style.width=o+"px",r.style.height=i+"px",r.width=o,r.height=i,r},t.tryPlayVideo=function(e){return Nh(this,void 0,void 0,(function(){var r;return kh(this,(function(n){switch(n.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[2,!0];case 3:return r=n.sent(),console.warn("It was not possible to play the video.",r),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var r=t.createCaptureCanvas(e),n=r.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(n,e),r},t.createBinaryBitmapFromMediaElem=function(e){var r=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(r)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return Nh(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return kh(this,(function(h){switch(h.label){case 0:if(!Oh())throw new Error("Can't enumerate devices, navigator is not present.");if(!Rh())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=Ph(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device ".concat(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return Nh(this,void 0,void 0,(function(){var r;return kh(this,(function(n){switch(n.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(r=n.sent())?[2,r.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.releaseAllStreams=function(){0!==t.streamTracker.length&&t.streamTracker.forEach((function(t){t.getTracks().forEach((function(t){return t.stop()}))})),t.streamTracker=[]},t.playVideoOnLoadAsync=function(e,r){return Nh(this,void 0,void 0,(function(){return kh(this,(function(n){switch(n.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return n.sent()?[2,!0]:[2,new Promise((function(n,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),r),a=function r(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",r),n(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,r,n){return void 0===n&&(n=5e3),Nh(this,void 0,void 0,(function(){var o;return kh(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(r),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(r,n){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),n())}),1e4),i=function t(){clearTimeout(o),e.removeEventListener("load",t),r()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new Ba("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var r=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(r)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var r=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(r)},t.prototype.decodeFromImageElement=function(e){return Nh(this,void 0,void 0,(function(){var r;return kh(this,(function(n){switch(n.label){case 0:if(!e)throw new Ba("An image element must be provided.");return r=t.prepareImageElement(e),[4,this._decodeOnLoadImage(r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return Nh(this,void 0,void 0,(function(){var r;return kh(this,(function(n){switch(n.label){case 0:if(!e)throw new Ba("An URL must be provided.");(r=t.prepareImageElement()).src=e,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(r)];case 2:return[2,n.sent()];case 3:return t.destroyImageElement(r),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,r,n){return Nh(this,void 0,void 0,(function(){var o,i;return kh(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(n),[4,this.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,r,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,r,n){return Nh(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,d,h=this;return kh(this,(function(f){switch(f.label){case 0:return t.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,r,o)];case 1:return i=f.sent(),a=function(){t.disposeMediaStream(e),t.cleanVideoSource(i)},s=this.scan(i,n,a),u=e.getVideoTracks(),c=Mh(Mh({},s),{stop:function(){s.stop()},streamVideoConstraintsApply:function(t,e){return Nh(this,void 0,void 0,(function(){var r,n,o,i,a,s;return kh(this,(function(c){switch(c.label){case 0:r=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),n=Ph(r),o=n.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(l=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return Nh(h,void 0,void 0,(function(){return kh(this,(function(r){switch(r.label){case 0:return[4,t.mediaStreamSetTorch(l,e)];case 1:return r.sent(),[2]}}))}))},c.switchTorch=d,c.stop=function(){return Nh(h,void 0,void 0,(function(){return kh(this,(function(t){switch(t.label){case 0:return s.stop(),[4,d(!1)];case 1:return t.sent(),[2]}}))}))}),[2,c]}}))}))},t.prototype.decodeFromVideoDevice=function(e,r,n){return Nh(this,void 0,void 0,(function(){var o;return kh(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(n),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,r,n)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,r){return Nh(this,void 0,void 0,(function(){var n,o;return kh(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ba("A video element must be provided.");return n=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,r)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,r){return Nh(this,void 0,void 0,(function(){var n,o,i;return kh(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ba("An URL must be provided.");return(n=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,r,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return Nh(this,void 0,void 0,(function(){var r;return kh(this,(function(n){switch(n.label){case 0:return[4,this.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,r){return Nh(this,void 0,void 0,(function(){var n,o;return kh(this,(function(i){switch(i.label){case 0:return n=Boolean(r),[4,t.attachStreamToVideo(e,r)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return n||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return Nh(this,void 0,void 0,(function(){var r;return kh(this,(function(n){switch(n.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return Nh(this,void 0,void 0,(function(){var r,n;return kh(this,(function(o){switch(o.label){case 0:if(!e)throw new Ba("A video element must be provided.");return r=t.prepareVideoElement(e),n=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,n)];case 1:return o.sent(),[4,this.scanOneResult(r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return Nh(this,void 0,void 0,(function(){var r,n;return kh(this,(function(o){switch(o.label){case 0:if(!e)throw new Ba("An URL must be provided.");(r=t.prepareVideoElement()).src=e,n=this.decodeOnceFromVideoElement(r),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(r),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,r,n){var o=this;return void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof hs&&e)return;if(o instanceof Va&&r)return;if(o instanceof es&&n)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,r,n){var o=this;t.checkCallbackFnOrThrow(r);var i,a=t.createCaptureCanvas(e);try{i=a.getContext("2d",{willReadFrequently:!0})}catch(t){i=a.getContext("2d")}if(!i)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){i=void 0,a=void 0},c=!1,l={stop:function(){c=!0,clearTimeout(s),u(),n&&n()}};return function d(){if(!c)try{t.drawImageOnCanvas(i,e);var h=o.decodeFromCanvas(a);r(h,void 0,l),s=setTimeout(d,o.options.delayBetweenScanSuccess)}catch(t){if(r(void 0,t,l),t instanceof Va||t instanceof es||t instanceof hs)return void(s=setTimeout(d,o.options.delayBetweenScanAttempts));u(),n&&n(t)}}(),l},t.prototype._decodeOnLoadImage=function(e){return Nh(this,void 0,void 0,(function(){return kh(this,(function(r){switch(r.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:r.sent(),r.label=2;case 2:return[2,this.decode(e)]}}))}))},t.prototype.getUserMedia=function(e){return Nh(this,void 0,void 0,(function(){var r;return kh(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=n.sent(),t.streamTracker.push(r),[2,r]}}))}))},t.streamTracker=[],t}(),Lh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new iu,e,r)||this}Lh(e,t)}(Fh);var zh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Vc(e),e,r)||this}zh(e,t)}(Fh);var Uh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new nl,e,r)||this}Uh(e,t)}(Fh);var Vh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hh=function(t){function e(e,r){var n=this,o=new Dd;return o.setHints(e),(n=t.call(this,o,e,r)||this).reader=o,n}return Vh(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(Ja.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)},e}(Fh),jh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new xd,e,r)||this}jh(e,t)}(Fh);var Gh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Bl,e,r)||this}Gh(e,t)}(Fh);const Wh=[Ds.PDF_417,Ds.QR_CODE];class Xh{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wh;this.reader=new Hh,this.formats=t,this.reader.possibleFormats=t,Ca("Barcode detector initialized",t.map((t=>Ds[t])))}getXYWidthHeight(t){if(!t||0===t.length)return{x:0,y:0,width:0,height:0};let e=1/0,r=-1/0,n=1/0,o=-1/0;for(const i of t){const t=i.getX(),a=i.getY();t<e&&(e=t),t>r&&(r=t),a<n&&(n=a),a>o&&(o=a)}return{x:e,y:n,width:r-e,height:o-n}}detect(t){let e;if(t instanceof HTMLCanvasElement)e=t;else{e=document.createElement("canvas"),e.width=t.width,e.height=t.height;const r=e.getContext("2d");if(!r)return Ca("Warning: Unable to get 2D context for canvas."),[];null==r||r.drawImage(t,0,0)}const r=[],n=new Set,o=t=>{try{const t=this.reader.decodeFromCanvas(e);Ca("Barcode detected:",t);const o=this.getXYWidthHeight(t.getResultPoints()),i=Ds[t.getBarcodeFormat()],a=t.getText(),s=`${i}:${a}`;if(n.has(s))return;n.add(s);const u={class:i,score:1,extra:a,x:o.x,y:o.y,width:o.width,height:o.height};r.push(u),Ca("Barcode result:",u)}catch(e){Ca(void 0!==t?`Barcode not detected for format ${Ds[t]}`:"Barcode not detected"),"NotFoundException"!==(null==e?void 0:e.name)&&Ca("Barcode detection error:",e)}};if(0===this.formats.length)return o(),r;for(const t of this.formats){const e=new Map;e.set(Ja.POSSIBLE_FORMATS,[t]),e.set(Ja.TRY_HARDER,!0),this.reader.setHints(e),o(t)}return r}}var Yh;!function(t){t.NOT_AVAILABLE="notAvailable",t.LOADING="loading",t.LOADED="loaded"}(Yh||(Yh={}));const Zh={[Ta.DOCUMENT_DETECTOR]:{status:Yh.LOADING},[Ta.BLUR_GLARE_CLASSIFIER]:{status:Yh.LOADING},[Ta.FACE_LANDMARK]:{status:Yh.LOADING}};let qh=null;function Kh(t){if(qh)return Ca("Reusing existing barcode detector instance"),qh;try{return qh=new Xh((t=>{const e={Aztec:Ds.AZTEC,Codabar:Ds.CODABAR,Code39:Ds.CODE_39,Code93:Ds.CODE_93,Code128:Ds.CODE_128,DataMatrix:Ds.DATA_MATRIX,EAN8:Ds.EAN_8,EAN13:Ds.EAN_13,ITF:Ds.ITF,MaxiCode:Ds.MAXICODE,PDF417:Ds.PDF_417,QRCode:Ds.QR_CODE,UPCA:Ds.UPC_A,UPCE:Ds.UPC_E};return t.map((t=>e[t])).filter((t=>void 0!==t))})(t)),Ca("Created new barcode detector instance"),qh}catch(t){throw Ca("Error initializing barcode model",t),ba("Error initializing barcode model","barcode_model_not_supported","init"),t}}const $h=[Ta.DOCUMENT_DETECTOR,Ta.BLUR_GLARE_CLASSIFIER],Qh=async()=>{let t=!1;for(;!t;){const e=Object.values(Zh).filter((t=>t.status===Yh.NOT_AVAILABLE));if(e.length>0)throw new Error(`Model not available: ${e.join(", ")}`);if(t=$h.every((t=>Zh[t].status===Yh.LOADED)),t)return!0;await new Promise((t=>setTimeout(t,100)))}},Jh=t=>"function"==typeof t,tf=function(t){};Qi.events.on(Qi.events.MODULE_INITIALIZED,(function(){const{clientId:t,IDV:e}=Qi.moduleMetadata.getInitConfig();if(!t||!e)return!1;const r=(null==e?void 0:e.serverPath)&&(o=null==e?void 0:e.serverPath,i="/verify",(null==o?void 0:o.endsWith(i))?o.slice(0,o.length-i.length):o);var o,i;if(!r)throw new Error("Failed to load SDK: serverPath param required");ko.BASE=r,fa.dispatch("setClientId",t),fa.dispatch("setRootElement",(null==e?void 0:e.rootElement)||"root-element"),fa.dispatch("setServerPath",null==e?void 0:e.serverPath),fa.dispatch("setLanguage",null==e?void 0:e.language),fa.dispatch("setCallback",null==e?void 0:e.callback),fa.dispatch("setConsentVersion",null==e?void 0:e.consentVersion),fa.dispatch("setMarkdownSupportText",null==e?void 0:e.markdownSupportText),fa.dispatch("setVideoCaptureSettings",null==e?void 0:e.videoCaptureSettings),fa.dispatch("setCdnHost",null==e?void 0:e.cdnHost),fa.dispatch("setIsImageSigningEnabled",null==e?void 0:e.isImageSigningEnabled),(null==e?void 0:e.callbacks)&&(t=>{let{callbacks:e,callback:r}=t;Jh(e.sessionGranted)&&(ef=e.sessionGranted);Jh(e.sessionStarted)&&(rf=e.sessionStarted);Jh(e.imageSubmitted)&&(nf=e.imageSubmitted);Jh(e.processing)&&(of=e.processing);Jh(e.completed)&&(af=e.completed);Jh(e.recapture)&&(sf=e.recapture);Jh(e.error)&&(uf=e.error);Jh(r)&&(cf=r)})(e);return fa.dispatch("setStartToken",null==e?void 0:e.startToken),la(fa.state.clientId).then((t=>{!async function(t){(null==t?void 0:t.strings)&&Ia.overrideLanguage(t.strings);if(null==t?void 0:t.autocapture_enabled){if("serviceWorker"in navigator)return fa.dispatch("setAutoCaptureSettings",{enabled:!0,settings:t.autocapture_settings}),Ca("service worker available"),void navigator.serviceWorker.addEventListener("message",(t=>{if(t.data&&"MODEL_READY"===t.data.type){const e=t.data.modelName;Zh[e]={status:Yh.LOADED,imageDimensions:t.data.imageDimensions,loadingStats:n(n({},t.data.stats),{},{modelName:e})}}else if(t.data&&"MODEL_LOAD_ERROR"===t.data.type){const e=t.data.modelName;Zh[e].status=Yh.NOT_AVAILABLE,ba(`${t.data.modelName} error: ${t.data.error}`,"model_load_error","init")}}));ba("service worker not available","service_worker_not_available","init")}fa.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:t.autocapture_settings})}(t)})),function(t){ia({type:"init",step:t})}("init"),!0})),Qi.events.on(Ji,(function(t){switch(Ea.handelEventData(t),cf(t),t.type){case"session-granted":ef({session:fa.state.sessionId});break;case"session-id-acquired":rf({session:fa.state.sessionId});break;case"capture-image-result":nf({session:fa.state.sessionId},t.imageType);break;case"start-verification-processing":of({session:fa.state.sessionId});break;case"verification-complete":af({session:fa.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":uf({session:fa.state.sessionId},t.errorCode,t.error);break;case"verification-recapture":sf({session:fa.state.sessionId},t.reason)}}));let ef=tf,rf=tf,nf=tf,of=tf,af=tf,sf=tf,uf=tf,cf=t=>{};async function lf(t,e,r){ko.HEADERS=Go(r,e);var n;return(await(n=t,ca({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}function df(t){try{return JSON.parse(t)}catch(t){return console.error(t),null}}async function hf(t,e,r,n){ko.HEADERS=Go(e);const o=await(i={start_token:t,accessed_from_desktop:!1,client_type:Lo.client_type.MOBILE_SDK,consent:{granted:!0,document_id:r},image_signing_public_key:n},ca({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:i,mediaType:"application/json"},"init"));var i;return{sessionId:o.body.session_id,userToken:o.body.user_token,requiredImages:o.body.required_images}}async function ff(t,e,r){let n,o,i;if(n)try{n=ra(ea);const t=JSON.parse(n);o=t.sessionId,i=t.userToken}catch(t){}try{let u;if(i){u=(await lf(o,i,r)).missing_images}else{const c=Qi.crypto.createCryptoBinding("sign"),l=await c.getPublicData(),d=await hf(t,r,e,l.publicKey);o=d.sessionId,i=d.userToken,u=d.requiredImages,n=JSON.stringify({sessionId:o,userToken:i}),a=ea,s=n,sessionStorage.setItem(a,s)}return{requiredImages:u,sessionId:o.toString(),userToken:i.toString()}}catch(t){throw console.log("Error starting session"),console.error(t),t}var a,s}function pf(t){let{tagName:e,style:r,id:n="",className:o="",testid:i,options:a}=t;const s=document.createElement(e,a);return s.id=n,s.className=o,s.setAttribute("data-auto",i+"-auto"),Object.keys(r).forEach((t=>{s.style[t]=r[t]})),s}function gf(t,e){Array.isArray(e)?e.forEach((e=>{t.appendChild(e)})):t.appendChild(e)}const mf=async(t,e,r,n,o,i,a)=>{var s,u,c,l,d,h,f;ko.HEADERS=Go(r,e);const p=zo.UAParser();let g;if(fa.state.isImageSigningEnabled){const t=Qi.crypto.createCryptoBinding("sign");g=await t.sign(n.data)}const m=await(w=t,y={image:{format:n.format,image_type:i,content:n.data,capture_margins:n.captureMargins,signature:g,raw_barcode_data:a},device_info:{model:null===(s=null==p?void 0:p.device)||void 0===s?void 0:s.model,type:null===(u=null==p?void 0:p.device)||void 0===u?void 0:u.type,manufacturer:null===(c=null==p?void 0:p.device)||void 0===c?void 0:c.vendor,os:null===(l=null==p?void 0:p.os)||void 0===l?void 0:l.name,os_version:null===(d=null==p?void 0:p.os)||void 0===d?void 0:d.version,browser:null===(h=null==p?void 0:p.browser)||void 0===h?void 0:h.name,browser_version:null===(f=null==p?void 0:p.browser)||void 0===f?void 0:f.version,used_camera:null==o?void 0:o.selectedCamera,cameras:null==o?void 0:o.camerasInfo}},ca({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:w},body:y,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"}},y.image.image_type));var w,y;const _=function(t,e){const r=[...t].find((t=>t.includes(e)));return void 0!==r?r[1]:void 0}(m.headers,"x-ts-processing-time-ms");return"ok"!==m.body.feedback&&console.error("Error",m),{missing_images:m.body.missing_images,feedback:m.body.feedback,custom_feedback:m.body.custom_feedback,has_barcode:m.body.has_barcode,supported_barcode_symbologies:m.body.supported_barcode_symbologies,serverProcessingTime:_}},wf=()=>{const t=document.getElementById("overlay-frame");if(t){const e=t.getBoundingClientRect(),r=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+e.top,bottom:n+e.bottom,right:r+e.right,left:r+e.left}}},yf=t=>["document_front","document_back"].includes(t)?"environment":"user";function _f(t){switch(t){case"document_front":return Bo.image_type.DOCUMENT_FRONT;case"document_back":return Bo.image_type.DOCUMENT_BACK;case"selfie":return Bo.image_type.SELFIE}}var vf={},Ef={get exports(){return vf},set exports(t){vf=t}};Ef.exports=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,r){r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(1),o=r(7);r.d(e,"a",(function(){return o.a})),r.d(e,"d",(function(){return n.b}));var i=n.a.FACING_MODES,a=n.a.IMAGE_TYPES},function(t,e,r){var n=r(6);r.d(e,"a",(function(){return n.a}));var o=r(2);r.d(e,"b",(function(){return o.a}))},function(t,e,r){function n(t,e){if(!(e>=0&&e<=1))throw new Error(e+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(t))throw new Error(t+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function o(t,e){var r={};try{n(t,e),r.imageType=t,r.imageCompression=e}catch(t){console.error(t),console.error("default value of "+h.c.PNG+" is used"),r.imageType=h.c.PNG,r.imageCompression=null}return r}function i(){var t=window.navigator.platform,e=window.navigator.userAgent;return t||e}function a(){return"ontouchend"in document}function s(t,e,r){var n=t*parseFloat(r);return{imageWidth:n,imageHeight:e/(t/n)}}function u(t,e,r){return o(e,r).imageType===h.c.JPG?r?t.toDataURL(h.b[h.c.JPG],r):t.toDataURL(h.b[h.c.JPG]):t.toDataURL(h.b[e])}function c(t,e){return t||e}function l(){var t=i();if(/iPad|iPhone|iPod/.test(t))return!0;var e=a();return!(!/Mac/.test(t)||!e)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:i(),_getHasTouchEvents:a(),getIsIOS:l()}}e.c=s,e.b=u,e.e=c,e.d=l,e.a=d;var h=r(3)},function(t,e,r){function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"e",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"f",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return l}));var o,i=["user","environment"],a={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],u={PNG:"png",JPG:"jpg"},c=(n(o={},"jpg","image/jpeg"),n(o,"png","image/png"),o),l={audio:!1,video:!0}},function(t,e,r){t.exports=r(5)},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);r.d(e,"FACING_MODES",(function(){return n.b})),r.d(e,"IMAGE_TYPES",(function(){return n.c})),r.d(e,"_getDebugPlatformInfo",(function(){return n.d}));var o=r(9);r.d(e,"downloadPhoto",(function(){return o.a})),e.default=n.a},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return s}));var o=r(2),i=r(3),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=function(){function t(){n(this,t)}return a(t,null,[{key:"getDataUri",value:function(t,e){var r=e.sizeFactor,n=e.imageType,i=e.imageCompression,a=e.isImageMirror,s=t.videoWidth,u=t.videoHeight,c=Object(o.c)(s,u,r),l=c.imageWidth,d=c.imageHeight,h=document.createElement("canvas");h.width=l,h.height=d;var f=h.getContext("2d");return a&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(t,0,0,l,d),Object(o.b)(h,n,i)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var t=null,e=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),r=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(e)t=navigator.mediaDevices;else if(r){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,o={getUserMedia:function(t){return new Promise((function(e,r){n.call(navigator,t,e,r)}))}};t=Object.assign(n,o)}return t}},{key:"isSupportedFacingMode",value:function(){return t.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(e,r){if(!Object(o.e)(e,r))return i.d;var n=t.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),i.d;var a=void 0,s=void 0;return e&&(i.e.includes(e)?a=e:s={exact:e}),{audio:!1,video:{facingMode:a,deviceId:s,width:r&&r.width,height:r&&r.height}}}},{key:"getMaxResolutionConstraints",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",r);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}}],i=t.getIdealConstraints(e,{});if(0===r)return Object(o.d)()?(console.warn("fallback to iOS constraints"),t.getIdealConstraints(e,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(i.video.advanced=n,i);if(r<n.length){var a=n.slice(0,-r);return i.video.advanced=a,i}return null}},{key:"FACING_MODES",get:function(){return i.a}},{key:"IMAGE_TYPES",get:function(){return i.c}}]),t}()},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return u}));var o=r(1),i=r(8),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=o.a.IMAGE_TYPES.PNG,u=function(){function t(e){n(this,t),this.videoElement=e,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=o.a.getWindowURL(),this.mediaDevices=o.a.getNavigatorMediaDevices()}return a(t,[{key:"_getStreamDevice",value:function(t,e){var r=this;return new Promise((function(n,i){var a=o.a.getIdealConstraints(t,e);r.mediaDevices.getUserMedia(a).then((function(t){r._gotStream(t),n(t)})).catch((function(t){i(t)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(t){var e=this,r=o.a.getMaxResolutionConstraints(t,this.numberOfMaxResolutionTry);if(null==r){var n={};return this._getStreamDevice(t,n)}return new Promise((function(n,o){e.mediaDevices.getUserMedia(r).then((function(t){e._gotStream(t),n(t)})).catch((function(r){setTimeout((function(){e.numberOfMaxResolutionTry+=1,e._getStreamDeviceMaxResolution(t).catch((function(){o(r)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(t){if("srcObject"in this.videoElement)this.videoElement.srcObject=t;else{var e=this.windowURL.createObjectURL(t);this.videoElement.src=e}}},{key:"_setSettings",value:function(t){this.settings=null;var e=t&&t.getTracks?t.getTracks():[];e.length>0&&e[0].getSettings&&(this.settings=e[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var t=this;return new Promise((function(e,r){var n=[];t.mediaDevices.enumerateDevices().then((function(t){t.forEach((function(t){"videoinput"===t.kind&&t.deviceId&&n.push(t)})),e(n)})).catch((function(t){r(t)}))}))}},{key:"_gotStream",value:function(t){this.stream=t,this._setSettings(t),this._setVideoSrc(t)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var t=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var e={video:!0};return t.mediaDevices.getUserMedia(e).then((function(t){setTimeout((function(){t.getTracks().forEach((function(t){t.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return t._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(t,e){var r=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return r._getStreamDevice(t,e)}))}},{key:"startCameraMaxResolution",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return t._getStreamDeviceMaxResolution(e)}))}},{key:"getDataUri",value:function(t){var e={sizeFactor:void 0===t.sizeFactor?i.c:t.sizeFactor,imageType:void 0===t.imageType?s:t.imageType,imageCompression:void 0===t.imageCompression?i.a:t.imageCompression,isImageMirror:void 0===t.isImageMirror?i.b:t.isImageMirror};return o.a.getDataUri(this.videoElement,e)}},{key:"stopCamera",value:function(){var t=this;return new Promise((function(e,r){t.stream&&(t.stream.getTracks().forEach((function(t){t.stop()})),t.videoElement.src="",t.stream=null,t._setSettings(null),e()),r(Error("no stream to stop!"))}))}}]),t}()},function(t,e,r){r.d(e,"c",(function(){return n})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i}));var n=1,o=null,i=!1},function(t,e,r){var n=r(10);r.d(e,"a",(function(){return n.a}))},function(t,e,r){function n(t){for(var e=atob(t.split(",")[1]),r=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),o=new Uint8Array(n),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([n],{type:r})}function o(t,e){return(t+="").length>=e?t:new Array(e-t.length+1).join("0")+t}function i(t){var e=c.c.PNG;return"image/jpeg"===t&&(e=c.c.JPG),e}function a(t,e,r){return t+"-"+o(e,4)+"."+i(r)}function s(t,e,r){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=a(e,r,t.type),n.href=window.URL.createObjectURL(t);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(t),e,r)}e.a=u;var c=r(0)}]);var bf=u(vf);class Af{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return Af.instance||(Af.instance=new Af),Af.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((t=>"live"===t.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((t=>t.stop())),this.currentStream=null)}areConstraintsEqual(t){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(t)}async startNewStream(t){this.isStreaming()&&this.areConstraintsEqual(t)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(t),this.currentConstraints=t)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(t){throw console.error("Failed to enumerate devices:",t),t}}}const Cf=["tele","telephoto","macro","portrait","zoom"],xf=["ultra","wide","uw","front","selfie"];function If(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1}async function Sf(){const t=(await async function(){const t=Af.getInstance();let e=await t.enumerateDevices();return e.filter((t=>"videoinput"===t.kind)).every((t=>""===t.label))&&(await t.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),e=await t.enumerateDevices(),t.stopStream()),e}()).filter((t=>{if(!(null==t?void 0:t.label)||"videoinput"!==t.kind||""===t.label)return!1;const e=t.label.toLowerCase();return Tf.some((t=>e.includes(t)))}));if(0===t.length)return{optionalCameras:[]};const e=await Promise.all(t.map((async t=>{const e=function(t){const e=t.toLowerCase();let r=0;if(If())"back camera"!==e&&"rear camera"!==e||(r+=5),(e.includes("telephoto")||e.includes("tele"))&&(r-=2),(e.includes("ultra")||e.includes("wide"))&&(r-=3);else{Cf.forEach((t=>{e.includes(t)&&(r+="macro"===t?4:3)})),xf.forEach((t=>{e.includes(t)&&(r-=3)}));const t=e.match(/(\d+(?:\.\d+)?)x/);t&&(r+=Math.min(parseFloat(t[1]),6))}return r}(t.label),r=await async function(t,e){let r=0;if(!If()){const t=e.toLowerCase();(t.includes("camera 0")||t.includes("camera0"))&&(r+=3),t.match(/camera\s*[2-9]/)&&(r-=2)}try{const e=(await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:t}}})).getVideoTracks()[0],n=e.getCapabilities();return e.stop(),n.zoom&&(r+=Math.min(n.zoom.max||0,2)),n.focusMode&&Array.isArray(n.focusMode)&&n.focusMode.includes("continuous")&&(r+=2),n.focusDistance&&(r+=1),r}catch(t){return r}}(t.deviceId,t.label);return{camera:t,labelScore:e,capabilityScore:r,totalScore:e+r}})));return e.sort(((t,e)=>e.totalScore-t.totalScore)),e[0].totalScore>0?{optionalCameras:t,selectedCamera:e[0].camera}:{optionalCameras:t,selectedCamera:t[0]}}const Tf=["rear","back","tele","telephoto","macro","portrait","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"],Df={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Of={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Rf=async t=>{var e,r;let n;return"environment"==t&&(n=await Sf()),null!==(r=null===(e=null==n?void 0:n.selectedCamera)||void 0===e?void 0:e.deviceId)&&void 0!==r?r:t},Mf=(t,e)=>{var r,n;return"user"===t?null!==(r=null==e?void 0:e.selfieVideoConstraints)&&void 0!==r?r:Of:null!==(n=null==e?void 0:e.environmentVideoConstraints)&&void 0!==n?n:Df},Nf=t=>{const e=pf({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return e.style.transform="user"===t?"scaleX(-1)":"",e.autoplay=!0,e.muted=!0,e.setAttribute("playsinline","true"),e},kf={title:"other_error_code_title",message:"other_error_code_message"},Pf={ok:kf,document_face_not_found:kf,restricted_criteria:kf,other:kf,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"},unclassifiable:{title:"unclassifiable_title",message:"unclassifiable_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"}},Bf={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"}},Ff=(t,e)=>{const r=pf({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 ${t}`,testid:`overlay-frame ${t}`});if("environment"===t){!function(t){gf(t,pf({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"})),gf(t,pf({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"})),gf(t,pf({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"})),gf(t,pf({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"}))}(r);const t=.85*e.clientWidth;r.style.width=`${t}px`,r.style.height=.65*t+"px",r.style.maxHeight=.5*window.innerHeight+"px"}else{const t=e.clientWidth*(e.clientHeight<700?.8:.85);r.style.width=.8*t+"px",r.style.height=`${t}px`,r.style.minHeight=.8*t+"px",r.style.maxHeight=.5*window.innerHeight+"px",r.style.borderRadius="50%"}return r};const Lf=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox","0 0 68 68"),e.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!=t?t:"#fff"}" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>`,e};function zf(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","16px"),t.setAttribute("height","16px"),t.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 ',t}const Uf={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)"}},Vf=t=>{let{text:e,level:r=1,style:o={},id:i,testid:a}=t;const s=pf({tagName:`h${r}`,style:n(n(n({},Uf.all),Uf[r]),o),id:i,testid:a});return s.textContent=e,s.id=i,s};var Hf,jf={};let Gf=null;try{Gf=(Hf||(Hf=1,function(t){function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function r(e){t.defaults=e}t.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const o={exec:()=>null};function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="string"==typeof t?t:t.source;const n={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(s.caret,"$1"),r=r.replace(t,o),n},getRegex:()=>new RegExp(r,e)};return n}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,l=a(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,c).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(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y=a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),_={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",y).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:w,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:y,table:o,text:/^[^\n]+/},v=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),E=n(n({},_),{},{table:v,paragraph:a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),b=n(n({},_),{},{html:a("^ *(?: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:o,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(d).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,C=/^( {2,}|\\)\n(?!\s*$)/,x="\\p{P}\\p{S}",I=a(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,x).getRegex(),S=a(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,x).getRegex(),T=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,x).getRegex(),D=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,x).getRegex(),O=a(/\\([punct])/,"gu").replace(/punct/g,x).getRegex(),R=a(/^<(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(),M=a(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),N=a("^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",M).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),k=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=a(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",k).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B=a(/^!?\[(label)\]\[(ref)\]/).replace("label",k).replace("ref",h).getRegex(),F=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),L={_backpedal:o,anyPunctuation:O,autolink:R,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:C,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:o,emStrongLDelim:S,emStrongRDelimAst:T,emStrongRDelimUnd:D,escape:A,link:P,nolink:F,punctuation:I,reflink:B,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",B).replace("nolink",F).getRegex(),tag:N,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:o},z=n(n({},L),{},{link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",k).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",k).getRegex()}),U=n(n({},L),{},{escape:a(A).replace("])","~|])").getRegex(),url:a(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V=n(n({},U),{},{br:a(C).replace("{2,}","*").getRegex(),text:a(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),H={normal:_,gfm:E,pedantic:b},j={normal:L,gfm:U,breaks:V,pedantic:z},G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},W=t=>G[t];function X(t,e){if(e){if(s.escapeTest.test(t))return t.replace(s.escapeReplace,W)}else if(s.escapeTestNoEncode.test(t))return t.replace(s.escapeReplaceNoEncode,W);return t}function Y(t){try{t=encodeURI(t).replace(s.percentDecode,"%")}catch(t){return null}return t}function Z(t,e){const r=t.replace(s.findPipe,((t,e,r)=>{let n=!1,o=e;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"})).split(s.splitPipe);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(s.slashPipe,"|");return r}function q(t,e,r){const n=t.length;if(0===n)return"";let o=0;for(;o<n;){const i=t.charAt(n-o-1);if(i!==e||r){if(i===e||!r)break;o++}else o++}return t.slice(0,n-o)}function K(t,e,r,n,o){const i=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if("!"!==t[0].charAt(0)){n.state.inLink=!0;const t={type:"link",raw:r,href:i,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,t}return{type:"image",raw:r,href:i,title:a,text:s}}class ${constructor(e){i(this,"options",void 0),i(this,"rules",void 0),i(this,"lexer",void 0),this.options=e||t.defaults}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:q(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(null===n)return e;const o=n[1];return e.split("\n").map((t=>{const e=t.match(r.other.beginningSpace);if(null===e)return t;const[n]=e;return n.length>=o.length?t.slice(o.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=q(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:q(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=q(e[0],"\n").split("\n"),r="",n="";const o=[];for(;t.length>0;){let e=!1;const i=[];let a;for(a=0;a<t.length;a++)if(this.rules.other.blockquoteStart.test(t[a]))i.push(t[a]),e=!0;else{if(e)break;i.push(t[a])}t=t.slice(a);const s=i.join("\n"),u=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${u}`:u;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=c,0===t.length)break;const l=o[o.length-1];if("code"===(null==l?void 0:l.type))break;if("blockquote"===(null==l?void 0:l.type)){const e=l,i=e.raw+"\n"+t.join("\n"),a=this.blockquote(i);o[o.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,n=n.substring(0,n.length-e.text.length)+a.text;break}if("list"!==(null==l?void 0:l.type));else{const e=l,i=e.raw+"\n"+t.join("\n"),a=this.list(i);o[o.length-1]=a,r=r.substring(0,r.length-l.raw.length)+a.raw,n=n.substring(0,n.length-e.raw.length)+a.raw,t=i.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:o,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const i=this.rules.other.listItemRegex(r);let a=!1;for(;t;){let r=!1,n="",s="";if(!(e=i.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let u=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],l=!u.trim(),d=0;if(this.options.pedantic?(d=2,s=u.trimStart()):l?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=u.slice(d),d+=e[1].length),l&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){const h=t.split("\n",1)[0];let f;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(r.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(l)break;if(u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(u))break;if(i.test(u))break;if(r.test(u))break;s+="\n"+c}l||c.trim()||(l=!0),n+=h+"\n",t=t.substring(h.length+1),u=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:n,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){const e=o.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const r=Z(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]&&e[3].trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const t of n)this.rules.other.tableAlignRight.test(t)?i.align.push("right"):this.rules.other.tableAlignCenter.test(t)?i.align.push("center"):this.rules.other.tableAlignLeft.test(t)?i.align.push("left"):i.align.push(null);for(let t=0;t<r.length;t++)i.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:i.align[t]});for(const t of o)i.rows.push(Z(t,i.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]}))));return i}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=q(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n<t.length;n++)if("\\"===t[n])n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),K(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return K(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(t);if(n&&(!n[3]||!r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let o,i,a=r,s=0;const u="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=u.exec(e));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=[...o].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&r%3&&!((r+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const e=[...n[0]][0].length,u=t.slice(0,r+n.index+e+i);if(Math.min(r,i)%2){const t=u.slice(1,-1);return{type:"em",raw:u,text:t,tokens:this.lexer.inlineTokens(t)}}const c=u.slice(2,-2);return{type:"strong",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,o;if("@"===e[2])t=e[0],o="mailto:"+t;else{let i;do{var r,n;i=e[0],e[0]=null!==(r=null===(n=this.rules.inline._backpedal.exec(e[0]))||void 0===n?void 0:n[0])&&void 0!==r?r:""}while(i!==e[0]);t=e[0],o="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:o,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}}class Q{constructor(e){i(this,"tokens",void 0),i(this,"options",void 0),i(this,"state",void 0),i(this,"tokenizer",void 0),i(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new $,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 r={other:s,block:H.normal,inline:j.normal};this.options.pedantic?(r.block=H.pedantic,r.inline=j.pedantic):this.options.gfm&&(r.block=H.gfm,this.options.breaks?r.inline=j.breaks:r.inline=j.gfm),this.tokenizer.rules=r}static get rules(){return{block:H,inline:j}}static lex(t,e){return new Q(e).lex(t)}static lexInline(t,e){return new Q(e).inlineTokens(t)}lex(t){t=t.replace(s.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t){let e,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(t=t.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(e=r.call({lexer:this},t,o))&&(t=t.substring(e.raw.length),o.push(e),!0)))))if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),1===e.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(e);else if(e=this.tokenizer.code(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?o.push(e):(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.list(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.def(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title}):(r.raw+="\n"+e.raw,r.text+="\n"+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),o.push(e);else{var a;if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startBlock.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(n)))r=o[o.length-1],i&&"paragraph"===(null===(a=r)||void 0===a?void 0:a.type)?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e),i=n.length!==t.length,t=t.substring(e.raw.length);else if(e=this.tokenizer.text(t))t=t.substring(e.raw.length),r=o[o.length-1],r&&"text"===r.type?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,o}inline(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t){let e,r,n,o,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(u));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(u));)u=u.slice(0,o.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(e=r.call({lexer:this},t,s))&&(t=t.substring(e.raw.length),s.push(e),!0)))))if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.tag(t))t=t.substring(e.raw.length),r=s[s.length-1],s.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),r=s[s.length-1],r&&"text"===e.type&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(e=this.tokenizer.emStrong(t,u,a))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.autolink(t))t=t.substring(e.raw.length),s.push(e);else if(this.state.inLink||!(e=this.tokenizer.url(t))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startInline.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(e=this.tokenizer.inlineText(n))t=t.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(a=e.raw.slice(-1)),i=!0,r=s[s.length-1],r&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(e.raw.length),s.push(e);return s}}class J{constructor(e){i(this,"options",void 0),i(this,"parser",void 0),this.options=e||t.defaults}space(t){return""}code(t){var e;let{text:r,lang:n,escaped:o}=t;const i=null===(e=(n||"").match(s.notSpaceStart))||void 0===e?void 0:e[0],a=r.replace(s.endingNewline,"")+"\n";return i?'<pre><code class="language-'+X(i)+'">'+(o?a:X(a,!0))+"</code></pre>\n":"<pre><code>"+(o?a:X(a,!0))+"</code></pre>\n"}blockquote(t){let{tokens:e}=t;return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html(t){let{text:e}=t;return e}heading(t){let{tokens:e,depth:r}=t;return`<h${r}>${this.parser.parseInline(e)}</h${r}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let e=0;e<t.items.length;e++){const r=t.items[e];n+=this.listitem(r)}const o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+o+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+X(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox(t){let{checked:e}=t;return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){let{tokens:e}=t;return`<p>${this.parser.parseInline(e)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let n="";for(let e=0;e<t.rows.length;e++){const o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+n+"</table>\n"}tablerow(t){let{text:e}=t;return`<tr>\n${e}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(t){let{tokens:e}=t;return`<strong>${this.parser.parseInline(e)}</strong>`}em(t){let{tokens:e}=t;return`<em>${this.parser.parseInline(e)}</em>`}codespan(t){let{text:e}=t;return`<code>${X(e,!0)}</code>`}br(t){return"<br>"}del(t){let{tokens:e}=t;return`<del>${this.parser.parseInline(e)}</del>`}link(t){let{href:e,title:r,tokens:n}=t;const o=this.parser.parseInline(n),i=Y(e);if(null===i)return o;let a='<a href="'+(e=i)+'"';return r&&(a+=' title="'+X(r)+'"'),a+=">"+o+"</a>",a}image(t){let{href:e,title:r,text:n}=t;const o=Y(e);if(null===o)return X(n);let i=`<img src="${e=o}" alt="${n}"`;return r&&(i+=` title="${X(r)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:X(t.text)}}class tt{strong(t){let{text:e}=t;return e}em(t){let{text:e}=t;return e}codespan(t){let{text:e}=t;return e}del(t){let{text:e}=t;return e}html(t){let{text:e}=t;return e}text(t){let{text:e}=t;return e}link(t){let{text:e}=t;return""+e}image(t){let{text:e}=t;return""+e}br(){return""}}class et{constructor(e){i(this,"options",void 0),i(this,"renderer",void 0),i(this,"textRenderer",void 0),this.options=e||t.defaults,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tt}static parse(t,e){return new et(e).parse(t)}static parseInline(t,e){return new et(e).parseInline(t)}parse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const i=o;switch(i.type){case"space":r+=this.renderer.space(i);continue;case"hr":r+=this.renderer.hr(i);continue;case"heading":r+=this.renderer.heading(i);continue;case"code":r+=this.renderer.code(i);continue;case"table":r+=this.renderer.table(i);continue;case"blockquote":r+=this.renderer.blockquote(i);continue;case"list":r+=this.renderer.list(i);continue;case"html":r+=this.renderer.html(i);continue;case"paragraph":r+=this.renderer.paragraph(i);continue;case"text":{let o=i,a=this.renderer.text(o);for(;n+1<t.length&&"text"===t[n+1].type;)o=t[++n],a+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}const i=o;switch(i.type){case"escape":case"text":r+=e.text(i);break;case"html":r+=e.html(i);break;case"link":r+=e.link(i);break;case"image":r+=e.image(i);break;case"strong":r+=e.strong(i);break;case"em":r+=e.em(i);break;case"codespan":r+=e.codespan(i);break;case"br":r+=e.br(i);break;case"del":r+=e.del(i);break;default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class rt{constructor(e){i(this,"options",void 0),i(this,"block",void 0),this.options=e||t.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Q.lex:Q.lexInline}provideParser(){return this.block?et.parse:et.parseInline}}i(rt,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class nt{constructor(){i(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),i(this,"options",this.setOptions),i(this,"parse",this.parseMarkdown(!0)),i(this,"parseInline",this.parseMarkdown(!1)),i(this,"Parser",et),i(this,"Renderer",J),i(this,"TextRenderer",tt),i(this,"Lexer",Q),i(this,"Tokenizer",$),i(this,"Hooks",rt),this.use(...arguments)}walkTokens(t,e){let r=[];for(const o of t)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const t=o;for(const n of t.header)r=r.concat(this.walkTokens(n.tokens,e));for(const n of t.rows)for(const t of n)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=o;r=r.concat(this.walkTokens(t.items,e));break}default:{var n;const t=o;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[t.type]?this.defaults.extensions.childTokens[t.type].forEach((n=>{const o=t[n].flat(1/0);r=r.concat(this.walkTokens(o,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(){const t=this.defaults.extensions||{renderers:{},childTokens:{}};for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return r.forEach((e=>{const r=n({},e);if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];let i=e.renderer.apply(this,n);return!1===i&&(i=r.apply(this,n)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new J(this.defaults);for(const r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,o=e.renderer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $(this.defaults);for(const r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,o=e.tokenizer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new rt;for(const r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,o=e.hooks[n],i=t[n];rt.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const r=o.call(t,e);return i.call(t,r)}:t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults=n(n({},this.defaults),r)})),this}setOptions(t){return this.defaults=n(n({},this.defaults),t),this}lexer(t,e){return Q.lex(t,null!=e?e:this.defaults)}parser(t,e){return et.parse(t,null!=e?e:this.defaults)}parseMarkdown(t){return(e,r)=>{const o=n({},r),i=n(n({},this.defaults),o),a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===o.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==e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?Q.lex:Q.lexInline,u=i.hooks?i.hooks.provideParser():t?et.parse:et.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>u(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let r=u(t,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+X(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}}const ot=new nt;function it(t,e){return ot.parse(t,e)}it.options=it.setOptions=function(t){return ot.setOptions(t),it.defaults=ot.defaults,r(it.defaults),it},it.getDefaults=e,it.defaults=t.defaults,it.use=function(){return ot.use(...arguments),it.defaults=ot.defaults,r(it.defaults),it},it.walkTokens=function(t,e){return ot.walkTokens(t,e)},it.parseInline=ot.parseInline,it.Parser=et,it.parser=et.parse,it.Renderer=J,it.TextRenderer=tt,it.Lexer=Q,it.lexer=Q.lex,it.Tokenizer=$,it.Hooks=rt,it.parse=it;const at=it.options,st=it.setOptions,ut=it.use,ct=it.walkTokens,lt=it.parseInline,dt=it,ht=et.parse,ft=Q.lex;t.Hooks=rt,t.Lexer=Q,t.Marked=nt,t.Parser=et,t.Renderer=J,t.TextRenderer=tt,t.Tokenizer=$,t.getDefaults=e,t.lexer=ft,t.marked=it,t.options=at,t.parse=dt,t.parseInline=lt,t.parser=ht,t.setOptions=st,t.use=ut,t.walkTokens=ct}(jf)),jf).marked}catch(t){console.log("marked is not supported",t)}const Wf=Gf,Xf=t=>{let{text:e,id:r,testid:n,clientHeight:o}=t;const i=!!o&&o<700,a=pf({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:i?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:r,testid:n});return gf(a,Vf({text:e,level:i?6:5,style:{color:"white"}})),a};const Yf=t=>{let e;return e="document_front"===t?function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("id","front-document-animation"),t.setAttribute("viewBox","0 0 235 147"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.innerHTML='\n <style>\n .s0 { opacity: .4;fill: #ffffff } \n .s1 { opacity: .4;fill: none;stroke: #6981ff;stroke-width: 2 } \n .s2 { opacity: .4;fill: #6981ff } \n .s3 { opacity: .4;fill: #c3cdff } \n .s4 { opacity: .4;fill: #f0f2ff } \n </style>\n <path class="s0" d="m229.43 3h-224.86c-2.21 0-4 1.79-4 4v130.14c0 2.21 1.79 4 4 4h224.86c2.21 0 4-1.79 4-4v-130.14c0-2.21-1.79-4-4-4z"/>\n <path class="s1" d="m229.43 4h-224.86c-1.66 0-3 1.34-3 3v130.14c0 1.65 1.34 3 3 3h224.86c1.66 0 3-1.35 3-3v-130.14c0-1.66-1.34-3-3-3z"/>\n <path class="s2" d="m1.56 5.99c0-1.11 0.89-2 2-2h225.9c1.1 0 1.99 0.89 1.99 2v17.73h-229.89z"/>\n <path class="s2" d="m59.77 76.46h-7.89c-5.45 0-9.87 4.42-9.87 9.87 0 1.08 0.89 1.97 1.98 1.97h23.68c1.09 0 1.97-0.88 1.97-1.97 0-5.45-4.42-9.87-9.87-9.87z"/>\n <path class="s2" d="m56.08 73.8c4.71 0 8.53-3.82 8.53-8.54 0-4.71-3.82-8.53-8.53-8.53-4.72 0-8.54 3.82-8.54 8.53 0 4.72 3.82 8.54 8.54 8.54z"/>\n <path class="s1" d="m43.99 50.36h-7.84c-2.21 0-4 1.79-4 4v7.84"/>\n <path class="s1" d="m32.15 83.91v7.84c0 2.21 1.79 4 4 4h7.84"/>\n <path class="s1" d="m66.68 95.75h7.84c2.21 0 4-1.79 4-4v-7.84"/>\n <path class="s1" d="m78.52 62.2v-7.84c0-2.21-1.79-4-4-4h-7.84"/>\n <path class="s2" d="m107.13 53.32c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m200.85 49.37h-84.82c-0.56 0-1 0.45-1 1v5.9c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-5.9c0-0.55-0.44-1-1-1z"/>\n <path class="s2" d="m107.13 73.05c0-2.17-1.76-3.94-3.94-3.94-2.18 0-3.95 1.77-3.95 3.94 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m179.15 69.11h-63.12c-0.56 0-1 0.45-1 1v5.89c0 0.55 0.44 1 1 1h63.12c0.55 0 1-0.45 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s2" d="m107.13 92.79c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.94 3.95 3.94 2.18 0 3.94-1.76 3.94-3.94z"/>\n <path class="s3" d="m166.32 88.84h-50.29c-0.55 0-1 0.45-1 1v5.89c0 0.56 0.45 1 1 1h50.29c0.55 0 1-0.44 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s4" d="m221.57 11.88h-84.82c-0.56 0-1 0.45-1 1v1.95c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-1.95c0-0.55-0.44-1-1-1z"/>\n <g style="opacity: .05">\n </g>\n ',t}():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","270"),t.setAttribute("height","175"),t.setAttribute("viewBox","40 60 250 140"),t.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 ',t}(),e.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_front"===t?e.style.opacity="1":"document_back"===t&&(e.style.opacity="1",setTimeout((()=>{e.style.opacity="0"}),5e3)),e};var Zf;!function(t){t.INVALID="invalid",t.VALID="valid",t.ACCEPTED="accepted",t.REJECTED="rejected"}(Zf||(Zf={}));const qf="#ED3232",Kf="#01B678",$f="#FFF";const Qf=t=>{const e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight;return e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight),e};async function Jf(t){let{context:e,onDetect:r,frame:n,showError:o,isSelfie:i=!1}=t;const a=e.state.name;if(a===Zf.REJECTED){o(function(t){switch(t){case pa.DOCUMENT_DETECTION:return"searching_document_autocapture";case pa.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case pa.BARCODE_DETECTION:return Po.feedback.BARCODE_NOT_FOUND;case pa.BLUR_DETECTION:return Po.feedback.BLUR;case pa.GLARE_DETECTION:return Po.feedback.GLARE;case pa.FACE_DETECTION:return Po.feedback.FACE_NOT_FOUND;case pa.FACE_POSITION:return Po.feedback.FACE_TOO_SMALL}}(e.invalidFramesCause));tp("border-color",e.invalidFramesCause===pa.DOCUMENT_DETECTION?$f:qf)}if(a===Zf.VALID)if(i){tp("border-color",Kf);o(`capturing_face_autocapture${Math.ceil((e.validFramesThreshold-e.validFramesCounter)/e.validFramesThreshold*3)}`)}else o("capturing_in_progress_message"),tp("border-color",$f);a===Zf.ACCEPTED&&(tp("border-color",$f),o(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await r({frame:n,suspendedPreview:!0,context:e}))}function tp(t,e){document.querySelectorAll('[id^="overlay-frame"]').forEach((r=>{r.style[t]=e}))}function ep(t){let e,r,n,{captureFrame:o,object:i,videoWidth:a,videoHeight:s,deviceWidth:u,deviceHeight:c,threshold:l,iouThreshold:d=.85}=t;if(a/s>=u/c){n=c/s;const t=(a*n-u)/2;e=i.x*n-t,r=i.y*n}else{n=u/a;const t=(s*n-c)/2;e=i.x*n,r=i.y*n-t}const h=e+i.width*n,f=r+i.height*n;!function(t,e,r,n){var o,i;if(null===(i=null===(o=fa.state.autoCaptureSettings)||void 0===o?void 0:o.settings)||void 0===i?void 0:i.debug){const o=document.getElementById("image-preview-section"),i=document.getElementById("rectangle");if(i)i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`;else{const i=document.createElement("div");i.id="rectangle",i.style.position="absolute",i.style.border="1px solid yellow",i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`,o.appendChild(i)}}}(e,r,i.width*n,i.height*n);const p=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=n-r,a=Math.min(t.bottom,e.bottom)-o;if(i<=0||a<=0)return 0;const s=i*a;return s/((t.right-t.left)*(t.bottom-t.top)+(e.right-e.left)*(e.bottom-e.top)-s)}({top:o.top,left:o.left,bottom:o.bottom,right:o.right},{top:r,left:e,bottom:f,right:h}),g=p>d,m=i.width*n*(i.height*n)>l*(o.width*o.height);return g&&m}const rp=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.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 ',t}(),r=pf({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 gf(r,e),gf(r,Vf({text:t||"Retake",level:2,style:{color:"#FF8B8B",margin:"0",maxWidth:"100px",textAlign:"center"},id:"retake-image-text"})),r};const np=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.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 ',t}(),r=pf({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 gf(r,e),gf(r,Vf({text:t||"Approve",level:2,style:{color:"#BBF7DD",margin:"0",maxWidth:"100px",textAlign:"center"},id:"check-circle-text"})),r},op=t=>{let{step:e,setImage:r,camera:n}=t;var o,i,a,s;const u=Bf[e];(null===(o=fa.state.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&"selfie"===e&&(u.instructions="second_title_face_autocapture");const c=((t,e)=>pf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"document-capture",className:e}))("document-capture",e),l=pf({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=pf({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(fa.state.rootElementId);if(!h)throw new Error("Root element not found");const f=Ff(yf(e),h),p=Yf(e);gf(l,p),gf(l,f),"document_front"===e&&setTimeout((()=>{const t=document.getElementById(`overlay-frame ${yf(e)}`),r=document.getElementById("front-document-animation");if(t&&r){const e=t.getBoundingClientRect(),n=l.getBoundingClientRect(),o=8,i=e.width-2*o,a=e.height-2*o,s=235/147;let u=i,c=i/s;c>a&&(c=a,u=c*s);const d=e.left-n.left+(e.width-u)/2,h=e.top-n.top+(e.height-c)/2;r.setAttribute("width",u.toString()),r.setAttribute("height",c.toString()),r.style.width=`${u}px`,r.style.height=`${c}px`,r.style.left=`${d}px`,r.style.top=`${h}px`}}),0);const g=(()=>{const t=pf({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"}),e=zf();return e.style.width="16px",e.style.height="16px",e.style.margin="0 10px",gf(t,e),gf(t,Vf({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),t})();gf(f,g),g.style.visibility="hidden";const m=Xf({text:Ia.translate(u.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),w=(t=>{let{click:e,id:r,testid:n,color:o,withLoader:i}=t;if(i){const t=Lf();t.style.position="absolute",t.style.left="-7px",t.style.top="-7px",t.style.height="63px",t.style.width="63px";const i=pf({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"});return gf(i,t),i.addEventListener("click",e),i}{const t=pf({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(o||"white"),borderRadius:"40px"},id:r+"-outer",testid:n+"-outer"});return gf(t,pf({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"})),t.addEventListener("click",e),t}})({click:()=>r({frame:Qf(n.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(a=null===(i=fa.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===a?void 0:a.enabled}),y=((t,e)=>{const r=pf({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),n=np(t);return gf(r,rp(e)),gf(r,n),r})(Ia.translate("approve_button"),Ia.translate("retake_button")),_=(t=>{let{title:e,text:r,clientHeight:n,customTextColor:o}=t;const i=n<700,a=pf({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:i?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=Vf({text:e,level:i?2:1,style:{color:o||"white",textAlign:"center",marginBottom:i?"4px":"10px"},id:"step-title"}),u=Vf({text:r,level:i?6:5,style:{color:o||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return gf(a,s),gf(a,u),a})({text:Ia.translate(u.instructions),title:Ia.translate(u.title),clientHeight:h.clientHeight}),v=(t=>{const e=t<700,r=pf({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:fa.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=pf({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),o=zf();o.style.width="16px",o.style.height="16px",o.style.margin="0 10px",fa.state.markdownSupportText?gf(n,o):gf(r,o);const i=fa.state.markdownSupportText&&null!=Wf?Wf.parse(fa.state.markdownSupportText,{async:!1}):"",a=Vf({text:"",level:e?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=Vf({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return i&&(s.innerHTML=i,gf(n,a)),gf(r,i?[n,s]:a),r})(h.clientHeight),E=(null===(s=fa.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Lf():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","65"),t.setAttribute("height","65"),t.setAttribute("viewBox","0 0 24 24"),t.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 ',t}();E.style.display="none",gf(d,m),gf(d,_),gf(d,l),gf(d,v),gf(c,d);const b=pf({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});gf(b,E),gf(b,w),gf(b,y),gf(c,b),gf(c,n.videoElement);const A=pf({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===yf(e)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const C=(t=>{const e=pf({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return e.appendChild(t),e})(A);return gf(c,C),{component:c,setLoadingMode:t=>{var e;w.style.display="none",v.style.visibility="hidden",E.style.display="block",(null===(e=fa.state.autoCaptureSettings)||void 0===e?void 0:e.enabled)&&(E.style.height="63px",E.style.width="63px"),t&&(g.style.visibility="visible")},setApprovalRetakeButtons:t=>{let{approveAction:e,retakeAction:r}=t;var n,o;w.style.display="none",v.style.display="none",y.style.display="flex";const i=y.querySelector("#approve-image"),a=y.querySelector("#retake-image"),s=i.cloneNode(!0);null===(n=i.parentNode)||void 0===n||n.replaceChild(s,i),s.addEventListener("click",e);const u=a.cloneNode(!0);null===(o=a.parentNode)||void 0===o||o.replaceChild(u,a),u.addEventListener("click",r)},hideApprovalRetakeButtons:()=>{y.style.display="none",v.style.display="flex"},setPreviewImage:(t,e)=>{A.src=t,g.style.visibility="hidden",n.videoElement.style.display="none",w.style.display="none",v.style.visibility="hidden",C.style.display="block",E.style.display=e?"none":"block"},setLoadingComplete:()=>{E.style.display="none",g.style.visibility="hidden"},setAutoCapturingError:(t,e)=>{if(!t)return void(v.style.visibility="hidden");let r;r=t==Po.feedback.RESTRICTED_CRITERIA&&e?e:Pf[t]?Pf[t].message:Ia.translate(t)!==t?t:Pf.other.message,document.getElementById("image-error-message").innerHTML=Ia.translate(r),v.style.visibility="visible"},enableVideoElement:()=>{w.style.display="block",n.videoElement.style.display="block",C.style.display="none",E.style.display="none"},setCapturingShowErrorMode:(t,e)=>{w.style.display="block",C.style.display="none",n.videoElement.style.display="block";const r=t==Po.feedback.RESTRICTED_CRITERIA,o=Pf[t]||Pf.other;document.getElementById("image-error-message").innerHTML=e&&r&&null!=Wf?Wf.parse(e,{async:!1}):Ia.translate(o.message),v.style.visibility="visible",g.style.visibility="hidden"},setTitleInstructionsMidStep:t=>{let{title:e,instructions:r}=t;e&&(document.getElementById("step-title").innerHTML=Ia.translate(e)),r&&(document.getElementById("step-instructions").innerHTML=Ia.translate(r))}}};class ip{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e||(this.isValid=!1,this.failedStep=t),this.steps.push(new ap(t,e,r))}}class ap{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=t,this.success=e,this.duration=r}}class sp{constructor(){this.name=Zf.ACCEPTED}async handleFrame(){return new ip}}class up{constructor(){this.name=Zf.VALID}async handleFrame(t){let{context:e,frame:r,deviceInfo:n,detectionStrategy:o}=t;const i=await o.validate({frame:r,deviceInfo:n});return i.isValid?(e.validFramesCounter++,e.validFramesCounter>=e.validFramesThreshold&&e.setState(new sp)):(e.validFramesCounter=0,e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new lp)),i}}class cp{constructor(){this.name=Zf.REJECTED}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.setState(new up),i):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new lp),i):(e.invalidFramesCounter++,i)}}class lp{constructor(){this.name=Zf.INVALID}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new sp):e.setState(new up)):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep):(e.invalidFramesCounter++,e.invalidFramesCounter>=e.invalidFramesThreshold&&e.setState(new cp)),i}}class dp{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=t,this.state=new lp,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=e,this.invalidFramesThreshold=r}setState(t){this.state=t}async handleFrame(t){let{frame:e,deviceInfo:r}=t;return await this.state.handleFrame({context:this,frame:e,deviceInfo:r,detectionStrategy:this.detectionStrategy})}}async function hp(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;const a=fp(e,o,i),s=await new Promise(((o,i)=>{navigator.serviceWorker.ready.then((s=>{var u;const c=e=>{e.data.type===t+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",c),o(e.data.result)),e.data.type===t+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",c),ba(e.data.error.toString(),t,"error"),i(e.data.error))};navigator.serviceWorker.addEventListener("message",c),null===(u=s.active)||void 0===u||u.postMessage(n({type:t,imageData:a,height:e.height,width:e.width},r))}))}));return Ca(`****** in web-SDK return result for ${t}`,s),s}function fp(t,e,r){const n=document.createElement("canvas"),o=e||{height:t.height,width:t.width},i=n.getContext("2d");n.width=o.width,n.height=o.height,r?null==i||i.drawImage(t,r.x,r.y,r.width,r.height,0,0,o.width,o.height):null==i||i.drawImage(t,0,0,o.width,o.height);const a=null==i?void 0:i.getImageData(0,0,o.width,o.height);return n.remove(),a}async function pp(t){if(t instanceof HTMLVideoElement&&t.paused)return[];return hp("DETECT_DOCUMENT",t,{},Zh[Ta.DOCUMENT_DETECTOR].imageDimensions)}async function gp(t,e){return hp("BLUR_GLARE_CLASSIFY",t,{},Zh[Ta.BLUR_GLARE_CLASSIFIER].imageDimensions,e)}class mp{constructor(t,e){this.hasBarcode=t,this.barcodeModel=t?Kh(e):null,this.rawBarcodeData={}}async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new ip;let i=Date.now();const a=null===(n=await pp(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(pa.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=ep({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:fa.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:fa.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-i,o.addStepResponse(pa.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await gp(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(pa.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));if(o.addStepResponse(pa.GLARE_DETECTION,!d,s),d)return o;if(this.hasBarcode){i=Date.now();const t=this.barcodeModel.detect(e);this.rawBarcodeData=null==t?void 0:t.reduce(((t,e)=>("string"==typeof e.extra&&(t[e.class]=e.extra),t)),{}),s=Date.now()-i;const r=Object.keys(this.rawBarcodeData).length>0;if(o.addStepResponse(pa.BARCODE_DETECTION,r,s),!r)return o}return o}}class wp{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class yp{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(pa).forEach((t=>{this.stats.set(t,new wp)}))}addStats(t,e){this.frameHandleDurations.push(e),t.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),t.steps.forEach((t=>{this.addStat(t.step,t.duration,t.success?1:0,t.success?0:1)}))}addStat(t,e,r,n){const o=this.stats.get(t);if(!o)throw new Error(`Stat for step ${t} not found`);o.durations.push(e),o.countSuccess+=r,o.countFailed+=n}}let _p=!1;const vp=t=>{_p=t};class Ep{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new ip;let i=Date.now();const a=null===(n=await pp(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(pa.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=ep({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:fa.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:fa.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-i,o.addStepResponse(pa.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await gp(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(pa.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));return o.addStepResponse(pa.GLARE_DETECTION,!d,s),o}}let bp=!1;const Ap=t=>{bp=t};class Cp{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new ip;let i=Date.now();const a=null===(n=await async function(t){return t instanceof HTMLVideoElement&&t.paused?[]:hp("DETECT_FACE_LANDMARKS",t)}(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(pa.FACE_DETECTION,"face"===(null==a?void 0:a.class),s),!a)return o;i=Date.now();const u=ep({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:fa.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:fa.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-i,o.addStepResponse(pa.FACE_POSITION,u,s),o}}let xp=!1;const Ip=t=>{xp=t};async function Sp(t,e){var r,n,o,i;let a="camera-error";if("NotAllowedError"===e.name){a="Permission dismissed"===e.message?"camera-permission-dismissed":"camera-permission-denied";const s=_a.createCameraNotAllowedEvent(e.message,t);await va(null===(r=fa.state)||void 0===r?void 0:r.step,null===(n=fa.state)||void 0===n?void 0:n.userToken,null===(o=fa.state)||void 0===o?void 0:o.sessionId,null===(i=fa.state)||void 0===i?void 0:i.clientId,s),fa.dispatch("setIsCapturingProcessStarted",!1)}sa(t,a)}function Tp(t){const e=(t=>{var e,r,n,o;const[i,a]=t.split(",");if(!i||!a)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(r=null===(e=i.split(";"))||void 0===e?void 0:e[0])||void 0===r?void 0:r.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const u=null===(o=s.split("/"))||void 0===o?void 0:o[1];if(!u)throw new Error("unable-to-parse-data-uri");return{data:a,format:u}})(t);return{image:{data:e.data,format:e.format,captureMargins:wf()}}}let Dp,Op=!1;const Rp=async()=>{const t=await lf(fa.state.sessionId,fa.state.userToken,fa.state.clientId);Mp(t)},Mp=async t=>{var e;"expired"===(null==t?void 0:t.status)?ua("processing","session-expired",`Session expired for session id: ${fa.state.sessionId}`):(null==t?void 0:t.missing_images)&&(null===(e=null==t?void 0:t.missing_images)||void 0===e?void 0:e.length)>0&&setTimeout(Rp,3e3)},Np=t=>{let{step:e}=t;var r,n,o;const i=null===(n=null===(r=fa.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled;let a=!1;const s=null===(o=fa.state)||void 0===o?void 0:o.videoCaptureSettings,u=(t=>{let e,r,n=!1;const o=Nf(t),i=new bf(o),a=async()=>{n&&(await i.stopCamera(),i.stream&&i.stream.getTracks().forEach((t=>{"live"==t.readyState&&t.stop()})),n=!1)};return{videoStream:r,startVideoFeed:async t=>{var o,s,u;n&&await a(),"environment"==t&&(e=await Sf());const c=null!==(s=null===(o=null==e?void 0:e.selectedCamera)||void 0===o?void 0:o.deviceId)&&void 0!==s?s:t,l=Mf(t,null===(u=fa.state)||void 0===u?void 0:u.videoCaptureSettings);Af.getInstance().stopStream(),r=await i.startCamera(c,l),n=!0},stopVideoFeed:a,videoElement:i.videoElement,getDataUri:i.getDataUri,getCameraInfo:()=>e}})(yf(e));!function(t){ia({type:"page-load",step:t})}(e),Rp();const c=op({step:e,setImage:l,camera:u});async function l(t){let{suspendedPreview:r=!1,frame:n,context:o}=t;if(n||(n=Qf(u.videoElement)),"document_front"===e){Ap(!1);const t=document.getElementById("front-document-animation");t&&(t.style.opacity="0")}"document_back"===e&&vp(!1),"selfie"===e&&Ip(!1);const i=Date.now(),l=function(t){const e=t.getCameraInfo();return{selectedCamera:(null==e?void 0:e.selectedCamera)&&{label:e.selectedCamera.label},camerasInfo:(null==e?void 0:e.optionalCameras)&&e.optionalCameras.map((t=>({label:t.label})))}}(u);if(!a)return;c.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(t=>t.toDataURL("image/jpeg"))(n);c.setPreviewImage(f,"selfie"===e),await u.stopVideoFeed(),"selfie"!==e?await h(r,f,l,i,o):(c.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),c.setApprovalRetakeButtons({approveAction:async()=>{c.hideApprovalRetakeButtons(),await h(r,f,l,i,o)},retakeAction:()=>{c.hideApprovalRetakeButtons(),d()}}))}function d(){if("selfie"===e&&c.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),"document_front"===e){const t=document.getElementById("front-document-animation");t&&(t.style.opacity="1")}u.startVideoFeed(yf(e)).then((()=>{a=!0,c.enableVideoElement(),i&&(c.setAutoCapturingError(null),f(e))})).catch((async t=>{throw await Sp(e,t),t}))}async function h(t,r,n,o,l){var h,f;const p=[];!function(t){var r,n,o,i;const a=_a.createUserActionEvent("capture_image",e,t);va(null===(r=fa.state)||void 0===r?void 0:r.step,null===(n=fa.state)||void 0===n?void 0:n.userToken,null===(o=fa.state)||void 0===o?void 0:o.sessionId,null===(i=fa.state)||void 0===i?void 0:i.clientId,a)}(null==l?void 0:l.stats),function(t,e){ia({type:"capture-image",imageType:e,step:t})}(e,_f(e));try{const u=Date.now(),g=Tp(r);a=!1,p.push(mf(fa.state.sessionId,fa.state.userToken,fa.state.clientId,null==g?void 0:g.image,n,_f(e),(null==l?void 0:l.detectionStrategy)instanceof mp?null===(h=l.detectionStrategy)||void 0===h?void 0:h.rawBarcodeData:void 0)),p.push(t?new Promise((t=>setTimeout(t,500))):Promise.resolve(null)),c.setLoadingMode(null==s?void 0:s.showLoadingBlock);const m=(await Promise.all(p))[0];if(Object.prototype.hasOwnProperty.call(m,"has_barcode")&&(Op=m.has_barcode,Dp=null!==(f=m.supported_barcode_symbologies)&&void 0!==f?f:[]),async function(t){let{step:e,requestStartTime:r,imageProcessingStartTime:n,serverProcessingTime:o,userToken:i,sessionId:a,clientId:s}=t;const u=Date.now()-r,c=n?r-n:0,l=_a.createUploadImageEvent(e,String(u),String(o),String(c));await va(e,i,a,s,l)}({step:e,requestStartTime:u,imageProcessingStartTime:o,serverProcessingTime:m.serverProcessingTime,userToken:fa.state.userToken,sessionId:fa.state.sessionId,clientId:fa.state.clientId}),fa.dispatch("setMissingImages",m.missing_images),c.setLoadingComplete(),function(t,e,r){ia({type:"capture-image-result",imageType:e,feedback:r,step:t})}(e,_f(e),m.feedback),"ok"!==m.feedback)return await async function(t){tp("border-color",qf),i?c.setAutoCapturingError(t.feedback,t.custom_feedback):c.setCapturingShowErrorMode(t.feedback,t.custom_feedback),await new Promise((t=>setTimeout(t,1e3))),tp("border-color",$f)}(m),void d();tp("border-color",Kf),await new Promise((t=>setTimeout(t,750))),tp("border-color",$f),fa.dispatch("setStep",(t=>{let e;return e=t&&t.length>0?t[0]:"processing",e})(fa.state.missingImages))}catch(t){c.setLoadingComplete(),c.setCapturingShowErrorMode(Po.feedback.OTHER),u.startVideoFeed(yf(e)).then((()=>{a=!0})).catch((async t=>{throw await Sp(e,t),t})),sa(e,"failed-to-submit-image")}}async function f(t){if("document_front"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;Ca("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n}=t;var o,i,a,s,u,c,l;const d=new dp(new Ep,null!==(a=null===(i=null===(o=fa.state.autoCaptureSettings.settings)||void 0===o?void 0:o.stability)||void 0===i?void 0:i.documentFrontStableFramesCount)&&void 0!==a?a:2),h=new yp;for(Ap(!0);d.state.name!==Zf.ACCEPTED&&bp;){const t=Date.now(),o=Qf(e.videoElement),i={width:null!==(u=null===(s=e.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==u?u:0,height:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==l?l:0},a=await d.handleFrame({frame:o,deviceInfo:i}),f=Date.now()-t+50;h.addStats(a,f),d.stats=h,await Jf({context:d,onDetect:r,showError:n,frame:o}),await new Promise((t=>setTimeout(t,50)))}}({camera:u,onDetect:l,showError:c.setAutoCapturingError})}if("document_back"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;Ca("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,hasBarcode:o,supportedBarcodeSymbologies:i}=t;var a,s,u,c,l,d,h;const f=new dp(new mp(o,i),null!==(u=null===(s=null===(a=fa.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===s?void 0:s.documentBackStableFramesCount)&&void 0!==u?u:1);vp(!0);const p=new yp;for(;f.state.name!==Zf.ACCEPTED&&_p;){const t=Date.now(),o=Qf(e.videoElement),i={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},a=await f.handleFrame({frame:o,deviceInfo:i}),s=Date.now()-t+50;p.addStats(a,s),f.stats=p,await Jf({context:f,onDetect:r,showError:n,frame:o}),await new Promise((t=>setTimeout(t,50)))}}({camera:u,onDetect:l,showError:c.setAutoCapturingError,hasBarcode:Op,supportedBarcodeSymbologies:Dp})}if("selfie"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;Ca("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n}=t;var o,i,a,s,u,c,l;const d=new dp(new Cp,null!==(a=null===(i=null===(o=fa.state.autoCaptureSettings.settings)||void 0===o?void 0:o.stability)||void 0===i?void 0:i.selfieStableFramesCount)&&void 0!==a?a:30);Ip(!0);const h=new yp;for(;d.state.name!==Zf.ACCEPTED&&xp;){const t=Date.now(),o=Qf(e.videoElement),i={width:null!==(u=null===(s=e.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==u?u:0,height:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==l?l:0},a=await d.handleFrame({frame:o,deviceInfo:i}),f=Date.now()-t;h.addStats(a,f),d.stats=h,await Jf({context:d,onDetect:r,showError:n,frame:o,isSelfie:!0}),await new Promise((t=>setTimeout(t,50)))}}({camera:u,onDetect:l,showError:c.setAutoCapturingError})}}return i&&f(e),(async t=>{var e,r,n,o;const i=_a.createPageViewEvent(t);await va(null===(e=fa.state)||void 0===e?void 0:e.step,null===(r=fa.state)||void 0===r?void 0:r.userToken,null===(n=fa.state)||void 0===n?void 0:n.sessionId,null===(o=fa.state)||void 0===o?void 0:o.clientId,i)})(e),u.startVideoFeed(yf(e)).then((()=>{a=!0})).catch((async t=>{throw await Sp(e,t),t})),c.component},kp=()=>{ia({type:"start-verification-processing",step:fa.state.step}),aa("processing","processing",fa.state.sessionId);const t=Pp("processing-verification");gf(t,Xf({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const e=async()=>{const t=await lf(fa.state.sessionId,fa.state.userToken,fa.state.clientId);o(t)},r=()=>{setTimeout(e,3e3)},n=async t=>{fa.dispatch("setStep",t.status),fa.dispatch("setStatus",t.status)},o=async t=>{var e,o,i;if(fa.dispatch("setMissingImages",t.missing_images),t.status)if("complete"===(null==t?void 0:t.status)){Af.getInstance().stopStream();const r=_a.createProcessingCompleteEvent();await va(fa.state.step,fa.state.userToken,null===(e=fa.state)||void 0===e?void 0:e.sessionId,null===(o=fa.state)||void 0===o?void 0:o.clientId,r),n(t),aa("complete",t.status,fa.state.sessionId),function(t,e,r){ia({type:"verification-complete",step:t,sessionId:e,callbackUrl:r})}("complete",fa.state.sessionId,t.callback_url),i=ea,sessionStorage.removeItem(i)}else"recapture"===(null==t?void 0:t.status)?(n(t),fa.dispatch("setIsCapturingProcessStarted",!1),aa("recapture",t.status,fa.state.sessionId),function(t,e,r){ia({type:"verification-recapture",step:t,sessionId:e,reason:r})}("recapture",t.status,t.recapture_reason)):"expired"===(null==t?void 0:t.status)?ua("processing","session-expired",`Session expired for session id: ${fa.state.sessionId}`):r();else"processing"!==t.state&&(n(t),r())};return e(),t},Pp=t=>pf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"processing-verification"});function Bp(t,e){var r;if(!t)return;null===(r=e.firstChild)||void 0===r||r.remove();const n=function(t){switch(t){case"processing":return kp;case"document_front":case"document_back":case"selfie":return Np;default:throw new Error("Invalid step")}}(t);gf(e,n({step:t}))}function Fp(t){let{key:e,state:r}=t;const n=r.rootElementId,o=document.getElementById(n);"step"===e&&"complete"!==r.step&&"recapture"!==r.step&&Bp(r.step,o),o&&"processing"===r.step&&(o.style.visibility="hidden")}function Lp(){const t=df(ra(ea));if(!df)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 e=t.sessionId,r=t.userToken;return fa.dispatch("setSessionId",e),fa.dispatch("setUserToken",r),{sessionId:e,userToken:r}}async function zp(){var t,e;if(null===(t=fa.state.autoCaptureSettings)||void 0===t?void 0:t.enabled){const t=Date.now();try{await Hp(),Ca("all models loaded - auto-capture enabled")}catch(t){fa.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(e=fa.state.autoCaptureSettings)||void 0===e?void 0:e.settings}),Ca("Model loading did not complete on time:",t);ba(`timed out loading models: ${$h.filter((t=>Zh[t].status!==Yh.LOADED)).map((t=>t)).join(", ")}`,"model_load_timeout","init")}const r=Object.values(Zh).filter((t=>t.status===Yh.LOADED)).map((t=>t.loadingStats));!async function(t,e){const r=_a.createSdkInitEvent(t,e);await Aa("init",r)}(Date.now()-t,r)}}async function Up(t){var e;try{await Af.getInstance().startNewStream({video:n(n({},Mf("environment",null===(e=fa.state)||void 0===e?void 0:e.videoCaptureSettings)),{},{deviceId:await Rf("environment")})}),function(t,e){ia({type:"session-id-acquired",step:t,sessionId:e})}("init",t),function(t,e,r){const n=document.getElementById(r);n.style.visibility="visible",Bp(t[0],n)}(fa.state.missingImages,fa.state.sessionId,fa.state.rootElementId)}catch(t){await Sp("init",t)}}async function Vp(t){let{status:e,sessionId:r,userToken:n,missingImages:o,rootElementId:i,language:a}=t;!function(t,e){ia({type:"session-granted",step:t,sessionId:e})}("init",r),fa.dispatch("setStatus",e),fa.dispatch("setSessionId",r),fa.dispatch("setUserToken",n),fa.dispatch("setMissingImages",o),fa.dispatch("setRootElement",i),fa.dispatch("setLanguage",a),async function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";Ia.overrideLanguage(Sa[r]||Sa.en);let n=document.getElementById(e);if(!n){n=pf({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:e,testid:"root"});const t=document.createElement("style");t.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${e} #trigger-section {\n margin: 0 !important;\n }\n #${e} #page-header {\n height: 5% !important;\n }\n }\n `,gf(document.head,t),gf(document.body,n)}}(fa.state.sessionId,fa.state.rootElementId,fa.state.language),function(){try{Qi.events.off(ta,Fp)}catch(t){}Qi.events.on(ta,Fp)}(),await zp(),await Up(r)}const Hp=async()=>{const t=fa.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([Qh(),new Promise(((e,r)=>setTimeout((()=>r(new Error(`Model loading timed out after ${t} ms`))),t)))])};async function jp(t){if(fa.state.isCapturingProcessStarted)return void sa(fa.state.step,"trying-to-initialize-active-session");let e,r;if(t){const n=await async function(t){let e,r;try{const n=await ff(t,fa.state.consentVersion,fa.state.clientId);return e=n.sessionId,r=n.userToken,fa.dispatch("setSessionId",e),fa.dispatch("setUserToken",r),{sessionId:e,userToken:r}}catch(t){throw console.log("Error starting session"),console.error(t),t}}(t);e=n.sessionId,r=n.userToken}else{const t=Lp();e=t.sessionId,r=t.userToken}if(!e)return void sa(fa.state.step,"other");const{missing_images:n,status:o}=await lf(e,r,fa.state.clientId);return fa.dispatch("setIsCapturingProcessStarted",!0),await Vp({status:o,sessionId:e,userToken:r,missingImages:n,rootElementId:fa.state.rootElementId,language:fa.state.language}),!0}async function Gp(t){try{return await jp(t)}catch(t){throw console.log("Error starting session"),console.error(t),t}}async function Wp(){try{return await async function(){if("recapture"===fa.state.verificationStatus||"pending"===fa.state.verificationStatus){const{sessionId:t,userToken:e}=Lp(),{missing_images:r,status:n}=await lf(t,e,fa.state.clientId);return await Vp({status:n,sessionId:t,userToken:e,missingImages:r,rootElementId:fa.state.rootElementId,language:fa.state.language}),!0}sa(fa.state.step,"trying-to-initialize-active-session")}()}catch(t){throw console.log("Error restarting session"),console.error(t),t}}async function Xp(){return Wp()}const Yp=()=>Vo;var Zp=Object.freeze({__proto__:null,recapture:Wp,restart:Xp,start:Gp,version:Yp});const qp={initialize:e.initialize,...Zp};Object.defineProperty(exports,"initialize",{enumerable:!0,get:function(){return e.initialize}}),exports.PACKAGE_VERSION="2.0.0",exports.idv=qp,exports.recapture=Wp,exports.restart=Xp,exports.start=Gp,exports.version=Yp;
1
+ "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));var t=require("./common.cjs"),e=require("./common.cjs");function r(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={},u={};function c(t){let e=t.length;for(;--e>=0;)t[e]=0}const l=256,d=286,h=30,f=15,p=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]),g=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]),m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),y=new Array(576);c(y);const w=new Array(60);c(w);const v=new Array(512);c(v);const E=new Array(256);c(E);const b=new Array(29);c(b);const A=new Array(h);function C(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}let x,I,S;function T(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}c(A);const D=t=>t<256?v[t]:v[256+(t>>>7)],O=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},R=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,O(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},M=(t,e,r)=>{R(t,r[2*e],r[2*e+1])},N=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},k=(t,e,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=f;o++)n[o]=a=a+r[o-1]<<1;for(i=0;i<=e;i++){let e=t[2*i+1];0!==e&&(t[2*i]=N(n[e]++,e))}},P=t=>{let e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},B=t=>{t.bi_valid>8?O(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},F=(t,e,r,n)=>{const o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]},L=(t,e,r)=>{const n=t.heap[r];let o=r<<1;for(;o<=t.heap_len&&(o<t.heap_len&&F(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!F(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n},z=(t,e,r)=>{let n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?M(t,o,e):(i=E[o],M(t,i+l+1,e),a=p[i],0!==a&&(o-=b[i],R(t,o,a)),n--,i=D(n),M(t,i,r),a=g[i],0!==a&&(n-=A[i],R(t,n,a)))}while(s<t.last_lit);M(t,256,e)},U=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,o=e.stat_desc.has_stree,i=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<i;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,o&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)L(t,r,a);u=i;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,L(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,o=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,l,d,h,p,g,m=0;for(h=0;h<=f;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)l=t.heap[c],h=r[2*r[2*l+1]+1]+1,h>u&&(h=u,m++),r[2*l+1]=h,l>n||(t.bl_count[h]++,p=0,l>=s&&(p=a[l-s]),g=r[2*l],t.opt_len+=g*(h+p),i&&(t.static_len+=g*(o[2*l+1]+p)));if(0!==m){do{for(h=u-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[u]--,m-=2}while(m>0);for(h=u;0!==h;h--)for(l=t.bl_count[h];0!==l;)d=t.heap[--c],d>n||(r[2*d+1]!==h&&(t.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),l--)}})(t,e),k(r,c,t.bl_count)},V=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<u&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))},H=(t,e,r)=>{let n,o,i=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<u&&o===a)){if(s<c)do{M(t,o,t.bl_tree)}while(0!=--s);else 0!==o?(o!==i&&(M(t,o,t.bl_tree),s--),M(t,16,t.bl_tree),R(t,s-3,2)):s<=10?(M(t,17,t.bl_tree),R(t,s-3,3)):(M(t,18,t.bl_tree),R(t,s-11,7));s=0,i=o,0===a?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}};let j=!1;const G=(t,e,r,n)=>{R(t,0+(n?1:0),3),((t,e,r,n)=>{B(t),n&&(O(t,r),O(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};u._tr_init=t=>{j||((()=>{let t,e,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(b[n]=r,t=0;t<1<<p[n];t++)E[r++]=n;for(E[r-1]=n,o=0,n=0;n<16;n++)for(A[n]=o,t=0;t<1<<g[n];t++)v[o++]=n;for(o>>=7;n<h;n++)for(A[n]=o<<7,t=0;t<1<<g[n]-7;t++)v[256+o++]=n;for(e=0;e<=f;e++)i[e]=0;for(t=0;t<=143;)y[2*t+1]=8,t++,i[8]++;for(;t<=255;)y[2*t+1]=9,t++,i[9]++;for(;t<=279;)y[2*t+1]=7,t++,i[7]++;for(;t<=287;)y[2*t+1]=8,t++,i[8]++;for(k(y,287,i),t=0;t<h;t++)w[2*t+1]=5,w[2*t]=N(t,5);x=new C(y,p,257,d,f),I=new C(w,g,0,h,f),S=new C(new Array(0),m,0,19,7)})(),j=!0),t.l_desc=new T(t.dyn_ltree,x),t.d_desc=new T(t.dyn_dtree,I),t.bl_desc=new T(t.bl_tree,S),t.bi_buf=0,t.bi_valid=0,P(t)},u._tr_stored_block=G,u._tr_flush_block=(t,e,r,n)=>{let o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<l;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),U(t,t.l_desc),U(t,t.d_desc),a=(t=>{let e;for(V(t,t.dyn_ltree,t.l_desc.max_code),V(t,t.dyn_dtree,t.d_desc.max_code),U(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*_[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?G(t,e,r,n):4===t.strategy||i===o?(R(t,2+(n?1:0),3),z(t,y,w)):(R(t,4+(n?1:0),3),((t,e,r,n)=>{let o;for(R(t,e-257,5),R(t,r-1,5),R(t,n-4,4),o=0;o<n;o++)R(t,t.bl_tree[2*_[o]+1],3);H(t,t.dyn_ltree,e-1),H(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),z(t,t.dyn_ltree,t.dyn_dtree)),P(t),n&&B(t)},u._tr_tally=(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(E[r]+l+1)]++,t.dyn_dtree[2*D(e)]++),t.last_lit===t.lit_bufsize-1),u._tr_align=t=>{R(t,2,3),M(t,256,y),(t=>{16===t.bi_valid?(O(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var W=(t,e,r,n)=>{let o=65535&t,i=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+e[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16};const X=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var Y=(t,e,r,n)=>{const o=X,i=n+r;t^=-1;for(let r=n;r<i;r++)t=t>>>8^o[255&(t^e[r])];return~t},Z={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"},q={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:K,_tr_stored_block:$,_tr_flush_block:J,_tr_tally:Q,_tr_align:tt}=u,et=W,rt=Y,nt=Z,{Z_NO_FLUSH:ot,Z_PARTIAL_FLUSH:it,Z_FULL_FLUSH:at,Z_FINISH:st,Z_BLOCK:ut,Z_OK:ct,Z_STREAM_END:lt,Z_STREAM_ERROR:dt,Z_DATA_ERROR:ht,Z_BUF_ERROR:ft,Z_DEFAULT_COMPRESSION:pt,Z_FILTERED:gt,Z_HUFFMAN_ONLY:mt,Z_RLE:_t,Z_FIXED:yt,Z_DEFAULT_STRATEGY:wt,Z_UNKNOWN:vt,Z_DEFLATED:Et}=q,bt=258,At=262,Ct=103,xt=113,It=666,St=(t,e)=>(t.msg=nt[e],e),Tt=t=>(t<<1)-(t>4?9:0),Dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let Ot=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const Rt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Mt=(t,e)=>{J(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Rt(t.strm)},Nt=(t,e)=>{t.pending_buf[t.pending++]=e},kt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Pt=(t,e,r,n)=>{let o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,e.set(t.input.subarray(t.next_in,t.next_in+o),r),1===t.state.wrap?t.adler=et(t.adler,e,o,r):2===t.state.wrap&&(t.adler=rt(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)},Bt=(t,e)=>{let r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-At?t.strstart-(t.w_size-At):0,c=t.window,l=t.w_mask,d=t.prev,h=t.strstart+bt;let f=c[i+a-1],p=c[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<h);if(n=bt-(h-i),i=h-bt,n>a){if(t.match_start=e,a=n,n>=s)break;f=c[i+a-1],p=c[i+a]}}}while((e=d[e&l])>u&&0!=--o);return a<=t.lookahead?a:t.lookahead},Ft=t=>{const e=t.w_size;let r,n,o,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-At)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{o=t.head[--r],t.head[r]=o>=e?o-e:0}while(--n);n=e,r=n;do{o=t.prev[--r],t.prev[r]=o>=e?o-e:0}while(--n);i+=e}if(0===t.strm.avail_in)break;if(n=Pt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Ot(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Ot(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<At&&0!==t.strm.avail_in)},Lt=(t,e)=>{let r,n;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Ot(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r)),t.match_length>=3)if(n=Q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Ot(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Ot(t,t.ins_h,t.window[t.strstart+1]);else n=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(Mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Mt(t,!1),0===t.strm.avail_out)?1:2},zt=(t,e)=>{let r,n,o;for(;;){if(t.lookahead<At){if(Ft(t),t.lookahead<At&&e===ot)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Ot(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-At&&(t.match_length=Bt(t,r),t.match_length<=5&&(t.strategy===gt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=Q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=Ot(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Mt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=Q(t,0,t.window[t.strstart-1]),n&&Mt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=Q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(Mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Mt(t,!1),0===t.strm.avail_out)?1:2};function Ut(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}const Vt=[new Ut(0,0,0,0,((t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ft(t),0===t.lookahead&&e===ot)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Mt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-At&&(Mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Mt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Mt(t,!1),t.strm.avail_out),1)})),new Ut(4,4,8,4,Lt),new Ut(4,5,16,8,Lt),new Ut(4,6,32,32,Lt),new Ut(4,4,16,16,zt),new Ut(8,16,32,32,zt),new Ut(8,16,128,128,zt),new Ut(8,32,128,256,zt),new Ut(32,128,258,1024,zt),new Ut(32,258,258,4096,zt)];function Ht(){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=Et,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),Dt(this.dyn_ltree),Dt(this.dyn_dtree),Dt(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),Dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Dt(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 jt=t=>{if(!t||!t.state)return St(t,dt);t.total_in=t.total_out=0,t.data_type=vt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:xt,t.adler=2===e.wrap?0:1,e.last_flush=ot,K(e),ct},Gt=t=>{const e=jt(t);return e===ct&&(t=>{t.window_size=2*t.w_size,Dt(t.head),t.max_lazy_match=Vt[t.level].max_lazy,t.good_match=Vt[t.level].good_length,t.nice_match=Vt[t.level].nice_length,t.max_chain_length=Vt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},Wt=(t,e,r,n,o,i)=>{if(!t)return dt;let a=1;if(e===pt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==Et||n<8||n>15||e<0||e>9||i<0||i>yt)return St(t,dt);8===n&&(n=9);const s=new Ht;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+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<<o+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=e,s.strategy=i,s.method=r,Gt(t)};s.deflateInit=(t,e)=>Wt(t,e,Et,15,8,wt),s.deflateInit2=Wt,s.deflateReset=Gt,s.deflateResetKeep=jt,s.deflateSetHeader=(t,e)=>t&&t.state?2!==t.state.wrap?dt:(t.state.gzhead=e,ct):dt,s.deflate=(t,e)=>{let r,n;if(!t||!t.state||e>ut||e<0)return t?St(t,dt):dt;const o=t.state;if(!t.output||!t.input&&0!==t.avail_in||o.status===It&&e!==st)return St(t,0===t.avail_out?ft:dt);o.strm=t;const i=o.last_flush;if(o.last_flush=e,42===o.status)if(2===o.wrap)t.adler=0,Nt(o,31),Nt(o,139),Nt(o,8),o.gzhead?(Nt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),Nt(o,255&o.gzhead.time),Nt(o,o.gzhead.time>>8&255),Nt(o,o.gzhead.time>>16&255),Nt(o,o.gzhead.time>>24&255),Nt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),Nt(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(Nt(o,255&o.gzhead.extra.length),Nt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=rt(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(Nt(o,0),Nt(o,0),Nt(o,0),Nt(o,0),Nt(o,0),Nt(o,9===o.level?2:o.strategy>=mt||o.level<2?4:0),Nt(o,3),o.status=xt);else{let e=Et+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=mt||o.level<2?0:o.level<6?1:6===o.level?2:3,e|=r<<6,0!==o.strstart&&(e|=32),e+=31-e%31,o.status=xt,kt(o,e),0!==o.strstart&&(kt(o,t.adler>>>16),kt(o,65535&t.adler)),t.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Rt(t),r=o.pending,o.pending!==o.pending_buf_size));)Nt(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Rt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,Nt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),Rt(t),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,Nt(o,n)}while(0!==n);o.gzhead.hcrc&&o.pending>r&&(t.adler=rt(t.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=Ct)}else o.status=Ct;if(o.status===Ct&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&Rt(t),o.pending+2<=o.pending_buf_size&&(Nt(o,255&t.adler),Nt(o,t.adler>>8&255),t.adler=0,o.status=xt)):o.status=xt),0!==o.pending){if(Rt(t),0===t.avail_out)return o.last_flush=-1,ct}else if(0===t.avail_in&&Tt(e)<=Tt(i)&&e!==st)return St(t,ft);if(o.status===It&&0!==t.avail_in)return St(t,ft);if(0!==t.avail_in||0!==o.lookahead||e!==ot&&o.status!==It){let r=o.strategy===mt?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Ft(t),0===t.lookahead)){if(e===ot)return 1;break}if(t.match_length=0,r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Mt(t,!1),0===t.strm.avail_out)?1:2})(o,e):o.strategy===_t?((t,e)=>{let r,n,o,i;const a=t.window;for(;;){if(t.lookahead<=bt){if(Ft(t),t.lookahead<=bt&&e===ot)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(o=t.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=t.strstart+bt;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=bt-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=Q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Mt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Mt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Mt(t,!1),0===t.strm.avail_out)?1:2})(o,e):Vt[o.level].func(o,e);if(3!==r&&4!==r||(o.status=It),1===r||3===r)return 0===t.avail_out&&(o.last_flush=-1),ct;if(2===r&&(e===it?tt(o):e!==ut&&($(o,0,0,!1),e===at&&(Dt(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),Rt(t),0===t.avail_out))return o.last_flush=-1,ct}return e!==st?ct:o.wrap<=0?lt:(2===o.wrap?(Nt(o,255&t.adler),Nt(o,t.adler>>8&255),Nt(o,t.adler>>16&255),Nt(o,t.adler>>24&255),Nt(o,255&t.total_in),Nt(o,t.total_in>>8&255),Nt(o,t.total_in>>16&255),Nt(o,t.total_in>>24&255)):(kt(o,t.adler>>>16),kt(o,65535&t.adler)),Rt(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?ct:lt)},s.deflateEnd=t=>{if(!t||!t.state)return dt;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==Ct&&e!==xt&&e!==It?St(t,dt):(t.state=null,e===xt?St(t,ht):ct)},s.deflateSetDictionary=(t,e)=>{let r=e.length;if(!t||!t.state)return dt;const n=t.state,o=n.wrap;if(2===o||1===o&&42!==n.status||n.lookahead)return dt;if(1===o&&(t.adler=et(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Dt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const i=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Ft(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Ot(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Ft(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,t.next_in=a,t.input=s,t.avail_in=i,n.wrap=o,ct},s.deflateInfo="pako deflate (from Nodeca project)";var Xt={};const Yt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Xt.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Yt(r,e)&&(t[e]=r[e])}}return t},Xt.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,o=t.length;e<o;e++){let o=t[e];r.set(o,n),n+=o.length}return r};var Zt={};let qt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){qt=!1}const Kt=new Uint8Array(256);for(let t=0;t<256;t++)Kt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Kt[254]=Kt[254]=1,Zt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),i=0,o=0;i<s;o++)r=t.charCodeAt(o),55296==(64512&r)&&o+1<a&&(n=t.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e};Zt.buf2string=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,o;const i=new Array(2*r);for(o=0,n=0;n<r;){let e=t[n++];if(e<128){i[o++]=e;continue}let a=Kt[e];if(a>4)i[o++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?i[o++]=65533:e<65536?i[o++]=e:(e-=65536,i[o++]=55296|e>>10&1023,i[o++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&qt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(i,o)},Zt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Kt[t[r]]>e?r:e};const $t=s,Jt=Xt,Qt=Zt,te=Z,ee=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},re=Object.prototype.toString,{Z_NO_FLUSH:ne,Z_SYNC_FLUSH:oe,Z_FULL_FLUSH:ie,Z_FINISH:ae,Z_OK:se,Z_STREAM_END:ue,Z_DEFAULT_COMPRESSION:ce,Z_DEFAULT_STRATEGY:le,Z_DEFLATED:de}=q;function he(t){this.options=Jt.assign({level:ce,method:de,chunkSize:16384,windowBits:15,memLevel:8,strategy:le},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ee,this.strm.avail_out=0;let r=$t.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==se)throw new Error(te[r]);if(e.header&&$t.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Qt.string2buf(e.dictionary):"[object ArrayBuffer]"===re.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=$t.deflateSetDictionary(this.strm,t),r!==se)throw new Error(te[r]);this._dict_set=!0}}he.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=e===~~e?e:!0===e?ae:ne,"string"==typeof t?r.input=Qt.string2buf(t):"[object ArrayBuffer]"===re.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===oe||i===ie)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=$t.deflate(r,i),o===ue)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=$t.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===se;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},he.prototype.onData=function(t){this.chunks.push(t)},he.prototype.onEnd=function(t){t===se&&(this.result=Jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var fe=function(t,e){return(e=e||{}).gzip=!0,function(t,e){const r=new he(e);if(r.push(t,!0),r.err)throw r.msg||te[r.err];return r.result}(t,e)};const pe=["enabled","userId","serverPath"];var ge,me,_e=new t("drs"),ye=["removeItemSessionStorageSafe","getItemLocalStorageSafe","localStorage","setItemLocalStorageSafe","removeItemLocalStorageSafe","removeItem","FALLBACK_SESSION_STORAGE","FALLBACK_LOCAL_STORAGE","setClientId","clientId","getFullStorageKey","getItemSessionStorageSafe","sessionStorage","getItem","setItemSessionStorageSafe","setItem"];ge=ye,me=374,function(t){for(;--t;)ge.push(ge.shift())}(++me);var we=function(t,e){return ye[t-=0]};class ve{constructor(t){this[we("0x0")]={},this[we("0x1")]={},this.clientId=t}getClientId(){return this.clientId}[we("0x2")](t){this[we("0x3")]=t}[we("0x4")](t){return this[we("0x3")]+"_"+t}[we("0x5")](t){const e=this[we("0x4")](t);try{return window[we("0x6")][we("0x7")](e)}catch(t){return this[we("0x0")][e]}}[we("0x8")](t,e){const r=this[we("0x4")](t);try{window[we("0x6")][we("0x9")](r,e)}catch(t){this[we("0x0")][r]=e}}[we("0xa")](t){const e=this[we("0x4")](t);try{window.sessionStorage.removeItem(e)}catch(t){this.FALLBACK_SESSION_STORAGE[e]=void 0}}[we("0xb")](t){const e=this[we("0x4")](t);try{return window[we("0xc")][we("0x7")](e)}catch(t){return this[we("0x1")][e]}}[we("0xd")](t,e){const r=this[we("0x4")](t);try{window[we("0xc")][we("0x9")](r,e)}catch(t){this[we("0x1")][r]=e}}[we("0xe")](t){const e=this[we("0x4")](t);try{window[we("0xc")][we("0xf")](e)}catch(t){this[we("0x1")][e]=void 0}}}var Ee,be,Ae=["logs","middlewares","info","error","pushLog","flush","log","%s %s %s","push","stringify","formatter","length","unshift","map","all","catch","enabled","logPrefix","[AccountProtection SDK]","logsLimit"];Ee=Ae,be=236,function(t){for(;--t;)Ee.push(Ee.shift())}(++be);var Ce=function(t,e){return Ae[t-=0]};class xe{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[Ce("0x0")]=t,this[Ce("0x1")]=Ce("0x2"),this[Ce("0x3")]=1e4,this[Ce("0x4")]=[],this[Ce("0x5")]=[]}[Ce("0x6")](t,e){this.pushLog(3,t,e)}warn(t,e){this.pushLog(4,t,e)}[Ce("0x7")](t,e){this[Ce("0x8")](5,t,e)}[Ce("0x9")](){const t=this[Ce("0x4")];return this[Ce("0x4")]=[],t}[Ce("0x8")](t,e,r){this[Ce("0x0")]&&console[Ce("0xa")](Ce("0xb"),this[Ce("0x1")],e,JSON.stringify(r)),this[Ce("0x4")][Ce("0xc")]({timestamp:Date.now(),severity:t,text:JSON[Ce("0xd")](o(o({},r),{},{message:e}),this[Ce("0xe")])}),this[Ce("0x4")][Ce("0xf")]>this[Ce("0x3")]&&this[Ce("0x4")][Ce("0x10")]();const n=this[Ce("0x5")][Ce("0x11")]((t=>t()));Promise[Ce("0x12")](n)[Ce("0x13")]((()=>{}))}[Ce("0xe")](t,e){if(e instanceof Error){const{name:t,stack:r,message:n}=e;return{name:t,stack:r,message:n}}return e}}const Ie=new xe;var Se,Te,De=["platform","platformVersion","fullVersionList","wow64","resolve","catch","setTimeout","executor reached timeout","finally","userAgentData","getHighEntropyValues","architecture"];Se=De,Te=237,function(t){for(;--t;)Se.push(Se.shift())}(++Te);var Oe=function(t,e){return De[t-=0]};function Re(){var t;return null===(t=navigator[Oe("0x0")])||void 0===t?void 0:t[Oe("0x1")]([Oe("0x2"),"model",Oe("0x3"),Oe("0x4"),Oe("0x5"),"bitness","mobile",Oe("0x6"),"uaFullVersion"])}function Me(t,e){let r;const n=[Promise[Oe("0x7")](t())[Oe("0x8")]((()=>{})),new Promise(((t,n)=>r=window[Oe("0x9")](n,e)))];return Promise.race(n)[Oe("0x8")]((()=>Ie.warn(Oe("0xa"),{fnName:t.name})))[Oe("0xb")]((()=>clearTimeout(r)))}var Ne,ke,Pe=["cryptoBinding","getConfValue","dataPointsExtractor","lastDeviceData","setItemLocalStorageSafe","getDeviceData","now","calculate","dataPoints","getBattery","getBrave","getCanvasFingerprint","getCodesTests","getConnection","getCookieEnabled","getCryptoRandomValues","getDeviceMemory","getIndexedDB","getFIDOEnabled","getLanguages","getLanguage","getTimezoneOffset","getLocalStorage","getNavigatorBasedKeys","getNavigatorProduct","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorOnLine","navigatorIsUserActive","getMathFingerprint","getMediaMatch","getOpenDatabase","getWindowOrientation","getCpuClass","getOsCpu","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprint","getAudioFingerprintExtended","getFonts","getPerformanceTiming","getPerformanceMemory","getPlugins","getScreen","hasSequentum","getSessionStorage","getReferrer","getTimezone","getTouchSupport","getBuildID","getWebDriver","getWebGlRenderer","getWindowBasedKeys","getWindowOuter","getCryptoBindingData","bind","getNavigatorPermissionsState","notifications","geolocation","isGeoLocationExists","isSendBeaconFunction","getInstalledRelatedApps","windowConstructorAliasTest","CDPRuntimeDomainTest","Object","defineProperty","debug","stack","windowDocumentAuxVarsTest","test","values","getOwnPropertyDescriptors","document","value","cache_","getOwnPropertyNames","getPrototypeOf","storeItem","isNodeReachable_","sort","Promise","name","token","getAsyncToken","startPromisesLoop","collectPromisesData","includes","worker throw error","resolve","entries","warn","worker promise rejected","cookieEnabled","credentials","PublicKeyCredential","crypto","getRandomValues","from","webRTCDisabled","RTCPeerConnection","__crWeb","yandex","__yb","__firefox__","webkit","oprt","samsungAr","puffinDevice","__phantomas","callPhantom","Buffer","emit","spawn","domAutomation","_selenium","calledSelenium","callSelenium","__$webdriverAsyncExecutor","__driver_evaluate","__driver_unwrapped","__fxdriver_evaluate","__fxdriver_unwrapped","__lastWatirAlert","__lastWatirPrompt","__selenium_evaluate","__webdriver__chr","__webdriver_evaluate","__webdriver_script_func","__webdriver_script_function","__webdriver_unwrapped","__webdriverFuncgeb","awesomium","calledPhantom","cdc_adoQpoasnfa76pfcZLmcfl_Array","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","chrome_asyncScriptInfo","fmget_targets","spynner_additional_js_loaded","watinExpressionError","push","high","standard","no-preference","low","forced","100","1000","none","inverted","rec2020","srgb","replace","matchMedia","matches","log","sqrt","exp","asin","atanh","sinh","cosh","tanh","expm1","log1p","length","hashCodeString","sessionStorage","localStorage","external","indexOf","__selenium_unwrapped","_WEBDRIVER_ELEM_CACHE","driver-evaluate","webdriver-evaluate","webdriver-evaluate-response","__webdriverFunc","__webdriver_script_fn","__lastWatirConfirm","$chrome_asyncScriptInfo","$cdc_asdjflasutopfhvcZLmcfl_","filter","product","getNavigatorUserAgent","userAgent","getNavigatorUAData","userAgentData","storage","estimate","onLine","isActive","query","state","sendBeacon","function","getNavigatorPrototype","getOwnPropertyDescriptor","get","toString","languages","map","platform","referrer","timing","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","ontouchstart","type","plugins","description","screen","colorDepth","height","width","orientation","angle","devicePixelRatio","outerHeight","webdriver","cpuClass","HTMLElement","prototype","productSub","enumerateDevices","label","deviceId","groupId","OfflineAudioContext","webkitOfflineAudioContext","createOscillator","triangle","frequency","threshold","knee","attack","release","connect","destination","start","renderedBuffer","startRendering","getChannelData","subarray","createDynamicsCompressor","disconnect","frequencyBinCount","call","fftSize","getFloatTimeDomainData","reduction","getHash","mmMwWLliI0O&1","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","BankGothic Md BT","Batang","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Helvetica Neue","Humanst521 BT","Leelawadee","Levenim MT","Lucida Bright","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Monotype Corsiva","PMingLiU","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Vrinda","ZWAdobeF","div","style","hidden","createElement","absolute","top","left","fontFamily","fontSize","10px","textContent","appendChild","offsetWidth","body","offsetHeight","removeChild","getHardwareConcurrency","hardwareConcurrency","DateTimeFormat","resolvedOptions","timeZone","getVendor","vendor","buildID","textBaseline","fillStyle","#f60",'11pt "Times New Roman"',"Cwm fjordbank gly ","fromCharCode","fillText","rgba(102, 204, 0, 0.2)","toDataURL","globalCompositeOperation","multiply","#f2f","#ff2","beginPath","closePath","fill","#f9c","arc","evenodd","rect","isPointInPath","canvas","getContext","charging","chargingTime","dischargingTime","level","brave","isBrave","webgl","getExtension","WEBGL_debug_renderer_info","getParameter","video",'video/mp4; codecs="avc1.42E01E"',"getPublicData","isMobile","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","reduce","abs","storageManager","configManager"];Ne=Pe,ke=359,function(t){for(;--t;)Ne.push(Ne.shift())}(++ke);var Be=function(t,e){return Pe[t-=0]};const Fe=Be("0x0"),Le=Be("0x1"),ze=t=>t?[...t][Be("0x2")](((t,e)=>t+Math[Be("0x3")](e)),0):0;class Ue{constructor(t,e,r){this[Be("0x4")]=t,this[Be("0x5")]=e,this[Be("0x6")]=r}async calculate(){const t=this[Be("0x5")][Be("0x7")](Fe,[]),e=this[Be("0x5")][Be("0x7")](Le,36e5),r=await new Ve(t,this[Be("0x6")])[Be("0x8")]();return this[Be("0x9")]=r,this[Be("0x4")][Be("0xa")](Le,Date.now()+e),r}async[Be("0xb")](){return Number(this[Be("0x4")].getItemLocalStorageSafe(Le))<Date[Be("0xc")]()||!this[Be("0x9")]?await this[Be("0xd")]()||{}:this[Be("0x9")]||{}}}class Ve{constructor(t,e){this[Be("0x0")]=t,this[Be("0x6")]=e,this[Be("0xe")]={battery:this[Be("0xf")],brave:this[Be("0x10")],canvas:this[Be("0x11")],codecs:this[Be("0x12")],connection:this[Be("0x13")],cookieEnabled:this[Be("0x14")],cryptoRandomValues:this[Be("0x15")],deviceMemory:this[Be("0x16")],documentBasedKeys:this.getDocumentBasedKeys,hardwareConcurrency:this.getHardwareConcurrency,indexedDB:this[Be("0x17")],fidoEnabled:this[Be("0x18")],languages:this[Be("0x19")],language:this[Be("0x1a")],timezoneOffset:this[Be("0x1b")],localStorage:this[Be("0x1c")],navigatorBasedKeys:this[Be("0x1d")],navigatorProduct:this[Be("0x1e")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this.getNavigatorUAData,navigatorHighEntropyData:this[Be("0x1f")],navigatorStorageEstimation:this[Be("0x20")],navigatorOnLine:this[Be("0x21")],navigatorIsUserActive:this[Be("0x22")],math:this[Be("0x23")],mediaMatch:this[Be("0x24")],openDatabase:this[Be("0x25")],windowOrientation:this[Be("0x26")],platform:this.getPlatform,cpuClass:this[Be("0x27")],osClass:this[Be("0x28")],addBehavior:this[Be("0x29")],productSub:this[Be("0x2a")],mediaDevices:this[Be("0x2b")],audioFingerprint:this[Be("0x2c")],audioFingerprintExtended:this[Be("0x2d")],fonts:this[Be("0x2e")],performanceTiming:this[Be("0x2f")],performanceMemory:this[Be("0x30")],plugins:this[Be("0x31")],screen:this[Be("0x32")],sequentum:this[Be("0x33")],sessionStorage:this[Be("0x34")],referrer:this[Be("0x35")],timezone:this[Be("0x36")],touchSupport:this[Be("0x37")],vendor:this.getVendor,buildID:this[Be("0x38")],webdriver:this[Be("0x39")],webGlRenderer:this[Be("0x3a")],windowBasedKeys:this[Be("0x3b")],windowOuter:this[Be("0x3c")],webRTCDisabled:this.webRTCDisabled,cryptoBindingData:this[Be("0x3d")][Be("0x3e")](this),notificationState:this[Be("0x3f")].bind(this,Be("0x40")),geolocationState:this[Be("0x3f")][Be("0x3e")](this,Be("0x41")),isGeoLocationExists:this[Be("0x42")],isSendBeaconExists:this[Be("0x43")],navigatorPrototype:this.getNavigatorPrototype,installedRelatedApps:this[Be("0x44")],windowConstructorAliasTest:this[Be("0x45")],windowDocumentAuxVarsTest:this.windowDocumentAuxVarsTest,CDPRuntimeDomainTest:this[Be("0x46")]}}[Be("0x46")](){let t=!1;const e=new window.Error;return window[Be("0x47")][Be("0x48")](e,"stack",{configurable:!1,enumerable:!1,get:function(){return t=!0,""}}),window.console[Be("0x49")](e[Be("0x4a")]),t}[Be("0x4b")](){for(const t of window.Object.getOwnPropertyNames(window.document))if("$chrome_asyncScriptInfo"==t||/^\$cdc_[a-zA-Z0-9]{22}_$/[Be("0x4c")](t))return!0;for(const t of window[Be("0x47")][Be("0x4d")](window[Be("0x47")][Be("0x4e")](window[Be("0x4f")]))){if(!t.value||void 0===t[Be("0x50")][Be("0x51")])continue;const e=window.Object[Be("0x52")](window[Be("0x47")][Be("0x53")](t[Be("0x50")])),r=[Be("0x54"),"retrieveItem",Be("0x55")];if(e[Be("0x56")](),r[Be("0x56")](),e.every(((t,e)=>t==r[e])))return!0}return!1}windowConstructorAliasTest(){const t=window[Be("0x47")][Be("0x52")](window);for(const e of t){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/.test(e))return!0;for(const t of[window.Array,window[Be("0x57")],window.Symbol])if(e!=(null==t?void 0:t[Be("0x58")])&&e!=Be("0x59")&&e!=Be("0x5a")&&window[e]===t)return!0}return!1}async[Be("0x8")](){const t=this[Be("0x5b")]();return await this[Be("0x5c")](t)}[Be("0x5b")](){const t={};for(const[e,r]of Object.entries(this[Be("0xe")]))if(!this[Be("0x0")][Be("0x5d")](e))try{t[e]=Me(r,100)}catch(r){Ie.warn(Be("0x5e"),{e:r,key:e}),t[e]=Promise[Be("0x5f")]()}return t}async[Be("0x5c")](t){const e={};for(const[r,n]of Object[Be("0x60")](t))try{e[r]=await n}catch(t){Ie[Be("0x61")](Be("0x62"),{e:t,key:r}),e[r]=void 0}return e}getCookieEnabled(){const t=navigator[Be("0x63")];return Promise.resolve(t)}async[Be("0x18")](){return!!navigator[Be("0x64")]&&await window[Be("0x65")].isUserVerifyingPlatformAuthenticatorAvailable()}[Be("0x15")](){const t=window[Be("0x66")][Be("0x67")](new Uint8Array(16));return Array[Be("0x68")](t)}[Be("0x69")](){const t=null==window[Be("0x6a")];return Promise.resolve(t)}getWindowBasedKeys(){const t=["chrome","safari",Be("0x6b"),"__gCrWeb",Be("0x6c"),Be("0x6d"),"__ybro",Be("0x6e"),"__edgeTrackingPreventionStatistics",Be("0x6f"),Be("0x70"),Be("0x71"),"ucweb","UCShellJava",Be("0x72"),"_phantom",Be("0x73"),Be("0x74"),Be("0x75"),Be("0x76"),Be("0x77"),"domAutomationController",Be("0x78"),"__nightmare",Be("0x79"),Be("0x7a"),Be("0x7b"),"_Selenium_IDE_Recorder",Be("0x7c"),Be("0x7d"),Be("0x7e"),Be("0x7f"),Be("0x80"),Be("0x81"),"__lastWatirConfirm",Be("0x82"),Be("0x83"),"__selenium_unwrapped",Be("0x84"),Be("0x85"),"__webdriver_script_fn",Be("0x86"),Be("0x87"),Be("0x88"),Be("0x89"),Be("0x8a"),Be("0x8b"),Be("0x8c"),"cdc_adoQpoasnfa76pfcZLmcfl_Promise",Be("0x8d"),Be("0x8e"),Be("0x8f"),"geb","OSMJIF",Be("0x90"),Be("0x91"),"watinExpressionResult"],e=[];for(const r of t){const t=window[r];void 0!==t&&null!=t&&e[Be("0x92")](r)}return Promise[Be("0x5f")](e)}getMediaMatch(){const t={"dynamic-range":[Be("0x93"),Be("0x94")],"prefers-reduced-motion":[Be("0x95"),"reduce"],"prefers-contrast":[Be("0x95"),Be("0x93"),Be("0x96"),"more","less",Be("0x97")],"max-monochrome":["0","10",Be("0x98"),Be("0x99")],"forced-colors":["active",Be("0x9a")],"inverted-colors":[Be("0x9b"),Be("0x9a")],"color-gamut":[Be("0x9c"),"p3",Be("0x9d")]},e={};for(const[r,n]of Object.entries(t))for(const t of n)e[r[Be("0x9e")](/-/g,"_")+"_"+t.replace(/-/g,"_")]=window[Be("0x9f")]("("+r+": "+t+")")[Be("0xa0")];return Promise.resolve(e)}[Be("0x23")](){const t=[Math.acos(.12312423423423424),Math.acosh(1e308),(e=1e154,Math[Be("0xa1")](e+Math[Be("0xa2")](e*e-1))),Math[Be("0xa4")](.12312423423423424),Math.asinh(1),Math[Be("0xa1")](1+Math[Be("0xa2")](2)),Math[Be("0xa5")](.5),Math[Be("0xa1")](3)/2,Math.atan(.5),Math.sin(-1e300),Math[Be("0xa6")](1),Math[Be("0xa3")](1)-1/Math.exp(1)/2,Math.cos(10.000000000123),Math[Be("0xa7")](1),(Math[Be("0xa3")](1)+1/Math[Be("0xa3")](1))/2,Math.tan(-1e300),Math[Be("0xa8")](1),(Math.exp(2)-1)/(Math[Be("0xa3")](2)+1),Math[Be("0xa3")](1),Math[Be("0xa9")](1),Math[Be("0xa3")](1)-1,Math[Be("0xaa")](10),Math[Be("0xa1")](11),Math.PI**-100];var e;let r="";for(let e=0;e<t[Be("0xab")];e++)r+=t[e].toString();return Promise[Be("0x5f")](Ve[Be("0xac")](r))}getConnection(){const{connection:t}=navigator,e=(t=>{let{downlink:e,effectiveType:r,rtt:n,saveData:o}=t;return{downlink:e,effectiveType:r,rtt:n,saveData:o}})(t);return Promise[Be("0x5f")](e)}getSessionStorage(){return Promise[Be("0x5f")](!!window[Be("0xad")])}[Be("0x1c")](){return Promise[Be("0x5f")](!!window[Be("0xae")])}[Be("0x33")](){return-1!==window[Be("0xaf")].toString()[Be("0xb0")]("Sequentum")}[Be("0x1d")](){return["webdriver","__driver_evaluate",Be("0x85"),Be("0x83"),Be("0x7f"),Be("0x7e"),Be("0x88"),Be("0xb1"),Be("0x80"),"_Selenium_IDE_Recorder",Be("0x79"),"calledSelenium",Be("0xb2"),"ChromeDriverw",Be("0xb3"),Be("0xb4"),"selenium-evaluate","webdriverCommand",Be("0xb5"),Be("0xb6"),Be("0xb7"),"__$webdriverAsyncExecutor","__lastWatirAlert",Be("0xb8"),Be("0x82"),Be("0xb9"),Be("0xba"),"serviceWorker"][Be("0xbb")]((t=>navigator[t]))}[Be("0x1e")](){const t=navigator[Be("0xbc")];return Promise.resolve(t)}[Be("0xbd")](){return navigator[Be("0xbe")]}[Be("0xbf")](){return navigator[Be("0xc0")]}[Be("0x1f")](){return Re()}[Be("0x20")](){return navigator[Be("0xc1")][Be("0xc2")]()}[Be("0x21")](){return navigator[Be("0xc3")]}[Be("0x22")](){return navigator.userActivation[Be("0xc4")]}async[Be("0x3f")](t){try{const e=await navigator.permissions[Be("0xc5")]({name:t});return null==e?void 0:e[Be("0xc6")]}catch(t){}}isGeoLocationExists(){return!!navigator.geolocation}isSendBeaconFunction(){return typeof navigator[Be("0xc7")]===Be("0xc8")}[Be("0xc9")](){return{hardwareConcurrency:Object[Be("0xca")](Object[Be("0x53")](navigator),"hardwareConcurrency")[Be("0xcb")][Be("0xcc")](),languages:Object[Be("0xca")](Object[Be("0x53")](navigator),Be("0xcd"))[Be("0xcb")][Be("0xcc")]()}}async getInstalledRelatedApps(){if("function"==typeof navigator[Be("0x44")])try{const{related_applications:t}=await navigator[Be("0x44")]();if(t&&Array.isArray(t))return t[Be("0xce")]((t=>({platform:t[Be("0xcf")],url:t.url})))}catch(t){}}getReferrer(){return document[Be("0xd0")]}[Be("0x2f")](){return performance[Be("0xd1")]}getPerformanceMemory(){const{jsHeapSizeLimit:t,totalJSHeapSize:e,usedJSHeapSize:r}=performance.memory;return{jsHeapSizeLimit:t,totalJSHeapSize:e,usedJSHeapSize:r}}getIndexedDB(){return Promise[Be("0x5f")](!!window[Be("0xd2")])}[Be("0x25")](){const{openDatabase:t}=window;return Promise.resolve(!!t)}[Be("0x37")](){const t=window[Be("0xd3")]&&document instanceof DocumentTouch,e={maxTouchPoints:navigator[Be("0xd4")]||navigator[Be("0xd5")]||0,documentTouch:t,ontouchstart:Be("0xd6")in window};return Promise[Be("0x5f")](e)}[Be("0x31")](){function t(t){const e=[];for(let r=0;r<t.length;++r)e[Be("0x92")]({type:t[r][Be("0xd7")],suffixes:t[r].suffixes});return e}const e=[];for(let r=0;r<navigator[Be("0xd8")].length;++r){const n=navigator[Be("0xd8")][r];n&&e[Be("0x92")]({name:n.name,description:n[Be("0xd9")],mimeTypes:t(n)})}return Promise[Be("0x5f")](e)}[Be("0x32")](){const t=window[Be("0xda")]||screen,{availLeft:e}=t,{availTop:r}=t,n={availHeight:t.availHeight,availLeft:e,availTop:r,availWidth:t.availWidth,colorDepth:t[Be("0xdb")],height:t[Be("0xdc")],width:t[Be("0xdd")],pixelDepth:t.pixelDepth,orientationAngle:t.orientation&&t[Be("0xde")][Be("0xdf")],orientationType:t[Be("0xde")]&&t.orientation[Be("0xd7")],devicePixelRatio:window[Be("0xe0")]};return Promise[Be("0x5f")](n)}static[Be("0xac")](t){if(null==t)return;let e=0,r=0;const n=t[Be("0xab")];for(;r<n;)e=(e<<5)-e+t.charCodeAt(r++)|0;return e}getWindowOuter(){const t={outerWidth:window.outerWidth,outerHeight:window[Be("0xe1")]};return Promise[Be("0x5f")](t)}[Be("0x39")](){const t=navigator[Be("0xe2")];return Promise[Be("0x5f")](t)}[Be("0x26")](){const t=window[Be("0xde")];return Promise[Be("0x5f")](t)}getPlatform(){const t=navigator.platform;return Promise[Be("0x5f")](t)}[Be("0x27")](){const t=navigator[Be("0xe3")];return Promise.resolve(t)}[Be("0x28")](){const t=navigator.oscpu;return Promise[Be("0x5f")](t)}getAddBehavior(){const t=!!window[Be("0xe4")][Be("0xe5")].addBehavior;return Promise.resolve(t)}[Be("0x2a")](){const t=navigator[Be("0xe6")];return Promise[Be("0x5f")](t)}async[Be("0x2b")](){const t=await navigator.mediaDevices[Be("0xe7")](),e=[];for(const r of t)e[Be("0x92")]({kind:r.kind,label:r[Be("0xe8")],deviceId:r[Be("0xe9")],groupId:r[Be("0xea")]});return e}async[Be("0x2c")](){const t=window[Be("0xeb")]||window[Be("0xec")];if(!t)return-1;const e=new t(1,5e3,44100),r=e[Be("0xed")]();r[Be("0xd7")]=Be("0xee"),r[Be("0xef")].value=1e4;const n=e.createDynamicsCompressor();n[Be("0xf0")].value=-50,n[Be("0xf1")].value=40,n.ratio[Be("0x50")]=12,n[Be("0xf2")].value=0,n[Be("0xf3")][Be("0x50")]=.25,r[Be("0xf4")](n),n[Be("0xf4")](e[Be("0xf5")]),r[Be("0xf6")](0);const o=new Promise((async(t,r)=>{e.oncomplete=e=>t(e[Be("0xf7")]);try{await e[Be("0xf8")]()}catch(t){r(t)}})),i=(await o)[Be("0xf9")](0)[Be("0xfa")](4500);return Ve.getHash(i)}async[Be("0x2d")](){var t;const e=window.OfflineAudioContext||window[Be("0xec")];if(!e)return{};const r=new e(1,5e3,44100),n=r.createOscillator();n[Be("0xd7")]=Be("0xee"),n.frequency.value=1e4;const o=r[Be("0xfb")]();o[Be("0xf0")][Be("0x50")]=-50,o[Be("0xf1")][Be("0x50")]=40,o.attack[Be("0x50")]=0;const i=r.createAnalyser();n[Be("0xf4")](o),o[Be("0xf4")](i),o[Be("0xf4")](r.destination),n.start(0);try{await r[Be("0xf8")](),o.disconnect(),n[Be("0xfc")]();const e=new Float32Array(i[Be("0xfd")]);null===(t=i.getFloatFrequencyData)||void 0===t||t[Be("0xfe")](i,e);const a=new Float32Array(i[Be("0xff")]);return"getFloatTimeDomainData"in i&&i[Be("0x100")](a),{gain:o[Be("0x101")][Be("0x50")]||o.reduction,freq:ze(e),time:ze(a)}}catch(t){return{}}}static[Be("0x102")](t){let e=0;for(let r=0;r<t[Be("0xab")];++r)e+=Math[Be("0x3")](t[r]);return e}[Be("0x2e")](){const t=Be("0x103"),e=[Be("0x104"),Be("0x105"),Be("0x106")],r=[Be("0x107"),Be("0x108"),Be("0x109"),Be("0x10a"),Be("0x10b"),"AvantGarde Bk BT",Be("0x10c"),Be("0x10d"),"Bitstream Vera Sans Mono",Be("0x10e"),Be("0x10f"),Be("0x110"),Be("0x111"),Be("0x112"),Be("0x113"),Be("0x114"),Be("0x115"),Be("0x116"),Be("0x117"),Be("0x118"),"Haettenschweiler",Be("0x119"),Be("0x11a"),Be("0x11b"),"Letter Gothic",Be("0x11c"),Be("0x11d"),"Lucida Sans",Be("0x11e"),Be("0x11f"),Be("0x120"),Be("0x121"),Be("0x122"),"MT Extra",Be("0x123"),Be("0x124"),Be("0x125"),Be("0x126"),"Minion Pro",Be("0x127"),Be("0x128"),"Pristina",Be("0x129"),Be("0x12a"),Be("0x12b"),Be("0x12c"),"Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium",Be("0x12d"),Be("0x12e")],n=document.createElement(Be("0x12f"));n[Be("0x130")].visibility=Be("0x131");const o={},i={},a=e=>{const r=document[Be("0x132")]("span"),{style:o}=r;return o.position=Be("0x133"),o[Be("0x134")]="0",o[Be("0x135")]="0",o[Be("0x136")]=e,o[Be("0x137")]=Be("0x138"),r[Be("0x139")]=t,n[Be("0x13a")](r),r},s=(t,e)=>a("'"+t+"',"+e),u=e[Be("0xce")](a),c=(()=>{const t={};for(const n of r)t[n]=e.map((t=>s(n,t)));return t})();document[Be("0x13c")].appendChild(n);try{for(let t=0;t<e[Be("0xab")];t++)o[e[t]]=u[t].offsetWidth,i[e[t]]=u[t][Be("0x13d")];const t=r.filter((t=>{return r=c[t],e.some(((t,e)=>r[e][Be("0x13b")]!==o[t]||r[e].offsetHeight!==i[t]));var r}));return Promise[Be("0x5f")](t)}finally{document[Be("0x13c")][Be("0x13e")](n)}}[Be("0x1b")](){const t=(new Date).getTimezoneOffset();return Promise[Be("0x5f")](t)}getLanguage(){const t=navigator.language;return Promise[Be("0x5f")](t)}[Be("0x19")](){const t=navigator[Be("0xcd")];return Promise.resolve(t)}[Be("0x13f")](){const t=navigator[Be("0x140")];return Promise.resolve(t)}[Be("0x16")](){const t=navigator.deviceMemory;return Promise[Be("0x5f")](t)}getDocumentBasedKeys(){return[Be("0x85"),"__selenium_evaluate",Be("0x87"),"__webdriver_script_func",Be("0xb7"),"__fxdriver_evaluate","__driver_unwrapped",Be("0x88"),Be("0x7d"),Be("0xb1"),"__fxdriver_unwrapped"][Be("0xbb")]((t=>document[t]))}[Be("0x36")](){const t=Intl[Be("0x141")]()[Be("0x142")]()[Be("0x143")];return Promise.resolve(t)}[Be("0x144")](){const t=navigator[Be("0x145")];return Promise[Be("0x5f")](t)}[Be("0x38")](){const t=navigator[Be("0x146")];return Promise.resolve(t)}async[Be("0x11")](){const t=document[Be("0x132")](Be("0x15c"));t[Be("0xdd")]=1,t[Be("0xdc")]=1;const e=t[Be("0x15d")]("2d"),r={winding:function(t){return t.rect(0,0,10,10),t[Be("0x15a")](2,2,6,6),!t[Be("0x15b")](5,5,Be("0x159"))}(e),geometry:function(t,e){t[Be("0xdd")]=122,t[Be("0xdc")]=110,e[Be("0x150")]=Be("0x151");const r=[[Be("0x152"),40,40],["#2ff",80,40],[Be("0x153"),60,80]];for(const[t,n,o]of r)e[Be("0x148")]=t,e[Be("0x154")](),e.arc(n,o,40,0,2*Math.PI,!0),e[Be("0x155")](),e[Be("0x156")]();return e[Be("0x148")]=Be("0x157"),e[Be("0x158")](60,60,60,0,2*Math.PI,!0),e.arc(60,60,20,0,2*Math.PI,!0),e[Be("0x156")](Be("0x159")),Ve[Be("0xac")](t[Be("0x14f")]())}(t,e),text:function(t,e){t.width=240,t[Be("0xdc")]=60,e[Be("0x147")]="alphabetic",e[Be("0x148")]=Be("0x149"),e.fillRect(100,1,62,20),e[Be("0x148")]="#069",e.font=Be("0x14a");const r=Be("0x14b")+String[Be("0x14c")](55357,56835);return e[Be("0x14d")](r,2,15),e[Be("0x148")]=Be("0x14e"),e.font="18pt Arial",e[Be("0x14d")](r,4,45),Ve[Be("0xac")](t[Be("0x14f")]())}(t,e)};return Promise[Be("0x5f")](r)}async[Be("0xf")](){const t=await navigator.getBattery();return{charging:t[Be("0x15e")],chargingTime:t[Be("0x15f")],dischargingTime:t[Be("0x160")],level:t[Be("0x161")]}}async[Be("0x10")](){return!!navigator[Be("0x162")]&&await navigator[Be("0x162")][Be("0x163")]()}async[Be("0x3a")](){const t=document[Be("0x132")](Be("0x15c")),e=t[Be("0x15d")](Be("0x164"))||t[Be("0x15d")]("webgl-experimental"),r=e[Be("0x165")](Be("0x166"));return Promise[Be("0x5f")](e[Be("0x167")](r.UNMASKED_RENDERER_WEBGL))}async getCodesTests(){const t=document[Be("0x132")](Be("0x168")),e={basic:""===t.canPlayType(Be("0x169")),advanced:""===t.canPlayType("video/mp4;;Codecs =avc1.42E01E")};return Promise.resolve(e)}async[Be("0x3d")](){const{publicKey:t,keyIdentifier:e}=await this[Be("0x6")][Be("0x16a")]();return{publicKey:t,keyIdentifier:e}}static[Be("0x16b")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i[Be("0x4c")](navigator[Be("0xbe")])||null!=window[Be("0xde")]||window[Be("0x9f")](Be("0x16c"))[Be("0xa0")]}}var He,je,Ge=["EVENT_TYPE_DEVICE","device","EVENT_TYPE_INTERACTION","interaction","EVENT_TYPE_IDENTIFICATION","identification","desktop_web","mobile_web","EVENT_TYPE_ACTION","action"];He=Ge,je=488,function(t){for(;--t;)He.push(He.shift())}(++je);var We,Xe,Ye=function(t,e){return Ge[t-=0]};(Xe=We||(We={}))[Ye("0x0")]=Ye("0x1"),Xe[Ye("0x2")]=Ye("0x3"),Xe[Ye("0x4")]=Ye("0x5"),Xe[Ye("0x6")]=Ye("0x7");const Ze=Ye("0x8"),qe=Ye("0x9");var Ke,$e,Je=["isMobile","device/conf?tenantId=","&type=","getData","error","error fetching config","parse","error loading config","shouldUpdateConf","getConfValue","now","length","ric","storageManager","requestsManager","conf","loadConf","fetchConf"];Ke=Je,$e=156,function(t){for(;--t;)Ke.push(Ke.shift())}(++$e);var Qe=function(t,e){return Je[t-=0]};const tr=Qe("0x0");class er{constructor(t,e){this[Qe("0x1")]=t,this[Qe("0x2")]=e,this[Qe("0x3")]=this[Qe("0x4")]()}async[Qe("0x5")](t){try{const e=Ve[Qe("0x6")]()?qe:Ze,r=Qe("0x7")+t+Qe("0x8")+e,n=await this.requestsManager[Qe("0x9")](r);return null!=n?n:{}}catch(e){return Ie[Qe("0xa")](Qe("0xb"),{clientId:t,error:e}),{}}}[Qe("0x4")](){const t=this[Qe("0x1")].getItemLocalStorageSafe(tr);if(null!=t)try{return JSON[Qe("0xc")](t)}catch(t){Ie[Qe("0xa")](Qe("0xd"),{error:t})}return{}}[Qe("0xe")](){const t=this[Qe("0xf")]("timestamp",0);return Date[Qe("0x10")]()-t>36e5}async refreshConf(t){if(!this.shouldUpdateConf())return!1;let e=await this[Qe("0x5")](t);return 0==Object.keys(e)[Qe("0x11")]?e=this[Qe("0x4")]():this[Qe("0x1")].setItemLocalStorageSafe(tr,JSON.stringify(e)),this[Qe("0x3")]=e,!0}[Qe("0xf")](t,e){const r=void 0!==this[Qe("0x3")]?this[Qe("0x3")][t]:void 0;return null!=r?r:e}}var rr,nr,or=["fromCharCode","replace","base64ToBase64Url","maintainLastXItems","length","splice","push","encode"];rr=or,nr=179,function(t){for(;--t;)rr.push(rr.shift())}(++nr);var ir=function(t,e){return or[t-=0]};class ar{static[ir("0x0")](t,e,r){return t[ir("0x1")]>=e&&t[ir("0x2")](0,1),t[ir("0x3")](r),t}static base64UrlEncode(t){const e=(new TextEncoder)[ir("0x4")](t),r=String[ir("0x5")](...e);return btoa(r)[ir("0x6")](/\+/g,"-")[ir("0x6")](/\//g,"_")[ir("0x6")](/=/g,"")}static[ir("0x7")](t){return t[ir("0x6")](/\+/g,"-").replace(/\//g,"_")[ir("0x6")](/=/g,"")}}var sr,ur,cr=["buffer","collect","extractEventData","now","extractButtonsPressedData","altKey","shiftKey","buttons","getTimeOrigin","timeStamp","getCoalescedEvents","function","length","forEach","bufferSize","maintainLastXItems","getData","timeOrigin","parentId","detail","offsetX","sourceCapabilities","firesTouchEvents","target","isTrusted","view","metaKey","cancelable","composed","inputType","data"];sr=cr,ur=340,function(t){for(;--t;)sr.push(sr.shift())}(++ur);var lr=function(t,e){return cr[t-=0]};class dr{constructor(t){this[lr("0x0")]=[],this[lr("0x1")]=t}[lr("0x2")](t){const e=this.extractEventData(t);ar.maintainLastXItems(this[lr("0x0")],this.buffer,e)}getData(){return this[lr("0x0")]}[lr("0x3")](t){return o({x:t.x,y:t.y,tspl:Date[lr("0x4")]()},this[lr("0x5")](t))}[lr("0x5")](t){return o(o(o(o({},t.ctrlKey&&{ctrlKey:!0}),t[lr("0x6")]&&{altKey:!0}),t[lr("0x7")]&&{shiftKey:!0}),0!=t[lr("0x8")]&&{buttons:t.buttons})}}class hr{constructor(t){this[lr("0x0")]=[],this.bufferSize=t}[lr("0x2")](t){var e;const r=this[lr("0x9")]()+(null!==(e=t[lr("0xa")])&&void 0!==e?e:performance[lr("0x4")]());if(typeof t[lr("0xb")]===lr("0xc")){const e=t[lr("0xb")]();if(e&&e[lr("0xd")]>0)return void e[lr("0xe")]((t=>{const e=this[lr("0x3")](t,r,!0);ar.maintainLastXItems(this[lr("0x0")],this[lr("0xf")],e)}))}const n=this[lr("0x3")](t,r,!1);ar[lr("0x10")](this[lr("0x0")],this[lr("0xf")],n)}[lr("0x11")](){return this[lr("0x0")]}getTimeOrigin(){var t;return null!==(t=performance[lr("0x12")])&&void 0!==t?t:Date[lr("0x4")]()-performance.now()}[lr("0x3")](t,e,r){var n;const i=o({x:t.x,y:t.y,timestampHighRes:this[lr("0x9")]()+(null!==(n=t[lr("0xa")])&&void 0!==n?n:performance.now())},this[lr("0x5")](t));return r&&(i[lr("0x13")]=e),i}[lr("0x5")](t){return o(o(o(o({},t.ctrlKey&&{ctrlKey:!0}),t[lr("0x6")]&&{altKey:!0}),t.shiftKey&&{shiftKey:!0}),0!=t[lr("0x8")]&&{buttons:t[lr("0x8")]})}}class fr{constructor(t){this[lr("0x0")]=[],this[lr("0x1")]=t}collect(t){var e;const r={x:t.x,y:t.y,timestamp:Date[lr("0x4")](),mouseButtonType:t[lr("0x14")],offsetX:t[lr("0x15")],offsetY:t.offsetY,isPressed:null==(null===(e=t[lr("0x16")])||void 0===e?void 0:e[lr("0x17")])?null:!t[lr("0x16")][lr("0x17")],target_id:t[lr("0x18")].id};ar[lr("0x10")](this.data,this[lr("0x1")],r)}getData(){const t=[...this.data];return this[lr("0x0")]=[],t}}class pr{constructor(t){this.data=[],this[lr("0xf")]=t}[lr("0x2")](t){var e;const r={isTrusted:t[lr("0x19")],cancelable:t.cancelable,composed:t.composed,isView:!!t[lr("0x1a")],shiftKey:t[lr("0x7")],metaKey:t[lr("0x1b")],firesTouchEvents:null===(e=t.sourceCapabilities)||void 0===e?void 0:e.firesTouchEvents,timestamp:Date.now()};ar[lr("0x10")](this[lr("0x0")],this.bufferSize,r)}[lr("0x11")](){const t=[...this[lr("0x0")]];return this[lr("0x0")]=[],t}}class gr{constructor(t){this[lr("0x0")]=[],this[lr("0xf")]=t}[lr("0x2")](t){var e;const r={isTrusted:t[lr("0x19")],cancelable:t[lr("0x1c")],composed:t.composed,isView:!!t[lr("0x1a")],location:t.location,shiftKey:t.shiftKey,firesTouchEvents:null===(e=t[lr("0x16")])||void 0===e?void 0:e[lr("0x17")],timestamp:Date[lr("0x4")]()};ar[lr("0x10")](this.data,this[lr("0xf")],r)}getData(){const t=this[lr("0x0")];return this[lr("0x0")]=[],t}}class mr{constructor(t){this.data=[],this[lr("0xf")]=t}[lr("0x2")](t){const e={isTrusted:t[lr("0x19")],cancelable:t[lr("0x1c")],composed:t[lr("0x1d")],inputType:t[lr("0x1e")],isView:!!t[lr("0x1a")],timestamp:Date[lr("0x4")]()};ar.maintainLastXItems(this[lr("0x0")],this.bufferSize,e)}[lr("0x11")](){const t=this[lr("0x0")];return this.data=[],t}}class _r{constructor(t){this[lr("0x0")]=[],this.bufferSize=t}collect(t){const e={isTrusted:t.isTrusted,cancelable:t.cancelable,composed:t.composed,timestamp:Date.now()};ar.maintainLastXItems(this[lr("0x0")],this[lr("0xf")],e)}[lr("0x11")](){const t=this.data;return this[lr("0x0")]=[],t}}var yr,wr,vr=["cmet","storageManager","deviceEventDataCollectionIgnoreList","mouseEventsCollectionBuffer","safeEventCallback","pointerMoveRolloutPercentage","moveEventType","detail","sourceCapabilities","firesTouchEvents","offsetX","target","cancelable","composed","clipboardData","dropEffect","effectAllowed","keys","virtualKeyboard","overlaysContent","inputTypeFilter","undefined","PointerEvent","selectMoveEventTypeBasedOnRollout","persistRolloutAndMoveEventTypeSelections","getStoredMoveEventType","setItemLocalStorageSafe","registerEventListeners","entries","interactionEventsCollectorsData","includes","error","Error while adding listener","filter","handleEvent","forEach","collect","getAttachedData","addSafeInteractionListener","addEventListener","error adding interaction listener","getData","getGenericAttributes","location","href","click","paste","mousemove","pointermove","mouseup","submit","keyup","keydown","input","focusout","pointerevents","INPUT","SELECT","TEXTAREA","pecrp"];yr=vr,wr=165,function(t){for(;--t;)yr.push(yr.shift())}(++wr);var Er=function(t,e){return vr[t-=0]};const br="change",Ar=Er("0x0"),Cr=Er("0x1"),xr=Er("0x2"),Ir=Er("0x3"),Sr=Er("0x4"),Tr="mousedown",Dr=Er("0x5"),Or=Er("0x6"),Rr=Er("0x7"),Mr=Er("0x8"),Nr=Er("0x9"),kr=Er("0xa"),Pr=[Er("0xb"),Er("0xc"),Er("0xd")],Br=Er("0xe"),Fr=Er("0xf");class Lr{constructor(t,e,r,n,i){this[Er("0x10")]=n,this[Er("0x11")]=t,this[Er("0x12")]=e,this[Er("0x13")]=r,this[Er("0x14")]=i,this[Er("0x15")]=this.detectMoveEventType(),this.interactionEventsCollectorsData={[Ar]:{eventTypesToAttach:[this[Er("0x15")],Sr,Tr],attributesMapper:t=>{var e;return{x:t.x,y:t.y,mouseButtonType:t[Er("0x16")],isPressed:null==(null===(e=t.sourceCapabilities)||void 0===e?void 0:e.firesTouchEvents)?null:!t[Er("0x17")][Er("0x18")],offsetX:t[Er("0x19")],offsetY:t.offsetY,target_id:t[Er("0x1a")].id}}},[Cr]:{attributesMapper:t=>({target_id:t[Er("0x1a")].id,isTrusted:t.isTrusted,cancelable:t[Er("0x1b")],composed:t[Er("0x1c")],dropEffect:t[Er("0x1d")][Er("0x1e")],effectAllowed:t[Er("0x1d")][Er("0x1f")]})},[Dr]:{attributesMapper:t=>({target_id:t[Er("0x1a")].id})},[xr]:{continousCollectors:[new dr(this.mouseEventsCollectionBuffer)]},[Ir]:{continousCollectors:[new hr(this.mouseEventsCollectionBuffer)]},[Sr]:{continousCollectors:[new fr(1)]},[Tr]:{continousCollectors:[new fr(1)]},[Nr]:{eventTypesToAttach:[Mr,Or,Rr,br],filter:this.inputTypeFilter,attributesMapper:t=>{const{target:e,isTrusted:r,cancelable:n,composed:i}=t;return o({target_id:e.id,dataset_keys:Object[Er("0x20")](e.dataset||{}),isTrusted:r,cancelable:n,composed:i},navigator[Er("0x21")]&&{navigator_virtualKeyboard:navigator[Er("0x21")][Er("0x22")]})}},[Mr]:{filter:this[Er("0x23")],continousCollectors:[new mr(50)]},[Or]:{filter:this.inputTypeFilter,continousCollectors:[new gr(50)]},[Rr]:{filter:this[Er("0x23")],continousCollectors:[new pr(50)]},[br]:{continousCollectors:[new _r(50)]}}}detectMoveEventType(){return typeof window!==Er("0x24")&&window[Er("0x25")]?this.selectMoveEventTypeBasedOnRollout():xr}[Er("0x26")](){const t=this.storageManager.getItemLocalStorageSafe(Br);if((null!=t?Number(t):null)!==this.pointerMoveRolloutPercentage){const t=Math.random()<this[Er("0x14")]/100?Ir:xr;return this[Er("0x27")](t),t}return this[Er("0x28")]()}[Er("0x27")](t){this[Er("0x10")][Er("0x29")](Br,this[Er("0x14")]),this[Er("0x10")][Er("0x29")](Fr,t)}[Er("0x28")](){const t=this[Er("0x10")].getItemLocalStorageSafe(Fr);return(e=t)===Ir||e===xr?t:xr;var e}[Er("0x23")](t){var e;const r=null===(e=t[Er("0x1a")])||void 0===e?void 0:e.tagName;return Pr.includes(r)}[Er("0x2a")](){for(const[t,e]of Object[Er("0x2b")](this[Er("0x2c")]))if(!this[Er("0x11")][Er("0x2d")](t)&&!(t===xr&&this[Er("0x15")]===Ir||t===Ir&&this[Er("0x15")]===xr))try{this.addSafeInteractionListener(t,e)}catch(e){Ie[Er("0x2e")](Er("0x2f"),{error:e,eventType:t})}}filter(t,e){return!t[Er("0x30")]||t[Er("0x30")](e)}async[Er("0x31")](t,e,r){const{attributesMapper:n,continousCollectors:i}=t;if(!this[Er("0x30")](t,e))return!1;if(i)i[Er("0x32")]((t=>{t[Er("0x33")](e)}));else{const t=this.getGenericAttributes(),i=this[Er("0x34")](r),a=o(o(o({},t),n(e)),i&&{attachedEventsData:i});await this[Er("0x13")](r,a)}return!0}[Er("0x35")](t,e){window[Er("0x36")](t,(async r=>{try{await this[Er("0x31")](e,r,t)}catch(t){Ie[Er("0x2e")](Er("0x37"),{error:t})}}))}getAttachedData(t){let e;const r=this[Er("0x2c")][t].eventTypesToAttach;return r&&(e={},r[Er("0x32")]((t=>{const{continousCollectors:r}=this[Er("0x2c")][t];if(r){const n=t===Ir?kr:t;r[Er("0x32")]((t=>e[n]=t[Er("0x38")]()))}}))),e}[Er("0x39")](){return{location:window[Er("0x3a")][Er("0x3b")]}}}var zr,Ur,Vr=["TRUST","compress","compressed","uncompressed","ALLOW","CHALLENGE","DENY"];zr=Vr,Ur=393,function(t){for(;--t;)zr.push(zr.shift())}(++Ur);var Hr,jr,Gr,Wr,Xr=function(t,e){return Vr[t-=0]};(jr=Hr||(Hr={}))[Xr("0x0")]=Xr("0x1"),jr.uncompressed=Xr("0x2"),(Wr=Gr||(Gr={}))[Xr("0x3")]=Xr("0x3"),Wr.CHALLENGE=Xr("0x4"),Wr[Xr("0x5")]=Xr("0x5"),Wr.TRUST=Xr("0x6");var Yr,Zr,qr=["decrypt","encryptPayload","encode","getRandomValues","encryptSymKeyBundle","exportKey","arrayBufferToBase64","RSA-OAEP","byteLength","fromCharCode","btoa","importPublicKey","importKey","jwk","parse","SHA-256","configManager","crypto","subtle","generateKey","AES-GCM","encrypt"];Yr=qr,Zr=346,function(t){for(;--t;)Yr.push(Yr.shift())}(++Zr);var Kr=function(t,e){return qr[t-=0]};class $r{constructor(t){this[Kr("0x0")]=t}generateSymKey(){return window[Kr("0x1")][Kr("0x2")][Kr("0x3")]({name:Kr("0x4"),length:256},!0,[Kr("0x5"),Kr("0x6")])}async[Kr("0x7")](t,e){const r="string"==typeof t?(new TextEncoder)[Kr("0x8")](t):t,n=window.crypto[Kr("0x9")](new Uint8Array(12)),o={name:Kr("0x4"),iv:n},i=await window.crypto.subtle[Kr("0x5")](o,e,r);return{payloadCipherText:this.arrayBufferToBase64(i),iv:n}}async[Kr("0xa")](t,e,r){const n=await window[Kr("0x1")][Kr("0x2")][Kr("0xb")]("raw",t),o=this[Kr("0xc")](n),i=this[Kr("0xc")](e),a=(new TextEncoder).encode(JSON.stringify({symKey:o,iv:i})),s=await window[Kr("0x1")][Kr("0x2")][Kr("0x5")]({name:Kr("0xd")},r,a);return this[Kr("0xc")](s)}[Kr("0xc")](t){let e="";const r=new Uint8Array(t),n=r[Kr("0xe")];for(let t=0;t<n;t++)e+=String[Kr("0xf")](r[t]);return window[Kr("0x10")](e)}[Kr("0x11")](t){return window.crypto.subtle[Kr("0x12")](Kr("0x13"),JSON[Kr("0x14")](t),{name:"RSA-OAEP",hash:Kr("0x15")},!0,["encrypt"])}async encrypt(t,e){if(!window[Kr("0x1")]||!window[Kr("0x1")].subtle)throw new Error("crypto is not supported");const r=await this.generateSymKey(),{payloadCipherText:n,iv:o}=await this[Kr("0x7")](e,r),i=await this.importPublicKey(t);return{encryptedData:n,encryptedKey:await this[Kr("0xa")](r,o,i)}}}var Jr,Qr,tn=["SERVER","server","COMMUNICATION","error","errorCode","message","name","toString","SDKError: ",", errorCode: ","toLog","errorSpace","CLIENT","client"];Jr=tn,Qr=334,function(t){for(;--t;)Jr.push(Jr.shift())}(++Qr);var en,rn,nn=function(t,e){return tn[t-=0]};(rn=en||(en={}))[nn("0x0")]=nn("0x1"),rn[nn("0x2")]=nn("0x3"),rn[nn("0x4")]="communication";class on extends Error{constructor(t,e,r){var n,o;super(),this[nn("0x5")]=t,this.errorSpace=e,this[nn("0x6")]=r,this[nn("0x7")]=(null===(n=this.error)||void 0===n?void 0:n[nn("0x7")])||this[nn("0x5")].toString(),this[nn("0x8")]=(null===(o=this[nn("0x5")])||void 0===o?void 0:o.name)||on[nn("0x8")]}[nn("0x9")](){return nn("0xa")+this[nn("0x7")]+(this.errorSpace?", errorSpace: "+this.errorSpace:"")+(this[nn("0x6")]?nn("0xb")+this[nn("0x6")]:"")}[nn("0xc")](){return o(o({name:this[nn("0x8")],message:this.message},this[nn("0xd")]&&{errorSpace:this[nn("0xd")]}),this[nn("0x6")]&&{errorCode:this.errorCode})}}var an,sn,un=["filter"];an=un,sn=457,function(t){for(;--t;)an.push(an.shift())}(++sn);var cn,ln,dn=["compress","CLIENT","increaseEventIndex","getItemLocalStorageSafe","setItemLocalStorageSafe","shouldSendDeviceEvent","getDeviceData","sendPageLoadEvent","page_load","location","href","referrer","history","extractWindowRespurces","performance","getEntriesByType","resources","map","name","initiatorType","registerEventListeners","interactionEventsManager","parse","Failed to parse events from localStorage","maintainLastXItems","stringify","removeItemLocalStorageSafe","ddls","lastDeviceInDeviceEvent","rei","deviceEventDataCollectionIgnoreList","publicKey","bufferSize","bufferInterval","EVENT_TYPE_ACTION","EVENT_TYPE_IDENTIFICATION","EVENT_TYPE_DEVICE","localStoredEventTypes","maxLocalStoredEvents","key_rotation_data","key_rotation_status","configManager","getConfValue","enablePendingQueue","storageManager","deviceDataManager","requestsManager","identityManager","cryptoBinding","serverPath","eventIndex","eventIdMap","processingEvents","actionTokenCache","ACTION_TOKEN_CACHE_TTL","flushTimeoutHandle","safeEventCallback","EVENT_TYPE_INTERACTION","enableSessionToken","crypto","isMobile","eventTypesToStore","maxEventStored","generateEventIdentifier","type","timestamp","index","action_type","getActionEventCacheKey","getClientId","getDeviceId","getUserId","attributes","correlationId","getCachedActionToken","get","now","delete","token","cacheActionToken","includes","size","ACTION_TOKEN_CACHE_MAX_SIZE","keys","next","value","set","emitEvent","pendingQueueEnabled","info","Returning cached action token","toString","platform","sdkVersion","tabId","enrichUADataIfDoesNotExist","addEventToLocalStorage","push","length","flush","error","Error while emitting event","errorCode","toLog","eventsQueue","min","catch","Error while emitting event (delayed flush)","sendDeviceDataEvent","pollingSessionToken","isTokenExpired","refreshSessionToken","Failed to polling data","pollingInterval","navigatorHighEntropyData","popAllEvents","has","add","fetchEventsFromLocalStorage","forEach","sort","pop","flushLock","deviceId","userId","sdkPlatform","events","getPublicData","publicKeyId","warn","Crypto-binding is not supported. ","sessionToken","buildEncryptedRequestBody","data","signature","postData","device/events","headers","handleRotateResponse","setDeviceId","setSessionToken","setUserId","actionToken","cleanupSentEvents","cleanLocalStorageEvents","Encryption error - missing public key","COMMUNICATION","compressData","encrypt"];cn=dn,ln=325,function(t){for(;--t;)cn.push(cn.shift())}(++ln);var hn=function(t,e){return dn[t-=0]};const fn=hn("0x0"),pn=hn("0x1"),gn=hn("0x2"),mn="lse",_n=hn("0x3"),yn=hn("0x4"),wn=hn("0x5"),vn=hn("0x6"),En=[We[hn("0x7")],We[hn("0x8")],We[hn("0x9")]],bn=[We.EVENT_TYPE_ACTION,We[hn("0x8")]],An=hn("0xa"),Cn=hn("0xb"),xn=hn("0xc"),In=hn("0xd");class Sn{get pendingQueueEnabled(){return this[hn("0xe")][hn("0xf")](hn("0x10"),!1)}constructor(t,e,r,n,i,a,s,u){this[hn("0xe")]=t,this[hn("0x11")]=e,this[hn("0x12")]=r,this[hn("0x13")]=n,this[hn("0x14")]=i,this[hn("0x15")]=a,this[hn("0x16")]=s,this.enableSessionToken=u,this[hn("0x17")]=null,this[hn("0x18")]=new WeakMap,this.flushLock=!1,this[hn("0x19")]=new Map,this[hn("0x1a")]=new Map,this[hn("0x1b")]=36e5,this.ACTION_TOKEN_CACHE_MAX_SIZE=100,this[hn("0x1c")]=null,this[hn("0x1d")]=async(t,e)=>{try{const r=o({},o({interaction_type:t},e)),n={type:We[hn("0x1e")],attributes:r};return await this.emitEvent(n)}catch(t){}},this[hn("0x1f")]=u,this.eventsQueue=[],this[hn("0x20")]=new $r(t),this.interactionEventsManager=new Lr(this[hn("0xe")][hn("0xf")](_n,[]),this.configManager[hn("0xf")]("mouseEventsCollectionBuffer",100),this[hn("0x1d")],this[hn("0x11")],this.configManager[hn("0xf")]("pointerEventRolloutPercentage",0)),this[hn("0x21")]=Ve[hn("0x21")](),this[hn("0x22")]=this.configManager[hn("0xf")](An,[We[hn("0x7")],We[hn("0x9")]]),this[hn("0x23")]=this[hn("0xe")][hn("0xf")](Cn,4),this.pollingInterval=36e4,this.pollingSessionToken()}[hn("0x24")](t){var e;if(this[hn("0x18")].has(t))return this[hn("0x18")].get(t);const r=function(t,e,r,n,o,i,a){var s;return[t,e,r,n,o,void 0!==i?i:"",a||""][(s="0x0",un[s-=0])]((t=>""!==t)).join("-")}(t[hn("0x25")]||"",this[hn("0x14")].getClientId(),this[hn("0x14")].getDeviceId()||"",this.identityManager.getUserId()||"",t[hn("0x26")],t[hn("0x27")],null===(e=t.attributes)||void 0===e?void 0:e[hn("0x28")]);return this[hn("0x18")].set(t,r),r}[hn("0x29")](t){var e;return((null==t?void 0:t[hn("0x25")])||"")+"-"+(this[hn("0x14")][hn("0x2a")]()||"")+"-"+(this[hn("0x14")][hn("0x2b")]()||"")+"-"+((null==t?void 0:t.userId)||this.identityManager[hn("0x2c")]()||"")+"-"+((null==t?void 0:t[hn("0x26")])||"")+"-"+((null==t?void 0:t.index)||"")+"-"+((null===(e=null==t?void 0:t[hn("0x2d")])||void 0===e?void 0:e.action_type)||(null==t?void 0:t[hn("0x2e")])||"")}[hn("0x2f")](t){if(!bn.includes(null==t?void 0:t[hn("0x25")]))return null;const e=this.getActionEventCacheKey(t),r=this[hn("0x1a")][hn("0x30")](e);return r?Date[hn("0x31")]()-r[hn("0x26")]>this[hn("0x1b")]?(this.actionTokenCache[hn("0x32")](e),null):r[hn("0x33")]:null}[hn("0x34")](t,e){if(!bn[hn("0x35")](null==t?void 0:t[hn("0x25")])||!e)return;if(this[hn("0x1a")][hn("0x36")]>=this[hn("0x37")]){const t=this[hn("0x1a")][hn("0x38")]()[hn("0x39")]()[hn("0x3a")];this[hn("0x1a")][hn("0x32")](t)}const r=this[hn("0x29")](t);this[hn("0x1a")][hn("0x3b")](r,{token:e,timestamp:Date[hn("0x31")]()})}async[hn("0x3c")](t){if(this[hn("0x3d")]&&bn[hn("0x35")](null==t?void 0:t[hn("0x25")])){const e=this[hn("0x2f")](t);if(e)return Ie[hn("0x3e")](hn("0x3f"),{actionType:t[hn("0x25")],correlationId:t.correlationId}),{actionToken:e}}t[hn("0x27")]=this.increaseEventIndex(),t.location=location[hn("0x40")](),t[hn("0x41")]=navigator[hn("0x41")],t[hn("0x42")]="2.0.2",t[hn("0x16")]=this[hn("0x16")],t[hn("0x43")]=this[hn("0x14")].getTabId(),t[hn("0x26")]=Date[hn("0x31")](),await this[hn("0x44")](t);let e=0;this.eventTypesToStore.includes(t[hn("0x25")])?e=this[hn("0x45")](t):this.eventsQueue[hn("0x46")](t);const r=this[hn("0xe")][hn("0xf")](wn,2);if(this.eventsQueue[hn("0x47")]+e>=r||En[hn("0x35")](t[hn("0x25")])){this[hn("0x1c")]&&(clearTimeout(this.flushTimeoutHandle),this[hn("0x1c")]=null);try{return await this[hn("0x48")]()}catch(e){throw Ie[hn("0x49")](hn("0x4a"),{clientId:this[hn("0x14")][hn("0x2a")](),eventType:t[hn("0x25")],error:e[hn("0x4b")]?e[hn("0x4c")]():e}),e}}if(!this[hn("0x1c")]&&this[hn("0x4d")][hn("0x47")]>0){const e=this[hn("0xe")][hn("0xf")](vn,2),r=Math[hn("0x4e")](e,30);this[hn("0x1c")]=setTimeout((()=>{this.flushTimeoutHandle=null,this[hn("0x48")]()[hn("0x4f")]((e=>{Ie[hn("0x49")](hn("0x50"),{clientId:this[hn("0x14")][hn("0x2a")](),eventType:t[hn("0x25")],error:e[hn("0x4b")]?e[hn("0x4c")]():e})}))}),1e3*r)}return{}}async refreshSessionToken(){try{return this[hn("0x4d")][hn("0x47")]>0?await this.flush():(await this[hn("0x51")](!0),await this[hn("0x48")]())}catch(t){Ie[hn("0x49")]("Failed to refresh data",{e:t})}}async[hn("0x52")](){try{this[hn("0x14")][hn("0x53")]()&&await this[hn("0x54")]()}catch(t){Ie[hn("0x49")](hn("0x55"),{e:t})}finally{setTimeout((async()=>{await this.pollingSessionToken()}),this[hn("0x56")])}}async enrichUADataIfDoesNotExist(t){var e;if(!(null===(e=t[hn("0x2d")])||void 0===e?void 0:e[hn("0x57")]))try{t[hn("0x2d")][hn("0x57")]=await Re()}catch(t){}}[hn("0x58")](){if(this[hn("0x3d")]){const t=[],e=new Set;for(;this[hn("0x4d")][hn("0x47")];){const r=this[hn("0x4d")].pop();if(!r)break;const n=this.generateEventIdentifier(r);this[hn("0x19")][hn("0x59")](n)||e[hn("0x59")](n)||(e[hn("0x5a")](n),t[hn("0x46")](r))}const r=this[hn("0x5b")]();return(null==r?void 0:r.length)&&r[hn("0x5c")]((r=>{const n=this[hn("0x24")](r);this.processingEvents.has(n)||e[hn("0x59")](n)||(e[hn("0x5a")](n),t[hn("0x46")](r))})),t[hn("0x5d")](((t,e)=>t[hn("0x26")]-e[hn("0x26")]))}{const t=[],e=this[hn("0x5b")]();for(;this[hn("0x4d")][hn("0x47")];){const e=this[hn("0x4d")][hn("0x5e")]();if(!e)break;t[hn("0x46")](e)}return(null==e?void 0:e.length)&&t.push(...e),t.sort(((t,e)=>t.timestamp-e[hn("0x26")]))}}async[hn("0x48")](){let t=[];if(this[hn("0x3d")]){for(;this.flushLock;)await new Promise((t=>setTimeout(t,10)));this[hn("0x5f")]=!0;try{if(t=this[hn("0x58")](),0===t[hn("0x47")])return{};t[hn("0x5c")]((t=>{const e=this.generateEventIdentifier(t);this[hn("0x19")][hn("0x3b")](e,t)}))}finally{this.flushLock=!1}}else if(t=this[hn("0x58")](),0===t[hn("0x47")])return{};const e={};e.clientId=this[hn("0x14")][hn("0x2a")](),e[hn("0x60")]=this[hn("0x14")][hn("0x2b")](),e[hn("0x61")]=this.identityManager.getUserId(),e[hn("0x62")]=this[hn("0x21")]?qe:Ze,e[hn("0x63")]=t;try{const{keyIdentifier:t,publicKeyId:r}=await this[hn("0x15")][hn("0x64")]();e.keyIdentifier=t,e[hn("0x65")]=r}catch(t){Ie[hn("0x66")](hn("0x67")+t)}this[hn("0x1f")]&&(e[hn("0x68")]=!0);try{const r=await this[hn("0x69")](e,!0),n=await this[hn("0x15")].getRotationData();let i;n&&(i=[{type:xn,data:n[hn("0x6a")],signature:n[hn("0x6b")]}]);const a=await this.requestsManager[hn("0x6c")](hn("0x6d"),o(o({},r),i?{headers:i}:{}));if(a[hn("0x6e")]){const t=a[hn("0x6e")].find((t=>t[hn("0x25")]===In));t&&t[hn("0x3a")]&&this[hn("0x15")][hn("0x6f")](t[hn("0x3a")])}return a[hn("0x60")]&&this[hn("0x14")][hn("0x70")](a[hn("0x60")]),a[hn("0x68")]&&this[hn("0x14")][hn("0x71")](a[hn("0x68")]),a[hn("0x61")]&&this.identityManager[hn("0x72")](a.userId),this[hn("0x3d")]?(t[hn("0x5c")]((t=>{bn.includes(t[hn("0x25")])&&a[hn("0x73")]&&this[hn("0x34")](t,a[hn("0x73")])})),this[hn("0x74")](t),t.forEach((t=>{const e=this[hn("0x24")](t);this[hn("0x19")][hn("0x32")](e)}))):this[hn("0x75")](),a}catch(e){throw this.pendingQueueEnabled&&t[hn("0x5c")]((t=>{const e=this[hn("0x24")](t);this.processingEvents.delete(e)})),e}}async buildEncryptedRequestBody(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this[hn("0xe")][hn("0xf")](yn,null);if(null===r&&e)return await this[hn("0xe")].refreshConf(this.identityManager[hn("0x2a")]()),await this[hn("0x69")](t);if(null===r)throw new on(new Error(hn("0x76")),en[hn("0x77")]);try{const e=JSON.stringify(t),n=this[hn("0x78")](e),o=n||e,{encryptedData:i,encryptedKey:a}=await this[hn("0x20")][hn("0x79")](r,o);return{data:i,key:a,dataType:n?Hr[hn("0x7a")]:Hr.uncompressed}}catch(t){throw new on(t,en[hn("0x7b")])}}[hn("0x78")](t){try{return fe(t)}catch(t){Ie.error("Failed to compress data, sending the data to the service uncompressed",{clientId:this.identityManager[hn("0x2a")](),error:t})}}[hn("0x7c")](){if(null===this[hn("0x17")]){const t=this[hn("0x11")][hn("0x7d")](gn),e=Number.parseInt(t);this[hn("0x17")]=Number.isNaN(e)?-1:e}return this[hn("0x17")]++,this[hn("0x11")][hn("0x7e")](gn,this[hn("0x17")][hn("0x40")]()),this[hn("0x17")]}[hn("0x7f")](){const t=this[hn("0x11")].getItemLocalStorageSafe(fn),e=this[hn("0x11")][hn("0x7d")](pn);return!t||!e||Date[hn("0x31")]()-t>864e5||e!=this[hn("0x14")][hn("0x2b")]()}async[hn("0x51")](t){if(!t&&!this[hn("0x7f")]())return Ie[hn("0x3e")]("no need to send device event"),!1;const e=await this[hn("0x12")][hn("0x80")](),r={type:We.EVENT_TYPE_DEVICE,attributes:e},n=await this[hn("0x3c")](r);return n&&(this[hn("0x11")][hn("0x7e")](fn,Date[hn("0x31")]()),this[hn("0x11")][hn("0x7e")](pn,this[hn("0x14")][hn("0x2b")]())),n}async[hn("0x81")](){const t=hn("0x82");if(this.configManager[hn("0xf")](_n,[])[hn("0x35")](t))return!1;const e=this.extractWindowRespurces();return await this[hn("0x3c")]({type:We.EVENT_TYPE_INTERACTION,attributes:o(o({interaction_type:t,location:window[hn("0x83")][hn("0x84")],referrer:document[hn("0x85")]},window[hn("0x86")]&&{window_historyLength:window[hn("0x86")][hn("0x47")]}),e&&{windowResources:e})}),!0}[hn("0x87")](){try{const t=window[hn("0x88")][hn("0x89")](hn("0x8a"));return t&&Array.isArray(t)?t[hn("0x8b")]((t=>({name:t[hn("0x8c")],initiatorType:t[hn("0x8d")]}))):void 0}catch(t){}}[hn("0x8e")](){this[hn("0x8f")].registerEventListeners(),this[hn("0x14")][hn("0x8e")]()}fetchEventsFromLocalStorage(){const t=this[hn("0x11")][hn("0x7d")](mn);if(!t)return[];try{return JSON[hn("0x90")](t)}catch(t){return Ie[hn("0x49")](hn("0x91"),{error:t}),[]}}addEventToLocalStorage(t){const e=this[hn("0x5b")]();return ar[hn("0x92")](e,this.maxEventStored,t),this.storageManager[hn("0x7e")](mn,JSON[hn("0x93")](e)),e[hn("0x47")]}[hn("0x75")](){this[hn("0x11")][hn("0x94")](mn)}[hn("0x74")](t){if(0===t[hn("0x47")])return;const e=this[hn("0x5b")]();if(!e||0===e.length)return;const r=new Set;for(const e of t)r[hn("0x5a")](this[hn("0x24")](e));const n=e.filter((t=>!r.has(this[hn("0x24")](t))));n[hn("0x47")]!==e[hn("0x47")]&&(n[hn("0x47")]>0?this[hn("0x11")][hn("0x7e")](mn,JSON[hn("0x93")](n)):this[hn("0x11")][hn("0x94")](mn))}}var Tn,Dn,On=["setCryptoBinding","load","loadDeviceId","registerEventListeners","addEventListener","getDeviceId","deviceId","setDeviceId","info","Updating DeviceId","setItemSessionStorageSafe","setItemLocalStorageSafe","getItemSessionStorageSafe","getItemLocalStorageSafe","getClientId","configManager","removeUserId","userId","now","removeItemSessionStorageSafe","removeItemLocalStorageSafe","tabId","floor","random","MAX_SAFE_INTEGER","getTabId","saveTabIdOnUnload","setSessionToken","getSecureSessionToken","actionType","expirationSeconds","warn","CryptoBinding not available for secure session token generation","getSessionToken","No backend session token available","getPublicData","getUserId","RS256","JWT","stringify","base64UrlEncode","sign","base64ToBase64Url","Failed to generate secure session token:","parse","split","exp","rui","rci","rdi","rdit","rti","userIdStorageExpiry","storageManager","clientId","cryptoBinding","setClientId"];Tn=On,Dn=275,function(t){for(;--t;)Tn.push(Tn.shift())}(++Dn);var Rn=function(t,e){return On[t-=0]};const Mn=Rn("0x0"),Nn=Rn("0x1"),kn=Rn("0x2"),Pn=Rn("0x3"),Bn=Rn("0x4"),Fn="rst",Ln=Rn("0x5");class zn{constructor(t,e,r){this[Rn("0x6")]=t,this.configManager=e,this[Rn("0x7")]=r,this[Rn("0x8")]=null,this[Rn("0x9")](this[Rn("0x7")])}[Rn("0xa")](t){this[Rn("0x8")]=t}[Rn("0xb")](){this[Rn("0xc")](),this.loadTabId()}[Rn("0xd")](){window[Rn("0xe")]("beforeunload",(async()=>this.saveTabIdOnUnload()))}[Rn("0xf")](){return this[Rn("0x10")]}[Rn("0x11")](t){this.deviceId!==t&&(Ie[Rn("0x12")](Rn("0x13"),{deviceId:t}),this[Rn("0x10")]=t,this[Rn("0x6")][Rn("0x14")](kn,t),this.storageManager[Rn("0x15")](kn,t))}[Rn("0xc")](){const t=this[Rn("0x6")][Rn("0x16")](kn)||this[Rn("0x6")][Rn("0x17")](kn);return null!=t&&this[Rn("0x11")](t),t}[Rn("0x18")](){return this.clientId}[Rn("0x9")](t){this[Rn("0x6")][Rn("0x18")]()!=t&&this[Rn("0x6")][Rn("0x9")](t),this[Rn("0x6")][Rn("0x14")](Nn,t)}getUserId(){if(Number(this[Rn("0x6")].getItemLocalStorageSafe(Pn))+this[Rn("0x19")].getConfValue(Ln,864e5)<Date.now())return this[Rn("0x1a")](),null;const t=this[Rn("0x6")].getItemSessionStorageSafe(Mn);return null!=t?t:this.storageManager[Rn("0x17")](Mn)}setUserId(t){this[Rn("0x1b")]=t,this.storageManager[Rn("0x14")](Mn,t),this[Rn("0x6")][Rn("0x15")](Mn,t),this[Rn("0x6")][Rn("0x15")](Pn,Date[Rn("0x1c")]())}[Rn("0x1a")](){this[Rn("0x6")][Rn("0x1d")](Mn),this[Rn("0x6")][Rn("0x1e")](Mn),this.storageManager.removeItemLocalStorageSafe(Pn)}loadTabId(){const t=this[Rn("0x6")][Rn("0x16")](Bn);t?(this[Rn("0x6")].removeItemSessionStorageSafe(Bn),this[Rn("0x1f")]=t):this.tabId=Math[Rn("0x20")](Math[Rn("0x21")]()*Number[Rn("0x22")]).toString()}[Rn("0x23")](){return this[Rn("0x1f")]}[Rn("0x24")](){this.storageManager.setItemSessionStorageSafe(Bn,this.tabId)}[Rn("0x25")](t){this.storageManager[Rn("0x15")](Fn,t)}getSessionToken(){return this[Rn("0x6")][Rn("0x17")](Fn)||this.storageManager[Rn("0x16")](Fn)}async[Rn("0x26")](t){var e,r;const n=null!==(e=null==t?void 0:t[Rn("0x27")])&&void 0!==e?e:null,i=null!==(r=null==t?void 0:t[Rn("0x28")])&&void 0!==r?r:300;if(!this.cryptoBinding)return Ie[Rn("0x29")](Rn("0x2a")),null;const a=this[Rn("0x2b")]();if(!a)return Ie[Rn("0x29")](Rn("0x2c")),null;try{const{publicKey:t}=await this[Rn("0x8")][Rn("0x2d")](),e=Math[Rn("0x20")](Date.now()/1e3),r=e+i,s=o({backendSessionToken:a,securedToken:!0,version:"1.0",clientParams:{clientId:this[Rn("0x18")](),deviceId:this[Rn("0xf")](),userId:this[Rn("0x2e")]()},iat:e,exp:r,publicKey:t},n&&{actionType:n}),u={alg:Rn("0x2f"),typ:Rn("0x30")},c=ar.base64UrlEncode(JSON[Rn("0x31")](u))+"."+ar[Rn("0x32")](JSON.stringify(s)),l=await this[Rn("0x8")][Rn("0x33")](c);return c+"."+ar[Rn("0x34")](l)}catch(t){return Ie.error(Rn("0x35"),{error:t}),null}}isTokenExpired(){var t;const e=this[Rn("0x2b")]();if(!e)return!0;try{const r=JSON[Rn("0x36")](atob(e[Rn("0x37")](".")[1]));let n=(null!==(t=r[Rn("0x38")])&&void 0!==t?t:r.iat)*(r[Rn("0x38")]&&r[Rn("0x38")]<1e12?1e3:1);return r[Rn("0x38")]||(n+=9e5),Date[Rn("0x1c")]()>=n}catch(t){return Ie.error("Invalid JWT:",{error:t}),!0}}}var Un,Vn,Hn=["postData","serverPath","postDataFromURL","POST","application/json","stringify","getData","GET","include","callServer","fetch-api is not supported","CLIENT","json","message","statusText","status","COMMUNICATION"];Un=Hn,Vn=340,function(t){for(;--t;)Un.push(Un.shift())}(++Vn);var jn=function(t,e){return Hn[t-=0]};class Gn{constructor(t){this.serverPath=t}async[jn("0x0")](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.postDataFromURL(this[jn("0x1")]+t,e,r)}async[jn("0x2")](t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:jn("0x3"),credentials:"include",headers:new Headers(o({"Content-Type":jn("0x4")},r)),body:JSON[jn("0x5")](e)};return await this.callServer(t,n)}async[jn("0x6")](t){const e=this[jn("0x1")]+t,r={method:jn("0x7"),credentials:jn("0x8")};return await this[jn("0x9")](e,r)}async callServer(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!("fetch"in window))throw new on(new Error(jn("0xa")),en[jn("0xb")]);try{const r=await fetch(t,e),n=await r[jn("0xc")]();if(r.ok)return n;throw new on(new Error(n[jn("0xd")]||r[jn("0xe")]),en.SERVER,r[jn("0xf")])}catch(t){if(!(t instanceof on))throw new on(new Error(t[jn("0xd")]),en[jn("0x10")]);throw t}}}var Wn,Xn,Yn=["REQUIRED_SDK_PARAMS","throwOrReturnResult","logIfInvalid","info","throwError","validateSDKParams","filter","options","serverPath","string","push","length","Invalid SDK params was provided: ","stringify"];Wn=Yn,Xn=364,function(t){for(;--t;)Wn.push(Wn.shift())}(++Xn);var Zn=function(t,e){return Yn[t-=0]};class qn{constructor(){this[Zn("0x0")]={clientId:"string"}}[Zn("0x1")](t,e,r){if(!t&&((null==e?void 0:e[Zn("0x2")])&&Ie[Zn("0x3")](r),null==e?void 0:e[Zn("0x4")]))throw new Error(r);return t}[Zn("0x5")](t,e){var r,n;const o=Object.keys(this.REQUIRED_SDK_PARAMS)[Zn("0x6")]((e=>typeof t[e]!=this[Zn("0x0")][e])),i=null!==(n=null===(r=t[Zn("0x7")])||void 0===r?void 0:r[Zn("0x8")])&&void 0!==n?n:t[Zn("0x8")];return typeof i===Zn("0x9")&&i||o[Zn("0xa")](Zn("0x8")),this[Zn("0x1")](0==o[Zn("0xb")],e,Zn("0xc")+JSON[Zn("0xd")](o))}}var Kn,$n,Jn=["logs","length","now","getClientId","floor","platform","device/logs","requestsManager","identityManager","lastTimeLogsSent","logMiddleware","reportLogs","push","enableLogsReporting","configManager","getConfValue","logsMinimumDelay"];Kn=Jn,$n=160,function(t){for(;--t;)Kn.push(Kn.shift())}(++$n);var Qn=function(t,e){return Jn[t-=0]};class to{constructor(t,e,r){this[Qn("0x0")]=t,this[Qn("0x1")]=e,this.configManager=r,this[Qn("0x2")]=0,this[Qn("0x3")]=async()=>{try{await this[Qn("0x4")]()}catch(t){}},Ie.middlewares[Qn("0x5")](this[Qn("0x3")])}async[Qn("0x4")](){if(!this.configManager.getConfValue(Qn("0x6"),!1))return;const t=this.configManager.getConfValue("logsMinimumBatch",6),e=this[Qn("0x7")][Qn("0x8")](Qn("0x9"),12e4);if(Ie[Qn("0xa")][Qn("0xb")]<t||this[Qn("0x2")]+e>Date.now())return;this[Qn("0x2")]=Date[Qn("0xc")]();const r=Ie.flush(),n=this.identityManager[Qn("0xd")](),o=Math[Qn("0xe")](Date[Qn("0xc")]()/1e3),i={sdkVersion:"2.0.2",platform:navigator[Qn("0xf")],clientId:n,timestamp:o,logEntries:r};await this[Qn("0x0")].postData(Qn("0x10"),i)}}var eo,ro,no=["requestsManager","migrateIdentifiers","getItemLocalStorageSafe","true","getDeviceId","getClientId","endsWith","deviceId","storageManager","setItemLocalStorageSafe","rimd","identityManager"];eo=no,ro=418,function(t){for(;--t;)eo.push(eo.shift())}(++ro);var oo=function(t,e){return no[t-=0]};const io=oo("0x0");class ao{constructor(t,e,r){this[oo("0x1")]=t,this[oo("0x2")]=e,this.storageManager=r}async[oo("0x3")](t){if(this.storageManager[oo("0x4")](io)!=oo("0x5")){const e=this[oo("0x1")][oo("0x6")](),r=this.identityManager[oo("0x7")](),n=(t[oo("0x8")]("/")?t:t+"/")+"device/migrate-identifiers",o=await this[oo("0x2")].postDataFromURL(n,{deviceId:e,clientId:r});o[oo("0x9")]&&o[oo("0x9")]==e&&this[oo("0xa")][oo("0xb")](io,"true")}}}var so,uo,co=["isEnabled","expiryDays","startedAt","crypto","sign","keys","length","setCryptoBinding","deviceDataManager","cryptoBinding","config_disabled","identifiersMigrationEnabled","catch","updateUserId","flush","init_not_called","init_failed","action","includes","warn","Invalid action type","CLIENT","claimedUserIdType","Invalid claimedUserIdType","invalid_claimed_user_id_type_","getDeviceData","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","downloadFile","uploadFile","transactionData","customAttributes","emitEvent","Unhandled SDK error. Received eventResponse: ","stringify","errorSpace","SERVER","_error_","message","unexpected_error_","identifyUser called without a valid userid","toString","identifyUser","getUserId","setUserId","EVENT_TYPE_IDENTIFICATION","deviceId","setAuthenticatedUser","clearUser","removeUserId","getSecureSessionToken","RiskID","TSAccountProtection","RiskIDReady","dispatchEvent","TSAccountProtectionReady","undefined","enableIdentifiersMigration","verbose","enableDeviceAttributesInActions","actions","email","account_id","national_id","passport_number","drivers_license_number","other","initializationPromise","disabledReason","firstPartyMigrationUrl","hasOwnClientId","validationManager","initializedInstance","SDK already initialized","clientId","options","serverPath","trim","serverPath is required","validateSDKParams","invalid_params","mainEntry","storageManager","identityManager","load","migrationsManager","requestsManager","enableSessionToken","logsReporter","configManager","generateDisabledToken","now","disabled_sdk_","getActions","isInitialized","Session token is not enabled","SDK disabled","session","isTokenExpired","eventsManager","refreshSessionToken","getSessionToken","object","info","sdk init started","refreshConf","getClientId","getConfValue","tenantId","keyRotation"];so=co,uo=288,function(t){for(;--t;)so.push(so.shift())}(++uo);var lo=function(t,e){return co[t-=0]};const ho=[null,void 0,lo("0x0"),"",0],fo=lo("0x1"),po=lo("0x2"),go=lo("0x3"),mo=lo("0x4"),_o=[lo("0x5"),"phone_number",lo("0x6"),"ssn",lo("0x7"),lo("0x8"),lo("0x9"),lo("0xa")];class yo{constructor(t,e){if(this[lo("0xb")]=null,this[lo("0xc")]=null,this.enableSessionToken=!1,this.identifiersMigrationEnabled=!1,this[lo("0xd")]=null,this[lo("0xe")]=!1,this[lo("0xf")]=new qn,yo[lo("0x10")])throw new Error(lo("0x11"));yo[lo("0x10")]=!0;const r="string"==typeof e;if(this[lo("0x12")]=r?e:t,this[lo("0x13")]=r?{serverPath:t}:e,!this[lo("0x13")]||"string"!=typeof this[lo("0x13")][lo("0x14")]||!this.options[lo("0x14")][lo("0x15")]())throw new Error(lo("0x16"));this[lo("0x13")][lo("0x14")]=new URL(this[lo("0x13")].serverPath).toString(),this[lo("0xd")]=this[lo("0x13")][lo("0xd")]||null,Ie.enabled=!!this[lo("0x13")][lo("0x2")],this[lo("0xf")][lo("0x17")](this,{throwError:!0,logIfInvalid:!0})||(this.disabledReason=lo("0x18")),this[lo("0x1a")]=new ve(this.clientId),this.requestsManager=new Gn(this[lo("0x13")][lo("0x14")]),this.configManager=new er(this[lo("0x1a")],this.requestsManager),this.identityManager=new zn(this[lo("0x1a")],this.configManager,this[lo("0x12")]),this[lo("0x1b")][lo("0x1c")](),this[lo("0x1d")]=new ao(this[lo("0x1b")],this[lo("0x1e")],this.storageManager),this[lo("0x1f")]=this.options[lo("0x1f")]||!1,this[lo("0xe")]=this[lo("0x13")][lo("0xe")]||!1,this[lo("0x20")]=new to(this[lo("0x1e")],this.identityManager,this[lo("0x21")])}[lo("0x22")](t){const e=Date[lo("0x23")]();return lo("0x24")+(this[lo("0xc")]||"unknown")+"_"+t+"_"+e}get[lo("0x4")](){return this[lo("0x21")].getConfValue(mo,[])}async[lo("0x25")](){return await this[lo("0x26")](),this[lo("0x4")]}async getSessionToken(){if(!this[lo("0x1f")])throw new Error(lo("0x27"));return await this[lo("0x26")]()?(this[lo("0x1b")][lo("0x2a")]()&&await this[lo("0x2b")][lo("0x2c")](),this[lo("0x1b")][lo("0x2d")]()):(Ie.info(lo("0x28")),this[lo("0x22")](lo("0x29")))}async init(t){const e=typeof t!==lo("0x2e")?t:null==t?void 0:t.userId;return Ie[lo("0x2f")](lo("0x30")),this[lo("0xb")]=(async()=>{await this[lo("0x21")][lo("0x31")](this[lo("0x1b")][lo("0x32")]());const t=this[lo("0x21")][lo("0x33")](lo("0x34"),null),r=this[lo("0x21")][lo("0x33")](lo("0x35"),null),n={};if((null==r?void 0:r[lo("0x36")])&&(n.keyRotation={isEnabled:!0,expiryDays:r[lo("0x37")],startedAt:r[lo("0x38")],tenantId:t}),this[lo("0xe")]&&(n.fallbackClientId=this[lo("0x12")]),this.cryptoBinding=_e[lo("0x39")].createCryptoBinding(lo("0x3a"),Object[lo("0x3b")](n)[lo("0x3c")]>0?n:void 0),this[lo("0x1b")][lo("0x3d")](this.cryptoBinding),this[lo("0x3e")]=new Ue(this[lo("0x1a")],this[lo("0x21")],this[lo("0x3f")]),this.eventsManager=new Sn(this[lo("0x21")],this[lo("0x1a")],this.deviceDataManager,this[lo("0x1e")],this[lo("0x1b")],this[lo("0x3f")],this[lo("0x13")][lo("0x14")],this.enableSessionToken),null!==this[lo("0xc")])return!1;const o=this.configManager.getConfValue("sdkEnabled",void 0);return o?(this[lo("0x41")]=this[lo("0x41")]||this[lo("0x21")][lo("0x33")](fo,!1),this[lo("0x41")]&&this.firstPartyMigrationUrl&&await this.migrationsManager.migrateIdentifiers(this[lo("0xd")]),Ie.enabled=Ie.enabled||!!this[lo("0x21")].getConfValue(po,!1),await this[lo("0x2b")].sendDeviceDataEvent()[lo("0x42")]((()=>{})),await this.eventsManager.sendPageLoadEvent()[lo("0x42")]((()=>{})),await this[lo("0x43")](e)[lo("0x42")]((()=>{})),this[lo("0x2b")].registerEventListeners(),await this[lo("0x2b")][lo("0x44")]()[lo("0x42")]((()=>{})),Ie[lo("0x2f")]("sdk init done"),!0):(this.disabledReason=void 0===o?"missing_config":lo("0x40"),!1)})(),await this[lo("0xb")]}async[lo("0x26")](){if(null===this[lo("0xb")])return this[lo("0xc")]||(this[lo("0xc")]=lo("0x45")),!1;const t=await this[lo("0xb")];return t||this[lo("0xc")]||(this[lo("0xc")]=lo("0x46")),t}async triggerActionEvent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Date[lo("0x23")]();if(!await this[lo("0x26")]())return Ie.info("SDK disabled"),{actionToken:this[lo("0x22")](lo("0x47"))};if(!this[lo("0x4")][lo("0x48")](t))return Ie[lo("0x49")](lo("0x4a"),{actionType:t}),{actionToken:en[lo("0x4b")]+"_error_'invalid action type - "+t+"'_"+r};const n=null==e?void 0:e[lo("0x4c")];if(n&&!_o.includes(n))return Ie[lo("0x49")](lo("0x4d"),{claimedUserIdType:n}),{actionToken:lo("0x4e")+n+"_"+r};let i;this[lo("0x21")][lo("0x33")](go,!1)&&(i=await this[lo("0x3e")][lo("0x4f")]());const a=o({type:We.EVENT_TYPE_ACTION,attributes:o(o(o(o(o(o(o(o(o(o(o(o(o({action_type:t},(null==e?void 0:e[lo("0x50")])&&{correlation_id:e[lo("0x50")]}),(null==e?void 0:e[lo("0x51")])&&{claimed_user_id:e[lo("0x51")]}),n&&{claimed_user_id_type:n}),(null==e?void 0:e.publicKey)&&{public_key:e[lo("0x52")]}),(null==e?void 0:e[lo("0x53")])&&{extension_metadata:e.extensionMetadata}),(null==e?void 0:e[lo("0x54")])&&{extension_device_attributes:e[lo("0x54")]}),(null==e?void 0:e[lo("0x55")])&&{suspicious_signals:e[lo("0x55")]}),(null==e?void 0:e.suspiciousContext)&&{suspicious_context:e.suspiciousContext}),(null==e?void 0:e[lo("0x56")])&&{download_file:e[lo("0x56")]}),(null==e?void 0:e[lo("0x57")])&&{upload_file:e.uploadFile}),(null==e?void 0:e[lo("0x58")])&&{transactionData:e[lo("0x58")]}),typeof PACKAGE_VERSION!==lo("0x0")&&{platform_sdk_version:PACKAGE_VERSION}),i)},(null==e?void 0:e[lo("0x59")])&&{customAttributes:e[lo("0x59")]});try{const t=await this[lo("0x2b")][lo("0x5a")](a),{actionToken:e}=t;if(!e)throw new on(new Error(lo("0x5b")+(typeof t==lo("0x2e")?JSON[lo("0x5c")](t).slice(15):t)),en.CLIENT);return t}catch(e){return{actionToken:e instanceof on?e[lo("0x5d")]===en[lo("0x5e")]?e.errorSpace+lo("0x5f")+t+"_"+e.errorCode+"_'"+e.message+"'_"+r:e[lo("0x5d")]+lo("0x5f")+t+"_'"+e[lo("0x60")]+"'_"+r:lo("0x61")+t+"_"+r}}}async updateUserId(t){if(ho[lo("0x48")](t))return Ie[lo("0x2f")](lo("0x62"),{userId:t}),!1;t=t[lo("0x63")](),Ie[lo("0x2f")](lo("0x64"),{userId:t});const e=this[lo("0x1b")][lo("0x65")]();return e===t||(this[lo("0x1b")][lo("0x66")](t),!!(await this[lo("0x2b")][lo("0x5a")]({type:We[lo("0x67")],attributes:{previous_user_id:e,user_id:t}}))[lo("0x68")])}async[lo("0x69")](t){return await this.isInitialized()?this.updateUserId(t):(Ie[lo("0x2f")](lo("0x28")),!1)}async[lo("0x6a")](){if(!await this[lo("0x26")]())return Ie[lo("0x2f")](lo("0x28")),!1;const t=this[lo("0x1b")][lo("0x65")]();return null!=t&&this[lo("0x1b")][lo("0x6b")](),!!(await this.eventsManager.emitEvent({type:We.EVENT_TYPE_IDENTIFICATION,attributes:{previous_user_id:t}})).deviceId}async[lo("0x6c")](){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;if(!this[lo("0x1f")])throw new Error(lo("0x27"));return await this.isInitialized()?(this[lo("0x1b")][lo("0x2a")]()&&await this[lo("0x2b")].refreshSessionToken(),await this[lo("0x1b")][lo("0x6c")]({actionType:t,expirationSeconds:e})||this[lo("0x22")](lo("0x29"))):(Ie[lo("0x2f")]("SDK disabled"),this.generateDisabledToken("session"))}}yo[lo("0x10")]=!1,document[lo("0x70")](new CustomEvent(lo("0x71")));var wo,vo,Eo=["events","MODULE_INITIALIZED","moduleMetadata","getInitConfig","clientId","init","utils","TsError","tsPlatform not initialized","getSecureSessionToken","identityManager","getDeviceId","eventsManager","flush"];wo=Eo,vo=280,function(t){for(;--t;)wo.push(wo.shift())}(++vo);var bo=function(t,e){return Eo[t-=0]};let Ao=null;_e[bo("0x0")].on(_e[bo("0x0")][bo("0x1")],(()=>{const{clientId:t,drs:e}=_e[bo("0x2")][bo("0x3")](),r=e||{},{enabled:n,userId:i,serverPath:a}=r,s=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(r,pe);if(!1===n)return;const u=(null==e?void 0:e[bo("0x4")])||t,c=!!(null==e?void 0:e[bo("0x4")]);Ao=new yo(u,o(o({},s),{},{hasOwnClientId:c,serverPath:a})),Ao[bo("0x5")]({userId:i})}));const Co=function(){return function(t){if(!t)throw new(_e[bo("0x6")].exceptions[bo("0x7")])("not_initialized",bo("0x8"))}(Ao),Ao.getSessionToken()};class xo extends Error{constructor(t,e,r){super(r),this.name="ApiError",this.url=e.url,this.status=e.status,this.statusText=e.statusText,this.body=e.body,this.request=t}}const Io={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 So,To,Do,Oo;!function(t){var e;(e=t.feedback||(t.feedback={})).OK="ok",e.OTHER="other",e.DOCUMENT_NOT_FOUND="document_not_found",e.FACE_NOT_FOUND="face_not_found",e.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",e.OBSTRUCTED="obstructed",e.BLUR="blur",e.GLARE="glare",e.DOCUMENT_NOT_SUPPORTED="document_not_supported",e.DOCUMENT_NOT_MATCHING="document_not_matching",e.WRONG_DOCUMENT_SIDE="wrong_document_side",e.MULTI_FACE="multi_face",e.FACE_ROTATED="face_rotated",e.FACE_TOO_SMALL="face_too_small",e.FACE_TOO_CLOSE="face_too_close",e.CLOSED_EYES="closed_eyes",e.FACE_ANGLE_TOO_LARGE="face_angle_too_large",e.FACE_CLOSE_TO_BORDER="face_close_to_border",e.FACE_OCCLUDED="face_occluded",e.FACE_CROPPED="face_cropped",e.BARCODE_NOT_FOUND="barcode_not_found",e.GLARE_SELFIE="glare_selfie",e.BLUR_SELFIE="blur_selfie",e.RESTRICTED_CRITERIA="restricted_criteria",e.UNCLASSIFIABLE="unclassifiable"}(So||(So={})),function(t){var e;(e=t.image_type||(t.image_type={})).DOCUMENT_FRONT="document_front",e.DOCUMENT_BACK="document_back",e.SELFIE="selfie"}(To||(To={})),function(t){var e,r;(e=t.status||(t.status={})).PENDING="pending",e.CAPTURING="capturing",e.PROCESSING="processing",e.RECAPTURE="recapture",e.COMPLETE="complete",e.ERROR="error",e.EXPIRED="expired",(r=t.recapture_reason||(t.recapture_reason={})).IMAGE_MISSING="image_missing",r.DOCUMENT_EXPIRED="document_expired",r.DOCUMENT_NOT_SUPPORTED="document_not_supported",r.DOCUMENT_DAMAGED="document_damaged",r.POOR_IMAGE_QUALITY="poor_image_quality",r.DOCUMENT_NOT_FOUND="document_not_found",r.OBSTRUCTED="obstructed",r.BLUR="blur",r.GLARE="glare",r.DOCUMENT_NOT_MATCHING="document_not_matching",r.WRONG_DOCUMENT_SIDE="wrong_document_side",r.FACE_NOT_FOUND="face_not_found",r.DOCUMENT_FACE_NOT_FOUND="document_face_not_found",r.INVALID_INPUT="invalid_input",r.MULTI_FACE="multi_face",r.FACE_ROTATED="face_rotated",r.FACE_TOO_SMALL="face_too_small",r.FACE_TOO_CLOSE="face_too_close",r.CLOSED_EYES="closed_eyes",r.FACE_ANGLE_TOO_LARGE="face_angle_too_large",r.FACE_CLOSE_TO_BORDER="face_close_to_border",r.FACE_OCCLUDED="face_occluded",r.FACE_CROPPED="face_cropped",r.BARCODE_NOT_FOUND="barcode_not_found",r.GLARE_SELFIE="glare_selfie",r.BLUR_SELFIE="blur_selfie",r.NO_FACE="no_face",r.DOCUMENT_TYPE_RESTRICTED="document_type_restricted"}(Do||(Do={})),function(t){var e;(e=t.client_type||(t.client_type={})).HOSTED_APP="hosted_app",e.MOBILE_SDK="mobile_sdk"}(Oo||(Oo={}));var Ro={},Mo={get exports(){return Ro},set exports(t){Ro=t}};!function(t,e){!function(r,n){var o="function",i="undefined",a="object",s="string",u="major",c="model",l="name",d="type",h="vendor",f="version",p="architecture",g="console",m="mobile",_="tablet",y="smarttv",w="wearable",v="embedded",E="Amazon",b="Apple",A="ASUS",C="BlackBerry",x="Browser",I="Chrome",S="Firefox",T="Google",D="Huawei",O="LG",R="Microsoft",M="Motorola",N="Opera",k="Samsung",P="Sharp",B="Sony",F="Xiaomi",L="Zebra",z="Facebook",U="Chromium OS",V="Mac OS",H=" Browser",j=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},G=function(t,e){return typeof t===s&&-1!==W(e).indexOf(W(t))},W=function(t){return t.toLowerCase()},X=function(t,e){if(typeof t===s)return t=t.replace(/^\s\s*/,""),typeof e===i?t:t.substring(0,500)},Y=function(t,e){for(var r,i,s,u,c,l,d=0;d<e.length&&!c;){var h=e[d],f=e[d+1];for(r=i=0;r<h.length&&!c&&h[r];)if(c=h[r++].exec(t))for(s=0;s<f.length;s++)l=c[++i],typeof(u=f[s])===a&&u.length>0?2===u.length?typeof u[1]==o?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==o||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):n:this[u[0]]=l?u[1].call(this,l,u[2]):n:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):n):this[u]=l||n;d+=2}},Z=function(t,e){for(var r in e)if(typeof e[r]===a&&e[r].length>0){for(var o=0;o<e[r].length;o++)if(G(e[r][o],t))return"?"===r?n:r}else if(G(e[r],t))return"?"===r?n:r;return e.hasOwnProperty("*")?e["*"]:t},q={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"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,N+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[l,N+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[l,N]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[l,"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],[l,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[l,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],f],[/\bfocus\/([\w\.]+)/i],[f,[l,S+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[f,[l,S]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360"+H]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+H],f],[/samsungbrowser\/([\w\.]+)/i],[f,[l,k+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,z],f],[/(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],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,I+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,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],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/(wolvic)\/([\w\.]+)/i],[l,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,S+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,W]],[/((?: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/,"",W]],[/(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,W]]],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],[c,[h,k],[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],[c,[h,k],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,b],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,b],[d,_]],[/(macintosh);/i],[c,[h,b]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,P],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,D],[d,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,D],[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],[[c,/_/g," "],[h,F],[d,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,F],[d,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/\b(opd2\d{3}a?) bui/i],[c,[h,"OPPO"],[d,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[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],[c,[h,M],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,M],[d,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,O],[d,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,O],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,T],[d,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,T],[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],[c,[h,B],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,B],[d,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,E],[d,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,E],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,C],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,A],[d,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,A],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/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],[c,[h,"TCL"],[d,_]],[/(itel) ((\w+))/i],[[h,W],c,[d,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[h,"Ulefone"],[d,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[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,c,[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,c,[d,_]],[/(surface duo)/i],[c,[h,R],[d,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,_]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,_]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,_]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,_]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,_]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,_]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,_]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,_]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,_]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,_]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,_]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,R],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,L],[d,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,L],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,y]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,k],[d,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,O],[d,y]],[/(apple) ?tv/i],[h,[c,b+" TV"],[d,y]],[/crkey/i],[[c,I+"cast"],[h,T],[d,y]],[/droid.+aft(\w+)( bui|\))/i],[c,[h,E],[d,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,P],[d,y]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,B],[d,y]],[/(mitv-\w{5}) bui/i],[c,[h,F],[d,y]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,X],[c,X],[d,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,g]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[c,[h,B],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,R],[d,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[h,k],[d,w]],[/((pebble))app/i],[h,c,[d,w]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,b],[d,w]],[/droid.+; (glass) \d/i],[c,[h,T],[d,w]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,L],[d,w]],[/(quest( \d| pro)?)/i],[c,[h,z],[d,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,v]],[/(aeobc)\b/i],[c,[h,E],[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[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],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"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],[l,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[f,Z,q]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Z,q],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,V],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,f],[/\(bb(10);/i],[f,[l,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,S+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[l,I+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,U],f],[/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],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,f]]},$=function(t,e){if(typeof t===a&&(e=t,t=n),!(this instanceof $))return new $(t,e).getResult();var g=typeof r!==i&&r.navigator?r.navigator:n,y=t||(g&&g.userAgent?g.userAgent:""),w=g&&g.userAgentData?g.userAgentData:n,v=e?function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r}(K,e):K,E=g&&g.userAgent==y;return this.getBrowser=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,y,v.browser),t[u]=function(t){return typeof t===s?t.replace(/[^\d\.]/g,"").split(".")[0]:n}(t[f]),E&&g&&g.brave&&typeof g.brave.isBrave==o&&(t[l]="Brave"),t},this.getCPU=function(){var t={};return t[p]=n,Y.call(t,y,v.cpu),t},this.getDevice=function(){var t={};return t[h]=n,t[c]=n,t[d]=n,Y.call(t,y,v.device),E&&!t[d]&&w&&w.mobile&&(t[d]=m),E&&"Macintosh"==t[c]&&g&&typeof g.standalone!==i&&g.maxTouchPoints&&g.maxTouchPoints>2&&(t[c]="iPad",t[d]=_),t},this.getEngine=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,y,v.engine),t},this.getOS=function(){var t={};return t[l]=n,t[f]=n,Y.call(t,y,v.os),E&&!t[l]&&w&&w.platform&&"Unknown"!=w.platform&&(t[l]=w.platform.replace(/chrome os/i,U).replace(/macos/i,V)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(t){return y=typeof t===s&&t.length>500?X(t,500):t,this},this.setUA(y),this};$.VERSION="1.0.39",$.BROWSER=j([l,f,u]),$.CPU=j([p]),$.DEVICE=j([c,h,d,g,m,y,_,w,v]),$.ENGINE=$.OS=j([l,f]),t.exports&&(e=t.exports=$),e.UAParser=$;var J=typeof r!==i&&(r.jQuery||r.Zepto);if(J&&!J.ua){var Q=new $;J.ua=Q.getResult(),J.ua.get=function(){return Q.getUA()},J.ua.set=function(t){Q.setUA(t);var e=Q.getResult();for(var r in e)J.ua[r]=e[r]}}}("object"==typeof window?window:i)}(Mo,Ro);const No="1.4.21",ko=Ro.UAParser(),Po=No;function Bo(t,e){var r,n,o,i,a;return{Authorization:`Bearer ${e}`,"ts-sdk-version":Po,"ts-client-id":t,"ts-user-agent":navigator.userAgent,"ts-platform":"web-sdk","ts-os":null===(r=null==ko?void 0:ko.os)||void 0===r?void 0:r.name,"ts-os-version":null===(n=null==ko?void 0:ko.os)||void 0===n?void 0:n.version,"ts-device-model":null===(o=null==ko?void 0:ko.device)||void 0===o?void 0:o.model,"ts-manufacturer":null===(i=null==ko?void 0:ko.device)||void 0===i?void 0:i.vendor,"ts-browser":null===(a=null==ko?void 0:ko.browser)||void 0===a?void 0:a.name,"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent}}var Fo="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Lo=[],zo=[],Uo="undefined"!=typeof Uint8Array?Uint8Array:Array,Vo=!1;function Ho(){Vo=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)Lo[e]=t[e],zo[t.charCodeAt(e)]=e;zo["-".charCodeAt(0)]=62,zo["_".charCodeAt(0)]=63}function jo(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(Lo[(o=n)>>18&63]+Lo[o>>12&63]+Lo[o>>6&63]+Lo[63&o]);return i.join("")}function Go(t){var e;Vo||Ho();for(var r=t.length,n=r%3,o="",i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push(jo(t,s,s+a>u?u:s+a));return 1===n?(e=t[r-1],o+=Lo[e>>2],o+=Lo[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=Lo[e>>10],o+=Lo[e>>4&63],o+=Lo[e<<2&63],o+="="),i.push(o),i.join("")}function Wo(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?o-1:0,h=r?-1:1,f=t[e+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+t[e+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+d],d+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),i-=c}return(f?-1:1)*a*Math.pow(2,i-n)}function Xo(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(e*u-1)*Math.pow(2,o),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;t[r+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[r+f]=255&a,f+=p,a/=256,c-=8);t[r+f-p]|=128*g}var Yo={}.toString,Zo=Array.isArray||function(t){return"[object Array]"==Yo.call(t)};function qo(){return $o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ko(t,e){if(qo()<e)throw new RangeError("Invalid typed array length");return $o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=$o.prototype:(null===t&&(t=new $o(e)),t.length=e),t}function $o(t,e,r){if(!($o.TYPED_ARRAY_SUPPORT||this instanceof $o))return new $o(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return ti(this,t)}return Jo(this,t,e,r)}function Jo(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);$o.TYPED_ARRAY_SUPPORT?(t=e).__proto__=$o.prototype:t=ei(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!$o.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|oi(e,r);t=Ko(t,n);var o=t.write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(ni(e)){var r=0|ri(e.length);return 0===(t=Ko(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Ko(t,0):ei(t,e);if("Buffer"===e.type&&Zo(e.data))return ei(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Qo(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function ti(t,e){if(Qo(e),t=Ko(t,e<0?0:0|ri(e)),!$o.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function ei(t,e){var r=e.length<0?0:0|ri(e.length);t=Ko(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function ri(t){if(t>=qo())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+qo().toString(16)+" bytes");return 0|t}function ni(t){return!(null==t||!t._isBuffer)}function oi(t,e){if(ni(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ri(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Mi(t).length;default:if(n)return Ri(t).length;e=(""+e).toLowerCase(),n=!0}}function ii(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return vi(this,e,r);case"utf8":case"utf-8":return mi(this,e,r);case"ascii":return yi(this,e,r);case"latin1":case"binary":return wi(this,e,r);case"base64":return gi(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ei(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function ai(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function si(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=$o.from(e,n)),ni(e))return 0===e.length?-1:ui(t,e,r,n,o);if("number"==typeof e)return e&=255,$o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):ui(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function ui(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var d=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){d=!1;break}if(d)return i}return-1}function ci(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function li(t,e,r,n){return Ni(Ri(e,t.length-r),t,r,n)}function di(t,e,r,n){return Ni(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function hi(t,e,r,n){return di(t,e,r,n)}function fi(t,e,r,n){return Ni(Mi(e),t,r,n)}function pi(t,e,r,n){return Ni(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function gi(t,e,r){return 0===e&&r===t.length?Go(t):Go(t.slice(e,r))}function mi(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,c=t[o],l=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=d}return function(t){var e=t.length;if(e<=_i)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=_i));return r}(n)}$o.TYPED_ARRAY_SUPPORT=void 0===Fo.TYPED_ARRAY_SUPPORT||Fo.TYPED_ARRAY_SUPPORT,qo(),$o.poolSize=8192,$o._augment=function(t){return t.__proto__=$o.prototype,t},$o.from=function(t,e,r){return Jo(null,t,e,r)},$o.TYPED_ARRAY_SUPPORT&&($o.prototype.__proto__=Uint8Array.prototype,$o.__proto__=Uint8Array),$o.alloc=function(t,e,r){return function(t,e,r,n){return Qo(e),e<=0?Ko(t,e):void 0!==r?"string"==typeof n?Ko(t,e).fill(r,n):Ko(t,e).fill(r):Ko(t,e)}(null,t,e,r)},$o.allocUnsafe=function(t){return ti(null,t)},$o.allocUnsafeSlow=function(t){return ti(null,t)},$o.isBuffer=function(t){return null!=t&&(!!t._isBuffer||ki(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&ki(t.slice(0,0))}(t))},$o.compare=function(t,e){if(!ni(t)||!ni(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},$o.isEncoding=function(t){switch(String(t).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}},$o.concat=function(t,e){if(!Zo(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return $o.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=$o.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!ni(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},$o.byteLength=oi,$o.prototype._isBuffer=!0,$o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)ai(this,e,e+1);return this},$o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)ai(this,e,e+3),ai(this,e+1,e+2);return this},$o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)ai(this,e,e+7),ai(this,e+1,e+6),ai(this,e+2,e+5),ai(this,e+3,e+4);return this},$o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?mi(this,0,t):ii.apply(this,arguments)},$o.prototype.equals=function(t){if(!ni(t))throw new TypeError("Argument must be a Buffer");return this===t||0===$o.compare(this,t)},$o.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},$o.prototype.compare=function(t,e,r,n,o){if(!ni(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(n,o),c=t.slice(e,r),l=0;l<s;++l)if(u[l]!==c[l]){i=u[l],a=c[l];break}return i<a?-1:a<i?1:0},$o.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},$o.prototype.indexOf=function(t,e,r){return si(this,t,e,r,!0)},$o.prototype.lastIndexOf=function(t,e,r){return si(this,t,e,r,!1)},$o.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return ci(this,t,e,r);case"utf8":case"utf-8":return li(this,t,e,r);case"ascii":return di(this,t,e,r);case"latin1":case"binary":return hi(this,t,e,r);case"base64":return fi(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pi(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},$o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _i=4096;function yi(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function wi(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function vi(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=Oi(t[i]);return o}function Ei(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function bi(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function Ai(t,e,r,n,o,i){if(!ni(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Ci(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function xi(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function Ii(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Si(t,e,r,n,o){return o||Ii(t,0,r,4),Xo(t,e,r,n,23,4),r+4}function Ti(t,e,r,n,o){return o||Ii(t,0,r,8),Xo(t,e,r,n,52,8),r+8}$o.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),$o.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=$o.prototype;else{var o=e-t;r=new $o(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},$o.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||bi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},$o.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||bi(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},$o.prototype.readUInt8=function(t,e){return e||bi(t,1,this.length),this[t]},$o.prototype.readUInt16LE=function(t,e){return e||bi(t,2,this.length),this[t]|this[t+1]<<8},$o.prototype.readUInt16BE=function(t,e){return e||bi(t,2,this.length),this[t]<<8|this[t+1]},$o.prototype.readUInt32LE=function(t,e){return e||bi(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},$o.prototype.readUInt32BE=function(t,e){return e||bi(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},$o.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||bi(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},$o.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||bi(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},$o.prototype.readInt8=function(t,e){return e||bi(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},$o.prototype.readInt16LE=function(t,e){e||bi(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},$o.prototype.readInt16BE=function(t,e){e||bi(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},$o.prototype.readInt32LE=function(t,e){return e||bi(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},$o.prototype.readInt32BE=function(t,e){return e||bi(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},$o.prototype.readFloatLE=function(t,e){return e||bi(t,4,this.length),Wo(this,t,!0,23,4)},$o.prototype.readFloatBE=function(t,e){return e||bi(t,4,this.length),Wo(this,t,!1,23,4)},$o.prototype.readDoubleLE=function(t,e){return e||bi(t,8,this.length),Wo(this,t,!0,52,8)},$o.prototype.readDoubleBE=function(t,e){return e||bi(t,8,this.length),Wo(this,t,!1,52,8)},$o.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Ai(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},$o.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Ai(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},$o.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,1,255,0),$o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},$o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,2,65535,0),$o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Ci(this,t,e,!0),e+2},$o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,2,65535,0),$o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Ci(this,t,e,!1),e+2},$o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,4,4294967295,0),$o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):xi(this,t,e,!0),e+4},$o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,4,4294967295,0),$o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):xi(this,t,e,!1),e+4},$o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);Ai(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},$o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);Ai(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},$o.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,1,127,-128),$o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},$o.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,2,32767,-32768),$o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Ci(this,t,e,!0),e+2},$o.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,2,32767,-32768),$o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Ci(this,t,e,!1),e+2},$o.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,4,2147483647,-2147483648),$o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):xi(this,t,e,!0),e+4},$o.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||Ai(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),$o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):xi(this,t,e,!1),e+4},$o.prototype.writeFloatLE=function(t,e,r){return Si(this,t,e,!0,r)},$o.prototype.writeFloatBE=function(t,e,r){return Si(this,t,e,!1,r)},$o.prototype.writeDoubleLE=function(t,e,r){return Ti(this,t,e,!0,r)},$o.prototype.writeDoubleBE=function(t,e,r){return Ti(this,t,e,!1,r)},$o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!$o.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},$o.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!$o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=ni(t)?t:Ri(new $o(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var Di=/[^+\/0-9A-Za-z-_]/g;function Oi(t){return t<16?"0"+t.toString(16):t.toString(16)}function Ri(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Mi(t){return function(t){var e,r,n,o,i,a;Vo||Ho();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new Uo(3*s/4-i),n=i>0?s-4:s;var u=0;for(e=0,r=0;e<n;e+=4,r+=3)o=zo[t.charCodeAt(e)]<<18|zo[t.charCodeAt(e+1)]<<12|zo[t.charCodeAt(e+2)]<<6|zo[t.charCodeAt(e+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=zo[t.charCodeAt(e)]<<2|zo[t.charCodeAt(e+1)]>>4,a[u++]=255&o):1===i&&(o=zo[t.charCodeAt(e)]<<10|zo[t.charCodeAt(e+1)]<<4|zo[t.charCodeAt(e+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Di,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Ni(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function ki(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}const Pi=t=>null!=t,Bi=t=>"string"==typeof t,Fi=t=>Bi(t)&&""!==t,Li=t=>"object"==typeof t&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.arrayBuffer&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),zi=t=>t instanceof FormData,Ui=t=>{const e=[],r=(t,n)=>{Pi(n)&&(Array.isArray(n)?n.forEach((e=>{r(t,e)})):"object"==typeof n?Object.entries(n).forEach((e=>{let[n,o]=e;r(`${t}[${n}]`,o)})):((t,r)=>{e.push(`${encodeURIComponent(t)}=${encodeURIComponent(String(r))}`)})(t,n))};return Object.entries(t).forEach((t=>{let[e,n]=t;r(e,n)})),e.length>0?`?${e.join("&")}`:""},Vi=async(t,e)=>"function"==typeof e?e(t):e,Hi=async(t,e)=>{const r=await Vi(e,t.TOKEN),n=await Vi(e,t.USERNAME),i=await Vi(e,t.PASSWORD),a=await Vi(e,t.HEADERS),s=Object.entries(o(o({Accept:"application/json"},a),e.headers)).filter((t=>{let[e,r]=t;return Pi(r)})).reduce(((t,e)=>{let[r,n]=e;return o(o({},t),{},{[r]:String(n)})}),{});if(Fi(r)&&(s.Authorization=`Bearer ${r}`),Fi(n)&&Fi(i)){const t=(t=>{try{return btoa(t)}catch(e){return $o.from(t).toString("base64")}})(`${n}:${i}`);s.Authorization=`Basic ${t}`}return e.body&&(e.mediaType?s["Content-Type"]=e.mediaType:Li(e.body)?s["Content-Type"]=e.body.type||"application/octet-stream":Bi(e.body)?s["Content-Type"]="text/plain":zi(e.body)||(s["Content-Type"]="application/json")),new Headers(s)},ji=(t,e)=>new Promise((async(r,n)=>{try{const n=((t,e)=>{const r=t.ENCODE_PATH||encodeURI,n=null==e?void 0:e.url.replace("{api-version}",t.VERSION).replace(/{(.*?)}/g,((t,n)=>{var o;return(null===(o=null==e?void 0:e.path)||void 0===o?void 0:o.hasOwnProperty(n))?r(String(e.path[n])):t})),o=`${t.BASE}${n}`;return e.query?`${o}${Ui(e.query)}`:o})(t,e),i=(t=>{if(t.formData){const e=new FormData,r=(t,r)=>{Bi(r)||Li(r)?e.append(t,r):e.append(t,JSON.stringify(r))};return Object.entries(t.formData).filter((t=>{let[e,r]=t;return Pi(r)})).forEach((t=>{let[e,n]=t;Array.isArray(n)?n.forEach((t=>r(e,t))):r(e,n)})),e}})(e),a=(t=>{var e;if(void 0!==t.body)return(null===(e=t.mediaType)||void 0===e?void 0:e.includes("/json"))?JSON.stringify(t.body):Bi(t.body)||Li(t.body)||zi(t.body)?t.body:JSON.stringify(t.body)})(e),s=await Hi(t,e),u=await(async(t,e,r,n,o,i)=>{const a=new AbortController,s={headers:i,body:null!=n?n:o,method:e.method,signal:a.signal};return t.WITH_CREDENTIALS&&(s.credentials=t.CREDENTIALS),await fetch(r,s)})(t,e,n,a,i,s),c=await(async t=>{if(204!==t.status)try{const e=t.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some((t=>e.toLowerCase().startsWith(t)))?await t.json():await t.text()}catch(t){console.error(t)}})(u),l=((t,e)=>{if(e){const r=t.headers.get(e);if(Bi(r))return r}})(u,e.responseHeader),d={url:n,ok:u.ok,status:u.status,statusText:u.statusText,headers:u.headers,body:null!=l?l:c};((t,e)=>{var r,n;const i=o({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(i)throw new xo(t,e,i);if(!e.ok){const o=null!==(r=e.status)&&void 0!==r?r:"unknown",i=null!==(n=e.statusText)&&void 0!==n?n:"unknown",a=(()=>{try{return JSON.stringify(e.body,null,2)}catch(t){return}})();throw new xo(t,e,`Generic Error: status: ${o}; status text: ${i}; body: ${a}`)}})(e,d),r(d)}catch(t){n(t)}})),Gi=new t("idv"),Wi=Symbol(),Xi=Symbol(),Yi="verify-id-sdk";function Zi(t){return sessionStorage.getItem(t)}const qi=new Map;function Ki(t,e){const r=qi.get(t);Gi.events.emit(r,e)}function $i(t){Ki(Wi,t)}function Ji(t,e,r,n,o){$i({type:"verification-result",status:e,step:t,state:n,callbackUrl:o,sessionId:r})}function Qi(t,e){$i({type:"capture-error",errorCode:e,step:t})}function ta(t,e,r){$i({type:"api-request-error",errorCode:e,step:t,error:r})}function ea(t,e){return ji(Io,t).catch((r=>(t.url.endsWith("/events")||ta(e,"request-error",r.message),Promise.reject(r))))}async function ra(t){var e;Io.HEADERS=Bo(t);const r=await function(t){return ea({keepalive:!0,method:"GET",url:`/verify/api/v1/sdk-settings?clientId=${t}`},"init")}(t);return{autocapture_settings:null!==(e=r.body.autocapture_settings)&&void 0!==e?e:void 0,autocapture_enabled:r.body.autocapture_enabled,strings:r.body.strings}}qi.set(Wi,Wi),qi.set(Xi,Xi);var na={setStep(t,e){t.commit("setStep",e)},setSessionId(t,e){t.commit("setSessionId",e)},setIsCapturingProcessStarted(t,e){t.commit("setIsCapturingProcessStarted",e)},setServerPath(t,e){t.commit("setServerPath",e)},setStartToken(t,e){t.commit("setStartToken",e)},setRootElement(t,e){t.commit("setRootElement",e)},setLanguage(t,e){t.commit("setLanguage",e)},setCallback(t,e){t.commit("setCallback",e)},setUserToken(t,e){t.commit("setUserToken",e)},setConsentVersion(t,e){t.commit("setConsentVersion",e)},setMissingImages(t,e){t.commit("setMissingImages",e)},setClientId(t,e){t.commit("setClientId",e)},setStatus(t,e){t.commit("setStatus",e)},setMarkdownSupportText(t,e){t.commit("setMarkdownSupportText",e)},setVideoCaptureSettings(t,e){t.commit("setVideoCaptureSettings",e)},setCdnHost(t,e){t.commit("setCdnHost",e)},setIsImageSigningEnabled(t,e){t.commit("setIsImageSigningEnabled",e)},setAutoCaptureSettings(t,e){t.commit("setAutoCaptureSettings",e)}},oa={setStep:(t,e)=>(t.step=e,t),setSessionId:(t,e)=>(t.sessionId=e,t),setIsCapturingProcessStarted:(t,e)=>(t.isCapturingProcessStarted=e,t),setServerPath:(t,e)=>(t.serverPath=e,t),setStartToken:(t,e)=>(t.startToken=e,t),setRootElement:(t,e)=>(t.rootElementId=e,t),setLanguage:(t,e)=>(t.language=e,t),setCallback:(t,e)=>(t.callback=e,t),setUserToken:(t,e)=>(t.userToken=e,t),setConsentVersion:(t,e)=>(t.consentVersion=e,t),setMissingImages:(t,e)=>(t.missingImages=e,t),setClientId:(t,e)=>(t.clientId=e,t),setStatus:(t,e)=>(t.verificationStatus=e,t),setMarkdownSupportText:(t,e)=>(t.markdownSupportText=e,t),setVideoCaptureSettings:(t,e)=>(t.videoCaptureSettings=e,t),setCdnHost:(t,e)=>(t.cdnHost=e,t),setIsImageSigningEnabled:(t,e)=>(t.isImageSigningEnabled=e,t),setAutoCaptureSettings:(t,e)=>(t.autoCaptureSettings=e,t)};const ia=new class{constructor(t){this.actions={},this.mutations={},this.state={},this.status="resting",Object.prototype.hasOwnProperty.call(t,"actions")&&(this.actions=t.actions),Object.prototype.hasOwnProperty.call(t,"mutations")&&(this.mutations=t.mutations);const e=this;this.state=new Proxy(t.state||{},{get:function(t,e){return t[e]},set:function(t,r,n){return t[r]=n,Ki(Xi,{key:r,state:t}),"mutation"!==e.status&&console.warn(`You should use a mutation to set ${String(r)}`),e.status="resting",!0}})}dispatch(t,e){return"function"!=typeof this.actions[t]?(console.error(`Action "${t} doesn't exist.`),!1):(this.status="action",this.actions[t](this,e),!0)}commit(t,e){if("function"!=typeof this.mutations[t])return console.info(`Mutation "${t}" doesn't exist`),!1;this.status="mutation";const r=this.mutations[t](this.state,e);return this.state=r,!0}}({actions:na,mutations:oa,state:{step:"",sessionId:"",serverPath:"",startToken:"",rootElementId:"",language:"en",callback:()=>null,userToken:"",missingImages:[],consentVersion:"",clientId:"",verificationStatus:"pending",markdownSupportText:"",isImageSigningEnabled:!0,isCapturingProcessStarted:!1}});var aa;function sa(t){const e=[],r=function(t){var e,r,n,o;const i=t.stats.get(aa.BLUR_DETECTION),a=t.stats.get(aa.GLARE_DETECTION);if(!i&&!a||0===(null==i?void 0:i.durations.length)&&0===(null==a?void 0:a.durations.length))return;const s=la(null!==(e=null==i?void 0:i.durations)&&void 0!==e?e:null==a?void 0:a.durations),u=i&&a?Math.min(i.countSuccess,a.countSuccess):null!==(r=null==i?void 0:i.countSuccess)&&void 0!==r?r:null==a?void 0:a.countSuccess;return{name:ca(aa.BLUR_DETECTION),count_success:u,count_failure_glare:null!==(n=null==a?void 0:a.countFailed)&&void 0!==n?n:0,count_failure_blur:null!==(o=null==i?void 0:i.countFailed)&&void 0!==o?o:0,avg_duration:s.duration_avg,std_duration:s.duration_std}}(t);r&&e.push(r);for(const[r,n]of t.stats.entries())r!==aa.BLUR_DETECTION&&r!==aa.GLARE_DETECTION&&n.durations.length>0&&e.push(ua(n,r));return t.frameHandleDurations.length>0&&e.push(function(t){const e=la(t.frameHandleDurations);return{name:"stability_manager",avg_stable_count:Math.round(t.stableCounts.reduce(((t,e)=>t+e),0)/t.stableCounts.length),avg_duration:e.duration_avg,std_duration:e.duration_std}}(t)),e}function ua(t,e){const r=la(t.durations);return{name:ca(e),count_success:t.countSuccess,count_failure:t.countFailed,avg_duration:r.duration_avg,std_duration:r.duration_std}}function ca(t){switch(t){case aa.BLUR_DETECTION:case aa.GLARE_DETECTION:return"blur_glare_detector";case aa.DOCUMENT_DETECTION:return"doc_detector";case aa.DOCUMENT_POSITION:return"doc_frame_detector";case aa.BARCODE_DETECTION:return"barcode_detector";case aa.FACE_DETECTION:return"face_detector";case aa.FACE_POSITION:return"face_frame_detector";default:return t}}function la(t){var e;if(t.length<2)return{duration_avg:null!==(e=t[0])&&void 0!==e?e:0,duration_std:0};const r=t.length,n=t.reduce(((t,e)=>t+e),0)/r;let o=0;for(let e=0;e<r;e++){const r=t[e];o+=Math.pow(r-n,2)}const i=Math.sqrt(o/(r-1));return{duration_avg:Math.round(n),duration_std:Math.round(i)}}!function(t){t.DOCUMENT_DETECTION="document_detection",t.DOCUMENT_POSITION="document_position",t.GLARE_DETECTION="glare_detection",t.BLUR_DETECTION="blur_detection",t.BARCODE_DETECTION="barcode_detection",t.FACE_DETECTION="face_detection",t.FACE_POSITION="face_position"}(aa||(aa={}));const da=new class{createUploadImageEvent(t,e,r,n){return{event_type:"upload_image",upload_image_req:{process_result:"success",image_type:t,request_total_time_ms:String(e),request_processing_time_ms:String(r),request_build_time_ms:String(n)}}}createPageViewEvent(t){return{event_type:"page_view",page_view_req:{page_name:t}}}createProcessingCompleteEvent(){return{event_type:"processing_complete",processing_complete_req:{status:"complete"}}}createSdkInitEvent(t,e){return{event_type:"sdk_init",sdk_init_req:{user_wait_time:Math.round(t),model_stats:this.convertModelStats(e)}}}convertModelStats(t){return t.map((t=>({model_name:t.modelName,init_duration:Math.round(t.initDuration),download_duration:Math.round(t.downloadDuration)})))}createUserActionEvent(t,e,r){var n,o,i;const a={user_action_type:t,page_name:e,autocapture:!!r,autocapture_enabled:null!==(i=null===(o=null===(n=ia.state)||void 0===n?void 0:n.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&void 0!==i&&i};if(r){const t=sa(r);a.stats=t}return{event_type:"user_action",user_action_req:a}}createErrorEvent(t,e,r){return{event_type:"error",error_req:{error_name:e,error_description:t,step:r}}}createCameraNotAllowedEvent(t,e){return{event_type:"error",error_req:{error_name:"camera_not_allowed",error_description:t,step:e}}}createDrsInitFailureEvent(t,e){return{event_type:"error",error_req:{error_name:"missing_drs_action_token",error_description:t,step:e}}}};async function ha(t,e,r,n,o){r?(Io.HEADERS=Bo(n,e),await function(t,e,r){return ea({keepalive:!0,method:"POST",url:`/verify/api/v1/verification/${t}/events`,path:{sid:t},body:e},r)}(r,o,t)):console.error("cannot send event, sessionId or startToken is not set")}const fa=new class{handelEventData(t){if("session-id-acquired"===t.type)this.sendRiskSessionToken()}sendRiskSessionToken(){try{const t=`${Io.BASE}/verify/api/v1/verification/${ia.state.sessionId}/risk-session-token`,e=ia.state.clientId,r=Bo(e,ia.state.userToken);Co().then((e=>{Gi.http.httpPost(t,{session_token:e},null,r).catch((e=>{throw console.log("unable to send session token to IDV",t),console.error(e),e}))})).catch((e=>{var r,n,o,i;console.log("unable to get session token from DRS",t),console.error(e);const a=(null==e?void 0:e.message)||"failed to initialize DRS",s=da.createDrsInitFailureEvent(a,"init");ha(null===(r=ia.state)||void 0===r?void 0:r.step,null===(n=ia.state)||void 0===n?void 0:n.userToken,null===(o=ia.state)||void 0===o?void 0:o.sessionId,null===(i=ia.state)||void 0===i?void 0:i.clientId,s).then((()=>{$i({type:"failed-to-init-drs",errorCode:"other",step:"init"})}))}))}catch(t){throw console.log("Error sending risk session token"),console.error(t),t}}};async function pa(t,e,r){const n=da.createErrorEvent(t,e,r);await ga(r,n)}async function ga(t,e){var r,n,o,i,a;const s=null===(r=ia.state)||void 0===r?void 0:r.userToken,u=(null===(n=ia.state)||void 0===n?void 0:n.sessionId)||(null===(o=ia.state)||void 0===o?void 0:o.startToken),c=null===(i=ia.state)||void 0===i?void 0:i.clientId,l=(null===(a=ia.state)||void 0===a?void 0:a.step)||t;await ha(l,s,u,c,e)}const ma=function(){var t,e;(null===(e=null===(t=ia.state.autoCaptureSettings)||void 0===t?void 0:t.settings)||void 0===e?void 0:e.debug)&&console.log(...arguments)},_a={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",approve_button:"Approve",retake_button:"Retake"};const ya=new class{constructor(t){this.translations=t,this.translations=new Proxy(this.translations,{get:function(t,e){return t[e]},set:function(t,e,r){return t[e]=r,!0}})}overrideLanguage(t){Object.assign(this.translations,t)}translate(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let o=this.translations[t];return o||(o=t),o.replace(/{(\d+)}/g,(function(t,e){return void 0!==r[e]?r[e]:t}))}}(_a),wa={en:_a,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",approve_button:"Aprobar",retake_button:"Volver a tomar"},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",approve_button:"Aprovar",retake_button:"Tirar novamente"},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",approve_button:"Approuver",retake_button:"Reprendre"}};var va;!function(t){t.DOCUMENT_DETECTOR="document_detector",t.BLUR_GLARE_CLASSIFIER="blur_glare_classifier",t.FACE_LANDMARK="face_landmark"}(va||(va={}));var Ea,ba,Aa=(Ea=function(t,e){return Ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Ea(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Ea(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Ca=function(t){function e(e,r){var n,o,i,a=this.constructor,s=t.call(this,e,r)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),n=s,o=a.prototype,(i=Object.setPrototypeOf)?i(n,o):n.__proto__=o,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(s),s}return Aa(e,t),e}(Error),xa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ia=function(t){function e(e){void 0===e&&(e=void 0);var r=t.call(this,e)||this;return r.message=e,r}return xa(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(Ca),Sa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ta=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sa(e,t),e.kind="ArgumentException",e}(Ia),Da=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Da(e,t),e.kind="IllegalArgumentException",e}(Ia),Ra=function(){function t(t){if(this.binarizer=t,null===t)throw new Oa("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},t.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,o){var i=this.binarizer.getLuminanceSource().crop(e,r,n,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(t){return""}},t}(),Ma=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ma(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(Ia),ka=function(){function t(t){this.source=t}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),Pa=function(){function t(){}return t.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},t.currentTimeMillis=function(){return Date.now()},t}(),Ba=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ba(e,t),e.kind="IndexOutOfBoundsException",e}(Ia),La=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),za=function(t){function e(e,r){void 0===e&&(e=void 0),void 0===r&&(r=void 0);var n=t.call(this,r)||this;return n.index=e,n.message=r,n}return La(e,t),e.kind="ArrayIndexOutOfBoundsException",e}(Fa),Ua=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Va=function(){function t(){}return t.fill=function(t,e){for(var r=0,n=t.length;r<n;r++)t[r]=e},t.fillWithin=function(e,r,n,o){t.rangeCheck(e.length,r,n);for(var i=r;i<n;i++)e[i]=o},t.rangeCheck=function(t,e,r){if(e>r)throw new Oa("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new za(e);if(r>t)throw new za(r)},t.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},t.create=function(t,e,r){return Array.from({length:t}).map((function(t){return Array.from({length:e}).fill(r)}))},t.createInt32Array=function(t,e,r){return Array.from({length:t}).map((function(t){return Int32Array.from({length:e}).fill(r)}))},t.equals=function(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0},t.hashCode=function(t){var e,r;if(null===t)return 0;var n=1;try{for(var o=Ua(t),i=o.next();!i.done;i=o.next()){n=31*n+i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.fillUint8Array=function(t,e){for(var r=0;r!==t.length;r++)t[r]=e},t.copyOf=function(t,e){return t.slice(0,e)},t.copyOfUint8Array=function(t,e){if(t.length<=e){var r=new Uint8Array(e);return r.set(t),r}return t.slice(0,e)},t.copyOfRange=function(t,e,r){var n=r-e,o=new Int32Array(n);return Pa.arraycopy(t,e,o,0,n),o},t.binarySearch=function(e,r,n){void 0===n&&(n=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=n(r,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(t,e){return t-e},t}(),Ha=function(){function t(){}return t.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!==(e=t<<16)&&(r-=16,t=e),0!==(e=t<<8)&&(r-=8,t=e),0!==(e=t<<4)&&(r-=4,t=e),0!==(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},t.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31},t.toHexString=function(t){return t.toString(16)},t.toBinaryString=function(t){return String(parseInt(String(t),2))},t.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},t.truncDivision=function(t,e){return Math.trunc(t/e)},t.parseInt=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),ja=function(){function t(e,r){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=null==r?t.makeArray(e):r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var r=t.makeArray(e);Pa.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(t){return!!(this.bits[Math.floor(t/32)]&1<<(31&t))},t.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},t.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},t.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=r[n]}var a=32*n+Ha.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var r=this.bits,n=Math.floor(t/32),o=~r[n];o&=~((1<<(31&t))-1);for(var i=r.length;0===o;){if(++n===i)return e;o=~r[n]}var a=32*n+Ha.numberOfTrailingZeros(o);return a>e?e:a},t.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},t.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new Oa;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,i=r;i<=n;i++){var a=(2<<(i<n?31:31&e))-(1<<(i>r?0:31&t));o[i]|=a}}},t.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},t.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new Oa;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),i=this.bits,a=n;a<=o;a++){var s=(2<<(a<o?31:31&e))-(1<<(a>n?0:31&t))&4294967295;if((i[a]&s)!==(r?s:0))return!1}return!0},t.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},t.prototype.appendBits=function(t,e){if(e<0||e>32)throw new Oa("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))},t.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var r=0;r<e;r++)this.appendBit(t.get(r))},t.prototype.xor=function(t){if(this.size!==t.size)throw new Oa("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},t.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var i=0,a=0;a<8;a++)this.get(t)&&(i|=1<<7-a),t++;e[r+o]=i}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var i=n[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,t[e-o]=i}if(this.size!==32*r){var a=32*r-this.size,s=t[0]>>>a;for(o=1;o<r;o++){var u=t[o];s|=u<<32-a,t[o-1]=s,s=u>>>a}t[r-1]=s}this.bits=t},t.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&Va.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+Va.hashCode(this.bits)},t.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)7&e||(t+=" "),t+=this.get(e)?"X":".";return t},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t.prototype.toArray=function(){for(var t=[],e=0,r=this.size;e<r;e++)t.push(this.get(e));return t},t}();!function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ENABLE_CODE_39_EXTENDED_MODE=7]="ENABLE_CODE_39_EXTENDED_MODE",t[t.ASSUME_GS1=8]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=9]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=10]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=11]="ALLOWED_EAN_EXTENSIONS"}(ba||(ba={}));var Ga,Wa=ba,Xa=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ya=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xa(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(Ia),Za=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"}(Ga||(Ga={}));var qa,Ka=function(){function t(e,r,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,this.values="number"==typeof r?Int32Array.from([r]):r,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var u=this.values,c=0,l=u.length;c!==l;c++){var d=u[c];t.VALUES_TO_ECI.set(d,this)}try{for(var h=Za(a),f=h.next();!f.done;f=h.next()){var p=f.value;t.NAME_TO_ECI.set(p,this)}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new Ya("incorect value");var r=t.VALUES_TO_ECI.get(e);if(void 0===r)throw new Ya("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(void 0===r)throw new Ya("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(Ga.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(Ga.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(Ga.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(Ga.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(Ga.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(Ga.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(Ga.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(Ga.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(Ga.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(Ga.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(Ga.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(Ga.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(Ga.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(Ga.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(Ga.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(Ga.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(Ga.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(Ga.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(Ga.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(Ga.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(Ga.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(Ga.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(Ga.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(Ga.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(Ga.Big5,28,"Big5"),t.GB18030=new t(Ga.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(Ga.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),$a=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ja=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $a(e,t),e.kind="UnsupportedOperationException",e}(Ia),Qa=function(){function t(){}return t.decode=function(t,e){var r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&"ISO-8859-1"===e},t.encode=function(t,e){var r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)},t.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},t.encodingName=function(t){return"string"==typeof t?t:t.getName()},t.encodingCharacterSet=function(t){return t instanceof Ka?t:Ka.getCharacterSetECIByName(t)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(Ka.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Ja("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(t){return t.equals(Ka.UTF8)||t.equals(Ka.ISO8859_1)||t.equals(Ka.ASCII)},t.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),r=[],n=0;n<e.length;n++)r.push(e[n].charCodeAt(0));return new Uint8Array(r)},t}(),ts=function(){function t(){}return t.castAsNonUtf8Char=function(t,e){void 0===e&&(e=null);var r=e?e.getName():this.ISO88591;return Qa.decode(new Uint8Array([t]),r)},t.guessEncoding=function(e,r){if(null!=r&&void 0!==r.get(Wa.CHARACTER_SET))return r.get(Wa.CHARACTER_SET).toString();for(var n=e.length,o=!0,i=!0,a=!0,s=0,u=0,c=0,l=0,d=0,h=0,f=0,p=0,g=0,m=0,_=0,y=e.length>3&&239===e[0]&&187===e[1]&&191===e[2],w=0;w<n&&(o||i||a);w++){var v=255&e[w];a&&(s>0?128&v?s--:a=!1:128&v&&(64&v?(s++,32&v?(s++,16&v?(s++,8&v?a=!1:l++):c++):u++):a=!1)),o&&(v>127&&v<160?o=!1:v>159&&(v<192||215===v||247===v)&&_++),i&&(d>0?v<64||127===v||v>252?i=!1:d--:128===v||160===v||v>239?i=!1:v>160&&v<224?(h++,p=0,++f>g&&(g=f)):v>127?(d++,f=0,++p>m&&(m=p)):(f=0,p=0))}return a&&s>0&&(a=!1),i&&d>0&&(i=!1),a&&(y||u+c+l>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?2===g&&2===h||10*_>=n?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,r,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++n]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[n];break;case"c":u=e[n][0];break;case"f":u=parseFloat(e[n]).toFixed(t);break;case"p":u=parseFloat(e[n]).toPrecision(t);break;case"e":u=parseFloat(e[n]).toExponential(t);break;case"x":u=parseInt(e[n]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[n],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==r?u+d:d+u;return u}}))},t.getBytes=function(t,e){return Qa.encode(t,e)},t.getCharCode=function(t,e){return void 0===e&&(e=0),t.charCodeAt(e)},t.getCharAt=function(t){return String.fromCharCode(t)},t.SHIFT_JIS=Ka.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=Ka.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=Ka.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),es=function(){function t(t){void 0===t&&(t=""),this.value=t}return t.prototype.enableDecoding=function(t){return this.encoding=t,this},t.prototype.append=function(t){return"string"==typeof t?this.value+=t.toString():this.encoding?this.value+=ts.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},t.prototype.appendChars=function(t,e,r){for(var n=e;e<e+r;n++)this.append(t[n]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(t){return this.value.charAt(t)},t.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},t.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},t.prototype.substring=function(t,e){return this.value.substring(t,e)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(t,e){this.value=this.value.substring(0,t)+e+this.value.substring(t)},t}(),rs=function(){function t(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new Oa("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,o=new t(n,r),i=0;i<r;i++)for(var a=e[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,r,n){if(null===e)throw new Oa("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,u=0,c=0;c<e.length;)if("\n"===e.charAt(c)||"\r"===e.charAt(c)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Oa("row lengths do not match");a=i,u++}c++}else if(e.substring(c,c+r.length)===r)c+=r.length,o[i]=!0,i++;else{if(e.substring(c,c+n.length)!==n)throw new Oa("illegal character encountered: "+e.substring(c));c+=n.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new Oa("row lengths do not match");u++}for(var l=new t(s,u),d=0;d<i;d++)o[d]&&l.set(Math.floor(d%s),Math.floor(d/s));return l},t.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return!!(this.bits[r]>>>(31&t)&1)},t.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},t.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},t.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},t.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new Oa("input matrix dimensions do not match");for(var e=new ja(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*r,s=t.getRow(o,e).getBitArray(),u=0;u<r;u++)n[a+u]^=s[u]},t.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},t.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new Oa("Left and top must be nonnegative");if(n<1||r<1)throw new Oa("Height and width must be at least 1");var o=t+r,i=e+n;if(i>this.height||o>this.width)throw new Oa("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,u=e;u<i;u++)for(var c=u*a,l=t;l<o;l++)s[c+Math.floor(l/32)]|=1<<(31&l)&4294967295},t.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new ja(this.width):e.clear();for(var r=this.rowSize,n=this.bits,o=t*r,i=0;i<r;i++)e.setBulk(32*i,n[o+i]);return e},t.prototype.setRow=function(t,e){Pa.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new ja(t),n=new ja(t),o=0,i=Math.floor((e+1)/2);o<i;o++)r=this.getRow(o,r),n=this.getRow(e-1-o,n),r.reverse(),n.reverse(),this.setRow(o,n),this.setRow(e-1-o,r)},t.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,i=e,a=-1,s=-1,u=0;u<e;u++)for(var c=0;c<r;c++){var l=n[u*r+c];if(0!==l){if(u<i&&(i=u),u>s&&(s=u),32*c<o){for(var d=0;!(l<<31-d&4294967295);)d++;32*c+d<o&&(o=32*c+d)}if(32*c+31>a){for(d=31;l>>>d==0;)d--;32*c+d>a&&(a=32*c+d)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},t.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,i=e[r],a=0;!(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,n])},t.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;r>=0&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),i=e[r],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,n])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&Va.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+Va.hashCode(this.bits)},t.prototype.toString=function(t,e,r){return void 0===t&&(t="X "),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},t.prototype.buildToString=function(t,e,r){for(var n=new es,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)n.append(this.get(a,o)?t:e);n.append(r)}return n.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),ns=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),os=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ns(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(Ia),is=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),as=function(t){function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return is(e,t),e.prototype.getBlackRow=function(t,r){var n=this.getLuminanceSource(),o=n.getWidth();null==r||r.getSize()<o?r=new ja(o):r.clear(),this.initArrays(o);for(var i=n.getRow(t,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<u&&r.set(s);else{var c=255&i[0],l=255&i[1];for(s=1;s<o-1;s++){var d=255&i[s+1];(4*l-c-d)/2<u&&r.set(s),c=l,l=d}}return r},e.prototype.getBlackMatrix=function(){var t=this.getLuminanceSource(),r=t.getWidth(),n=t.getHeight(),o=new rs(r,n);this.initArrays(r);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(n*a/5),u=t.getRow(s,this.luminances),c=Math.floor(4*r/5),l=Math.floor(r/5);l<c;l++){i[(255&u[l])>>e.LUMINANCE_SHIFT]++}var d=e.estimateBlackPoint(i),h=t.getMatrix();for(a=0;a<n;a++){var f=a*r;for(l=0;l<r;l++){(255&h[f+l])<d&&o.set(l,a)}}return o},e.prototype.createBinarizer=function(t){return new e(t)},e.prototype.initArrays=function(t){this.luminances.length<t&&(this.luminances=new Uint8ClampedArray(t));for(var r=this.buckets,n=0;n<e.LUMINANCE_BUCKETS;n++)r[n]=0},e.estimateBlackPoint=function(t){for(var r=t.length,n=0,o=0,i=0,a=0;a<r;a++)t[a]>i&&(o=a,i=t[a]),t[a]>n&&(n=t[a]);var s=0,u=0;for(a=0;a<r;a++){var c=a-o;(f=t[a]*c*c)>u&&(s=a,u=f)}if(o>s){var l=o;o=s,s=l}if(s-o<=r/16)throw new os;var d=s-1,h=-1;for(a=s-1;a>o;a--){var f,p=a-o;(f=p*p*(s-a)*(n-t[a]))>h&&(d=a,h=f)}return d<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(ka),ss=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),us=function(t){function e(e){var r=t.call(this,e)||this;return r.matrix=null,r}return ss(e,t),e.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),o=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=r.getMatrix(),a=n>>e.BLOCK_SIZE_POWER;n&e.BLOCK_SIZE_MASK&&a++;var s=o>>e.BLOCK_SIZE_POWER;o&e.BLOCK_SIZE_MASK&&s++;var u=e.calculateBlackPoints(i,a,s,n,o),c=new rs(n,o);e.calculateThresholdForBlock(i,a,s,n,o,u,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(t){return new e(t)},e.calculateThresholdForBlock=function(t,r,n,o,i,a,s){for(var u=i-e.BLOCK_SIZE,c=o-e.BLOCK_SIZE,l=0;l<n;l++){var d=l<<e.BLOCK_SIZE_POWER;d>u&&(d=u);for(var h=e.cap(l,2,n-3),f=0;f<r;f++){var p=f<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var g=e.cap(f,2,r-3),m=0,_=-2;_<=2;_++){var y=a[h+_];m+=y[g-2]+y[g-1]+y[g]+y[g+1]+y[g+2]}var w=m/25;e.thresholdBlock(t,p,d,w,o,s)}}},e.cap=function(t,e,r){return t<e?e:t>r?r:t},e.thresholdBlock=function(t,r,n,o,i,a){for(var s=0,u=n*i+r;s<e.BLOCK_SIZE;s++,u+=i)for(var c=0;c<e.BLOCK_SIZE;c++)(255&t[u+c])<=o&&a.set(r+c,n+s)},e.calculateBlackPoints=function(t,r,n,o,i){for(var a=i-e.BLOCK_SIZE,s=o-e.BLOCK_SIZE,u=new Array(n),c=0;c<n;c++){u[c]=new Int32Array(r);var l=c<<e.BLOCK_SIZE_POWER;l>a&&(l=a);for(var d=0;d<r;d++){var h=d<<e.BLOCK_SIZE_POWER;h>s&&(h=s);for(var f=0,p=255,g=0,m=0,_=l*o+h;m<e.BLOCK_SIZE;m++,_+=o){for(var y=0;y<e.BLOCK_SIZE;y++){var w=255&t[_+y];f+=w,w<p&&(p=w),w>g&&(g=w)}if(g-p>e.MIN_DYNAMIC_RANGE)for(m++,_+=o;m<e.BLOCK_SIZE;m++,_+=o)for(y=0;y<e.BLOCK_SIZE;y++)f+=255&t[_+y]}var v=f>>2*e.BLOCK_SIZE_POWER;if(g-p<=e.MIN_DYNAMIC_RANGE&&(v=p/2,c>0&&d>0)){var E=(u[c-1][d]+2*u[c][d-1]+u[c-1][d-1])/4;p<E&&(v=E)}u[c][d]=v}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(as),cs=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(t,e,r,n){throw new Ja("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Ja("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Ja("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new es,r=0;r<this.height;r++){for(var n=this.getRow(r,t),o=0;o<this.width;o++){var i=255&n[o],a=void 0;a=i<64?"#":i<128?"+":i<192?".":" ",e.append(a)}e.append("\n")}return e.toString()},t}(),ls=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ds=function(t){function e(e){var r=t.call(this,e.getWidth(),e.getHeight())||this;return r.delegate=e,r}return ls(e,t),e.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},e.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(t,r,n,o){return new e(this.delegate.crop(t,r,n,o))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(cs),hs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fs=function(t){function e(r,n){void 0===n&&(n=!1);var o=t.call(this,r.width,r.height)||this;return o.canvas=r,o.tempCanvasElement=null,o.buffer=e.makeBufferFromCanvasImageData(r,n),o}return hs(e,t),e.makeBufferFromCanvasImageData=function(t,r){void 0===r&&(r=!1);var n=t.getContext("2d").getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height,r)},e.toGrayscaleBuffer=function(t,r,n,o){void 0===o&&(o=!1);var i=new Uint8ClampedArray(r*n);if(e.FRAME_INDEX=!e.FRAME_INDEX,e.FRAME_INDEX||!o)for(var a=0,s=0,u=t.length;a<u;a+=4,s++){var c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=c}else{a=0,s=0;for(var l=t.length;a<l;a+=4,s++){c=void 0;if(0===t[a+3])c=255;else c=306*t[a]+601*t[a+1]+117*t[a+2]+512>>10;i[s]=255-c}}return i},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Oa("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement(),n=r.getContext("2d"),o=t*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),u=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return r.width=s,r.height=u,n.translate(s/2,u/2),n.rotate(o),n.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new ds(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e.FRAME_INDEX=!0,e}(cs),ps=function(){function t(t,e,r){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),gs=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},ms=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},_s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ys=function(){function t(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return gs(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return ms(this,(function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=_s(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.prototype.getVideoInputDevices=function(){return gs(this,void 0,void 0,(function(){return ms(this,(function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map((function(t){return new ps(t.deviceId,t.label)}))]}}))}))},t.prototype.findDeviceById=function(t){return gs(this,void 0,void 0,(function(){var e;return ms(this,(function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find((function(e){return e.deviceId===t}))]:[2,null]}}))}))},t.prototype.decodeFromInputVideoDevice=function(t,e){return gs(this,void 0,void 0,(function(){return ms(this,(function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return gs(this,void 0,void 0,(function(){var r;return ms(this,(function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return gs(this,void 0,void 0,(function(){var r;return ms(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(t,e){return gs(this,void 0,void 0,(function(){var r;return ms(this,(function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return gs(this,void 0,void 0,(function(){return ms(this,(function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromVideoDevice=function(t,e,r){return gs(this,void 0,void 0,(function(){var n;return ms(this,(function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}}))}))},t.prototype.decodeFromConstraints=function(t,e,r){return gs(this,void 0,void 0,(function(){var n;return ms(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeFromStream=function(t,e,r){return gs(this,void 0,void 0,(function(){var n;return ms(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}}))}))},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(t,e){return gs(this,void 0,void 0,(function(){var r;return ms(this,(function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}}))}))},t.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise((function(r,n){return e.playVideoOnLoad(t,(function(){return r()}))}))},t.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},t.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},t.prototype.tryPlayVideo=function(t){return gs(this,void 0,void 0,(function(){return ms(this,(function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},t.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ta("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ta("element with id '"+t+"' must be an "+e+" element");return r},t.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new Ta("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},t.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new Ta("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},t.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new Ta("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},t.prototype.decodeFromImageElement=function(t){if(!t)throw new Ta("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},t.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},t.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},t.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new Ta("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},t.prototype.decodeFromImageUrl=function(t){if(!t)throw new Ta("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},t.prototype.decodeFromVideoUrl=function(t){if(!t)throw new Ta("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},t.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new Ta("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},t.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise((function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)}))},t.prototype._decodeOnLoadVideo=function(t){return gs(this,void 0,void 0,(function(){return ms(this,(function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}}))}))},t.prototype._decodeOnLoadVideoContinuously=function(t,e){return gs(this,void 0,void 0,(function(){return ms(this,(function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}}))}))},t.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},t.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},t.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function(i,a){if(n._stopAsyncDecode)return a(new os("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{i(n.decode(t))}catch(t){if(e&&t instanceof os||(t instanceof Na||t instanceof Ya)&&r)return setTimeout(o,n._timeBetweenDecodingAttempts,i,a);a(t)}};return new Promise((function(t,e){return o(t,e)}))},t.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;var n=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(n,r.timeBetweenScansMillis)}catch(t){e(null,t),(t instanceof Na||t instanceof Ya||t instanceof os)&&setTimeout(n,r._timeBetweenDecodingAttempts)}};n()},t.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},t.prototype.createBinaryBitmap=function(t){this.getCaptureCanvasContext(t);var e=!1;t instanceof HTMLVideoElement?(this.drawFrameOnCanvas(t),e=!0):this.drawImageOnCanvas(t);var r=this.getCaptureCanvas(t),n=new fs(r,e),o=new us(n);return new Ra(o)},t.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t),r=void 0;try{r=e.getContext("2d",{willReadFrequently:!0})}catch(t){r=e.getContext("2d")}this.captureCanvasContext=r}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.videoWidth,sHeight:t.videoHeight,dx:0,dy:0,dWidth:t.videoWidth,dHeight:t.videoHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.drawImageOnCanvas=function(t,e,r){void 0===e&&(e={sx:0,sy:0,sWidth:t.naturalWidth,sHeight:t.naturalHeight,dx:0,dy:0,dWidth:t.naturalWidth,dHeight:t.naturalHeight}),void 0===r&&(r=this.captureCanvasContext),r.drawImage(t,e.sx,e.sy,e.sWidth,e.sHeight,e.dx,e.dy,e.dWidth,e.dHeight)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},t.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(t){return t.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},t.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},t}(),ws=function(){function t(t,e,r,n,o,i){void 0===r&&(r=null==e?0:8*e.length),void 0===i&&(i=Pa.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=o,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=o,this.resultMetadata=null,this.timestamp=null==i?Pa.currentTimeMillis():i}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},t.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},t.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){var r=new Array(e.length+t.length);Pa.arraycopy(e,0,r,0,e.length),Pa.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(qa||(qa={}));var vs,Es=qa;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(vs||(vs={}));var bs,As=vs,Cs=function(){function t(t,e,r,n,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==t?0:8*t.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(t){this.numBits=t},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(t){this.erasures=t},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(t){this.other=t},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),xs=function(){function t(){}return t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Oa;return this.logTable[t]},t.addOrSubtract=function(t,e){return t^e},t}(),Is=function(){function t(t,e){if(0===e.length)throw new Oa;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),Pa.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){e=0;for(var n=0,o=r.length;n!==o;n++){var i=r[n];e=xs.addOrSubtract(e,i)}return e}e=r[0];var a=r.length,s=this.field;for(n=1;n<a;n++)e=xs.addOrSubtract(s.multiply(t,e),r[n]);return e},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new Oa("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Pa.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=xs.addOrSubtract(r[s-a],n[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new Oa("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,u=0;u<n;u++)for(var c=r[u],l=0;l<i;l++)a[u+l]=xs.addOrSubtract(a[u+l],s.multiply(c,o[l]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(0===e)return this.field.getZero();if(1===e)return this;for(var r=this.coefficients.length,n=this.field,o=new Int32Array(r),i=this.coefficients,a=0;a<r;a++)o[a]=n.multiply(i[a],e);return new t(n,o)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Oa;if(0===r)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],r);return new t(a,i)},t.prototype.divide=function(t){if(!this.field.equals(t.field))throw new Oa("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new Oa("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var a=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),u=t.multiplyByMonomial(a,s),c=e.buildMonomial(a,s);r=r.addOrSubtract(c),n=n.addOrSubtract(u)}return[r,n]},t.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},t}(),Ss=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ts=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ss(e,t),e.kind="ArithmeticException",e}(Ia),Ds=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Os=function(t){function e(e,r,n){var o=t.call(this)||this;o.primitive=e,o.size=r,o.generatorBase=n;for(var i=new Int32Array(r),a=1,s=0;s<r;s++)i[s]=a,(a*=2)>=r&&(a^=e,a&=r-1);o.expTable=i;var u=new Int32Array(r);for(s=0;s<r-1;s++)u[i[s]]=s;return o.logTable=u,o.zero=new Is(o,Int32Array.from([0])),o.one=new Is(o,Int32Array.from([1])),o}return Ds(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Oa;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Is(this,r)},e.prototype.inverse=function(t){if(0===t)throw new Ts;return this.expTable[this.size-this.logTable[t]-1]},e.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+Ha.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(t){return t===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(xs),Rs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ms=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Rs(e,t),e.kind="ReedSolomonException",e}(Ia),Ns=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ks=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ns(e,t),e.kind="IllegalStateException",e}(Ia),Ps=function(){function t(t){this.field=t}return t.prototype.decode=function(t,e){for(var r=this.field,n=new Is(r,t),o=new Int32Array(e),i=!0,a=0;a<e;a++){var s=n.evaluateAt(r.exp(a+r.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var u=new Is(r,o),c=this.runEuclideanAlgorithm(r.buildMonomial(e,1),u,e),l=c[0],d=c[1],h=this.findErrorLocations(l),f=this.findErrorMagnitudes(d,h);for(a=0;a<h.length;a++){var p=t.length-1-r.log(h[a]);if(p<0)throw new Ms("Bad error location");t[p]=Os.addOrSubtract(t[p],f[a])}}},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=this.field,i=t,a=e,s=o.getZero(),u=o.getOne();a.getDegree()>=(r/2|0);){var c=i,l=s;if(s=u,(i=a).isZero())throw new Ms("r_{i-1} was zero");a=c;for(var d=o.getZero(),h=i.getCoefficient(i.getDegree()),f=o.inverse(h);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),g=o.multiply(a.getCoefficient(a.getDegree()),f);d=d.addOrSubtract(o.buildMonomial(p,g)),a=a.addOrSubtract(i.multiplyByMonomial(p,g))}if(u=d.multiply(s).addOrSubtract(l),a.getDegree()>=i.getDegree())throw new ks("Division algorithm failed to reduce polynomial?")}var m=u.getCoefficient(0);if(0===m)throw new Ms("sigmaTilde(0) was zero");var _=o.inverse(m);return[u.multiplyScalar(_),a.multiplyScalar(_)]},t.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,i=1;i<o.getSize()&&n<e;i++)0===t.evaluateAt(i)&&(r[n]=o.inverse(i),n++);if(n!==e)throw new Ms("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(t,e){for(var r=e.length,n=new Int32Array(r),o=this.field,i=0;i<r;i++){for(var a=o.inverse(e[i]),s=1,u=0;u<r;u++)if(i!==u){var c=o.multiply(e[u],a),l=1&c?-2&c:1|c;s=o.multiply(s,l)}n[i]=o.multiply(t.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(n[i]=o.multiply(n[i],a))}return n},t}();!function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"}(bs||(bs={}));var Bs=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),o=this.correctBits(n),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new Cs(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(t){return this.getEncodedData(t)},t.getEncodedData=function(e){for(var r=e.length,n=bs.UPPER,o=bs.UPPER,i="",a=0;a<r;)if(o===bs.BINARY){if(r-a<5)break;var s=t.readCode(e,a,5);if(a+=5,0===s){if(r-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var u=0;u<s;u++){if(r-a<8){a=r;break}var c=t.readCode(e,a,8);i+=ts.castAsNonUtf8Char(c),a+=8}o=n}else{var l=o===bs.DIGIT?4:5;if(r-a<l)break;c=t.readCode(e,a,l);a+=l;var d=t.getCharacter(o,c);d.startsWith("CTRL_")?(n=o,o=t.getTable(d.charAt(5)),"L"===d.charAt(6)&&(n=o)):(i+=d,o=n)}return i},t.getTable=function(t){switch(t){case"L":return bs.LOWER;case"P":return bs.PUNCT;case"M":return bs.MIXED;case"D":return bs.DIGIT;case"B":return bs.BINARY;default:return bs.UPPER}},t.getCharacter=function(e,r){switch(e){case bs.UPPER:return t.UPPER_TABLE[r];case bs.LOWER:return t.LOWER_TABLE[r];case bs.MIXED:return t.MIXED_TABLE[r];case bs.PUNCT:return t.PUNCT_TABLE[r];case bs.DIGIT:return t.DIGIT_TABLE[r];default:throw new ks("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Os.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Os.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Os.AZTEC_DATA_10):(n=12,r=Os.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/n;if(i<o)throw new Ya;for(var a=e.length%n,s=new Int32Array(i),u=0;u<i;u++,a+=n)s[u]=t.readCode(e,a,n);try{new Ps(r).decode(s,i-o)}catch(t){throw new Ya(t)}var c=(1<<n)-1,l=0;for(u=0;u<o;u++){if(0===(f=s[u])||f===c)throw new Ya;1!==f&&f!==c-1||l++}var d=new Array(o*n-l),h=0;for(u=0;u<o;u++){var f;if(1===(f=s[u])||f===c-1)d.fill(f>1,h,h+n-1),h+=n-1;else for(var p=n-1;p>=0;--p)d[h++]=!!(f&1<<p)}return d},t.prototype.extractBits=function(t){var e=this.ddata.isCompact(),r=this.ddata.getNbLayers(),n=(e?11:14)+4*r,o=new Int32Array(n),i=new Array(this.totalBitsInLayer(r,e));if(e)for(var a=0;a<o.length;a++)o[a]=a;else{var s=n+1+2*Ha.truncDivision(Ha.truncDivision(n,2)-1,15),u=n/2,c=Ha.truncDivision(s,2);for(a=0;a<u;a++){var l=a+Ha.truncDivision(a,15);o[u-a-1]=c-l-1,o[u+a]=c+l+1}}a=0;for(var d=0;a<r;a++){for(var h=4*(r-a)+(e?9:12),f=2*a,p=n-1-f,g=0;g<h;g++)for(var m=2*g,_=0;_<2;_++)i[d+m+_]=t.get(o[f+_],o[f+g]),i[d+2*h+m+_]=t.get(o[f+g],o[p-_]),i[d+4*h+m+_]=t.get(o[p-_],o[p-g]),i[d+6*h+m+_]=t.get(o[p-g],o[f+_]);d+=8*h}return i},t.readCode=function(t,e,r){for(var n=0,o=e;o<e+r;o++)n<<=1,t[o]&&(n|=1);return n},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~","","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),Fs=function(){function t(){}return t.round=function(t){return isNaN(t)?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},t.distance=function(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)},t.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++){e+=t[r]}return e},t}(),Ls=function(){function t(){}return t.floatToIntBits=function(t){return t},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),zs=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Ls.floatToIntBits(this.x)+Ls.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),i=this.distance(t[1],t[2]),a=this.distance(t[0],t[2]);if(i>=o&&i>=a?(r=t[0],e=t[1],n=t[2]):a>=i&&a>=o?(r=t[1],e=t[0],n=t[2]):(r=t[2],e=t[0],n=t[1]),this.crossProductZ(e,r,n)<0){var s=e;e=n,n=s}t[0]=e,t[1]=r,t[2]=n},t.distance=function(t,e){return Fs.distance(t.x,t.y,e.x,e.y)},t.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},t}(),Us=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Vs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hs=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.compact=n,a.nbDatablocks=o,a.nbLayers=i,a}return Vs(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Us),js=function(){function t(e,r,n,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==r&&(r=t.INIT_SIZE),null==n&&(n=e.getWidth()/2|0),null==o&&(o=e.getHeight()/2|0);var i=r/2|0;if(this.leftInit=n-i,this.rightInit=n+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new os}return t.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,o=!1,i=!0,a=!1,s=!1,u=!1,c=!1,l=!1,d=this.width,h=this.height;i;){i=!1;for(var f=!0;(f||!s)&&e<d;)(f=this.containsBlackPoint(r,n,e,!1))?(e++,i=!0,s=!0):s||e++;if(e>=d){o=!0;break}for(var p=!0;(p||!u)&&n<h;)(p=this.containsBlackPoint(t,e,n,!0))?(n++,i=!0,u=!0):u||n++;if(n>=h){o=!0;break}for(var g=!0;(g||!c)&&t>=0;)(g=this.containsBlackPoint(r,n,t,!1))?(t--,i=!0,c=!0):c||t--;if(t<0){o=!0;break}for(var m=!0;(m||!l)&&r>=0;)(m=this.containsBlackPoint(t,e,r,!0))?(r--,i=!0,l=!0):l||r--;if(r<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var _=e-t,y=null,w=1;null===y&&w<_;w++)y=this.getBlackPointOnSegment(t,n-w,t+w,n);if(null==y)throw new os;var v=null;for(w=1;null===v&&w<_;w++)v=this.getBlackPointOnSegment(t,r+w,t+w,r);if(null==v)throw new os;var E=null;for(w=1;null===E&&w<_;w++)E=this.getBlackPointOnSegment(e,r+w,e-w,r);if(null==E)throw new os;var b=null;for(w=1;null===b&&w<_;w++)b=this.getBlackPointOnSegment(e,n-w,e-w,n);if(null==b)throw new os;return this.centerEdges(b,y,E,v)}throw new os},t.prototype.getBlackPointOnSegment=function(t,e,r,n){for(var o=Fs.round(Fs.distance(t,e,r,n)),i=(r-t)/o,a=(n-e)/o,s=this.image,u=0;u<o;u++){var c=Fs.round(t+u*i),l=Fs.round(e+u*a);if(s.get(c,l))return new zs(c,l)}return null},t.prototype.centerEdges=function(e,r,n,o){var i=e.getX(),a=e.getY(),s=r.getX(),u=r.getY(),c=n.getX(),l=n.getY(),d=o.getX(),h=o.getY(),f=t.CORR;return i<this.width/2?[new zs(d-f,h+f),new zs(s+f,u+f),new zs(c-f,l-f),new zs(i+f,a-f)]:[new zs(d+f,h+f),new zs(s+f,u-f),new zs(c-f,l+f),new zs(i-f,a-f)]},t.prototype.containsBlackPoint=function(t,e,r,n){var o=this.image;if(n){for(var i=t;i<=e;i++)if(o.get(i,r))return!0}else for(var a=t;a<=e;a++)if(o.get(r,a))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),Gs=function(){function t(){}return t.checkAndNudgePoints=function(t,e){for(var r=t.getWidth(),n=t.getHeight(),o=!0,i=0;i<e.length&&o;i+=2){var a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new os;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}o=!0;for(i=e.length-2;i>=0&&o;i-=2){a=Math.floor(e[i]),s=Math.floor(e[i+1]);if(a<-1||a>r||s<-1||s>n)throw new os;o=!1,-1===a?(e[i]=0,o=!0):a===r&&(e[i]=r-1,o=!0),-1===s?(e[i+1]=0,o=!0):s===n&&(e[i+1]=n-1,o=!0)}},t}(),Ws=function(){function t(t,e,r,n,o,i,a,s,u){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m){var _=t.quadrilateralToSquare(e,r,n,o,i,a,s,u);return t.squareToQuadrilateral(c,l,d,h,f,p,g,m).times(_)},t.prototype.transformPoints=function(t){for(var e=t.length,r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=0;d<e;d+=2){var h=t[d],f=t[d+1],p=o*h+s*f+l;t[d]=(r*h+i*f+u)/p,t[d+1]=(n*h+a*f+c)/p}},t.prototype.transformPointsWithValues=function(t,e){for(var r=this.a11,n=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,c=this.a32,l=this.a33,d=t.length,h=0;h<d;h++){var f=t[h],p=e[h],g=o*f+s*p+l;t[h]=(r*f+i*p+u)/g,e[h]=(n*f+a*p+c)/g}},t.squareToQuadrilateral=function(e,r,n,o,i,a,s,u){var c=e-n+i-s,l=r-o+a-u;if(0===c&&0===l)return new t(n-e,i-n,e,o-r,a-o,r,0,0,1);var d=n-i,h=s-i,f=o-a,p=u-a,g=d*p-h*f,m=(c*p-h*l)/g,_=(d*l-c*f)/g;return new t(n-e+m*n,s-e+_*s,e,o-r+m*o,u-r+_*u,r,m,_,1)},t.quadrilateralToSquare=function(e,r,n,o,i,a,s,u){return t.squareToQuadrilateral(e,r,n,o,i,a,s,u).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),Xs=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ys=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xs(e,t),e.prototype.sampleGrid=function(t,e,r,n,o,i,a,s,u,c,l,d,h,f,p,g,m,_,y){var w=Ws.quadrilateralToQuadrilateral(n,o,i,a,s,u,c,l,d,h,f,p,g,m,_,y);return this.sampleGridWithTransform(t,e,r,w)},e.prototype.sampleGridWithTransform=function(t,e,r,n){if(e<=0||r<=0)throw new os;for(var o=new rs(e,r),i=new Float32Array(2*e),a=0;a<r;a++){for(var s=i.length,u=a+.5,c=0;c<s;c+=2)i[c]=c/2+.5,i[c+1]=u;n.transformPoints(i),Gs.checkAndNudgePoints(t,i);try{for(c=0;c<s;c+=2)t.get(Math.floor(i[c]),Math.floor(i[c+1]))&&o.set(c/2,a)}catch(t){throw new os}}return o},e}(Gs),Zs=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new Ys,t}(),qs=function(){function t(t,e){this.x=t,this.y=e}return t.prototype.toResultPoint=function(){return new zs(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),Ks=function(){function t(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),r=this.getBullsEyeCorners(e);if(t){var n=r[0];r[0]=r[2],r[2]=n}this.extractParameters(r);var o=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),i=this.getMatrixCornerPoints(r);return new Hs(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new os;var e=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(t[0],t[1],e),this.sampleLine(t[1],t[2],e),this.sampleLine(t[2],t[3],e),this.sampleLine(t[3],t[0],e)]);this.shift=this.getRotation(r,e);for(var n=0,o=0;o<4;o++){var i=r[(this.shift+o)%4];this.compact?(n<<=7,n+=i>>1&127):(n<<=10,n+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},t.prototype.getRotation=function(t,e){var r=0;t.forEach((function(t,n,o){r=(r<<3)+((t>>e-2<<1)+(1&t))})),r=((1&r)<<11)+(r>>1);for(var n=0;n<4;n++)if(Ha.bitCount(r^this.EXPECTED_CORNER_BITS[n])<=2)return n;throw new os},t.prototype.getCorrectedParameterData=function(t,e){var r,n;e?(r=7,n=2):(r=10,n=4);for(var o=r-n,i=new Int32Array(r),a=r-1;a>=0;--a)i[a]=15&t,t>>=4;try{new Ps(Os.AZTEC_PARAM).decode(i,o)}catch(t){throw new os}var s=0;for(a=0;a<n;a++)s=(s<<4)+i[a];return s},t.prototype.getBullsEyeCorners=function(t){var e=t,r=t,n=t,o=t,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(e,i,1,-1),s=this.getFirstDifferent(r,i,1,1),u=this.getFirstDifferent(n,i,-1,1),c=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(c,a)*this.nbCenterLayers/(this.distancePoint(o,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(a,s,u,c))break}e=a,r=s,n=u,o=c,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new os;this.compact=5===this.nbCenterLayers;var d=new zs(e.getX()+.5,e.getY()-.5),h=new zs(r.getX()+.5,r.getY()+.5),f=new zs(n.getX()-.5,n.getY()+.5),p=new zs(o.getX()-.5,o.getY()-.5);return this.expandSquare([d,h,f,p],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var t,e,r,n;try{t=(u=new js(this.image).detect())[0],e=u[1],r=u[2],n=u[3]}catch(a){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;t=this.getFirstDifferent(new qs(o+7,i-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new qs(o+7,i+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new qs(o-7,i+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new qs(o-7,i-7),!1,-1,-1).toResultPoint()}var a=Fs.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Fs.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{var u;t=(u=new js(this.image,15,a,s).detect())[0],e=u[1],r=u[2],n=u[3]}catch(o){t=this.getFirstDifferent(new qs(a+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new qs(a+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new qs(a-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new qs(a-7,s-7),!1,-1,-1).toResultPoint()}return a=Fs.round((t.getX()+n.getX()+e.getX()+r.getX())/4),s=Fs.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new qs(a,s)},t.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(t,e,r,n,o){var i=Zs.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,u=a/2+this.nbCenterLayers;return i.sampleGrid(t,a,a,s,s,u,s,u,u,s,u,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),o.getX(),o.getY())},t.prototype.sampleLine=function(t,e,r){for(var n=0,o=this.distanceResultPoint(t,e),i=o/r,a=t.getX(),s=t.getY(),u=i*(e.getX()-t.getX())/o,c=i*(e.getY()-t.getY())/o,l=0;l<r;l++)this.image.get(Fs.round(a+l*u),Fs.round(s+l*c))&&(n|=1<<r-l-1);return n},t.prototype.isWhiteOrBlackRectangle=function(t,e,r,n){t=new qs(t.getX()-3,t.getY()+3),e=new qs(e.getX()-3,e.getY()-3),r=new qs(r.getX()+3,r.getY()-3),n=new qs(n.getX()+3,n.getY()+3);var o=this.getColor(n,t);if(0===o)return!1;var i=this.getColor(t,e);return i===o&&((i=this.getColor(e,r))===o&&(i=this.getColor(r,n))===o)},t.prototype.getColor=function(t,e){for(var r=this.distancePoint(t,e),n=(e.getX()-t.getX())/r,o=(e.getY()-t.getY())/r,i=0,a=t.getX(),s=t.getY(),u=this.image.get(t.getX(),t.getY()),c=Math.ceil(r),l=0;l<c;l++)a+=n,s+=o,this.image.get(Fs.round(a),Fs.round(s))!==u&&i++;var d=i/r;return d>.1&&d<.9?0:d<=.1===u?1:-1},t.prototype.getFirstDifferent=function(t,e,r,n){for(var o=t.getX()+r,i=t.getY()+n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r,i+=n;for(o-=r,i-=n;this.isValid(o,i)&&this.image.get(o,i)===e;)o+=r;for(o-=r;this.isValid(o,i)&&this.image.get(o,i)===e;)i+=n;return new qs(o,i-=n)},t.prototype.expandSquare=function(t,e,r){var n=r/(2*e),o=t[0].getX()-t[2].getX(),i=t[0].getY()-t[2].getY(),a=(t[0].getX()+t[2].getX())/2,s=(t[0].getY()+t[2].getY())/2,u=new zs(a+n*o,s+n*i),c=new zs(a-n*o,s-n*i);return o=t[1].getX()-t[3].getX(),i=t[1].getY()-t[3].getY(),a=(t[1].getX()+t[3].getX())/2,s=(t[1].getY()+t[3].getY())/2,[u,new zs(a+n*o,s+n*i),c,new zs(a-n*o,s-n*i)]},t.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},t.prototype.isValidPoint=function(t){var e=Fs.round(t.getX()),r=Fs.round(t.getY());return this.isValid(e,r)},t.prototype.distancePoint=function(t,e){return Fs.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.distanceResultPoint=function(t,e){return Fs.distance(t.getX(),t.getY(),e.getX(),e.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(Ha.truncDivision(this.nbLayers-4,8)+1)+15},t}(),$s=function(){function t(){}return t.prototype.decode=function(t,e){void 0===e&&(e=null);var r=null,n=new Ks(t.getBlackMatrix()),o=null,i=null;try{o=(a=n.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Bs).decode(a)}catch(t){r=t}if(null==i)try{var a;o=(a=n.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,o),i=(new Bs).decode(a)}catch(t){if(null!=r)throw r;throw t}var s=new ws(i.getText(),i.getRawBytes(),i.getNumBits(),o,Es.AZTEC,Pa.currentTimeMillis()),u=i.getByteSegments();null!=u&&s.putMetadata(As.BYTE_SEGMENTS,u);var c=i.getECLevel();return null!=c&&s.putMetadata(As.ERROR_CORRECTION_LEVEL,c),s},t.prototype.reportFoundResultPoints=function(t,e){if(null!=t){var r=t.get(Wa.NEED_RESULT_POINT_CALLBACK);null!=r&&e.forEach((function(t,e,n){r.foundPossibleResultPoint(t)}))}},t.prototype.reset=function(){},t}(),Js=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new $s,e)||this}Js(e,t)}(ys);var Qs=function(){function t(){}return t.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(c){if(e&&!0===e.get(Wa.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),o=n.getResultMetadata(),i=270;null!==o&&!0===o.get(As.ORIENTATION)&&(i+=o.get(As.ORIENTATION)%360),n.putMetadata(As.ORIENTATION,i);var a=n.getResultPoints();if(null!==a)for(var s=r.getHeight(),u=0;u<a.length;u++)a[u]=new zs(s-a[u].getY()-1,a[u].getX());return n}throw new os}},t.prototype.reset=function(){},t.prototype.doDecode=function(t,e){var r,n=t.getWidth(),o=t.getHeight(),i=new ja(n),a=e&&!0===e.get(Wa.TRY_HARDER),s=Math.max(1,o>>(a?8:5));r=a?o:15;for(var u=Math.trunc(o/2),c=0;c<r;c++){var l=Math.trunc((c+1)/2),d=u+s*(!(1&c)?l:-l);if(d<0||d>=o)break;try{i=t.getBlackRow(d,i)}catch(t){continue}for(var h=function(t){if(1===t&&(i.reverse(),e&&!0===e.get(Wa.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach((function(t,e){return r.set(e,t)})),r.delete(Wa.NEED_RESULT_POINT_CALLBACK),e=r}try{var o=f.decodeRow(d,i,e);if(1===t){o.putMetadata(As.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new zs(n-a[0].getX()-1,a[0].getY()),a[1]=new zs(n-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(t){}},f=this,p=0;p<2;p++){var g=h(p);if("object"==typeof g)return g.value}}throw new os},t.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var i=t.getSize();if(e>=i)throw new os;for(var a=!t.get(e),s=0,u=e;u<i;){if(t.get(u)!==a)r[s]++;else{if(++s===n)break;r[s]=1,a=!a}u++}if(s!==n&&(s!==n-1||u!==i))throw new os},t.recordPatternInReverse=function(e,r,n){for(var o=n.length,i=e.get(r);r>0&&o>=0;)e.get(--r)!==i&&(o--,i=!i);if(o>=0)throw new os;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return Number.POSITIVE_INFINITY;u+=h}return u/o},t}(),tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),eu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tu(e,t),e.findStartPattern=function(t){for(var r=t.getSize(),n=t.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=n,s=!1,u=n;u<r;u++)if(t.get(u)!==s)i[o]++;else{if(5===o){for(var c=e.MAX_AVG_VARIANCE,l=-1,d=e.CODE_START_A;d<=e.CODE_START_C;d++){var h=Qs.patternMatchVariance(i,e.CODE_PATTERNS[d],e.MAX_INDIVIDUAL_VARIANCE);h<c&&(c=h,l=d)}if(l>=0&&t.isRange(Math.max(0,a-(u-a)/2),a,!1))return Int32Array.from([a,u,l]);a+=i[0]+i[1],(i=i.slice(2,i.length))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new os},e.decodeCode=function(t,r,n){Qs.recordPattern(t,n,r);for(var o=e.MAX_AVG_VARIANCE,i=-1,a=0;a<e.CODE_PATTERNS.length;a++){var s=e.CODE_PATTERNS[a],u=this.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,i=a)}if(i>=0)return i;throw new os},e.prototype.decodeRow=function(t,r,n){var o,i=n&&!0===n.get(Wa.ASSUME_GS1),a=e.findStartPattern(r),s=a[2],u=0,c=new Uint8Array(20);switch(c[u++]=s,s){case e.CODE_START_A:o=e.CODE_CODE_A;break;case e.CODE_START_B:o=e.CODE_CODE_B;break;case e.CODE_START_C:o=e.CODE_CODE_C;break;default:throw new Ya}for(var l=!1,d=!1,h="",f=a[0],p=a[1],g=Int32Array.from([0,0,0,0,0,0]),m=0,_=0,y=s,w=0,v=!0,E=!1,b=!1;!l;){var A=d;switch(d=!1,m=_,_=e.decodeCode(r,g,p),c[u++]=_,_!==e.CODE_STOP&&(v=!0),_!==e.CODE_STOP&&(y+=++w*_),f=p,p+=g.reduce((function(t,e){return t+e}),0),_){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new Ya}switch(o){case e.CODE_CODE_A:if(_<64)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+_):String.fromCharCode(" ".charCodeAt(0)+_+128),b=!1;else if(_<96)h+=b===E?String.fromCharCode(_-64):String.fromCharCode(_+64),b=!1;else switch(_!==e.CODE_STOP&&(v=!1),_){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_B;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_B:if(_<96)h+=b===E?String.fromCharCode(" ".charCodeAt(0)+_):String.fromCharCode(" ".charCodeAt(0)+_+128),b=!1;else switch(_!==e.CODE_STOP&&(v=!1),_){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!E&&b?(E=!0,b=!1):E&&b?(E=!1,b=!1):b=!0;break;case e.CODE_SHIFT:d=!0,o=e.CODE_CODE_A;break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_C:o=e.CODE_CODE_C;break;case e.CODE_STOP:l=!0}break;case e.CODE_CODE_C:if(_<100)_<10&&(h+="0"),h+=_;else switch(_!==e.CODE_STOP&&(v=!1),_){case e.CODE_FNC_1:i&&(0===h.length?h+="]C1":h+=String.fromCharCode(29));break;case e.CODE_CODE_A:o=e.CODE_CODE_A;break;case e.CODE_CODE_B:o=e.CODE_CODE_B;break;case e.CODE_STOP:l=!0}}A&&(o=o===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var C=p-f;if(p=r.getNextUnset(p),!r.isRange(p,Math.min(r.getSize(),p+(p-f)/2),!1))throw new os;if((y-=w*m)%103!==m)throw new Na;var x=h.length;if(0===x)throw new os;x>0&&v&&(h=o===e.CODE_CODE_C?h.substring(0,x-2):h.substring(0,x-1));for(var I=(a[1]+a[0])/2,S=f+C/2,T=c.length,D=new Uint8Array(T),O=0;O<T;O++)D[O]=c[O];var R=[new zs(I,t),new zs(S,t)];return new ws(h,D,0,R,Es.CODE_128,(new Date).getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(Qs),ru=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ou=function(t){function e(e,r){void 0===e&&(e=!1),void 0===r&&(r=!1);var n=t.call(this)||this;return n.usingCheckDigit=e,n.extendedMode=r,n.decodeRowResult="",n.counters=new Int32Array(9),n}return ru(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.counters;u.fill(0),this.decodeRowResult="";var c,l,d=e.findAsteriskPattern(r,u),h=r.getNextSet(d[1]),f=r.getSize();do{e.recordPattern(r,h,u);var p=e.toNarrowWidePattern(u);if(p<0)throw new os;c=e.patternToChar(p),this.decodeRowResult+=c,l=h;try{for(var g=(o=void 0,nu(u)),m=g.next();!m.done;m=g.next()){h+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}h=r.getNextSet(h)}while("*"!==c);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var _,y=0;try{for(var w=nu(u),v=w.next();!v.done;v=w.next()){y+=v.value}}catch(t){a={error:t}}finally{try{v&&!v.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}if(h!==f&&2*(h-l-y)<y)throw new os;if(this.usingCheckDigit){for(var E=this.decodeRowResult.length-1,b=0,A=0;A<E;A++)b+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(A));if(this.decodeRowResult.charAt(E)!==e.ALPHABET_STRING.charAt(b%43))throw new Na;this.decodeRowResult=this.decodeRowResult.substring(0,E)}if(0===this.decodeRowResult.length)throw new os;_=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var C=(d[1]+d[0])/2,x=l+y/2;return new ws(_,null,0,[new zs(C,t),new zs(x,t)],Es.CODE_39,(new Date).getTime())},e.findAsteriskPattern=function(t,r){for(var n=t.getSize(),o=t.getNextSet(0),i=0,a=o,s=!1,u=r.length,c=o;c<n;c++)if(t.get(c)!==s)r[i]++;else{if(i===u-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&t.isRange(Math.max(0,a-Math.floor((c-a)/2)),a,!1))return[a,c];a+=r[0]+r[1],r.copyWithin(0,2,2+i-1),r[i-1]=0,r[i]=0,i--}else i++;r[i]=1,s=!s}throw new os},e.toNarrowWidePattern=function(t){var e,r,n,o=t.length,i=0;do{var a=2147483647;try{for(var s=(e=void 0,nu(t)),u=s.next();!u.done;u=s.next()){(h=u.value)<a&&h>i&&(a=h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}i=a,n=0;for(var c=0,l=0,d=0;d<o;d++){(h=t[d])>i&&(l|=1<<o-1-d,n++,c+=h)}if(3===n){for(d=0;d<o&&n>0;d++){var h;if((h=t[d])>i&&(n--,2*h>=c))return-1}return l}}while(n>3);return-1},e.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);if(t===e.ASTERISK_ENCODING)return"*";throw new os},e.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if("+"===o||"$"===o||"%"===o||"/"===o){var i=t.charAt(n+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new Ya;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new Ya;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new Ya;a=""}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Ya;a=":"}}r+=a,n++}else r+=o}return r},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(Qs),iu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),au=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},su=function(t){function e(){var e=t.call(this)||this;return e.decodeRowResult="",e.counters=new Int32Array(6),e}return iu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u,c,l=this.findAsteriskPattern(r),d=r.getNextSet(l[1]),h=r.getSize(),f=this.counters;f.fill(0),this.decodeRowResult="";do{e.recordPattern(r,d,f);var p=this.toPattern(f);if(p<0)throw new os;u=this.patternToChar(p),this.decodeRowResult+=u,c=d;try{for(var g=(o=void 0,au(f)),m=g.next();!m.done;m=g.next()){d+=m.value}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}d=r.getNextSet(d)}while("*"!==u);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var _=0;try{for(var y=au(f),w=y.next();!w.done;w=y.next()){_+=w.value}}catch(t){a={error:t}}finally{try{w&&!w.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}if(d===h||!r.get(d))throw new os;if(this.decodeRowResult.length<2)throw new os;this.checkChecksums(this.decodeRowResult),this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-2);var v=this.decodeExtended(this.decodeRowResult),E=(l[1]+l[0])/2,b=c+_/2;return new ws(v,null,0,[new zs(E,t),new zs(b,t)],Es.CODE_93,(new Date).getTime())},e.prototype.findAsteriskPattern=function(t){var r=t.getSize(),n=t.getNextSet(0);this.counters.fill(0);for(var o=this.counters,i=n,a=!1,s=o.length,u=0,c=n;c<r;c++)if(t.get(c)!==a)o[u]++;else{if(u===s-1){if(this.toPattern(o)===e.ASTERISK_ENCODING)return new Int32Array([i,c]);i+=o[0]+o[1],o.copyWithin(0,2,2+u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,a=!a}throw new os},e.prototype.toPattern=function(t){var e,r,n=0;try{for(var o=au(t),i=o.next();!i.done;i=o.next()){n+=i.value}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}for(var a=0,s=t.length,u=0;u<s;u++){var c=Math.round(9*t[u]/n);if(c<1||c>4)return-1;if(1&u)a<<=c;else for(var l=0;l<c;l++)a=a<<1|1}return a},e.prototype.patternToChar=function(t){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===t)return e.ALPHABET_STRING.charAt(r);throw new os},e.prototype.decodeExtended=function(t){for(var e=t.length,r="",n=0;n<e;n++){var o=t.charAt(n);if(o>="a"&&o<="d"){if(n>=e-1)throw new Ya;var i=t.charAt(n+1),a="\0";switch(o){case"d":if(!(i>="A"&&i<="Z"))throw new Ya;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"a":if(!(i>="A"&&i<="Z"))throw new Ya;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"b":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if(!(i>="X"&&i<="Z"))throw new Ya;a=String.fromCharCode(127)}break;case"c":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Ya;a=":"}}r+=a,n++}else r+=o}return r},e.prototype.checkChecksums=function(t){var e=t.length;this.checkOneChecksum(t,e-2,20),this.checkOneChecksum(t,e-1,15)},e.prototype.checkOneChecksum=function(t,r,n){for(var o=1,i=0,a=r-1;a>=0;a--)i+=o*e.ALPHABET_STRING.indexOf(t.charAt(a)),++o>n&&(o=1);if(t.charAt(r)!==e.ALPHABET_STRING[i%47])throw new Na},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",e.CHARACTER_ENCODINGS=[276,328,324,322,296,292,290,336,274,266,424,420,418,404,402,394,360,356,354,308,282,344,332,326,300,278,436,434,428,422,406,410,364,358,310,314,302,468,466,458,366,374,430,294,474,470,306,350],e.ASTERISK_ENCODING=e.CHARACTER_ENCODINGS[47],e}(Qs),uu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),cu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return uu(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a=this.decodeStart(r),s=this.decodeEnd(r),u=new es;e.decodeMiddle(r,a[1],s[0],u);var c=u.toString(),l=null;null!=n&&(l=n.get(Wa.ALLOWED_LENGTHS)),null==l&&(l=e.DEFAULT_ALLOWED_LENGTHS);var d=c.length,h=!1,f=0;try{for(var p=cu(l),g=p.next();!g.done;g=p.next()){var m=g.value;if(d===m){h=!0;break}m>f&&(f=m)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(!h&&d>f&&(h=!0),!h)throw new Ya;var _=[new zs(a[1],t),new zs(s[0],t)];return new ws(c,null,0,_,Es.ITF,(new Date).getTime())},e.decodeMiddle=function(t,r,n,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);r<n;){Qs.recordPattern(t,r,i);for(var u=0;u<5;u++){var c=2*u;a[u]=i[c],s[u]=i[c+1]}var l=e.decodeDigit(a);o.append(l.toString()),l=this.decodeDigit(s),o.append(l.toString()),i.forEach((function(t){r+=t}))}},e.prototype.decodeStart=function(t){var r=e.skipWhiteSpace(t),n=e.findGuardPattern(t,r,e.START_PATTERN);return this.narrowLineWidth=(n[1]-n[0])/4,this.validateQuietZone(t,n[0]),n},e.prototype.validateQuietZone=function(t,e){var r=10*this.narrowLineWidth;r=r<e?r:e;for(var n=e-1;r>0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new os},e.skipWhiteSpace=function(t){var e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new os;return r},e.prototype.decodeEnd=function(t){t.reverse();try{var r=e.skipWhiteSpace(t),n=void 0;try{n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof os&&(n=e.findGuardPattern(t,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,n[0]);var o=n[0];return n[0]=t.getSize()-n[1],n[1]=t.getSize()-o,n}finally{t.reverse()}},e.findGuardPattern=function(t,r,n){var o=n.length,i=new Int32Array(o),a=t.getSize(),s=!1,u=0,c=r;i.fill(0);for(var l=r;l<a;l++)if(t.get(l)!==s)i[u]++;else{if(u===o-1){if(Qs.patternMatchVariance(i,n,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,l];c+=i[0]+i[1],Pa.arraycopy(i,2,i,0,u-1),i[u-1]=0,i[u]=0,u--}else u++;i[u]=1,s=!s}throw new os},e.decodeDigit=function(t){for(var r=e.MAX_AVG_VARIANCE,n=-1,o=e.PATTERNS.length,i=0;i<o;i++){var a=e.PATTERNS[i],s=Qs.patternMatchVariance(t,a,e.MAX_INDIVIDUAL_VARIANCE);s<r?(r=s,n=i):s===r&&(n=-1)}if(n>=0)return n%10;throw new os},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(Qs),du=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return du(e,t),e.findStartGuardPattern=function(t){for(var r,n=!1,o=0,i=Int32Array.from([0,0,0]);!n;){i=Int32Array.from([0,0,0]);var a=(r=e.findGuardPattern(t,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=r[1])-a);s>=0&&(n=t.isRange(s,a,!1))}return r},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ya;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ya;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))},e.findGuardPattern=function(t,r,n,o,i){for(var a=t.getSize(),s=0,u=r=n?t.getNextUnset(r):t.getNextSet(r),c=o.length,l=n,d=r;d<a;d++)if(t.get(d)!==l)i[s]++;else{if(s===c-1){if(Qs.patternMatchVariance(i,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,d]);u+=i[0]+i[1];for(var h=i.slice(2,i.length),f=0;f<s-1;f++)i[f]=h[f];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,l=!l}throw new os},e.decodeDigit=function(t,r,n,o){this.recordPattern(t,n,r);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,u=0;u<s;u++){var c=o[u],l=Qs.patternMatchVariance(r,c,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=u)}if(a>=0)return a;throw new os},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(Qs),fu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pu=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new zs((n[0]+n[1])/2,e),new zs(i,e)],c=new ws(a,null,0,u,Es.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),u=r[1],c=0,l=0;l<5&&u<s;l++){var d=hu.decodeDigit(e,a,u,hu.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,fu(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<4-l),4!==l&&(u=e.getNextSet(u),u=e.getNextUnset(u))}if(5!==n.length)throw new os;var p=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==p)throw new os;return u},t.extensionChecksum=function(t){for(var e=t.length,r=0,n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return(r*=3)%10},t.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new os},t.parseExtensionString=function(e){if(5!==e.length)return null;var r=t.parseExtension5String(e);return null==r?null:new Map([[As.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(t){var e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}var r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())},t}(),gu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mu=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(r,n,o),a=o.toString(),s=t.parseExtensionString(a),u=[new zs((n[0]+n[1])/2,e),new zs(i,e)],c=new ws(a,null,0,u,Es.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(t,e,r){var n,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=t.getSize(),s=e[1],u=0,c=0;c<2&&s<a;c++){var l=hu.decodeDigit(t,i,s,hu.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+l%10);try{for(var d=(n=void 0,gu(i)),h=d.next();!h.done;h=d.next()){s+=h.value}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}l>=10&&(u|=1<<1-c),1!==c&&(s=t.getNextSet(s),s=t.getNextUnset(s))}if(2!==r.length)throw new os;if(parseInt(r.toString())%4!==u)throw new os;return s},t.parseExtensionString=function(t){return 2!==t.length?null:new Map([[As.ISSUE_NUMBER,parseInt(t)]])},t}(),_u=function(){function t(){}return t.decodeRow=function(t,e,r){var n=hu.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new pu).decodeRow(t,e,n)}catch(r){return(new mu).decodeRow(t,e,n)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),yu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wu=function(t){function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map((function(t){return Int32Array.from(t)}));for(var n=10;n<20;n++){for(var o=e.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[n]=i}return r}return yu(e,t),e.prototype.decodeRow=function(t,r,n){var o=e.findStartGuardPattern(r),i=null==n?null:n.get(Wa.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new zs((o[0]+o[1])/2,t);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(r,o,this.decodeRowStringBuffer),u=s.rowOffset,c=s.resultString;if(null!=i){var l=new zs(u,t);i.foundPossibleResultPoint(l)}var d=e.decodeEnd(r,u);if(null!=i){var h=new zs((d[0]+d[1])/2,t);i.foundPossibleResultPoint(h)}var f=d[1],p=f+(f-d[0]);if(p>=r.getSize()||!r.isRange(f,p,!1))throw new os;var g=c.toString();if(g.length<8)throw new Ya;if(!e.checkChecksum(g))throw new Na;var m=(o[1]+o[0])/2,_=(d[1]+d[0])/2,y=this.getBarcodeFormat(),w=[new zs(m,t),new zs(_,t)],v=new ws(g,null,0,w,y,(new Date).getTime()),E=0;try{var b=_u.decodeRow(t,r,d[1]);v.putMetadata(As.UPC_EAN_EXTENSION,b.getText()),v.putAllMetadata(b.getResultMetadata()),v.addResultPoints(b.getResultPoints()),E=b.getText().length}catch(t){}var A=null==n?null:n.get(Wa.ALLOWED_EAN_EXTENSIONS);if(null!=A){var C=!1;for(var x in A)if(E.toString()===x){C=!0;break}if(!C)throw new os}return y===Es.EAN_13||Es.UPC_A,v},e.checkChecksum=function(t){return e.checkStandardUPCEANChecksum(t)},e.checkStandardUPCEANChecksum=function(t){var r=t.length;if(0===r)return!1;var n=parseInt(t.charAt(r-1),10);return e.getStandardUPCEANChecksum(t.substring(0,r-1))===n},e.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;n>=0;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ya;r+=o}r*=3;for(n=e-2;n>=0;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Ya;r+=o}return(1e3-r)%10},e.decodeEnd=function(t,r){return e.findGuardPattern(t,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(hu),vu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Eu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return vu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a,s,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=t.getSize(),l=r[1],d=0,h=0;h<6&&l<c;h++){var f=wu.decodeDigit(t,u,l,wu.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f%10);try{for(var p=(o=void 0,Eu(u)),g=p.next();!g.done;g=p.next()){l+=g.value}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}f>=10&&(d|=1<<5-h)}n=e.determineFirstDigit(n,d),l=wu.findGuardPattern(t,l,!0,wu.MIDDLE_PATTERN,new Int32Array(wu.MIDDLE_PATTERN.length).fill(0))[1];for(h=0;h<6&&l<c;h++){f=wu.decodeDigit(t,u,l,wu.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+f);try{for(var m=(a=void 0,Eu(u)),_=m.next();!_.done;_=m.next()){l+=_.value}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}}return{rowOffset:l,resultString:n}},e.prototype.getBarcodeFormat=function(){return Es.EAN_13},e.determineFirstDigit=function(t,e){for(var r=0;r<10;r++)if(e===this.FIRST_DIGIT_ENCODINGS[r])return t=String.fromCharCode("0".charCodeAt(0)+r)+t;throw new os},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(wu),Au=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xu=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return Au(e,t),e.prototype.decodeMiddle=function(t,e,r){var n,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=t.getSize(),c=e[1],l=0;l<4&&c<u;l++){var d=wu.decodeDigit(t,s,c,wu.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var h=(n=void 0,Cu(s)),f=h.next();!f.done;f=h.next()){c+=f.value}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}c=wu.findGuardPattern(t,c,!0,wu.MIDDLE_PATTERN,new Int32Array(wu.MIDDLE_PATTERN.length).fill(0))[1];for(l=0;l<4&&c<u;l++){d=wu.decodeDigit(t,s,c,wu.L_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var p=(i=void 0,Cu(s)),g=p.next();!g.done;g=p.next()){c+=g.value}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return{rowOffset:c,resultString:r}},e.prototype.getBarcodeFormat=function(){return Es.EAN_8},e}(wu),Iu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Su=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ean13Reader=new bu,e}return Iu(e,t),e.prototype.getBarcodeFormat=function(){return Es.UPC_A},e.prototype.decode=function(t,e){return this.maybeReturnResult(this.ean13Reader.decode(t))},e.prototype.decodeRow=function(t,e,r){return this.maybeReturnResult(this.ean13Reader.decodeRow(t,e,r))},e.prototype.decodeMiddle=function(t,e,r){return this.ean13Reader.decodeMiddle(t,e,r)},e.prototype.maybeReturnResult=function(t){var e=t.getText();if("0"===e.charAt(0)){var r=new ws(e.substring(1),null,null,t.getResultPoints(),Es.UPC_A);return null!=t.getResultMetadata()&&r.putAllMetadata(t.getResultMetadata()),r}throw new os},e.prototype.reset=function(){this.ean13Reader.reset()},e}(wu),Tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Du=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ou=function(t){function e(){var e=t.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return Tu(e,t),e.prototype.decodeMiddle=function(t,r,n){var o,i,a=this.decodeMiddleCounters.map((function(t){return t}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=r[1],c=0,l=0;l<6&&u<s;l++){var d=e.decodeDigit(t,a,u,e.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var h=(o=void 0,Du(a)),f=h.next();!f.done;f=h.next()){u+=f.value}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}d>=10&&(c|=1<<5-l)}return e.determineNumSysAndCheckDigit(new es(n),c),u},e.prototype.decodeEnd=function(t,r){return e.findGuardPatternWithoutCounters(t,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(t){return wu.checkChecksum(e.convertUPCEtoUPCA(t))},e.determineNumSysAndCheckDigit=function(t,e){for(var r=0;r<=1;r++)for(var n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw os.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return Es.UPC_E},e.convertUPCEtoUPCA=function(t){var e=t.slice(1,7).split("").map((function(t){return t.charCodeAt(0)})),r=new es;r.append(t.charAt(0));var n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(wu),Ru=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nu=function(t){function e(e){var r=t.call(this)||this,n=null==e?null:e.get(Wa.POSSIBLE_FORMATS),o=[];return null!=n&&(n.indexOf(Es.EAN_13)>-1&&o.push(new bu),n.indexOf(Es.UPC_A)>-1&&o.push(new Su),n.indexOf(Es.EAN_8)>-1&&o.push(new xu),n.indexOf(Es.UPC_E)>-1&&o.push(new Ou)),0===o.length&&(o.push(new bu),o.push(new Su),o.push(new xu),o.push(new Ou)),r.readers=o,r}return Ru(e,t),e.prototype.decodeRow=function(t,e,r){var n,o;try{for(var i=Mu(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var u=s.decodeRow(t,e,r),c=u.getBarcodeFormat()===Es.EAN_13&&"0"===u.getText().charAt(0),l=null==r?null:r.get(Wa.POSSIBLE_FORMATS),d=null==l||l.includes(Es.UPC_A);if(c&&d){var h=u.getRawBytes(),f=new ws(u.getText().substring(1),h,h?h.length:null,u.getResultPoints(),Es.UPC_A);return f.putAllMetadata(u.getResultMetadata()),f}return u}catch(t){}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new os},e.prototype.reset=function(){var t,e;try{for(var r=Mu(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e}(Qs),ku=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.CODA_BAR_CHAR_SET={nnnnnww:"0",nnnnwwn:"1",nnnwnnw:"2",wwnnnnn:"3",nnwnnwn:"4",wnnnnwn:"5",nwnnnnw:"6",nwnnwnn:"7",nwwnnnn:"8",wnnwnnn:"9",nnnwwnn:"-",nnwwnnn:"$",wnnnwnw:":",wnwnnnw:"/",wnwnwnn:".",nnwwwww:"+",nnwwnwn:"A",nwnwnnw:"B",nnnwnww:"C",nnnwwwn:"D"},e}return ku(e,t),e.prototype.decodeRow=function(t,e,r){var n=this.getValidRowData(e);if(!n)throw new os;var o=this.codaBarDecodeRow(n.row);if(!o)throw new os;return new ws(o,null,0,[new zs(n.left,t),new zs(n.right,t)],Es.CODABAR,(new Date).getTime())},e.prototype.getValidRowData=function(t){var e=t.toArray(),r=e.indexOf(!0);if(-1===r)return null;var n=e.lastIndexOf(!0);if(n<=r)return null;for(var o=[],i=(e=e.slice(r,n+1))[0],a=1,s=1;s<e.length;s++)e[s]===i?a++:(i=e[s],o.push(a),a=1);return o.push(a),o.length<23&&(o.length+1)%8!=0?null:{row:o,left:r,right:n}},e.prototype.codaBarDecodeRow=function(t){for(var e=[],r=Math.ceil(t.reduce((function(t,e){return(t+e)/2}),0));t.length>0;){var n=t.splice(0,8).splice(0,7).map((function(t){return t<r?"n":"w"})).join("");if(void 0===this.CODA_BAR_CHAR_SET[n])return null;e.push(this.CODA_BAR_CHAR_SET[n])}var o=e.join("");return this.validCodaBarString(o)?o:null},e.prototype.validCodaBarString=function(t){return/^[A-D].{1,}[A-D]$/.test(t)},e}(Qs),Bu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Lu=function(t){function e(){var e=t.call(this)||this;return e.decodeFinderCounters=new Int32Array(4),e.dataCharacterCounters=new Int32Array(8),e.oddRoundingErrors=new Array(4),e.evenRoundingErrors=new Array(4),e.oddCounts=new Array(e.dataCharacterCounters.length/2),e.evenCounts=new Array(e.dataCharacterCounters.length/2),e}return Bu(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(t,r){for(var n=0;n<r.length;n++)if(Qs.patternMatchVariance(t,r[n],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return n;throw new os},e.count=function(t){return Fs.sum(new Int32Array(t))},e.increment=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]>n&&(n=e[o],r=o);t[r]++},e.decrement=function(t,e){for(var r=0,n=e[0],o=1;o<t.length;o++)e[o]<n&&(n=e[o],r=o);t[r]--},e.isFinderPattern=function(t){var r,n,o=t[0]+t[1],i=o/(o+t[2]+t[3]);if(i>=e.MIN_FINDER_PATTERN_RATIO&&i<=e.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var u=Fu(t),c=u.next();!c.done;c=u.next()){var l=c.value;l>s&&(s=l),l<a&&(a=l)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return s<10*a}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(Qs),zu=function(){function t(t,e){this.value=t,this.checksumPortion=e}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),Uu=function(){function t(t,e,r,n,o){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new zs(r,o)),this.resultPoints.push(new zs(n,o))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),Vu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hu=function(){function t(){}return t.getRSSvalue=function(e,r,n){var o,i,a=0;try{for(var s=Vu(e),u=s.next();!u.done;u=s.next()){a+=u.value}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var c=0,l=0,d=e.length,h=0;h<d-1;h++){var f=void 0;for(f=1,l|=1<<h;f<e[h];f++,l&=~(1<<h)){var p=t.combins(a-f-1,d-h-2);if(n&&0===l&&a-f-(d-h-1)>=d-h-1&&(p-=t.combins(a-f-(d-h),d-h-2)),d-h-1>1){for(var g=0,m=a-f-(d-h-2);m>r;m--)g+=t.combins(a-f-m-1,d-h-3);p-=g*(d-1-h)}else a-f>r&&p--;c+=p}a-=f}return c},t.combins=function(t,e){var r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);for(var o=1,i=1,a=t;a>r;a--)o*=a,i<=n&&(o/=i,i++);for(;i<=n;)o/=i,i++;return o},t}(),ju=function(){function t(){}return t.buildBitArray=function(t){var e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);for(var r=new ja(12*e),n=0,o=t[0].getRightChar().getValue(),i=11;i>=0;--i)o&1<<i&&r.set(n),n++;for(i=1;i<t.length;++i){for(var a=t[i],s=a.getLeftChar().getValue(),u=11;u>=0;--u)s&1<<u&&r.set(n),n++;if(null!==a.getRightChar()){var c=a.getRightChar().getValue();for(u=11;u>=0;--u)c&1<<u&&r.set(n),n++}}return r},t}(),Gu=function(){function t(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Wu=function(){function t(t){this.newPosition=t}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),Xu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Yu=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return Xu(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Wu),Zu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qu=function(t){function e(e,r,n){var o=t.call(this,e)||this;return n?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=r,o}return Zu(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Wu),Ku=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),$u=function(t){function e(e,r,n){var o=t.call(this,e)||this;if(r<0||r>10||n<0||n>10)throw new Ya;return o.firstDigit=r,o.secondDigit=n,o}return Ku(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Wu),Ju=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qu=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,o,i,a,s,u,c;if(!e)return null;if(e.length<2)throw new os;var l=e.substring(0,2);try{for(var d=Ju(t.TWO_DIGIT_DATA_LENGTH),h=d.next();!h.done;h=d.next()){if((E=h.value)[0]===l)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,E[2],e):t.processFixedAI(2,E[1],e)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new os;var f=e.substring(0,3);try{for(var p=Ju(t.THREE_DIGIT_DATA_LENGTH),g=p.next();!g.done;g=p.next()){if((E=g.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,E[2],e):t.processFixedAI(3,E[1],e)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}try{for(var m=Ju(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),_=m.next();!_.done;_=m.next()){if((E=_.value)[0]===f)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new os;var y=e.substring(0,4);try{for(var w=Ju(t.FOUR_DIGIT_DATA_LENGTH),v=w.next();!v.done;v=w.next()){var E;if((E=v.value)[0]===y)return E[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,E[2],e):t.processFixedAI(4,E[1],e)}}catch(t){u={error:t}}finally{try{v&&!v.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}throw new os},t.processFixedAI=function(e,r,n){if(n.length<e)throw new os;var o=n.substring(0,e);if(n.length<e+r)throw new os;var i=n.substring(e,e+r),a=n.substring(e+r),s="("+o+")"+i,u=t.parseFieldsInGeneralPurpose(a);return null==u?s:s+u},t.processVariableAI=function(e,r,n){var o,i=n.substring(0,e);o=n.length<e+r?n.length:e+r;var a=n.substring(e,o),s=n.substring(o),u="("+i+")"+a,c=t.parseFieldsInGeneralPurpose(s);return null==c?u:u+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),tc=function(){function t(t){this.buffer=new es,this.information=t}return t.prototype.decodeAllCodes=function(t,e){for(var r=e,n=null;;){var o=this.decodeGeneralPurposeField(r,n),i=Qu.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&t.append(i),n=o.isRemaining()?""+o.getRemainingValue():null,r===o.getNewPosition())break;r=o.getNewPosition()}return t.toString()},t.prototype.isStillNumeric=function(t){if(t+7>this.information.getSize())return t+4<=this.information.getSize();for(var e=t;e<t+3;++e)if(this.information.get(e))return!0;return this.information.get(t+3)},t.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new $u(this.information.getSize(),0===e?$u.FNC1:e-1,$u.FNC1)}var r=this.extractNumericValueFromBitArray(t,7);return new $u(t+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;o<r;++o)t.get(e+o)&&(n|=1<<r-o-1);return n},t.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),null!=e&&this.buffer.append(e),this.current.setPosition(t);var r=this.parseBlocks();return null!=r&&r.isRemaining()?new qu(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new qu(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var t,e;do{var r=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),!(r!==this.current.getPosition())&&!t)break}while(!t);return e.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var t=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFirstDigitFNC1()){var e=void 0;return e=t.isSecondDigitFNC1()?new qu(this.current.getPosition(),this.buffer.toString()):new qu(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new Gu(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1()){e=new qu(this.current.getPosition(),this.buffer.toString());return new Gu(!0,e)}this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new Gu(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var t=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new qu(this.current.getPosition(),this.buffer.toString());return new Gu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new Gu(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var t=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(t.getNewPosition()),t.isFNC1()){var e=new qu(this.current.getPosition(),this.buffer.toString());return new Gu(!0,e)}this.buffer.append(t.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new Gu(!1)},t.prototype.isStillIsoIec646=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253},t.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Yu(t+5,Yu.FNC1);if(e>=5&&e<15)return new Yu(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Yu(t+7,""+(n+1));if(n>=90&&n<116)return new Yu(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new Ya}return new Yu(t+8,r)},t.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Yu(t+5,Yu.FNC1);if(e>=5&&e<15)return new Yu(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Yu(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new ks("Decoding invalid alphanumeric value: "+n)}return new Yu(t+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+t<this.information.getSize();++e)if(2===e){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(t){if(t+3>this.information.getSize())return!1;for(var e=t;e<t+3;++e)if(this.information.get(e))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<4&&e+t<this.information.getSize();++e)if(this.information.get(t+e))return!1;return!0},t}(),ec=function(){function t(t){this.information=t,this.generalDecoder=new tc(t)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),rc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nc=function(t){function e(e){return t.call(this,e)||this}return rc(e,t),e.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},e.prototype.encodeCompressedGtinWithoutAI=function(t,r,n){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*o,10);i/100==0&&t.append("0"),i/10==0&&t.append("0"),t.append(i)}e.appendCheckDigit(t,n)},e.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=1&n?o:3*o}10===(r=10-r%10)&&(r=0),t.append(r)},e.GTIN_SIZE=40,e}(ec),oc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ic=function(t){function e(e){return t.call(this,e)||this}return oc(e,t),e.prototype.parseInformation=function(){var t=new es;t.append("(01)");var r=t.length(),n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return t.append(n),this.encodeCompressedGtinWithoutAI(t,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(nc),ac=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),sc=function(t){function e(e){return t.call(this,e)||this}return ac(e,t),e.prototype.parseInformation=function(){var t=new es;return this.getGeneralDecoder().decodeAllCodes(t,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(ec),uc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),cc=function(t){function e(e){return t.call(this,e)||this}return uc(e,t),e.prototype.encodeCompressedWeight=function(t,e,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e,r);this.addWeightCode(t,n);for(var o=this.checkWeight(n),i=1e5,a=0;a<5;++a)o/i==0&&t.append("0"),i/=10;t.append(o)},e}(nc),lc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),dc=function(t){function e(e){return t.call(this,e)||this}return lc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+cc.GTIN_SIZE+e.WEIGHT_SIZE)throw new os;var t=new es;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+cc.GTIN_SIZE,e.WEIGHT_SIZE),t.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(cc),hc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fc=function(t){function e(e){return t.call(this,e)||this}return hc(e,t),e.prototype.addWeightCode=function(t,e){t.append("(3103)")},e.prototype.checkWeight=function(t){return t},e}(dc),pc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gc=function(t){function e(e){return t.call(this,e)||this}return pc(e,t),e.prototype.addWeightCode=function(t,e){e<1e4?t.append("(3202)"):t.append("(3203)")},e.prototype.checkWeight=function(t){return t<1e4?t:t-1e4},e}(dc),mc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_c=function(t){function e(e){return t.call(this,e)||this}return mc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+nc.GTIN_SIZE)throw new os;var t=new es;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+nc.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(392"),t.append(r),t.append(")");var n=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+nc.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return t.append(n.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(nc),yc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wc=function(t){function e(e){return t.call(this,e)||this}return yc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+nc.GTIN_SIZE)throw new os;var t=new es;this.encodeCompressedGtin(t,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+nc.GTIN_SIZE,e.LAST_DIGIT_SIZE);t.append("(393"),t.append(r),t.append(")");var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+nc.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);n/100==0&&t.append("0"),n/10==0&&t.append("0"),t.append(n);var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+nc.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return t.append(o.getNewString()),t.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(nc),vc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ec=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.dateCode=n,o.firstAIdigits=r,o}return vc(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!==e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new os;var t=new es;return this.encodeCompressedGtin(t,e.HEADER_SIZE),this.encodeCompressedWeight(t,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(t,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),t.toString()},e.prototype.encodeCompressedDate=function(t,r){var n=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(38400!==n){t.append("("),t.append(this.dateCode),t.append(")");var o=n%32,i=(n/=32)%12+1,a=n/=12;a/10==0&&t.append("0"),t.append(a),i/10==0&&t.append("0"),t.append(i),o/10==0&&t.append("0"),t.append(o)}},e.prototype.addWeightCode=function(t,e){t.append("("),t.append(this.firstAIdigits),t.append(e/1e5),t.append(")")},e.prototype.checkWeight=function(t){return t%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(cc);var bc=function(){function t(t,e,r,n){this.leftchar=t,this.rightchar=e,this.finderpattern=r,this.maybeLast=n}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return null==this.rightchar},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t&&(t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern))},t.equalsOrNull=function(e,r){return null===e?null===r:t.equals(e,r)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),Ac=function(){function t(t,e,r){this.pairs=t,this.rowNumber=e,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t&&(this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed)},t.prototype.checkEqualitity=function(t,e){var r;if(t&&e)return t.forEach((function(t,n){e.forEach((function(e){t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r},t}(),Cc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ic=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return Cc(e,t),e.prototype.decodeRow=function(t,r,n){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(t,r))}catch(t){}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(t,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof os){if(!this.pairs.length)throw new os;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new os},e.prototype.checkRowsBoolean=function(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());var e=null;try{e=this.checkRows(new Array,0)}catch(t){console.log(t)}return t&&(this.rows=this.rows.reverse()),e},e.prototype.checkRows=function(t,r){for(var n,o,i=r;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(n=void 0,xc(t)),u=s.next();!u.done;u=s.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}if(this.pairs.push(a.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(t);l.push(a);try{return this.checkRows(l,i+1)}catch(t){console.log(t)}}}throw new os},e.isValidSequence=function(t){var r,n;try{for(var o=xc(e.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(t.length>a.length)){for(var s=!0,u=0;u<t.length;u++)if(t[u].getFinderPattern().getValue()!==a[u]){s=!1;break}if(s)return!0}}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(t,r){for(var n=0,o=!1,i=!1;n<this.rows.length;){var a=this.rows[n];if(a.getRowNumber()>t){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),n++}i||o||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(n,new Ac(this.pairs,t,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(t,e){var r,n,o,i,a,s;try{for(var u=xc(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.getPairs().length!==t.length){try{for(var d=(o=void 0,xc(l.getPairs())),h=d.next();!h.done;h=d.next()){var f=h.value,p=!1;try{for(var g=(a=void 0,xc(t)),m=g.next();!m.done;m=g.next()){var _=m.value;if(bc.equals(f,_)){p=!0;break}}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}p||!1}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}},e.isPartialRow=function(t,e){var r,n,o,i,a,s;try{for(var u=xc(e),c=u.next();!c.done;c=u.next()){var l=c.value,d=!0;try{for(var h=(o=void 0,xc(t)),f=h.next();!f.done;f=h.next()){var p=f.value,g=!1;try{for(var m=(a=void 0,xc(l.getPairs())),_=m.next();!_.done;_=m.next()){var y=_.value;if(p.equals(y)){g=!0;break}}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(!g){d=!1;break}}}catch(t){o={error:t}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(d)return!0}}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(t){var e=function(t){try{if(t.get(1))return new ic(t);if(!t.get(2))return new sc(t);switch(tc.extractNumericValueFromBitArray(t,1,4)){case 4:return new fc(t);case 5:return new gc(t)}switch(tc.extractNumericValueFromBitArray(t,1,5)){case 12:return new _c(t);case 13:return new wc(t)}switch(tc.extractNumericValueFromBitArray(t,1,7)){case 56:return new Ec(t,"310","11");case 57:return new Ec(t,"320","11");case 58:return new Ec(t,"310","13");case 59:return new Ec(t,"320","13");case 60:return new Ec(t,"310","15");case 61:return new Ec(t,"320","15");case 62:return new Ec(t,"310","17");case 63:return new Ec(t,"320","17")}}catch(e){throw console.log(e),new ks("unknown decoder: "+t)}}(ju.buildBitArray(t)).parseInformation(),r=t[0].getFinderPattern().getResultPoints(),n=t[t.length-1].getFinderPattern().getResultPoints(),o=[r[0],r[1],n[0],n[1]];return new ws(e,null,null,o,Es.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null===r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);n+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(n+=s.getChecksumPortion(),o++)}return 211*(o-4)+(n%=211)===e.getValue()},e.getNextSecondBar=function(t,e){var r;return t.get(e)?(r=t.getNextUnset(e),r=t.getNextSet(r)):(r=t.getNextSet(e),r=t.getNextUnset(r)),r},e.prototype.retrieveNextPair=function(t,r,n){var o,i=r.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(t,r,s),null===(o=this.parseFoundFinderPattern(t,n,i))?s=e.getNextSecondBar(t,this.startEnd[0]):a=!1}while(a);var u,c=this.decodeDataCharacter(t,o,i,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new os;try{u=this.decodeDataCharacter(t,o,i,!1)}catch(t){u=null,console.log(t)}return new bc(c,u,o,!0)},e.prototype.isEmptyPair=function(t){return 0===t.length},e.prototype.findNextPair=function(t,r,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=t.getSize();if(n>=0)i=n;else if(this.isEmptyPair(r))i=0;else{i=r[r.length-1].getFinderPattern().getStartEnd()[1]}var s=r.length%2!=0;this.startFromEven&&(s=!s);for(var u=!1;i<a&&(u=!t.get(i));)i++;for(var c=0,l=i,d=i;d<a;d++)if(t.get(d)!==u)o[c]++;else{if(3===c){if(s&&e.reverseCounters(o),e.isFinderPattern(o))return this.startEnd[0]=l,void(this.startEnd[1]=d);s&&e.reverseCounters(o),l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,c--}else c++;o[c]=1,u=!u}throw new os},e.reverseCounters=function(t){for(var e=t.length,r=0;r<e/2;++r){var n=t[r];t[r]=t[e-r-1],t[e-r-1]=n}},e.prototype.parseFoundFinderPattern=function(t,r,n){var o,i,a;if(n){for(var s=this.startEnd[0]-1;s>=0&&!t.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=t.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,c=this.getDecodeFinderCounters();Pa.arraycopy(c,0,c,1,c.length-1),c[0]=o;try{u=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch(t){return null}return new Uu(u,[i,a],i,a,r)},e.prototype.decodeDataCharacter=function(t,r,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)e.recordPatternInReverse(t,r.getStartEnd()[0],i);else{e.recordPattern(t,r.getStartEnd()[1],i);for(var s=0,u=i.length-1;s<u;s++,u--){var c=i[s];i[s]=i[u],i[u]=c}}var l=Fs.sum(new Int32Array(i))/17,d=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(l-d)/d>.3)throw new os;var h=this.getOddCounts(),f=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=1*i[s]/l,_=m+.5;if(_<1){if(m<.3)throw new os;_=1}else if(_>8){if(m>8.7)throw new os;_=8}var y=s/2;1&s?(f[y]=_,g[y]=m-_):(h[y]=_,p[y]=m-_)}this.adjustOddEvenCounts(17);var w=4*r.getValue()+(n?0:2)+(o?0:1)-1,v=0,E=0;for(s=h.length-1;s>=0;s--){if(e.isNotA1left(r,n,o)){var b=e.WEIGHTS[w][2*s];E+=h[s]*b}v+=h[s]}var A=0;for(s=f.length-1;s>=0;s--)if(e.isNotA1left(r,n,o)){b=e.WEIGHTS[w][2*s+1];A+=f[s]*b}var C=E+A;if(1&v||v>13||v<4)throw new os;var x=(13-v)/2,I=e.SYMBOL_WIDEST[x],S=9-I,T=Hu.getRSSvalue(h,I,!0),D=Hu.getRSSvalue(f,S,!1),O=e.EVEN_TOTAL_SUBSET[x],R=e.GSUM[x];return new zu(T*O+D+R,C)},e.isNotA1left=function(t,e,r){return!(0===t.getValue()&&e&&r)},e.prototype.adjustOddEvenCounts=function(t){var r=Fs.sum(new Int32Array(this.getOddCounts())),n=Fs.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;r>13?i=!0:r<4&&(o=!0);var a=!1,s=!1;n>13?s=!0:n<4&&(a=!0);var u=r+n-t,c=!(1&~r),l=!(1&n);if(1===u)if(c){if(l)throw new os;i=!0}else{if(!l)throw new os;s=!0}else if(-1===u)if(c){if(l)throw new os;o=!0}else{if(!l)throw new os;a=!0}else{if(0!==u)throw new os;if(c){if(!l)throw new os;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new os}if(o){if(i)throw new os;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new os;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(Lu),Sc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tc=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.count=0,o.finderPattern=n,o}return Sc(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(zu),Dc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Oc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return Dc(e,t),e.prototype.decodeRow=function(t,r,n){var o,i,a,s,u=this.decodePair(r,!1,t,n);e.addOrTally(this.possibleLeftPairs,u),r.reverse();var c=this.decodePair(r,!0,t,n);e.addOrTally(this.possibleRightPairs,c),r.reverse();try{for(var l=Oc(this.possibleLeftPairs),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.getCount()>1)try{for(var f=(a=void 0,Oc(this.possibleRightPairs)),p=f.next();!p.done;p=f.next()){var g=p.value;if(g.getCount()>1&&e.checkChecksum(h,g))return e.constructResult(h,g)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}throw new os},e.addOrTally=function(t,e){var r,n;if(null!=e){var o=!1;try{for(var i=Oc(t),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===e.getValue()){s.incrementCount(),o=!0;break}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}o||t.push(e)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(t,e){for(var r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),o=new es,i=13-n.length;i>0;i--)o.append("0");o.append(n);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=1&i?s:3*s}10===(a=10-a%10)&&(a=0),o.append(a.toString());var u=t.getFinderPattern().getResultPoints(),c=e.getFinderPattern().getResultPoints();return new ws(o.toString(),null,0,[u[0],u[1],c[0],c[1]],Es.RSS_14,(new Date).getTime())},e.checkChecksum=function(t,e){var r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n},e.prototype.decodePair=function(t,e,r,n){try{var o=this.findFinderPattern(t,e),i=this.parseFoundFinderPattern(t,r,e,o),a=null==n?null:n.get(Wa.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;e&&(s=t.getSize()-1-s),a.foundPossibleResultPoint(new zs(s,r))}var u=this.decodeDataCharacter(t,i,!0),c=this.decodeDataCharacter(t,i,!1);return new Tc(1597*u.getValue()+c.getValue(),u.getChecksumPortion()+4*c.getChecksumPortion(),i)}catch(t){return null}},e.prototype.decodeDataCharacter=function(t,r,n){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(n)Qs.recordPatternInReverse(t,r.getStartEnd()[0],o);else{Qs.recordPattern(t,r.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var u=o[a];o[a]=o[s],o[s]=u}}var c=n?16:15,l=Fs.sum(new Int32Array(o))/c,d=this.getOddCounts(),h=this.getEvenCounts(),f=this.getOddRoundingErrors(),p=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var g=o[a]/l,m=Math.floor(g+.5);m<1?m=1:m>8&&(m=8);var _=Math.floor(a/2);1&a?(h[_]=m,p[_]=g-m):(d[_]=m,f[_]=g-m)}this.adjustOddEvenCounts(n,c);var y=0,w=0;for(a=d.length-1;a>=0;a--)w*=9,w+=d[a],y+=d[a];var v=0,E=0;for(a=h.length-1;a>=0;a--)v*=9,v+=h[a],E+=h[a];var b=w+3*v;if(n){if(1&y||y>12||y<4)throw new os;var A=(12-y)/2,C=9-(D=e.OUTSIDE_ODD_WIDEST[A]),x=Hu.getRSSvalue(d,D,!1),I=Hu.getRSSvalue(h,C,!0),S=e.OUTSIDE_EVEN_TOTAL_SUBSET[A],T=e.OUTSIDE_GSUM[A];return new zu(x*S+I+T,b)}if(1&E||E>10||E<4)throw new os;A=(10-E)/2,C=9-(D=e.INSIDE_ODD_WIDEST[A]),x=Hu.getRSSvalue(d,D,!0),I=Hu.getRSSvalue(h,C,!1);var D,O=e.INSIDE_ODD_TOTAL_SUBSET[A];T=e.INSIDE_GSUM[A];return new zu(I*O+x+T,b)},e.prototype.findFinderPattern=function(t,e){var r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;for(var n=t.getSize(),o=!1,i=0;i<n&&e!==(o=!t.get(i));)i++;for(var a=0,s=i,u=i;u<n;u++)if(t.get(u)!==o)r[a]++;else{if(3===a){if(Lu.isFinderPattern(r))return[s,u];s+=r[0]+r[1],r[0]=r[2],r[1]=r[3],r[2]=0,r[3]=0,a--}else a++;r[a]=1,o=!o}throw new os},e.prototype.parseFoundFinderPattern=function(t,r,n,o){for(var i=t.get(o[0]),a=o[0]-1;a>=0&&i!==t.get(a);)a--;a++;var s=o[0]-a,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);Pa.arraycopy(u,0,c,1,u.length-1),c[0]=s;var l=this.parseFinderValue(c,e.FINDER_PATTERNS),d=a,h=o[1];return n&&(d=t.getSize()-1-d,h=t.getSize()-1-h),new Uu(l,[a,o[1]],d,h,r)},e.prototype.adjustOddEvenCounts=function(t,e){var r=Fs.sum(new Int32Array(this.getOddCounts())),n=Fs.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;t?(r>12?i=!0:r<4&&(o=!0),n>12?s=!0:n<4&&(a=!0)):(r>11?i=!0:r<5&&(o=!0),n>10?s=!0:n<4&&(a=!0));var u=r+n-e,c=(1&r)==(t?1:0),l=!(1&~n);if(1===u)if(c){if(l)throw new os;i=!0}else{if(!l)throw new os;s=!0}else if(-1===u)if(c){if(l)throw new os;o=!0}else{if(!l)throw new os;a=!0}else{if(0!==u)throw new os;if(c){if(!l)throw new os;r<n?(o=!0,s=!0):(i=!0,a=!0)}else if(l)throw new os}if(o){if(i)throw new os;Lu.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&Lu.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new os;Lu.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&Lu.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(Lu),Mc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nc=function(t){function e(e){var r=t.call(this)||this;r.readers=[];var n=e?e.get(Wa.POSSIBLE_FORMATS):null,o=e&&void 0!==e.get(Wa.ASSUME_CODE_39_CHECK_DIGIT),i=e&&void 0!==e.get(Wa.ENABLE_CODE_39_EXTENDED_MODE);return n&&((n.includes(Es.EAN_13)||n.includes(Es.UPC_A)||n.includes(Es.EAN_8)||n.includes(Es.UPC_E))&&r.readers.push(new Nu(e)),n.includes(Es.CODE_39)&&r.readers.push(new ou(o,i)),n.includes(Es.CODE_93)&&r.readers.push(new su),n.includes(Es.CODE_128)&&r.readers.push(new eu),n.includes(Es.ITF)&&r.readers.push(new lu),n.includes(Es.CODABAR)&&r.readers.push(new Pu),n.includes(Es.RSS_14)&&r.readers.push(new Rc),n.includes(Es.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new Ic))),0===r.readers.length&&(r.readers.push(new Nu(e)),r.readers.push(new ou),r.readers.push(new su),r.readers.push(new Nu(e)),r.readers.push(new eu),r.readers.push(new lu),r.readers.push(new Rc)),r}return Mc(e,t),e.prototype.decodeRow=function(t,e,r){for(var n=0;n<this.readers.length;n++)try{return this.readers[n].decodeRow(t,e,r)}catch(t){}throw new os},e.prototype.reset=function(){this.readers.forEach((function(t){return t.reset()}))},e}(Qs),kc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return void 0===e&&(e=500),t.call(this,new Nc(r),e,r)||this}kc(e,t)}(ys);var Pc,Bc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fc=function(){function t(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Lc=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),zc=function(){function t(t,e,r,n,o,i){var a,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=o,this.ecBlocks=i;var u=0,c=i.getECCodewords(),l=i.getECBlocks();try{for(var d=Bc(l),h=d.next();!h.done;h=d.next()){var f=h.value;u+=f.getCount()*(f.getDataCodewords()+c)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,o;if(1&e||1&r)throw new Ya;try{for(var i=Bc(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new Ya},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Fc(5,new Lc(1,3))),new t(2,12,12,10,10,new Fc(7,new Lc(1,5))),new t(3,14,14,12,12,new Fc(10,new Lc(1,8))),new t(4,16,16,14,14,new Fc(12,new Lc(1,12))),new t(5,18,18,16,16,new Fc(14,new Lc(1,18))),new t(6,20,20,18,18,new Fc(18,new Lc(1,22))),new t(7,22,22,20,20,new Fc(20,new Lc(1,30))),new t(8,24,24,22,22,new Fc(24,new Lc(1,36))),new t(9,26,26,24,24,new Fc(28,new Lc(1,44))),new t(10,32,32,14,14,new Fc(36,new Lc(1,62))),new t(11,36,36,16,16,new Fc(42,new Lc(1,86))),new t(12,40,40,18,18,new Fc(48,new Lc(1,114))),new t(13,44,44,20,20,new Fc(56,new Lc(1,144))),new t(14,48,48,22,22,new Fc(68,new Lc(1,174))),new t(15,52,52,24,24,new Fc(42,new Lc(2,102))),new t(16,64,64,14,14,new Fc(56,new Lc(2,140))),new t(17,72,72,16,16,new Fc(36,new Lc(4,92))),new t(18,80,80,18,18,new Fc(48,new Lc(4,114))),new t(19,88,88,20,20,new Fc(56,new Lc(4,144))),new t(20,96,96,22,22,new Fc(68,new Lc(4,174))),new t(21,104,104,24,24,new Fc(56,new Lc(6,136))),new t(22,120,120,18,18,new Fc(68,new Lc(6,175))),new t(23,132,132,20,20,new Fc(62,new Lc(8,163))),new t(24,144,144,22,22,new Fc(62,new Lc(8,156),new Lc(2,155))),new t(25,8,18,6,16,new Fc(7,new Lc(1,5))),new t(26,8,32,6,14,new Fc(11,new Lc(1,10))),new t(27,12,26,10,24,new Fc(14,new Lc(1,16))),new t(28,12,36,10,16,new Fc(18,new Lc(1,22))),new t(29,16,36,14,16,new Fc(24,new Lc(1,32))),new t(30,16,48,14,22,new Fc(28,new Lc(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),Uc=function(){function t(e){var r=e.getHeight();if(r<8||r>144||1&r)throw new Ya;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new rs(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(t){var e=t.getHeight(),r=t.getWidth();return zc.getVersionForDimensions(e,r)},t.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,r=4,n=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,u=!1,c=!1;do{if(r!==o||0!==n||a)if(r===o-2&&0===n&&3&i&&!s)t[e++]=255&this.readCorner2(o,i),r-=2,n+=2,s=!0;else if(r!==o+4||2!==n||7&i||u)if(r!==o-2||0!==n||4!=(7&i)||c){do{r<o&&n>=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r-=2,n+=2}while(r>=0&&n<i);r+=1,n+=3;do{r>=0&&n<i&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,o,i)),r+=2,n-=2}while(r<o&&n>=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(o,i),r-=2,n+=2,c=!0;else t[e++]=255&this.readCorner3(o,i),r-=2,n+=2,u=!0;else t[e++]=255&this.readCorner1(o,i),r-=2,n+=2,a=!0}while(r<o||n<i);if(e!==this.version.getTotalCodewords())throw new Ya;return t},t.prototype.readModule=function(t,e,r,n){return t<0&&(t+=r,e+=4-(r+4&7)),e<0&&(e+=n,t+=4-(n+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},t.prototype.readUtah=function(t,e,r,n){var o=0;return this.readModule(t-2,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-2,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t-1,e,r,n)&&(o|=1),o<<=1,this.readModule(t,e-2,r,n)&&(o|=1),o<<=1,this.readModule(t,e-1,r,n)&&(o|=1),o<<=1,this.readModule(t,e,r,n)&&(o|=1),o},t.prototype.readCorner1=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,1,t,e)&&(r|=1),r<<=1,this.readModule(t-1,2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.readCorner2=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-4,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner3=function(t,e){var r=0;return this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(0,e-3,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-3,t,e)&&(r|=1),r<<=1,this.readModule(1,e-2,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r},t.prototype.readCorner4=function(t,e){var r=0;return this.readModule(t-3,0,t,e)&&(r|=1),r<<=1,this.readModule(t-2,0,t,e)&&(r|=1),r<<=1,this.readModule(t-1,0,t,e)&&(r|=1),r<<=1,this.readModule(0,e-2,t,e)&&(r|=1),r<<=1,this.readModule(0,e-1,t,e)&&(r|=1),r<<=1,this.readModule(1,e-1,t,e)&&(r|=1),r<<=1,this.readModule(2,e-1,t,e)&&(r|=1),r<<=1,this.readModule(3,e-1,t,e)&&(r|=1),r},t.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new Oa("Dimension of bitMatrix must match the version size");for(var n=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=e/n|0,a=r/o|0,s=new rs(a*o,i*n),u=0;u<i;++u)for(var c=u*n,l=0;l<a;++l)for(var d=l*o,h=0;h<n;++h)for(var f=u*(n+2)+1+h,p=c+h,g=0;g<o;++g){var m=l*(o+2)+1+g;if(t.get(m,f)){var _=d+g;s.set(_,p)}}return s},t}(),Vc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hc=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r){var n,o,i,a,s=r.getECBlocks(),u=0,c=s.getECBlocks();try{for(var l=Vc(c),d=l.next();!d.done;d=l.next()){u+=(m=d.value).getCount()}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var h=new Array(u),f=0;try{for(var p=Vc(c),g=p.next();!g.done;g=p.next())for(var m=g.value,_=0;_<m.getCount();_++){var y=m.getDataCodewords(),w=s.getECCodewords()+y;h[f++]=new t(y,new Uint8Array(w))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}var v=h[0].codewords.length-s.getECCodewords(),E=v-1,b=0;for(_=0;_<E;_++)for(var A=0;A<f;A++)h[A].codewords[_]=e[b++];var C=24===r.getVersionNumber(),x=C?8:f;for(A=0;A<x;A++)h[A].codewords[v-1]=e[b++];var I=h[0].codewords.length;for(_=v;_<I;_++)for(A=0;A<f;A++){var S=C?(A+8)%f:A,T=C&&S>7?_-1:_;h[S].codewords[T]=e[b++]}if(b!==e.length)throw new Oa;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),jc=function(){function t(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new Oa(""+t);var e=0,r=this.bitOffset,n=this.byteOffset,o=this.bytes;if(r>0){var i=8-r,a=t<i?t:i,s=255>>8-a<<(u=i-a);e=(o[n]&s)>>u,t-=a,8===(r+=a)&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&o[n],n++,t-=8;if(t>0){var u;s=255>>(u=8-t)<<u;e=e<<t|(o[n]&s)>>u,r+=t}}return this.bitOffset=r,this.byteOffset=n,e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(Pc||(Pc={}));var Gc,Wc=function(){function t(){}return t.decode=function(t){var e=new jc(t),r=new es,n=new es,o=new Array,i=Pc.ASCII_ENCODE;do{if(i===Pc.ASCII_ENCODE)i=this.decodeAsciiSegment(e,r,n);else{switch(i){case Pc.C40_ENCODE:this.decodeC40Segment(e,r);break;case Pc.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case Pc.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case Pc.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case Pc.BASE256_ENCODE:this.decodeBase256Segment(e,r,o);break;default:throw new Ya}i=Pc.ASCII_ENCODE}}while(i!==Pc.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new Cs(t,r.toString(),0===o.length?null:o,null)},t.decodeAsciiSegment=function(t,e,r){var n=!1;do{var o=t.readBits(8);if(0===o)throw new Ya;if(o<=128)return n&&(o+=128),e.append(String.fromCharCode(o-1)),Pc.ASCII_ENCODE;if(129===o)return Pc.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&e.append("0"),e.append(""+i)}else switch(o){case 230:return Pc.C40_ENCODE;case 231:return Pc.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return Pc.ANSIX12_ENCODE;case 239:return Pc.TEXT_ENCODE;case 240:return Pc.EDIFACT_ENCODE;default:if(254!==o||0!==t.available())throw new Ya}}while(t.available()>0);return Pc.ASCII_ENCODE},t.decodeC40Segment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new Ya;var u=this.C40_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length){u=this.C40_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Ya}o=0;break;case 3:r?(e.append(String.fromCharCode(s+224)),r=!1):e.append(String.fromCharCode(s+96)),o=0;break;default:throw new Ya}}}while(t.available()>0)},t.decodeTextSegment=function(t,e){var r=!1,n=[],o=0;do{if(8===t.available())return;var i=t.readBits(8);if(254===i)return;this.parseTwoBytes(i,t.readBits(8),n);for(var a=0;a<3;a++){var s=n[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new Ya;var u=this.TEXT_BASIC_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}break;case 1:r?(e.append(String.fromCharCode(s+128)),r=!1):e.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length){u=this.TEXT_SHIFT2_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u)}else switch(s){case 27:e.append(String.fromCharCode(29));break;case 30:r=!0;break;default:throw new Ya}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new Ya;u=this.TEXT_SHIFT3_SET_CHARS[s];r?(e.append(String.fromCharCode(u.charCodeAt(0)+128)),r=!1):e.append(u),o=0;break;default:throw new Ya}}}while(t.available()>0)},t.decodeAnsiX12Segment=function(t,e){var r=[];do{if(8===t.available())return;var n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(var o=0;o<3;o++){var i=r[o];switch(i){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new Ya;e.append(String.fromCharCode(i+51))}}}}while(t.available()>0)},t.parseTwoBytes=function(t,e,r){var n=(t<<8)+e-1,o=Math.floor(n/1600);r[0]=o,n-=1600*o,o=Math.floor(n/40),r[1]=o,r[2]=n-40*o},t.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var r=0;r<4;r++){var n=t.readBits(6);if(31===n){var o=8-t.getBitOffset();return void(8!==o&&t.readBits(o))}32&n||(n|=64),e.append(String.fromCharCode(n))}}while(t.available()>0)},t.decodeBase256Segment=function(t,e,r){var n,o=1+t.getByteOffset(),i=this.unrandomize255State(t.readBits(8),o++);if((n=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),o++))<0)throw new Ya;for(var a=new Uint8Array(n),s=0;s<n;s++){if(t.available()<8)throw new Ya;a[s]=this.unrandomize255State(t.readBits(8),o++)}r.push(a);try{e.append(Qa.decode(a,ts.ISO88591))}catch(t){throw new ks("Platform does not support required encoding: "+t.message)}},t.unrandomize255State=function(t,e){var r=t-(149*e%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],t}(),Xc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yc=function(){function t(){this.rsDecoder=new Ps(Os.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(t){var e,r,n=new Uc(t),o=n.getVersion(),i=n.readCodewords(),a=Hc.getDataBlocks(i,o),s=0;try{for(var u=Xc(a),c=u.next();!c.done;c=u.next()){s+=c.value.getNumDataCodewords()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}for(var l=new Uint8Array(s),d=a.length,h=0;h<d;h++){var f=a[h],p=f.getCodewords(),g=f.getNumDataCodewords();this.correctErrors(p,g);for(var m=0;m<g;m++)l[m*d+h]=p[m]}return Wc.decode(l)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Na}for(var n=0;n<e;n++)t[n]=r[n]},t}(),Zc=function(){function t(t){this.image=t,this.rectangleDetector=new js(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if((r=this.detectSolid2(r))[3]=this.correctTopRight(r),!r[3])throw new os;var n=(r=this.shiftToModuleCenter(r))[0],o=r[1],i=r[2],a=r[3],s=this.transitionsBetween(n,a)+1,u=this.transitionsBetween(i,a)+1;1&~s||(s+=1),1&~u||(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var c=t.sampleGrid(this.image,n,o,i,a,s,u);return new Us(c,[n,o,i,a])},t.shiftPoint=function(t,e,r){var n=(e.getX()-t.getX())/(r+1),o=(e.getY()-t.getY())/(r+1);return new zs(t.getX()+n,t.getY()+o)},t.moveAway=function(t,e,r){var n=t.getX(),o=t.getY();return n<e?n-=1:n+=1,o<r?o-=1:o+=1,new zs(n,o)},t.prototype.detectSolid1=function(t){var e=t[0],r=t[1],n=t[3],o=t[2],i=this.transitionsBetween(e,r),a=this.transitionsBetween(r,n),s=this.transitionsBetween(n,o),u=this.transitionsBetween(o,e),c=i,l=[o,e,r,n];return c>a&&(c=a,l[0]=e,l[1]=r,l[2]=n,l[3]=o),c>s&&(c=s,l[0]=r,l[1]=n,l[2]=o,l[3]=e),c>u&&(l[0]=n,l[1]=o,l[2]=e,l[3]=r),l},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=t.shiftPoint(n,o,4*(a+1)),u=t.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,r)<this.transitionsBetween(u,i)?(e[0]=r,e[1]=n,e[2]=o,e[3]=i):(e[0]=n,e[1]=o,e[2]=i,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i),s=this.transitionsBetween(n,i),u=t.shiftPoint(r,n,4*(s+1)),c=t.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(c,i);var l=new zs(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),d=new zs(i.getX()+(r.getX()-n.getX())/(s+1),i.getY()+(r.getY()-n.getY())/(s+1));return this.isValid(l)?this.isValid(d)?this.transitionsBetween(u,l)+this.transitionsBetween(c,l)>this.transitionsBetween(u,d)+this.transitionsBetween(c,d)?l:d:l:this.isValid(d)?d:null},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],o=e[2],i=e[3],a=this.transitionsBetween(r,i)+1,s=this.transitionsBetween(o,i)+1,u=t.shiftPoint(r,n,4*s),c=t.shiftPoint(o,n,4*a);1&~(a=this.transitionsBetween(u,i)+1)||(a+=1),1&~(s=this.transitionsBetween(c,i)+1)||(s+=1);var l,d,h=(r.getX()+n.getX()+o.getX()+i.getX())/4,f=(r.getY()+n.getY()+o.getY()+i.getY())/4;return r=t.moveAway(r,h,f),n=t.moveAway(n,h,f),o=t.moveAway(o,h,f),i=t.moveAway(i,h,f),u=t.shiftPoint(r,n,4*s),u=t.shiftPoint(u,i,4*a),l=t.shiftPoint(n,r,4*s),l=t.shiftPoint(l,o,4*a),c=t.shiftPoint(o,i,4*s),c=t.shiftPoint(c,n,4*a),d=t.shiftPoint(i,o,4*s),[u,l,c,d=t.shiftPoint(d,r,4*a)]},t.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},t.sampleGrid=function(t,e,r,n,o,i,a){return Zs.getInstance().sampleGrid(t,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,e.getX(),e.getY(),o.getX(),o.getY(),n.getX(),n.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(t,e){var r=Math.trunc(t.getX()),n=Math.trunc(t.getY()),o=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.abs(i-n)>Math.abs(o-r);if(a){var s=r;r=n,n=s,s=o,o=i,i=s}for(var u=Math.abs(o-r),c=Math.abs(i-n),l=-u/2,d=n<i?1:-1,h=r<o?1:-1,f=0,p=this.image.get(a?n:r,a?r:n),g=r,m=n;g!==o;g+=h){var _=this.image.get(a?m:g,a?g:m);if(_!==p&&(f++,p=_),(l+=c)>0){if(m===i)break;m+=d,l-=u}}return f},t}(),qc=function(){function t(){this.decoder=new Yc}return t.prototype.decode=function(e,r){var n,o;if(void 0===r&&(r=null),null!=r&&r.has(Wa.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Zc(e.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),u=new ws(n.getText(),s,8*s.length,o,Es.DATA_MATRIX,Pa.currentTimeMillis()),c=n.getByteSegments();null!=c&&u.putMetadata(As.BYTE_SEGMENTS,c);var l=n.getECLevel();return null!=l&&u.putMetadata(As.ERROR_CORRECTION_LEVEL,l),u},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new os;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=(r[0]-a+1)/n,u=(i-o+1)/n;if(s<=0||u<=0)throw new os;var c=n/2;o+=c,a+=c;for(var l=new rs(s,u),d=0;d<u;d++)for(var h=o+d*n,f=0;f<s;f++)t.get(a+f*n,h)&&l.set(f,d);return l},t.moduleSize=function(t,e){for(var r=e.getWidth(),n=t[0],o=t[1];n<r&&e.get(n,o);)n++;if(n===r)throw new os;var i=n-t[0];if(0===i)throw new os;return i},t.NO_POINTS=[],t}(),Kc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new qc,e)||this}Kc(e,t)}(ys),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}(Gc||(Gc={}));var $c,Jc=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Ta(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new Oa;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(Gc.L,"L",1),t.M=new t(Gc.M,"M",0),t.Q=new t(Gc.Q,"Q",3),t.H=new t(Gc.H,"H",2),t}(),Qc=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tl=function(){function t(t){this.errorCorrectionLevel=Jc.forBits(t>>3&3),this.dataMask=7&t}return t.numBitsDiffering=function(t,e){return Ha.bitCount(t^e)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return null!==n?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=Qc(t.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var c=u.value,l=c[0];if(l===e||l===r)return new t(c[1]);var d=t.numBitsDiffering(e,l);d<i&&(a=c[1],i=d),e!==r&&(d=t.numBitsDiffering(r,l))<i&&(a=c[1],i=d)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),el=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rl=function(){function t(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var t,e,r=0,n=this.ecBlocks;try{for(var o=el(n),i=o.next();!i.done;i=o.next()){r+=i.value.getCount()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),nl=function(){function t(t,e){this.count=t,this.dataCodewords=e}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),ol=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},il=function(){function t(t,e){for(var r,n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var c=ol(u),l=c.next();!l.done;l=c.next()){var d=l.value;a+=d.getCount()*(d.getDataCodewords()+s)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}this.totalCodewords=a}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},t.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new Ya;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new Ya}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new Oa;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=tl.numBitsDiffering(e,i);a<r&&(n=o+7,r=a)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new rs(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var r=this.alignmentPatternCenters.length,n=0;n<r;n++)for(var o=this.alignmentPatternCenters[n]-2,i=0;i<r;i++)0===n&&(0===i||i===r-1)||n===r-1&&0===i||e.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return e.setRegion(6,9,1,t-17),e.setRegion(9,6,t-17,1),this.versionNumber>6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new rl(7,new nl(1,19)),new rl(10,new nl(1,16)),new rl(13,new nl(1,13)),new rl(17,new nl(1,9))),new t(2,Int32Array.from([6,18]),new rl(10,new nl(1,34)),new rl(16,new nl(1,28)),new rl(22,new nl(1,22)),new rl(28,new nl(1,16))),new t(3,Int32Array.from([6,22]),new rl(15,new nl(1,55)),new rl(26,new nl(1,44)),new rl(18,new nl(2,17)),new rl(22,new nl(2,13))),new t(4,Int32Array.from([6,26]),new rl(20,new nl(1,80)),new rl(18,new nl(2,32)),new rl(26,new nl(2,24)),new rl(16,new nl(4,9))),new t(5,Int32Array.from([6,30]),new rl(26,new nl(1,108)),new rl(24,new nl(2,43)),new rl(18,new nl(2,15),new nl(2,16)),new rl(22,new nl(2,11),new nl(2,12))),new t(6,Int32Array.from([6,34]),new rl(18,new nl(2,68)),new rl(16,new nl(4,27)),new rl(24,new nl(4,19)),new rl(28,new nl(4,15))),new t(7,Int32Array.from([6,22,38]),new rl(20,new nl(2,78)),new rl(18,new nl(4,31)),new rl(18,new nl(2,14),new nl(4,15)),new rl(26,new nl(4,13),new nl(1,14))),new t(8,Int32Array.from([6,24,42]),new rl(24,new nl(2,97)),new rl(22,new nl(2,38),new nl(2,39)),new rl(22,new nl(4,18),new nl(2,19)),new rl(26,new nl(4,14),new nl(2,15))),new t(9,Int32Array.from([6,26,46]),new rl(30,new nl(2,116)),new rl(22,new nl(3,36),new nl(2,37)),new rl(20,new nl(4,16),new nl(4,17)),new rl(24,new nl(4,12),new nl(4,13))),new t(10,Int32Array.from([6,28,50]),new rl(18,new nl(2,68),new nl(2,69)),new rl(26,new nl(4,43),new nl(1,44)),new rl(24,new nl(6,19),new nl(2,20)),new rl(28,new nl(6,15),new nl(2,16))),new t(11,Int32Array.from([6,30,54]),new rl(20,new nl(4,81)),new rl(30,new nl(1,50),new nl(4,51)),new rl(28,new nl(4,22),new nl(4,23)),new rl(24,new nl(3,12),new nl(8,13))),new t(12,Int32Array.from([6,32,58]),new rl(24,new nl(2,92),new nl(2,93)),new rl(22,new nl(6,36),new nl(2,37)),new rl(26,new nl(4,20),new nl(6,21)),new rl(28,new nl(7,14),new nl(4,15))),new t(13,Int32Array.from([6,34,62]),new rl(26,new nl(4,107)),new rl(22,new nl(8,37),new nl(1,38)),new rl(24,new nl(8,20),new nl(4,21)),new rl(22,new nl(12,11),new nl(4,12))),new t(14,Int32Array.from([6,26,46,66]),new rl(30,new nl(3,115),new nl(1,116)),new rl(24,new nl(4,40),new nl(5,41)),new rl(20,new nl(11,16),new nl(5,17)),new rl(24,new nl(11,12),new nl(5,13))),new t(15,Int32Array.from([6,26,48,70]),new rl(22,new nl(5,87),new nl(1,88)),new rl(24,new nl(5,41),new nl(5,42)),new rl(30,new nl(5,24),new nl(7,25)),new rl(24,new nl(11,12),new nl(7,13))),new t(16,Int32Array.from([6,26,50,74]),new rl(24,new nl(5,98),new nl(1,99)),new rl(28,new nl(7,45),new nl(3,46)),new rl(24,new nl(15,19),new nl(2,20)),new rl(30,new nl(3,15),new nl(13,16))),new t(17,Int32Array.from([6,30,54,78]),new rl(28,new nl(1,107),new nl(5,108)),new rl(28,new nl(10,46),new nl(1,47)),new rl(28,new nl(1,22),new nl(15,23)),new rl(28,new nl(2,14),new nl(17,15))),new t(18,Int32Array.from([6,30,56,82]),new rl(30,new nl(5,120),new nl(1,121)),new rl(26,new nl(9,43),new nl(4,44)),new rl(28,new nl(17,22),new nl(1,23)),new rl(28,new nl(2,14),new nl(19,15))),new t(19,Int32Array.from([6,30,58,86]),new rl(28,new nl(3,113),new nl(4,114)),new rl(26,new nl(3,44),new nl(11,45)),new rl(26,new nl(17,21),new nl(4,22)),new rl(26,new nl(9,13),new nl(16,14))),new t(20,Int32Array.from([6,34,62,90]),new rl(28,new nl(3,107),new nl(5,108)),new rl(26,new nl(3,41),new nl(13,42)),new rl(30,new nl(15,24),new nl(5,25)),new rl(28,new nl(15,15),new nl(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new rl(28,new nl(4,116),new nl(4,117)),new rl(26,new nl(17,42)),new rl(28,new nl(17,22),new nl(6,23)),new rl(30,new nl(19,16),new nl(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new rl(28,new nl(2,111),new nl(7,112)),new rl(28,new nl(17,46)),new rl(30,new nl(7,24),new nl(16,25)),new rl(24,new nl(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new rl(30,new nl(4,121),new nl(5,122)),new rl(28,new nl(4,47),new nl(14,48)),new rl(30,new nl(11,24),new nl(14,25)),new rl(30,new nl(16,15),new nl(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new rl(30,new nl(6,117),new nl(4,118)),new rl(28,new nl(6,45),new nl(14,46)),new rl(30,new nl(11,24),new nl(16,25)),new rl(30,new nl(30,16),new nl(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new rl(26,new nl(8,106),new nl(4,107)),new rl(28,new nl(8,47),new nl(13,48)),new rl(30,new nl(7,24),new nl(22,25)),new rl(30,new nl(22,15),new nl(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new rl(28,new nl(10,114),new nl(2,115)),new rl(28,new nl(19,46),new nl(4,47)),new rl(28,new nl(28,22),new nl(6,23)),new rl(30,new nl(33,16),new nl(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new rl(30,new nl(8,122),new nl(4,123)),new rl(28,new nl(22,45),new nl(3,46)),new rl(30,new nl(8,23),new nl(26,24)),new rl(30,new nl(12,15),new nl(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new rl(30,new nl(3,117),new nl(10,118)),new rl(28,new nl(3,45),new nl(23,46)),new rl(30,new nl(4,24),new nl(31,25)),new rl(30,new nl(11,15),new nl(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new rl(30,new nl(7,116),new nl(7,117)),new rl(28,new nl(21,45),new nl(7,46)),new rl(30,new nl(1,23),new nl(37,24)),new rl(30,new nl(19,15),new nl(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new rl(30,new nl(5,115),new nl(10,116)),new rl(28,new nl(19,47),new nl(10,48)),new rl(30,new nl(15,24),new nl(25,25)),new rl(30,new nl(23,15),new nl(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new rl(30,new nl(13,115),new nl(3,116)),new rl(28,new nl(2,46),new nl(29,47)),new rl(30,new nl(42,24),new nl(1,25)),new rl(30,new nl(23,15),new nl(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new rl(30,new nl(17,115)),new rl(28,new nl(10,46),new nl(23,47)),new rl(30,new nl(10,24),new nl(35,25)),new rl(30,new nl(19,15),new nl(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new rl(30,new nl(17,115),new nl(1,116)),new rl(28,new nl(14,46),new nl(21,47)),new rl(30,new nl(29,24),new nl(19,25)),new rl(30,new nl(11,15),new nl(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new rl(30,new nl(13,115),new nl(6,116)),new rl(28,new nl(14,46),new nl(23,47)),new rl(30,new nl(44,24),new nl(7,25)),new rl(30,new nl(59,16),new nl(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new rl(30,new nl(12,121),new nl(7,122)),new rl(28,new nl(12,47),new nl(26,48)),new rl(30,new nl(39,24),new nl(14,25)),new rl(30,new nl(22,15),new nl(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new rl(30,new nl(6,121),new nl(14,122)),new rl(28,new nl(6,47),new nl(34,48)),new rl(30,new nl(46,24),new nl(10,25)),new rl(30,new nl(2,15),new nl(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new rl(30,new nl(17,122),new nl(4,123)),new rl(28,new nl(29,46),new nl(14,47)),new rl(30,new nl(49,24),new nl(10,25)),new rl(30,new nl(24,15),new nl(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new rl(30,new nl(4,122),new nl(18,123)),new rl(28,new nl(13,46),new nl(32,47)),new rl(30,new nl(48,24),new nl(14,25)),new rl(30,new nl(42,15),new nl(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new rl(30,new nl(20,117),new nl(4,118)),new rl(28,new nl(40,47),new nl(7,48)),new rl(30,new nl(43,24),new nl(22,25)),new rl(30,new nl(10,15),new nl(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new rl(30,new nl(19,118),new nl(6,119)),new rl(28,new nl(18,47),new nl(31,48)),new rl(30,new nl(34,24),new nl(34,25)),new rl(30,new nl(20,15),new nl(61,16)))],t}();!function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}($c||($c={}));var al,sl=function(){function t(t,e){this.value=t,this.isMasked=e}return t.prototype.unmaskBitMatrix=function(t,e){for(var r=0;r<e;r++)for(var n=0;n<e;n++)this.isMasked(r,n)&&t.flip(n,r)},t.values=new Map([[$c.DATA_MASK_000,new t($c.DATA_MASK_000,(function(t,e){return!(t+e&1)}))],[$c.DATA_MASK_001,new t($c.DATA_MASK_001,(function(t,e){return!(1&t)}))],[$c.DATA_MASK_010,new t($c.DATA_MASK_010,(function(t,e){return e%3==0}))],[$c.DATA_MASK_011,new t($c.DATA_MASK_011,(function(t,e){return(t+e)%3==0}))],[$c.DATA_MASK_100,new t($c.DATA_MASK_100,(function(t,e){return!(Math.floor(t/2)+Math.floor(e/3)&1)}))],[$c.DATA_MASK_101,new t($c.DATA_MASK_101,(function(t,e){return t*e%6==0}))],[$c.DATA_MASK_110,new t($c.DATA_MASK_110,(function(t,e){return t*e%6<3}))],[$c.DATA_MASK_111,new t($c.DATA_MASK_111,(function(t,e){return!(t+e+t*e%3&1)}))]]),t}(),ul=function(){function t(t){var e=t.getHeight();if(e<21||1!=(3&e))throw new Ya;this.bitMatrix=t}return t.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var t=0,e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(var r=5;r>=0;r--)t=this.copyBit(8,r,t);var n=this.bitMatrix.getHeight(),o=0,i=n-7;for(r=n-1;r>=i;r--)o=this.copyBit(8,r,o);for(e=n-8;e<n;e++)o=this.copyBit(e,8,o);if(this.parsedFormatInfo=tl.decodeFormatInformation(t,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new Ya},t.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return il.getVersionForNumber(e);for(var r=0,n=t-11,o=5;o>=0;o--)for(var i=t-9;i>=n;i--)r=this.copyBit(i,o,r);var a=il.decodeVersionInformation(r);if(null!==a&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;r=0;for(i=5;i>=0;i--)for(o=t-9;o>=n;o--)r=this.copyBit(i,o,r);if(null!==(a=il.decodeVersionInformation(r))&&a.getDimensionForVersion()===t)return this.parsedVersion=a,a;throw new Ya},t.prototype.copyBit=function(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),r=sl.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);for(var o=e.buildFunctionPattern(),i=!0,a=new Uint8Array(e.getTotalCodewords()),s=0,u=0,c=0,l=n-1;l>0;l-=2){6===l&&l--;for(var d=0;d<n;d++)for(var h=i?n-1-d:d,f=0;f<2;f++)o.get(l-f,h)||(c++,u<<=1,this.bitMatrix.get(l-f,h)&&(u|=1),8===c&&(a[s++]=u,c=0,u=0));i=!i}if(s!==e.getTotalCodewords())throw new Ya;return a},t.prototype.remask=function(){if(null!==this.parsedFormatInfo){var t=sl.values.get(this.parsedFormatInfo.getDataMask()),e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},t.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},t.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,r=t.getWidth();e<r;e++)for(var n=e+1,o=t.getHeight();n<o;n++)t.get(e,n)!==t.get(n,e)&&(t.flip(n,e),t.flip(e,n))},t}(),cl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ll=function(){function t(t,e){this.numDataCodewords=t,this.codewords=e}return t.getDataBlocks=function(e,r,n){var o,i,a,s;if(e.length!==r.getTotalCodewords())throw new Oa;var u=r.getECBlocksForLevel(n),c=0,l=u.getECBlocks();try{for(var d=cl(l),h=d.next();!h.done;h=d.next()){c+=(_=h.value).getCount()}}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var f=new Array(c),p=0;try{for(var g=cl(l),m=g.next();!m.done;m=g.next())for(var _=m.value,y=0;y<_.getCount();y++){var w=_.getDataCodewords(),v=u.getECCodewordsPerBlock()+w;f[p++]=new t(w,new Uint8Array(v))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var E=f[0].codewords.length,b=f.length-1;b>=0;){if(f[b].codewords.length===E)break;b--}b++;var A=E-u.getECCodewordsPerBlock(),C=0;for(y=0;y<A;y++)for(var x=0;x<p;x++)f[x].codewords[y]=e[C++];for(x=b;x<p;x++)f[x].codewords[A]=e[C++];var I=f[0].codewords.length;for(y=A;y<I;y++)for(x=0;x<p;x++){var S=x<b?y:y+1;f[x].codewords[S]=e[C++]}return f},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();!function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"}(al||(al={}));var dl,hl,fl=function(){function t(e,r,n,o){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(void 0===r)throw new Oa;return r},t.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(al.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(al.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(al.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(al.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(al.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(al.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(al.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(al.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(al.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(al.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),pl=function(){function t(){}return t.decode=function(e,r,n,o){var i=new jc(e),a=new es,s=new Array,u=-1,c=-1;try{var l=null,d=!1,h=void 0;do{if(i.available()<4)h=fl.TERMINATOR;else{var f=i.readBits(4);h=fl.forBits(f)}switch(h){case fl.TERMINATOR:break;case fl.FNC1_FIRST_POSITION:case fl.FNC1_SECOND_POSITION:d=!0;break;case fl.STRUCTURED_APPEND:if(i.available()<16)throw new Ya;u=i.readBits(8),c=i.readBits(8);break;case fl.ECI:var p=t.parseECIValue(i);if(null===(l=Ka.getCharacterSetECIByValue(p)))throw new Ya;break;case fl.HANZI:var g=i.readBits(4),m=i.readBits(h.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var _=i.readBits(h.getCharacterCountBits(r));switch(h){case fl.NUMERIC:t.decodeNumericSegment(i,a,_);break;case fl.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,_,d);break;case fl.BYTE:t.decodeByteSegment(i,a,_,l,s,o);break;case fl.KANJI:t.decodeKanjiSegment(i,a,_);break;default:throw new Ya}}}while(h!==fl.TERMINATOR)}catch(t){throw new Ya}return new Cs(e,a.toString(),0===s.length?null:s,null===n?null:n.toString(),u,c)},t.decodeHanziSegment=function(t,e,r){if(13*r>t.available())throw new Ya;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,n[o]=a>>8&255,n[o+1]=255&a,o+=2,r--}try{e.append(Qa.decode(n,ts.GB2312))}catch(t){throw new Ya(t)}},t.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new Ya;for(var n=new Uint8Array(2*r),o=0;r>0;){var i=t.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,n[o]=a>>8,n[o+1]=a,o+=2,r--}try{e.append(Qa.decode(n,ts.SHIFT_JIS))}catch(t){throw new Ya(t)}},t.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new Ya;for(var a,s=new Uint8Array(r),u=0;u<r;u++)s[u]=t.readBits(8);a=null===n?ts.guessEncoding(s,i):n.getName();try{e.append(Qa.decode(s,a))}catch(t){throw new Ya(t)}o.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new Ya;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,o){for(var i=r.length();n>1;){if(e.available()<11)throw new Ya;var a=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(a/45))),r.append(t.toAlphaNumericChar(a%45)),n-=2}if(1===n){if(e.available()<6)throw new Ya;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<r.length();s++)"%"===r.charAt(s)&&(s<r.length()-1&&"%"===r.charAt(s+1)?r.deleteCharAt(s+1):r.setCharAt(s,String.fromCharCode(29)))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new Ya;var o=e.readBits(10);if(o>=1e3)throw new Ya;r.append(t.toAlphaNumericChar(Math.floor(o/100))),r.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),r.append(t.toAlphaNumericChar(o%10)),n-=3}if(2===n){if(e.available()<7)throw new Ya;var i=e.readBits(7);if(i>=100)throw new Ya;r.append(t.toAlphaNumericChar(Math.floor(i/10))),r.append(t.toAlphaNumericChar(i%10))}else if(1===n){if(e.available()<4)throw new Ya;var a=e.readBits(4);if(a>=10)throw new Ya;r.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(t){var e=t.readBits(8);if(!(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new Ya},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),gl=function(){function t(t){this.mirrored=t}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},t}(),ml=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_l=function(){function t(){this.rsDecoder=new Ps(Os.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(rs.parseFromBooleanArray(t),e)},t.prototype.decodeBitMatrix=function(t,e){var r=new ul(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new gl(!0)),o}catch(t){if(null!==n)throw n;throw t}},t.prototype.decodeBitMatrixParser=function(t,e){var r,n,o,i,a=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),u=t.readCodewords(),c=ll.getDataBlocks(u,a,s),l=0;try{for(var d=ml(c),h=d.next();!h.done;h=d.next()){l+=(_=h.value).getNumDataCodewords()}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}var f=new Uint8Array(l),p=0;try{for(var g=ml(c),m=g.next();!m.done;m=g.next()){var _,y=(_=m.value).getCodewords(),w=_.getNumDataCodewords();this.correctErrors(y,w);for(var v=0;v<w;v++)f[p++]=y[v]}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return pl.decode(f,a,s,e)},t.prototype.correctErrors=function(t,e){var r=new Int32Array(t);try{this.rsDecoder.decode(r,t.length-e)}catch(t){throw new Na}for(var n=0;n<e;n++)t[n]=r[n]},t}(),yl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wl=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.estimatedModuleSize=n,o}return yl(e,t),e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){return new e((this.getX()+r)/2,(this.getY()+t)/2,(this.estimatedModuleSize+n)/2)},e}(zs),vl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},El=function(){function t(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),i=this.image,a=0;a<e;a++){var s=n+(1&a?-Math.floor((a+1)/2):Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var u=t;u<r&&!i.get(u,s);)u++;for(var c=0;u<r;){if(i.get(u,s))if(1===c)o[1]++;else if(2===c){var l;if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,u)))return l;o[0]=o[2],o[1]=1,o[2]=0,c=1}else o[++c]++;else 1===c&&c++,o[c]++;u++}if(this.foundPatternCross(o))if(null!==(l=this.handlePossibleCenter(o,s,r)))return l}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new os},t.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},t.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,r=e/2,n=0;n<3;n++)if(Math.abs(e-t[n])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=e;u>=0&&i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&!i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u)&&s[1]<=n;)s[1]++,u++;if(u===a||s[1]>n)return NaN;for(;u<a&&!i.get(r,u)&&s[2]<=n;)s[2]++,u++;if(s[2]>n)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),u=this.crossCheckVertical(r,s,2*e[1],a);if(!isNaN(u)){var c=(e[0]+e[1]+e[2])/3;try{for(var l=vl(this.possibleCenters),d=l.next();!d.done;d=l.next()){var h=d.value;if(h.aboutEquals(c,u,s))return h.combineEstimate(u,s,c)}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var f=new wl(s,u,c);this.possibleCenters.push(f),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(f)}return null},t}(),bl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Al=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.estimatedModuleSize=n,i.count=o,void 0===o&&(i.count=1),i}return bl(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,r,n){var o=this.count+1;return new e((this.count*this.getX()+r)/o,(this.count*this.getY()+t)/o,(this.count*this.estimatedModuleSize+n)/o,o)},e}(zs),Cl=function(){function t(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),xl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Il=function(){function t(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=null!=e&&void 0!==e.get(Wa.TRY_HARDER),n=null!=e&&void 0!==e.get(Wa.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var u=!1,c=new Int32Array(5),l=s-1;l<i&&!u;l+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,h=0;h<a;h++)if(o.get(h,l))1&~d||d++,c[d]++;else if(1&d)c[d]++;else if(4===d)if(t.foundPatternCross(c)){if(!0!==this.handlePossibleCenter(c,l,h,n)){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)u=this.haveMultiplyConfirmedCenters();else{var f=this.findRowSkip();f>c[2]&&(l+=f-c[2]-s,h=a-1)}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;if(t.foundPatternCross(c))!0===this.handlePossibleCenter(c,l,a,n)&&(s=c[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var p=this.selectBestPatterns();return zs.orderBestPatterns(p),new Cl(p)},t.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},t.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])<i&&Math.abs(o-t[1])<i&&Math.abs(3*o-t[2])<3*i&&Math.abs(o-t[3])<i&&Math.abs(o-t[4])<i},t.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},t.prototype.crossCheckDiagonal=function(e,r,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&r>=a&&s.get(r-a,e-a);)i[2]++,a++;if(e<a||r<a)return!1;for(;e>=a&&r>=a&&!s.get(r-a,e-a)&&i[1]<=n;)i[1]++,a++;if(e<a||r<a||i[1]>n)return!1;for(;e>=a&&r>=a&&s.get(r-a,e-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var u=s.getHeight(),c=s.getWidth();for(a=1;e+a<u&&r+a<c&&s.get(r+a,e+a);)i[2]++,a++;if(e+a>=u||r+a>=c)return!1;for(;e+a<u&&r+a<c&&!s.get(r+a,e+a)&&i[3]<n;)i[3]++,a++;if(e+a>=u||r+a>=c||i[3]>=n)return!1;for(;e+a<u&&r+a<c&&s.get(r+a,e+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,r,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(r,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(r,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(r,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(r,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(r,u)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(r,u)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=e;u>=0&&i.get(u,r);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,r)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(u,r)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=e+1;u<a&&i.get(u,r);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,r)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(u,r)&&s[4]<n;)s[4]++,u++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,u):NaN},t.prototype.handlePossibleCenter=function(e,r,n,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var u=i/7,c=!1,l=this.possibleCenters,d=0,h=l.length;d<h;d++){var f=l[d];if(f.aboutEquals(u,s,a)){l[d]=f.combineEstimate(s,a,u),c=!0;break}}if(!c){var p=new Al(a,s,u);l.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=xl(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(null!=n)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=xl(this.possibleCenters),c=u.next();!c.done;c=u.next()){(p=c.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=p.getEstimatedModuleSize())}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}if(i<3)return!1;var l=a/s,d=0;try{for(var h=xl(this.possibleCenters),f=h.next();!f.done;f=h.next()){var p=f.value;d+=Math.abs(p.getEstimatedModuleSize()-l)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}return d<=.05*a},t.prototype.selectBestPatterns=function(){var t,e,r,n,o=this.possibleCenters.length;if(o<3)throw new os;var i,a=this.possibleCenters;if(o>3){var s=0,u=0;try{for(var c=xl(this.possibleCenters),l=c.next();!l.done;l=c.next()){var d=l.value.getEstimatedModuleSize();s+=d,u+=d*d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}i=s/o;var h=Math.sqrt(u/o-i*i);a.sort((function(t,e){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?-1:r>n?1:0}));for(var f=Math.max(.2*i,h),p=0;p<a.length&&a.length>3;p++){var g=a[p];Math.abs(g.getEstimatedModuleSize()-i)>f&&(a.splice(p,1),p--)}}if(a.length>3){s=0;try{for(var m=xl(a),_=m.next();!_.done;_=m.next()){s+=_.value.getEstimatedModuleSize()}}catch(t){r={error:t}}finally{try{_&&!_.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}i=s/a.length,a.sort((function(t,e){if(e.getCount()===t.getCount()){var r=Math.abs(e.getEstimatedModuleSize()-i),n=Math.abs(t.getEstimatedModuleSize()-i);return r<n?1:r>n?-1:0}return e.getCount()-t.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),Sl=function(){function t(t){this.image=t}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(t){this.resultPointCallback=null==t?null:t.get(Wa.NEED_RESULT_POINT_CALLBACK);var e=new Il(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(r,n,o);if(i<1)throw new os("No pattern found in proccess finder.");var a=t.computeDimension(r,n,o,i),s=il.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var l=n.getX()-r.getX()+o.getX(),d=n.getY()-r.getY()+o.getY(),h=1-3/u,f=Math.floor(r.getX()+h*(l-r.getX())),p=Math.floor(r.getY()+h*(d-r.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(i,f,p,g);break}catch(t){if(!(t instanceof os))throw t}var m=t.createTransform(r,n,o,c,a),_=t.sampleGrid(this.image,m,a);return new Us(_,null===c?[o,r,n]:[o,r,n,c])},t.createTransform=function(t,e,r,n,o){var i,a,s,u,c=o-3.5;return null!==n?(i=n.getX(),a=n.getY(),u=s=c-3):(i=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),s=c,u=c),Ws.quadrilateralToQuadrilateral(3.5,3.5,c,3.5,s,u,3.5,c,t.getX(),t.getY(),e.getX(),e.getY(),i,a,r.getX(),r.getY())},t.sampleGrid=function(t,e,r){return Zs.getInstance().sampleGridWithTransform(t,r,r,e)},t.computeDimension=function(t,e,r,n){var o=Fs.round(zs.distance(t,e)/n),i=Fs.round(zs.distance(t,r)/n),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new os("Dimensions could be not found.")}return a},t.prototype.calculateModuleSize=function(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2},t.prototype.calculateModuleSizeOneWay=function(t,e){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,r,n){var o=this.sizeOfBlackWhiteBlackRun(t,e,r,n),i=1,a=t-(r-t);a<0?(i=t/(t-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var s=Math.floor(e-(n-e)*i);return i=1,s<0?(i=e/(e-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(s-e),s=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,s))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),s=Math.abs(n-e),u=-a/2,c=t<r?1:-1,l=e<n?1:-1,d=0,h=r+c,f=t,p=e;f!==h;f+=c){var g=o?p:f,m=o?f:p;if(1===d===this.image.get(g,m)){if(2===d)return Fs.distance(f,p,t,e);d++}if((u+=s)>0){if(p===n)break;p+=l,u-=a}}return 2===d?Fs.distance(r+c,n,t,e):NaN},t.prototype.findAlignmentInRegion=function(t,e,r,n){var o=Math.floor(n*t),i=Math.max(0,e-o),a=Math.min(this.image.getWidth()-1,e+o);if(a-i<3*t)throw new os("Alignment top exceeds estimated module size.");var s=Math.max(0,r-o),u=Math.min(this.image.getHeight()-1,r+o);if(u-s<3*t)throw new os("Alignment bottom exceeds estimated module size.");return new El(this.image,i,s,a-i,u-s,t,this.resultPointCallback).find()},t}(),Tl=function(){function t(){this.decoder=new _l}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,o;if(null!=r&&void 0!==r.get(Wa.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,r),o=t.NO_POINTS}else{var a=new Sl(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(a.getBits(),r),o=a.getPoints()}n.getOther()instanceof gl&&n.getOther().applyMirroredCorrection(o);var s=new ws(n.getText(),n.getRawBytes(),void 0,o,Es.QR_CODE,void 0),u=n.getByteSegments();null!==u&&s.putMetadata(As.BYTE_SEGMENTS,u);var c=n.getECLevel();return null!==c&&s.putMetadata(As.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(As.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(As.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(t){var e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new os;var n=this.moduleSize(e,t),o=e[1],i=r[1],a=e[0],s=r[0];if(a>=s||o>=i)throw new os;if(i-o!=s-a&&(s=a+(i-o))>=t.getWidth())throw new os;var u=Math.round((s-a+1)/n),c=Math.round((i-o+1)/n);if(u<=0||c<=0)throw new os;if(c!==u)throw new os;var l=Math.floor(n/2);o+=l;var d=(a+=l)+Math.floor((u-1)*n)-s;if(d>0){if(d>l)throw new os;a-=d}var h=o+Math.floor((c-1)*n)-i;if(h>0){if(h>l)throw new os;o-=h}for(var f=new rs(u,c),p=0;p<c;p++)for(var g=o+Math.floor(p*n),m=0;m<u;m++)t.get(a+Math.floor(m*n),g)&&f.set(m,p);return f},t.moduleSize=function(t,e){for(var r=e.getHeight(),n=e.getWidth(),o=t[0],i=t[1],a=!0,s=0;o<n&&i<r;){if(a!==e.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===n||i===r)throw new os;return(o-t[0])/7},t.NO_POINTS=new Array,t}(),Dl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ol=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(t){return Fs.sum(t)},t.toIntArray=function(e){var r,n;if(null==e||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=Dl(e),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.getCodeword=function(e){var r=Va.binarySearch(t.SYMBOL_TABLE,262143&e);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),Rl=function(){function t(t,e){this.bits=t,this.points=e}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Ml=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nl=function(){function t(){}return t.detectMultiple=function(e,r,n){var o=e.getBlackMatrix(),i=t.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(n,o)),new Rl(o,i)},t.detect=function(e,r){for(var n,o,i=new Array,a=0,s=0,u=!1;a<r.getHeight();){var c=t.findVertices(r,a,s);if(null!=c[0]||null!=c[3]){if(u=!0,i.push(c),!e)break;null!=c[2]?(s=Math.trunc(c[2].getX()),a=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),a=Math.trunc(c[4].getY()))}else{if(!u)break;u=!1,s=0;try{for(var l=(n=void 0,Ml(i)),d=l.next();!d.done;d=l.next()){var h=d.value;null!=h[1]&&(a=Math.trunc(Math.max(a,h[1].getY()))),null!=h[3]&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,r,n){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),null!=a[4]&&(n=Math.trunc(a[4].getX()),r=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(t,e,r){for(var n=0;n<r.length;n++)t[r[n]]=e[n]},t.findRowsWithPattern=function(e,r,n,o,i,a){for(var s=new Array(4),u=!1,c=new Int32Array(a.length);o<r;o+=t.ROW_STEP){if(null!=(f=t.findGuardPattern(e,i,o,n,!1,a,c))){for(;o>0;){if(null==(h=t.findGuardPattern(e,i,--o,n,!1,a,c))){o++;break}f=h}s[0]=new zs(f[0],o),s[1]=new zs(f[1],o),u=!0;break}}var l=o+1;if(u){for(var d=0,h=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);l<r;l++){var f;if(null!=(f=t.findGuardPattern(e,h[0],l,n,!1,a,c))&&Math.abs(h[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(h[1]-f[1])<t.MAX_PATTERN_DRIFT)h=f,d=0;else{if(d>t.SKIPPED_ROW_COUNT_MAX)break;d++}}l-=d+1,s[2]=new zs(h[0],l),s[3]=new zs(h[1],l)}return l-o<t.BARCODE_MIN_HEIGHT&&Va.fill(s,null),s},t.findGuardPattern=function(e,r,n,o,i,a,s){Va.fillWithin(s,0,s.length,0);for(var u=r,c=0;e.get(u,n)&&u>0&&c++<t.MAX_PIXEL_DRIFT;)u--;for(var l=u,d=0,h=a.length,f=i;l<o;l++){if(e.get(l,n)!==f)s[d]++;else{if(d===h-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([u,l]);u+=s[0]+s[1],Pa.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,f=!f}}return d===h-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([u,l-1]):null},t.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,i=0,a=0;a<n;a++)o+=t[a],i+=e[a];if(o<i)return 1/0;var s=o/i;r*=s;for(var u=0,c=0;c<n;c++){var l=t[c],d=e[c]*s,h=l>d?l-d:d-l;if(h>r)return 1/0;u+=h}return u/o},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),kl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pl=function(){function t(t,e){if(0===e.length)throw new Oa;this.field=t;var r=e.length;if(r>1&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-n),Pa.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0===this.coefficients[0]},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var n=0;try{for(var o=kl(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;n=this.field.add(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}for(var s=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)s=this.field.add(this.field.multiply(t,s),this.coefficients[c]);return s},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new Oa("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var o=r;r=n,n=o}var i=new Int32Array(n.length),a=n.length-r.length;Pa.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(r[s-a],n[s]);return new t(this.field,i)},t.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new Oa("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new Oa("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,o=e.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var u=r[s],c=0;c<i;c++)a[s+c]=this.field.add(a[s+c],this.field.multiply(u,o[c]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(0===e)return new t(this.field,new Int32Array([0]));if(1===e)return this;for(var r=this.coefficients.length,n=new Int32Array(r),o=0;o<r;o++)n[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Oa;if(0===r)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+e),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],r);return new t(this.field,o)},t.prototype.toString=function(){for(var t=new es,e=this.getDegree();e>=0;e--){var r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},t}(),Bl=function(){function t(){}return t.prototype.add=function(t,e){return(t+e)%this.modulus},t.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},t.prototype.exp=function(t){return this.expTable[t]},t.prototype.log=function(t){if(0===t)throw new Oa;return this.logTable[t]},t.prototype.inverse=function(t){if(0===t)throw new Ts;return this.expTable[this.modulus-this.logTable[t]-1]},t.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(t){return t===this},t}(),Fl=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ll=function(t){function e(e,r){var n=t.call(this)||this;n.modulus=e,n.expTable=new Int32Array(e),n.logTable=new Int32Array(e);for(var o=1,i=0;i<e;i++)n.expTable[i]=o,o=o*r%e;for(i=0;i<e-1;i++)n.logTable[n.expTable[i]]=i;return n.zero=new Pl(n,new Int32Array([0])),n.one=new Pl(n,new Int32Array([1])),n}return Fl(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(t,e){if(t<0)throw new Oa;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new Pl(this,r)},e.PDF417_GF=new e(Ol.NUMBER_OF_CODEWORDS,3),e}(Bl),zl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ul=function(){function t(){this.field=Ll.PDF417_GF}return t.prototype.decode=function(t,e,r){for(var n,o,i=new Pl(this.field,t),a=new Int32Array(e),s=!1,u=e;u>0;u--){var c=i.evaluateAt(this.field.exp(u));a[e-u]=c,0!==c&&(s=!0)}if(!s)return 0;var l=this.field.getOne();if(null!=r)try{for(var d=zl(r),h=d.next();!h.done;h=d.next()){var f=h.value,p=this.field.exp(t.length-1-f),g=new Pl(this.field,new Int32Array([this.field.subtract(0,p),1]));l=l.multiply(g)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}var m=new Pl(this.field,a),_=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),m,e),y=_[0],w=_[1],v=this.findErrorLocations(y),E=this.findErrorMagnitudes(w,y,v);for(u=0;u<v.length;u++){var b=t.length-1-this.field.log(v[u]);if(b<0)throw Na.getChecksumInstance();t[b]=this.field.subtract(t[b],E[u])}return v.length},t.prototype.runEuclideanAlgorithm=function(t,e,r){if(t.getDegree()<e.getDegree()){var n=t;t=e,e=n}for(var o=t,i=e,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(r/2);){var u=o,c=a;if(a=s,(o=i).isZero())throw Na.getChecksumInstance();i=u;for(var l=this.field.getZero(),d=o.getCoefficient(o.getDegree()),h=this.field.inverse(d);i.getDegree()>=o.getDegree()&&!i.isZero();){var f=i.getDegree()-o.getDegree(),p=this.field.multiply(i.getCoefficient(i.getDegree()),h);l=l.add(this.field.buildMonomial(f,p)),i=i.subtract(o.multiplyByMonomial(f,p))}s=l.multiply(a).subtract(c).negative()}var g=s.getCoefficient(0);if(0===g)throw Na.getChecksumInstance();var m=this.field.inverse(g);return[s.multiply(m),i.multiply(m)]},t.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,o=1;o<this.field.getSize()&&n<e;o++)0===t.evaluateAt(o)&&(r[n]=this.field.inverse(o),n++);if(n!==e)throw Na.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(t,e,r){for(var n=e.getDegree(),o=new Int32Array(n),i=1;i<=n;i++)o[n-i]=this.field.multiply(i,e.getCoefficient(i));var a=new Pl(this.field,o),s=r.length,u=new Int32Array(s);for(i=0;i<s;i++){var c=this.field.inverse(r[i]),l=this.field.subtract(0,t.evaluateAt(c)),d=this.field.inverse(a.evaluateAt(c));u[i]=this.field.multiply(l,d)}return u},t}(),Vl=function(){function t(e,r,n,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,o,i)}return t.prototype.constructor_1=function(t,e,r,n,o){var i=null==e||null==r,a=null==n||null==o;if(i&&a)throw new os;i?(e=new zs(0,n.getY()),r=new zs(0,o.getY())):a&&(n=new zs(t.getWidth()-1,e.getY()),o=new zs(t.getWidth()-1,r.getY())),this.image=t,this.topLeft=e,this.bottomLeft=r,this.topRight=n,this.bottomRight=o,this.minX=Math.trunc(Math.min(e.getX(),r.getX())),this.maxX=Math.trunc(Math.max(n.getX(),o.getX())),this.minY=Math.trunc(Math.min(e.getY(),n.getY())),this.maxY=Math.trunc(Math.max(r.getY(),o.getY()))},t.prototype.constructor_2=function(t){this.image=t.image,this.topLeft=t.getTopLeft(),this.bottomLeft=t.getBottomLeft(),this.topRight=t.getTopRight(),this.bottomRight=t.getBottomRight(),this.minX=t.getMinX(),this.maxX=t.getMaxX(),this.minY=t.getMinY(),this.maxY=t.getMaxY()},t.merge=function(e,r){return null==e?r:null==r?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var u=n?this.topLeft:this.topRight,c=Math.trunc(u.getY()-e);c<0&&(c=0);var l=new zs(u.getX(),c);n?o=l:a=l}if(r>0){var d=n?this.bottomLeft:this.bottomRight,h=Math.trunc(d.getY()+r);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var f=new zs(d.getX(),h);n?i=f:s=f}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Hl=function(){function t(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),jl=function(){function t(){this.buffer=""}return t.form=function(t,e){var r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,o,i,a,s){if("%%"===t)return"%";if(void 0!==e[++r]){t=i?parseInt(i.substr(1)):void 0;var u,c=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=e[r];break;case"c":u=e[r][0];break;case"f":u=parseFloat(e[r]).toFixed(t);break;case"p":u=parseFloat(e[r]).toPrecision(t);break;case"e":u=parseFloat(e[r]).toExponential(t);break;case"x":u=parseInt(e[r]).toString(c||16);break;case"d":u=parseFloat(parseInt(e[r],c||10).toPrecision(t)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(c);for(var l=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<l;)u=void 0!==n?u+d:d+u;return u}}))},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Gl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wl=function(){function t(t){this.boundingBox=new Vl(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(null!=r)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(e)-n;if(o>=0&&null!=(r=this.codewords[o]))return r;if((o=this.imageRowToCodewordIndex(e)+n)<this.codewords.length&&null!=(r=this.codewords[o]))return r}return null},t.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},t.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},t.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var t,e,r=new jl,n=0;try{for(var o=Gl(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?r.format("%3d: %3d|%3d%n",n++,a.getRowNumber(),a.getValue()):r.format("%3d: | %n",n++)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),Xl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yl=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Zl=function(){function t(){this.values=new Map}return t.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);null==e&&(e=0),e++,this.values.set(t,e)},t.prototype.getValue=function(){var t,e,r=-1,n=new Array,o=function(t,e){var o=function(){return t},i=function(){return e};i()>r?(r=i(),(n=[]).push(o())):i()===r&&n.push(o())};try{for(var i=Xl(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=Yl(a.value,2);o(s[0],s[1])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return Ol.toIntArray(n)},t.prototype.getConfidence=function(t){return this.values.get(t)},t}(),ql=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$l=function(t){function e(e,r){var n=t.call(this,e)||this;return n._isLeft=r,n}return ql(e,t),e.prototype.setRowNumbers=function(){var t,e;try{for(var r=Kl(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,u=1,c=0,l=i;l<a;l++)if(null!=e[l]){var d=e[l],h=d.getRowNumber()-s;if(0===h)c++;else if(1===h)u=Math.max(u,c),c=1,s=d.getRowNumber();else if(h<0||d.getRowNumber()>=t.getRowCount()||h>l)e[l]=null;else{for(var f=void 0,p=(f=u>2?(u-2)*h:h)>=l,g=1;g<=f&&!p;g++)p=null!=e[l-g];p?e[l]=null:(s=d.getRowNumber(),c=1)}}},e.prototype.getRowHeights=function(){var t,e,r=this.getBarcodeMetadata();if(null==r)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);var n=new Int32Array(r.getRowCount());try{for(var o=Kl(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),s=-1,u=o;u<i;u++)if(null!=a[u]){var c=a[u];c.setRowNumberAsRowIndicatorColumn();var l=c.getRowNumber()-s;0===l||(1===l?s=c.getRowNumber():c.getRowNumber()>=t.getRowCount()?a[u]=null:s=c.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new Zl,o=new Zl,i=new Zl,a=new Zl;try{for(var s=Kl(r),u=s.next();!u.done;u=s.next()){var c=u.value;if(null!=c){c.setRowNumberAsRowIndicatorColumn();var l=c.getValue()%30,d=c.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:o.setValue(3*l+1);break;case 1:a.setValue(l/3),i.setValue(l%3);break;case 2:n.setValue(l+1)}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||n.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<Ol.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>Ol.MAX_ROWS_IN_BARCODE)return null;var h=new Hl(n.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(r,h),h},e.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(null!=t[r]){var o=n.getValue()%30,i=n.getRowNumber();if(i>e.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:o+1!==e.getColumnCount()&&(t[r]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+t.prototype.toString.call(this)},e}(Wl),Jl=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ql=function(){function t(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=Ol.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e<t);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(t){null!=t&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(0===t)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var r=this.detectionResultColumns[e].getCodewords(),n=0;n<r.length;n++)null!=r[n]&&(r[n].hasValidRowNumber()||this.adjustRowNumbers(e,n,r));return t},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<t.length;r++)if(null!=t[r]&&null!=e[r]&&t[r].getRowNumber()===e[r].getRowNumber())for(var n=1;n<=this.barcodeColumnCount;n++){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o&&(o.setRowNumber(t[r].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[n].getCodewords()[r]=null))}},t.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(null!=r[n])for(var o=r[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];null!=s&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(t,e,r){return null==r||r.hasValidRowNumber()||(r.isValidRowNumber(t)?(r.setRowNumber(t),e=0):++e),e},t.prototype.adjustRowNumbers=function(e,r,n){var o,i;if(null!=this.detectionResultColumns[e-1]){var a=n[r],s=this.detectionResultColumns[e-1].getCodewords(),u=s;null!=this.detectionResultColumns[e+1]&&(u=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[r],c[3]=u[r],r>0&&(c[0]=n[r-1],c[4]=s[r-1],c[5]=u[r-1]),r>1&&(c[8]=n[r-2],c[10]=s[r-2],c[11]=u[r-2]),r<n.length-1&&(c[1]=n[r+1],c[6]=s[r+1],c[7]=u[r+1]),r<n.length-2&&(c[9]=n[r+2],c[12]=s[r+2],c[13]=u[r+2]);try{for(var l=Jl(c),d=l.next();!d.done;d=l.next()){var h=d.value;if(t.adjustRowNumber(a,h))return}}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}},t.adjustRowNumber=function(t,e){return null!=e&&(!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0))},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(t){this.boundingBox=t},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},t.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},t.prototype.toString=function(){var t=this.detectionResultColumns[0];null==t&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new jl,r=0;r<t.getCodewords().length;r++){e.format("CW %3d:",r);for(var n=0;n<this.barcodeColumnCount+2;n++)if(null!=this.detectionResultColumns[n]){var o=this.detectionResultColumns[n].getCodewords()[r];null!=o?e.format(" %3d|%3d",o.getRowNumber(),o.getValue()):e.format(" | ")}else e.format(" | ");e.format("%n")}return e.toString()},t}(),td=function(){function t(e,r,n,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(t){this.rowNumber=t},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),ed=function(){function t(){}return t.initialize=function(){for(var e=0;e<Ol.SYMBOL_TABLE.length;e++)for(var r=Ol.SYMBOL_TABLE[e],n=1&r,o=0;o<Ol.BARS_IN_MODULE;o++){for(var i=0;(1&r)===n;)i+=1,r>>=1;n=1&r,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(Ol.BARS_IN_MODULE)),t.RATIOS_TABLE[e][Ol.BARS_IN_MODULE-o-1]=Math.fround(i/Ol.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return-1!==r?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(t){for(var e=Fs.sum(t),r=new Int32Array(Ol.BARS_IN_MODULE),n=0,o=0,i=0;i<Ol.MODULES_IN_CODEWORD;i++){var a=e/(2*Ol.MODULES_IN_CODEWORD)+i*e/Ol.MODULES_IN_CODEWORD;o+t[n]<=a&&(o+=t[n],n++),r[n]++}return r},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return-1===Ol.getCodeword(r)?-1:r},t.getBitValue=function(t){for(var e=0,r=0;r<t.length;r++)for(var n=0;n<t[r];n++)e=e<<1|(r%2==0?1:0);return Math.trunc(e)},t.getClosestDecodedValue=function(e){var r=Fs.sum(e),n=new Array(Ol.BARS_IN_MODULE);if(r>1)for(var o=0;o<n.length;o++)n[o]=Math.fround(e[o]/r);var i=Ls.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var u=0,c=t.RATIOS_TABLE[s],l=0;l<Ol.BARS_IN_MODULE;l++){var d=Math.fround(c[l]-n[l]);if((u+=Math.fround(d*d))>=i)break}u<i&&(i=u,a=Ol.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(Ol.SYMBOL_TABLE.length).map((function(t){return new Array(Ol.BARS_IN_MODULE)})),t}(),rd=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(t){this.segmentIndex=t},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(t){this.fileId=t},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(t){this.optionalData=t},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(t){this.lastSegment=t},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(t){this.segmentCount=t},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(t){this.sender=t},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(t){this.addressee=t},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(t){this.fileName=t},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(t){this.fileSize=t},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(t){this.checksum=t},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(t){this.timestamp=t},t}(),nd=function(){function t(){}return t.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},t}(),od=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),id=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return od(e,t),e.kind="NullPointerException",e}(Ia),ad=function(){function t(){}return t.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},t.prototype.writeBytesOffset=function(t,e,r){if(null==t)throw new id;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new Fa;if(0!==r)for(var n=0;n<r;n++)this.write(t[e+n])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),sd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ud=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sd(e,t),e}(Ia),cd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ld=function(t){function e(e){void 0===e&&(e=32);var r=t.call(this)||this;if(r.count=0,e<0)throw new Oa("Negative initial size: "+e);return r.buf=new Uint8Array(e),r}return cd(e,t),e.prototype.ensureCapacity=function(t){t-this.buf.length>0&&this.grow(t)},e.prototype.grow=function(t){var e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new ud;e=Ha.MAX_VALUE}this.buf=Va.copyOfUint8Array(this.buf,e)},e.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1},e.prototype.writeBytesOffset=function(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new Fa;this.ensureCapacity(this.count+r),Pa.arraycopy(t,e,this.buf,this.count,r),this.count+=r},e.prototype.writeTo=function(t){t.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return Va.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(t){return new String(this.buf).toString()},e.prototype.toString_number=function(t){return new String(this.buf).toString()},e.prototype.close=function(){},e}(ad);function dd(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==Fo)return Fo.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function hd(t){if(void 0===hl&&(hl=dd()),null===hl)throw new Error("BigInt is not supported!");return hl(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(dl||(dl={}));var fd=function(){function t(){}return t.decode=function(e,r){var n=new es(""),o=Ka.ISO8859_1;n.enableDecoding(o);for(var i=1,a=e[i++],s=new rd;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,n);break;case t.ECI_CHARSET:Ka.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new Ya;default:i--,i=t.textCompaction(e,i,n)}if(!(i<e.length))throw Ya.getFormatInstance();a=e[i++]}if(0===n.length())throw Ya.getFormatInstance();var u=new Cs(null,n.toString(),null,r);return u.setOther(s),u},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw Ya.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,r++)o[i]=e[r];n.setSegmentIndex(Ha.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new es;r=t.textCompaction(e,r,a),n.setFileId(a.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new es;r=t.textCompaction(e,r+1,u),n.setFileName(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new es;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var l=new es;r=t.textCompaction(e,r+1,l),n.setAddressee(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new es;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(Ha.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var h=new es;r=t.numericCompaction(e,r+1,h),n.setTimestamp(nd.parseLong(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var f=new es;r=t.numericCompaction(e,r+1,f),n.setChecksum(Ha.parseInt(f.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new es;r=t.numericCompaction(e,r+1,p),n.setFileSize(nd.parseLong(p.toString()));break;default:throw Ya.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw Ya.getFormatInstance()}if(-1!==s){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(Va.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var o=new Int32Array(2*(e[0]-r)),i=new Int32Array(2*(e[0]-r)),a=0,s=!1;r<e[0]&&!s;){var u=e[r++];if(u<t.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=e[r++],i[a]=u,a++}}return t.decodeTextCompaction(o,i,a,n),r},t.decodeTextCompaction=function(e,r,n,o){for(var i=dl.ALPHA,a=dl.ALPHA,s=0;s<n;){var u=e[s],c="";switch(i){case dl.ALPHA:if(u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.LL:i=dl.LOWER;break;case t.ML:i=dl.MIXED;break;case t.PS:a=i,i=dl.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=dl.ALPHA}break;case dl.LOWER:if(u<26)c=String.fromCharCode(97+u);else switch(u){case 26:c=" ";break;case t.AS:a=i,i=dl.ALPHA_SHIFT;break;case t.ML:i=dl.MIXED;break;case t.PS:a=i,i=dl.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=dl.ALPHA}break;case dl.MIXED:if(u<t.PL)c=t.MIXED_CHARS[u];else switch(u){case t.PL:i=dl.PUNCT;break;case 26:c=" ";break;case t.LL:i=dl.LOWER;break;case t.AL:i=dl.ALPHA;break;case t.PS:a=i,i=dl.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=dl.ALPHA}break;case dl.PUNCT:if(u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=dl.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=dl.ALPHA}break;case dl.ALPHA_SHIFT:if(i=a,u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=dl.ALPHA}break;case dl.PUNCT_SHIFT:if(i=a,u<t.PAL)c=t.PUNCT_CHARS[u];else switch(u){case t.PAL:i=dl.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=dl.ALPHA}}""!==c&&o.append(c),s++}},t.byteCompaction=function(e,r,n,o,i){var a=new ld,s=0,u=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var l=new Int32Array(6),d=r[o++];o<r[0]&&!c;)switch(l[s++]=d,u=900*u+d,d=r[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0;break;default:if(s%5==0&&s>0){for(var h=0;h<6;++h)a.write(Number(hd(u)>>hd(8*(5-h))));u=0,s=0}}o===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(l[s++]=d);for(var f=0;f<s;f++)a.write(l[f]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<r[0]&&!c;){var p=r[o++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,c=!0}if(s%5==0&&s>0){for(h=0;h<6;++h)a.write(Number(hd(u)>>hd(8*(5-h))));u=0,s=0}}}return i.append(Qa.decode(a.toByteArray(),n)),o},t.numericCompaction=function(e,r,n){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!i;){var s=e[r++];if(r===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(t.decodeBase900toBase10(a,o)),o=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=hd(0),o=0;o<r;o++)n+=t.EXP900[r-o-1]*hd(e[o]);var i=n.toString();if("1"!==i.charAt(0))throw new Ya;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",t.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",t.EXP900=dd()?function(){var t=[];t[0]=hd(1);var e=hd(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),pd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gd=function(){function t(){}return t.decode=function(e,r,n,o,i,a,s){for(var u,c=new Vl(e,r,n,o,i),l=null,d=null,h=!0;;h=!1){if(null!=r&&(l=t.getRowIndicatorColumn(e,c,r,!0,a,s)),null!=o&&(d=t.getRowIndicatorColumn(e,c,o,!1,a,s)),null==(u=t.merge(l,d)))throw os.getNotFoundInstance();var f=u.getBoundingBox();if(!h||null==f||!(f.getMinY()<c.getMinY()||f.getMaxY()>c.getMaxY()))break;c=f}u.setBoundingBox(c);var p=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,l),u.setDetectionResultColumn(p,d);for(var g=null!=l,m=1;m<=p;m++){var _=g?m:p-m;if(void 0===u.getDetectionResultColumn(_)){var y=void 0;y=0===_||_===p?new $l(c,0===_):new Wl(c),u.setDetectionResultColumn(_,y);for(var w=-1,v=w,E=c.getMinY();E<=c.getMaxY();E++){if((w=t.getStartColumn(u,_,E,g))<0||w>c.getMaxX()){if(-1===v)continue;w=v}var b=t.detectCodeword(e,c.getMinX(),c.getMaxX(),g,w,E,a,s);null!=b&&(y.setCodeword(E,b),v=w,a=Math.min(a,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(u)},t.merge=function(e,r){if(null==e&&null==r)return null;var n=t.getBarcodeMetadata(e,r);if(null==n)return null;var o=Vl.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Ql(n,o)},t.adjustBoundingBox=function(e){var r,n;if(null==e)return null;var o=e.getRowHeights();if(null==o)return null;var i=t.getMax(o),a=0;try{for(var s=pd(o),u=s.next();!u.done;u=s.next()){var c=u.value;if(a+=i-c,c>0)break}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var l=e.getCodewords(),d=0;a>0&&null==l[d];d++)a--;var h=0;for(d=o.length-1;d>=0&&(h+=i-o[d],!(o[d]>0));d--);for(d=l.length-1;h>0&&null==l[d];d--)h--;return e.getBoundingBox().addMissingRows(a,h,e.isLeft())},t.getMax=function(t){var e,r,n=-1;try{for(var o=pd(t),i=o.next();!i.done;i=o.next()){var a=i.value;n=Math.max(n,a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.getBarcodeMetadata=function(t,e){var r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,r,n,o,i,a){for(var s=new $l(r,o),u=0;u<2;u++)for(var c=0===u?1:-1,l=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=c){var h=t.detectCodeword(e,0,e.getWidth(),o,l,d,i,a);null!=h&&(s.setCodeword(d,h),l=o?h.getStartX():h.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],o=n.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===o.length){if(i<1||i>Ol.MAX_CODEWORDS_IN_BARCODE)throw os.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var u=0;u<e.getBarcodeColumnCount();u++){var c=r[s][u+1].getValue(),l=s*e.getBarcodeColumnCount()+u;0===c.length?n.push(l):1===c.length?o[l]=c[0]:(a.push(l),i.push(c))}for(var d=new Array(i.length),h=0;h<d.length;h++)d[h]=i[h];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,Ol.toIntArray(n),Ol.toIntArray(a),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)r[o[u]]=i[u][a[u]];try{return t.decodeCodewords(r,e,n)}catch(t){if(!(t instanceof Na))throw t}if(0===a.length)throw Na.getChecksumInstance();for(u=0;u<a.length;u++){if(a[u]<i[u].length-1){a[u]++;break}if(a[u]=0,u===a.length-1)throw Na.getChecksumInstance()}}throw Na.getChecksumInstance()},t.createBarcodeMatrix=function(t){for(var e,r,n,o,i=Array.from({length:t.getBarcodeRowCount()},(function(){return new Array(t.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new Zl;var u=0;try{for(var c=pd(t.getDetectionResultColumns()),l=c.next();!l.done;l=c.next()){var d=l.value;if(null!=d)try{for(var h=(n=void 0,pd(d.getCodewords())),f=h.next();!f.done;f=h.next()){var p=f.value;if(null!=p){var g=p.getRowNumber();if(g>=0){if(g>=i.length)continue;i[g][u].setValue(p.getValue())}}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}u++}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}return i},t.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,o){var i,a,s=o?1:-1,u=null;if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodeword(n)),null!=u)return o?u.getEndX():u.getStartX();if(null!=(u=e.getDetectionResultColumn(r).getCodewordNearby(n)))return o?u.getStartX():u.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(u=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),null!=u)return o?u.getEndX():u.getStartX();for(var c=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var l=(i=void 0,pd(e.getDetectionResultColumn(r).getCodewords())),d=l.next();!d.done;d=l.next()){var h=d.value;if(null!=h)return(o?h.getEndX():h.getStartX())+s*c*(h.getEndX()-h.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}c++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,o,i,a,s,u){i=t.adjustCodewordStartColumn(e,r,n,o,i,a);var c,l=t.getModuleBitCount(e,r,n,o,i,a);if(null==l)return null;var d=Fs.sum(l);if(o)c=i+d;else{for(var h=0;h<l.length/2;h++){var f=l[h];l[h]=l[l.length-1-h],l[l.length-1-h]=f}i=(c=i)-d}if(!t.checkCodewordSkew(d,s,u))return null;var p=ed.getDecodedValue(l),g=Ol.getCodeword(p);return-1===g?null:new td(i,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(t,e,r,n,o,i){for(var a=o,s=new Int32Array(8),u=0,c=n?1:-1,l=n;(n?a<r:a>=e)&&u<s.length;)t.get(a,i)===l?(s[u]++,a+=c):(u++,l=!l);return u===s.length||a===(n?r:e)&&u===s.length-1?s:null},t.getNumberOfECCodeWords=function(t){return 2<<t},t.adjustCodewordStartColumn=function(e,r,n,o,i,a){for(var s=i,u=o?-1:1,c=0;c<2;c++){for(;(o?s>=r:s<n)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(0===e.length)throw Ya.getFormatInstance();var o=1<<r+1,i=t.correctErrors(e,n,o);t.verifyCodewordCount(e,o);var a=fd.decode(e,""+r);return a.setErrorsCorrected(i),a.setErasures(n.length),a},t.correctErrors=function(e,r,n){if(null!=r&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw Na.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(t,e){if(t.length<4)throw Ya.getFormatInstance();var r=t[0];if(r>t.length)throw Ya.getFormatInstance();if(0===r){if(!(e<t.length))throw Ya.getFormatInstance();t[0]=t.length-e}},t.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),r=0,n=e.length-1;!((1&t)!==r&&(r=1&t,--n<0));)e[n]++,t>>=1;return e},t.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},t.toString=function(t){for(var e=new jl,r=0;r<t.length;r++){e.format("Row %2d: ",r);for(var n=0;n<t[r].length;n++){var o=t[r][n];0===o.getValue().length?e.format(" ",null):e.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}e.format("%n")}return e.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new Ul,t}(),md=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_d=function(){function t(){}return t.prototype.decode=function(e,r){void 0===r&&(r=null);var n=t.decode(e,r,!1);if(null==n||0===n.length||null==n[0])throw os.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){void 0===r&&(r=null);try{return t.decode(e,r,!0)}catch(t){if(t instanceof Ya||t instanceof Na)throw os.getNotFoundInstance();throw t}},t.decode=function(e,r,n){var o,i,a=new Array,s=Nl.detectMultiple(e,r,n);try{for(var u=md(s.getPoints()),c=u.next();!c.done;c=u.next()){var l=c.value,d=gd.decode(s.getBits(),l[4],l[5],l[6],l[7],t.getMinCodewordWidth(l),t.getMaxCodewordWidth(l)),h=new ws(d.getText(),d.getRawBytes(),void 0,l,Es.PDF_417);h.putMetadata(As.ERROR_CORRECTION_LEVEL,d.getECLevel());var f=d.getOther();null!=f&&h.putMetadata(As.PDF417_EXTRA_METADATA,f),a.push(h)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map((function(t){return t}))},t.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMinWidth=function(t,e){return null==t||null==e?Ha.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*Ol.MODULES_IN_CODEWORD/Ol.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*Ol.MODULES_IN_CODEWORD/Ol.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*Ol.MODULES_IN_CODEWORD/Ol.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*Ol.MODULES_IN_CODEWORD/Ol.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),yd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),wd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yd(e,t),e.kind="ReaderException",e}(Ia),vd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ed=function(){function t(){}return t.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},t.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},t.prototype.setHints=function(t){this.hints=t;var e=null!=t&&void 0!==t.get(Wa.TRY_HARDER),r=null==t?null:t.get(Wa.POSSIBLE_FORMATS),n=new Array;if(null!=r){var o=r.some((function(t){return t===Es.UPC_A||t===Es.UPC_E||t===Es.EAN_13||t===Es.EAN_8||t===Es.CODABAR||t===Es.CODE_39||t===Es.CODE_93||t===Es.CODE_128||t===Es.ITF||t===Es.RSS_14||t===Es.RSS_EXPANDED}));o&&!e&&n.push(new Nc(t)),r.includes(Es.QR_CODE)&&n.push(new Tl),r.includes(Es.DATA_MATRIX)&&n.push(new qc),r.includes(Es.AZTEC)&&n.push(new $s),r.includes(Es.PDF_417)&&n.push(new _d),o&&e&&n.push(new Nc(t))}0===n.length&&(e||n.push(new Nc(t)),n.push(new Tl),n.push(new qc),n.push(new $s),n.push(new _d),e&&n.push(new Nc(t))),this.readers=n},t.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=vd(this.readers),n=r.next();!n.done;n=r.next()){n.value.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new wd("No readers where selected, nothing can be read.");try{for(var n=vd(this.readers),o=n.next();!o.done;o=n.next()){var i=o.value;try{return i.decode(t,this.hints)}catch(t){if(t instanceof wd)continue}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}throw new os("No MultiFormat Readers were able to detect the code.")},t}(),bd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=500);var n=new Ed;return n.setHints(e),t.call(this,n,r)||this}bd(e,t),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)}}(ys);var Ad=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new _d,e)||this}Ad(e,t)}(ys);var Cd,xd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e){return void 0===e&&(e=500),t.call(this,new Tl,e)||this}xd(e,t)}(ys),function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.DATA_MATRIX_COMPACT=3]="DATA_MATRIX_COMPACT",t[t.MIN_SIZE=4]="MIN_SIZE",t[t.MAX_SIZE=5]="MAX_SIZE",t[t.MARGIN=6]="MARGIN",t[t.PDF417_COMPACT=7]="PDF417_COMPACT",t[t.PDF417_COMPACTION=8]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=9]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=10]="AZTEC_LAYERS",t[t.QR_VERSION=11]="QR_VERSION",t[t.GS1_FORMAT=12]="GS1_FORMAT",t[t.FORCE_C40=13]="FORCE_C40"}(Cd||(Cd={}));var Id=Cd,Sd=function(){function t(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new Is(t,Int32Array.from([1])))}return t.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],n=this.field,o=e.length;o<=t;o++){var i=r.multiply(new Is(n,Int32Array.from([1,n.exp(o-1+n.getGeneratorBase())])));e.push(i),r=i}return e[t]},t.prototype.encode=function(t,e){if(0===e)throw new Oa("No error correction bytes");var r=t.length-e;if(r<=0)throw new Oa("No data bytes provided");var n=this.buildGenerator(e),o=new Int32Array(r);Pa.arraycopy(t,0,o,0,r);for(var i=new Is(this.field,o),a=(i=i.multiplyByMonomial(e,1)).divide(n)[1].getCoefficients(),s=e-a.length,u=0;u<s;u++)t[r+u]=0;Pa.arraycopy(a,0,t,r+s,a.length)},t}(),Td=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=n[a],u=0;u<o-1;u++){var c=s[u];c===s[u+1]&&c===n[a+1][u]&&c===n[a+1][u+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=n[a];s+6<o&&1===u[s]&&0===u[s+1]&&1===u[s+2]&&1===u[s+3]&&1===u[s+4]&&0===u[s+5]&&1===u[s+6]&&(t.isWhiteHorizontal(u,s-4,s)||t.isWhiteHorizontal(u,s+7,s+11))&&r++,a+6<i&&1===n[a][s]&&0===n[a+1][s]&&1===n[a+2][s]&&1===n[a+3][s]&&1===n[a+4][s]&&0===n[a+5][s]&&1===n[a+6][s]&&(t.isWhiteVertical(n,s,a-4,a)||t.isWhiteVertical(n,s,a+7,a+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(t,e,r){e=Math.max(e,0),r=Math.min(r,t.length);for(var n=e;n<r;n++)if(1===t[n])return!1;return!0},t.isWhiteVertical=function(t,e,r,n){r=Math.max(r,0),n=Math.min(n,t.length);for(var o=r;o<n;o++)if(1===t[o][e])return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=n[a],u=0;u<o;u++)1===s[u]&&r++;var c=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*r-c)/c)*t.N4},t.getDataMaskBit=function(t,e,r){var n,o;switch(t){case 0:n=r+e&1;break;case 1:n=1&r;break;case 2:n=e%3;break;case 3:n=(r+e)%3;break;case 4:n=Math.floor(r/2)+Math.floor(e/3)&1;break;case 5:n=(1&(o=r*e))+o%3;break;case 6:n=(1&(o=r*e))+o%3&1;break;case 7:n=(o=r*e)%3+(r+e&1)&1;break;default:throw new Oa("Invalid mask pattern: "+t)}return 0===n},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,o=r?e.getHeight():e.getWidth(),i=r?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var u=0,c=-1,l=0;l<i;l++){var d=r?a[s][l]:a[l][s];d===c?u++:(u>=5&&(n+=t.N1+(u-5)),u=1,c=d)}u>=5&&(n+=t.N1+(u-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),Dd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Od=function(){function t(t,e){this.width=t,this.height=e;for(var r=new Array(e),n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(t,e){return this.bytes[e][t]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},t.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},t.prototype.clear=function(t){var e,r;try{for(var n=Dd(this.bytes),o=n.next();!o.done;o=n.next()){var i=o.value;Va.fill(i,t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width)return!1;if(this.height!==r.height)return!1;for(var n=0,o=this.height;n<o;++n)for(var i=this.bytes[n],a=r.bytes[n],s=0,u=this.width;s<u;++s)if(i[s]!==a[s])return!1;return!0},t.prototype.toString=function(){for(var t=new es,e=0,r=this.height;e<r;++e){for(var n=this.bytes[e],o=0,i=this.width;o<i;++o)switch(n[o]){case 0:t.append(" 0");break;case 1:t.append(" 1");break;default:t.append(" ")}t.append("\n")}return t.toString()},t}(),Rd=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var t=new es;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},t.prototype.setMode=function(t){this.mode=t},t.prototype.setECLevel=function(t){this.ecLevel=t},t.prototype.setVersion=function(t){this.version=t},t.prototype.setMaskPattern=function(t){this.maskPattern=t},t.prototype.setMatrix=function(t){this.matrix=t},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),Md=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Md(e,t),e.kind="WriterException",e}(Ia),kd=function(){function t(){}return t.clearMatrix=function(t){t.clear(255)},t.buildMatrix=function(e,r,n,o,i){t.clearMatrix(i),t.embedBasicPatterns(n,i),t.embedTypeInfo(r,o,i),t.maybeEmbedVersionInfo(n,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var o=new ja;t.makeTypeInfoBits(e,r,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=t.TYPE_INFO_COORDINATES[i],c=u[0],l=u[1];if(n.setBoolean(c,l,s),i<8){var d=n.getWidth()-i-1,h=8;n.setBoolean(d,h,s)}else{d=8,h=n.getHeight()-7+(i-8);n.setBoolean(d,h,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new ja;t.makeVersionInfoBits(e,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,r.setBoolean(i,r.getHeight()-11+a,s),r.setBoolean(r.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,r,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<n.getHeight();){for(var u=0;u<2;++u){var c=a-u;if(t.isEmpty(n.get(c,s))){var l=void 0;o<e.getSize()?(l=e.get(o),++o):l=!1,255!==r&&Td.getDataMaskBit(r,c,s)&&(l=!l),n.setBoolean(c,s,l)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new Nd("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(t){return 32-Ha.numberOfLeadingZeros(t)},t.calculateBCHCode=function(e,r){if(0===r)throw new Oa("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Rd.isValidMaskPattern(r))throw new Nd("Invalid mask pattern");var o=e.getBits()<<3|r;n.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);n.appendBits(i,10);var a=new ja;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(a),15!==n.getSize())throw new Nd("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),18!==r.getSize())throw new Nd("should not happen but we got: "+r.getSize())},t.isEmpty=function(t){return 255===t},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(t){if(0===t.get(8,t.getHeight()-8))throw new Nd;t.setNumber(8,t.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var o=0;o<8;++o){if(!t.isEmpty(n.get(e+o,r)))throw new Nd;n.setNumber(e+o,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var o=0;o<7;++o){if(!t.isEmpty(n.get(e,r+o)))throw new Nd;n.setNumber(e,r+o,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPattern=function(e,r,n){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(e+a,r+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e);t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var u=0;u!==a;u++){var c=o[u];c>=0&&t.isEmpty(r.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),Pd=function(){function t(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),Bd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function t(){}t.calculateMaskPenalty=function(t){return Td.applyMaskPenaltyRule1(t)+Td.applyMaskPenaltyRule2(t)+Td.applyMaskPenaltyRule3(t)+Td.applyMaskPenaltyRule4(t)},t.encode=function(e,r,n){void 0===n&&(n=null);var o=t.DEFAULT_BYTE_MODE_ENCODING,i=null!==n&&void 0!==n.get(Id.CHARACTER_SET);i&&(o=n.get(Id.CHARACTER_SET).toString());var a=this.chooseMode(e,o),s=new ja;if(a===fl.BYTE&&(i||t.DEFAULT_BYTE_MODE_ENCODING!==o)){var u=Ka.getCharacterSetECIByName(o);void 0!==u&&this.appendECI(u,s)}this.appendModeInfo(a,s);var c,l=new ja;if(this.appendBytes(e,a,l,o),null!==n&&void 0!==n.get(Id.QR_VERSION)){var d=Number.parseInt(n.get(Id.QR_VERSION).toString(),10);c=il.getVersionForNumber(d);var h=this.calculateBitsNeeded(a,s,l,c);if(!this.willFit(h,c,r))throw new Nd("Data too big for requested version")}else c=this.recommendVersion(r,a,s,l);var f=new ja;f.appendBitArray(s);var p=a===fl.BYTE?l.getSizeInBytes():e.length;this.appendLengthInfo(p,c,a,f),f.appendBitArray(l);var g=c.getECBlocksForLevel(r),m=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(m,f);var _=this.interleaveWithECBytes(f,c.getTotalCodewords(),m,g.getNumBlocks()),y=new Rd;y.setECLevel(r),y.setMode(a),y.setVersion(c);var w=c.getDimensionForVersion(),v=new Od(w,w),E=this.chooseMaskPattern(_,r,c,v);return y.setMaskPattern(E),kd.buildMatrix(_,r,c,E,v),y.setMatrix(v),y},t.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,il.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},t.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(void 0===r&&(r=null),Ka.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return fl.KANJI;for(var n=!1,o=!1,i=0,a=e.length;i<a;++i){var s=e.charAt(i);if(t.isDigit(s))n=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return fl.BYTE;o=!0}}return o?fl.ALPHANUMERIC:n?fl.NUMERIC:fl.BYTE},t.isOnlyDoubleByteKanji=function(t){var e;try{e=Qa.encode(t,Ka.SJIS)}catch(t){return!1}var r=e.length;if(r%2!=0)return!1;for(var n=0;n<r;n+=2){var o=255&e[n];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},t.chooseMaskPattern=function(t,e,r,n){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<Rd.NUM_MASK_PATTERNS;a++){kd.buildMatrix(t,e,r,a,n);var s=this.calculateMaskPenalty(n);s<o&&(o=s,i=a)}return i},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var o=il.getVersionForNumber(n);if(t.willFit(e,o,r))return o}throw new Nd("Data too big")},t.willFit=function(t,e,r){return e.getTotalCodewords()-e.getECBlocksForLevel(r).getTotalECCodewords()>=(t+7)/8},t.terminateBits=function(t,e){var r=8*t;if(e.getSize()>r)throw new Nd("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()<r;++n)e.appendBit(!1);var o=7&e.getSize();if(o>0)for(n=o;n<8;n++)e.appendBit(!1);var i=t-e.getSizeInBytes();for(n=0;n<i;++n)e.appendBits(1&n?17:236,8);if(e.getSize()!==r)throw new Nd("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(t,e,r,n,o,i){if(n>=r)throw new Nd("Block ID too large");var a=t%r,s=r-a,u=Math.floor(t/r),c=u+1,l=Math.floor(e/r),d=l+1,h=u-l,f=c-d;if(h!==f)throw new Nd("EC bytes mismatch");if(r!==s+a)throw new Nd("RS blocks mismatch");if(t!==(l+h)*s+(d+f)*a)throw new Nd("Total bytes mismatch");n<s?(o[0]=l,i[0]=h):(o[0]=d,i[0]=f)},t.interleaveWithECBytes=function(e,r,n,o){var i,a,s,u;if(e.getSizeInBytes()!==n)throw new Nd("Number of bits and data bytes does not match");for(var c=0,l=0,d=0,h=new Array,f=0;f<o;++f){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,o,f,p,g);var m=p[0],_=new Uint8Array(m);e.toBytes(8*c,_,0,m);var y=t.generateECBytes(_,g[0]);h.push(new Pd(_,y)),l=Math.max(l,m),d=Math.max(d,y.length),c+=p[0]}if(n!==c)throw new Nd("Data bytes does not match offset");var w=new ja;for(f=0;f<l;++f)try{for(var v=(i=void 0,Bd(h)),E=v.next();!E.done;E=v.next()){f<(_=E.value.getDataBytes()).length&&w.appendBits(_[f],8)}}catch(t){i={error:t}}finally{try{E&&!E.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(f=0;f<d;++f)try{for(var b=(s=void 0,Bd(h)),A=b.next();!A.done;A=b.next()){f<(y=A.value.getErrorCorrectionBytes()).length&&w.appendBits(y[f],8)}}catch(t){s={error:t}}finally{try{A&&!A.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(r!==w.getSizeInBytes())throw new Nd("Interleaving error: "+r+" and "+w.getSizeInBytes()+" differ.");return w},t.generateECBytes=function(t,e){for(var r=t.length,n=new Int32Array(r+e),o=0;o<r;o++)n[o]=255&t[o];new Sd(Os.QR_CODE_FIELD_256).encode(n,e);var i=new Uint8Array(e);for(o=0;o<e;o++)i[o]=n[r+o];return i},t.appendModeInfo=function(t,e){e.appendBits(t.getBits(),4)},t.appendLengthInfo=function(t,e,r,n){var o=r.getCharacterCountBits(e);if(t>=1<<o)throw new Nd(t+" is bigger than "+((1<<o)-1));n.appendBits(t,o)},t.appendBytes=function(e,r,n,o){switch(r){case fl.NUMERIC:t.appendNumericBytes(e,n);break;case fl.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case fl.BYTE:t.append8BitBytes(e,n,o);break;case fl.KANJI:t.appendKanjiBytes(e,n);break;default:throw new Nd("Invalid mode: "+r)}},t.getDigit=function(t){return t.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getDigit(e.charAt(o));if(o+2<n){var a=t.getDigit(e.charAt(o+1)),s=t.getDigit(e.charAt(o+2));r.appendBits(100*i+10*a+s,10),o+=3}else if(o+1<n){a=t.getDigit(e.charAt(o+1));r.appendBits(10*i+a,7),o+=2}else r.appendBits(i,4),o++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,o=0;o<n;){var i=t.getAlphanumericCode(e.charCodeAt(o));if(-1===i)throw new Nd;if(o+1<n){var a=t.getAlphanumericCode(e.charCodeAt(o+1));if(-1===a)throw new Nd;r.appendBits(45*i+a,11),o+=2}else r.appendBits(i,6),o++}},t.append8BitBytes=function(t,e,r){var n;try{n=Qa.encode(t,r)}catch(t){throw new Nd(t)}for(var o=0,i=n.length;o!==i;o++){var a=n[o];e.appendBits(a,8)}},t.appendKanjiBytes=function(t,e){var r;try{r=Qa.encode(t,Ka.SJIS)}catch(t){throw new Nd(t)}for(var n=r.length,o=0;o<n;o+=2){var i=(255&r[o])<<8&4294967295|255&r[o+1],a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new Nd("Invalid byte sequence");var s=192*(a>>8)+(255&a);e.appendBits(s,13)}},t.appendECI=function(t,e){e.appendBits(fl.ECI.getBits(),4),e.appendBits(t.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=Ka.UTF8.getName()}();var Fd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s,u){var c=t.call(this,a,s)||this;if(c.yuvData=e,c.dataWidth=r,c.dataHeight=n,c.left=o,c.top=i,o+a>r||i+s>n)throw new Oa("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(a,s),c}Fd(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Oa("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Pa.arraycopy(this.yuvData,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.yuvData;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Pa.arraycopy(this.yuvData,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Pa.arraycopy(this.yuvData,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+t,this.top+r,n,o,!1)},e.prototype.renderThumbnail=function(){for(var t=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,n=new Int32Array(t*r),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<r;a++){for(var s=a*t,u=0;u<t;u++){var c=255&o[i+u*e.THUMBNAIL_SCALE_FACTOR];n[s+u]=4278190080|65793*c}i+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return n},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(t,e){for(var r=this.yuvData,n=0,o=this.top*this.dataWidth+this.left;n<e;n++,o+=this.dataWidth)for(var i=o+t/2,a=o,s=o+t-1;a<i;a++,s--){var u=r[a];r[a]=r[s],r[s]=u}},e.prototype.invert=function(){return new ds(this)},e.THUMBNAIL_SCALE_FACTOR=2}(cs);var Ld=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n,o,i,a,s){var u=t.call(this,r,n)||this;if(u.dataWidth=o,u.dataHeight=i,u.left=a,u.top=s,4===e.BYTES_PER_ELEMENT){for(var c=r*n,l=new Uint8ClampedArray(c),d=0;d<c;d++){var h=e[d],f=h>>16&255,p=h>>7&510,g=255&h;l[d]=(f+p+g)/4&255}u.luminances=l}else u.luminances=e;if(void 0===o&&(u.dataWidth=r),void 0===i&&(u.dataHeight=n),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+r>u.dataWidth||u.top+n>u.dataHeight)throw new Oa("Crop rectangle does not fit within image data.");return u}Ld(e,t),e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Oa("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length<r)&&(e=new Uint8ClampedArray(r));var n=(t+this.top)*this.dataWidth+this.left;return Pa.arraycopy(this.luminances,n,e,0,r),e},e.prototype.getMatrix=function(){var t=this.getWidth(),e=this.getHeight();if(t===this.dataWidth&&e===this.dataHeight)return this.luminances;var r=t*e,n=new Uint8ClampedArray(r),o=this.top*this.dataWidth+this.left;if(t===this.dataWidth)return Pa.arraycopy(this.luminances,o,n,0,r),n;for(var i=0;i<e;i++){var a=i*t;Pa.arraycopy(this.luminances,o,n,a,t),o+=this.dataWidth}return n},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(t,r,n,o){return new e(this.luminances,n,o,this.dataWidth,this.dataHeight,this.left+t,this.top+r)},e.prototype.invert=function(){return new ds(this)}}(cs);var zd,Ud,Vd=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vd(e,t),e.forName=function(t){return this.getCharacterSetECIByName(t)},e}(Ka),jd=function(){function t(){}return t.ISO_8859_1=Ka.ISO8859_1,t}();zd=function(t,e){for(var r=1,n=0;n<255;n++)e[n]=r,t[r]=n,(r*=2)>=256&&(r^=301);return{LOG:t,ALOG:e}}([],[]),zd.LOG,zd.ALOG,function(t){t[t.FORCE_NONE=0]="FORCE_NONE",t[t.FORCE_SQUARE=1]="FORCE_SQUARE",t[t.FORCE_RECTANGLE=2]="FORCE_RECTANGLE"}(Ud||(Ud={}));var Gd,Wd="[)>05",Xd="[)>06",Yd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 0},t.prototype.encode=function(t){if(uh.determineConsecutiveDigitCount(t.getMessage(),t.pos)>=2)t.writeCodeword(this.encodeASCIIDigits(t.getMessage().charCodeAt(t.pos),t.getMessage().charCodeAt(t.pos+1))),t.pos+=2;else{var e=t.getCurrentChar(),r=uh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode());if(r!==this.getEncodingMode())switch(r){case 5:return t.writeCodeword(231),void t.signalEncoderChange(5);case 1:return t.writeCodeword(230),void t.signalEncoderChange(1);case 3:t.writeCodeword(238),t.signalEncoderChange(3);break;case 2:t.writeCodeword(239),t.signalEncoderChange(2);break;case 4:t.writeCodeword(240),t.signalEncoderChange(4);break;default:throw new Error("Illegal mode: "+r)}else uh.isExtendedASCII(e)?(t.writeCodeword(235),t.writeCodeword(e-128+1),t.pos++):(t.writeCodeword(e+1),t.pos++)}},t.prototype.encodeASCIIDigits=function(t,e){if(uh.isDigit(t)&&uh.isDigit(e))return 10*(t-48)+(e-48)+130;throw new Error("not digits: "+t+e)},t}(),Zd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 5},t.prototype.encode=function(t){var e=new es;for(e.append(0);t.hasMoreCharacters();){var r=t.getCurrentChar();if(e.append(r),t.pos++,uh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}var n=e.length()-1,o=t.getCodewordCount()+n+1;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o>0;if(t.hasMoreCharacters()||i)if(n<=249)e.setCharAt(0,ts.getCharAt(n));else{if(!(n<=1555))throw new Error("Message length not in valid ranges: "+n);e.setCharAt(0,ts.getCharAt(Math.floor(n/250)+249)),e.insert(1,ts.getCharAt(n%250))}var a=0;for(r=e.length();a<r;a++)t.writeCodeword(this.randomize255State(e.charAt(a).charCodeAt(0),t.getCodewordCount()+1))},t.prototype.randomize255State=function(t,e){var r=t+(149*e%255+1);return r<=255?r:r-256},t}(),qd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 1},t.prototype.encodeMaximal=function(t){for(var e=new es,r=0,n=t.pos,o=0;t.hasMoreCharacters();){var i=t.getCurrentChar();t.pos++,r=this.encodeChar(i,e),e.length()%3==0&&(n=t.pos,o=e.length())}if(o!==e.length()){var a=Math.floor(e.length()/3*2),s=Math.floor(t.getCodewordCount()+a+1);t.updateSymbolInfo(s);var u=t.getSymbolInfo().getDataCapacity()-s,c=Math.floor(e.length()%3);(2===c&&2!==u||1===c&&(r>3||1!==u))&&(t.pos=n)}e.length()>0&&t.writeCodeword(230),this.handleEOD(t,e)},t.prototype.encode=function(t){for(var e=new es;t.hasMoreCharacters();){var r=t.getCurrentChar();t.pos++;var n=this.encodeChar(r,e),o=2*Math.floor(e.length()/3),i=t.getCodewordCount()+o;t.updateSymbolInfo(i);var a=t.getSymbolInfo().getDataCapacity()-i;if(!t.hasMoreCharacters()){var s=new es;for(e.length()%3==2&&2!==a&&(n=this.backtrackOneCharacter(t,e,s,n));e.length()%3==1&&(n>3||1!==a);)n=this.backtrackOneCharacter(t,e,s,n);break}if(e.length()%3==0)if(uh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},t.prototype.backtrackOneCharacter=function(t,e,r,n){var o=e.length(),i=e.toString().substring(0,o-n);e.setLengthToZero(),e.append(i),t.pos--;var a=t.getCurrentChar();return n=this.encodeChar(a,r),t.resetSymbolInfo(),n},t.prototype.writeNextTriplet=function(t,e){t.writeCodewords(this.encodeToCodewords(e.toString()));var r=e.toString().substring(3);e.setLengthToZero(),e.append(r)},t.prototype.handleEOD=function(t,e){var r=Math.floor(e.length()/3*2),n=e.length()%3,o=t.getCodewordCount()+r;t.updateSymbolInfo(o);var i=t.getSymbolInfo().getDataCapacity()-o;if(2===n){for(e.append("\0");e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254)}else if(1===i&&1===n){for(;e.length()>=3;)this.writeNextTriplet(t,e);t.hasMoreCharacters()&&t.writeCodeword(254),t.pos--}else{if(0!==n)throw new Error("Unexpected case. Please report!");for(;e.length()>=3;)this.writeNextTriplet(t,e);(i>0||t.hasMoreCharacters())&&t.writeCodeword(254)}t.signalEncoderChange(0)},t.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0))return e.append(t-65+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t<=127)return e.append(2),e.append(t-96),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},t.prototype.encodeToCodewords=function(t){var e=1600*t.charCodeAt(0)+40*t.charCodeAt(1)+t.charCodeAt(2)+1,r=e/256,n=e%256,o=new es;return o.append(r),o.append(n),o.toString()},t}(),Kd=function(){function t(){}return t.prototype.getEncodingMode=function(){return 4},t.prototype.encode=function(t){for(var e=new es;t.hasMoreCharacters();){var r=t.getCurrentChar();if(this.encodeChar(r,e),t.pos++,e.length()>=4){t.writeCodewords(this.encodeToCodewords(e.toString()));var n=e.toString().substring(4);if(e.setLengthToZero(),e.append(n),uh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}}e.append(ts.getCharAt(31)),this.handleEOD(t,e)},t.prototype.handleEOD=function(t,e){try{var r=e.length();if(0===r)return;if(1===r){t.updateSymbolInfo();var n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),o=t.getRemainingCharacters();if(o>n&&(t.updateSymbolInfo(t.getCodewordCount()+1),n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount()),o<=n&&n<=2)return}if(r>4)throw new Error("Count must not exceed 4");var i=r-1,a=this.encodeToCodewords(e.toString()),s=!t.hasMoreCharacters()&&i<=2;if(i<=2)t.updateSymbolInfo(t.getCodewordCount()+i),(n=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount())>=3&&(s=!1,t.updateSymbolInfo(t.getCodewordCount()+a.length));s?(t.resetSymbolInfo(),t.pos-=i):t.writeCodewords(a)}finally{t.signalEncoderChange(0)}},t.prototype.encodeChar=function(t,e){t>=" ".charCodeAt(0)&&t<="?".charCodeAt(0)?e.append(t):t>="@".charCodeAt(0)&&t<="^".charCodeAt(0)?e.append(ts.getCharAt(t-64)):uh.illegalCharacter(ts.getCharAt(t))},t.prototype.encodeToCodewords=function(t){var e=t.length;if(0===e)throw new Error("StringBuilder must not be empty");var r=(t.charAt(0).charCodeAt(0)<<18)+((e>=2?t.charAt(1).charCodeAt(0):0)<<12)+((e>=3?t.charAt(2).charCodeAt(0):0)<<6)+(e>=4?t.charAt(3).charCodeAt(0):0),n=r>>16&255,o=r>>8&255,i=255&r,a=new es;return a.append(n),e>=2&&a.append(o),e>=3&&a.append(i),a.toString()},t}(),$d=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jd=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qd=function(){function t(t,e,r,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=0),this.rectangular=t,this.dataCapacity=e,this.errorCodewords=r,this.matrixWidth=n,this.matrixHeight=o,this.dataRegions=i,this.rsBlockData=a,this.rsBlockError=s}return t.lookup=function(t,e,r,n,o){var i,a;void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!0);try{for(var s=Jd(eh),u=s.next();!u.done;u=s.next()){var c=u.value;if((1!==e||!c.rectangular)&&((2!==e||c.rectangular)&&(null==r||!(c.getSymbolWidth()<r.getWidth()||c.getSymbolHeight()<r.getHeight()))&&(null==n||!(c.getSymbolWidth()>n.getWidth()||c.getSymbolHeight()>n.getHeight()))&&t<=c.dataCapacity))return c}}catch(t){i={error:t}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(o)throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: "+t);return null},t.prototype.getHorizontalDataRegions=function(){switch(this.dataRegions){case 1:return 1;case 2:case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getVerticalDataRegions=function(){switch(this.dataRegions){case 1:case 2:return 1;case 4:return 2;case 16:return 4;case 36:return 6;default:throw new Error("Cannot handle this number of data regions")}},t.prototype.getSymbolDataWidth=function(){return this.getHorizontalDataRegions()*this.matrixWidth},t.prototype.getSymbolDataHeight=function(){return this.getVerticalDataRegions()*this.matrixHeight},t.prototype.getSymbolWidth=function(){return this.getSymbolDataWidth()+2*this.getHorizontalDataRegions()},t.prototype.getSymbolHeight=function(){return this.getSymbolDataHeight()+2*this.getVerticalDataRegions()},t.prototype.getCodewordCount=function(){return this.dataCapacity+this.errorCodewords},t.prototype.getInterleavedBlockCount=function(){return this.rsBlockData?this.dataCapacity/this.rsBlockData:1},t.prototype.getDataCapacity=function(){return this.dataCapacity},t.prototype.getErrorCodewords=function(){return this.errorCodewords},t.prototype.getDataLengthForInterleavedBlock=function(t){return this.rsBlockData},t.prototype.getErrorLengthForInterleavedBlock=function(t){return this.rsBlockError},t}(),th=function(t){function e(){return t.call(this,!1,1558,620,22,22,36,-1,62)||this}return $d(e,t),e.prototype.getInterleavedBlockCount=function(){return 10},e.prototype.getDataLengthForInterleavedBlock=function(t){return t<=8?156:155},e}(Qd),eh=[new Qd(!1,3,5,8,8,1),new Qd(!1,5,7,10,10,1),new Qd(!0,5,7,16,6,1),new Qd(!1,8,10,12,12,1),new Qd(!0,10,11,14,6,2),new Qd(!1,12,12,14,14,1),new Qd(!0,16,14,24,10,1),new Qd(!1,18,14,16,16,1),new Qd(!1,22,18,18,18,1),new Qd(!0,22,18,16,10,2),new Qd(!1,30,20,20,20,1),new Qd(!0,32,24,16,14,2),new Qd(!1,36,24,22,22,1),new Qd(!1,44,28,24,24,1),new Qd(!0,49,28,22,14,2),new Qd(!1,62,36,14,14,4),new Qd(!1,86,42,16,16,4),new Qd(!1,114,48,18,18,4),new Qd(!1,144,56,20,20,4),new Qd(!1,174,68,22,22,4),new Qd(!1,204,84,24,24,4,102,42),new Qd(!1,280,112,14,14,16,140,56),new Qd(!1,368,144,16,16,16,92,36),new Qd(!1,456,192,18,18,16,114,48),new Qd(!1,576,224,20,20,16,144,56),new Qd(!1,696,272,22,22,16,174,68),new Qd(!1,816,336,24,24,16,136,56),new Qd(!1,1050,408,18,18,36,175,68),new Qd(!1,1304,496,20,20,36,163,62),new th],rh=function(){function t(t){this.msg=t,this.pos=0,this.skipAtEnd=0;for(var e=t.split("").map((function(t){return t.charCodeAt(0)})),r=new es,n=0,o=e.length;n<o;n++){var i=String.fromCharCode(255&e[n]);if("?"===i&&"?"!==t.charAt(n))throw new Error("Message contains characters outside ISO-8859-1 encoding.");r.append(i)}this.msg=r.toString(),this.shape=0,this.codewords=new es,this.newEncoding=-1}return t.prototype.setSymbolShape=function(t){this.shape=t},t.prototype.setSizeConstraints=function(t,e){this.minSize=t,this.maxSize=e},t.prototype.getMessage=function(){return this.msg},t.prototype.setSkipAtEnd=function(t){this.skipAtEnd=t},t.prototype.getCurrentChar=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCurrent=function(){return this.msg.charCodeAt(this.pos)},t.prototype.getCodewords=function(){return this.codewords},t.prototype.writeCodewords=function(t){this.codewords.append(t)},t.prototype.writeCodeword=function(t){this.codewords.append(t)},t.prototype.getCodewordCount=function(){return this.codewords.length()},t.prototype.getNewEncoding=function(){return this.newEncoding},t.prototype.signalEncoderChange=function(t){this.newEncoding=t},t.prototype.resetEncoderSignal=function(){this.newEncoding=-1},t.prototype.hasMoreCharacters=function(){return this.pos<this.getTotalMessageCharCount()},t.prototype.getTotalMessageCharCount=function(){return this.msg.length-this.skipAtEnd},t.prototype.getRemainingCharacters=function(){return this.getTotalMessageCharCount()-this.pos},t.prototype.getSymbolInfo=function(){return this.symbolInfo},t.prototype.updateSymbolInfo=function(t){void 0===t&&(t=this.getCodewordCount()),(null==this.symbolInfo||t>this.symbolInfo.getDataCapacity())&&(this.symbolInfo=Qd.lookup(t,this.shape,this.minSize,this.maxSize,!0))},t.prototype.resetSymbolInfo=function(){this.symbolInfo=null},t}(),nh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),oh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nh(e,t),e.prototype.getEncodingMode=function(){return 3},e.prototype.encode=function(t){for(var e=new es;t.hasMoreCharacters();){var r=t.getCurrentChar();if(t.pos++,this.encodeChar(r,e),e.length()%3==0)if(this.writeNextTriplet(t,e),uh.lookAheadTest(t.getMessage(),t.pos,this.getEncodingMode())!==this.getEncodingMode()){t.signalEncoderChange(0);break}}this.handleEOD(t,e)},e.prototype.encodeChar=function(t,e){switch(t){case 13:e.append(0);break;case"*".charCodeAt(0):e.append(1);break;case">".charCodeAt(0):e.append(2);break;case" ".charCodeAt(0):e.append(3);break;default:t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)?e.append(t-48+4):t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)?e.append(t-65+14):uh.illegalCharacter(ts.getCharAt(t))}return 1},e.prototype.handleEOD=function(t,e){t.updateSymbolInfo();var r=t.getSymbolInfo().getDataCapacity()-t.getCodewordCount(),n=e.length();t.pos-=n,(t.getRemainingCharacters()>1||r>1||t.getRemainingCharacters()!==r)&&t.writeCodeword(254),t.getNewEncoding()<0&&t.signalEncoderChange(0)},e}(qd),ih=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ah=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ih(e,t),e.prototype.getEncodingMode=function(){return 2},e.prototype.encodeChar=function(t,e){if(t===" ".charCodeAt(0))return e.append(3),1;if(t>="0".charCodeAt(0)&&t<="9".charCodeAt(0))return e.append(t-48+4),1;if(t>="a".charCodeAt(0)&&t<="z".charCodeAt(0))return e.append(t-97+14),1;if(t<" ".charCodeAt(0))return e.append(0),e.append(t),2;if(t<="/".charCodeAt(0))return e.append(1),e.append(t-33),2;if(t<="@".charCodeAt(0))return e.append(1),e.append(t-58+15),2;if(t>="[".charCodeAt(0)&&t<="_".charCodeAt(0))return e.append(1),e.append(t-91+22),2;if(t==="`".charCodeAt(0))return e.append(2),e.append(0),2;if(t<="Z".charCodeAt(0))return e.append(2),e.append(t-65+1),2;if(t<=127)return e.append(2),e.append(t-123+27),2;e.append("1");var r=2;return r+=this.encodeChar(t-128,e)},e}(qd),sh=function(){function t(){}return t.randomize253State=function(t){var e=129+(149*t%253+1);return e<=254?e:e-254},t.encodeHighLevel=function(t,e,r,n,o){void 0===e&&(e=0),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=!1);var i=new qd,a=[new Yd,i,new ah,new oh,new Kd,new Zd],s=new rh(t);s.setSymbolShape(e),s.setSizeConstraints(r,n),t.startsWith(Wd)&&t.endsWith("")?(s.writeCodeword(236),s.setSkipAtEnd(2),s.pos+=7):t.startsWith(Xd)&&t.endsWith("")&&(s.writeCodeword(237),s.setSkipAtEnd(2),s.pos+=7);var u=0;for(o&&(i.encodeMaximal(s),u=s.getNewEncoding(),s.resetEncoderSignal());s.hasMoreCharacters();)a[u].encode(s),s.getNewEncoding()>=0&&(u=s.getNewEncoding(),s.resetEncoderSignal());var c=s.getCodewordCount();s.updateSymbolInfo();var l=s.getSymbolInfo().getDataCapacity();c<l&&0!==u&&5!==u&&4!==u&&s.writeCodeword("þ");var d=s.getCodewords();for(d.length()<l&&d.append(129);d.length()<l;)d.append(this.randomize253State(d.length()+1));return s.getCodewords().toString()},t.lookAheadTest=function(t,e,r){var n=this.lookAheadTestIntern(t,e,r);if(3===r&&3===n){for(var o=Math.min(e+3,t.length),i=e;i<o;i++)if(!this.isNativeX12(t.charCodeAt(i)))return 0}else if(4===r&&4===n)for(o=Math.min(e+4,t.length),i=e;i<o;i++)if(!this.isNativeEDIFACT(t.charCodeAt(i)))return 0;return n},t.lookAheadTestIntern=function(t,e,r){if(e>=t.length)return r;var n;0===r?n=[0,1,1,1,1,1.25]:(n=[1,2,2,2,2,2.25])[r]=0;for(var o=0,i=new Uint8Array(6),a=[];;){if(e+o===t.length){Va.fill(i,0),Va.fill(a,0);var s=this.findMinimums(n,a,Ha.MAX_VALUE,i),u=this.getMinimumCount(i);if(a[0]===s)return 0;if(1===u){if(i[5]>0)return 5;if(i[4]>0)return 4;if(i[2]>0)return 2;if(i[3]>0)return 3}return 1}var c=t.charCodeAt(e+o);if(o++,this.isDigit(c)?n[0]+=.5:this.isExtendedASCII(c)?(n[0]=Math.ceil(n[0]),n[0]+=2):(n[0]=Math.ceil(n[0]),n[0]++),this.isNativeC40(c)?n[1]+=2/3:this.isExtendedASCII(c)?n[1]+=8/3:n[1]+=4/3,this.isNativeText(c)?n[2]+=2/3:this.isExtendedASCII(c)?n[2]+=8/3:n[2]+=4/3,this.isNativeX12(c)?n[3]+=2/3:this.isExtendedASCII(c)?n[3]+=13/3:n[3]+=10/3,this.isNativeEDIFACT(c)?n[4]+=3/4:this.isExtendedASCII(c)?n[4]+=4.25:n[4]+=3.25,this.isSpecialB256(c)?n[5]+=4:n[5]++,o>=4){if(Va.fill(i,0),Va.fill(a,0),this.findMinimums(n,a,Ha.MAX_VALUE,i),a[0]<this.min(a[5],a[1],a[2],a[3],a[4]))return 0;if(a[5]<a[0]||a[5]+1<this.min(a[1],a[2],a[3],a[4]))return 5;if(a[4]+1<this.min(a[5],a[1],a[2],a[3],a[0]))return 4;if(a[2]+1<this.min(a[5],a[1],a[4],a[3],a[0]))return 2;if(a[3]+1<this.min(a[5],a[1],a[4],a[2],a[0]))return 3;if(a[1]+1<this.min(a[0],a[5],a[4],a[2])){if(a[1]<a[3])return 1;if(a[1]===a[3]){for(var l=e+o+1;l<t.length;){var d=t.charCodeAt(l);if(this.isX12TermSep(d))return 3;if(!this.isNativeX12(d))break;l++}return 1}}}}},t.min=function(t,e,r,n,o){var i=Math.min(t,Math.min(e,Math.min(r,n)));return void 0===o?i:Math.min(i,o)},t.findMinimums=function(t,e,r,n){for(var o=0;o<6;o++){var i=e[o]=Math.ceil(t[o]);r>i&&(r=i,Va.fill(n,0)),r===i&&(n[o]=n[o]+1)}return r},t.getMinimumCount=function(t){for(var e=0,r=0;r<6;r++)e+=t[r];return e||0},t.isDigit=function(t){return t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)},t.isExtendedASCII=function(t){return t>=128&&t<=255},t.isNativeC40=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isNativeText=function(t){return t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)},t.isNativeX12=function(t){return this.isX12TermSep(t)||t===" ".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0)},t.isX12TermSep=function(t){return 13===t||t==="*".charCodeAt(0)||t===">".charCodeAt(0)},t.isNativeEDIFACT=function(t){return t>=" ".charCodeAt(0)&&t<="^".charCodeAt(0)},t.isSpecialB256=function(t){return!1},t.determineConsecutiveDigitCount=function(t,e){void 0===e&&(e=0);for(var r=t.length,n=e;n<r&&this.isDigit(t.charCodeAt(n));)n++;return n-e},t.illegalCharacter=function(t){var e=Ha.toHexString(t.charCodeAt(0));throw e="0000".substring(0,4-e.length)+e,new Error("Illegal character: "+t+" (0x"+e+")")},t}(),uh=sh,ch=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lh=function(){function t(t){this.charset=t,this.name=t.name}return t.prototype.canEncode=function(t){try{return null!=Qa.encode(t,this.charset)}catch(t){return!1}},t}(),dh=function(){function t(t,e,r){var n,o,i,a,s,u;this.ENCODERS=["IBM437","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-6","ISO-8859-7","ISO-8859-8","ISO-8859-9","ISO-8859-10","ISO-8859-11","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","windows-1250","windows-1251","windows-1252","windows-1256","Shift_JIS"].map((function(t){return new lh(Hd.forName(t))})),this.encoders=[];var c=[];c.push(new lh(jd.ISO_8859_1));for(var l=null!=e&&e.name.startsWith("UTF"),d=0;d<t.length;d++){var h=!1;try{for(var f=(n=void 0,ch(c)),p=f.next();!p.done;p=f.next()){var g=p.value,m=t.charAt(d);if(m.charCodeAt(0)===r||g.canEncode(m)){h=!0;break}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(!h)try{for(var _=(i=void 0,ch(this.ENCODERS)),y=_.next();!y.done;y=_.next()){if((g=y.value).canEncode(t.charAt(d))){c.push(g),h=!0;break}}}catch(t){i={error:t}}finally{try{y&&!y.done&&(a=_.return)&&a.call(_)}finally{if(i)throw i.error}}h||(l=!0)}if(1!==c.length||l){this.encoders=[];var w=0;try{for(var v=ch(c),E=v.next();!E.done;E=v.next()){g=E.value;this.encoders[w++]=g}}catch(t){s={error:t}}finally{try{E&&!E.done&&(u=v.return)&&u.call(v)}finally{if(s)throw s.error}}}else this.encoders=[c[0]];var b=-1;if(null!=e)for(d=0;d<this.encoders.length;d++)if(null!=this.encoders[d]&&e.name===this.encoders[d].name){b=d;break}this.priorityEncoderIndex=b}return t.prototype.length=function(){return this.encoders.length},t.prototype.getCharsetName=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].name},t.prototype.getCharset=function(t){if(!(t<this.length()))throw new Error("index must be less than length");return this.encoders[t].charset},t.prototype.getECIValue=function(t){return this.encoders[t].charset.getValueIdentifier()},t.prototype.getPriorityEncoderIndex=function(){return this.priorityEncoderIndex},t.prototype.canEncode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return!0},t.prototype.encode=function(t,e){if(!(e<this.length()))throw new Error("index must be less than length");return Qa.encode(ts.getCharAt(t),this.encoders[e].name)},t}(),hh=function(){function t(t,e,r){this.fnc1=r;var n=new dh(t,e,r);if(1===n.length())for(var o=0;o<this.bytes.length;o++){var i=t.charAt(o).charCodeAt(0);this.bytes[o]=i===r?1e3:i}else this.bytes=this.encodeMinimally(t,n,r)}return t.prototype.getFNC1Character=function(){return this.fnc1},t.prototype.length=function(){return this.bytes.length},t.prototype.haveNCharacters=function(t,e){if(t+e-1>=this.bytes.length)return!1;for(var r=0;r<e;r++)if(this.isECI(t+r))return!1;return!0},t.prototype.charAt=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(this.isECI(t))throw new Error("value at "+t+" is not a character but an ECI");return this.isFNC1(t)?this.fnc1:this.bytes[t]},t.prototype.subSequence=function(t,e){if(t<0||t>e||e>this.length())throw new Error(""+t);for(var r=new es,n=t;n<e;n++){if(this.isECI(n))throw new Error("value at "+n+" is not a character but an ECI");r.append(this.charAt(n))}return r.toString()},t.prototype.isECI=function(t){if(t<0||t>=this.length())throw new Error(""+t);return this.bytes[t]>255&&this.bytes[t]<=999},t.prototype.isFNC1=function(t){if(t<0||t>=this.length())throw new Error(""+t);return 1e3===this.bytes[t]},t.prototype.getECIValue=function(t){if(t<0||t>=this.length())throw new Error(""+t);if(!this.isECI(t))throw new Error("value at "+t+" is not an ECI but a character");return this.bytes[t]-256},t.prototype.addEdge=function(t,e,r){(null==t[e][r.encoderIndex]||t[e][r.encoderIndex].cachedTotalSize>r.cachedTotalSize)&&(t[e][r.encoderIndex]=r)},t.prototype.addEdges=function(t,e,r,n,o,i){var a=t.charAt(n).charCodeAt(0),s=0,u=e.length();e.getPriorityEncoderIndex()>=0&&(a===i||e.canEncode(a,e.getPriorityEncoderIndex()))&&(u=(s=e.getPriorityEncoderIndex())+1);for(var c=s;c<u;c++)(a===i||e.canEncode(a,c))&&this.addEdge(r,n+1,new fh(a,e,c,o,i))},t.prototype.encodeMinimally=function(t,e,r){var n=t.length,o=new(fh[n+1][e.length()]);this.addEdges(t,e,o,0,null,r);for(var i=1;i<=n;i++){for(var a=0;a<e.length();a++)null!=o[i][a]&&i<n&&this.addEdges(t,e,o,i,o[i][a],r);for(a=0;a<e.length();a++)o[i-1][a]=null}var s=-1,u=Ha.MAX_VALUE;for(a=0;a<e.length();a++)if(null!=o[n][a]){var c=o[n][a];c.cachedTotalSize<u&&(u=c.cachedTotalSize,s=a)}if(s<0)throw new Error('Failed to encode "'+t+'"');for(var l=[],d=o[n][s];null!=d;){if(d.isFNC1())l.unshift(1e3);else{var h=e.encode(d.c,d.encoderIndex);for(i=h.length-1;i>=0;i--)l.unshift(255&h[i])}(null===d.previous?0:d.previous.encoderIndex)!==d.encoderIndex&&l.unshift(256+e.getECIValue(d.encoderIndex)),d=d.previous}var f=[];for(i=0;i<f.length;i++)f[i]=l[i];return f},t}(),fh=function(){function t(t,e,r,n,o){this.c=t,this.encoderSet=e,this.encoderIndex=r,this.previous=n,this.fnc1=o,this.c=t===o?1e3:t;var i=this.isFNC1()?1:e.encode(t,r).length;(null===n?0:n.encoderIndex)!==r&&(i+=3),null!=n&&(i+=n.cachedTotalSize),this.cachedTotalSize=i}return t.prototype.isFNC1=function(){return 1e3===this.c},t}(),ph=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){t[t.ASCII=0]="ASCII",t[t.C40=1]="C40",t[t.TEXT=2]="TEXT",t[t.X12=3]="X12",t[t.EDF=4]="EDF",t[t.B256=5]="B256"}(Gd||(Gd={})),function(t){function e(e,r,n,o,i){var a=t.call(this,e,r,n)||this;return a.shape=o,a.macroId=i,a}ph(e,t),e.prototype.getMacroId=function(){return this.macroId},e.prototype.getShapeHint=function(){return this.shape}}(hh);var gh=function(){function t(t){this.previous=t}return t.prototype.getPrevious=function(){return this.previous},t}(),mh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_h=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.value=r,o.bitCount=n,o}return mh(e,t),e.prototype.appendTo=function(t,e){t.appendBits(this.value,this.bitCount)},e.prototype.add=function(t,r){return new e(this,t,r)},e.prototype.addBinaryShift=function(t,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,t,r)},e.prototype.toString=function(){var t=this.value&(1<<this.bitCount)-1;return t|=1<<this.bitCount,"<"+Ha.toBinaryString(t|1<<this.bitCount).substring(1)+">"},e}(gh),yh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r,n){var o=t.call(this,e,0,0)||this;return o.binaryShiftStart=r,o.binaryShiftByteCount=n,o}yh(e,t),e.prototype.appendTo=function(t,e){for(var r=0;r<this.binaryShiftByteCount;r++)(0===r||31===r&&this.binaryShiftByteCount<=62)&&(t.appendBits(31,5),this.binaryShiftByteCount>62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)},e.prototype.addBinaryShift=function(t,r){return new e(this,t,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(_h);new _h(null,0,0);var wh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(t){var e,r;try{for(var n=wh(t),o=n.next();!o.done;o=n.next()){var i=o.value;Va.fill(i,-1)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15}(Va.createInt32Array(6,6)),function(t){var e=ts.getCharCode(" "),r=ts.getCharCode("."),n=ts.getCharCode(",");t[0][e]=1;for(var o=ts.getCharCode("Z"),i=ts.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=ts.getCharCode("z"),u=ts.getCharCode("a");for(a=u;a<=s;a++)t[1][a]=a-u+2;t[2][e]=1;var c=ts.getCharCode("9"),l=ts.getCharCode("0");for(a=l;a<=c;a++)t[2][a]=a-l+2;t[2][n]=12,t[2][r]=13;for(var d=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""],h=0;h<d.length;h++)t[3][ts.getCharCode(d[h])]=h;var f=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(h=0;h<f.length;h++)ts.getCharCode(f[h])>0&&(t[4][ts.getCharCode(f[h])]=h)}(Va.createInt32Array(5,256));var vh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Eh=function(t){function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return vh(e,t),e.makeBufferFromCanvasImageData=function(t){var r;try{r=t.getContext("2d",{willReadFrequently:!0})}catch(e){r=t.getContext("2d")}if(!r)throw new Error("Couldn't get canvas context.");var n=r.getImageData(0,0,t.width,t.height);return e.toGrayscaleBuffer(n.data,t.width,t.height)},e.toGrayscaleBuffer=function(t,e,r){for(var n=new Uint8ClampedArray(e*r),o=0,i=0,a=t.length;o<a;o+=4,i++){var s=void 0;if(0===t[o+3])s=255;else s=306*t[o]+601*t[o+1]+117*t[o+2]+512>>10;n[i]=s}return n},e.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new Oa("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length<r&&(e=new Uint8ClampedArray(r)),e.set(this.buffer.slice(n,n+r))),e},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(e,r,n,o){return t.prototype.crop.call(this,e,r,n,o),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new ds(this)},e.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var t=this.canvas.ownerDocument.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height,this.tempCanvasElement=t}return this.tempCanvasElement},e.prototype.rotate=function(t){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var n=t*e.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(n))*o+Math.abs(Math.sin(n))*i),s=Math.ceil(Math.abs(Math.sin(n))*o+Math.abs(Math.cos(n))*i);r.width=a,r.height=s;var u=r.getContext("2d");if(!u)throw new Error("Could not create a Canvas Context element.");return u.translate(a/2,s/2),u.rotate(n),u.drawImage(this.canvas,o/-2,i/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(cs);function bh(){return"undefined"!=typeof navigator}function Ah(){return!!(bh()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var Ch=function(){return Ch=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ch.apply(this,arguments)},xh=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},Ih=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Sh=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Th={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},Dh=function(){function t(t,e,r){void 0===e&&(e=new Map),void 0===r&&(r={}),this.reader=t,this.hints=e,this.options=Ch(Ch({},Th),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(t){this.hints.set(Wa.POSSIBLE_FORMATS,t)},enumerable:!1,configurable:!0}),t.addVideoSource=function(t,e){try{t.srcObject=e}catch(t){console.error("got interrupted by new loading request")}},t.mediaStreamSetTorch=function(t,e){return xh(this,void 0,void 0,(function(){return Ih(this,(function(r){switch(r.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return r.sent(),[2]}}))}))},t.mediaStreamIsTorchCompatible=function(e){var r,n,o=e.getVideoTracks();try{for(var i=Sh(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(t){return console.error(t),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},t.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new Ta("element with id '".concat(t,"' not found"));if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new Ta("element with id '".concat(t,"' must be an ").concat(e," element"));return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if("string"==typeof e)return t.getMediaElement(e,"video");if(!e&&"undefined"!=typeof document){var r=document.createElement("video");return r.width=200,r.height=200,r}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if("string"==typeof e)return t.getMediaElement(e,"img");if(void 0===e){var r=document.createElement("img");return r.width=200,r.height=200,r}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var r=t.createVideoElement(e);return r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},t.createBinaryBitmapFromCanvas=function(t){var e=new Eh(t),r=new us(e);return new Ra(r)},t.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},t.getMediaElementDimensions=function(t){if(t instanceof HTMLVideoElement)return{height:t.videoHeight,width:t.videoWidth};if(t instanceof HTMLImageElement)return{height:t.naturalHeight||t.height,width:t.naturalWidth||t.width};throw new Error("Couldn't find the Source's dimensions!")},t.createCaptureCanvas=function(e){if(!e)throw new Ta("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var r=document.createElement("canvas"),n=t.getMediaElementDimensions(e),o=n.width,i=n.height;return r.style.width=o+"px",r.style.height=i+"px",r.width=o,r.height=i,r},t.tryPlayVideo=function(e){return xh(this,void 0,void 0,(function(){var r;return Ih(this,(function(n){switch(n.label){case 0:if(null==e?void 0:e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[2,!0];case 3:return r=n.sent(),console.warn("It was not possible to play the video.",r),[2,!1];case 4:return[2]}}))}))},t.createCanvasFromMediaElement=function(e){var r=t.createCaptureCanvas(e),n=r.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(n,e),r},t.createBinaryBitmapFromMediaElem=function(e){var r=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(r)},t.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},t.listVideoInputDevices=function(){return xh(this,void 0,void 0,(function(){var t,e,r,n,o,i,a,s,u,c,l,d;return Ih(this,(function(h){switch(h.label){case 0:if(!bh())throw new Error("Can't enumerate devices, navigator is not present.");if(!Ah())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=h.sent(),e=[];try{for(r=Sh(t),n=r.next();!n.done;n=r.next())o=n.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device ".concat(e.length+1),u=o.groupId,c={deviceId:a,label:s,kind:i,groupId:u},e.push(c))}catch(t){l={error:t}}finally{try{n&&!n.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return[2,e]}}))}))},t.findDeviceById=function(e){return xh(this,void 0,void 0,(function(){var r;return Ih(this,(function(n){switch(n.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(r=n.sent())?[2,r.find((function(t){return t.deviceId===e}))]:[2]}}))}))},t.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch(e){t.src=""}t&&t.removeAttribute("src")}},t.releaseAllStreams=function(){0!==t.streamTracker.length&&t.streamTracker.forEach((function(t){t.getTracks().forEach((function(t){return t.stop()}))})),t.streamTracker=[]},t.playVideoOnLoadAsync=function(e,r){return xh(this,void 0,void 0,(function(){return Ih(this,(function(n){switch(n.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return n.sent()?[2,!0]:[2,new Promise((function(n,o){var i=setTimeout((function(){t.isVideoPlaying(e)||(o(!1),e.removeEventListener("canplay",a))}),r),a=function(){t.tryPlayVideo(e).then((function(t){clearTimeout(i),e.removeEventListener("canplay",a),n(t)}))};e.addEventListener("canplay",a)}))]}}))}))},t.attachStreamToVideo=function(e,r,n){return void 0===n&&(n=5e3),xh(this,void 0,void 0,(function(){var o;return Ih(this,(function(i){switch(i.label){case 0:return o=t.prepareVideoElement(r),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}}))}))},t._waitImageLoad=function(e){return new Promise((function(r,n){var o=setTimeout((function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),n())}),1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),r()};e.addEventListener("load",i)}))},t.checkCallbackFnOrThrow=function(t){if(!t)throw new Ta("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(t){t.getVideoTracks().forEach((function(t){return t.stop()})),t=void 0},t.prototype.decode=function(e){var r=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(r)},t.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},t.prototype.decodeFromCanvas=function(e){var r=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(r)},t.prototype.decodeFromImageElement=function(e){return xh(this,void 0,void 0,(function(){var r;return Ih(this,(function(n){switch(n.label){case 0:if(!e)throw new Ta("An image element must be provided.");return r=t.prepareImageElement(e),[4,this._decodeOnLoadImage(r)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeFromImageUrl=function(e){return xh(this,void 0,void 0,(function(){var r;return Ih(this,(function(n){switch(n.label){case 0:if(!e)throw new Ta("An URL must be provided.");(r=t.prepareImageElement()).src=e,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(r)];case 2:return[2,n.sent()];case 3:return t.destroyImageElement(r),[7];case 4:return[2]}}))}))},t.prototype.decodeFromConstraints=function(e,r,n){return xh(this,void 0,void 0,(function(){var o,i;return Ih(this,(function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(n),[4,this.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,r,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}}))}))},t.prototype.decodeFromStream=function(e,r,n){return xh(this,void 0,void 0,(function(){var o,i,a,s,u,c,l,d,h=this;return Ih(this,(function(f){switch(f.label){case 0:return t.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,r,o)];case 1:return i=f.sent(),a=function(){t.disposeMediaStream(e),t.cleanVideoSource(i)},s=this.scan(i,n,a),u=e.getVideoTracks(),c=Ch(Ch({},s),{stop:function(){s.stop()},streamVideoConstraintsApply:function(t,e){return xh(this,void 0,void 0,(function(){var r,n,o,i,a,s;return Ih(this,(function(c){switch(c.label){case 0:r=e?u.filter(e):u,c.label=1;case 1:c.trys.push([1,6,7,8]),n=Sh(r),o=n.next(),c.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(t)];case 3:c.sent(),c.label=4;case 4:return o=n.next(),[3,2];case 5:return[3,8];case 6:return i=c.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(t){return u.find(t).getConstraints()},streamVideoSettingsGet:function(t){return u.find(t).getSettings()},streamVideoCapabilitiesGet:function(t){return u.find(t).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(l=null==u?void 0:u.find((function(e){return t.mediaStreamIsTorchCompatibleTrack(e)})),d=function(e){return xh(h,void 0,void 0,(function(){return Ih(this,(function(r){switch(r.label){case 0:return[4,t.mediaStreamSetTorch(l,e)];case 1:return r.sent(),[2]}}))}))},c.switchTorch=d,c.stop=function(){return xh(h,void 0,void 0,(function(){return Ih(this,(function(t){switch(t.label){case 0:return s.stop(),[4,d(!1)];case 1:return t.sent(),[2]}}))}))}),[2,c]}}))}))},t.prototype.decodeFromVideoDevice=function(e,r,n){return xh(this,void 0,void 0,(function(){var o;return Ih(this,(function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(n),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,r,n)];case 1:return[2,i.sent()]}}))}))},t.prototype.decodeFromVideoElement=function(e,r){return xh(this,void 0,void 0,(function(){var n,o;return Ih(this,(function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ta("A video element must be provided.");return n=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,r)]}}))}))},t.prototype.decodeFromVideoUrl=function(e,r){return xh(this,void 0,void 0,(function(){var n,o,i;return Ih(this,(function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(r),!e)throw new Ta("An URL must be provided.");return(n=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,r,o)]}}))}))},t.prototype.decodeOnceFromConstraints=function(t,e){return xh(this,void 0,void 0,(function(){var r;return Ih(this,(function(n){switch(n.label){case 0:return[4,this.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromStream=function(e,r){return xh(this,void 0,void 0,(function(){var n,o;return Ih(this,(function(i){switch(i.label){case 0:return n=Boolean(r),[4,t.attachStreamToVideo(e,r)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return n||t.cleanVideoSource(o),[7];case 5:return[2]}}))}))},t.prototype.decodeOnceFromVideoDevice=function(t,e){return xh(this,void 0,void 0,(function(){var r;return Ih(this,(function(n){switch(n.label){case 0:return r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.decodeOnceFromVideoElement=function(e){return xh(this,void 0,void 0,(function(){var r,n;return Ih(this,(function(o){switch(o.label){case 0:if(!e)throw new Ta("A video element must be provided.");return r=t.prepareVideoElement(e),n=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,n)];case 1:return o.sent(),[4,this.scanOneResult(r)];case 2:return[2,o.sent()]}}))}))},t.prototype.decodeOnceFromVideoUrl=function(e){return xh(this,void 0,void 0,(function(){var r,n;return Ih(this,(function(o){switch(o.label){case 0:if(!e)throw new Ta("An URL must be provided.");(r=t.prepareVideoElement()).src=e,n=this.decodeOnceFromVideoElement(r),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(r),[7];case 4:return[2]}}))}))},t.prototype.scanOneResult=function(t,e,r,n){var o=this;return void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===n&&(n=!0),new Promise((function(i,a){o.scan(t,(function(t,o,s){if(t)return i(t),void s.stop();if(o){if(o instanceof os&&e)return;if(o instanceof Na&&r)return;if(o instanceof Ya&&n)return;s.stop(),a(o)}}))}))},t.prototype.scan=function(e,r,n){var o=this;t.checkCallbackFnOrThrow(r);var i,a=t.createCaptureCanvas(e);try{i=a.getContext("2d",{willReadFrequently:!0})}catch(t){i=a.getContext("2d")}if(!i)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){i=void 0,a=void 0},c=!1,l={stop:function(){c=!0,clearTimeout(s),u(),n&&n()}},d=function(){if(!c)try{t.drawImageOnCanvas(i,e);var h=o.decodeFromCanvas(a);r(h,void 0,l),s=setTimeout(d,o.options.delayBetweenScanSuccess)}catch(t){if(r(void 0,t,l),t instanceof Na||t instanceof Ya||t instanceof os)return void(s=setTimeout(d,o.options.delayBetweenScanAttempts));u(),n&&n(t)}};return d(),l},t.prototype._decodeOnLoadImage=function(e){return xh(this,void 0,void 0,(function(){return Ih(this,(function(r){switch(r.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:r.sent(),r.label=2;case 2:return[2,this.decode(e)]}}))}))},t.prototype.getUserMedia=function(e){return xh(this,void 0,void 0,(function(){var r;return Ih(this,(function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=n.sent(),t.streamTracker.push(r),[2,r]}}))}))},t.streamTracker=[],t}(),Oh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new $s,e,r)||this}Oh(e,t)}(Dh);var Rh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Nc(e),e,r)||this}Rh(e,t)}(Dh);var Mh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new qc,e,r)||this}Mh(e,t)}(Dh);var Nh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),kh=function(t){function e(e,r){var n=this,o=new Ed;return o.setHints(e),(n=t.call(this,o,e,r)||this).reader=o,n}return Nh(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(t){this.hints.set(Wa.POSSIBLE_FORMATS,t),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(t){return this.reader.decodeWithState(t)},e.prototype.setHints=function(t){this.hints=t,this.reader.setHints(this.hints)},e}(Dh),Ph=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new _d,e,r)||this}Ph(e,t)}(Dh);var Bh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){function e(e,r){return t.call(this,new Tl,e,r)||this}Bh(e,t)}(Dh);const Fh=[Es.PDF_417,Es.QR_CODE];class Lh{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fh;this.reader=new kh,this.formats=t,this.reader.possibleFormats=t,ma("Barcode detector initialized",t.map((t=>Es[t])))}getXYWidthHeight(t){if(!t||0===t.length)return{x:0,y:0,width:0,height:0};let e=1/0,r=-1/0,n=1/0,o=-1/0;for(const i of t){const t=i.getX(),a=i.getY();t<e&&(e=t),t>r&&(r=t),a<n&&(n=a),a>o&&(o=a)}return{x:e,y:n,width:r-e,height:o-n}}detect(t){let e;if(t instanceof HTMLCanvasElement)e=t;else{e=document.createElement("canvas"),e.width=t.width,e.height=t.height;const r=e.getContext("2d");if(!r)return ma("Warning: Unable to get 2D context for canvas."),[];null==r||r.drawImage(t,0,0)}const r=[],n=new Set,o=t=>{try{const t=this.reader.decodeFromCanvas(e);ma("Barcode detected:",t);const o=this.getXYWidthHeight(t.getResultPoints()),i=Es[t.getBarcodeFormat()],a=t.getText(),s=`${i}:${a}`;if(n.has(s))return;n.add(s);const u={class:i,score:1,extra:a,x:o.x,y:o.y,width:o.width,height:o.height};r.push(u),ma("Barcode result:",u)}catch(e){ma(void 0!==t?`Barcode not detected for format ${Es[t]}`:"Barcode not detected"),"NotFoundException"!==(null==e?void 0:e.name)&&ma("Barcode detection error:",e)}};if(0===this.formats.length)return o(),r;for(const t of this.formats){const e=new Map;e.set(Wa.POSSIBLE_FORMATS,[t]),e.set(Wa.TRY_HARDER,!0),this.reader.setHints(e),o(t)}return r}}var zh;!function(t){t.NOT_AVAILABLE="notAvailable",t.LOADING="loading",t.LOADED="loaded"}(zh||(zh={}));const Uh={[va.DOCUMENT_DETECTOR]:{status:zh.LOADING},[va.BLUR_GLARE_CLASSIFIER]:{status:zh.LOADING},[va.FACE_LANDMARK]:{status:zh.LOADING}};let Vh=null;function Hh(t){if(Vh)return ma("Reusing existing barcode detector instance"),Vh;try{return Vh=new Lh((t=>{const e={Aztec:Es.AZTEC,Codabar:Es.CODABAR,Code39:Es.CODE_39,Code93:Es.CODE_93,Code128:Es.CODE_128,DataMatrix:Es.DATA_MATRIX,EAN8:Es.EAN_8,EAN13:Es.EAN_13,ITF:Es.ITF,MaxiCode:Es.MAXICODE,PDF417:Es.PDF_417,QRCode:Es.QR_CODE,UPCA:Es.UPC_A,UPCE:Es.UPC_E};return t.map((t=>e[t])).filter((t=>void 0!==t))})(t)),ma("Created new barcode detector instance"),Vh}catch(t){throw ma("Error initializing barcode model",t),pa("Error initializing barcode model","barcode_model_not_supported","init"),t}}const jh=[va.DOCUMENT_DETECTOR,va.BLUR_GLARE_CLASSIFIER],Gh=async()=>{let t=!1;for(;!t;){const e=Object.values(Uh).filter((t=>t.status===zh.NOT_AVAILABLE));if(e.length>0)throw new Error(`Model not available: ${e.join(", ")}`);if(t=jh.every((t=>Uh[t].status===zh.LOADED)),t)return!0;await new Promise((t=>setTimeout(t,100)))}},Wh=t=>"function"==typeof t,Xh=function(t){};Gi.events.on(Gi.events.MODULE_INITIALIZED,(function(){const{clientId:t,IDV:e}=Gi.moduleMetadata.getInitConfig();if(!t||!e)return!1;const r=(null==e?void 0:e.serverPath)&&(n=null==e?void 0:e.serverPath,i="/verify",(null==n?void 0:n.endsWith(i))?n.slice(0,n.length-i.length):n);var n,i;if(!r)throw new Error("Failed to load SDK: serverPath param required");Io.BASE=r,ia.dispatch("setClientId",t),ia.dispatch("setRootElement",(null==e?void 0:e.rootElement)||"root-element"),ia.dispatch("setServerPath",null==e?void 0:e.serverPath),ia.dispatch("setLanguage",null==e?void 0:e.language),ia.dispatch("setCallback",null==e?void 0:e.callback),ia.dispatch("setConsentVersion",null==e?void 0:e.consentVersion),ia.dispatch("setMarkdownSupportText",null==e?void 0:e.markdownSupportText),ia.dispatch("setVideoCaptureSettings",null==e?void 0:e.videoCaptureSettings),ia.dispatch("setCdnHost",null==e?void 0:e.cdnHost),ia.dispatch("setIsImageSigningEnabled",null==e?void 0:e.isImageSigningEnabled),(null==e?void 0:e.callbacks)&&ef(e);return ia.dispatch("setStartToken",null==e?void 0:e.startToken),ra(ia.state.clientId).then((t=>{!async function(t){(null==t?void 0:t.strings)&&ya.overrideLanguage(t.strings);if(null==t?void 0:t.autocapture_enabled){if("serviceWorker"in navigator)return ia.dispatch("setAutoCaptureSettings",{enabled:!0,settings:t.autocapture_settings}),ma("service worker available"),void navigator.serviceWorker.addEventListener("message",(t=>{if(t.data&&"MODEL_READY"===t.data.type){const e=t.data.modelName;Uh[e]={status:zh.LOADED,imageDimensions:t.data.imageDimensions,loadingStats:o(o({},t.data.stats),{},{modelName:e})}}else if(t.data&&"MODEL_LOAD_ERROR"===t.data.type){const e=t.data.modelName;Uh[e].status=zh.NOT_AVAILABLE,pa(`${t.data.modelName} error: ${t.data.error}`,"model_load_error","init")}}));pa("service worker not available","service_worker_not_available","init")}ia.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:t.autocapture_settings})}(t)})),function(t){$i({type:"init",step:t})}("init"),!0})),Gi.events.on(Wi,(function(t){switch(fa.handelEventData(t),tf(t),t.type){case"session-granted":Yh({session:ia.state.sessionId});break;case"session-id-acquired":Zh({session:ia.state.sessionId});break;case"capture-image-result":qh({session:ia.state.sessionId},t.imageType);break;case"start-verification-processing":Kh({session:ia.state.sessionId});break;case"verification-complete":$h({session:ia.state.sessionId});break;case"capture-error":case"failed-to-init-drs":case"api-request-error":Qh({session:ia.state.sessionId},t.errorCode,t.error);break;case"verification-recapture":Jh({session:ia.state.sessionId},t.reason)}}));let Yh=Xh,Zh=Xh,qh=Xh,Kh=Xh,$h=Xh,Jh=Xh,Qh=Xh,tf=t=>{};const ef=t=>{let{callbacks:e,callback:r}=t;Wh(e.sessionGranted)&&(Yh=e.sessionGranted),Wh(e.sessionStarted)&&(Zh=e.sessionStarted),Wh(e.imageSubmitted)&&(qh=e.imageSubmitted),Wh(e.processing)&&(Kh=e.processing),Wh(e.completed)&&($h=e.completed),Wh(e.recapture)&&(Jh=e.recapture),Wh(e.error)&&(Qh=e.error),Wh(r)&&(tf=r)};async function rf(t,e,r){Io.HEADERS=Bo(r,e);var n;return(await(n=t,ea({method:"GET",url:`/verify/api/v1/verification/${n}/status`,path:{sid:n},errors:{404:"Session not found"}},"processing"))).body}function nf(t){try{return JSON.parse(t)}catch(t){return console.error(t),null}}async function of(t,e,r,n){Io.HEADERS=Bo(e);const o=await(i={start_token:t,accessed_from_desktop:!1,client_type:Oo.client_type.MOBILE_SDK,consent:{granted:!0,document_id:r},image_signing_public_key:n},ea({method:"POST",url:"/verify/api/v1/verification/start",headers:{},body:i,mediaType:"application/json"},"init"));var i;return{sessionId:o.body.session_id,userToken:o.body.user_token,requiredImages:o.body.required_images}}async function af(t,e,r){let n,o,i;if(n)try{n=Zi(Yi);const t=JSON.parse(n);o=t.sessionId,i=t.userToken}catch(t){}try{let u;if(i){u=(await rf(o,i,r)).missing_images}else{const c=Gi.crypto.createCryptoBinding("sign"),l=await c.getPublicData(),d=await of(t,r,e,l.publicKey);o=d.sessionId,i=d.userToken,u=d.requiredImages,n=JSON.stringify({sessionId:o,userToken:i}),a=Yi,s=n,sessionStorage.setItem(a,s)}return{requiredImages:u,sessionId:o.toString(),userToken:i.toString()}}catch(t){throw console.log("Error starting session"),console.error(t),t}var a,s}function sf(t){let{tagName:e,style:r,id:n="",className:o="",testid:i,options:a}=t;const s=document.createElement(e,a);return s.id=n,s.className=o,s.setAttribute("data-auto",i+"-auto"),Object.keys(r).forEach((t=>{s.style[t]=r[t]})),s}function uf(t,e){Array.isArray(e)?e.forEach((e=>{t.appendChild(e)})):t.appendChild(e)}const cf=async(t,e,r,n,o,i,a)=>{var s,u,c,l,d,h,f;Io.HEADERS=Bo(r,e);const p=Ro.UAParser();let g;if(ia.state.isImageSigningEnabled){const t=Gi.crypto.createCryptoBinding("sign");g=await t.sign(n.data)}const m=await(_=t,y={image:{format:n.format,image_type:i,content:n.data,capture_margins:n.captureMargins,signature:g,raw_barcode_data:a},device_info:{model:null===(s=null==p?void 0:p.device)||void 0===s?void 0:s.model,type:null===(u=null==p?void 0:p.device)||void 0===u?void 0:u.type,manufacturer:null===(c=null==p?void 0:p.device)||void 0===c?void 0:c.vendor,os:null===(l=null==p?void 0:p.os)||void 0===l?void 0:l.name,os_version:null===(d=null==p?void 0:p.os)||void 0===d?void 0:d.version,browser:null===(h=null==p?void 0:p.browser)||void 0===h?void 0:h.name,browser_version:null===(f=null==p?void 0:p.browser)||void 0===f?void 0:f.version,used_camera:null==o?void 0:o.selectedCamera,cameras:null==o?void 0:o.camerasInfo}},ea({method:"POST",url:"/verify/api/v1/verification/{sid}/images",path:{sid:_},body:y,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"}},y.image.image_type));var _,y;const w=function(t,e){const r=[...t].find((t=>t.includes(e)));return void 0!==r?r[1]:void 0}(m.headers,"x-ts-processing-time-ms");return"ok"!==m.body.feedback&&console.error("Error",m),{missing_images:m.body.missing_images,feedback:m.body.feedback,custom_feedback:m.body.custom_feedback,has_barcode:m.body.has_barcode,supported_barcode_symbologies:m.body.supported_barcode_symbologies,serverProcessingTime:w}},lf=()=>{const t=document.getElementById("overlay-frame");if(t){const e=t.getBoundingClientRect(),r=(3840-screen.width)/2,n=(2160-screen.height)/2;return{top:n+e.top,bottom:n+e.bottom,right:r+e.right,left:r+e.left}}},df=t=>["document_front","document_back"].includes(t)?"environment":"user";function hf(t){switch(t){case"document_front":return To.image_type.DOCUMENT_FRONT;case"document_back":return To.image_type.DOCUMENT_BACK;case"selfie":return To.image_type.SELFIE}}var ff={},pf={get exports(){return ff},set exports(t){ff=t}};pf.exports=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,r){r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a}));var n=r(1),o=r(7);r.d(e,"a",(function(){return o.a})),r.d(e,"d",(function(){return n.b}));var i=n.a.FACING_MODES,a=n.a.IMAGE_TYPES},function(t,e,r){var n=r(6);r.d(e,"a",(function(){return n.a}));var o=r(2);r.d(e,"b",(function(){return o.a}))},function(t,e,r){function n(t,e){if(!(e>=0&&e<=1))throw new Error(e+" is invalid imageCompression, choose between: [0, 1]");if(!h.f.includes(t))throw new Error(t+" is invalid imageType, choose between: "+h.f.join(", "));return!0}function o(t,e){var r={};try{n(t,e),r.imageType=t,r.imageCompression=e}catch(t){console.error(t),console.error("default value of "+h.c.PNG+" is used"),r.imageType=h.c.PNG,r.imageCompression=null}return r}function i(){var t=window.navigator.platform,e=window.navigator.userAgent;return t||e}function a(){return"ontouchend"in document}function s(t,e,r){var n=t*parseFloat(r);return{imageWidth:n,imageHeight:e/(t/n)}}function u(t,e,r){return o(e,r).imageType===h.c.JPG?r?t.toDataURL(h.b[h.c.JPG],r):t.toDataURL(h.b[h.c.JPG]):t.toDataURL(h.b[e])}function c(t,e){return t||e}function l(){var t=i();if(/iPad|iPhone|iPod/.test(t))return!0;var e=a();return!(!/Mac/.test(t)||!e)}function d(){return{userAgent:window.navigator.userAgent,platform:window.navigator.platform,_getStringWithPlatform:i(),_getHasTouchEvents:a(),getIsIOS:l()}}e.c=s,e.b=u,e.e=c,e.d=l,e.a=d;var h=r(3)},function(t,e,r){function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"e",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"f",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return l}));var o,i=["user","environment"],a={USER:"user",ENVIRONMENT:"environment"},s=["jpg","png"],u={PNG:"png",JPG:"jpg"},c=(n(o={},"jpg","image/jpeg"),n(o,"png","image/png"),o),l={audio:!1,video:!0}},function(t,e,r){t.exports=r(5)},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);r.d(e,"FACING_MODES",(function(){return n.b})),r.d(e,"IMAGE_TYPES",(function(){return n.c})),r.d(e,"_getDebugPlatformInfo",(function(){return n.d}));var o=r(9);r.d(e,"downloadPhoto",(function(){return o.a})),e.default=n.a},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return s}));var o=r(2),i=r(3),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=function(){function t(){n(this,t)}return a(t,null,[{key:"getDataUri",value:function(t,e){var r=e.sizeFactor,n=e.imageType,i=e.imageCompression,a=e.isImageMirror,s=t.videoWidth,u=t.videoHeight,c=Object(o.c)(s,u,r),l=c.imageWidth,d=c.imageHeight,h=document.createElement("canvas");h.width=l,h.height=d;var f=h.getContext("2d");return a&&f.setTransform(-1,0,0,1,h.width,0),f.drawImage(t,0,0,l,d),Object(o.b)(h,n,i)}},{key:"getWindowURL",value:function(){return window.URL||window.webkitURL||window.mozURL||window.msURL}},{key:"getNavigatorMediaDevices",value:function(){var t=null,e=!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia),r=!(!navigator.mozGetUserMedia&&!navigator.webkitGetUserMedia);if(e)t=navigator.mediaDevices;else if(r){var n=navigator.mozGetUserMedia||navigator.webkitGetUserMedia,o={getUserMedia:function(t){return new Promise((function(e,r){n.call(navigator,t,e,r)}))}};t=Object.assign(n,o)}return t}},{key:"isSupportedFacingMode",value:function(){return t.getNavigatorMediaDevices().getSupportedConstraints().facingMode}},{key:"getIdealConstraints",value:function(e,r){if(!Object(o.e)(e,r))return i.d;var n=t.getNavigatorMediaDevices().getSupportedConstraints();if(!n.width||!n.height)return console.error("Constraint width or height not supported! fallback to default resolution"),i.d;var a=void 0,s=void 0;return e&&(i.e.includes(e)?a=e:s={exact:e}),{audio:!1,video:{facingMode:a,deviceId:s,width:r&&r.width,height:r&&r.height}}}},{key:"getMaxResolutionConstraints",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments[1];console.warn("getMaxResolutionConstraints() numberOfMaxResolutionTry:",r);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}}],i=t.getIdealConstraints(e,{});if(0===r)return Object(o.d)()?(console.warn("fallback to iOS constraints"),t.getIdealConstraints(e,{width:{min:640,ideal:3840},height:{min:480,ideal:2160}})):(i.video.advanced=n,i);if(r<n.length){var a=n.slice(0,-r);return i.video.advanced=a,i}return null}},{key:"FACING_MODES",get:function(){return i.a}},{key:"IMAGE_TYPES",get:function(){return i.c}}]),t}()},function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return u}));var o=r(1),i=r(8),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=o.a.IMAGE_TYPES.PNG,u=function(){function t(e){n(this,t),this.videoElement=e,this.stream=null,this.numberOfMaxResolutionTry=0,this.settings=null,this.cameras=[],this.windowURL=o.a.getWindowURL(),this.mediaDevices=o.a.getNavigatorMediaDevices()}return a(t,[{key:"_getStreamDevice",value:function(t,e){var r=this;return new Promise((function(n,i){var a=o.a.getIdealConstraints(t,e);r.mediaDevices.getUserMedia(a).then((function(t){r._gotStream(t),n(t)})).catch((function(t){i(t)}))}))}},{key:"_getStreamDeviceMaxResolution",value:function(t){var e=this,r=o.a.getMaxResolutionConstraints(t,this.numberOfMaxResolutionTry);if(null==r){var n={};return this._getStreamDevice(t,n)}return new Promise((function(n,o){e.mediaDevices.getUserMedia(r).then((function(t){e._gotStream(t),n(t)})).catch((function(r){setTimeout((function(){e.numberOfMaxResolutionTry+=1,e._getStreamDeviceMaxResolution(t).catch((function(){o(r)}))}),20)}))}))}},{key:"_setVideoSrc",value:function(t){if("srcObject"in this.videoElement)this.videoElement.srcObject=t;else{var e=this.windowURL.createObjectURL(t);this.videoElement.src=e}}},{key:"_setSettings",value:function(t){this.settings=null;var e=t&&t.getTracks?t.getTracks():[];e.length>0&&e[0].getSettings&&(this.settings=e[0].getSettings())}},{key:"_enumerateCamerasPromise",value:function(){var t=this;return new Promise((function(e,r){var n=[];t.mediaDevices.enumerateDevices().then((function(t){t.forEach((function(t){"videoinput"===t.kind&&t.deviceId&&n.push(t)})),e(n)})).catch((function(t){r(t)}))}))}},{key:"_gotStream",value:function(t){this.stream=t,this._setSettings(t),this._setVideoSrc(t)}},{key:"getCameraSettings",value:function(){return this.settings}},{key:"enumerateCameras",value:function(){var t=this;return this.stream?this._enumerateCamerasPromise():this.stopCamera().then((function(){})).catch((function(){})).then((function(){var e={video:!0};return t.mediaDevices.getUserMedia(e).then((function(t){setTimeout((function(){t.getTracks().forEach((function(t){t.stop()}))}),20)})).then((function(){})).catch((function(){})).then((function(){return t._enumerateCamerasPromise()}))}))}},{key:"startCamera",value:function(t,e){var r=this;return this.stopCamera().then((function(){})).catch((function(){})).then((function(){return r._getStreamDevice(t,e)}))}},{key:"startCameraMaxResolution",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.numberOfMaxResolutionTry=0,this.stopCamera().then((function(){})).catch((function(){})).then((function(){return t._getStreamDeviceMaxResolution(e)}))}},{key:"getDataUri",value:function(t){var e={sizeFactor:void 0===t.sizeFactor?i.c:t.sizeFactor,imageType:void 0===t.imageType?s:t.imageType,imageCompression:void 0===t.imageCompression?i.a:t.imageCompression,isImageMirror:void 0===t.isImageMirror?i.b:t.isImageMirror};return o.a.getDataUri(this.videoElement,e)}},{key:"stopCamera",value:function(){var t=this;return new Promise((function(e,r){t.stream&&(t.stream.getTracks().forEach((function(t){t.stop()})),t.videoElement.src="",t.stream=null,t._setSettings(null),e()),r(Error("no stream to stop!"))}))}}]),t}()},function(t,e,r){r.d(e,"c",(function(){return n})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i}));var n=1,o=null,i=!1},function(t,e,r){var n=r(10);r.d(e,"a",(function(){return n.a}))},function(t,e,r){function n(t){for(var e=atob(t.split(",")[1]),r=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),o=new Uint8Array(n),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([n],{type:r})}function o(t,e){return(t+="").length>=e?t:new Array(e-t.length+1).join("0")+t}function i(t){var e=c.c.PNG;return"image/jpeg"===t&&(e=c.c.JPG),e}function a(t,e,r){return t+"-"+o(e,4)+"."+i(r)}function s(t,e,r){window.URL=window.webkitURL||window.URL;var n=document.createElement("a");n.download=a(e,r,t.type),n.href=window.URL.createObjectURL(t);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(n(t),e,r)}e.a=u;var c=r(0)}]);var gf=a(ff);class mf{constructor(){this.currentStream=null,this.currentConstraints=null}static getInstance(){return mf.instance||(mf.instance=new mf),mf.instance}getStream(){return this.currentStream}isStreaming(){return this.currentStream&&this.currentStream.getTracks().some((t=>"live"===t.readyState))}stopStream(){this.currentStream&&(this.currentStream.getTracks().forEach((t=>t.stop())),this.currentStream=null)}areConstraintsEqual(t){return!!this.currentConstraints&&JSON.stringify(this.currentConstraints)===JSON.stringify(t)}async startNewStream(t){this.isStreaming()&&this.areConstraintsEqual(t)||(this.stopStream(),this.currentStream=await navigator.mediaDevices.getUserMedia(t),this.currentConstraints=t)}async enumerateDevices(){try{return await navigator.mediaDevices.enumerateDevices()}catch(t){throw console.error("Failed to enumerate devices:",t),t}}}const _f=["tele","telephoto","macro","portrait","zoom"],yf=["ultra","wide","uw","front","selfie"];function wf(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1}async function vf(){const t=(await async function(){const t=mf.getInstance();let e=await t.enumerateDevices();return e.filter((t=>"videoinput"===t.kind)).every((t=>""===t.label))&&(await t.startNewStream({video:{facingMode:{ideal:"environment"}},audio:!1}),e=await t.enumerateDevices(),t.stopStream()),e}()).filter((t=>{if(!(null==t?void 0:t.label)||"videoinput"!==t.kind||""===t.label)return!1;const e=t.label.toLowerCase();return Ef.some((t=>e.includes(t)))}));if(0===t.length)return{optionalCameras:[]};const e=await Promise.all(t.map((async t=>{const e=function(t){const e=t.toLowerCase();let r=0;if(wf())"back camera"!==e&&"rear camera"!==e||(r+=5),(e.includes("telephoto")||e.includes("tele"))&&(r-=2),(e.includes("ultra")||e.includes("wide"))&&(r-=3);else{_f.forEach((t=>{e.includes(t)&&(r+="macro"===t?4:3)})),yf.forEach((t=>{e.includes(t)&&(r-=3)}));const t=e.match(/(\d+(?:\.\d+)?)x/);t&&(r+=Math.min(parseFloat(t[1]),6))}return r}(t.label),r=await async function(t,e){let r=0;if(!wf()){const t=e.toLowerCase();(t.includes("camera 0")||t.includes("camera0"))&&(r+=3),t.match(/camera\s*[2-9]/)&&(r-=2)}try{const e=(await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:t}}})).getVideoTracks()[0],n=e.getCapabilities();return e.stop(),n.zoom&&(r+=Math.min(n.zoom.max||0,2)),n.focusMode&&Array.isArray(n.focusMode)&&n.focusMode.includes("continuous")&&(r+=2),n.focusDistance&&(r+=1),r}catch(t){return r}}(t.deviceId,t.label);return{camera:t,labelScore:e,capabilityScore:r,totalScore:e+r}})));return e.sort(((t,e)=>e.totalScore-t.totalScore)),e[0].totalScore>0?{optionalCameras:t,selectedCamera:e[0].camera}:{optionalCameras:t,selectedCamera:t[0]}}const Ef=["rear","back","tele","telephoto","macro","portrait","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"],bf={width:{min:640,max:3840,ideal:3840},height:{min:480,max:2160,ideal:2160},frameRate:30},Af={width:{min:640,max:1280,ideal:1280},height:{min:480,max:720,ideal:720},frameRate:30},Cf=async t=>{var e,r;let n;return"environment"==t&&(n=await vf()),null!==(r=null===(e=null==n?void 0:n.selectedCamera)||void 0===e?void 0:e.deviceId)&&void 0!==r?r:t},xf=(t,e)=>{var r,n;return"user"===t?null!==(r=null==e?void 0:e.selfieVideoConstraints)&&void 0!==r?r:Af:null!==(n=null==e?void 0:e.environmentVideoConstraints)&&void 0!==n?n:bf},If=t=>{const e=sf({tagName:"video",style:{position:"absolute",zIndex:"0",top:"0",width:"100%",height:"100%",objectFit:"cover"},id:"video",testid:"video"});return e.style.transform="user"===t?"scaleX(-1)":"",e.autoplay=!0,e.muted=!0,e.setAttribute("playsinline","true"),e},Sf={title:"other_error_code_title",message:"other_error_code_message"},Tf={ok:Sf,document_face_not_found:Sf,restricted_criteria:Sf,other:Sf,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"},unclassifiable:{title:"unclassifiable_title",message:"unclassifiable_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"}},Df={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"}},Of=(t,e)=>{const r=sf({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 ${t}`,testid:`overlay-frame ${t}`});if("environment"===t){!function(t){uf(t,sf({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"})),uf(t,sf({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"})),uf(t,sf({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"})),uf(t,sf({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"}))}(r);const t=.85*e.clientWidth;r.style.width=`${t}px`,r.style.height=.65*t+"px",r.style.maxHeight=.5*window.innerHeight+"px"}else{const t=e.clientWidth*(e.clientHeight<700?.8:.85);r.style.width=.8*t+"px",r.style.height=`${t}px`,r.style.minHeight=.8*t+"px",r.style.maxHeight=.5*window.innerHeight+"px",r.style.borderRadius="50%"}return r};const Rf=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox","0 0 68 68"),e.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!=t?t:"#fff"}" stroke-dasharray="51 12" stroke-linecap="round" stroke-dashoffset="0" /> </g>`,e};function Mf(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","16px"),t.setAttribute("height","16px"),t.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 ',t}const Nf={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)"}},kf=t=>{let{text:e,level:r=1,style:n={},id:i,testid:a}=t;const s=sf({tagName:`h${r}`,style:o(o(o({},Nf.all),Nf[r]),n),id:i,testid:a});return s.textContent=e,s.id=i,s};var Pf,Bf={};let Ff=null;try{Ff=(Pf||(Pf=1,function(t){function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(e){t.defaults=e}t.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const i={exec:()=>null};function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r="string"==typeof t?t:t.source;const n={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(s.caret,"$1"),r=r.replace(t,o),n},getRegex:()=>new RegExp(r,e)};return n}const s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\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\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\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-\u1C8A\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-\uA7DC\uA7F1-\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{105C0}-\u{105F3}\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{10940}-\u{10959}\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{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC7}\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{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}\u{113D1}\u{113D3}\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{116D0}-\u{116E3}\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{11BC0}-\u{11BE0}\u{11BF0}-\u{11BF9}\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{11DB0}-\u{11DDB}\u{11DE0}-\u{11DE9}\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{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{16130}-\u{16139}\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{16D40}-\u{16D6C}\u{16D70}-\u{16D79}\u{16E40}-\u{16E96}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF2}-\u{16FF6}\u{17000}-\u{18CD5}\u{18CFF}-\u{18D1E}\u{18D80}-\u{18DF2}\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{1CCF0}-\u{1CCF9}\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{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}\u{1E6FF}\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{2B81D}\u{2B820}-\u{2CEAD}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{33479}]/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:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c=/(?:[*+-]|\d{1,9}[.)])/,l=a(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,c).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(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c).getRegex(),g="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y=a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),w={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",y).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:_,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:y,table:i,text:/^[^\n]+/},v=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex(),E=o(o({},w),{},{table:v,paragraph:a(d).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",g).getRegex()}),b=o(o({},w),{},{html:a("^ *(?: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:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(d).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,C=/^( {2,}|\\)\n(?!\s*$)/,x="\\p{P}\\p{S}",I=a(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,x).getRegex(),S=a(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,x).getRegex(),T=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,x).getRegex(),D=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,x).getRegex(),O=a(/\\([punct])/,"gu").replace(/punct/g,x).getRegex(),R=a(/^<(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(),M=a(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),N=a("^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",M).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),k=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,P=a(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",k).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B=a(/^!?\[(label)\]\[(ref)\]/).replace("label",k).replace("ref",h).getRegex(),F=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",h).getRegex(),L={_backpedal:i,anyPunctuation:O,autolink:R,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:C,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,emStrongLDelim:S,emStrongRDelimAst:T,emStrongRDelimUnd:D,escape:A,link:P,nolink:F,punctuation:I,reflink:B,reflinkSearch:a("reflink|nolink(?!\\()","g").replace("reflink",B).replace("nolink",F).getRegex(),tag:N,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},z=o(o({},L),{},{link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",k).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",k).getRegex()}),U=o(o({},L),{},{escape:a(A).replace("])","~|])").getRegex(),url:a(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V=o(o({},U),{},{br:a(C).replace("{2,}","*").getRegex(),text:a(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),H={normal:w,gfm:E,pedantic:b},j={normal:L,gfm:U,breaks:V,pedantic:z},G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},W=t=>G[t];function X(t,e){if(e){if(s.escapeTest.test(t))return t.replace(s.escapeReplace,W)}else if(s.escapeTestNoEncode.test(t))return t.replace(s.escapeReplaceNoEncode,W);return t}function Y(t){try{t=encodeURI(t).replace(s.percentDecode,"%")}catch(t){return null}return t}function Z(t,e){const r=t.replace(s.findPipe,((t,e,r)=>{let n=!1,o=e;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"})).split(s.splitPipe);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(s.slashPipe,"|");return r}function q(t,e,r){const n=t.length;if(0===n)return"";let o=0;for(;o<n;){const i=t.charAt(n-o-1);if(i!==e||r){if(i===e||!r)break;o++}else o++}return t.slice(0,n-o)}function K(t,e,r,n,o){const i=e.href,a=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");if("!"!==t[0].charAt(0)){n.state.inLink=!0;const t={type:"link",raw:r,href:i,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,t}return{type:"image",raw:r,href:i,title:a,text:s}}class ${constructor(e){r(this,"options",void 0),r(this,"rules",void 0),r(this,"lexer",void 0),this.options=e||t.defaults}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:q(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(null===n)return e;const o=n[1];return e.split("\n").map((t=>{const e=t.match(r.other.beginningSpace);if(null===e)return t;const[n]=e;return n.length>=o.length?t.slice(o.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=q(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:q(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=q(e[0],"\n").split("\n"),r="",n="";const o=[];for(;t.length>0;){let e=!1;const i=[];let a;for(a=0;a<t.length;a++)if(this.rules.other.blockquoteStart.test(t[a]))i.push(t[a]),e=!0;else{if(e)break;i.push(t[a])}t=t.slice(a);const s=i.join("\n"),u=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${u}`:u;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=c,0===t.length)break;const l=o[o.length-1];if("code"===(null==l?void 0:l.type))break;if("blockquote"===(null==l?void 0:l.type)){const e=l,i=e.raw+"\n"+t.join("\n"),a=this.blockquote(i);o[o.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,n=n.substring(0,n.length-e.text.length)+a.text;break}if("list"!==(null==l?void 0:l.type));else{const e=l,i=e.raw+"\n"+t.join("\n"),a=this.list(i);o[o.length-1]=a,r=r.substring(0,r.length-l.raw.length)+a.raw,n=n.substring(0,n.length-e.raw.length)+a.raw,t=i.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:o,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const i=this.rules.other.listItemRegex(r);let a=!1;for(;t;){let r=!1,n="",s="";if(!(e=i.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let u=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],l=!u.trim(),d=0;if(this.options.pedantic?(d=2,s=u.trimStart()):l?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=u.slice(d),d+=e[1].length),l&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;t;){const h=t.split("\n",1)[0];let f;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(e.test(c))break;if(r.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(l)break;if(u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(u))break;if(i.test(u))break;if(r.test(u))break;s+="\n"+c}l||c.trim()||(l=!0),n+=h+"\n",t=t.substring(h.length+1),u=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let h,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(h="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:n,task:!!f,checked:h,loose:!1,text:s,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){const e=o.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const r=Z(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]&&e[3].trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const t of n)this.rules.other.tableAlignRight.test(t)?i.align.push("right"):this.rules.other.tableAlignCenter.test(t)?i.align.push("center"):this.rules.other.tableAlignLeft.test(t)?i.align.push("left"):i.align.push(null);for(let t=0;t<r.length;t++)i.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:i.align[t]});for(const t of o)i.rows.push(Z(t,i.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:i.align[e]}))));return i}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=q(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n<t.length;n++)if("\\"===t[n])n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),K(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return K(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=this.rules.inline.emStrongLDelim.exec(t);if(n&&(!n[3]||!r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let o,i,a=r,s=0;const u="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=u.exec(e));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=[...o].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&r%3&&!((r+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const e=[...n[0]][0].length,u=t.slice(0,r+n.index+e+i);if(Math.min(r,i)%2){const t=u.slice(1,-1);return{type:"em",raw:u,text:t,tokens:this.lexer.inlineTokens(t)}}const c=u.slice(2,-2);return{type:"strong",raw:u,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,o;if("@"===e[2])t=e[0],o="mailto:"+t;else{let i;do{var r,n;i=e[0],e[0]=null!==(r=null===(n=this.rules.inline._backpedal.exec(e[0]))||void 0===n?void 0:n[0])&&void 0!==r?r:""}while(i!==e[0]);t=e[0],o="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:o,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}}class J{constructor(e){r(this,"tokens",void 0),r(this,"options",void 0),r(this,"state",void 0),r(this,"tokenizer",void 0),r(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new $,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 n={other:s,block:H.normal,inline:j.normal};this.options.pedantic?(n.block=H.pedantic,n.inline=j.pedantic):this.options.gfm&&(n.block=H.gfm,this.options.breaks?n.inline=j.breaks:n.inline=j.gfm),this.tokenizer.rules=n}static get rules(){return{block:H,inline:j}}static lex(t,e){return new J(e).lex(t)}static lexInline(t,e){return new J(e).inlineTokens(t)}lex(t){t=t.replace(s.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t){let e,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(t=t.replace(s.tabCharGlobal," ").replace(s.spaceLine,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(e=r.call({lexer:this},t,o))&&(t=t.substring(e.raw.length),o.push(e),!0)))))if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),1===e.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(e);else if(e=this.tokenizer.code(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?o.push(e):(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.list(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.def(t))t=t.substring(e.raw.length),r=o[o.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title}):(r.raw+="\n"+e.raw,r.text+="\n"+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),o.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),o.push(e);else{var a;if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startBlock.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(n)))r=o[o.length-1],i&&"paragraph"===(null===(a=r)||void 0===a?void 0:a.type)?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e),i=n.length!==t.length,t=t.substring(e.raw.length);else if(e=this.tokenizer.text(t))t=t.substring(e.raw.length),r=o[o.length-1],r&&"text"===r.type?(r.raw+="\n"+e.raw,r.text+="\n"+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):o.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,o}inline(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t){let e,r,n,o,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(u));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(u));)u=u.slice(0,o.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(e=r.call({lexer:this},t,s))&&(t=t.substring(e.raw.length),s.push(e),!0)))))if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.tag(t))t=t.substring(e.raw.length),r=s[s.length-1],s.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),r=s[s.length-1],r&&"text"===e.type&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(e=this.tokenizer.emStrong(t,u,a))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),s.push(e);else if(e=this.tokenizer.autolink(t))t=t.substring(e.raw.length),s.push(e);else if(this.state.inLink||!(e=this.tokenizer.url(t))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let o;this.options.extensions.startInline.forEach((t=>{o=t.call({lexer:this},r),"number"==typeof o&&o>=0&&(e=Math.min(e,o))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(e=this.tokenizer.inlineText(n))t=t.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(a=e.raw.slice(-1)),i=!0,r=s[s.length-1],r&&"text"===r.type?(r.raw+=e.raw,r.text+=e.text):s.push(e);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(e.raw.length),s.push(e);return s}}class Q{constructor(e){r(this,"options",void 0),r(this,"parser",void 0),this.options=e||t.defaults}space(t){return""}code(t){var e;let{text:r,lang:n,escaped:o}=t;const i=null===(e=(n||"").match(s.notSpaceStart))||void 0===e?void 0:e[0],a=r.replace(s.endingNewline,"")+"\n";return i?'<pre><code class="language-'+X(i)+'">'+(o?a:X(a,!0))+"</code></pre>\n":"<pre><code>"+(o?a:X(a,!0))+"</code></pre>\n"}blockquote(t){let{tokens:e}=t;return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html(t){let{text:e}=t;return e}heading(t){let{tokens:e,depth:r}=t;return`<h${r}>${this.parser.parseInline(e)}</h${r}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let e=0;e<t.items.length;e++){const r=t.items[e];n+=this.listitem(r)}const o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+o+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+X(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox(t){let{checked:e}=t;return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){let{tokens:e}=t;return`<p>${this.parser.parseInline(e)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let n="";for(let e=0;e<t.rows.length;e++){const o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+n+"</table>\n"}tablerow(t){let{text:e}=t;return`<tr>\n${e}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(t){let{tokens:e}=t;return`<strong>${this.parser.parseInline(e)}</strong>`}em(t){let{tokens:e}=t;return`<em>${this.parser.parseInline(e)}</em>`}codespan(t){let{text:e}=t;return`<code>${X(e,!0)}</code>`}br(t){return"<br>"}del(t){let{tokens:e}=t;return`<del>${this.parser.parseInline(e)}</del>`}link(t){let{href:e,title:r,tokens:n}=t;const o=this.parser.parseInline(n),i=Y(e);if(null===i)return o;let a='<a href="'+(e=i)+'"';return r&&(a+=' title="'+X(r)+'"'),a+=">"+o+"</a>",a}image(t){let{href:e,title:r,text:n}=t;const o=Y(e);if(null===o)return X(n);let i=`<img src="${e=o}" alt="${n}"`;return r&&(i+=` title="${X(r)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:X(t.text)}}class tt{strong(t){let{text:e}=t;return e}em(t){let{text:e}=t;return e}codespan(t){let{text:e}=t;return e}del(t){let{text:e}=t;return e}html(t){let{text:e}=t;return e}text(t){let{text:e}=t;return e}link(t){let{text:e}=t;return""+e}image(t){let{text:e}=t;return""+e}br(){return""}}class et{constructor(e){r(this,"options",void 0),r(this,"renderer",void 0),r(this,"textRenderer",void 0),this.options=e||t.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 tt}static parse(t,e){return new et(e).parse(t)}static parseInline(t,e){return new et(e).parseInline(t)}parse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const i=o;switch(i.type){case"space":r+=this.renderer.space(i);continue;case"hr":r+=this.renderer.hr(i);continue;case"heading":r+=this.renderer.heading(i);continue;case"code":r+=this.renderer.code(i);continue;case"table":r+=this.renderer.table(i);continue;case"blockquote":r+=this.renderer.blockquote(i);continue;case"list":r+=this.renderer.list(i);continue;case"html":r+=this.renderer.html(i);continue;case"paragraph":r+=this.renderer.paragraph(i);continue;case"text":{let o=i,a=this.renderer.text(o);for(;n+1<t.length&&"text"===t[n+1].type;)o=t[++n],a+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let n=0;n<t.length;n++){const o=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}const i=o;switch(i.type){case"escape":case"text":r+=e.text(i);break;case"html":r+=e.html(i);break;case"link":r+=e.link(i);break;case"image":r+=e.image(i);break;case"strong":r+=e.strong(i);break;case"em":r+=e.em(i);break;case"codespan":r+=e.codespan(i);break;case"br":r+=e.br(i);break;case"del":r+=e.del(i);break;default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class rt{constructor(e){r(this,"options",void 0),r(this,"block",void 0),this.options=e||t.defaults}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?J.lex:J.lexInline}provideParser(){return this.block?et.parse:et.parseInline}}r(rt,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class nt{constructor(){r(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),r(this,"options",this.setOptions),r(this,"parse",this.parseMarkdown(!0)),r(this,"parseInline",this.parseMarkdown(!1)),r(this,"Parser",et),r(this,"Renderer",Q),r(this,"TextRenderer",tt),r(this,"Lexer",J),r(this,"Tokenizer",$),r(this,"Hooks",rt),this.use(...arguments)}walkTokens(t,e){let r=[];for(const o of t)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const t=o;for(const n of t.header)r=r.concat(this.walkTokens(n.tokens,e));for(const n of t.rows)for(const t of n)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=o;r=r.concat(this.walkTokens(t.items,e));break}default:{var n;const t=o;null!==(n=this.defaults.extensions)&&void 0!==n&&null!==(n=n.childTokens)&&void 0!==n&&n[t.type]?this.defaults.extensions.childTokens[t.type].forEach((n=>{const o=t[n].flat(1/0);r=r.concat(this.walkTokens(o,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(){const t=this.defaults.extensions||{renderers:{},childTokens:{}};for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((e=>{const r=o({},e);if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];let i=e.renderer.apply(this,n);return!1===i&&(i=r.apply(this,n)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Q(this.defaults);for(const r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,o=e.renderer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $(this.defaults);for(const r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,o=e.tokenizer[n],i=t[n];t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new rt;for(const r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,o=e.hooks[n],i=t[n];rt.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const r=o.call(t,e);return i.call(t,r)}:t[n]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];let a=o.apply(t,r);return!1===a&&(a=i.apply(t,r)),a}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults=o(o({},this.defaults),r)})),this}setOptions(t){return this.defaults=o(o({},this.defaults),t),this}lexer(t,e){return J.lex(t,null!=e?e:this.defaults)}parser(t,e){return et.parse(t,null!=e?e:this.defaults)}parseMarkdown(t){return(e,r)=>{const n=o({},r),i=o(o({},this.defaults),n),a=this.onError(!!i.silent,!!i.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==e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?J.lex:J.lexInline,u=i.hooks?i.hooks.provideParser():t?et.parse:et.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>u(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let r=u(t,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+X(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}}const ot=new nt;function it(t,e){return ot.parse(t,e)}it.options=it.setOptions=function(t){return ot.setOptions(t),it.defaults=ot.defaults,n(it.defaults),it},it.getDefaults=e,it.defaults=t.defaults,it.use=function(){return ot.use(...arguments),it.defaults=ot.defaults,n(it.defaults),it},it.walkTokens=function(t,e){return ot.walkTokens(t,e)},it.parseInline=ot.parseInline,it.Parser=et,it.parser=et.parse,it.Renderer=Q,it.TextRenderer=tt,it.Lexer=J,it.lexer=J.lex,it.Tokenizer=$,it.Hooks=rt,it.parse=it;const at=it.options,st=it.setOptions,ut=it.use,ct=it.walkTokens,lt=it.parseInline,dt=it,ht=et.parse,ft=J.lex;t.Hooks=rt,t.Lexer=J,t.Marked=nt,t.Parser=et,t.Renderer=Q,t.TextRenderer=tt,t.Tokenizer=$,t.getDefaults=e,t.lexer=ft,t.marked=it,t.options=at,t.parse=dt,t.parseInline=lt,t.parser=ht,t.setOptions=st,t.use=ut,t.walkTokens=ct}(Bf)),Bf).marked}catch(t){console.log("marked is not supported",t)}const Lf=Ff,zf=t=>{let{text:e,id:r,testid:n,clientHeight:o}=t;const i=!!o&&o<700,a=sf({tagName:"div",style:{position:"relative",zIndex:"2",width:"100%",minHeight:i?"48px":"70px",textAlign:"center",backgroundColor:"#262626",display:"flex",justifyContent:"center",alignItems:"center"},id:r,testid:n});return uf(a,kf({text:e,level:i?6:5,style:{color:"white"}})),a};const Uf=t=>{let e;return e="document_front"===t?function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("id","front-document-animation"),t.setAttribute("viewBox","0 0 235 147"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.innerHTML='\n <style>\n .s0 { opacity: .4;fill: #ffffff } \n .s1 { opacity: .4;fill: none;stroke: #6981ff;stroke-width: 2 } \n .s2 { opacity: .4;fill: #6981ff } \n .s3 { opacity: .4;fill: #c3cdff } \n .s4 { opacity: .4;fill: #f0f2ff } \n </style>\n <path class="s0" d="m229.43 3h-224.86c-2.21 0-4 1.79-4 4v130.14c0 2.21 1.79 4 4 4h224.86c2.21 0 4-1.79 4-4v-130.14c0-2.21-1.79-4-4-4z"/>\n <path class="s1" d="m229.43 4h-224.86c-1.66 0-3 1.34-3 3v130.14c0 1.65 1.34 3 3 3h224.86c1.66 0 3-1.35 3-3v-130.14c0-1.66-1.34-3-3-3z"/>\n <path class="s2" d="m1.56 5.99c0-1.11 0.89-2 2-2h225.9c1.1 0 1.99 0.89 1.99 2v17.73h-229.89z"/>\n <path class="s2" d="m59.77 76.46h-7.89c-5.45 0-9.87 4.42-9.87 9.87 0 1.08 0.89 1.97 1.98 1.97h23.68c1.09 0 1.97-0.88 1.97-1.97 0-5.45-4.42-9.87-9.87-9.87z"/>\n <path class="s2" d="m56.08 73.8c4.71 0 8.53-3.82 8.53-8.54 0-4.71-3.82-8.53-8.53-8.53-4.72 0-8.54 3.82-8.54 8.53 0 4.72 3.82 8.54 8.54 8.54z"/>\n <path class="s1" d="m43.99 50.36h-7.84c-2.21 0-4 1.79-4 4v7.84"/>\n <path class="s1" d="m32.15 83.91v7.84c0 2.21 1.79 4 4 4h7.84"/>\n <path class="s1" d="m66.68 95.75h7.84c2.21 0 4-1.79 4-4v-7.84"/>\n <path class="s1" d="m78.52 62.2v-7.84c0-2.21-1.79-4-4-4h-7.84"/>\n <path class="s2" d="m107.13 53.32c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m200.85 49.37h-84.82c-0.56 0-1 0.45-1 1v5.9c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-5.9c0-0.55-0.44-1-1-1z"/>\n <path class="s2" d="m107.13 73.05c0-2.17-1.76-3.94-3.94-3.94-2.18 0-3.95 1.77-3.95 3.94 0 2.18 1.77 3.95 3.95 3.95 2.18 0 3.94-1.77 3.94-3.95z"/>\n <path class="s3" d="m179.15 69.11h-63.12c-0.56 0-1 0.45-1 1v5.89c0 0.55 0.44 1 1 1h63.12c0.55 0 1-0.45 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s2" d="m107.13 92.79c0-2.18-1.76-3.95-3.94-3.95-2.18 0-3.95 1.77-3.95 3.95 0 2.18 1.77 3.94 3.95 3.94 2.18 0 3.94-1.76 3.94-3.94z"/>\n <path class="s3" d="m166.32 88.84h-50.29c-0.55 0-1 0.45-1 1v5.89c0 0.56 0.45 1 1 1h50.29c0.55 0 1-0.44 1-1v-5.89c0-0.55-0.45-1-1-1z"/>\n <path class="s4" d="m221.57 11.88h-84.82c-0.56 0-1 0.45-1 1v1.95c0 0.55 0.44 1 1 1h84.82c0.56 0 1-0.45 1-1v-1.95c0-0.55-0.44-1-1-1z"/>\n <g style="opacity: .05">\n </g>\n ',t}():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","270"),t.setAttribute("height","175"),t.setAttribute("viewBox","40 60 250 140"),t.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 ',t}(),e.setAttribute("style","position: absolute; z-index: 1; opacity: 0; transition: opacity 0.5s ease-in-out;"),"document_front"===t?e.style.opacity="1":"document_back"===t&&(e.style.opacity="1",setTimeout((()=>{e.style.opacity="0"}),5e3)),e};var Vf;!function(t){t.INVALID="invalid",t.VALID="valid",t.ACCEPTED="accepted",t.REJECTED="rejected"}(Vf||(Vf={}));const Hf="#ED3232",jf="#01B678",Gf="#FFF";const Wf=t=>{const e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight;return e.getContext("2d").drawImage(t,0,0,t.videoWidth,t.videoHeight),e};async function Xf(t){let{context:e,onDetect:r,frame:n,showError:o,isSelfie:i=!1}=t;const a=e.state.name;if(a===Vf.REJECTED){o(function(t){switch(t){case aa.DOCUMENT_DETECTION:return"searching_document_autocapture";case aa.DOCUMENT_POSITION:return"doc_not_in_frame_issues_autocapture";case aa.BARCODE_DETECTION:return So.feedback.BARCODE_NOT_FOUND;case aa.BLUR_DETECTION:return So.feedback.BLUR;case aa.GLARE_DETECTION:return So.feedback.GLARE;case aa.FACE_DETECTION:return So.feedback.FACE_NOT_FOUND;case aa.FACE_POSITION:return So.feedback.FACE_TOO_SMALL}}(e.invalidFramesCause));Yf("border-color",e.invalidFramesCause===aa.DOCUMENT_DETECTION?Gf:Hf)}if(a===Vf.VALID)if(i){Yf("border-color",jf);o(`capturing_face_autocapture${Math.ceil((e.validFramesThreshold-e.validFramesCounter)/e.validFramesThreshold*3)}`)}else o("capturing_in_progress_message"),Yf("border-color",Gf);a===Vf.ACCEPTED&&(Yf("border-color",Gf),o(null),"function"==typeof navigator.vibrate&&navigator.vibrate(200),await r({frame:n,suspendedPreview:!0,context:e}))}function Yf(t,e){document.querySelectorAll('[id^="overlay-frame"]').forEach((r=>{r.style[t]=e}))}function Zf(t){let e,r,n,{captureFrame:o,object:i,videoWidth:a,videoHeight:s,deviceWidth:u,deviceHeight:c,threshold:l,iouThreshold:d=.85}=t;if(a/s>=u/c){n=c/s;const t=(a*n-u)/2;e=i.x*n-t,r=i.y*n}else{n=u/a;const t=(s*n-c)/2;e=i.x*n,r=i.y*n-t}const h=e+i.width*n,f=r+i.height*n;!function(t,e,r,n){var o,i;if(null===(i=null===(o=ia.state.autoCaptureSettings)||void 0===o?void 0:o.settings)||void 0===i?void 0:i.debug){const o=document.getElementById("image-preview-section"),i=document.getElementById("rectangle");if(i)i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`;else{const i=document.createElement("div");i.id="rectangle",i.style.position="absolute",i.style.border="1px solid yellow",i.style.width=`${r}px`,i.style.height=`${n}px`,i.style.left=`${t}px`,i.style.top=`${e}px`,o.appendChild(i)}}}(e,r,i.width*n,i.height*n);const p=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=n-r,a=Math.min(t.bottom,e.bottom)-o;if(i<=0||a<=0)return 0;const s=i*a;return s/((t.right-t.left)*(t.bottom-t.top)+(e.right-e.left)*(e.bottom-e.top)-s)}({top:o.top,left:o.left,bottom:o.bottom,right:o.right},{top:r,left:e,bottom:f,right:h}),g=p>d,m=i.width*n*(i.height*n)>l*(o.width*o.height);return g&&m}const qf=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.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 ',t}(),r=sf({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 uf(r,e),uf(r,kf({text:t||"Retake",level:2,style:{color:"#FF8B8B",margin:"0",maxWidth:"100px",textAlign:"center"},id:"retake-image-text"})),r};const Kf=t=>{const e=function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","64px"),t.setAttribute("height","64px"),t.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 ',t}(),r=sf({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 uf(r,e),uf(r,kf({text:t||"Approve",level:2,style:{color:"#BBF7DD",margin:"0",maxWidth:"100px",textAlign:"center"},id:"check-circle-text"})),r},$f=t=>{let{step:e,setImage:r,camera:n}=t;var o,i,a,s;const u=Df[e];(null===(o=ia.state.autoCaptureSettings)||void 0===o?void 0:o.enabled)&&"selfie"===e&&(u.instructions="second_title_face_autocapture");const c=((t,e)=>sf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"document-capture",className:e}))("document-capture",e),l=sf({tagName:"div",style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},id:"camera-hint-section",testid:"camera-hint-section"}),d=sf({tagName:"div",style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"80%"},id:"central-container",testid:"central-container"}),h=document.getElementById(ia.state.rootElementId);if(!h)throw new Error("Root element not found");const f=Of(df(e),h),p=Uf(e);uf(l,p),uf(l,f),"document_front"===e&&setTimeout((()=>{const t=document.getElementById(`overlay-frame ${df(e)}`),r=document.getElementById("front-document-animation");if(t&&r){const e=t.getBoundingClientRect(),n=l.getBoundingClientRect(),o=8,i=e.width-2*o,a=e.height-2*o,s=235/147;let u=i,c=i/s;c>a&&(c=a,u=c*s);const d=e.left-n.left+(e.width-u)/2,h=e.top-n.top+(e.height-c)/2;r.setAttribute("width",u.toString()),r.setAttribute("height",c.toString()),r.style.width=`${u}px`,r.style.height=`${c}px`,r.style.left=`${d}px`,r.style.top=`${h}px`}}),0);const g=(()=>{const t=sf({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"}),e=Mf();return e.style.width="16px",e.style.height="16px",e.style.margin="0 10px",uf(t,e),uf(t,kf({text:"This may take a few seconds",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-loading-message"})),t})();uf(f,g),g.style.visibility="hidden";const m=zf({text:ya.translate(u.page),id:"page-header",testid:"page-header",clientHeight:h.clientHeight}),_=(t=>{let{click:e,id:r,testid:n,color:o,withLoader:i}=t;if(i){const t=Rf();t.style.position="absolute",t.style.left="-7px",t.style.top="-7px",t.style.height="63px",t.style.width="63px";const i=sf({tagName:"button",style:{position:"relative",width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"});return uf(i,t),i.addEventListener("click",e),i}{const t=sf({tagName:"button",style:{width:"65px",height:"65px",zIndex:"1",backgroundColor:"black",padding:"0",border:"solid 5px "+(o||"white"),borderRadius:"40px"},id:r+"-outer",testid:n+"-outer"});return uf(t,sf({tagName:"div",style:{width:"49px",height:"49px",backgroundColor:o||"white",border:"none",margin:"0 auto",borderRadius:"40px"},id:r+"-inner",testid:n+"-inner"})),t.addEventListener("click",e),t}})({click:()=>r({frame:Wf(n.videoElement),suspendedPreview:!1}),id:"submit-image",testid:"submit-image",withLoader:null===(a=null===(i=ia.state)||void 0===i?void 0:i.autoCaptureSettings)||void 0===a?void 0:a.enabled}),y=((t,e)=>{const r=sf({tagName:"div",style:{zIndex:"2",width:"70%",paddingBottom:"30px",backgroundColor:"transparent",justifyContent:"space-between",display:"none"},id:"approve-retake-block",testid:"approve-retake-block"}),n=Kf(t);return uf(r,qf(e)),uf(r,n),r})(ya.translate("approve_button"),ya.translate("retake_button")),w=(t=>{let{title:e,text:r,clientHeight:n,customTextColor:o}=t;const i=n<700,a=sf({tagName:"div",style:{position:"relative",zIndex:"2",padding:"0 25px",margin:i?"8px 0":"32px 0"},id:"page-info",testid:"page-info"}),s=kf({text:e,level:i?2:1,style:{color:o||"white",textAlign:"center",marginBottom:i?"4px":"10px"},id:"step-title"}),u=kf({text:r,level:i?6:5,style:{color:o||"white",textAlign:"center",height:"35px"},id:"step-instructions"});return uf(a,s),uf(a,u),a})({text:ya.translate(u.instructions),title:ya.translate(u.title),clientHeight:h.clientHeight}),v=(t=>{const e=t<700,r=sf({tagName:"div",style:{zIndex:"2",width:"85%",display:"flex",flexDirection:ia.state.markdownSupportText?"column":"row",backgroundColor:"#2E2E2E",borderRadius:"4px",padding:"12px",visibility:"hidden",marginTop:"16px"},id:"error-block",testid:"error-block"}),n=sf({tagName:"div",style:{display:"flex",flexDirection:"row",width:"100%",height:"inherit",alignItems:"center",paddingTop:"25px"},id:"image-error-block",testid:"image-error-block"}),o=Mf();o.style.width="16px",o.style.height="16px",o.style.margin="0 10px",ia.state.markdownSupportText?uf(n,o):uf(r,o);const i=ia.state.markdownSupportText&&null!=Lf?Lf.parse(ia.state.markdownSupportText,{async:!1}):"",a=kf({text:"",level:e?6:5,style:{color:"white",margin:"0",width:"85%",fontWeight:"400",height:"fit-content"},id:"image-error-message"}),s=kf({text:"",level:5,style:{color:"white",margin:"0",width:"80%"},id:"image-error-support-message"});return i&&(s.innerHTML=i,uf(n,a)),uf(r,i?[n,s]:a),r})(h.clientHeight),E=(null===(s=ia.state.autoCaptureSettings)||void 0===s?void 0:s.enabled)?Rf():function(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","65"),t.setAttribute("height","65"),t.setAttribute("viewBox","0 0 24 24"),t.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 ',t}();E.style.display="none",uf(d,m),uf(d,w),uf(d,l),uf(d,v),uf(c,d);const b=sf({tagName:"div",style:{width:"100%",margin:"10%",zIndex:"1",display:"flex",justifyContent:"center"},id:"trigger-section",testid:"trigger-section"});uf(b,E),uf(b,_),uf(b,y),uf(c,b),uf(c,n.videoElement);const A=sf({tagName:"img",style:{display:"block",position:"absolute",objectFit:"cover",height:"100%",width:"100%",transform:"user"===df(e)?"scaleX(-1)":""},id:"image-preview",testid:"image-preview"});const C=(t=>{const e=sf({tagName:"div",style:{position:"absolute",height:"100%",width:"100%",objectFit:"cover"},id:"image-preview-section",testid:"image-preview-section"});return e.appendChild(t),e})(A);return uf(c,C),{component:c,setLoadingMode:t=>{var e;_.style.display="none",v.style.visibility="hidden",E.style.display="block",(null===(e=ia.state.autoCaptureSettings)||void 0===e?void 0:e.enabled)&&(E.style.height="63px",E.style.width="63px"),t&&(g.style.visibility="visible")},setApprovalRetakeButtons:t=>{let{approveAction:e,retakeAction:r}=t;var n,o;_.style.display="none",v.style.display="none",y.style.display="flex";const i=y.querySelector("#approve-image"),a=y.querySelector("#retake-image"),s=i.cloneNode(!0);null===(n=i.parentNode)||void 0===n||n.replaceChild(s,i),s.addEventListener("click",e);const u=a.cloneNode(!0);null===(o=a.parentNode)||void 0===o||o.replaceChild(u,a),u.addEventListener("click",r)},hideApprovalRetakeButtons:()=>{y.style.display="none",v.style.display="flex"},setPreviewImage:(t,e)=>{A.src=t,g.style.visibility="hidden",n.videoElement.style.display="none",_.style.display="none",v.style.visibility="hidden",C.style.display="block",E.style.display=e?"none":"block"},setLoadingComplete:()=>{E.style.display="none",g.style.visibility="hidden"},setAutoCapturingError:(t,e)=>{if(!t)return void(v.style.visibility="hidden");let r;r=t==So.feedback.RESTRICTED_CRITERIA&&e?e:Tf[t]?Tf[t].message:ya.translate(t)!==t?t:Tf.other.message,document.getElementById("image-error-message").innerHTML=ya.translate(r),v.style.visibility="visible"},enableVideoElement:()=>{_.style.display="block",n.videoElement.style.display="block",C.style.display="none",E.style.display="none"},setCapturingShowErrorMode:(t,e)=>{_.style.display="block",C.style.display="none",n.videoElement.style.display="block";const r=t==So.feedback.RESTRICTED_CRITERIA,o=Tf[t]||Tf.other;document.getElementById("image-error-message").innerHTML=e&&r&&null!=Lf?Lf.parse(e,{async:!1}):ya.translate(o.message),v.style.visibility="visible",g.style.visibility="hidden"},setTitleInstructionsMidStep:t=>{let{title:e,instructions:r}=t;e&&(document.getElementById("step-title").innerHTML=ya.translate(e)),r&&(document.getElementById("step-instructions").innerHTML=ya.translate(r))}}};class Jf{constructor(){this.isValid=!0,this.failedStep=null,this.steps=[]}addStepResponse(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e||(this.isValid=!1,this.failedStep=t),this.steps.push(new Qf(t,e,r))}}class Qf{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.duration=0,this.success=!0,this.step=t,this.success=e,this.duration=r}}class tp{constructor(){this.name=Vf.ACCEPTED}async handleFrame(){return new Jf}}class ep{constructor(){this.name=Vf.VALID}async handleFrame(t){let{context:e,frame:r,deviceInfo:n,detectionStrategy:o}=t;const i=await o.validate({frame:r,deviceInfo:n});return i.isValid?(e.validFramesCounter++,e.validFramesCounter>=e.validFramesThreshold&&e.setState(new tp)):(e.validFramesCounter=0,e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new np)),i}}class rp{constructor(){this.name=Vf.REJECTED}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.setState(new ep),i):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep,e.setState(new np),i):(e.invalidFramesCounter++,i)}}class np{constructor(){this.name=Vf.INVALID}async handleFrame(t){let{context:e,frame:r,detectionStrategy:n,deviceInfo:o}=t;const i=await n.validate({frame:r,deviceInfo:o});return i.isValid?(e.invalidFramesCounter=0,e.validFramesCounter=1,e.validFramesCounter>=e.validFramesThreshold?e.setState(new tp):e.setState(new ep)):e.invalidFramesCause!==i.failedStep?(e.invalidFramesCounter=1,e.invalidFramesCause=i.failedStep):(e.invalidFramesCounter++,e.invalidFramesCounter>=e.invalidFramesThreshold&&e.setState(new rp)),i}}class op{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;this.detectionStrategy=t,this.state=new np,this.validFramesCounter=0,this.invalidFramesCounter=0,this.invalidFramesCause=null,this.validFramesThreshold=e,this.invalidFramesThreshold=r}setState(t){this.state=t}async handleFrame(t){let{frame:e,deviceInfo:r}=t;return await this.state.handleFrame({context:this,frame:e,deviceInfo:r,detectionStrategy:this.detectionStrategy})}}async function ip(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=function(t,e,r){const n=document.createElement("canvas"),o=e||{height:t.height,width:t.width},i=n.getContext("2d");n.width=o.width,n.height=o.height,r?null==i||i.drawImage(t,r.x,r.y,r.width,r.height,0,0,o.width,o.height):null==i||i.drawImage(t,0,0,o.width,o.height);const a=null==i?void 0:i.getImageData(0,0,o.width,o.height);return n.remove(),a}(e,arguments.length>3?arguments[3]:void 0,arguments.length>4?arguments[4]:void 0),i=await new Promise(((i,a)=>{navigator.serviceWorker.ready.then((s=>{var u;const c=e=>{e.data.type===t+"_RESULT"&&(navigator.serviceWorker.removeEventListener("message",c),i(e.data.result)),e.data.type===t+"_ERROR"&&(navigator.serviceWorker.removeEventListener("message",c),pa(e.data.error.toString(),t,"error"),a(e.data.error))};navigator.serviceWorker.addEventListener("message",c),null===(u=s.active)||void 0===u||u.postMessage(o({type:t,imageData:n,height:e.height,width:e.width},r))}))}));return ma(`****** in web-SDK return result for ${t}`,i),i}async function ap(t){if(t instanceof HTMLVideoElement&&t.paused)return[];return ip("DETECT_DOCUMENT",t,{},Uh[va.DOCUMENT_DETECTOR].imageDimensions)}async function sp(t,e){return ip("BLUR_GLARE_CLASSIFY",t,{},Uh[va.BLUR_GLARE_CLASSIFIER].imageDimensions,e)}class up{constructor(t,e){this.hasBarcode=t,this.barcodeModel=t?Hh(e):null,this.rawBarcodeData={}}async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Jf;let i=Date.now();const a=null===(n=await ap(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(aa.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Zf({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:ia.state.autoCaptureSettings.settings.capture.documentBackSizeThreshold,iouThreshold:ia.state.autoCaptureSettings.settings.capture.documentBackIouThreshold});if(s=Date.now()-i,o.addStepResponse(aa.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await sp(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(aa.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));if(o.addStepResponse(aa.GLARE_DETECTION,!d,s),d)return o;if(this.hasBarcode){i=Date.now();const t=this.barcodeModel.detect(e);this.rawBarcodeData=null==t?void 0:t.reduce(((t,e)=>("string"==typeof e.extra&&(t[e.class]=e.extra),t)),{}),s=Date.now()-i;const r=Object.keys(this.rawBarcodeData).length>0;if(o.addStepResponse(aa.BARCODE_DETECTION,r,s),!r)return o}return o}}class cp{constructor(){this.durations=[],this.countSuccess=0,this.countFailed=0}}class lp{constructor(){this.frameHandleDurations=[],this.stableCounts=[0],this.stats=new Map,Object.values(aa).forEach((t=>{this.stats.set(t,new cp)}))}addStats(t,e){this.frameHandleDurations.push(e),t.isValid?this.stableCounts[this.stableCounts.length-1]++:this.stableCounts.push(0),t.steps.forEach((t=>{this.addStat(t.step,t.duration,t.success?1:0,t.success?0:1)}))}addStat(t,e,r,n){const o=this.stats.get(t);if(!o)throw new Error(`Stat for step ${t} not found`);o.durations.push(e),o.countSuccess+=r,o.countFailed+=n}}let dp=!1;const hp=t=>{dp=t};class fp{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Jf;let i=Date.now();const a=null===(n=await ap(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(aa.DOCUMENT_DETECTION,void 0!==a,s),!a)return o;i=Date.now();const u=Zf({captureFrame:document.getElementById("overlay-frame environment").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:ia.state.autoCaptureSettings.settings.capture.documentFrontSizeThreshold,iouThreshold:ia.state.autoCaptureSettings.settings.capture.documentFrontIouThreshold});if(s=Date.now()-i,o.addStepResponse(aa.DOCUMENT_POSITION,u,s),!u)return o;i=Date.now();const c=await sp(e,a);s=Date.now()-i;const l=c.some((t=>"blur"===t.class));if(o.addStepResponse(aa.BLUR_DETECTION,!l,s),l)return o;const d=c.some((t=>"glare"===t.class));return o.addStepResponse(aa.GLARE_DETECTION,!d,s),o}}let pp=!1;const gp=t=>{pp=t};class mp{async validate(t){let{frame:e,deviceInfo:r}=t;var n;const o=new Jf;let i=Date.now();const a=null===(n=await async function(t){return t instanceof HTMLVideoElement&&t.paused?[]:ip("DETECT_FACE_LANDMARKS",t)}(e))||void 0===n?void 0:n[0];let s=Date.now()-i;if(o.addStepResponse(aa.FACE_DETECTION,"face"===(null==a?void 0:a.class),s),!a)return o;i=Date.now();const u=Zf({captureFrame:document.getElementById("overlay-frame user").getBoundingClientRect(),object:a,videoWidth:e.width,videoHeight:e.height,deviceWidth:r.width,deviceHeight:r.height,threshold:ia.state.autoCaptureSettings.settings.faceDetector.selfieSizeThreshold,iouThreshold:ia.state.autoCaptureSettings.settings.faceDetector.selfieIouThreshold});return s=Date.now()-i,o.addStepResponse(aa.FACE_POSITION,u,s),o}}let _p=!1;const yp=t=>{_p=t};async function wp(t,e){var r,n,o,i;let a="camera-error";if("NotAllowedError"===e.name){a="Permission dismissed"===e.message?"camera-permission-dismissed":"camera-permission-denied";const s=da.createCameraNotAllowedEvent(e.message,t);await ha(null===(r=ia.state)||void 0===r?void 0:r.step,null===(n=ia.state)||void 0===n?void 0:n.userToken,null===(o=ia.state)||void 0===o?void 0:o.sessionId,null===(i=ia.state)||void 0===i?void 0:i.clientId,s),ia.dispatch("setIsCapturingProcessStarted",!1)}Qi(t,a)}function vp(t){const e=(t=>{var e,r,n,o;const[i,a]=t.split(",");if(!i||!a)throw new Error("unable-to-parse-data-uri");const s=null===(n=null===(r=null===(e=i.split(";"))||void 0===e?void 0:e[0])||void 0===r?void 0:r.split(":"))||void 0===n?void 0:n[1];if(!s)throw new Error("unable-to-parse-data-uri");const u=null===(o=s.split("/"))||void 0===o?void 0:o[1];if(!u)throw new Error("unable-to-parse-data-uri");return{data:a,format:u}})(t);return{image:{data:e.data,format:e.format,captureMargins:lf()}}}let Ep,bp=!1;const Ap=async()=>{const t=await rf(ia.state.sessionId,ia.state.userToken,ia.state.clientId);Cp(t)},Cp=async t=>{var e;"expired"===(null==t?void 0:t.status)?ta("processing","session-expired",`Session expired for session id: ${ia.state.sessionId}`):(null==t?void 0:t.missing_images)&&(null===(e=null==t?void 0:t.missing_images)||void 0===e?void 0:e.length)>0&&setTimeout(Ap,3e3)},xp=t=>{let{step:e}=t;var r,n,o;const i=null===(n=null===(r=ia.state)||void 0===r?void 0:r.autoCaptureSettings)||void 0===n?void 0:n.enabled;let a=!1;const s=null===(o=ia.state)||void 0===o?void 0:o.videoCaptureSettings,u=(t=>{let e,r,n=!1;const o=If(t),i=new gf(o),a=async()=>{n&&(await i.stopCamera(),i.stream&&i.stream.getTracks().forEach((t=>{"live"==t.readyState&&t.stop()})),n=!1)};return{videoStream:r,startVideoFeed:async t=>{var o,s,u;n&&await a(),"environment"==t&&(e=await vf());const c=null!==(s=null===(o=null==e?void 0:e.selectedCamera)||void 0===o?void 0:o.deviceId)&&void 0!==s?s:t,l=xf(t,null===(u=ia.state)||void 0===u?void 0:u.videoCaptureSettings);mf.getInstance().stopStream(),r=await i.startCamera(c,l),n=!0},stopVideoFeed:a,videoElement:i.videoElement,getDataUri:i.getDataUri,getCameraInfo:()=>e}})(df(e));!function(t){$i({type:"page-load",step:t})}(e),Ap();const c=$f({step:e,setImage:l,camera:u});async function l(t){let{suspendedPreview:r=!1,frame:n,context:o}=t;if(n||(n=Wf(u.videoElement)),"document_front"===e){gp(!1);const t=document.getElementById("front-document-animation");t&&(t.style.opacity="0")}"document_back"===e&&hp(!1),"selfie"===e&&yp(!1);const i=Date.now(),l=function(t){const e=t.getCameraInfo();return{selectedCamera:(null==e?void 0:e.selectedCamera)&&{label:e.selectedCamera.label},camerasInfo:(null==e?void 0:e.optionalCameras)&&e.optionalCameras.map((t=>({label:t.label})))}}(u);if(!a)return;c.setLoadingMode(null==s?void 0:s.showLoadingBlock);const f=(t=>t.toDataURL("image/jpeg"))(n);c.setPreviewImage(f,"selfie"===e),await u.stopVideoFeed(),"selfie"!==e?await h(r,f,l,i,o):(c.setTitleInstructionsMidStep({instructions:"selfie_approval_autocapture"}),c.setApprovalRetakeButtons({approveAction:async()=>{c.hideApprovalRetakeButtons(),await h(r,f,l,i,o)},retakeAction:()=>{c.hideApprovalRetakeButtons(),d()}}))}function d(){if("selfie"===e&&c.setTitleInstructionsMidStep({instructions:"second_title_face_autocapture"}),"document_front"===e){const t=document.getElementById("front-document-animation");t&&(t.style.opacity="1")}u.startVideoFeed(df(e)).then((()=>{a=!0,c.enableVideoElement(),i&&(c.setAutoCapturingError(null),f(e))})).catch((async t=>{throw await wp(e,t),t}))}async function h(t,r,n,o,l){var h,f;const p=[];!function(t){var r,n,o,i;const a=da.createUserActionEvent("capture_image",e,t);ha(null===(r=ia.state)||void 0===r?void 0:r.step,null===(n=ia.state)||void 0===n?void 0:n.userToken,null===(o=ia.state)||void 0===o?void 0:o.sessionId,null===(i=ia.state)||void 0===i?void 0:i.clientId,a)}(null==l?void 0:l.stats),function(t,e){$i({type:"capture-image",imageType:e,step:t})}(e,hf(e));try{const u=Date.now(),g=vp(r);a=!1,p.push(cf(ia.state.sessionId,ia.state.userToken,ia.state.clientId,null==g?void 0:g.image,n,hf(e),(null==l?void 0:l.detectionStrategy)instanceof up?null===(h=l.detectionStrategy)||void 0===h?void 0:h.rawBarcodeData:void 0)),p.push(t?new Promise((t=>setTimeout(t,500))):Promise.resolve(null)),c.setLoadingMode(null==s?void 0:s.showLoadingBlock);const m=(await Promise.all(p))[0];if(Object.prototype.hasOwnProperty.call(m,"has_barcode")&&(bp=m.has_barcode,Ep=null!==(f=m.supported_barcode_symbologies)&&void 0!==f?f:[]),async function(t){let{step:e,requestStartTime:r,imageProcessingStartTime:n,serverProcessingTime:o,userToken:i,sessionId:a,clientId:s}=t;const u=Date.now()-r,c=n?r-n:0,l=da.createUploadImageEvent(e,String(u),String(o),String(c));await ha(e,i,a,s,l)}({step:e,requestStartTime:u,imageProcessingStartTime:o,serverProcessingTime:m.serverProcessingTime,userToken:ia.state.userToken,sessionId:ia.state.sessionId,clientId:ia.state.clientId}),ia.dispatch("setMissingImages",m.missing_images),c.setLoadingComplete(),function(t,e,r){$i({type:"capture-image-result",imageType:e,feedback:r,step:t})}(e,hf(e),m.feedback),"ok"!==m.feedback)return await async function(t){Yf("border-color",Hf),i?c.setAutoCapturingError(t.feedback,t.custom_feedback):c.setCapturingShowErrorMode(t.feedback,t.custom_feedback),await new Promise((t=>setTimeout(t,1e3))),Yf("border-color",Gf)}(m),void d();Yf("border-color",jf),await new Promise((t=>setTimeout(t,750))),Yf("border-color",Gf),ia.dispatch("setStep",(t=>{let e;return e=t&&t.length>0?t[0]:"processing",e})(ia.state.missingImages))}catch(t){c.setLoadingComplete(),c.setCapturingShowErrorMode(So.feedback.OTHER),u.startVideoFeed(df(e)).then((()=>{a=!0})).catch((async t=>{throw await wp(e,t),t})),Qi(e,"failed-to-submit-image")}}async function f(t){if("document_front"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ma("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n}=t;var o,i,a,s,u,c,l;const d=new op(new fp,null!==(a=null===(i=null===(o=ia.state.autoCaptureSettings.settings)||void 0===o?void 0:o.stability)||void 0===i?void 0:i.documentFrontStableFramesCount)&&void 0!==a?a:2),h=new lp;for(gp(!0);d.state.name!==Vf.ACCEPTED&&pp;){const t=Date.now(),o=Wf(e.videoElement),i={width:null!==(u=null===(s=e.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==u?u:0,height:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==l?l:0},a=await d.handleFrame({frame:o,deviceInfo:i}),f=Date.now()-t+50;h.addStats(a,f),d.stats=h,await Xf({context:d,onDetect:r,showError:n,frame:o}),await new Promise((t=>setTimeout(t,50)))}}({camera:u,onDetect:l,showError:c.setAutoCapturingError})}if("document_back"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ma("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n,hasBarcode:o,supportedBarcodeSymbologies:i}=t;var a,s,u,c,l,d,h;const f=new op(new up(o,i),null!==(u=null===(s=null===(a=ia.state.autoCaptureSettings.settings)||void 0===a?void 0:a.stability)||void 0===s?void 0:s.documentBackStableFramesCount)&&void 0!==u?u:1);hp(!0);const p=new lp;for(;f.state.name!==Vf.ACCEPTED&&dp;){const t=Date.now(),o=Wf(e.videoElement),i={width:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.width)&&void 0!==l?l:0,height:null!==(h=null===(d=e.videoElement.getBoundingClientRect())||void 0===d?void 0:d.height)&&void 0!==h?h:0},a=await f.handleFrame({frame:o,deviceInfo:i}),s=Date.now()-t+50;p.addStats(a,s),f.stats=p,await Xf({context:f,onDetect:r,showError:n,frame:o}),await new Promise((t=>setTimeout(t,50)))}}({camera:u,onDetect:l,showError:c.setAutoCapturingError,hasBarcode:bp,supportedBarcodeSymbologies:Ep})}if("selfie"===t){for(;!a||u.videoElement.paused;)await new Promise((t=>setTimeout(t,100)));return u.videoElement.onloadedmetadata=()=>{var t;ma("video dimensions (width, height, orientation): ",u.videoElement.videoWidth,u.videoElement.videoHeight,null===(t=null===window||void 0===window?void 0:window.screen)||void 0===t?void 0:t.orientation)},await async function(t){let{camera:e,onDetect:r,showError:n}=t;var o,i,a,s,u,c,l;const d=new op(new mp,null!==(a=null===(i=null===(o=ia.state.autoCaptureSettings.settings)||void 0===o?void 0:o.stability)||void 0===i?void 0:i.selfieStableFramesCount)&&void 0!==a?a:30);yp(!0);const h=new lp;for(;d.state.name!==Vf.ACCEPTED&&_p;){const t=Date.now(),o=Wf(e.videoElement),i={width:null!==(u=null===(s=e.videoElement.getBoundingClientRect())||void 0===s?void 0:s.width)&&void 0!==u?u:0,height:null!==(l=null===(c=e.videoElement.getBoundingClientRect())||void 0===c?void 0:c.height)&&void 0!==l?l:0},a=await d.handleFrame({frame:o,deviceInfo:i}),f=Date.now()-t;h.addStats(a,f),d.stats=h,await Xf({context:d,onDetect:r,showError:n,frame:o,isSelfie:!0}),await new Promise((t=>setTimeout(t,50)))}}({camera:u,onDetect:l,showError:c.setAutoCapturingError})}}return i&&f(e),(async t=>{var e,r,n,o;const i=da.createPageViewEvent(t);await ha(null===(e=ia.state)||void 0===e?void 0:e.step,null===(r=ia.state)||void 0===r?void 0:r.userToken,null===(n=ia.state)||void 0===n?void 0:n.sessionId,null===(o=ia.state)||void 0===o?void 0:o.clientId,i)})(e),u.startVideoFeed(df(e)).then((()=>{a=!0})).catch((async t=>{throw await wp(e,t),t})),c.component},Ip=()=>{$i({type:"start-verification-processing",step:ia.state.step}),Ji("processing","processing",ia.state.sessionId);const t=Sp("processing-verification");uf(t,zf({text:"Processing Verification",id:"processing-verification-header",testid:"processing-verification-header"}));const e=async()=>{const t=await rf(ia.state.sessionId,ia.state.userToken,ia.state.clientId);o(t)},r=()=>{setTimeout(e,3e3)},n=async t=>{ia.dispatch("setStep",t.status),ia.dispatch("setStatus",t.status)},o=async t=>{var e,o,i;if(ia.dispatch("setMissingImages",t.missing_images),t.status)if("complete"===(null==t?void 0:t.status)){mf.getInstance().stopStream();const r=da.createProcessingCompleteEvent();await ha(ia.state.step,ia.state.userToken,null===(e=ia.state)||void 0===e?void 0:e.sessionId,null===(o=ia.state)||void 0===o?void 0:o.clientId,r),n(t),Ji("complete",t.status,ia.state.sessionId),function(t,e,r){$i({type:"verification-complete",step:t,sessionId:e,callbackUrl:r})}("complete",ia.state.sessionId,t.callback_url),i=Yi,sessionStorage.removeItem(i)}else"recapture"===(null==t?void 0:t.status)?(n(t),ia.dispatch("setIsCapturingProcessStarted",!1),Ji("recapture",t.status,ia.state.sessionId),function(t,e,r){$i({type:"verification-recapture",step:t,sessionId:e,reason:r})}("recapture",t.status,t.recapture_reason)):"expired"===(null==t?void 0:t.status)?ta("processing","session-expired",`Session expired for session id: ${ia.state.sessionId}`):r();else"processing"!==t.state&&(n(t),r())};return e(),t},Sp=t=>sf({tagName:"div",style:{display:"flex",height:"100%",justifyContent:"space-between",flexDirection:"column",alignItems:"center"},id:t,testid:"processing-verification"});function Tp(t,e){var r;if(!t)return;null===(r=e.firstChild)||void 0===r||r.remove();const n=function(t){switch(t){case"processing":return Ip;case"document_front":case"document_back":case"selfie":return xp;default:throw new Error("Invalid step")}}(t);uf(e,n({step:t}))}function Dp(t){let{key:e,state:r}=t;const n=r.rootElementId,o=document.getElementById(n);"step"===e&&"complete"!==r.step&&"recapture"!==r.step&&Tp(r.step,o),o&&"processing"===r.step&&(o.style.visibility="hidden")}function Op(){const t=nf(Zi(Yi));if(!nf)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 e=t.sessionId,r=t.userToken;return ia.dispatch("setSessionId",e),ia.dispatch("setUserToken",r),{sessionId:e,userToken:r}}async function Rp(){var t,e;if(null===(t=ia.state.autoCaptureSettings)||void 0===t?void 0:t.enabled){const t=Date.now();try{await kp(),ma("all models loaded - auto-capture enabled")}catch(t){ia.dispatch("setAutoCaptureSettings",{enabled:!1,autocapture_settings:null===(e=ia.state.autoCaptureSettings)||void 0===e?void 0:e.settings}),ma("Model loading did not complete on time:",t);pa(`timed out loading models: ${jh.filter((t=>Uh[t].status!==zh.LOADED)).map((t=>t)).join(", ")}`,"model_load_timeout","init")}const r=Object.values(Uh).filter((t=>t.status===zh.LOADED)).map((t=>t.loadingStats));!async function(t,e){const r=da.createSdkInitEvent(t,e);await ga("init",r)}(Date.now()-t,r)}}async function Mp(t){var e;try{await mf.getInstance().startNewStream({video:o(o({},xf("environment",null===(e=ia.state)||void 0===e?void 0:e.videoCaptureSettings)),{},{deviceId:await Cf("environment")})}),function(t,e){$i({type:"session-id-acquired",step:t,sessionId:e})}("init",t),function(t,e,r){const n=document.getElementById(r);n.style.visibility="visible",Tp(t[0],n)}(ia.state.missingImages,ia.state.sessionId,ia.state.rootElementId)}catch(t){await wp("init",t)}}async function Np(t){let{status:e,sessionId:r,userToken:n,missingImages:o,rootElementId:i,language:a}=t;!function(t,e){$i({type:"session-granted",step:t,sessionId:e})}("init",r),ia.dispatch("setStatus",e),ia.dispatch("setSessionId",r),ia.dispatch("setUserToken",n),ia.dispatch("setMissingImages",o),ia.dispatch("setRootElement",i),ia.dispatch("setLanguage",a),async function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";ya.overrideLanguage(wa[r]||wa.en);let n=document.getElementById(e);if(!n){n=sf({tagName:"div",style:{background:"#fff",position:"absolute",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",font:"inherit"},id:e,testid:"root"});const t=document.createElement("style");t.innerHTML=`\n @media only screen and (max-height: 576px) {\n #${e} #trigger-section {\n margin: 0 !important;\n }\n #${e} #page-header {\n height: 5% !important;\n }\n }\n `,uf(document.head,t),uf(document.body,n)}}(ia.state.sessionId,ia.state.rootElementId,ia.state.language),function(){try{Gi.events.off(Xi,Dp)}catch(t){}Gi.events.on(Xi,Dp)}(),await Rp(),await Mp(r)}const kp=async()=>{const t=ia.state.autoCaptureSettings.settings.modelLoadingTimeout;return Promise.race([Gh(),new Promise(((e,r)=>setTimeout((()=>r(new Error(`Model loading timed out after ${t} ms`))),t)))])};async function Pp(t){if(ia.state.isCapturingProcessStarted)return void Qi(ia.state.step,"trying-to-initialize-active-session");let e,r;if(t){const n=await async function(t){let e,r;try{const n=await af(t,ia.state.consentVersion,ia.state.clientId);return e=n.sessionId,r=n.userToken,ia.dispatch("setSessionId",e),ia.dispatch("setUserToken",r),{sessionId:e,userToken:r}}catch(t){throw console.log("Error starting session"),console.error(t),t}}(t);e=n.sessionId,r=n.userToken}else{const t=Op();e=t.sessionId,r=t.userToken}if(!e)return void Qi(ia.state.step,"other");const{missing_images:n,status:o}=await rf(e,r,ia.state.clientId);return ia.dispatch("setIsCapturingProcessStarted",!0),await Np({status:o,sessionId:e,userToken:r,missingImages:n,rootElementId:ia.state.rootElementId,language:ia.state.language}),!0}async function Bp(t){try{return await Pp(t)}catch(t){throw console.log("Error starting session"),console.error(t),t}}async function Fp(){try{return await async function(){if("recapture"===ia.state.verificationStatus||"pending"===ia.state.verificationStatus){const{sessionId:t,userToken:e}=Op(),{missing_images:r,status:n}=await rf(t,e,ia.state.clientId);return await Np({status:n,sessionId:t,userToken:e,missingImages:r,rootElementId:ia.state.rootElementId,language:ia.state.language}),!0}Qi(ia.state.step,"trying-to-initialize-active-session")}()}catch(t){throw console.log("Error restarting session"),console.error(t),t}}async function Lp(){return Fp()}const zp=()=>No;var Up=Object.freeze({__proto__:null,recapture:Fp,restart:Lp,start:Bp,version:zp});const Vp={initialize:e.initialize,...Up};Object.defineProperty(exports,"initialize",{enumerable:!0,get:function(){return e.initialize}}),exports.PACKAGE_VERSION="2.0.1",exports.idv=Vp,exports.recapture=Fp,exports.restart=Lp,exports.start=Bp,exports.version=zp;