PageSourceSearch

https://welwelburgers.com.br/assets/Content-DeEBdgBU.js

js welwelburgers.com.br collected 2026-09-29 01:47:22 UTC 363,271 bytes, 22 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="07062141-e705-5145-b835-c4cd6a4a64f2")}catch(e){}}();
3import{j as N,af as Ir,c as nr,P as z,R as lt,bY as Sr,B as Or,D as or,r as St,b4 as br,a as Tr,aw as Rr}from"./index-CVhO1mfm.js";import{d as Nr}from"./index-C5Xw5HCy.js";import{E as Dr}from"./Error-BQ-LaZz6.js";import{a as Pr}from"./apiEndpoints-BbCkNzPE.js";import{u as Mr}from"./useDeliveryManPedingOrders-DcYTU_r1.js";import{T as Br,a as Pe}from"./Tabs-BmQOOuI1.js";import"./whatsappLink-CCcWEDnq.js";import"./Products-Clk528Gk.js";import"./useLogisticsPIN-DX0Kedau.js";function Oe({scan:r}){return N.jsxs("div",{className:nr("flex items-center space-x-3.5 rounded-md border border-solid p-3.5",r.success?"border-green-300 text-green-400":"border-red-300 text-red-400"),children:[r.success?N.jsx(Nr,{color:"inherit"}):N.jsx(Ir,{color:"inherit"}),N.jsx("span",{className:"font-bold",children:r==null?void 0:r.description})]})}Oe.propTypes={scan:z.shape({id:z.number,orderUid:z.string,description:z.string,success:z.bool}).isRequired};function ir({historic:r,loading:t,processOrder:e}){const[n,o]=lt.useState(""),[i,a]=lt.useState(!1),s=lt.useRef(null),u=lt.useCallback(async()=>{if(n)a(!1);else{a(!0);return}const c={id:Date.now(),orderNumber:n};await e(c),o(""),s.current&&s.current.focus()},[n,e]);return N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"space-y-4 px-4 pt-4 text-gray-700",children:[N.jsx("div",{className:"text-center text-base font-medium",children:"Informe abaixo o número do pedido para atribuí-lo a você"}),N.jsx(Sr,{inputRef:s,label:"Número do pedido",value:n,onChange:c=>o(c.target.value),error:i,helperText:i&&"Informe o número do pedido",inputProps:{inputMode:"tel"},variant:"outlined",size:"medium",autoFocus:!0,fullWidth:!0}),N.jsx(Or,{onClick:u,variant:"contained",color:"primary",size:"large",fullWidth:!0,disabled:t,disableElevation:!0,children:t?N.jsx(or,{color:"inherit",size:24}):"Atribuir pedido"})]}),r.length>0&&N.jsxs("div",{className:"flex flex-1 flex-col overflow-auto p-4 text-gray-700",children:[N.jsx("div",{className:"mt-1 border-t border-dashed border-gray-300"}),N.jsx("div",{className:"flex-1 space-y-3 overflow-auto pt-4",children:r.map(c=>N.jsx(Oe,{scan:c},c.id))})]})]})}ir.propTypes={historic:z.arrayOf(z.shape({id:z.number,orderUid:z.string,description:z.string,success:z.bool})).isRequired,processOrder:z.func.isRequired,loading:z.bool.isRequired};const Lr=r=>St.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",className:"bi bi-qr-code-scan",viewBox:"0 0 16 16",...r},St.createElement("path",{d:"M0 .5A.5.5 0 0 1 .5 0h3a.5.5 0 0 1 0 1H1v2.5a.5.5 0 0 1-1 0v-3Zm12 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V1h-2.5a.5.5 0 0 1-.5-.5ZM.5 12a.5.5 0 0 1 .5.5V15h2.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5Zm15 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1 0-1H15v-2.5a.5.5 0 0 1 .5-.5ZM4 0"}));var Zt,_e,Fr=(Zt=function(r,t){return Zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])},Zt(r,t)},function(r,t){function e(){this.constructor=r}Zt(r,t),r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}),xr=function(r){function t(e){var n,o,i,a=this.constructor,s=r.call(this,e)||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(u,c){c===void 0&&(c=u.constructor);var f=Error.captureStackTrace;f&&f(u,c)}(s),s}return Fr(t,r),t}(Error),kr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ut=function(r){function t(e){e===void 0&&(e=void 0);var n=r.call(this,e)||this;return n.message=e,n}return kr(t,r),t.prototype.getKind=function(){return this.constructor.kind},t.kind="Exception",t}(xr),Vr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
3r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),W=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Vr(t,r),t.kind="ArgumentException",t}(ut),Ur=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),D=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Ur(t,r),t.kind="IllegalArgumentException",t}(ut),ar=function(){function r(t){if(this.binarizer=t,t===null)throw new D("Binarizer must be non-null.")}return r.prototype.getWidth=function(){return this.binarizer.getWidth()},r.prototype.getHeight=function(){return this.binarizer.getHeight()},r.prototype.getBlackRow=function(t,e){return this.binarizer.getBlackRow(t,e)},r.prototype.getBlackMatrix=function(){return this.matrix!==null&&this.matrix!==void 0||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},r.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},r.prototype.crop=function(t,e,n,o){var i=this.binarizer.getLuminanceSource().crop(t,e,n,o);return new r(this.binarizer.createBinarizer(i))},r.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},r.prototype.rotateCounterClockwise=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new r(this.binarizer.createBinarizer(t))},r.prototype.rotateCounterClockwise45=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new r(this.binarizer.createBinarizer(t))},r.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},r}(),Hr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),q=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Hr(t,r),t.getChecksumInstance=function(){return new t},t.kind="ChecksumException",t}(ut),Gr=function(){function r(t){this.source=t}return r.prototype.getLuminanceSource=function(){return this.source},r.prototype.getWidth=function(){return this.source.getWidth()},r.prototype.getHeight=function(){return this.source.getHeight()},r}(),G=function(){function r(){}return r.arraycopy=function(t,e,n,o,i){for(;i--;)n[o++]=t[e++]},r.currentTimeMillis=function(){return Date.now()},r}(),Xr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),be=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Xr(t,r),t.kind="IndexOutOfBoundsException",t}(ut),jr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Me=function(r){function t(e,n){e===void 0&&(e=void 0),n===void 0&&(n=void 0);var o=r.call(this,n)||this;return o.index=e,o.message=n,o}return jr(t,r),t.kind="ArrayIndexOutOfBoundsException",t}(be),Wr=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ht=function(){function r(){}return r.fill=function(t,e){for(var n=0,o=t.length;n<o;n++)t[n]=e},r.fillWithin=function(t,e,n,o){r.rangeCheck(t.length,e,n);for(var i=e;i<n;i++)t[i]=o},r.rangeCheck=function(t,e,n){if(e>n)throw new D("fromIndex("+e+") > toIndex("+n+")");if(e<0)throw new Me(e);if(n>t)throw new Me(n)},r.asList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},r.create=function(t,e,n){return Array.from({length:t}).map(function(o){return Array.from({length:e}).fill(n)})},r.createInt32Array=function(t,e,n){return Array.from({length:t}).map(function(o){return Int32Array.from({length:e}).fill(n)})},r.equals=function(t,e){if(!t||!e||!t.length||!e.length||t.length!==e.length)return!1;for(var n=0,o=t.length;n<o;n++)if(t[n]!==e[n])return!1;return!0},r.hashCode=function(t){var e,n;if(t===null)return 0;var o=1;try{for(var i=Wr(t),a=i.next();!a.done;a=i.next())o=31*o+a.value}catch(s){e={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o},r.fillUint8Array=function(t,e){for(var n=0;n!==t.length;n++)t[n]=e},r.copyOf=function(t,e){return t.slice(0,e)},r.copyOfUint8Array=function(t,e){if(t.length<=e){var n=new Uint8Array(e);return n.set(t),n}return t.slice(0,e)},r.copyOfRange=function(t,e,n){var o=n-e,i=new Int32Array(o);
3return G.arraycopy(t,e,i,0,o),i},r.binarySearch=function(t,e,n){n===void 0&&(n=r.numberComparator);for(var o=0,i=t.length-1;o<=i;){var a=i+o>>1,s=n(e,t[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},r.numberComparator=function(t,e){return t-e},r}(),et=function(){function r(){}return r.numberOfTrailingZeros=function(t){var e;if(t===0)return 32;var n=31;return(e=t<<16)!==0&&(n-=16,t=e),(e=t<<8)!==0&&(n-=8,t=e),(e=t<<4)!==0&&(n-=4,t=e),(e=t<<2)!==0&&(n-=2,t=e),n-(t<<1>>>31)},r.numberOfLeadingZeros=function(t){if(t===0)return 32;var e=1;return!(t>>>16)&&(e+=16,t<<=16),!(t>>>24)&&(e+=8,t<<=8),!(t>>>28)&&(e+=4,t<<=4),!(t>>>30)&&(e+=2,t<<=2),e-=t>>>31},r.toHexString=function(t){return t.toString(16)},r.toBinaryString=function(t){return String(parseInt(String(t),2))},r.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},r.truncDivision=function(t,e){return Math.trunc(t/e)},r.parseInt=function(t,e){return e===void 0&&(e=void 0),parseInt(t,e)},r.MIN_VALUE_32_BITS=-2147483648,r.MAX_VALUE=Number.MAX_SAFE_INTEGER,r}(),_t=function(){function r(t,e){t===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=e??r.makeArray(t))}return r.prototype.getSize=function(){return this.size},r.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},r.prototype.ensureCapacity=function(t){if(t>32*this.bits.length){var e=r.makeArray(t);G.arraycopy(this.bits,0,e,0,this.bits.length),this.bits=e}},r.prototype.get=function(t){return(this.bits[Math.floor(t/32)]&1<<(31&t))!=0},r.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},r.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},r.prototype.getNextSet=function(t){var e=this.size;if(t>=e)return e;var n=this.bits,o=Math.floor(t/32),i=n[o];i&=~((1<<(31&t))-1);for(var a=n.length;i===0;){if(++o===a)return e;i=n[o]}var s=32*o+et.numberOfTrailingZeros(i);return s>e?e:s},r.prototype.getNextUnset=function(t){var e=this.size;if(t>=e)return e;var n=this.bits,o=Math.floor(t/32),i=~n[o];i&=~((1<<(31&t))-1);for(var a=n.length;i===0;){if(++o===a)return e;i=~n[o]}var s=32*o+et.numberOfTrailingZeros(i);return s>e?e:s},r.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},r.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new D;if(e!==t){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));i[a]|=s}}},r.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,n=0;n<t;n++)e[n]=0},r.prototype.isRange=function(t,e,n){if(e<t||t<0||e>this.size)throw new D;if(e===t)return!0;e--;for(var o=Math.floor(t/32),i=Math.floor(e/32),a=this.bits,s=o;s<=i;s++){var u=(2<<(s<i?31:31&e))-(1<<(s>o?0:31&t))&4294967295;if((a[s]&u)!==(n?u:0))return!1}return!0},r.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},r.prototype.appendBits=function(t,e){if(e<0||e>32)throw new D("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(var n=e;n>0;n--)this.appendBit((t>>n-1&1)==1)},r.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e);for(var n=0;n<e;n++)this.appendBit(t.get(n))},r.prototype.xor=function(t){if(this.size!==t.size)throw new D("Sizes don't match");for(var e=this.bits,n=0,o=e.length;n<o;n++)e[n]^=t.bits[n]},r.prototype.toBytes=function(t,e,n,o){for(var i=0;i<o;i++){for(var a=0,s=0;s<8;s++)this.get(t)&&(a|=1<<7-s),t++;e[n+i]=a}},r.prototype.getBitArray=function(){return this.bits},r.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),n=e+1,o=this.bits,i=0;i<n;i++){var a=o[i];a=(a=(a=(a=(a=a>>1&1431655765|(1431655765&a)<<1)>>2&858993459|(858993459&a)<<2)>>4&252645135|(252645135&a)<<4)>>8&16711935|(16711935&a)<<8)>>16&65535|(65535&a)<<16,t[e-i]=a}if(this.size!==32*n){var s=32*n-this.size,u=t[0]>>>s;for(i=1;i<n;i++){var c=t[i];u|=c<<32-s,t[i-1]=u,u=c>>>s}t[n-1]=u}this.bits=t},r.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.size===e.size&&ht.equals(this.bits,e.bits)}
3,r.prototype.hashCode=function(){return 31*this.size+ht.hashCode(this.bits)},r.prototype.toString=function(){for(var t="",e=0,n=this.size;e<n;e++)!(7&e)&&(t+=" "),t+=this.get(e)?"X":".";return t},r.prototype.clone=function(){return new r(this.size,this.bits.slice())},r}();(function(r){r[r.OTHER=0]="OTHER",r[r.PURE_BARCODE=1]="PURE_BARCODE",r[r.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",r[r.TRY_HARDER=3]="TRY_HARDER",r[r.CHARACTER_SET=4]="CHARACTER_SET",r[r.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",r[r.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",r[r.ASSUME_GS1=7]="ASSUME_GS1",r[r.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",r[r.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",r[r.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"})(_e||(_e={}));var x,H=_e,zr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),S=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return zr(t,r),t.getFormatInstance=function(){return new t},t.kind="FormatException",t}(ut),Yr=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){r[r.Cp437=0]="Cp437",r[r.ISO8859_1=1]="ISO8859_1",r[r.ISO8859_2=2]="ISO8859_2",r[r.ISO8859_3=3]="ISO8859_3",r[r.ISO8859_4=4]="ISO8859_4",r[r.ISO8859_5=5]="ISO8859_5",r[r.ISO8859_6=6]="ISO8859_6",r[r.ISO8859_7=7]="ISO8859_7",r[r.ISO8859_8=8]="ISO8859_8",r[r.ISO8859_9=9]="ISO8859_9",r[r.ISO8859_10=10]="ISO8859_10",r[r.ISO8859_11=11]="ISO8859_11",r[r.ISO8859_13=12]="ISO8859_13",r[r.ISO8859_14=13]="ISO8859_14",r[r.ISO8859_15=14]="ISO8859_15",r[r.ISO8859_16=15]="ISO8859_16",r[r.SJIS=16]="SJIS",r[r.Cp1250=17]="Cp1250",r[r.Cp1251=18]="Cp1251",r[r.Cp1252=19]="Cp1252",r[r.Cp1256=20]="Cp1256",r[r.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",r[r.UTF8=22]="UTF8",r[r.ASCII=23]="ASCII",r[r.Big5=24]="Big5",r[r.GB18030=25]="GB18030",r[r.EUC_KR=26]="EUC_KR"})(x||(x={}));var ve,st=function(){function r(t,e,n){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=t,this.name=n,this.values=typeof e=="number"?Int32Array.from([e]):e,this.otherEncodingNames=a,r.VALUE_IDENTIFIER_TO_ECI.set(t,this),r.NAME_TO_ECI.set(n,this);for(var u=this.values,c=0,f=u.length;c!==f;c++){var l=u[c];r.VALUES_TO_ECI.set(l,this)}try{for(var h=Yr(a),d=h.next();!d.done;d=h.next()){var g=d.value;r.NAME_TO_ECI.set(g,this)}}catch(y){o={error:y}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return r.prototype.getValueIdentifier=function(){return this.valueIdentifier},r.prototype.getName=function(){return this.name},r.prototype.getValue=function(){return this.values[0]},r.getCharacterSetECIByValue=function(t){if(t<0||t>=900)throw new S("incorect value");var e=r.VALUES_TO_ECI.get(t);if(e===void 0)throw new S("incorect value");return e},r.getCharacterSetECIByName=function(t){var e=r.NAME_TO_ECI.get(t);if(e===void 0)throw new S("incorect value");return e},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.getName()===e.getName()},r.VALUE_IDENTIFIER_TO_ECI=new Map,r.VALUES_TO_ECI=new Map,r.NAME_TO_ECI=new Map,r.Cp437=new r(x.Cp437,Int32Array.from([0,2]),"Cp437"),r.ISO8859_1=new r(x.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),r.ISO8859_2=new r(x.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),r.ISO8859_3=new r(x.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),r.ISO8859_4=new r(x.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),r.ISO8859_5=new r(x.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),r.ISO8859_6=new r(x.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),r.ISO8859_7=new r(x.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),r.ISO8859_8=new r(x.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),r.ISO8859_9=new r(x.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),r.ISO8859_10=new r(x.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),r.ISO8859_11=new r(x.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),r.ISO8859_13=new r(x.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),r.ISO8859_14=new r(x.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),r.ISO8859_15=new r(x.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),r.ISO8859_16=new r(x.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),r.SJIS=new r(x.SJIS,20,"SJIS","Shift_JIS"),r.Cp1250=new r(x.Cp1250,21,"Cp1250","windows-1250"),r.Cp1251=new r(x.Cp1251,22,"Cp1251","windows-1251"),r.Cp1252=new r(x.Cp1252,23,"Cp1252","windows-1252"),r.Cp1256=new r(x.Cp1256,24,"Cp1256","windows-1256"),r.UnicodeBigUnmarked=new r(x.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),r.UTF8=new r(x.UTF8,26,"UTF8","UTF-8"),r.ASCII=new r(x.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),r.Big5=new r(x.Big5,28,"Big5"),r.GB18030=new r(x.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),r.EUC_KR=new r(x.EUC_KR,30,"EUC_KR","EUC-KR"),r}(),Zr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
3r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ee=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Zr(t,r),t.kind="UnsupportedOperationException",t}(ut),Mt=function(){function r(){}return r.decode=function(t,e){var n=this.encodingName(e);return this.customDecoder?this.customDecoder(t,n):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(n)?this.decodeFallback(t,n):new TextDecoder(n).decode(t)},r.shouldDecodeOnFallback=function(t){return!r.isBrowser()&&t==="ISO-8859-1"},r.encode=function(t,e){var n=this.encodingName(e);return this.customEncoder?this.customEncoder(t,n):typeof TextEncoder>"u"?this.encodeFallback(t):new TextEncoder().encode(t)},r.isBrowser=function(){return typeof window<"u"&&{}.toString.call(window)==="[object Window]"},r.encodingName=function(t){return typeof t=="string"?t:t.getName()},r.encodingCharacterSet=function(t){return t instanceof st?t:st.getCharacterSetECIByName(t)},r.decodeFallback=function(t,e){var n=this.encodingCharacterSet(e);if(r.isDecodeFallbackSupported(n)){for(var o="",i=0,a=t.length;i<a;i++){var s=t[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(n.equals(st.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(t.buffer));throw new ee("Encoding "+this.encodingName(e)+" not supported by fallback.")},r.isDecodeFallbackSupported=function(t){return t.equals(st.UTF8)||t.equals(st.ISO8859_1)||t.equals(st.ASCII)},r.encodeFallback=function(t){for(var e=btoa(unescape(encodeURIComponent(t))).split(""),n=[],o=0;o<e.length;
3o++)n.push(e[o].charCodeAt(0));return new Uint8Array(n)},r}(),$=function(){function r(){}return r.castAsNonUtf8Char=function(t,e){e===void 0&&(e=null);var n=e?e.getName():this.ISO88591;return Mt.decode(new Uint8Array([t]),n)},r.guessEncoding=function(t,e){if(e!=null&&e.get(H.CHARACTER_SET)!==void 0)return e.get(H.CHARACTER_SET).toString();for(var n=t.length,o=!0,i=!0,a=!0,s=0,u=0,c=0,f=0,l=0,h=0,d=0,g=0,y=0,_=0,w=0,m=t.length>3&&t[0]===239&&t[1]===187&&t[2]===191,C=0;C<n&&(o||i||a);C++){var E=255&t[C];a&&(s>0?128&E?s--:a=!1:128&E&&(64&E?(s++,32&E?(s++,16&E?(s++,8&E?a=!1:f++):c++):u++):a=!1)),o&&(E>127&&E<160?o=!1:E>159&&(E<192||E===215||E===247)&&w++),i&&(l>0?E<64||E===127||E>252?i=!1:l--:E===128||E===160||E>239?i=!1:E>160&&E<224?(h++,g=0,++d>y&&(y=d)):E>127?(l++,d=0,++g>_&&(_=g)):(d=0,g=0))}return a&&s>0&&(a=!1),i&&l>0&&(i=!1),a&&(m||u+c+f>0)?r.UTF8:i&&(r.ASSUME_SHIFT_JIS||y>=3||_>=3)?r.SHIFT_JIS:o&&i?y===2&&h===2||10*w>=n?r.SHIFT_JIS:r.ISO88591:o?r.ISO88591:i?r.SHIFT_JIS:a?r.UTF8:r.PLATFORM_DEFAULT_ENCODING},r.format=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=-1;function i(s,u,c,f,l,h){if(s==="%%")return"%";if(e[++o]!==void 0){s=f?parseInt(f.substr(1)):void 0;var d,g=l?parseInt(l.substr(1)):void 0;switch(h){case"s":d=e[o];break;case"c":d=e[o][0];break;case"f":d=parseFloat(e[o]).toFixed(s);break;case"p":d=parseFloat(e[o]).toPrecision(s);break;case"e":d=parseFloat(e[o]).toExponential(s);break;case"x":d=parseInt(e[o]).toString(g||16);break;case"d":d=parseFloat(parseInt(e[o],g||10).toPrecision(s)).toFixed(0)}d=typeof d=="object"?JSON.stringify(d):(+d).toString(g);for(var y=parseInt(c),_=c&&c[0]+""=="0"?"0":" ";d.length<y;)d=u!==void 0?d+_:_+d;return d}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return t.replace(a,i)},r.getBytes=function(t,e){return Mt.encode(t,e)},r.getCharCode=function(t,e){return e===void 0&&(e=0),t.charCodeAt(e)},r.getCharAt=function(t){return String.fromCharCode(t)},r.SHIFT_JIS=st.SJIS.getName(),r.GB2312="GB2312",r.ISO88591=st.ISO8859_1.getName(),r.EUC_JP="EUC_JP",r.UTF8=st.UTF8.getName(),r.PLATFORM_DEFAULT_ENCODING=r.UTF8,r.ASSUME_SHIFT_JIS=!1,r}(),U=function(){function r(t){t===void 0&&(t=""),this.value=t}return r.prototype.enableDecoding=function(t){return this.encoding=t,this},r.prototype.append=function(t){return typeof t=="string"?this.value+=t.toString():this.encoding?this.value+=$.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},r.prototype.appendChars=function(t,e,n){for(var o=e;e<e+n;o++)this.append(t[o]);return this},r.prototype.length=function(){return this.value.length},r.prototype.charAt=function(t){return this.value.charAt(t)},r.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},r.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},r.prototype.substring=function(t,e){return this.value.substring(t,e)},r.prototype.setLengthToZero=function(){this.value=""},r.prototype.toString=function(){return this.value},r.prototype.insert=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+e.length)},r}(),mt=function(){function r(t,e,n,o){if(this.width=t,this.height=e,this.rowSize=n,this.bits=o,e==null&&(e=t),this.height=e,t<1||e<1)throw new D("Both dimensions must be greater than 0");n==null&&(n=Math.floor((t+31)/32)),this.rowSize=n,o==null&&(this.bits=new Int32Array(this.rowSize*this.height))}return r.parseFromBooleanArray=function(t){for(var e=t.length,n=t[0].length,o=new r(n,e),i=0;i<e;i++)for(var a=t[i],s=0;s<n;s++)a[s]&&o.set(s,i);return o},r.parseFromString=function(t,e,n){if(t===null)throw new D("stringRepresentation cannot be null");for(var o=new Array(t.length),i=0,a=0,s=-1,u=0,c=0;c<t.length;)if(t.charAt(c)===`
4`||t.charAt(c)==="\r"){if(i>a){if(s===-1)s=i-a;else if(i-a!==s)throw new D("row lengths do not match");a=i,u++}c++}else if(t.substring(c,c+e.length)===e)c+=e.length,o[i]=!0,i++;else{if(t.substring(c,c+n.length)!==n)throw new D("illegal character encountered: "+t.substring(c));c+=n.length,o[i]=!1,i++}if(i>a){if(s===-1)s=i-a;else if(i-a!==s)throw new D("row lengths do not match");u++}for(var f=new r(s,u),l=0;l<i;l++)o[l]&&f.set(Math.floor(l%s),Math.floor(l/s));return f},r.prototype.get=function(t,e){var n=e*this.rowSize+Math.floor(t/32);return(this.bits[n]>>>(31&t)&1)!=0},r.prototype.set=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]|=1<<(31&t)&4294967295},r.prototype.unset=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]&=~(1<<(31&t)&4294967295)},r.prototype.flip=function(t,e){var n=e*this.rowSize+Math.floor(t/32);this.bits[n]^=1<<(31&t)&4294967295},r.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new D("input matrix dimensions do not match");for(var e=new _t(Math.floor(this.width/32)+1),n=this.rowSize,o=this.bits,i=0,a=this.height;i<a;i++)for(var s=i*n,u=t.getRow(i,e).getBitArray(),c=0;c<n;c++)o[s+c]^=u[c]},r.prototype.clear=function(){for(var t=this.bits,e=t.length,n=0;n<e;n++)t[n]=0},r.prototype.setRegion=function(t,e,n,o){if(e<0||t<0)throw new D("Left and top must be nonnegative");if(o<1||n<1)throw new D("Height and width must be at least 1");var i=t+n,a=e+o;if(a>this.height||i>this.width)throw new D("The region must fit inside the matrix");for(var s=this.rowSize,u=this.bits,c=e;c<a;c++)for(var f=c*s,l=t;l<i;l++)u[f+Math.floor(l/32)]|=1<<(31&l)&4294967295},r.prototype.getRow=function(t,e){e==null||e.getSize()<this.width?e=new _t(this.width):e.clear();for(var n=this.rowSize,o=this.bits,i=t*n,a=0;a<n;a++)e.setBulk(32*a,o[i+a]);return e},r.prototype.setRow=function(t,e){G.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},r.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),n=new _t(t),o=new _t(t),i=0,a=Math.floor((e+1)/2);i<a;i++)n=this.getRow(i,n),o=this.getRow(e-1-i,o),n.reverse(),o.reverse(),this.setRow(i,o),this.setRow(e-1-i,n)},r.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,n=this.rowSize,o=this.bits,i=t,a=e,s=-1,u=-1,c=0;c<e;c++)for(var f=0;f<n;f++){var l=o[c*n+f];if(l!==0){if(c<a&&(a=c),c>u&&(u=c),32*f<i){for(var h=0;!(l<<31-h&4294967295);)h++;32*f+h<i&&(i=32*f+h)}if(32*f+31>s){for(h=31;!(l>>>h);)h--;32*f+h>s&&(s=32*f+h)}}}return s<i||u<a?null:Int32Array.from([i,a,s-i+1,u-a+1])},r.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,n=0;n<e.length&&e[n]===0;)n++;
vendor: 5,719 bytes, lines 4-5
4if(n===e.length)return null;for(var o=n/t,i=n%t*32,a=e[n],s=0;!(a<<31-s&4294967295);)s++;return i+=s,Int32Array.from([i,o])},r.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,n=e.length-1;n>=0&&e[n]===0;)n--;if(n<0)return null;for(var o=Math.floor(n/t),i=32*Math.floor(n%t),a=e[n],s=31;!(a>>>s);)s--;return i+=s,Int32Array.from([i,o])},r.prototype.getWidth=function(){return this.width},r.prototype.getHeight=function(){return this.height},r.prototype.getRowSize=function(){return this.rowSize},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&ht.equals(this.bits,e.bits)},r.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+ht.hashCode(this.bits)},r.prototype.toString=function(t,e,n){return t===void 0&&(t="X "),e===void 0&&(e="  "),n===void 0&&(n=`
5`),this.buildToString(t,e,n)},r.prototype.buildToString=function(t,e,n){for(var o=new U,i=0,a=this.height;i<a;i++){for(var s=0,u=this.width;s<u;s++)o.append(this.get(s,i)?t:e);o.append(n)}return o.toString()},r.prototype.clone=function(){return new r(this.width,this.height,this.rowSize,this.bits.slice())},r}(),Kr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),A=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Kr(t,r),t.getNotFoundInstance=function(){return new t},t.kind="NotFoundException",t}(ut),qr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Qr=function(r){function t(e){var n=r.call(this,e)||this;return n.luminances=t.EMPTY,n.buckets=new Int32Array(t.LUMINANCE_BUCKETS),n}return qr(t,r),t.prototype.getBlackRow=function(e,n){var o=this.getLuminanceSource(),i=o.getWidth();n==null||n.getSize()<i?n=new _t(i):n.clear(),this.initArrays(i);for(var a=o.getRow(e,this.luminances),s=this.buckets,u=0;u<i;u++)s[(255&a[u])>>t.LUMINANCE_SHIFT]++;var c=t.estimateBlackPoint(s);if(i<3)for(u=0;u<i;u++)(255&a[u])<c&&n.set(u);else{var f=255&a[0],l=255&a[1];for(u=1;u<i-1;u++){var h=255&a[u+1];(4*l-f-h)/2<c&&n.set(u),f=l,l=h}}return n},t.prototype.getBlackMatrix=function(){var e=this.getLuminanceSource(),n=e.getWidth(),o=e.getHeight(),i=new mt(n,o);this.initArrays(n);for(var a=this.buckets,s=1;s<5;s++)for(var u=Math.floor(o*s/5),c=e.getRow(u,this.luminances),f=Math.floor(4*n/5),l=Math.floor(n/5);l<f;l++)a[(255&c[l])>>t.LUMINANCE_SHIFT]++;var h=t.estimateBlackPoint(a),d=e.getMatrix();for(s=0;s<o;s++){var g=s*n;for(l=0;l<n;l++)(255&d[g+l])<h&&i.set(l,s)}return i},t.prototype.createBinarizer=function(e){return new t(e)},t.prototype.initArrays=function(e){this.luminances.length<e&&(this.luminances=new Uint8ClampedArray(e));for(var n=this.buckets,o=0;o<t.LUMINANCE_BUCKETS;o++)n[o]=0},t.estimateBlackPoint=function(e){for(var n=e.length,o=0,i=0,a=0,s=0;s<n;s++)e[s]>a&&(i=s,a=e[s]),e[s]>o&&(o=e[s]);var u=0,c=0;for(s=0;s<n;s++){var f=s-i;(g=e[s]*f*f)>c&&(u=s,c=g)}if(i>u){var l=i;i=u,u=l}if(u-i<=n/16)throw new A;var h=u-1,d=-1;for(s=u-1;s>i;s--){var g,y=s-i;(g=y*y*(u-s)*(o-e[s]))>d&&(h=s,d=g)}return h<<t.LUMINANCE_SHIFT},t.LUMINANCE_BITS=5,t.LUMINANCE_SHIFT=8-t.LUMINANCE_BITS,t.LUMINANCE_BUCKETS=1<<t.LUMINANCE_BITS,t.EMPTY=Uint8ClampedArray.from([0]),t}(Gr),Jr=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),sr=function(r){function t(e){var n=r.call(this,e)||this;return n.matrix=null,n}return Jr(t,r),t.prototype.getBlackMatrix=function(){if(this.matrix!==null)return this.matrix;var e=this.getLuminanceSource(),n=e.getWidth(),o=e.getHeight();if(n>=t.MINIMUM_DIMENSION&&o>=t.MINIMUM_DIMENSION){var i=e.getMatrix(),a=n>>t.BLOCK_SIZE_POWER;n&t.BLOCK_SIZE_MASK&&a++;var s=o>>t.BLOCK_SIZE_POWER;o&t.BLOCK_SIZE_MASK&&s++;var u=t.calculateBlackPoints(i,a,s,n,o),c=new mt(n,o);t.calculateThresholdForBlock(i,a,s,n,o,u,c),this.matrix=c}else this.matrix=r.prototype.getBlackMatrix.call(this);return this.matrix},t.prototype.createBinarizer=function(e){return new t(e)},t.calculateThresholdForBlock=function(e,n,o,i,a,s,u){for(var c=a-t.BLOCK_SIZE,f=i-t.BLOCK_SIZE,l=0;l<o;l++){var h=l<<t.BLOCK_SIZE_POWER;h>c&&(h=c);for(var d=t.cap(l,2,o-3),g=0;g<n;g++){var y=g<<t.BLOCK_SIZE_POWER;y>f&&(y=f);for(var _=t.cap(g,2,n-3),w=0,m=-2;m<=2;m++){var C=s[d+m];w+=C[_-2]+C[_-1]+C[_]+C[_+1]+C[_+2]}var E=w/25;t.thresholdBlock(e,y,h,E,i,u)}}},t.cap=function(e,n,o){return e<n?n:e>o?o:e},t.thresholdBlock=function(e,n,o,i,a,s){for(var u=0,c=o*a+n;u<t.BLOCK_SIZE;u++,c+=a)for(var f=0;f<t.BLOCK_SIZE;f++)(255&e[c+f])<=i&&s.set(n+f,o+u)},t.calculateBlackPoints=function(e,n,o,i,a){for(var s=a-t.BLOCK_SIZE,u=i-t.BLOCK_SIZE,c=new Array(o),f=0;f<o;f++){c[f]=new Int32Array(n);var l=f<<t.BLOCK_SIZE_POWER;l>s&&(l=s);for(var h=0;h<n;h++){var d=h<<t.BLOCK_SIZE_POWER;d>u&&(d=u);for(var g=0,y=255,_=0,w=0,m=l*i+d;w<t.BLOCK_SIZE;w++,m+=i){for(var C=0;C<t.BLOCK_SIZE;C++){var E=255&e[m+C];g+=E,E<y&&(y=E),E>_&&(_=E)}
5if(_-y>t.MIN_DYNAMIC_RANGE)for(w++,m+=i;w<t.BLOCK_SIZE;w++,m+=i)for(C=0;C<t.BLOCK_SIZE;C++)g+=255&e[m+C]}var I=g>>2*t.BLOCK_SIZE_POWER;if(_-y<=t.MIN_DYNAMIC_RANGE&&(I=y/2,f>0&&h>0)){var O=(c[f-1][h]+2*c[f][h-1]+c[f-1][h-1])/4;y<O&&(I=O)}c[f][h]=I}}return c},t.BLOCK_SIZE_POWER=3,t.BLOCK_SIZE=1<<t.BLOCK_SIZE_POWER,t.BLOCK_SIZE_MASK=t.BLOCK_SIZE-1,t.MINIMUM_DIMENSION=5*t.BLOCK_SIZE,t.MIN_DYNAMIC_RANGE=24,t}(Qr),zt=function(){function r(t,e){this.width=t,this.height=e}return r.prototype.getWidth=function(){return this.width},r.prototype.getHeight=function(){return this.height},r.prototype.isCropSupported=function(){return!1},r.prototype.crop=function(t,e,n,o){throw new ee("This luminance source does not support cropping.")},r.prototype.isRotateSupported=function(){return!1},r.prototype.rotateCounterClockwise=function(){throw new ee("This luminance source does not support rotation by 90 degrees.")},r.prototype.rotateCounterClockwise45=function(){throw new ee("This luminance source does not support rotation by 45 degrees.")},r.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new U,n=0;n<this.height;n++){for(var o=this.getRow(n,t),i=0;i<this.width;i++){var a=255&o[i],s=void 0;s=a<64?"#":a<128?"+":a<192?".":" ",e.append(s)}e.append(`
6`)}return e.toString()},r}(),$r=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),fe=function(r){function t(e){var n=r.call(this,e.getWidth(),e.getHeight())||this;return n.delegate=e,n}return $r(t,r),t.prototype.getRow=function(e,n){for(var o=this.delegate.getRow(e,n),i=this.getWidth(),a=0;a<i;a++)o[a]=255-(255&o[a]);return o},t.prototype.getMatrix=function(){for(var e=this.delegate.getMatrix(),n=this.getWidth()*this.getHeight(),o=new Uint8ClampedArray(n),i=0;i<n;i++)o[i]=255-(255&e[i]);return o},t.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},t.prototype.crop=function(e,n,o,i){return new t(this.delegate.crop(e,n,o,i))},t.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},t.prototype.invert=function(){return this.delegate},t.prototype.rotateCounterClockwise=function(){return new t(this.delegate.rotateCounterClockwise())},t.prototype.rotateCounterClockwise45=function(){return new t(this.delegate.rotateCounterClockwise45())},t}(zt),tn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),en=function(r){function t(e){var n=r.call(this,e.width,e.height)||this;return n.canvas=e,n.tempCanvasElement=null,n.buffer=t.makeBufferFromCanvasImageData(e),n}return tn(t,r),t.makeBufferFromCanvasImageData=function(e){var n=e.getContext("2d").getImageData(0,0,e.width,e.height);return t.toGrayscaleBuffer(n.data,e.width,e.height)},t.toGrayscaleBuffer=function(e,n,o){for(var i=new Uint8ClampedArray(n*o),a=0,s=0,u=e.length;a<u;a+=4,s++){var c=void 0;e[a+3]===0?c=255:c=306*e[a]+601*e[a+1]+117*e[a+2]+512>>10,i[s]=c}return i},t.prototype.getRow=function(e,n){if(e<0||e>=this.getHeight())throw new D("Requested row is outside the image: "+e);var o=this.getWidth(),i=e*o;return n===null?n=this.buffer.slice(i,i+o):(n.length<o&&(n=new Uint8ClampedArray(o)),n.set(this.buffer.slice(i,i+o))),n},t.prototype.getMatrix=function(){return this.buffer},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(e,n,o,i){return r.prototype.crop.call(this,e,n,o,i),this},t.prototype.isRotateSupported=function(){return!0},t.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},t.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},t.prototype.getTempCanvasElement=function(){if(this.tempCanvasElement===null){var e=this.canvas.ownerDocument.createElement("canvas");e.width=this.canvas.width,e.height=this.canvas.height,this.tempCanvasElement=e}return this.tempCanvasElement},t.prototype.rotate=function(e){var n=this.getTempCanvasElement(),o=n.getContext("2d"),i=e*t.DEGREE_TO_RADIANS,a=this.canvas.width,s=this.canvas.height,u=Math.ceil(Math.abs(Math.cos(i))*a+Math.abs(Math.sin(i))*s),c=Math.ceil(Math.abs(Math.sin(i))*a+Math.abs(Math.cos(i))*s);return n.width=u,n.height=c,o.translate(u/2,c/2),o.rotate(i),o.drawImage(this.canvas,a/-2,s/-2),this.buffer=t.makeBufferFromCanvasImageData(n),this},t.prototype.invert=function(){return new fe(this)},t.DEGREE_TO_RADIANS=Math.PI/180,t}(zt),rn=function(){function r(t,e,n){this.deviceId=t,this.label=e,this.kind="videoinput",this.groupId=n||void 0}return r.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},r}(),ot=function(r,t,e,n){return new(e||(e=Promise))(function(o,i){function a(c){try{u(n.next(c))}catch(f){i(f)}}function s(c){try{u(n.throw(c))}catch(f){i(f)}}function u(c){var f;c.done?o(c.value):(f=c.value,f instanceof e?f:new e(function(l){l(f)})).then(a,s)}u((n=n.apply(r,[])).next())})},it=function(r,t){var e,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)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(u){return function(c){return function(f){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,n&&(o=2&f[0]?n.return:f[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,f[1])).done)return o;switch(n=0,o&&(f=[2&f[0],o.value]),f[0]){case 0:case 1:o=f;break;case 4:return a.label++,{value:f[1],done:!1};case 5:a.label++,n=f[1],f=[0];continue;case 7:f=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!((o=o.length>0&&o[o.length-1])||f[0]!==6&&f[0]!==2)){a=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){a.label=f[1];break}if(f[0]===6&&a.label<o[1]){a.label=o[1],o=f;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(f);break}o[2]&&a.ops.pop(),a.trys.pop();continue}f=t.call(r,a)}catch(l){f=[6,l],n=0}finally{e=o=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([u,c])}}},nn=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Vt=function(){function r(t,e,n){e===void 0&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(r.prototype,"hasNavigator",{get:function(){return typeof navigator<"u"}
vendor: 8,659 bytes, line 6
6,enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!1,configurable:!0}),r.prototype.listVideoInputDevices=function(){return ot(this,void 0,void 0,function(){var t,e,n,o,i,a,s,u,c,f,l,h;return it(this,function(d){switch(d.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=d.sent(),e=[];try{for(n=nn(t),o=n.next();!o.done;o=n.next())i=o.value,(a=i.kind==="video"?"videoinput":i.kind)==="videoinput"&&(s=i.deviceId||i.id,u=i.label||"Video device "+(e.length+1),c=i.groupId,f={deviceId:s,label:u,kind:a,groupId:c},e.push(f))}catch(g){l={error:g}}finally{try{o&&!o.done&&(h=n.return)&&h.call(n)}finally{if(l)throw l.error}}return[2,e]}})})},r.prototype.getVideoInputDevices=function(){return ot(this,void 0,void 0,function(){return it(this,function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map(function(e){return new rn(e.deviceId,e.label)})]}})})},r.prototype.findDeviceById=function(t){return ot(this,void 0,void 0,function(){var e;return it(this,function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=n.sent())?[2,e.find(function(o){return o.deviceId===t})]:[2,null]}})})},r.prototype.decodeFromInputVideoDevice=function(t,e){return ot(this,void 0,void 0,function(){return it(this,function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,n.sent()]}})})},r.prototype.decodeOnceFromVideoDevice=function(t,e){return ot(this,void 0,void 0,function(){var n;return it(this,function(o){switch(o.label){case 0:return this.reset(),n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(n,e)];case 1:return[2,o.sent()]}})})},r.prototype.decodeOnceFromConstraints=function(t,e){return ot(this,void 0,void 0,function(){var n;return it(this,function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeOnceFromStream(n,e)];case 2:return[2,o.sent()]}})})},r.prototype.decodeOnceFromStream=function(t,e){return ot(this,void 0,void 0,function(){var n;return it(this,function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeOnce(n)];case 2:return[2,o.sent()]}})})},r.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,n){return ot(this,void 0,void 0,function(){return it(this,function(o){switch(o.label){case 0:return[4,this.decodeFromVideoDevice(t,e,n)];case 1:return[2,o.sent()]}})})},r.prototype.decodeFromVideoDevice=function(t,e,n){return ot(this,void 0,void 0,function(){var o;return it(this,function(i){switch(i.label){case 0:return o={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,e,n)];case 1:return[2,i.sent()]}})})},r.prototype.decodeFromConstraints=function(t,e,n){return ot(this,void 0,void 0,function(){var o;return it(this,function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return o=i.sent(),[4,this.decodeFromStream(o,e,n)];case 2:return[2,i.sent()]}})})},r.prototype.decodeFromStream=function(t,e,n){return ot(this,void 0,void 0,function(){var o;return it(this,function(i){switch(i.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return o=i.sent(),[4,this.decodeContinuously(o,n)];case 2:return[2,i.sent()]}})})},r.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},r.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},r.prototype.attachStreamToVideo=function(t,e){return ot(this,void 0,void 0,function(){var n;return it(this,function(o){switch(o.label){case 0:return n=this.prepareVideoElement(e),this.addVideoSource(n,t),this.videoElement=n,this.stream=t,[4,this.playVideoOnLoadAsync(n)];case 1:return o.sent(),[2,n]}})})},r.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise(function(n,o){return e.playVideoOnLoad(t,function(){return n()})})},r.prototype.playVideoOnLoad=function(t,e){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},r.prototype.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2},r.prototype.tryPlayVideo=function(t){return ot(this,void 0,void 0,function(){return it(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]}})})},r.prototype.getMediaElement=function(t,e){var n=document.getElementById(t);if(!n)throw new W("element with id '"+t+"' not found");if(n.nodeName.toLowerCase()!==e.toLowerCase())throw new W("element with id '"+t+"' must be an "+e+" element");return n},r.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new W("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},r.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new W("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},r.prototype.decodeFromVideoContinuously=function(t,e,n){if(t===void 0&&e===void 0)throw new W("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,n):this.decodeFromVideoElementContinuously(t,n)},r.prototype.decodeFromImageElement=function(t){if(!t)throw new W("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)},r.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},r.prototype.decodeFromVideoElementContinuously=function(t,e){var n=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(n,e)},r.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new W("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e,e},r.prototype.decodeFromImageUrl=function(t){if(!t)throw new W("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var n=this._decodeOnLoadImage(e);return e.src=t,n},r.prototype.decodeFromVideoUrl=function(t){if(!t)throw new W("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),n=this.decodeFromVideoElement(e);return e.src=t,n},r.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new W("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),o=this.decodeFromVideoElementContinuously(n,e);return n.src=t,o},r.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise(function(n,o){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(n,o)},t.addEventListener("load",e.imageLoadedListener)})},r.prototype._decodeOnLoadVideo=function(t){return ot(this,void 0,void 0,function(){return it(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()]}})})},r.prototype._decodeOnLoadVideoContinuously=function(t,e){return ot(this,void 0,void 0,function(){return it(this,function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return n.sent(),this.decodeContinuously(t,e),[2]}})})},r.prototype.isImageLoaded=function(t){return!!t.complete&&t.naturalWi
6dth!==0},r.prototype.prepareImageElement=function(t){var e;return t===void 0&&((e=document.createElement("img")).width=200,e.height=200),typeof t=="string"&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},r.prototype.prepareVideoElement=function(t){var e;return t||typeof document>"u"||((e=document.createElement("video")).width=200,e.height=200),typeof t=="string"&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},r.prototype.decodeOnce=function(t,e,n){var o=this;e===void 0&&(e=!0),n===void 0&&(n=!0),this._stopAsyncDecode=!1;var i=function(a,s){if(o._stopAsyncDecode)return s(new A("Video stream has ended before any code could be detected.")),void(o._stopAsyncDecode=void 0);try{a(o.decode(t))}catch(u){if(e&&u instanceof A||(u instanceof q||u instanceof S)&&n)return setTimeout(i,o._timeBetweenDecodingAttempts,a,s);s(u)}};return new Promise(function(a,s){return i(a,s)})},r.prototype.decodeContinuously=function(t,e){var n=this;this._stopContinuousDecode=!1;var o=function(){if(n._stopContinuousDecode)n._stopContinuousDecode=void 0;else try{var i=n.decode(t);e(i,null),setTimeout(o,n.timeBetweenScansMillis)}catch(a){e(null,a),(a instanceof q||a instanceof S||a instanceof A)&&setTimeout(o,n._timeBetweenDecodingAttempts)}};o()},r.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},r.prototype.createBinaryBitmap=function(t){var e=this.getCaptureCanvasContext(t);this.drawImageOnCanvas(e,t);var n=this.getCaptureCanvas(t),o=new en(n),i=new sr(o);return new ar(i)},r.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext},r.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},r.prototype.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},r.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},r.prototype.createCaptureCanvas=function(t){if(typeof document>"u")return this._destroyCaptureCanvas(),null;var e,n,o=document.createElement("canvas");return t!==void 0&&(t instanceof HTMLVideoElement?(e=t.videoWidth,n=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,n=t.naturalHeight||t.height)),o.style.width=e+"px",o.style.height=n+"px",o.width=e,o.height=n,o},r.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach(function(t){return t.stop()}),this.stream=void 0),this._stopAsyncDecode===!1&&this.stopAsyncDecode(),this._stopContinuousDecode===!1&&this.stopContinuousDecode()},r.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},r.prototype._destroyVideoElement=function(){this.videoElement&&(this.videoEndedListener!==void 0&&this.videoElement.removeEventListener("ended",this.videoEndedListener),this.videoPlayingEventListener!==void 0&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),this.videoCanPlayListener!==void 0&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},r.prototype._destroyImageElement=function(){this.imageElement&&(this.imageLoadedListener!==void 0&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},r.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},r.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch{t.src=URL.createObjectURL(e)}},r.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch{t.src=""}this.videoElement.removeAttribute("src")},r}(),ct=function(){function r(t,e,n,o,i,a){n===void 0&&(n=e==null?0:8*e.length),a===void 0&&(a=G.currentTimeMillis()),this.text=t,this.rawBytes=e,this.numBits=n,this.resultPoints=o,this.format=i,this.timestamp=a,this.text=t,this.rawBytes=e,this.numBits=n??(e==null?0:8*e.length),this.resultPoints=o,this.format=i,this.resultMetadata=null,this.timestamp=a??G.currentTimeMillis()}return r.prototype.getText=function(){return this.text},r.prototype.getRawBytes=function(){return this.rawBytes},r.prototype.getNumBits=function(){return this.numBits},r.prototype.getResultPoints=function(){return this.resultPoints},r.prototype.getBarcodeFormat=function(){return this.format},r.prototype.getResultMetadata=function(){return this.resultMetadata},r.prototype.putMetadata=function(t,e){this.resultMetadata===null&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},r.prototype.putAllMetadata=function(t){t!==null&&(this.resultMetadata===null?this.resultMetadata=t:this.resultMetadata=new Map(t))},r.prototype.addResultPoints=function(t){var e=this.resultPoints;if(e===null)this.resultPoints=t;else if(t!==null&&t.length>0){var n=new Array(e.length+t.length);G.arraycopy(e,0,n,0,e.length),G.arraycopy(t,0,n,e.length,t.length),this.resultPoints=n}},r.prototype.getTimestamp=function(){return this.timestamp},r.prototype.toString=function(){return this.text},r}();
6(function(r){r[r.AZTEC=0]="AZTEC",r[r.CODABAR=1]="CODABAR",r[r.CODE_39=2]="CODE_39",r[r.CODE_93=3]="CODE_93",r[r.CODE_128=4]="CODE_128",r[r.DATA_MATRIX=5]="DATA_MATRIX",r[r.EAN_8=6]="EAN_8",r[r.EAN_13=7]="EAN_13",r[r.ITF=8]="ITF",r[r.MAXICODE=9]="MAXICODE",r[r.PDF_417=10]="PDF_417",r[r.QR_CODE=11]="QR_CODE",r[r.RSS_14=12]="RSS_14",r[r.RSS_EXPANDED=13]="RSS_EXPANDED",r[r.UPC_A=14]="UPC_A",r[r.UPC_E=15]="UPC_E",r[r.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(ve||(ve={}));var me,R=ve;(function(r){r[r.OTHER=0]="OTHER",r[r.ORIENTATION=1]="ORIENTATION",r[r.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",r[r.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",r[r.ISSUE_NUMBER=4]="ISSUE_NUMBER",r[r.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",r[r.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",r[r.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",r[r.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",r[r.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",r[r.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"})(me||(me={}));var tt,rt=me,le=function(){function r(t,e,n,o,i,a){i===void 0&&(i=-1),a===void 0&&(a=-1),this.rawBytes=t,this.text=e,this.byteSegments=n,this.ecLevel=o,this.structuredAppendSequenceNumber=i,this.structuredAppendParity=a,this.numBits=t==null?0:8*t.length}return r.prototype.getRawBytes=function(){return this.rawBytes},r.prototype.getNumBits=function(){return this.numBits},r.prototype.setNumBits=function(t){this.numBits=t},r.prototype.getText=function(){return this.text},r.prototype.getByteSegments=function(){return this.byteSegments},r.prototype.getECLevel=function(){return this.ecLevel},r.prototype.getErrorsCorrected=function(){return this.errorsCorrected},r.prototype.setErrorsCorrected=function(t){this.errorsCorrected=t},r.prototype.getErasures=function(){return this.erasures},r.prototype.setErasures=function(t){this.erasures=t},r.prototype.getOther=function(){return this.other},r.prototype.setOther=function(t){this.other=t},r.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},r.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},r.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},r}(),Xt=function(){function r(){}return r.prototype.exp=function(t){return this.expTable[t]},r.prototype.log=function(t){if(t===0)throw new D;return this.logTable[t]},r.addOrSubtract=function(t,e){return t^e},r}(),Wt=function(){function r(t,e){if(e.length===0)throw new D;this.field=t;var n=e.length;if(n>1&&e[0]===0){for(var o=1;o<n&&e[o]===0;)o++;o===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-o),G.arraycopy(e,o,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return r.prototype.getCoefficients=function(){return this.coefficients},r.prototype.getDegree=function(){return this.coefficients.length-1},r.prototype.isZero=function(){return this.coefficients[0]===0},r.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},r.prototype.evaluateAt=function(t){if(t===0)return this.getCoefficient(0);var e,n=this.coefficients;if(t===1){e=0;for(var o=0,i=n.length;o!==i;o++){var a=n[o];e=Xt.addOrSubtract(e,a)}return e}e=n[0];var s=n.length,u=this.field;for(o=1;o<s;o++)e=Xt.addOrSubtract(u.multiply(t,e),n[o]);return e},r.prototype.addOrSubtract=function(t){if(!this.field.equals(t.field))throw new D("GenericGFPolys do not have same GenericGF field");if(this.isZero())return t;if(t.isZero())return this;var e=this.coefficients,n=t.coefficients;if(e.length>n.length){var o=e;e=n,n=o}var i=new Int32Array(n.length),a=n.length-e.length;G.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=Xt.addOrSubtract(e[s-a],n[s]);return new r(this.field,i)},r.prototype.multiply=function(t){if(!this.field.equals(t.field))throw new D("GenericGFPolys do not have same GenericGF field");if(this.isZero()||t.isZero())return this.field.getZero();for(var e=this.coefficients,n=e.length,o=t.coefficients,i=o.length,a=new Int32Array(n+i-1),s=this.field,u=0;u<n;u++)for(var c=e[u],f=0;f<i;f++)a[u+f]=Xt.addOrSubtract(a[u+f],s.multiply(c,o[f]));return new r(s,a)},r.prototype.multiplyScalar=function(t){if(t===0)return this.field.getZero();if(t===1)return this;for(var e=this.coefficients.length,n=this.field,o=new Int32Array(e),i=this.coefficients,a=0;a<e;a++)o[a]=n.multiply(i[a],t);return new r(n,o)},r.prototype.multiplyByMonomial=function(t,e){if(t<0)throw new D;if(e===0)return this.field.getZero();for(var n=this.coefficients,o=n.length,i=new Int32Array(o+t),a=this.field,s=0;s<o;s++)i[s]=a.multiply(n[s],e);return new r(a,i)},r.prototype.divide=function(t){if(!this.field.equals(t.field))throw new D("GenericGFPolys do n
6ot have same GenericGF field");if(t.isZero())throw new D("Divide by 0");for(var e=this.field,n=e.getZero(),o=this,i=t.getCoefficient(t.getDegree()),a=e.inverse(i);o.getDegree()>=t.getDegree()&&!o.isZero();){var s=o.getDegree()-t.getDegree(),u=e.multiply(o.getCoefficient(o.getDegree()),a),c=t.multiplyByMonomial(s,u),f=e.buildMonomial(s,u);n=n.addOrSubtract(f),o=o.addOrSubtract(c)}return[n,o]},r.prototype.toString=function(){for(var t="",e=this.getDegree();e>=0;e--){var n=this.getCoefficient(e);if(n!==0){if(n<0?(t+=" - ",n=-n):t.length>0&&(t+=" + "),e===0||n!==1){var o=this.field.log(n);o===0?t+="1":o===1?t+="a":(t+="a^",t+=o)}e!==0&&(e===1?t+="x":(t+="x^",t+=e))}}return t},r}(),on=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ur=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return on(t,r),t.kind="ArithmeticException",t}(ut),an=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ot=function(r){function t(e,n,o){var i=r.call(this)||this;i.primitive=e,i.size=n,i.generatorBase=o;for(var a=new Int32Array(n),s=1,u=0;u<n;u++)a[u]=s,(s*=2)>=n&&(s^=e,s&=n-1);i.expTable=a;var c=new Int32Array(n);for(u=0;u<n-1;u++)c[a[u]]=u;return i.logTable=c,i.zero=new Wt(i,Int32Array.from([0])),i.one=new Wt(i,Int32Array.from([1])),i}return an(t,r),t.prototype.getZero=function(){return this.zero},t.prototype.getOne=function(){return this.one},t.prototype.buildMonomial=function(e,n){if(e<0)throw new D;if(n===0)return this.zero;var o=new Int32Array(e+1);return o[0]=n,new Wt(this,o)},t.prototype.inverse=function(e){if(e===0)throw new ur;return this.expTable[this.size-this.logTable[e]-1]},t.prototype.multiply=function(e,n){return e===0||n===0?0:this.expTable[(this.logTable[e]+this.logTable[n])%(this.size-1)]},t.prototype.getSize=function(){return this.size},t.prototype.getGeneratorBase=function(){return this.generatorBase},t.prototype.toString=function(){return"GF(0x"+et.toHexString(this.primitive)+","+this.size+")"},t.prototype.equals=function(e){return e===this},t.AZTEC_DATA_12=new t(4201,4096,1),t.AZTEC_DATA_10=new t(1033,1024,1),t.AZTEC_DATA_6=new t(67,64,1),t.AZTEC_PARAM=new t(19,16,1),t.QR_CODE_FIELD_256=new t(285,256,0),t.DATA_MATRIX_FIELD_256=new t(301,256,1),t.AZTEC_DATA_8=t.DATA_MATRIX_FIELD_256,t.MAXICODE_FIELD_64=t.AZTEC_DATA_6,t}(Xt),sn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Kt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return sn(t,r),t.kind="ReedSolomonException",t}(ut),un=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Yt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return un(t,r),t.kind="IllegalStateException",t}(ut),he=function(){function r(t){this.field=t}return r.prototype.decode=function(t,e){for(var n=this.field,o=new Wt(n,t),i=new Int32Array(e),a=!0,s=0;s<e;s++){var u=o.evaluateAt(n.exp(s+n.getGeneratorBase()));i[i.length-1-s]=u,u!==0&&(a=!1)}if(!a){var c=new Wt(n,i),f=this.runEuclideanAlgorithm(n.buildMonomial(e,1),c,e),l=f[0],h=f[1],d=this.findErrorLocations(l),g=this.findErrorMagnitudes(h,d);for(s=0;s<d.length;s++){var y=t.length-1-n.log(d[s]);if(y<0)throw new Kt("Bad error location");t[y]=Ot.addOrSubtract(t[y],g[s])}}},r.prototype.runEuclideanAlgorithm=function(t,e,n){if(t.getDegree()<e.getDegree()){var o=t;t=e,e=o}for(var i=this.field,a=t,s=e,u=i.getZero(),c=i.getOne();s.getDegree()>=(n/2|0);){var f=a,l=u;if(u=c,(a=s).isZero())throw new Kt("r_{i-1} was zero");s=f;for(var h=i.getZero(),d=a.getCoefficient(a.getDegree()),g=i.inverse(d);s.getDegree()>=a.getDegree()&&!s.isZero();){var y=s.getDegree()-a.getDegree(),_=i.multiply(s.getCoefficient(s.getDegree()),g);h=h.addOrSubtract(i.buildMonomial(y,_)),s=s.addOrSubtract(a.multiplyByMonomial(y,_))}if(c=h.multiply(u).addOrSubtract(l),s.getDegree()>=a.getDegree())throw new Yt("Division algorithm failed to reduce polynomial?")}var w=c.getCoefficient(0);if(w===0)throw new Kt("sigmaTilde(0) was zero");var m=i.inverse(w);return[c.multiplyScalar(m),s.multiplyScalar(m)]},r.prototype.findErrorLocations=function(t){var e=t.getDegree();if(e===1)return Int32Array.from([t.getCoefficient(1)]);for(var n=new Int32Array(e),o=0,i=this.field,a=1;a<i.getSize()&&o<e;a++)t.evaluateAt(a)===0&&(n[o]=i.inverse(a),o++);if(o!==e)throw new Kt("Error locator degree does not match number of roots");return n},r.prototype.findErrorMagnitudes=function(t,e){for(var n=e.length,o=new Int32Array(n),i=this.field,a=0;a<n;a++){for(var s=i.inverse(e[a]),u=1,c=0;c<n;c++)if(a!==c){var f=i.multiply(e[c],s),l=1&f?-2&f:1|f;u=i.multiply(u,l)}o[a]=i.multiply(t.evaluateAt(s),i.inverse(u)),i.getGeneratorBase()!==0&&(o[a]=i.multiply(o[a],s))}return o},r}();(function(r){r[r.UPPER=0]="UPPER",r[r.LOWER=1]="LOWER",r[r.MIXED=2]="MIXED",r[r.DIGIT=3]="DIGIT",r[r.PUNCT=4]="PUNCT",r[r.BINARY=5]="BINARY"})(tt||(tt={}));var Be=function(){function r(){}return r.prototype.decode=function(t){this.ddata=t;var e=t.getBits(),n=this.extractBits(e),o=this.correctBits(n),i=r.convertBoolArrayToByteArray(o),a=r.getEncodedData(o),s=new le(i,a,null,
6null);return s.setNumBits(o.length),s},r.highLevelDecode=function(t){return this.getEncodedData(t)},r.getEncodedData=function(t){for(var e=t.length,n=tt.UPPER,o=tt.UPPER,i="",a=0;a<e;)if(o===tt.BINARY){if(e-a<5)break;var s=r.readCode(t,a,5);if(a+=5,s===0){if(e-a<11)break;s=r.readCode(t,a,11)+31,a+=11}for(var u=0;u<s;u++){if(e-a<8){a=e;break}var c=r.readCode(t,a,8);i+=$.castAsNonUtf8Char(c),a+=8}o=n}else{var f=o===tt.DIGIT?4:5;if(e-a<f)break;c=r.readCode(t,a,f),a+=f;var l=r.getCharacter(o,c);l.startsWith("CTRL_")?(n=o,o=r.getTable(l.charAt(5)),l.charAt(6)==="L"&&(n=o)):(i+=l,o=n)}return i},r.getTable=function(t){switch(t){case"L":return tt.LOWER;case"P":return tt.PUNCT;case"M":return tt.MIXED;case"D":return tt.DIGIT;case"B":return tt.BINARY;default:return tt.UPPER}},r.getCharacter=function(t,e){switch(t){case tt.UPPER:return r.UPPER_TABLE[e];case tt.LOWER:return r.LOWER_TABLE[e];case tt.MIXED:return r.MIXED_TABLE[e];case tt.PUNCT:return r.PUNCT_TABLE[e];case tt.DIGIT:return r.DIGIT_TABLE[e];default:throw new Yt("Bad table")}},r.prototype.correctBits=function(t){var e,n;this.ddata.getNbLayers()<=2?(n=6,e=Ot.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,e=Ot.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,e=Ot.AZTEC_DATA_10):(n=12,e=Ot.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=t.length/n;if(i<o)throw new S;for(var a=t.length%n,s=new Int32Array(i),u=0;u<i;u++,a+=n)s[u]=r.readCode(t,a,n);try{new he(e).decode(s,i-o)}catch(y){throw new S(y)}var c=(1<<n)-1,f=0;for(u=0;u<o;u++){if((d=s[u])===0||d===c)throw new S;d!==1&&d!==c-1||f++}var l=new Array(o*n-f),h=0;for(u=0;u<o;u++){var d;if((d=s[u])===1||d===c-1)l.fill(d>1,h,h+n-1),h+=n-1;else for(var g=n-1;g>=0;--g)l[h++]=(d&1<<g)!=0}return l},r.prototype.extractBits=function(t){var e=this.ddata.isCompact(),n=this.ddata.getNbLayers(),o=(e?11:14)+4*n,i=new Int32Array(o),a=new Array(this.totalBitsInLayer(n,e));if(e)for(var s=0;s<i.length;s++)i[s]=s;else{var u=o+1+2*et.truncDivision(et.truncDivision(o,2)-1,15),c=o/2,f=et.truncDivision(u,2);for(s=0;s<c;s++){var l=s+et.truncDivision(s,15);i[c-s-1]=f-l-1,i[c+s]=f+l+1}}s=0;for(var h=0;s<n;s++){for(var d=4*(n-s)+(e?9:12),g=2*s,y=o-1-g,_=0;_<d;_++)for(var w=2*_,m=0;m<2;m++)a[h+w+m]=t.get(i[g+m],i[g+_]),a[h+2*d+w+m]=t.get(i[g+_],i[y-m]),a[h+4*d+w+m]=t.get(i[y-m],i[y-_]),a[h+6*d+w+m]=t.get(i[y-_],i[g+m]);h+=8*d}return a},r.readCode=function(t,e,n){for(var o=0,i=e;i<e+n;i++)o<<=1,t[i]&&(o|=1);return o},r.readByte=function(t,e){var n=t.length-e;return n>=8?r.readCode(t,e,8):r.readCode(t,e,n)<<8-n},r.convertBoolArrayToByteArray=function(t){for(var e=new Uint8Array((t.length+7)/8),n=0;n<e.length;n++)e[n]=r.readByte(t,8*n);return e},r.prototype.totalBitsInLayer=function(t,e){return((e?88:112)+16*t)*t},r.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"],r.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"],r.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b","	",`
7`,"\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],r.PUNCT_TABLE=["","\r",`\r
8`,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],r.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],r}(),B=function(){function r(){}return r.round=function(t){return t===NaN?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},r.distance=function(t,e,n,o){var i=t-n,a=e-o;return Math.sqrt(i*i+a*a)},r.sum=function(t){for(var e=0,n=0,o=t.length;n!==o;n++)e+=t[n];return e},r}(),Ae=function(){function r(){}return r.floatToIntBits=function(t){return t},r.MAX_VALUE=Number.MAX_SAFE_INTEGER,r}(),T=function(){function r(t,e){this.x=t,this.y=e}return r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.equals=function(t){if(t instanceof r){var e=t;return this.x===e.x&&this.y===e.y}return!1}
8,r.prototype.hashCode=function(){return 31*Ae.floatToIntBits(this.x)+Ae.floatToIntBits(this.y)},r.prototype.toString=function(){return"("+this.x+","+this.y+")"},r.orderBestPatterns=function(t){var e,n,o,i=this.distance(t[0],t[1]),a=this.distance(t[1],t[2]),s=this.distance(t[0],t[2]);if(a>=i&&a>=s?(n=t[0],e=t[1],o=t[2]):s>=a&&s>=i?(n=t[1],e=t[0],o=t[2]):(n=t[2],e=t[0],o=t[1]),this.crossProductZ(e,n,o)<0){var u=e;e=o,o=u}t[0]=e,t[1]=n,t[2]=o},r.distance=function(t,e){return B.distance(t.x,t.y,e.x,e.y)},r.crossProductZ=function(t,e,n){var o=e.x,i=e.y;return(n.x-o)*(t.y-i)-(n.y-i)*(t.x-o)},r}(),Te=function(){function r(t,e){this.bits=t,this.points=e}return r.prototype.getBits=function(){return this.bits},r.prototype.getPoints=function(){return this.points},r}(),cn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),fn=function(r){function t(e,n,o,i,a){var s=r.call(this,e,n)||this;return s.compact=o,s.nbDatablocks=i,s.nbLayers=a,s}return cn(t,r),t.prototype.getNbLayers=function(){return this.nbLayers},t.prototype.getNbDatablocks=function(){return this.nbDatablocks},t.prototype.isCompact=function(){return this.compact},t}(Te),Ee=function(){function r(t,e,n,o){this.image=t,this.height=t.getHeight(),this.width=t.getWidth(),e==null&&(e=r.INIT_SIZE),n==null&&(n=t.getWidth()/2|0),o==null&&(o=t.getHeight()/2|0);var i=e/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 A}return r.prototype.detect=function(){for(var t=this.leftInit,e=this.rightInit,n=this.upInit,o=this.downInit,i=!1,a=!0,s=!1,u=!1,c=!1,f=!1,l=!1,h=this.width,d=this.height;a;){a=!1;for(var g=!0;(g||!u)&&e<h;)(g=this.containsBlackPoint(n,o,e,!1))?(e++,a=!0,u=!0):u||e++;if(e>=h){i=!0;break}for(var y=!0;(y||!c)&&o<d;)(y=this.containsBlackPoint(t,e,o,!0))?(o++,a=!0,c=!0):c||o++;if(o>=d){i=!0;break}for(var _=!0;(_||!f)&&t>=0;)(_=this.containsBlackPoint(n,o,t,!1))?(t--,a=!0,f=!0):f||t--;if(t<0){i=!0;break}for(var w=!0;(w||!l)&&n>=0;)(w=this.containsBlackPoint(t,e,n,!0))?(n--,a=!0,l=!0):l||n--;if(n<0){i=!0;break}a&&(s=!0)}if(!i&&s){for(var m=e-t,C=null,E=1;C===null&&E<m;E++)C=this.getBlackPointOnSegment(t,o-E,t+E,o);if(C==null)throw new A;var I=null;for(E=1;I===null&&E<m;E++)I=this.getBlackPointOnSegment(t,n+E,t+E,n);if(I==null)throw new A;var O=null;for(E=1;O===null&&E<m;E++)O=this.getBlackPointOnSegment(e,n+E,e-E,n);if(O==null)throw new A;var b=null;for(E=1;b===null&&E<m;E++)b=this.getBlackPointOnSegment(e,o-E,e-E,o);if(b==null)throw new A;return this.centerEdges(b,C,O,I)}throw new A},r.prototype.getBlackPointOnSegment=function(t,e,n,o){for(var i=B.round(B.distance(t,e,n,o)),a=(n-t)/i,s=(o-e)/i,u=this.image,c=0;c<i;c++){var f=B.round(t+c*a),l=B.round(e+c*s);if(u.get(f,l))return new T(f,l)}return null},r.prototype.centerEdges=function(t,e,n,o){var i=t.getX(),a=t.getY(),s=e.getX(),u=e.getY(),c=n.getX(),f=n.getY(),l=o.getX(),h=o.getY(),d=r.CORR;return i<this.width/2?[new T(l-d,h+d),new T(s+d,u+d),new T(c-d,f-d),new T(i+d,a-d)]:[new T(l+d,h+d),new T(s+d,u-d),new T(c-d,f+d),new T(i-d,a-d)]},r.prototype.containsBlackPoint=function(t,e,n,o){var i=this.image;if(o){for(var a=t;a<=e;a++)if(i.get(a,n))return!0}else for(var s=t;s<=e;s++)if(i.get(n,s))return!0;return!1},r.INIT_SIZE=10,r.CORR=1,r}(),Le=function(){function r(){}return r.checkAndNudgePoints=function(t,e){for(var n=t.getWidth(),o=t.getHeight(),i=!0,a=0;a<e.length&&i;a+=2){var s=Math.floor(e[a]),u=Math.floor(e[a+1]);if(s<-1||s>n||u<-1||u>o)throw new A;i=!1,s===-1?(e[a]=0,i=!0):s===n&&(e[a]=n-1,i=!0),u===-1?(e[a+1]=0,i=!0):u===o&&(e[a+1]=o-1,i=!0)}for(i=!0,a=e.length-2;a>=0&&i;a-=2){if(s=Math.floor(e[a]),u=Math.floor(e[a+1]),s<-1||s>n||u<-1||u>o)throw new A;i=!1,s===-1?(e[a]=0,i=!0):s===n&&(e[a]=n-1,i=!0),u===-1?(e[a+1]=0,i=!0):u===o&&(e[a+1]=o-1,i=!0)}},r}(),cr=function(){function r(t,e,n,o,i,a,s,u,c){this.a11=t,this.a21=e,this.a31=n,this.a12=o,this.a22=i,this.a32=a,this.a13=s,this.a23=u,this.a33=c}return r.quadrilateralToQuadrilateral=function(t,e,n,o,i,a,s,u,c,f,l,h,d,g,y,_){var w=r.quadrilateralToSquare(t,e,n,o,i,a,s,u);return r.squareToQuadrilateral(c,f,l,h,d,g,y,_).times(w)},r.prototype.transformPoints=function(t){for(var e=t.length,n=this.a11,o=this.a12,i=this.a13,a=this.a21,s=this.a22,u=this.a23,c=this.a31,f=this.a32,l=this.a33,h=0;h<e;h+=2){var d=t[h],g=t[h+1],y=i*d+u*g+l;t[h]=(n*d+a*g+c)/y,t[h+1]=(o*d+s*g+f)/y}},r.prototype.transformPointsWithValues=function(t,e){for(var n=this.a11,o=this.a12,i=this.a13,a=this.a21,s=this.a22,u=this.a23,c=this.a31,f=this.a32,l=this.a33,h=t.length,d=0;d<h;d++){var g=t[d],y=e[d],_=i*g+u*y+l;t[d]=(n*g+a*y+c)/_,e[d]=(o*g+s*y+f)/_}},r.squareToQuadrilateral=function(t,e,n,o,i,a,s,u){var c=t-n+i-s,f=e
vendor: 4,621 bytes, line 8
8-o+a-u;if(c===0&&f===0)return new r(n-t,i-n,t,o-e,a-o,e,0,0,1);var l=n-i,h=s-i,d=o-a,g=u-a,y=l*g-h*d,_=(c*g-h*f)/y,w=(l*f-c*d)/y;return new r(n-t+_*n,s-t+w*s,t,o-e+_*o,u-e+w*u,e,_,w,1)},r.quadrilateralToSquare=function(t,e,n,o,i,a,s,u){return r.squareToQuadrilateral(t,e,n,o,i,a,s,u).buildAdjoint()},r.prototype.buildAdjoint=function(){return new r(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)},r.prototype.times=function(t){return new r(this.a11*t.a11+this.a21*t.a12+this.a31*t.a13,this.a11*t.a21+this.a21*t.a22+this.a31*t.a23,this.a11*t.a31+this.a21*t.a32+this.a31*t.a33,this.a12*t.a11+this.a22*t.a12+this.a32*t.a13,this.a12*t.a21+this.a22*t.a22+this.a32*t.a23,this.a12*t.a31+this.a22*t.a32+this.a32*t.a33,this.a13*t.a11+this.a23*t.a12+this.a33*t.a13,this.a13*t.a21+this.a23*t.a22+this.a33*t.a23,this.a13*t.a31+this.a23*t.a32+this.a33*t.a33)},r}(),ln=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),hn=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return ln(t,r),t.prototype.sampleGrid=function(e,n,o,i,a,s,u,c,f,l,h,d,g,y,_,w,m,C,E){var I=cr.quadrilateralToQuadrilateral(i,a,s,u,c,f,l,h,d,g,y,_,w,m,C,E);return this.sampleGridWithTransform(e,n,o,I)},t.prototype.sampleGridWithTransform=function(e,n,o,i){if(n<=0||o<=0)throw new A;for(var a=new mt(n,o),s=new Float32Array(2*n),u=0;u<o;u++){for(var c=s.length,f=u+.5,l=0;l<c;l+=2)s[l]=l/2+.5,s[l+1]=f;i.transformPoints(s),Le.checkAndNudgePoints(e,s);try{for(l=0;l<c;l+=2)e.get(Math.floor(s[l]),Math.floor(s[l+1]))&&a.set(l/2,u)}catch{throw new A}}return a},t}(Le),Re=function(){function r(){}return r.setGridSampler=function(t){r.gridSampler=t},r.getInstance=function(){return r.gridSampler},r.gridSampler=new hn,r}(),at=function(){function r(t,e){this.x=t,this.y=e}return r.prototype.toResultPoint=function(){return new T(this.getX(),this.getY())},r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r}(),dn=function(){function r(t){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=t}return r.prototype.detect=function(){return this.detectMirror(!1)},r.prototype.detectMirror=function(t){var e=this.getMatrixCenter(),n=this.getBullsEyeCorners(e);if(t){var o=n[0];n[0]=n[2],n[2]=o}this.extractParameters(n);var i=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),a=this.getMatrixCornerPoints(n);return new fn(i,a,this.compact,this.nbDataBlocks,this.nbLayers)},r.prototype.extractParameters=function(t){if(!(this.isValidPoint(t[0])&&this.isValidPoint(t[1])&&this.isValidPoint(t[2])&&this.isValidPoint(t[3])))throw new A;var e=2*this.nbCenterLayers,n=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(n,e);for(var o=0,i=0;i<4;i++){var a=n[(this.shift+i)%4];this.compact?(o<<=7,o+=a>>1&127):(o<<=10,o+=(a>>2&992)+(a>>1&31))}var s=this.getCorrectedParameterData(o,this.compact);this.compact?(this.nbLayers=1+(s>>6),this.nbDataBlocks=1+(63&s)):(this.nbLayers=1+(s>>11),this.nbDataBlocks=1+(2047&s))},r.prototype.getRotation=function(t,e){var n=0;t.forEach(function(i,a,s){n=(n<<3)+((i>>e-2<<1)+(1&i))}),n=((1&n)<<11)+(n>>1);for(var o=0;o<4;o++)if(et.bitCount(n^this.EXPECTED_CORNER_BITS[o])<=2)return o;throw new A},r.prototype.getCorrectedParameterData=function(t,e){var n,o;e?(n=7,o=2):(n=10,o=4);for(var i=n-o,a=new Int32Array(n),s=n-1;s>=0;--s)a[s]=15&t,t>>=4;try{new he(Ot.AZTEC_PARAM).decode(a,i)}catch{throw new A}var u=0;for(s=0;s<o;s++)u=(u<<4)+a[s];return u},r.prototype.getBullsEyeCorners=function(t){var e=t,n=t,o=t,i=t,a=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var s=this.getFirstDifferent(e,a,1,-1),u=this.getFirstDifferent(n,a,1,1),c=this.getFirstDifferent(o,a,-1,1),f=this.getFirstDifferent(i,a,-1,-1);if(this.nbCenterLayers>2){var l=this.distancePoint(f,s)*this.nbCenterLayers/(this.distancePoint(i,e)*(this.nbCenterLayers+2));if(l<.75||l>1.25||!this.isWhiteOrBlackRectangle(s,u,c,f))break}e=s,n=u,o=c,i=f,a=!a}
8if(this.nbCenterLayers!==5&&this.nbCenterLayers!==7)throw new A;this.compact=this.nbCenterLayers===5;var h=new T(e.getX()+.5,e.getY()-.5),d=new T(n.getX()+.5,n.getY()+.5),g=new T(o.getX()-.5,o.getY()+.5),y=new T(i.getX()-.5,i.getY()-.5);return this.expandSquare([h,d,g,y],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},r.prototype.getMatrixCenter=function(){var t,e,n,o;try{t=(c=new Ee(this.image).detect())[0],e=c[1],n=c[2],o=c[3]}catch{var i=this.image.getWidth()/2,a=this.image.getHeight()/2;t=this.getFirstDifferent(new at(i+7,a-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new at(i+7,a+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new at(i-7,a+7),!1,-1,1).toResultPoint(),o=this.getFirstDifferent(new at(i-7,a-7),!1,-1,-1).toResultPoint()}var s=B.round((t.getX()+o.getX()+e.getX()+n.getX())/4),u=B.round((t.getY()+o.getY()+e.getY()+n.getY())/4);try{var c;t=(c=new Ee(this.image,15,s,u).detect())[0],e=c[1],n=c[2],o=c[3]}catch{t=this.getFirstDifferent(new at(s+7,u-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new at(s+7,u+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new at(s-7,u+7),!1,-1,1).toResultPoint(),o=this.getFirstDifferent(new at(s-7,u-7),!1,-1,-1).toResultPoint()}return s=B.round((t.getX()+o.getX()+e.getX()+n.getX())/4),u=B.round((t.getY()+o.getY()+e.getY()+n.getY())/4),new at(s,u)},r.prototype.getMatrixCornerPoints=function(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())},r.prototype.sampleGrid=function(t,e,n,o,i){var a=Re.getInstance(),s=this.getDimension(),u=s/2-this.nbCenterLayers,c=s/2+this.nbCenterLayers;return a.sampleGrid(t,s,s,u,u,c,u,c,c,u,c,e.getX(),e.getY(),n.getX(),n.getY(),o.getX(),o.getY(),i.getX(),i.getY())},r.prototype.sampleLine=function(t,e,n){for(var o=0,i=this.distanceResultPoint(t,e),a=i/n,s=t.getX(),u=t.getY(),c=a*(e.getX()-t.getX())/i,f=a*(e.getY()-t.getY())/i,l=0;l<n;l++)this.image.get(B.round(s+l*c),B.round(u+l*f))&&(o|=1<<n-l-1);return o},r.prototype.isWhiteOrBlackRectangle=function(t,e,n,o){t=new at(t.getX()-3,t.getY()+3),e=new at(e.getX()-3,e.getY()-3),n=new at(n.getX()+3,n.getY()-3),o=new at(o.getX()+3,o.getY()+3);var i=this.getColor(o,t);if(i===0)return!1;var a=this.getColor(t,e);return a===i&&(a=this.getColor(e,n))===i&&(a=this.getColor(n,o))===i},r.prototype.getColor=function(t,e){for(var n=this.distancePoint(t,e),o=(e.getX()-t.getX())/n,i=(e.getY()-t.getY())/n,a=0,s=t.getX(),u=t.getY(),c=this.image.get(t.getX(),t.getY()),f=Math.ceil(n),l=0;l<f;l++)s+=o,u+=i,this.image.get(B.round(s),B.round(u))!==c&&a++;var h=a/n;return h>.1&&h<.9?0:h<=.1===c?1:-1},r.prototype.getFirstDifferent=function(t,e,n,o){for(var i=t.getX()+n,a=t.getY()+o;this.isValid(i,a)&&this.image.get(i,a)===e;)i+=n,a+=o;for(i-=n,a-=o;this.isValid(i,a)&&this.image.get(i,a)===e;)i+=n;for(i-=n;this.isValid(i,a)&&this.image.get(i,a)===e;)a+=o;return new at(i,a-=o)},r.prototype.expandSquare=function(t,e,n){var o=n/(2*e),i=t[0].getX()-t[2].getX(),a=t[0].getY()-t[2].getY(),s=(t[0].getX()+t[2].getX())/2,u=(t[0].getY()+t[2].getY())/2,c=new T(s+o*i,u+o*a),f=new T(s-o*i,u-o*a);return i=t[1].getX()-t[3].getX(),a=t[1].getY()-t[3].getY(),s=(t[1].getX()+t[3].getX())/2,u=(t[1].getY()+t[3].getY())/2,[c,new T(s+o*i,u+o*a),f,new T(s-o*i,u-o*a)]},r.prototype.isValid=function(t,e){return t>=0&&t<this.image.getWidth()&&e>0&&e<this.image.getHeight()},r.prototype.isValidPoint=function(t){var e=B.round(t.getX()),n=B.round(t.getY());return this.isValid(e,n)},r.prototype.distancePoint=function(t,e){return B.distance(t.getX(),t.getY(),e.getX(),e.getY())},r.prototype.distanceResultPoint=function(t,e){return B.distance(t.getX(),t.getY(),e.getX(),e.getY())},r.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(et.truncDivision(this.nbLayers-4,8)+1)+15},r}(),ie=function(){function r(){}return r.prototype.decode=function(t,e){e===void 0&&(e=null);var n=null,o=new dn(t.getBlackMatrix()),i=null,a=null;try{i=(s=o.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(e,i),a=new Be().decode(s)}catch(l){n=l}if(a==null)try{var s;i=(s=o.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(e,i),a=new Be().decode(s)}catch(l){throw n??l}var u=new ct(a.getText(),a.getRawBytes(),a.getNumBits(),i,R.AZTEC,G.currentTimeMillis()),c=a.getByteSegments();c!=null&&u.putMetadata(rt.BYTE_SEGMENTS,c);var f=a.getECLevel();return f!=null&&u.putMetadata(rt.ERROR_CORRECTION_LEVEL,f),u},r.prototype.reportFoundResultPoints=function(t,e){if(t!=null){var n=t.get(H.NEED_RESULT_POINT_CALLBACK);n!=null&&e.forEach(function(o,i,a){n.foundPossibleResultPoint(o)})}},r.prototype.reset=function(){},r}(),pn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e){return e===void 0&&(e=500),r.call(this,new ie,e)||this}pn(t,r)})(Vt);var nt=function(){function r(){}return r.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch{if(e&&e.get(H.TRY_HARDER)===!0&&t.isRotateSupported()){var n=t.rotateCounterClockwise(),o=this.doDecode(n,e),i=o.getResultMetadata(),a=270;i!==null&&i.get(rt.ORIENTATION)===!0&&(a+=i.get(rt.ORIENTATION)%360),o.putMetadata(rt.ORIENTATION,a);var s=o.getResultPoints();if(s!==null)for(var u=n.getHeight(),c=0;c<s.length;c++)s[c]=new T(u-s[c].getY()-1,s[c].getX());return o}throw new A}},r.prototype.reset=function(){},r.prototype.doDecode=function(t,e){var n,o=t.getWidth(),i=t.getHeight(),a=new _t(o),s=e&&e.get(H.TRY_HARDER)===!0,u=Math.max(1,i>>(s?8:5));n=s?i:15;for(var c=Math.trunc(i/2),f=0;f<n;f++){var l=Math.trunc((f+1)/2),h=c+u*(1&f?-l:l);if(h<0||h>=i)break;try{a=t.getBlackRow(h,a)}catch{continue}for(var d=function(w){if(w===1&&(a.reverse(),e&&e.get(H.NEED_RESULT_POINT_CALLBACK)===!0)){var m=new Map;e.forEach(function(I,O){return m.set(O,I)}),m.delete(H.NEED_RESULT_POINT_CALLBACK),e=m}try{var C=g.decodeRow(h,a,e);if(w===1){C.putMetadata(rt.ORIENTATION,180);var E=C.getResultPoints();E!==null&&(E[0]=new T(o-E[0].getX()-1,E[0].getY()),E[1]=new T(o-E[1].getX()-1,E[1].getY()))}return{value:C}}catch{}},g=this,y=0;y<2;y++){var _=d(y);if(typeof _=="object")return _.value}}throw new A},r.recordPattern=function(t,e,n){for(var o=n.length,i=0;i<o;i++)n[i]=0;var a=t.getSize();if(e>=a)throw new A;for(var s=!t.get(e),u=0,c=e;c<a;){if(t.get(c)!==s)n[u]++;else{if(++u===o)break;n[u]=1,s=!s}c++}if(u!==o&&(u!==o-1||c!==a))throw new A},r.recordPatternInReverse=function(t,e,n){for(var o=n.length,i=t.get(e);e>0&&o>=0;)t.get(--e)!==i&&(o--,i=!i);if(o>=0)throw new A;r.recordPattern(t,e+1,n)},r.patternMatchVariance=function(t,e,n){for(var o=t.length,i=0,a=0,s=0;s<o;s++)i+=t[s],a+=e[s];if(i<a)return Number.POSITIVE_INFINITY;var u=i/a;n*=u;for(var c=0,f=0;f<o;f++){var l=t[f],h=e[f]*u,d=l>h?l-h:h-l;if(d>n)return Number.POSITIVE_INFINITY;c+=d}return c/i},r}(),gn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Fe=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return gn(t,r),t.findStartPattern=function(e){for(var n=e.getSize(),o=e.getNextSet(0),i=0,a=Int32Array.from([0,0,0,0,0,0]),s=o,u=!1,c=o;c<n;c++)if(e.get(c)!==u)a[i]++;else{if(i===5){for(var f=t.MAX_AVG_VARIANCE,l=-1,h=t.CODE_START_A;h<=t.CODE_START_C;h++){var d=nt.patternMatchVariance(a,t.CODE_PATTERNS[h],t.MAX_INDIVIDUAL_VARIANCE);d<f&&(f=d,l=h)}if(l>=0&&e.isRange(Math.max(0,s-(c-s)/2),s,!1))return Int32Array.from([s,c,l]);s+=a[0]+a[1],(a=a.slice(2,a.length-1))[i-1]=0,a[i]=0,i--}else i++;a[i]=1,u=!u}throw new A},t.decodeCode=function(e,n,o){nt.recordPattern(e,o,n);for(var i=t.MAX_AVG_VARIANCE,a=-1,s=0;s<t.CODE_PATTERNS.length;s++){var u=t.CODE_PATTERNS[s],c=this.patternMatchVariance(n,u,t.MAX_INDIVIDUAL_VARIANCE);c<i&&(i=c,a=s)}if(a>=0)return a;throw new A},t.prototype.decodeRow=function(e,n,o){var i,a=o&&o.get(H.ASSUME_GS1)===!0,s=t.findStartPattern(n),u=s[2],c=0,f=new Uint8Array(20);switch(f[c++]=u,u){case t.CODE_START_A:i=t.CODE_CODE_A;break;case t.CODE_START_B:i=t.CODE_CODE_B;break;case t.CODE_START_C:i=t.CODE_CODE_C;break;default:throw new S}for(var l=!1,h=!1,d="",g=s[0],y=s[1],_=Int32Array.from([0,0,0,0,0,0]),w=0,m=0,C=u,E=0,I=!0,O=!1,b=!1;!l;){var P=h;switch(h=!1,w=m,m=t.decodeCode(n,_,y),f[c++]=m,m!==t.CODE_STOP&&(I=!0),m!==t.CODE_STOP&&(C+=++E*m),g=y,y+=_.reduce(function(Er,Cr){return Er+Cr},0),m){case t.CODE_START_A:case t.CODE_START_B:case t.CODE_START_C:throw new S}switch(i){case t.CODE_CODE_A:if(m<64)d+=b===O?String.fromCharCode(32+m):String.fromCharCode(32+m+128),b=!1;else if(m<96)d+=b===O?String.fromCharCode(m-64):String.fromCharCode(m+64),b=!1;else switch(m!==t.CODE_STOP&&(I=!1),m){case t.CODE_FNC_1:a&&(d.length===0?d+="]C1":d+="�");break;case t.CODE_FNC_2:case t.CODE_FNC_3:break;case t.CODE_FNC_4_A:!O&&b?(O=!0,b=!1):O&&b?(O=!1,b=!1):b=!0;break;case t.CODE_SHIFT:h=!0,i=t.CODE_CODE_B;break;case t.CODE_CODE_B:i=t.CODE_CODE_B;break;case t.CODE_CODE_C:i=t.CODE_CODE_C;break;case t.CODE_STOP:l=!0}break;case t.CODE_CODE_B:if(m<96)d+=b===O?String.fromCharCode(32+m):String.fromCharCode(32+m+128),b=!1;else switch(m!==t.CODE_STOP&&(I=!1),m){case t.CODE_FNC_1:a&&(d.length===0?d+="]C1":d+="�");break;case t.CODE_FNC_2:case t.CODE_FNC_3:break;case t.CODE_FNC_4_B:!O&&b?(O=!0,b=!1):O&&b?(O=!1,b=!1):b=!0;break;case t.CODE_SHIFT:h=!0,i=t.CODE_CODE_A;break;case t.CODE_CODE_A:i=t.CODE_CODE_A;break;case t.CODE_CODE_C:i=t.CODE_CODE_C;break;case t.CODE_STOP:l=!0}break;case t.CODE_CODE_C:if(m<100)m<10&&(d+="0"),d+=m;else switch(m!==t.CODE_STOP&&(I=!1),m){case t.CODE_FNC_1:a&&(d.length===0?d+="]C1":d+="�");break;case t.CODE_CODE_A:i=t.CODE_CODE_A;break;case t.CODE_CODE_B:i=t.CODE_CODE_B;break;case t.CODE_STOP:l=!0}}P&&(i=i===t.CODE_CODE_A?t.CODE_CODE_B:t.CODE_CODE_A)}var V=y-g;if(y=n.getNextUnset(y),!n.isRange(y,Math.min(n.getSize(),y+(y-g)/2),!1))throw new A;if((C-=E*w)%103!==w)throw new q;var Y=d.length;if(Y===0)throw new A;Y>0&&I&&(d=i===t.CODE_CODE_C?d.substring(0,Y-2):d.substring(0,Y-1));for(var Q=(s[1]+s[0])/2,gt=g+V/2,dt=f.length,vt=new Uint8Array(dt),At=0;At<dt;At++)vt[At]=f[At];var de=[new T(Q,e),new T(gt,e)];return new ct(d,vt,0,de,R.CODE_128,new Date().getTime())},t.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])],t.MAX_AVG_VARIANCE=.25,t.MAX_INDIVIDUAL_VARIA
8NCE=.7,t.CODE_SHIFT=98,t.CODE_CODE_C=99,t.CODE_CODE_B=100,t.CODE_CODE_A=101,t.CODE_FNC_1=102,t.CODE_FNC_2=97,t.CODE_FNC_3=96,t.CODE_FNC_4_A=101,t.CODE_FNC_4_B=100,t.CODE_START_A=103,t.CODE_START_B=104,t.CODE_START_C=105,t.CODE_STOP=106,t}(nt),yn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),pe=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xe=function(r){function t(e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var o=r.call(this)||this;return o.usingCheckDigit=e,o.extendedMode=n,o.decodeRowResult="",o.counters=new Int32Array(9),o}return yn(t,r),t.prototype.decodeRow=function(e,n,o){var i,a,s,u,c=this.counters;c.fill(0),this.decodeRowResult="";var f,l,h=t.findAsteriskPattern(n,c),d=n.getNextSet(h[1]),g=n.getSize();do{t.recordPattern(n,d,c);var y=t.toNarrowWidePattern(c);if(y<0)throw new A;f=t.patternToChar(y),this.decodeRowResult+=f,l=d;try{for(var _=(i=void 0,pe(c)),w=_.next();!w.done;w=_.next())d+=w.value}catch(Q){i={error:Q}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(i)throw i.error}}d=n.getNextSet(d)}while(f!=="*");this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var m,C=0;try{for(var E=pe(c),I=E.next();!I.done;I=E.next())C+=I.value}catch(Q){s={error:Q}}finally{try{I&&!I.done&&(u=E.return)&&u.call(E)}finally{if(s)throw s.error}}if(d!==g&&2*(d-l-C)<C)throw new A;if(this.usingCheckDigit){for(var O=this.decodeRowResult.length-1,b=0,P=0;P<O;P++)b+=t.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(P));if(this.decodeRowResult.charAt(O)!==t.ALPHABET_STRING.charAt(b%43))throw new q;this.decodeRowResult=this.decodeRowResult.substring(0,O)}if(this.decodeRowResult.length===0)throw new A;m=this.extendedMode?t.decodeExtended(this.decodeRowResult):this.decodeRowResult;var V=(h[1]+h[0])/2,Y=l+C/2;return new ct(m,null,0,[new T(V,e),new T(Y,e)],R.CODE_39,new Date().getTime())},t.findAsteriskPattern=function(e,n){for(var o=e.getSize(),i=e.getNextSet(0),a=0,s=i,u=!1,c=n.length,f=i;f<o;f++)if(e.get(f)!==u)n[a]++;else{if(a===c-1){if(this.toNarrowWidePattern(n)===t.ASTERISK_ENCODING&&e.isRange(Math.max(0,s-Math.floor((f-s)/2)),s,!1))return[s,f];s+=n[0]+n[1],n.copyWithin(0,2,2+a-1),n[a-1]=0,n[a]=0,a--}else a++;n[a]=1,u=!u}throw new A},t.toNarrowWidePattern=function(e){var n,o,i,a=e.length,s=0;do{var u=2147483647;try{for(var c=(n=void 0,pe(e)),f=c.next();!f.done;f=c.next())(g=f.value)<u&&g>s&&(u=g)}catch(y){n={error:y}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}s=u,i=0;for(var l=0,h=0,d=0;d<a;d++)(g=e[d])>s&&(h|=1<<a-1-d,i++,l+=g);if(i===3){for(d=0;d<a&&i>0;d++){var g;if((g=e[d])>s&&(i--,2*g>=l))return-1}return h}}while(i>3);return-1},t.patternToChar=function(e){for(var n=0;n<t.CHARACTER_ENCODINGS.length;n++)if(t.CHARACTER_ENCODINGS[n]===e)return t.ALPHABET_STRING.charAt(n);if(e===t.ASTERISK_ENCODING)return"*";throw new A},t.decodeExtended=function(e){for(var n=e.length,o="",i=0;i<n;i++){var a=e.charAt(i);if(a==="+"||a==="$"||a==="%"||a==="/"){var s=e.charAt(i+1),u="\0";switch(a){case"+":if(!(s>="A"&&s<="Z"))throw new S;u=String.fromCharCode(s.charCodeAt(0)+32);break;case"$":if(!(s>="A"&&s<="Z"))throw new S;u=String.fromCharCode(s.charCodeAt(0)-64);break;case"%":if(s>="A"&&s<="E")u=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")u=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")u=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")u=String.fromCharCode(s.charCodeAt(0)+43);else if(s==="U")u="\0";else if(s==="V")u="@";else if(s==="W")u="`";else{if(s!=="X"&&s!=="Y"&&s!=="Z")throw new S;u="�"}break;case"/":if(s>="A"&&s<="O")u=String.fromCharCode(s.charCodeAt(0)-32);else{if(s!=="Z")throw new S;u=":"}}o+=u,i++}else o+=a}return o},t.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.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],t.ASTERISK_ENCODING=148,t}(nt),wn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),_n=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ke=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.narrowLineWidth=-1,e}return wn(t,r),t.prototype.decodeRow=function(e,n,o){var i,a,s=this.decodeStart(n),u=this.decodeEnd(n),c=new U;t.decodeMiddle(n,s[1],u[0],c);var f=c.toString(),l=null;o!=null&&(l=o.get(H.ALLOWED_LENGTHS)),l==null&&(l=t.DEFAULT_ALLOWED_LENGTHS);var h=f.length,d=!1,g=0;try{for(var y=_n(l),_=y.next();!_.done;_=y.next()){var w=_.value;if(h===w){d=!0;break}w>g&&(g=w)}}catch(C){i={error:C}}finally{try{_&&!_.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}if(!d&&h>g&&(d=!0),!d)throw new S;var m=[new T(s[1],e),new T(u[0],e)];return new ct(f,null,0,m,R.ITF,new Date().getTime())},t.decodeMiddle=function(e,n,o,i){var a=new Int32Array(10),s=new Int32Array(5),u=new Int32Array(5);for(a.fill(0),s.fill(0),u.fill(0);n<o;){nt.recordPattern(e,n,a);for(var c=0;c<5;c++){var f=2*c;s[c]=a[f],u[c]=a[f+1]}var l=t.decodeDigit(s);i.append(l.toString()),l=this.decodeDigit(u),i.append(l.toString()),a.forEach(function(h){n+=h})}},t.prototype.decodeStart=function(e){var n=t.skipWhiteSpace(e),o=t.findGuardPattern(e,n,t.START_PATTERN);return this.narrowLineWidth=(o[1]-o[0])/4,this.validateQuietZone(e,o[0]),o},t.prototype.validateQuietZone=function(e,n){var o=10*this.narrowLineWidth;o=o<n?o:n;for(var i=n-1;o>0&&i>=0&&!e.get(i);i--)o--;if(o!==0)throw new A},t.skipWhiteSpace=function(e){var n=e.getSize(),o=e.getNextSet(0);if(o===n)throw new A;return o},t.prototype.decodeEnd=function(e){e.reverse();try{var n=t.skipWhiteSpace(e),o=void 0;try{o=t.findGuardPattern(e,n,t.END_PATTERN_REVERSED[0])}catch(a){a instanceof A&&(o=t.findGuardPattern(e,n,t.END_PATTERN_REVERSED[1]))}this.validateQuietZone(e,o[0]);var i=o[0];return o[0]=e.getSize()-o[1],o[1]=e.getSize()-i,o}finally{e.reverse()}},t.findGuardPattern=function(e,n,o){var i=o.length,a=new Int32Array(i),s=e.getSize(),u=!1,c=0,f=n;a.fill(0);for(var l=n;l<s;l++)if(e.get(l)!==u)a[c]++;else{if(c===i-1){if(nt.patternMatchVariance(a,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return[f,l];f+=a[0]+a[1],G.arraycopy(a,2,a,0,c-1),a[c-1]=0,a[c]=0,c--}else c++;a[c]=1,u=!u}throw new A},t.decodeDigit=function(e){for(var n=t.MAX_AVG_VARIANCE,o=-1,i=t.PATTERNS.length,a=0;a<i;a++){var s=t.PATTERNS[a],u=nt.patternMatchVariance(e,s,t.MAX_INDIVIDUAL_VARIANCE);u<n?(n=u,o=a):u===n&&(o=-1)}if(o>=0)return o%10;throw new A},t.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])],t.MAX_AVG_VARIANCE=.38,t.MAX_INDIVIDUAL_VARIANCE=.5,t.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],t.START_PATTERN=Int32Array.from([1,1,1,1]),t.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],t}(nt),vn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),kt=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.decodeRowStringBuffer="",e}return vn(t,r),t.findStartGuardPattern=function(e){for(var n,o=!1,i=0,a=Int32Array.from([0,0,0]);!o;){a=Int32Array.from([0,0,0]);var s=(n=t.findGuardPattern(e,i,!1,this.START_END_PATTERN,a))[0],u=s-((i=n[1])-s);u>=0&&(o=e.isRange(u,s,!1))}return n},t.checkChecksum=function(e){return t.checkStandardUPCEANChecksum(e)},t.checkStandardUPCEANChecksum=function(e){var n=e.length;if(n===0)return!1;var o=parseInt(e.charAt(n-1),10);return t.getStandardUPCEANChecksum(e.substring(0,n-1))===o},t.getStandardUPCEANChecksum=function(e){for(var n=e.length,o=0,i=n-1;i>=0;
8i-=2){if((a=e.charAt(i).charCodeAt(0)-48)<0||a>9)throw new S;o+=a}for(o*=3,i=n-2;i>=0;i-=2){var a;if((a=e.charAt(i).charCodeAt(0)-48)<0||a>9)throw new S;o+=a}return(1e3-o)%10},t.decodeEnd=function(e,n){return t.findGuardPattern(e,n,!1,t.START_END_PATTERN,new Int32Array(t.START_END_PATTERN.length).fill(0))},t.findGuardPatternWithoutCounters=function(e,n,o,i){return this.findGuardPattern(e,n,o,i,new Int32Array(i.length))},t.findGuardPattern=function(e,n,o,i,a){for(var s=e.getSize(),u=0,c=n=o?e.getNextUnset(n):e.getNextSet(n),f=i.length,l=o,h=n;h<s;h++)if(e.get(h)!==l)a[u]++;else{if(u===f-1){if(nt.patternMatchVariance(a,i,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return Int32Array.from([c,h]);c+=a[0]+a[1];for(var d=a.slice(2,a.length-1),g=0;g<u-1;g++)a[g]=d[g];a[u-1]=0,a[u]=0,u--}else u++;a[u]=1,l=!l}throw new A},t.decodeDigit=function(e,n,o,i){this.recordPattern(e,o,n);for(var a=this.MAX_AVG_VARIANCE,s=-1,u=i.length,c=0;c<u;c++){var f=i[c],l=nt.patternMatchVariance(n,f,t.MAX_INDIVIDUAL_VARIANCE);l<a&&(a=l,s=c)}if(s>=0)return s;throw new A},t.MAX_AVG_VARIANCE=.48,t.MAX_INDIVIDUAL_VARIANCE=.7,t.START_END_PATTERN=Int32Array.from([1,1,1]),t.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),t.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),t.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])],t}(nt),mn=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},An=function(){function r(){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 r.prototype.decodeRow=function(t,e,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(e,n,o),a=o.toString(),s=r.parseExtensionString(a),u=[new T((n[0]+n[1])/2,t),new T(i,t)],c=new ct(a,null,0,u,R.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&c.putAllMetadata(s),c},r.prototype.decodeMiddle=function(t,e,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=e[1],c=0,f=0;f<5&&u<s;f++){var l=kt.decodeDigit(t,a,u,kt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+l%10);try{for(var h=(o=void 0,mn(a)),d=h.next();!d.done;d=h.next())u+=d.value}catch(y){o={error:y}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}l>=10&&(c|=1<<4-f),f!==4&&(u=t.getNextSet(u),u=t.getNextUnset(u))}if(n.length!==5)throw new A;var g=this.determineCheckDigit(c);if(r.extensionChecksum(n.toString())!==g)throw new A;return u},r.extensionChecksum=function(t){for(var e=t.length,n=0,o=e-2;o>=0;o-=2)n+=t.charAt(o).charCodeAt(0)-48;for(n*=3,o=e-1;o>=0;o-=2)n+=t.charAt(o).charCodeAt(0)-48;return(n*=3)%10},r.prototype.determineCheckDigit=function(t){for(var e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new A},r.parseExtensionString=function(t){if(t.length!==5)return null;var e=r.parseExtension5String(t);return e==null?null:new Map([[rt.SUGGESTED_PRICE,e]])},r.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 n=parseInt(t.substring(1)),o=n%100;return e+(n/100).toString()+"."+(o<10?"0"+o:o.toString())},r}(),En=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Cn=function(){function r(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return r.prototype.decodeRow=function(t,e,n){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(e,n,o),a=o.toString(),s=r.parseExtensionString(a),u=[new T((n[0]+n[1])/2,t),new T(i,t)],c=new ct(a,null,0,u,R.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&c.putAllMetadata(s),c},r.prototype.decodeMiddle=function(t,e,n){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=e[1],c=0,f=0;f<2&&u<s;f++){var l=kt.decodeDigit(t,a,u,kt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+l%10);try{for(var h=(o=void 0,En(a)),d=h.next();!d.done;d=h.next())u+=d.value}catch(g){o={error:g}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}l>=10&&(c|=1<<1-f),f!==1&&(u=t.getNextSet(u),u=t.getNextUnset(u))}if(n.length!==2)throw new A;if(parseInt(n.toString())%4!==c)throw new A;return u},r.parseExtensionString=function(t){return t.length!==2?null:new Map([[rt.ISSUE_NUMBER,parseInt(t)]])},r}(),In=function(){function r(){}return r.decodeRow=function(t,e,n){var o=kt.findGuardPattern(e,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return new An().decodeRow(t,e,o)}catch{return new Cn().decodeRow(t,e,o)}},r.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),r}(),Sn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),K=function(r){function t(){var e=r.call(this)||this;e.decodeRowStringBuffer="",t.L_AND_G_PATTERNS=t.L_PATTERNS.map(function(s){return Int32Array.from(s)});for(var n=10;n<20;n++){for(var o=t.L_PATTERNS[n-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];t.L_AND_G_PATTERNS[n]=i}return e}return Sn(t,r),t.prototype.decodeRow=function(e,n,o){var i=t.findStartGuardPattern(n),a=o==null?null:o.get(H.NEED_RESULT_POINT_CALLBACK);if(a!=null){var s=new T((i[0]+i[1])/2,e);a.foundPossibleResultPoint(s)}var u=this.decodeMiddle(n,i,this.decodeRowStringBuffer),c=u.rowOffset,f=u.resultString;if(a!=null){var l=new T(c,e);a.foundPossibleResultPoint(l)}var h=t.decodeEnd(n,c);if(a!=null){var d=new T((h[0]+h[1])/2,e);a.foundPossibleResultPoint(d)}var g=h[1],y=g+(g-h[0]);if(y>=n.getSize()||!n.isRange(g,y,!1))throw new A;var _=f.toString();if(_.length<8)throw new S;if(!t.checkChecksum(_))throw new q;var w=(i[1]+i[0])/2,m=(h[1]+h[0])/2,C=this.getBarcodeFormat(),E=[new T(w,e),new T(m,e)],I=new ct(_,null,0,E,C,new Date().getTime()),O=0;try{var b=In.decodeRow(e,n,h[1]);I.putMetadata(rt.UPC_EAN_EXTENSION,b.getText()),I.putAllMetadata(b.getResultMetadata()),I.addResultPoints(b.getResultPoints()),O=b.getText().length}catch{}var P=o==null?null:o.get(H.ALLOWED_EAN_EXTENSIONS);if(P!=null){var V=!1;for(var Y in P)if(O.toString()===Y){V=!0;break}if(!V)throw new A}return C===R.EAN_13||R.UPC_A,I},t.checkChecksum=function(e){return t.checkStandardUPCEANChecksum(e)},t.checkStandardUPCEANChecksum=function(e){var n=e.length;if(n===0)return!1;var o=parseInt(e.charAt(n-1),10);return t.getStandardUPCEANChecksum(e.substring(0,n-1))===o},t.getStandardUPCEANChecksum=function(e){for(var n=e.length,o=0,i=n-1;i>=0;i-=2){if((a=e.charAt(i).charCodeAt(0)-48)<0||a>9)throw new S;o+=a}for(o*=3,i=n-2;i>=0;i-=2){var a;if((a=e.charAt(i).charCodeAt(0)-48)<0||a>9)throw new S;o+=a}return(1e3-o)%10},t.decodeEnd=function(e,n){return t.findGuardPattern(e,n,!1,t.START_END_PATTERN,new Int32Array(t.START_END_PATTERN.length).fill(0))},t}(kt),On=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ve=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ce=function(r){function t(){var e=r.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return On(t,r),t.prototype.decodeMiddle=function(e,n,o){var i,a,s,u,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var f=e.getSize(),l=n[1],h=0,d=0;d<6&&l<f;d++){var g=K.decodeDigit(e,c,l,K.L_AND_G_PATTERNS);o+=String.fromCharCode(48+g%10);try{for(var y=(i=void 0,Ve(c)),_=y.next();!_.done;_=y.next())l+=_.value}catch(C){i={error:C}}finally{try{_&&!_.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}g>=10&&(h|=1<<5-d)}for(o=t.determineFirstDigit(o,h),l=K.findGuardPattern(e,l,!0,K.MIDDLE_PATTERN,new Int32Array(K.MIDDLE_PATTERN.length).fill(0))[1],d=0;d<6&&l<f;d++){g=K.decodeDigit(e,c,l,K.L_PATTERNS),o+=String.fromCharCode(48+g);try{for(var w=(s=void 0,Ve(c)),m=w.next();!m.done;m=w.next())l+=m.value}catch(C){s={error:C}}finally{try{m&&!m.done&&(u=w.return)&&u.call(w)}finally{if(s)throw s.error}}}return{rowOffset:l,resultString:o}},t.prototype.getBarcodeFormat=function(){return R.EAN_13},t.determineFirstDigit=function(e,n){for(var o=0;o<10;o++)if(n===this.FIRST_DIGIT_ENCODINGS[o])return e=String.fromCharCode(48+o)+e;throw new A},t.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],t}(K),bn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ue=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},He=function(r){function t(){var e=r.call(this)||this;return e.decodeMiddleCounters=Int32Array.from([0,0,0,0]),e}return bn(t,r),t.prototype.decodeMiddle=function(e,n,o){var i,a,s,u,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var f=e.getSize(),l=n[1],h=0;h<4&&l<f;h++){var d=K.decodeDigit(e,c,l,K.L_PATTERNS);o+=String.fromCharCode(48+d);try{for(var g=(i=void 0,Ue(c)),y=g.next();!y.done;y=g.next())l+=y.value}catch(m){i={error:m}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}}for(l=K.findGuardPattern(e,l,!0,K.MIDDLE_PATTERN,new Int32Array(K.MIDDLE_PATTERN.length).fill(0))[1],h=0;h<4&&l<f;h++){d=K.decodeDigit(e,c,l,K.L_PATTERNS),o+=String.fromCharCode(48+d);try{for(var _=(s=void 0,Ue(c)),w=_.next();!w.done;w=_.next())l+=w.value}catch(m){s={error:m}}finally{try{w&&!w.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}}return{rowOffset:l,resultString:o}},t.prototype.getBarcodeFormat=function(){return R.EAN_8},t}(K),Tn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Rn=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ean13Reader=new Ce,e}return Tn(t,r),t.prototype.getBarcodeFormat=function(){return R.UPC_A},t.prototype.decode=function(e,n){return this.maybeReturnResult(this.ean13Reader.decode(e))},t.prototype.decodeRow=function(e,n,o){return this.maybeReturnResult(this.ean13Reader.decodeRow(e,n,o))},t.prototype.decodeMiddle=function(e,n,o){return this.ean13Reader.decodeMiddle(e,n,o)},t.prototype.maybeReturnResult=function(e){var n=e.getText();if(n.charAt(0)==="0"){var o=new ct(n.substring(1),null,null,e.getResultPoints(),R.UPC_A);return e.getResultMetadata()!=null&&o.putAllMetadata(e.getResultMetadata()),o}throw new A},t.prototype.reset=function(){this.ean13Reader.reset()},t}(K),Nn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Dn=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ge=function(r){function t(){var e=r.call(this)||this;return e.decodeMiddleCounters=new Int32Array(4),e}return Nn(t,r),t.prototype.decodeMiddle=function(e,n,o){var i,a,s=this.decodeMiddleCounters.map(function(y){return y});s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=e.getSize(),c=n[1],f=0,l=0;l<6&&c<u;l++){var h=t.decodeDigit(e,s,c,t.L_AND_G_PATTERNS);o+=String.fromCharCode(48+h%10);try{for(var d=(i=void 0,Dn(s)),g=d.next();!g.done;g=d.next())c+=g.value}catch(y){i={error:y}}finally{try{g&&!g.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}h>=10&&(f|=1<<5-l)}return t.determineNumSysAndCheckDigit(new U(o),f),c},t.prototype.decodeEnd=function(e,n){return t.findGuardPatternWithoutCounters(e,n,!0,t.MIDDLE_END_PATTERN)},t.prototype.checkChecksum=function(e){return K.checkChecksum(t.convertUPCEtoUPCA(e))},t.determineNumSysAndCheckDigit=function(e,n){for(var o=0;o<=1;o++)for(var i=0;i<10;i++)if(n===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[o][i])return e.insert(0,"0"+o),void e.append("0"+i);throw A.getNotFoundInstance()},t.prototype.getBarcodeFormat=function(){return R.UPC_E},t.convertUPCEtoUPCA=function(e){var n=e.slice(1,7).split("").map(function(a){return a.charCodeAt(0)}),o=new U;o.append(e.charAt(0));var i=n[5];switch(i){case 0:case 1:case 2:o.appendChars(n,0,2),o.append(i),o.append("0000"),o.appendChars(n,2,3);break;case 3:o.appendChars(n,0,3),o.append("00000"),o.appendChars(n,3,2);break;case 4:o.appendChars(n,0,4),o.append("00000"),o.append(n[4]);break;default:o.appendChars(n,0,5),o.append("0000"),o.append(i)}return e.length>=8&&o.append(e.charAt(7)),o.toString()},t.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),t.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])],t}(K),Pn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Xe=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ge=function(r){function t(e){var n=r.call(this)||this,o=e==null?null:e.get(H.POSSIBLE_FORMATS),i=[];return o!=null&&(o.indexOf(R.EAN_13)>-1?i.push(new Ce):o.indexOf(R.UPC_A)>-1&&i.push(new Rn),o.indexOf(R.EAN_8)>-1&&i.push(new He),o.indexOf(R.UPC_E)>-1&&i.push(new Ge)),i.length===0&&(i.push(new Ce),i.push(new He),i.push(new Ge)),n.readers=i,n}return Pn(t,r),t.prototype.decodeRow=function(e,n,o){var i,a;try{for(var s=Xe(this.readers),u=s.next();!u.done;u=s.next()){var c=u.value;try{var f=c.decodeRow(e,n,o),l=f.getBarcodeFormat()===R.EAN_13&&f.getText().charAt(0)==="0",h=o==null?null:o.get(H.POSSIBLE_FORMATS),d=h==null||h.includes(R.UPC_A);if(l&&d){var g=f.getRawBytes(),y=new ct(f.getText().substring(1),g,g.length,f.getResultPoints(),R.UPC_A);return y.putAllMetadata(f.getResultMetadata()),y}return f}catch{}}}catch(_){i={error:_}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}throw new A},t.prototype.reset=function(){var e,n;try{for(var o=Xe(this.readers),i=o.next();!i.done;i=o.next())i.value.reset()}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},t}(nt),Mn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Bn=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Nt=function(r){function t(){var e=r.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 Mn(t,r),t.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},t.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},t.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},t.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},t.prototype.getOddCounts=function(){return this.oddCounts},t.prototype.getEvenCounts=function(){return this.evenCounts},t.prototype.parseFinderValue=function(e,n){for(var o=0;o<n.length;o++)if(nt.patternMatchVariance(e,n[o],t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return o;throw new A},t.count=function(e){return B.sum(new Int32Array(e))},t.increment=function(e,n){for(var o=0,i=n[0],a=1;a<e.length;a++)n[a]>i&&(i=n[a],o=a);e[o]++},t.decrement=function(e,n){for(var o=0,i=n[0],a=1;a<e.length;a++)n[a]<i&&(i=n[a],o=a);e[o]--},t.isFinderPattern=function(e){var n,o,i=e[0]+e[1],a=i/(i+e[2]+e[3]);if(a>=t.MIN_FINDER_PATTERN_RATIO&&a<=t.MAX_FINDER_PATTERN_RATIO){var s=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;try{for(var c=Bn(e),f=c.next();!f.done;f=c.next()){var l=f.value;l>u&&(u=l),l<s&&(s=l)}}catch(h){n={error:h}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}return u<10*s}return!1},t.MAX_AVG_VARIANCE=.2,t.MAX_INDIVIDUAL_VARIANCE=.45,t.MIN_FINDER_PATTERN_RATIO=9.5/12,t.MAX_FINDER_PATTERN_RATIO=12.5/14,t}(nt),ae=function(){function r(t,e){this.value=t,this.checksumPortion=e}return r.prototype.getValue=function(){return this.value},r.prototype.getChecksumPortion=function(){return this.checksumPortion},r.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.value===e.value&&this.checksumPortion===e.checksumPortion},r.prototype.hashCode=function(){return this.value^this.checksumPortion},r}(),fr=function(){function r(t,e,n,o,i){this.value=t,this.startEnd=e,this.value=t,this.startEnd=e,this.resultPoints=new Array,this.resultPoints.push(new T(n,i)),this.resultPoints.push(new T(o,i))}return r.prototype.getValue=function(){return this.value},r.prototype.getStartEnd=function(){return this.startEnd},r.prototype.getResultPoints=function(){return this.resultPoints},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.value===e.value},r.prototype.hashCode=function(){return this.value},r}(),Ln=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Bt=function(){function r(){}return r.getRSSvalue=function(t,e,n){var o,i,a=0;try{for(var s=Ln(t),u=s.next();!u.done;u=s.next())a+=u.value}catch(w){o={error:w}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var c=0,f=0,l=t.length,h=0;h<l-1;h++){var d=void 0;for(d=1,f|=1<<h;d<t[h];d++,f&=~(1<<h)){var g=r.combins(a-d-1,l-h-2);if(n&&f===0&&a-d-(l-h-1)>=l-h-1&&(g-=r.combins(a-d-(l-h),l-h-2)),l-h-1>1){for(var y=0,_=a-d-(l-h-2);_>e;_--)y+=r.combins(a-d-_-1,l-h-3);g-=y*(l-1-h)}else a-d>e&&g--;c+=g}a-=d}return c},r.combins=function(t,e){var n,o;t-e>e?(o=e,n=t-e):(o=t-e,n=e);for(var i=1,a=1,s=t;s>n;s--)i*=s,a<=o&&(i/=a,a++);for(;a<=o;)i/=a,a++;return i},r}(),Fn=function(){function r(){}return r.buildBitArray=function(t){var e=2*t.length-1;t[t.length-1].getRightChar()==null&&(e-=1);for(var n=new _t(12*e),o=0,i=t[0].getRightChar().getValue(),a=11;a>=0;--a)i&1<<a&&n.set(o),o++;for(a=1;a<t.length;++a){for(var s=t[a],u=s.getLeftChar().getValue(),c=11;c>=0;--c)u&1<<c&&n.set(o),o++;if(s.getRightChar()!=null){var f=s.getRightChar().getValue();for(c=11;c>=0;--c)f&1<<c&&n.set(o),o++}}return n},r}(),bt=function(){function r(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}return r.prototype.getDecodedInformation=function(){return this.decodedInformation},r.prototype.isFinished=function(){return this.finished},r}(),Ne=function(){function r(t){this.newPosition=t}return r.prototype.getNewPosition=function(){return this.newPosition},r}(),xn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),yt=function(r){function t(e,n){var o=r.call(this,e)||this;return o.value=n,o}return xn(t,r),t.prototype.getValue=function(){return this.value},t.prototype.isFNC1=function(){return this.value===t.FNC1},t.FNC1="$",t}(Ne),kn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Tt=function(r){function t(e,n,o){var i=r.call(this,e)||this;return o?(i.remaining=!0,i.remainingValue=i.remainingValue):(i.remaining=!1,i.remainingValue=0),i.newString=n,i}return kn(t,r),t.prototype.getNewString=function(){return this.newString},t.prototype.isRemaining=function(){return this.remaining},t.prototype.getRemainingValue=function(){return this.remainingValue},t}(Ne),Vn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),qt=function(r){function t(e,n,o){var i=r.call(this,e)||this;if(n<0||n>10||o<0||o>10)throw new S;return i.firstDigit=n,i.secondDigit=o,i}return Vn(t,r),t.prototype.getFirstDigit=function(){return this.firstDigit},t.prototype.getSecondDigit=function(){return this.secondDigit},t.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},t.prototype.isFirstDigitFNC1=function(){return this.firstDigit===t.FNC1},t.prototype.isSecondDigitFNC1=function(){return this.secondDigit===t.FNC1},t.prototype.isAnyFNC1=function(){return this.firstDigit===t.FNC1||this.secondDigit===t.FNC1},t.FNC1=10,t}(Ne),Qt=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Un=function(){function r(){}return r.parseFieldsInGeneralPurpose=function(t){var e,n,o,i,a,s,u,c;if(!t)return null;if(t.length<2)throw new A;var f=t.substring(0,2);try{for(var l=Qt(r.TWO_DIGIT_DATA_LENGTH),h=l.next();!h.done;h=l.next())if((I=h.value)[0]===f)return I[1]===r.VARIABLE_LENGTH?r.processVariableAI(2,I[2],t):r.processFixedAI(2,I[1],t)}catch(O){e={error:O}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}if(t.length<3)throw new A;var d=t.substring(0,3);try{for(var g=Qt(r.THREE_DIGIT_DATA_LENGTH),y=g.next();!y.done;y=g.next())if((I=y.value)[0]===d)return I[1]===r.VARIABLE_LENGTH?r.processVariableAI(3,I[2],t):r.processFixedAI(3,I[1],t)}catch(O){o={error:O}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var _=Qt(r.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),w=_.next();!w.done;w=_.next())if((I=w.value)[0]===d)return I[1]===r.VARIABLE_LENGTH?r.processVariableAI(4,I[2],t):r.processFixedAI(4,I[1],t)}catch(O){a={error:O}}finally{try{w&&!w.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}if(t.length<4)throw new A;var m=t.substring(0,4);try{for(var C=Qt(r.FOUR_DIGIT_DATA_LENGTH),E=C.next();!E.done;E=C.next()){var I;if((I=E.value)[0]===m)return I[1]===r.VARIABLE_LENGTH?r.processVariableAI(4,I[2],t):r.processFixedAI(4,I[1],t)}}catch(O){u={error:O}}finally{try{E&&!E.done&&(c=C.return)&&c.call(C)}finally{if(u)throw u.error}}throw new A},r.processFixedAI=function(t,e,n){if(n.length<t)throw new A;var o=n.substring(0,t);if(n.length<t+e)throw new A;var i=n.substring(t,t+e),a=n.substring(t+e),s="("+o+")"+i,u=r.parseFieldsInGeneralPurpose(a);return u==null?s:s+u},r.processVariableAI=function(t,e,n){var o,i=n.substring(0,t);o=n.length<t+e?n.length:t+e;var a=n.substring(t,o),s=n.substring(o),u="("+i+")"+a,c=r.parseFieldsInGeneralPurpose(s);return c==null?u:u+c},r.VARIABLE_LENGTH=[],r.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",r.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",r.VARIABLE_LENGTH,20],["22",r.VARIABLE_LENGTH,29],["30",r.VARIABLE_LENGTH,8],["37",r.VARIABLE_LENGTH,8],["90",r.VARIABLE_LENGTH,30],["91",r.VARIABLE_LENGTH,30],["92",r.VARIABLE_LENGTH,30],["93",r.VARIABLE_LENGTH,30],["94",r.VARIABLE_LENGTH,30],["95",r.VARIABLE_LENGTH,30],["96",r.VARIABLE_LENGTH,30],["97",r.VARIABLE_LENGTH,3],["98",r.VARIABLE_LENGTH,30],["99",r.VARIABLE_LENGTH,30]],r.THREE_DIGIT_DATA_LENGTH=[["240",r.VARIABLE_LENGTH,30],["241",r.VARIABLE_LENGTH,30],["242",r.VARIABLE_LENGTH,6],["250",r.VARIABLE_LENGTH,30],["251",r.VARIABLE_LENGTH,30],["253",r.VARIABLE_LENGTH,17],["254",r.VARIABLE_LENGTH,20],["400",r.VARIABLE_LENGTH,30],["401",r.VARIABLE_LENGTH,30],["402",17],["403",r.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",r.VARIABLE_LENGTH,20],["421",r.VARIABLE_LENGTH,15],["422",3],["423",r.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],r.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],["3
860",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",r.VARIABLE_LENGTH,15],["391",r.VARIABLE_LENGTH,18],["392",r.VARIABLE_LENGTH,15],["393",r.VARIABLE_LENGTH,18],["703",r.VARIABLE_LENGTH,30]],r.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",r.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",r.VARIABLE_LENGTH,20],["8003",r.VARIABLE_LENGTH,30],["8004",r.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",r.VARIABLE_LENGTH,30],["8008",r.VARIABLE_LENGTH,12],["8018",18],["8020",r.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",r.VARIABLE_LENGTH,70],["8200",r.VARIABLE_LENGTH,70]],r}(),re=function(){function r(t){this.buffer=new U,this.information=t}return r.prototype.decodeAllCodes=function(t,e){for(var n=e,o=null;;){var i=this.decodeGeneralPurposeField(n,o),a=Un.parseFieldsInGeneralPurpose(i.getNewString());if(a!=null&&t.append(a),o=i.isRemaining()?""+i.getRemainingValue():null,n===i.getNewPosition())break;n=i.getNewPosition()}return t.toString()},r.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)},r.prototype.decodeNumeric=function(t){if(t+7>this.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return new qt(this.information.getSize(),e===0?qt.FNC1:e-1,qt.FNC1)}var n=this.extractNumericValueFromBitArray(t,7);return new qt(t+7,(n-8)/11,(n-8)%11)},r.prototype.extractNumericValueFromBitArray=function(t,e){return r.extractNumericValueFromBitArray(this.information,t,e)},r.extractNumericValueFromBitArray=function(t,e,n){for(var o=0,i=0;i<n;++i)t.get(e+i)&&(o|=1<<n-i-1);return o},r.prototype.decodeGeneralPurposeField=function(t,e){this.buffer.setLengthToZero(),e!=null&&this.buffer.append(e),this.current.setPosition(t);var n=this.parseBlocks();return n!=null&&n.isRemaining()?new Tt(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new Tt(this.current.getPosition(),this.buffer.toString())},r.prototype.parseBlocks=function(){var t,e;do{var n=this.current.getPosition();if(t=this.current.isAlpha()?(e=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(e=this.parseIsoIec646Block()).isFinished():(e=this.parseNumericBlock()).isFinished(),n===this.current.getPosition()&&!t)break}while(!t);return e.getDecodedInformation()},r.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 Tt(this.current.getPosition(),this.buffer.toString()):new Tt(this.current.getPosition(),this.buffer.toString(),t.getSecondDigit()),new bt(!0,e)}if(this.buffer.append(t.getFirstDigit()),t.isSecondDigitFNC1())return e=new Tt(this.current.getPosition(),this.buffer.toString()),new bt(!0,e);this.buffer.append(t.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new bt(!1)},r.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 Tt(this.current.getPosition(),this.buffer.toString());return new bt(!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 bt(!1)},r.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 Tt(this.current.getPosition(),this.buffer.toString());return new bt(!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 bt(!1)},r.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;
8if(t+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<116)return!0;if(t+8>this.information.getSize())return!1;var o=this.extractNumericValueFromBitArray(t,8);return o>=232&&o<253},r.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(e===15)return new yt(t+5,yt.FNC1);if(e>=5&&e<15)return new yt(t+5,"0"+(e-5));var n,o=this.extractNumericValueFromBitArray(t,7);if(o>=64&&o<90)return new yt(t+7,""+(o+1));if(o>=90&&o<116)return new yt(t+7,""+(o+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:n="!";break;case 233:n='"';break;case 234:n="%";break;case 235:n="&";break;case 236:n="'";break;case 237:n="(";break;case 238:n=")";break;case 239:n="*";break;case 240:n="+";break;case 241:n=",";break;case 242:n="-";break;case 243:n=".";break;case 244:n="/";break;case 245:n=":";break;case 246:n=";";break;case 247:n="<";break;case 248:n="=";break;case 249:n=">";break;case 250:n="?";break;case 251:n="_";break;case 252:n=" ";break;default:throw new S}return new yt(t+8,n)},r.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 n=this.extractNumericValueFromBitArray(t,6);return n>=16&&n<63},r.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(e===15)return new yt(t+5,yt.FNC1);if(e>=5&&e<15)return new yt(t+5,"0"+(e-5));var n,o=this.extractNumericValueFromBitArray(t,6);if(o>=32&&o<58)return new yt(t+6,""+(o+33));switch(o){case 58:n="*";break;case 59:n=",";break;case 60:n="-";break;case 61:n=".";break;case 62:n="/";break;default:throw new Yt("Decoding invalid alphanumeric value: "+o)}return new yt(t+6,n)},r.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(e===2){if(!this.information.get(t+2))return!1}else if(this.information.get(t+e))return!1;return!0},r.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},r.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},r}(),lr=function(){function r(t){this.information=t,this.generalDecoder=new re(t)}return r.prototype.getInformation=function(){return this.information},r.prototype.getGeneralDecoder=function(){return this.generalDecoder},r}(),Hn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),wt=function(r){function t(e){return r.call(this,e)||this}return Hn(t,r),t.prototype.encodeCompressedGtin=function(e,n){e.append("(01)");var o=e.length();e.append("9"),this.encodeCompressedGtinWithoutAI(e,n,o)},t.prototype.encodeCompressedGtinWithoutAI=function(e,n,o){for(var i=0;i<4;++i){var a=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*i,10);a/100==0&&e.append("0"),a/10==0&&e.append("0"),e.append(a)}t.appendCheckDigit(e,o)},t.appendCheckDigit=function(e,n){for(var o=0,i=0;i<13;i++){var a=e.charAt(i+n).charCodeAt(0)-48;o+=1&i?a:3*a}(o=10-o%10)===10&&(o=0),e.append(o)},t.GTIN_SIZE=40,t}(lr),Gn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Xn=function(r){function t(e){return r.call(this,e)||this}return Gn(t,r),t.prototype.parseInformation=function(){var e=new U;e.append("(01)");var n=e.length(),o=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE,4);return e.append(o),this.encodeCompressedGtinWithoutAI(e,t.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(e,t.HEADER_SIZE+44)},t.HEADER_SIZE=4,t}(wt),jn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Wn=function(r){function t(e){return r.call(this,e)||this}return jn(t,r),t.prototype.parseInformation=function(){var e=new U;return this.getGeneralDecoder().decodeAllCodes(e,t.HEADER_SIZE)},t.HEADER_SIZE=5,t}(lr),zn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ne=function(r){function t(e){return r.call(this,e)||this}return zn(t,r),t.prototype.encodeCompressedWeight=function(e,n,o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n,o);this.addWeightCode(e,i);for(var a=this.checkWeight(i),s=1e5,u=0;u<5;++u)a/s==0&&e.append("0"),s/=10;e.append(a)},t}(wt),Yn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),hr=function(r){function t(e){return r.call(this,e)||this}return Yn(t,r),t.prototype.parseInformation=function(){if(this.getInformation().getSize()!=t.HEADER_SIZE+ne.GTIN_SIZE+t.WEIGHT_SIZE)throw new A;var e=new U;return this.encodeCompressedGtin(e,t.HEADER_SIZE),this.encodeCompressedWeight(e,t.HEADER_SIZE+ne.GTIN_SIZE,t.WEIGHT_SIZE),e.toString()},t.HEADER_SIZE=5,t.WEIGHT_SIZE=15,t}(ne),Zn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Kn=function(r){function t(e){return r.call(this,e)||this}return Zn(t,r),t.prototype.addWeightCode=function(e,n){e.append("(3103)")},t.prototype.checkWeight=function(e){return e},t}(hr),qn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Qn=function(r){function t(e){return r.call(this,e)||this}
8return qn(t,r),t.prototype.addWeightCode=function(e,n){n<1e4?e.append("(3202)"):e.append("(3203)")},t.prototype.checkWeight=function(e){return e<1e4?e:e-1e4},t}(hr),Jn=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),$n=function(r){function t(e){return r.call(this,e)||this}return Jn(t,r),t.prototype.parseInformation=function(){if(this.getInformation().getSize()<t.HEADER_SIZE+wt.GTIN_SIZE)throw new A;var e=new U;this.encodeCompressedGtin(e,t.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE+wt.GTIN_SIZE,t.LAST_DIGIT_SIZE);e.append("(392"),e.append(n),e.append(")");var o=this.getGeneralDecoder().decodeGeneralPurposeField(t.HEADER_SIZE+wt.GTIN_SIZE+t.LAST_DIGIT_SIZE,null);return e.append(o.getNewString()),e.toString()},t.HEADER_SIZE=8,t.LAST_DIGIT_SIZE=2,t}(wt),to=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),eo=function(r){function t(e){return r.call(this,e)||this}return to(t,r),t.prototype.parseInformation=function(){if(this.getInformation().getSize()<t.HEADER_SIZE+wt.GTIN_SIZE)throw new A;var e=new U;this.encodeCompressedGtin(e,t.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE+wt.GTIN_SIZE,t.LAST_DIGIT_SIZE);e.append("(393"),e.append(n),e.append(")");var o=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE+wt.GTIN_SIZE+t.LAST_DIGIT_SIZE,t.FIRST_THREE_DIGITS_SIZE);o/100==0&&e.append("0"),o/10==0&&e.append("0"),e.append(o);var i=this.getGeneralDecoder().decodeGeneralPurposeField(t.HEADER_SIZE+wt.GTIN_SIZE+t.LAST_DIGIT_SIZE+t.FIRST_THREE_DIGITS_SIZE,null);return e.append(i.getNewString()),e.toString()},t.HEADER_SIZE=8,t.LAST_DIGIT_SIZE=2,t.FIRST_THREE_DIGITS_SIZE=10,t}(wt),ro=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Et=function(r){function t(e,n,o){var i=r.call(this,e)||this;return i.dateCode=o,i.firstAIdigits=n,i}return ro(t,r),t.prototype.parseInformation=function(){if(this.getInformation().getSize()!=t.HEADER_SIZE+t.GTIN_SIZE+t.WEIGHT_SIZE+t.DATE_SIZE)throw new A;var e=new U;return this.encodeCompressedGtin(e,t.HEADER_SIZE),this.encodeCompressedWeight(e,t.HEADER_SIZE+t.GTIN_SIZE,t.WEIGHT_SIZE),this.encodeCompressedDate(e,t.HEADER_SIZE+t.GTIN_SIZE+t.WEIGHT_SIZE),e.toString()},t.prototype.encodeCompressedDate=function(e,n){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(n,t.DATE_SIZE);if(o!=38400){e.append("("),e.append(this.dateCode),e.append(")");var i=o%32,a=(o/=32)%12+1,s=o/=12;s/10==0&&e.append("0"),e.append(s),a/10==0&&e.append("0"),e.append(a),i/10==0&&e.append("0"),e.append(i)}},t.prototype.addWeightCode=function(e,n){e.append("("),e.append(this.firstAIdigits),e.append(n/1e5),e.append(")")},t.prototype.checkWeight=function(e){return e%1e5},t.HEADER_SIZE=8,t.WEIGHT_SIZE=20,t.DATE_SIZE=16,t}(ne),je=function(){function r(t,e,n,o){this.leftchar=t,this.rightchar=e,this.finderpattern=n,this.maybeLast=o}return r.prototype.mayBeLast=function(){return this.maybeLast},r.prototype.getLeftChar=function(){return this.leftchar},r.prototype.getRightChar=function(){return this.rightchar},r.prototype.getFinderPattern=function(){return this.finderpattern},r.prototype.mustBeLast=function(){return this.rightchar==null},r.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(this.finderpattern==null?"null":this.finderpattern.getValue())+" ]"},r.equals=function(t,e){return t instanceof r&&r.equalsOrNull(t.leftchar,e.leftchar)&&r.equalsOrNull(t.rightchar,e.rightchar)&&r.equalsOrNull(t.finderpattern,e.finderpattern)},r.equalsOrNull=function(t,e){return t===null?e===null:r.equals(t,e)},r.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},r}(),no=function(){function r(t,e,n){this.pairs=t,this.rowNumber=e,this.wasReversed=n}return r.prototype.getPairs=function(){return this.pairs},r.prototype.getRowNumber=function(){return this.rowNumber},r.prototype.isReversed=function(){return this.wasReversed},r.prototype.isEquivalent=function(t){return this.checkEqualitity(this,t)},r.prototype.toString=function(){return"{ "+this.pairs+" }"},r.prototype.equals=function(t,e){return t instanceof r&&this.checkEqualitity(t,e)&&t.wasReversed===e.wasReversed},r.prototype.checkEqualitity=function(t,e){var n;if(t&&e)return t.forEach(function(o,i){e.forEach(function(a){o.getLeftChar().getValue()===a.getLeftChar().getValue()&&o.getRightChar().getValue()===a.getRightChar().getValue()&&o.getFinderPatter().getValue()===a.getFinderPatter().getValue()&&(n=!0)})}),n},r}(),oo=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ct=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},io=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.pairs=new Array(t.MAX_PAIRS),e.rows=new Array,e.startEnd=[2],e}return oo(t,r),t.prototype.decodeRow=function(e,n,o){this.pairs.length=0,this.startFromEven=!1;try{return t.constructResult(this.decodeRow2pairs(e,n))}catch{}return this.pairs.length=0,this.startFromEven=!0,t.constructResult(this.decodeRow2pairs(e,n))},t.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},t.prototype.decodeRow2pairs=function(e,n){for(var o,i=!1;!i;)try{this.pairs.push(this.retrieveNextPair(n,this.pairs,e))}catch(s){if(s instanceof A){if(!this.pairs.length)throw new A;i=!0}}if(this.checkChecksum())return this.pairs;if(o=!!this.rows.length,this.storeRow(e,!1),o){var a=this.checkRowsBoolean(!1);if(a!=null||(a=this.checkRowsBoolean(!0))!=null)return a}throw new A},t.prototype.checkRowsBoolean=function(e){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,e&&(this.rows=this.rows.reverse());var n=null;try{n=this.checkRows(new Array,0)}catch(o){console.log(o)}return e&&(this.rows=this.rows.reverse()),n},t.prototype.checkRows=function(e,n){for(var o,i,a=n;a<this.rows.length;a++){var s=this.rows[a];this.pairs.length=0;try{for(var u=(o=void 0,Ct(e)),c=u.next();!c.done;c=u.next()){var f=c.value;this.pairs.push(f.getPairs())}}catch(h){o={error:h}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}if(this.pairs.push(s.getPairs()),t.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var l=new Array(e);l.push(s);try{return this.checkRows(l,a+1)}catch(h){console.log(h)}}}throw new A},t.isValidSequence=function(e){var n,o;try{for(var i=Ct(t.FINDER_PATTERN_SEQUENCES),a=i.next();!a.done;a=i.next()){var s=a.value;if(!(e.length>s.length)){for(var u=!0,c=0;c<e.length;c++)if(e[c].getFinderPattern().getValue()!=s[c]){u=!1;break}if(u)return!0}}}catch(f){n={error:f}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return!1},t.prototype.storeRow=function(e,n){for(var o=0,i=!1,a=!1;o<this.rows.length;){var s=this.rows[o];if(s.getRowNumber()>e){a=s.isEquivalent(this.pairs);break}i=s.isEquivalent(this.pairs),o++}a||i||t.isPartialRow(this.pairs,this.rows)||(this.rows.push(o,new no(this.pairs,e,n)),this.removePartialRows(this.pairs,this.rows))},t.prototype.removePartialRows=function(e,n){var o,i,a,s,u,c;try{for(var f=Ct(n),l=f.next();!l.done;l=f.next()){var h=l.value;if(h.getPairs().length!==e.length)try{for(var d=(a=void 0,Ct(h.getPairs())),g=d.next();!g.done;g=d.next()){var y=g.value,_=!1;try{for(var w=(u=void 0,Ct(e)),m=w.next();!m.done;m=w.next()){var C=m.value;if(je.equals(y,C)){_=!0;break}}}catch(E){u={error:E}}finally{try{m&&!m.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}}}catch(E){a={error:E}}finally{try{g&&!g.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}}}catch(E){o={error:E}}finally{try{l&&!l.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}},t.isPartialRow=function(e,n){var o,i,a,s,u,c;try{for(var f=Ct(n),l=f.next();!l.done;l=f.next()){var h=l.value,d=!0;try{for(var g=(a=void 0,Ct(e)),y=g.next();!y.done;y=g.next()){var _=y.value,w=!1;try{for(var m=(u=void 0,Ct(h.getPairs())),C=m.next();!C.done;C=m.next()){var E=C.value;if(_.equals(E)){w=!0;break}}}catch(I){u={error:I}}finally{try{C&&!C.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}if(!w){d=!1;break}}}catch(I){a={error:I}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}if(d)return!0}}catch(I){o={error:I}}finally{try{l&&!l.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}return!1},t.prototype.getRows=function(){return this.rows},t.constructResult=function(e){var n=function(s){try{if(s.get(1))return new Xn(s);if(!s.get(2))return new Wn(s);switch(re.extractNumericValueFromBitArray(s,1,4)){case 4:return new Kn(s);case 5:return new Qn(s)}switch(re.extractNumericValueFromBitArray(s,1,5)){case 12:return new $n(s);case 13:return new eo(s)}switch(re.extractNumericValueFromBitArray(s,1,7)){case 56:return new Et(s,"310","11");case 57:return new Et(s,"320","11");case 58:return new Et(s,"310","13");case 59:return new Et(s,"320","13");case 60:return new Et(s,"310","15");case 61:return new Et(s,"320","15");case 62:return new Et(s,"310","17");case 63:return new Et(s,"320","17")}
8}catch(u){throw console.log(u),new Yt("unknown decoder: "+s)}}(Fn.buildBitArray(e)).parseInformation(),o=e[0].getFinderPattern().getResultPoints(),i=e[e.length-1].getFinderPattern().getResultPoints(),a=[o[0],o[1],i[0],i[1]];return new ct(n,null,null,a,R.RSS_EXPANDED,null)},t.prototype.checkChecksum=function(){var e=this.pairs.get(0),n=e.getLeftChar(),o=e.getRightChar();if(o==null)return!1;for(var i=o.getChecksumPortion(),a=2,s=1;s<this.pairs.size();++s){var u=this.pairs.get(s);i+=u.getLeftChar().getChecksumPortion(),a++;var c=u.getRightChar();c!=null&&(i+=c.getChecksumPortion(),a++)}return 211*(a-4)+(i%=211)==n.getValue()},t.getNextSecondBar=function(e,n){var o;return e.get(n)?(o=e.getNextUnset(n),o=e.getNextSet(o)):(o=e.getNextSet(n),o=e.getNextUnset(o)),o},t.prototype.retrieveNextPair=function(e,n,o){var i,a=n.length%2==0;this.startFromEven&&(a=!a);var s=!0,u=-1;do this.findNextPair(e,n,u),(i=this.parseFoundFinderPattern(e,o,a))==null?u=t.getNextSecondBar(e,this.startEnd[0]):s=!1;while(s);var c,f=this.decodeDataCharacter(e,i,a,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new A;try{c=this.decodeDataCharacter(e,i,a,!1)}catch(l){c=null,console.log(l)}return new je(f,c,i,!0)},t.prototype.isEmptyPair=function(e){return e.length===0},t.prototype.findNextPair=function(e,n,o){var i=this.getDecodeFinderCounters();i[0]=0,i[1]=0,i[2]=0,i[3]=0;var a,s=e.getSize();o>=0?a=o:this.isEmptyPair(n)?a=0:a=n[n.length-1].getFinderPattern().getStartEnd()[1];var u=n.length%2!=0;this.startFromEven&&(u=!u);for(var c=!1;a<s&&(c=!e.get(a));)a++;for(var f=0,l=a,h=a;h<s;h++)if(e.get(h)!=c)i[f]++;else{if(f==3){if(u&&t.reverseCounters(i),t.isFinderPattern(i))return this.startEnd[0]=l,void(this.startEnd[1]=h);u&&t.reverseCounters(i),l+=i[0]+i[1],i[0]=i[2],i[1]=i[3],i[2]=0,i[3]=0,f--}else f++;i[f]=1,c=!c}throw new A},t.reverseCounters=function(e){for(var n=e.length,o=0;o<n/2;++o){var i=e[o];e[o]=e[n-o-1],e[n-o-1]=i}},t.prototype.parseFoundFinderPattern=function(e,n,o){var i,a,s;if(o){for(var u=this.startEnd[0]-1;u>=0&&!e.get(u);)u--;u++,i=this.startEnd[0]-u,a=u,s=this.startEnd[1]}else a=this.startEnd[0],i=(s=e.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var c,f=this.getDecodeFinderCounters();G.arraycopy(f,0,f,1,f.length-1),f[0]=i;try{c=this.parseFinderValue(f,t.FINDER_PATTERNS)}catch{return null}return new fr(c,[a,s],a,s,n)},t.prototype.decodeDataCharacter=function(e,n,o,i){for(var a=this.getDataCharacterCounters(),s=0;s<a.length;s++)a[s]=0;if(i)t.recordPatternInReverse(e,n.getStartEnd()[0],a);else{t.recordPattern(e,n.getStartEnd()[1],a);for(var u=0,c=a.length-1;u<c;u++,c--){var f=a[u];a[u]=a[c],a[c]=f}}var l=B.sum(new Int32Array(a))/17,h=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(l-h)/h>.3)throw new A;var d=this.getOddCounts(),g=this.getEvenCounts(),y=this.getOddRoundingErrors(),_=this.getEvenRoundingErrors();for(u=0;u<a.length;u++){var w=1*a[u]/l,m=w+.5;if(m<1){if(w<.3)throw new A;m=1}else if(m>8){if(w>8.7)throw new A;m=8}var C=u/2;1&u?(g[C]=m,_[C]=w-m):(d[C]=m,y[C]=w-m)}this.adjustOddEvenCounts(17);var E=4*n.getValue()+(o?0:2)+(i?0:1)-1,I=0,O=0;for(u=d.length-1;u>=0;u--){if(t.isNotA1left(n,o,i)){var b=t.WEIGHTS[E][2*u];O+=d[u]*b}I+=d[u]}var P=0;for(u=g.length-1;u>=0;u--)t.isNotA1left(n,o,i)&&(b=t.WEIGHTS[E][2*u+1],P+=g[u]*b);var V=O+P;if(1&I||I>13||I<4)throw new A;var Y=(13-I)/2,Q=t.SYMBOL_WIDEST[Y],gt=9-Q,dt=Bt.getRSSvalue(d,Q,!0),vt=Bt.getRSSvalue(g,gt,!1),At=t.EVEN_TOTAL_SUBSET[Y],de=t.GSUM[Y];return new ae(dt*At+vt+de,V)},t.isNotA1left=function(e,n,o){return!(e.getValue()==0&&n&&o)},t.prototype.adjustOddEvenCounts=function(e){var n=B.sum(new Int32Array(this.getOddCounts())),o=B.sum(new Int32Array(this.getEvenCounts())),i=!1,a=!1;n>13?a=!0:n<4&&(i=!0);var s=!1,u=!1;o>13?u=!0:o<4&&(s=!0);var c=n+o-e,f=(1&n)==1,l=(1&o)==0;if(c==1)if(f){if(l)throw new A;a=!0}else{if(!l)throw new A;u=!0}else if(c==-1)if(f){if(l)throw new A;i=!0}else{if(!l)throw new A;s=!0}else{if(c!=0)throw new A;if(f){if(!l)throw new A;n<o?(i=!0,u=!0):(a=!0,s=!0)}else if(l)throw new A}if(i){if(a)throw new A;t.increment(this.getOddCounts(),this.getOddRoundingErrors())}
8if(a&&t.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(u)throw new A;t.increment(this.getEvenCounts(),this.getOddRoundingErrors())}u&&t.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},t.SYMBOL_WIDEST=[7,5,4,3,1],t.EVEN_TOTAL_SUBSET=[4,20,52,104,204],t.GSUM=[0,348,1388,2948,3988],t.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])],t.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]],t.FINDER_PAT_A=0,t.FINDER_PAT_B=1,t.FINDER_PAT_C=2,t.FINDER_PAT_D=3,t.FINDER_PAT_E=4,t.FINDER_PAT_F=5,t.FINDER_PATTERN_SEQUENCES=[[t.FINDER_PAT_A,t.FINDER_PAT_A],[t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B],[t.FINDER_PAT_A,t.FINDER_PAT_C,t.FINDER_PAT_B,t.FINDER_PAT_D],[t.FINDER_PAT_A,t.FINDER_PAT_E,t.FINDER_PAT_B,t.FINDER_PAT_D,t.FINDER_PAT_C],[t.FINDER_PAT_A,t.FINDER_PAT_E,t.FINDER_PAT_B,t.FINDER_PAT_D,t.FINDER_PAT_D,t.FINDER_PAT_F],[t.FINDER_PAT_A,t.FINDER_PAT_E,t.FINDER_PAT_B,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_F,t.FINDER_PAT_F],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_D],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_E],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_F,t.FINDER_PAT_F],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_E,t.FINDER_PAT_F,t.FINDER_PAT_F]],t.MAX_PAIRS=11,t}(Nt),ao=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),so=function(r){function t(e,n,o){var i=r.call(this,e,n)||this;return i.count=0,i.finderPattern=o,i}return ao(t,r),t.prototype.getFinderPattern=function(){return this.finderPattern},t.prototype.getCount=function(){return this.count},t.prototype.incrementCount=function(){this.count++},t}(ae),uo=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ye=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},We=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.possibleLeftPairs=[],e.possibleRightPairs=[],e}return uo(t,r),t.prototype.decodeRow=function(e,n,o){var i,a,s,u,c=this.decodePair(n,!1,e,o);t.addOrTally(this.possibleLeftPairs,c),n.reverse();var f=this.decodePair(n,!0,e,o);t.addOrTally(this.possibleRightPairs,f),n.reverse();try{for(var l=ye(this.possibleLeftPairs),h=l.next();!h.done;h=l.next()){var d=h.value;if(d.getCount()>1)try{for(var g=(s=void 0,ye(this.possibleRightPairs)),y=g.next();!y.done;y=g.next()){var _=y.value;if(_.getCount()>1&&t.checkChecksum(d,_))return t.constructResult(d,_)}}catch(w){s={error:w}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(s)throw s.error}}}}catch(w){i={error:w}}finally{try{h&&!h.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}throw new A},t.addOrTally=function(e,n){var o,i;if(n!=null){var a=!1;try{for(var s=ye(e),u=s.next();!u.done;u=s.next()){var c=u.value;if(c.getValue()===n.getValue()){c.incrementCount(),a=!0;break}}}catch(f){o={error:f}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}a||e.push(n)}},t.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},t.constructResult=function(e,n){for(var o=4537077*e.getValue()+n.getValue(),i=new String(o).toString(),a=new U,s=13-i.length;s>0;s--)a.append("0");a.append(i);var u=0;for(s=0;s<13;
8s++){var c=a.charAt(s).charCodeAt(0)-48;u+=1&s?c:3*c}(u=10-u%10)===10&&(u=0),a.append(u.toString());var f=e.getFinderPattern().getResultPoints(),l=n.getFinderPattern().getResultPoints();return new ct(a.toString(),null,0,[f[0],f[1],l[0],l[1]],R.RSS_14,new Date().getTime())},t.checkChecksum=function(e,n){var o=(e.getChecksumPortion()+16*n.getChecksumPortion())%79,i=9*e.getFinderPattern().getValue()+n.getFinderPattern().getValue();return i>72&&i--,i>8&&i--,o===i},t.prototype.decodePair=function(e,n,o,i){try{var a=this.findFinderPattern(e,n),s=this.parseFoundFinderPattern(e,o,n,a),u=i==null?null:i.get(H.NEED_RESULT_POINT_CALLBACK);if(u!=null){var c=(a[0]+a[1])/2;n&&(c=e.getSize()-1-c),u.foundPossibleResultPoint(new T(c,o))}var f=this.decodeDataCharacter(e,s,!0),l=this.decodeDataCharacter(e,s,!1);return new so(1597*f.getValue()+l.getValue(),f.getChecksumPortion()+4*l.getChecksumPortion(),s)}catch{return null}},t.prototype.decodeDataCharacter=function(e,n,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)nt.recordPatternInReverse(e,n.getStartEnd()[0],i);else{nt.recordPattern(e,n.getStartEnd()[1]+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 f=o?16:15,l=B.sum(new Int32Array(i))/f,h=this.getOddCounts(),d=this.getEvenCounts(),g=this.getOddRoundingErrors(),y=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var _=i[s]/l,w=Math.floor(_+.5);w<1?w=1:w>8&&(w=8);var m=Math.floor(s/2);1&s?(d[m]=w,y[m]=_-w):(h[m]=w,g[m]=_-w)}this.adjustOddEvenCounts(o,f);var C=0,E=0;for(s=h.length-1;s>=0;s--)E*=9,E+=h[s],C+=h[s];var I=0,O=0;for(s=d.length-1;s>=0;s--)I*=9,I+=d[s],O+=d[s];var b=E+3*I;if(o){if(1&C||C>12||C<4)throw new A;var P=(12-C)/2,V=9-(vt=t.OUTSIDE_ODD_WIDEST[P]),Y=Bt.getRSSvalue(h,vt,!1),Q=Bt.getRSSvalue(d,V,!0),gt=t.OUTSIDE_EVEN_TOTAL_SUBSET[P],dt=t.OUTSIDE_GSUM[P];return new ae(Y*gt+Q+dt,b)}if(1&O||O>10||O<4)throw new A;P=(10-O)/2,V=9-(vt=t.INSIDE_ODD_WIDEST[P]),Y=Bt.getRSSvalue(h,vt,!0),Q=Bt.getRSSvalue(d,V,!1);var vt,At=t.INSIDE_ODD_TOTAL_SUBSET[P];return dt=t.INSIDE_GSUM[P],new ae(Q*At+Y+dt,b)},t.prototype.findFinderPattern=function(e,n){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var i=e.getSize(),a=!1,s=0;s<i&&n!==(a=!e.get(s));)s++;for(var u=0,c=s,f=s;f<i;f++)if(e.get(f)!==a)o[u]++;else{if(u===3){if(Nt.isFinderPattern(o))return[c,f];c+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,u--}else u++;o[u]=1,a=!a}throw new A},t.prototype.parseFoundFinderPattern=function(e,n,o,i){for(var a=e.get(i[0]),s=i[0]-1;s>=0&&a!==e.get(s);)s--;s++;var u=i[0]-s,c=this.getDecodeFinderCounters(),f=new Int32Array(c.length);G.arraycopy(c,0,f,1,c.length-1),f[0]=u;var l=this.parseFinderValue(f,t.FINDER_PATTERNS),h=s,d=i[1];return o&&(h=e.getSize()-1-h,d=e.getSize()-1-d),new fr(l,[s,i[1]],h,d,n)},t.prototype.adjustOddEvenCounts=function(e,n){var o=B.sum(new Int32Array(this.getOddCounts())),i=B.sum(new Int32Array(this.getEvenCounts())),a=!1,s=!1,u=!1,c=!1;e?(o>12?s=!0:o<4&&(a=!0),i>12?c=!0:i<4&&(u=!0)):(o>11?s=!0:o<5&&(a=!0),i>10?c=!0:i<4&&(u=!0));var f=o+i-n,l=(1&o)==(e?1:0),h=(1&i)==1;if(f===1)if(l){if(h)throw new A;s=!0}else{if(!h)throw new A;c=!0}else if(f===-1)if(l){if(h)throw new A;a=!0}else{if(!h)throw new A;u=!0}else{if(f!==0)throw new A;if(l){if(!h)throw new A;o<i?(a=!0,c=!0):(s=!0,u=!0)}else if(h)throw new A}if(a){if(s)throw new A;Nt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&Nt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),u){if(c)throw new A;Nt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}c&&Nt.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},t.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],t.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],t.OUTSIDE_GSUM=[0,161,961,2015,2715],t.INSIDE_GSUM=[0,336,1036,1516],t.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],t.INSIDE_ODD_WIDEST=[2,4,6,8],t.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])],t}(Nt),co=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
8r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Lt=function(r){function t(e){var n=r.call(this)||this;n.readers=[];var o=e?e.get(H.POSSIBLE_FORMATS):null,i=e&&e.get(H.ASSUME_CODE_39_CHECK_DIGIT)!==void 0;return o&&((o.includes(R.EAN_13)||o.includes(R.UPC_A)||o.includes(R.EAN_8)||o.includes(R.UPC_E))&&n.readers.push(new ge(e)),o.includes(R.CODE_39)&&n.readers.push(new xe(i)),o.includes(R.CODE_128)&&n.readers.push(new Fe),o.includes(R.ITF)&&n.readers.push(new ke),o.includes(R.RSS_14)&&n.readers.push(new We),o.includes(R.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new io))),n.readers.length===0&&(n.readers.push(new ge(e)),n.readers.push(new xe),n.readers.push(new ge(e)),n.readers.push(new Fe),n.readers.push(new ke),n.readers.push(new We)),n}return co(t,r),t.prototype.decodeRow=function(e,n,o){for(var i=0;i<this.readers.length;i++)try{return this.readers[i].decodeRow(e,n,o)}catch{}throw new A},t.prototype.reset=function(){this.readers.forEach(function(e){return e.reset()})},t}(nt),fo=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n){return e===void 0&&(e=500),r.call(this,new Lt(n),e,n)||this}fo(t,r)})(Vt);var Z,ze=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},F=function(){function r(t,e,n){this.ecCodewords=t,this.ecBlocks=[e],n&&this.ecBlocks.push(n)}return r.prototype.getECCodewords=function(){return this.ecCodewords},r.prototype.getECBlocks=function(){return this.ecBlocks},r}(),L=function(){function r(t,e){this.count=t,this.dataCodewords=e}return r.prototype.getCount=function(){return this.count},r.prototype.getDataCodewords=function(){return this.dataCodewords},r}(),lo=function(){function r(t,e,n,o,i,a){var s,u;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=n,this.dataRegionSizeRows=o,this.dataRegionSizeColumns=i,this.ecBlocks=a;var c=0,f=a.getECCodewords(),l=a.getECBlocks();try{for(var h=ze(l),d=h.next();!d.done;d=h.next()){var g=d.value;c+=g.getCount()*(g.getDataCodewords()+f)}}catch(y){s={error:y}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(s)throw s.error}}this.totalCodewords=c}return r.prototype.getVersionNumber=function(){return this.versionNumber},r.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},r.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},r.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},r.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},r.prototype.getTotalCodewords=function(){return this.totalCodewords},r.prototype.getECBlocks=function(){return this.ecBlocks},r.getVersionForDimensions=function(t,e){var n,o;if(1&t||1&e)throw new S;try{for(var i=ze(r.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===t&&s.symbolSizeColumns===e)return s}}catch(u){n={error:u}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}throw new S},r.prototype.toString=function(){return""+this.versionNumber},r.buildVersions=function(){return[new r(1,10,10,8,8,new F(5,new L(1,3))),new r(2,12,12,10,10,new F(7,new L(1,5))),new r(3,14,14,12,12,new F(10,new L(1,8))),new r(4,16,16,14,14,new F(12,new L(1,12))),new r(5,18,18,16,16,new F(14,new L(1,18))),new r(6,20,20,18,18,new F(18,new L(1,22))),new r(7,22,22,20,20,new F(20,new L(1,30))),new r(8,24,24,22,22,new F(24,new L(1,36))),new r(9,26,26,24,24,new F(28,new L(1,44))),new r(10,32,32,14,14,new F(36,new L(1,62))),new r(11,36,36,16,16,new F(42,new L(1,86))),new r(12,40,40,18,18,new F(48,new L(1,114))),new r(13,44,44,20,20,new F(56,new L(1,144))),new r(14,48,48,22,22,new F(68,new L(1,174))),new r(15,52,52,24,24,new F(42,new L(2,102))),new r(16,64,64,14,14,new F(56,new L(2,140))),new r(17,72,72,16,16,new F(36,new L(4,92))),new r(18,80,80,18,18,new F(48,new L(4,114))),new r(19,88,88,20,20,new F(56,new L(4,144))),new r(20,96,96,22,22,new F(68,new L(4,174))),new r(21,104,104,24,24,new F(56,new L(6,136))),new r(22,120,120,18,18,new F(68,new L(6,175))),new r(23,132,132,20,20,new F(62,new L(8,163))),new r(24,144,144,22,22,new F(62,new L(8,156),new L(2,155))),new r(25,8,18,6,16,new F(7,new L(1,5))),new r(26,8,32,6,14,new F(11,new L(1,10))),new r(27,12,26,10,24,new F(14,new L(1,16))),new r(28,12,36,10,16,new F(18,new L(1,22))),new r(29,16,36,14,16,new F(24,new L(1,32))),new r(30,16,48,14,22,new F(28,
8new L(1,49)))]},r.VERSIONS=r.buildVersions(),r}(),ho=function(){function r(t){var e=t.getHeight();if(e<8||e>144||1&e)throw new S;this.version=r.readVersion(t),this.mappingBitMatrix=this.extractDataRegion(t),this.readMappingMatrix=new mt(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return r.prototype.getVersion=function(){return this.version},r.readVersion=function(t){var e=t.getHeight(),n=t.getWidth();return lo.getVersionForDimensions(e,n)},r.prototype.readCodewords=function(){var t=new Int8Array(this.version.getTotalCodewords()),e=0,n=4,o=0,i=this.mappingBitMatrix.getHeight(),a=this.mappingBitMatrix.getWidth(),s=!1,u=!1,c=!1,f=!1;do if(n!==i||o!==0||s)if(n!==i-2||o!==0||!(3&a)||u)if(n!==i+4||o!==2||7&a||c)if(n!==i-2||o!==0||(7&a)!=4||f){do n<i&&o>=0&&!this.readMappingMatrix.get(o,n)&&(t[e++]=255&this.readUtah(n,o,i,a)),n-=2,o+=2;while(n>=0&&o<a);n+=1,o+=3;do n>=0&&o<a&&!this.readMappingMatrix.get(o,n)&&(t[e++]=255&this.readUtah(n,o,i,a)),n+=2,o-=2;while(n<i&&o>=0);n+=3,o+=1}else t[e++]=255&this.readCorner4(i,a),n-=2,o+=2,f=!0;else t[e++]=255&this.readCorner3(i,a),n-=2,o+=2,c=!0;else t[e++]=255&this.readCorner2(i,a),n-=2,o+=2,u=!0;else t[e++]=255&this.readCorner1(i,a),n-=2,o+=2,s=!0;while(n<i||o<a);if(e!==this.version.getTotalCodewords())throw new S;return t},r.prototype.readModule=function(t,e,n,o){return t<0&&(t+=n,e+=4-(n+4&7)),e<0&&(e+=o,t+=4-(o+4&7)),this.readMappingMatrix.set(e,t),this.mappingBitMatrix.get(e,t)},r.prototype.readUtah=function(t,e,n,o){var i=0;return this.readModule(t-2,e-2,n,o)&&(i|=1),i<<=1,this.readModule(t-2,e-1,n,o)&&(i|=1),i<<=1,this.readModule(t-1,e-2,n,o)&&(i|=1),i<<=1,this.readModule(t-1,e-1,n,o)&&(i|=1),i<<=1,this.readModule(t-1,e,n,o)&&(i|=1),i<<=1,this.readModule(t,e-2,n,o)&&(i|=1),i<<=1,this.readModule(t,e-1,n,o)&&(i|=1),i<<=1,this.readModule(t,e,n,o)&&(i|=1),i},r.prototype.readCorner1=function(t,e){var n=0;return this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,1,t,e)&&(n|=1),n<<=1,this.readModule(t-1,2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n<<=1,this.readModule(2,e-1,t,e)&&(n|=1),n<<=1,this.readModule(3,e-1,t,e)&&(n|=1),n},r.prototype.readCorner2=function(t,e){var n=0;return this.readModule(t-3,0,t,e)&&(n|=1),n<<=1,this.readModule(t-2,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(0,e-4,t,e)&&(n|=1),n<<=1,this.readModule(0,e-3,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n},r.prototype.readCorner3=function(t,e){var n=0;return this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,e-1,t,e)&&(n|=1),n<<=1,this.readModule(0,e-3,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-3,t,e)&&(n|=1),n<<=1,this.readModule(1,e-2,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n},r.prototype.readCorner4=function(t,e){var n=0;return this.readModule(t-3,0,t,e)&&(n|=1),n<<=1,this.readModule(t-2,0,t,e)&&(n|=1),n<<=1,this.readModule(t-1,0,t,e)&&(n|=1),n<<=1,this.readModule(0,e-2,t,e)&&(n|=1),n<<=1,this.readModule(0,e-1,t,e)&&(n|=1),n<<=1,this.readModule(1,e-1,t,e)&&(n|=1),n<<=1,this.readModule(2,e-1,t,e)&&(n|=1),n<<=1,this.readModule(3,e-1,t,e)&&(n|=1),n},r.prototype.extractDataRegion=function(t){var e=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(t.getHeight()!==e)throw new D("Dimension of bitMatrix must match the version size");for(var o=this.version.getDataRegionSizeRows(),i=this.version.getDataRegionSizeColumns(),a=e/o|0,s=n/i|0,u=new mt(s*i,a*o),c=0;c<a;++c)for(var f=c*o,l=0;l<s;++l)for(var h=l*i,d=0;d<o;++d)for(var g=c*(o+2)+1+d,y=f+d,_=0;_<i;++_){var w=l*(i+2)+1+_;if(t.get(w,g)){var m=h+_;u.set(m,y)}}return u},r}(),Ye=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}
8,po=function(){function r(t,e){this.numDataCodewords=t,this.codewords=e}return r.getDataBlocks=function(t,e){var n,o,i,a,s=e.getECBlocks(),u=0,c=s.getECBlocks();try{for(var f=Ye(c),l=f.next();!l.done;l=f.next())u+=(_=l.value).getCount()}catch(dt){n={error:dt}}finally{try{l&&!l.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}var h=new Array(u),d=0;try{for(var g=Ye(c),y=g.next();!y.done;y=g.next())for(var _=y.value,w=0;w<_.getCount();w++){var m=_.getDataCodewords(),C=s.getECCodewords()+m;h[d++]=new r(m,new Uint8Array(C))}}catch(dt){i={error:dt}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}var E=h[0].codewords.length-s.getECCodewords(),I=E-1,O=0;for(w=0;w<I;w++)for(var b=0;b<d;b++)h[b].codewords[w]=t[O++];var P=e.getVersionNumber()===24,V=P?8:d;for(b=0;b<V;b++)h[b].codewords[E-1]=t[O++];var Y=h[0].codewords.length;for(w=E;w<Y;w++)for(b=0;b<d;b++){var Q=P?(b+8)%d:b,gt=P&&Q>7?w-1:w;h[Q].codewords[gt]=t[O++]}if(O!==t.length)throw new D;return h},r.prototype.getNumDataCodewords=function(){return this.numDataCodewords},r.prototype.getCodewords=function(){return this.codewords},r}(),dr=function(){function r(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}return r.prototype.getBitOffset=function(){return this.bitOffset},r.prototype.getByteOffset=function(){return this.byteOffset},r.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new D(""+t);var e=0,n=this.bitOffset,o=this.byteOffset,i=this.bytes;if(n>0){var a=8-n,s=t<a?t:a,u=255>>8-s<<(c=a-s);e=(i[o]&u)>>c,t-=s,(n+=s)===8&&(n=0,o++)}if(t>0){for(;t>=8;)e=e<<8|255&i[o],o++,t-=8;if(t>0){var c;u=255>>(c=8-t)<<c,e=e<<t|(i[o]&u)>>c,n+=t}}return this.bitOffset=n,this.byteOffset=o,e},r.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},r}();(function(r){r[r.PAD_ENCODE=0]="PAD_ENCODE",r[r.ASCII_ENCODE=1]="ASCII_ENCODE",r[r.C40_ENCODE=2]="C40_ENCODE",r[r.TEXT_ENCODE=3]="TEXT_ENCODE",r[r.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",r[r.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",r[r.BASE256_ENCODE=6]="BASE256_ENCODE"})(Z||(Z={}));var Ft,go=function(){function r(){}return r.decode=function(t){var e=new dr(t),n=new U,o=new U,i=new Array,a=Z.ASCII_ENCODE;do if(a===Z.ASCII_ENCODE)a=this.decodeAsciiSegment(e,n,o);else{switch(a){case Z.C40_ENCODE:this.decodeC40Segment(e,n);break;case Z.TEXT_ENCODE:this.decodeTextSegment(e,n);break;case Z.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,n);break;case Z.EDIFACT_ENCODE:this.decodeEdifactSegment(e,n);break;case Z.BASE256_ENCODE:this.decodeBase256Segment(e,n,i);break;default:throw new S}a=Z.ASCII_ENCODE}while(a!==Z.PAD_ENCODE&&e.available()>0);return o.length()>0&&n.append(o.toString()),new le(t,n.toString(),i.length===0?null:i,null)},r.decodeAsciiSegment=function(t,e,n){var o=!1;do{var i=t.readBits(8);if(i===0)throw new S;if(i<=128)return o&&(i+=128),e.append(String.fromCharCode(i-1)),Z.ASCII_ENCODE;if(i===129)return Z.PAD_ENCODE;if(i<=229){var a=i-130;a<10&&e.append("0"),e.append(""+a)}else switch(i){case 230:return Z.C40_ENCODE;case 231:return Z.BASE256_ENCODE;case 232:e.append("�");break;case 233:case 234:case 241:break;case 235:o=!0;break;case 236:e.append("[)>�05�"),n.insert(0,"��");break;case 237:e.append("[)>�06�"),n.insert(0,"��");break;case 238:return Z.ANSIX12_ENCODE;case 239:return Z.TEXT_ENCODE;case 240:return Z.EDIFACT_ENCODE;default:if(i!==254||t.available()!==0)throw new S}}while(t.available()>0);return Z.ASCII_ENCODE},r.decodeC40Segment=function(t,e){var n=!1,o=[],i=0;do{if(t.available()===8)return;var a=t.readBits(8);if(a===254)return;this.parseTwoBytes(a,t.readBits(8),o);for(var s=0;s<3;s++){var u=o[s];switch(i){case 0:if(u<3)i=u+1;else{if(!(u<this.C40_BASIC_SET_CHARS.length))throw new S;var c=this.C40_BASIC_SET_CHARS[u];n?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):e.append(c)}break;case 1:n?(e.append(String.fromCharCode(u+128)),n=!1):e.append(String.fromCharCode(u)),i=0;break;case 2:if(u<this.C40_SHIFT2_SET_CHARS.length)c=this.C40_SHIFT2_SET_CHARS[u],n?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):e.append(c);else switch(u){case 27:e.append("�");break;case 30:n=!0;break;default:throw new S}i=0;break;case 3:n?(e.append(String.fromCharCode(u+224)),n=!1):e.append(String.fromCharCode(u+96)),i=0;break;default:throw new S}}}while(t.available()>0)},r.decodeTextSegment=function(t,e){var n=!1,o=[],i=0;do{if(t.available()===8)return;var a=t.readBits(8);if(a===254)return;this.parseTwoBytes(a,t.readBits(8),o);for(var s=0;s<3;s++){var u=o[s];switch(i){case 0:if(u<3)i=u+1;else{if(!(u<this.TEXT_BASIC_SET_CHARS.length))throw new S;var c=this.TEXT_BASIC_SET_CHARS[u];n?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):e.append(c)}break;case 1:n?(e.append(String.fromCharCode(u+128)),n=!1):e.append(String.fromCharCode(u)),i=0;break;case 2:if(u<this.TEXT_SHIFT2_SET_CHARS.length)c=this.TEXT_SHIFT2_SET_CHARS[u],n?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):e.append(c);else switch(u){case 27:e.append("�");break;case 30:n=!0;break;default:throw new S}i=0;break;case 3:if(!(u<this.TEXT_SHIFT3_SET_CHARS.length))throw new S;c=this.TEXT_SHIFT3_SET_CHARS[u],n?(e.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):e.append(c),i=0;break;default:throw new S}}}while(t.available()>0)},r.decodeAnsiX12Segment=function(t,e){var n=[];do{if(t.available()===8)return;var o=t.readBits(8);if(o===254)return;this.parseTwoBytes(o,t.readBits(8),n);for(var i=0;i<3;i++){var a=n[i];switch(a){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(a<14)e.append(String.fromCharCode(a+44));else{if(!(a<40))throw new S;e.append(String.fromCharCode(a+51))}}}}while(t.available()>0)},r.parseTwoBytes=function(t,e,n){var o=(t<<8)+e-1,i=Math.floor(o/1600);n[0]=i,o-=1600*i,i=Math.floor(o/40),n[1]=i,n[2]=o-40*i},r.decodeEdifactSegment=function(t,e){do{if(t.available()<=16)return;for(var n=0;n<4;n++){var o=t.readBits(6);if(o===31){var i=8-t.getBitOffset();return void(i!==8&&t.readBits(i))}
8!(32&o)&&(o|=64),e.append(String.fromCharCode(o))}}while(t.available()>0)},r.decodeBase256Segment=function(t,e,n){var o,i=1+t.getByteOffset(),a=this.unrandomize255State(t.readBits(8),i++);if((o=a===0?t.available()/8|0:a<250?a:250*(a-249)+this.unrandomize255State(t.readBits(8),i++))<0)throw new S;for(var s=new Uint8Array(o),u=0;u<o;u++){if(t.available()<8)throw new S;s[u]=this.unrandomize255State(t.readBits(8),i++)}n.push(s);try{e.append(Mt.decode(s,$.ISO88591))}catch(c){throw new Yt("Platform does not support required encoding: "+c.message)}},r.unrandomize255State=function(t,e){var n=t-(149*e%255+1);return n>=0?n:n+256},r.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"],r.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],r.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"],r.TEXT_SHIFT2_SET_CHARS=r.C40_SHIFT2_SET_CHARS,r.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","{","|","}","~","�"],r}(),yo=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},wo=function(){function r(){this.rsDecoder=new he(Ot.DATA_MATRIX_FIELD_256)}return r.prototype.decode=function(t){var e,n,o=new ho(t),i=o.getVersion(),a=o.readCodewords(),s=po.getDataBlocks(a,i),u=0;try{for(var c=yo(s),f=c.next();!f.done;f=c.next())u+=f.value.getNumDataCodewords()}catch(m){e={error:m}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}for(var l=new Uint8Array(u),h=s.length,d=0;d<h;d++){var g=s[d],y=g.getCodewords(),_=g.getNumDataCodewords();this.correctErrors(y,_);for(var w=0;w<_;w++)l[w*h+d]=y[w]}return go.decode(l)},r.prototype.correctErrors=function(t,e){var n=new Int32Array(t);try{this.rsDecoder.decode(n,t.length-e)}catch{throw new q}for(var o=0;o<e;o++)t[o]=n[o]},r}(),_o=function(){function r(t){this.image=t,this.rectangleDetector=new Ee(this.image)}return r.prototype.detect=function(){var t=this.rectangleDetector.detect(),e=this.detectSolid1(t);if((e=this.detectSolid2(e))[3]=this.correctTopRight(e),!e[3])throw new A;var n=(e=this.shiftToModuleCenter(e))[0],o=e[1],i=e[2],a=e[3],s=this.transitionsBetween(n,a)+1,u=this.transitionsBetween(i,a)+1;(1&s)==1&&(s+=1),(1&u)==1&&(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var c=r.sampleGrid(this.image,n,o,i,a,s,u);return new Te(c,[n,o,i,a])},r.shiftPoint=function(t,e,n){var o=(e.getX()-t.getX())/(n+1),i=(e.getY()-t.getY())/(n+1);return new T(t.getX()+o,t.getY()+i)},r.moveAway=function(t,e,n){var o=t.getX(),i=t.getY();return o<e?o-=1:o+=1,i<n?i-=1:i+=1,new T(o,i)},r.prototype.detectSolid1=function(t){var e=t[0],n=t[1],o=t[3],i=t[2],a=this.transitionsBetween(e,n),s=this.transitionsBetween(n,o),u=this.transitionsBetween(o,i),c=this.transitionsBetween(i,e),f=a,l=[i,e,n,o];return f>s&&(f=s,l[0]=e,l[1]=n,l[2]=o,l[3]=i),f>u&&(f=u,l[0]=n,l[1]=o,l[2]=i,l[3]=e),f>c&&(l[0]=o,l[1]=i,l[2]=e,l[3]=n),l},r.prototype.detectSolid2=function(t){var e=t[0],n=t[1],o=t[2],i=t[3],a=this.transitionsBetween(e,i),s=r.shiftPoint(n,o,4*(a+1)),u=r.shiftPoint(o,n,4*(a+1));return this.transitionsBetween(s,e)<this.transitionsBetween(u,i)?(t[0]=e,t[1]=n,t[2]=o,t[3]=i):(t[0]=n,t[1]=o,t[2]=i,t[3]=e),t},r.prototype.correctTopRight=function(t){var e=t[0],n=t[1],o=t[2],i=t[3],a=this.transitionsBetween(e,i),s=this.transitionsBetween(n,i),u=r.shiftPoint(e,n,4*(s+1)),c=r.shiftPoint(o,n,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(c,i);var f=new T(i.getX()+(o.getX()-n.getX())/(a+1),i.getY()+(o.getY()-n.getY())/(a+1)),l=new T(i.getX()+(e.getX()-n.getX())/(s+1),i.getY()+(e.getY()-n.getY())/(s+1));return this.isValid(f)?this.isValid(l)?this.transitionsBetween(u,f)+this.transitionsBetween(c,f)>this.transitionsBetween(u,l)+this.transitionsBetween(c,l)?f:l:f:this.isValid(l)?l:null},r.prototype.shiftToModuleCenter=function(t){var e=t[0],n=t[1],o=t[2],i=t[3],a=this.transitionsBetween(e,i)+1,s=this.transitionsBetween(o,i)+1,u=r.shiftPoint(e,n,4*s),c=r.shiftPoint(o,n,4*a);(1&(a=this.transitionsBetween(u,i)+1))==1&&(a+=1),(1&(s=this.transitionsBetween(c,i)+1))==1&&(s+=1);var f,l,h=(e.getX()+n.getX()+o.getX()+i.getX())/4,d=(e.getY()+n.getY()+o.getY()+i.getY())/4;return e=r.moveAway(e,h,d),n=r.moveAway(n,h,d),o=r.moveAway(o,h,d),i=r.moveAway(i,h,d),u=r.shiftPoint(e,n,4*s),u=r.shiftPoint(u,i,4*a),f=r.shiftPoint(n,e,4*s),f=r.shiftPoint(f,o,4*a),c=r.shiftPoint(o,i,4*s),c=r.shiftPoint(c,n,4*a),l=r.shiftPoint(i,o,4*s),[u,f,c,l=r.shiftPoint(l,e,4*a)]},r.prototype.isValid=function(t){return t.getX()>=0&&t.getX()<this.image.getWidth()&&t.getY()>0&&t.getY()<this.image.getHeight()},r.sampleGrid=function(t,e,n,o,i,a,s){return Re.getInstance().sampleGrid(t,a,s,.5,.5,a-.5,.5,a-.5,s-.5,.5,s-.5,e.getX(),e.getY(),i.getX(),i.getY(),o.getX(),o.getY(),n.getX(),n.getY())},r.prototype.transitionsBetween=function(t,e){var n=Math.trunc(t.getX()),o=Math.trunc(t.getY()),i=Math.trunc(e.getX()),a=Math.trunc(e.getY()),s=Math.abs(a-o)>Math.abs(i-n);if(s){var u=n;n=o,o=u,u=i,i=a,a=u}for(var c=Math.abs(i-n),f=Math.abs(a-o),l=-c/2,h=o<a?1:-1,d=n<i?1:-1,g=0,y=this.image.get(s?o:n,s?n:o),_=n,w=o;_!==i;_+=d){var m=this.image.get(s?w:_,s?_:w);if(m!==y&&(g++,y=m),(l+=f)>0){if(w===a)break;w+=h,l-=c}}return g},r}(),se=function(){function r(){this.decoder=new wo}return r.prototype.decode=function(t,e){var n,o;if(e===void 0&&(e=null),e!=null&&e.has(H.PURE_BARCODE)){var i=r.extractPureBits(t.getBlackMatrix());n=this.decoder.decode(i),o=r.NO_POINTS}else{var a=new _o(t.getBlackMatrix()).detect();n=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=n.getRawBytes(),u=new ct(n.getText(),s,8*s.length,o,R.DATA_MATRIX,G.currentTimeMillis()),c=n.getByteSegments();c!=null&&u.putMetadata(rt.BYTE_SEGMENTS,c);var f=n.getECLevel();return f!=null&&u.putMetadata(rt.ERROR_CORRECTION_LEVEL,f),u},r.prototype.reset=function(){},r.extractPureBits=function(t){var e=t.getTopLeftOnBit(),n=t.getBottomRightOnBit();if(e==null||n==null)throw new A;var o=this.moduleSize(e,t),i=e[1],a=n[1],s=e[0],u=(n[0]-s+1)/o,c=(a-i+1)/o;if(u<=0||c<=0)throw new A;
vendor: 16,084 bytes, line 8
8var f=o/2;i+=f,s+=f;for(var l=new mt(u,c),h=0;h<c;h++)for(var d=i+h*o,g=0;g<u;g++)t.get(s+g*o,d)&&l.set(g,h);return l},r.moduleSize=function(t,e){for(var n=e.getWidth(),o=t[0],i=t[1];o<n&&e.get(o,i);)o++;if(o===n)throw new A;var a=o-t[0];if(a===0)throw new A;return a},r.NO_POINTS=[],r}(),vo=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e){return e===void 0&&(e=500),r.call(this,new se,e)||this}vo(t,r)})(Vt),function(r){r[r.L=0]="L",r[r.M=1]="M",r[r.Q=2]="Q",r[r.H=3]="H"}(Ft||(Ft={}));var J,mo=function(){function r(t,e,n){this.value=t,this.stringValue=e,this.bits=n,r.FOR_BITS.set(n,this),r.FOR_VALUE.set(t,this)}return r.prototype.getValue=function(){return this.value},r.prototype.getBits=function(){return this.bits},r.fromString=function(t){switch(t){case"L":return r.L;case"M":return r.M;case"Q":return r.Q;case"H":return r.H;default:throw new W(t+"not available")}},r.prototype.toString=function(){return this.stringValue},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.value===e.value},r.forBits=function(t){if(t<0||t>=r.FOR_BITS.size)throw new D;return r.FOR_BITS.get(t)},r.FOR_BITS=new Map,r.FOR_VALUE=new Map,r.L=new r(Ft.L,"L",1),r.M=new r(Ft.M,"M",0),r.Q=new r(Ft.Q,"Q",3),r.H=new r(Ft.H,"H",2),r}(),Ao=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},pr=function(){function r(t){this.errorCorrectionLevel=mo.forBits(t>>3&3),this.dataMask=7&t}return r.numBitsDiffering=function(t,e){return et.bitCount(t^e)},r.decodeFormatInformation=function(t,e){var n=r.doDecodeFormatInformation(t,e);return n!==null?n:r.doDecodeFormatInformation(t^r.FORMAT_INFO_MASK_QR,e^r.FORMAT_INFO_MASK_QR)},r.doDecodeFormatInformation=function(t,e){var n,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=Ao(r.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var c=u.value,f=c[0];if(f===t||f===e)return new r(c[1]);var l=r.numBitsDiffering(t,f);l<i&&(a=c[1],i=l),t!==e&&(l=r.numBitsDiffering(e,f))<i&&(a=c[1],i=l)}}catch(h){n={error:h}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i<=3?new r(a):null},r.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},r.prototype.getDataMask=function(){return this.dataMask},r.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.errorCorrectionLevel===e.errorCorrectionLevel&&this.dataMask===e.dataMask},r.FORMAT_INFO_MASK_QR=21522,r.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])],r}(),Eo=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=function(){function r(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return r.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},r.prototype.getNumBlocks=function(){var t,e,n=0,o=this.ecBlocks;try{for(var i=Eo(o),a=i.next();!a.done;a=i.next())n+=a.value.getCount()}catch(s){t={error:s}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return n},r.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},r.prototype.getECBlocks=function(){return this.ecBlocks},r}(),p=function(){function r(t,e){this.count=t,this.dataCodewords=e}return r.prototype.getCount=function(){return this.count},r.prototype.getDataCodewords=function(){return this.dataCodewords},r}(),Co=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},oe=function(){function r(t,e){for(var n,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=i;var s=0,u=i[0].getECCodewordsPerBlock(),c=i[0].getECBlocks();try{for(var f=Co(c),l=f.next();!l.done;l=f.next()){var h=l.value;s+=h.getCount()*(h.getDataCodewords()+u)}}catch(d){n={error:d}}finally{try{l&&!l.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}this.totalCodewords=s}return r.prototype.getVersionNumber=function(){return this.versionNumber},r.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},r.prototype.getTotalCodewords=function(){return this.totalCodewords},r.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},r.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},r.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new S;try{return this.getVersionForNumber((t-17)/4)}catch{throw new S}},r.getVersionForNumber=function(t){if(t<1||t>40)throw new D;return r.VERSIONS[t-1]},r.decodeVersionInformation=function(t){for(var e=Number.MAX_SAFE_INTEGER,n=0,o=0;o<r.VERSION_DECODE_INFO.length;o++){var i=r.VERSION_DECODE_INFO[o];if(i===t)return r.getVersionForNumber(o+7);var a=pr.numBitsDiffering(t,i);a<e&&(n=o+7,e=a)}return e<=3?r.getVersionForNumber(n):null},r.prototype.buildFunctionPattern=function(){var t=this.getDimensionForVersion(),e=new mt(t);e.setRegion(0,0,9,9),e.setRegion(t-8,0,8,9),e.setRegion(0,t-8,9,8);for(var n=this.alignmentPatternCenters.length,o=0;o<n;o++)for(var i=this.alignmentPatternCenters[o]-2,a=0;a<n;a++)o===0&&(a===0||a===n-1)||o===n-1&&a===0||e.setRegion(this.alignmentPatternCenters[a]-2,i,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},r.prototype.toString=function(){return""+this.versionNumber},r.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]),r.VERSIONS=[new r(1,new Int32Array(0),new v(7,new p(1,19)),new v(10,new p(1,16)),new v(13,new p(1,13)),new v(17,new p(1,9))),new r(2,Int32Array.from([6,18]),new v(10,new p(1,34)),new v(16,new p(1,28)),new v(22,new p(1,22)),new v(28,new p(1,16))),new r(3,Int32Array.from([6,22]),new v(15,new p(1,55)),new v(26,new p(1,44)),new v(18,new p(2,17)),new v(22,new p(2,13))),new r(4,Int32Array.from([6,26]),new v(20,new p(1,80)),new v(18,new p(2,32)),new v(26,new p(2,24)),new v(16,new p(4,9))),new r(5,Int32Array.from([6,30]),new v(26,new p(1,108)),new v(24,new p(2,43)),new v(18,new p(2,15),new p(2,16)),new v(22,new p(2,11),new p(2,12))),new r(6,Int32Array.from([6,34]),new v(18,new p(2,68)),new v(16,new p(4,27)),new v(24,new p(4,19)),new v(28,new p(4,15))),new r(7,Int32Array.from([6,22,38]),new v(20,new p(2,78)),new v(18,new p(4,31)),new v(18,new p(2,14),new p(4,15)),new v(26,new p(4,13),new p(1,14))),new r(8,Int32Array.from([6,24,42]),new v(24,new p(2,97)),new v(22,new p(2,38),new p(2,39)),new v(22,new p(4,18),new p(2,19)),new v(26,new p(4,14),new p(2,15))),new r(9,Int32Array.from([6,26,46]),new v(30,new p(2,116)),new v(22,new p(3,36),new p(2,37)),new v(20,new p(4,16),new p(4,17)),new v(24,new p(4,12),new p(4,13))),new r(10,Int32Array.from([6,28,50]),new v(18,new p(2,68),new p(2,69)),new v(26,new p(4,43),new p(1,44)),new v(24,new p(6,19),new p(2,20)),new v(28,new p(6,15),new p(2,16))),new r(11,Int32Array.from([6,30,54]),new v(20,new p(4,81)),new v(30,new p(1,50),new p(4,51)),new v(28,new p(4,22),new p(4,23)),new v(24,new p(3,12),new p(8,13))),new r(12,Int32Array.from([6,32,58]),new v(24,new p(2,92),new p(2,93)),new v(22,new p(6,36),new p(2,37)),new v(26,new p(4,20),new p(6,21)),new v(28,new p(7,14),new p(4,15))),new r(13,Int32Array.from([6,34,62]),new v(26,new p(4,107)),new v(22,new p(8,37),new p(1,38)),new v(24,new p(8,20),new p(4,21)),new v(22,new p(12,11),new p(4,12))),new r(14,Int32Array.from([6,26,46,66]),new v(30,new p(3,115),new p(1,116)),new v(24,new p(4,40),new p(5,41)),new v(20,new p(11,16),new p(5,17)),new v(24,new p(11,12),new p(5,13))),new r(15,Int32Array.from([6,26,48,70]),new v(22,new p(5,87),new p(1,88)),new v(24,new p(5,41),new p(5,42)),new v(30,new p(5,24),new p(7,25)),new v(24,new p(11,12),new p(7,13))),new r(16,Int32Array.from([6,26,50,74]),new v(24,new p(5,98),new p(1,99)),new v(28,new p(7,45),new p(3,46)),new v(24,new p(15,19),new p(2,20)),new v(30,new p(3,15),new p(13,16))),new r(17,Int32Array.from([6,30,54,78]),new v(28,new p(1,107),new p(5,108)),new v(28,new p(10,46),new p(1,47)),new v(28,new p(1,22),new p(15,23)),new v(28,new p(2,14),new p(17,15))),new r(18,Int32Array.from([6,30,56,82]),new v(30,new p(5,120),new p(1,121)),new v(26,new p(9,43),new p(4,44)),new v(28,new p(17,22),new p(1,23)),new v(28,new p(2,14),new p(19,15))),new r(19,Int32Array.from([6,30,58,86]),new v(28,new p(3,113),new p(4,114)),new v(26,new p(3,44),new p(11,45)),new v(26,new p(17,21),new p(4,22)),new v(26,new p(9,13),new p(16,14))),new r(20,Int32Array.from([6,34,62,90]),new v(28,new p(3,107),new p(5,108)),new v(26,new p(3,41),new p(13,42)),new v(30,new p(15,24),new p(5,25)),new v(28,new p(15,15),new p(10,16))),new r(21,Int32Array.from([6,28,50,72,94]),new v(28,new p(4,116),new p(4,117)),new v(26,new p(17,42)),new v(28,new p(17,22),new p(6,23)),new v(30,new p(19,16),new p(6,17))),new r(22,Int32Array.from([6,26,50,74,98]),new v(28,new p(2,111),new p(7,112)),new v(28,new p(17,46)),new v(30,new p(7,24),new p(16,25)),new v(24,new p(34,13))),new r(23,Int32Array.from([6,30,54,78,102]),new v(30,new p(4,121),new p(5,122)),new v(28,new p(4,47),new p(14,48)),new v(30,new p(11,24),new p(14,25)),new v(30,new p(16,15),new p(14,16))),new r(24,Int32Array.from([6,28,54,80,106]),new v(30,new p(6,117),new p(4,118)),new v(28,new p(6,45),new p(14,46)),new v(30,new p(11,24),new p(16,25)),new v(30,new p(30,16),new p(2,17))),new r(25,Int32Array.from([6,32,58,84,110]),new v(26,new p(8,106),new p(4,107)),new v(28,new p(8,47),new p(13,48)),new v(30,new p(7,24),new p(22,25)),new v(30,new p(22,15),new p(13,16))),new r(26,Int32Array.from([6,30,58,86,114]),new v(28,new p(10,114),new p(2,115)),new v(28,new p(19,46),new p(4,47)),new v(28,new p(28,22),new p(6,23)),new v(30,new p(33,16),new p(4,17))),new r(27,Int32Array.from([6,34,62,90,118]),new v(30,new p(8,122),new p(4,123)),new v(28,new p(22,45),new p(3,46)),new v(30,new p(8,23),new p(26,24)),new v(30,new p(12,15),new p(28,16))),new r(28,Int32Array.from([6,26,50,74,98,122]),new v(30,new p(3,117),new p(10,118)),new v(28,new p(3,45),new p(23,46)),new v(30,new p(4,24),new p(31,25)),new v(30,new p(11,15),new p(31,16))),new r(29,Int32Array.from([6,30,54,78,102,126]),new v(30,new p(7,116),new p(7,117)),new v(28,new p(21,45),new p(7,46)),new v(30,new p(1,23),new p(37,24)),new v(30,new p(19,15),new p(26,16))),new r(30,Int32Array.from([6,26,52,78,104,130]),new v(30,new p(5,115),new p(10,116)),new v(28,new p(19,47),new p(10,48)),new v(30,new p(15,24),new p(25,25)),new v(30,new p(23,15),new p(25,16))),new r(31,Int32Array.from([6,30,56,82,108,134]),new v(30,new p(13,115),new p(3,116)),new v(28,new p(2,46),new p(29,47)),new v(30,new p(42,24),new p(1,25)),new v(30,new p(23,15),new p(28,16))),new r(32,Int32Array.from([6,34,60,86,112,138]),new v(30,new p(17,115)),new v(28,new p(10,46),new p(23,47)),new v(30,new p(10,24),new p(35,25)),new v(30,new p(19,15),new p(35,16))),new r(33,Int32Array.from([6,30,58,86,114,142]),new v(30,new p(17,115),new p(1,116)),new v(28,new p(14,46),new p(21,47)),new v(30,new p(29,24),new p(19,25)),new v(30,new p(11,15),new p(46,16))),new r(34,Int32Array.from([6,34,62,90,118,146]),new v(30,new p(13,115),new p(6,116)),new v(28,new p(14,46),new p(23,47)),new v(30,new p(44,24),new p(7,25)),new v(30,new p(59,16),new p(1,17))),new r(35,Int32Array.from([6,30,54,78,102,126,150]),new v(30,new p(12,121),new p(7,122)),new v(28,new p(12,47),new p(26,48)),new v(30,new p(39,24),new p(14,25)),new v(30,new p(22,15),new p(41,16))),new r(36,Int32Array.from([6,24,50,76,102,128,154]),new v(30,new p(6,121),new p(14,122)),new v(28,new p(6,47),new p(34,48)),new v(30,new p(46,24),new p(10,25)),new v(30,new p(2,15),new p(64,16))),new r(37,Int32Array.from([6,28,54,80,106,132,158]),new v(30,new p(17,122),new p(4,123)),new v(28,new p(29,46),new p(14,47)),new v(30,new p(49,24),new p(10,25)),new v(30,new p(24,15),new p(46,16))),new r(38,Int32Array.from([6,32,58,84,110,136,162]),new v(30,new p(4,122),new p(18,123)),new v(28,new p(13,46),new p(32,47)),new v(30,new p(48,24),new p(14,25)),new v(30,new p(42,15),new p(32,16))),new r(39,Int32Array.from([6,26,54,82,110,138,166]),new v(30,new p(20,117),new p(4,118)),new v(28,new p(40,47),new p(7,48)),new v(30,new p(43,24),new p(22,25)),new v(30,new p(10,15),new p(67,16))),new r(40,Int32Array.from([6,30,58,86,114,142,170]),new v(30,new p(19,118),new p(6,119)),new v(28,new p(18,47),new p(31,48)),new v(30,new p(34,24),new p(34,25)),new v(30,new p(20,15),new p(61,16)))],r}();(function(r){r[r.DATA_MASK_000=0]="DATA_MASK_000",r[r.DATA_MASK_001=1]="DATA_MASK_001",r[r.DATA_MASK_010=2]="DATA_MASK_010",r[r.DATA_MASK_011=3]="DATA_MASK_011",r[r.DATA_MASK_100=4]="DATA_MASK_100",r[r.DATA_MASK_101=5]="DATA_MASK_101",r[r.DATA_MASK_110=6]="DATA_MASK_110",r[r.DATA_MASK_111=7]="DATA_MASK_111"})(J||(J={}));var pt,Ze=function(){function r(t,e){this.value=t,this.isMasked=e}return r.prototype.unmaskBitMatrix=function(t,e){for(var n=0;n<e;n++)for(var o=0;o<e;o++)this.isMasked(n,o)&&t.flip(o,n)},r.values=new Map([[J.DATA_MASK_000,new r(J.DATA_MASK_000,function(t,e){return(t+e&1)==0})],[J.DATA_MASK_001,new r(J.DATA_MASK_001,function(t,e){return(1&t)==0})],[J.DATA_MASK_010,new r(J.DATA_MASK_010,function(t,e){return e%3==0})],[J.DATA_MASK_011,new r(J.DATA_MASK_011,function(t,e){return(t+e)%3==0})],[J.DATA_MASK_100,new r(J.DATA_MASK_100,function(t,e){return(Math.floor(t/2)+Math.floor(e/3)&1)==0})],[J.DATA_MASK_101,new r(J.DATA_MASK_101,function(t,e){return t*e%6==0})],[J.DATA_MASK_110,new r(J.DATA_MASK_110,function(t,e){return t*e%6<3})],[J.DATA_MASK_111,new r(J.DATA_MASK_111,function(t,e){return(t+e+t*e%3&1)==0})]]),r}(),Io=function(){function r(t){var e=t.getHeight();if(e<21||(3&e)!=1)throw new S;this.bitMatrix=t}return r.prototype.readFormatInformation=function(){if(this.parsedFormatInfo!==null&&this.parsedFormatInfo!==void 0)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 n=5;n>=0;n--)t=this.copyBit(8,n,t);var o=this.bitMatrix.getHeight(),i=0,a=o-7;for(n=o-1;n>=a;n--)i=this.copyBit(8,n,i);for(e=o-8;
8e<o;e++)i=this.copyBit(e,8,i);if(this.parsedFormatInfo=pr.decodeFormatInformation(t,i),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new S},r.prototype.readVersion=function(){if(this.parsedVersion!==null&&this.parsedVersion!==void 0)return this.parsedVersion;var t=this.bitMatrix.getHeight(),e=Math.floor((t-17)/4);if(e<=6)return oe.getVersionForNumber(e);for(var n=0,o=t-11,i=5;i>=0;i--)for(var a=t-9;a>=o;a--)n=this.copyBit(a,i,n);var s=oe.decodeVersionInformation(n);if(s!==null&&s.getDimensionForVersion()===t)return this.parsedVersion=s,s;for(n=0,a=5;a>=0;a--)for(i=t-9;i>=o;i--)n=this.copyBit(a,i,n);if((s=oe.decodeVersionInformation(n))!==null&&s.getDimensionForVersion()===t)return this.parsedVersion=s,s;throw new S},r.prototype.copyBit=function(t,e,n){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?n<<1|1:n<<1},r.prototype.readCodewords=function(){var t=this.readFormatInformation(),e=this.readVersion(),n=Ze.values.get(t.getDataMask()),o=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,o);for(var i=e.buildFunctionPattern(),a=!0,s=new Uint8Array(e.getTotalCodewords()),u=0,c=0,f=0,l=o-1;l>0;l-=2){l===6&&l--;for(var h=0;h<o;h++)for(var d=a?o-1-h:h,g=0;g<2;g++)i.get(l-g,d)||(f++,c<<=1,this.bitMatrix.get(l-g,d)&&(c|=1),f===8&&(s[u++]=c,f=0,c=0));a=!a}if(u!==e.getTotalCodewords())throw new S;return s},r.prototype.remask=function(){if(this.parsedFormatInfo!==null){var t=Ze.values[this.parsedFormatInfo.getDataMask()],e=this.bitMatrix.getHeight();t.unmaskBitMatrix(this.bitMatrix,e)}},r.prototype.setMirror=function(t){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=t},r.prototype.mirror=function(){for(var t=this.bitMatrix,e=0,n=t.getWidth();e<n;e++)for(var o=e+1,i=t.getHeight();o<i;o++)t.get(e,o)!==t.get(o,e)&&(t.flip(o,e),t.flip(e,o))},r}(),Ke=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}
8,So=function(){function r(t,e){this.numDataCodewords=t,this.codewords=e}return r.getDataBlocks=function(t,e,n){var o,i,a,s;if(t.length!==e.getTotalCodewords())throw new D;var u=e.getECBlocksForLevel(n),c=0,f=u.getECBlocks();try{for(var l=Ke(f),h=l.next();!h.done;h=l.next())c+=(w=h.value).getCount()}catch(gt){o={error:gt}}finally{try{h&&!h.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}var d=new Array(c),g=0;try{for(var y=Ke(f),_=y.next();!_.done;_=y.next())for(var w=_.value,m=0;m<w.getCount();m++){var C=w.getDataCodewords(),E=u.getECCodewordsPerBlock()+C;d[g++]=new r(C,new Uint8Array(E))}}catch(gt){a={error:gt}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}for(var I=d[0].codewords.length,O=d.length-1;O>=0&&d[O].codewords.length!==I;)O--;O++;var b=I-u.getECCodewordsPerBlock(),P=0;for(m=0;m<b;m++)for(var V=0;V<g;V++)d[V].codewords[m]=t[P++];for(V=O;V<g;V++)d[V].codewords[b]=t[P++];var Y=d[0].codewords.length;for(m=b;m<Y;m++)for(V=0;V<g;V++){var Q=V<O?m:m+1;d[V].codewords[Q]=t[P++]}return d},r.prototype.getNumDataCodewords=function(){return this.numDataCodewords},r.prototype.getCodewords=function(){return this.codewords},r}();(function(r){r[r.TERMINATOR=0]="TERMINATOR",r[r.NUMERIC=1]="NUMERIC",r[r.ALPHANUMERIC=2]="ALPHANUMERIC",r[r.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",r[r.BYTE=4]="BYTE",r[r.ECI=5]="ECI",r[r.KANJI=6]="KANJI",r[r.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",r[r.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",r[r.HANZI=9]="HANZI"})(pt||(pt={}));var k,Jt,ft=function(){function r(t,e,n,o){this.value=t,this.stringValue=e,this.characterCountBitsForVersions=n,this.bits=o,r.FOR_BITS.set(o,this),r.FOR_VALUE.set(t,this)}return r.forBits=function(t){var e=r.FOR_BITS.get(t);if(e===void 0)throw new D;return e},r.prototype.getCharacterCountBits=function(t){var e,n=t.getVersionNumber();return e=n<=9?0:n<=26?1:2,this.characterCountBitsForVersions[e]},r.prototype.getValue=function(){return this.value},r.prototype.getBits=function(){return this.bits},r.prototype.equals=function(t){if(!(t instanceof r))return!1;var e=t;return this.value===e.value},r.prototype.toString=function(){return this.stringValue},r.FOR_BITS=new Map,r.FOR_VALUE=new Map,r.TERMINATOR=new r(pt.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),r.NUMERIC=new r(pt.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),r.ALPHANUMERIC=new r(pt.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),r.STRUCTURED_APPEND=new r(pt.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),r.BYTE=new r(pt.BYTE,"BYTE",Int32Array.from([8,16,16]),4),r.ECI=new r(pt.ECI,"ECI",Int32Array.from([0,0,0]),7),r.KANJI=new r(pt.KANJI,"KANJI",Int32Array.from([8,10,12]),8),r.FNC1_FIRST_POSITION=new r(pt.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),r.FNC1_SECOND_POSITION=new r(pt.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),r.HANZI=new r(pt.HANZI,"HANZI",Int32Array.from([8,10,12]),13),r}(),Oo=function(){function r(){}return r.decode=function(t,e,n,o){var i=new dr(t),a=new U,s=new Array,u=-1,c=-1;try{var f=null,l=!1,h=void 0;do{if(i.available()<4)h=ft.TERMINATOR;else{var d=i.readBits(4);h=ft.forBits(d)}switch(h){case ft.TERMINATOR:break;case ft.FNC1_FIRST_POSITION:case ft.FNC1_SECOND_POSITION:l=!0;break;case ft.STRUCTURED_APPEND:if(i.available()<16)throw new S;u=i.readBits(8),c=i.readBits(8);break;case ft.ECI:var g=r.parseECIValue(i);if((f=st.getCharacterSetECIByValue(g))===null)throw new S;break;case ft.HANZI:var y=i.readBits(4),_=i.readBits(h.getCharacterCountBits(e));y===r.GB2312_SUBSET&&r.decodeHanziSegment(i,a,_);break;default:var w=i.readBits(h.getCharacterCountBits(e));switch(h){case ft.NUMERIC:r.decodeNumericSegment(i,a,w);break;case ft.ALPHANUMERIC:r.decodeAlphanumericSegment(i,a,w,l);break;case ft.BYTE:r.decodeByteSegment(i,a,w,f,s,o);break;case ft.KANJI:r.decodeKanjiSegment(i,a,w);break;default:throw new S}}}while(h!==ft.TERMINATOR)}catch{throw new S}return new le(t,a.toString(),s.length===0?null:s,n===null?null:n.toString(),u,c)},r.decodeHanziSegment=function(t,e,n){if(13*n>t.available())throw new S;for(var o=new Uint8Array(2*n),i=0;n>0;){var a=t.readBits(13),s=a/96<<8&4294967295|a%96;s+=s<959?41377:42657,o[i]=s>>8&255,o[i+1]=255&s,i+=2,n--}try{e.append(Mt.decode(o,$.GB2312))}catch(u){throw new S(u)}},r.decodeKanjiSegment=function(t,e,n){if(13*n>t.available())throw new S;for(var o=new Uint8Array(2*n),i=0;n>0;){var a=t.readBits(13),s=a/192<<8&4294967295|a%192;s+=s<7936?33088:49472,o[i]=s>>8,o[i+1]=s,i+=2,n--}try{e.append(Mt.decode(o,$.SHIFT_JIS))}catch(u){throw new S(u)}},r.decodeByteSegment=function(t,e,n,o,i,a){if(8*n>t.available())throw new S;for(var s,u=new Uint8Array(n),c=0;c<n;c++)u[c]=t.readBits(8);s=o===null?$.guessEncoding(u,a):o.getName();try{e.append(Mt.decode(u,s))}catch(f){throw new S(f)}i.push(u)},r.toAlphaNumericChar=function(t){if(t>=r.ALPHANUMERIC_CHARS.length)throw new S;return r.ALPHANUMERIC_CHARS[t]},r.decodeAlphanumericSegment=function(t,e,n,o){for(var i=e.length();n>1;){if(t.available()<11)throw new S;var a=t.readBits(11);e.append(r.toAlphaNumericChar(Math.floor(a/45))),e.append(r.toAlphaNumericChar(a%45)),n-=2}if(n===1){if(t.available()<6)throw new S;e.append(r.toAlphaNumericChar(t.readBits(6)))}if(o)for(var s=i;s<e.length();s++)e.charAt(s)==="%"&&(s<e.length()-1&&e.charAt(s+1)==="%"?e.deleteCharAt(s+1):e.setCharAt(s,"�"))},r.decodeNumericSegment=function(t,e,n){for(;n>=3;){if(t.available()<10)throw new S;var o=t.readBits(10);if(o>=1e3)throw new S;e.append(r.toAlphaNumericChar(Math.floor(o/100))),e.append(r.toAlphaNumericChar(Math.floor(o/10)%10)),e.append(r.toAlphaNumericChar(o%10)),n-=3}if(n===2){if(t.available()<7)throw new S;var i=t.readBits(7);if(i>=100)throw new S;e.append(r.toAlphaNumericChar(Math.floor(i/10))),e.append(r.toAlphaNumericChar(i%10))}else if(n===1){if(t.available()<4)throw new S;var a=t.readBits(4);if(a>=10)throw new S;e.append(r.toAlphaNumericChar(a))}},r.parseECIValue=function(t){var e=t.readBits(8);if(!(128&e))return 127&e;if((192&e)==128)return(63&e)<<8&4294967295|t.readBits(8);if((224&e)==192)return(31&e)<<16&4294967295|t.readBits(16);throw new S},r.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.GB2312_SUBSET=1,r}(),gr=function(){function r(t){this.mirrored=t}return r.prototype.isMirrored=function(){return this.mirrored},r.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&t!==null&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},r}(),qe=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bo=function(){function r(){this.rsDecoder=new he(Ot.QR_CODE_FIELD_256)}return r.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(mt.parseFromBooleanArray(t),e)},r.prototype.decodeBitMatrix=function(t,e){var n=new Io(t),o=null;try{return this.decodeBitMatrixParser(n,e)}catch(a){o=a}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var i=this.decodeBitMatrixParser(n,e);return i.setOther(new gr(!0)),i}catch(a){throw o!==null?o:a}},r.prototype.decodeBitMatrixParser=function(t,e){var n,o,i,a,s=t.readVersion(),u=t.readFormatInformation().getErrorCorrectionLevel(),c=t.readCodewords(),f=So.getDataBlocks(c,s,u),l=0;try{for(var h=qe(f),d=h.next();!d.done;d=h.next())l+=(m=d.value).getNumDataCodewords()}catch(O){n={error:O}}
8finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}var g=new Uint8Array(l),y=0;try{for(var _=qe(f),w=_.next();!w.done;w=_.next()){var m,C=(m=w.value).getCodewords(),E=m.getNumDataCodewords();this.correctErrors(C,E);for(var I=0;I<E;I++)g[y++]=C[I]}}catch(O){i={error:O}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(i)throw i.error}}return Oo.decode(g,s,u,e)},r.prototype.correctErrors=function(t,e){var n=new Int32Array(t);try{this.rsDecoder.decode(n,t.length-e)}catch{throw new q}for(var o=0;o<e;o++)t[o]=n[o]},r}(),To=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ro=function(r){function t(e,n,o){var i=r.call(this,e,n)||this;return i.estimatedModuleSize=o,i}return To(t,r),t.prototype.aboutEquals=function(e,n,o){if(Math.abs(n-this.getY())<=e&&Math.abs(o-this.getX())<=e){var i=Math.abs(e-this.estimatedModuleSize);return i<=1||i<=this.estimatedModuleSize}return!1},t.prototype.combineEstimate=function(e,n,o){return new t((this.getX()+n)/2,(this.getY()+e)/2,(this.estimatedModuleSize+o)/2)},t}(T),No=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Do=function(){function r(t,e,n,o,i,a,s){this.image=t,this.startX=e,this.startY=n,this.width=o,this.height=i,this.moduleSize=a,this.resultPointCallback=s,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return r.prototype.find=function(){for(var t=this.startX,e=this.height,n=t+this.width,o=this.startY+e/2,i=new Int32Array(3),a=this.image,s=0;s<e;s++){var u=o+(1&s?-Math.floor((s+1)/2):Math.floor((s+1)/2));i[0]=0,i[1]=0,i[2]=0;for(var c=t;c<n&&!a.get(c,u);)c++;for(var f=0;c<n;){if(a.get(c,u))if(f===1)i[1]++;else if(f===2){var l;if(this.foundPatternCross(i)&&(l=this.handlePossibleCenter(i,u,c))!==null)return l;i[0]=i[2],i[1]=1,i[2]=0,f=1}else i[++f]++;else f===1&&f++,i[f]++;c++}if(this.foundPatternCross(i)&&(l=this.handlePossibleCenter(i,u,n))!==null)return l}if(this.possibleCenters.length!==0)return this.possibleCenters[0];throw new A},r.centerFromEnd=function(t,e){return e-t[2]-t[1]/2},r.prototype.foundPatternCross=function(t){for(var e=this.moduleSize,n=e/2,o=0;o<3;o++)if(Math.abs(e-t[o])>=n)return!1;return!0},r.prototype.crossCheckVertical=function(t,e,n,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=t;u>=0&&i.get(e,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&!i.get(e,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=t+1;u<a&&i.get(e,u)&&s[1]<=n;)s[1]++,u++;if(u===a||s[1]>n)return NaN;for(;u<a&&!i.get(e,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)?r.centerFromEnd(s,u):NaN},r.prototype.handlePossibleCenter=function(t,e,n){var o,i,a=t[0]+t[1]+t[2],s=r.centerFromEnd(t,n),u=this.crossCheckVertical(e,s,2*t[1],a);if(!isNaN(u)){var c=(t[0]+t[1]+t[2])/3;try{for(var f=No(this.possibleCenters),l=f.next();!l.done;l=f.next()){var h=l.value;if(h.aboutEquals(c,u,s))return h.combineEstimate(u,s,c)}}catch(g){o={error:g}}finally{try{l&&!l.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}var d=new Ro(s,u,c);this.possibleCenters.push(d),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(d)}return null},r}(),Po=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Mo=function(r){function t(e,n,o,i){var a=r.call(this,e,n)||this;return a.estimatedModuleSize=o,a.count=i,i===void 0&&(a.count=1),a}return Po(t,r),t.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},t.prototype.getCount=function(){return this.count},t.prototype.aboutEquals=function(e,n,o){if(Math.abs(n-this.getY())<=e&&Math.abs(o-this.getX())<=e){var i=Math.abs(e-this.estimatedModuleSize);return i<=1||i<=this.estimatedModuleSize}return!1},t.prototype.combineEstimate=function(e,n,o){var i=this.count+1;return new t((this.count*this.getX()+n)/i,(this.count*this.getY()+e)/i,(this.count*this.estimatedModuleSize+o)/i,i)},t}(T),Bo=function(){function r(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}return r.prototype.getBottomLeft=function(){return this.bottomLeft},r.prototype.getTopLeft=function(){return this.topLeft},r.prototype.getTopRight=function(){return this.topRight},r}(),Ht=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Lo=function(){function r(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}return r.prototype.getImage=function(){return this.image},r.prototype.getPossibleCenters=function(){return this.possibleCenters},r.prototype.find=function(t){var e=t!=null&&t.get(H.TRY_HARDER)!==void 0,n=t!=null&&t.get(H.PURE_BARCODE)!==void 0,o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*r.MAX_MODULES));(s<r.MIN_SKIP||e)&&(s=r.MIN_SKIP);for(var u=!1,c=new Int32Array(5),f=s-1;f<i&&!u;f+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var l=0,h=0;h<a;h++)if(o.get(h,f))(1&l)==1&&l++,c[l]++;else if(1&l)c[l]++;
vendor: 10,057 bytes, line 8
8else if(l===4)if(r.foundPatternCross(c)){if(this.handlePossibleCenter(c,f,h,n)!==!0){c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,l=3;continue}if(s=2,this.hasSkipped===!0)u=this.haveMultiplyConfirmedCenters();else{var d=this.findRowSkip();d>c[2]&&(f+=d-c[2]-s,h=a-1)}l=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,l=3;else c[++l]++;r.foundPatternCross(c)&&this.handlePossibleCenter(c,f,a,n)===!0&&(s=c[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var g=this.selectBestPatterns();return T.orderBestPatterns(g),new Bo(g)},r.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},r.foundPatternCross=function(t){for(var e=0,n=0;n<5;n++){var o=t[n];if(o===0)return!1;e+=o}if(e<7)return!1;var i=e/7,a=i/2;return Math.abs(i-t[0])<a&&Math.abs(i-t[1])<a&&Math.abs(3*i-t[2])<3*a&&Math.abs(i-t[3])<a&&Math.abs(i-t[4])<a},r.prototype.getCrossCheckStateCount=function(){var t=this.crossCheckStateCount;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t},r.prototype.crossCheckDiagonal=function(t,e,n,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;t>=a&&e>=a&&s.get(e-a,t-a);)i[2]++,a++;if(t<a||e<a)return!1;for(;t>=a&&e>=a&&!s.get(e-a,t-a)&&i[1]<=n;)i[1]++,a++;if(t<a||e<a||i[1]>n)return!1;for(;t>=a&&e>=a&&s.get(e-a,t-a)&&i[0]<=n;)i[0]++,a++;if(i[0]>n)return!1;var u=s.getHeight(),c=s.getWidth();for(a=1;t+a<u&&e+a<c&&s.get(e+a,t+a);)i[2]++,a++;if(t+a>=u||e+a>=c)return!1;for(;t+a<u&&e+a<c&&!s.get(e+a,t+a)&&i[3]<n;)i[3]++,a++;if(t+a>=u||e+a>=c||i[3]>=n)return!1;for(;t+a<u&&e+a<c&&s.get(e+a,t+a)&&i[4]<n;)i[4]++,a++;if(i[4]>=n)return!1;var f=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(f-o)<2*o&&r.foundPatternCross(i)},r.prototype.crossCheckVertical=function(t,e,n,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=t;u>=0&&i.get(e,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(e,u)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(e,u)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=t+1;u<a&&i.get(e,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(e,u)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(e,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:r.foundPatternCross(s)?r.centerFromEnd(s,u):NaN},r.prototype.crossCheckHorizontal=function(t,e,n,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=t;u>=0&&i.get(u,e);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,e)&&s[1]<=n;)s[1]++,u--;if(u<0||s[1]>n)return NaN;for(;u>=0&&i.get(u,e)&&s[0]<=n;)s[0]++,u--;if(s[0]>n)return NaN;for(u=t+1;u<a&&i.get(u,e);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,e)&&s[3]<n;)s[3]++,u++;if(u===a||s[3]>=n)return NaN;for(;u<a&&i.get(u,e)&&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:r.foundPatternCross(s)?r.centerFromEnd(s,u):NaN},r.prototype.handlePossibleCenter=function(t,e,n,o){var i=t[0]+t[1]+t[2]+t[3]+t[4],a=r.centerFromEnd(t,n),s=this.crossCheckVertical(e,Math.floor(a),t[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),t[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),t[2],i)))){for(var u=i/7,c=!1,f=this.possibleCenters,l=0,h=f.length;l<h;l++){var d=f[l];if(d.aboutEquals(u,s,a)){f[l]=d.combineEstimate(s,a,u),c=!0;break}}if(!c){var g=new Mo(a,s,u);f.push(g),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(g)}return!0}return!1},r.prototype.findRowSkip=function(){var t,e;if(this.possibleCenters.length<=1)return 0;var n=null;try{for(var o=Ht(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=r.CENTER_QUORUM){if(n!=null)return this.hasSkipped=!0,Math.floor((Math.abs(n.getX()-a.getX())-Math.abs(n.getY()-a.getY()))/2);n=a}}}catch(s){t={error:s}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return 0},r.prototype.haveMultiplyConfirmedCenters=function(){var t,e,n,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=Ht(this.possibleCenters),c=u.next();!c.done;c=u.next())(g=c.value).getCount()>=r.CENTER_QUORUM&&(i++,a+=g.getEstimatedModuleSize())}catch(y){t={error:y}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}if(i<3)return!1;var f=a/s,l=0;try{for(var h=Ht(this.possibleCenters),d=h.next();!d.done;d=h.next()){var g=d.value;l+=Math.abs(g.getEstimatedModuleSize()-f)}}catch(y){n={error:y}}finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}return l<=.05*a},r.prototype.selectBestPatterns=function(){var t,e,n,o,i=this.possibleCenters.length;if(i<3)throw new A;var a,s=this.possibleCenters;if(i>3){var u=0,c=0;try{for(var f=Ht(this.possibleCenters),l=f.next();!l.done;l=f.next()){var h=l.value.getEstimatedModuleSize();u+=h,c+=h*h}}catch(C){t={error:C}}finally{try{l&&!l.done&&(e=f.return)&&e.call(f)}finally{if(t)throw t.error}}a=u/i;var d=Math.sqrt(c/i-a*a);s.sort(function(C,E){var I=Math.abs(E.getEstimatedModuleSize()-a),O=Math.abs(C.getEstimatedModuleSize()-a);return I<O?-1:I>O?1:0});for(var g=Math.max(.2*a,d),y=0;y<s.length&&s.length>3;y++){var _=s[y];Math.abs(_.getEstimatedModuleSize()-a)>g&&(s.splice(y,1),y--)}}if(s.length>3){u=0;try{for(var w=Ht(s),m=w.next();!m.done;m=w.next())u+=m.value.getEstimatedModuleSize()}catch(C){n={error:C}}finally{try{m&&!m.done&&(o=w.return)&&o.call(w)}finally{if(n)throw n.error}}a=u/s.length,s.sort(function(C,E){if(E.getCount()===C.getCount()){var I=Math.abs(E.getEstimatedModuleSize()-a),O=Math.abs(C.getEstimatedModuleSize()-a);return I<O?1:I>O?-1:0}return E.getCount()-C.getCount()}),s.splice(3)}return[s[0],s[1],s[2]]},r.CENTER_QUORUM=2,r.MIN_SKIP=3,r.MAX_MODULES=57,r}(),Fo=function(){function r(t){this.image=t}return r.prototype.getImage=function(){return this.image},r.prototype.getResultPointCallback=function(){return this.resultPointCallback},r.prototype.detect=function(t){this.resultPointCallback=t==null?null:t.get(H.NEED_RESULT_POINT_CALLBACK);var e=new Lo(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)},r.prototype.processFinderPatternInfo=function(t){var e=t.getTopLeft(),n=t.getTopRight(),o=t.getBottomLeft(),i=this.calculateModuleSize(e,n,o);if(i<1)throw new A("No pattern found in proccess finder.");var a=r.computeDimension(e,n,o,i),s=oe.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var f=n.getX()-e.getX()+o.getX(),l=n.getY()-e.getY()+o.getY(),h=1-3/u,d=Math.floor(e.getX()+h*(f-e.getX())),g=Math.floor(e.getY()+h*(l-e.getY())),y=4;y<=16;y<<=1)try{c=this.findAlignmentInRegion(i,d,g,y);break}catch(m){if(!(m instanceof A))throw m}var _=r.createTransform(e,n,o,c,a),w=r.sampleGrid(this.image,_,a);return new Te(w,c===null?[o,e,n]:[o,e,n,c])},r.createTransform=function(t,e,n,o,i){var a,s,u,c,f=i-3.5;return o!==null?(a=o.getX(),s=o.getY(),c=u=f-3):(a=e.getX()-t.getX()+n.getX(),s=e.getY()-t.getY()+n.getY(),u=f,c=f),cr.quadrilateralToQuadrilateral(3.5,3.5,f,3.5,u,c,3.5,f,t.getX(),t.getY(),e.getX(),e.getY(),a,s,n.getX(),n.getY())},r.sampleGrid=function(t,e,n){return Re.getInstance().sampleGridWithTransform(t,n,n,e)},r.computeDimension=function(t,e,n,o){var i=B.round(T.distance(t,e)/o),a=B.round(T.distance(t,n)/o),s=Math.floor((i+a)/2)+7;switch(3&s){case 0:s++;break;case 2:s--;break;case 3:throw new A("Dimensions could be not found.")}return s},r.prototype.calculateModuleSize=function(t,e,n){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,n))/2},r.prototype.calculateModuleSizeOneWay=function(t,e){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),o=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(n)?o/7:isNaN(o)?n/7:(n+o)/14},r.prototype.sizeOfBlackWhiteBlackRunBothWays=function(t,e,n,o){var i=this.sizeOfBlackWhiteBlackRun(t,e,n,o),a=1,s=t-(n-t);s<0?(a=t/(t-s),s=0):s>=this.image.getWidth()&&(a=(this.image.getWidth()-1-t)/(s-t),s=this.image.getWidth()-1);var u=Math.floor(e-(o-e)*a);return a=1,u<0?(a=e/(e-u),u=0):u>=this.image.getHeight()&&(a=(this.image.getHeight()-1-e)/(u-e),u=this.image.getHeight()-1),s=Math.floor(t+(s-t)*a),(i+=this.sizeOfBlackWhiteBlackRun(t,e,s,u))-1},r.prototype.sizeOfBlackWhiteBlackRun=function(t,e,n,o){var i=Math.abs(o-e)>Math.abs(n-t);if(i){var a=t;t=e,e=a,a=n,n=o,o=a}for(var s=Math.abs(n-t),u=Math.abs(o-e),c=-s/2,f=t<n?1:-1,l=e<o?1:-1,h=0,d=n+f,g=t,y=e;g!==d;g+=f){var _=i?y:g,w=i?g:y;if(h===1===this.image.get(_,w)){if(h===2)return B.distance(g,y,t,e);h++}if((c+=u)>0){if(y===o)break;y+=l,c-=s}}return h===2?B.distance(n+f,o,t,e):NaN},r.prototype.findAlignmentInRegion=function(t,e,n,o){var i=Math.floor(o*t),a=Math.max(0,e-i),s=Math.min(this.image.getWidth()-1,e+i);if(s-a<3*t)throw new A("Alignment top exceeds estimated module size.");var u=Math.max(0,n-i),c=Math.min(this.image.getHeight()-1,n+i);if(c-u<3*t)throw new A("Alignment bottom exceeds estimated module size.");return new Do(this.image,a,u,s-a,c-u,t,this.resultPointCallback).find()},r}(),ue=function(){function r(){this.decoder=new bo}return r.prototype.getDecoder=function(){return this.decoder},r.prototype.decode=function(t,e){var n,o;if(e!=null&&e.get(H.PURE_BARCODE)!==void 0){var i=r.extractPureBits(t.getBlackMatrix());n=this.decoder.decodeBitMatrix(i,e),o=r.NO_POINTS}else{var a=new Fo(t.getBlackMatrix()).detect(e);n=this.decoder.decodeBitMatrix(a.getBits(),e),o=a.getPoints()}n.getOther()instanceof gr&&n.getOther().applyMirroredCorrection(o);var s=new ct(n.getText(),n.getRawBytes(),void 0,o,R.QR_CODE,void 0),u=n.getByteSegments();u!==null&&s.putMetadata(rt.BYTE_SEGMENTS,u);var c=n.getECLevel();return c!==null&&s.putMetadata(rt.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(rt.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(rt.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())
8),s},r.prototype.reset=function(){},r.extractPureBits=function(t){var e=t.getTopLeftOnBit(),n=t.getBottomRightOnBit();if(e===null||n===null)throw new A;var o=this.moduleSize(e,t),i=e[1],a=n[1],s=e[0],u=n[0];if(s>=u||i>=a)throw new A;if(a-i!=u-s&&(u=s+(a-i))>=t.getWidth())throw new A;var c=Math.round((u-s+1)/o),f=Math.round((a-i+1)/o);if(c<=0||f<=0)throw new A;if(f!==c)throw new A;var l=Math.floor(o/2);i+=l;var h=(s+=l)+Math.floor((c-1)*o)-u;if(h>0){if(h>l)throw new A;s-=h}var d=i+Math.floor((f-1)*o)-a;if(d>0){if(d>l)throw new A;i-=d}for(var g=new mt(c,f),y=0;y<f;y++)for(var _=i+Math.floor(y*o),w=0;w<c;w++)t.get(s+Math.floor(w*o),_)&&g.set(w,y);return g},r.moduleSize=function(t,e){for(var n=e.getHeight(),o=e.getWidth(),i=t[0],a=t[1],s=!0,u=0;i<o&&a<n;){if(s!==e.get(i,a)){if(++u==5)break;s=!s}i++,a++}if(i===o||a===n)throw new A;return(i-t[0])/7},r.NO_POINTS=new Array,r}(),xo=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},M=function(){function r(){}return r.prototype.PDF417Common=function(){},r.getBitCountSum=function(t){return B.sum(t)},r.toIntArray=function(t){var e,n;if(t==null||!t.length)return r.EMPTY_INT_ARRAY;var o=new Int32Array(t.length),i=0;try{for(var a=xo(t),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return o},r.getCodeword=function(t){var e=ht.binarySearch(r.SYMBOL_TABLE,262143&t);return e<0?-1:(r.CODEWORD_TABLE[e]-1)%r.NUMBER_OF_CODEWORDS},r.NUMBER_OF_CODEWORDS=929,r.MAX_CODEWORDS_IN_BARCODE=r.NUMBER_OF_CODEWORDS-1,r.MIN_ROWS_IN_BARCODE=3,r.MAX_ROWS_IN_BARCODE=90,r.MODULES_IN_CODEWORD=17,r.MODULES_IN_STOP_PATTERN=18,r.BARS_IN_MODULE=8,r.EMPTY_INT_ARRAY=new Int32Array([]),r
vendor: 18,272 bytes, line 8
8.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]),
8r
vendor: 12,861 bytes, line 8
8.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]),
8r}(),ko=function(){function r(t,e){this.bits=t,this.points=e}return r.prototype.getBits=function(){return this.bits},r.prototype.getPoints=function(){return this.points},r}(),Vo=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Uo=function(){function r(){}return r.detectMultiple=function(t,e,n){var o=t.getBlackMatrix(),i=r.detect(n,o);return i.length||((o=o.clone()).rotate180(),i=r.detect(n,o)),new ko(o,i)},r.detect=function(t,e){for(var n,o,i=new Array,a=0,s=0,u=!1;a<e.getHeight();){var c=r.findVertices(e,a,s);if(c[0]!=null||c[3]!=null){if(u=!0,i.push(c),!t)break;c[2]!=null?(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 f=(n=void 0,Vo(i)),l=f.next();!l.done;l=f.next()){var h=l.value;h[1]!=null&&(a=Math.trunc(Math.max(a,h[1].getY()))),h[3]!=null&&(a=Math.max(a,Math.trunc(h[3].getY())))}}catch(d){n={error:d}}finally{try{l&&!l.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}a+=r.ROW_STEP}}return i},r.findVertices=function(t,e,n){var o=t.getHeight(),i=t.getWidth(),a=new Array(8);return r.copyToResult(a,r.findRowsWithPattern(t,o,i,e,n,r.START_PATTERN),r.INDEXES_START_PATTERN),a[4]!=null&&(n=Math.trunc(a[4].getX()),e=Math.trunc(a[4].getY())),r.copyToResult(a,r.findRowsWithPattern(t,o,i,e,n,r.STOP_PATTERN),r.INDEXES_STOP_PATTERN),a},r.copyToResult=function(t,e,n){for(var o=0;o<n.length;o++)t[n[o]]=e[o]},r.findRowsWithPattern=function(t,e,n,o,i,a){for(var s=new Array(4),u=!1,c=new Int32Array(a.length);o<e;o+=r.ROW_STEP)if((d=r.findGuardPattern(t,i,o,n,!1,a,c))!=null){for(;o>0;){if((h=r.findGuardPattern(t,i,--o,n,!1,a,c))==null){o++;break}d=h}s[0]=new T(d[0],o),s[1]=new T(d[1],o),u=!0;break}var f=o+1;if(u){for(var l=0,h=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);f<e;f++){var d;if((d=r.findGuardPattern(t,h[0],f,n,!1,a,c))!=null&&Math.abs(h[0]-d[0])<r.MAX_PATTERN_DRIFT&&Math.abs(h[1]-d[1])<r.MAX_PATTERN_DRIFT)h=d,l=0;else{if(l>r.SKIPPED_ROW_COUNT_MAX)break;l++}}f-=l+1,s[2]=new T(h[0],f),s[3]=new T(h[1],f)}return f-o<r.BARCODE_MIN_HEIGHT&&ht.fill(s,null),s},r.findGuardPattern=function(t,e,n,o,i,a,s){ht.fillWithin(s,0,s.length,0);for(var u=e,c=0;t.get(u,n)&&u>0&&c++<r.MAX_PIXEL_DRIFT;)u--;for(var f=u,l=0,h=a.length,d=i;f<o;f++)if(t.get(f,n)!==d)s[l]++;else{if(l===h-1){if(r.patternMatchVariance(s,a,r.MAX_INDIVIDUAL_VARIANCE)<r.MAX_AVG_VARIANCE)return new Int32Array([u,f]);u+=s[0]+s[1],G.arraycopy(s,2,s,0,l-1),s[l-1]=0,s[l]=0,l--}else l++;s[l]=1,d=!d}return l===h-1&&r.patternMatchVariance(s,a,r.MAX_INDIVIDUAL_VARIANCE)<r.MAX_AVG_VARIANCE?new Int32Array([u,f-1]):null},r.patternMatchVariance=function(t,e,n){for(var o=t.length,i=0,a=0,s=0;s<o;s++)i+=t[s],a+=e[s];if(i<a)return 1/0;var u=i/a;n*=u;for(var c=0,f=0;f<o;f++){var l=t[f],h=e[f]*u,d=l>h?l-h:h-l;if(d>n)return 1/0;c+=d}return c/i},r.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),r.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),r.MAX_AVG_VARIANCE=.42,r.MAX_INDIVIDUAL_VARIANCE=.8,r.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),r.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),r.MAX_PIXEL_DRIFT=3,r.MAX_PATTERN_DRIFT=5,r.SKIPPED_ROW_COUNT_MAX=25,r.ROW_STEP=5,r.BARCODE_MIN_HEIGHT=10,r}(),Ho=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Pt=function(){function r(t,e){if(e.length===0)throw new D;this.field=t;var n=e.length;if(n>1&&e[0]===0){for(var o=1;o<n&&e[o]===0;)o++;o===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-o),G.arraycopy(e,o,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}return r.prototype.getCoefficients=function(){return this.coefficients},r.prototype.getDegree=function(){return this.coefficients.length-1},r.prototype.isZero=function(){return this.coefficients[0]===0},r.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},r.prototype.evaluateAt=function(t){var e,n;if(t===0)return this.getCoefficient(0);if(t===1){var o=0;try{for(var i=Ho(this.coefficients),a=i.next();!a.done;a=i.next()){var s=a.value;o=this.field.add(o,s)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o}for(var u=this.coefficients[0],c=this.coefficients.length,f=1;f<c;f++)u=this.field.add(this.field.multiply(t,u),this.coefficients[f]);return u},r.prototype.add=function(t){if(!this.field.equals(t.field))throw new D("ModulusPolys do n
8ot have same ModulusGF field");if(this.isZero())return t;if(t.isZero())return this;var e=this.coefficients,n=t.coefficients;if(e.length>n.length){var o=e;e=n,n=o}var i=new Int32Array(n.length),a=n.length-e.length;G.arraycopy(n,0,i,0,a);for(var s=a;s<n.length;s++)i[s]=this.field.add(e[s-a],n[s]);return new r(this.field,i)},r.prototype.subtract=function(t){if(!this.field.equals(t.field))throw new D("ModulusPolys do not have same ModulusGF field");return t.isZero()?this:this.add(t.negative())},r.prototype.multiply=function(t){return t instanceof r?this.multiplyOther(t):this.multiplyScalar(t)},r.prototype.multiplyOther=function(t){if(!this.field.equals(t.field))throw new D("ModulusPolys do n
8ot have same ModulusGF field");if(this.isZero()||t.isZero())return new r(this.field,new Int32Array([0]));for(var e=this.coefficients,n=e.length,o=t.coefficients,i=o.length,a=new Int32Array(n+i-1),s=0;s<n;s++)for(var u=e[s],c=0;c<i;c++)a[s+c]=this.field.add(a[s+c],this.field.multiply(u,o[c]));return new r(this.field,a)},r.prototype.negative=function(){for(var t=this.coefficients.length,e=new Int32Array(t),n=0;n<t;n++)e[n]=this.field.subtract(0,this.coefficients[n]);return new r(this.field,e)},r.prototype.multiplyScalar=function(t){if(t===0)return new r(this.field,new Int32Array([0]));if(t===1)return this;for(var e=this.coefficients.length,n=new Int32Array(e),o=0;o<e;o++)n[o]=this.field.multiply(this.coefficients[o],t);return new r(this.field,n)},r.prototype.multiplyByMonomial=function(t,e){if(t<0)throw new D;if(e===0)return new r(this.field,new Int32Array([0]));for(var n=this.coefficients.length,o=new Int32Array(n+t),i=0;i<n;i++)o[i]=this.field.multiply(this.coefficients[i],e);return new r(this.field,o)},r.prototype.toString=function(){for(var t=new U,e=this.getDegree();e>=0;e--){var n=this.getCoefficient(e);n!==0&&(n<0?(t.append(" - "),n=-n):t.length()>0&&t.append(" + "),e!==0&&n===1||t.append(n),e!==0&&(e===1?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()},r}(),Go=function(){function r(){}return r.prototype.add=function(t,e){return(t+e)%this.modulus},r.prototype.subtract=function(t,e){return(this.modulus+t-e)%this.modulus},r.prototype.exp=function(t){return this.expTable[t]},r.prototype.log=function(t){if(t===0)throw new D;return this.logTable[t]},r.prototype.inverse=function(t){if(t===0)throw new ur;return this.expTable[this.modulus-this.logTable[t]-1]},r.prototype.multiply=function(t,e){return t===0||e===0?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]},r.prototype.getSize=function(){return this.modulus},r.prototype.equals=function(t){return t===this},r}(),Xo=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),jo=function(r){function t(e,n){var o=r.call(this)||this;o.modulus=e,o.expTable=new Int32Array(e),o.logTable=new Int32Array(e);for(var i=1,a=0;a<e;a++)o.expTable[a]=i,i=i*n%e;for(a=0;a<e-1;a++)o.logTable[o.expTable[a]]=a;return o.zero=new Pt(o,new Int32Array([0])),o.one=new Pt(o,new Int32Array([1])),o}return Xo(t,r),t.prototype.getZero=function(){return this.zero},t.prototype.getOne=function(){return this.one},t.prototype.buildMonomial=function(e,n){if(e<0)throw new D;if(n===0)return this.zero;var o=new Int32Array(e+1);return o[0]=n,new Pt(this,o)},t.PDF417_GF=new t(M.NUMBER_OF_CODEWORDS,3),t}(Go),Wo=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zo=function(){function r(){this.field=jo.PDF417_GF}return r.prototype.decode=function(t,e,n){for(var o,i,a=new Pt(this.field,t),s=new Int32Array(e),u=!1,c=e;c>0;c--){var f=a.evaluateAt(this.field.exp(c));s[e-c]=f,f!==0&&(u=!0)}if(!u)return 0;var l=this.field.getOne();if(n!=null)try{for(var h=Wo(n),d=h.next();!d.done;d=h.next()){var g=d.value,y=this.field.exp(t.length-1-g),_=new Pt(this.field,new Int32Array([this.field.subtract(0,y),1]));l=l.multiply(_)}}catch(P){o={error:P}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}var w=new Pt(this.field,s),m=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),w,e),C=m[0],E=m[1],I=this.findErrorLocations(C),O=this.findErrorMagnitudes(E,C,I);for(c=0;c<I.length;c++){var b=t.length-1-this.field.log(I[c]);if(b<0)throw q.getChecksumInstance();t[b]=this.field.subtract(t[b],O[c])}return I.length},r.prototype.runEuclideanAlgorithm=function(t,e,n){if(t.getDegree()<e.getDegree()){var o=t;t=e,e=o}for(var i=t,a=e,s=this.field.getZero(),u=this.field.getOne();a.getDegree()>=Math.round(n/2);){var c=i,f=s;if(s=u,(i=a).isZero())throw q.getChecksumInstance();a=c;for(var l=this.field.getZero(),h=i.getCoefficient(i.getDegree()),d=this.field.inverse(h);a.getDegree()>=i.getDegree()&&!a.isZero();){var g=a.getDegree()-i.getDegree(),y=this.field.multiply(a.getCoefficient(a.getDegree()),d);l=l.add(this.field.buildMonomial(g,y)),a=a.subtract(i.multiplyByMonomial(g,y))}u=l.multiply(s).subtract(f).negative()}var _=u.getCoefficient(0);if(_===0)throw q.getChecksumInstance();var w=this.field.inverse(_);return[u.multiply(w),a.multiply(w)]},r.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),n=new Int32Array(e),o=0,i=1;i<this.field.getSize()&&o<e;i++)t.evaluateAt(i)===0&&(n[o]=this.field.inverse(i),o++);if(o!==e)throw q.getChecksumInstance();return n},r.prototype.findErrorMagnitudes=function(t,e,n){for(var o=e.getDegree(),i=new Int32Array(o),a=1;a<=o;a++)i[o-a]=this.field.multiply(a,e.getCoefficient(a));var s=new Pt(this.field,i),u=n.length,c=new Int32Array(u);for(a=0;a<u;a++){var f=this.field.inverse(n[a]),l=this.field.subtract(0,t.evaluateAt(f)),h=this.field.inverse(s.evaluateAt(f));c[a]=this.field.multiply(l,h)}return c},r}(),Ie=function(){function r(t,e,n,o,i){t instanceof r?this.constructor_2(t):this.constructor_1(t,e,n,o,i)}return r.prototype.constructor_1=function(t,e,n,o,i){var a=e==null||n==null,s=o==null||i==null;if(a&&s)throw new A;
8a?(e=new T(0,o.getY()),n=new T(0,i.getY())):s&&(o=new T(t.getWidth()-1,e.getY()),i=new T(t.getWidth()-1,n.getY())),this.image=t,this.topLeft=e,this.bottomLeft=n,this.topRight=o,this.bottomRight=i,this.minX=Math.trunc(Math.min(e.getX(),n.getX())),this.maxX=Math.trunc(Math.max(o.getX(),i.getX())),this.minY=Math.trunc(Math.min(e.getY(),o.getY())),this.maxY=Math.trunc(Math.max(n.getY(),i.getY()))},r.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()},r.merge=function(t,e){return t==null?e:e==null?t:new r(t.image,t.topLeft,t.bottomLeft,e.topRight,e.bottomRight)},r.prototype.addMissingRows=function(t,e,n){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(t>0){var u=n?this.topLeft:this.topRight,c=Math.trunc(u.getY()-t);c<0&&(c=0);var f=new T(u.getX(),c);n?o=f:a=f}if(e>0){var l=n?this.bottomLeft:this.bottomRight,h=Math.trunc(l.getY()+e);h>=this.image.getHeight()&&(h=this.image.getHeight()-1);var d=new T(l.getX(),h);n?i=d:s=d}return new r(this.image,o,i,a,s)},r.prototype.getMinX=function(){return this.minX},r.prototype.getMaxX=function(){return this.maxX},r.prototype.getMinY=function(){return this.minY},r.prototype.getMaxY=function(){return this.maxY},r.prototype.getTopLeft=function(){return this.topLeft},r.prototype.getTopRight=function(){return this.topRight},r.prototype.getBottomLeft=function(){return this.bottomLeft},r.prototype.getBottomRight=function(){return this.bottomRight},r}(),Yo=function(){function r(t,e,n,o){this.columnCount=t,this.errorCorrectionLevel=o,this.rowCountUpperPart=e,this.rowCountLowerPart=n,this.rowCount=e+n}return r.prototype.getColumnCount=function(){return this.columnCount},r.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},r.prototype.getRowCount=function(){return this.rowCount},r.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},r.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},r}(),De=function(){function r(){this.buffer=""}return r.form=function(t,e){var n=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function(o,i,a,s,u,c){if(o==="%%")return"%";if(e[++n]!==void 0){o=s?parseInt(s.substr(1)):void 0;var f,l=u?parseInt(u.substr(1)):void 0;switch(c){case"s":f=e[n];break;case"c":f=e[n][0];break;case"f":f=parseFloat(e[n]).toFixed(o);break;case"p":f=parseFloat(e[n]).toPrecision(o);break;case"e":f=parseFloat(e[n]).toExponential(o);break;case"x":f=parseInt(e[n]).toString(l||16);break;case"d":f=parseFloat(parseInt(e[n],l||10).toPrecision(o)).toFixed(0)}f=typeof f=="object"?JSON.stringify(f):(+f).toString(l);for(var h=parseInt(a),d=a&&a[0]+""=="0"?"0":" ";f.length<h;)f=i!==void 0?f+d:d+f;return f}})},r.prototype.format=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.buffer+=r.form(t,e)},r.prototype.toString=function(){return this.buffer},r}(),Zo=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},yr=function(){function r(t){this.boundingBox=new Ie(t),this.codewords=new Array(t.getMaxY()-t.getMinY()+1)}return r.prototype.getCodewordNearby=function(t){var e=this.getCodeword(t);if(e!=null)return e;for(var n=1;n<r.MAX_NEARBY_DISTANCE;n++){var o=this.imageRowToCodewordIndex(t)-n;if(o>=0&&(e=this.codewords[o])!=null||(o=this.imageRowToCodewordIndex(t)+n)<this.codewords.length&&(e=this.codewords[o])!=null)return e}return null},r.prototype.imageRowToCodewordIndex=function(t){return t-this.boundingBox.getMinY()},r.prototype.setCodeword=function(t,e){this.codewords[this.imageRowToCodewordIndex(t)]=e},r.prototype.getCodeword=function(t){return this.codewords[this.imageRowToCodewordIndex(t)]},r.prototype.getBoundingBox=function(){return this.boundingBox}
8,r.prototype.getCodewords=function(){return this.codewords},r.prototype.toString=function(){var t,e,n=new De,o=0;try{for(var i=Zo(this.codewords),a=i.next();!a.done;a=i.next()){var s=a.value;s!=null?n.format("%3d: %3d|%3d%n",o++,s.getRowNumber(),s.getValue()):n.format("%3d:    |   %n",o++)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return n.toString()},r.MAX_NEARBY_DISTANCE=5,r}(),Ko=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qo=function(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var n,o,i=e.call(r),a=[];try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a},jt=function(){function r(){this.values=new Map}return r.prototype.setValue=function(t){t=Math.trunc(t);var e=this.values.get(t);e==null&&(e=0),e++,this.values.set(t,e)},r.prototype.getValue=function(){var t,e,n=-1,o=new Array,i=function(c,f){var l=function(){return c},h=function(){return f};h()>n?(n=h(),(o=[]).push(l())):h()===n&&o.push(l())};try{for(var a=Ko(this.values.entries()),s=a.next();!s.done;s=a.next()){var u=qo(s.value,2);i(u[0],u[1])}}catch(c){t={error:c}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return M.toIntArray(o)},r.prototype.getConfidence=function(t){return this.values.get(t)},r}(),Qo=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),we=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Qe=function(r){function t(e,n){var o=r.call(this,e)||this;return o._isLeft=n,o}return Qo(t,r),t.prototype.setRowNumbers=function(){var e,n;try{for(var o=we(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;a!=null&&a.setRowNumberAsRowIndicatorColumn()}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},t.prototype.adjustCompleteIndicatorColumnRowNumbers=function(e){var n=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(n,e);for(var o=this.getBoundingBox(),i=this._isLeft?o.getTopLeft():o.getTopRight(),a=this._isLeft?o.getBottomLeft():o.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(i.getY())),u=this.imageRowToCodewordIndex(Math.trunc(a.getY())),c=-1,f=1,l=0,h=s;h<u;h++)if(n[h]!=null){var d=n[h],g=d.getRowNumber()-c;if(g===0)l++;else if(g===1)f=Math.max(f,l),l=1,c=d.getRowNumber();else if(g<0||d.getRowNumber()>=e.getRowCount()||g>h)n[h]=null;else{for(var y=void 0,_=(y=f>2?(f-2)*g:g)>=h,w=1;w<=y&&!_;w++)_=n[h-w]!=null;_?n[h]=null:(c=d.getRowNumber(),l=1)}}},t.prototype.getRowHeights=function(){var e,n,o=this.getBarcodeMetadata();if(o==null)return null;this.adjustIncompleteIndicatorColumnRowNumbers(o);var i=new Int32Array(o.getRowCount());try{for(var a=we(this.getCodewords()),s=a.next();!s.done;s=a.next()){var u=s.value;if(u!=null){var c=u.getRowNumber();if(c>=i.length)continue;i[c]++}}}catch(f){e={error:f}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return i},t.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(e){for(var n=this.getBoundingBox(),o=this._isLeft?n.getTopLeft():n.getTopRight(),i=this._isLeft?n.getBottomLeft():n.getBottomRight(),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=this.imageRowToCodewordIndex(Math.trunc(i.getY())),u=this.getCodewords(),c=-1,f=a;f<s;f++)if(u[f]!=null){var l=u[f];
8l.setRowNumberAsRowIndicatorColumn();var h=l.getRowNumber()-c;h===0||(h===1?c=l.getRowNumber():l.getRowNumber()>=e.getRowCount()?u[f]=null:c=l.getRowNumber())}},t.prototype.getBarcodeMetadata=function(){var e,n,o=this.getCodewords(),i=new jt,a=new jt,s=new jt,u=new jt;try{for(var c=we(o),f=c.next();!f.done;f=c.next()){var l=f.value;if(l!=null){l.setRowNumberAsRowIndicatorColumn();var h=l.getValue()%30,d=l.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:a.setValue(3*h+1);break;case 1:u.setValue(h/3),s.setValue(h%3);break;case 2:i.setValue(h+1)}}}}catch(y){e={error:y}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}if(i.getValue().length===0||a.getValue().length===0||s.getValue().length===0||u.getValue().length===0||i.getValue()[0]<1||a.getValue()[0]+s.getValue()[0]<M.MIN_ROWS_IN_BARCODE||a.getValue()[0]+s.getValue()[0]>M.MAX_ROWS_IN_BARCODE)return null;var g=new Yo(i.getValue()[0],a.getValue()[0],s.getValue()[0],u.getValue()[0]);return this.removeIncorrectCodewords(o,g),g},t.prototype.removeIncorrectCodewords=function(e,n){for(var o=0;o<e.length;o++){var i=e[o];if(e[o]!=null){var a=i.getValue()%30,s=i.getRowNumber();if(s>n.getRowCount())e[o]=null;else switch(this._isLeft||(s+=2),s%3){case 0:3*a+1!==n.getRowCountUpperPart()&&(e[o]=null);break;case 1:Math.trunc(a/3)===n.getErrorCorrectionLevel()&&a%3===n.getRowCountLowerPart()||(e[o]=null);break;case 2:a+1!==n.getColumnCount()&&(e[o]=null)}}}},t.prototype.isLeft=function(){return this._isLeft},t.prototype.toString=function(){return"IsLeft: "+this._isLeft+`
9`+r.prototype.toString.call(this)},t}(yr),Jo=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$o=function(){function r(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 r.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var t,e=M.MAX_CODEWORDS_IN_BARCODE;do t=e,e=this.adjustRowNumbersAndGetCount();while(e>0&&e<t);return this.detectionResultColumns},r.prototype.adjustIndicatorColumnRowNumbers=function(t){t!=null&&t.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},r.prototype.adjustRowNumbersAndGetCount=function(){var t=this.adjustRowNumbersByRow();if(t===0)return 0;for(var e=1;e<this.barcodeColumnCount+1;e++)for(var n=this.detectionResultColumns[e].getCodewords(),o=0;o<n.length;o++)n[o]!=null&&(n[o].hasValidRowNumber()||this.adjustRowNumbers(e,o,n));return t},r.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},r.prototype.adjustRowNumbersFromBothRI=function(){if(this.detectionResultColumns[0]!=null&&this.detectionResultColumns[this.barcodeColumnCount+1]!=null){for(var t=this.detectionResultColumns[0].getCodewords(),e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<t.length;n++)if(t[n]!=null&&e[n]!=null&&t[n].getRowNumber()===e[n].getRowNumber())for(var o=1;o<=this.barcodeColumnCount;o++){var i=this.detectionResultColumns[o].getCodewords()[n];i!=null&&(i.setRowNumber(t[n].getRowNumber()),i.hasValidRowNumber()||(this.detectionResultColumns[o].getCodewords()[n]=null))}}},r.prototype.adjustRowNumbersFromRRI=function(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;for(var t=0,e=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<e.length;n++)if(e[n]!=null)for(var o=e[n].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[n];s!=null&&(i=r.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||t++)}return t},r.prototype.adjustRowNumbersFromLRI=function(){if(this.detectionResultColumns[0]==null)return 0;for(var t=0,e=this.detectionResultColumns[0].getCodewords(),n=0;n<e.length;n++)if(e[n]!=null)for(var o=e[n].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[n];s!=null&&(i=r.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||t++)}return t},r.adjustRowNumberIfValid=function(t,e,n){return n==null||n.hasValidRowNumber()||(n.isValidRowNumber(t)?(n.setRowNumber(t),e=0):++e),e},r.prototype.adjustRowNumbers=function(t,e,n){var o,i,a=n[e],s=this.detectionResultColumns[t-1].getCodewords(),u=s;this.detectionResultColumns[t+1]!=null&&(u=this.detectionResultColumns[t+1].getCodewords());var c=new Array(14);c[2]=s[e],c[3]=u[e],e>0&&(c[0]=n[e-1],c[4]=s[e-1],c[5]=u[e-1]),e>1&&(c[8]=n[e-2],c[10]=s[e-2],c[11]=u[e-2]),e<n.length-1&&(c[1]=n[e+1],c[6]=s[e+1],c[7]=u[e+1]),e<n.length-2&&(c[9]=n[e+2],c[12]=s[e+2],c[13]=u[e+2]);try{for(var f=Jo(c),l=f.next();!l.done;l=f.next()){var h=l.value;if(r.adjustRowNumber(a,h))return}}catch(d){o={error:d}}finally{try{l&&!l.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}},r.adjustRowNumber=function(t,e){return e!=null&&!(!e.hasValidRowNumber()||e.getBucket()!==t.getBucket())&&(t.setRowNumber(e.getRowNumber()),!0)},r.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},r.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},r.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},r.prototype.setBoundingBox=function(t){this.boundingBox=t},r.prototype.getBoundingBox=function(){return this.boundingBox},r.prototype.setDetectionResultColumn=function(t,e){this.detectionResultColumns[t]=e},r.prototype.getDetectionResultColumn=function(t){return this.detectionResultColumns[t]},r.prototype.toString=function(){var t=this.detectionResultColumns[0];t==null&&(t=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var e=new De,n=0;n<t.getCodewords().length;n++){e.format("CW %3d:",n);for(var o=0;o<this.barcodeColumnCount+2;o++)if(this.detectionResultColumns[o]!=null){var i=this.detectionResultColumns[o].getCodewords()[n];i!=null?e.format(" %3d|%3d",i.getRowNumber(),i.getValue()):e.format("    |   ")}else e.format("    |   ");e.format("%n")}return e.toString()},r}(),ti=function(){function r(t,e,n,o){this.rowNumber=r.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(t),this.endX=Math.trunc(e),this.bucket=Math.trunc(n),this.value=Math.trunc(o)}return r.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},r.prototype.isValidRowNumber=function(t){return t!==r.BARCODE_ROW_UNKNOWN&&this.bucket===t%3*3},r.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},r.prototype.getWidth=function(){return this.endX-this.startX},r.prototype.getStartX=function(){return this.startX},r.prototype.getEndX=function(){return this.endX},r.prototype.getBucket=function(){return this.bucket},r.prototype.getValue=function(){return this.value},r.prototype.getRowNumber=function(){return this.rowNumber},r.prototype.setRowNumber=function(t){this.rowNumber=t},r.prototype.toString=function(){return this.rowNumber+"|"+this.value},r.BARCODE_ROW_UNKNOWN=-1,r}(),ei=function(){function r(){}return r.initialize=function(){for(var t=0;t<M.SYMBOL_TABLE.length;t++)for(var e=M.SYMBOL_TABLE[t],n=1&e,o=0;o<M.BARS_IN_MODULE;o++){for(var i=0;(1&e)===n;)i+=1,e>>=1;n=1&e,r.RATIOS_TABLE[t]||(r.RATIOS_TABLE[t]=new Array(M.BARS_IN_MODULE)),r.RATIOS_TABLE[t][M.BARS_IN_MODULE-o-1]=Math.fround(i/M.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},r.getDecodedValue=function(t){var e=r.getDecodedCodewordValue(r.sampleBitCounts(t));return e!==-1?e:r.getClosestDecodedValue(t)},r.sampleBitCounts=function(t){for(var e=B.sum(t),n=new Int32Array(M.BARS_IN_MODULE),o=0,i=0,a=0;a<M.MODULES_IN_CODEWORD;a++){var s=e/(2*M.MODULES_IN_CODEWORD)+a*e/M.MODULES_IN_CODEWORD;i+t[o]<=s&&(i+=t[o],o++),n[o]++}return n},r.getDecodedCodewordValue=function(t){var e=r.getBitValue(t);return M.getCodeword(e)===-1?-1:e},r.getBitValue=function(t){for(var e=0,n=0;n<t.length;n++)for(var o=0;o<t[n];o++)e=e<<1|(n%2==0?1:0);return Math.trunc(e)},r.getClosestDecodedValue=function(t){var e=B.sum(t),n=new Array(M.BARS_IN_MODULE);if(e>1)for(var o=0;o<n.length;
vendor: 16,384 bytes, lines 9-10
9o++)n[o]=Math.fround(t[o]/e);var i=Ae.MAX_VALUE,a=-1;this.bSymbolTableReady||r.initialize();for(var s=0;s<r.RATIOS_TABLE.length;s++){for(var u=0,c=r.RATIOS_TABLE[s],f=0;f<M.BARS_IN_MODULE;f++){var l=Math.fround(c[f]-n[f]);if((u+=Math.fround(l*l))>=i)break}u<i&&(i=u,a=M.SYMBOL_TABLE[s])}return a},r.bSymbolTableReady=!1,r.RATIOS_TABLE=new Array(M.SYMBOL_TABLE.length).map(function(t){return new Array(M.BARS_IN_MODULE)}),r}(),ri=function(){function r(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return r.prototype.getSegmentIndex=function(){return this.segmentIndex},r.prototype.setSegmentIndex=function(t){this.segmentIndex=t},r.prototype.getFileId=function(){return this.fileId},r.prototype.setFileId=function(t){this.fileId=t},r.prototype.getOptionalData=function(){return this.optionalData},r.prototype.setOptionalData=function(t){this.optionalData=t},r.prototype.isLastSegment=function(){return this.lastSegment},r.prototype.setLastSegment=function(t){this.lastSegment=t},r.prototype.getSegmentCount=function(){return this.segmentCount},r.prototype.setSegmentCount=function(t){this.segmentCount=t},r.prototype.getSender=function(){return this.sender||null},r.prototype.setSender=function(t){this.sender=t},r.prototype.getAddressee=function(){return this.addressee||null},r.prototype.setAddressee=function(t){this.addressee=t},r.prototype.getFileName=function(){return this.fileName},r.prototype.setFileName=function(t){this.fileName=t},r.prototype.getFileSize=function(){return this.fileSize},r.prototype.setFileSize=function(t){this.fileSize=t},r.prototype.getChecksum=function(){return this.checksum},r.prototype.setChecksum=function(t){this.checksum=t},r.prototype.getTimestamp=function(){return this.timestamp},r.prototype.setTimestamp=function(t){this.timestamp=t},r}(),Je=function(){function r(){}return r.parseLong=function(t,e){return e===void 0&&(e=void 0),parseInt(t,e)},r}(),ni=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),oi=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return ni(t,r),t.kind="NullPointerException",t}(ut),ii=function(){function r(){}return r.prototype.writeBytes=function(t){this.writeBytesOffset(t,0,t.length)},r.prototype.writeBytesOffset=function(t,e,n){if(t==null)throw new oi;if(e<0||e>t.length||n<0||e+n>t.length||e+n<0)throw new be;if(n!==0)for(var o=0;o<n;o++)this.write(t[e+o])},r.prototype.flush=function(){},r.prototype.close=function(){},r}(),ai=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),si=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return ai(t,r),t}(ut),ui=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),ci=function(r){function t(e){e===void 0&&(e=32);var n=r.call(this)||this;if(n.count=0,e<0)throw new D("Negative initial size: "+e);return n.buf=new Uint8Array(e),n}return ui(t,r),t.prototype.ensureCapacity=function(e){e-this.buf.length>0&&this.grow(e)},t.prototype.grow=function(e){var n=this.buf.length<<1;if(n-e<0&&(n=e),n<0){if(e<0)throw new si;n=et.MAX_VALUE}this.buf=ht.copyOfUint8Array(this.buf,n)},t.prototype.write=function(e){this.ensureCapacity(this.count+1),this.buf[this.count]=e,this.count+=1},t.prototype.writeBytesOffset=function(e,n,o){if(n<0||n>e.length||o<0||n+o-e.length>0)throw new be;this.ensureCapacity(this.count+o),G.arraycopy(e,n,this.buf,this.count,o),this.count+=o},t.prototype.writeTo=function(e){e.writeBytesOffset(this.buf,0,this.count)},t.prototype.reset=function(){this.count=0},t.prototype.toByteArray=function(){return ht.copyOfUint8Array(this.buf,this.count)},t.prototype.size=function(){return this.count},t.prototype.toString=function(e){return e?typeof e=="string"?this.toString_string(e):this.toString_number(e):this.toString_void()},t.prototype.toString_void=function(){return new String(this.buf).toString()},t.prototype.toString_string=function(e){return new String(this.buf).toString()},t.prototype.toString_number=function(e){return new String(this.buf).toString()},t.prototype.close=function(){},t}(ii);function wr(){if(typeof window<"u")return window.BigInt||null;if(typeof global<"u")return global.BigInt||null;if(typeof self<"u")return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function It(r){if(Jt===void 0&&(Jt=wr()),Jt===null)throw new Error("BigInt is not supported!");return Jt(r)}(function(r){r[r.ALPHA=0]="ALPHA",r[r.LOWER=1]="LOWER",r[r.MIXED=2]="MIXED",r[r.PUNCT=3]="PUNCT",r[r.ALPHA_SHIFT=4]="ALPHA_SHIFT",r[r.PUNCT_SHIFT=5]="PUNCT_SHIFT"})(k||(k={}));var fi=function(){function r(){}return r.decode=function(t,e){var n=new U(""),o=st.ISO8859_1;n.enableDecoding(o);for(var i=1,a=t[i++],s=new ri;i<t[0];){switch(a){case r.TEXT_COMPACTION_MODE_LATCH:i=r.textCompaction(t,i,n);break;case r.BYTE_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:i=r.byteCompaction(a,t,o,i,n);break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(t[i++]);break;case r.NUMERIC_COMPACTION_MODE_LATCH:i=r.numericCompaction(t,i,n);break;case r.ECI_CHARSET:st.getCharacterSetECIByValue(t[i++]);break;case r.ECI_GENERAL_PURPOSE:i+=2;break;case r.ECI_USER_DEFINED:i++;break;case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=r.decodeMacroBlock(t,i,s);break;case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:throw new S;default:i--,i=r.textCompaction(t,i,n)}if(!(i<t.length))throw S.getFormatInstance();a=t[i++]}if(n.length()===0)throw S.getFormatInstance();var u=new le(null,n.toString(),null,e);return u.setOther(s),u},r.decodeMacroBlock=function(t,e,n){if(e+r.NUMBER_OF_SEQUENCE_CODEWORDS>t[0])throw S.getFormatInstance();for(var o=new Int32Array(r.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<r.NUMBER_OF_SEQUENCE_CODEWORDS;i++,e++)o[i]=t[e];n.setSegmentIndex(et.parseInt(r.decodeBase900toBase10(o,r.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new U;e=r.textCompaction(t,e,a),n.setFileId(a.toString());var s=-1;for(t[e]===r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=e+1);e<t[0];)switch(t[e]){case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(t[++e]){case r.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new U;e=r.textCompaction(t,e+1,u),n.setFileName(u.toString());break;case r.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new U;e=r.textCompaction(t,e+1,c),n.setSender(c.toString());break;case r.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var f=new U;e=r.textCompaction(t,e+1,f),n.setAddressee(f.toString());break;case r.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var l=new U;e=r.numericCompaction(t,e+1,l),n.setSegmentCount(et.parseInt(l.toString()));break;case r.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var h=new U;e=r.numericCompaction(t,e+1,h),n.setTimestamp(Je.parseLong(h.toString()));break;case r.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var d=new U;e=r.numericCompaction(t,e+1,d),n.setChecksum(et.parseInt(d.toString()));break;case r.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var g=new U;e=r.numericCompaction(t,e+1,g),n.setFileSize(Je.parseLong(g.toString()));break;default:throw S.getFormatInstance()}break;case r.MACRO_PDF417_TERMINATOR:e++,n.setLastSegment(!0);break;default:throw S.getFormatInstance()}if(s!==-1){var y=e-s;n.isLastSegment()&&y--,n.setOptionalData(ht.copyOfRange(t,s,s+y))}return e},r.textCompaction=function(t,e,n){for(var o=new Int32Array(2*(t[0]-e)),i=new Int32Array(2*(t[0]-e)),a=0,s=!1;e<t[0]&&!s;){var u=t[e++];if(u<r.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case r.TEXT_COMPACTION_MODE_LATCH:o[a++]=r.TEXT_COMPACTION_MODE_LATCH;break;case r.BYTE_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.NUMERIC_COMPACTION_MODE_LATCH:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:e--,s=!0;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=t[e++],i[a]=u,a++}}return r.decodeTextCompaction(o,i,a,n),e},r.decodeTextCompaction=function(t,e,n,o){for(var i=k.ALPHA,a=k.ALPHA,s=0;s<n;){var u=t[s],c="";switch(i){case k.ALPHA:if(u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case r.LL:i=k.LOWER;break;case r.ML:i=k.MIXED;break;case r.PS:a=i,i=k.PUNCT_SHIFT;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:i=k.ALPHA}break;case k.LOWER:if(u<26)c=String.fromCharCode(97+u);else switch(u){case 26:c=" ";break;case r.AS:a=i,i=k.ALPHA_SHIFT;break;case r.ML:i=k.MIXED;break;case r.PS:a=i,i=k.PUNCT_SHIFT;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:i=k.ALPHA}break;case k.MIXED:if(u<r.PL)c=r.MIXED_CHARS[u];else switch(u){case r.PL:i=k.PUNCT;break;case 26:c=" ";break;case r.LL:i=k.LOWER;break;case r.AL:i=k.ALPHA;break;case r.PS:a=i,i=k.PUNCT_SHIFT;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:i=k.ALPHA}break;case k.PUNCT:if(u<r.PAL)c=r.PUNCT_CHARS[u];else switch(u){case r.PAL:i=k.ALPHA;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:i=k.ALPHA}break;case k.ALPHA_SHIFT:if(i=a,u<26)c=String.fromCharCode(65+u);else switch(u){case 26:c=" ";break;case r.TEXT_COMPACTION_MODE_LATCH:i=k.ALPHA}break;case k.PUNCT_SHIFT:if(i=a,u<r.PAL)c=r.PUNCT_CHARS[u];else switch(u){case r.PAL:i=k.ALPHA;break;case r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(e[s]);break;case r.TEXT_COMPACTION_MODE_LATCH:i=k.ALPHA}}c!==""&&o.append(c),s++}},r.byteCompaction=function(t,e,n,o,i){var a=new ci,s=0,u=0,c=!1;switch(t){case r.BYTE_COMPACTION_MODE_LATCH:for(var f=new Int32Array(6),l=e[o++];o<e[0]&&!c;)switch(f[s++]=l,u=900*u+l,l=e[o++]){case r.TEXT_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH:case r.NUMERIC_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:o--,c=!0;break;default:if(s%5==0&&s>0){for(var h=0;h<6;++h)a.write(Number(It(u)>>It(8*(5-h))));u=0,s=0}}o===e[0]&&l<r.TEXT_COMPACTION_MODE_LATCH&&(f[s++]=l);for(var d=0;d<s;d++)a.write(f[d]);break;case r.BYTE_COMPACTION_MODE_LATCH_6:for(;o<e[0]&&!c;){var g=e[o++];if(g<r.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+g;else switch(g){case r.TEXT_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH:case r.NUMERIC_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:o--,c=!0}if(s%5==0&&s>0){for(h=0;h<6;++h)a.write(Number(It(u)>>It(8*(5-h))));u=0,s=0}}}return i.append(Mt.decode(a.toByteArray(),n)),o},r.numericCompaction=function(t,e,n){for(var o=0,i=!1,a=new Int32Array(r.MAX_NUMERIC_CODEWORDS);e<t[0]&&!i;){var s=t[e++];if(e===t[0]&&(i=!0),s<r.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case r.TEXT_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH:case r.BYTE_COMPACTION_MODE_LATCH_6:case r.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case r.MACRO_PDF417_TERMINATOR:e--,i=!0}(o%r.MAX_NUMERIC_CODEWORDS==0||s===r.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(n.append(r.decodeBase900toBase10(a,o)),o=0)}return e},r.decodeBase900toBase10=function(t,e){for(var n=It(0),o=0;o<e;o++)n+=r.EXP900[e-o-1]*It(t[o]);var i=n.toString();if(i.charAt(0)!=="1")throw new S;return i.substring(1)},r.TEXT_COMPACTION_MODE_LATCH=900,r.BYTE_COMPACTION_MODE_LATCH=901,r.NUMERIC_COMPACTION_MODE_LATCH=902,r.BYTE_COMPACTION_MODE_LATCH_6=924,r.ECI_USER_DEFINED=925,r.ECI_GENERAL_PURPOSE=926,r.ECI_CHARSET=927,r.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,r.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,r.MACRO_PDF417_TERMINATOR=922,r.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,r.MAX_NUMERIC_CODEWORDS=15,r.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,r.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,r.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,r.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,r.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,r.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,r.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,r.PL=25,r.LL=27,r.AS=27,r.ML=28,r.AL=28,r.PS=29,r.PAL=29,r.PUNCT_CHARS=`;<>@[\\]_\`~!\r	,:
10-.$/"|*()?{}'`,r.MIXED_CHARS="0123456789&\r	,:#-.$/+%*=^",r.EXP900=wr()?function(){var t=[];t[0]=It(1);var e=It(900);t[1]=e;for(var n=2;n<16;n++)t[n]=t[n-1]*e;return t}():[],r.NUMBER_OF_SEQUENCE_CODEWORDS=2,r}(),Gt=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},li=function(){function r(){}return r.decode=function(t,e,n,o,i,a,s){for(var u,c=new Ie(t,e,n,o,i),f=null,l=null,h=!0;;h=!1){if(e!=null&&(f=r.getRowIndicatorColumn(t,c,e,!0,a,s)),o!=null&&(l=r.getRowIndicatorColumn(t,c,o,!1,a,s)),(u=r.merge(f,l))==null)throw A.getNotFoundInstance();var d=u.getBoundingBox();if(!h||d==null||!(d.getMinY()<c.getMinY()||d.getMaxY()>c.getMaxY()))break;c=d}u.setBoundingBox(c);var g=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,f),u.setDetectionResultColumn(g,l);for(var y=f!=null,_=1;_<=g;_++){var w=y?_:g-_;if(u.getDetectionResultColumn(w)===void 0){var m=void 0;m=w===0||w===g?new Qe(c,w===0):new yr(c),u.setDetectionResultColumn(w,m);for(var C=-1,E=C,I=c.getMinY();I<=c.getMaxY();I++){if((C=r.getStartColumn(u,w,I,y))<0||C>c.getMaxX()){if(E===-1)continue;C=E}var O=r.detectCodeword(t,c.getMinX(),c.getMaxX(),y,C,I,a,s);O!=null&&(m.setCodeword(I,O),E=C,a=Math.min(a,O.getWidth()),s=Math.max(s,O.getWidth()))}}}return r.createDecoderResult(u)},r.merge=function(t,e){if(t==null&&e==null)return null;var n=r.getBarcodeMetadata(t,e);if(n==null)return null;var o=Ie.merge(r.adjustBoundingBox(t),r.adjustBoundingBox(e));return new $o(n,o)},r.adjustBoundingBox=function(t){var e,n;if(t==null)return null;var o=t.getRowHeights();if(o==null)return null;var i=r.getMax(o),a=0;try{for(var s=Gt(o),u=s.next();!u.done;u=s.next()){var c=u.value;if(a+=i-c,c>0)break}}catch(d){e={error:d}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}for(var f=t.getCodewords(),l=0;a>0&&f[l]==null;l++)a--;var h=0;for(l=o.length-1;l>=0&&(h+=i-o[l],!(o[l]>0));l--);for(l=f.length-1;h>0&&f[l]==null;l--)h--;return t.getBoundingBox().addMissingRows(a,h,t.isLeft())},r.getMax=function(t){var e,n,o=-1;try{for(var i=Gt(t),a=i.next();!a.done;a=i.next()){var s=a.value;o=Math.max(o,s)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o},r.getBarcodeMetadata=function(t,e){var n,o;return t==null||(n=t.getBarcodeMetadata())==null?e==null?null:e.getBarcodeMetadata():e==null||(o=e.getBarcodeMetadata())==null?n:n.getColumnCount()!==o.getColumnCount()&&n.getErrorCorrectionLevel()!==o.getErrorCorrectionLevel()&&n.getRowCount()!==o.getRowCount()?null:n},r.getRowIndicatorColumn=function(t,e,n,o,i,a){for(var s=new Qe(e,o),u=0;u<2;u++)for(var c=u===0?1:-1,f=Math.trunc(Math.trunc(n.getX())),l=Math.trunc(Math.trunc(n.getY()));l<=e.getMaxY()&&l>=e.getMinY();l+=c){var h=r.detectCodeword(t,0,t.getWidth(),o,f,l,i,a);h!=null&&(s.setCodeword(l,h),f=o?h.getStartX():h.getEndX())}return s},r.adjustCodewordCount=function(t,e){var n=e[0][1],o=n.getValue(),i=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-r.getNumberOfECCodeWords(t.getBarcodeECLevel());if(o.length===0){if(i<1||i>M.MAX_CODEWORDS_IN_BARCODE)throw A.getNotFoundInstance();n.setValue(i)}else o[0]!==i&&n.setValue(i)},r.createDecoderResult=function(t){var e=r.createBarcodeMatrix(t);r.adjustCodewordCount(t,e);for(var n=new Array,o=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),i
10=[],a=new Array,s=0;s<t.getBarcodeRowCount();s++)for(var u=0;u<t.getBarcodeColumnCount();u++){var c=e[s][u+1].getValue(),f=s*t.getBarcodeColumnCount()+u;c.length===0?n.push(f):c.length===1?o[f]=c[0]:(a.push(f),i.push(c))}for(var l=new Array(i.length),h=0;h<l.length;h++)l[h]=i[h];return r.createDecoderResultFromAmbiguousValues(t.getBarcodeECLevel(),o,M.toIntArray(n),M.toIntArray(a),l)},r.createDecoderResultFromAmbiguousValues=function(t,e,n,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)e[o[u]]=i[u][a[u]];try{return r.decodeCodewords(e,t,n)}catch(c){if(!(c instanceof q))throw c}if(a.length===0)throw q.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 q.getChecksumInstance()}}throw q.getChecksumInstance()},r.createBarcodeMatrix=function(t){for(var e,n,o,i,a=Array.from({length:t.getBarcodeRowCount()},function(){return new Array(t.getBarcodeColumnCount()+2)}),s=0;s<a.length;s++)for(var u=0;u<a[s].length;u++)a[s][u]=new jt;var c=0;try{for(var f=Gt(t.getDetectionResultColumns()),l=f.next();!l.done;l=f.next()){var h=l.value;if(h!=null)try{for(var d=(o=void 0,Gt(h.getCodewords())),g=d.next();!g.done;g=d.next()){var y=g.value;if(y!=null){var _=y.getRowNumber();if(_>=0){if(_>=a.length)continue;a[_][c].setValue(y.getValue())}}}}catch(w){o={error:w}}finally{try{g&&!g.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}c++}}catch(w){e={error:w}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}return a},r.isValidBarcodeColumn=function(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1},r.getStartColumn=function(t,e,n,o){var i,a,s=o?1:-1,u=null;if(r.isValidBarcodeColumn(t,e-s)&&(u=t.getDetectionResultColumn(e-s).getCodeword(n)),u!=null)return o?u.getEndX():u.getStartX();if((u=t.getDetectionResultColumn(e).getCodewordNearby(n))!=null)return o?u.getStartX():u.getEndX();if(r.isValidBarcodeColumn(t,e-s)&&(u=t.getDetectionResultColumn(e-s).getCodewordNearby(n)),u!=null)return o?u.getEndX():u.getStartX();for(var c=0;r.isValidBarcodeColumn(t,e-s);){e-=s;try{for(var f=(i=void 0,Gt(t.getDetectionResultColumn(e).getCodewords())),l=f.next();!l.done;l=f.next()){var h=l.value;if(h!=null)return(o?h.getEndX():h.getStartX())+s*c*(h.getEndX()-h.getStartX())}}catch(d){i={error:d}}finally{try{l&&!l.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}c++}return o?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()},r.detectCodeword=function(t,e,n,o,i,a,s,u){i=r.adjustCodewordStartColumn(t,e,n,o,i,a);var c,f=r.getModuleBitCount(t,e,n,o,i,a);if(f==null)return null;var l=B.sum(f);if(o)c=i+l;else{for(var h=0;h<f.length/2;h++){var d=f[h];f[h]=f[f.length-1-h],f[f.length-1-h]=d}i=(c=i)-l}if(!r.checkCodewordSkew(l,s,u))return null;var g=ei.getDecodedValue(f),y=M.getCodeword(g);return y===-1?null:new ti(i,c,r.getCodewordBucketNumber(g),y)},r.getModuleBitCount=function(t,e,n,o,i,a){for(var s=i,u=new Int32Array(8),c=0,f=o?1:-1,l=o;(o?s<n:s>=e)&&c<u.length;)t.get(s,a)===l?(u[c]++,s+=f):(c++,l=!l);return c===u.length||s===(o?n:e)&&c===u.length-1?u:null},r.getNumberOfECCodeWords=function(t){return 2<<t},r.adjustCodewordStartColumn=function(t,e,n,o,i,a){for(var s=i,u=o?-1:1,c=0;c<2;c++){for(;(o?s>=e:s<n)&&o===t.get(s,a);){if(Math.abs(i-s)>r.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},r.checkCodewordSkew=function(t,e,n){return e-r.CODEWORD_SKEW_SIZE<=t&&t<=n+r.CODEWORD_SKEW_SIZE},r.decodeCodewords=function(t,e,n){if(t.length===0)throw S.getFormatInstance();var o=1<<e+1,i=r.correctErrors(t,n,o);r.verifyCodewordCount(t,o);var a=fi.decode(t,""+e);return a.setErrorsCorrected(i),a.setErasures(n.length),a},r.correctErrors=function(t,e,n){if(e!=null&&e.length>n/2+r.MAX_ERRORS||n<0||n>r.MAX_EC_CODEWORDS)throw q.getChecksumInstance();return r.errorCorrection.decode(t,n,e)},r.verifyCodewordCount=function(t,e){if(t.length<4)throw S.getFormatInstance();var n=t[0];if(n>t.length)throw S.getFormatInstance();if(n===0){if(!(e<t.length))throw S.getFormatInstance();t[0]=t.length-e}},r.getBitCountForCodeword=function(t){for(var e=new Int32Array(8),n=0,o=e.length-1;!((1&t)!==n&&(n=1&t,--o<0));)e[o]++,t>>=1;return e},r.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},r.getCodewordBucketNumber_number=function(t){return r.getCodewordBucketNumber(r.getBitCountForCodeword(t))},r.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},r.toString=function(t){for(var e=new De,n=0;n<t.length;n++){e.format("Row %2d: ",n);for(var o=0;o<t[n].length;o++){var i=t[n][o];i.getValue().length===0?e.format("        ",null):e.format("%4d(%2d)",i.getValue()[0],i.getConfidence(i.getValue()[0]))}e.format("%n")}return e.toString()},r.CODEWORD_SKEW_SIZE=2,r.MAX_ERRORS=3,r.MAX_EC_CODEWORDS=512,r.errorCorrection=new zo,r}(),hi=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ce=function(){function r(){}return r.prototype.decode=function(t,e){e===void 0&&(e=null);var n=r.decode(t,e,!1);if(n==null||n.length===0||n[0]==null)throw A.getNotFoundInstance();return n[0]},r.prototype.decodeMultiple=function(t,e){e===void 0&&(e=null);try{return r.decode(t,e,!0)}catch(n){throw n instanceof S||n instanceof q?A.getNotFoundInstance():n}},r.decode=function(t,e,n){var o,i,a=new Array,s=Uo.detectMultiple(t,e,n);try{for(var u=hi(s.getPoints()),c=u.next();!c.done;c=u.next()){var f=c.value,l=li.decode(s.getBits(),f[4],f[5],f[6],f[7],r.getMinCodewordWidth(f),r.getMaxCodew
10ordWidth(f)),h=new ct(l.getText(),l.getRawBytes(),void 0,f,R.PDF_417);h.putMetadata(rt.ERROR_CORRECTION_LEVEL,l.getECLevel());var d=l.getOther();d!=null&&h.putMetadata(rt.PDF417_EXTRA_METADATA,d),a.push(h)}}catch(g){o={error:g}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map(function(g){return g})},r.getMaxWidth=function(t,e){return t==null||e==null?0:Math.trunc(Math.abs(t.getX()-e.getX()))},r.getMinWidth=function(t,e){return t==null||e==null?et.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},r.getMaxCodewordWidth=function(t){return Math.floor(Math.max(Math.max(r.getMaxWidth(t[0],t[4]),r.getMaxWidth(t[6],t[2])*M.MODULES_IN_CODEWORD/M.MODULES_IN_STOP_PATTERN),Math.max(r.getMaxWidth(t[1],t[5]),r.getMaxWidth(t[7],t[3])*M.MODULES_IN_CODEWORD/M.MODULES_IN_STOP_PATTERN)))},r.getMinCodewordWidth=function(t){return Math.floor(Math.min(Math.min(r.getMinWidth(t[0],t[4]),r.getMinWidth(t[6],t[2])*M.MODULES_IN_CODEWORD/M.MODULES_IN_STOP_PATTERN),Math.min(r.getMinWidth(t[1],t[5]),r.getMinWidth(t[7],t[3])*M.MODULES_IN_CODEWORD/M.MODULES_IN_STOP_PATTERN)))},r.prototype.reset=function(){},r}(),di=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),$e=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return di(t,r),t.kind="ReaderException",t}(ut),tr=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_r=function(){function r(){}return r.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},r.prototype.decodeWithState=function(t){return this.readers!==null&&this.readers!==void 0||this.setHints(null),this.decodeInternal(t)},r.prototype.setHints=function(t){this.hints=t;var e=t!=null&&t.get(H.TRY_HARDER)!==void 0,n=t==null?null:t.get(H.POSSIBLE_FORMATS),o=new Array;if(n!=null){var i=n.some(function(a){return a===R.UPC_A||a===R.UPC_E||a===R.EAN_13||a===R.EAN_8||a===R.CODABAR||a===R.CODE_39||a===R.CODE_93||a===R.CODE_128||a===R.ITF||a===R.RSS_14||a===R.RSS_EXPANDED});i&&!e&&o.push(new Lt(t)),n.includes(R.QR_CODE)&&o.push(new ue),n.includes(R.DATA_MATRIX)&&o.push(new se),n.includes(R.AZTEC)&&o.push(new ie),n.includes(R.PDF_417)&&o.push(new ce),i&&e&&o.push(new Lt(t))}o.length===0&&(e||o.push(new Lt(t)),o.push(new ue),o.push(new se),o.push(new ie),o.push(new ce),e&&o.push(new Lt(t))),this.readers=o},r.prototype.reset=function(){var t,e;if(this.readers!==null)try{for(var n=tr(this.readers),o=n.next();!o.done;o=n.next())o.value.reset()}catch(i){t={error:i}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},r.prototype.decodeInternal=function(t){var e,n;if(this.readers===null)throw new $e("No readers where selected, nothing can be read.");try{for(var o=tr(this.readers),i=o.next();!i.done;i=o.next()){var a=i.value;try{return a.decode(t,this.hints)}catch(s){if(s instanceof $e)continue}}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}throw new A("No MultiFormat Readers were able to detect the code.")},r}(),pi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n){e===void 0&&(e=null),n===void 0&&(n=500);var o=new _r;return o.setHints(e),r.call(this,o,n)||this}pi(t,r),t.prototype.decodeBitmap=function(e){return this.reader.decodeWithState(e)}})(Vt);var gi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
10r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e){return e===void 0&&(e=500),r.call(this,new ce,e)||this}gi(t,r)})(Vt);var er,yi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e){return e===void 0&&(e=500),r.call(this,new ue,e)||this}yi(t,r)})(Vt),function(r){r[r.ERROR_CORRECTION=0]="ERROR_CORRECTION",r[r.CHARACTER_SET=1]="CHARACTER_SET",r[r.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",r[r.MIN_SIZE=3]="MIN_SIZE",r[r.MAX_SIZE=4]="MAX_SIZE",r[r.MARGIN=5]="MARGIN",r[r.PDF417_COMPACT=6]="PDF417_COMPACT",r[r.PDF417_COMPACTION=7]="PDF417_COMPACTION",r[r.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",r[r.AZTEC_LAYERS=9]="AZTEC_LAYERS",r[r.QR_VERSION=10]="QR_VERSION"}(er||(er={}));var wi=function(){function r(){}return r.applyMaskPenaltyRule1=function(t){return r.applyMaskPenaltyRule1Internal(t,!0)+r.applyMaskPenaltyRule1Internal(t,!1)},r.applyMaskPenaltyRule2=function(t){for(var e=0,n=t.getArray(),o=t.getWidth(),i=t.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]&&e++}return r.N2*e},r.applyMaskPenaltyRule3=function(t){for(var e=0,n=t.getArray(),o=t.getWidth(),i=t.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=n[a];s+6<o&&u[s]===1&&u[s+1]===0&&u[s+2]===1&&u[s+3]===1&&u[s+4]===1&&u[s+5]===0&&u[s+6]===1&&(r.isWhiteHorizontal(u,s-4,s)||r.isWhiteHorizontal(u,s+7,s+11))&&e++,a+6<i&&n[a][s]===1&&n[a+1][s]===0&&n[a+2][s]===1&&n[a+3][s]===1&&n[a+4][s]===1&&n[a+5][s]===0&&n[a+6][s]===1&&(r.isWhiteVertical(n,s,a-4,a)||r.isWhiteVertical(n,s,a+7,a+11))&&e++}return e*r.N3},r.isWhiteHorizontal=function(t,e,n){e=Math.max(e,0),n=Math.min(n,t.length);for(var o=e;o<n;o++)if(t[o]===1)return!1;return!0},r.isWhiteVertical=function(t,e,n,o){n=Math.max(n,0),o=Math.min(o,t.length);for(var i=n;i<o;i++)if(t[i][e]===1)return!1;return!0},r.applyMaskPenaltyRule4=function(t){for(var e=0,n=t.getArray(),o=t.getWidth(),i=t.getHeight(),a=0;a<i;a++)for(var s=n[a],u=0;u<o;u++)s[u]===1&&e++;var c=t.getHeight()*t.getWidth();return Math.floor(10*Math.abs(2*e-c)/c)*r.N4},r.getDataMaskBit=function(t,e,n){var o,i;switch(t){case 0:o=n+e&1;break;case 1:o=1&n;break;case 2:o=e%3;break;case 3:o=(n+e)%3;break;case 4:o=Math.floor(n/2)+Math.floor(e/3)&1;break;case 5:o=(1&(i=n*e))+i%3;break;case 6:o=(1&(i=n*e))+i%3&1;break;case 7:o=(i=n*e)%3+(n+e&1)&1;break;default:throw new D("Invalid mask pattern: "+t)}return o===0},r.applyMaskPenaltyRule1Internal=function(t,e){for(var n=0,o=e?t.getHeight():t.getWidth(),i=e?t.getWidth():t.getHeight(),a=t.getArray(),s=0;s<o;s++){for(var u=0,c=-1,f=0;f<i;f++){var l=e?a[s][f]:a[f][s];l===c?u++:(u>=5&&(n+=r.N1+(u-5)),u=1,c=l)}u>=5&&(n+=r.N1+(u-5))}return n},r.N1=3,r.N2=3,r.N3=40,r.N4=10,r}(),_i=function(){function r(){this.maskPattern=-1}return r.prototype.getMode=function(){return this.mode},r.prototype.getECLevel=function(){return this.ecLevel},r.prototype.getVersion=function(){return this.version},r.prototype.getMaskPattern=function(){return this.maskPattern},r.prototype.getMatrix=function(){return this.matrix},r.prototype.toString=function(){var t=new U;return t.append(`<<
11`),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append(`
12 ecLevel: `),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append(`
13 version: `),t.append(this.version?this.version.toString():"null"),t.append(`
14 maskPattern: `),t.append(this.maskPattern.toString()),this.matrix?(t.append(`
15 matrix:
16`),t.append(this.matrix.toString())):t.append(`
17 matrix: null
18`),t.append(`>>
19`),t.toString()},r.prototype.setMode=function(t){this.mode=t},r.prototype.setECLevel=function(t){this.ecLevel=t},r.prototype.setVersion=function(t){this.version=t},r.prototype.setMaskPattern=function(t){this.maskPattern=t}
19,r.prototype.setMatrix=function(t){this.matrix=t},r.isValidMaskPattern=function(t){return t>=0&&t<r.NUM_MASK_PATTERNS},r.NUM_MASK_PATTERNS=8,r}(),vi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Rt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return vi(t,r),t.kind="WriterException",t}(ut);(function(){function r(){}return r.clearMatrix=function(t){t.clear(255)},r.buildMatrix=function(t,e,n,o,i){r.clearMatrix(i),r.embedBasicPatterns(n,i),r.embedTypeInfo(e,o,i),r.maybeEmbedVersionInfo(n,i),r.embedDataBits(t,o,i)},r.embedBasicPatterns=function(t,e){r.embedPositionDetectionPatternsAndSeparators(e),r.embedDarkDotAtLeftBottomCorner(e),r.maybeEmbedPositionAdjustmentPatterns(t,e),r.embedTimingPatterns(e)},r.embedTypeInfo=function(t,e,n){var o=new _t;r.makeTypeInfoBits(t,e,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=r.TYPE_INFO_COORDINATES[i],c=u[0],f=u[1];if(n.setBoolean(c,f,s),i<8){var l=n.getWidth()-i-1,h=8;n.setBoolean(l,h,s)}else l=8,h=n.getHeight()-7+(i-8),n.setBoolean(l,h,s)}},r.maybeEmbedVersionInfo=function(t,e){if(!(t.getVersionNumber()<7)){var n=new _t;r.makeVersionInfoBits(t,n);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=n.get(o);o--,e.setBoolean(i,e.getHeight()-11+a,s),e.setBoolean(e.getHeight()-11+a,i,s)}}},r.embedDataBits=function(t,e,n){for(var o=0,i=-1,a=n.getWidth()-1,s=n.getHeight()-1;a>0;){for(a===6&&(a-=1);s>=0&&s<n.getHeight();){for(var u=0;u<2;++u){var c=a-u;if(r.isEmpty(n.get(c,s))){var f=void 0;o<t.getSize()?(f=t.get(o),++o):f=!1,e!==255&&wi.getDataMaskBit(e,c,s)&&(f=!f),n.setBoolean(c,s,f)}}s+=i}s+=i=-i,a-=2}if(o!==t.getSize())throw new Rt("Not all bits consumed: "+o+"/"+t.getSize())},r.findMSBSet=function(t){return 32-et.numberOfLeadingZeros(t)},r.calculateBCHCode=function(t,e){if(e===0)throw new D("0 polynomial");var n=r.findMSBSet(e);for(t<<=n-1;r.findMSBSet(t)>=n;)t^=e<<r.findMSBSet(t)-n;return t},r.makeTypeInfoBits=function(t,e,n){if(!_i.isValidMaskPattern(e))throw new Rt("Invalid mask pattern");var o=t.getBits()<<3|e;n.appendBits(o,5);var i=r.calculateBCHCode(o,r.TYPE_INFO_POLY);n.appendBits(i,10);var a=new _t;if(a.appendBits(r.TYPE_INFO_MASK_PATTERN,15),n.xor(a),n.getSize()!==15)throw new Rt("should not happen but we got: "+n.getSize())},r.makeVersionInfoBits=function(t,e){e.appendBits(t.getVersionNumber(),6);var n=r.calculateBCHCode(t.getVersionNumber(),r.VERSION_INFO_POLY);if(e.appendBits(n,12),e.getSize()!==18)throw new Rt("should not happen but we got: "+e.getSize())},r.isEmpty=function(t){return t===255},r.embedTimingPatterns=function(t){for(var e=8;e<t.getWidth()-8;++e){var n=(e+1)%2;r.isEmpty(t.get(e,6))&&t.setNumber(e,6,n),r.isEmpty(t.get(6,e))&&t.setNumber(6,e,n)}},r.embedDarkDotAtLeftBottomCorner=function(t){if(t.get(8,t.getHeight()-8)===0)throw new Rt;t.setNumber(8,t.getHeight()-8,1)},r.embedHorizontalSeparationPattern=function(t,e,n){for(var o=0;o<8;++o){if(!r.isEmpty(n.get(t+o,e)))throw new Rt;n.setNumber(t+o,e,0)}},r.embedVerticalSeparationPattern=function(t,e,n){for(var o=0;o<7;++o){if(!r.isEmpty(n.get(t,e+o)))throw new Rt;n.setNumber(t,e+o,0)}},r.embedPositionAdjustmentPattern=function(t,e,n){for(var o=0;o<5;++o)for(var i=r.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)n.setNumber(t+a,e+o,i[a])},r.embedPositionDetectionPattern=function(t,e,n){for(var o=0;o<7;++o)for(var i=r.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)n.setNumber(t+a,e+o,i[a])},r.embedPositionDetectionPatternsAndSeparators=function(t){var e=r.POSITION_DETECTION_PATTERN[0].length;r.embedPositionDetectionPattern(0,0,t),r.embedPositionDetectionPattern(t.getWidth()-e,0,t),r.embedPositionDetectionPattern(0,t.getWidth()-e,t),r.embedHorizontalSeparationPattern(0,7,t),r.embedHorizontalSeparationPattern(t.getWidth()-8,7,t),r.embedHorizontalSeparationPattern(0,t.getWidth()-8,t),r.embedVerticalSeparationPattern(7,0,t),r.embedVerticalSeparationPattern(t.getHeight()-7-1,0,t),r.embedVerticalSeparationPattern(7,t.getHeight()-7,t)},r.maybeEmbedPositionAdjustmentPatterns=function(t,e){if(!(t.getVersionNumber()<2))for(var n=t.getVersionNumber()-1,o=r.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&&r.isEmpty(e.get(c,s))&&r.embedPositionAdjustmentPattern(c-2,s-2,e)}}},r.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])]),r.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])]),r.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])]),r.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])]),r.VERSION_INFO_POLY=7973,r.TYPE_INFO_POLY=1335,r.TYPE_INFO_MASK_PATTERN=21522,r})();(function(){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]),st.UTF8.getName()})();var mi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
19r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n,o,i,a,s,u,c){var f=r.call(this,s,u)||this;if(f.yuvData=e,f.dataWidth=n,f.dataHeight=o,f.left=i,f.top=a,i+s>n||a+u>o)throw new D("Crop rectangle does not fit within image data.");return c&&f.reverseHorizontal(s,u),f}mi(t,r),t.prototype.getRow=function(e,n){if(e<0||e>=this.getHeight())throw new D("Requested row is outside the image: "+e);var o=this.getWidth();(n==null||n.length<o)&&(n=new Uint8ClampedArray(o));var i=(e+this.top)*this.dataWidth+this.left;return G.arraycopy(this.yuvData,i,n,0,o),n},t.prototype.getMatrix=function(){var e=this.getWidth(),n=this.getHeight();if(e===this.dataWidth&&n===this.dataHeight)return this.yuvData;var o=e*n,i=new Uint8ClampedArray(o),a=this.top*this.dataWidth+this.left;if(e===this.dataWidth)return G.arraycopy(this.yuvData,a,i,0,o),i;for(var s=0;s<n;s++){var u=s*e;G.arraycopy(this.yuvData,a,i,u,e),a+=this.dataWidth}return i},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(e,n,o,i){return new t(this.yuvData,this.dataWidth,this.dataHeight,this.left+e,this.top+n,o,i,!1)},t.prototype.renderThumbnail=function(){for(var e=this.getWidth()/t.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/t.THUMBNAIL_SCALE_FACTOR,o=new Int32Array(e*n),i=this.yuvData,a=this.top*this.dataWidth+this.left,s=0;s<n;s++){for(var u=s*e,c=0;c<e;c++){var f=255&i[a+c*t.THUMBNAIL_SCALE_FACTOR];o[u+c]=4278190080|65793*f}a+=this.dataWidth*t.THUMBNAIL_SCALE_FACTOR}return o},t.prototype.getThumbnailWidth=function(){return this.getWidth()/t.THUMBNAIL_SCALE_FACTOR},t.prototype.getThumbnailHeight=function(){return this.getHeight()/t.THUMBNAIL_SCALE_FACTOR},t.prototype.reverseHorizontal=function(e,n){for(var o=this.yuvData,i=0,a=this.top*this.dataWidth+this.left;i<n;i++,a+=this.dataWidth)for(var s=a+e/2,u=a,c=a+e-1;u<s;u++,c--){var f=o[u];o[u]=o[c],o[c]=f}},t.prototype.invert=function(){return new fe(this)},t.THUMBNAIL_SCALE_FACTOR=2})(zt);var Ai=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n,o,i,a,s,u){var c=r.call(this,n,o)||this;if(c.dataWidth=i,c.dataHeight=a,c.left=s,c.top=u,e.BYTES_PER_ELEMENT===4){for(var f=n*o,l=new Uint8ClampedArray(f),h=0;h<f;h++){var d=e[h],g=d>>16&255,y=d>>7&510,_=255&d;l[h]=(g+y+_)/4&255}c.luminances=l}else c.luminances=e;if(i===void 0&&(c.dataWidth=n),a===void 0&&(c.dataHeight=o),s===void 0&&(c.left=0),u===void 0&&(c.top=0),c.left+n>c.dataWidth||c.top+o>c.dataHeight)throw new D("Crop rectangle does not fit within image data.");return c}Ai(t,r),t.prototype.getRow=function(e,n){if(e<0||e>=this.getHeight())throw new D("Requested row is outside the image: "+e);var o=this.getWidth();(n==null||n.length<o)&&(n=new Uint8ClampedArray(o));var i=(e+this.top)*this.dataWidth+this.left;return G.arraycopy(this.luminances,i,n,0,o),n},t.prototype.getMatrix=function(){var e=this.getWidth(),n=this.getHeight();if(e===this.dataWidth&&n===this.dataHeight)return this.luminances;var o=e*n,i=new Uint8ClampedArray(o),a=this.top*this.dataWidth+this.left;if(e===this.dataWidth)return G.arraycopy(this.luminances,a,i,0,o),i;for(var s=0;s<n;s++){var u=s*e;G.arraycopy(this.luminances,a,i,u,e),a+=this.dataWidth}return i},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(e,n,o,i){return new t(this.luminances,o,i,this.dataWidth,this.dataHeight,this.left+e,this.top+n)},t.prototype.invert=function(){return new fe(this)}})(zt);var Ei=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(){return r!==null&&r.apply(this,arguments)||this}Ei(t,r),t.forName=function(e){return this.getCharacterSetECIByName(e)}})(st);var Ci=function(){function r(t){this.previous=t}return r.prototype.getPrevious=function(){return this.previous},r}(),Ii=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
19r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),vr=function(r){function t(e,n,o){var i=r.call(this,e)||this;return i.value=n,i.bitCount=o,i}return Ii(t,r),t.prototype.appendTo=function(e,n){e.appendBits(this.value,this.bitCount)},t.prototype.add=function(e,n){return new t(this,e,n)},t.prototype.addBinaryShift=function(e,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new t(this,e,n)},t.prototype.toString=function(){var e=this.value&(1<<this.bitCount)-1;return e|=1<<this.bitCount,"<"+et.toBinaryString(e|1<<this.bitCount).substring(1)+">"},t}(Ci),Si=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n,o){var i=r.call(this,e,0,0)||this;return i.binaryShiftStart=n,i.binaryShiftByteCount=o,i}Si(t,r),t.prototype.appendTo=function(e,n){for(var o=0;o<this.binaryShiftByteCount;o++)(o===0||o===31&&this.binaryShiftByteCount<=62)&&(e.appendBits(31,5),this.binaryShiftByteCount>62?e.appendBits(this.binaryShiftByteCount-31,16):o===0?e.appendBits(Math.min(this.binaryShiftByteCount,31),5):e.appendBits(this.binaryShiftByteCount-31,5)),e.appendBits(n[this.binaryShiftStart+o],8)},t.prototype.addBinaryShift=function(e,n){return new t(this,e,n)},t.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}})(vr);new vr(null,0,0);var Oi=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(r){var t,e;try{for(var n=Oi(r),o=n.next();!o.done;o=n.next()){var i=o.value;ht.fill(i,-1)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}r[0][4]=0,r[1][4]=0,r[1][0]=28,r[3][4]=0,r[2][4]=0,r[2][0]=15})(ht.createInt32Array(6,6)),function(r){var t=$.getCharCode(" "),e=$.getCharCode("."),n=$.getCharCode(",");r[0][t]=1;for(var o=$.getCharCode("Z"),i=$.getCharCode("A"),a=i;a<=o;a++)r[0][a]=a-i+2;r[1][t]=1;var s=$.getCharCode("z"),u=$.getCharCode("a");for(a=u;a<=s;a++)r[1][a]=a-u+2;r[2][t]=1;var c=$.getCharCode("9"),f=$.getCharCode("0");for(a=f;a<=c;a++)r[2][a]=a-f+2;r[2][n]=12,r[2][e]=13;for(var l=["\0"," ","�","�","�","�","�","�","\x07","\b","	",`
20`,"\v","\f","\r","\x1B","�","�","�","�","@","\\","^","_","`","|","~","�"],h=0;h<l.length;h++)r[3][$.getCharCode(l[h])]=h;var d=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(h=0;h<d.length;h++)$.getCharCode(d[h])>0&&(r[4][$.getCharCode(d[h])]=h)}(ht.createInt32Array(5,256));var bi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ti=function(r){function t(e){var n=r.call(this,e.width,e.height)||this;return n.canvas=e,n.buffer=t.makeBufferFromCanvasImageData(e),n}return bi(t,r),t.makeBufferFromCanvasImageData=function(e){var n=e.getContext("2d");if(!n)throw new Error("Couldn't get canvas context.");var o=n.getImageData(0,0,e.width,e.height);return t.toGrayscaleBuffer(o.data,e.width,e.height)},t.toGrayscaleBuffer=function(e,n,o){for(var i=new Uint8ClampedArray(n*o),a=0,s=0,u=e.length;a<u;a+=4,s++){var c=void 0;e[a+3]===0?c=255:c=306*e[a]+601*e[a+1]+117*e[a+2]+512>>10,i[s]=c}return i},t.prototype.getRow=function(e,n){if(e<0||e>=this.getHeight())throw new D("Requested row is outside the image: "+e);var o=this.getWidth(),i=e*o;return n===null?n=this.buffer.slice(i,i+o):(n.length<o&&(n=new Uint8ClampedArray(o)),n.set(this.buffer.slice(i,i+o))),n},t.prototype.getMatrix=function(){return this.buffer},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(e,n,o,i){return r.prototype.crop.call(this,e,n,o,i),this},t.prototype.isRotateSupported=function(){return!0},t.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},t.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},t.prototype.invert=function(){return new fe(this)},t.prototype.getTempCanvasElement=function(){if(this.tempCanvasElement===null){var e=this.canvas.ownerDocument.createElement("canvas");e.width=this.canvas.width,e.height=this.canvas.height,this.tempCanvasElement=e}return this.tempCanvasElement},t.prototype.rotate=function(e){var n=this.getTempCanvasElement();if(!n)throw new Error("Could not create a Canvas element.");var o=e*t.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);n.width=s,n.height=u;var c=n.getContext("2d");if(!c)throw new Error("Could not create a Convas Context element.");return c.translate(s/2,u/2),c.rotate(o),c.drawImage(this.canvas,i/-2,a/-2),this.buffer=t.makeBufferFromCanvasImageData(n),this},t.DEGREE_TO_RADIANS=Math.PI/180,t}(zt);function mr(){return typeof navigator<"u"}function Ri(){return!!(mr()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var xt=function(){return xt=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},xt.apply(this,arguments)},X=function(r,t,e,n){return new(e||(e=Promise))(function(o,i){function a(c){try{u(n.next(c))}catch(f){i(f)}}function s(c){try{u(n.throw(c))}catch(f){i(f)}}function u(c){var f;c.done?o(c.value):(f=c.value,f instanceof e?f:new e(function(l){l(f)})).then(a,s)}u((n=n.apply(r,[])).next())})},j=function(r,t){var e,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)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(u){return function(c){return function(f){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,n&&(o=2&f[0]?n.return:f[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,f[1])).done)return o;switch(n=0,o&&(f=[2&f[0],o.value]),f[0]){case 0:case 1:o=f;break;case 4:return a.label++,{value:f[1],done:!1};case 5:a.label++,n=f[1],f=[0];continue;case 7:f=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!((o=o.length>0&&o[o.length-1])||f[0]!==6&&f[0]!==2)){a=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){a.label=f[1];break}if(f[0]===6&&a.label<o[1]){a.label=o[1],o=f;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(f);break}o[2]&&a.ops.pop(),a.trys.pop();continue}f=t.call(r,a)}catch(l){f=[6,l],n=0}finally{e=o=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([u,c])}}},$t=function(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ni={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},Ut=function(){function r(t,e,n){e===void 0&&(e=new Map),n===void 0&&(n={}),this.reader=t,this.hints=e,this.options=xt(xt({},Ni),n)}return Object.defineProperty(r.prototype,"possibleFormats",{set:function(t){this.hints.set(H.POSSIBLE_FORMATS,t)}
20,enumerable:!1,configurable:!0}),r.addVideoSource=function(t,e){try{t.srcObject=e}catch{t.src=URL.createObjectURL(e)}},r.mediaStreamSetTorch=function(t,e){return X(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:return[4,t.applyConstraints({advanced:[{fillLightMode:e?"flash":"off",torch:!!e}]})];case 1:return n.sent(),[2]}})})},r.mediaStreamIsTorchCompatible=function(t){var e,n,o=t.getVideoTracks();try{for(var i=$t(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(r.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!1},r.mediaStreamIsTorchCompatibleTrack=function(t){try{return"torch"in t.getCapabilities()}catch(e){return console.error(e),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},r.isVideoPlaying=function(t){return t.currentTime>0&&!t.paused&&t.readyState>2},r.getMediaElement=function(t,e){var n=document.getElementById(t);if(!n)throw new W("element with id '"+t+"' not found");if(n.nodeName.toLowerCase()!==e.toLowerCase())throw new W("element with id '"+t+"' must be an "+e+" element");return n},r.createVideoElement=function(t){if(t instanceof HTMLVideoElement)return t;if(typeof t=="string")return r.getMediaElement(t,"video");if(!t&&typeof document<"u"){var e=document.createElement("video");return e.width=200,e.height=200,e}throw new Error("Couldn't get videoElement from videoSource!")},r.prepareImageElement=function(t){if(t instanceof HTMLImageElement)return t;if(typeof t=="string")return r.getMediaElement(t,"img");if(t===void 0){var e=document.createElement("img");return e.width=200,e.height=200,e}throw new Error("Couldn't get imageElement from imageSource!")},r.prepareVideoElement=function(t){var e=r.createVideoElement(t);return e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},r.isImageLoaded=function(t){return!!t.complete&&t.naturalWidth!==0},r.createBinaryBitmapFromCanvas=function(t){var e=new Ti(t),n=new sr(e);return new ar(n)},r.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},r.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 dimentions!")},r.createCaptureCanvas=function(t){if(!t)throw new W("Cannot create a capture canvas without a media element.");if(typeof document>"u")throw new Error(`The page "Document" is undefined, make sure you're running in a browser.`);var e=document.createElement("canvas"),n=r.getMediaElementDimensions(t),o=n.width,i=n.height;return e.style.width=o+"px",e.style.height=i+"px",e.width=o,e.height=i,e},r.tryPlayVideo=function(t){return X(this,void 0,void 0,function(){var e;return j(this,function(n){switch(n.label){case 0:if(t!=null&&t.ended)return console.error("Trying to play video that has ended."),[2,!1];if(r.isVideoPlaying(t))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,t.play()];case 2:return n.sent(),[2,!0];case 3:return e=n.sent(),console.warn("It was not possible to play the video.",e),[2,!1];case 4:return[2]}})})},r.createCanvasFromMediaElement=function(t){var e=r.createCaptureCanvas(t),n=e.getContext("2d");if(!n)throw new Error("Couldn't find Canvas 2D Context.");return r.drawImageOnCanvas(n,t),e},r.createBinaryBitmapFromMediaElem=function(t){var e=r.createCanvasFromMediaElement(t);return r.createBinaryBitmapFromCanvas(e)},r.destroyImageElement=function(t){t.src="",t.removeAttribute("src"),t=void 0},r.listVideoInputDevices=function(){return X(this,void 0,void 0,function(){var t,e,n,o,i,a,s,u,c,f,l,h;return j(this,function(d){switch(d.label){case 0:if(!mr())throw new Error("Can't enumerate devices, navigator is not present.");if(!Ri())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:t=d.sent(),e=[];try{for(n=$t(t),o=n.next();!o.done;o=n.next())i=o.value,(a=i.kind==="video"?"videoinput":i.kind)==="videoinput"&&(s=i.deviceId||i.id,u=i.label||"Video device "+(e.length+1),c=i.groupId,f={deviceId:s,label:u,kind:a,groupId:c},e.push(f))}catch(g){l={error:g}}finally{try{o&&!o.done&&(h=n.return)&&h.call(n)}finally{if(l)throw l.error}}return[2,e]}})})},r.findDeviceById=function(t){return X(this,void 0,void 0,function(){var e;return j(this,function(n){switch(n.label){case 0:return[4,r.listVideoInputDevices()];case 1:return(e=n.sent())?[2,e.find(function(o){return o.deviceId===t})]:[2]}})})},r.cleanVideoSource=function(t){if(t){try{t.srcObject=null}catch{t.src=""}t&&t.removeAttribute("src")}},r.playVideoOnLoadAsync=function(t,e){return X(this,void 0,void 0,function(){return j(this,function(n){switch(n.label){case 0:return[4,r.tryPlayVideo(t)];case 1:return n.sent()?[2,!0]:[2,new Promise(function(o,i){var a=setTimeout(function(){r.isVideoPlaying(t)||(i(!1),t.removeEventListener("canplay",s))},e),s=function(){r.tryPlayVideo(t).then(function(u){clearTimeout(a),t.removeEventListener("canplay",s),o(u)})};t.addEventListener("canplay",s)})]}})})},r.attachStreamToVideo=function(t,e,n){return n===void 0&&(n=5e3),X(this,void 0,void 0,function(){var o;return j(this,function(i){switch(i.label){case 0:return o=r.prepareVideoElement(e),r.addVideoSource(o,t),[4,r.playVideoOnLoadAsync(o,n)];case 1:return i.sent(),[2,o]}})})},r._waitImageLoad=function(t){return new Promise(function(e,n){var o=setTimeout(function(){r.isImageLoaded(t)||(t.removeEventListener("load",i),n())},1e4),i=function(){clearTimeout(o),t.removeEventListener("load",i),e()};t.addEventListener("load",i)})},r.checkCallbackFnOrThrow=function(t){if(!t)throw new W("`callbackFn` is a required parameter, you cannot capture results without it.")}
20,r.disposeMediaStream=function(t){t.getVideoTracks().forEach(function(e){return e.stop()}),t=void 0},r.prototype.decode=function(t){var e=r.createCanvasFromMediaElement(t);return this.decodeFromCanvas(e)},r.prototype.decodeBitmap=function(t){return this.reader.decode(t,this.hints)},r.prototype.decodeFromCanvas=function(t){var e=r.createBinaryBitmapFromCanvas(t);return this.decodeBitmap(e)},r.prototype.decodeFromImageElement=function(t){return X(this,void 0,void 0,function(){var e;return j(this,function(n){switch(n.label){case 0:if(!t)throw new W("An image element must be provided.");return e=r.prepareImageElement(t),[4,this._decodeOnLoadImage(e)];case 1:return[2,n.sent()]}})})},r.prototype.decodeFromImageUrl=function(t){return X(this,void 0,void 0,function(){var e;return j(this,function(n){switch(n.label){case 0:if(!t)throw new W("An URL must be provided.");(e=r.prepareImageElement()).src=t,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,this.decodeFromImageElement(e)];case 2:return[2,n.sent()];case 3:return r.destroyImageElement(e),[7];case 4:return[2]}})})},r.prototype.decodeFromConstraints=function(t,e,n){return X(this,void 0,void 0,function(){var o,i;return j(this,function(a){switch(a.label){case 0:return r.checkCallbackFnOrThrow(n),[4,navigator.mediaDevices.getUserMedia(t)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,e,n)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),r.disposeMediaStream(o),i;case 5:return[2]}})})},r.prototype.decodeFromStream=function(t,e,n){return X(this,void 0,void 0,function(){var o,i,a,s,u,c,f,l,h,d,g=this;return j(this,function(y){switch(y.label){case 0:return r.checkCallbackFnOrThrow(n),o=this.options.tryPlayVideoTimeout,[4,r.attachStreamToVideo(t,e,o)];case 1:return i=y.sent(),a=function(){var _,w;try{for(var m=$t(t.getVideoTracks()),C=m.next();!C.done;C=m.next())C.value.stop()}catch(E){_={error:E}}finally{try{C&&!C.done&&(w=m.return)&&w.call(m)}finally{if(_)throw _.error}}t=void 0},s=function(){a(),r.cleanVideoSource(i)},u=this.scan(i,n,s),c=t.getVideoTracks(),f=xt(xt({},u),{stop:function(){u.stop()},streamVideoConstraintsApply:function(_,w){return X(this,void 0,void 0,function(){var m,C,E,I,O,b;return j(this,function(P){switch(P.label){case 0:m=w?c.filter(w):c,P.label=1;case 1:P.trys.push([1,6,7,8]),C=$t(m),E=C.next(),P.label=2;case 2:return E.done?[3,5]:[4,E.value.applyConstraints(_)];case 3:P.sent(),P.label=4;case 4:return E=C.next(),[3,2];case 5:return[3,8];case 6:return I=P.sent(),O={error:I},[3,8];case 7:try{E&&!E.done&&(b=C.return)&&b.call(C)}finally{if(O)throw O.error}return[7];case 8:return[2]}})})},streamVideoConstraintsGet:function(_){return c.find(_).getConstraints()},streamVideoSettingsGet:function(_){return c.find(_).getSettings()},streamVideoCapabilitiesGet:function(_){return c.find(_).getCapabilities()}}),r.mediaStreamIsTorchCompatible(t)&&(l=c==null?void 0:c.find(function(_){return r.mediaStreamIsTorchCompatibleTrack(_)}),h=function(_){return X(g,void 0,void 0,function(){return j(this,function(w){switch(w.label){case 0:return[4,r.mediaStreamSetTorch(l,_)];case 1:return w.sent(),[2]}})})},f.switchTorch=h,d=function(){u.stop(),h(!1)},f.stop=d),[2,f]}})})},r.prototype.decodeFromVideoDevice=function(t,e,n){return X(this,void 0,void 0,function(){var o;return j(this,function(i){switch(i.label){case 0:return r.checkCallbackFnOrThrow(n),o={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,e,n)];case 1:return[2,i.sent()]}})})},r.prototype.decodeFromVideoElement=function(t,e){return X(this,void 0,void 0,function(){var n,o;return j(this,function(i){switch(i.label){case 0:if(r.checkCallbackFnOrThrow(e),!t)throw new W("A video element must be provided.");return n=r.prepareVideoElement(t),o=this.options.tryPlayVideoTimeout,[4,r.playVideoOnLoadAsync(n,o)];case 1:return i.sent(),[2,this.scan(n,e)]}})})},r.prototype.decodeFromVideoUrl=function(t,e){return X(this,void 0,void 0,function(){var n,o,i;return j(this,function(a){switch(a.label){case 0:if(r.checkCallbackFnOrThrow(e),!t)throw new W("An URL must be provided.");return(n=r.prepareVideoElement()).src=t,o=function(){r.cleanVideoSource(n)},i=this.options.tryPlayVideoTimeout,[4,r.playVideoOnLoadAsync(n,i)];case 1:return a.sent(),[2,this.scan(n,e,o)]}})})},r.prototype.decodeOnceFromConstraints=function(t,e){return X(this,void 0,void 0,function(){var n;return j(this,function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeOnceFromStream(n,e)];case 2:return[2,o.sent()]}})})},r.prototype.decodeOnceFromStream=function(t,e){return X(this,void 0,void 0,function(){var n,o;return j(this,function(i){switch(i.label){case 0:return n=!!e,[4,r.attachStreamToVideo(t,e)];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||r.cleanVideoSource(o),[7];case 5:return[2]}})})},r.prototype.decodeOnceFromVideoDevice=function(t,e){return X(this,void 0,void 0,function(){var n;return j(this,function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(n,e)];case 1:return[2,o.sent()]}})})},r.prototype.decodeOnceFromVideoElement=function(t){return X(this,void 0,void 0,function(){var e,n;return j(this,function(o){switch(o.label){case 0:if(!t)throw new W("A video element must be provided.");return e=r.prepareVideoElement(t),n=this.options.tryPlayVideoTimeout,[4,r.playVideoOnLoadAsync(e,n)];case 1:return o.sent(),[4,this.scanOneResult(e)];case 2:return[2,o.sent()]}})})},r.prototype.decodeOnceFromVideoUrl=function(t){return X(this,void 0,void 0,function(){var e,n;return j(this,function(o){switch(o.label){case 0:if(!t)throw new W("An URL must be provided.");(e=r.prepareVideoElement()).src=t,n=this.decodeOnceFromVideoElement(e),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n];case 2:return[2,o.sent()];case 3:return r.cleanVideoSource(e),[7];case 4:return[2]}})})},r.prototype.scanOneResult=function(t,e,n,o){var i=this;return e===void 0&&(e=!0),n===void 0&&(n=!0),o===void 0&&(o=!0),new Promise(function(a,s){i.scan(t,function(u,c,f){if(u)return a(u),void f.stop();if(c){if(c instanceof A&&e||c instanceof q&&n||c instanceof S&&o)return;f.stop(),s(c)}})})},r.prototype.scan=function(t,e,n){var o=this;r.checkCallbackFnOrThrow(e);var i=r.createCaptureCanvas(t),a=i.getContext("2d");if(!a)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){a=void 0,i=void 0},c=!1,f={stop:function(){c=!0,clearTimeout(s),u(),n&&n()}},l=function(){if(!c)try{r.drawImageOnCanvas(a,t);var h=o.decodeFromCanvas(i);e(h,void 0,f),s=setTimeout(l,o.options.delayBetweenScanSuccess)}catch(d){if(e(void 0,d,f),d instanceof q||d instanceof S||d instanceof A)return void(s=setTimeout(l,o.options.delayBetweenScanAttempts));u(),n&&n(d)}};return l(),f},r.prototype._decodeOnLoadImage=function(t){return X(this,void 0,void 0,function(){return j(this,function(e){switch(e.label){case 0:return r.isImageLoaded(t)?[3,2]:[4,r._waitImageLoad(t)];case 1:e.sent(),e.label=2;case 2:return[2,this.decode(t)]}})})},r}(),Di=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}
20r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n){return r.call(this,new ie,e,n)||this}Di(t,r)})(Ut);var Pi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n){return r.call(this,new Lt(e),e,n)||this}Pi(t,r)})(Ut);var Mi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n){return r.call(this,new se,e,n)||this}Mi(t,r)})(Ut);var Bi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n){var o=this,i=new _r;return i.setHints(e),(o=r.call(this,i,e,n)||this).reader=i,o}Bi(t,r),Object.defineProperty(t.prototype,"possibleFormats",{set:function(e){this.hints.set(H.POSSIBLE_FORMATS,e),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),t.prototype.decodeBitmap=function(e){return this.reader.decodeWithState(e)},t.prototype.setHints=function(e){this.hints=e,this.reader.setHints(this.hints)}})(Ut);var Li=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();(function(r){function t(e,n){return r.call(this,new ce,e,n)||this}Li(t,r)})(Ut);var Fi=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},r(t,e)};return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),xi=function(r){function t(e,n){return r.call(this,new ue,e,n)||this}return Fi(t,r),t}(Ut),te=function(r,t,e){var n=typeof r===e;return n||console.warn('[ReactQrReader]: Expected "'.concat(t,'" to be a of type "').concat(e,'".')),n},ki=function(r){var t=r.scanDelay,e=r.constraints,n=r.onResult,o=r.videoId,i=St.useRef(null);St.useEffect(function(){var a=new xi(null,{delayBetweenScanAttempts:t});return!function(){var s=typeof navigator<"u"&&!!navigator.mediaDevices;return s||console.warn('[ReactQrReader]: MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),s}()&&te(n,"onResult","function")&&n(null,new Error('MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),a),te(e,"constraints","object")&&a.decodeFromConstraints({video:e},o,function(s,u){te(n,"onResult","function")&&n(s,u,a)}).then(function(s){return i.current=s}).catch(function(s){te(n,"onResult","function")&&n(null,s,a)}),function(){var s;(s=i.current)===null||s===void 0||s.stop()}},[])},Dt=function(){return Dt=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},Dt.apply(this,arguments)},rr={container:{width:"100%",paddingTop:"100%",overflow:"hidden",position:"relative"},video:{top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden",position:"absolute",transform:void 0}},Se=function(r){var t=r.videoContainerStyle,e=r.containerStyle,n=r.videoStyle,o=r.constraints,i=r.ViewFinder,a=r.scanDelay,s=r.className,u=r.onResult,c=r.videoId;return ki({constraints:o,scanDelay:a,onResult:u,videoId:c}),St.createElement("section",{className:s,style:e},St.createElement("div",{style:Dt(Dt({},rr.container),t)},!!i&&St.createElement(i,null),St.createElement("video",{muted:!0,id:c,style:Dt(Dt(Dt({},rr.video),n),{transform:(o==null?void 0:o.facingMode)==="user"&&"scaleX(-1)"})})))};Se.displayName="QrReader",Se.defaultProps={constraints:{facingMode:"user"},videoId:"video",scanDelay:500};function Vi(r){const e=/[?&]p=([^&]+)/.exec(r);return e&&e[1]?e[1]:null}function Ar({historic:r,processOrder:t,loading:e}){const[n,o]=lt.useState(!0),i=lt.useRef(!1),a=async()=>{try{const u=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}});
20o(!0),u.getTracks().forEach(c=>c.stop())}catch{o(!1)}};lt.useEffect(()=>{a()},[]);const s=lt.useCallback(async u=>{if(u!=null&&u.text&&!i.current){i.current=!0,navigator.vibrate&&navigator.vibrate(200);const c=Vi(u.text),f={id:u.timestamp,orderUid:c};await t(f),await new Promise(l=>setTimeout(l,4e3)),i.current=!1}},[t]);return N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"relative",style:{maxHeight:220},children:n?N.jsxs(N.Fragment,{children:[N.jsx(Se,{constraints:{facingMode:"environment"},onResult:s,scanDelay:500,videoStyle:{objectFit:"cover",width:"100%",height:"100%",maxHeight:220}}),N.jsx(Lr,{className:nr("absolute left-1/2 top-1/2 z-30 h-1/2 w-1/2 -translate-x-1/2 -translate-y-1/2 transform",e?"text-blue-500":"text-purple-500")}),e&&N.jsx(br,{className:"absolute left-1/2 top-1/2 z-30 h-1/3 w-1/3 -translate-x-1/2 -translate-y-1/2 transform text-blue-500"})]}):N.jsx(Dr,{title:"Acesso à câmera bloqueado",description:"Libere o acesso à câmera e atualize a página para usar esta funcionalidade"})}),n&&N.jsxs("div",{className:"flex flex-1 flex-col space-y-4 overflow-auto p-4 text-gray-700",children:[N.jsx("div",{className:"text-center text-base font-medium",children:"Leia o QR Code presente na impressão do pedido para atribuí-lo a você"}),N.jsxs("div",{className:"flex flex-1 flex-col overflow-auto",children:[e?N.jsxs("div",{className:"flex items-center space-x-3.5 rounded-md border border-solid border-blue-300 p-3.5",children:[N.jsx(or,{className:"text-blue-400",size:24}),N.jsx("span",{className:"font-bold text-blue-400",children:"Processando QR Code"})]}):N.jsxs("div",{className:"flex items-center space-x-3.5 rounded-md border border-solid border-purple-300 p-3.5",children:[N.jsx("span",{className:"relative flex h-6 w-6 items-center justify-center",children:N.jsxs("div",{className:"relative flex h-3.5 w-3.5",children:[N.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-purple-400 opacity-75"}),N.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full bg-purple-400"})]})}),N.jsx("span",{className:"font-bold text-purple-400",children:"Buscando QR Code"})]}),r.length>0&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"mt-3 border-t border-dashed border-gray-300"}),N.jsx("div",{className:"flex-1 space-y-3 overflow-auto pt-3",children:r.map(u=>N.jsx(Oe,{scan:u},u.id))})]})]})]})]})}Ar.propTypes={historic:z.arrayOf(z.shape({id:z.number,orderUid:z.string,description:z.string,success:z.bool})).isRequired,processOrder:z.func.isRequired,loading:z.bool.isRequired};function Ki(){const r=Tr(),[t,e]=lt.useState([]),[n,o]=lt.useState(!1),{mutate:i}=Mr(),[a,s]=lt.useState(0),u=(l,h)=>{s(h)},c=lt.useCallback(async l=>{var h,d;o(!0);try{const g={};l.orderUid&&(g.order_uid=l.orderUid),l.orderNumber&&(g.order_number=l.orderNumber);const y=await Pr(g);l.description=`Pedido ${y.order_number} atribuído com sucesso`,l.success=!0,await i()}catch(g){l.success=!1,l.description=((d=(h=g.response)==null?void 0:h.data)==null?void 0:d.message)||"Erro ao atribuir pedido"}e(g=>[l,...g]),o(!1)},[i]),f=lt.useCallback(()=>{r.push({hash:null,search:null})},[r]);return N.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[N.jsx(Rr,{title:"Atribuir pedido",onClose:f}),N.jsxs(Br,{value:a,indicatorColor:"primary",textColor:"primary",onChange:u,variant:"fullWidth",className:"mt-1 border-b border-gray-200",children:[N.jsx(Pe,{label:"QR Code"}),N.jsx(Pe,{label:"Código do pedido"})]}),a===0&&N.jsx(Ar,{loading:n,historic:t,processOrder:c}),a===1&&N.jsx(ir,{loading:n,historic:t,processOrder:c})]})}export{Ki as default};
21
22//# debugId=07062141-e705-5145-b835-c4cd6a4a64f2

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.