@dcodegroup-au/dsg-vue 0.0.31 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dsg-vue.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-BaEuuE3O.cjs"),f=require("vue"),Ya=require("./DsgColoursConfig-D7UiFGB5.cjs"),Gi=require("./DsgLabel.vue_vue_type_style_index_0_lang-gCBicmCZ.cjs"),Ka=f.defineComponent({__name:"DsgMiscIcon",props:{theme:{default:"brand"},type:{default:"light-outline"},size:{default:"lg"},icon:{},classes:{default:""}},setup(t){const e=["dsg-misc-icon",`dsg-misc-icon--${t.theme}`,`dsg-misc-icon--${t.type}`,`dsg-misc-icon--${t.size}`,t.classes].join(" ").replace(/\s+/g," ").trim();return(r,n)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(e))},[f.createVNode(V._sfc_main,f.normalizeProps(f.guardReactiveProps(r.icon)),null,16)],2))}}),kr=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},Et=kr(Ka,[["__scopeId","data-v-6f50208c"]]),Za=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-CW51CLZ4.cjs"),f=require("vue"),Ya=require("./DsgColoursConfig-D7UiFGB5.cjs"),Gi=require("./DsgLabel.vue_vue_type_style_index_0_lang-gCBicmCZ.cjs"),Ka=f.defineComponent({__name:"DsgMiscIcon",props:{theme:{default:"brand"},type:{default:"light-outline"},size:{default:"lg"},icon:{},classes:{default:""}},setup(t){const e=["dsg-misc-icon",`dsg-misc-icon--${t.theme}`,`dsg-misc-icon--${t.type}`,`dsg-misc-icon--${t.size}`,t.classes].join(" ").replace(/\s+/g," ").trim();return(r,n)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(e))},[f.createVNode(V._sfc_main,f.normalizeProps(f.guardReactiveProps(r.icon)),null,16)],2))}}),Fr=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},Ct=Fr(Ka,[["__scopeId","data-v-6f50208c"]]),Za=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <g id="Size=4xl" clip-path="url(#clip0_3302_422487)">
3
3
  <path id="Vector" d="M24.711 5.66721C25.0149 6.40224 25.5983 6.98649 26.3328 7.29151L28.9086 8.35843C29.6437 8.66292 30.2277 9.24694 30.5322 9.98202C30.8367 10.7171 30.8367 11.543 30.5322 12.2781L29.466 14.8521C29.1614 15.5875 29.161 16.4142 29.467 17.1493L30.5313 19.7224C30.6822 20.0865 30.76 20.4768 30.76 20.8709C30.7601 21.265 30.6825 21.6553 30.5317 22.0194C30.3808 22.3836 30.1597 22.7144 29.881 22.993C29.6023 23.2717 29.2714 23.4927 28.9072 23.6434L26.3333 24.7096C25.5982 25.0135 25.014 25.5968 24.709 26.3314L23.642 28.9072C23.3376 29.6423 22.7535 30.2263 22.0185 30.5308C21.2834 30.8353 20.4574 30.8353 19.7224 30.5308L17.1484 29.4646C16.4133 29.1609 15.5877 29.1615 14.853 29.4663L12.2773 30.5317C11.5426 30.8355 10.7174 30.8353 9.98289 30.531C9.2484 30.2268 8.6647 29.6435 8.36001 28.9092L7.29277 26.3326C6.98885 25.5976 6.40548 25.0133 5.67091 24.7083L3.09514 23.6414C2.36037 23.337 1.77652 22.7534 1.47193 22.0187C1.16734 21.2841 1.16692 20.4585 1.47078 19.7236L2.53694 17.1496C2.84067 16.4145 2.84005 15.5889 2.53521 14.8542L1.47059 12.2766C1.31964 11.9125 1.24192 11.5223 1.24186 11.1282C1.24179 10.734 1.31939 10.3438 1.47022 9.97962C1.62104 9.6155 1.84214 9.28466 2.12088 9.00601C2.39961 8.72737 2.73052 8.50638 3.09469 8.35567L5.66862 7.28951C6.40301 6.98586 6.98691 6.40322 7.29216 5.6695L8.35908 3.09372C8.66357 2.35864 9.24759 1.77461 9.98267 1.47013C10.7178 1.16565 11.5437 1.16565 12.2788 1.47013L14.8527 2.53629C15.5878 2.84002 16.4134 2.8394 17.1481 2.53456L19.7249 1.47178C20.4599 1.16747 21.2857 1.16754 22.0206 1.47196C22.7556 1.77638 23.3395 2.36023 23.644 3.09513L24.7113 5.67167L24.711 5.66721Z" fill="#0788F5"/>
4
4
  <path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M22.2665 11.8058C22.4803 11.4701 22.5519 11.0631 22.4656 10.6746C22.3794 10.286 22.1423 9.94759 21.8065 9.73383C21.4708 9.52006 21.0638 9.44843 20.6753 9.5347C20.2867 9.62097 19.9483 9.85806 19.7345 10.1938L13.8605 19.4238L11.1725 16.0638C10.924 15.753 10.5622 15.5536 10.1667 15.5095C9.77118 15.4655 9.37436 15.5803 9.06352 15.8288C8.75269 16.0773 8.55331 16.4391 8.50923 16.8347C8.46516 17.2302 8.58001 17.627 8.82852 17.9378L12.8285 22.9378C12.9776 23.1244 13.1691 23.2727 13.387 23.3703C13.6049 23.468 13.843 23.5122 14.0815 23.4993C14.32 23.4864 14.5519 23.4167 14.758 23.2961C14.9641 23.1755 15.1385 23.0074 15.2665 22.8058L22.2665 11.8058Z" fill="white"/>
@@ -9,14 +9,14 @@
9
9
  </clipPath>
10
10
  </defs>
11
11
  </svg>
12
- `,qa=["href","title"],Qa={class:"dsg-avatar--image-wrapper",tabindex:"0",ref:"avatarImageWrapperEl"},Ja=["src","alt"],eo={key:1,class:"dsg-avatar--initials"},to={class:"dsg-avatar--status"},ro={key:0,class:"dsg-avatar--activity"},no=["innerHTML"],io={key:2,class:"dsg-avatar--logo"},ao=["src","alt"],oo={key:0,class:"dsg-avatar--info"},so={class:"dsg-avatar--title"},lo={class:"dsg-avatar--subtext"},ir=f.defineComponent({__name:"DsgAvatar",props:{profileUri:{default:""},fullName:{default:""},size:{default:"md"},theme:{default:"activity"},isOnline:{type:Boolean,default:!1},uri:{default:()=>{}},classes:{default:""},companyLogoUri:{default:()=>{}},preventDefault:{type:Boolean,default:!1},title:{default:""},subText:{default:""},noFocus:{type:Boolean,default:!1}},emits:["avatar-clicked","before-change-status","after-change-status"],setup(t,{expose:e,emit:r}){const n=["dsg-avatar",`dsg-avatar--${t.size}`,`dsg-avatar--${t.theme}`,`dsg-avatar--${t.isOnline?"online":"offline"}`,`dsg-avatar--${t.title?.length?"has-info":"no-info"}`,`dsg-avatar--${t.uri?"has-link":"no-link"}`,`dsg-avatar--${t.noFocus?"no-focus":"focus"}`,`dsg-avatar--${["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1?"profile-photo":"non-profile-photo"}`,t.classes].join(" ");["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1&&(["sm","md","lg"].indexOf(t.size)===-1&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'profile-photo' theme only supports the 'sm', 'md', and 'lg' sizes."),(t.fullName||t.title||t.subText)&&new V.DsgWarning("DsgAvatar: The 'profile-photo' theme will not display the 'title' or 'subText' props.")),t.theme==="logo"&&!t.companyLogoUri&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'logo' theme requires a 'companyLogoUri' prop."),["activity","verified","logo"].indexOf(t.theme)!==-1&&t.title?.length&&t.subText?.length&&["xs","sm","md","lg","xl","2xl"].indexOf(t.size)===-1&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'activity', 'verified', and 'logo' themes only support the 'xs', 'sm', 'md', 'lg', and 'xl' sizes when 'title' and 'subText' are provided."),t.theme==="tile"&&!t.title?.length&&!t.fullName&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'tile' theme requires either 'title' or 'fullName' prop."),t.size==="xxs"&&(t.title?.length||t.subText?.length)&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'xxs' size does not support the 'title' or 'subText' props.");const i=v=>{const h=v.split(" ");return(h[0].charAt(0)+h[h.length-1].charAt(0)).toUpperCase()},a=()=>t.fullName?"Avatar of "+t.fullName:"Avatar",o=r,s=f.ref(!1),l=v=>{o("before-change-status",s.value,v),s.value=v,o("after-change-status",s.value)},u=f.useTemplateRef("avatarImageWrapperEl"),c=v=>{t.preventDefault||(o("avatar-clicked",v),u.value&&!t.uri&&u.value.focus())};return e({setUserActiveStatus:l,toggleFocus:v=>{u.value&&(v?u.value.focus():u.value.blur())}}),(v,h)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(n))},[f.createElementVNode("a",{class:"dsg-avatar--link",href:v.uri,title:a(),target:"_blank",ref:"avatarLink",onClick:c},[f.createElementVNode("div",Qa,[f.renderSlot(v.$slots,"dsg-avatar--background",{},()=>[v.profileUri?(f.openBlock(),f.createElementBlock("img",{key:0,class:"dsg-avatar--profile-image",src:v.profileUri,alt:a()},null,8,Ja)):f.createCommentVNode("",!0),!v.profileUri&&v.fullName?(f.openBlock(),f.createElementBlock("span",eo,f.toDisplayString(i(v.fullName)),1)):f.createCommentVNode("",!0),!v.profileUri&&!v.fullName?(f.openBlock(),f.createBlock(V._sfc_main,{key:2,class:"dsg-avatar--user-icon",icon:"user-01",color:f.unref(Ya.ColoursConfig).gray[600],size:v.size},null,8,["color","size"])):f.createCommentVNode("",!0)]),["tile"].indexOf(v.theme)===-1?f.renderSlot(v.$slots,"dsg-avatar--status",{key:0},()=>[f.createElementVNode("div",to,[v.theme==="activity"&&v.isOnline?(f.openBlock(),f.createElementBlock("span",ro)):f.createCommentVNode("",!0),["verified","profile-photo-verified"].indexOf(v.theme)!==-1?(f.openBlock(),f.createElementBlock("span",{key:1,class:"dsg-avatar--verified",innerHTML:f.unref(Za)},null,8,no)):f.createCommentVNode("",!0),v.theme==="logo"?(f.openBlock(),f.createElementBlock("span",io,[f.createElementVNode("img",{src:v.companyLogoUri,alt:a(),class:"dsg-avatar--company-logo"},null,8,ao)])):f.createCommentVNode("",!0)])]):f.createCommentVNode("",!0)],512),v.title?.length||v.theme==="tile"&&(v.title?.length||v.fullName)?(f.openBlock(),f.createElementBlock("div",oo,[v.title?.length||v.theme==="tile"&&(v.title?.length||v.fullName)?f.renderSlot(v.$slots,"dsg-avatar--title",{key:0},()=>[f.createElementVNode("h3",so,f.toDisplayString(v.title?.length?v.title:v.fullName),1)]):f.createCommentVNode("",!0),v.subText?.length?f.renderSlot(v.$slots,"dsg-avatar--subtext",{key:1},()=>[f.createElementVNode("p",lo,f.toDisplayString(v.subText),1)]):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],8,qa)],2))}}),ur={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Ot={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},Ae={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},uo={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},fo={dangerouslyHTMLString:!1,multiple:!0,position:ur.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},co={rtl:!1,newestOnTop:!1,toastClassName:""},zi={...fo,...co};Ae.DEFAULT;var Y=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(Y||{}),xn=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(xn||{});const ho={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},vo={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},po={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},go={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},qn="Toastify--animate Toastify__none-enter";function Wi(t,e=!1){var r;let n=ho;if(!t||typeof t=="string")switch(t){case"flip":n=go;break;case"zoom":n=po;break;case"slide":n=vo;break}else n=t;if(e)n.enter=qn;else if(n.enter===qn){const i=(r=n.exit.split("__")[1])==null?void 0:r.split("-")[0];n.enter=`Toastify--animate Toastify__${i}-enter`}return n}function xo(t){return t.containerId||String(t.position)}const Mr="will-unmount";function yo(t=ur.TOP_RIGHT){return!!document.querySelector(`.${Y.CSS_NAMESPACE}__toast-container--${t}`)}function mo(t=ur.TOP_RIGHT){return`${Y.CSS_NAMESPACE}__toast-container--${t}`}function wo(t,e,r=!1){const n=[`${Y.CSS_NAMESPACE}__toast-container`,`${Y.CSS_NAMESPACE}__toast-container--${t}`,r?`${Y.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return bt(e)?e({position:t,rtl:r,defaultClassName:n}):`${n} ${e||""}`}function _o(t){var e;const{position:r,containerClassName:n,rtl:i=!1,style:a={}}=t,o=Y.CSS_NAMESPACE,s=mo(r),l=document.querySelector(`.${o}`),u=document.querySelector(`.${s}`),c=!!u&&!((e=u.className)!=null&&e.includes(Mr)),d=l||document.createElement("div"),v=document.createElement("div");v.className=wo(r,n,i),v.dataset.testid=`${Y.CSS_NAMESPACE}__toast-container--${r}`,v.id=xo(t);for(const h in a)if(Object.prototype.hasOwnProperty.call(a,h)){const p=a[h];v.style[h]=p}return l||(d.className=Y.CSS_NAMESPACE,document.body.appendChild(d)),c||d.appendChild(v),v}function yn(t){var e,r,n;const i=typeof t=="string"?t:((e=t.currentTarget)==null?void 0:e.id)||((r=t.target)==null?void 0:r.id),a=document.getElementById(i);a&&a.removeEventListener("animationend",yn,!1);try{ar[i].unmount(),(n=document.getElementById(i))==null||n.remove(),delete ar[i],delete ge[i]}catch{}}const ar=f.reactive({});function Eo(t,e){const r=document.getElementById(String(e));r&&(ar[r.id]=t)}function mn(t,e=!0){const r=String(t);if(!ar[r])return;const n=document.getElementById(r);n&&n.classList.add(Mr),e?(Co(t),n&&n.addEventListener("animationend",yn,!1)):yn(r),Ye.items=Ye.items.filter(i=>i.containerId!==t)}function Ao(t){for(const e in ar)mn(e,t);Ye.items=[]}function Xi(t,e){const r=document.getElementById(t.toastId);if(r){let n=t;n={...n,...Wi(n.transition)};const i=n.appendPosition?`${n.exit}--${n.position}`:n.exit;r.className+=` ${i}`,e&&e(r)}}function Co(t){for(const e in ge)if(e===t)for(const r of ge[e]||[])Xi(r)}function bo(t){const e=Tt().find(r=>r.toastId===t);return e?.containerId}function Vn(t){return document.getElementById(t)}function So(t){const e=Vn(t.containerId);return e&&e.classList.contains(Mr)}function Qn(t){var e;const r=f.isVNode(t.content)?f.toRaw(t.content.props):null;return r??f.toRaw((e=t.data)!=null?e:{})}function Io(t){return t?Ye.items.filter(e=>e.containerId===t).length>0:Ye.items.length>0}function Oo(){if(Ye.items.length>0){const t=Ye.items.shift();_r(t?.toastContent,t?.toastProps)}}const ge=f.reactive({}),Ye=f.reactive({items:[]});function Tt(){const t=f.toRaw(ge);return Object.values(t).reduce((e,r)=>[...e,...r],[])}function To(t){return Tt().find(e=>e.toastId===t)}function _r(t,e={}){if(So(e)){const r=Vn(e.containerId);r&&r.addEventListener("animationend",wn.bind(null,t,e),!1)}else wn(t,e)}function wn(t,e={}){const r=Vn(e.containerId);r&&r.removeEventListener("animationend",wn.bind(null,t,e),!1);const n=ge[e.containerId]||[],i=n.length>0;if(!i&&!yo(e.position)){const a=_o(e),o=f.createApp(Ko,e);e.useHandler&&e.useHandler(o),o.mount(a),Eo(o,a.id)}i&&!e.updateId&&(e.position=n[0].position),f.nextTick(()=>{e.updateId?Be.update(e):Be.add(t,e)})}const Be={add(t,e){const{containerId:r=""}=e;r&&(ge[r]=ge[r]||[],ge[r].find(n=>n.toastId===e.toastId)||setTimeout(()=>{var n,i;e.newestOnTop?(n=ge[r])==null||n.unshift(e):(i=ge[r])==null||i.push(e),e.onOpen&&e.onOpen(Qn(e))},e.delay||0))},remove(t){if(t){const e=bo(t);if(e){const r=ge[e];let n=r.find(i=>i.toastId===t);ge[e]=r.filter(i=>i.toastId!==t),!ge[e].length&&!Io(e)&&mn(e,!1),Oo(),f.nextTick(()=>{n!=null&&n.onClose&&(n.onClose(Qn(n)),n=void 0)})}}},update(t={}){const{containerId:e=""}=t;if(e&&t.updateId){ge[e]=ge[e]||[];const r=ge[e].find(a=>a.toastId===t.toastId),n=r?.position!==t.position||r?.transition!==t.transition,i={...t,disabledEnterTransition:!n,updateId:void 0};Be.dismissForce(t?.toastId),setTimeout(()=>{J(i.content,i)},t.delay||0)}},clear(t,e=!0){t?mn(t,e):Ao(e)},dismissCallback(t){var e;const r=(e=t.currentTarget)==null?void 0:e.id,n=document.getElementById(r);n&&(n.removeEventListener("animationend",Be.dismissCallback,!1),setTimeout(()=>{Be.remove(r)}))},dismiss(t){if(t){const e=Tt();for(const r of e)if(r.toastId===t){Xi(r,n=>{n.addEventListener("animationend",Be.dismissCallback,!1)});break}}},dismissForce(t){if(t){const e=Tt();for(const r of e)if(r.toastId===t){const n=document.getElementById(t);n&&(n.remove(),n.removeEventListener("animationend",Be.dismissCallback,!1),Be.remove(t));break}}}},No=f.reactive({useHandler:void 0}),ji=f.reactive({}),Tr=f.reactive({});function Yi(){return Math.random().toString(36).substring(2,9)}function Do(t){return typeof t=="number"&&!isNaN(t)}function _n(t){return typeof t=="string"}function bt(t){return typeof t=="function"}function Lr(...t){return f.mergeProps(...t)}function Er(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof t?.type=="object")}function Bo(t={}){ji[`${Y.CSS_NAMESPACE}-default-options`]=t}function Ro(){return ji[`${Y.CSS_NAMESPACE}-default-options`]||zi}function Po(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var Ar=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(Ar||{});const Ki={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:ur.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:Ot.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:Ae.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},ko={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Ae.DEFAULT},theme:{type:String,required:!1,default:Ot.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},Mo=f.defineComponent({name:"ProgressBar",props:ko,setup(t,{attrs:e}){const r=f.ref(),n=f.computed(()=>t.hide?"true":"false"),i=f.computed(()=>({...e.style||{},animationDuration:`${t.autoClose===!0?5e3:t.autoClose}ms`,animationPlayState:t.isRunning?"running":"paused",opacity:t.hide||t.autoClose===!1?0:1,transform:t.controlledProgress?`scaleX(${t.progress})`:"none"})),a=f.computed(()=>[`${Y.CSS_NAMESPACE}__progress-bar`,t.controlledProgress?`${Y.CSS_NAMESPACE}__progress-bar--controlled`:`${Y.CSS_NAMESPACE}__progress-bar--animated`,`${Y.CSS_NAMESPACE}__progress-bar-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__progress-bar--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),o=f.computed(()=>`${a.value} ${e?.class||""}`),s=()=>{r.value&&(r.value.onanimationend=null,r.value.ontransitionend=null)},l=()=>{t.isIn&&t.closeToast&&t.autoClose!==!1&&(t.closeToast(),s())},u=f.computed(()=>t.controlledProgress?null:l),c=f.computed(()=>t.controlledProgress?l:null);return f.watchEffect(()=>{r.value&&(s(),r.value.onanimationend=u.value,r.value.ontransitionend=c.value)}),()=>f.createVNode("div",{ref:r,role:"progressbar","aria-hidden":n.value,"aria-label":"notification timer",class:o.value,style:i.value},null)}}),Lo=f.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:Ot.AUTO},type:{type:String,required:!1,default:Ot.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(t){return()=>f.createVNode("button",{class:`${Y.CSS_NAMESPACE}__close-button ${Y.CSS_NAMESPACE}__close-button--${t.theme}`,type:"button",onClick:e=>{e.stopPropagation(),t.closeToast&&t.closeToast(e)},"aria-label":t.ariaLabel},[f.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[f.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),Fr=({theme:t,type:e,path:r,...n})=>f.createVNode("svg",f.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`},n),[f.createVNode("path",{d:r},null)]);function Fo(t){return f.createVNode(Fr,f.mergeProps(t,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function Vo(t){return f.createVNode(Fr,f.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function Uo(t){return f.createVNode(Fr,f.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function $o(t){return f.createVNode(Fr,f.mergeProps(t,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function Ho(){return f.createVNode("div",{class:`${Y.CSS_NAMESPACE}__spinner`},null)}const Cr={info:Vo,warning:Fo,success:Uo,error:$o,spinner:Ho},Go=t=>t in Cr;function zo({theme:t,type:e,isLoading:r,icon:n}){let i;const a=!!r||e==="loading",o={theme:t,type:e};if(a&&(n===void 0||typeof n=="boolean"))return Cr.spinner();if(n!==!1){if(Er(n))i=f.toRaw(n);else if(bt(n)){const s=n;o.type=a?"loading":e,i=s(o),i=!i&&a?Cr.spinner():i}else f.isVNode(n)?i=f.cloneVNode(n,o):_n(n)||Do(n)?i=n:Go(e)&&(i=Cr[e](o));return i}}const Wo=()=>{};function Xo(t,e,r=Y.COLLAPSE_DURATION){const{scrollHeight:n,style:i}=t,a=r;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition=`all ${a}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,a)})})}function jo(t){const e=f.ref(!1),r=f.ref(!1),n=f.ref(!1),i=f.ref(Ar.Enter),a=f.reactive({...t,appendPosition:t.appendPosition||!1,collapse:typeof t.collapse>"u"?!0:t.collapse,collapseDuration:t.collapseDuration||Y.COLLAPSE_DURATION}),o=a.done||Wo,s=f.computed(()=>a.appendPosition?`${a.enter}--${a.position}`:a.enter),l=f.computed(()=>a.appendPosition?`${a.exit}--${a.position}`:a.exit),u=f.computed(()=>t.pauseOnHover?{onMouseenter:m,onMouseleave:g}:{});function c(){const y=s.value.split(" ");v().addEventListener(xn.ENTRANCE_ANIMATION_END,g,{once:!0});const _=C=>{const D=v();C.target===D&&(D.dispatchEvent(new Event(xn.ENTRANCE_ANIMATION_END)),D.removeEventListener("animationend",_),D.removeEventListener("animationcancel",_),i.value===Ar.Enter&&C.type!=="animationcancel"&&D.classList.remove(...y))},A=()=>{const C=v();C.classList.add(...y),C.addEventListener("animationend",_),C.addEventListener("animationcancel",_)};t.pauseOnFocusLoss&&h(),A()}function d(){if(!v())return;const y=()=>{const A=v();A.removeEventListener("animationend",y),a.collapse?Xo(A,o,a.collapseDuration):o()},_=()=>{const A=v();i.value=Ar.Exit,A&&(A.className+=` ${l.value}`,A.addEventListener("animationend",y))};r.value||(n.value?y():setTimeout(_))}function v(){return t.toastRef.value}function h(){document.hasFocus()||m(),window.addEventListener("focus",g),window.addEventListener("blur",m)}function p(){window.removeEventListener("focus",g),window.removeEventListener("blur",m)}function g(){(!t.loading.value||t.isLoading===void 0)&&(e.value=!0)}function m(){e.value=!1}function w(y){y&&(y.stopPropagation(),y.preventDefault()),r.value=!1}return f.watchEffect(d),f.watchEffect(()=>{const y=Tt();r.value=y.findIndex(_=>_.toastId===a.toastId)>-1}),f.watchEffect(()=>{t.isLoading!==void 0&&(t.loading.value?m():g())}),f.onMounted(c),f.onUnmounted(()=>{t.pauseOnFocusLoss&&p()}),{isIn:r,isRunning:e,hideToast:w,eventHandlers:u}}const Yo=f.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Ki,setup(t){const e=f.ref(),r=f.computed(()=>!!t.isLoading),n=f.computed(()=>t.progress!==void 0&&t.progress!==null),i=f.computed(()=>zo(t)),a=f.computed(()=>[`${Y.CSS_NAMESPACE}__toast`,`${Y.CSS_NAMESPACE}__toast-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__toast--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__toast--rtl`:void 0,t.toastClassName||""].filter(Boolean).join(" ")),{isRunning:o,isIn:s,hideToast:l,eventHandlers:u}=jo({toastRef:e,loading:r,done:()=>{Be.remove(t.toastId)},...Wi(t.transition,t.disabledEnterTransition),...t});return()=>f.createVNode("div",f.mergeProps({id:t.toastId,class:a.value,style:t.toastStyle||{},ref:e,"data-testid":`toast-item-${t.toastId}`,onClick:c=>{t.closeOnClick&&l(),t.onClick&&t.onClick(c)}},u.value),[f.createVNode("div",{role:t.role,"data-testid":"toast-body",class:`${Y.CSS_NAMESPACE}__toast-body ${t.bodyClassName||""}`},[i.value!=null&&f.createVNode("div",{"data-testid":`toast-icon-${t.type}`,class:[`${Y.CSS_NAMESPACE}__toast-icon`,t.isLoading?"":`${Y.CSS_NAMESPACE}--animate-icon ${Y.CSS_NAMESPACE}__zoom-enter`].join(" ")},[Er(i.value)?f.h(f.toRaw(i.value),{theme:t.theme,type:t.type}):bt(i.value)?i.value({theme:t.theme,type:t.type}):i.value]),f.createVNode("div",{"data-testid":"toast-content"},[Er(t.content)?f.h(f.toRaw(t.content),{toastProps:f.toRaw(t),closeToast:l,data:t.data,...t.expandCustomProps?t.contentProps:{contentProps:t.contentProps||{}}}):bt(t.content)?t.content({toastProps:f.toRaw(t),closeToast:l,data:t.data}):t.dangerouslyHTMLString?f.h("div",{innerHTML:t.content}):t.content])]),(t.closeButton===void 0||t.closeButton===!0)&&f.createVNode(Lo,{theme:t.theme,closeToast:c=>{c.stopPropagation(),c.preventDefault(),l()}},null),Er(t.closeButton)?f.h(f.toRaw(t.closeButton),{closeToast:l,type:t.type,theme:t.theme}):bt(t.closeButton)?t.closeButton({closeToast:l,type:t.type,theme:t.theme}):null,f.createVNode(Mo,{className:t.progressClassName,style:t.progressStyle,rtl:t.rtl,theme:t.theme,isIn:s.value,type:t.type,hide:t.hideProgressBar,isRunning:o.value,autoClose:t.autoClose,controlledProgress:n.value,progress:t.progress,closeToast:t.isLoading?void 0:l},null)])}});let rr=0;function Zi(){typeof window>"u"||(rr&&window.cancelAnimationFrame(rr),rr=window.requestAnimationFrame(Zi),Tr.lastUrl!==window.location.href&&(Tr.lastUrl=window.location.href,Be.clear()))}const Ko=f.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Ki,setup(t){const e=f.computed(()=>t.containerId),r=f.computed(()=>ge[e.value]||[]),n=f.computed(()=>r.value.filter(i=>i.position===t.position));return f.onMounted(()=>{typeof window<"u"&&t.clearOnUrlChange&&window.requestAnimationFrame(Zi)}),f.onUnmounted(()=>{typeof window<"u"&&rr&&(window.cancelAnimationFrame(rr),Tr.lastUrl="")}),()=>f.createVNode(f.Fragment,null,[n.value.map(i=>{const{toastId:a=""}=i;return f.createVNode(Yo,f.mergeProps({key:a},i),null)})])}});let jr=!1;const qi={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Qi(){const t=[];return Tt().forEach(e=>{const r=document.getElementById(e.containerId);r&&!r.classList.contains(Mr)&&t.push(e)}),t}function Zo(t){const e=Qi().length,r=t??0;return r>0&&e+Ye.items.length>=r}function qo(t){Zo(t.limit)&&!t.updateId&&Ye.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function ft(t,e,r={}){if(jr)return;r=Lr(Ro(),{type:e},f.toRaw(r)),(!r.toastId||typeof r.toastId!="string"&&typeof r.toastId!="number")&&(r.toastId=Yi()),r={...r,...r.type==="loading"?qi:{},content:t,containerId:r.containerId||String(r.position)};const n=Number(r?.progress);return!isNaN(n)&&n<0&&(r.progress=0),n>1&&(r.progress=1),r.theme==="auto"&&(r.theme=Po()),qo(r),Tr.lastUrl=window.location.href,r.multiple?Ye.items.length?r.updateId&&_r(t,r):_r(t,r):(jr=!0,J.clearAll(void 0,!1),setTimeout(()=>{_r(t,r)},0),setTimeout(()=>{jr=!1},390)),r.toastId}const J=(t,e)=>ft(t,Ae.DEFAULT,e);J.info=(t,e)=>ft(t,Ae.DEFAULT,{...e,type:Ae.INFO});J.error=(t,e)=>ft(t,Ae.DEFAULT,{...e,type:Ae.ERROR});J.warning=(t,e)=>ft(t,Ae.DEFAULT,{...e,type:Ae.WARNING});J.warn=J.warning;J.success=(t,e)=>ft(t,Ae.DEFAULT,{...e,type:Ae.SUCCESS});J.loading=(t,e)=>ft(t,Ae.DEFAULT,Lr(e,qi));J.dark=(t,e)=>ft(t,Ae.DEFAULT,Lr(e,{theme:Ot.DARK}));J.remove=t=>{t?Be.dismiss(t):Be.clear()};J.clearAll=(t,e)=>{f.nextTick(()=>{Be.clear(t,e)})};J.isActive=t=>{let e=!1;return e=Qi().findIndex(r=>r.toastId===t)>-1,e};J.update=(t,e={})=>{setTimeout(()=>{const r=To(t);if(r){const n=f.toRaw(r),{content:i}=n,a={...n,...e,toastId:e.toastId||t,updateId:Yi()},o=a.render||i;delete a.render,ft(o,a.type,a)}},0)};J.done=t=>{J.update(t,{isLoading:!1,progress:1})};J.promise=Qo;function Qo(t,{pending:e,error:r,success:n},i){var a,o,s;let l;const u={...i||{},autoClose:!1};e&&(l=_n(e)?J.loading(e,u):J.loading(e.render,{...u,...e}));const c={autoClose:(a=i?.autoClose)!=null?a:!0,closeOnClick:(o=i?.closeOnClick)!=null?o:!0,closeButton:(s=i?.autoClose)!=null?s:null,isLoading:void 0,draggable:null,delay:100},d=(h,p,g)=>{if(p==null){J.remove(l);return}const m={type:h,...c,...i,data:g},w=_n(p)?{render:p}:p;return l?J.update(l,{...m,...w,isLoading:!1}):J(w.render,{...m,...w,isLoading:!1}),g},v=bt(t)?t():t;return v.then(h=>{d("success",n,h)}).catch(h=>{d("error",r,h)}),v}J.POSITION=ur;J.THEME=Ot;J.TYPE=Ae;J.TRANSITIONS=uo;const Jo={install(t,e={}){No.useHandler=e.useHandler||(()=>{}),es(e)}};typeof window<"u"&&(window.Vue3Toastify=Jo);function es(t={}){const e=Lr(zi,t);Bo(e)}const ts={class:"dsg-alert__wrapper"},rs=["innerHTML"],Ji=f.defineComponent({__name:"DsgAlertComponent",props:{contentProps:{default:()=>({title:"",message:"",type:"gray",hasCloseButton:!0,useToast:!0})}},setup(t){const e=["dsg-alert","dsg-alert--"+t.contentProps.type,t.contentProps.hasCloseButton?"dsg-alert--has-close":"dsg-alert--no-close"],n=f.useAttrs().closeToast,i=()=>{n()};return(a,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(e)},[a.contentProps.type==="gray"?(f.openBlock(),f.createBlock(Et,{key:0,icon:{icon:"info-circle"},type:"outline",theme:"gray",size:"lg"})):f.createCommentVNode("",!0),a.contentProps.type==="error"?(f.openBlock(),f.createBlock(Et,{key:1,icon:{icon:"alert-circle"},type:"outline",theme:"error",size:"lg"})):f.createCommentVNode("",!0),a.contentProps.type==="warning"?(f.openBlock(),f.createBlock(Et,{key:2,icon:{icon:"alert-circle"},type:"outline",theme:"warning",size:"lg"})):f.createCommentVNode("",!0),a.contentProps.type==="success"?(f.openBlock(),f.createBlock(Et,{key:3,icon:{icon:"check-circle"},type:"outline",theme:"success",size:"lg"})):f.createCommentVNode("",!0),f.createElementVNode("div",ts,[f.createElementVNode("p",{class:f.normalizeClass(["dsg-alert__title",{"dsg-alert__title--with-close-button":a.contentProps.hasCloseButton}])},f.toDisplayString(a.contentProps.title),3),a.contentProps.message?(f.openBlock(),f.createElementBlock("p",{key:0,innerHTML:a.contentProps.message,class:"dsg-alert__message"},null,8,rs)):f.createCommentVNode("",!0)]),a.contentProps.hasCloseButton?(f.openBlock(),f.createElementBlock("button",{key:4,onClick:i,class:"dsg-alert__close-button"},[f.createVNode(V._sfc_main,{icon:"x-close",size:"sm"})])):f.createCommentVNode("",!0)]))}}),ns=new class Yt{info(e="",r="",n={}){Yt.showToast("gray",e,r,n)}error(e="",r="",n={}){Yt.showToast("error",e,r,n)}warning(e="",r="",n={}){Yt.showToast("warning",e,r,n)}success(e="",r="",n={}){Yt.showToast("success",e,r,n)}static showToast(e,r,n,i){const a={hasCloseButton:!1,position:"top-right",maxWidthClass:"",...i};J(Ji,{autoClose:!a.hasCloseButton,closeButton:!1,hideProgressBar:!0,closeOnClick:!a.hasCloseButton,position:a.position,containerClassName:`dsg-alert-container ${a.maxWidthClass}`,toastClassName:"dsg-alert",bodyClassName:"dsg-alert--body",contentProps:{title:r,message:n,type:e,hasCloseButton:a.hasCloseButton},onClick:()=>{}})}},is={class:"dsg-badge--before"},as={key:2,class:"dsg-badge--dot"},os={key:1,class:"dsg-badge--label"},ss={class:"dsg-badge--after"},ls={key:1,class:"dsg-badge--close-wrapper"},ea=f.defineComponent({__name:"DsgBadge",props:{label:{default:""},classes:{default:""},type:{default:"standard"},size:{default:"md"},hasClose:{type:Boolean,default:!1},avatarUri:{default:""},iconBefore:{default:""},icon:{default:""},iconAfter:{default:""},iconOnly:{type:Boolean,default:!1},hasDot:{type:Boolean,default:!1},theme:{default:"badge-modern"},themeColor:{default:"gray"},destroyOnClose:{type:Boolean,default:!1}},emits:["before-hide","after-hide","before-destroy","after-destroy","on-click"],setup(t,{expose:e,emit:r}){const n=t.iconBefore||t.iconAfter||t.type==="add"||t.type==="icon-only",i=["dsg-badge",`dsg-badge--${t.size}`,`dsg-badge--${t.type}`,`dsg-badge--${t.theme}`,`dsg-badge--${t.themeColor}`,`dsg-badge--${t.iconOnly?"icon-only":"label"}`,`${t.hasClose?"dsg-badge--has-close":""}`,`${t.avatarUri?"dsg-badge--has-avatar":""}`,`${t.hasDot?"dsg-badge--has-dot":""}`,`${n?"dsg-badge--has-icon":""}`,`${t.iconBefore?"dsg-badge--has-icon-before":""}`,`${t.iconAfter?"dsg-badge--has-icon-after":""}`,t.classes].join(" ").replaceAll(/\s+/g," ").trim();(t.type==="add"||t.type==="icon-only")&&(t.label||t.avatarUri||t.hasDot||t.iconBefore||t.iconAfter||t.hasClose)&&t.theme!=="badge-modern"&&t.themeColor&&new V.DsgPropSyntaxWarning("DsgBadge: 'add'/'icon-only' type badges should only be called with 'size', 'theme' and 'themeColor' props. Note that 'themeColor' prop is discarded for theme 'badge-modern'."),[t.avatarUri,t.iconBefore,t.hasDot].filter(Boolean).length>1&&new V.DsgPropSyntaxWarning("DsgBadge: 'avatarUri', 'iconBefore' and 'hasDot' props are mutually exclusive. Please use only one of them."),[t.iconAfter,t.hasClose].filter(Boolean).length>1&&new V.DsgPropSyntaxWarning("DsgBadge: 'iconAfter' and 'hasClose' props are mutually exclusive. Please use only one of them.");const s=r,l=f.useTemplateRef("dsgBadge"),u=d=>{t.destroyOnClose?(s("before-destroy",l.value),l.value?.remove(),s("after-destroy")):(s("before-hide",l.value),l.value&&(l.value.style.display="none"),s("after-hide",l.value))},c=d=>{s("on-click",l.value)};return e({hideOrDestroy:u,clickEvent:c}),(d,v)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(i)),ref:"dsgBadge",onClick:c},[d.type==="standard"?f.renderSlot(d.$slots,"dsg-badge--before",{key:0},()=>[f.createElementVNode("div",is,[d.avatarUri?(f.openBlock(),f.createBlock(ir,{key:0,"profile-uri":d.avatarUri,class:"dsg-badge--avatar",size:"xxs"},null,8,["profile-uri"])):f.createCommentVNode("",!0),d.iconBefore?(f.openBlock(),f.createBlock(V._sfc_main,{key:1,icon:d.iconBefore,size:"xxs",class:"dsg-badge--icon-before dsg-badge--icon"},null,8,["icon"])):f.createCommentVNode("",!0),d.hasDot?(f.openBlock(),f.createElementBlock("span",as)):f.createCommentVNode("",!0)])]):f.createCommentVNode("",!0),d.type==="standard"?(f.openBlock(),f.createElementBlock("label",os,f.toDisplayString(d.label),1)):f.createCommentVNode("",!0),d.type==="add"?(f.openBlock(),f.createBlock(V._sfc_main,{key:2,icon:"plus",size:"xxs",class:"dsg-badge--icon-add dsg-badge--icon"})):f.createCommentVNode("",!0),d.type==="icon-only"?(f.openBlock(),f.createBlock(V._sfc_main,{key:3,icon:d.icon,size:"xxs",class:"dsg-badge--icon-only dsg-badge--icon"},null,8,["icon"])):f.createCommentVNode("",!0),d.type==="standard"?f.renderSlot(d.$slots,"dsg-badge--after",{key:4},()=>[f.createElementVNode("div",ss,[d.iconAfter?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:d.iconAfter,size:"xxs",class:"dsg-badge--icon-after dsg-badge--icon"},null,8,["icon"])):f.createCommentVNode("",!0),d.hasClose?(f.openBlock(),f.createElementBlock("span",ls,[d.hasClose?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:"x-close",class:"dsg-badge--close",size:"xxs",onClick:u})):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)])]):f.createCommentVNode("",!0)],2))}}),us={class:"dsg-input-number--control"},fs=["disabled"],cs={key:0},ds=["value","disabled"],hs=["disabled"],vs={key:0},ps={key:0,class:"dsg-input-number--label"},gs=f.defineComponent({__name:"DsgInputNumber",props:{modelValue:{},disabled:{type:Boolean},label:{},step:{}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=a=>{if(r.disabled)return;const o=a.target;n("update:modelValue",Number(o.value))};return(a,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-input-number",{"dsg-input-number--disabled":r.disabled}])},[f.createElementVNode("div",us,[f.createElementVNode("button",{type:"button",disabled:r.disabled,class:"dsg-input-number--btn"},[r.disabled?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",cs,"−"))],8,fs),f.createElementVNode("input",{type:"number",value:a.modelValue,onInput:i,disabled:r.disabled,class:"dsg-input-number--input"},null,40,ds),f.createElementVNode("button",{type:"button",disabled:r.disabled,class:"dsg-input-number--btn"},[r.disabled?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",vs,"+"))],8,hs)]),a.label!==void 0||a.$slots.label?(f.openBlock(),f.createElementBlock("div",ps,[f.renderSlot(a.$slots,"label",{},()=>[f.createTextVNode(f.toDisplayString(a.label),1)])])):f.createCommentVNode("",!0)],2))}}),xs={key:0,class:"dsg-checkbox-group--form-wrapper"},ys={class:"dsg-checkbox-group--header"},ms={class:"dsg-checkbox-group--header-title-wrapper"},ws={class:"dsg-checkbox-group--title"},_s=["innerHTML"],Es={class:"dsg-checkbox-group--options"},As=["onClick"],Cs={class:"dsg-checkbox-group--panel-left"},bs=["textContent"],Ss=["innerHTML","data"],Is=f.defineComponent({__name:"DsgCheckboxGroup",props:f.mergeModels({size:{default:"md"},theme:{default:"form"},title:{default:""},subtext:{default:""},options:{default:()=>[]},tooltip:{default:null},defaultValue:{type:[String,Number,Boolean,Array,null],default:()=>[]}},{modelValue:{type:[String,Number,Boolean,Array,null],default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=f.useModel(t,"modelValue"),r=["dsg-checkbox-group",`dsg-checkbox-group--${t.size}`,`dsg-checkbox-group--theme-${t.theme}`],n=(i,a)=>{i.target instanceof HTMLAnchorElement||(e.value=a.value)};return(i,a)=>{const o=f.resolveDirective("key");return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(r)},[["form","form-radio"].includes(i.theme)?(f.openBlock(),f.createElementBlock("div",xs,[f.createElementVNode("div",ys,[f.renderSlot(i.$slots,"dsg-checkbox-group--header",{},()=>[f.createElementVNode("div",ms,[f.createElementVNode("h3",ws,f.toDisplayString(i.title),1),i.tooltip?(f.openBlock(),f.createBlock(V._sfc_main$1,{key:0,label:i.tooltip,position:"top",triggers:["hover"],"auto-hide":!0,theme:"dark",class:"dsg-checkbox-group--tooltip"},null,8,["label"])):f.createCommentVNode("",!0)]),i.subtext?(f.openBlock(),f.createElementBlock("p",{key:0,class:"dsg-checkbox-group--subtext",innerHTML:i.subtext},null,8,_s)):f.createCommentVNode("",!0)])]),f.createElementVNode("div",Es,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.options,(s,l)=>(f.openBlock(),f.createElementBlock("div",{key:l,class:"dsg-checkbox-group--option"},[f.createVNode(V._sfc_main$2,{label:s.label,value:s.value,disabled:s.disabled,size:"sm",type:["form","panel"].includes(i.theme)?"checkbox":"radio",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=u=>e.value=u)},null,8,["label","value","disabled","type","modelValue"])]))),128))])])):f.createCommentVNode("",!0),["panel","panel-content"].includes(i.theme)?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(i.options,(s,l)=>f.withDirectives((f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-checkbox-group--panel",`dsg-checkbox-group--panel-${e.value===s.value?"selected":"unselected"}`]),onClick:u=>n(u,s)},[f.createElementVNode("div",Cs,[f.renderSlot(i.$slots,`dsg-checkbox-group--panel-title--${String(s.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{data:s},()=>[s.icon?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:s.icon,size:"xl"},null,8,["icon"])):f.createCommentVNode("",!0),f.createElementVNode("h3",{class:"dsg-checkbox-group--panel-title",textContent:f.toDisplayString(s.label)},null,8,bs)]),f.renderSlot(i.$slots,`dsg-checkbox-group--panel-subtext--${String(s.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{},()=>[s.subtext?(f.openBlock(),f.createElementBlock("p",{key:0,class:"dsg-checkbox-group--panel-subtext",innerHTML:s.subtext,data:s},null,8,Ss)):f.createCommentVNode("",!0)])]),(f.openBlock(),f.createElementBlock("div",{key:l,class:"dsg-checkbox-group--panel-right"},[f.createVNode(V._sfc_main$2,{value:s.value,disabled:s.disabled,type:"radio",modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=u=>e.value=u)},null,8,["value","disabled","modelValue"])]))],10,As)),[[o,l]])),256)):f.createCommentVNode("",!0)])}}});var Os="2.0.4",En=500,Jn="user-agent",Nt="",ei="?",Nr="function",st="undefined",Dt="object",An="string",Se="browser",qe="cpu",ze="device",Ve="engine",ke="os",St="result",T="name",b="type",O="vendor",N="version",Ie="architecture",or="major",I="model",Kt="console",U="mobile",Z="tablet",ue="smarttv",He="wearable",cr="xr",Zt="embedded",Lt="inapp",Un="brands",gt="formFactors",$n="fullVersionList",It="platform",Hn="platformVersion",Vr="bitness",ct="sec-ch-ua",Ts=ct+"-full-version-list",Ns=ct+"-arch",Ds=ct+"-"+Vr,Bs=ct+"-form-factors",Rs=ct+"-"+U,Ps=ct+"-"+I,ta=ct+"-"+It,ks=ta+"-version",ra=[Un,$n,U,I,It,Hn,Ie,gt,Vr],dr="Amazon",mt="Apple",ti="ASUS",ri="BlackBerry",dt="Google",ni="Huawei",Yr="Lenovo",ii="Honor",hr="LG",Kr="Microsoft",Zr="Motorola",qr="Nvidia",ai="OnePlus",Qr="OPPO",Ft="Samsung",oi="Sharp",Vt="Sony",Jr="Xiaomi",en="Zebra",si="Chrome",li="Chromium",rt="Chromecast",br="Edge",Ut="Firefox",$t="Opera",tn="Facebook",ui="Sogou",wt="Mobile ",Ht=" Browser",Cn="Windows",Ms=typeof window!==st,Oe=Ms&&window.navigator?window.navigator:void 0,ot=Oe&&Oe.userAgentData?Oe.userAgentData:void 0,Ls=function(t,e){var r={},n=e;if(!Dr(e)){n={};for(var i in e)for(var a in e[i])n[a]=e[i][a].concat(n[a]?n[a]:[])}for(var o in t)r[o]=n[o]&&n[o].length%2===0?n[o].concat(t[o]):t[o];return r},Ur=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},bn=function(t,e){if(typeof t===Dt&&t.length>0){for(var r in t)if(Qe(e)==Qe(t[r]))return!0;return!1}return Pt(t)?Qe(e)==Qe(t):!1},Dr=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?Dr(t[r]):!1)},Pt=function(t){return typeof t===An},rn=function(t){if(t){for(var e=[],r=Bt(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=Br(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=Br(r[n]);return e}},Qe=function(t){return Pt(t)?t.toLowerCase():t},nn=function(t){return Pt(t)?Bt(/[^\d\.]/g,t).split(".")[0]:void 0},Je=function(t){for(var e in t){var r=t[e];typeof r==Dt&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Bt=function(t,e){return Pt(e)?e.replace(t,Nt):e},Gt=function(t){return Bt(/\\?\"/g,t)},Br=function(t,e){if(Pt(t))return t=Bt(/^\s\s*/,t),typeof e===st?t:t.substring(0,En)},an=function(t,e){if(!(!t||!e))for(var r=0,n,i,a,o,s,l;r<e.length&&!s;){var u=e[r],c=e[r+1];for(n=i=0;n<u.length&&!s&&u[n];)if(s=u[n++].exec(t),s)for(a=0;a<c.length;a++)l=s[++i],o=c[a],typeof o===Dt&&o.length>0?o.length===2?typeof o[1]==Nr?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===Nr&&!(o[1].exec&&o[1].test)?o.length>3?this[o[0]]=l?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=l?o[1].call(this,l,o[2]):void 0:o.length==3?this[o[0]]=l?l.replace(o[1],o[2]):void 0:o.length==4?this[o[0]]=l?o[3].call(this,l.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=l?o[3].apply(this,[l.replace(o[1],o[2])].concat(o.slice(4))):void 0)):this[o]=l||void 0;r+=2}},Ge=function(t,e){for(var r in e)if(typeof e[r]===Dt&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(bn(e[r][n],t))return r===ei?void 0:r}else if(bn(e[r],t))return r===ei?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},fi={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},ci={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Fs={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},di={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[N,[T,wt+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[N,[T,br+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[N,[T,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[T,N],[/opios[\/ ]+([\w\.]+)/i],[N,[T,$t+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[N,[T,$t+" GX"]],[/\bopr\/([\w\.]+)/i],[N,[T,$t]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[N,[T,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[N,[T,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[T,N],[/quark(?:pc)?\/([-\w\.]+)/i],[N,[T,"Quark"]],[/\bddg\/([\w\.]+)/i],[N,[T,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[N,[T,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[N,[T,"WeChat"]],[/konqueror\/([\w\.]+)/i],[N,[T,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[N,[T,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[N,[T,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[N,[T,"Smart "+Yr+Ht]],[/(avast|avg)\/([\w\.]+)/i],[[T,/(.+)/,"$1 Secure"+Ht],N],[/\bfocus\/([\w\.]+)/i],[N,[T,Ut+" Focus"]],[/\bopt\/([\w\.]+)/i],[N,[T,$t+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[N,[T,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[N,[T,"Dolphin"]],[/coast\/([\w\.]+)/i],[N,[T,$t+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[N,[T,"MIUI"+Ht]],[/fxios\/([\w\.-]+)/i],[N,[T,wt+Ut]],[/\bqihoobrowser\/?([\w\.]*)/i],[N,[T,"360"]],[/\b(qq)\/([\w\.]+)/i],[[T,/(.+)/,"$1Browser"],N],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[T,/(.+)/,"$1"+Ht],N],[/samsungbrowser\/([\w\.]+)/i],[N,[T,Ft+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[N,[T,ui+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[T,ui+" Mobile"],N],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[T,N],[/(lbbrowser|rekonq)/i],[T],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[N,T],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[T,tn],N,[b,Lt]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[T,N,[b,Lt]],[/\bgsa\/([\w\.]+) .*safari\//i],[N,[T,"GSA"],[b,Lt]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[N,[T,"TikTok"],[b,Lt]],[/\[(linkedin)app\]/i],[T,[b,Lt]],[/(chromium)[\/ ]([-\w\.]+)/i],[T,N],[/headlesschrome(?:\/([\w\.]+)| )/i],[N,[T,si+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[N,[T,br+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[T,si+" WebView"],N],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[N,[T,"Android"+Ht]],[/chrome\/([\w\.]+) mobile/i],[N,[T,wt+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[T,N],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[N,[T,wt+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[T,wt+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[N,T],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[T,[N,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[T,N],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[T,wt+Ut],N],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[T,"Netscape"],N],[/(wolvic|librewolf)\/([\w\.]+)/i],[T,N],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[N,[T,Ut+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[T,[N,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[T,[N,/[^\d\.]+./,Nt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Ie,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Ie,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Ie,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Ie,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Ie,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Ie,/ower/,Nt,Qe]],[/ sun4\w[;\)]/i],[[Ie,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Ie,Qe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[I,[O,Ft],[b,Z]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[I,[O,Ft],[b,U]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[I,[O,mt],[b,U]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[I,[O,mt],[b,Z]],[/(macintosh);/i],[I,[O,mt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[I,[O,oi],[b,U]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[I,[O,ii],[b,Z]],[/honor([-\w ]+)[;\)]/i],[I,[O,ii],[b,U]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[I,[O,ni],[b,Z]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[I,[O,ni],[b,U]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[I,/_/g," "],[O,Jr],[b,Z]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[I,/_/g," "],[O,Jr],[b,U]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[I,[O,ai],[b,U]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[I,[O,Qr],[b,U]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[I,[O,Ge,{OnePlus:["203","304","403","404","413","415"],"*":Qr}],[b,Z]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[I,[O,"BLU"],[b,U]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[I,[O,"Vivo"],[b,U]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[I,[O,"Realme"],[b,U]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[I,[O,Yr],[b,Z]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[I,[O,Yr],[b,U]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[I,[O,Zr],[b,U]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[I,[O,Zr],[b,Z]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[I,[O,hr],[b,Z]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[I,[O,hr],[b,U]],[/(nokia) (t[12][01])/i],[O,I,[b,Z]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[I,/_/g," "],[b,U],[O,"Nokia"]],[/(pixel (c|tablet))\b/i],[I,[O,dt],[b,Z]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[I,[O,dt],[b,U]],[/(google) (pixelbook( go)?)/i],[O,I],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[I,[O,Vt],[b,U]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[I,"Xperia Tablet"],[O,Vt],[b,Z]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[I,[O,dr],[b,Z]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[I,/(.+)/g,"Fire Phone $1"],[O,dr],[b,U]],[/(playbook);[-\w\),; ]+(rim)/i],[I,O,[b,Z]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[I,[O,ri],[b,U]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[I,[O,ti],[b,Z]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[I,[O,ti],[b,U]],[/(nexus 9)/i],[I,[O,"HTC"],[b,Z]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[O,[I,/_/g," "],[b,U]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[I,[O,"TCL"],[b,Z]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[I,[O,"TCL"],[b,U]],[/(itel) ((\w+))/i],[[O,Qe],I,[b,Ge,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[I,[O,"Acer"],[b,Z]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[I,[O,"Meizu"],[b,U]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[I,[O,"Ulefone"],[b,U]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[I,[O,"Energizer"],[b,U]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[I,[O,"Cat"],[b,U]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[I,[O,"Smartfren"],[b,U]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[I,[O,"Nothing"],[b,U]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[I,[O,"Archos"],[b,Z]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[I,[O,"Archos"],[b,U]],[/; (n159v)/i],[I,[O,"HMD"],[b,U]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[O,I,[b,Z]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[O,I,[b,U]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[O,I,[b,Z]],[/(surface duo)/i],[I,[O,Kr],[b,Z]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[I,[O,"Fairphone"],[b,U]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[I,[O,qr],[b,Z]],[/(sprint) (\w+)/i],[O,I,[b,U]],[/(kin\.[onetw]{3})/i],[[I,/\./g," "],[O,Kr],[b,U]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[I,[O,en],[b,Z]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[I,[O,en],[b,U]],[/smart-tv.+(samsung)/i],[O,[b,ue]],[/hbbtv.+maple;(\d+)/i],[[I,/^/,"SmartTV"],[O,Ft],[b,ue]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[O,I,[b,ue]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[O,hr],[b,ue]],[/(apple) ?tv/i],[O,[I,mt+" TV"],[b,ue]],[/crkey.*devicetype\/chromecast/i],[[I,rt+" Third Generation"],[O,dt],[b,ue]],[/crkey.*devicetype\/([^/]*)/i],[[I,/^/,"Chromecast "],[O,dt],[b,ue]],[/fuchsia.*crkey/i],[[I,rt+" Nest Hub"],[O,dt],[b,ue]],[/crkey/i],[[I,rt],[O,dt],[b,ue]],[/(portaltv)/i],[I,[O,tn],[b,ue]],[/droid.+aft(\w+)( bui|\))/i],[I,[O,dr],[b,ue]],[/(shield \w+ tv)/i],[I,[O,qr],[b,ue]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[I,[O,oi],[b,ue]],[/(bravia[\w ]+)( bui|\))/i],[I,[O,Vt],[b,ue]],[/(mi(tv|box)-?\w+) bui/i],[I,[O,Jr],[b,ue]],[/Hbbtv.*(technisat) (.*);/i],[O,I,[b,ue]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[O,/.+\/(\w+)/,"$1",Ge,{LG:"lge"}],[I,Br],[b,ue]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[I,[b,ue]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,ue]],[/(playstation \w+)/i],[I,[O,Vt],[b,Kt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[I,[O,Kr],[b,Kt]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[O,I,[b,Kt]],[/droid.+; (shield)( bui|\))/i],[I,[O,qr],[b,Kt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[I,[O,Ft],[b,He]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[O,I,[b,He]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[I,[O,Qr],[b,He]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[I,[O,mt],[b,He]],[/(opwwe\d{3})/i],[I,[O,ai],[b,He]],[/(moto 360)/i],[I,[O,Zr],[b,He]],[/(smartwatch 3)/i],[I,[O,Vt],[b,He]],[/(g watch r)/i],[I,[O,hr],[b,He]],[/droid.+; (wt63?0{2,3})\)/i],[I,[O,en],[b,He]],[/droid.+; (glass) \d/i],[I,[O,dt],[b,cr]],[/(pico) (4|neo3(?: link|pro)?)/i],[O,I,[b,cr]],[/(quest( \d| pro)?s?).+vr/i],[I,[O,tn],[b,cr]],[/mobile vr; rv.+firefox/i],[[b,cr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[O,[b,Zt]],[/(aeobc)\b/i],[I,[O,dr],[b,Zt]],[/(homepod).+mac os/i],[I,[O,mt],[b,Zt]],[/windows iot/i],[[b,Zt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[I,[b,Ge,{mobile:"Mobile",xr:"VR","*":Z}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,Z]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,U]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[I,[O,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[N,[T,br+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[T,N],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[N,[T,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[T,N],[/ladybird\//i],[[T,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[N,T]],os:[[/(windows nt) (6\.[23]); arm/i],[[T,/N/,"R"],[N,Ge,fi]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[T,N],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[N,/(;|\))/g,"",Ge,fi],[T,Cn]],[/(windows ce)\/?([\d\.]*)/i],[T,N],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[N,/_/g,"."],[T,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[T,"macOS"],[N,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[N,[T,rt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[N,[T,rt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[N,[T,rt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[N,[T,rt+" Linux"]],[/crkey\/([\d\.]+)/i],[N,[T,rt]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[N,T],[/(ubuntu) ([\w\.]+) like android/i],[[T,/(.+)/,"$1 Touch"],N],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[T,N],[/\(bb(10);/i],[N,[T,ri]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[N,[T,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[N,[T,Ut+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[N,[T,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[N,Ge,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[T,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[N,[T,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[T,"Chrome OS"],N],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[T,N],[/(sunos) ?([\d\.]*)/i],[[T,"Solaris"],N],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[T,N]]},vr=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Je.call(t.init,[[Se,[T,N,or,b]],[qe,[Ie]],[ze,[b,I,O]],[Ve,[T,N]],[ke,[T,N]]]),Je.call(t.isIgnore,[[Se,[N,or]],[Ve,[N]],[ke,[N]]]),Je.call(t.isIgnoreRgx,[[Se,/ ?browser$/i],[ke,/ ?os$/i]]),Je.call(t.toString,[[Se,[T,N]],[qe,[Ie]],[ze,[O,I]],[Ve,[T,N]],[ke,[T,N]]]),t}(),Vs=function(t,e){var r=vr.init[e],n=vr.isIgnore[e]||0,i=vr.isIgnoreRgx[e]||0,a=vr.toString[e]||0;function o(){Je.call(this,r)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return ot?ot.getHighEntropyValues(ra).then(function(s){return t.setCH(new na(s,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=St&&(o.prototype.is=function(s){var l=!1;for(var u in this)if(this.hasOwnProperty(u)&&!bn(n,u)&&Qe(i?Bt(i,this[u]):this[u])==Qe(i?Bt(i,s):s)){if(l=!0,s!=st)break}else if(s==st&&l){l=!l;break}return l},o.prototype.toString=function(){var s=Nt;for(var l in a)typeof this[a[l]]!==st&&(s+=(s?" ":Nt)+this[a[l]]);return s||st}),ot||(o.prototype.then=function(s){var l=this,u=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};u.prototype={is:o.prototype.is,toString:o.prototype.toString};var c=new u;return s(c),c}),new o};function na(t,e){if(t=t||{},Je.call(this,ra),e)Je.call(this,[[Un,rn(t[ct])],[$n,rn(t[Ts])],[U,/\?1/.test(t[Rs])],[I,Gt(t[Ps])],[It,Gt(t[ta])],[Hn,Gt(t[ks])],[Ie,Gt(t[Ns])],[gt,rn(t[Bs])],[Vr,Gt(t[Ds])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==st&&(this[r]=t[r])}function hi(t,e,r,n){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,a){return this.data[i]=a,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(Oe&&Oe.userAgent==this.ua)switch(this.itemType){case Se:Oe.brave&&typeof Oe.brave.isBrave==Nr&&this.set(T,"Brave");break;case ze:!this.get(b)&&ot&&ot[U]&&this.set(b,U),this.get(I)=="Macintosh"&&Oe&&typeof Oe.standalone!==st&&Oe.maxTouchPoints&&Oe.maxTouchPoints>2&&this.set(I,"iPad").set(b,Z);break;case ke:!this.get(T)&&ot&&ot[It]&&this.set(T,ot[It]);break;case St:var i=this.data,a=function(o){return i[o].getItem().detectFeature().get()};this.set(Se,a(Se)).set(qe,a(qe)).set(ze,a(ze)).set(Ve,a(Ve)).set(ke,a(ke))}return this},this.parseUA=function(){return this.itemType!=St&&an.call(this.data,this.ua,this.rgxMap),this.itemType==Se&&this.set(or,nn(this.get(N))),this},this.parseCH=function(){var i=this.uaCH,a=this.rgxMap;switch(this.itemType){case Se:case Ve:var o=i[$n]||i[Un],s;if(o)for(var l in o){var u=o[l].brand||o[l],c=o[l].version;this.itemType==Se&&!/not.a.brand/i.test(u)&&(!s||/Chrom/.test(s)&&u!=li||s==br&&/WebView2/.test(u))&&(u=Ge(u,Fs),s=this.get(T),s&&!/Chrom/.test(s)&&/Chrom/.test(u)||this.set(T,u).set(N,c).set(or,nn(c)),s=u),this.itemType==Ve&&u==li&&this.set(N,c)}break;case qe:var d=i[Ie];d&&(d&&i[Vr]=="64"&&(d+="64"),an.call(this.data,d+";",a));break;case ze:if(i[U]&&this.set(b,U),i[I]&&(this.set(I,i[I]),!this.get(b)||!this.get(O))){var v={};an.call(v,"droid 9; "+i[I]+")",a),!this.get(b)&&v.type&&this.set(b,v.type),!this.get(O)&&v.vendor&&this.set(O,v.vendor)}if(i[gt]){var h;if(typeof i[gt]!="string")for(var p=0;!h&&p<i[gt].length;)h=Ge(i[gt][p++],ci);else h=Ge(i[gt],ci);this.set(b,h)}break;case ke:var g=i[It];if(g){var m=i[Hn];g==Cn&&(m=parseInt(nn(m),10)>=13?"11":"10"),this.set(T,g).set(N,m)}this.get(T)==Cn&&i[I]=="Xbox"&&this.set(T,"Xbox").set(N,void 0);break;case St:var w=this.data,y=function(_){return w[_].getItem().setCH(i).parseCH().get()};this.set(Se,y(Se)).set(qe,y(qe)).set(ze,y(ze)).set(Ve,y(Ve)).set(ke,y(ke))}return this},Je.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",Vs(this,t)]]),this}function et(t,e,r){if(typeof t===Dt?(Dr(t,!0)?(typeof e===Dt&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===An&&!Dr(e,!0)&&(r=e,e=void 0),r&&typeof r.append===Nr){var n={};r.forEach(function(l,u){n[u]=l}),r=n}if(!(this instanceof et))return new et(t,e,r).getResult();var i=typeof t===An?t:r&&r[Jn]?r[Jn]:Oe&&Oe.userAgent?Oe.userAgent:Nt,a=new na(r,!0),o=e?Ls(di,e):di,s=function(l){return l==St?function(){return new hi(l,i,o,a).set("ua",i).set(Se,this.getBrowser()).set(qe,this.getCPU()).set(ze,this.getDevice()).set(Ve,this.getEngine()).set(ke,this.getOS()).get()}:function(){return new hi(l,i,o[l],a).parseUA().get()}};return Je.call(this,[["getBrowser",s(Se)],["getCPU",s(qe)],["getDevice",s(ze)],["getEngine",s(Ve)],["getOS",s(ke)],["getResult",s(St)],["getUA",function(){return i}],["setUA",function(l){return Pt(l)&&(i=l.length>En?Br(l,En):l),this}]]).setUA(i),this}et.VERSION=Os;et.BROWSER=Ur([T,N,or,b]);et.CPU=Ur([Ie]);et.DEVICE=Ur([I,O,b,Kt,U,ue,Z,He,Zt]);et.ENGINE=et.OS=Ur([T,N]);const on=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function sn(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function zt(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function ia(t,e){const r=e.slice(0,e.length-1);for(let n=0;n<r.length;n++)r[n]=t[r[n].toLowerCase()];return r}function aa(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");const e=t.split(",");let r=e.lastIndexOf("");for(;r>=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}function Us(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let a=0;a<r.length;a++)n.indexOf(r[a])===-1&&(i=!1);return i}const sr={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":on?173:189,"=":on?61:187,";":on?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},$e={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},qt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},xe={16:!1,18:!1,17:!1,91:!1},oe={};for(let t=1;t<20;t++)sr["f".concat(t)]=111+t;let ie=[],nr=null,oa="all";const Ze=new Map,kt=t=>sr[t.toLowerCase()]||$e[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),$s=t=>Object.keys(sr).find(e=>sr[e]===t),Hs=t=>Object.keys($e).find(e=>$e[e]===t);function sa(t){oa=t||"all"}function lr(){return oa||"all"}function Gs(){return ie.slice(0)}function zs(){return ie.map(t=>$s(t)||Hs(t)||String.fromCharCode(t))}function Ws(){const t=[];return Object.keys(oe).forEach(e=>{oe[e].forEach(r=>{let{key:n,scope:i,mods:a,shortcut:o}=r;t.push({scope:i,shortcut:o,mods:a,keys:n.split("+").map(s=>kt(s))})})}),t}function Xs(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||r==="TEXTAREA"||r==="SELECT")&&!e.readOnly)&&(n=!1),n}function js(t){return typeof t=="string"&&(t=kt(t)),ie.indexOf(t)!==-1}function Ys(t,e){let r,n;t||(t=lr());for(const i in oe)if(Object.prototype.hasOwnProperty.call(oe,i))for(r=oe[i],n=0;n<r.length;)r[n].scope===t?r.splice(n,1).forEach(o=>{let{element:s}=o;return Gn(s)}):n++;lr()===t&&sa(e||"all")}function Ks(t){let e=t.keyCode||t.which||t.charCode;t.key&&t.key.toLowerCase()==="capslock"&&(e=kt(t.key));const r=ie.indexOf(e);if(r>=0&&ie.splice(r,1),t.key&&t.key.toLowerCase()==="meta"&&ie.splice(0,ie.length),(e===93||e===224)&&(e=91),e in xe){xe[e]=!1;for(const n in $e)$e[n]===e&&(We[n]=!1)}}function la(t){if(typeof t>"u")Object.keys(oe).forEach(i=>{Array.isArray(oe[i])&&oe[i].forEach(a=>pr(a)),delete oe[i]}),Gn(null);else if(Array.isArray(t))t.forEach(i=>{i.key&&pr(i)});else if(typeof t=="object")t.key&&pr(t);else if(typeof t=="string"){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let[i,a]=r;typeof i=="function"&&(a=i,i=""),pr({key:t,scope:i,method:a,splitKey:"+"})}}const pr=t=>{let{key:e,scope:r,method:n,splitKey:i="+"}=t;aa(e).forEach(o=>{const s=o.split(i),l=s.length,u=s[l-1],c=u==="*"?"*":kt(u);if(!oe[c])return;r||(r=lr());const d=l>1?ia($e,s):[],v=[];oe[c]=oe[c].filter(h=>{const g=(n?h.method===n:!0)&&h.scope===r&&Us(h.mods,d);return g&&v.push(h.element),!g}),v.forEach(h=>Gn(h))})};function vi(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||e.scope==="all"){i=e.mods.length>0;for(const a in xe)Object.prototype.hasOwnProperty.call(xe,a)&&(!xe[a]&&e.mods.indexOf(+a)>-1||xe[a]&&e.mods.indexOf(+a)===-1)&&(i=!1);(e.mods.length===0&&!xe[16]&&!xe[18]&&!xe[17]&&!xe[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(ie),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function pi(t,e){const r=oe["*"];let n=t.keyCode||t.which||t.charCode;if(t.key&&t.key.toLowerCase()==="capslock"||!We.filter.call(this,t))return;if((n===93||n===224)&&(n=91),ie.indexOf(n)===-1&&n!==229&&ie.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(s=>{const l=qt[s];t[s]&&ie.indexOf(l)===-1?ie.push(l):!t[s]&&ie.indexOf(l)>-1?ie.splice(ie.indexOf(l),1):s==="metaKey"&&t[s]&&(ie=ie.filter(u=>u in qt||u===n))}),n in xe){xe[n]=!0;for(const s in $e)if(Object.prototype.hasOwnProperty.call($e,s)){const l=qt[$e[s]];We[s]=t[l]}if(!r)return}for(const s in xe)Object.prototype.hasOwnProperty.call(xe,s)&&(xe[s]=t[qt[s]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(ie.indexOf(17)===-1&&ie.push(17),ie.indexOf(18)===-1&&ie.push(18),xe[17]=!0,xe[18]=!0);const i=lr();if(r)for(let s=0;s<r.length;s++)r[s].scope===i&&(t.type==="keydown"&&r[s].keydown||t.type==="keyup"&&r[s].keyup)&&vi(t,r[s],i,e);if(!(n in oe))return;const a=oe[n],o=a.length;for(let s=0;s<o;s++)if((t.type==="keydown"&&a[s].keydown||t.type==="keyup"&&a[s].keyup)&&a[s].key){const l=a[s],{splitKey:u}=l,c=l.key.split(u),d=[];for(let v=0;v<c.length;v++)d.push(kt(c[v]));d.sort().join("")===ie.sort().join("")&&vi(t,l,i,e)}}function We(t,e,r){ie=[];const n=aa(t);let i=[],a="all",o=document,s=0,l=!1,u=!0,c="+",d=!1,v=!1;for(r===void 0&&typeof e=="function"&&(r=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(a=e.scope),e.element&&(o=e.element),e.keyup&&(l=e.keyup),e.keydown!==void 0&&(u=e.keydown),e.capture!==void 0&&(d=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(v=!0)),typeof e=="string"&&(a=e),v&&la(t,a);s<n.length;s++)t=n[s].split(c),i=[],t.length>1&&(i=ia($e,t)),t=t[t.length-1],t=t==="*"?"*":kt(t),t in oe||(oe[t]=[]),oe[t].push({keyup:l,keydown:u,scope:a,mods:i,shortcut:n[s],method:r,key:n[s],splitKey:c,element:o});if(typeof o<"u"&&window){if(!Ze.has(o)){const h=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return pi(g,o)},p=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;pi(g,o),Ks(g)};Ze.set(o,{keydownListener:h,keyupListenr:p,capture:d}),sn(o,"keydown",h,d),sn(o,"keyup",p,d)}if(!nr){const h=()=>{ie=[]};nr={listener:h,capture:d},sn(window,"focus",h,d)}}}function Zs(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(oe).forEach(r=>{oe[r].filter(i=>i.scope===e&&i.shortcut===t).forEach(i=>{i&&i.method&&i.method()})})}function Gn(t){const e=Object.values(oe).flat();if(e.findIndex(n=>{let{element:i}=n;return i===t})<0){const{keydownListener:n,keyupListenr:i,capture:a}=Ze.get(t)||{};n&&i&&(zt(t,"keyup",i,a),zt(t,"keydown",n,a),Ze.delete(t))}if((e.length<=0||Ze.size<=0)&&(Object.keys(Ze).forEach(i=>{const{keydownListener:a,keyupListenr:o,capture:s}=Ze.get(i)||{};a&&o&&(zt(i,"keyup",o,s),zt(i,"keydown",a,s),Ze.delete(i))}),Ze.clear(),Object.keys(oe).forEach(i=>delete oe[i]),nr)){const{listener:i,capture:a}=nr;zt(window,"focus",i,a),nr=null}}const ln={getPressedKeyString:zs,setScope:sa,getScope:lr,deleteScope:Ys,getPressedKeyCodes:Gs,getAllKeyCodes:Ws,isPressed:js,filter:Xs,trigger:Zs,unbind:la,keyMap:sr,modifier:$e,modifierMap:qt};for(const t in ln)Object.prototype.hasOwnProperty.call(ln,t)&&(We[t]=ln[t]);if(typeof window<"u"){const t=window.hotkeys;We.noConflict=e=>(e&&window.hotkeys===We&&(window.hotkeys=t),We),window.hotkeys=We}const qs={class:"dsg-dropdown--trigger",tabindex:"0"},Qs={class:"dsg-dropdown--menu"},Js={key:0,class:"dsg-dropdown--menu-header"},el={key:1,class:"dsg-dropdown--menu-header"},tl={class:"dsg-dropdown--menu-title"},rl={key:2,class:"dsg-dropdown--menu-header subsection"},nl={class:"dsg-dropdown--menu-subtitle"},il=["href","target","tabindex","title","onClick"],al={key:0,class:"dsg-dropdown--menu-item--content"},ol={key:0,class:"dsg-dropdown--menu-item--icon"},sl={class:"dsg-dropdown--menu-item--label"},ll={class:"dsg-dropdown--menu-item--hotkey"},ul={key:0},fl={key:1,class:"dsg-dropdown--menu-item--content"},cl=f.defineComponent({__name:"DsgDropdown",props:{label:{default:""},type:{default:"button"},icon:{default:"dots-vertical"},buttonTheme:{default:"gray"},menuItems:{default:()=>[]},avatarInfo:{default:null},isOpen:{type:Boolean,default:!1},placement:{default:"bottom-end"},headerType:{default:"none"},headerTitle:{default:""},classes:{default:""},strategy:{default:"absolute"},skidding:{default:0},distance:{default:0}},setup(t,{expose:e}){const r=f.ref(t.isOpen),n=new et().getOS().name;t.menuItems.forEach(h=>{});const i=f.useTemplateRef("floatingVueDropdownEl"),a=f.useTemplateRef("dsgDropdownAvatarTriggerEl"),o=f.useTemplateRef("dsgDropdownButtonTriggerEl"),s=h=>{u(),a.value&&setTimeout(()=>{a?.value?.toggleFocus(r.value)},100)},l=h=>{u(),o.value&&setTimeout(()=>{o?.value?.focusButton(r.value)},100)},u=()=>{r.value=!r.value,r.value?i.value?.show():i.value?.hide()},c=(h,p)=>{p.uri||h.preventDefault(),p.action&&(p.action(),i.value?.hide())},d=f.useTemplateRef("dsgDropdown"),v=h=>(h=h.toLowerCase(),h.replace("ctrl","⌃").replace("shift","⇧").replace("alt","⌥").replace("cmd",n==="macOS"?"⌘":"⊞").replace("++","+").replace("+","").toUpperCase());return f.onMounted(()=>{t.menuItems.forEach(h=>{h.hotkey&&We(h.hotkey,p=>{h.hotkeyPreventDefault&&h.hotkeyPreventDefault===!0&&p.preventDefault(),h.uri&&window.open(h.uri,h.uriTarget??"_blank"),typeof h.action=="function"&&(h.action(),i.value?.hide())})})}),f.onBeforeUnmount(()=>{We.deleteScope("dsgDropdown")}),e({handleTriggerClick:u}),(h,p)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-dropdown",h.classes]),ref:"dsgDropdown"},[f.createVNode(f.unref(V.kt),f.mergeProps({triggers:[],placement:h.placement,"handle-resize":!1,strategy:h.strategy,shown:r.value,flip:!1,shift:!1,boundary:d.value,container:d.value,skidding:h.skidding,distance:h.distance,class:"dsg-dropdown--popper",onHide:p[0]||(p[0]=g=>r.value=!1),ref:"floatingVueDropdownEl"},h.$attrs),{popper:f.withCtx(()=>[f.createElementVNode("div",Qs,[f.renderSlot(h.$slots,"dsg-dropdown-menu--header",{},()=>[h.headerType==="avatar"?(f.openBlock(),f.createElementBlock("div",Js,[h.avatarInfo?(f.openBlock(),f.createBlock(ir,{key:0,size:"md",profileUri:h.avatarInfo.profileUri,fullName:h.avatarInfo.fullName,isOnline:h.avatarInfo.isOnline,title:h.avatarInfo.title,"sub-text":h.avatarInfo.subText},null,8,["profileUri","fullName","isOnline","title","sub-text"])):f.createCommentVNode("",!0)])):h.headerType==="title"?(f.openBlock(),f.createElementBlock("div",el,[f.createElementVNode("h3",tl,f.toDisplayString(h.headerTitle),1)])):h.headerType==="subsection"?(f.openBlock(),f.createElementBlock("div",rl,[f.createElementVNode("h4",nl,f.toDisplayString(h.headerTitle),1)])):f.createCommentVNode("",!0)]),f.renderSlot(h.$slots,"dsg-dropdown-menu-content",{},()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(h.menuItems,(g,m)=>(f.openBlock(),f.createElementBlock("a",{class:f.normalizeClass(["dsg-dropdown--menu-item",{"is-divider":g.type==="divider"}]),href:g.uri,target:g.uriTarget??"_blank",tabindex:!g.uri&&g.type!=="divider"?0:void 0,title:g.label,key:m,onClick:w=>c(w,g)},[g.type==="item"||g.type===void 0?(f.openBlock(),f.createElementBlock("div",al,[g.icon?(f.openBlock(),f.createElementBlock("div",ol,[f.createVNode(V._sfc_main,{icon:g.icon,size:"xs"},null,8,["icon"])])):f.createCommentVNode("",!0),f.createElementVNode("span",sl,f.toDisplayString(g.label),1),f.createElementVNode("div",ll,[g.hotkey?(f.openBlock(),f.createElementBlock("span",ul,f.toDisplayString(v(g.hotkey)),1)):f.createCommentVNode("",!0)])])):g.type==="divider"?(f.openBlock(),f.createElementBlock("div",fl,p[1]||(p[1]=[f.createElementVNode("hr",null,null,-1)]))):f.createCommentVNode("",!0)],10,il))),128))])])]),default:f.withCtx(()=>[f.createElementVNode("div",qs,[f.renderSlot(h.$slots,"dsg-dropdown--trigger",{},()=>[h.type==="avatar"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[h.avatarInfo?(f.openBlock(),f.createBlock(ir,{key:0,size:"lg",profileUri:h.avatarInfo.profileUri,fullName:h.avatarInfo.fullName,ref:"dsgDropdownAvatarTriggerEl",onClick:s,"prevent-default":!0},null,8,["profileUri","fullName"])):f.createCommentVNode("",!0)],64)):h.type==="button"?(f.openBlock(),f.createBlock(V._sfc_main$3,{key:1,theme:h.buttonTheme,label:h.label,onClick:l,ref:"dsgDropdownButtonTriggerEl","icon-after":"chevron-down",class:f.normalizeClass({"dropdown-active":r.value})},null,8,["theme","label","class"])):h.type==="icon"?(f.openBlock(),f.createBlock(V._sfc_main$3,{key:2,"icon-before":h.icon,size:"sm",theme:h.buttonTheme,class:f.normalizeClass(["dsg-dropdown--trigger-button",{"dropdown-active":r.value}]),onClick:u},null,8,["icon-before","theme","class"])):f.createCommentVNode("",!0)])])]),_:3},16,["placement","strategy","shown","boundary","container","skidding","distance"])],2))}});function un(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function dl(t){return(...e)=>!t(...e)}function hl(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function vl(t){return t.filter(e=>!e.$isLabel)}function fn(t,e){return r=>r.reduce((n,i)=>i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n,[])}const gi=(...t)=>e=>t.reduce((r,n)=>n(r),e);var pl={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(t,e){return un(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const t=this.search||"",e=t.toLowerCase().trim();let r=this.options.concat();return this.internalSearch?r=this.groupValues?this.filterAndFlat(r,e,this.label):this.filterOptions(r,e,this.label,this.customLabel):r=this.groupValues?fn(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(dl(this.isSelected)):r,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?r.push({isTag:!0,label:t}):r.unshift({isTag:!0,label:t})),r.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(t,e,r){return gi(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),fn(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return gi(fn(this.groupValues,this.groupLabel),vl)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(un(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return un(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const r=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],n=this.internalValue.filter(i=>r.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",n)}else{const r=e[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&r.splice(this.max-this.internalValue.length),this.$emit("select",r,this.id),this.$emit("update:modelValue",this.internalValue.concat(r))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const r=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const n=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,r,n){return e?t.filter(i=>hl(n(i,r),e)).sort((i,a)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,a):n(i,r).length-n(a,r).length):t},filterGroups(t,e,r,n,i){return a=>a.map(o=>{if(!o[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const s=this.filterOptions(o[r],t,e,i);return s.length?{[n]:o[n],[r]:s}:[]})}}},gl={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const r=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},ua={name:"vue-multiselect",mixins:[pl,gl],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}}};const xl=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],yl={ref:"tags",class:"multiselect__tags"},ml={class:"multiselect__tags-wrap"},wl=["textContent"],_l=["onKeypress","onMousedown"],El=["textContent"],Al={class:"multiselect__spinner"},Cl=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],bl=["id","aria-multiselectable"],Sl={key:0},Il={class:"multiselect__option"},Ol=["aria-selected","id","role"],Tl=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Nl=["data-select","data-deselect","onMouseenter","onMousedown"],Dl={class:"multiselect__option"},Bl={class:"multiselect__option"};function Rl(t,e,r,n,i,a){return f.openBlock(),f.createElementBlock("div",{tabindex:t.searchable?-1:r.tabindex,class:f.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":r.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=o=>t.activate()),onBlur:e[15]||(e[15]=o=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=f.withKeys(f.withModifiers(o=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=f.withKeys(f.withModifiers(o=>t.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:e[18]||(e[18]=f.withKeys(f.withModifiers(o=>t.addPointerElement(o),["stop","self"]),["enter","tab"])),onKeyup:e[19]||(e[19]=f.withKeys(o=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[f.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[f.createElementVNode("div",{onMousedown:e[0]||(e[0]=f.withModifiers(o=>t.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),f.renderSlot(t.$slots,"clear",{search:t.search}),f.createElementVNode("div",yl,[f.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:a.visibleValues,isOpen:t.isOpen},()=>[f.withDirectives(f.createElementVNode("div",ml,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.visibleValues,(o,s)=>f.renderSlot(t.$slots,"tag",{option:o,search:t.search,remove:t.removeElement},()=>[(f.openBlock(),f.createElementBlock("span",{class:"multiselect__tag",key:s,onMousedown:e[1]||(e[1]=f.withModifiers(()=>{},["prevent"]))},[f.createElementVNode("span",{textContent:f.toDisplayString(t.getOptionLabel(o))},null,8,wl),f.createElementVNode("i",{tabindex:"1",onKeypress:f.withKeys(f.withModifiers(l=>t.removeElement(o),["prevent"]),["enter"]),onMousedown:f.withModifiers(l=>t.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,_l)],32))])),256))],512),[[f.vShow,a.visibleValues.length>0]]),t.internalValue&&t.internalValue.length>r.limit?f.renderSlot(t.$slots,"limit",{key:0},()=>[f.createElementVNode("strong",{class:"multiselect__strong",textContent:f.toDisplayString(r.limitText(t.internalValue.length-r.limit))},null,8,El)]):f.createCommentVNode("v-if",!0)]),f.createVNode(f.Transition,{name:"multiselect__loading"},{default:f.withCtx(()=>[f.renderSlot(t.$slots,"loading",{},()=>[f.withDirectives(f.createElementVNode("div",Al,null,512),[[f.vShow,r.loading]])])]),_:3}),t.searchable?(f.openBlock(),f.createElementBlock("input",{key:0,ref:"search",name:r.name,id:t.id,type:"text",autocomplete:"off",spellcheck:r.spellcheck,placeholder:t.placeholder,required:a.isRequired,style:f.normalizeStyle(a.inputStyle),value:t.search,disabled:r.disabled,tabindex:r.tabindex,"aria-label":r.name+"-searchbox",onInput:e[2]||(e[2]=o=>t.updateSearch(o.target.value)),onFocus:e[3]||(e[3]=f.withModifiers(o=>t.activate(),["prevent"])),onBlur:e[4]||(e[4]=f.withModifiers(o=>t.deactivate(),["prevent"])),onKeyup:e[5]||(e[5]=f.withKeys(o=>t.deactivate(),["esc"])),onKeydown:[e[6]||(e[6]=f.withKeys(f.withModifiers(o=>t.pointerForward(),["prevent"]),["down"])),e[7]||(e[7]=f.withKeys(f.withModifiers(o=>t.pointerBackward(),["prevent"]),["up"])),e[9]||(e[9]=f.withKeys(f.withModifiers(o=>t.removeLastElement(),["stop"]),["delete"]))],onKeypress:e[8]||(e[8]=f.withKeys(f.withModifiers(o=>t.addPointerElement(o),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,Cl)):f.createCommentVNode("v-if",!0),a.isSingleLabelVisible?(f.openBlock(),f.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:e[10]||(e[10]=f.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[f.renderSlot(t.$slots,"singleLabel",{option:a.singleValue},()=>[f.createTextVNode(f.toDisplayString(t.currentOptionLabel),1)])],32)):f.createCommentVNode("v-if",!0),a.isPlaceholderVisible?(f.openBlock(),f.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:e[11]||(e[11]=f.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[f.renderSlot(t.$slots,"placeholder",{},()=>[f.createTextVNode(f.toDisplayString(t.placeholder),1)])],32)):f.createCommentVNode("v-if",!0)],512),f.createVNode(f.Transition,{name:"multiselect",persisted:""},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("div",{class:"multiselect__content-wrapper",onFocus:e[12]||(e[12]=(...o)=>t.activate&&t.activate(...o)),tabindex:"-1",onMousedown:e[13]||(e[13]=f.withModifiers(()=>{},["prevent"])),style:f.normalizeStyle({maxHeight:t.optimizedHeight+"px"}),ref:"list"},[f.createElementVNode("ul",{class:"multiselect__content",style:f.normalizeStyle(a.contentStyle),role:"listbox",id:"listbox-"+t.id,"aria-multiselectable":t.multiple},[f.renderSlot(t.$slots,"beforeList"),t.multiple&&t.max===t.internalValue.length?(f.openBlock(),f.createElementBlock("li",Sl,[f.createElementVNode("span",Il,[f.renderSlot(t.$slots,"maxElements",{},()=>[f.createTextVNode("Maximum of "+f.toDisplayString(t.max)+" options selected. First remove a selected option to select another.",1)])])])):f.createCommentVNode("v-if",!0),!t.max||t.internalValue.length<t.max?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(t.filteredOptions,(o,s)=>(f.openBlock(),f.createElementBlock("li",{class:"multiselect__element",key:s,"aria-selected":t.isSelected(o),id:t.id+"-"+s,role:o&&(o.$isLabel||o.$isDisabled)?null:"option"},[o&&(o.$isLabel||o.$isDisabled)?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",{key:0,class:f.normalizeClass([t.optionHighlight(s,o),"multiselect__option"]),onClick:f.withModifiers(l=>t.select(o),["stop"]),onMouseenter:f.withModifiers(l=>t.pointerSet(s),["self"]),"data-select":o&&o.isTag?t.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[f.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[f.createElementVNode("span",null,f.toDisplayString(t.getOptionLabel(o)),1)])],42,Tl)),o&&(o.$isLabel||o.$isDisabled)?(f.openBlock(),f.createElementBlock("span",{key:1,"data-select":t.groupSelect&&a.selectGroupLabelText,"data-deselect":t.groupSelect&&a.deselectGroupLabelText,class:f.normalizeClass([t.groupHighlight(s,o),"multiselect__option"]),onMouseenter:f.withModifiers(l=>t.groupSelect&&t.pointerSet(s),["self"]),onMousedown:f.withModifiers(l=>t.selectGroup(o),["prevent"])},[f.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[f.createElementVNode("span",null,f.toDisplayString(t.getOptionLabel(o)),1)])],42,Nl)):f.createCommentVNode("v-if",!0)],8,Ol))),128)):f.createCommentVNode("v-if",!0),f.withDirectives(f.createElementVNode("li",null,[f.createElementVNode("span",Dl,[f.renderSlot(t.$slots,"noResult",{search:t.search},()=>[e[20]||(e[20]=f.createTextVNode("No elements found. Consider changing the search query."))])])],512),[[f.vShow,r.showNoResults&&t.filteredOptions.length===0&&t.search&&!r.loading]]),f.withDirectives(f.createElementVNode("li",null,[f.createElementVNode("span",Bl,[f.renderSlot(t.$slots,"noOptions",{},()=>[e[21]||(e[21]=f.createTextVNode("List is empty."))])])],512),[[f.vShow,r.showNoOptions&&(t.options.length===0||a.hasOptionGroup===!0&&t.filteredOptions.length===0)&&!t.search&&!r.loading]]),f.renderSlot(t.$slots,"afterList")],12,bl)],36),[[f.vShow,t.isOpen]])]),_:3})],42,xl)}ua.render=Rl;const Pl={class:"dsg-input--label-wrapper block"},kl=["onMousedown"],Ml={class:"option-label"},Ll={key:0,class:"dsg-input-select--error-wrapper"},Fl=f.defineComponent({__name:"DsgInputSelect",props:f.mergeModels({options:{default:()=>[]},multiple:{type:Boolean,default:!1},fetchOnLoad:{type:Boolean,default:!1},getUrl:{},placeholder:{},label:{default:"label"},showLabels:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},trackBy:{default:"id"},contentMaxWidth:{default:"24rem"},itemLabel:{default:"label"},allowEmpty:{type:Boolean,default:!1},validateOnLoad:{type:Boolean,default:!0},selectLabel:{default:""},selectedLabel:{default:""},errors:{default:()=>[]},size:{default:"md"}},{modelValue:{},modelModifiers:{},single:{},singleModifiers:{}}),emits:f.mergeModels(["update:modelValue","update:model-value","search-change","select","open","close","remove","tag"],["update:modelValue","update:single"]),setup(t,{emit:e}){const r=f.useModel(t,"modelValue"),n=f.useModel(t,"single"),i=f.ref(t.options),a=f.useTemplateRef("multiselectEl"),o=f.ref(!1),s=f.ref([]);f.computed(()=>s.value.length>0);const l=f.computed(()=>[...Array.isArray(t.errors)?t.errors:[t.errors],...s.value].filter((_,A,C)=>A===C.indexOf(_))),u=f.computed(()=>["dsg-input-select",`dsg-input-select--${t.size}`,`dsg-input-select--${l.value.length>0?"has-errors":"no-errors"}`].join(" ").replace(/\s+/g," ").trim());f.watchEffect(()=>{}),f.watch(()=>t.options,y=>{Array.isArray(y)?i.value=y:console.warn("Options should be an array.")});const c=e,d=()=>{if(a.value)if(o.value===!0){const y=a.value.$el.getBoundingClientRect(),_=a.value.$el.offsetHeight,A=window.innerHeight,C=a.value.$refs.list;C.style.display="block";const D=C.offsetHeight;C.style.display=void 0,y.bottom-_*2;const B=y.bottom+D+_+2>A?"top":"bottom";C.style.left="0",C.style.right="auto",C.style.width="auto",C.style.maxWidth=t.contentMaxWidth,B==="top"?C.style.bottom=`${_+4}px`:C.style.top=`${_+4}px`}else{const y=a.value.$refs.list;y.style.display="none",y.style.top="auto",y.style.bottom="auto",y.style.left="auto",y.style.right="auto"}},v=y=>{o.value=!0,d(),c("open",y)},h=(y,_)=>{o.value=!1,d(),c("close",y,_)},p=V.useDebounceFn(y=>{t.getUrl&&y.length>2&&V.axios.get(t.getUrl,{params:{term:y}}).then(_=>{i.value=_.data}),c("search-change",y)},300),g=(y,_=!0)=>{s.value=[],t.allowEmpty===!1&&(y==null||Array.isArray(y)&&y.length===0)&&s.value.push(`${t.label} is required.`),_===!0&&(m(y),c("update:modelValue",y),c("update:model-value",y))},m=y=>{y?n.value=y[t.trackBy]||y:n.value=null},w=()=>{d()};return f.onMounted(()=>{window.addEventListener("resize",w),t.getUrl&&t.options.length===0&&t.fetchOnLoad&&V.axios.get(t.getUrl).then(y=>{i.value=y.data}).catch(y=>{console.error("Error fetching options:",y)}),t.validateOnLoad&&g(r.value,!1)}),f.onUnmounted(()=>{window.removeEventListener("resize",w)}),(y,_)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(u.value)},[f.createElementVNode("div",Pl,[y.label?(f.openBlock(),f.createBlock(Gi._sfc_main,{key:0,label:y.label,size:"sm"},null,8,["label"])):f.createCommentVNode("",!0)]),f.createVNode(f.unref(ua),f.mergeProps({ref:"multiselectEl",modelValue:r.value,"onUpdate:modelValue":[_[0]||(_[0]=A=>r.value=A),_[3]||(_[3]=A=>g(A,!0))],options:i.value,multiple:y.multiple,onSearchChange:f.unref(p),onOpen:_[1]||(_[1]=A=>v(A)),onClose:_[2]||(_[2]=(A,C)=>h(A,C)),onRemove:_[4]||(_[4]=(A,C)=>c("remove",A,C)),onTag:_[5]||(_[5]=(A,C)=>c("tag",A,C)),placeholder:y.placeholder,label:y.itemLabel,"track-by":y.trackBy,"close-on-select":y.closeOnSelect,"show-labels":y.showLabels,disabled:y.disabled,"allow-empty":y.allowEmpty,"select-label":y.selectLabel,"preserve-search":!0,"selected-label":y.selectedLabel,class:["dsg-input--multiselect",{"dsg-input--multiselect--has-errors":y.errors&&y.errors.length,"dsg-input--multiselect--disabled":y.disabled}]},y.$attrs),{caret:f.withCtx(({toggle:A})=>[f.createElementVNode("div",{onMousedown:f.withModifiers(C=>A(),["prevent","stop"]),class:"multiselect__select"},[f.createVNode(V._sfc_main,{icon:"chevron-down"})],40,kl)]),option:f.withCtx(({option:A})=>[f.createElementVNode("span",Ml,f.toDisplayString(A[y.itemLabel]),1),f.createVNode(V._sfc_main,{icon:"check",size:"sm",class:"option-icon text-brand-600"})]),_:1},16,["modelValue","options","multiple","onSearchChange","placeholder","label","track-by","close-on-select","show-labels","disabled","allow-empty","select-label","selected-label","class"]),l.value&&l.value.length?(f.openBlock(),f.createElementBlock("div",Ll,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(l.value,(A,C)=>(f.openBlock(),f.createElementBlock("span",{class:"dsg-input--error",key:C},f.toDisplayString(A),1))),128))])):f.createCommentVNode("",!0)],2))}}),Vl=["name"],Ul=["selected"],$l=["value","selected"],Hl=f.defineComponent({__name:"DsgInputDropdown",props:f.mergeModels({name:{default:""},placeholder:{default:""},classes:{default:""},options:{default:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=f.useModel(t,"modelValue");return(r,n)=>f.withDirectives((f.openBlock(),f.createElementBlock("select",{class:f.normalizeClass(["dsg-input-dropdown",r.classes]),name:r.name,"onUpdate:modelValue":n[0]||(n[0]=i=>e.value=i)},[r.placeholder?(f.openBlock(),f.createElementBlock("option",{key:0,value:"",disabled:"",selected:e.value===""},f.toDisplayString(r.placeholder),9,Ul)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.options,(i,a)=>(f.openBlock(),f.createElementBlock("option",{key:a,value:i.value,selected:e.value===i.value},f.toDisplayString(i.label),9,$l))),128))],10,Vl)),[[f.vModelSelect,e.value]])}}),Gl=["href","title","target"],zl={key:0,class:"dsg-link--label"},Wl=f.defineComponent({__name:"DsgLink",props:{label:{default:"Link"},href:{default:""},uriTarget:{default:"_self"},size:{default:"md"},classes:{default:""},preventDefault:{type:Boolean,default:!1}},emits:["link-clicked"],setup(t,{emit:e}){const r=["dsg-link","dsg-link--"+t.size,t.classes].join(" "),n=e,i=a=>{t.preventDefault&&a.preventDefault(),n("link-clicked",a)};return(a,o)=>(f.openBlock(),f.createElementBlock("a",{href:a.href,title:"Link: "+a.label,target:a.uriTarget,class:f.normalizeClass(f.unref(r)),onClick:i},[f.renderSlot(a.$slots,"dsg-link-content",{},()=>[a.label?(f.openBlock(),f.createElementBlock("span",zl,f.toDisplayString(a.label),1)):f.createCommentVNode("",!0)])],10,Gl))}}),Xl={key:1,class:"dsg-modal__header-text"},jl={key:0,class:"dsg-modal__header-title"},Yl={key:1,class:"dsg-modal__header-description"},Kl={key:1,class:"dsg-modal__body"},Zl=f.defineComponent({__name:"DsgModal",props:{title:{default:""},description:{default:""},miscIcon:{default:null},hasClosedButton:{type:Boolean,default:!0},initialOpen:{type:Boolean,default:!1},closeClickBackground:{type:Boolean,default:!1},wrapperClasses:{default:""},width:{default:400},type:{default:"left"},footerType:{default:"horizontal-even"},primaryButton:{type:[Object,Boolean],default:!1},secondaryButton:{type:[Object,Boolean],default:!1}},emits:["before-open","after-open","before-close","after-close","secondary-button-clicked","primary-button-clicked"],setup(t,{expose:e,emit:r}){const n=r,i=f.ref(t.initialOpen),a=()=>{n("before-open"),i.value=!0,n("after-open")},o=()=>{n("before-close"),i.value=!1,n("after-close")},s=()=>{i.value&&t.closeClickBackground&&o()},l=()=>{n("secondary-button-clicked")},u=()=>{n("primary-button-clicked")};return e({open:a,close:o,secondaryButtonClicked:l,primaryButtonClicked:u}),(c,d)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-modal",`dsg-modal--${i.value?"open":"closed"}`])},[f.createElementVNode("div",{class:"dsg-modal__background",onDblclick:s},null,32),f.createElementVNode("div",{class:f.normalizeClass(["dsg-modal__wrapper",c.wrapperClasses]),style:f.normalizeStyle({width:c.width})},[c.hasClosedButton?(f.openBlock(),f.createBlock(V._sfc_main$3,{key:0,theme:"gray-tertiary",iconBefore:"x",size:"lg",class:f.normalizeClass(["dsg-modal__close-button",`dsg-modal__close-button--${c.type}`]),onClick:o},null,8,["class"])):f.createCommentVNode("",!0),f.renderSlot(c.$slots,"dsg-modal__header",{},()=>[f.createElementVNode("div",{class:f.normalizeClass(["dsg-modal__header",[`dsg-modal__header--${c.type}`,`${c.$slots.default?"dsg-modal__header--with-body":""}`].join(" ")])},[c.miscIcon?(f.openBlock(),f.createBlock(Et,f.normalizeProps(f.mergeProps({key:0},c.miscIcon)),null,16)):f.createCommentVNode("",!0),c.title||c.description?(f.openBlock(),f.createElementBlock("div",Xl,[c.title?(f.openBlock(),f.createElementBlock("h3",jl,f.toDisplayString(c.title),1)):f.createCommentVNode("",!0),c.description?(f.openBlock(),f.createElementBlock("p",Yl,f.toDisplayString(c.description),1)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],2)]),c.$slots.default?(f.openBlock(),f.createElementBlock("div",Kl,[f.renderSlot(c.$slots,"default")])):f.createCommentVNode("",!0),f.renderSlot(c.$slots,"dsg-modal__footer",{},()=>[f.createElementVNode("div",{class:f.normalizeClass(["dsg-modal__footer",`dsg-modal__footer--${c.footerType}`])},[c.secondaryButton?(f.openBlock(),f.createBlock(V._sfc_main$3,f.mergeProps({key:0},c.secondaryButton,{onButtonClicked:l,classes:"dsg-modal__secondary-button"}),null,16)):f.createCommentVNode("",!0),c.primaryButton?(f.openBlock(),f.createBlock(V._sfc_main$3,f.mergeProps({key:1},c.primaryButton,{onButtonClicked:u,classes:"dsg-dsg-modal__primary-button"}),null,16)):f.createCommentVNode("",!0)],2)])],6)],2))}}),ql={class:"dsg-tag--before"},Ql={class:"dsg-tag--label"},Jl={class:"dsg-tag--after"},e1={key:0,class:"dsg-tag--count"},t1=f.defineComponent({__name:"DsgTag",props:{label:{default:""},size:{default:"md"},hasClose:{type:Boolean,default:!1},tagCount:{default:null},avatarUri:{default:""},hasCheckbox:{type:Boolean,default:!1},dotHex:{default:null},destroyOnClose:{type:Boolean,default:!1},value:{default:null},classes:{default:""}},emits:["before-checked","after-checked","before-hide","after-hide","before-destroy","after-destroy"],setup(t,{expose:e,emit:r}){const n=["dsg-tag",`dsg-tag--${t.size}`,`dsg-tag--${t.hasClose?"has-close":"no-close"}`,`dsg-tag--${t.tagCount?"has-count":"no-count"}`,`dsg-tag--${t.avatarUri?"has-avatar":"no-avatar"}`,`dsg-tag--${t.hasCheckbox?"has-checkbox":"no-checkbox"}`,t.classes].join(" "),i=()=>`tag-${t.size}`;t.hasClose&&t.tagCount!==null&&new V.DsgPropSyntaxWarning("DsgTag: 'hasClose' and 'tagCount' props are mutually exclusive. Please use only one of them."),t.avatarUri&&t.dotHex&&new V.DsgPropSyntaxWarning("DsgTag: 'avatarUri' and 'dotHex' props are mutually exclusive. Please use only one of them.");const a=r,o=f.useTemplateRef("dsgTag"),s=g=>{t.destroyOnClose?(a("before-destroy",o.value),o.value?.remove(),a("after-destroy")):(a("before-hide",o.value),o.value&&(o.value.style.display="none"),a("after-hide",o.value))},l=(g,m)=>{a("before-checked",g,m)},u=g=>{a("after-checked",g)},c=f.ref(t.tagCount),d=g=>{c.value=g},v=f.ref(t.value);return e({setTagCount:d,setValue:g=>{v.value=g},getValue:()=>v.value}),(g,m)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(n)),ref:"dsgTag"},[f.createElementVNode("div",ql,[g.hasCheckbox?(f.openBlock(),f.createBlock(V._sfc_main$2,{key:0,class:"dsg-tag--checkbox",size:i(),"no-focus":!0,onBeforeChecked:l,onAfterChecked:u},null,8,["size"])):f.createCommentVNode("",!0),g.avatarUri?(f.openBlock(),f.createBlock(ir,{key:1,"profile-uri":g.avatarUri,size:"xxs","no-focus":!0,class:"dsg-tag--avatar"},null,8,["profile-uri"])):f.createCommentVNode("",!0),g.dotHex?(f.openBlock(),f.createElementBlock("span",{key:2,class:"dsg-tag--dot",style:f.normalizeStyle({backgroundColor:g.dotHex})},null,4)):f.createCommentVNode("",!0)]),f.renderSlot(g.$slots,"dsg-tag--label",{},()=>[f.createElementVNode("span",Ql,f.toDisplayString(g.label),1)]),f.createElementVNode("div",Jl,[c.value&&c.value>0?(f.openBlock(),f.createElementBlock("div",e1,f.toDisplayString(c.value),1)):f.createCommentVNode("",!0),g.hasClose?(f.openBlock(),f.createBlock(V._sfc_main,{key:1,icon:"x-close",class:"dsg-tag--close",onClick:s})):f.createCommentVNode("",!0)])],2))}}),r1={class:"dsg-toggle--element"},n1=["checked","disabled"],i1={key:0,class:"dsg-toggle--label-wrapper"},a1=["innerHTML"],o1=["innerHTML"],s1=f.defineComponent({__name:"DsgToggle",props:{modelValue:{type:Boolean,default:!1},size:{default:"md"},label:{default:""},subText:{default:""},disabled:{type:Boolean,default:!1},classes:{default:""}},emits:["before-toggle","after-toggle","update:modelValue"],setup(t,{expose:e,emit:r}){const n=["dsg-toggle",`dsg-toggle--${t.size}`,`dsg-toggle--${t.disabled?"disabled":"enabled"}`,`dsg-toggle--${t.label.length?"has-label":"no-label"}`,`dsg-toggle--${t.subText.length?"has-subtext":"no-subtext"}`,t.classes].join(" "),i=f.ref(t.modelValue),a=()=>{t.disabled||(l("before-toggle",i.value,!i.value),i.value=!i.value,l("after-toggle",i.value),l("update:modelValue",i.value))},o=f.useTemplateRef("toggleCheckbox"),s=()=>{o.value&&o.value.focus(),t.disabled||a()},l=r;return e({set:c=>{i.value=c}}),(c,d)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(n)),onClick:s},[f.createElementVNode("label",r1,[f.createElementVNode("input",{type:"checkbox",class:"dsg-toggle--checkbox",checked:i.value,onChange:a,title:"checkbox",ref:"toggleCheckbox",disabled:c.disabled},null,40,n1),d[0]||(d[0]=f.createElementVNode("span",{class:"dsg-toggle--slider"},null,-1))]),c.label.length?(f.openBlock(),f.createElementBlock("div",i1,[f.renderSlot(c.$slots,"dsg-toggle--label",{},()=>[f.createElementVNode("h3",{class:"dsg-toggle--label",innerHTML:c.label},null,8,a1)]),c.label.length&&c.subText.length?f.renderSlot(c.$slots,"dsg-toggle--subtext",{key:0},()=>[f.createElementVNode("p",{class:"dsg-toggle--subtext",innerHTML:c.subText},null,8,o1)]):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],2))}}),l1={class:"dsg-progress"},u1={class:"dsg-progress--inner"},f1={key:0,class:"text-sm text-gray-700 min-w-[60px] text-right"},c1={key:0},d1={key:1},h1=f.defineComponent({__name:"DsgProgress",props:{value:{},max:{},showText:{}},setup(t){const e=t,r=f.computed(()=>{const n=e.value/e.max*100;return isNaN(n)?0:Math.min(Math.max(n,0),100)});return(n,i)=>(f.openBlock(),f.createElementBlock("div",l1,[f.createElementVNode("div",u1,[f.createElementVNode("div",{class:"dsg-progress--inner--progress",style:f.normalizeStyle({width:r.value+"%"})},null,4)]),n.showText!=="none"?(f.openBlock(),f.createElementBlock("div",f1,[n.showText==="number"?(f.openBlock(),f.createElementBlock("span",c1,f.toDisplayString(n.value)+"/"+f.toDisplayString(n.max),1)):n.showText==="percentage"?(f.openBlock(),f.createElementBlock("span",d1,f.toDisplayString(r.value.toFixed(2))+"%",1)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)]))}});function v1(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}function p1(t,e){e===void 0&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var g1=function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(i[o]=a[o])},t(r,n)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),x1=function(t){g1(e,t);function e(r,n){var i=this.constructor,a=t.call(this,r,n)||this;return Object.defineProperty(a,"name",{value:i.name,enumerable:!1,configurable:!0}),v1(a,i.prototype),p1(a),a}return e}(Error),y1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ce=function(t){y1(e,t);function e(r){r===void 0&&(r=void 0);var n=t.call(this,r)||this;return n.message=r,n}return e.prototype.getKind=function(){var r=this.constructor;return r.kind},e.kind="Exception",e}(x1),m1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fe=function(t){m1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArgumentException",e}(Ce),w1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),M=function(t){w1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalArgumentException",e}(Ce),_1=function(){function t(e){if(this.binarizer=e,e===null)throw new M("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(e,r){return this.binarizer.getBlackRow(e,r)},t.prototype.getBlackMatrix=function(){return(this.matrix===null||this.matrix===void 0)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,i){var a=this.binarizer.getLuminanceSource().crop(e,r,n,i);return new t(this.binarizer.createBinarizer(a))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},t}(),E1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ye=function(t){E1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(Ce),A1=function(){function t(e){this.source=e}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),te=function(){function t(){}return t.arraycopy=function(e,r,n,i,a){for(;a--;)n[i++]=e[r++]},t.currentTimeMillis=function(){return Date.now()},t}(),C1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zn=function(t){C1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IndexOutOfBoundsException",e}(Ce),b1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),xi=function(t){b1(e,t);function e(r,n){r===void 0&&(r=void 0),n===void 0&&(n=void 0);var i=t.call(this,n)||this;return i.index=r,i.message=n,i}return e.kind="ArrayIndexOutOfBoundsException",e}(zn),S1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ne=function(){function t(){}return t.fill=function(e,r){for(var n=0,i=e.length;n<i;n++)e[n]=r},t.fillWithin=function(e,r,n,i){t.rangeCheck(e.length,r,n);for(var a=r;a<n;a++)e[a]=i},t.rangeCheck=function(e,r,n){if(r>n)throw new M("fromIndex("+r+") > toIndex("+n+")");if(r<0)throw new xi(r);if(n>e)throw new xi(n)},t.asList=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e},t.create=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Array.from({length:r}).fill(n)})},t.createInt32Array=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Int32Array.from({length:r}).fill(n)})},t.equals=function(e,r){if(!e||!r||!e.length||!r.length||e.length!==r.length)return!1;for(var n=0,i=e.length;n<i;n++)if(e[n]!==r[n])return!1;return!0},t.hashCode=function(e){var r,n;if(e===null)return 0;var i=1;try{for(var a=S1(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=31*i+s}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.fillUint8Array=function(e,r){for(var n=0;n!==e.length;n++)e[n]=r},t.copyOf=function(e,r){return e.slice(0,r)},t.copyOfUint8Array=function(e,r){if(e.length<=r){var n=new Uint8Array(r);return n.set(e),n}return e.slice(0,r)},t.copyOfRange=function(e,r,n){var i=n-r,a=new Int32Array(i);return te.arraycopy(e,r,a,0,i),a},t.binarySearch=function(e,r,n){n===void 0&&(n=t.numberComparator);for(var i=0,a=e.length-1;i<=a;){var o=a+i>>1,s=n(r,e[o]);if(s>0)i=o+1;else if(s<0)a=o-1;else return o}return-i-1},t.numberComparator=function(e,r){return e-r},t}(),H=function(){function t(){}return t.numberOfTrailingZeros=function(e){var r;if(e===0)return 32;var n=31;return r=e<<16,r!==0&&(n-=16,e=r),r=e<<8,r!==0&&(n-=8,e=r),r=e<<4,r!==0&&(n-=4,e=r),r=e<<2,r!==0&&(n-=2,e=r),n-(e<<1>>>31)},t.numberOfLeadingZeros=function(e){if(e===0)return 32;var r=1;return e>>>16||(r+=16,e<<=16),e>>>24||(r+=8,e<<=8),e>>>28||(r+=4,e<<=4),e>>>30||(r+=2,e<<=2),r-=e>>>31,r},t.toHexString=function(e){return e.toString(16)},t.toBinaryString=function(e){return String(parseInt(String(e),2))},t.bitCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),e=e+(e>>>4)&252645135,e=e+(e>>>8),e=e+(e>>>16),e&63},t.truncDivision=function(e,r){return Math.trunc(e/r)},t.parseInt=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),ve=function(){function t(e,r){e===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,r==null?this.bits=t.makeArray(e):this.bits=r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>this.bits.length*32){var r=t.makeArray(e);te.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(e){return(this.bits[Math.floor(e/32)]&1<<(e&31))!==0},t.prototype.set=function(e){this.bits[Math.floor(e/32)]|=1<<(e&31)},t.prototype.flip=function(e){this.bits[Math.floor(e/32)]^=1<<(e&31)},t.prototype.getNextSet=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=n[i]}var s=i*32+H.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.getNextUnset=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=~n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=~n[i]}var s=i*32+H.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.setBulk=function(e,r){this.bits[Math.floor(e/32)]=r},t.prototype.setRange=function(e,r){if(r<e||e<0||r>this.size)throw new M;if(r!==e){r--;for(var n=Math.floor(e/32),i=Math.floor(r/32),a=this.bits,o=n;o<=i;o++){var s=o>n?0:e&31,l=o<i?31:r&31,u=(2<<l)-(1<<s);a[o]|=u}}},t.prototype.clear=function(){for(var e=this.bits.length,r=this.bits,n=0;n<e;n++)r[n]=0},t.prototype.isRange=function(e,r,n){if(r<e||e<0||r>this.size)throw new M;if(r===e)return!0;r--;for(var i=Math.floor(e/32),a=Math.floor(r/32),o=this.bits,s=i;s<=a;s++){var l=s>i?0:e&31,u=s<a?31:r&31,c=(2<<u)-(1<<l)&4294967295;if((o[s]&c)!==(n?c:0))return!1}return!0},t.prototype.appendBit=function(e){this.ensureCapacity(this.size+1),e&&(this.bits[Math.floor(this.size/32)]|=1<<(this.size&31)),this.size++},t.prototype.appendBits=function(e,r){if(r<0||r>32)throw new M("Num bits must be between 0 and 32");this.ensureCapacity(this.size+r);for(var n=r;n>0;n--)this.appendBit((e>>n-1&1)===1)},t.prototype.appendBitArray=function(e){var r=e.size;this.ensureCapacity(this.size+r);for(var n=0;n<r;n++)this.appendBit(e.get(n))},t.prototype.xor=function(e){if(this.size!==e.size)throw new M("Sizes don't match");for(var r=this.bits,n=0,i=r.length;n<i;n++)r[n]^=e.bits[n]},t.prototype.toBytes=function(e,r,n,i){for(var a=0;a<i;a++){for(var o=0,s=0;s<8;s++)this.get(e)&&(o|=1<<7-s),e++;r[n+a]=o}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var e=new Int32Array(this.bits.length),r=Math.floor((this.size-1)/32),n=r+1,i=this.bits,a=0;a<n;a++){var o=i[a];o=o>>1&1431655765|(o&1431655765)<<1,o=o>>2&858993459|(o&858993459)<<2,o=o>>4&252645135|(o&252645135)<<4,o=o>>8&16711935|(o&16711935)<<8,o=o>>16&65535|(o&65535)<<16,e[r-a]=o}if(this.size!==n*32){for(var s=n*32-this.size,l=e[0]>>>s,a=1;a<n;a++){var u=e[a];l|=u<<32-s,e[a-1]=l,l=u>>>s}e[n-1]=l}this.bits=e},t.makeArray=function(e){return new Int32Array(Math.floor((e+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&Ne.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+Ne.hashCode(this.bits)},t.prototype.toString=function(){for(var e="",r=0,n=this.size;r<n;r++)(r&7)===0&&(e+=" "),e+=this.get(r)?"X":".";return e},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t}(),Sn;(function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ASSUME_GS1=7]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"})(Sn||(Sn={}));const se=Sn;var I1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=function(t){I1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(Ce),O1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},K;(function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"})(K||(K={}));var de=function(){function t(e,r,n){for(var i,a,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,typeof r=="number"?this.values=Int32Array.from([r]):this.values=r,this.otherEncodingNames=o,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var l=this.values,u=0,c=l.length;u!==c;u++){var d=l[u];t.VALUES_TO_ECI.set(d,this)}try{for(var v=O1(o),h=v.next();!h.done;h=v.next()){var p=h.value;t.NAME_TO_ECI.set(p,this)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new R("incorect value");var r=t.VALUES_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(K.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(K.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(K.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(K.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(K.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(K.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(K.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(K.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(K.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(K.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(K.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(K.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(K.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(K.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(K.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(K.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(K.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(K.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(K.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(K.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(K.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(K.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(K.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(K.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(K.Big5,28,"Big5"),t.GB18030=new t(K.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(K.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),T1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sr=function(t){T1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="UnsupportedOperationException",e}(Ce),je=function(){function t(){}return t.decode=function(e,r){var n=this.encodingName(r);return this.customDecoder?this.customDecoder(e,n):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(n)?this.decodeFallback(e,n):new TextDecoder(n).decode(e)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&e==="ISO-8859-1"},t.encode=function(e,r){var n=this.encodingName(r);return this.customEncoder?this.customEncoder(e,n):typeof TextEncoder>"u"?this.encodeFallback(e):new TextEncoder().encode(e)},t.isBrowser=function(){return typeof window<"u"&&{}.toString.call(window)==="[object Window]"},t.encodingName=function(e){return typeof e=="string"?e:e.getName()},t.encodingCharacterSet=function(e){return e instanceof de?e:de.getCharacterSetECIByName(e)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var i="",a=0,o=e.length;a<o;a++){var s=e[a].toString(16);s.length<2&&(s="0"+s),i+="%"+s}return decodeURIComponent(i)}if(n.equals(de.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Sr("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(e){return e.equals(de.UTF8)||e.equals(de.ISO8859_1)||e.equals(de.ASCII)},t.encodeFallback=function(e){for(var r=btoa(unescape(encodeURIComponent(e))),n=r.split(""),i=[],a=0;a<n.length;a++)i.push(n[a].charCodeAt(0));return new Uint8Array(i)},t}(),ee=function(){function t(){}return t.castAsNonUtf8Char=function(e,r){r===void 0&&(r=null);var n=r?r.getName():this.ISO88591;return je.decode(new Uint8Array([e]),n)},t.guessEncoding=function(e,r){if(r!=null&&r.get(se.CHARACTER_SET)!==void 0)return r.get(se.CHARACTER_SET).toString();for(var n=e.length,i=!0,a=!0,o=!0,s=0,l=0,u=0,c=0,d=0,v=0,h=0,p=0,g=0,m=0,w=0,y=e.length>3&&e[0]===239&&e[1]===187&&e[2]===191,_=0;_<n&&(i||a||o);_++){var A=e[_]&255;o&&(s>0?(A&128)===0?o=!1:s--:(A&128)!==0&&((A&64)===0?o=!1:(s++,(A&32)===0?l++:(s++,(A&16)===0?u++:(s++,(A&8)===0?c++:o=!1))))),i&&(A>127&&A<160?i=!1:A>159&&(A<192||A===215||A===247)&&w++),a&&(d>0?A<64||A===127||A>252?a=!1:d--:A===128||A===160||A>239?a=!1:A>160&&A<224?(v++,p=0,h++,h>g&&(g=h)):A>127?(d++,h=0,p++,p>m&&(m=p)):(h=0,p=0))}return o&&s>0&&(o=!1),a&&d>0&&(a=!1),o&&(y||l+u+c>0)?t.UTF8:a&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:i&&a?g===2&&v===2||w*10>=n?t.SHIFT_JIS:t.ISO88591:i?t.ISO88591:a?t.SHIFT_JIS:o?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=-1;function a(s,l,u,c,d,v){if(s==="%%")return"%";if(r[++i]!==void 0){s=c?parseInt(c.substr(1)):void 0;var h=d?parseInt(d.substr(1)):void 0,p;switch(v){case"s":p=r[i];break;case"c":p=r[i][0];break;case"f":p=parseFloat(r[i]).toFixed(s);break;case"p":p=parseFloat(r[i]).toPrecision(s);break;case"e":p=parseFloat(r[i]).toExponential(s);break;case"x":p=parseInt(r[i]).toString(h||16);break;case"d":p=parseFloat(parseInt(r[i],h||10).toPrecision(s)).toFixed(0);break}p=typeof p=="object"?JSON.stringify(p):(+p).toString(h);for(var g=parseInt(u),m=u&&u[0]+""=="0"?"0":" ";p.length<g;)p=l!==void 0?p+m:m+p;return p}}var o=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(o,a)},t.getBytes=function(e,r){return je.encode(e,r)},t.getCharCode=function(e,r){return r===void 0&&(r=0),e.charCodeAt(r)},t.getCharAt=function(e){return String.fromCharCode(e)},t.SHIFT_JIS=de.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=de.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=de.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),Q=function(){function t(e){e===void 0&&(e=""),this.value=e}return t.prototype.enableDecoding=function(e){return this.encoding=e,this},t.prototype.append=function(e){return typeof e=="string"?this.value+=e.toString():this.encoding?this.value+=ee.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},t.prototype.appendChars=function(e,r,n){for(var i=r;r<r+n;i++)this.append(e[i]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(e){return this.value.charAt(e)},t.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},t.prototype.setCharAt=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+1)},t.prototype.substring=function(e,r){return this.value.substring(e,r)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+r.length)},t}(),Ke=function(){function t(e,r,n,i){if(this.width=e,this.height=r,this.rowSize=n,this.bits=i,r==null&&(r=e),this.height=r,e<1||r<1)throw new M("Both dimensions must be greater than 0");n==null&&(n=Math.floor((e+31)/32)),this.rowSize=n,i==null&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,i=new t(n,r),a=0;a<r;a++)for(var o=e[a],s=0;s<n;s++)o[s]&&i.set(s,a);return i},t.parseFromString=function(e,r,n){if(e===null)throw new M("stringRepresentation cannot be null");for(var i=new Array(e.length),a=0,o=0,s=-1,l=0,u=0;u<e.length;)if(e.charAt(u)===`
13
- `||e.charAt(u)==="\r"){if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new M("row lengths do not match");o=a,l++}u++}else if(e.substring(u,u+r.length)===r)u+=r.length,i[a]=!0,a++;else if(e.substring(u,u+n.length)===n)u+=n.length,i[a]=!1,a++;else throw new M("illegal character encountered: "+e.substring(u));if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new M("row lengths do not match");l++}for(var c=new t(s,l),d=0;d<a;d++)i[d]&&c.set(Math.floor(d%s),Math.floor(d/s));return c},t.prototype.get=function(e,r){var n=r*this.rowSize+Math.floor(e/32);return(this.bits[n]>>>(e&31)&1)!==0},t.prototype.set=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(e&31)&4294967295},t.prototype.unset=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(e&31)&4294967295)},t.prototype.flip=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(e&31)&4294967295},t.prototype.xor=function(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new M("input matrix dimensions do not match");for(var r=new ve(Math.floor(this.width/32)+1),n=this.rowSize,i=this.bits,a=0,o=this.height;a<o;a++)for(var s=a*n,l=e.getRow(a,r).getBitArray(),u=0;u<n;u++)i[s+u]^=l[u]},t.prototype.clear=function(){for(var e=this.bits,r=e.length,n=0;n<r;n++)e[n]=0},t.prototype.setRegion=function(e,r,n,i){if(r<0||e<0)throw new M("Left and top must be nonnegative");if(i<1||n<1)throw new M("Height and width must be at least 1");var a=e+n,o=r+i;if(o>this.height||a>this.width)throw new M("The region must fit inside the matrix");for(var s=this.rowSize,l=this.bits,u=r;u<o;u++)for(var c=u*s,d=e;d<a;d++)l[c+Math.floor(d/32)]|=1<<(d&31)&4294967295},t.prototype.getRow=function(e,r){r==null||r.getSize()<this.width?r=new ve(this.width):r.clear();for(var n=this.rowSize,i=this.bits,a=e*n,o=0;o<n;o++)r.setBulk(o*32,i[a+o]);return r},t.prototype.setRow=function(e,r){te.arraycopy(r.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var e=this.getWidth(),r=this.getHeight(),n=new ve(e),i=new ve(e),a=0,o=Math.floor((r+1)/2);a<o;a++)n=this.getRow(a,n),i=this.getRow(r-1-a,i),n.reverse(),i.reverse(),this.setRow(a,i),this.setRow(r-1-a,n)},t.prototype.getEnclosingRectangle=function(){for(var e=this.width,r=this.height,n=this.rowSize,i=this.bits,a=e,o=r,s=-1,l=-1,u=0;u<r;u++)for(var c=0;c<n;c++){var d=i[u*n+c];if(d!==0){if(u<o&&(o=u),u>l&&(l=u),c*32<a){for(var v=0;(d<<31-v&4294967295)===0;)v++;c*32+v<a&&(a=c*32+v)}if(c*32+31>s){for(var v=31;!(d>>>v);)v--;c*32+v>s&&(s=c*32+v)}}}return s<a||l<o?null:Int32Array.from([a,o,s-a+1,l-o+1])},t.prototype.getTopLeftOnBit=function(){for(var e=this.rowSize,r=this.bits,n=0;n<r.length&&r[n]===0;)n++;if(n===r.length)return null;for(var i=n/e,a=n%e*32,o=r[n],s=0;(o<<31-s&4294967295)===0;)s++;return a+=s,Int32Array.from([a,i])},t.prototype.getBottomRightOnBit=function(){for(var e=this.rowSize,r=this.bits,n=r.length-1;n>=0&&r[n]===0;)n--;if(n<0)return null;for(var i=Math.floor(n/e),a=Math.floor(n%e)*32,o=r[n],s=31;!(o>>>s);)s--;return a+=s,Int32Array.from([a,i])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&Ne.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var e=this.width;return e=31*e+this.width,e=31*e+this.height,e=31*e+this.rowSize,e=31*e+Ne.hashCode(this.bits),e},t.prototype.toString=function(e,r,n){return e===void 0&&(e="X "),r===void 0&&(r=" "),n===void 0&&(n=`
14
- `),this.buildToString(e,r,n)},t.prototype.buildToString=function(e,r,n){for(var i=new Q,a=0,o=this.height;a<o;a++){for(var s=0,l=this.width;s<l;s++)i.append(this.get(s,a)?e:r);i.append(n)}return i.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),N1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),S=function(t){N1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(Ce),D1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),B1=function(t){D1(e,t);function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return e.prototype.getBlackRow=function(r,n){var i=this.getLuminanceSource(),a=i.getWidth();n==null||n.getSize()<a?n=new ve(a):n.clear(),this.initArrays(a);for(var o=i.getRow(r,this.luminances),s=this.buckets,l=0;l<a;l++)s[(o[l]&255)>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(s);if(a<3)for(var l=0;l<a;l++)(o[l]&255)<u&&n.set(l);else for(var c=o[0]&255,d=o[1]&255,l=1;l<a-1;l++){var v=o[l+1]&255;(d*4-c-v)/2<u&&n.set(l),c=d,d=v}return n},e.prototype.getBlackMatrix=function(){var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight(),a=new Ke(n,i);this.initArrays(n);for(var o=this.buckets,s=1;s<5;s++)for(var l=Math.floor(i*s/5),u=r.getRow(l,this.luminances),c=Math.floor(n*4/5),d=Math.floor(n/5);d<c;d++){var v=u[d]&255;o[v>>e.LUMINANCE_SHIFT]++}for(var h=e.estimateBlackPoint(o),p=r.getMatrix(),s=0;s<i;s++)for(var g=s*n,d=0;d<n;d++){var v=p[g+d]&255;v<h&&a.set(d,s)}return a},e.prototype.createBinarizer=function(r){return new e(r)},e.prototype.initArrays=function(r){this.luminances.length<r&&(this.luminances=new Uint8ClampedArray(r));for(var n=this.buckets,i=0;i<e.LUMINANCE_BUCKETS;i++)n[i]=0},e.estimateBlackPoint=function(r){for(var n=r.length,i=0,a=0,o=0,s=0;s<n;s++)r[s]>o&&(a=s,o=r[s]),r[s]>i&&(i=r[s]);for(var l=0,u=0,s=0;s<n;s++){var c=s-a,d=r[s]*c*c;d>u&&(l=s,u=d)}if(a>l){var v=a;a=l,l=v}if(l-a<=n/16)throw new S;for(var h=l-1,p=-1,s=l-1;s>a;s--){var g=s-a,d=g*g*(l-s)*(i-r[s]);d>p&&(h=s,p=d)}return h<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(A1),R1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),P1=function(t){R1(e,t);function e(r){var n=t.call(this,r)||this;return n.matrix=null,n}return e.prototype.getBlackMatrix=function(){if(this.matrix!==null)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&i>=e.MINIMUM_DIMENSION){var a=r.getMatrix(),o=n>>e.BLOCK_SIZE_POWER;(n&e.BLOCK_SIZE_MASK)!==0&&o++;var s=i>>e.BLOCK_SIZE_POWER;(i&e.BLOCK_SIZE_MASK)!==0&&s++;var l=e.calculateBlackPoints(a,o,s,n,i),u=new Ke(n,i);e.calculateThresholdForBlock(a,o,s,n,i,l,u),this.matrix=u}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(r){return new e(r)},e.calculateThresholdForBlock=function(r,n,i,a,o,s,l){for(var u=o-e.BLOCK_SIZE,c=a-e.BLOCK_SIZE,d=0;d<i;d++){var v=d<<e.BLOCK_SIZE_POWER;v>u&&(v=u);for(var h=e.cap(d,2,i-3),p=0;p<n;p++){var g=p<<e.BLOCK_SIZE_POWER;g>c&&(g=c);for(var m=e.cap(p,2,n-3),w=0,y=-2;y<=2;y++){var _=s[h+y];w+=_[m-2]+_[m-1]+_[m]+_[m+1]+_[m+2]}var A=w/25;e.thresholdBlock(r,g,v,A,a,l)}}},e.cap=function(r,n,i){return r<n?n:r>i?i:r},e.thresholdBlock=function(r,n,i,a,o,s){for(var l=0,u=i*o+n;l<e.BLOCK_SIZE;l++,u+=o)for(var c=0;c<e.BLOCK_SIZE;c++)(r[u+c]&255)<=a&&s.set(n+c,i+l)},e.calculateBlackPoints=function(r,n,i,a,o){for(var s=o-e.BLOCK_SIZE,l=a-e.BLOCK_SIZE,u=new Array(i),c=0;c<i;c++){u[c]=new Int32Array(n);var d=c<<e.BLOCK_SIZE_POWER;d>s&&(d=s);for(var v=0;v<n;v++){var h=v<<e.BLOCK_SIZE_POWER;h>l&&(h=l);for(var p=0,g=255,m=0,w=0,y=d*a+h;w<e.BLOCK_SIZE;w++,y+=a){for(var _=0;_<e.BLOCK_SIZE;_++){var A=r[y+_]&255;p+=A,A<g&&(g=A),A>m&&(m=A)}if(m-g>e.MIN_DYNAMIC_RANGE)for(w++,y+=a;w<e.BLOCK_SIZE;w++,y+=a)for(var _=0;_<e.BLOCK_SIZE;_++)p+=r[y+_]&255}var C=p>>e.BLOCK_SIZE_POWER*2;if(m-g<=e.MIN_DYNAMIC_RANGE&&(C=g/2,c>0&&v>0)){var D=(u[c-1][v]+2*u[c][v-1]+u[c-1][v-1])/4;g<D&&(C=D)}u[c][v]=C}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=e.BLOCK_SIZE*5,e.MIN_DYNAMIC_RANGE=24,e}(B1),$r=function(){function t(e,r){this.width=e,this.height=r}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(e,r,n,i){throw new Sr("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Sr("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Sr("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),r=new Q,n=0;n<this.height;n++){for(var i=this.getRow(n,e),a=0;a<this.width;a++){var o=i[a]&255,s=void 0;o<64?s="#":o<128?s="+":o<192?s=".":s=" ",r.append(s)}r.append(`
15
- `)}return r.toString()},t}(),k1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wn=function(t){k1(e,t);function e(r){var n=t.call(this,r.getWidth(),r.getHeight())||this;return n.delegate=r,n}return e.prototype.getRow=function(r,n){for(var i=this.delegate.getRow(r,n),a=this.getWidth(),o=0;o<a;o++)i[o]=255-(i[o]&255);return i},e.prototype.getMatrix=function(){for(var r=this.delegate.getMatrix(),n=this.getWidth()*this.getHeight(),i=new Uint8ClampedArray(n),a=0;a<n;a++)i[a]=255-(r[a]&255);return i},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(r,n,i,a){return new e(this.delegate.crop(r,n,i,a))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}($r),M1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),L1=function(t){M1(e,t);function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return e.makeBufferFromCanvasImageData=function(r){var n=r.getContext("2d").getImageData(0,0,r.width,r.height);return e.toGrayscaleBuffer(n.data,r.width,r.height)},e.toGrayscaleBuffer=function(r,n,i){for(var a=new Uint8ClampedArray(n*i),o=0,s=0,l=r.length;o<l;o+=4,s++){var u=void 0,c=r[o+3];if(c===0)u=255;else{var d=r[o],v=r[o+1],h=r[o+2];u=306*d+601*v+117*h+512>>10}a[s]=u}return a},e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new M("Requested row is outside the image: "+r);var i=this.getWidth(),a=r*i;return n===null?n=this.buffer.slice(a,a+i):(n.length<i&&(n=new Uint8ClampedArray(i)),n.set(this.buffer.slice(a,a+i))),n},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return t.prototype.crop.call(this,r,n,i,a),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(this.tempCanvasElement===null){var r=this.canvas.ownerDocument.createElement("canvas");r.width=this.canvas.width,r.height=this.canvas.height,this.tempCanvasElement=r}return this.tempCanvasElement},e.prototype.rotate=function(r){var n=this.getTempCanvasElement(),i=n.getContext("2d"),a=r*e.DEGREE_TO_RADIANS,o=this.canvas.width,s=this.canvas.height,l=Math.ceil(Math.abs(Math.cos(a))*o+Math.abs(Math.sin(a))*s),u=Math.ceil(Math.abs(Math.sin(a))*o+Math.abs(Math.cos(a))*s);return n.width=l,n.height=u,i.translate(l/2,u/2),i.rotate(a),i.drawImage(this.canvas,o/-2,s/-2),this.buffer=e.makeBufferFromCanvasImageData(n),this},e.prototype.invert=function(){return new Wn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e}($r),F1=function(){function t(e,r,n){this.deviceId=e,this.label=r,this.kind="videoinput",this.groupId=n||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),_e=function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(t,e||[])).next())})},Ee=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},V1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mt=function(){function t(e,r,n){r===void 0&&(r=500),this.reader=e,this.timeBetweenScansMillis=r,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return typeof navigator<"u"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!!(this.isMediaDevicesSuported&&navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(e){this._timeBetweenDecodingAttempts=e<0?0:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(e){this._hints=e||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return _e(this,void 0,void 0,function(){var e,r,n,i,a,o,s,l,u,c,d,v;return Ee(this,function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=h.sent(),r=[];try{for(n=V1(e),i=n.next();!i.done;i=n.next())a=i.value,o=a.kind==="video"?"videoinput":a.kind,o==="videoinput"&&(s=a.deviceId||a.id,l=a.label||"Video device "+(r.length+1),u=a.groupId,c={deviceId:s,label:l,kind:o,groupId:u},r.push(c))}catch(p){d={error:p}}finally{try{i&&!i.done&&(v=n.return)&&v.call(n)}finally{if(d)throw d.error}}return[2,r]}})})},t.prototype.getVideoInputDevices=function(){return _e(this,void 0,void 0,function(){var e;return Ee(this,function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return e=r.sent(),[2,e.map(function(n){return new F1(n.deviceId,n.label)})]}})})},t.prototype.findDeviceById=function(e){return _e(this,void 0,void 0,function(){var r;return Ee(this,function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return r=n.sent(),r?[2,r.find(function(i){return i.deviceId===e})]:[2,null]}})})},t.prototype.decodeFromInputVideoDevice=function(e,r){return _e(this,void 0,void 0,function(){return Ee(this,function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(e,r)];case 1:return[2,n.sent()]}})})},t.prototype.decodeOnceFromVideoDevice=function(e,r){return _e(this,void 0,void 0,function(){var n,i;return Ee(this,function(a){switch(a.label){case 0:return this.reset(),e?n={deviceId:{exact:e}}:n={facingMode:"environment"},i={video:n},[4,this.decodeOnceFromConstraints(i,r)];case 1:return[2,a.sent()]}})})},t.prototype.decodeOnceFromConstraints=function(e,r){return _e(this,void 0,void 0,function(){var n;return Ee(this,function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=i.sent(),[4,this.decodeOnceFromStream(n,r)];case 2:return[2,i.sent()]}})})},t.prototype.decodeOnceFromStream=function(e,r){return _e(this,void 0,void 0,function(){var n,i;return Ee(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return n=a.sent(),[4,this.decodeOnce(n)];case 2:return i=a.sent(),[2,i]}})})},t.prototype.decodeFromInputVideoDeviceContinuously=function(e,r,n){return _e(this,void 0,void 0,function(){return Ee(this,function(i){switch(i.label){case 0:return[4,this.decodeFromVideoDevice(e,r,n)];case 1:return[2,i.sent()]}})})},t.prototype.decodeFromVideoDevice=function(e,r,n){return _e(this,void 0,void 0,function(){var i,a;return Ee(this,function(o){switch(o.label){case 0:return e?i={deviceId:{exact:e}}:i={facingMode:"environment"},a={video:i},[4,this.decodeFromConstraints(a,r,n)];case 1:return[2,o.sent()]}})})},t.prototype.decodeFromConstraints=function(e,r,n){return _e(this,void 0,void 0,function(){var i;return Ee(this,function(a){switch(a.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return i=a.sent(),[4,this.decodeFromStream(i,r,n)];case 2:return[2,a.sent()]}})})},t.prototype.decodeFromStream=function(e,r,n){return _e(this,void 0,void 0,function(){var i;return Ee(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return i=a.sent(),[4,this.decodeContinuously(i,n)];case 2:return[2,a.sent()]}})})},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(e,r){return _e(this,void 0,void 0,function(){var n;return Ee(this,function(i){switch(i.label){case 0:return n=this.prepareVideoElement(r),this.addVideoSource(n,e),this.videoElement=n,this.stream=e,[4,this.playVideoOnLoadAsync(n)];case 1:return i.sent(),[2,n]}})})},t.prototype.playVideoOnLoadAsync=function(e){var r=this;return new Promise(function(n,i){return r.playVideoOnLoad(e,function(){return n()})})},t.prototype.playVideoOnLoad=function(e,r){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(e)},e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",r),this.tryPlayVideo(e)},t.prototype.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2},t.prototype.tryPlayVideo=function(e){return _e(this,void 0,void 0,function(){return Ee(this,function(r){switch(r.label){case 0:if(this.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.play()];case 2:return r.sent(),[3,4];case 3:return r.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}})})},t.prototype.getMediaElement=function(e,r){var n=document.getElementById(e);if(!n)throw new Fe("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==r.toLowerCase())throw new Fe("element with id '"+e+"' must be an "+r+" element");return n},t.prototype.decodeFromImage=function(e,r){if(!e&&!r)throw new Fe("either imageElement with a src set or an url must be provided");return r&&!e?this.decodeFromImageUrl(r):this.decodeFromImageElement(e)},t.prototype.decodeFromVideo=function(e,r){if(!e&&!r)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrl(r):this.decodeFromVideoElement(e)},t.prototype.decodeFromVideoContinuously=function(e,r,n){if(e===void 0&&r===void 0)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrlContinuously(r,n):this.decodeFromVideoElementContinuously(e,n)},t.prototype.decodeFromImageElement=function(e){if(!e)throw new Fe("An image element must be provided.");this.reset();var r=this.prepareImageElement(e);this.imageElement=r;var n;return this.isImageLoaded(r)?n=this.decodeOnce(r,!1,!0):n=this._decodeOnLoadImage(r),n},t.prototype.decodeFromVideoElement=function(e){var r=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(r)},t.prototype.decodeFromVideoElementContinuously=function(e,r){var n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(n,r)},t.prototype._decodeFromVideoElementSetup=function(e){if(!e)throw new Fe("A video element must be provided.");this.reset();var r=this.prepareVideoElement(e);return this.videoElement=r,r},t.prototype.decodeFromImageUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareImageElement();this.imageElement=r;var n=this._decodeOnLoadImage(r);return r.src=e,n},t.prototype.decodeFromVideoUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElement(r);return r.src=e,n},t.prototype.decodeFromVideoUrlContinuously=function(e,r){if(!e)throw new Fe("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),i=this.decodeFromVideoElementContinuously(n,r);return n.src=e,i},t.prototype._decodeOnLoadImage=function(e){var r=this;return new Promise(function(n,i){r.imageLoadedListener=function(){return r.decodeOnce(e,!1,!0).then(n,i)},e.addEventListener("load",r.imageLoadedListener)})},t.prototype._decodeOnLoadVideo=function(e){return _e(this,void 0,void 0,function(){return Ee(this,function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return r.sent(),[4,this.decodeOnce(e)];case 2:return[2,r.sent()]}})})},t.prototype._decodeOnLoadVideoContinuously=function(e,r){return _e(this,void 0,void 0,function(){return Ee(this,function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return n.sent(),this.decodeContinuously(e,r),[2]}})})},t.prototype.isImageLoaded=function(e){return!(!e.complete||e.naturalWidth===0)},t.prototype.prepareImageElement=function(e){var r;return typeof e>"u"&&(r=document.createElement("img"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(r=e),r},t.prototype.prepareVideoElement=function(e){var r;return!e&&typeof document<"u"&&(r=document.createElement("video"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(r=e),r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.prototype.decodeOnce=function(e,r,n){var i=this;r===void 0&&(r=!0),n===void 0&&(n=!0),this._stopAsyncDecode=!1;var a=function(o,s){if(i._stopAsyncDecode){s(new S("Video stream has ended before any code could be detected.")),i._stopAsyncDecode=void 0;return}try{var l=i.decode(e);o(l)}catch(v){var u=r&&v instanceof S,c=v instanceof ye||v instanceof R,d=c&&n;if(u||d)return setTimeout(a,i._timeBetweenDecodingAttempts,o,s);s(v)}};return new Promise(function(o,s){return a(o,s)})},t.prototype.decodeContinuously=function(e,r){var n=this;this._stopContinuousDecode=!1;var i=function(){if(n._stopContinuousDecode){n._stopContinuousDecode=void 0;return}try{var a=n.decode(e);r(a,null),setTimeout(i,n.timeBetweenScansMillis)}catch(l){r(null,l);var o=l instanceof ye||l instanceof R,s=l instanceof S;(o||s)&&setTimeout(i,n._timeBetweenDecodingAttempts)}};i()},t.prototype.decode=function(e){var r=this.createBinaryBitmap(e);return this.decodeBitmap(r)},t.prototype._isHTMLVideoElement=function(e){var r=e;return r.videoWidth!==0},t.prototype.createBinaryBitmap=function(e){this.getCaptureCanvasContext(e),this._isHTMLVideoElement(e)?this.drawFrameOnCanvas(e):this.drawImageOnCanvas(e);var r=this.getCaptureCanvas(e),n=new L1(r),i=new P1(n);return new _1(i)},t.prototype.getCaptureCanvasContext=function(e){if(!this.captureCanvasContext){var r=this.getCaptureCanvas(e),n=void 0;try{n=r.getContext("2d",{willReadFrequently:!0})}catch{n=r.getContext("2d")}this.captureCanvasContext=n}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(e){if(!this.captureCanvas){var r=this.createCaptureCanvas(e);this.captureCanvas=r}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.videoWidth,sHeight:e.videoHeight,dx:0,dy:0,dWidth:e.videoWidth,dHeight:e.videoHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.drawImageOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.naturalWidth,sHeight:e.naturalHeight,dx:0,dy:0,dWidth:e.naturalWidth,dHeight:e.naturalHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.decodeBitmap=function(e){return this.reader.decode(e,this._hints)},t.prototype.createCaptureCanvas=function(e){if(typeof document>"u")return this._destroyCaptureCanvas(),null;var r=document.createElement("canvas"),n,i;return typeof e<"u"&&(e instanceof HTMLVideoElement?(n=e.videoWidth,i=e.videoHeight):e instanceof HTMLImageElement&&(n=e.naturalWidth||e.width,i=e.naturalHeight||e.height)),r.style.width=n+"px",r.style.height=i+"px",r.width=n,r.height=i,r},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach(function(e){return e.stop()}),this.stream=void 0),this._stopAsyncDecode===!1&&this.stopAsyncDecode(),this._stopContinuousDecode===!1&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(typeof this.videoEndedListener<"u"&&this.videoElement.removeEventListener("ended",this.videoEndedListener),typeof this.videoPlayingEventListener<"u"&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),typeof this.videoCanPlayListener<"u"&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.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)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(e,r){try{e.srcObject=r}catch{e.src=URL.createObjectURL(r)}},t.prototype.cleanVideoSource=function(e){try{e.srcObject=null}catch{e.src=""}this.videoElement.removeAttribute("src")},t}(),De=function(){function t(e,r,n,i,a,o){n===void 0&&(n=r==null?0:8*r.length),o===void 0&&(o=te.currentTimeMillis()),this.text=e,this.rawBytes=r,this.numBits=n,this.resultPoints=i,this.format=a,this.timestamp=o,this.text=e,this.rawBytes=r,n==null?this.numBits=r==null?0:8*r.length:this.numBits=n,this.resultPoints=i,this.format=a,this.resultMetadata=null,o==null?this.timestamp=te.currentTimeMillis():this.timestamp=o}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(e,r){this.resultMetadata===null&&(this.resultMetadata=new Map),this.resultMetadata.set(e,r)},t.prototype.putAllMetadata=function(e){e!==null&&(this.resultMetadata===null?this.resultMetadata=e:this.resultMetadata=new Map(e))},t.prototype.addResultPoints=function(e){var r=this.resultPoints;if(r===null)this.resultPoints=e;else if(e!==null&&e.length>0){var n=new Array(r.length+e.length);te.arraycopy(r,0,n,0,r.length),te.arraycopy(e,0,n,r.length,e.length),this.resultPoints=n}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}(),In;(function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(In||(In={}));const F=In;var On;(function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"})(On||(On={}));const me=On;var Hr=function(){function t(e,r,n,i,a,o){a===void 0&&(a=-1),o===void 0&&(o=-1),this.rawBytes=e,this.text=r,this.byteSegments=n,this.ecLevel=i,this.structuredAppendSequenceNumber=a,this.structuredAppendParity=o,this.numBits=e==null?0:8*e.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(e){this.numBits=e},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(e){this.errorsCorrected=e},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(e){this.erasures=e},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(e){this.other=e},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),Qt=function(){function t(){}return t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new M;return this.logTable[e]},t.addOrSubtract=function(e,r){return e^r},t}(),lt=function(){function t(e,r){if(r.length===0)throw new M;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-i),te.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){if(e===0)return this.getCoefficient(0);var r=this.coefficients,n;if(e===1){n=0;for(var i=0,a=r.length;i!==a;i++){var o=r[i];n=Qt.addOrSubtract(n,o)}return n}n=r[0];for(var s=r.length,l=this.field,i=1;i<s;i++)n=Qt.addOrSubtract(l.multiply(e,n),r[i]);return n},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new M("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;te.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=Qt.addOrSubtract(r[s-o],n[s]);return new t(this.field,a)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new M("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=this.field,l=0;l<n;l++)for(var u=r[l],c=0;c<a;c++)o[l+c]=Qt.addOrSubtract(o[l+c],s.multiply(u,i[c]));return new t(s,o)},t.prototype.multiplyScalar=function(e){if(e===0)return this.field.getZero();if(e===1)return this;for(var r=this.coefficients.length,n=this.field,i=new Int32Array(r),a=this.coefficients,o=0;o<r;o++)i[o]=n.multiply(a[o],e);return new t(n,i)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new M;if(r===0)return this.field.getZero();for(var n=this.coefficients,i=n.length,a=new Int32Array(i+e),o=this.field,s=0;s<i;s++)a[s]=o.multiply(n[s],r);return new t(o,a)},t.prototype.divide=function(e){if(!this.field.equals(e.field))throw new M("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new M("Divide by 0");for(var r=this.field,n=r.getZero(),i=this,a=e.getCoefficient(e.getDegree()),o=r.inverse(a);i.getDegree()>=e.getDegree()&&!i.isZero();){var s=i.getDegree()-e.getDegree(),l=r.multiply(i.getCoefficient(i.getDegree()),o),u=e.multiplyByMonomial(s,l),c=r.buildMonomial(s,l);n=n.addOrSubtract(c),i=i.addOrSubtract(u)}return[n,i]},t.prototype.toString=function(){for(var e="",r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);if(n!==0){if(n<0?(e+=" - ",n=-n):e.length>0&&(e+=" + "),r===0||n!==1){var i=this.field.log(n);i===0?e+="1":i===1?e+="a":(e+="a^",e+=i)}r!==0&&(r===1?e+="x":(e+="x^",e+=r))}}return e},t}(),U1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fa=function(t){U1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArithmeticException",e}(Ce),$1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Te=function(t){$1(e,t);function e(r,n,i){var a=t.call(this)||this;a.primitive=r,a.size=n,a.generatorBase=i;for(var o=new Int32Array(n),s=1,l=0;l<n;l++)o[l]=s,s*=2,s>=n&&(s^=r,s&=n-1);a.expTable=o;for(var u=new Int32Array(n),l=0;l<n-1;l++)u[o[l]]=l;return a.logTable=u,a.zero=new lt(a,Int32Array.from([0])),a.one=new lt(a,Int32Array.from([1])),a}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new M;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new lt(this,i)},e.prototype.inverse=function(r){if(r===0)throw new fa;return this.expTable[this.size-this.logTable[r]-1]},e.prototype.multiply=function(r,n){return r===0||n===0?0:this.expTable[(this.logTable[r]+this.logTable[n])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+H.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(r){return r===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(Qt),H1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gr=function(t){H1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReedSolomonException",e}(Ce),G1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fr=function(t){G1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalStateException",e}(Ce),Gr=function(){function t(e){this.field=e}return t.prototype.decode=function(e,r){for(var n=this.field,i=new lt(n,e),a=new Int32Array(r),o=!0,s=0;s<r;s++){var l=i.evaluateAt(n.exp(s+n.getGeneratorBase()));a[a.length-1-s]=l,l!==0&&(o=!1)}if(!o)for(var u=new lt(n,a),c=this.runEuclideanAlgorithm(n.buildMonomial(r,1),u,r),d=c[0],v=c[1],h=this.findErrorLocations(d),p=this.findErrorMagnitudes(v,h),s=0;s<h.length;s++){var g=e.length-1-n.log(h[s]);if(g<0)throw new gr("Bad error location");e[g]=Te.addOrSubtract(e[g],p[s])}},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=this.field,o=e,s=r,l=a.getZero(),u=a.getOne();s.getDegree()>=(n/2|0);){var c=o,d=l;if(o=s,l=u,o.isZero())throw new gr("r_{i-1} was zero");s=c;for(var v=a.getZero(),h=o.getCoefficient(o.getDegree()),p=a.inverse(h);s.getDegree()>=o.getDegree()&&!s.isZero();){var g=s.getDegree()-o.getDegree(),m=a.multiply(s.getCoefficient(s.getDegree()),p);v=v.addOrSubtract(a.buildMonomial(g,m)),s=s.addOrSubtract(o.multiplyByMonomial(g,m))}if(u=v.multiply(l).addOrSubtract(d),s.getDegree()>=o.getDegree())throw new fr("Division algorithm failed to reduce polynomial?")}var w=u.getCoefficient(0);if(w===0)throw new gr("sigmaTilde(0) was zero");var y=a.inverse(w),_=u.multiplyScalar(y),A=s.multiplyScalar(y);return[_,A]},t.prototype.findErrorLocations=function(e){var r=e.getDegree();if(r===1)return Int32Array.from([e.getCoefficient(1)]);for(var n=new Int32Array(r),i=0,a=this.field,o=1;o<a.getSize()&&i<r;o++)e.evaluateAt(o)===0&&(n[i]=a.inverse(o),i++);if(i!==r)throw new gr("Error locator degree does not match number of roots");return n},t.prototype.findErrorMagnitudes=function(e,r){for(var n=r.length,i=new Int32Array(n),a=this.field,o=0;o<n;o++){for(var s=a.inverse(r[o]),l=1,u=0;u<n;u++)if(o!==u){var c=a.multiply(r[u],s),d=(c&1)===0?c|1:c&-2;l=a.multiply(l,d)}i[o]=a.multiply(e.evaluateAt(s),a.inverse(l)),a.getGeneratorBase()!==0&&(i[o]=a.multiply(i[o],s))}return i},t}(),pe;(function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"})(pe||(pe={}));var yi=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),i=this.correctBits(n),a=t.convertBoolArrayToByteArray(i),o=t.getEncodedData(i),s=new Hr(a,o,null,null);return s.setNumBits(i.length),s},t.highLevelDecode=function(e){return this.getEncodedData(e)},t.getEncodedData=function(e){for(var r=e.length,n=pe.UPPER,i=pe.UPPER,a="",o=0;o<r;)if(i===pe.BINARY){if(r-o<5)break;var s=t.readCode(e,o,5);if(o+=5,s===0){if(r-o<11)break;s=t.readCode(e,o,11)+31,o+=11}for(var l=0;l<s;l++){if(r-o<8){o=r;break}var u=t.readCode(e,o,8);a+=ee.castAsNonUtf8Char(u),o+=8}i=n}else{var c=i===pe.DIGIT?4:5;if(r-o<c)break;var u=t.readCode(e,o,c);o+=c;var d=t.getCharacter(i,u);d.startsWith("CTRL_")?(n=i,i=t.getTable(d.charAt(5)),d.charAt(6)==="L"&&(n=i)):(a+=d,i=n)}return a},t.getTable=function(e){switch(e){case"L":return pe.LOWER;case"P":return pe.PUNCT;case"M":return pe.MIXED;case"D":return pe.DIGIT;case"B":return pe.BINARY;case"U":default:return pe.UPPER}},t.getCharacter=function(e,r){switch(e){case pe.UPPER:return t.UPPER_TABLE[r];case pe.LOWER:return t.LOWER_TABLE[r];case pe.MIXED:return t.MIXED_TABLE[r];case pe.PUNCT:return t.PUNCT_TABLE[r];case pe.DIGIT:return t.DIGIT_TABLE[r];default:throw new fr("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Te.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Te.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Te.AZTEC_DATA_10):(n=12,r=Te.AZTEC_DATA_12);var i=this.ddata.getNbDatablocks(),a=e.length/n;if(a<i)throw new R;for(var o=e.length%n,s=new Int32Array(a),l=0;l<a;l++,o+=n)s[l]=t.readCode(e,o,n);try{var u=new Gr(r);u.decode(s,a-i)}catch(m){throw new R(m)}for(var c=(1<<n)-1,d=0,l=0;l<i;l++){var v=s[l];if(v===0||v===c)throw new R;(v===1||v===c-1)&&d++}for(var h=new Array(i*n-d),p=0,l=0;l<i;l++){var v=s[l];if(v===1||v===c-1)h.fill(v>1,p,p+n-1),p+=n-1;else for(var g=n-1;g>=0;--g)h[p++]=(v&1<<g)!==0}return h},t.prototype.extractBits=function(e){var r=this.ddata.isCompact(),n=this.ddata.getNbLayers(),i=(r?11:14)+n*4,a=new Int32Array(i),o=new Array(this.totalBitsInLayer(n,r));if(r)for(var s=0;s<a.length;s++)a[s]=s;else for(var l=i+1+2*H.truncDivision(H.truncDivision(i,2)-1,15),u=i/2,c=H.truncDivision(l,2),s=0;s<u;s++){var d=s+H.truncDivision(s,15);a[u-s-1]=c-d-1,a[u+s]=c+d+1}for(var s=0,v=0;s<n;s++){for(var h=(n-s)*4+(r?9:12),p=s*2,g=i-1-p,m=0;m<h;m++)for(var w=m*2,y=0;y<2;y++)o[v+w+y]=e.get(a[p+y],a[p+m]),o[v+2*h+w+y]=e.get(a[p+m],a[g-y]),o[v+4*h+w+y]=e.get(a[g-y],a[g-m]),o[v+6*h+w+y]=e.get(a[g-m],a[p+y]);v+=h*8}return o},t.readCode=function(e,r,n){for(var i=0,a=r;a<r+n;a++)i<<=1,e[a]&&(i|=1);return i},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b"," ",`
12
+ `,qa=["href","title"],Qa={class:"dsg-avatar--image-wrapper",tabindex:"0",ref:"avatarImageWrapperEl"},Ja=["src","alt"],eo={key:1,class:"dsg-avatar--initials"},to={class:"dsg-avatar--status"},ro={key:0,class:"dsg-avatar--activity"},no=["innerHTML"],io={key:2,class:"dsg-avatar--logo"},ao=["src","alt"],oo={key:0,class:"dsg-avatar--info"},so={class:"dsg-avatar--title"},lo={class:"dsg-avatar--subtext"},or=f.defineComponent({__name:"DsgAvatar",props:{profileUri:{default:""},fullName:{default:""},size:{default:"md"},theme:{default:"activity"},isOnline:{type:Boolean,default:!1},uri:{default:()=>{}},classes:{default:""},companyLogoUri:{default:()=>{}},preventDefault:{type:Boolean,default:!1},title:{default:""},subText:{default:""},noFocus:{type:Boolean,default:!1}},emits:["avatar-clicked","before-change-status","after-change-status"],setup(t,{expose:e,emit:r}){const n=["dsg-avatar",`dsg-avatar--${t.size}`,`dsg-avatar--${t.theme}`,`dsg-avatar--${t.isOnline?"online":"offline"}`,`dsg-avatar--${t.title?.length?"has-info":"no-info"}`,`dsg-avatar--${t.uri?"has-link":"no-link"}`,`dsg-avatar--${t.noFocus?"no-focus":"focus"}`,`dsg-avatar--${["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1?"profile-photo":"non-profile-photo"}`,t.classes].join(" ");["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1&&(["sm","md","lg"].indexOf(t.size)===-1&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'profile-photo' theme only supports the 'sm', 'md', and 'lg' sizes."),(t.fullName||t.title||t.subText)&&new V.DsgWarning("DsgAvatar: The 'profile-photo' theme will not display the 'title' or 'subText' props.")),t.theme==="logo"&&!t.companyLogoUri&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'logo' theme requires a 'companyLogoUri' prop."),["activity","verified","logo"].indexOf(t.theme)!==-1&&t.title?.length&&t.subText?.length&&["xs","sm","md","lg","xl","2xl"].indexOf(t.size)===-1&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'activity', 'verified', and 'logo' themes only support the 'xs', 'sm', 'md', 'lg', and 'xl' sizes when 'title' and 'subText' are provided."),t.theme==="tile"&&!t.title?.length&&!t.fullName&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'tile' theme requires either 'title' or 'fullName' prop."),t.size==="xxs"&&(t.title?.length||t.subText?.length)&&new V.DsgPropSyntaxWarning("DsgAvatar: The 'xxs' size does not support the 'title' or 'subText' props.");const i=v=>{const h=v.split(" ");return(h[0].charAt(0)+h[h.length-1].charAt(0)).toUpperCase()},a=()=>t.fullName?"Avatar of "+t.fullName:"Avatar",o=r,s=f.ref(!1),l=v=>{o("before-change-status",s.value,v),s.value=v,o("after-change-status",s.value)},u=f.useTemplateRef("avatarImageWrapperEl"),c=v=>{t.preventDefault||(o("avatar-clicked",v),u.value&&!t.uri&&u.value.focus())};return e({setUserActiveStatus:l,toggleFocus:v=>{u.value&&(v?u.value.focus():u.value.blur())}}),(v,h)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(n))},[f.createElementVNode("a",{class:"dsg-avatar--link",href:v.uri,title:a(),target:"_blank",ref:"avatarLink",onClick:c},[f.createElementVNode("div",Qa,[f.renderSlot(v.$slots,"dsg-avatar--background",{},()=>[v.profileUri?(f.openBlock(),f.createElementBlock("img",{key:0,class:"dsg-avatar--profile-image",src:v.profileUri,alt:a()},null,8,Ja)):f.createCommentVNode("",!0),!v.profileUri&&v.fullName?(f.openBlock(),f.createElementBlock("span",eo,f.toDisplayString(i(v.fullName)),1)):f.createCommentVNode("",!0),!v.profileUri&&!v.fullName?(f.openBlock(),f.createBlock(V._sfc_main,{key:2,class:"dsg-avatar--user-icon",icon:"user-01",color:f.unref(Ya.ColoursConfig).gray[600],size:v.size},null,8,["color","size"])):f.createCommentVNode("",!0)]),["tile"].indexOf(v.theme)===-1?f.renderSlot(v.$slots,"dsg-avatar--status",{key:0},()=>[f.createElementVNode("div",to,[v.theme==="activity"&&v.isOnline?(f.openBlock(),f.createElementBlock("span",ro)):f.createCommentVNode("",!0),["verified","profile-photo-verified"].indexOf(v.theme)!==-1?(f.openBlock(),f.createElementBlock("span",{key:1,class:"dsg-avatar--verified",innerHTML:f.unref(Za)},null,8,no)):f.createCommentVNode("",!0),v.theme==="logo"?(f.openBlock(),f.createElementBlock("span",io,[f.createElementVNode("img",{src:v.companyLogoUri,alt:a(),class:"dsg-avatar--company-logo"},null,8,ao)])):f.createCommentVNode("",!0)])]):f.createCommentVNode("",!0)],512),v.title?.length||v.theme==="tile"&&(v.title?.length||v.fullName)?(f.openBlock(),f.createElementBlock("div",oo,[v.title?.length||v.theme==="tile"&&(v.title?.length||v.fullName)?f.renderSlot(v.$slots,"dsg-avatar--title",{key:0},()=>[f.createElementVNode("h3",so,f.toDisplayString(v.title?.length?v.title:v.fullName),1)]):f.createCommentVNode("",!0),v.subText?.length?f.renderSlot(v.$slots,"dsg-avatar--subtext",{key:1},()=>[f.createElementVNode("p",lo,f.toDisplayString(v.subText),1)]):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],8,qa)],2))}}),cr={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Nt={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},Ae={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},uo={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},fo={dangerouslyHTMLString:!1,multiple:!0,position:cr.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},co={rtl:!1,newestOnTop:!1,toastClassName:""},zi={...fo,...co};Ae.DEFAULT;var Y=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(Y||{}),xn=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(xn||{});const ho={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},vo={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},po={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},go={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},qn="Toastify--animate Toastify__none-enter";function Wi(t,e=!1){var r;let n=ho;if(!t||typeof t=="string")switch(t){case"flip":n=go;break;case"zoom":n=po;break;case"slide":n=vo;break}else n=t;if(e)n.enter=qn;else if(n.enter===qn){const i=(r=n.exit.split("__")[1])==null?void 0:r.split("-")[0];n.enter=`Toastify--animate Toastify__${i}-enter`}return n}function xo(t){return t.containerId||String(t.position)}const Vr="will-unmount";function yo(t=cr.TOP_RIGHT){return!!document.querySelector(`.${Y.CSS_NAMESPACE}__toast-container--${t}`)}function mo(t=cr.TOP_RIGHT){return`${Y.CSS_NAMESPACE}__toast-container--${t}`}function wo(t,e,r=!1){const n=[`${Y.CSS_NAMESPACE}__toast-container`,`${Y.CSS_NAMESPACE}__toast-container--${t}`,r?`${Y.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return It(e)?e({position:t,rtl:r,defaultClassName:n}):`${n} ${e||""}`}function _o(t){var e;const{position:r,containerClassName:n,rtl:i=!1,style:a={}}=t,o=Y.CSS_NAMESPACE,s=mo(r),l=document.querySelector(`.${o}`),u=document.querySelector(`.${s}`),c=!!u&&!((e=u.className)!=null&&e.includes(Vr)),d=l||document.createElement("div"),v=document.createElement("div");v.className=wo(r,n,i),v.dataset.testid=`${Y.CSS_NAMESPACE}__toast-container--${r}`,v.id=xo(t);for(const h in a)if(Object.prototype.hasOwnProperty.call(a,h)){const p=a[h];v.style[h]=p}return l||(d.className=Y.CSS_NAMESPACE,document.body.appendChild(d)),c||d.appendChild(v),v}function yn(t){var e,r,n;const i=typeof t=="string"?t:((e=t.currentTarget)==null?void 0:e.id)||((r=t.target)==null?void 0:r.id),a=document.getElementById(i);a&&a.removeEventListener("animationend",yn,!1);try{sr[i].unmount(),(n=document.getElementById(i))==null||n.remove(),delete sr[i],delete ge[i]}catch{}}const sr=f.reactive({});function Eo(t,e){const r=document.getElementById(String(e));r&&(sr[r.id]=t)}function mn(t,e=!0){const r=String(t);if(!sr[r])return;const n=document.getElementById(r);n&&n.classList.add(Vr),e?(Co(t),n&&n.addEventListener("animationend",yn,!1)):yn(r),Ke.items=Ke.items.filter(i=>i.containerId!==t)}function Ao(t){for(const e in sr)mn(e,t);Ke.items=[]}function Xi(t,e){const r=document.getElementById(t.toastId);if(r){let n=t;n={...n,...Wi(n.transition)};const i=n.appendPosition?`${n.exit}--${n.position}`:n.exit;r.className+=` ${i}`,e&&e(r)}}function Co(t){for(const e in ge)if(e===t)for(const r of ge[e]||[])Xi(r)}function bo(t){const e=Dt().find(r=>r.toastId===t);return e?.containerId}function Vn(t){return document.getElementById(t)}function So(t){const e=Vn(t.containerId);return e&&e.classList.contains(Vr)}function Qn(t){var e;const r=f.isVNode(t.content)?f.toRaw(t.content.props):null;return r??f.toRaw((e=t.data)!=null?e:{})}function Io(t){return t?Ke.items.filter(e=>e.containerId===t).length>0:Ke.items.length>0}function Oo(){if(Ke.items.length>0){const t=Ke.items.shift();Cr(t?.toastContent,t?.toastProps)}}const ge=f.reactive({}),Ke=f.reactive({items:[]});function Dt(){const t=f.toRaw(ge);return Object.values(t).reduce((e,r)=>[...e,...r],[])}function To(t){return Dt().find(e=>e.toastId===t)}function Cr(t,e={}){if(So(e)){const r=Vn(e.containerId);r&&r.addEventListener("animationend",wn.bind(null,t,e),!1)}else wn(t,e)}function wn(t,e={}){const r=Vn(e.containerId);r&&r.removeEventListener("animationend",wn.bind(null,t,e),!1);const n=ge[e.containerId]||[],i=n.length>0;if(!i&&!yo(e.position)){const a=_o(e),o=f.createApp(Ko,e);e.useHandler&&e.useHandler(o),o.mount(a),Eo(o,a.id)}i&&!e.updateId&&(e.position=n[0].position),f.nextTick(()=>{e.updateId?Re.update(e):Re.add(t,e)})}const Re={add(t,e){const{containerId:r=""}=e;r&&(ge[r]=ge[r]||[],ge[r].find(n=>n.toastId===e.toastId)||setTimeout(()=>{var n,i;e.newestOnTop?(n=ge[r])==null||n.unshift(e):(i=ge[r])==null||i.push(e),e.onOpen&&e.onOpen(Qn(e))},e.delay||0))},remove(t){if(t){const e=bo(t);if(e){const r=ge[e];let n=r.find(i=>i.toastId===t);ge[e]=r.filter(i=>i.toastId!==t),!ge[e].length&&!Io(e)&&mn(e,!1),Oo(),f.nextTick(()=>{n!=null&&n.onClose&&(n.onClose(Qn(n)),n=void 0)})}}},update(t={}){const{containerId:e=""}=t;if(e&&t.updateId){ge[e]=ge[e]||[];const r=ge[e].find(a=>a.toastId===t.toastId),n=r?.position!==t.position||r?.transition!==t.transition,i={...t,disabledEnterTransition:!n,updateId:void 0};Re.dismissForce(t?.toastId),setTimeout(()=>{J(i.content,i)},t.delay||0)}},clear(t,e=!0){t?mn(t,e):Ao(e)},dismissCallback(t){var e;const r=(e=t.currentTarget)==null?void 0:e.id,n=document.getElementById(r);n&&(n.removeEventListener("animationend",Re.dismissCallback,!1),setTimeout(()=>{Re.remove(r)}))},dismiss(t){if(t){const e=Dt();for(const r of e)if(r.toastId===t){Xi(r,n=>{n.addEventListener("animationend",Re.dismissCallback,!1)});break}}},dismissForce(t){if(t){const e=Dt();for(const r of e)if(r.toastId===t){const n=document.getElementById(t);n&&(n.remove(),n.removeEventListener("animationend",Re.dismissCallback,!1),Re.remove(t));break}}}},No=f.reactive({useHandler:void 0}),ji=f.reactive({}),Br=f.reactive({});function Yi(){return Math.random().toString(36).substring(2,9)}function Do(t){return typeof t=="number"&&!isNaN(t)}function _n(t){return typeof t=="string"}function It(t){return typeof t=="function"}function Ur(...t){return f.mergeProps(...t)}function br(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof t?.type=="object")}function Bo(t={}){ji[`${Y.CSS_NAMESPACE}-default-options`]=t}function Ro(){return ji[`${Y.CSS_NAMESPACE}-default-options`]||zi}function Po(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var Sr=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(Sr||{});const Ki={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:cr.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:Nt.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:Ae.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},ko={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Ae.DEFAULT},theme:{type:String,required:!1,default:Nt.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},Mo=f.defineComponent({name:"ProgressBar",props:ko,setup(t,{attrs:e}){const r=f.ref(),n=f.computed(()=>t.hide?"true":"false"),i=f.computed(()=>({...e.style||{},animationDuration:`${t.autoClose===!0?5e3:t.autoClose}ms`,animationPlayState:t.isRunning?"running":"paused",opacity:t.hide||t.autoClose===!1?0:1,transform:t.controlledProgress?`scaleX(${t.progress})`:"none"})),a=f.computed(()=>[`${Y.CSS_NAMESPACE}__progress-bar`,t.controlledProgress?`${Y.CSS_NAMESPACE}__progress-bar--controlled`:`${Y.CSS_NAMESPACE}__progress-bar--animated`,`${Y.CSS_NAMESPACE}__progress-bar-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__progress-bar--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),o=f.computed(()=>`${a.value} ${e?.class||""}`),s=()=>{r.value&&(r.value.onanimationend=null,r.value.ontransitionend=null)},l=()=>{t.isIn&&t.closeToast&&t.autoClose!==!1&&(t.closeToast(),s())},u=f.computed(()=>t.controlledProgress?null:l),c=f.computed(()=>t.controlledProgress?l:null);return f.watchEffect(()=>{r.value&&(s(),r.value.onanimationend=u.value,r.value.ontransitionend=c.value)}),()=>f.createVNode("div",{ref:r,role:"progressbar","aria-hidden":n.value,"aria-label":"notification timer",class:o.value,style:i.value},null)}}),Lo=f.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:Nt.AUTO},type:{type:String,required:!1,default:Nt.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(t){return()=>f.createVNode("button",{class:`${Y.CSS_NAMESPACE}__close-button ${Y.CSS_NAMESPACE}__close-button--${t.theme}`,type:"button",onClick:e=>{e.stopPropagation(),t.closeToast&&t.closeToast(e)},"aria-label":t.ariaLabel},[f.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[f.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),$r=({theme:t,type:e,path:r,...n})=>f.createVNode("svg",f.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`},n),[f.createVNode("path",{d:r},null)]);function Fo(t){return f.createVNode($r,f.mergeProps(t,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function Vo(t){return f.createVNode($r,f.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function Uo(t){return f.createVNode($r,f.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function $o(t){return f.createVNode($r,f.mergeProps(t,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function Ho(){return f.createVNode("div",{class:`${Y.CSS_NAMESPACE}__spinner`},null)}const Ir={info:Vo,warning:Fo,success:Uo,error:$o,spinner:Ho},Go=t=>t in Ir;function zo({theme:t,type:e,isLoading:r,icon:n}){let i;const a=!!r||e==="loading",o={theme:t,type:e};if(a&&(n===void 0||typeof n=="boolean"))return Ir.spinner();if(n!==!1){if(br(n))i=f.toRaw(n);else if(It(n)){const s=n;o.type=a?"loading":e,i=s(o),i=!i&&a?Ir.spinner():i}else f.isVNode(n)?i=f.cloneVNode(n,o):_n(n)||Do(n)?i=n:Go(e)&&(i=Ir[e](o));return i}}const Wo=()=>{};function Xo(t,e,r=Y.COLLAPSE_DURATION){const{scrollHeight:n,style:i}=t,a=r;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition=`all ${a}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,a)})})}function jo(t){const e=f.ref(!1),r=f.ref(!1),n=f.ref(!1),i=f.ref(Sr.Enter),a=f.reactive({...t,appendPosition:t.appendPosition||!1,collapse:typeof t.collapse>"u"?!0:t.collapse,collapseDuration:t.collapseDuration||Y.COLLAPSE_DURATION}),o=a.done||Wo,s=f.computed(()=>a.appendPosition?`${a.enter}--${a.position}`:a.enter),l=f.computed(()=>a.appendPosition?`${a.exit}--${a.position}`:a.exit),u=f.computed(()=>t.pauseOnHover?{onMouseenter:w,onMouseleave:g}:{});function c(){const m=s.value.split(" ");v().addEventListener(xn.ENTRANCE_ANIMATION_END,g,{once:!0});const A=C=>{const b=v();C.target===b&&(b.dispatchEvent(new Event(xn.ENTRANCE_ANIMATION_END)),b.removeEventListener("animationend",A),b.removeEventListener("animationcancel",A),i.value===Sr.Enter&&C.type!=="animationcancel"&&b.classList.remove(...m))},y=()=>{const C=v();C.classList.add(...m),C.addEventListener("animationend",A),C.addEventListener("animationcancel",A)};t.pauseOnFocusLoss&&h(),y()}function d(){if(!v())return;const m=()=>{const y=v();y.removeEventListener("animationend",m),a.collapse?Xo(y,o,a.collapseDuration):o()},A=()=>{const y=v();i.value=Sr.Exit,y&&(y.className+=` ${l.value}`,y.addEventListener("animationend",m))};r.value||(n.value?m():setTimeout(A))}function v(){return t.toastRef.value}function h(){document.hasFocus()||w(),window.addEventListener("focus",g),window.addEventListener("blur",w)}function p(){window.removeEventListener("focus",g),window.removeEventListener("blur",w)}function g(){(!t.loading.value||t.isLoading===void 0)&&(e.value=!0)}function w(){e.value=!1}function _(m){m&&(m.stopPropagation(),m.preventDefault()),r.value=!1}return f.watchEffect(d),f.watchEffect(()=>{const m=Dt();r.value=m.findIndex(A=>A.toastId===a.toastId)>-1}),f.watchEffect(()=>{t.isLoading!==void 0&&(t.loading.value?w():g())}),f.onMounted(c),f.onUnmounted(()=>{t.pauseOnFocusLoss&&p()}),{isIn:r,isRunning:e,hideToast:_,eventHandlers:u}}const Yo=f.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Ki,setup(t){const e=f.ref(),r=f.computed(()=>!!t.isLoading),n=f.computed(()=>t.progress!==void 0&&t.progress!==null),i=f.computed(()=>zo(t)),a=f.computed(()=>[`${Y.CSS_NAMESPACE}__toast`,`${Y.CSS_NAMESPACE}__toast-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__toast--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__toast--rtl`:void 0,t.toastClassName||""].filter(Boolean).join(" ")),{isRunning:o,isIn:s,hideToast:l,eventHandlers:u}=jo({toastRef:e,loading:r,done:()=>{Re.remove(t.toastId)},...Wi(t.transition,t.disabledEnterTransition),...t});return()=>f.createVNode("div",f.mergeProps({id:t.toastId,class:a.value,style:t.toastStyle||{},ref:e,"data-testid":`toast-item-${t.toastId}`,onClick:c=>{t.closeOnClick&&l(),t.onClick&&t.onClick(c)}},u.value),[f.createVNode("div",{role:t.role,"data-testid":"toast-body",class:`${Y.CSS_NAMESPACE}__toast-body ${t.bodyClassName||""}`},[i.value!=null&&f.createVNode("div",{"data-testid":`toast-icon-${t.type}`,class:[`${Y.CSS_NAMESPACE}__toast-icon`,t.isLoading?"":`${Y.CSS_NAMESPACE}--animate-icon ${Y.CSS_NAMESPACE}__zoom-enter`].join(" ")},[br(i.value)?f.h(f.toRaw(i.value),{theme:t.theme,type:t.type}):It(i.value)?i.value({theme:t.theme,type:t.type}):i.value]),f.createVNode("div",{"data-testid":"toast-content"},[br(t.content)?f.h(f.toRaw(t.content),{toastProps:f.toRaw(t),closeToast:l,data:t.data,...t.expandCustomProps?t.contentProps:{contentProps:t.contentProps||{}}}):It(t.content)?t.content({toastProps:f.toRaw(t),closeToast:l,data:t.data}):t.dangerouslyHTMLString?f.h("div",{innerHTML:t.content}):t.content])]),(t.closeButton===void 0||t.closeButton===!0)&&f.createVNode(Lo,{theme:t.theme,closeToast:c=>{c.stopPropagation(),c.preventDefault(),l()}},null),br(t.closeButton)?f.h(f.toRaw(t.closeButton),{closeToast:l,type:t.type,theme:t.theme}):It(t.closeButton)?t.closeButton({closeToast:l,type:t.type,theme:t.theme}):null,f.createVNode(Mo,{className:t.progressClassName,style:t.progressStyle,rtl:t.rtl,theme:t.theme,isIn:s.value,type:t.type,hide:t.hideProgressBar,isRunning:o.value,autoClose:t.autoClose,controlledProgress:n.value,progress:t.progress,closeToast:t.isLoading?void 0:l},null)])}});let ir=0;function Zi(){typeof window>"u"||(ir&&window.cancelAnimationFrame(ir),ir=window.requestAnimationFrame(Zi),Br.lastUrl!==window.location.href&&(Br.lastUrl=window.location.href,Re.clear()))}const Ko=f.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Ki,setup(t){const e=f.computed(()=>t.containerId),r=f.computed(()=>ge[e.value]||[]),n=f.computed(()=>r.value.filter(i=>i.position===t.position));return f.onMounted(()=>{typeof window<"u"&&t.clearOnUrlChange&&window.requestAnimationFrame(Zi)}),f.onUnmounted(()=>{typeof window<"u"&&ir&&(window.cancelAnimationFrame(ir),Br.lastUrl="")}),()=>f.createVNode(f.Fragment,null,[n.value.map(i=>{const{toastId:a=""}=i;return f.createVNode(Yo,f.mergeProps({key:a},i),null)})])}});let jr=!1;const qi={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Qi(){const t=[];return Dt().forEach(e=>{const r=document.getElementById(e.containerId);r&&!r.classList.contains(Vr)&&t.push(e)}),t}function Zo(t){const e=Qi().length,r=t??0;return r>0&&e+Ke.items.length>=r}function qo(t){Zo(t.limit)&&!t.updateId&&Ke.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function dt(t,e,r={}){if(jr)return;r=Ur(Ro(),{type:e},f.toRaw(r)),(!r.toastId||typeof r.toastId!="string"&&typeof r.toastId!="number")&&(r.toastId=Yi()),r={...r,...r.type==="loading"?qi:{},content:t,containerId:r.containerId||String(r.position)};const n=Number(r?.progress);return!isNaN(n)&&n<0&&(r.progress=0),n>1&&(r.progress=1),r.theme==="auto"&&(r.theme=Po()),qo(r),Br.lastUrl=window.location.href,r.multiple?Ke.items.length?r.updateId&&Cr(t,r):Cr(t,r):(jr=!0,J.clearAll(void 0,!1),setTimeout(()=>{Cr(t,r)},0),setTimeout(()=>{jr=!1},390)),r.toastId}const J=(t,e)=>dt(t,Ae.DEFAULT,e);J.info=(t,e)=>dt(t,Ae.DEFAULT,{...e,type:Ae.INFO});J.error=(t,e)=>dt(t,Ae.DEFAULT,{...e,type:Ae.ERROR});J.warning=(t,e)=>dt(t,Ae.DEFAULT,{...e,type:Ae.WARNING});J.warn=J.warning;J.success=(t,e)=>dt(t,Ae.DEFAULT,{...e,type:Ae.SUCCESS});J.loading=(t,e)=>dt(t,Ae.DEFAULT,Ur(e,qi));J.dark=(t,e)=>dt(t,Ae.DEFAULT,Ur(e,{theme:Nt.DARK}));J.remove=t=>{t?Re.dismiss(t):Re.clear()};J.clearAll=(t,e)=>{f.nextTick(()=>{Re.clear(t,e)})};J.isActive=t=>{let e=!1;return e=Qi().findIndex(r=>r.toastId===t)>-1,e};J.update=(t,e={})=>{setTimeout(()=>{const r=To(t);if(r){const n=f.toRaw(r),{content:i}=n,a={...n,...e,toastId:e.toastId||t,updateId:Yi()},o=a.render||i;delete a.render,dt(o,a.type,a)}},0)};J.done=t=>{J.update(t,{isLoading:!1,progress:1})};J.promise=Qo;function Qo(t,{pending:e,error:r,success:n},i){var a,o,s;let l;const u={...i||{},autoClose:!1};e&&(l=_n(e)?J.loading(e,u):J.loading(e.render,{...u,...e}));const c={autoClose:(a=i?.autoClose)!=null?a:!0,closeOnClick:(o=i?.closeOnClick)!=null?o:!0,closeButton:(s=i?.autoClose)!=null?s:null,isLoading:void 0,draggable:null,delay:100},d=(h,p,g)=>{if(p==null){J.remove(l);return}const w={type:h,...c,...i,data:g},_=_n(p)?{render:p}:p;return l?J.update(l,{...w,..._,isLoading:!1}):J(_.render,{...w,..._,isLoading:!1}),g},v=It(t)?t():t;return v.then(h=>{d("success",n,h)}).catch(h=>{d("error",r,h)}),v}J.POSITION=cr;J.THEME=Nt;J.TYPE=Ae;J.TRANSITIONS=uo;const Jo={install(t,e={}){No.useHandler=e.useHandler||(()=>{}),es(e)}};typeof window<"u"&&(window.Vue3Toastify=Jo);function es(t={}){const e=Ur(zi,t);Bo(e)}const ts={class:"dsg-alert__wrapper"},rs=["innerHTML"],Ji=f.defineComponent({__name:"DsgAlertComponent",props:{contentProps:{default:()=>({title:"",message:"",type:"gray",hasCloseButton:!0,useToast:!0})}},setup(t){const e=["dsg-alert","dsg-alert--"+t.contentProps.type,t.contentProps.hasCloseButton?"dsg-alert--has-close":"dsg-alert--no-close"],n=f.useAttrs().closeToast,i=f.ref(!1),a=()=>{t.contentProps.useToast?n():i.value=!0};return(o,s)=>i.value?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(e)},[o.contentProps.type==="gray"?(f.openBlock(),f.createBlock(Ct,{key:0,icon:{icon:"info-circle"},type:"outline",theme:"gray",size:"lg"})):f.createCommentVNode("",!0),o.contentProps.type==="error"?(f.openBlock(),f.createBlock(Ct,{key:1,icon:{icon:"alert-circle"},type:"outline",theme:"error",size:"lg"})):f.createCommentVNode("",!0),o.contentProps.type==="warning"?(f.openBlock(),f.createBlock(Ct,{key:2,icon:{icon:"alert-circle"},type:"outline",theme:"warning",size:"lg"})):f.createCommentVNode("",!0),o.contentProps.type==="success"?(f.openBlock(),f.createBlock(Ct,{key:3,icon:{icon:"check-circle"},type:"outline",theme:"success",size:"lg"})):f.createCommentVNode("",!0),f.createElementVNode("div",ts,[f.createElementVNode("p",{class:f.normalizeClass(["dsg-alert__title",{"dsg-alert__title--with-close-button":o.contentProps.hasCloseButton}])},f.toDisplayString(o.contentProps.title),3),o.contentProps.message?(f.openBlock(),f.createElementBlock("p",{key:0,innerHTML:o.contentProps.message,class:"dsg-alert__message"},null,8,rs)):f.createCommentVNode("",!0)]),o.contentProps.hasCloseButton?(f.openBlock(),f.createElementBlock("button",{key:4,onClick:a,class:"dsg-alert__close-button"},[f.createVNode(V._sfc_main,{icon:"x-close",size:"sm"})])):f.createCommentVNode("",!0)]))}}),ns=new class Zt{info(e="",r="",n={}){Zt.showToast("gray",e,r,n)}error(e="",r="",n={}){Zt.showToast("error",e,r,n)}warning(e="",r="",n={}){Zt.showToast("warning",e,r,n)}success(e="",r="",n={}){Zt.showToast("success",e,r,n)}static showToast(e,r,n,i){const a={hasCloseButton:!1,position:"top-right",maxWidthClass:"",...i};J(Ji,{autoClose:!a.hasCloseButton,closeButton:!1,hideProgressBar:!0,closeOnClick:!a.hasCloseButton,position:a.position,containerClassName:`dsg-alert-container ${a.maxWidthClass}`,toastClassName:"dsg-alert",bodyClassName:"dsg-alert--body",contentProps:{title:r,message:n,type:e,hasCloseButton:a.hasCloseButton},onClick:()=>{}})}},is={class:"dsg-badge--before"},as={key:2,class:"dsg-badge--dot"},os={key:1,class:"dsg-badge--label"},ss={class:"dsg-badge--after"},ls={key:1,class:"dsg-badge--close-wrapper"},ea=f.defineComponent({__name:"DsgBadge",props:{label:{default:""},classes:{default:""},type:{default:"standard"},size:{default:"md"},hasClose:{type:Boolean,default:!1},avatarUri:{default:""},iconBefore:{default:""},icon:{default:""},iconAfter:{default:""},iconOnly:{type:Boolean,default:!1},hasDot:{type:Boolean,default:!1},theme:{default:"badge-modern"},themeColor:{default:"gray"},destroyOnClose:{type:Boolean,default:!1}},emits:["before-hide","after-hide","before-destroy","after-destroy","on-click"],setup(t,{expose:e,emit:r}){const n=t.iconBefore||t.iconAfter||t.type==="add"||t.type==="icon-only",i=["dsg-badge",`dsg-badge--${t.size}`,`dsg-badge--${t.type}`,`dsg-badge--${t.theme}`,`dsg-badge--${t.themeColor}`,`dsg-badge--${t.iconOnly?"icon-only":"label"}`,`${t.hasClose?"dsg-badge--has-close":""}`,`${t.avatarUri?"dsg-badge--has-avatar":""}`,`${t.hasDot?"dsg-badge--has-dot":""}`,`${n?"dsg-badge--has-icon":""}`,`${t.iconBefore?"dsg-badge--has-icon-before":""}`,`${t.iconAfter?"dsg-badge--has-icon-after":""}`,t.classes].join(" ").replaceAll(/\s+/g," ").trim();(t.type==="add"||t.type==="icon-only")&&(t.label||t.avatarUri||t.hasDot||t.iconBefore||t.iconAfter||t.hasClose)&&t.theme!=="badge-modern"&&t.themeColor&&new V.DsgPropSyntaxWarning("DsgBadge: 'add'/'icon-only' type badges should only be called with 'size', 'theme' and 'themeColor' props. Note that 'themeColor' prop is discarded for theme 'badge-modern'."),[t.avatarUri,t.iconBefore,t.hasDot].filter(Boolean).length>1&&new V.DsgPropSyntaxWarning("DsgBadge: 'avatarUri', 'iconBefore' and 'hasDot' props are mutually exclusive. Please use only one of them."),[t.iconAfter,t.hasClose].filter(Boolean).length>1&&new V.DsgPropSyntaxWarning("DsgBadge: 'iconAfter' and 'hasClose' props are mutually exclusive. Please use only one of them.");const s=r,l=f.useTemplateRef("dsgBadge"),u=d=>{t.destroyOnClose?(s("before-destroy",l.value),l.value?.remove(),s("after-destroy")):(s("before-hide",l.value),l.value&&(l.value.style.display="none"),s("after-hide",l.value))},c=d=>{s("on-click",l.value)};return e({hideOrDestroy:u,clickEvent:c}),(d,v)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(i)),ref:"dsgBadge",onClick:c},[d.type==="standard"?f.renderSlot(d.$slots,"dsg-badge--before",{key:0},()=>[f.createElementVNode("div",is,[d.avatarUri?(f.openBlock(),f.createBlock(or,{key:0,"profile-uri":d.avatarUri,class:"dsg-badge--avatar",size:"xxs"},null,8,["profile-uri"])):f.createCommentVNode("",!0),d.iconBefore?(f.openBlock(),f.createBlock(V._sfc_main,{key:1,icon:d.iconBefore,size:"xxs",class:"dsg-badge--icon-before dsg-badge--icon"},null,8,["icon"])):f.createCommentVNode("",!0),d.hasDot?(f.openBlock(),f.createElementBlock("span",as)):f.createCommentVNode("",!0)])]):f.createCommentVNode("",!0),d.type==="standard"?(f.openBlock(),f.createElementBlock("label",os,f.toDisplayString(d.label),1)):f.createCommentVNode("",!0),d.type==="add"?(f.openBlock(),f.createBlock(V._sfc_main,{key:2,icon:"plus",size:"xxs",class:"dsg-badge--icon-add dsg-badge--icon"})):f.createCommentVNode("",!0),d.type==="icon-only"?(f.openBlock(),f.createBlock(V._sfc_main,{key:3,icon:d.icon,size:"xxs",class:"dsg-badge--icon-only dsg-badge--icon"},null,8,["icon"])):f.createCommentVNode("",!0),d.type==="standard"?f.renderSlot(d.$slots,"dsg-badge--after",{key:4},()=>[f.createElementVNode("div",ss,[d.iconAfter?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:d.iconAfter,size:"xxs",class:"dsg-badge--icon-after dsg-badge--icon"},null,8,["icon"])):f.createCommentVNode("",!0),d.hasClose?(f.openBlock(),f.createElementBlock("span",ls,[d.hasClose?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:"x-close",class:"dsg-badge--close",size:"xxs",onClick:u})):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)])]):f.createCommentVNode("",!0)],2))}}),us={class:"dsg-input-number--control"},fs=["disabled"],cs={key:0},ds=["value","disabled"],hs=["disabled"],vs={key:0},ps={key:0,class:"dsg-input-number--label"},gs=f.defineComponent({__name:"DsgInputNumber",props:{modelValue:{},disabled:{type:Boolean},label:{},step:{}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=a=>{if(r.disabled)return;const o=a.target;n("update:modelValue",Number(o.value))};return(a,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-input-number",{"dsg-input-number--disabled":r.disabled}])},[f.createElementVNode("div",us,[f.createElementVNode("button",{type:"button",disabled:r.disabled,class:"dsg-input-number--btn"},[r.disabled?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",cs,"−"))],8,fs),f.createElementVNode("input",{type:"number",value:a.modelValue,onInput:i,disabled:r.disabled,class:"dsg-input-number--input"},null,40,ds),f.createElementVNode("button",{type:"button",disabled:r.disabled,class:"dsg-input-number--btn"},[r.disabled?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",vs,"+"))],8,hs)]),a.label!==void 0||a.$slots.label?(f.openBlock(),f.createElementBlock("div",ps,[f.renderSlot(a.$slots,"label",{},()=>[f.createTextVNode(f.toDisplayString(a.label),1)])])):f.createCommentVNode("",!0)],2))}}),xs={key:0,class:"dsg-checkbox-group--form-wrapper"},ys={class:"dsg-checkbox-group--header"},ms={class:"dsg-checkbox-group--header-title-wrapper"},ws={class:"dsg-checkbox-group--title"},_s=["innerHTML"],Es={class:"dsg-checkbox-group--options"},As=["onClick"],Cs=["textContent"],bs=["innerHTML","data"],Ss=f.defineComponent({__name:"DsgCheckboxGroup",props:f.mergeModels({size:{default:"md"},theme:{default:"form"},title:{default:""},subtext:{default:""},options:{default:()=>[]},tooltip:{default:null},defaultValue:{type:[String,Number,Boolean,Array,null],default:()=>[]}},{modelValue:{type:[String,Number,Boolean,Array,null],default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=f.useModel(t,"modelValue"),r=["dsg-checkbox-group",`dsg-checkbox-group--${t.size}`,`dsg-checkbox-group--theme-${t.theme}`],n=(i,a)=>{i.target instanceof HTMLAnchorElement||(e.value=a.value)};return(i,a)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(r)},[["form","form-radio"].includes(i.theme)?(f.openBlock(),f.createElementBlock("div",xs,[f.createElementVNode("div",ys,[f.renderSlot(i.$slots,"dsg-checkbox-group--header",{},()=>[f.createElementVNode("div",ms,[f.createElementVNode("h3",ws,f.toDisplayString(i.title),1),i.tooltip?(f.openBlock(),f.createBlock(V._sfc_main$1,{key:0,label:i.tooltip,position:"top",triggers:["hover"],"auto-hide":!0,theme:"dark",class:"dsg-checkbox-group--tooltip"},null,8,["label"])):f.createCommentVNode("",!0)]),i.subtext?(f.openBlock(),f.createElementBlock("p",{key:0,class:"dsg-checkbox-group--subtext",innerHTML:i.subtext},null,8,_s)):f.createCommentVNode("",!0)])]),f.createElementVNode("div",Es,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.options,(o,s)=>(f.openBlock(),f.createElementBlock("div",{key:s,class:"dsg-checkbox-group--option"},[f.createVNode(V._sfc_main$2,{label:o.label,value:o.value,disabled:o.disabled,size:"sm",type:["form","panel"].includes(i.theme)?"checkbox":"radio",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l)},null,8,["label","value","disabled","type","modelValue"])]))),128))])])):f.createCommentVNode("",!0),["panel","panel-content"].includes(i.theme)?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(i.options,(o,s)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-checkbox-group--panel",`dsg-checkbox-group--panel-${e.value===o.value?"selected":"unselected"}`]),onClick:l=>n(l,o)},[(f.openBlock(),f.createElementBlock("div",{class:"dsg-checkbox-group--panel-left",key:s},[f.renderSlot(i.$slots,`dsg-checkbox-group--panel-title--${String(o.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{data:o},()=>[o.icon?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:o.icon,size:"xl"},null,8,["icon"])):f.createCommentVNode("",!0),f.createElementVNode("h3",{class:"dsg-checkbox-group--panel-title",textContent:f.toDisplayString(o.label)},null,8,Cs)]),f.renderSlot(i.$slots,`dsg-checkbox-group--panel-subtext--${String(o.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{},()=>[o.subtext?(f.openBlock(),f.createElementBlock("p",{key:0,class:"dsg-checkbox-group--panel-subtext",innerHTML:o.subtext,data:o},null,8,bs)):f.createCommentVNode("",!0)])])),(f.openBlock(),f.createElementBlock("div",{key:s,class:"dsg-checkbox-group--panel-right"},[f.createVNode(V._sfc_main$2,{value:o.value,disabled:o.disabled,type:"radio",modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=l=>e.value=l)},null,8,["value","disabled","modelValue"])]))],10,As))),256)):f.createCommentVNode("",!0)]))}});var Is="2.0.4",En=500,Jn="user-agent",Bt="",ei="?",Rr="function",ut="undefined",Rt="object",An="string",Ie="browser",Qe="cpu",We="device",Ve="engine",ke="os",Ot="result",D="name",S="type",N="vendor",B="version",Oe="architecture",lr="major",T="model",qt="console",U="mobile",Z="tablet",ue="smarttv",Ge="wearable",vr="xr",Qt="embedded",Vt="inapp",Un="brands",yt="formFactors",$n="fullVersionList",Tt="platform",Hn="platformVersion",Hr="bitness",ht="sec-ch-ua",Os=ht+"-full-version-list",Ts=ht+"-arch",Ns=ht+"-"+Hr,Ds=ht+"-form-factors",Bs=ht+"-"+U,Rs=ht+"-"+T,ta=ht+"-"+Tt,Ps=ta+"-version",ra=[Un,$n,U,T,Tt,Hn,Oe,yt,Hr],pr="Amazon",_t="Apple",ti="ASUS",ri="BlackBerry",vt="Google",ni="Huawei",Yr="Lenovo",ii="Honor",gr="LG",Kr="Microsoft",Zr="Motorola",qr="Nvidia",ai="OnePlus",Qr="OPPO",Ut="Samsung",oi="Sharp",$t="Sony",Jr="Xiaomi",en="Zebra",si="Chrome",li="Chromium",it="Chromecast",Or="Edge",Ht="Firefox",Gt="Opera",tn="Facebook",ui="Sogou",Et="Mobile ",zt=" Browser",Cn="Windows",ks=typeof window!==ut,Te=ks&&window.navigator?window.navigator:void 0,lt=Te&&Te.userAgentData?Te.userAgentData:void 0,Ms=function(t,e){var r={},n=e;if(!Pr(e)){n={};for(var i in e)for(var a in e[i])n[a]=e[i][a].concat(n[a]?n[a]:[])}for(var o in t)r[o]=n[o]&&n[o].length%2===0?n[o].concat(t[o]):t[o];return r},Gr=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},bn=function(t,e){if(typeof t===Rt&&t.length>0){for(var r in t)if(Je(e)==Je(t[r]))return!0;return!1}return Mt(t)?Je(e)==Je(t):!1},Pr=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?Pr(t[r]):!1)},Mt=function(t){return typeof t===An},rn=function(t){if(t){for(var e=[],r=Pt(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=kr(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=kr(r[n]);return e}},Je=function(t){return Mt(t)?t.toLowerCase():t},nn=function(t){return Mt(t)?Pt(/[^\d\.]/g,t).split(".")[0]:void 0},et=function(t){for(var e in t){var r=t[e];typeof r==Rt&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Pt=function(t,e){return Mt(e)?e.replace(t,Bt):e},Wt=function(t){return Pt(/\\?\"/g,t)},kr=function(t,e){if(Mt(t))return t=Pt(/^\s\s*/,t),typeof e===ut?t:t.substring(0,En)},an=function(t,e){if(!(!t||!e))for(var r=0,n,i,a,o,s,l;r<e.length&&!s;){var u=e[r],c=e[r+1];for(n=i=0;n<u.length&&!s&&u[n];)if(s=u[n++].exec(t),s)for(a=0;a<c.length;a++)l=s[++i],o=c[a],typeof o===Rt&&o.length>0?o.length===2?typeof o[1]==Rr?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===Rr&&!(o[1].exec&&o[1].test)?o.length>3?this[o[0]]=l?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=l?o[1].call(this,l,o[2]):void 0:o.length==3?this[o[0]]=l?l.replace(o[1],o[2]):void 0:o.length==4?this[o[0]]=l?o[3].call(this,l.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=l?o[3].apply(this,[l.replace(o[1],o[2])].concat(o.slice(4))):void 0)):this[o]=l||void 0;r+=2}},ze=function(t,e){for(var r in e)if(typeof e[r]===Rt&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(bn(e[r][n],t))return r===ei?void 0:r}else if(bn(e[r],t))return r===ei?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},fi={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},ci={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Ls={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},di={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[B,[D,Et+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[B,[D,Or+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[B,[D,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[D,B],[/opios[\/ ]+([\w\.]+)/i],[B,[D,Gt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[B,[D,Gt+" GX"]],[/\bopr\/([\w\.]+)/i],[B,[D,Gt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[B,[D,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[B,[D,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[D,B],[/quark(?:pc)?\/([-\w\.]+)/i],[B,[D,"Quark"]],[/\bddg\/([\w\.]+)/i],[B,[D,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[B,[D,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[B,[D,"WeChat"]],[/konqueror\/([\w\.]+)/i],[B,[D,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[B,[D,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[B,[D,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[B,[D,"Smart "+Yr+zt]],[/(avast|avg)\/([\w\.]+)/i],[[D,/(.+)/,"$1 Secure"+zt],B],[/\bfocus\/([\w\.]+)/i],[B,[D,Ht+" Focus"]],[/\bopt\/([\w\.]+)/i],[B,[D,Gt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[B,[D,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[B,[D,"Dolphin"]],[/coast\/([\w\.]+)/i],[B,[D,Gt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[B,[D,"MIUI"+zt]],[/fxios\/([\w\.-]+)/i],[B,[D,Et+Ht]],[/\bqihoobrowser\/?([\w\.]*)/i],[B,[D,"360"]],[/\b(qq)\/([\w\.]+)/i],[[D,/(.+)/,"$1Browser"],B],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[D,/(.+)/,"$1"+zt],B],[/samsungbrowser\/([\w\.]+)/i],[B,[D,Ut+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[B,[D,ui+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[D,ui+" Mobile"],B],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[D,B],[/(lbbrowser|rekonq)/i],[D],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[B,D],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[D,tn],B,[S,Vt]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[D,B,[S,Vt]],[/\bgsa\/([\w\.]+) .*safari\//i],[B,[D,"GSA"],[S,Vt]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[B,[D,"TikTok"],[S,Vt]],[/\[(linkedin)app\]/i],[D,[S,Vt]],[/(chromium)[\/ ]([-\w\.]+)/i],[D,B],[/headlesschrome(?:\/([\w\.]+)| )/i],[B,[D,si+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[B,[D,Or+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[D,si+" WebView"],B],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[B,[D,"Android"+zt]],[/chrome\/([\w\.]+) mobile/i],[B,[D,Et+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[D,B],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[B,[D,Et+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[D,Et+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[B,D],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[D,[B,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[D,B],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[D,Et+Ht],B],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[D,"Netscape"],B],[/(wolvic|librewolf)\/([\w\.]+)/i],[D,B],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[B,[D,Ht+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[D,[B,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[D,[B,/[^\d\.]+./,Bt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Oe,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Oe,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Oe,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Oe,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Oe,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Oe,/ower/,Bt,Je]],[/ sun4\w[;\)]/i],[[Oe,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Oe,Je]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[T,[N,Ut],[S,Z]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[T,[N,Ut],[S,U]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[T,[N,_t],[S,U]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[T,[N,_t],[S,Z]],[/(macintosh);/i],[T,[N,_t]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[T,[N,oi],[S,U]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[T,[N,ii],[S,Z]],[/honor([-\w ]+)[;\)]/i],[T,[N,ii],[S,U]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[T,[N,ni],[S,Z]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[T,[N,ni],[S,U]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[T,/_/g," "],[N,Jr],[S,Z]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[T,/_/g," "],[N,Jr],[S,U]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[T,[N,ai],[S,U]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[T,[N,Qr],[S,U]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[T,[N,ze,{OnePlus:["203","304","403","404","413","415"],"*":Qr}],[S,Z]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[T,[N,"BLU"],[S,U]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[T,[N,"Vivo"],[S,U]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[T,[N,"Realme"],[S,U]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[T,[N,Yr],[S,Z]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[T,[N,Yr],[S,U]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[T,[N,Zr],[S,U]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[T,[N,Zr],[S,Z]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[T,[N,gr],[S,Z]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[T,[N,gr],[S,U]],[/(nokia) (t[12][01])/i],[N,T,[S,Z]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[T,/_/g," "],[S,U],[N,"Nokia"]],[/(pixel (c|tablet))\b/i],[T,[N,vt],[S,Z]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[T,[N,vt],[S,U]],[/(google) (pixelbook( go)?)/i],[N,T],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[T,[N,$t],[S,U]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[T,"Xperia Tablet"],[N,$t],[S,Z]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[T,[N,pr],[S,Z]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[T,/(.+)/g,"Fire Phone $1"],[N,pr],[S,U]],[/(playbook);[-\w\),; ]+(rim)/i],[T,N,[S,Z]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[T,[N,ri],[S,U]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[T,[N,ti],[S,Z]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[T,[N,ti],[S,U]],[/(nexus 9)/i],[T,[N,"HTC"],[S,Z]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[N,[T,/_/g," "],[S,U]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[T,[N,"TCL"],[S,Z]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[T,[N,"TCL"],[S,U]],[/(itel) ((\w+))/i],[[N,Je],T,[S,ze,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[T,[N,"Acer"],[S,Z]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[T,[N,"Meizu"],[S,U]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[T,[N,"Ulefone"],[S,U]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[T,[N,"Energizer"],[S,U]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[T,[N,"Cat"],[S,U]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[T,[N,"Smartfren"],[S,U]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[T,[N,"Nothing"],[S,U]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[T,[N,"Archos"],[S,Z]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[T,[N,"Archos"],[S,U]],[/; (n159v)/i],[T,[N,"HMD"],[S,U]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[N,T,[S,Z]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[N,T,[S,U]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[N,T,[S,Z]],[/(surface duo)/i],[T,[N,Kr],[S,Z]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[T,[N,"Fairphone"],[S,U]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[T,[N,qr],[S,Z]],[/(sprint) (\w+)/i],[N,T,[S,U]],[/(kin\.[onetw]{3})/i],[[T,/\./g," "],[N,Kr],[S,U]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[T,[N,en],[S,Z]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[T,[N,en],[S,U]],[/smart-tv.+(samsung)/i],[N,[S,ue]],[/hbbtv.+maple;(\d+)/i],[[T,/^/,"SmartTV"],[N,Ut],[S,ue]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[N,T,[S,ue]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[N,gr],[S,ue]],[/(apple) ?tv/i],[N,[T,_t+" TV"],[S,ue]],[/crkey.*devicetype\/chromecast/i],[[T,it+" Third Generation"],[N,vt],[S,ue]],[/crkey.*devicetype\/([^/]*)/i],[[T,/^/,"Chromecast "],[N,vt],[S,ue]],[/fuchsia.*crkey/i],[[T,it+" Nest Hub"],[N,vt],[S,ue]],[/crkey/i],[[T,it],[N,vt],[S,ue]],[/(portaltv)/i],[T,[N,tn],[S,ue]],[/droid.+aft(\w+)( bui|\))/i],[T,[N,pr],[S,ue]],[/(shield \w+ tv)/i],[T,[N,qr],[S,ue]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[T,[N,oi],[S,ue]],[/(bravia[\w ]+)( bui|\))/i],[T,[N,$t],[S,ue]],[/(mi(tv|box)-?\w+) bui/i],[T,[N,Jr],[S,ue]],[/Hbbtv.*(technisat) (.*);/i],[N,T,[S,ue]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[N,/.+\/(\w+)/,"$1",ze,{LG:"lge"}],[T,kr],[S,ue]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[T,[S,ue]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[S,ue]],[/(playstation \w+)/i],[T,[N,$t],[S,qt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[T,[N,Kr],[S,qt]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[N,T,[S,qt]],[/droid.+; (shield)( bui|\))/i],[T,[N,qr],[S,qt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[T,[N,Ut],[S,Ge]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[N,T,[S,Ge]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[T,[N,Qr],[S,Ge]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[T,[N,_t],[S,Ge]],[/(opwwe\d{3})/i],[T,[N,ai],[S,Ge]],[/(moto 360)/i],[T,[N,Zr],[S,Ge]],[/(smartwatch 3)/i],[T,[N,$t],[S,Ge]],[/(g watch r)/i],[T,[N,gr],[S,Ge]],[/droid.+; (wt63?0{2,3})\)/i],[T,[N,en],[S,Ge]],[/droid.+; (glass) \d/i],[T,[N,vt],[S,vr]],[/(pico) (4|neo3(?: link|pro)?)/i],[N,T,[S,vr]],[/(quest( \d| pro)?s?).+vr/i],[T,[N,tn],[S,vr]],[/mobile vr; rv.+firefox/i],[[S,vr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[N,[S,Qt]],[/(aeobc)\b/i],[T,[N,pr],[S,Qt]],[/(homepod).+mac os/i],[T,[N,_t],[S,Qt]],[/windows iot/i],[[S,Qt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[T,[S,ze,{mobile:"Mobile",xr:"VR","*":Z}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[S,Z]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[S,U]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[T,[N,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[B,[D,Or+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[D,B],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[B,[D,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[D,B],[/ladybird\//i],[[D,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[B,D]],os:[[/(windows nt) (6\.[23]); arm/i],[[D,/N/,"R"],[B,ze,fi]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[D,B],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[B,/(;|\))/g,"",ze,fi],[D,Cn]],[/(windows ce)\/?([\d\.]*)/i],[D,B],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[D,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[D,"macOS"],[B,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[B,[D,it+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[B,[D,it+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[B,[D,it+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[B,[D,it+" Linux"]],[/crkey\/([\d\.]+)/i],[B,[D,it]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,D],[/(ubuntu) ([\w\.]+) like android/i],[[D,/(.+)/,"$1 Touch"],B],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[D,B],[/\(bb(10);/i],[B,[D,ri]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[B,[D,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[D,Ht+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[B,[D,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[B,ze,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[D,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[B,[D,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[D,"Chrome OS"],B],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[D,B],[/(sunos) ?([\d\.]*)/i],[[D,"Solaris"],B],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[D,B]]},xr=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return et.call(t.init,[[Ie,[D,B,lr,S]],[Qe,[Oe]],[We,[S,T,N]],[Ve,[D,B]],[ke,[D,B]]]),et.call(t.isIgnore,[[Ie,[B,lr]],[Ve,[B]],[ke,[B]]]),et.call(t.isIgnoreRgx,[[Ie,/ ?browser$/i],[ke,/ ?os$/i]]),et.call(t.toString,[[Ie,[D,B]],[Qe,[Oe]],[We,[N,T]],[Ve,[D,B]],[ke,[D,B]]]),t}(),Fs=function(t,e){var r=xr.init[e],n=xr.isIgnore[e]||0,i=xr.isIgnoreRgx[e]||0,a=xr.toString[e]||0;function o(){et.call(this,r)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return lt?lt.getHighEntropyValues(ra).then(function(s){return t.setCH(new na(s,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Ot&&(o.prototype.is=function(s){var l=!1;for(var u in this)if(this.hasOwnProperty(u)&&!bn(n,u)&&Je(i?Pt(i,this[u]):this[u])==Je(i?Pt(i,s):s)){if(l=!0,s!=ut)break}else if(s==ut&&l){l=!l;break}return l},o.prototype.toString=function(){var s=Bt;for(var l in a)typeof this[a[l]]!==ut&&(s+=(s?" ":Bt)+this[a[l]]);return s||ut}),lt||(o.prototype.then=function(s){var l=this,u=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};u.prototype={is:o.prototype.is,toString:o.prototype.toString};var c=new u;return s(c),c}),new o};function na(t,e){if(t=t||{},et.call(this,ra),e)et.call(this,[[Un,rn(t[ht])],[$n,rn(t[Os])],[U,/\?1/.test(t[Bs])],[T,Wt(t[Rs])],[Tt,Wt(t[ta])],[Hn,Wt(t[Ps])],[Oe,Wt(t[Ts])],[yt,rn(t[Ds])],[Hr,Wt(t[Ns])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==ut&&(this[r]=t[r])}function hi(t,e,r,n){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,a){return this.data[i]=a,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(Te&&Te.userAgent==this.ua)switch(this.itemType){case Ie:Te.brave&&typeof Te.brave.isBrave==Rr&&this.set(D,"Brave");break;case We:!this.get(S)&&lt&&lt[U]&&this.set(S,U),this.get(T)=="Macintosh"&&Te&&typeof Te.standalone!==ut&&Te.maxTouchPoints&&Te.maxTouchPoints>2&&this.set(T,"iPad").set(S,Z);break;case ke:!this.get(D)&&lt&&lt[Tt]&&this.set(D,lt[Tt]);break;case Ot:var i=this.data,a=function(o){return i[o].getItem().detectFeature().get()};this.set(Ie,a(Ie)).set(Qe,a(Qe)).set(We,a(We)).set(Ve,a(Ve)).set(ke,a(ke))}return this},this.parseUA=function(){return this.itemType!=Ot&&an.call(this.data,this.ua,this.rgxMap),this.itemType==Ie&&this.set(lr,nn(this.get(B))),this},this.parseCH=function(){var i=this.uaCH,a=this.rgxMap;switch(this.itemType){case Ie:case Ve:var o=i[$n]||i[Un],s;if(o)for(var l in o){var u=o[l].brand||o[l],c=o[l].version;this.itemType==Ie&&!/not.a.brand/i.test(u)&&(!s||/Chrom/.test(s)&&u!=li||s==Or&&/WebView2/.test(u))&&(u=ze(u,Ls),s=this.get(D),s&&!/Chrom/.test(s)&&/Chrom/.test(u)||this.set(D,u).set(B,c).set(lr,nn(c)),s=u),this.itemType==Ve&&u==li&&this.set(B,c)}break;case Qe:var d=i[Oe];d&&(d&&i[Hr]=="64"&&(d+="64"),an.call(this.data,d+";",a));break;case We:if(i[U]&&this.set(S,U),i[T]&&(this.set(T,i[T]),!this.get(S)||!this.get(N))){var v={};an.call(v,"droid 9; "+i[T]+")",a),!this.get(S)&&v.type&&this.set(S,v.type),!this.get(N)&&v.vendor&&this.set(N,v.vendor)}if(i[yt]){var h;if(typeof i[yt]!="string")for(var p=0;!h&&p<i[yt].length;)h=ze(i[yt][p++],ci);else h=ze(i[yt],ci);this.set(S,h)}break;case ke:var g=i[Tt];if(g){var w=i[Hn];g==Cn&&(w=parseInt(nn(w),10)>=13?"11":"10"),this.set(D,g).set(B,w)}this.get(D)==Cn&&i[T]=="Xbox"&&this.set(D,"Xbox").set(B,void 0);break;case Ot:var _=this.data,m=function(A){return _[A].getItem().setCH(i).parseCH().get()};this.set(Ie,m(Ie)).set(Qe,m(Qe)).set(We,m(We)).set(Ve,m(Ve)).set(ke,m(ke))}return this},et.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",Fs(this,t)]]),this}function tt(t,e,r){if(typeof t===Rt?(Pr(t,!0)?(typeof e===Rt&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===An&&!Pr(e,!0)&&(r=e,e=void 0),r&&typeof r.append===Rr){var n={};r.forEach(function(l,u){n[u]=l}),r=n}if(!(this instanceof tt))return new tt(t,e,r).getResult();var i=typeof t===An?t:r&&r[Jn]?r[Jn]:Te&&Te.userAgent?Te.userAgent:Bt,a=new na(r,!0),o=e?Ms(di,e):di,s=function(l){return l==Ot?function(){return new hi(l,i,o,a).set("ua",i).set(Ie,this.getBrowser()).set(Qe,this.getCPU()).set(We,this.getDevice()).set(Ve,this.getEngine()).set(ke,this.getOS()).get()}:function(){return new hi(l,i,o[l],a).parseUA().get()}};return et.call(this,[["getBrowser",s(Ie)],["getCPU",s(Qe)],["getDevice",s(We)],["getEngine",s(Ve)],["getOS",s(ke)],["getResult",s(Ot)],["getUA",function(){return i}],["setUA",function(l){return Mt(l)&&(i=l.length>En?kr(l,En):l),this}]]).setUA(i),this}tt.VERSION=Is;tt.BROWSER=Gr([D,B,lr,S]);tt.CPU=Gr([Oe]);tt.DEVICE=Gr([T,N,S,qt,U,ue,Z,Ge,Qt]);tt.ENGINE=tt.OS=Gr([D,B]);const on=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function sn(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function Xt(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function ia(t,e){const r=e.slice(0,e.length-1);for(let n=0;n<r.length;n++)r[n]=t[r[n].toLowerCase()];return r}function aa(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");const e=t.split(",");let r=e.lastIndexOf("");for(;r>=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}function Vs(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let a=0;a<r.length;a++)n.indexOf(r[a])===-1&&(i=!1);return i}const ur={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":on?173:189,"=":on?61:187,";":on?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},$e={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},Jt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},xe={16:!1,18:!1,17:!1,91:!1},oe={};for(let t=1;t<20;t++)ur["f".concat(t)]=111+t;let ae=[],ar=null,oa="all";const qe=new Map,Lt=t=>ur[t.toLowerCase()]||$e[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),Us=t=>Object.keys(ur).find(e=>ur[e]===t),$s=t=>Object.keys($e).find(e=>$e[e]===t);function sa(t){oa=t||"all"}function fr(){return oa||"all"}function Hs(){return ae.slice(0)}function Gs(){return ae.map(t=>Us(t)||$s(t)||String.fromCharCode(t))}function zs(){const t=[];return Object.keys(oe).forEach(e=>{oe[e].forEach(r=>{let{key:n,scope:i,mods:a,shortcut:o}=r;t.push({scope:i,shortcut:o,mods:a,keys:n.split("+").map(s=>Lt(s))})})}),t}function Ws(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||r==="TEXTAREA"||r==="SELECT")&&!e.readOnly)&&(n=!1),n}function Xs(t){return typeof t=="string"&&(t=Lt(t)),ae.indexOf(t)!==-1}function js(t,e){let r,n;t||(t=fr());for(const i in oe)if(Object.prototype.hasOwnProperty.call(oe,i))for(r=oe[i],n=0;n<r.length;)r[n].scope===t?r.splice(n,1).forEach(o=>{let{element:s}=o;return Gn(s)}):n++;fr()===t&&sa(e||"all")}function Ys(t){let e=t.keyCode||t.which||t.charCode;t.key&&t.key.toLowerCase()==="capslock"&&(e=Lt(t.key));const r=ae.indexOf(e);if(r>=0&&ae.splice(r,1),t.key&&t.key.toLowerCase()==="meta"&&ae.splice(0,ae.length),(e===93||e===224)&&(e=91),e in xe){xe[e]=!1;for(const n in $e)$e[n]===e&&(Xe[n]=!1)}}function la(t){if(typeof t>"u")Object.keys(oe).forEach(i=>{Array.isArray(oe[i])&&oe[i].forEach(a=>yr(a)),delete oe[i]}),Gn(null);else if(Array.isArray(t))t.forEach(i=>{i.key&&yr(i)});else if(typeof t=="object")t.key&&yr(t);else if(typeof t=="string"){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let[i,a]=r;typeof i=="function"&&(a=i,i=""),yr({key:t,scope:i,method:a,splitKey:"+"})}}const yr=t=>{let{key:e,scope:r,method:n,splitKey:i="+"}=t;aa(e).forEach(o=>{const s=o.split(i),l=s.length,u=s[l-1],c=u==="*"?"*":Lt(u);if(!oe[c])return;r||(r=fr());const d=l>1?ia($e,s):[],v=[];oe[c]=oe[c].filter(h=>{const g=(n?h.method===n:!0)&&h.scope===r&&Vs(h.mods,d);return g&&v.push(h.element),!g}),v.forEach(h=>Gn(h))})};function vi(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||e.scope==="all"){i=e.mods.length>0;for(const a in xe)Object.prototype.hasOwnProperty.call(xe,a)&&(!xe[a]&&e.mods.indexOf(+a)>-1||xe[a]&&e.mods.indexOf(+a)===-1)&&(i=!1);(e.mods.length===0&&!xe[16]&&!xe[18]&&!xe[17]&&!xe[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(ae),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function pi(t,e){const r=oe["*"];let n=t.keyCode||t.which||t.charCode;if(t.key&&t.key.toLowerCase()==="capslock"||!Xe.filter.call(this,t))return;if((n===93||n===224)&&(n=91),ae.indexOf(n)===-1&&n!==229&&ae.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(s=>{const l=Jt[s];t[s]&&ae.indexOf(l)===-1?ae.push(l):!t[s]&&ae.indexOf(l)>-1?ae.splice(ae.indexOf(l),1):s==="metaKey"&&t[s]&&(ae=ae.filter(u=>u in Jt||u===n))}),n in xe){xe[n]=!0;for(const s in $e)if(Object.prototype.hasOwnProperty.call($e,s)){const l=Jt[$e[s]];Xe[s]=t[l]}if(!r)return}for(const s in xe)Object.prototype.hasOwnProperty.call(xe,s)&&(xe[s]=t[Jt[s]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(ae.indexOf(17)===-1&&ae.push(17),ae.indexOf(18)===-1&&ae.push(18),xe[17]=!0,xe[18]=!0);const i=fr();if(r)for(let s=0;s<r.length;s++)r[s].scope===i&&(t.type==="keydown"&&r[s].keydown||t.type==="keyup"&&r[s].keyup)&&vi(t,r[s],i,e);if(!(n in oe))return;const a=oe[n],o=a.length;for(let s=0;s<o;s++)if((t.type==="keydown"&&a[s].keydown||t.type==="keyup"&&a[s].keyup)&&a[s].key){const l=a[s],{splitKey:u}=l,c=l.key.split(u),d=[];for(let v=0;v<c.length;v++)d.push(Lt(c[v]));d.sort().join("")===ae.sort().join("")&&vi(t,l,i,e)}}function Xe(t,e,r){ae=[];const n=aa(t);let i=[],a="all",o=document,s=0,l=!1,u=!0,c="+",d=!1,v=!1;for(r===void 0&&typeof e=="function"&&(r=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(a=e.scope),e.element&&(o=e.element),e.keyup&&(l=e.keyup),e.keydown!==void 0&&(u=e.keydown),e.capture!==void 0&&(d=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(v=!0)),typeof e=="string"&&(a=e),v&&la(t,a);s<n.length;s++)t=n[s].split(c),i=[],t.length>1&&(i=ia($e,t)),t=t[t.length-1],t=t==="*"?"*":Lt(t),t in oe||(oe[t]=[]),oe[t].push({keyup:l,keydown:u,scope:a,mods:i,shortcut:n[s],method:r,key:n[s],splitKey:c,element:o});if(typeof o<"u"&&window){if(!qe.has(o)){const h=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return pi(g,o)},p=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;pi(g,o),Ys(g)};qe.set(o,{keydownListener:h,keyupListenr:p,capture:d}),sn(o,"keydown",h,d),sn(o,"keyup",p,d)}if(!ar){const h=()=>{ae=[]};ar={listener:h,capture:d},sn(window,"focus",h,d)}}}function Ks(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(oe).forEach(r=>{oe[r].filter(i=>i.scope===e&&i.shortcut===t).forEach(i=>{i&&i.method&&i.method()})})}function Gn(t){const e=Object.values(oe).flat();if(e.findIndex(n=>{let{element:i}=n;return i===t})<0){const{keydownListener:n,keyupListenr:i,capture:a}=qe.get(t)||{};n&&i&&(Xt(t,"keyup",i,a),Xt(t,"keydown",n,a),qe.delete(t))}if((e.length<=0||qe.size<=0)&&(Object.keys(qe).forEach(i=>{const{keydownListener:a,keyupListenr:o,capture:s}=qe.get(i)||{};a&&o&&(Xt(i,"keyup",o,s),Xt(i,"keydown",a,s),qe.delete(i))}),qe.clear(),Object.keys(oe).forEach(i=>delete oe[i]),ar)){const{listener:i,capture:a}=ar;Xt(window,"focus",i,a),ar=null}}const ln={getPressedKeyString:Gs,setScope:sa,getScope:fr,deleteScope:js,getPressedKeyCodes:Hs,getAllKeyCodes:zs,isPressed:Xs,filter:Ws,trigger:Ks,unbind:la,keyMap:ur,modifier:$e,modifierMap:Jt};for(const t in ln)Object.prototype.hasOwnProperty.call(ln,t)&&(Xe[t]=ln[t]);if(typeof window<"u"){const t=window.hotkeys;Xe.noConflict=e=>(e&&window.hotkeys===Xe&&(window.hotkeys=t),Xe),window.hotkeys=Xe}const Zs={class:"dsg-dropdown--trigger",tabindex:"0"},qs={class:"dsg-dropdown--menu"},Qs={key:0,class:"dsg-dropdown--menu-header"},Js={key:1,class:"dsg-dropdown--menu-header"},el={class:"dsg-dropdown--menu-title"},tl={key:2,class:"dsg-dropdown--menu-header subsection"},rl={class:"dsg-dropdown--menu-subtitle"},nl=["href","target","tabindex","title","onClick"],il={key:0,class:"dsg-dropdown--menu-item--content"},al={key:0,class:"dsg-dropdown--menu-item--icon"},ol={class:"dsg-dropdown--menu-item--label"},sl={class:"dsg-dropdown--menu-item--hotkey"},ll={key:0},ul={key:1,class:"dsg-dropdown--menu-item--content"},fl=f.defineComponent({__name:"DsgDropdown",props:{label:{default:""},type:{default:"button"},icon:{default:"dots-vertical"},buttonTheme:{default:"gray"},menuItems:{default:()=>[]},avatarInfo:{default:null},isOpen:{type:Boolean,default:!1},placement:{default:"bottom-end"},headerType:{default:"none"},headerTitle:{default:""},classes:{default:""},strategy:{default:"absolute"},skidding:{default:0},distance:{default:0}},setup(t,{expose:e}){const r=f.ref(t.isOpen),n=new tt().getOS().name;t.menuItems.forEach(h=>{});const i=f.useTemplateRef("floatingVueDropdownEl"),a=f.useTemplateRef("dsgDropdownAvatarTriggerEl"),o=f.useTemplateRef("dsgDropdownButtonTriggerEl"),s=h=>{u(),a.value&&setTimeout(()=>{a?.value?.toggleFocus(r.value)},100)},l=h=>{u(),o.value&&setTimeout(()=>{o?.value?.focusButton(r.value)},100)},u=()=>{r.value=!r.value,r.value?i.value?.show():i.value?.hide()},c=(h,p)=>{p.uri||h.preventDefault(),p.action&&(p.action(),i.value?.hide())},d=f.useTemplateRef("dsgDropdown"),v=h=>(h=h.toLowerCase(),h.replace("ctrl","⌃").replace("shift","⇧").replace("alt","⌥").replace("cmd",n==="macOS"?"⌘":"⊞").replace("++","+").replace("+","").toUpperCase());return f.onMounted(()=>{t.menuItems.forEach(h=>{h.hotkey&&Xe(h.hotkey,p=>{h.hotkeyPreventDefault&&h.hotkeyPreventDefault===!0&&p.preventDefault(),h.uri&&window.open(h.uri,h.uriTarget??"_blank"),typeof h.action=="function"&&(h.action(),i.value?.hide())})})}),f.onBeforeUnmount(()=>{Xe.deleteScope("dsgDropdown")}),e({handleTriggerClick:u}),(h,p)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-dropdown",h.classes]),ref:"dsgDropdown"},[f.createVNode(f.unref(V.kt),f.mergeProps({triggers:[],placement:h.placement,"handle-resize":!1,strategy:h.strategy,shown:r.value,flip:!1,shift:!1,boundary:d.value,container:d.value,skidding:h.skidding,distance:h.distance,class:"dsg-dropdown--popper",onHide:p[0]||(p[0]=g=>r.value=!1),ref:"floatingVueDropdownEl"},h.$attrs),{popper:f.withCtx(()=>[f.createElementVNode("div",qs,[f.renderSlot(h.$slots,"dsg-dropdown-menu--header",{},()=>[h.headerType==="avatar"?(f.openBlock(),f.createElementBlock("div",Qs,[h.avatarInfo?(f.openBlock(),f.createBlock(or,{key:0,size:"md",profileUri:h.avatarInfo.profileUri,fullName:h.avatarInfo.fullName,isOnline:h.avatarInfo.isOnline,title:h.avatarInfo.title,"sub-text":h.avatarInfo.subText},null,8,["profileUri","fullName","isOnline","title","sub-text"])):f.createCommentVNode("",!0)])):h.headerType==="title"?(f.openBlock(),f.createElementBlock("div",Js,[f.createElementVNode("h3",el,f.toDisplayString(h.headerTitle),1)])):h.headerType==="subsection"?(f.openBlock(),f.createElementBlock("div",tl,[f.createElementVNode("h4",rl,f.toDisplayString(h.headerTitle),1)])):f.createCommentVNode("",!0)]),f.renderSlot(h.$slots,"dsg-dropdown-menu-content",{},()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(h.menuItems,(g,w)=>(f.openBlock(),f.createElementBlock("a",{class:f.normalizeClass(["dsg-dropdown--menu-item",{"is-divider":g.type==="divider"}]),href:g.uri,target:g.uriTarget??"_blank",tabindex:!g.uri&&g.type!=="divider"?0:void 0,title:g.label,key:w,onClick:_=>c(_,g)},[g.type==="item"||g.type===void 0?(f.openBlock(),f.createElementBlock("div",il,[g.icon?(f.openBlock(),f.createElementBlock("div",al,[f.createVNode(V._sfc_main,{icon:g.icon,size:"xs"},null,8,["icon"])])):f.createCommentVNode("",!0),f.createElementVNode("span",ol,f.toDisplayString(g.label),1),f.createElementVNode("div",sl,[g.hotkey?(f.openBlock(),f.createElementBlock("span",ll,f.toDisplayString(v(g.hotkey)),1)):f.createCommentVNode("",!0)])])):g.type==="divider"?(f.openBlock(),f.createElementBlock("div",ul,p[1]||(p[1]=[f.createElementVNode("hr",null,null,-1)]))):f.createCommentVNode("",!0)],10,nl))),128))])])]),default:f.withCtx(()=>[f.createElementVNode("div",Zs,[f.renderSlot(h.$slots,"dsg-dropdown--trigger",{},()=>[h.type==="avatar"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[h.avatarInfo?(f.openBlock(),f.createBlock(or,{key:0,size:"lg",profileUri:h.avatarInfo.profileUri,fullName:h.avatarInfo.fullName,ref:"dsgDropdownAvatarTriggerEl",onClick:s,"prevent-default":!0},null,8,["profileUri","fullName"])):f.createCommentVNode("",!0)],64)):h.type==="button"?(f.openBlock(),f.createBlock(V._sfc_main$3,{key:1,theme:h.buttonTheme,label:h.label,onClick:l,ref:"dsgDropdownButtonTriggerEl","icon-after":"chevron-down",class:f.normalizeClass({"dropdown-active":r.value})},null,8,["theme","label","class"])):h.type==="icon"?(f.openBlock(),f.createBlock(V._sfc_main$3,{key:2,"icon-before":h.icon,size:"sm",theme:h.buttonTheme,class:f.normalizeClass(["dsg-dropdown--trigger-button",{"dropdown-active":r.value}]),onClick:u},null,8,["icon-before","theme","class"])):f.createCommentVNode("",!0)])])]),_:3},16,["placement","strategy","shown","boundary","container","skidding","distance"])],2))}});function un(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function cl(t){return(...e)=>!t(...e)}function dl(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function hl(t){return t.filter(e=>!e.$isLabel)}function fn(t,e){return r=>r.reduce((n,i)=>i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n,[])}const gi=(...t)=>e=>t.reduce((r,n)=>n(r),e);var vl={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(t,e){return un(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const t=this.search||"",e=t.toLowerCase().trim();let r=this.options.concat();return this.internalSearch?r=this.groupValues?this.filterAndFlat(r,e,this.label):this.filterOptions(r,e,this.label,this.customLabel):r=this.groupValues?fn(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(cl(this.isSelected)):r,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?r.push({isTag:!0,label:t}):r.unshift({isTag:!0,label:t})),r.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(t,e,r){return gi(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),fn(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return gi(fn(this.groupValues,this.groupLabel),hl)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(un(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return un(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const r=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],n=this.internalValue.filter(i=>r.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",n)}else{const r=e[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&r.splice(this.max-this.internalValue.length),this.$emit("select",r,this.id),this.$emit("update:modelValue",this.internalValue.concat(r))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const r=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const n=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,r,n){return e?t.filter(i=>dl(n(i,r),e)).sort((i,a)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,a):n(i,r).length-n(a,r).length):t},filterGroups(t,e,r,n,i){return a=>a.map(o=>{if(!o[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const s=this.filterOptions(o[r],t,e,i);return s.length?{[n]:o[n],[r]:s}:[]})}}},pl={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const r=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list?.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list?.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},ua={name:"vue-multiselect",mixins:[vl,pl],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1}},data(){return{dropdownStyles:{},ready:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}},watch:{isOpen(t){t&&(this.useTeleport?(this.ready=!1,this.$nextTick(()=>{const e=this.$el.getBoundingClientRect();this.dropdownStyles={position:"absolute",top:`${e.bottom+window.scrollY}px`,left:`${e.left+window.scrollX}px`,width:`${e.width}px`,zIndex:9999},this.ready=!0})):this.ready=!0)}}};const gl=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],xl={ref:"tags",class:"multiselect__tags"},yl={class:"multiselect__tags-wrap"},ml=["textContent"],wl=["onKeypress","onMousedown"],_l=["textContent"],El={class:"multiselect__spinner"},Al=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],Cl=["id","aria-multiselectable"],bl={key:0},Sl={class:"multiselect__option"},Il=["aria-selected","id","role"],Ol=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Tl=["data-select","data-deselect","onMouseenter","onMousedown"],Nl={class:"multiselect__option"},Dl={class:"multiselect__option"};function Bl(t,e,r,n,i,a){return f.openBlock(),f.createElementBlock("div",{tabindex:t.searchable?-1:r.tabindex,class:f.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":r.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=o=>t.activate()),onBlur:e[15]||(e[15]=o=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=f.withKeys(f.withModifiers(o=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=f.withKeys(f.withModifiers(o=>t.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:e[18]||(e[18]=f.withKeys(f.withModifiers(o=>t.addPointerElement(o),["stop","self"]),["enter","tab"])),onKeyup:e[19]||(e[19]=f.withKeys(o=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[f.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[f.createElementVNode("div",{onMousedown:e[0]||(e[0]=f.withModifiers(o=>t.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),f.renderSlot(t.$slots,"clear",{search:t.search}),f.createElementVNode("div",xl,[f.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:a.visibleValues,isOpen:t.isOpen},()=>[f.withDirectives(f.createElementVNode("div",yl,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.visibleValues,(o,s)=>f.renderSlot(t.$slots,"tag",{option:o,search:t.search,remove:t.removeElement},()=>[(f.openBlock(),f.createElementBlock("span",{class:"multiselect__tag",key:s,onMousedown:e[1]||(e[1]=f.withModifiers(()=>{},["prevent"]))},[f.createElementVNode("span",{textContent:f.toDisplayString(t.getOptionLabel(o))},null,8,ml),f.createElementVNode("i",{tabindex:"1",onKeypress:f.withKeys(f.withModifiers(l=>t.removeElement(o),["prevent"]),["enter"]),onMousedown:f.withModifiers(l=>t.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,wl)],32))])),256))],512),[[f.vShow,a.visibleValues.length>0]]),t.internalValue&&t.internalValue.length>r.limit?f.renderSlot(t.$slots,"limit",{key:0},()=>[f.createElementVNode("strong",{class:"multiselect__strong",textContent:f.toDisplayString(r.limitText(t.internalValue.length-r.limit))},null,8,_l)]):f.createCommentVNode("v-if",!0)]),f.createVNode(f.Transition,{name:"multiselect__loading"},{default:f.withCtx(()=>[f.renderSlot(t.$slots,"loading",{},()=>[f.withDirectives(f.createElementVNode("div",El,null,512),[[f.vShow,r.loading]])])]),_:3}),t.searchable?(f.openBlock(),f.createElementBlock("input",{key:0,ref:"search",name:r.name,id:t.id,type:"text",autocomplete:"off",spellcheck:r.spellcheck,placeholder:t.placeholder,required:a.isRequired,style:f.normalizeStyle(a.inputStyle),value:t.search,disabled:r.disabled,tabindex:r.tabindex,"aria-label":r.name+"-searchbox",onInput:e[2]||(e[2]=o=>t.updateSearch(o.target.value)),onFocus:e[3]||(e[3]=f.withModifiers(o=>t.activate(),["prevent"])),onBlur:e[4]||(e[4]=f.withModifiers(o=>t.deactivate(),["prevent"])),onKeyup:e[5]||(e[5]=f.withKeys(o=>t.deactivate(),["esc"])),onKeydown:[e[6]||(e[6]=f.withKeys(f.withModifiers(o=>t.pointerForward(),["prevent"]),["down"])),e[7]||(e[7]=f.withKeys(f.withModifiers(o=>t.pointerBackward(),["prevent"]),["up"])),e[9]||(e[9]=f.withKeys(f.withModifiers(o=>t.removeLastElement(),["stop"]),["delete"]))],onKeypress:e[8]||(e[8]=f.withKeys(f.withModifiers(o=>t.addPointerElement(o),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,Al)):f.createCommentVNode("v-if",!0),a.isSingleLabelVisible?(f.openBlock(),f.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:e[10]||(e[10]=f.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[f.renderSlot(t.$slots,"singleLabel",{option:a.singleValue},()=>[f.createTextVNode(f.toDisplayString(t.currentOptionLabel),1)])],32)):f.createCommentVNode("v-if",!0),a.isPlaceholderVisible?(f.openBlock(),f.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:e[11]||(e[11]=f.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[f.renderSlot(t.$slots,"placeholder",{},()=>[f.createTextVNode(f.toDisplayString(t.placeholder),1)])],32)):f.createCommentVNode("v-if",!0)],512),(f.openBlock(),f.createBlock(f.Teleport,{to:"body",disabled:!r.useTeleport},[f.createVNode(f.Transition,{name:"multiselect"},{default:f.withCtx(()=>[t.isOpen&&i.ready?(f.openBlock(),f.createElementBlock("div",{key:0,class:"multiselect__content-wrapper",onFocus:e[12]||(e[12]=(...o)=>t.activate&&t.activate(...o)),tabindex:"-1",onMousedown:e[13]||(e[13]=f.withModifiers(()=>{},["prevent"])),style:f.normalizeStyle([i.dropdownStyles,{maxHeight:t.optimizedHeight+"px"}]),ref:"list"},[f.createElementVNode("ul",{class:"multiselect__content",style:f.normalizeStyle(a.contentStyle),role:"listbox",id:"listbox-"+t.id,"aria-multiselectable":t.multiple},[f.renderSlot(t.$slots,"beforeList"),t.multiple&&t.max===t.internalValue.length?(f.openBlock(),f.createElementBlock("li",bl,[f.createElementVNode("span",Sl,[f.renderSlot(t.$slots,"maxElements",{},()=>[f.createTextVNode("Maximum of "+f.toDisplayString(t.max)+" options selected. First remove a selected option to select another.",1)])])])):f.createCommentVNode("v-if",!0),!t.max||t.internalValue.length<t.max?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(t.filteredOptions,(o,s)=>(f.openBlock(),f.createElementBlock("li",{class:"multiselect__element",key:s,"aria-selected":t.isSelected(o),id:t.id+"-"+s,role:o&&(o.$isLabel||o.$isDisabled)?null:"option"},[o&&(o.$isLabel||o.$isDisabled)?f.createCommentVNode("v-if",!0):(f.openBlock(),f.createElementBlock("span",{key:0,class:f.normalizeClass([t.optionHighlight(s,o),"multiselect__option"]),onClick:f.withModifiers(l=>t.select(o),["stop"]),onMouseenter:f.withModifiers(l=>t.pointerSet(s),["self"]),"data-select":o&&o.isTag?t.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[f.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[f.createElementVNode("span",null,f.toDisplayString(t.getOptionLabel(o)),1)])],42,Ol)),o&&(o.$isLabel||o.$isDisabled)?(f.openBlock(),f.createElementBlock("span",{key:1,"data-select":t.groupSelect&&a.selectGroupLabelText,"data-deselect":t.groupSelect&&a.deselectGroupLabelText,class:f.normalizeClass([t.groupHighlight(s,o),"multiselect__option"]),onMouseenter:f.withModifiers(l=>t.groupSelect&&t.pointerSet(s),["self"]),onMousedown:f.withModifiers(l=>t.selectGroup(o),["prevent"])},[f.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[f.createElementVNode("span",null,f.toDisplayString(t.getOptionLabel(o)),1)])],42,Tl)):f.createCommentVNode("v-if",!0)],8,Il))),128)):f.createCommentVNode("v-if",!0),f.withDirectives(f.createElementVNode("li",null,[f.createElementVNode("span",Nl,[f.renderSlot(t.$slots,"noResult",{search:t.search},()=>[e[20]||(e[20]=f.createTextVNode("No elements found. Consider changing the search query."))])])],512),[[f.vShow,r.showNoResults&&t.filteredOptions.length===0&&t.search&&!r.loading]]),f.withDirectives(f.createElementVNode("li",null,[f.createElementVNode("span",Dl,[f.renderSlot(t.$slots,"noOptions",{},()=>[e[21]||(e[21]=f.createTextVNode("List is empty."))])])],512),[[f.vShow,r.showNoOptions&&(t.options.length===0||a.hasOptionGroup===!0&&t.filteredOptions.length===0)&&!t.search&&!r.loading]]),f.renderSlot(t.$slots,"afterList")],12,Cl)],36)):f.createCommentVNode("v-if",!0)]),_:3})],8,["disabled"]))],42,gl)}ua.render=Bl;const Rl={class:"dsg-input--label-wrapper block"},Pl=["onMousedown"],kl={class:"option-label"},Ml={key:0,class:"dsg-input-select--error-wrapper"},Ll=f.defineComponent({__name:"DsgInputSelect",props:f.mergeModels({options:{default:()=>[]},multiple:{type:Boolean,default:!1},fetchOnLoad:{type:Boolean,default:!1},getUrl:{},extraParams:{default:()=>({})},strategy:{default:"absolute"},placeholder:{},label:{default:"label"},showLabels:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},trackBy:{default:"id"},contentMaxWidth:{default:"24rem"},itemLabel:{default:"label"},allowEmpty:{type:Boolean,default:!1},validateOnLoad:{type:Boolean,default:!0},selectLabel:{default:""},selectedLabel:{default:""},errors:{default:()=>[]},scrollBind:{default:()=>document.body},size:{default:"md"}},{modelValue:{},modelModifiers:{},single:{},singleModifiers:{}}),emits:f.mergeModels(["update:modelValue","update:model-value","search-change","select","open","close","remove","tag"],["update:modelValue","update:single"]),setup(t,{emit:e}){const r=f.useModel(t,"modelValue"),n=f.useModel(t,"single"),i=f.ref(t.options),a=f.useTemplateRef("multiselectEl"),o=f.ref(!1),s=f.ref([]);f.computed(()=>s.value.length>0);const l=f.computed(()=>[...Array.isArray(t.errors)?t.errors:[t.errors],...s.value].filter((C,b,O)=>b===O.indexOf(C))),u=f.computed(()=>["dsg-input-select",`dsg-input-select--${t.size}`,`dsg-input-select--${t.strategy}`,`dsg-input-select--${l.value.length>0?"has-errors":"no-errors"}`].join(" ").replace(/\s+/g," ").trim()),c=()=>{p()},d=y=>{p()};f.watchEffect(()=>{}),f.watch(()=>t.options,y=>{Array.isArray(y)?i.value=y:console.warn("Options should be an array.")});const v=f.ref(null);f.watch(()=>t.scrollBind,async y=>{await f.nextTick(),v.value&&typeof v.value.removeEventListener=="function"&&v.value.removeEventListener("scroll",d);const C=O=>{const P=window.getComputedStyle(O),$=["auto","scroll","overlay"].includes(P.overflow)||["auto","scroll","overlay"].includes(P.overflowY)||["auto","scroll","overlay"].includes(P.overflowX),M=O.scrollHeight>O.clientHeight||O.scrollWidth>O.clientWidth;return $&&M};let b=null;y?b=C(y)?y:window:b=window,b&&typeof b.addEventListener=="function"?(b.addEventListener("scroll",d),v.value=b):v.value=null},{immediate:!0});const h=e,p=()=>{if(a.value)if(o.value===!0){const y=a.value.$el.getBoundingClientRect(),C=a.value.$el.offsetHeight,b=window.innerHeight;f.nextTick(()=>{const O=a.value.$el.querySelector(".multiselect__content-wrapper");O.style.display="block";const P=O.offsetHeight;if(t.strategy==="fixed"){O.style.left=y.left+"px",O.style.right="auto",O.style.top="auto",O.style.bottom="auto";const $=y.width,M=window.innerWidth-y.left,H=$>M?Math.min(300,M-16):$;O.style.width=`${H}px`;const ee=b-y.bottom,be=y.top,He=P+8;(ee<He&&be>ee?"top":"bottom")==="top"?O.style.bottom=`${b-y.top+4}px`:O.style.top=`${y.bottom+4}px`;let rt=!1;if(v.value===window)rt=y.top<b&&y.bottom>0&&y.left<window.innerWidth&&y.right>0;else if(v.value){const nt=v.value.getBoundingClientRect();rt=y.top<nt.bottom&&y.bottom>nt.top&&y.left<nt.right&&y.right>nt.left}else rt=y.top<b&&y.bottom>0&&y.left<window.innerWidth&&y.right>0;if(!rt){O.style.display="none";return}O.style.display="block"}else O.style.left="0",O.style.right="auto",O.style.width="auto",O.style.maxWidth=t.contentMaxWidth,(y.bottom+P+C+2>b?"top":"bottom")==="top"?O.style.bottom=`${C+4}px`:O.style.top=`${C+4}px`})}else{const y=a.value.$refs.list;y&&(y.style.display="none",y.style.top="auto",y.style.bottom="auto",y.style.left="auto",y.style.right="auto")}},g=y=>{o.value=!0,p(),h("open",y)},w=(y,C)=>{o.value=!1,p(),h("close",y,C)},_=V.useDebounceFn(y=>{t.getUrl&&y.length>2&&V.axios.get(t.getUrl,{params:{term:y,...t.extraParams}}).then(C=>{i.value=C.data}),h("search-change",y)},300),m=(y,C=!0)=>{if(s.value=[],t.allowEmpty===!1&&(y==null||Array.isArray(y)&&y.length===0)&&s.value.push(`${t.label} is required.`),C===!0)try{A(y),h("update:modelValue",y),h("update:model-value",y)}catch(b){console.log(b)}},A=y=>{y?n.value=y[t.trackBy]||y:n.value=null};return f.onMounted(()=>{window.addEventListener("resize",c),t.getUrl&&t.options.length===0&&t.fetchOnLoad&&V.axios.get(t.getUrl).then(y=>{i.value=y.data}).catch(y=>{console.error("Error fetching options:",y)}),t.validateOnLoad&&m(r.value,!1)}),f.onUnmounted(()=>{window.removeEventListener("resize",c),v.value&&typeof v.value.removeEventListener=="function"&&v.value.removeEventListener("scroll",d)}),(y,C)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(u.value),ref:"dsgInputSelectEl"},[f.createElementVNode("div",Rl,[y.label?(f.openBlock(),f.createBlock(Gi._sfc_main,{key:0,label:y.label,size:"sm"},null,8,["label"])):f.createCommentVNode("",!0)]),f.createVNode(f.unref(ua),f.mergeProps({ref:"multiselectEl",modelValue:r.value,"onUpdate:modelValue":[C[0]||(C[0]=b=>r.value=b),C[3]||(C[3]=b=>m(b,!0))],options:i.value,multiple:y.multiple,onSearchChange:f.unref(_),onOpen:C[1]||(C[1]=b=>g(b)),onClose:C[2]||(C[2]=(b,O)=>w(b,O)),onRemove:C[4]||(C[4]=(b,O)=>h("remove",b,O)),onTag:C[5]||(C[5]=(b,O)=>h("tag",b,O)),placeholder:y.placeholder,label:y.itemLabel,"track-by":y.trackBy,"close-on-select":y.closeOnSelect,"show-labels":y.showLabels,disabled:y.disabled,"allow-empty":y.allowEmpty,"select-label":y.selectLabel,"preserve-search":!0,"selected-label":y.selectedLabel,class:["dsg-input--multiselect",{"dsg-input--multiselect--has-errors":y.errors&&y.errors.length,"dsg-input--multiselect--disabled":y.disabled}]},y.$attrs),{caret:f.withCtx(({toggle:b})=>[f.createElementVNode("div",{onMousedown:f.withModifiers(O=>b(),["prevent","stop"]),class:"multiselect__select"},[f.createVNode(V._sfc_main,{icon:"chevron-down"})],40,Pl)]),option:f.withCtx(({option:b})=>[f.createElementVNode("span",kl,f.toDisplayString(b[y.itemLabel]),1),f.createVNode(V._sfc_main,{icon:"check",size:"sm",class:"option-icon text-brand-600"})]),_:1},16,["modelValue","options","multiple","onSearchChange","placeholder","label","track-by","close-on-select","show-labels","disabled","allow-empty","select-label","selected-label","class"]),l.value&&l.value.length?(f.openBlock(),f.createElementBlock("div",Ml,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(l.value,(b,O)=>(f.openBlock(),f.createElementBlock("span",{class:"dsg-input--error",key:O},f.toDisplayString(b),1))),128))])):f.createCommentVNode("",!0)],2))}}),Fl=["name"],Vl=["selected"],Ul=["value","selected"],$l=f.defineComponent({__name:"DsgInputDropdown",props:f.mergeModels({name:{default:""},placeholder:{default:""},classes:{default:""},options:{default:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=f.useModel(t,"modelValue");return(r,n)=>f.withDirectives((f.openBlock(),f.createElementBlock("select",{class:f.normalizeClass(["dsg-input-dropdown",r.classes]),name:r.name,"onUpdate:modelValue":n[0]||(n[0]=i=>e.value=i)},[r.placeholder?(f.openBlock(),f.createElementBlock("option",{key:0,value:"",disabled:"",selected:e.value===""},f.toDisplayString(r.placeholder),9,Vl)):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.options,(i,a)=>(f.openBlock(),f.createElementBlock("option",{key:a,value:i.value,selected:e.value===i.value},f.toDisplayString(i.label),9,Ul))),128))],10,Fl)),[[f.vModelSelect,e.value]])}}),Hl=["href","title","target"],Gl={key:0,class:"dsg-link--label"},zl=f.defineComponent({__name:"DsgLink",props:{label:{default:"Link"},href:{default:""},uriTarget:{default:"_self"},size:{default:"md"},classes:{default:""},preventDefault:{type:Boolean,default:!1}},emits:["link-clicked"],setup(t,{emit:e}){const r=["dsg-link","dsg-link--"+t.size,t.classes].join(" "),n=e,i=a=>{t.preventDefault&&a.preventDefault(),n("link-clicked",a)};return(a,o)=>(f.openBlock(),f.createElementBlock("a",{href:a.href,title:"Link: "+a.label,target:a.uriTarget,class:f.normalizeClass(f.unref(r)),onClick:i},[f.renderSlot(a.$slots,"dsg-link-content",{},()=>[a.label?(f.openBlock(),f.createElementBlock("span",Gl,f.toDisplayString(a.label),1)):f.createCommentVNode("",!0)])],10,Hl))}}),Wl={key:1,class:"dsg-modal__header-text"},Xl={key:0,class:"dsg-modal__header-title"},jl={key:1,class:"dsg-modal__header-description"},Yl={key:1,class:"dsg-modal__body"},Kl=f.defineComponent({__name:"DsgModal",props:{title:{default:""},description:{default:""},miscIcon:{default:null},hasClosedButton:{type:Boolean,default:!0},initialOpen:{type:Boolean,default:!1},closeClickBackground:{type:Boolean,default:!1},wrapperClasses:{default:""},width:{default:400},type:{default:"left"},footerType:{default:"horizontal-even"},primaryButton:{type:[Object,Boolean],default:!1},secondaryButton:{type:[Object,Boolean],default:!1},hasBackground:{type:Boolean,default:!0}},emits:["before-open","after-open","before-close","after-close","secondary-button-clicked","primary-button-clicked"],setup(t,{expose:e,emit:r}){const n=r,i=f.ref(t.initialOpen),a=()=>{n("before-open"),i.value=!0,n("after-open")},o=()=>{n("before-close"),i.value=!1,n("after-close")},s=()=>{i.value&&t.closeClickBackground&&o()},l=()=>{n("secondary-button-clicked")},u=()=>{n("primary-button-clicked")};return e({open:a,close:o,secondaryButtonClicked:l,primaryButtonClicked:u}),(c,d)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-modal",`dsg-modal--${i.value?"open":"closed"}`])},[c.hasBackground?(f.openBlock(),f.createElementBlock("div",{key:0,class:"dsg-modal__background",onDblclick:s},null,32)):f.createCommentVNode("",!0),f.createElementVNode("div",{class:f.normalizeClass(["dsg-modal__wrapper",c.wrapperClasses]),style:f.normalizeStyle({width:c.width})},[c.hasClosedButton?(f.openBlock(),f.createBlock(V._sfc_main$3,{key:0,theme:"gray-tertiary",iconBefore:"x",size:"lg",class:f.normalizeClass(["dsg-modal__close-button",`dsg-modal__close-button--${c.type}`]),onClick:o},null,8,["class"])):f.createCommentVNode("",!0),f.renderSlot(c.$slots,"dsg-modal__header",{},()=>[f.createElementVNode("div",{class:f.normalizeClass(["dsg-modal__header",[`dsg-modal__header--${c.type}`,`${c.$slots.default?"dsg-modal__header--with-body":""}`].join(" ")])},[c.miscIcon?(f.openBlock(),f.createBlock(Ct,f.normalizeProps(f.mergeProps({key:0},c.miscIcon)),null,16)):f.createCommentVNode("",!0),c.title||c.description?(f.openBlock(),f.createElementBlock("div",Wl,[c.title?(f.openBlock(),f.createElementBlock("h3",Xl,f.toDisplayString(c.title),1)):f.createCommentVNode("",!0),c.description?(f.openBlock(),f.createElementBlock("p",jl,f.toDisplayString(c.description),1)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],2)]),c.$slots.default?(f.openBlock(),f.createElementBlock("div",Yl,[f.renderSlot(c.$slots,"default")])):f.createCommentVNode("",!0),f.renderSlot(c.$slots,"dsg-modal__footer",{},()=>[f.createElementVNode("div",{class:f.normalizeClass(["dsg-modal__footer",`dsg-modal__footer--${c.footerType}`])},[c.secondaryButton?(f.openBlock(),f.createBlock(V._sfc_main$3,f.mergeProps({key:0},c.secondaryButton,{onButtonClicked:l,classes:"dsg-modal__secondary-button"}),null,16)):f.createCommentVNode("",!0),c.primaryButton?(f.openBlock(),f.createBlock(V._sfc_main$3,f.mergeProps({key:1},c.primaryButton,{onButtonClicked:u,classes:"dsg-dsg-modal__primary-button"}),null,16)):f.createCommentVNode("",!0)],2)])],6)],2))}}),Zl={class:"dsg-tag--before"},ql={class:"dsg-tag--label"},Ql={class:"dsg-tag--after"},Jl={key:0,class:"dsg-tag--count"},eu=f.defineComponent({__name:"DsgTag",props:{label:{default:""},size:{default:"md"},hasClose:{type:Boolean,default:!1},tagCount:{default:null},avatarUri:{default:""},hasCheckbox:{type:Boolean,default:!1},dotHex:{default:null},destroyOnClose:{type:Boolean,default:!1},value:{default:null},classes:{default:""}},emits:["before-checked","after-checked","before-hide","after-hide","before-destroy","after-destroy"],setup(t,{expose:e,emit:r}){const n=["dsg-tag",`dsg-tag--${t.size}`,`dsg-tag--${t.hasClose?"has-close":"no-close"}`,`dsg-tag--${t.tagCount?"has-count":"no-count"}`,`dsg-tag--${t.avatarUri?"has-avatar":"no-avatar"}`,`dsg-tag--${t.hasCheckbox?"has-checkbox":"no-checkbox"}`,t.classes].join(" "),i=()=>`tag-${t.size}`;t.hasClose&&t.tagCount!==null&&new V.DsgPropSyntaxWarning("DsgTag: 'hasClose' and 'tagCount' props are mutually exclusive. Please use only one of them."),t.avatarUri&&t.dotHex&&new V.DsgPropSyntaxWarning("DsgTag: 'avatarUri' and 'dotHex' props are mutually exclusive. Please use only one of them.");const a=r,o=f.useTemplateRef("dsgTag"),s=g=>{t.destroyOnClose?(a("before-destroy",o.value),o.value?.remove(),a("after-destroy")):(a("before-hide",o.value),o.value&&(o.value.style.display="none"),a("after-hide",o.value))},l=(g,w)=>{a("before-checked",g,w)},u=g=>{a("after-checked",g)},c=f.ref(t.tagCount),d=g=>{c.value=g},v=f.ref(t.value);return e({setTagCount:d,setValue:g=>{v.value=g},getValue:()=>v.value}),(g,w)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(n)),ref:"dsgTag"},[f.createElementVNode("div",Zl,[g.hasCheckbox?(f.openBlock(),f.createBlock(V._sfc_main$2,{key:0,class:"dsg-tag--checkbox",size:i(),"no-focus":!0,onBeforeChecked:l,onAfterChecked:u},null,8,["size"])):f.createCommentVNode("",!0),g.avatarUri?(f.openBlock(),f.createBlock(or,{key:1,"profile-uri":g.avatarUri,size:"xxs","no-focus":!0,class:"dsg-tag--avatar"},null,8,["profile-uri"])):f.createCommentVNode("",!0),g.dotHex?(f.openBlock(),f.createElementBlock("span",{key:2,class:"dsg-tag--dot",style:f.normalizeStyle({backgroundColor:g.dotHex})},null,4)):f.createCommentVNode("",!0)]),f.renderSlot(g.$slots,"dsg-tag--label",{},()=>[f.createElementVNode("span",ql,f.toDisplayString(g.label),1)]),f.createElementVNode("div",Ql,[c.value&&c.value>0?(f.openBlock(),f.createElementBlock("div",Jl,f.toDisplayString(c.value),1)):f.createCommentVNode("",!0),g.hasClose?(f.openBlock(),f.createBlock(V._sfc_main,{key:1,icon:"x-close",class:"dsg-tag--close",onClick:s})):f.createCommentVNode("",!0)])],2))}}),tu={class:"dsg-toggle--element"},ru=["checked","disabled"],nu={key:0,class:"dsg-toggle--label-wrapper"},iu=["innerHTML"],au=["innerHTML"],ou=f.defineComponent({__name:"DsgToggle",props:{modelValue:{type:Boolean,default:!1},size:{default:"md"},label:{default:""},subText:{default:""},disabled:{type:Boolean,default:!1},classes:{default:""}},emits:["before-toggle","after-toggle","update:modelValue"],setup(t,{expose:e,emit:r}){const n=["dsg-toggle",`dsg-toggle--${t.size}`,`dsg-toggle--${t.disabled?"disabled":"enabled"}`,`dsg-toggle--${t.label.length?"has-label":"no-label"}`,`dsg-toggle--${t.subText.length?"has-subtext":"no-subtext"}`,t.classes].join(" "),i=f.ref(t.modelValue),a=()=>{t.disabled||(l("before-toggle",i.value,!i.value),i.value=!i.value,l("after-toggle",i.value),l("update:modelValue",i.value))},o=f.useTemplateRef("toggleCheckbox"),s=()=>{o.value&&o.value.focus(),t.disabled||a()},l=r;return e({set:c=>{i.value=c}}),(c,d)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(n)),onClick:s},[f.createElementVNode("label",tu,[f.createElementVNode("input",{type:"checkbox",class:"dsg-toggle--checkbox",checked:i.value,onChange:a,title:"checkbox",ref:"toggleCheckbox",disabled:c.disabled},null,40,ru),d[0]||(d[0]=f.createElementVNode("span",{class:"dsg-toggle--slider"},null,-1))]),c.label.length?(f.openBlock(),f.createElementBlock("div",nu,[f.renderSlot(c.$slots,"dsg-toggle--label",{},()=>[f.createElementVNode("h3",{class:"dsg-toggle--label",innerHTML:c.label},null,8,iu)]),c.label.length&&c.subText.length?f.renderSlot(c.$slots,"dsg-toggle--subtext",{key:0},()=>[f.createElementVNode("p",{class:"dsg-toggle--subtext",innerHTML:c.subText},null,8,au)]):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)],2))}}),su={class:"dsg-progress"},lu={class:"dsg-progress--inner"},uu={key:0,class:"text-sm text-gray-700 min-w-[60px] text-right"},fu={key:0},cu={key:1},du=f.defineComponent({__name:"DsgProgress",props:{value:{},max:{},showText:{}},setup(t){const e=t,r=f.computed(()=>{const n=e.value/e.max*100;return isNaN(n)?0:Math.min(Math.max(n,0),100)});return(n,i)=>(f.openBlock(),f.createElementBlock("div",su,[f.createElementVNode("div",lu,[f.createElementVNode("div",{class:"dsg-progress--inner--progress",style:f.normalizeStyle({width:r.value+"%"})},null,4)]),n.showText!=="none"?(f.openBlock(),f.createElementBlock("div",uu,[n.showText==="number"?(f.openBlock(),f.createElementBlock("span",fu,f.toDisplayString(n.value)+"/"+f.toDisplayString(n.max),1)):n.showText==="percentage"?(f.openBlock(),f.createElementBlock("span",cu,f.toDisplayString(r.value.toFixed(2))+"%",1)):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0)]))}});function hu(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}function vu(t,e){e===void 0&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var pu=function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(i[o]=a[o])},t(r,n)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gu=function(t){pu(e,t);function e(r,n){var i=this.constructor,a=t.call(this,r,n)||this;return Object.defineProperty(a,"name",{value:i.name,enumerable:!1,configurable:!0}),hu(a,i.prototype),vu(a),a}return e}(Error),xu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ce=function(t){xu(e,t);function e(r){r===void 0&&(r=void 0);var n=t.call(this,r)||this;return n.message=r,n}return e.prototype.getKind=function(){var r=this.constructor;return r.kind},e.kind="Exception",e}(gu),yu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fe=function(t){yu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArgumentException",e}(Ce),mu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),L=function(t){mu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalArgumentException",e}(Ce),wu=function(){function t(e){if(this.binarizer=e,e===null)throw new L("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(e,r){return this.binarizer.getBlackRow(e,r)},t.prototype.getBlackMatrix=function(){return(this.matrix===null||this.matrix===void 0)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,i){var a=this.binarizer.getLuminanceSource().crop(e,r,n,i);return new t(this.binarizer.createBinarizer(a))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},t}(),_u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ye=function(t){_u(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(Ce),Eu=function(){function t(e){this.source=e}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t}(),re=function(){function t(){}return t.arraycopy=function(e,r,n,i,a){for(;a--;)n[i++]=e[r++]},t.currentTimeMillis=function(){return Date.now()},t}(),Au=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zn=function(t){Au(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IndexOutOfBoundsException",e}(Ce),Cu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),xi=function(t){Cu(e,t);function e(r,n){r===void 0&&(r=void 0),n===void 0&&(n=void 0);var i=t.call(this,n)||this;return i.index=r,i.message=n,i}return e.kind="ArrayIndexOutOfBoundsException",e}(zn),bu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},De=function(){function t(){}return t.fill=function(e,r){for(var n=0,i=e.length;n<i;n++)e[n]=r},t.fillWithin=function(e,r,n,i){t.rangeCheck(e.length,r,n);for(var a=r;a<n;a++)e[a]=i},t.rangeCheck=function(e,r,n){if(r>n)throw new L("fromIndex("+r+") > toIndex("+n+")");if(r<0)throw new xi(r);if(n>e)throw new xi(n)},t.asList=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e},t.create=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Array.from({length:r}).fill(n)})},t.createInt32Array=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Int32Array.from({length:r}).fill(n)})},t.equals=function(e,r){if(!e||!r||!e.length||!r.length||e.length!==r.length)return!1;for(var n=0,i=e.length;n<i;n++)if(e[n]!==r[n])return!1;return!0},t.hashCode=function(e){var r,n;if(e===null)return 0;var i=1;try{for(var a=bu(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=31*i+s}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.fillUint8Array=function(e,r){for(var n=0;n!==e.length;n++)e[n]=r},t.copyOf=function(e,r){return e.slice(0,r)},t.copyOfUint8Array=function(e,r){if(e.length<=r){var n=new Uint8Array(r);return n.set(e),n}return e.slice(0,r)},t.copyOfRange=function(e,r,n){var i=n-r,a=new Int32Array(i);return re.arraycopy(e,r,a,0,i),a},t.binarySearch=function(e,r,n){n===void 0&&(n=t.numberComparator);for(var i=0,a=e.length-1;i<=a;){var o=a+i>>1,s=n(r,e[o]);if(s>0)i=o+1;else if(s<0)a=o-1;else return o}return-i-1},t.numberComparator=function(e,r){return e-r},t}(),G=function(){function t(){}return t.numberOfTrailingZeros=function(e){var r;if(e===0)return 32;var n=31;return r=e<<16,r!==0&&(n-=16,e=r),r=e<<8,r!==0&&(n-=8,e=r),r=e<<4,r!==0&&(n-=4,e=r),r=e<<2,r!==0&&(n-=2,e=r),n-(e<<1>>>31)},t.numberOfLeadingZeros=function(e){if(e===0)return 32;var r=1;return e>>>16||(r+=16,e<<=16),e>>>24||(r+=8,e<<=8),e>>>28||(r+=4,e<<=4),e>>>30||(r+=2,e<<=2),r-=e>>>31,r},t.toHexString=function(e){return e.toString(16)},t.toBinaryString=function(e){return String(parseInt(String(e),2))},t.bitCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),e=e+(e>>>4)&252645135,e=e+(e>>>8),e=e+(e>>>16),e&63},t.truncDivision=function(e,r){return Math.trunc(e/r)},t.parseInt=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),ve=function(){function t(e,r){e===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,r==null?this.bits=t.makeArray(e):this.bits=r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>this.bits.length*32){var r=t.makeArray(e);re.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(e){return(this.bits[Math.floor(e/32)]&1<<(e&31))!==0},t.prototype.set=function(e){this.bits[Math.floor(e/32)]|=1<<(e&31)},t.prototype.flip=function(e){this.bits[Math.floor(e/32)]^=1<<(e&31)},t.prototype.getNextSet=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=n[i]}var s=i*32+G.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.getNextUnset=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=~n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=~n[i]}var s=i*32+G.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.setBulk=function(e,r){this.bits[Math.floor(e/32)]=r},t.prototype.setRange=function(e,r){if(r<e||e<0||r>this.size)throw new L;if(r!==e){r--;for(var n=Math.floor(e/32),i=Math.floor(r/32),a=this.bits,o=n;o<=i;o++){var s=o>n?0:e&31,l=o<i?31:r&31,u=(2<<l)-(1<<s);a[o]|=u}}},t.prototype.clear=function(){for(var e=this.bits.length,r=this.bits,n=0;n<e;n++)r[n]=0},t.prototype.isRange=function(e,r,n){if(r<e||e<0||r>this.size)throw new L;if(r===e)return!0;r--;for(var i=Math.floor(e/32),a=Math.floor(r/32),o=this.bits,s=i;s<=a;s++){var l=s>i?0:e&31,u=s<a?31:r&31,c=(2<<u)-(1<<l)&4294967295;if((o[s]&c)!==(n?c:0))return!1}return!0},t.prototype.appendBit=function(e){this.ensureCapacity(this.size+1),e&&(this.bits[Math.floor(this.size/32)]|=1<<(this.size&31)),this.size++},t.prototype.appendBits=function(e,r){if(r<0||r>32)throw new L("Num bits must be between 0 and 32");this.ensureCapacity(this.size+r);for(var n=r;n>0;n--)this.appendBit((e>>n-1&1)===1)},t.prototype.appendBitArray=function(e){var r=e.size;this.ensureCapacity(this.size+r);for(var n=0;n<r;n++)this.appendBit(e.get(n))},t.prototype.xor=function(e){if(this.size!==e.size)throw new L("Sizes don't match");for(var r=this.bits,n=0,i=r.length;n<i;n++)r[n]^=e.bits[n]},t.prototype.toBytes=function(e,r,n,i){for(var a=0;a<i;a++){for(var o=0,s=0;s<8;s++)this.get(e)&&(o|=1<<7-s),e++;r[n+a]=o}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var e=new Int32Array(this.bits.length),r=Math.floor((this.size-1)/32),n=r+1,i=this.bits,a=0;a<n;a++){var o=i[a];o=o>>1&1431655765|(o&1431655765)<<1,o=o>>2&858993459|(o&858993459)<<2,o=o>>4&252645135|(o&252645135)<<4,o=o>>8&16711935|(o&16711935)<<8,o=o>>16&65535|(o&65535)<<16,e[r-a]=o}if(this.size!==n*32){for(var s=n*32-this.size,l=e[0]>>>s,a=1;a<n;a++){var u=e[a];l|=u<<32-s,e[a-1]=l,l=u>>>s}e[n-1]=l}this.bits=e},t.makeArray=function(e){return new Int32Array(Math.floor((e+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&De.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+De.hashCode(this.bits)},t.prototype.toString=function(){for(var e="",r=0,n=this.size;r<n;r++)(r&7)===0&&(e+=" "),e+=this.get(r)?"X":".";return e},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t}(),Sn;(function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ASSUME_GS1=7]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"})(Sn||(Sn={}));const se=Sn;var Su=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=function(t){Su(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(Ce),Iu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},K;(function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"})(K||(K={}));var de=function(){function t(e,r,n){for(var i,a,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,typeof r=="number"?this.values=Int32Array.from([r]):this.values=r,this.otherEncodingNames=o,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var l=this.values,u=0,c=l.length;u!==c;u++){var d=l[u];t.VALUES_TO_ECI.set(d,this)}try{for(var v=Iu(o),h=v.next();!h.done;h=v.next()){var p=h.value;t.NAME_TO_ECI.set(p,this)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new R("incorect value");var r=t.VALUES_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(K.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(K.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(K.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(K.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(K.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(K.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(K.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(K.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(K.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(K.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(K.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(K.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(K.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(K.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(K.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(K.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(K.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(K.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(K.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(K.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(K.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(K.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(K.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(K.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(K.Big5,28,"Big5"),t.GB18030=new t(K.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(K.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),Ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tr=function(t){Ou(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="UnsupportedOperationException",e}(Ce),Ye=function(){function t(){}return t.decode=function(e,r){var n=this.encodingName(r);return this.customDecoder?this.customDecoder(e,n):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(n)?this.decodeFallback(e,n):new TextDecoder(n).decode(e)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&e==="ISO-8859-1"},t.encode=function(e,r){var n=this.encodingName(r);return this.customEncoder?this.customEncoder(e,n):typeof TextEncoder>"u"?this.encodeFallback(e):new TextEncoder().encode(e)},t.isBrowser=function(){return typeof window<"u"&&{}.toString.call(window)==="[object Window]"},t.encodingName=function(e){return typeof e=="string"?e:e.getName()},t.encodingCharacterSet=function(e){return e instanceof de?e:de.getCharacterSetECIByName(e)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var i="",a=0,o=e.length;a<o;a++){var s=e[a].toString(16);s.length<2&&(s="0"+s),i+="%"+s}return decodeURIComponent(i)}if(n.equals(de.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Tr("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(e){return e.equals(de.UTF8)||e.equals(de.ISO8859_1)||e.equals(de.ASCII)},t.encodeFallback=function(e){for(var r=btoa(unescape(encodeURIComponent(e))),n=r.split(""),i=[],a=0;a<n.length;a++)i.push(n[a].charCodeAt(0));return new Uint8Array(i)},t}(),te=function(){function t(){}return t.castAsNonUtf8Char=function(e,r){r===void 0&&(r=null);var n=r?r.getName():this.ISO88591;return Ye.decode(new Uint8Array([e]),n)},t.guessEncoding=function(e,r){if(r!=null&&r.get(se.CHARACTER_SET)!==void 0)return r.get(se.CHARACTER_SET).toString();for(var n=e.length,i=!0,a=!0,o=!0,s=0,l=0,u=0,c=0,d=0,v=0,h=0,p=0,g=0,w=0,_=0,m=e.length>3&&e[0]===239&&e[1]===187&&e[2]===191,A=0;A<n&&(i||a||o);A++){var y=e[A]&255;o&&(s>0?(y&128)===0?o=!1:s--:(y&128)!==0&&((y&64)===0?o=!1:(s++,(y&32)===0?l++:(s++,(y&16)===0?u++:(s++,(y&8)===0?c++:o=!1))))),i&&(y>127&&y<160?i=!1:y>159&&(y<192||y===215||y===247)&&_++),a&&(d>0?y<64||y===127||y>252?a=!1:d--:y===128||y===160||y>239?a=!1:y>160&&y<224?(v++,p=0,h++,h>g&&(g=h)):y>127?(d++,h=0,p++,p>w&&(w=p)):(h=0,p=0))}return o&&s>0&&(o=!1),a&&d>0&&(a=!1),o&&(m||l+u+c>0)?t.UTF8:a&&(t.ASSUME_SHIFT_JIS||g>=3||w>=3)?t.SHIFT_JIS:i&&a?g===2&&v===2||_*10>=n?t.SHIFT_JIS:t.ISO88591:i?t.ISO88591:a?t.SHIFT_JIS:o?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=-1;function a(s,l,u,c,d,v){if(s==="%%")return"%";if(r[++i]!==void 0){s=c?parseInt(c.substr(1)):void 0;var h=d?parseInt(d.substr(1)):void 0,p;switch(v){case"s":p=r[i];break;case"c":p=r[i][0];break;case"f":p=parseFloat(r[i]).toFixed(s);break;case"p":p=parseFloat(r[i]).toPrecision(s);break;case"e":p=parseFloat(r[i]).toExponential(s);break;case"x":p=parseInt(r[i]).toString(h||16);break;case"d":p=parseFloat(parseInt(r[i],h||10).toPrecision(s)).toFixed(0);break}p=typeof p=="object"?JSON.stringify(p):(+p).toString(h);for(var g=parseInt(u),w=u&&u[0]+""=="0"?"0":" ";p.length<g;)p=l!==void 0?p+w:w+p;return p}}var o=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(o,a)},t.getBytes=function(e,r){return Ye.encode(e,r)},t.getCharCode=function(e,r){return r===void 0&&(r=0),e.charCodeAt(r)},t.getCharAt=function(e){return String.fromCharCode(e)},t.SHIFT_JIS=de.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=de.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=de.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),Q=function(){function t(e){e===void 0&&(e=""),this.value=e}return t.prototype.enableDecoding=function(e){return this.encoding=e,this},t.prototype.append=function(e){return typeof e=="string"?this.value+=e.toString():this.encoding?this.value+=te.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},t.prototype.appendChars=function(e,r,n){for(var i=r;r<r+n;i++)this.append(e[i]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(e){return this.value.charAt(e)},t.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},t.prototype.setCharAt=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+1)},t.prototype.substring=function(e,r){return this.value.substring(e,r)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+r.length)},t}(),Ze=function(){function t(e,r,n,i){if(this.width=e,this.height=r,this.rowSize=n,this.bits=i,r==null&&(r=e),this.height=r,e<1||r<1)throw new L("Both dimensions must be greater than 0");n==null&&(n=Math.floor((e+31)/32)),this.rowSize=n,i==null&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,i=new t(n,r),a=0;a<r;a++)for(var o=e[a],s=0;s<n;s++)o[s]&&i.set(s,a);return i},t.parseFromString=function(e,r,n){if(e===null)throw new L("stringRepresentation cannot be null");for(var i=new Array(e.length),a=0,o=0,s=-1,l=0,u=0;u<e.length;)if(e.charAt(u)===`
13
+ `||e.charAt(u)==="\r"){if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new L("row lengths do not match");o=a,l++}u++}else if(e.substring(u,u+r.length)===r)u+=r.length,i[a]=!0,a++;else if(e.substring(u,u+n.length)===n)u+=n.length,i[a]=!1,a++;else throw new L("illegal character encountered: "+e.substring(u));if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new L("row lengths do not match");l++}for(var c=new t(s,l),d=0;d<a;d++)i[d]&&c.set(Math.floor(d%s),Math.floor(d/s));return c},t.prototype.get=function(e,r){var n=r*this.rowSize+Math.floor(e/32);return(this.bits[n]>>>(e&31)&1)!==0},t.prototype.set=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(e&31)&4294967295},t.prototype.unset=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(e&31)&4294967295)},t.prototype.flip=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(e&31)&4294967295},t.prototype.xor=function(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new L("input matrix dimensions do not match");for(var r=new ve(Math.floor(this.width/32)+1),n=this.rowSize,i=this.bits,a=0,o=this.height;a<o;a++)for(var s=a*n,l=e.getRow(a,r).getBitArray(),u=0;u<n;u++)i[s+u]^=l[u]},t.prototype.clear=function(){for(var e=this.bits,r=e.length,n=0;n<r;n++)e[n]=0},t.prototype.setRegion=function(e,r,n,i){if(r<0||e<0)throw new L("Left and top must be nonnegative");if(i<1||n<1)throw new L("Height and width must be at least 1");var a=e+n,o=r+i;if(o>this.height||a>this.width)throw new L("The region must fit inside the matrix");for(var s=this.rowSize,l=this.bits,u=r;u<o;u++)for(var c=u*s,d=e;d<a;d++)l[c+Math.floor(d/32)]|=1<<(d&31)&4294967295},t.prototype.getRow=function(e,r){r==null||r.getSize()<this.width?r=new ve(this.width):r.clear();for(var n=this.rowSize,i=this.bits,a=e*n,o=0;o<n;o++)r.setBulk(o*32,i[a+o]);return r},t.prototype.setRow=function(e,r){re.arraycopy(r.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var e=this.getWidth(),r=this.getHeight(),n=new ve(e),i=new ve(e),a=0,o=Math.floor((r+1)/2);a<o;a++)n=this.getRow(a,n),i=this.getRow(r-1-a,i),n.reverse(),i.reverse(),this.setRow(a,i),this.setRow(r-1-a,n)},t.prototype.getEnclosingRectangle=function(){for(var e=this.width,r=this.height,n=this.rowSize,i=this.bits,a=e,o=r,s=-1,l=-1,u=0;u<r;u++)for(var c=0;c<n;c++){var d=i[u*n+c];if(d!==0){if(u<o&&(o=u),u>l&&(l=u),c*32<a){for(var v=0;(d<<31-v&4294967295)===0;)v++;c*32+v<a&&(a=c*32+v)}if(c*32+31>s){for(var v=31;!(d>>>v);)v--;c*32+v>s&&(s=c*32+v)}}}return s<a||l<o?null:Int32Array.from([a,o,s-a+1,l-o+1])},t.prototype.getTopLeftOnBit=function(){for(var e=this.rowSize,r=this.bits,n=0;n<r.length&&r[n]===0;)n++;if(n===r.length)return null;for(var i=n/e,a=n%e*32,o=r[n],s=0;(o<<31-s&4294967295)===0;)s++;return a+=s,Int32Array.from([a,i])},t.prototype.getBottomRightOnBit=function(){for(var e=this.rowSize,r=this.bits,n=r.length-1;n>=0&&r[n]===0;)n--;if(n<0)return null;for(var i=Math.floor(n/e),a=Math.floor(n%e)*32,o=r[n],s=31;!(o>>>s);)s--;return a+=s,Int32Array.from([a,i])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&De.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var e=this.width;return e=31*e+this.width,e=31*e+this.height,e=31*e+this.rowSize,e=31*e+De.hashCode(this.bits),e},t.prototype.toString=function(e,r,n){return e===void 0&&(e="X "),r===void 0&&(r=" "),n===void 0&&(n=`
14
+ `),this.buildToString(e,r,n)},t.prototype.buildToString=function(e,r,n){for(var i=new Q,a=0,o=this.height;a<o;a++){for(var s=0,l=this.width;s<l;s++)i.append(this.get(s,a)?e:r);i.append(n)}return i.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),Tu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),I=function(t){Tu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(Ce),Nu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Du=function(t){Nu(e,t);function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return e.prototype.getBlackRow=function(r,n){var i=this.getLuminanceSource(),a=i.getWidth();n==null||n.getSize()<a?n=new ve(a):n.clear(),this.initArrays(a);for(var o=i.getRow(r,this.luminances),s=this.buckets,l=0;l<a;l++)s[(o[l]&255)>>e.LUMINANCE_SHIFT]++;var u=e.estimateBlackPoint(s);if(a<3)for(var l=0;l<a;l++)(o[l]&255)<u&&n.set(l);else for(var c=o[0]&255,d=o[1]&255,l=1;l<a-1;l++){var v=o[l+1]&255;(d*4-c-v)/2<u&&n.set(l),c=d,d=v}return n},e.prototype.getBlackMatrix=function(){var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight(),a=new Ze(n,i);this.initArrays(n);for(var o=this.buckets,s=1;s<5;s++)for(var l=Math.floor(i*s/5),u=r.getRow(l,this.luminances),c=Math.floor(n*4/5),d=Math.floor(n/5);d<c;d++){var v=u[d]&255;o[v>>e.LUMINANCE_SHIFT]++}for(var h=e.estimateBlackPoint(o),p=r.getMatrix(),s=0;s<i;s++)for(var g=s*n,d=0;d<n;d++){var v=p[g+d]&255;v<h&&a.set(d,s)}return a},e.prototype.createBinarizer=function(r){return new e(r)},e.prototype.initArrays=function(r){this.luminances.length<r&&(this.luminances=new Uint8ClampedArray(r));for(var n=this.buckets,i=0;i<e.LUMINANCE_BUCKETS;i++)n[i]=0},e.estimateBlackPoint=function(r){for(var n=r.length,i=0,a=0,o=0,s=0;s<n;s++)r[s]>o&&(a=s,o=r[s]),r[s]>i&&(i=r[s]);for(var l=0,u=0,s=0;s<n;s++){var c=s-a,d=r[s]*c*c;d>u&&(l=s,u=d)}if(a>l){var v=a;a=l,l=v}if(l-a<=n/16)throw new I;for(var h=l-1,p=-1,s=l-1;s>a;s--){var g=s-a,d=g*g*(l-s)*(i-r[s]);d>p&&(h=s,p=d)}return h<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(Eu),Bu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ru=function(t){Bu(e,t);function e(r){var n=t.call(this,r)||this;return n.matrix=null,n}return e.prototype.getBlackMatrix=function(){if(this.matrix!==null)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&i>=e.MINIMUM_DIMENSION){var a=r.getMatrix(),o=n>>e.BLOCK_SIZE_POWER;(n&e.BLOCK_SIZE_MASK)!==0&&o++;var s=i>>e.BLOCK_SIZE_POWER;(i&e.BLOCK_SIZE_MASK)!==0&&s++;var l=e.calculateBlackPoints(a,o,s,n,i),u=new Ze(n,i);e.calculateThresholdForBlock(a,o,s,n,i,l,u),this.matrix=u}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(r){return new e(r)},e.calculateThresholdForBlock=function(r,n,i,a,o,s,l){for(var u=o-e.BLOCK_SIZE,c=a-e.BLOCK_SIZE,d=0;d<i;d++){var v=d<<e.BLOCK_SIZE_POWER;v>u&&(v=u);for(var h=e.cap(d,2,i-3),p=0;p<n;p++){var g=p<<e.BLOCK_SIZE_POWER;g>c&&(g=c);for(var w=e.cap(p,2,n-3),_=0,m=-2;m<=2;m++){var A=s[h+m];_+=A[w-2]+A[w-1]+A[w]+A[w+1]+A[w+2]}var y=_/25;e.thresholdBlock(r,g,v,y,a,l)}}},e.cap=function(r,n,i){return r<n?n:r>i?i:r},e.thresholdBlock=function(r,n,i,a,o,s){for(var l=0,u=i*o+n;l<e.BLOCK_SIZE;l++,u+=o)for(var c=0;c<e.BLOCK_SIZE;c++)(r[u+c]&255)<=a&&s.set(n+c,i+l)},e.calculateBlackPoints=function(r,n,i,a,o){for(var s=o-e.BLOCK_SIZE,l=a-e.BLOCK_SIZE,u=new Array(i),c=0;c<i;c++){u[c]=new Int32Array(n);var d=c<<e.BLOCK_SIZE_POWER;d>s&&(d=s);for(var v=0;v<n;v++){var h=v<<e.BLOCK_SIZE_POWER;h>l&&(h=l);for(var p=0,g=255,w=0,_=0,m=d*a+h;_<e.BLOCK_SIZE;_++,m+=a){for(var A=0;A<e.BLOCK_SIZE;A++){var y=r[m+A]&255;p+=y,y<g&&(g=y),y>w&&(w=y)}if(w-g>e.MIN_DYNAMIC_RANGE)for(_++,m+=a;_<e.BLOCK_SIZE;_++,m+=a)for(var A=0;A<e.BLOCK_SIZE;A++)p+=r[m+A]&255}var C=p>>e.BLOCK_SIZE_POWER*2;if(w-g<=e.MIN_DYNAMIC_RANGE&&(C=g/2,c>0&&v>0)){var b=(u[c-1][v]+2*u[c][v-1]+u[c-1][v-1])/4;g<b&&(C=b)}u[c][v]=C}}return u},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=e.BLOCK_SIZE*5,e.MIN_DYNAMIC_RANGE=24,e}(Du),zr=function(){function t(e,r){this.width=e,this.height=r}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(e,r,n,i){throw new Tr("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Tr("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Tr("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),r=new Q,n=0;n<this.height;n++){for(var i=this.getRow(n,e),a=0;a<this.width;a++){var o=i[a]&255,s=void 0;o<64?s="#":o<128?s="+":o<192?s=".":s=" ",r.append(s)}r.append(`
15
+ `)}return r.toString()},t}(),Pu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wn=function(t){Pu(e,t);function e(r){var n=t.call(this,r.getWidth(),r.getHeight())||this;return n.delegate=r,n}return e.prototype.getRow=function(r,n){for(var i=this.delegate.getRow(r,n),a=this.getWidth(),o=0;o<a;o++)i[o]=255-(i[o]&255);return i},e.prototype.getMatrix=function(){for(var r=this.delegate.getMatrix(),n=this.getWidth()*this.getHeight(),i=new Uint8ClampedArray(n),a=0;a<n;a++)i[a]=255-(r[a]&255);return i},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(r,n,i,a){return new e(this.delegate.crop(r,n,i,a))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e}(zr),ku=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mu=function(t){ku(e,t);function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return e.makeBufferFromCanvasImageData=function(r){var n=r.getContext("2d").getImageData(0,0,r.width,r.height);return e.toGrayscaleBuffer(n.data,r.width,r.height)},e.toGrayscaleBuffer=function(r,n,i){for(var a=new Uint8ClampedArray(n*i),o=0,s=0,l=r.length;o<l;o+=4,s++){var u=void 0,c=r[o+3];if(c===0)u=255;else{var d=r[o],v=r[o+1],h=r[o+2];u=306*d+601*v+117*h+512>>10}a[s]=u}return a},e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new L("Requested row is outside the image: "+r);var i=this.getWidth(),a=r*i;return n===null?n=this.buffer.slice(a,a+i):(n.length<i&&(n=new Uint8ClampedArray(i)),n.set(this.buffer.slice(a,a+i))),n},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return t.prototype.crop.call(this,r,n,i,a),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(this.tempCanvasElement===null){var r=this.canvas.ownerDocument.createElement("canvas");r.width=this.canvas.width,r.height=this.canvas.height,this.tempCanvasElement=r}return this.tempCanvasElement},e.prototype.rotate=function(r){var n=this.getTempCanvasElement(),i=n.getContext("2d"),a=r*e.DEGREE_TO_RADIANS,o=this.canvas.width,s=this.canvas.height,l=Math.ceil(Math.abs(Math.cos(a))*o+Math.abs(Math.sin(a))*s),u=Math.ceil(Math.abs(Math.sin(a))*o+Math.abs(Math.cos(a))*s);return n.width=l,n.height=u,i.translate(l/2,u/2),i.rotate(a),i.drawImage(this.canvas,o/-2,s/-2),this.buffer=e.makeBufferFromCanvasImageData(n),this},e.prototype.invert=function(){return new Wn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e}(zr),Lu=function(){function t(e,r,n){this.deviceId=e,this.label=r,this.kind="videoinput",this.groupId=n||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),_e=function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(t,e||[])).next())})},Ee=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Fu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ft=function(){function t(e,r,n){r===void 0&&(r=500),this.reader=e,this.timeBetweenScansMillis=r,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return typeof navigator<"u"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!!(this.isMediaDevicesSuported&&navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(e){this._timeBetweenDecodingAttempts=e<0?0:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(e){this._hints=e||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return _e(this,void 0,void 0,function(){var e,r,n,i,a,o,s,l,u,c,d,v;return Ee(this,function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=h.sent(),r=[];try{for(n=Fu(e),i=n.next();!i.done;i=n.next())a=i.value,o=a.kind==="video"?"videoinput":a.kind,o==="videoinput"&&(s=a.deviceId||a.id,l=a.label||"Video device "+(r.length+1),u=a.groupId,c={deviceId:s,label:l,kind:o,groupId:u},r.push(c))}catch(p){d={error:p}}finally{try{i&&!i.done&&(v=n.return)&&v.call(n)}finally{if(d)throw d.error}}return[2,r]}})})},t.prototype.getVideoInputDevices=function(){return _e(this,void 0,void 0,function(){var e;return Ee(this,function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return e=r.sent(),[2,e.map(function(n){return new Lu(n.deviceId,n.label)})]}})})},t.prototype.findDeviceById=function(e){return _e(this,void 0,void 0,function(){var r;return Ee(this,function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return r=n.sent(),r?[2,r.find(function(i){return i.deviceId===e})]:[2,null]}})})},t.prototype.decodeFromInputVideoDevice=function(e,r){return _e(this,void 0,void 0,function(){return Ee(this,function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(e,r)];case 1:return[2,n.sent()]}})})},t.prototype.decodeOnceFromVideoDevice=function(e,r){return _e(this,void 0,void 0,function(){var n,i;return Ee(this,function(a){switch(a.label){case 0:return this.reset(),e?n={deviceId:{exact:e}}:n={facingMode:"environment"},i={video:n},[4,this.decodeOnceFromConstraints(i,r)];case 1:return[2,a.sent()]}})})},t.prototype.decodeOnceFromConstraints=function(e,r){return _e(this,void 0,void 0,function(){var n;return Ee(this,function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=i.sent(),[4,this.decodeOnceFromStream(n,r)];case 2:return[2,i.sent()]}})})},t.prototype.decodeOnceFromStream=function(e,r){return _e(this,void 0,void 0,function(){var n,i;return Ee(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return n=a.sent(),[4,this.decodeOnce(n)];case 2:return i=a.sent(),[2,i]}})})},t.prototype.decodeFromInputVideoDeviceContinuously=function(e,r,n){return _e(this,void 0,void 0,function(){return Ee(this,function(i){switch(i.label){case 0:return[4,this.decodeFromVideoDevice(e,r,n)];case 1:return[2,i.sent()]}})})},t.prototype.decodeFromVideoDevice=function(e,r,n){return _e(this,void 0,void 0,function(){var i,a;return Ee(this,function(o){switch(o.label){case 0:return e?i={deviceId:{exact:e}}:i={facingMode:"environment"},a={video:i},[4,this.decodeFromConstraints(a,r,n)];case 1:return[2,o.sent()]}})})},t.prototype.decodeFromConstraints=function(e,r,n){return _e(this,void 0,void 0,function(){var i;return Ee(this,function(a){switch(a.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return i=a.sent(),[4,this.decodeFromStream(i,r,n)];case 2:return[2,a.sent()]}})})},t.prototype.decodeFromStream=function(e,r,n){return _e(this,void 0,void 0,function(){var i;return Ee(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return i=a.sent(),[4,this.decodeContinuously(i,n)];case 2:return[2,a.sent()]}})})},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(e,r){return _e(this,void 0,void 0,function(){var n;return Ee(this,function(i){switch(i.label){case 0:return n=this.prepareVideoElement(r),this.addVideoSource(n,e),this.videoElement=n,this.stream=e,[4,this.playVideoOnLoadAsync(n)];case 1:return i.sent(),[2,n]}})})},t.prototype.playVideoOnLoadAsync=function(e){var r=this;return new Promise(function(n,i){return r.playVideoOnLoad(e,function(){return n()})})},t.prototype.playVideoOnLoad=function(e,r){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(e)},e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",r),this.tryPlayVideo(e)},t.prototype.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2},t.prototype.tryPlayVideo=function(e){return _e(this,void 0,void 0,function(){return Ee(this,function(r){switch(r.label){case 0:if(this.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.play()];case 2:return r.sent(),[3,4];case 3:return r.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}})})},t.prototype.getMediaElement=function(e,r){var n=document.getElementById(e);if(!n)throw new Fe("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==r.toLowerCase())throw new Fe("element with id '"+e+"' must be an "+r+" element");return n},t.prototype.decodeFromImage=function(e,r){if(!e&&!r)throw new Fe("either imageElement with a src set or an url must be provided");return r&&!e?this.decodeFromImageUrl(r):this.decodeFromImageElement(e)},t.prototype.decodeFromVideo=function(e,r){if(!e&&!r)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrl(r):this.decodeFromVideoElement(e)},t.prototype.decodeFromVideoContinuously=function(e,r,n){if(e===void 0&&r===void 0)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrlContinuously(r,n):this.decodeFromVideoElementContinuously(e,n)},t.prototype.decodeFromImageElement=function(e){if(!e)throw new Fe("An image element must be provided.");this.reset();var r=this.prepareImageElement(e);this.imageElement=r;var n;return this.isImageLoaded(r)?n=this.decodeOnce(r,!1,!0):n=this._decodeOnLoadImage(r),n},t.prototype.decodeFromVideoElement=function(e){var r=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(r)},t.prototype.decodeFromVideoElementContinuously=function(e,r){var n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(n,r)},t.prototype._decodeFromVideoElementSetup=function(e){if(!e)throw new Fe("A video element must be provided.");this.reset();var r=this.prepareVideoElement(e);return this.videoElement=r,r},t.prototype.decodeFromImageUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareImageElement();this.imageElement=r;var n=this._decodeOnLoadImage(r);return r.src=e,n},t.prototype.decodeFromVideoUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElement(r);return r.src=e,n},t.prototype.decodeFromVideoUrlContinuously=function(e,r){if(!e)throw new Fe("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),i=this.decodeFromVideoElementContinuously(n,r);return n.src=e,i},t.prototype._decodeOnLoadImage=function(e){var r=this;return new Promise(function(n,i){r.imageLoadedListener=function(){return r.decodeOnce(e,!1,!0).then(n,i)},e.addEventListener("load",r.imageLoadedListener)})},t.prototype._decodeOnLoadVideo=function(e){return _e(this,void 0,void 0,function(){return Ee(this,function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return r.sent(),[4,this.decodeOnce(e)];case 2:return[2,r.sent()]}})})},t.prototype._decodeOnLoadVideoContinuously=function(e,r){return _e(this,void 0,void 0,function(){return Ee(this,function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return n.sent(),this.decodeContinuously(e,r),[2]}})})},t.prototype.isImageLoaded=function(e){return!(!e.complete||e.naturalWidth===0)},t.prototype.prepareImageElement=function(e){var r;return typeof e>"u"&&(r=document.createElement("img"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(r=e),r},t.prototype.prepareVideoElement=function(e){var r;return!e&&typeof document<"u"&&(r=document.createElement("video"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(r=e),r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.prototype.decodeOnce=function(e,r,n){var i=this;r===void 0&&(r=!0),n===void 0&&(n=!0),this._stopAsyncDecode=!1;var a=function(o,s){if(i._stopAsyncDecode){s(new I("Video stream has ended before any code could be detected.")),i._stopAsyncDecode=void 0;return}try{var l=i.decode(e);o(l)}catch(v){var u=r&&v instanceof I,c=v instanceof ye||v instanceof R,d=c&&n;if(u||d)return setTimeout(a,i._timeBetweenDecodingAttempts,o,s);s(v)}};return new Promise(function(o,s){return a(o,s)})},t.prototype.decodeContinuously=function(e,r){var n=this;this._stopContinuousDecode=!1;var i=function(){if(n._stopContinuousDecode){n._stopContinuousDecode=void 0;return}try{var a=n.decode(e);r(a,null),setTimeout(i,n.timeBetweenScansMillis)}catch(l){r(null,l);var o=l instanceof ye||l instanceof R,s=l instanceof I;(o||s)&&setTimeout(i,n._timeBetweenDecodingAttempts)}};i()},t.prototype.decode=function(e){var r=this.createBinaryBitmap(e);return this.decodeBitmap(r)},t.prototype._isHTMLVideoElement=function(e){var r=e;return r.videoWidth!==0},t.prototype.createBinaryBitmap=function(e){this.getCaptureCanvasContext(e),this._isHTMLVideoElement(e)?this.drawFrameOnCanvas(e):this.drawImageOnCanvas(e);var r=this.getCaptureCanvas(e),n=new Mu(r),i=new Ru(n);return new wu(i)},t.prototype.getCaptureCanvasContext=function(e){if(!this.captureCanvasContext){var r=this.getCaptureCanvas(e),n=void 0;try{n=r.getContext("2d",{willReadFrequently:!0})}catch{n=r.getContext("2d")}this.captureCanvasContext=n}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(e){if(!this.captureCanvas){var r=this.createCaptureCanvas(e);this.captureCanvas=r}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.videoWidth,sHeight:e.videoHeight,dx:0,dy:0,dWidth:e.videoWidth,dHeight:e.videoHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.drawImageOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.naturalWidth,sHeight:e.naturalHeight,dx:0,dy:0,dWidth:e.naturalWidth,dHeight:e.naturalHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.decodeBitmap=function(e){return this.reader.decode(e,this._hints)},t.prototype.createCaptureCanvas=function(e){if(typeof document>"u")return this._destroyCaptureCanvas(),null;var r=document.createElement("canvas"),n,i;return typeof e<"u"&&(e instanceof HTMLVideoElement?(n=e.videoWidth,i=e.videoHeight):e instanceof HTMLImageElement&&(n=e.naturalWidth||e.width,i=e.naturalHeight||e.height)),r.style.width=n+"px",r.style.height=i+"px",r.width=n,r.height=i,r},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach(function(e){return e.stop()}),this.stream=void 0),this._stopAsyncDecode===!1&&this.stopAsyncDecode(),this._stopContinuousDecode===!1&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(typeof this.videoEndedListener<"u"&&this.videoElement.removeEventListener("ended",this.videoEndedListener),typeof this.videoPlayingEventListener<"u"&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),typeof this.videoCanPlayListener<"u"&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.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)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(e,r){try{e.srcObject=r}catch{e.src=URL.createObjectURL(r)}},t.prototype.cleanVideoSource=function(e){try{e.srcObject=null}catch{e.src=""}this.videoElement.removeAttribute("src")},t}(),Be=function(){function t(e,r,n,i,a,o){n===void 0&&(n=r==null?0:8*r.length),o===void 0&&(o=re.currentTimeMillis()),this.text=e,this.rawBytes=r,this.numBits=n,this.resultPoints=i,this.format=a,this.timestamp=o,this.text=e,this.rawBytes=r,n==null?this.numBits=r==null?0:8*r.length:this.numBits=n,this.resultPoints=i,this.format=a,this.resultMetadata=null,o==null?this.timestamp=re.currentTimeMillis():this.timestamp=o}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(e,r){this.resultMetadata===null&&(this.resultMetadata=new Map),this.resultMetadata.set(e,r)},t.prototype.putAllMetadata=function(e){e!==null&&(this.resultMetadata===null?this.resultMetadata=e:this.resultMetadata=new Map(e))},t.prototype.addResultPoints=function(e){var r=this.resultPoints;if(r===null)this.resultPoints=e;else if(e!==null&&e.length>0){var n=new Array(r.length+e.length);re.arraycopy(r,0,n,0,r.length),re.arraycopy(e,0,n,r.length,e.length),this.resultPoints=n}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}(),In;(function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(In||(In={}));const F=In;var On;(function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"})(On||(On={}));const me=On;var Wr=function(){function t(e,r,n,i,a,o){a===void 0&&(a=-1),o===void 0&&(o=-1),this.rawBytes=e,this.text=r,this.byteSegments=n,this.ecLevel=i,this.structuredAppendSequenceNumber=a,this.structuredAppendParity=o,this.numBits=e==null?0:8*e.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(e){this.numBits=e},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(e){this.errorsCorrected=e},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(e){this.erasures=e},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(e){this.other=e},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t}(),er=function(){function t(){}return t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new L;return this.logTable[e]},t.addOrSubtract=function(e,r){return e^r},t}(),ft=function(){function t(e,r){if(r.length===0)throw new L;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-i),re.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){if(e===0)return this.getCoefficient(0);var r=this.coefficients,n;if(e===1){n=0;for(var i=0,a=r.length;i!==a;i++){var o=r[i];n=er.addOrSubtract(n,o)}return n}n=r[0];for(var s=r.length,l=this.field,i=1;i<s;i++)n=er.addOrSubtract(l.multiply(e,n),r[i]);return n},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new L("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;re.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=er.addOrSubtract(r[s-o],n[s]);return new t(this.field,a)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new L("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=this.field,l=0;l<n;l++)for(var u=r[l],c=0;c<a;c++)o[l+c]=er.addOrSubtract(o[l+c],s.multiply(u,i[c]));return new t(s,o)},t.prototype.multiplyScalar=function(e){if(e===0)return this.field.getZero();if(e===1)return this;for(var r=this.coefficients.length,n=this.field,i=new Int32Array(r),a=this.coefficients,o=0;o<r;o++)i[o]=n.multiply(a[o],e);return new t(n,i)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new L;if(r===0)return this.field.getZero();for(var n=this.coefficients,i=n.length,a=new Int32Array(i+e),o=this.field,s=0;s<i;s++)a[s]=o.multiply(n[s],r);return new t(o,a)},t.prototype.divide=function(e){if(!this.field.equals(e.field))throw new L("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new L("Divide by 0");for(var r=this.field,n=r.getZero(),i=this,a=e.getCoefficient(e.getDegree()),o=r.inverse(a);i.getDegree()>=e.getDegree()&&!i.isZero();){var s=i.getDegree()-e.getDegree(),l=r.multiply(i.getCoefficient(i.getDegree()),o),u=e.multiplyByMonomial(s,l),c=r.buildMonomial(s,l);n=n.addOrSubtract(c),i=i.addOrSubtract(u)}return[n,i]},t.prototype.toString=function(){for(var e="",r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);if(n!==0){if(n<0?(e+=" - ",n=-n):e.length>0&&(e+=" + "),r===0||n!==1){var i=this.field.log(n);i===0?e+="1":i===1?e+="a":(e+="a^",e+=i)}r!==0&&(r===1?e+="x":(e+="x^",e+=r))}}return e},t}(),Vu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fa=function(t){Vu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArithmeticException",e}(Ce),Uu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ne=function(t){Uu(e,t);function e(r,n,i){var a=t.call(this)||this;a.primitive=r,a.size=n,a.generatorBase=i;for(var o=new Int32Array(n),s=1,l=0;l<n;l++)o[l]=s,s*=2,s>=n&&(s^=r,s&=n-1);a.expTable=o;for(var u=new Int32Array(n),l=0;l<n-1;l++)u[o[l]]=l;return a.logTable=u,a.zero=new ft(a,Int32Array.from([0])),a.one=new ft(a,Int32Array.from([1])),a}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new L;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new ft(this,i)},e.prototype.inverse=function(r){if(r===0)throw new fa;return this.expTable[this.size-this.logTable[r]-1]},e.prototype.multiply=function(r,n){return r===0||n===0?0:this.expTable[(this.logTable[r]+this.logTable[n])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+G.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(r){return r===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e}(er),$u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mr=function(t){$u(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReedSolomonException",e}(Ce),Hu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),dr=function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalStateException",e}(Ce),Xr=function(){function t(e){this.field=e}return t.prototype.decode=function(e,r){for(var n=this.field,i=new ft(n,e),a=new Int32Array(r),o=!0,s=0;s<r;s++){var l=i.evaluateAt(n.exp(s+n.getGeneratorBase()));a[a.length-1-s]=l,l!==0&&(o=!1)}if(!o)for(var u=new ft(n,a),c=this.runEuclideanAlgorithm(n.buildMonomial(r,1),u,r),d=c[0],v=c[1],h=this.findErrorLocations(d),p=this.findErrorMagnitudes(v,h),s=0;s<h.length;s++){var g=e.length-1-n.log(h[s]);if(g<0)throw new mr("Bad error location");e[g]=Ne.addOrSubtract(e[g],p[s])}},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=this.field,o=e,s=r,l=a.getZero(),u=a.getOne();s.getDegree()>=(n/2|0);){var c=o,d=l;if(o=s,l=u,o.isZero())throw new mr("r_{i-1} was zero");s=c;for(var v=a.getZero(),h=o.getCoefficient(o.getDegree()),p=a.inverse(h);s.getDegree()>=o.getDegree()&&!s.isZero();){var g=s.getDegree()-o.getDegree(),w=a.multiply(s.getCoefficient(s.getDegree()),p);v=v.addOrSubtract(a.buildMonomial(g,w)),s=s.addOrSubtract(o.multiplyByMonomial(g,w))}if(u=v.multiply(l).addOrSubtract(d),s.getDegree()>=o.getDegree())throw new dr("Division algorithm failed to reduce polynomial?")}var _=u.getCoefficient(0);if(_===0)throw new mr("sigmaTilde(0) was zero");var m=a.inverse(_),A=u.multiplyScalar(m),y=s.multiplyScalar(m);return[A,y]},t.prototype.findErrorLocations=function(e){var r=e.getDegree();if(r===1)return Int32Array.from([e.getCoefficient(1)]);for(var n=new Int32Array(r),i=0,a=this.field,o=1;o<a.getSize()&&i<r;o++)e.evaluateAt(o)===0&&(n[i]=a.inverse(o),i++);if(i!==r)throw new mr("Error locator degree does not match number of roots");return n},t.prototype.findErrorMagnitudes=function(e,r){for(var n=r.length,i=new Int32Array(n),a=this.field,o=0;o<n;o++){for(var s=a.inverse(r[o]),l=1,u=0;u<n;u++)if(o!==u){var c=a.multiply(r[u],s),d=(c&1)===0?c|1:c&-2;l=a.multiply(l,d)}i[o]=a.multiply(e.evaluateAt(s),a.inverse(l)),a.getGeneratorBase()!==0&&(i[o]=a.multiply(i[o],s))}return i},t}(),pe;(function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"})(pe||(pe={}));var yi=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),i=this.correctBits(n),a=t.convertBoolArrayToByteArray(i),o=t.getEncodedData(i),s=new Wr(a,o,null,null);return s.setNumBits(i.length),s},t.highLevelDecode=function(e){return this.getEncodedData(e)},t.getEncodedData=function(e){for(var r=e.length,n=pe.UPPER,i=pe.UPPER,a="",o=0;o<r;)if(i===pe.BINARY){if(r-o<5)break;var s=t.readCode(e,o,5);if(o+=5,s===0){if(r-o<11)break;s=t.readCode(e,o,11)+31,o+=11}for(var l=0;l<s;l++){if(r-o<8){o=r;break}var u=t.readCode(e,o,8);a+=te.castAsNonUtf8Char(u),o+=8}i=n}else{var c=i===pe.DIGIT?4:5;if(r-o<c)break;var u=t.readCode(e,o,c);o+=c;var d=t.getCharacter(i,u);d.startsWith("CTRL_")?(n=i,i=t.getTable(d.charAt(5)),d.charAt(6)==="L"&&(n=i)):(a+=d,i=n)}return a},t.getTable=function(e){switch(e){case"L":return pe.LOWER;case"P":return pe.PUNCT;case"M":return pe.MIXED;case"D":return pe.DIGIT;case"B":return pe.BINARY;case"U":default:return pe.UPPER}},t.getCharacter=function(e,r){switch(e){case pe.UPPER:return t.UPPER_TABLE[r];case pe.LOWER:return t.LOWER_TABLE[r];case pe.MIXED:return t.MIXED_TABLE[r];case pe.PUNCT:return t.PUNCT_TABLE[r];case pe.DIGIT:return t.DIGIT_TABLE[r];default:throw new dr("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Ne.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Ne.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Ne.AZTEC_DATA_10):(n=12,r=Ne.AZTEC_DATA_12);var i=this.ddata.getNbDatablocks(),a=e.length/n;if(a<i)throw new R;for(var o=e.length%n,s=new Int32Array(a),l=0;l<a;l++,o+=n)s[l]=t.readCode(e,o,n);try{var u=new Xr(r);u.decode(s,a-i)}catch(w){throw new R(w)}for(var c=(1<<n)-1,d=0,l=0;l<i;l++){var v=s[l];if(v===0||v===c)throw new R;(v===1||v===c-1)&&d++}for(var h=new Array(i*n-d),p=0,l=0;l<i;l++){var v=s[l];if(v===1||v===c-1)h.fill(v>1,p,p+n-1),p+=n-1;else for(var g=n-1;g>=0;--g)h[p++]=(v&1<<g)!==0}return h},t.prototype.extractBits=function(e){var r=this.ddata.isCompact(),n=this.ddata.getNbLayers(),i=(r?11:14)+n*4,a=new Int32Array(i),o=new Array(this.totalBitsInLayer(n,r));if(r)for(var s=0;s<a.length;s++)a[s]=s;else for(var l=i+1+2*G.truncDivision(G.truncDivision(i,2)-1,15),u=i/2,c=G.truncDivision(l,2),s=0;s<u;s++){var d=s+G.truncDivision(s,15);a[u-s-1]=c-d-1,a[u+s]=c+d+1}for(var s=0,v=0;s<n;s++){for(var h=(n-s)*4+(r?9:12),p=s*2,g=i-1-p,w=0;w<h;w++)for(var _=w*2,m=0;m<2;m++)o[v+_+m]=e.get(a[p+m],a[p+w]),o[v+2*h+_+m]=e.get(a[p+w],a[g-m]),o[v+4*h+_+m]=e.get(a[g-m],a[g-w]),o[v+6*h+_+m]=e.get(a[g-w],a[p+m]);v+=h*8}return o},t.readCode=function(e,r,n){for(var i=0,a=r;a<r+n;a++)i<<=1,e[a]&&(i|=1);return i},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b"," ",`
16
16
  `,"\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r",`\r
17
- `,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),W=function(){function t(){}return t.round=function(e){return isNaN(e)?0:e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0},t.distance=function(e,r,n,i){var a=e-n,o=r-i;return Math.sqrt(a*a+o*o)},t.sum=function(e){for(var r=0,n=0,i=e.length;n!==i;n++){var a=e[n];r+=a}return r},t}(),Tn=function(){function t(){}return t.floatToIntBits=function(e){return e},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),P=function(){function t(e,r){this.x=e,this.y=r}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Tn.floatToIntBits(this.x)+Tn.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(e){var r=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),i=this.distance(e[0],e[2]),a,o,s;if(n>=r&&n>=i?(o=e[0],a=e[1],s=e[2]):i>=n&&i>=r?(o=e[1],a=e[0],s=e[2]):(o=e[2],a=e[0],s=e[1]),this.crossProductZ(a,o,s)<0){var l=a;a=s,s=l}e[0]=a,e[1]=o,e[2]=s},t.distance=function(e,r){return W.distance(e.x,e.y,r.x,r.y)},t.crossProductZ=function(e,r,n){var i=r.x,a=r.y;return(n.x-i)*(e.y-a)-(n.y-a)*(e.x-i)},t}(),Xn=function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),z1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),W1=function(t){z1(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n)||this;return s.compact=i,s.nbDatablocks=a,s.nbLayers=o,s}return e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Xn),Nn=function(){function t(e,r,n,i){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),r==null&&(r=t.INIT_SIZE),n==null&&(n=e.getWidth()/2|0),i==null&&(i=e.getHeight()/2|0);var a=r/2|0;if(this.leftInit=n-a,this.rightInit=n+a,this.upInit=i-a,this.downInit=i+a,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new S}return t.prototype.detect=function(){for(var e=this.leftInit,r=this.rightInit,n=this.upInit,i=this.downInit,a=!1,o=!0,s=!1,l=!1,u=!1,c=!1,d=!1,v=this.width,h=this.height;o;){o=!1;for(var p=!0;(p||!l)&&r<v;)p=this.containsBlackPoint(n,i,r,!1),p?(r++,o=!0,l=!0):l||r++;if(r>=v){a=!0;break}for(var g=!0;(g||!u)&&i<h;)g=this.containsBlackPoint(e,r,i,!0),g?(i++,o=!0,u=!0):u||i++;if(i>=h){a=!0;break}for(var m=!0;(m||!c)&&e>=0;)m=this.containsBlackPoint(n,i,e,!1),m?(e--,o=!0,c=!0):c||e--;if(e<0){a=!0;break}for(var w=!0;(w||!d)&&n>=0;)w=this.containsBlackPoint(e,r,n,!0),w?(n--,o=!0,d=!0):d||n--;if(n<0){a=!0;break}o&&(s=!0)}if(!a&&s){for(var y=r-e,_=null,A=1;_===null&&A<y;A++)_=this.getBlackPointOnSegment(e,i-A,e+A,i);if(_==null)throw new S;for(var C=null,A=1;C===null&&A<y;A++)C=this.getBlackPointOnSegment(e,n+A,e+A,n);if(C==null)throw new S;for(var D=null,A=1;D===null&&A<y;A++)D=this.getBlackPointOnSegment(r,n+A,r-A,n);if(D==null)throw new S;for(var B=null,A=1;B===null&&A<y;A++)B=this.getBlackPointOnSegment(r,i-A,r-A,i);if(B==null)throw new S;return this.centerEdges(B,_,D,C)}else throw new S},t.prototype.getBlackPointOnSegment=function(e,r,n,i){for(var a=W.round(W.distance(e,r,n,i)),o=(n-e)/a,s=(i-r)/a,l=this.image,u=0;u<a;u++){var c=W.round(e+u*o),d=W.round(r+u*s);if(l.get(c,d))return new P(c,d)}return null},t.prototype.centerEdges=function(e,r,n,i){var a=e.getX(),o=e.getY(),s=r.getX(),l=r.getY(),u=n.getX(),c=n.getY(),d=i.getX(),v=i.getY(),h=t.CORR;return a<this.width/2?[new P(d-h,v+h),new P(s+h,l+h),new P(u-h,c-h),new P(a+h,o-h)]:[new P(d+h,v+h),new P(s+h,l-h),new P(u-h,c+h),new P(a-h,o-h)]},t.prototype.containsBlackPoint=function(e,r,n,i){var a=this.image;if(i){for(var o=e;o<=r;o++)if(a.get(o,n))return!0}else for(var s=e;s<=r;s++)if(a.get(n,s))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),mi=function(){function t(){}return t.checkAndNudgePoints=function(e,r){for(var n=e.getWidth(),i=e.getHeight(),a=!0,o=0;o<r.length&&a;o+=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new S;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}a=!0;for(var o=r.length-2;o>=0&&a;o-=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new S;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}},t}(),ca=function(){function t(e,r,n,i,a,o,s,l,u){this.a11=e,this.a21=r,this.a31=n,this.a12=i,this.a22=a,this.a32=o,this.a13=s,this.a23=l,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,r,n,i,a,o,s,l,u,c,d,v,h,p,g,m){var w=t.quadrilateralToSquare(e,r,n,i,a,o,s,l),y=t.squareToQuadrilateral(u,c,d,v,h,p,g,m);return y.times(w)},t.prototype.transformPoints=function(e){for(var r=e.length,n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,u=this.a31,c=this.a32,d=this.a33,v=0;v<r;v+=2){var h=e[v],p=e[v+1],g=a*h+l*p+d;e[v]=(n*h+o*p+u)/g,e[v+1]=(i*h+s*p+c)/g}},t.prototype.transformPointsWithValues=function(e,r){for(var n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,u=this.a31,c=this.a32,d=this.a33,v=e.length,h=0;h<v;h++){var p=e[h],g=r[h],m=a*p+l*g+d;e[h]=(n*p+o*g+u)/m,r[h]=(i*p+s*g+c)/m}},t.squareToQuadrilateral=function(e,r,n,i,a,o,s,l){var u=e-n+a-s,c=r-i+o-l;if(u===0&&c===0)return new t(n-e,a-n,e,i-r,o-i,r,0,0,1);var d=n-a,v=s-a,h=i-o,p=l-o,g=d*p-v*h,m=(u*p-v*c)/g,w=(d*c-u*h)/g;return new t(n-e+m*n,s-e+w*s,e,i-r+m*i,l-r+w*l,r,m,w,1)},t.quadrilateralToSquare=function(e,r,n,i,a,o,s,l){return t.squareToQuadrilateral(e,r,n,i,a,o,s,l).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),X1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),j1=function(t){X1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.sampleGrid=function(r,n,i,a,o,s,l,u,c,d,v,h,p,g,m,w,y,_,A){var C=ca.quadrilateralToQuadrilateral(a,o,s,l,u,c,d,v,h,p,g,m,w,y,_,A);return this.sampleGridWithTransform(r,n,i,C)},e.prototype.sampleGridWithTransform=function(r,n,i,a){if(n<=0||i<=0)throw new S;for(var o=new Ke(n,i),s=new Float32Array(2*n),l=0;l<i;l++){for(var u=s.length,c=l+.5,d=0;d<u;d+=2)s[d]=d/2+.5,s[d+1]=c;a.transformPoints(s),mi.checkAndNudgePoints(r,s);try{for(var d=0;d<u;d+=2)r.get(Math.floor(s[d]),Math.floor(s[d+1]))&&o.set(d/2,l)}catch{throw new S}}return o},e}(mi),jn=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new j1,t}(),be=function(){function t(e,r){this.x=e,this.y=r}return t.prototype.toResultPoint=function(){return new P(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),Y1=function(){function t(e){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=e}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(e){var r=this.getMatrixCenter(),n=this.getBullsEyeCorners(r);if(e){var i=n[0];n[0]=n[2],n[2]=i}this.extractParameters(n);var a=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),o=this.getMatrixCornerPoints(n);return new W1(a,o,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(e){if(!this.isValidPoint(e[0])||!this.isValidPoint(e[1])||!this.isValidPoint(e[2])||!this.isValidPoint(e[3]))throw new S;var r=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(e[0],e[1],r),this.sampleLine(e[1],e[2],r),this.sampleLine(e[2],e[3],r),this.sampleLine(e[3],e[0],r)]);this.shift=this.getRotation(n,r);for(var i=0,a=0;a<4;a++){var o=n[(this.shift+a)%4];this.compact?(i<<=7,i+=o>>1&127):(i<<=10,i+=(o>>2&992)+(o>>1&31))}var s=this.getCorrectedParameterData(i,this.compact);this.compact?(this.nbLayers=(s>>6)+1,this.nbDataBlocks=(s&63)+1):(this.nbLayers=(s>>11)+1,this.nbDataBlocks=(s&2047)+1)},t.prototype.getRotation=function(e,r){var n=0;e.forEach(function(a,o,s){var l=(a>>r-2<<1)+(a&1);n=(n<<3)+l}),n=((n&1)<<11)+(n>>1);for(var i=0;i<4;i++)if(H.bitCount(n^this.EXPECTED_CORNER_BITS[i])<=2)return i;throw new S},t.prototype.getCorrectedParameterData=function(e,r){var n,i;r?(n=7,i=2):(n=10,i=4);for(var a=n-i,o=new Int32Array(n),s=n-1;s>=0;--s)o[s]=e&15,e>>=4;try{var l=new Gr(Te.AZTEC_PARAM);l.decode(o,a)}catch{throw new S}for(var u=0,s=0;s<i;s++)u=(u<<4)+o[s];return u},t.prototype.getBullsEyeCorners=function(e){var r=e,n=e,i=e,a=e,o=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var s=this.getFirstDifferent(r,o,1,-1),l=this.getFirstDifferent(n,o,1,1),u=this.getFirstDifferent(i,o,-1,1),c=this.getFirstDifferent(a,o,-1,-1);if(this.nbCenterLayers>2){var d=this.distancePoint(c,s)*this.nbCenterLayers/(this.distancePoint(a,r)*(this.nbCenterLayers+2));if(d<.75||d>1.25||!this.isWhiteOrBlackRectangle(s,l,u,c))break}r=s,n=l,i=u,a=c,o=!o}if(this.nbCenterLayers!==5&&this.nbCenterLayers!==7)throw new S;this.compact=this.nbCenterLayers===5;var v=new P(r.getX()+.5,r.getY()-.5),h=new P(n.getX()+.5,n.getY()+.5),p=new P(i.getX()-.5,i.getY()+.5),g=new P(a.getX()-.5,a.getY()-.5);return this.expandSquare([v,h,p,g],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var e,r,n,i;try{var a=new Nn(this.image).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{var o=this.image.getWidth()/2,s=this.image.getHeight()/2;e=this.getFirstDifferent(new be(o+7,s-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new be(o+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new be(o-7,s+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new be(o-7,s-7),!1,-1,-1).toResultPoint()}var l=W.round((e.getX()+i.getX()+r.getX()+n.getX())/4),u=W.round((e.getY()+i.getY()+r.getY()+n.getY())/4);try{var a=new Nn(this.image,15,l,u).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{e=this.getFirstDifferent(new be(l+7,u-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new be(l+7,u+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new be(l-7,u+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new be(l-7,u-7),!1,-1,-1).toResultPoint()}return l=W.round((e.getX()+i.getX()+r.getX()+n.getX())/4),u=W.round((e.getY()+i.getY()+r.getY()+n.getY())/4),new be(l,u)},t.prototype.getMatrixCornerPoints=function(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(e,r,n,i,a){var o=jn.getInstance(),s=this.getDimension(),l=s/2-this.nbCenterLayers,u=s/2+this.nbCenterLayers;return o.sampleGrid(e,s,s,l,l,u,l,u,u,l,u,r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY(),a.getX(),a.getY())},t.prototype.sampleLine=function(e,r,n){for(var i=0,a=this.distanceResultPoint(e,r),o=a/n,s=e.getX(),l=e.getY(),u=o*(r.getX()-e.getX())/a,c=o*(r.getY()-e.getY())/a,d=0;d<n;d++)this.image.get(W.round(s+d*u),W.round(l+d*c))&&(i|=1<<n-d-1);return i},t.prototype.isWhiteOrBlackRectangle=function(e,r,n,i){var a=3;e=new be(e.getX()-a,e.getY()+a),r=new be(r.getX()-a,r.getY()-a),n=new be(n.getX()+a,n.getY()-a),i=new be(i.getX()+a,i.getY()+a);var o=this.getColor(i,e);if(o===0)return!1;var s=this.getColor(e,r);return s!==o||(s=this.getColor(r,n),s!==o)?!1:(s=this.getColor(n,i),s===o)},t.prototype.getColor=function(e,r){for(var n=this.distancePoint(e,r),i=(r.getX()-e.getX())/n,a=(r.getY()-e.getY())/n,o=0,s=e.getX(),l=e.getY(),u=this.image.get(e.getX(),e.getY()),c=Math.ceil(n),d=0;d<c;d++)s+=i,l+=a,this.image.get(W.round(s),W.round(l))!==u&&o++;var v=o/n;return v>.1&&v<.9?0:v<=.1===u?1:-1},t.prototype.getFirstDifferent=function(e,r,n,i){for(var a=e.getX()+n,o=e.getY()+i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n,o+=i;for(a-=n,o-=i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n;for(a-=n;this.isValid(a,o)&&this.image.get(a,o)===r;)o+=i;return o-=i,new be(a,o)},t.prototype.expandSquare=function(e,r,n){var i=n/(2*r),a=e[0].getX()-e[2].getX(),o=e[0].getY()-e[2].getY(),s=(e[0].getX()+e[2].getX())/2,l=(e[0].getY()+e[2].getY())/2,u=new P(s+i*a,l+i*o),c=new P(s-i*a,l-i*o);a=e[1].getX()-e[3].getX(),o=e[1].getY()-e[3].getY(),s=(e[1].getX()+e[3].getX())/2,l=(e[1].getY()+e[3].getY())/2;var d=new P(s+i*a,l+i*o),v=new P(s-i*a,l-i*o),h=[u,d,c,v];return h},t.prototype.isValid=function(e,r){return e>=0&&e<this.image.getWidth()&&r>0&&r<this.image.getHeight()},t.prototype.isValidPoint=function(e){var r=W.round(e.getX()),n=W.round(e.getY());return this.isValid(r,n)},t.prototype.distancePoint=function(e,r){return W.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.distanceResultPoint=function(e,r){return W.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(H.truncDivision(this.nbLayers-4,8)+1)+15},t}(),Dn=function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=null,i=new Y1(e.getBlackMatrix()),a=null,o=null;try{var s=i.detectMirror(!1);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new yi().decode(s)}catch(d){n=d}if(o==null)try{var s=i.detectMirror(!0);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new yi().decode(s)}catch(d){throw n??d}var l=new De(o.getText(),o.getRawBytes(),o.getNumBits(),a,F.AZTEC,te.currentTimeMillis()),u=o.getByteSegments();u!=null&&l.putMetadata(me.BYTE_SEGMENTS,u);var c=o.getECLevel();return c!=null&&l.putMetadata(me.ERROR_CORRECTION_LEVEL,c),l},t.prototype.reportFoundResultPoints=function(e,r){if(e!=null){var n=e.get(se.NEED_RESULT_POINT_CALLBACK);n!=null&&r.forEach(function(i,a,o){n.foundPossibleResultPoint(i)})}},t.prototype.reset=function(){},t}(),K1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){K1(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Dn,r)||this}return e})(Mt);var we=function(){function t(){}return t.prototype.decode=function(e,r){try{return this.doDecode(e,r)}catch{var n=r&&r.get(se.TRY_HARDER)===!0;if(n&&e.isRotateSupported()){var i=e.rotateCounterClockwise(),a=this.doDecode(i,r),o=a.getResultMetadata(),s=270;o!==null&&o.get(me.ORIENTATION)===!0&&(s=s+o.get(me.ORIENTATION)%360),a.putMetadata(me.ORIENTATION,s);var l=a.getResultPoints();if(l!==null)for(var u=i.getHeight(),c=0;c<l.length;c++)l[c]=new P(u-l[c].getY()-1,l[c].getX());return a}else throw new S}},t.prototype.reset=function(){},t.prototype.doDecode=function(e,r){var n=e.getWidth(),i=e.getHeight(),a=new ve(n),o=r&&r.get(se.TRY_HARDER)===!0,s=Math.max(1,i>>(o?8:5)),l;o?l=i:l=15;for(var u=Math.trunc(i/2),c=0;c<l;c++){var d=Math.trunc((c+1)/2),v=(c&1)===0,h=u+s*(v?d:-d);if(h<0||h>=i)break;try{a=e.getBlackRow(h,a)}catch{continue}for(var p=function(y){if(y===1&&(a.reverse(),r&&r.get(se.NEED_RESULT_POINT_CALLBACK)===!0)){var _=new Map;r.forEach(function(D,B){return _.set(B,D)}),_.delete(se.NEED_RESULT_POINT_CALLBACK),r=_}try{var A=g.decodeRow(h,a,r);if(y===1){A.putMetadata(me.ORIENTATION,180);var C=A.getResultPoints();C!==null&&(C[0]=new P(n-C[0].getX()-1,C[0].getY()),C[1]=new P(n-C[1].getX()-1,C[1].getY()))}return{value:A}}catch{}},g=this,m=0;m<2;m++){var w=p(m);if(typeof w=="object")return w.value}}throw new S},t.recordPattern=function(e,r,n){for(var i=n.length,a=0;a<i;a++)n[a]=0;var o=e.getSize();if(r>=o)throw new S;for(var s=!e.get(r),l=0,u=r;u<o;){if(e.get(u)!==s)n[l]++;else{if(++l===i)break;n[l]=1,s=!s}u++}if(!(l===i||l===i-1&&u===o))throw new S},t.recordPatternInReverse=function(e,r,n){for(var i=n.length,a=e.get(r);r>0&&i>=0;)e.get(--r)!==a&&(i--,a=!a);if(i>=0)throw new S;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return Number.POSITIVE_INFINITY;var l=a/o;n*=l;for(var u=0,c=0;c<i;c++){var d=e[c],v=r[c]*l,h=d>v?d-v:v-d;if(h>n)return Number.POSITIVE_INFINITY;u+=h}return u/a},t}(),Z1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wi=function(t){Z1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.findStartPattern=function(r){for(var n=r.getSize(),i=r.getNextSet(0),a=0,o=Int32Array.from([0,0,0,0,0,0]),s=i,l=!1,u=6,c=i;c<n;c++)if(r.get(c)!==l)o[a]++;else{if(a===u-1){for(var d=e.MAX_AVG_VARIANCE,v=-1,h=e.CODE_START_A;h<=e.CODE_START_C;h++){var p=we.patternMatchVariance(o,e.CODE_PATTERNS[h],e.MAX_INDIVIDUAL_VARIANCE);p<d&&(d=p,v=h)}if(v>=0&&r.isRange(Math.max(0,s-(c-s)/2),s,!1))return Int32Array.from([s,c,v]);s+=o[0]+o[1],o=o.slice(2,o.length-1),o[a-1]=0,o[a]=0,a--}else a++;o[a]=1,l=!l}throw new S},e.decodeCode=function(r,n,i){we.recordPattern(r,i,n);for(var a=e.MAX_AVG_VARIANCE,o=-1,s=0;s<e.CODE_PATTERNS.length;s++){var l=e.CODE_PATTERNS[s],u=this.patternMatchVariance(n,l,e.MAX_INDIVIDUAL_VARIANCE);u<a&&(a=u,o=s)}if(o>=0)return o;throw new S},e.prototype.decodeRow=function(r,n,i){var a=i&&i.get(se.ASSUME_GS1)===!0,o=e.findStartPattern(n),s=o[2],l=0,u=new Uint8Array(20);u[l++]=s;var c;switch(s){case e.CODE_START_A:c=e.CODE_CODE_A;break;case e.CODE_START_B:c=e.CODE_CODE_B;break;case e.CODE_START_C:c=e.CODE_CODE_C;break;default:throw new R}for(var d=!1,v=!1,h="",p=o[0],g=o[1],m=Int32Array.from([0,0,0,0,0,0]),w=0,y=0,_=s,A=0,C=!0,D=!1,B=!1;!d;){var k=v;switch(v=!1,w=y,y=e.decodeCode(n,m,g),u[l++]=y,y!==e.CODE_STOP&&(C=!0),y!==e.CODE_STOP&&(A++,_+=A*y),p=g,g+=m.reduce(function(Wr,Xr){return Wr+Xr},0),y){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new R}switch(c){case e.CODE_CODE_A:if(y<64)B===D?h+=String.fromCharCode(32+y):h+=String.fromCharCode(32+y+128),B=!1;else if(y<96)B===D?h+=String.fromCharCode(y-64):h+=String.fromCharCode(y+64),B=!1;else switch(y!==e.CODE_STOP&&(C=!1),y){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!D&&B?(D=!0,B=!1):D&&B?(D=!1,B=!1):B=!0;break;case e.CODE_SHIFT:v=!0,c=e.CODE_CODE_B;break;case e.CODE_CODE_B:c=e.CODE_CODE_B;break;case e.CODE_CODE_C:c=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_B:if(y<96)B===D?h+=String.fromCharCode(32+y):h+=String.fromCharCode(32+y+128),B=!1;else switch(y!==e.CODE_STOP&&(C=!1),y){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!D&&B?(D=!0,B=!1):D&&B?(D=!1,B=!1):B=!0;break;case e.CODE_SHIFT:v=!0,c=e.CODE_CODE_A;break;case e.CODE_CODE_A:c=e.CODE_CODE_A;break;case e.CODE_CODE_C:c=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_C:if(y<100)y<10&&(h+="0"),h+=y;else switch(y!==e.CODE_STOP&&(C=!1),y){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_CODE_A:c=e.CODE_CODE_A;break;case e.CODE_CODE_B:c=e.CODE_CODE_B;break;case e.CODE_STOP:d=!0;break}break}k&&(c=c===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var $=g-p;if(g=n.getNextUnset(g),!n.isRange(g,Math.min(n.getSize(),g+(g-p)/2),!1))throw new S;if(_-=A*w,_%103!==w)throw new ye;var L=h.length;if(L===0)throw new S;L>0&&C&&(c===e.CODE_CODE_C?h=h.substring(0,L-2):h=h.substring(0,L-1));for(var le=(o[1]+o[0])/2,G=p+$/2,ae=u.length,Re=new Uint8Array(ae),tt=0;tt<ae;tt++)Re[tt]=u[tt];var zr=[new P(le,r),new P(G,r)];return new De(h,Re,0,zr,F.CODE_128,new Date().getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(we),q1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),cn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_i=function(t){q1(e,t);function e(r,n){r===void 0&&(r=!1),n===void 0&&(n=!1);var i=t.call(this)||this;return i.usingCheckDigit=r,i.extendedMode=n,i.decodeRowResult="",i.counters=new Int32Array(9),i}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,u=this.counters;u.fill(0),this.decodeRowResult="";var c=e.findAsteriskPattern(n,u),d=n.getNextSet(c[1]),v=n.getSize(),h,p;do{e.recordPattern(n,d,u);var g=e.toNarrowWidePattern(u);if(g<0)throw new S;h=e.patternToChar(g),this.decodeRowResult+=h,p=d;try{for(var m=(a=void 0,cn(u)),w=m.next();!w.done;w=m.next()){var y=w.value;d+=y}}catch(ae){a={error:ae}}finally{try{w&&!w.done&&(o=m.return)&&o.call(m)}finally{if(a)throw a.error}}d=n.getNextSet(d)}while(h!=="*");this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var _=0;try{for(var A=cn(u),C=A.next();!C.done;C=A.next()){var y=C.value;_+=y}}catch(ae){s={error:ae}}finally{try{C&&!C.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}var D=d-p-_;if(d!==v&&D*2<_)throw new S;if(this.usingCheckDigit){for(var B=this.decodeRowResult.length-1,k=0,$=0;$<B;$++)k+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt($));if(this.decodeRowResult.charAt(B)!==e.ALPHABET_STRING.charAt(k%43))throw new ye;this.decodeRowResult=this.decodeRowResult.substring(0,B)}if(this.decodeRowResult.length===0)throw new S;var L;this.extendedMode?L=e.decodeExtended(this.decodeRowResult):L=this.decodeRowResult;var le=(c[1]+c[0])/2,G=p+_/2;return new De(L,null,0,[new P(le,r),new P(G,r)],F.CODE_39,new Date().getTime())},e.findAsteriskPattern=function(r,n){for(var i=r.getSize(),a=r.getNextSet(0),o=0,s=a,l=!1,u=n.length,c=a;c<i;c++)if(r.get(c)!==l)n[o]++;else{if(o===u-1){if(this.toNarrowWidePattern(n)===e.ASTERISK_ENCODING&&r.isRange(Math.max(0,s-Math.floor((c-s)/2)),s,!1))return[s,c];s+=n[0]+n[1],n.copyWithin(0,2,2+o-1),n[o-1]=0,n[o]=0,o--}else o++;n[o]=1,l=!l}throw new S},e.toNarrowWidePattern=function(r){var n,i,a=r.length,o=0,s;do{var l=2147483647;try{for(var u=(n=void 0,cn(r)),c=u.next();!c.done;c=u.next()){var d=c.value;d<l&&d>o&&(l=d)}}catch(g){n={error:g}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}o=l,s=0;for(var v=0,h=0,p=0;p<a;p++){var d=r[p];d>o&&(h|=1<<a-1-p,s++,v+=d)}if(s===3){for(var p=0;p<a&&s>0;p++){var d=r[p];if(d>o&&(s--,d*2>=v))return-1}return h}}while(s>3);return-1},e.patternToChar=function(r){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===r)return e.ALPHABET_STRING.charAt(n);if(r===e.ASTERISK_ENCODING)return"*";throw new S},e.decodeExtended=function(r){for(var n=r.length,i="",a=0;a<n;a++){var o=r.charAt(a);if(o==="+"||o==="$"||o==="%"||o==="/"){var s=r.charAt(a+1),l="\0";switch(o){case"+":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)+32);else throw new R;break;case"$":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)-64);else throw new R;break;case"%":if(s>="A"&&s<="E")l=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")l=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")l=String.fromCharCode(s.charCodeAt(0)+43);else if(s==="U")l="\0";else if(s==="V")l="@";else if(s==="W")l="`";else if(s==="X"||s==="Y"||s==="Z")l="";else throw new R;break;case"/":if(s>="A"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)-32);else if(s==="Z")l=":";else throw new R;break}i+=l,a++}else i+=o}return i},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(we),Q1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),J1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ei=function(t){Q1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.narrowLineWidth=-1,r}return e.prototype.decodeRow=function(r,n,i){var a,o,s=this.decodeStart(n),l=this.decodeEnd(n),u=new Q;e.decodeMiddle(n,s[1],l[0],u);var c=u.toString(),d=null;i!=null&&(d=i.get(se.ALLOWED_LENGTHS)),d==null&&(d=e.DEFAULT_ALLOWED_LENGTHS);var v=c.length,h=!1,p=0;try{for(var g=J1(d),m=g.next();!m.done;m=g.next()){var w=m.value;if(v===w){h=!0;break}w>p&&(p=w)}}catch(A){a={error:A}}finally{try{m&&!m.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}if(!h&&v>p&&(h=!0),!h)throw new R;var y=[new P(s[1],r),new P(l[0],r)],_=new De(c,null,0,y,F.ITF,new Date().getTime());return _},e.decodeMiddle=function(r,n,i,a){var o=new Int32Array(10),s=new Int32Array(5),l=new Int32Array(5);for(o.fill(0),s.fill(0),l.fill(0);n<i;){we.recordPattern(r,n,o);for(var u=0;u<5;u++){var c=2*u;s[u]=o[c],l[u]=o[c+1]}var d=e.decodeDigit(s);a.append(d.toString()),d=this.decodeDigit(l),a.append(d.toString()),o.forEach(function(v){n+=v})}},e.prototype.decodeStart=function(r){var n=e.skipWhiteSpace(r),i=e.findGuardPattern(r,n,e.START_PATTERN);return this.narrowLineWidth=(i[1]-i[0])/4,this.validateQuietZone(r,i[0]),i},e.prototype.validateQuietZone=function(r,n){var i=this.narrowLineWidth*10;i=i<n?i:n;for(var a=n-1;i>0&&a>=0&&!r.get(a);a--)i--;if(i!==0)throw new S},e.skipWhiteSpace=function(r){var n=r.getSize(),i=r.getNextSet(0);if(i===n)throw new S;return i},e.prototype.decodeEnd=function(r){r.reverse();try{var n=e.skipWhiteSpace(r),i=void 0;try{i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof S&&(i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(r,i[0]);var a=i[0];return i[0]=r.getSize()-i[1],i[1]=r.getSize()-a,i}finally{r.reverse()}},e.findGuardPattern=function(r,n,i){var a=i.length,o=new Int32Array(a),s=r.getSize(),l=!1,u=0,c=n;o.fill(0);for(var d=n;d<s;d++)if(r.get(d)!==l)o[u]++;else{if(u===a-1){if(we.patternMatchVariance(o,i,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,d];c+=o[0]+o[1],te.arraycopy(o,2,o,0,u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,l=!l}throw new S},e.decodeDigit=function(r){for(var n=e.MAX_AVG_VARIANCE,i=-1,a=e.PATTERNS.length,o=0;o<a;o++){var s=e.PATTERNS[o],l=we.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);l<n?(n=l,i=o):l===n&&(i=-1)}if(i>=0)return i%10;throw new S},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(we),eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rt=function(t){eu(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.decodeRowStringBuffer="",r}return e.findStartGuardPattern=function(r){for(var n=!1,i,a=0,o=Int32Array.from([0,0,0]);!n;){o=Int32Array.from([0,0,0]),i=e.findGuardPattern(r,a,!1,this.START_END_PATTERN,o);var s=i[0];a=i[1];var l=s-(a-s);l>=0&&(n=r.isRange(l,s,!1))}return i},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(r,n,i,a){return this.findGuardPattern(r,n,i,a,new Int32Array(a.length))},e.findGuardPattern=function(r,n,i,a,o){var s=r.getSize();n=i?r.getNextUnset(n):r.getNextSet(n);for(var l=0,u=n,c=a.length,d=i,v=n;v<s;v++)if(r.get(v)!==d)o[l]++;else{if(l===c-1){if(we.patternMatchVariance(o,a,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,v]);u+=o[0]+o[1];for(var h=o.slice(2,o.length-1),p=0;p<l-1;p++)o[p]=h[p];o[l-1]=0,o[l]=0,l--}else l++;o[l]=1,d=!d}throw new S},e.decodeDigit=function(r,n,i,a){this.recordPattern(r,i,n);for(var o=this.MAX_AVG_VARIANCE,s=-1,l=a.length,u=0;u<l;u++){var c=a[u],d=we.patternMatchVariance(n,c,e.MAX_INDIVIDUAL_VARIANCE);d<o&&(o=d,s=u)}if(s>=0)return s;throw new S},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(we),tu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ru=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new P((n[0]+n[1])/2,e),new P(a,e)],u=new De(o,null,0,l,F.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],u=0,c=0;c<5&&l<s;c++){var d=Rt.decodeDigit(e,o,l,Rt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var v=(i=void 0,tu(o)),h=v.next();!h.done;h=v.next()){var p=h.value;l+=p}}catch(m){i={error:m}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}d>=10&&(u|=1<<4-c),c!==4&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==5)throw new S;var g=this.determineCheckDigit(u);if(t.extensionChecksum(n.toString())!==g)throw new S;return l},t.extensionChecksum=function(e){for(var r=e.length,n=0,i=r-2;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;n*=3;for(var i=r-1;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;return n*=3,n%10},t.prototype.determineCheckDigit=function(e){for(var r=0;r<10;r++)if(e===this.CHECK_DIGIT_ENCODINGS[r])return r;throw new S},t.parseExtensionString=function(e){if(e.length!==5)return null;var r=t.parseExtension5String(e);return r==null?null:new Map([[me.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(e){var r;switch(e.charAt(0)){case"0":r="£";break;case"5":r="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}r="";break;default:r="";break}var n=parseInt(e.substring(1)),i=(n/100).toString(),a=n%100,o=a<10?"0"+a:a.toString();return r+i+"."+o},t}(),nu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iu=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new P((n[0]+n[1])/2,e),new P(a,e)],u=new De(o,null,0,l,F.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],u=0,c=0;c<2&&l<s;c++){var d=Rt.decodeDigit(e,o,l,Rt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var v=(i=void 0,nu(o)),h=v.next();!h.done;h=v.next()){var p=h.value;l+=p}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}d>=10&&(u|=1<<1-c),c!==1&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==2)throw new S;if(parseInt(n.toString())%4!==u)throw new S;return l},t.parseExtensionString=function(e){return e.length!==2?null:new Map([[me.ISSUE_NUMBER,parseInt(e)]])},t}(),au=function(){function t(){}return t.decodeRow=function(e,r,n){var i=Rt.findGuardPattern(r,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{var a=new ru;return a.decodeRow(e,r,i)}catch{var o=new iu;return o.decodeRow(e,r,i)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ce=function(t){ou(e,t);function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map(function(s){return Int32Array.from(s)});for(var n=10;n<20;n++){for(var i=e.L_PATTERNS[n-10],a=new Int32Array(i.length),o=0;o<i.length;o++)a[o]=i[i.length-o-1];e.L_AND_G_PATTERNS[n]=a}return r}return e.prototype.decodeRow=function(r,n,i){var a=e.findStartGuardPattern(n),o=i==null?null:i.get(se.NEED_RESULT_POINT_CALLBACK);if(o!=null){var s=new P((a[0]+a[1])/2,r);o.foundPossibleResultPoint(s)}var l=this.decodeMiddle(n,a,this.decodeRowStringBuffer),u=l.rowOffset,c=l.resultString;if(o!=null){var d=new P(u,r);o.foundPossibleResultPoint(d)}var v=e.decodeEnd(n,u);if(o!=null){var h=new P((v[0]+v[1])/2,r);o.foundPossibleResultPoint(h)}var p=v[1],g=p+(p-v[0]);if(g>=n.getSize()||!n.isRange(p,g,!1))throw new S;var m=c.toString();if(m.length<8)throw new R;if(!e.checkChecksum(m))throw new ye;var w=(a[1]+a[0])/2,y=(v[1]+v[0])/2,_=this.getBarcodeFormat(),A=[new P(w,r),new P(y,r)],C=new De(m,null,0,A,_,new Date().getTime()),D=0;try{var B=au.decodeRow(r,n,v[1]);C.putMetadata(me.UPC_EAN_EXTENSION,B.getText()),C.putAllMetadata(B.getResultMetadata()),C.addResultPoints(B.getResultPoints()),D=B.getText().length}catch{}var k=i==null?null:i.get(se.ALLOWED_EAN_EXTENSIONS);if(k!=null){var $=!1;for(var L in k)if(D.toString()===L){$=!0;break}if(!$)throw new S}return _===F.EAN_13||F.UPC_A,C},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(Rt),su=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ai=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bn=function(t){su(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=r.getSize(),d=n[1],v=0,h=0;h<6&&d<c;h++){var p=ce.decodeDigit(r,u,d,ce.L_AND_G_PATTERNS);i+=String.fromCharCode(48+p%10);try{for(var g=(a=void 0,Ai(u)),m=g.next();!m.done;m=g.next()){var w=m.value;d+=w}}catch(C){a={error:C}}finally{try{m&&!m.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}p>=10&&(v|=1<<5-h)}i=e.determineFirstDigit(i,v);var y=ce.findGuardPattern(r,d,!0,ce.MIDDLE_PATTERN,new Int32Array(ce.MIDDLE_PATTERN.length).fill(0));d=y[1];for(var h=0;h<6&&d<c;h++){var p=ce.decodeDigit(r,u,d,ce.L_PATTERNS);i+=String.fromCharCode(48+p);try{for(var _=(s=void 0,Ai(u)),A=_.next();!A.done;A=_.next()){var w=A.value;d+=w}}catch(B){s={error:B}}finally{try{A&&!A.done&&(l=_.return)&&l.call(_)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return F.EAN_13},e.determineFirstDigit=function(r,n){for(var i=0;i<10;i++)if(n===this.FIRST_DIGIT_ENCODINGS[i])return r=String.fromCharCode(48+i)+r,r;throw new S},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(ce),lu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ci=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bi=function(t){lu(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=r.getSize(),d=n[1],v=0;v<4&&d<c;v++){var h=ce.decodeDigit(r,u,d,ce.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var p=(a=void 0,Ci(u)),g=p.next();!g.done;g=p.next()){var m=g.value;d+=m}}catch(A){a={error:A}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(a)throw a.error}}}var w=ce.findGuardPattern(r,d,!0,ce.MIDDLE_PATTERN,new Int32Array(ce.MIDDLE_PATTERN.length).fill(0));d=w[1];for(var v=0;v<4&&d<c;v++){var h=ce.decodeDigit(r,u,d,ce.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var y=(s=void 0,Ci(u)),_=y.next();!_.done;_=y.next()){var m=_.value;d+=m}}catch(D){s={error:D}}finally{try{_&&!_.done&&(l=y.return)&&l.call(y)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return F.EAN_8},e}(ce),uu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Si=function(t){uu(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ean13Reader=new Bn,r}return e.prototype.getBarcodeFormat=function(){return F.UPC_A},e.prototype.decode=function(r,n){return this.maybeReturnResult(this.ean13Reader.decode(r))},e.prototype.decodeRow=function(r,n,i){return this.maybeReturnResult(this.ean13Reader.decodeRow(r,n,i))},e.prototype.decodeMiddle=function(r,n,i){return this.ean13Reader.decodeMiddle(r,n,i)},e.prototype.maybeReturnResult=function(r){var n=r.getText();if(n.charAt(0)==="0"){var i=new De(n.substring(1),null,null,r.getResultPoints(),F.UPC_A);return r.getResultMetadata()!=null&&i.putAllMetadata(r.getResultMetadata()),i}else throw new S},e.prototype.reset=function(){this.ean13Reader.reset()},e}(ce),fu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),cu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ii=function(t){fu(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=new Int32Array(4),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s=this.decodeMiddleCounters.map(function(m){return m});s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var l=r.getSize(),u=n[1],c=0,d=0;d<6&&u<l;d++){var v=e.decodeDigit(r,s,u,e.L_AND_G_PATTERNS);i+=String.fromCharCode(48+v%10);try{for(var h=(a=void 0,cu(s)),p=h.next();!p.done;p=h.next()){var g=p.value;u+=g}}catch(m){a={error:m}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}v>=10&&(c|=1<<5-d)}return e.determineNumSysAndCheckDigit(new Q(i),c),u},e.prototype.decodeEnd=function(r,n){return e.findGuardPatternWithoutCounters(r,n,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(r){return ce.checkChecksum(e.convertUPCEtoUPCA(r))},e.determineNumSysAndCheckDigit=function(r,n){for(var i=0;i<=1;i++)for(var a=0;a<10;a++)if(n===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[i][a]){r.insert(0,"0"+i),r.append("0"+a);return}throw S.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return F.UPC_E},e.convertUPCEtoUPCA=function(r){var n=r.slice(1,7).split("").map(function(o){return o.charCodeAt(0)}),i=new Q;i.append(r.charAt(0));var a=n[5];switch(a){case 0:case 1:case 2:i.appendChars(n,0,2),i.append(a),i.append("0000"),i.appendChars(n,2,3);break;case 3:i.appendChars(n,0,3),i.append("00000"),i.appendChars(n,3,2);break;case 4:i.appendChars(n,0,4),i.append("00000"),i.append(n[4]);break;default:i.appendChars(n,0,5),i.append("0000"),i.append(a);break}return r.length>=8&&i.append(r.charAt(7)),i.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(ce),du=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Oi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dn=function(t){du(e,t);function e(r){var n=t.call(this)||this,i=r==null?null:r.get(se.POSSIBLE_FORMATS),a=[];return i!=null&&(i.indexOf(F.EAN_13)>-1&&a.push(new Bn),i.indexOf(F.UPC_A)>-1&&a.push(new Si),i.indexOf(F.EAN_8)>-1&&a.push(new bi),i.indexOf(F.UPC_E)>-1&&a.push(new Ii)),a.length===0&&(a.push(new Bn),a.push(new Si),a.push(new bi),a.push(new Ii)),n.readers=a,n}return e.prototype.decodeRow=function(r,n,i){var a,o;try{for(var s=Oi(this.readers),l=s.next();!l.done;l=s.next()){var u=l.value;try{var c=u.decodeRow(r,n,i),d=c.getBarcodeFormat()===F.EAN_13&&c.getText().charAt(0)==="0",v=i==null?null:i.get(se.POSSIBLE_FORMATS),h=v==null||v.includes(F.UPC_A);if(d&&h){var p=c.getRawBytes(),g=new De(c.getText().substring(1),p,p?p.length:null,c.getResultPoints(),F.UPC_A);return g.putAllMetadata(c.getResultMetadata()),g}return c}catch{}}}catch(m){a={error:m}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(a)throw a.error}}throw new S},e.prototype.reset=function(){var r,n;try{for(var i=Oi(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;o.reset()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e}(we),hu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pt=function(t){hu(e,t);function e(){var r=t.call(this)||this;return r.decodeFinderCounters=new Int32Array(4),r.dataCharacterCounters=new Int32Array(8),r.oddRoundingErrors=new Array(4),r.evenRoundingErrors=new Array(4),r.oddCounts=new Array(r.dataCharacterCounters.length/2),r.evenCounts=new Array(r.dataCharacterCounters.length/2),r}return e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(r,n){for(var i=0;i<n.length;i++)if(we.patternMatchVariance(r,n[i],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return i;throw new S},e.count=function(r){return W.sum(new Int32Array(r))},e.increment=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]>a&&(a=n[o],i=o);r[i]++},e.decrement=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]<a&&(a=n[o],i=o);r[i]--},e.isFinderPattern=function(r){var n,i,a=r[0]+r[1],o=a+r[2]+r[3],s=a/o;if(s>=e.MIN_FINDER_PATTERN_RATIO&&s<=e.MAX_FINDER_PATTERN_RATIO){var l=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;try{for(var c=vu(r),d=c.next();!d.done;d=c.next()){var v=d.value;v>u&&(u=v),v<l&&(l=v)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return u<10*l}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(we),Rr=function(){function t(e,r){this.value=e,this.checksumPortion=r}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),da=function(){function t(e,r,n,i,a){this.value=e,this.startEnd=r,this.value=e,this.startEnd=r,this.resultPoints=new Array,this.resultPoints.push(new P(n,a)),this.resultPoints.push(new P(i,a))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),pu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},At=function(){function t(){}return t.getRSSvalue=function(e,r,n){var i,a,o=0;try{for(var s=pu(e),l=s.next();!l.done;l=s.next()){var u=l.value;o+=u}}catch(y){i={error:y}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}for(var c=0,d=0,v=e.length,h=0;h<v-1;h++){var p=void 0;for(p=1,d|=1<<h;p<e[h];p++,d&=~(1<<h)){var g=t.combins(o-p-1,v-h-2);if(n&&d===0&&o-p-(v-h-1)>=v-h-1&&(g-=t.combins(o-p-(v-h),v-h-2)),v-h-1>1){for(var m=0,w=o-p-(v-h-2);w>r;w--)m+=t.combins(o-p-w-1,v-h-3);g-=m*(v-1-h)}else o-p>r&&g--;c+=g}o-=p}return c},t.combins=function(e,r){var n,i;e-r>r?(i=r,n=e-r):(i=e-r,n=r);for(var a=1,o=1,s=e;s>n;s--)a*=s,o<=i&&(a/=o,o++);for(;o<=i;)a/=o,o++;return a},t}(),gu=function(){function t(){}return t.buildBitArray=function(e){var r=e.length*2-1;e[e.length-1].getRightChar()==null&&(r-=1);for(var n=12*r,i=new ve(n),a=0,o=e[0],s=o.getRightChar().getValue(),l=11;l>=0;--l)(s&1<<l)!=0&&i.set(a),a++;for(var l=1;l<e.length;++l){for(var u=e[l],c=u.getLeftChar().getValue(),d=11;d>=0;--d)(c&1<<d)!=0&&i.set(a),a++;if(u.getRightChar()!=null)for(var v=u.getRightChar().getValue(),d=11;d>=0;--d)(v&1<<d)!=0&&i.set(a),a++}return i},t}(),ht=function(){function t(e,r){r?this.decodedInformation=null:(this.finished=e,this.decodedInformation=r)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Yn=function(){function t(e){this.newPosition=e}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),xu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Le=function(t){xu(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=n,i}return e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Yn),yu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vt=function(t){yu(e,t);function e(r,n,i){var a=t.call(this,r)||this;return i?(a.remaining=!0,a.remainingValue=a.remainingValue):(a.remaining=!1,a.remainingValue=0),a.newString=n,a}return e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Yn),mu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_t=function(t){mu(e,t);function e(r,n,i){var a=t.call(this,r)||this;if(n<0||n>10||i<0||i>10)throw new R;return a.firstDigit=n,a.secondDigit=i,a}return e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return this.firstDigit*10+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Yn),xr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wu=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,i,a,o,s,l,u;if(!e)return null;if(e.length<2)throw new S;var c=e.substring(0,2);try{for(var d=xr(t.TWO_DIGIT_DATA_LENGTH),v=d.next();!v.done;v=d.next()){var h=v.value;if(h[0]===c)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,h[2],e):t.processFixedAI(2,h[1],e)}}catch(D){r={error:D}}finally{try{v&&!v.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new S;var p=e.substring(0,3);try{for(var g=xr(t.THREE_DIGIT_DATA_LENGTH),m=g.next();!m.done;m=g.next()){var h=m.value;if(h[0]===p)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,h[2],e):t.processFixedAI(3,h[1],e)}}catch(D){i={error:D}}finally{try{m&&!m.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}try{for(var w=xr(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=w.next();!y.done;y=w.next()){var h=y.value;if(h[0]===p)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(D){o={error:D}}finally{try{y&&!y.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}if(e.length<4)throw new S;var _=e.substring(0,4);try{for(var A=xr(t.FOUR_DIGIT_DATA_LENGTH),C=A.next();!C.done;C=A.next()){var h=C.value;if(h[0]===_)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(D){l={error:D}}finally{try{C&&!C.done&&(u=A.return)&&u.call(A)}finally{if(l)throw l.error}}throw new S},t.processFixedAI=function(e,r,n){if(n.length<e)throw new S;var i=n.substring(0,e);if(n.length<e+r)throw new S;var a=n.substring(e,e+r),o=n.substring(e+r),s="("+i+")"+a,l=t.parseFieldsInGeneralPurpose(o);return l==null?s:s+l},t.processVariableAI=function(e,r,n){var i=n.substring(0,e),a;n.length<e+r?a=n.length:a=e+r;var o=n.substring(e,a),s=n.substring(a),l="("+i+")"+o,u=t.parseFieldsInGeneralPurpose(s);return u==null?l:l+u},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),Ir=function(){function t(e){this.buffer=new Q,this.information=e}return t.prototype.decodeAllCodes=function(e,r){var n=r,i=null;do{var a=this.decodeGeneralPurposeField(n,i),o=wu.parseFieldsInGeneralPurpose(a.getNewString());if(o!=null&&e.append(o),a.isRemaining()?i=""+a.getRemainingValue():i=null,n===a.getNewPosition())break;n=a.getNewPosition()}while(!0);return e.toString()},t.prototype.isStillNumeric=function(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(var r=e;r<e+3;++r)if(this.information.get(r))return!0;return this.information.get(e+3)},t.prototype.decodeNumeric=function(e){if(e+7>this.information.getSize()){var r=this.extractNumericValueFromBitArray(e,4);return r===0?new _t(this.information.getSize(),_t.FNC1,_t.FNC1):new _t(this.information.getSize(),r-1,_t.FNC1)}var n=this.extractNumericValueFromBitArray(e,7),i=(n-8)/11,a=(n-8)%11;return new _t(e+7,i,a)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(e,r,n){for(var i=0,a=0;a<n;++a)e.get(r+a)&&(i|=1<<n-a-1);return i},t.prototype.decodeGeneralPurposeField=function(e,r){this.buffer.setLengthToZero(),r!=null&&this.buffer.append(r),this.current.setPosition(e);var n=this.parseBlocks();return n!=null&&n.isRemaining()?new vt(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new vt(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var e,r;do{var n=this.current.getPosition();this.current.isAlpha()?(r=this.parseAlphaBlock(),e=r.isFinished()):this.current.isIsoIec646()?(r=this.parseIsoIec646Block(),e=r.isFinished()):(r=this.parseNumericBlock(),e=r.isFinished());var i=n!==this.current.getPosition();if(!i&&!e)break}while(!e);return r.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var e=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFirstDigitFNC1()){var r=void 0;return e.isSecondDigitFNC1()?r=new vt(this.current.getPosition(),this.buffer.toString()):r=new vt(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new ht(!0,r)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1()){var r=new vt(this.current.getPosition(),this.buffer.toString());return new ht(!0,r)}this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new ht(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var e=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new vt(this.current.getPosition(),this.buffer.toString());return new ht(!0,r)}this.buffer.append(e.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 ht(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var e=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new vt(this.current.getPosition(),this.buffer.toString());return new ht(!0,r)}this.buffer.append(e.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 ht(!1)},t.prototype.isStillIsoIec646=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<116)return!0;if(e+8>this.information.getSize())return!1;var i=this.extractNumericValueFromBitArray(e,8);return i>=232&&i<253},t.prototype.decodeIsoIec646=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new Le(e+7,""+(n+1));if(n>=90&&n<116)return new Le(e+7,""+(n+7));var i=this.extractNumericValueFromBitArray(e,8),a;switch(i){case 232:a="!";break;case 233:a='"';break;case 234:a="%";break;case 235:a="&";break;case 236:a="'";break;case 237:a="(";break;case 238:a=")";break;case 239:a="*";break;case 240:a="+";break;case 241:a=",";break;case 242:a="-";break;case 243:a=".";break;case 244:a="/";break;case 245:a=":";break;case 246:a=";";break;case 247:a="<";break;case 248:a="=";break;case 249:a=">";break;case 250:a="?";break;case 251:a="_";break;case 252:a=" ";break;default:throw new R}return new Le(e+8,a)},t.prototype.isStillAlpha=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+6>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,6);return n>=16&&n<63},t.prototype.decodeAlphanumeric=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new Le(e+6,""+(n+33));var i;switch(n){case 58:i="*";break;case 59:i=",";break;case 60:i="-";break;case 61:i=".";break;case 62:i="/";break;default:throw new fr("Decoding invalid alphanumeric value: "+n)}return new Le(e+6,i)},t.prototype.isAlphaTo646ToAlphaLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<5&&r+e<this.information.getSize();++r)if(r===2){if(!this.information.get(e+2))return!1}else if(this.information.get(e+r))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(e){if(e+3>this.information.getSize())return!1;for(var r=e;r<e+3;++r)if(this.information.get(r))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<4&&r+e<this.information.getSize();++r)if(this.information.get(e+r))return!1;return!0},t}(),ha=function(){function t(e){this.information=e,this.generalDecoder=new Ir(e)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),_u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ue=function(t){_u(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedGtin=function(r,n){r.append("(01)");var i=r.length();r.append("9"),this.encodeCompressedGtinWithoutAI(r,n,i)},e.prototype.encodeCompressedGtinWithoutAI=function(r,n,i){for(var a=0;a<4;++a){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*a,10);o/100===0&&r.append("0"),o/10===0&&r.append("0"),r.append(o)}e.appendCheckDigit(r,i)},e.appendCheckDigit=function(r,n){for(var i=0,a=0;a<13;a++){var o=r.charAt(a+n).charCodeAt(0)-48;i+=(a&1)===0?3*o:o}i=10-i%10,i===10&&(i=0),r.append(i)},e.GTIN_SIZE=40,e}(ha),Eu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Au=function(t){Eu(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new Q;r.append("(01)");var n=r.length(),i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return r.append(i),this.encodeCompressedGtinWithoutAI(r,e.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(Ue),Cu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),bu=function(t){Cu(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new Q;return this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(ha),Su=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Or=function(t){Su(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedWeight=function(r,n,i){var a=this.getGeneralDecoder().extractNumericValueFromBitArray(n,i);this.addWeightCode(r,a);for(var o=this.checkWeight(a),s=1e5,l=0;l<5;++l)o/s===0&&r.append("0"),s/=10;r.append(o)},e}(Ue),Iu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),va=function(t){Iu(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+Or.GTIN_SIZE+e.WEIGHT_SIZE)throw new S;var r=new Q;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+Or.GTIN_SIZE,e.WEIGHT_SIZE),r.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(Or),Ou=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tu=function(t){Ou(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){r.append("(3103)")},e.prototype.checkWeight=function(r){return r},e}(va),Nu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Du=function(t){Nu(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){n<1e4?r.append("(3202)"):r.append("(3203)")},e.prototype.checkWeight=function(r){return r<1e4?r:r-1e4},e}(va),Bu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ru=function(t){Bu(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new S;var r=new Q;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(392"),r.append(n),r.append(")");var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return r.append(i.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(Ue),Pu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ku=function(t){Pu(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new S;var r=new Q;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(393"),r.append(n),r.append(")");var i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);i/100==0&&r.append("0"),i/10==0&&r.append("0"),r.append(i);var a=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return r.append(a.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(Ue),Mu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),nt=function(t){Mu(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.dateCode=i,a.firstAIdigits=n,a}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new S;var r=new Q;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(r,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),r.toString()},e.prototype.encodeCompressedDate=function(r,n){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n,e.DATE_SIZE);if(i!=38400){r.append("("),r.append(this.dateCode),r.append(")");var a=i%32;i/=32;var o=i%12+1;i/=12;var s=i;s/10==0&&r.append("0"),r.append(s),o/10==0&&r.append("0"),r.append(o),a/10==0&&r.append("0"),r.append(a)}},e.prototype.addWeightCode=function(r,n){r.append("("),r.append(this.firstAIdigits),r.append(n/1e5),r.append(")")},e.prototype.checkWeight=function(r){return r%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(Or);function Lu(t){try{if(t.get(1))return new Au(t);if(!t.get(2))return new bu(t);var e=Ir.extractNumericValueFromBitArray(t,1,4);switch(e){case 4:return new Tu(t);case 5:return new Du(t)}var r=Ir.extractNumericValueFromBitArray(t,1,5);switch(r){case 12:return new Ru(t);case 13:return new ku(t)}var n=Ir.extractNumericValueFromBitArray(t,1,7);switch(n){case 56:return new nt(t,"310","11");case 57:return new nt(t,"320","11");case 58:return new nt(t,"310","13");case 59:return new nt(t,"320","13");case 60:return new nt(t,"310","15");case 61:return new nt(t,"320","15");case 62:return new nt(t,"310","17");case 63:return new nt(t,"320","17")}}catch(i){throw console.log(i),new fr("unknown decoder: "+t)}}var Ti=function(){function t(e,r,n,i){this.leftchar=e,this.rightchar=r,this.finderpattern=n,this.maybeLast=i}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return this.rightchar==null},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(this.finderpattern==null?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t?t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern):!1},t.equalsOrNull=function(e,r){return e===null?r===null:t.equals(e,r)},t.prototype.hashCode=function(){var e=this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue();return e},t}(),Fu=function(){function t(e,r,n){this.pairs=e,this.rowNumber=r,this.wasReversed=n}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(e){return this.checkEqualitity(this,e)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t?this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed:!1},t.prototype.checkEqualitity=function(e,r){if(!(!e||!r)){var n;return e.forEach(function(i,a){r.forEach(function(o){i.getLeftChar().getValue()===o.getLeftChar().getValue()&&i.getRightChar().getValue()===o.getRightChar().getValue()&&i.getFinderPatter().getValue()===o.getFinderPatter().getValue()&&(n=!0)})}),n}},t}(),Vu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),it=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uu=function(t){Vu(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return e.prototype.decodeRow=function(r,n,i){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(r,n))}catch{}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(r,n))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(r,n){for(var i=!1;!i;)try{this.pairs.push(this.retrieveNextPair(n,this.pairs,r))}catch(s){if(s instanceof S){if(!this.pairs.length)throw new S;i=!0}}if(this.checkChecksum())return this.pairs;var a;if(this.rows.length?a=!0:a=!1,this.storeRow(r,!1),a){var o=this.checkRowsBoolean(!1);if(o!=null||(o=this.checkRowsBoolean(!0),o!=null))return o}throw new S},e.prototype.checkRowsBoolean=function(r){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,r&&(this.rows=this.rows.reverse());var n=null;try{n=this.checkRows(new Array,0)}catch(i){console.log(i)}return r&&(this.rows=this.rows.reverse()),n},e.prototype.checkRows=function(r,n){for(var i,a,o=n;o<this.rows.length;o++){var s=this.rows[o];this.pairs.length=0;try{for(var l=(i=void 0,it(r)),u=l.next();!u.done;u=l.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(v){i={error:v}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}if(this.pairs.push(s.getPairs()),!!e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var d=new Array(r);d.push(s);try{return this.checkRows(d,o+1)}catch(v){console.log(v)}}}throw new S},e.isValidSequence=function(r){var n,i;try{for(var a=it(e.FINDER_PATTERN_SEQUENCES),o=a.next();!o.done;o=a.next()){var s=o.value;if(!(r.length>s.length)){for(var l=!0,u=0;u<r.length;u++)if(r[u].getFinderPattern().getValue()!=s[u]){l=!1;break}if(l)return!0}}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!1},e.prototype.storeRow=function(r,n){for(var i=0,a=!1,o=!1;i<this.rows.length;){var s=this.rows[i];if(s.getRowNumber()>r){o=s.isEquivalent(this.pairs);break}a=s.isEquivalent(this.pairs),i++}o||a||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(i,new Fu(this.pairs,r,n)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(r,n){var i,a,o,s,l,u;try{for(var c=it(n),d=c.next();!d.done;d=c.next()){var v=d.value;if(v.getPairs().length!==r.length){var h=!0;try{for(var p=(o=void 0,it(v.getPairs())),g=p.next();!g.done;g=p.next()){var m=g.value,w=!1;try{for(var y=(l=void 0,it(r)),_=y.next();!_.done;_=y.next()){var A=_.value;if(Ti.equals(m,A)){w=!0;break}}}catch(C){l={error:C}}finally{try{_&&!_.done&&(u=y.return)&&u.call(y)}finally{if(l)throw l.error}}w||(h=!1)}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}}}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}},e.isPartialRow=function(r,n){var i,a,o,s,l,u;try{for(var c=it(n),d=c.next();!d.done;d=c.next()){var v=d.value,h=!0;try{for(var p=(o=void 0,it(r)),g=p.next();!g.done;g=p.next()){var m=g.value,w=!1;try{for(var y=(l=void 0,it(v.getPairs())),_=y.next();!_.done;_=y.next()){var A=_.value;if(m.equals(A)){w=!0;break}}}catch(C){l={error:C}}finally{try{_&&!_.done&&(u=y.return)&&u.call(y)}finally{if(l)throw l.error}}if(!w){h=!1;break}}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}if(h)return!0}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(r){var n=gu.buildBitArray(r),i=Lu(n),a=i.parseInformation(),o=r[0].getFinderPattern().getResultPoints(),s=r[r.length-1].getFinderPattern().getResultPoints(),l=[o[0],o[1],s[0],s[1]];return new De(a,null,null,l,F.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var r=this.pairs.get(0),n=r.getLeftChar(),i=r.getRightChar();if(i==null)return!1;for(var a=i.getChecksumPortion(),o=2,s=1;s<this.pairs.size();++s){var l=this.pairs.get(s);a+=l.getLeftChar().getChecksumPortion(),o++;var u=l.getRightChar();u!=null&&(a+=u.getChecksumPortion(),o++)}a%=211;var c=211*(o-4)+a;return c==n.getValue()},e.getNextSecondBar=function(r,n){var i;return r.get(n)?(i=r.getNextUnset(n),i=r.getNextSet(i)):(i=r.getNextSet(n),i=r.getNextUnset(i)),i},e.prototype.retrieveNextPair=function(r,n,i){var a=n.length%2==0;this.startFromEven&&(a=!a);var o,s=!0,l=-1;do this.findNextPair(r,n,l),o=this.parseFoundFinderPattern(r,i,a),o==null?l=e.getNextSecondBar(r,this.startEnd[0]):s=!1;while(s);var u=this.decodeDataCharacter(r,o,a,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new S;var c;try{c=this.decodeDataCharacter(r,o,a,!1)}catch(d){c=null,console.log(d)}return new Ti(u,c,o,!0)},e.prototype.isEmptyPair=function(r){return r.length===0},e.prototype.findNextPair=function(r,n,i){var a=this.getDecodeFinderCounters();a[0]=0,a[1]=0,a[2]=0,a[3]=0;var o=r.getSize(),s;if(i>=0)s=i;else if(this.isEmptyPair(n))s=0;else{var l=n[n.length-1];s=l.getFinderPattern().getStartEnd()[1]}var u=n.length%2!=0;this.startFromEven&&(u=!u);for(var c=!1;s<o&&(c=!r.get(s),!!c);)s++;for(var d=0,v=s,h=s;h<o;h++)if(r.get(h)!=c)a[d]++;else{if(d==3){if(u&&e.reverseCounters(a),e.isFinderPattern(a)){this.startEnd[0]=v,this.startEnd[1]=h;return}u&&e.reverseCounters(a),v+=a[0]+a[1],a[0]=a[2],a[1]=a[3],a[2]=0,a[3]=0,d--}else d++;a[d]=1,c=!c}throw new S},e.reverseCounters=function(r){for(var n=r.length,i=0;i<n/2;++i){var a=r[i];r[i]=r[n-i-1],r[n-i-1]=a}},e.prototype.parseFoundFinderPattern=function(r,n,i){var a,o,s;if(i){for(var l=this.startEnd[0]-1;l>=0&&!r.get(l);)l--;l++,a=this.startEnd[0]-l,o=l,s=this.startEnd[1]}else o=this.startEnd[0],s=r.getNextUnset(this.startEnd[1]+1),a=s-this.startEnd[1];var u=this.getDecodeFinderCounters();te.arraycopy(u,0,u,1,u.length-1),u[0]=a;var c;try{c=this.parseFinderValue(u,e.FINDER_PATTERNS)}catch{return null}return new da(c,[o,s],o,s,n)},e.prototype.decodeDataCharacter=function(r,n,i,a){for(var o=this.getDataCharacterCounters(),s=0;s<o.length;s++)o[s]=0;if(a)e.recordPatternInReverse(r,n.getStartEnd()[0],o);else{e.recordPattern(r,n.getStartEnd()[1],o);for(var l=0,u=o.length-1;l<u;l++,u--){var c=o[l];o[l]=o[u],o[u]=c}}var d=17,v=W.sum(new Int32Array(o))/d,h=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(v-h)/h>.3)throw new S;for(var p=this.getOddCounts(),g=this.getEvenCounts(),m=this.getOddRoundingErrors(),w=this.getEvenRoundingErrors(),l=0;l<o.length;l++){var y=1*o[l]/v,_=y+.5;if(_<1){if(y<.3)throw new S;_=1}else if(_>8){if(y>8.7)throw new S;_=8}var A=l/2;(l&1)==0?(p[A]=_,m[A]=y-_):(g[A]=_,w[A]=y-_)}this.adjustOddEvenCounts(d);for(var C=4*n.getValue()+(i?0:2)+(a?0:1)-1,D=0,B=0,l=p.length-1;l>=0;l--){if(e.isNotA1left(n,i,a)){var k=e.WEIGHTS[C][2*l];B+=p[l]*k}D+=p[l]}for(var $=0,l=g.length-1;l>=0;l--)if(e.isNotA1left(n,i,a)){var k=e.WEIGHTS[C][2*l+1];$+=g[l]*k}var L=B+$;if((D&1)!=0||D>13||D<4)throw new S;var le=(13-D)/2,G=e.SYMBOL_WIDEST[le],ae=9-G,Re=At.getRSSvalue(p,G,!0),tt=At.getRSSvalue(g,ae,!1),zr=e.EVEN_TOTAL_SUBSET[le],Wr=e.GSUM[le],Xr=Re*zr+tt+Wr;return new Rr(Xr,L)},e.isNotA1left=function(r,n,i){return!(r.getValue()==0&&n&&i)},e.prototype.adjustOddEvenCounts=function(r){var n=W.sum(new Int32Array(this.getOddCounts())),i=W.sum(new Int32Array(this.getEvenCounts())),a=!1,o=!1;n>13?o=!0:n<4&&(a=!0);var s=!1,l=!1;i>13?l=!0:i<4&&(s=!0);var u=n+i-r,c=(n&1)==1,d=(i&1)==0;if(u==1)if(c){if(d)throw new S;o=!0}else{if(!d)throw new S;l=!0}else if(u==-1)if(c){if(d)throw new S;a=!0}else{if(!d)throw new S;s=!0}else if(u==0){if(c){if(!d)throw new S;n<i?(a=!0,l=!0):(o=!0,s=!0)}else if(d)throw new S}else throw new S;if(a){if(o)throw new S;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(o&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(l)throw new S;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}l&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(pt),$u=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hu=function(t){$u(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.count=0,a.finderPattern=i,a}return e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Rr),Gu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ni=function(t){Gu(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.possibleLeftPairs=[],r.possibleRightPairs=[],r}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,u=this.decodePair(n,!1,r,i);e.addOrTally(this.possibleLeftPairs,u),n.reverse();var c=this.decodePair(n,!0,r,i);e.addOrTally(this.possibleRightPairs,c),n.reverse();try{for(var d=hn(this.possibleLeftPairs),v=d.next();!v.done;v=d.next()){var h=v.value;if(h.getCount()>1)try{for(var p=(s=void 0,hn(this.possibleRightPairs)),g=p.next();!g.done;g=p.next()){var m=g.value;if(m.getCount()>1&&e.checkChecksum(h,m))return e.constructResult(h,m)}}catch(w){s={error:w}}finally{try{g&&!g.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}}}catch(w){a={error:w}}finally{try{v&&!v.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}throw new S},e.addOrTally=function(r,n){var i,a;if(n!=null){var o=!1;try{for(var s=hn(r),l=s.next();!l.done;l=s.next()){var u=l.value;if(u.getValue()===n.getValue()){u.incrementCount(),o=!0;break}}}catch(c){i={error:c}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}o||r.push(n)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(r,n){for(var i=4537077*r.getValue()+n.getValue(),a=new String(i).toString(),o=new Q,s=13-a.length;s>0;s--)o.append("0");o.append(a);for(var l=0,s=0;s<13;s++){var u=o.charAt(s).charCodeAt(0)-48;l+=(s&1)===0?3*u:u}l=10-l%10,l===10&&(l=0),o.append(l.toString());var c=r.getFinderPattern().getResultPoints(),d=n.getFinderPattern().getResultPoints();return new De(o.toString(),null,0,[c[0],c[1],d[0],d[1]],F.RSS_14,new Date().getTime())},e.checkChecksum=function(r,n){var i=(r.getChecksumPortion()+16*n.getChecksumPortion())%79,a=9*r.getFinderPattern().getValue()+n.getFinderPattern().getValue();return a>72&&a--,a>8&&a--,i===a},e.prototype.decodePair=function(r,n,i,a){try{var o=this.findFinderPattern(r,n),s=this.parseFoundFinderPattern(r,i,n,o),l=a==null?null:a.get(se.NEED_RESULT_POINT_CALLBACK);if(l!=null){var u=(o[0]+o[1])/2;n&&(u=r.getSize()-1-u),l.foundPossibleResultPoint(new P(u,i))}var c=this.decodeDataCharacter(r,s,!0),d=this.decodeDataCharacter(r,s,!1);return new Hu(1597*c.getValue()+d.getValue(),c.getChecksumPortion()+4*d.getChecksumPortion(),s)}catch{return null}},e.prototype.decodeDataCharacter=function(r,n,i){for(var a=this.getDataCharacterCounters(),o=0;o<a.length;o++)a[o]=0;if(i)we.recordPatternInReverse(r,n.getStartEnd()[0],a);else{we.recordPattern(r,n.getStartEnd()[1]+1,a);for(var s=0,l=a.length-1;s<l;s++,l--){var u=a[s];a[s]=a[l],a[l]=u}}for(var c=i?16:15,d=W.sum(new Int32Array(a))/c,v=this.getOddCounts(),h=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors(),s=0;s<a.length;s++){var m=a[s]/d,w=Math.floor(m+.5);w<1?w=1:w>8&&(w=8);var y=Math.floor(s/2);(s&1)===0?(v[y]=w,p[y]=m-w):(h[y]=w,g[y]=m-w)}this.adjustOddEvenCounts(i,c);for(var _=0,A=0,s=v.length-1;s>=0;s--)A*=9,A+=v[s],_+=v[s];for(var C=0,D=0,s=h.length-1;s>=0;s--)C*=9,C+=h[s],D+=h[s];var B=A+3*C;if(i){if((_&1)!==0||_>12||_<4)throw new S;var k=(12-_)/2,$=e.OUTSIDE_ODD_WIDEST[k],L=9-$,le=At.getRSSvalue(v,$,!1),G=At.getRSSvalue(h,L,!0),ae=e.OUTSIDE_EVEN_TOTAL_SUBSET[k],Re=e.OUTSIDE_GSUM[k];return new Rr(le*ae+G+Re,B)}else{if((D&1)!==0||D>10||D<4)throw new S;var k=(10-D)/2,$=e.INSIDE_ODD_WIDEST[k],L=9-$,le=At.getRSSvalue(v,$,!0),G=At.getRSSvalue(h,L,!1),tt=e.INSIDE_ODD_TOTAL_SUBSET[k],Re=e.INSIDE_GSUM[k];return new Rr(G*tt+le+Re,B)}},e.prototype.findFinderPattern=function(r,n){var i=this.getDecodeFinderCounters();i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=r.getSize(),o=!1,s=0;s<a&&(o=!r.get(s),n!==o);)s++;for(var l=0,u=s,c=s;c<a;c++)if(r.get(c)!==o)i[l]++;else{if(l===3){if(pt.isFinderPattern(i))return[u,c];u+=i[0]+i[1],i[0]=i[2],i[1]=i[3],i[2]=0,i[3]=0,l--}else l++;i[l]=1,o=!o}throw new S},e.prototype.parseFoundFinderPattern=function(r,n,i,a){for(var o=r.get(a[0]),s=a[0]-1;s>=0&&o!==r.get(s);)s--;s++;var l=a[0]-s,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);te.arraycopy(u,0,c,1,u.length-1),c[0]=l;var d=this.parseFinderValue(c,e.FINDER_PATTERNS),v=s,h=a[1];return i&&(v=r.getSize()-1-v,h=r.getSize()-1-h),new da(d,[s,a[1]],v,h,n)},e.prototype.adjustOddEvenCounts=function(r,n){var i=W.sum(new Int32Array(this.getOddCounts())),a=W.sum(new Int32Array(this.getEvenCounts())),o=!1,s=!1,l=!1,u=!1;r?(i>12?s=!0:i<4&&(o=!0),a>12?u=!0:a<4&&(l=!0)):(i>11?s=!0:i<5&&(o=!0),a>10?u=!0:a<4&&(l=!0));var c=i+a-n,d=(i&1)===(r?1:0),v=(a&1)===1;if(c===1)if(d){if(v)throw new S;s=!0}else{if(!v)throw new S;u=!0}else if(c===-1)if(d){if(v)throw new S;o=!0}else{if(!v)throw new S;l=!0}else if(c===0){if(d){if(!v)throw new S;i<a?(o=!0,u=!0):(s=!0,l=!0)}else if(v)throw new S}else throw new S;if(o){if(s)throw new S;pt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&pt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),l){if(u)throw new S;pt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}u&&pt.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(pt),zu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(t){zu(e,t);function e(r){var n=t.call(this)||this;n.readers=[];var i=r?r.get(se.POSSIBLE_FORMATS):null,a=r&&r.get(se.ASSUME_CODE_39_CHECK_DIGIT)!==void 0;return i&&((i.includes(F.EAN_13)||i.includes(F.UPC_A)||i.includes(F.EAN_8)||i.includes(F.UPC_E))&&n.readers.push(new dn(r)),i.includes(F.CODE_39)&&n.readers.push(new _i(a)),i.includes(F.CODE_128)&&n.readers.push(new wi),i.includes(F.ITF)&&n.readers.push(new Ei),i.includes(F.RSS_14)&&n.readers.push(new Ni),i.includes(F.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new Uu))),n.readers.length===0&&(n.readers.push(new dn(r)),n.readers.push(new _i),n.readers.push(new dn(r)),n.readers.push(new wi),n.readers.push(new Ei),n.readers.push(new Ni)),n}return e.prototype.decodeRow=function(r,n,i){for(var a=0;a<this.readers.length;a++)try{return this.readers[a].decodeRow(r,n,i)}catch{}throw new S},e.prototype.reset=function(){this.readers.forEach(function(r){return r.reset()})},e}(we),Wu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){Wu(e,t);function e(r,n){return r===void 0&&(r=500),t.call(this,new Jt(n),r,n)||this}return e})(Mt);var Di=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},j=function(){function t(e,r,n){this.ecCodewords=e,this.ecBlocks=[r],n&&this.ecBlocks.push(n)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),X=function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Xu=function(){function t(e,r,n,i,a,o){var s,l;this.versionNumber=e,this.symbolSizeRows=r,this.symbolSizeColumns=n,this.dataRegionSizeRows=i,this.dataRegionSizeColumns=a,this.ecBlocks=o;var u=0,c=o.getECCodewords(),d=o.getECBlocks();try{for(var v=Di(d),h=v.next();!h.done;h=v.next()){var p=h.value;u+=p.getCount()*(p.getDataCodewords()+c)}}catch(g){s={error:g}}finally{try{h&&!h.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,i;if((e&1)!==0||(r&1)!==0)throw new R;try{for(var a=Di(t.VERSIONS),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}throw new R},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new j(5,new X(1,3))),new t(2,12,12,10,10,new j(7,new X(1,5))),new t(3,14,14,12,12,new j(10,new X(1,8))),new t(4,16,16,14,14,new j(12,new X(1,12))),new t(5,18,18,16,16,new j(14,new X(1,18))),new t(6,20,20,18,18,new j(18,new X(1,22))),new t(7,22,22,20,20,new j(20,new X(1,30))),new t(8,24,24,22,22,new j(24,new X(1,36))),new t(9,26,26,24,24,new j(28,new X(1,44))),new t(10,32,32,14,14,new j(36,new X(1,62))),new t(11,36,36,16,16,new j(42,new X(1,86))),new t(12,40,40,18,18,new j(48,new X(1,114))),new t(13,44,44,20,20,new j(56,new X(1,144))),new t(14,48,48,22,22,new j(68,new X(1,174))),new t(15,52,52,24,24,new j(42,new X(2,102))),new t(16,64,64,14,14,new j(56,new X(2,140))),new t(17,72,72,16,16,new j(36,new X(4,92))),new t(18,80,80,18,18,new j(48,new X(4,114))),new t(19,88,88,20,20,new j(56,new X(4,144))),new t(20,96,96,22,22,new j(68,new X(4,174))),new t(21,104,104,24,24,new j(56,new X(6,136))),new t(22,120,120,18,18,new j(68,new X(6,175))),new t(23,132,132,20,20,new j(62,new X(8,163))),new t(24,144,144,22,22,new j(62,new X(8,156),new X(2,155))),new t(25,8,18,6,16,new j(7,new X(1,5))),new t(26,8,32,6,14,new j(11,new X(1,10))),new t(27,12,26,10,24,new j(14,new X(1,16))),new t(28,12,36,10,16,new j(18,new X(1,22))),new t(29,16,36,14,16,new j(24,new X(1,32))),new t(30,16,48,14,22,new j(28,new X(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),ju=function(){function t(e){var r=e.getHeight();if(r<8||r>144||(r&1)!==0)throw new R;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new Ke(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(e){var r=e.getHeight(),n=e.getWidth();return Xu.getVersionForDimensions(r,n)},t.prototype.readCodewords=function(){var e=new Int8Array(this.version.getTotalCodewords()),r=0,n=4,i=0,a=this.mappingBitMatrix.getHeight(),o=this.mappingBitMatrix.getWidth(),s=!1,l=!1,u=!1,c=!1;do if(n===a&&i===0&&!s)e[r++]=this.readCorner1(a,o)&255,n-=2,i+=2,s=!0;else if(n===a-2&&i===0&&(o&3)!==0&&!l)e[r++]=this.readCorner2(a,o)&255,n-=2,i+=2,l=!0;else if(n===a+4&&i===2&&(o&7)===0&&!u)e[r++]=this.readCorner3(a,o)&255,n-=2,i+=2,u=!0;else if(n===a-2&&i===0&&(o&7)===4&&!c)e[r++]=this.readCorner4(a,o)&255,n-=2,i+=2,c=!0;else{do n<a&&i>=0&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n-=2,i+=2;while(n>=0&&i<o);n+=1,i+=3;do n>=0&&i<o&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n+=2,i-=2;while(n<a&&i>=0);n+=3,i+=1}while(n<a||i<o);if(r!==this.version.getTotalCodewords())throw new R;return e},t.prototype.readModule=function(e,r,n,i){return e<0&&(e+=n,r+=4-(n+4&7)),r<0&&(r+=i,e+=4-(i+4&7)),this.readMappingMatrix.set(r,e),this.mappingBitMatrix.get(r,e)},t.prototype.readUtah=function(e,r,n,i){var a=0;return this.readModule(e-2,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-2,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r,n,i)&&(a|=1),a<<=1,this.readModule(e,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e,r,n,i)&&(a|=1),a},t.prototype.readCorner1=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,1,e,r)&&(n|=1),n<<=1,this.readModule(e-1,2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.readCorner2=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-4,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner3=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-3,e,r)&&(n|=1),n<<=1,this.readModule(1,r-2,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner4=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.extractDataRegion=function(e){var r=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(e.getHeight()!==r)throw new M("Dimension of bitMatrix must match the version size");for(var i=this.version.getDataRegionSizeRows(),a=this.version.getDataRegionSizeColumns(),o=r/i|0,s=n/a|0,l=o*i,u=s*a,c=new Ke(u,l),d=0;d<o;++d)for(var v=d*i,h=0;h<s;++h)for(var p=h*a,g=0;g<i;++g)for(var m=d*(i+2)+1+g,w=v+g,y=0;y<a;++y){var _=h*(a+2)+1+y;if(e.get(_,m)){var A=p+y;c.set(A,w)}}return c},t}(),Bi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yu=function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r){var n,i,a,o,s=r.getECBlocks(),l=0,u=s.getECBlocks();try{for(var c=Bi(u),d=c.next();!d.done;d=c.next()){var v=d.value;l+=v.getCount()}}catch(Re){n={error:Re}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}var h=new Array(l),p=0;try{for(var g=Bi(u),m=g.next();!m.done;m=g.next())for(var v=m.value,w=0;w<v.getCount();w++){var y=v.getDataCodewords(),_=s.getECCodewords()+y;h[p++]=new t(y,new Uint8Array(_))}}catch(Re){a={error:Re}}finally{try{m&&!m.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}for(var A=h[0].codewords.length,C=A-s.getECCodewords(),D=C-1,B=0,w=0;w<D;w++)for(var k=0;k<p;k++)h[k].codewords[w]=e[B++];for(var $=r.getVersionNumber()===24,L=$?8:p,k=0;k<L;k++)h[k].codewords[C-1]=e[B++];for(var le=h[0].codewords.length,w=C;w<le;w++)for(var k=0;k<p;k++){var G=$?(k+8)%p:k,ae=$&&G>7?w-1:w;h[G].codewords[ae]=e[B++]}if(B!==e.length)throw new M;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),pa=function(){function t(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new M(""+e);var r=0,n=this.bitOffset,i=this.byteOffset,a=this.bytes;if(n>0){var o=8-n,s=e<o?e:o,l=o-s,u=255>>8-s<<l;r=(a[i]&u)>>l,e-=s,n+=s,n===8&&(n=0,i++)}if(e>0){for(;e>=8;)r=r<<8|a[i]&255,i++,e-=8;if(e>0){var l=8-e,u=255>>l<<l;r=r<<e|(a[i]&u)>>l,n+=e}}return this.bitOffset=n,this.byteOffset=i,r},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}(),fe;(function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"})(fe||(fe={}));var Ku=function(){function t(){}return t.decode=function(e){var r=new pa(e),n=new Q,i=new Q,a=new Array,o=fe.ASCII_ENCODE;do if(o===fe.ASCII_ENCODE)o=this.decodeAsciiSegment(r,n,i);else{switch(o){case fe.C40_ENCODE:this.decodeC40Segment(r,n);break;case fe.TEXT_ENCODE:this.decodeTextSegment(r,n);break;case fe.ANSIX12_ENCODE:this.decodeAnsiX12Segment(r,n);break;case fe.EDIFACT_ENCODE:this.decodeEdifactSegment(r,n);break;case fe.BASE256_ENCODE:this.decodeBase256Segment(r,n,a);break;default:throw new R}o=fe.ASCII_ENCODE}while(o!==fe.PAD_ENCODE&&r.available()>0);return i.length()>0&&n.append(i.toString()),new Hr(e,n.toString(),a.length===0?null:a,null)},t.decodeAsciiSegment=function(e,r,n){var i=!1;do{var a=e.readBits(8);if(a===0)throw new R;if(a<=128)return i&&(a+=128),r.append(String.fromCharCode(a-1)),fe.ASCII_ENCODE;if(a===129)return fe.PAD_ENCODE;if(a<=229){var o=a-130;o<10&&r.append("0"),r.append(""+o)}else switch(a){case 230:return fe.C40_ENCODE;case 231:return fe.BASE256_ENCODE;case 232:r.append("");break;case 233:case 234:break;case 235:i=!0;break;case 236:r.append("[)>05"),n.insert(0,"");break;case 237:r.append("[)>06"),n.insert(0,"");break;case 238:return fe.ANSIX12_ENCODE;case 239:return fe.TEXT_ENCODE;case 240:return fe.EDIFACT_ENCODE;case 241:break;default:if(a!==254||e.available()!==0)throw new R;break}}while(e.available()>0);return fe.ASCII_ENCODE},t.decodeC40Segment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.C40_BASIC_SET_CHARS.length){var u=this.C40_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.C40_SHIFT2_SET_CHARS.length){var u=this.C40_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:n?(r.append(String.fromCharCode(l+224)),n=!1):r.append(String.fromCharCode(l+96)),a=0;break;default:throw new R}}}while(e.available()>0)},t.decodeTextSegment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.TEXT_BASIC_SET_CHARS.length){var u=this.TEXT_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.TEXT_SHIFT2_SET_CHARS.length){var u=this.TEXT_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:if(l<this.TEXT_SHIFT3_SET_CHARS.length){var u=this.TEXT_SHIFT3_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u),a=0}else throw new R;break;default:throw new R}}}while(e.available()>0)},t.decodeAnsiX12Segment=function(e,r){var n=[];do{if(e.available()===8)return;var i=e.readBits(8);if(i===254)return;this.parseTwoBytes(i,e.readBits(8),n);for(var a=0;a<3;a++){var o=n[a];switch(o){case 0:r.append("\r");break;case 1:r.append("*");break;case 2:r.append(">");break;case 3:r.append(" ");break;default:if(o<14)r.append(String.fromCharCode(o+44));else if(o<40)r.append(String.fromCharCode(o+51));else throw new R;break}}}while(e.available()>0)},t.parseTwoBytes=function(e,r,n){var i=(e<<8)+r-1,a=Math.floor(i/1600);n[0]=a,i-=a*1600,a=Math.floor(i/40),n[1]=a,n[2]=i-a*40},t.decodeEdifactSegment=function(e,r){do{if(e.available()<=16)return;for(var n=0;n<4;n++){var i=e.readBits(6);if(i===31){var a=8-e.getBitOffset();a!==8&&e.readBits(a);return}(i&32)===0&&(i|=64),r.append(String.fromCharCode(i))}}while(e.available()>0)},t.decodeBase256Segment=function(e,r,n){var i=1+e.getByteOffset(),a=this.unrandomize255State(e.readBits(8),i++),o;if(a===0?o=e.available()/8|0:a<250?o=a:o=250*(a-249)+this.unrandomize255State(e.readBits(8),i++),o<0)throw new R;for(var s=new Uint8Array(o),l=0;l<o;l++){if(e.available()<8)throw new R;s[l]=this.unrandomize255State(e.readBits(8),i++)}n.push(s);try{r.append(je.decode(s,ee.ISO88591))}catch(u){throw new fr("Platform does not support required encoding: "+u.message)}},t.unrandomize255State=function(e,r){var n=149*r%255+1,i=e-n;return i>=0?i:i+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",""],t}(),Zu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qu=function(){function t(){this.rsDecoder=new Gr(Te.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(e){var r,n,i=new ju(e),a=i.getVersion(),o=i.readCodewords(),s=Yu.getDataBlocks(o,a),l=0;try{for(var u=Zu(s),c=u.next();!c.done;c=u.next()){var d=c.value;l+=d.getNumDataCodewords()}}catch(_){r={error:_}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}for(var v=new Uint8Array(l),h=s.length,p=0;p<h;p++){var g=s[p],m=g.getCodewords(),w=g.getNumDataCodewords();this.correctErrors(m,w);for(var y=0;y<w;y++)v[y*h+p]=m[y]}return Ku.decode(v)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new ye}for(var i=0;i<r;i++)e[i]=n[i]},t}(),Qu=function(){function t(e){this.image=e,this.rectangleDetector=new Nn(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if(r=this.detectSolid2(r),r[3]=this.correctTopRight(r),!r[3])throw new S;r=this.shiftToModuleCenter(r);var n=r[0],i=r[1],a=r[2],o=r[3],s=this.transitionsBetween(n,o)+1,l=this.transitionsBetween(a,o)+1;(s&1)===1&&(s+=1),(l&1)===1&&(l+=1),4*s<7*l&&4*l<7*s&&(s=l=Math.max(s,l));var u=t.sampleGrid(this.image,n,i,a,o,s,l);return new Xn(u,[n,i,a,o])},t.shiftPoint=function(e,r,n){var i=(r.getX()-e.getX())/(n+1),a=(r.getY()-e.getY())/(n+1);return new P(e.getX()+i,e.getY()+a)},t.moveAway=function(e,r,n){var i=e.getX(),a=e.getY();return i<r?i-=1:i+=1,a<n?a-=1:a+=1,new P(i,a)},t.prototype.detectSolid1=function(e){var r=e[0],n=e[1],i=e[3],a=e[2],o=this.transitionsBetween(r,n),s=this.transitionsBetween(n,i),l=this.transitionsBetween(i,a),u=this.transitionsBetween(a,r),c=o,d=[a,r,n,i];return c>s&&(c=s,d[0]=r,d[1]=n,d[2]=i,d[3]=a),c>l&&(c=l,d[0]=n,d[1]=i,d[2]=a,d[3]=r),c>u&&(d[0]=i,d[1]=a,d[2]=r,d[3]=n),d},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=t.shiftPoint(n,i,(o+1)*4),l=t.shiftPoint(i,n,(o+1)*4),u=this.transitionsBetween(s,r),c=this.transitionsBetween(l,a);return u<c?(e[0]=r,e[1]=n,e[2]=i,e[3]=a):(e[0]=n,e[1]=i,e[2]=a,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=this.transitionsBetween(n,a),l=t.shiftPoint(r,n,(s+1)*4),u=t.shiftPoint(i,n,(o+1)*4);o=this.transitionsBetween(l,a),s=this.transitionsBetween(u,a);var c=new P(a.getX()+(i.getX()-n.getX())/(o+1),a.getY()+(i.getY()-n.getY())/(o+1)),d=new P(a.getX()+(r.getX()-n.getX())/(s+1),a.getY()+(r.getY()-n.getY())/(s+1));if(!this.isValid(c))return this.isValid(d)?d:null;if(!this.isValid(d))return c;var v=this.transitionsBetween(l,c)+this.transitionsBetween(u,c),h=this.transitionsBetween(l,d)+this.transitionsBetween(u,d);return v>h?c:d},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a)+1,s=this.transitionsBetween(i,a)+1,l=t.shiftPoint(r,n,s*4),u=t.shiftPoint(i,n,o*4);o=this.transitionsBetween(l,a)+1,s=this.transitionsBetween(u,a)+1,(o&1)===1&&(o+=1),(s&1)===1&&(s+=1);var c=(r.getX()+n.getX()+i.getX()+a.getX())/4,d=(r.getY()+n.getY()+i.getY()+a.getY())/4;r=t.moveAway(r,c,d),n=t.moveAway(n,c,d),i=t.moveAway(i,c,d),a=t.moveAway(a,c,d);var v,h;return l=t.shiftPoint(r,n,s*4),l=t.shiftPoint(l,a,o*4),v=t.shiftPoint(n,r,s*4),v=t.shiftPoint(v,i,o*4),u=t.shiftPoint(i,a,s*4),u=t.shiftPoint(u,n,o*4),h=t.shiftPoint(a,i,s*4),h=t.shiftPoint(h,r,o*4),[l,v,u,h]},t.prototype.isValid=function(e){return e.getX()>=0&&e.getX()<this.image.getWidth()&&e.getY()>0&&e.getY()<this.image.getHeight()},t.sampleGrid=function(e,r,n,i,a,o,s){var l=jn.getInstance();return l.sampleGrid(e,o,s,.5,.5,o-.5,.5,o-.5,s-.5,.5,s-.5,r.getX(),r.getY(),a.getX(),a.getY(),i.getX(),i.getY(),n.getX(),n.getY())},t.prototype.transitionsBetween=function(e,r){var n=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.trunc(r.getX()),o=Math.trunc(r.getY()),s=Math.abs(o-i)>Math.abs(a-n);if(s){var l=n;n=i,i=l,l=a,a=o,o=l}for(var u=Math.abs(a-n),c=Math.abs(o-i),d=-u/2,v=i<o?1:-1,h=n<a?1:-1,p=0,g=this.image.get(s?i:n,s?n:i),m=n,w=i;m!==a;m+=h){var y=this.image.get(s?w:m,s?m:w);if(y!==g&&(p++,g=y),d+=c,d>0){if(w===o)break;w+=v,d-=u}}return p},t}(),Rn=function(){function t(){this.decoder=new qu}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n,i;if(r!=null&&r.has(se.PURE_BARCODE)){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(a),i=t.NO_POINTS}else{var o=new Qu(e.getBlackMatrix()).detect();n=this.decoder.decode(o.getBits()),i=o.getPoints()}var s=n.getRawBytes(),l=new De(n.getText(),s,8*s.length,i,F.DATA_MATRIX,te.currentTimeMillis()),u=n.getByteSegments();u!=null&&l.putMetadata(me.BYTE_SEGMENTS,u);var c=n.getECLevel();return c!=null&&l.putMetadata(me.ERROR_CORRECTION_LEVEL,c),l},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r==null||n==null)throw new S;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0],u=(l-s+1)/i,c=(o-a+1)/i;if(u<=0||c<=0)throw new S;var d=i/2;a+=d,s+=d;for(var v=new Ke(u,c),h=0;h<c;h++)for(var p=a+h*i,g=0;g<u;g++)e.get(s+g*i,p)&&v.set(g,h);return v},t.moduleSize=function(e,r){for(var n=r.getWidth(),i=e[0],a=e[1];i<n&&r.get(i,a);)i++;if(i===n)throw new S;var o=i-e[0];if(o===0)throw new S;return o},t.NO_POINTS=[],t}(),Ju=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){Ju(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Rn,r)||this}return e})(Mt);var Ct;(function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"})(Ct||(Ct={}));var ef=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Fe(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new M;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(Ct.L,"L",1),t.M=new t(Ct.M,"M",0),t.Q=new t(Ct.Q,"Q",3),t.H=new t(Ct.H,"H",2),t}(),tf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ga=function(){function t(e){this.errorCorrectionLevel=ef.forBits(e>>3&3),this.dataMask=e&7}return t.numBitsDiffering=function(e,r){return H.bitCount(e^r)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return n!==null?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,i,a=Number.MAX_SAFE_INTEGER,o=0;try{for(var s=tf(t.FORMAT_INFO_DECODE_LOOKUP),l=s.next();!l.done;l=s.next()){var u=l.value,c=u[0];if(c===e||c===r)return new t(u[1]);var d=t.numBitsDiffering(e,c);d<a&&(o=u[1],a=d),e!==r&&(d=t.numBitsDiffering(r,c),d<a&&(o=u[1],a=d))}}catch(v){n={error:v}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a<=3?new t(o):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),rf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},E=function(){function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.ecCodewordsPerBlock=e,this.ecBlocks=r}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var e,r,n=0,i=this.ecBlocks;try{for(var a=rf(i),o=a.next();!o.done;o=a.next()){var s=o.value;n+=s.getCount()}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),x=function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),nf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yt=function(){function t(e,r){for(var n,i,a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];this.versionNumber=e,this.alignmentPatternCenters=r,this.ecBlocks=a;var s=0,l=a[0].getECCodewordsPerBlock(),u=a[0].getECBlocks();try{for(var c=nf(u),d=c.next();!d.done;d=c.next()){var v=d.value;s+=v.getCount()*(v.getDataCodewords()+l)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}this.totalCodewords=s}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(e){return this.ecBlocks[e.getValue()]},t.getProvisionalVersionForDimension=function(e){if(e%4!==1)throw new R;try{return this.getVersionForNumber((e-17)/4)}catch{throw new R}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new M;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,i=0;i<t.VERSION_DECODE_INFO.length;i++){var a=t.VERSION_DECODE_INFO[i];if(a===e)return t.getVersionForNumber(i+7);var o=ga.numBitsDiffering(e,a);o<r&&(n=i+7,r=o)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var e=this.getDimensionForVersion(),r=new Ke(e);r.setRegion(0,0,9,9),r.setRegion(e-8,0,8,9),r.setRegion(0,e-8,9,8);for(var n=this.alignmentPatternCenters.length,i=0;i<n;i++)for(var a=this.alignmentPatternCenters[i]-2,o=0;o<n;o++)i===0&&(o===0||o===n-1)||i===n-1&&o===0||r.setRegion(this.alignmentPatternCenters[o]-2,a,5,5);return r.setRegion(6,9,1,e-17),r.setRegion(9,6,e-17,1),this.versionNumber>6&&(r.setRegion(e-11,0,3,6),r.setRegion(0,e-11,6,3)),r},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new E(7,new x(1,19)),new E(10,new x(1,16)),new E(13,new x(1,13)),new E(17,new x(1,9))),new t(2,Int32Array.from([6,18]),new E(10,new x(1,34)),new E(16,new x(1,28)),new E(22,new x(1,22)),new E(28,new x(1,16))),new t(3,Int32Array.from([6,22]),new E(15,new x(1,55)),new E(26,new x(1,44)),new E(18,new x(2,17)),new E(22,new x(2,13))),new t(4,Int32Array.from([6,26]),new E(20,new x(1,80)),new E(18,new x(2,32)),new E(26,new x(2,24)),new E(16,new x(4,9))),new t(5,Int32Array.from([6,30]),new E(26,new x(1,108)),new E(24,new x(2,43)),new E(18,new x(2,15),new x(2,16)),new E(22,new x(2,11),new x(2,12))),new t(6,Int32Array.from([6,34]),new E(18,new x(2,68)),new E(16,new x(4,27)),new E(24,new x(4,19)),new E(28,new x(4,15))),new t(7,Int32Array.from([6,22,38]),new E(20,new x(2,78)),new E(18,new x(4,31)),new E(18,new x(2,14),new x(4,15)),new E(26,new x(4,13),new x(1,14))),new t(8,Int32Array.from([6,24,42]),new E(24,new x(2,97)),new E(22,new x(2,38),new x(2,39)),new E(22,new x(4,18),new x(2,19)),new E(26,new x(4,14),new x(2,15))),new t(9,Int32Array.from([6,26,46]),new E(30,new x(2,116)),new E(22,new x(3,36),new x(2,37)),new E(20,new x(4,16),new x(4,17)),new E(24,new x(4,12),new x(4,13))),new t(10,Int32Array.from([6,28,50]),new E(18,new x(2,68),new x(2,69)),new E(26,new x(4,43),new x(1,44)),new E(24,new x(6,19),new x(2,20)),new E(28,new x(6,15),new x(2,16))),new t(11,Int32Array.from([6,30,54]),new E(20,new x(4,81)),new E(30,new x(1,50),new x(4,51)),new E(28,new x(4,22),new x(4,23)),new E(24,new x(3,12),new x(8,13))),new t(12,Int32Array.from([6,32,58]),new E(24,new x(2,92),new x(2,93)),new E(22,new x(6,36),new x(2,37)),new E(26,new x(4,20),new x(6,21)),new E(28,new x(7,14),new x(4,15))),new t(13,Int32Array.from([6,34,62]),new E(26,new x(4,107)),new E(22,new x(8,37),new x(1,38)),new E(24,new x(8,20),new x(4,21)),new E(22,new x(12,11),new x(4,12))),new t(14,Int32Array.from([6,26,46,66]),new E(30,new x(3,115),new x(1,116)),new E(24,new x(4,40),new x(5,41)),new E(20,new x(11,16),new x(5,17)),new E(24,new x(11,12),new x(5,13))),new t(15,Int32Array.from([6,26,48,70]),new E(22,new x(5,87),new x(1,88)),new E(24,new x(5,41),new x(5,42)),new E(30,new x(5,24),new x(7,25)),new E(24,new x(11,12),new x(7,13))),new t(16,Int32Array.from([6,26,50,74]),new E(24,new x(5,98),new x(1,99)),new E(28,new x(7,45),new x(3,46)),new E(24,new x(15,19),new x(2,20)),new E(30,new x(3,15),new x(13,16))),new t(17,Int32Array.from([6,30,54,78]),new E(28,new x(1,107),new x(5,108)),new E(28,new x(10,46),new x(1,47)),new E(28,new x(1,22),new x(15,23)),new E(28,new x(2,14),new x(17,15))),new t(18,Int32Array.from([6,30,56,82]),new E(30,new x(5,120),new x(1,121)),new E(26,new x(9,43),new x(4,44)),new E(28,new x(17,22),new x(1,23)),new E(28,new x(2,14),new x(19,15))),new t(19,Int32Array.from([6,30,58,86]),new E(28,new x(3,113),new x(4,114)),new E(26,new x(3,44),new x(11,45)),new E(26,new x(17,21),new x(4,22)),new E(26,new x(9,13),new x(16,14))),new t(20,Int32Array.from([6,34,62,90]),new E(28,new x(3,107),new x(5,108)),new E(26,new x(3,41),new x(13,42)),new E(30,new x(15,24),new x(5,25)),new E(28,new x(15,15),new x(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new E(28,new x(4,116),new x(4,117)),new E(26,new x(17,42)),new E(28,new x(17,22),new x(6,23)),new E(30,new x(19,16),new x(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new E(28,new x(2,111),new x(7,112)),new E(28,new x(17,46)),new E(30,new x(7,24),new x(16,25)),new E(24,new x(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new E(30,new x(4,121),new x(5,122)),new E(28,new x(4,47),new x(14,48)),new E(30,new x(11,24),new x(14,25)),new E(30,new x(16,15),new x(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new E(30,new x(6,117),new x(4,118)),new E(28,new x(6,45),new x(14,46)),new E(30,new x(11,24),new x(16,25)),new E(30,new x(30,16),new x(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new E(26,new x(8,106),new x(4,107)),new E(28,new x(8,47),new x(13,48)),new E(30,new x(7,24),new x(22,25)),new E(30,new x(22,15),new x(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new E(28,new x(10,114),new x(2,115)),new E(28,new x(19,46),new x(4,47)),new E(28,new x(28,22),new x(6,23)),new E(30,new x(33,16),new x(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new E(30,new x(8,122),new x(4,123)),new E(28,new x(22,45),new x(3,46)),new E(30,new x(8,23),new x(26,24)),new E(30,new x(12,15),new x(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new E(30,new x(3,117),new x(10,118)),new E(28,new x(3,45),new x(23,46)),new E(30,new x(4,24),new x(31,25)),new E(30,new x(11,15),new x(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new E(30,new x(7,116),new x(7,117)),new E(28,new x(21,45),new x(7,46)),new E(30,new x(1,23),new x(37,24)),new E(30,new x(19,15),new x(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new E(30,new x(5,115),new x(10,116)),new E(28,new x(19,47),new x(10,48)),new E(30,new x(15,24),new x(25,25)),new E(30,new x(23,15),new x(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new E(30,new x(13,115),new x(3,116)),new E(28,new x(2,46),new x(29,47)),new E(30,new x(42,24),new x(1,25)),new E(30,new x(23,15),new x(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new E(30,new x(17,115)),new E(28,new x(10,46),new x(23,47)),new E(30,new x(10,24),new x(35,25)),new E(30,new x(19,15),new x(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new E(30,new x(17,115),new x(1,116)),new E(28,new x(14,46),new x(21,47)),new E(30,new x(29,24),new x(19,25)),new E(30,new x(11,15),new x(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new E(30,new x(13,115),new x(6,116)),new E(28,new x(14,46),new x(23,47)),new E(30,new x(44,24),new x(7,25)),new E(30,new x(59,16),new x(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new E(30,new x(12,121),new x(7,122)),new E(28,new x(12,47),new x(26,48)),new E(30,new x(39,24),new x(14,25)),new E(30,new x(22,15),new x(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new E(30,new x(6,121),new x(14,122)),new E(28,new x(6,47),new x(34,48)),new E(30,new x(46,24),new x(10,25)),new E(30,new x(2,15),new x(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new E(30,new x(17,122),new x(4,123)),new E(28,new x(29,46),new x(14,47)),new E(30,new x(49,24),new x(10,25)),new E(30,new x(24,15),new x(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new E(30,new x(4,122),new x(18,123)),new E(28,new x(13,46),new x(32,47)),new E(30,new x(48,24),new x(14,25)),new E(30,new x(42,15),new x(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new E(30,new x(20,117),new x(4,118)),new E(28,new x(40,47),new x(7,48)),new E(30,new x(43,24),new x(22,25)),new E(30,new x(10,15),new x(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new E(30,new x(19,118),new x(6,119)),new E(28,new x(18,47),new x(31,48)),new E(30,new x(34,24),new x(34,25)),new E(30,new x(20,15),new x(61,16)))],t}(),he;(function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"})(he||(he={}));var Ri=function(){function t(e,r){this.value=e,this.isMasked=r}return t.prototype.unmaskBitMatrix=function(e,r){for(var n=0;n<r;n++)for(var i=0;i<r;i++)this.isMasked(n,i)&&e.flip(i,n)},t.values=new Map([[he.DATA_MASK_000,new t(he.DATA_MASK_000,function(e,r){return(e+r&1)===0})],[he.DATA_MASK_001,new t(he.DATA_MASK_001,function(e,r){return(e&1)===0})],[he.DATA_MASK_010,new t(he.DATA_MASK_010,function(e,r){return r%3===0})],[he.DATA_MASK_011,new t(he.DATA_MASK_011,function(e,r){return(e+r)%3===0})],[he.DATA_MASK_100,new t(he.DATA_MASK_100,function(e,r){return(Math.floor(e/2)+Math.floor(r/3)&1)===0})],[he.DATA_MASK_101,new t(he.DATA_MASK_101,function(e,r){return e*r%6===0})],[he.DATA_MASK_110,new t(he.DATA_MASK_110,function(e,r){return e*r%6<3})],[he.DATA_MASK_111,new t(he.DATA_MASK_111,function(e,r){return(e+r+e*r%3&1)===0})]]),t}(),af=function(){function t(e){var r=e.getHeight();if(r<21||(r&3)!==1)throw new R;this.bitMatrix=e}return t.prototype.readFormatInformation=function(){if(this.parsedFormatInfo!==null&&this.parsedFormatInfo!==void 0)return this.parsedFormatInfo;for(var e=0,r=0;r<6;r++)e=this.copyBit(r,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(var n=5;n>=0;n--)e=this.copyBit(8,n,e);for(var i=this.bitMatrix.getHeight(),a=0,o=i-7,n=i-1;n>=o;n--)a=this.copyBit(8,n,a);for(var r=i-8;r<i;r++)a=this.copyBit(r,8,a);if(this.parsedFormatInfo=ga.decodeFormatInformation(e,a),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new R},t.prototype.readVersion=function(){if(this.parsedVersion!==null&&this.parsedVersion!==void 0)return this.parsedVersion;var e=this.bitMatrix.getHeight(),r=Math.floor((e-17)/4);if(r<=6)return yt.getVersionForNumber(r);for(var n=0,i=e-11,a=5;a>=0;a--)for(var o=e-9;o>=i;o--)n=this.copyBit(o,a,n);var s=yt.decodeVersionInformation(n);if(s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;n=0;for(var o=5;o>=0;o--)for(var a=e-9;a>=i;a--)n=this.copyBit(o,a,n);if(s=yt.decodeVersionInformation(n),s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;throw new R},t.prototype.copyBit=function(e,r,n){var i=this.isMirror?this.bitMatrix.get(r,e):this.bitMatrix.get(e,r);return i?n<<1|1:n<<1},t.prototype.readCodewords=function(){var e=this.readFormatInformation(),r=this.readVersion(),n=Ri.values.get(e.getDataMask()),i=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,i);for(var a=r.buildFunctionPattern(),o=!0,s=new Uint8Array(r.getTotalCodewords()),l=0,u=0,c=0,d=i-1;d>0;d-=2){d===6&&d--;for(var v=0;v<i;v++)for(var h=o?i-1-v:v,p=0;p<2;p++)a.get(d-p,h)||(c++,u<<=1,this.bitMatrix.get(d-p,h)&&(u|=1),c===8&&(s[l++]=u,c=0,u=0));o=!o}if(l!==r.getTotalCodewords())throw new R;return s},t.prototype.remask=function(){if(this.parsedFormatInfo!==null){var e=Ri.values[this.parsedFormatInfo.getDataMask()],r=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,r)}},t.prototype.setMirror=function(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e},t.prototype.mirror=function(){for(var e=this.bitMatrix,r=0,n=e.getWidth();r<n;r++)for(var i=r+1,a=e.getHeight();i<a;i++)e.get(r,i)!==e.get(i,r)&&(e.flip(i,r),e.flip(r,i))},t}(),Pi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},of=function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r,n){var i,a,o,s;if(e.length!==r.getTotalCodewords())throw new M;var l=r.getECBlocksForLevel(n),u=0,c=l.getECBlocks();try{for(var d=Pi(c),v=d.next();!v.done;v=d.next()){var h=v.value;u+=h.getCount()}}catch(ae){i={error:ae}}finally{try{v&&!v.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}var p=new Array(u),g=0;try{for(var m=Pi(c),w=m.next();!w.done;w=m.next())for(var h=w.value,y=0;y<h.getCount();y++){var _=h.getDataCodewords(),A=l.getECCodewordsPerBlock()+_;p[g++]=new t(_,new Uint8Array(A))}}catch(ae){o={error:ae}}finally{try{w&&!w.done&&(s=m.return)&&s.call(m)}finally{if(o)throw o.error}}for(var C=p[0].codewords.length,D=p.length-1;D>=0;){var B=p[D].codewords.length;if(B===C)break;D--}D++;for(var k=C-l.getECCodewordsPerBlock(),$=0,y=0;y<k;y++)for(var L=0;L<g;L++)p[L].codewords[y]=e[$++];for(var L=D;L<g;L++)p[L].codewords[k]=e[$++];for(var le=p[0].codewords.length,y=k;y<le;y++)for(var L=0;L<g;L++){var G=L<D?y:y+1;p[L].codewords[G]=e[$++]}return p},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Pe;(function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"})(Pe||(Pe={}));var ne=function(){function t(e,r,n,i){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=i,t.FOR_BITS.set(i,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(r===void 0)throw new M;return r},t.prototype.getCharacterCountBits=function(e){var r=e.getVersionNumber(),n;return r<=9?n=0:r<=26?n=1:n=2,this.characterCountBitsForVersions[n]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(Pe.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Pe.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Pe.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Pe.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Pe.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Pe.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Pe.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Pe.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Pe.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Pe.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),sf=function(){function t(){}return t.decode=function(e,r,n,i){var a=new pa(e),o=new Q,s=new Array,l=-1,u=-1;try{var c=null,d=!1,v=void 0;do{if(a.available()<4)v=ne.TERMINATOR;else{var h=a.readBits(4);v=ne.forBits(h)}switch(v){case ne.TERMINATOR:break;case ne.FNC1_FIRST_POSITION:case ne.FNC1_SECOND_POSITION:d=!0;break;case ne.STRUCTURED_APPEND:if(a.available()<16)throw new R;l=a.readBits(8),u=a.readBits(8);break;case ne.ECI:var p=t.parseECIValue(a);if(c=de.getCharacterSetECIByValue(p),c===null)throw new R;break;case ne.HANZI:var g=a.readBits(4),m=a.readBits(v.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(a,o,m);break;default:var w=a.readBits(v.getCharacterCountBits(r));switch(v){case ne.NUMERIC:t.decodeNumericSegment(a,o,w);break;case ne.ALPHANUMERIC:t.decodeAlphanumericSegment(a,o,w,d);break;case ne.BYTE:t.decodeByteSegment(a,o,w,c,s,i);break;case ne.KANJI:t.decodeKanjiSegment(a,o,w);break;default:throw new R}break}}while(v!==ne.TERMINATOR)}catch{throw new R}return new Hr(e,o.toString(),s.length===0?null:s,n===null?null:n.toString(),l,u)},t.decodeHanziSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/96<<8&4294967295|o%96;s<959?s+=41377:s+=42657,i[a]=s>>8&255,i[a+1]=s&255,a+=2,n--}try{r.append(je.decode(i,ee.GB2312))}catch(l){throw new R(l)}},t.decodeKanjiSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/192<<8&4294967295|o%192;s<7936?s+=33088:s+=49472,i[a]=s>>8,i[a+1]=s,a+=2,n--}try{r.append(je.decode(i,ee.SHIFT_JIS))}catch(l){throw new R(l)}},t.decodeByteSegment=function(e,r,n,i,a,o){if(8*n>e.available())throw new R;for(var s=new Uint8Array(n),l=0;l<n;l++)s[l]=e.readBits(8);var u;i===null?u=ee.guessEncoding(s,o):u=i.getName();try{r.append(je.decode(s,u))}catch(c){throw new R(c)}a.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new R;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,i){for(var a=r.length();n>1;){if(e.available()<11)throw new R;var o=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(o/45))),r.append(t.toAlphaNumericChar(o%45)),n-=2}if(n===1){if(e.available()<6)throw new R;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(i)for(var s=a;s<r.length();s++)r.charAt(s)==="%"&&(s<r.length()-1&&r.charAt(s+1)==="%"?r.deleteCharAt(s+1):r.setCharAt(s,""))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new R;var i=e.readBits(10);if(i>=1e3)throw new R;r.append(t.toAlphaNumericChar(Math.floor(i/100))),r.append(t.toAlphaNumericChar(Math.floor(i/10)%10)),r.append(t.toAlphaNumericChar(i%10)),n-=3}if(n===2){if(e.available()<7)throw new R;var a=e.readBits(7);if(a>=100)throw new R;r.append(t.toAlphaNumericChar(Math.floor(a/10))),r.append(t.toAlphaNumericChar(a%10))}else if(n===1){if(e.available()<4)throw new R;var o=e.readBits(4);if(o>=10)throw new R;r.append(t.toAlphaNumericChar(o))}},t.parseECIValue=function(e){var r=e.readBits(8);if((r&128)===0)return r&127;if((r&192)===128){var n=e.readBits(8);return(r&63)<<8&4294967295|n}if((r&224)===192){var i=e.readBits(16);return(r&31)<<16&4294967295|i}throw new R},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),xa=function(){function t(e){this.mirrored=e}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(e){if(!(!this.mirrored||e===null||e.length<3)){var r=e[0];e[0]=e[2],e[2]=r}},t}(),ki=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lf=function(){function t(){this.rsDecoder=new Gr(Te.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(e,r){return this.decodeBitMatrix(Ke.parseFromBooleanArray(e),r)},t.prototype.decodeBitMatrix=function(e,r){var n=new af(e),i=null;try{return this.decodeBitMatrixParser(n,r)}catch(o){i=o}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var a=this.decodeBitMatrixParser(n,r);return a.setOther(new xa(!0)),a}catch(o){throw i!==null?i:o}},t.prototype.decodeBitMatrixParser=function(e,r){var n,i,a,o,s=e.readVersion(),l=e.readFormatInformation().getErrorCorrectionLevel(),u=e.readCodewords(),c=of.getDataBlocks(u,s,l),d=0;try{for(var v=ki(c),h=v.next();!h.done;h=v.next()){var p=h.value;d+=p.getNumDataCodewords()}}catch(D){n={error:D}}finally{try{h&&!h.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}var g=new Uint8Array(d),m=0;try{for(var w=ki(c),y=w.next();!y.done;y=w.next()){var p=y.value,_=p.getCodewords(),A=p.getNumDataCodewords();this.correctErrors(_,A);for(var C=0;C<A;C++)g[m++]=_[C]}}catch(D){a={error:D}}finally{try{y&&!y.done&&(o=w.return)&&o.call(w)}finally{if(a)throw a.error}}return sf.decode(g,s,l,r)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new ye}for(var i=0;i<r;i++)e[i]=n[i]},t}(),uf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ff=function(t){uf(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.estimatedModuleSize=i,a}return e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=(this.getX()+n)/2,o=(this.getY()+r)/2,s=(this.estimatedModuleSize+i)/2;return new e(a,o,s)},e}(P),cf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},df=function(){function t(e,r,n,i,a,o,s){this.image=e,this.startX=r,this.startY=n,this.width=i,this.height=a,this.moduleSize=o,this.resultPointCallback=s,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var e=this.startX,r=this.height,n=this.width,i=e+n,a=this.startY+r/2,o=new Int32Array(3),s=this.image,l=0;l<r;l++){var u=a+((l&1)===0?Math.floor((l+1)/2):-Math.floor((l+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var c=e;c<i&&!s.get(c,u);)c++;for(var d=0;c<i;){if(s.get(c,u))if(d===1)o[1]++;else if(d===2){if(this.foundPatternCross(o)){var v=this.handlePossibleCenter(o,u,c);if(v!==null)return v}o[0]=o[2],o[1]=1,o[2]=0,d=1}else o[++d]++;else d===1&&d++,o[d]++;c++}if(this.foundPatternCross(o)){var v=this.handlePossibleCenter(o,u,i);if(v!==null)return v}}if(this.possibleCenters.length!==0)return this.possibleCenters[0];throw new S},t.centerFromEnd=function(e,r){return r-e[2]-e[1]/2},t.prototype.foundPatternCross=function(e){for(var r=this.moduleSize,n=r/2,i=0;i<3;i++)if(Math.abs(r-e[i])>=n)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,i){var a=this.image,o=a.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var l=e;l>=0&&a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&!a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l)&&s[1]<=n;)s[1]++,l++;if(l===o||s[1]>n)return NaN;for(;l<o&&!a.get(r,l)&&s[2]<=n;)s[2]++,l++;if(s[2]>n)return NaN;var u=s[0]+s[1]+s[2];return 5*Math.abs(u-i)>=2*i?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var i,a,o=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),l=this.crossCheckVertical(r,s,2*e[1],o);if(!isNaN(l)){var u=(e[0]+e[1]+e[2])/3;try{for(var c=cf(this.possibleCenters),d=c.next();!d.done;d=c.next()){var v=d.value;if(v.aboutEquals(u,l,s))return v.combineEstimate(l,s,u)}}catch(p){i={error:p}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var h=new ff(s,l,u);this.possibleCenters.push(h),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},t}(),hf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vf=function(t){hf(e,t);function e(r,n,i,a){var o=t.call(this,r,n)||this;return o.estimatedModuleSize=i,o.count=a,a===void 0&&(o.count=1),o}return e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=this.count+1,o=(this.count*this.getX()+n)/a,s=(this.count*this.getY()+r)/a,l=(this.count*this.estimatedModuleSize+i)/a;return new e(o,s,l,a)},e}(P),pf=function(){function t(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),Wt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gf=function(){function t(e,r){this.image=e,this.resultPointCallback=r,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=r}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=e!=null&&e.get(se.TRY_HARDER)!==void 0,n=e!=null&&e.get(se.PURE_BARCODE)!==void 0,i=this.image,a=i.getHeight(),o=i.getWidth(),s=Math.floor(3*a/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var l=!1,u=new Int32Array(5),c=s-1;c<a&&!l;c+=s){u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0;for(var d=0,v=0;v<o;v++)if(i.get(v,c))(d&1)===1&&d++,u[d]++;else if((d&1)===0)if(d===4)if(t.foundPatternCross(u)){var h=this.handlePossibleCenter(u,c,v,n);if(h===!0)if(s=2,this.hasSkipped===!0)l=this.haveMultiplyConfirmedCenters();else{var p=this.findRowSkip();p>u[2]&&(c+=p-u[2]-s,v=o-1)}else{u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,d=3;continue}d=0,u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0}else u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,d=3;else u[++d]++;else u[d]++;if(t.foundPatternCross(u)){var h=this.handlePossibleCenter(u,c,o,n);h===!0&&(s=u[0],this.hasSkipped&&(l=this.haveMultiplyConfirmedCenters()))}}var g=this.selectBestPatterns();return P.orderBestPatterns(g),new pf(g)},t.centerFromEnd=function(e,r){return r-e[4]-e[3]-e[2]/2},t.foundPatternCross=function(e){for(var r=0,n=0;n<5;n++){var i=e[n];if(i===0)return!1;r+=i}if(r<7)return!1;var a=r/7,o=a/2;return Math.abs(a-e[0])<o&&Math.abs(a-e[1])<o&&Math.abs(3*a-e[2])<3*o&&Math.abs(a-e[3])<o&&Math.abs(a-e[4])<o},t.prototype.getCrossCheckStateCount=function(){var e=this.crossCheckStateCount;return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e},t.prototype.crossCheckDiagonal=function(e,r,n,i){for(var a=this.getCrossCheckStateCount(),o=0,s=this.image;e>=o&&r>=o&&s.get(r-o,e-o);)a[2]++,o++;if(e<o||r<o)return!1;for(;e>=o&&r>=o&&!s.get(r-o,e-o)&&a[1]<=n;)a[1]++,o++;if(e<o||r<o||a[1]>n)return!1;for(;e>=o&&r>=o&&s.get(r-o,e-o)&&a[0]<=n;)a[0]++,o++;if(a[0]>n)return!1;var l=s.getHeight(),u=s.getWidth();for(o=1;e+o<l&&r+o<u&&s.get(r+o,e+o);)a[2]++,o++;if(e+o>=l||r+o>=u)return!1;for(;e+o<l&&r+o<u&&!s.get(r+o,e+o)&&a[3]<n;)a[3]++,o++;if(e+o>=l||r+o>=u||a[3]>=n)return!1;for(;e+o<l&&r+o<u&&s.get(r+o,e+o)&&a[4]<n;)a[4]++,o++;if(a[4]>=n)return!1;var c=a[0]+a[1]+a[2]+a[3]+a[4];return Math.abs(c-i)<2*i&&t.foundPatternCross(a)},t.prototype.crossCheckVertical=function(e,r,n,i){for(var a=this.image,o=a.getHeight(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(r,l);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(r,l)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(r,l)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-i)>=2*i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,i){for(var a=this.image,o=a.getWidth(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(l,r);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(l,r)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(l,r)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(l,r);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(l,r)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(l,r)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-i)>=i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n,i){var a=e[0]+e[1]+e[2]+e[3]+e[4],o=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(o),e[2],a);if(!isNaN(s)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(s),e[2],a),!isNaN(o)&&(!i||this.crossCheckDiagonal(Math.floor(s),Math.floor(o),e[2],a)))){for(var l=a/7,u=!1,c=this.possibleCenters,d=0,v=c.length;d<v;d++){var h=c[d];if(h.aboutEquals(l,s,o)){c[d]=h.combineEstimate(s,o,l),u=!0;break}}if(!u){var p=new vf(o,s,l);c.push(p),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r,n=this.possibleCenters.length;if(n<=1)return 0;var i=null;try{for(var a=Wt(this.possibleCenters),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.getCount()>=t.CENTER_QUORUM)if(i==null)i=s;else return this.hasSkipped=!0,Math.floor((Math.abs(i.getX()-s.getX())-Math.abs(i.getY()-s.getY()))/2)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,i,a=0,o=0,s=this.possibleCenters.length;try{for(var l=Wt(this.possibleCenters),u=l.next();!u.done;u=l.next()){var c=u.value;c.getCount()>=t.CENTER_QUORUM&&(a++,o+=c.getEstimatedModuleSize())}}catch(g){e={error:g}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}if(a<3)return!1;var d=o/s,v=0;try{for(var h=Wt(this.possibleCenters),p=h.next();!p.done;p=h.next()){var c=p.value;v+=Math.abs(c.getEstimatedModuleSize()-d)}}catch(g){n={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return v<=.05*o},t.prototype.selectBestPatterns=function(){var e,r,n,i,a=this.possibleCenters.length;if(a<3)throw new S;var o=this.possibleCenters,s;if(a>3){var l=0,u=0;try{for(var c=Wt(this.possibleCenters),d=c.next();!d.done;d=c.next()){var v=d.value,h=v.getEstimatedModuleSize();l+=h,u+=h*h}}catch(C){e={error:C}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}s=l/a;var p=Math.sqrt(u/a-s*s);o.sort(function(C,D){var B=Math.abs(D.getEstimatedModuleSize()-s),k=Math.abs(C.getEstimatedModuleSize()-s);return B<k?-1:B>k?1:0});for(var g=Math.max(.2*s,p),m=0;m<o.length&&o.length>3;m++){var w=o[m];Math.abs(w.getEstimatedModuleSize()-s)>g&&(o.splice(m,1),m--)}}if(o.length>3){var l=0;try{for(var y=Wt(o),_=y.next();!_.done;_=y.next()){var A=_.value;l+=A.getEstimatedModuleSize()}}catch(D){n={error:D}}finally{try{_&&!_.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}s=l/o.length,o.sort(function(D,B){if(B.getCount()===D.getCount()){var k=Math.abs(B.getEstimatedModuleSize()-s),$=Math.abs(D.getEstimatedModuleSize()-s);return k<$?1:k>$?-1:0}else return B.getCount()-D.getCount()}),o.splice(3)}return[o[0],o[1],o[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),xf=function(){function t(e){this.image=e}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(e){this.resultPointCallback=e==null?null:e.get(se.NEED_RESULT_POINT_CALLBACK);var r=new gf(this.image,this.resultPointCallback),n=r.find(e);return this.processFinderPatternInfo(n)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),i=e.getBottomLeft(),a=this.calculateModuleSize(r,n,i);if(a<1)throw new S("No pattern found in proccess finder.");var o=t.computeDimension(r,n,i,a),s=yt.getProvisionalVersionForDimension(o),l=s.getDimensionForVersion()-7,u=null;if(s.getAlignmentPatternCenters().length>0)for(var c=n.getX()-r.getX()+i.getX(),d=n.getY()-r.getY()+i.getY(),v=1-3/l,h=Math.floor(r.getX()+v*(c-r.getX())),p=Math.floor(r.getY()+v*(d-r.getY())),g=4;g<=16;g<<=1)try{u=this.findAlignmentInRegion(a,h,p,g);break}catch(_){if(!(_ instanceof S))throw _}var m=t.createTransform(r,n,i,u,o),w=t.sampleGrid(this.image,m,o),y;return u===null?y=[i,r,n]:y=[i,r,n,u],new Xn(w,y)},t.createTransform=function(e,r,n,i,a){var o=a-3.5,s,l,u,c;return i!==null?(s=i.getX(),l=i.getY(),u=o-3,c=u):(s=r.getX()-e.getX()+n.getX(),l=r.getY()-e.getY()+n.getY(),u=o,c=o),ca.quadrilateralToQuadrilateral(3.5,3.5,o,3.5,u,c,3.5,o,e.getX(),e.getY(),r.getX(),r.getY(),s,l,n.getX(),n.getY())},t.sampleGrid=function(e,r,n){var i=jn.getInstance();return i.sampleGridWithTransform(e,n,n,r)},t.computeDimension=function(e,r,n,i){var a=W.round(P.distance(e,r)/i),o=W.round(P.distance(e,n)/i),s=Math.floor((a+o)/2)+7;switch(s&3){case 0:s++;break;case 2:s--;break;case 3:throw new S("Dimensions could be not found.")}return s},t.prototype.calculateModuleSize=function(e,r,n){return(this.calculateModuleSizeOneWay(e,r)+this.calculateModuleSizeOneWay(e,n))/2},t.prototype.calculateModuleSizeOneWay=function(e,r){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(r.getX()),Math.floor(r.getY())),i=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(r.getX()),Math.floor(r.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(n)?i/7:isNaN(i)?n/7:(n+i)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(e,r,n,i){var a=this.sizeOfBlackWhiteBlackRun(e,r,n,i),o=1,s=e-(n-e);s<0?(o=e/(e-s),s=0):s>=this.image.getWidth()&&(o=(this.image.getWidth()-1-e)/(s-e),s=this.image.getWidth()-1);var l=Math.floor(r-(i-r)*o);return o=1,l<0?(o=r/(r-l),l=0):l>=this.image.getHeight()&&(o=(this.image.getHeight()-1-r)/(l-r),l=this.image.getHeight()-1),s=Math.floor(e+(s-e)*o),a+=this.sizeOfBlackWhiteBlackRun(e,r,s,l),a-1},t.prototype.sizeOfBlackWhiteBlackRun=function(e,r,n,i){var a=Math.abs(i-r)>Math.abs(n-e);if(a){var o=e;e=r,r=o,o=n,n=i,i=o}for(var s=Math.abs(n-e),l=Math.abs(i-r),u=-s/2,c=e<n?1:-1,d=r<i?1:-1,v=0,h=n+c,p=e,g=r;p!==h;p+=c){var m=a?g:p,w=a?p:g;if(v===1===this.image.get(m,w)){if(v===2)return W.distance(p,g,e,r);v++}if(u+=l,u>0){if(g===i)break;g+=d,u-=s}}return v===2?W.distance(n+c,i,e,r):NaN},t.prototype.findAlignmentInRegion=function(e,r,n,i){var a=Math.floor(i*e),o=Math.max(0,r-a),s=Math.min(this.image.getWidth()-1,r+a);if(s-o<e*3)throw new S("Alignment top exceeds estimated module size.");var l=Math.max(0,n-a),u=Math.min(this.image.getHeight()-1,n+a);if(u-l<e*3)throw new S("Alignment bottom exceeds estimated module size.");var c=new df(this.image,o,l,s-o,u-l,e,this.resultPointCallback);return c.find()},t}(),Pn=function(){function t(){this.decoder=new lf}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,i;if(r!=null&&r.get(se.PURE_BARCODE)!==void 0){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(a,r),i=t.NO_POINTS}else{var o=new xf(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(o.getBits(),r),i=o.getPoints()}n.getOther()instanceof xa&&n.getOther().applyMirroredCorrection(i);var s=new De(n.getText(),n.getRawBytes(),void 0,i,F.QR_CODE,void 0),l=n.getByteSegments();l!==null&&s.putMetadata(me.BYTE_SEGMENTS,l);var u=n.getECLevel();return u!==null&&s.putMetadata(me.ERROR_CORRECTION_LEVEL,u),n.hasStructuredAppend()&&(s.putMetadata(me.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(me.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r===null||n===null)throw new S;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0];if(s>=l||a>=o)throw new S;if(o-a!==l-s&&(l=s+(o-a),l>=e.getWidth()))throw new S;var u=Math.round((l-s+1)/i),c=Math.round((o-a+1)/i);if(u<=0||c<=0)throw new S;if(c!==u)throw new S;var d=Math.floor(i/2);a+=d,s+=d;var v=s+Math.floor((u-1)*i)-l;if(v>0){if(v>d)throw new S;s-=v}var h=a+Math.floor((c-1)*i)-o;if(h>0){if(h>d)throw new S;a-=h}for(var p=new Ke(u,c),g=0;g<c;g++)for(var m=a+Math.floor(g*i),w=0;w<u;w++)e.get(s+Math.floor(w*i),m)&&p.set(w,g);return p},t.moduleSize=function(e,r){for(var n=r.getHeight(),i=r.getWidth(),a=e[0],o=e[1],s=!0,l=0;a<i&&o<n;){if(s!==r.get(a,o)){if(++l===5)break;s=!s}a++,o++}if(a===i||o===n)throw new S;return(a-e[0])/7},t.NO_POINTS=new Array,t}(),yf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(e){return W.sum(e)},t.toIntArray=function(e){var r,n;if(e==null||!e.length)return t.EMPTY_INT_ARRAY;var i=new Int32Array(e.length),a=0;try{for(var o=yf(e),s=o.next();!s.done;s=o.next()){var l=s.value;i[a++]=l}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},t.getCodeword=function(e){var r=Ne.binarySearch(t.SYMBOL_TABLE,e&262143);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),mf=function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),wf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_f=function(){function t(){}return t.detectMultiple=function(e,r,n){var i=e.getBlackMatrix(),a=t.detect(n,i);return a.length||(i=i.clone(),i.rotate180(),a=t.detect(n,i)),new mf(i,a)},t.detect=function(e,r){for(var n,i,a=new Array,o=0,s=0,l=!1;o<r.getHeight();){var u=t.findVertices(r,o,s);if(u[0]==null&&u[3]==null){if(!l)break;l=!1,s=0;try{for(var c=(n=void 0,wf(a)),d=c.next();!d.done;d=c.next()){var v=d.value;v[1]!=null&&(o=Math.trunc(Math.max(o,v[1].getY()))),v[3]!=null&&(o=Math.max(o,Math.trunc(v[3].getY())))}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}o+=t.ROW_STEP;continue}if(l=!0,a.push(u),!e)break;u[2]!=null?(s=Math.trunc(u[2].getX()),o=Math.trunc(u[2].getY())):(s=Math.trunc(u[4].getX()),o=Math.trunc(u[4].getY()))}return a},t.findVertices=function(e,r,n){var i=e.getHeight(),a=e.getWidth(),o=new Array(8);return t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),o[4]!=null&&(n=Math.trunc(o[4].getX()),r=Math.trunc(o[4].getY())),t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),o},t.copyToResult=function(e,r,n){for(var i=0;i<n.length;i++)e[n[i]]=r[i]},t.findRowsWithPattern=function(e,r,n,i,a,o){for(var s=new Array(4),l=!1,u=new Int32Array(o.length);i<r;i+=t.ROW_STEP){var c=t.findGuardPattern(e,a,i,n,!1,o,u);if(c!=null){for(;i>0;){var d=t.findGuardPattern(e,a,--i,n,!1,o,u);if(d!=null)c=d;else{i++;break}}s[0]=new P(c[0],i),s[1]=new P(c[1],i),l=!0;break}}var v=i+1;if(l){for(var h=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);v<r;v++){var c=t.findGuardPattern(e,d[0],v,n,!1,o,u);if(c!=null&&Math.abs(d[0]-c[0])<t.MAX_PATTERN_DRIFT&&Math.abs(d[1]-c[1])<t.MAX_PATTERN_DRIFT)d=c,h=0;else{if(h>t.SKIPPED_ROW_COUNT_MAX)break;h++}}v-=h+1,s[2]=new P(d[0],v),s[3]=new P(d[1],v)}return v-i<t.BARCODE_MIN_HEIGHT&&Ne.fill(s,null),s},t.findGuardPattern=function(e,r,n,i,a,o,s){Ne.fillWithin(s,0,s.length,0);for(var l=r,u=0;e.get(l,n)&&l>0&&u++<t.MAX_PIXEL_DRIFT;)l--;for(var c=l,d=0,v=o.length,h=a;c<i;c++){var p=e.get(c,n);if(p!==h)s[d]++;else{if(d===v-1){if(t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([l,c]);l+=s[0]+s[1],te.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,h=!h}}return d===v-1&&t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([l,c-1]):null},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return 1/0;var l=a/o;n*=l;for(var u=0,c=0;c<i;c++){var d=e[c],v=r[c]*l,h=d>v?d-v:v-d;if(h>n)return 1/0;u+=h}return u/a},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),Ef=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xt=function(){function t(e,r){if(r.length===0)throw new M;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-i),te.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){var r,n;if(e===0)return this.getCoefficient(0);if(e===1){var i=0;try{for(var a=Ef(this.coefficients),o=a.next();!o.done;o=a.next()){var s=o.value;i=this.field.add(i,s)}}catch(d){r={error:d}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}for(var l=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)l=this.field.add(this.field.multiply(e,l),this.coefficients[c]);return l},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new M("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;te.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=this.field.add(r[s-o],n[s]);return new t(this.field,a)},t.prototype.subtract=function(e){if(!this.field.equals(e.field))throw new M("ModulusPolys do not have same ModulusGF field");return e.isZero()?this:this.add(e.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new M("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=0;s<n;s++)for(var l=r[s],u=0;u<a;u++)o[s+u]=this.field.add(o[s+u],this.field.multiply(l,i[u]));return new t(this.field,o)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(e===0)return new t(this.field,new Int32Array([0]));if(e===1)return this;for(var r=this.coefficients.length,n=new Int32Array(r),i=0;i<r;i++)n[i]=this.field.multiply(this.coefficients[i],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new M;if(r===0)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,i=new Int32Array(n+e),a=0;a<n;a++)i[a]=this.field.multiply(this.coefficients[a],r);return new t(this.field,i)},t.prototype.toString=function(){for(var e=new Q,r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);n!==0&&(n<0?(e.append(" - "),n=-n):e.length()>0&&e.append(" + "),(r===0||n!==1)&&e.append(n),r!==0&&(r===1?e.append("x"):(e.append("x^"),e.append(r))))}return e.toString()},t}(),Af=function(){function t(){}return t.prototype.add=function(e,r){return(e+r)%this.modulus},t.prototype.subtract=function(e,r){return(this.modulus+e-r)%this.modulus},t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new M;return this.logTable[e]},t.prototype.inverse=function(e){if(e===0)throw new fa;return this.expTable[this.modulus-this.logTable[e]-1]},t.prototype.multiply=function(e,r){return e===0||r===0?0:this.expTable[(this.logTable[e]+this.logTable[r])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(e){return e===this},t}(),Cf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),bf=function(t){Cf(e,t);function e(r,n){var i=t.call(this)||this;i.modulus=r,i.expTable=new Int32Array(r),i.logTable=new Int32Array(r);for(var a=1,o=0;o<r;o++)i.expTable[o]=a,a=a*n%r;for(var o=0;o<r-1;o++)i.logTable[i.expTable[o]]=o;return i.zero=new xt(i,new Int32Array([0])),i.one=new xt(i,new Int32Array([1])),i}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new M;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new xt(this,i)},e.PDF417_GF=new e(z.NUMBER_OF_CODEWORDS,3),e}(Af),Sf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},If=function(){function t(){this.field=bf.PDF417_GF}return t.prototype.decode=function(e,r,n){for(var i,a,o=new xt(this.field,e),s=new Int32Array(r),l=!1,u=r;u>0;u--){var c=o.evaluateAt(this.field.exp(u));s[r-u]=c,c!==0&&(l=!0)}if(!l)return 0;var d=this.field.getOne();if(n!=null)try{for(var v=Sf(n),h=v.next();!h.done;h=v.next()){var p=h.value,g=this.field.exp(e.length-1-p),m=new xt(this.field,new Int32Array([this.field.subtract(0,g),1]));d=d.multiply(m)}}catch(k){i={error:k}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(var w=new xt(this.field,s),y=this.runEuclideanAlgorithm(this.field.buildMonomial(r,1),w,r),_=y[0],A=y[1],C=this.findErrorLocations(_),D=this.findErrorMagnitudes(A,_,C),u=0;u<C.length;u++){var B=e.length-1-this.field.log(C[u]);if(B<0)throw ye.getChecksumInstance();e[B]=this.field.subtract(e[B],D[u])}return C.length},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=e,o=r,s=this.field.getZero(),l=this.field.getOne();o.getDegree()>=Math.round(n/2);){var u=a,c=s;if(a=o,s=l,a.isZero())throw ye.getChecksumInstance();o=u;for(var d=this.field.getZero(),v=a.getCoefficient(a.getDegree()),h=this.field.inverse(v);o.getDegree()>=a.getDegree()&&!o.isZero();){var p=o.getDegree()-a.getDegree(),g=this.field.multiply(o.getCoefficient(o.getDegree()),h);d=d.add(this.field.buildMonomial(p,g)),o=o.subtract(a.multiplyByMonomial(p,g))}l=d.multiply(s).subtract(c).negative()}var m=l.getCoefficient(0);if(m===0)throw ye.getChecksumInstance();var w=this.field.inverse(m),y=l.multiply(w),_=o.multiply(w);return[y,_]},t.prototype.findErrorLocations=function(e){for(var r=e.getDegree(),n=new Int32Array(r),i=0,a=1;a<this.field.getSize()&&i<r;a++)e.evaluateAt(a)===0&&(n[i]=this.field.inverse(a),i++);if(i!==r)throw ye.getChecksumInstance();return n},t.prototype.findErrorMagnitudes=function(e,r,n){for(var i=r.getDegree(),a=new Int32Array(i),o=1;o<=i;o++)a[i-o]=this.field.multiply(o,r.getCoefficient(o));for(var s=new xt(this.field,a),l=n.length,u=new Int32Array(l),o=0;o<l;o++){var c=this.field.inverse(n[o]),d=this.field.subtract(0,e.evaluateAt(c)),v=this.field.inverse(s.evaluateAt(c));u[o]=this.field.multiply(d,v)}return u},t}(),kn=function(){function t(e,r,n,i,a){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,i,a)}return t.prototype.constructor_1=function(e,r,n,i,a){var o=r==null||n==null,s=i==null||a==null;if(o&&s)throw new S;o?(r=new P(0,i.getY()),n=new P(0,a.getY())):s&&(i=new P(e.getWidth()-1,r.getY()),a=new P(e.getWidth()-1,n.getY())),this.image=e,this.topLeft=r,this.bottomLeft=n,this.topRight=i,this.bottomRight=a,this.minX=Math.trunc(Math.min(r.getX(),n.getX())),this.maxX=Math.trunc(Math.max(i.getX(),a.getX())),this.minY=Math.trunc(Math.min(r.getY(),i.getY())),this.maxY=Math.trunc(Math.max(n.getY(),a.getY()))},t.prototype.constructor_2=function(e){this.image=e.image,this.topLeft=e.getTopLeft(),this.bottomLeft=e.getBottomLeft(),this.topRight=e.getTopRight(),this.bottomRight=e.getBottomRight(),this.minX=e.getMinX(),this.maxX=e.getMaxX(),this.minY=e.getMinY(),this.maxY=e.getMaxY()},t.merge=function(e,r){return e==null?r:r==null?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var i=this.topLeft,a=this.bottomLeft,o=this.topRight,s=this.bottomRight;if(e>0){var l=n?this.topLeft:this.topRight,u=Math.trunc(l.getY()-e);u<0&&(u=0);var c=new P(l.getX(),u);n?i=c:o=c}if(r>0){var d=n?this.bottomLeft:this.bottomRight,v=Math.trunc(d.getY()+r);v>=this.image.getHeight()&&(v=this.image.getHeight()-1);var h=new P(d.getX(),v);n?a=h:s=h}return new t(this.image,i,a,o,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),Of=function(){function t(e,r,n,i){this.columnCount=e,this.errorCorrectionLevel=i,this.rowCountUpperPart=r,this.rowCountLowerPart=n,this.rowCount=r+n}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),Kn=function(){function t(){this.buffer=""}return t.form=function(e,r){var n=-1;function i(o,s,l,u,c,d){if(o==="%%")return"%";if(r[++n]!==void 0){o=u?parseInt(u.substr(1)):void 0;var v=c?parseInt(c.substr(1)):void 0,h;switch(d){case"s":h=r[n];break;case"c":h=r[n][0];break;case"f":h=parseFloat(r[n]).toFixed(o);break;case"p":h=parseFloat(r[n]).toPrecision(o);break;case"e":h=parseFloat(r[n]).toExponential(o);break;case"x":h=parseInt(r[n]).toString(v||16);break;case"d":h=parseFloat(parseInt(r[n],v||10).toPrecision(o)).toFixed(0);break}h=typeof h=="object"?JSON.stringify(h):(+h).toString(v);for(var p=parseInt(l),g=l&&l[0]+""=="0"?"0":" ";h.length<p;)h=s!==void 0?h+g:g+h;return h}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(a,i)},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Tf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ya=function(){function t(e){this.boundingBox=new kn(e),this.codewords=new Array(e.getMaxY()-e.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(r!=null)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var i=this.imageRowToCodewordIndex(e)-n;if(i>=0&&(r=this.codewords[i],r!=null)||(i=this.imageRowToCodewordIndex(e)+n,i<this.codewords.length&&(r=this.codewords[i],r!=null)))return r}return null},t.prototype.imageRowToCodewordIndex=function(e){return e-this.boundingBox.getMinY()},t.prototype.setCodeword=function(e,r){this.codewords[this.imageRowToCodewordIndex(e)]=r},t.prototype.getCodeword=function(e){return this.codewords[this.imageRowToCodewordIndex(e)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var e,r,n=new Kn,i=0;try{for(var a=Tf(this.codewords),o=a.next();!o.done;o=a.next()){var s=o.value;if(s==null){n.format("%3d: | %n",i++);continue}n.format("%3d: %3d|%3d%n",i++,s.getRowNumber(),s.getValue())}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),Nf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Df=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},er=function(){function t(){this.values=new Map}return t.prototype.setValue=function(e){e=Math.trunc(e);var r=this.values.get(e);r==null&&(r=0),r++,this.values.set(e,r)},t.prototype.getValue=function(){var e,r,n=-1,i=new Array,a=function(d,v){var h={getKey:function(){return d},getValue:function(){return v}};h.getValue()>n?(n=h.getValue(),i=[],i.push(h.getKey())):h.getValue()===n&&i.push(h.getKey())};try{for(var o=Nf(this.values.entries()),s=o.next();!s.done;s=o.next()){var l=Df(s.value,2),u=l[0],c=l[1];a(u,c)}}catch(d){e={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return z.toIntArray(i)},t.prototype.getConfidence=function(e){return this.values.get(e)},t}(),Bf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mi=function(t){Bf(e,t);function e(r,n){var i=t.call(this,r)||this;return i._isLeft=n,i}return e.prototype.setRowNumbers=function(){var r,n;try{for(var i=vn(this.getCodewords()),a=i.next();!a.done;a=i.next()){var o=a.value;o?.setRowNumberAsRowIndicatorColumn()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(r){var n=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(n,r);for(var i=this.getBoundingBox(),a=this._isLeft?i.getTopLeft():i.getTopRight(),o=this._isLeft?i.getBottomLeft():i.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.imageRowToCodewordIndex(Math.trunc(o.getY())),u=-1,c=1,d=0,v=s;v<l;v++)if(n[v]!=null){var h=n[v],p=h.getRowNumber()-u;if(p===0)d++;else if(p===1)c=Math.max(c,d),d=1,u=h.getRowNumber();else if(p<0||h.getRowNumber()>=r.getRowCount()||p>v)n[v]=null;else{var g=void 0;c>2?g=(c-2)*p:g=p;for(var m=g>=v,w=1;w<=g&&!m;w++)m=n[v-w]!=null;m?n[v]=null:(u=h.getRowNumber(),d=1)}}},e.prototype.getRowHeights=function(){var r,n,i=this.getBarcodeMetadata();if(i==null)return null;this.adjustIncompleteIndicatorColumnRowNumbers(i);var a=new Int32Array(i.getRowCount());try{for(var o=vn(this.getCodewords()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!=null){var u=l.getRowNumber();if(u>=a.length)continue;a[u]++}}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(r){for(var n=this.getBoundingBox(),i=this._isLeft?n.getTopLeft():n.getTopRight(),a=this._isLeft?n.getBottomLeft():n.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(i.getY())),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.getCodewords(),u=-1,c=o;c<s;c++)if(l[c]!=null){var d=l[c];d.setRowNumberAsRowIndicatorColumn();var v=d.getRowNumber()-u;v===0||(v===1?u=d.getRowNumber():d.getRowNumber()>=r.getRowCount()?l[c]=null:u=d.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var r,n,i=this.getCodewords(),a=new er,o=new er,s=new er,l=new er;try{for(var u=vn(i),c=u.next();!c.done;c=u.next()){var d=c.value;if(d!=null){d.setRowNumberAsRowIndicatorColumn();var v=d.getValue()%30,h=d.getRowNumber();switch(this._isLeft||(h+=2),h%3){case 0:o.setValue(v*3+1);break;case 1:l.setValue(v/3),s.setValue(v%3);break;case 2:a.setValue(v+1);break}}}}catch(g){r={error:g}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(a.getValue().length===0||o.getValue().length===0||s.getValue().length===0||l.getValue().length===0||a.getValue()[0]<1||o.getValue()[0]+s.getValue()[0]<z.MIN_ROWS_IN_BARCODE||o.getValue()[0]+s.getValue()[0]>z.MAX_ROWS_IN_BARCODE)return null;var p=new Of(a.getValue()[0],o.getValue()[0],s.getValue()[0],l.getValue()[0]);return this.removeIncorrectCodewords(i,p),p},e.prototype.removeIncorrectCodewords=function(r,n){for(var i=0;i<r.length;i++){var a=r[i];if(r[i]!=null){var o=a.getValue()%30,s=a.getRowNumber();if(s>n.getRowCount()){r[i]=null;continue}switch(this._isLeft||(s+=2),s%3){case 0:o*3+1!==n.getRowCountUpperPart()&&(r[i]=null);break;case 1:(Math.trunc(o/3)!==n.getErrorCorrectionLevel()||o%3!==n.getRowCountLowerPart())&&(r[i]=null);break;case 2:o+1!==n.getColumnCount()&&(r[i]=null);break}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+`
18
- `+t.prototype.toString.call(this)},e}(ya),Rf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pf=function(){function t(e,r){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=r,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var e=z.MAX_CODEWORDS_IN_BARCODE,r;do r=e,e=this.adjustRowNumbersAndGetCount();while(e>0&&e<r);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(e){e?.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var e=this.adjustRowNumbersByRow();if(e===0)return 0;for(var r=1;r<this.barcodeColumnCount+1;r++)for(var n=this.detectionResultColumns[r].getCodewords(),i=0;i<n.length;i++)n[i]!=null&&(n[i].hasValidRowNumber()||this.adjustRowNumbers(r,i,n));return e},t.prototype.adjustRowNumbersByRow=function(){this.adjustRowNumbersFromBothRI();var e=this.adjustRowNumbersFromLRI();return e+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(!(this.detectionResultColumns[0]==null||this.detectionResultColumns[this.barcodeColumnCount+1]==null)){for(var e=this.detectionResultColumns[0].getCodewords(),r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<e.length;n++)if(e[n]!=null&&r[n]!=null&&e[n].getRowNumber()===r[n].getRowNumber())for(var i=1;i<=this.barcodeColumnCount;i++){var a=this.detectionResultColumns[i].getCodewords()[n];a!=null&&(a.setRowNumber(e[n].getRowNumber()),a.hasValidRowNumber()||(this.detectionResultColumns[i].getCodewords()[n]=null))}}},t.prototype.adjustRowNumbersFromRRI=function(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=this.barcodeColumnCount+1;o>0&&a<this.ADJUST_ROW_NUMBER_SKIP;o--){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(this.detectionResultColumns[0]==null)return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=1;o<this.barcodeColumnCount+1&&a<this.ADJUST_ROW_NUMBER_SKIP;o++){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(e,r,n){return n==null||n.hasValidRowNumber()||(n.isValidRowNumber(e)?(n.setRowNumber(e),r=0):++r),r},t.prototype.adjustRowNumbers=function(e,r,n){var i,a;if(this.detectionResultColumns[e-1]!=null){var o=n[r],s=this.detectionResultColumns[e-1].getCodewords(),l=s;this.detectionResultColumns[e+1]!=null&&(l=this.detectionResultColumns[e+1].getCodewords());var u=new Array(14);u[2]=s[r],u[3]=l[r],r>0&&(u[0]=n[r-1],u[4]=s[r-1],u[5]=l[r-1]),r>1&&(u[8]=n[r-2],u[10]=s[r-2],u[11]=l[r-2]),r<n.length-1&&(u[1]=n[r+1],u[6]=s[r+1],u[7]=l[r+1]),r<n.length-2&&(u[9]=n[r+2],u[12]=s[r+2],u[13]=l[r+2]);try{for(var c=Rf(u),d=c.next();!d.done;d=c.next()){var v=d.value;if(t.adjustRowNumber(o,v))return}}catch(h){i={error:h}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}}},t.adjustRowNumber=function(e,r){return r==null?!1:r.hasValidRowNumber()&&r.getBucket()===e.getBucket()?(e.setRowNumber(r.getRowNumber()),!0):!1},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(e){this.boundingBox=e},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(e,r){this.detectionResultColumns[e]=r},t.prototype.getDetectionResultColumn=function(e){return this.detectionResultColumns[e]},t.prototype.toString=function(){var e=this.detectionResultColumns[0];e==null&&(e=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var r=new Kn,n=0;n<e.getCodewords().length;n++){r.format("CW %3d:",n);for(var i=0;i<this.barcodeColumnCount+2;i++){if(this.detectionResultColumns[i]==null){r.format(" | ");continue}var a=this.detectionResultColumns[i].getCodewords()[n];if(a==null){r.format(" | ");continue}r.format(" %3d|%3d",a.getRowNumber(),a.getValue())}r.format("%n")}return r.toString()},t}(),kf=function(){function t(e,r,n,i){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(i)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(Math.trunc(this.value/30)*3+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(e){this.rowNumber=e},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),Mf=function(){function t(){}return t.initialize=function(){for(var e=0;e<z.SYMBOL_TABLE.length;e++)for(var r=z.SYMBOL_TABLE[e],n=r&1,i=0;i<z.BARS_IN_MODULE;i++){for(var a=0;(r&1)===n;)a+=1,r>>=1;n=r&1,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(z.BARS_IN_MODULE)),t.RATIOS_TABLE[e][z.BARS_IN_MODULE-i-1]=Math.fround(a/z.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return r!==-1?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(e){for(var r=W.sum(e),n=new Int32Array(z.BARS_IN_MODULE),i=0,a=0,o=0;o<z.MODULES_IN_CODEWORD;o++){var s=r/(2*z.MODULES_IN_CODEWORD)+o*r/z.MODULES_IN_CODEWORD;a+e[i]<=s&&(a+=e[i],i++),n[i]++}return n},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return z.getCodeword(r)===-1?-1:r},t.getBitValue=function(e){for(var r=0,n=0;n<e.length;n++)for(var i=0;i<e[n];i++)r=r<<1|(n%2===0?1:0);return Math.trunc(r)},t.getClosestDecodedValue=function(e){var r=W.sum(e),n=new Array(z.BARS_IN_MODULE);if(r>1)for(var i=0;i<n.length;i++)n[i]=Math.fround(e[i]/r);var a=Tn.MAX_VALUE,o=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var l=0,u=t.RATIOS_TABLE[s],c=0;c<z.BARS_IN_MODULE;c++){var d=Math.fround(u[c]-n[c]);if(l+=Math.fround(d*d),l>=a)break}l<a&&(a=l,o=z.SYMBOL_TABLE[s])}return o},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(z.SYMBOL_TABLE.length).map(function(e){return new Array(z.BARS_IN_MODULE)}),t}(),Lf=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(e){this.segmentIndex=e},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(e){this.fileId=e},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(e){this.optionalData=e},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(e){this.lastSegment=e},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(e){this.segmentCount=e},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(e){this.sender=e},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(e){this.addressee=e},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(e){this.fileName=e},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(e){this.fileSize=e},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(e){this.checksum=e},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(e){this.timestamp=e},t}(),Li=function(){function t(){}return t.parseLong=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t}(),Ff=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vf=function(t){Ff(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="NullPointerException",e}(Ce),Uf=function(){function t(){}return t.prototype.writeBytes=function(e){this.writeBytesOffset(e,0,e.length)},t.prototype.writeBytesOffset=function(e,r,n){if(e==null)throw new Vf;if(r<0||r>e.length||n<0||r+n>e.length||r+n<0)throw new zn;if(n===0)return;for(var i=0;i<n;i++)this.write(e[r+i])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),$f=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hf=function(t){$f(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ce),Gf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zf=function(t){Gf(e,t);function e(r){r===void 0&&(r=32);var n=t.call(this)||this;if(n.count=0,r<0)throw new M("Negative initial size: "+r);return n.buf=new Uint8Array(r),n}return e.prototype.ensureCapacity=function(r){r-this.buf.length>0&&this.grow(r)},e.prototype.grow=function(r){var n=this.buf.length,i=n<<1;if(i-r<0&&(i=r),i<0){if(r<0)throw new Hf;i=H.MAX_VALUE}this.buf=Ne.copyOfUint8Array(this.buf,i)},e.prototype.write=function(r){this.ensureCapacity(this.count+1),this.buf[this.count]=r,this.count+=1},e.prototype.writeBytesOffset=function(r,n,i){if(n<0||n>r.length||i<0||n+i-r.length>0)throw new zn;this.ensureCapacity(this.count+i),te.arraycopy(r,n,this.buf,this.count,i),this.count+=i},e.prototype.writeTo=function(r){r.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return Ne.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(r){return r?typeof r=="string"?this.toString_string(r):this.toString_number(r):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(r){return new String(this.buf).toString()},e.prototype.toString_number=function(r){return new String(this.buf).toString()},e.prototype.close=function(){},e}(Uf),q;(function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"})(q||(q={}));function ma(){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!")}var yr;function at(t){if(typeof yr>"u"&&(yr=ma()),yr===null)throw new Error("BigInt is not supported!");return yr(t)}function Wf(){var t=[];t[0]=at(1);var e=at(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}var Xf=function(){function t(){}return t.decode=function(e,r){var n=new Q(""),i=de.ISO8859_1;n.enableDecoding(i);for(var a=1,o=e[a++],s=new Lf;a<e[0];){switch(o){case t.TEXT_COMPACTION_MODE_LATCH:a=t.textCompaction(e,a,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:a=t.byteCompaction(o,e,i,a,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:a=t.numericCompaction(e,a,n);break;case t.ECI_CHARSET:de.getCharacterSetECIByValue(e[a++]);break;case t.ECI_GENERAL_PURPOSE:a+=2;break;case t.ECI_USER_DEFINED:a++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:a=t.decodeMacroBlock(e,a,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new R;default:a--,a=t.textCompaction(e,a,n);break}if(a<e.length)o=e[a++];else throw R.getFormatInstance()}if(n.length()===0)throw R.getFormatInstance();var l=new Hr(null,n.toString(),null,r);return l.setOther(s),l},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw R.getFormatInstance();for(var i=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),a=0;a<t.NUMBER_OF_SEQUENCE_CODEWORDS;a++,r++)i[a]=e[r];n.setSegmentIndex(H.parseInt(t.decodeBase900toBase10(i,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var o=new Q;r=t.textCompaction(e,r,o),n.setFileId(o.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(r++,e[r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var l=new Q;r=t.textCompaction(e,r+1,l),n.setFileName(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var u=new Q;r=t.textCompaction(e,r+1,u),n.setSender(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var c=new Q;r=t.textCompaction(e,r+1,c),n.setAddressee(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new Q;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(H.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var v=new Q;r=t.numericCompaction(e,r+1,v),n.setTimestamp(Li.parseLong(v.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new Q;r=t.numericCompaction(e,r+1,h),n.setChecksum(H.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new Q;r=t.numericCompaction(e,r+1,p),n.setFileSize(Li.parseLong(p.toString()));break;default:throw R.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw R.getFormatInstance()}if(s!==-1){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(Ne.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var i=new Int32Array((e[0]-r)*2),a=new Int32Array((e[0]-r)*2),o=0,s=!1;r<e[0]&&!s;){var l=e[r++];if(l<t.TEXT_COMPACTION_MODE_LATCH)i[o]=l/30,i[o+1]=l%30,o+=2;else switch(l){case t.TEXT_COMPACTION_MODE_LATCH:i[o++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i[o]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,l=e[r++],a[o]=l,o++;break}}return t.decodeTextCompaction(i,a,o,n),r},t.decodeTextCompaction=function(e,r,n,i){for(var a=q.ALPHA,o=q.ALPHA,s=0;s<n;){var l=e[s],u="";switch(a){case q.ALPHA:if(l<26)u=String.fromCharCode(65+l);else switch(l){case 26:u=" ";break;case t.LL:a=q.LOWER;break;case t.ML:a=q.MIXED;break;case t.PS:o=a,a=q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.LOWER:if(l<26)u=String.fromCharCode(97+l);else switch(l){case 26:u=" ";break;case t.AS:o=a,a=q.ALPHA_SHIFT;break;case t.ML:a=q.MIXED;break;case t.PS:o=a,a=q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.MIXED:if(l<t.PL)u=t.MIXED_CHARS[l];else switch(l){case t.PL:a=q.PUNCT;break;case 26:u=" ";break;case t.LL:a=q.LOWER;break;case t.AL:a=q.ALPHA;break;case t.PS:o=a,a=q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.PUNCT:if(l<t.PAL)u=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.ALPHA_SHIFT:if(a=o,l<26)u=String.fromCharCode(65+l);else switch(l){case 26:u=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.PUNCT_SHIFT:if(a=o,l<t.PAL)u=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break}u!==""&&i.append(u),s++}},t.byteCompaction=function(e,r,n,i,a){var o=new zf,s=0,l=0,u=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var c=new Int32Array(6),d=r[i++];i<r[0]&&!u;)switch(c[s++]=d,l=900*l+d,d=r[i++],d){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,u=!0;break;default:if(s%5===0&&s>0){for(var v=0;v<6;++v)o.write(Number(at(l)>>at(8*(5-v))));l=0,s=0}break}i===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(c[s++]=d);for(var h=0;h<s;h++)o.write(c[h]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;i<r[0]&&!u;){var p=r[i++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,l=900*l+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,u=!0;break}if(s%5===0&&s>0){for(var v=0;v<6;++v)o.write(Number(at(l)>>at(8*(5-v))));l=0,s=0}}break}return a.append(je.decode(o.toByteArray(),n)),i},t.numericCompaction=function(e,r,n){for(var i=0,a=!1,o=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!a;){var s=e[r++];if(r===e[0]&&(a=!0),s<t.TEXT_COMPACTION_MODE_LATCH)o[i]=s,i++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,a=!0;break}(i%t.MAX_NUMERIC_CODEWORDS===0||s===t.NUMERIC_COMPACTION_MODE_LATCH||a)&&i>0&&(n.append(t.decodeBase900toBase10(o,i)),i=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=at(0),i=0;i<r;i++)n+=t.EXP900[r-i-1]*at(e[i]);var a=n.toString();if(a.charAt(0)!=="1")throw new R;return a.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=`;<>@[\\]_\`~!\r ,:
19
- -.$/"|*()?{}'`,t.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",t.EXP900=ma()?Wf():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),Xt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jf=function(){function t(){}return t.decode=function(e,r,n,i,a,o,s){for(var l=new kn(e,r,n,i,a),u=null,c=null,d,v=!0;;v=!1){if(r!=null&&(u=t.getRowIndicatorColumn(e,l,r,!0,o,s)),i!=null&&(c=t.getRowIndicatorColumn(e,l,i,!1,o,s)),d=t.merge(u,c),d==null)throw S.getNotFoundInstance();var h=d.getBoundingBox();if(v&&h!=null&&(h.getMinY()<l.getMinY()||h.getMaxY()>l.getMaxY()))l=h;else break}d.setBoundingBox(l);var p=d.getBarcodeColumnCount()+1;d.setDetectionResultColumn(0,u),d.setDetectionResultColumn(p,c);for(var g=u!=null,m=1;m<=p;m++){var w=g?m:p-m;if(d.getDetectionResultColumn(w)===void 0){var y=void 0;w===0||w===p?y=new Mi(l,w===0):y=new ya(l),d.setDetectionResultColumn(w,y);for(var _=-1,A=_,C=l.getMinY();C<=l.getMaxY();C++){if(_=t.getStartColumn(d,w,C,g),_<0||_>l.getMaxX()){if(A===-1)continue;_=A}var D=t.detectCodeword(e,l.getMinX(),l.getMaxX(),g,_,C,o,s);D!=null&&(y.setCodeword(C,D),A=_,o=Math.min(o,D.getWidth()),s=Math.max(s,D.getWidth()))}}}return t.createDecoderResult(d)},t.merge=function(e,r){if(e==null&&r==null)return null;var n=t.getBarcodeMetadata(e,r);if(n==null)return null;var i=kn.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Pf(n,i)},t.adjustBoundingBox=function(e){var r,n;if(e==null)return null;var i=e.getRowHeights();if(i==null)return null;var a=t.getMax(i),o=0;try{for(var s=Xt(i),l=s.next();!l.done;l=s.next()){var u=l.value;if(o+=a-u,u>0)break}}catch(h){r={error:h}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var c=e.getCodewords(),d=0;o>0&&c[d]==null;d++)o--;for(var v=0,d=i.length-1;d>=0&&(v+=a-i[d],!(i[d]>0));d--);for(var d=c.length-1;v>0&&c[d]==null;d--)v--;return e.getBoundingBox().addMissingRows(o,v,e.isLeft())},t.getMax=function(e){var r,n,i=-1;try{for(var a=Xt(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=Math.max(i,s)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.getBarcodeMetadata=function(e,r){var n;if(e==null||(n=e.getBarcodeMetadata())==null)return r==null?null:r.getBarcodeMetadata();var i;return r==null||(i=r.getBarcodeMetadata())==null?n:n.getColumnCount()!==i.getColumnCount()&&n.getErrorCorrectionLevel()!==i.getErrorCorrectionLevel()&&n.getRowCount()!==i.getRowCount()?null:n},t.getRowIndicatorColumn=function(e,r,n,i,a,o){for(var s=new Mi(r,i),l=0;l<2;l++)for(var u=l===0?1:-1,c=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=u){var v=t.detectCodeword(e,0,e.getWidth(),i,c,d,a,o);v!=null&&(s.setCodeword(d,v),i?c=v.getStartX():c=v.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],i=n.getValue(),a=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(i.length===0){if(a<1||a>z.MAX_CODEWORDS_IN_BARCODE)throw S.getNotFoundInstance();n.setValue(a)}else i[0]!==a&&n.setValue(a)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,i=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),a=[],o=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var l=0;l<e.getBarcodeColumnCount();l++){var u=r[s][l+1].getValue(),c=s*e.getBarcodeColumnCount()+l;u.length===0?n.push(c):u.length===1?i[c]=u[0]:(o.push(c),a.push(u))}for(var d=new Array(a.length),v=0;v<d.length;v++)d[v]=a[v];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),i,z.toIntArray(n),z.toIntArray(o),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,i,a){for(var o=new Int32Array(i.length),s=100;s-- >0;){for(var l=0;l<o.length;l++)r[i[l]]=a[l][o[l]];try{return t.decodeCodewords(r,e,n)}catch(c){var u=c instanceof ye;if(!u)throw c}if(o.length===0)throw ye.getChecksumInstance();for(var l=0;l<o.length;l++)if(o[l]<a[l].length-1){o[l]++;break}else if(o[l]=0,l===o.length-1)throw ye.getChecksumInstance()}throw ye.getChecksumInstance()},t.createBarcodeMatrix=function(e){for(var r,n,i,a,o=Array.from({length:e.getBarcodeRowCount()},function(){return new Array(e.getBarcodeColumnCount()+2)}),s=0;s<o.length;s++)for(var l=0;l<o[s].length;l++)o[s][l]=new er;var u=0;try{for(var c=Xt(e.getDetectionResultColumns()),d=c.next();!d.done;d=c.next()){var v=d.value;if(v!=null)try{for(var h=(i=void 0,Xt(v.getCodewords())),p=h.next();!p.done;p=h.next()){var g=p.value;if(g!=null){var m=g.getRowNumber();if(m>=0){if(m>=o.length)continue;o[m][u].setValue(g.getValue())}}}}catch(w){i={error:w}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}u++}}catch(w){r={error:w}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return o},t.isValidBarcodeColumn=function(e,r){return r>=0&&r<=e.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,i){var a,o,s=i?1:-1,l=null;if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodeword(n)),l!=null)return i?l.getEndX():l.getStartX();if(l=e.getDetectionResultColumn(r).getCodewordNearby(n),l!=null)return i?l.getStartX():l.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),l!=null)return i?l.getEndX():l.getStartX();for(var u=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var c=(a=void 0,Xt(e.getDetectionResultColumn(r).getCodewords())),d=c.next();!d.done;d=c.next()){var v=d.value;if(v!=null)return(i?v.getEndX():v.getStartX())+s*u*(v.getEndX()-v.getStartX())}}catch(h){a={error:h}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}u++}return i?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,i,a,o,s,l){a=t.adjustCodewordStartColumn(e,r,n,i,a,o);var u=t.getModuleBitCount(e,r,n,i,a,o);if(u==null)return null;var c,d=W.sum(u);if(i)c=a+d;else{for(var v=0;v<u.length/2;v++){var h=u[v];u[v]=u[u.length-1-v],u[u.length-1-v]=h}c=a,a=c-d}if(!t.checkCodewordSkew(d,s,l))return null;var p=Mf.getDecodedValue(u),g=z.getCodeword(p);return g===-1?null:new kf(a,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(e,r,n,i,a,o){for(var s=a,l=new Int32Array(8),u=0,c=i?1:-1,d=i;(i?s<n:s>=r)&&u<l.length;)e.get(s,o)===d?(l[u]++,s+=c):(u++,d=!d);return u===l.length||s===(i?n:r)&&u===l.length-1?l:null},t.getNumberOfECCodeWords=function(e){return 2<<e},t.adjustCodewordStartColumn=function(e,r,n,i,a,o){for(var s=a,l=i?-1:1,u=0;u<2;u++){for(;(i?s>=r:s<n)&&i===e.get(s,o);){if(Math.abs(a-s)>t.CODEWORD_SKEW_SIZE)return a;s+=l}l=-l,i=!i}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(e.length===0)throw R.getFormatInstance();var i=1<<r+1,a=t.correctErrors(e,n,i);t.verifyCodewordCount(e,i);var o=Xf.decode(e,""+r);return o.setErrorsCorrected(a),o.setErasures(n.length),o},t.correctErrors=function(e,r,n){if(r!=null&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw ye.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(e,r){if(e.length<4)throw R.getFormatInstance();var n=e[0];if(n>e.length)throw R.getFormatInstance();if(n===0)if(r<e.length)e[0]=e.length-r;else throw R.getFormatInstance()},t.getBitCountForCodeword=function(e){for(var r=new Int32Array(8),n=0,i=r.length-1;!((e&1)!==n&&(n=e&1,i--,i<0));)r[i]++,e>>=1;return r},t.getCodewordBucketNumber=function(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(e){return(e[0]-e[2]+e[4]-e[6]+9)%9},t.toString=function(e){for(var r=new Kn,n=0;n<e.length;n++){r.format("Row %2d: ",n);for(var i=0;i<e[n].length;i++){var a=e[n][i];a.getValue().length===0?r.format(" ",null):r.format("%4d(%2d)",a.getValue()[0],a.getConfidence(a.getValue()[0]))}r.format("%n")}return r.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new If,t}(),Yf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mn=function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=t.decode(e,r,!1);if(n==null||n.length===0||n[0]==null)throw S.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){r===void 0&&(r=null);try{return t.decode(e,r,!0)}catch(n){throw n instanceof R||n instanceof ye?S.getNotFoundInstance():n}},t.decode=function(e,r,n){var i,a,o=new Array,s=_f.detectMultiple(e,r,n);try{for(var l=Yf(s.getPoints()),u=l.next();!u.done;u=l.next()){var c=u.value,d=jf.decode(s.getBits(),c[4],c[5],c[6],c[7],t.getMinCodewordWidth(c),t.getMaxCodewordWidth(c)),v=new De(d.getText(),d.getRawBytes(),void 0,c,F.PDF_417);v.putMetadata(me.ERROR_CORRECTION_LEVEL,d.getECLevel());var h=d.getOther();h!=null&&v.putMetadata(me.PDF417_EXTRA_METADATA,h),o.push(v)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return o.map(function(p){return p})},t.getMaxWidth=function(e,r){return e==null||r==null?0:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMinWidth=function(e,r){return e==null||r==null?H.MAX_VALUE:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),Kf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fi=function(t){Kf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReaderException",e}(Ce),Vi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zf=function(){function t(){}return t.prototype.decode=function(e,r){return this.setHints(r),this.decodeInternal(e)},t.prototype.decodeWithState=function(e){return(this.readers===null||this.readers===void 0)&&this.setHints(null),this.decodeInternal(e)},t.prototype.setHints=function(e){this.hints=e;var r=e!=null&&e.get(se.TRY_HARDER)!==void 0,n=e==null?null:e.get(se.POSSIBLE_FORMATS),i=new Array;if(n!=null){var a=n.some(function(o){return o===F.UPC_A||o===F.UPC_E||o===F.EAN_13||o===F.EAN_8||o===F.CODABAR||o===F.CODE_39||o===F.CODE_93||o===F.CODE_128||o===F.ITF||o===F.RSS_14||o===F.RSS_EXPANDED});a&&!r&&i.push(new Jt(e)),n.includes(F.QR_CODE)&&i.push(new Pn),n.includes(F.DATA_MATRIX)&&i.push(new Rn),n.includes(F.AZTEC)&&i.push(new Dn),n.includes(F.PDF_417)&&i.push(new Mn),a&&r&&i.push(new Jt(e))}i.length===0&&(r||i.push(new Jt(e)),i.push(new Pn),i.push(new Rn),i.push(new Dn),i.push(new Mn),r&&i.push(new Jt(e))),this.readers=i},t.prototype.reset=function(){var e,r;if(this.readers!==null)try{for(var n=Vi(this.readers),i=n.next();!i.done;i=n.next()){var a=i.value;a.reset()}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.decodeInternal=function(e){var r,n;if(this.readers===null)throw new Fi("No readers where selected, nothing can be read.");try{for(var i=Vi(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;try{return o.decode(e,this.hints)}catch(s){if(s instanceof Fi)continue}}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}throw new S("No MultiFormat Readers were able to detect the code.")},t}(),qf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qf=function(t){qf(e,t);function e(r,n){r===void 0&&(r=null),n===void 0&&(n=500);var i=this,a=new Zf;return a.setHints(r),i=t.call(this,a,n)||this,i}return e.prototype.decodeBitmap=function(r){return this.reader.decodeWithState(r)},e}(Mt),Jf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){Jf(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Mn,r)||this}return e})(Mt);var ec=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){ec(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Pn,r)||this}return e})(Mt);var Ln;(function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"})(Ln||(Ln={}));const mr=Ln;var wa=function(){function t(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new lt(e,Int32Array.from([1])))}return t.prototype.buildGenerator=function(e){var r=this.cachedGenerators;if(e>=r.length)for(var n=r[r.length-1],i=this.field,a=r.length;a<=e;a++){var o=n.multiply(new lt(i,Int32Array.from([1,i.exp(a-1+i.getGeneratorBase())])));r.push(o),n=o}return r[e]},t.prototype.encode=function(e,r){if(r===0)throw new M("No error correction bytes");var n=e.length-r;if(n<=0)throw new M("No data bytes provided");var i=this.buildGenerator(r),a=new Int32Array(n);te.arraycopy(e,0,a,0,n);var o=new lt(this.field,a);o=o.multiplyByMonomial(r,1);for(var s=o.divide(i)[1],l=s.getCoefficients(),u=r-l.length,c=0;c<u;c++)e[n+c]=0;te.arraycopy(l,0,e,n+u,l.length)},t}(),tr=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a-1;o++)for(var s=n[o],l=0;l<i-1;l++){var u=s[l];u===s[l+1]&&u===n[o+1][l]&&u===n[o+1][l+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=0;s<i;s++){var l=n[o];s+6<i&&l[s]===1&&l[s+1]===0&&l[s+2]===1&&l[s+3]===1&&l[s+4]===1&&l[s+5]===0&&l[s+6]===1&&(t.isWhiteHorizontal(l,s-4,s)||t.isWhiteHorizontal(l,s+7,s+11))&&r++,o+6<a&&n[o][s]===1&&n[o+1][s]===0&&n[o+2][s]===1&&n[o+3][s]===1&&n[o+4][s]===1&&n[o+5][s]===0&&n[o+6][s]===1&&(t.isWhiteVertical(n,s,o-4,o)||t.isWhiteVertical(n,s,o+7,o+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(e,r,n){r=Math.max(r,0),n=Math.min(n,e.length);for(var i=r;i<n;i++)if(e[i]===1)return!1;return!0},t.isWhiteVertical=function(e,r,n,i){n=Math.max(n,0),i=Math.min(i,e.length);for(var a=n;a<i;a++)if(e[a][r]===1)return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=n[o],l=0;l<i;l++)s[l]===1&&r++;var u=e.getHeight()*e.getWidth(),c=Math.floor(Math.abs(r*2-u)*10/u);return c*t.N4},t.getDataMaskBit=function(e,r,n){var i,a;switch(e){case 0:i=n+r&1;break;case 1:i=n&1;break;case 2:i=r%3;break;case 3:i=(n+r)%3;break;case 4:i=Math.floor(n/2)+Math.floor(r/3)&1;break;case 5:a=n*r,i=(a&1)+a%3;break;case 6:a=n*r,i=(a&1)+a%3&1;break;case 7:a=n*r,i=a%3+(n+r&1)&1;break;default:throw new M("Invalid mask pattern: "+e)}return i===0},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,i=r?e.getHeight():e.getWidth(),a=r?e.getWidth():e.getHeight(),o=e.getArray(),s=0;s<i;s++){for(var l=0,u=-1,c=0;c<a;c++){var d=r?o[s][c]:o[c][s];d===u?l++:(l>=5&&(n+=t.N1+(l-5)),l=1,u=d)}l>=5&&(n+=t.N1+(l-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),tc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rc=function(){function t(e,r){this.width=e,this.height=r;for(var n=new Array(r),i=0;i!==r;i++)n[i]=new Uint8Array(e);this.bytes=n}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(e,r){return this.bytes[r][e]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(e,r,n){this.bytes[r][e]=n},t.prototype.setBoolean=function(e,r,n){this.bytes[r][e]=n?1:0},t.prototype.clear=function(e){var r,n;try{for(var i=tc(this.bytes),a=i.next();!a.done;a=i.next()){var o=a.value;Ne.fill(o,e)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width||this.height!==r.height)return!1;for(var n=0,i=this.height;n<i;++n)for(var a=this.bytes[n],o=r.bytes[n],s=0,l=this.width;s<l;++s)if(a[s]!==o[s])return!1;return!0},t.prototype.toString=function(){for(var e=new Q,r=0,n=this.height;r<n;++r){for(var i=this.bytes[r],a=0,o=this.width;a<o;++a)switch(i[a]){case 0:e.append(" 0");break;case 1:e.append(" 1");break;default:e.append(" ");break}e.append(`
17
+ `,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),W=function(){function t(){}return t.round=function(e){return isNaN(e)?0:e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0},t.distance=function(e,r,n,i){var a=e-n,o=r-i;return Math.sqrt(a*a+o*o)},t.sum=function(e){for(var r=0,n=0,i=e.length;n!==i;n++){var a=e[n];r+=a}return r},t}(),Tn=function(){function t(){}return t.floatToIntBits=function(e){return e},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),k=function(){function t(e,r){this.x=e,this.y=r}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Tn.floatToIntBits(this.x)+Tn.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(e){var r=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),i=this.distance(e[0],e[2]),a,o,s;if(n>=r&&n>=i?(o=e[0],a=e[1],s=e[2]):i>=n&&i>=r?(o=e[1],a=e[0],s=e[2]):(o=e[2],a=e[0],s=e[1]),this.crossProductZ(a,o,s)<0){var l=a;a=s,s=l}e[0]=a,e[1]=o,e[2]=s},t.distance=function(e,r){return W.distance(e.x,e.y,r.x,r.y)},t.crossProductZ=function(e,r,n){var i=r.x,a=r.y;return(n.x-i)*(e.y-a)-(n.y-a)*(e.x-i)},t}(),Xn=function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),Gu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),zu=function(t){Gu(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n)||this;return s.compact=i,s.nbDatablocks=a,s.nbLayers=o,s}return e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Xn),Nn=function(){function t(e,r,n,i){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),r==null&&(r=t.INIT_SIZE),n==null&&(n=e.getWidth()/2|0),i==null&&(i=e.getHeight()/2|0);var a=r/2|0;if(this.leftInit=n-a,this.rightInit=n+a,this.upInit=i-a,this.downInit=i+a,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new I}return t.prototype.detect=function(){for(var e=this.leftInit,r=this.rightInit,n=this.upInit,i=this.downInit,a=!1,o=!0,s=!1,l=!1,u=!1,c=!1,d=!1,v=this.width,h=this.height;o;){o=!1;for(var p=!0;(p||!l)&&r<v;)p=this.containsBlackPoint(n,i,r,!1),p?(r++,o=!0,l=!0):l||r++;if(r>=v){a=!0;break}for(var g=!0;(g||!u)&&i<h;)g=this.containsBlackPoint(e,r,i,!0),g?(i++,o=!0,u=!0):u||i++;if(i>=h){a=!0;break}for(var w=!0;(w||!c)&&e>=0;)w=this.containsBlackPoint(n,i,e,!1),w?(e--,o=!0,c=!0):c||e--;if(e<0){a=!0;break}for(var _=!0;(_||!d)&&n>=0;)_=this.containsBlackPoint(e,r,n,!0),_?(n--,o=!0,d=!0):d||n--;if(n<0){a=!0;break}o&&(s=!0)}if(!a&&s){for(var m=r-e,A=null,y=1;A===null&&y<m;y++)A=this.getBlackPointOnSegment(e,i-y,e+y,i);if(A==null)throw new I;for(var C=null,y=1;C===null&&y<m;y++)C=this.getBlackPointOnSegment(e,n+y,e+y,n);if(C==null)throw new I;for(var b=null,y=1;b===null&&y<m;y++)b=this.getBlackPointOnSegment(r,n+y,r-y,n);if(b==null)throw new I;for(var O=null,y=1;O===null&&y<m;y++)O=this.getBlackPointOnSegment(r,i-y,r-y,i);if(O==null)throw new I;return this.centerEdges(O,A,b,C)}else throw new I},t.prototype.getBlackPointOnSegment=function(e,r,n,i){for(var a=W.round(W.distance(e,r,n,i)),o=(n-e)/a,s=(i-r)/a,l=this.image,u=0;u<a;u++){var c=W.round(e+u*o),d=W.round(r+u*s);if(l.get(c,d))return new k(c,d)}return null},t.prototype.centerEdges=function(e,r,n,i){var a=e.getX(),o=e.getY(),s=r.getX(),l=r.getY(),u=n.getX(),c=n.getY(),d=i.getX(),v=i.getY(),h=t.CORR;return a<this.width/2?[new k(d-h,v+h),new k(s+h,l+h),new k(u-h,c-h),new k(a+h,o-h)]:[new k(d+h,v+h),new k(s+h,l-h),new k(u-h,c+h),new k(a-h,o-h)]},t.prototype.containsBlackPoint=function(e,r,n,i){var a=this.image;if(i){for(var o=e;o<=r;o++)if(a.get(o,n))return!0}else for(var s=e;s<=r;s++)if(a.get(n,s))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),mi=function(){function t(){}return t.checkAndNudgePoints=function(e,r){for(var n=e.getWidth(),i=e.getHeight(),a=!0,o=0;o<r.length&&a;o+=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new I;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}a=!0;for(var o=r.length-2;o>=0&&a;o-=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new I;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}},t}(),ca=function(){function t(e,r,n,i,a,o,s,l,u){this.a11=e,this.a21=r,this.a31=n,this.a12=i,this.a22=a,this.a32=o,this.a13=s,this.a23=l,this.a33=u}return t.quadrilateralToQuadrilateral=function(e,r,n,i,a,o,s,l,u,c,d,v,h,p,g,w){var _=t.quadrilateralToSquare(e,r,n,i,a,o,s,l),m=t.squareToQuadrilateral(u,c,d,v,h,p,g,w);return m.times(_)},t.prototype.transformPoints=function(e){for(var r=e.length,n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,u=this.a31,c=this.a32,d=this.a33,v=0;v<r;v+=2){var h=e[v],p=e[v+1],g=a*h+l*p+d;e[v]=(n*h+o*p+u)/g,e[v+1]=(i*h+s*p+c)/g}},t.prototype.transformPointsWithValues=function(e,r){for(var n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,u=this.a31,c=this.a32,d=this.a33,v=e.length,h=0;h<v;h++){var p=e[h],g=r[h],w=a*p+l*g+d;e[h]=(n*p+o*g+u)/w,r[h]=(i*p+s*g+c)/w}},t.squareToQuadrilateral=function(e,r,n,i,a,o,s,l){var u=e-n+a-s,c=r-i+o-l;if(u===0&&c===0)return new t(n-e,a-n,e,i-r,o-i,r,0,0,1);var d=n-a,v=s-a,h=i-o,p=l-o,g=d*p-v*h,w=(u*p-v*c)/g,_=(d*c-u*h)/g;return new t(n-e+w*n,s-e+_*s,e,i-r+w*i,l-r+_*l,r,w,_,1)},t.quadrilateralToSquare=function(e,r,n,i,a,o,s,l){return t.squareToQuadrilateral(e,r,n,i,a,o,s,l).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t}(),Wu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xu=function(t){Wu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.sampleGrid=function(r,n,i,a,o,s,l,u,c,d,v,h,p,g,w,_,m,A,y){var C=ca.quadrilateralToQuadrilateral(a,o,s,l,u,c,d,v,h,p,g,w,_,m,A,y);return this.sampleGridWithTransform(r,n,i,C)},e.prototype.sampleGridWithTransform=function(r,n,i,a){if(n<=0||i<=0)throw new I;for(var o=new Ze(n,i),s=new Float32Array(2*n),l=0;l<i;l++){for(var u=s.length,c=l+.5,d=0;d<u;d+=2)s[d]=d/2+.5,s[d+1]=c;a.transformPoints(s),mi.checkAndNudgePoints(r,s);try{for(var d=0;d<u;d+=2)r.get(Math.floor(s[d]),Math.floor(s[d+1]))&&o.set(d/2,l)}catch{throw new I}}return o},e}(mi),jn=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new Xu,t}(),Se=function(){function t(e,r){this.x=e,this.y=r}return t.prototype.toResultPoint=function(){return new k(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),ju=function(){function t(e){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=e}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(e){var r=this.getMatrixCenter(),n=this.getBullsEyeCorners(r);if(e){var i=n[0];n[0]=n[2],n[2]=i}this.extractParameters(n);var a=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),o=this.getMatrixCornerPoints(n);return new zu(a,o,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(e){if(!this.isValidPoint(e[0])||!this.isValidPoint(e[1])||!this.isValidPoint(e[2])||!this.isValidPoint(e[3]))throw new I;var r=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(e[0],e[1],r),this.sampleLine(e[1],e[2],r),this.sampleLine(e[2],e[3],r),this.sampleLine(e[3],e[0],r)]);this.shift=this.getRotation(n,r);for(var i=0,a=0;a<4;a++){var o=n[(this.shift+a)%4];this.compact?(i<<=7,i+=o>>1&127):(i<<=10,i+=(o>>2&992)+(o>>1&31))}var s=this.getCorrectedParameterData(i,this.compact);this.compact?(this.nbLayers=(s>>6)+1,this.nbDataBlocks=(s&63)+1):(this.nbLayers=(s>>11)+1,this.nbDataBlocks=(s&2047)+1)},t.prototype.getRotation=function(e,r){var n=0;e.forEach(function(a,o,s){var l=(a>>r-2<<1)+(a&1);n=(n<<3)+l}),n=((n&1)<<11)+(n>>1);for(var i=0;i<4;i++)if(G.bitCount(n^this.EXPECTED_CORNER_BITS[i])<=2)return i;throw new I},t.prototype.getCorrectedParameterData=function(e,r){var n,i;r?(n=7,i=2):(n=10,i=4);for(var a=n-i,o=new Int32Array(n),s=n-1;s>=0;--s)o[s]=e&15,e>>=4;try{var l=new Xr(Ne.AZTEC_PARAM);l.decode(o,a)}catch{throw new I}for(var u=0,s=0;s<i;s++)u=(u<<4)+o[s];return u},t.prototype.getBullsEyeCorners=function(e){var r=e,n=e,i=e,a=e,o=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var s=this.getFirstDifferent(r,o,1,-1),l=this.getFirstDifferent(n,o,1,1),u=this.getFirstDifferent(i,o,-1,1),c=this.getFirstDifferent(a,o,-1,-1);if(this.nbCenterLayers>2){var d=this.distancePoint(c,s)*this.nbCenterLayers/(this.distancePoint(a,r)*(this.nbCenterLayers+2));if(d<.75||d>1.25||!this.isWhiteOrBlackRectangle(s,l,u,c))break}r=s,n=l,i=u,a=c,o=!o}if(this.nbCenterLayers!==5&&this.nbCenterLayers!==7)throw new I;this.compact=this.nbCenterLayers===5;var v=new k(r.getX()+.5,r.getY()-.5),h=new k(n.getX()+.5,n.getY()+.5),p=new k(i.getX()-.5,i.getY()+.5),g=new k(a.getX()-.5,a.getY()-.5);return this.expandSquare([v,h,p,g],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var e,r,n,i;try{var a=new Nn(this.image).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{var o=this.image.getWidth()/2,s=this.image.getHeight()/2;e=this.getFirstDifferent(new Se(o+7,s-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Se(o+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Se(o-7,s+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Se(o-7,s-7),!1,-1,-1).toResultPoint()}var l=W.round((e.getX()+i.getX()+r.getX()+n.getX())/4),u=W.round((e.getY()+i.getY()+r.getY()+n.getY())/4);try{var a=new Nn(this.image,15,l,u).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{e=this.getFirstDifferent(new Se(l+7,u-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Se(l+7,u+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Se(l-7,u+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Se(l-7,u-7),!1,-1,-1).toResultPoint()}return l=W.round((e.getX()+i.getX()+r.getX()+n.getX())/4),u=W.round((e.getY()+i.getY()+r.getY()+n.getY())/4),new Se(l,u)},t.prototype.getMatrixCornerPoints=function(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(e,r,n,i,a){var o=jn.getInstance(),s=this.getDimension(),l=s/2-this.nbCenterLayers,u=s/2+this.nbCenterLayers;return o.sampleGrid(e,s,s,l,l,u,l,u,u,l,u,r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY(),a.getX(),a.getY())},t.prototype.sampleLine=function(e,r,n){for(var i=0,a=this.distanceResultPoint(e,r),o=a/n,s=e.getX(),l=e.getY(),u=o*(r.getX()-e.getX())/a,c=o*(r.getY()-e.getY())/a,d=0;d<n;d++)this.image.get(W.round(s+d*u),W.round(l+d*c))&&(i|=1<<n-d-1);return i},t.prototype.isWhiteOrBlackRectangle=function(e,r,n,i){var a=3;e=new Se(e.getX()-a,e.getY()+a),r=new Se(r.getX()-a,r.getY()-a),n=new Se(n.getX()+a,n.getY()-a),i=new Se(i.getX()+a,i.getY()+a);var o=this.getColor(i,e);if(o===0)return!1;var s=this.getColor(e,r);return s!==o||(s=this.getColor(r,n),s!==o)?!1:(s=this.getColor(n,i),s===o)},t.prototype.getColor=function(e,r){for(var n=this.distancePoint(e,r),i=(r.getX()-e.getX())/n,a=(r.getY()-e.getY())/n,o=0,s=e.getX(),l=e.getY(),u=this.image.get(e.getX(),e.getY()),c=Math.ceil(n),d=0;d<c;d++)s+=i,l+=a,this.image.get(W.round(s),W.round(l))!==u&&o++;var v=o/n;return v>.1&&v<.9?0:v<=.1===u?1:-1},t.prototype.getFirstDifferent=function(e,r,n,i){for(var a=e.getX()+n,o=e.getY()+i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n,o+=i;for(a-=n,o-=i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n;for(a-=n;this.isValid(a,o)&&this.image.get(a,o)===r;)o+=i;return o-=i,new Se(a,o)},t.prototype.expandSquare=function(e,r,n){var i=n/(2*r),a=e[0].getX()-e[2].getX(),o=e[0].getY()-e[2].getY(),s=(e[0].getX()+e[2].getX())/2,l=(e[0].getY()+e[2].getY())/2,u=new k(s+i*a,l+i*o),c=new k(s-i*a,l-i*o);a=e[1].getX()-e[3].getX(),o=e[1].getY()-e[3].getY(),s=(e[1].getX()+e[3].getX())/2,l=(e[1].getY()+e[3].getY())/2;var d=new k(s+i*a,l+i*o),v=new k(s-i*a,l-i*o),h=[u,d,c,v];return h},t.prototype.isValid=function(e,r){return e>=0&&e<this.image.getWidth()&&r>0&&r<this.image.getHeight()},t.prototype.isValidPoint=function(e){var r=W.round(e.getX()),n=W.round(e.getY());return this.isValid(r,n)},t.prototype.distancePoint=function(e,r){return W.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.distanceResultPoint=function(e,r){return W.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(G.truncDivision(this.nbLayers-4,8)+1)+15},t}(),Dn=function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=null,i=new ju(e.getBlackMatrix()),a=null,o=null;try{var s=i.detectMirror(!1);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new yi().decode(s)}catch(d){n=d}if(o==null)try{var s=i.detectMirror(!0);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new yi().decode(s)}catch(d){throw n??d}var l=new Be(o.getText(),o.getRawBytes(),o.getNumBits(),a,F.AZTEC,re.currentTimeMillis()),u=o.getByteSegments();u!=null&&l.putMetadata(me.BYTE_SEGMENTS,u);var c=o.getECLevel();return c!=null&&l.putMetadata(me.ERROR_CORRECTION_LEVEL,c),l},t.prototype.reportFoundResultPoints=function(e,r){if(e!=null){var n=e.get(se.NEED_RESULT_POINT_CALLBACK);n!=null&&r.forEach(function(i,a,o){n.foundPossibleResultPoint(i)})}},t.prototype.reset=function(){},t}(),Yu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){Yu(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Dn,r)||this}return e})(Ft);var we=function(){function t(){}return t.prototype.decode=function(e,r){try{return this.doDecode(e,r)}catch{var n=r&&r.get(se.TRY_HARDER)===!0;if(n&&e.isRotateSupported()){var i=e.rotateCounterClockwise(),a=this.doDecode(i,r),o=a.getResultMetadata(),s=270;o!==null&&o.get(me.ORIENTATION)===!0&&(s=s+o.get(me.ORIENTATION)%360),a.putMetadata(me.ORIENTATION,s);var l=a.getResultPoints();if(l!==null)for(var u=i.getHeight(),c=0;c<l.length;c++)l[c]=new k(u-l[c].getY()-1,l[c].getX());return a}else throw new I}},t.prototype.reset=function(){},t.prototype.doDecode=function(e,r){var n=e.getWidth(),i=e.getHeight(),a=new ve(n),o=r&&r.get(se.TRY_HARDER)===!0,s=Math.max(1,i>>(o?8:5)),l;o?l=i:l=15;for(var u=Math.trunc(i/2),c=0;c<l;c++){var d=Math.trunc((c+1)/2),v=(c&1)===0,h=u+s*(v?d:-d);if(h<0||h>=i)break;try{a=e.getBlackRow(h,a)}catch{continue}for(var p=function(m){if(m===1&&(a.reverse(),r&&r.get(se.NEED_RESULT_POINT_CALLBACK)===!0)){var A=new Map;r.forEach(function(b,O){return A.set(O,b)}),A.delete(se.NEED_RESULT_POINT_CALLBACK),r=A}try{var y=g.decodeRow(h,a,r);if(m===1){y.putMetadata(me.ORIENTATION,180);var C=y.getResultPoints();C!==null&&(C[0]=new k(n-C[0].getX()-1,C[0].getY()),C[1]=new k(n-C[1].getX()-1,C[1].getY()))}return{value:y}}catch{}},g=this,w=0;w<2;w++){var _=p(w);if(typeof _=="object")return _.value}}throw new I},t.recordPattern=function(e,r,n){for(var i=n.length,a=0;a<i;a++)n[a]=0;var o=e.getSize();if(r>=o)throw new I;for(var s=!e.get(r),l=0,u=r;u<o;){if(e.get(u)!==s)n[l]++;else{if(++l===i)break;n[l]=1,s=!s}u++}if(!(l===i||l===i-1&&u===o))throw new I},t.recordPatternInReverse=function(e,r,n){for(var i=n.length,a=e.get(r);r>0&&i>=0;)e.get(--r)!==a&&(i--,a=!a);if(i>=0)throw new I;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return Number.POSITIVE_INFINITY;var l=a/o;n*=l;for(var u=0,c=0;c<i;c++){var d=e[c],v=r[c]*l,h=d>v?d-v:v-d;if(h>n)return Number.POSITIVE_INFINITY;u+=h}return u/a},t}(),Ku=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wi=function(t){Ku(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.findStartPattern=function(r){for(var n=r.getSize(),i=r.getNextSet(0),a=0,o=Int32Array.from([0,0,0,0,0,0]),s=i,l=!1,u=6,c=i;c<n;c++)if(r.get(c)!==l)o[a]++;else{if(a===u-1){for(var d=e.MAX_AVG_VARIANCE,v=-1,h=e.CODE_START_A;h<=e.CODE_START_C;h++){var p=we.patternMatchVariance(o,e.CODE_PATTERNS[h],e.MAX_INDIVIDUAL_VARIANCE);p<d&&(d=p,v=h)}if(v>=0&&r.isRange(Math.max(0,s-(c-s)/2),s,!1))return Int32Array.from([s,c,v]);s+=o[0]+o[1],o=o.slice(2,o.length-1),o[a-1]=0,o[a]=0,a--}else a++;o[a]=1,l=!l}throw new I},e.decodeCode=function(r,n,i){we.recordPattern(r,i,n);for(var a=e.MAX_AVG_VARIANCE,o=-1,s=0;s<e.CODE_PATTERNS.length;s++){var l=e.CODE_PATTERNS[s],u=this.patternMatchVariance(n,l,e.MAX_INDIVIDUAL_VARIANCE);u<a&&(a=u,o=s)}if(o>=0)return o;throw new I},e.prototype.decodeRow=function(r,n,i){var a=i&&i.get(se.ASSUME_GS1)===!0,o=e.findStartPattern(n),s=o[2],l=0,u=new Uint8Array(20);u[l++]=s;var c;switch(s){case e.CODE_START_A:c=e.CODE_CODE_A;break;case e.CODE_START_B:c=e.CODE_CODE_B;break;case e.CODE_START_C:c=e.CODE_CODE_C;break;default:throw new R}for(var d=!1,v=!1,h="",p=o[0],g=o[1],w=Int32Array.from([0,0,0,0,0,0]),_=0,m=0,A=s,y=0,C=!0,b=!1,O=!1;!d;){var P=v;switch(v=!1,_=m,m=e.decodeCode(n,w,g),u[l++]=m,m!==e.CODE_STOP&&(C=!0),m!==e.CODE_STOP&&(y++,A+=y*m),p=g,g+=w.reduce(function(rt,nt){return rt+nt},0),m){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new R}switch(c){case e.CODE_CODE_A:if(m<64)O===b?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),O=!1;else if(m<96)O===b?h+=String.fromCharCode(m-64):h+=String.fromCharCode(m+64),O=!1;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!b&&O?(b=!0,O=!1):b&&O?(b=!1,O=!1):O=!0;break;case e.CODE_SHIFT:v=!0,c=e.CODE_CODE_B;break;case e.CODE_CODE_B:c=e.CODE_CODE_B;break;case e.CODE_CODE_C:c=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_B:if(m<96)O===b?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),O=!1;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!b&&O?(b=!0,O=!1):b&&O?(b=!1,O=!1):O=!0;break;case e.CODE_SHIFT:v=!0,c=e.CODE_CODE_A;break;case e.CODE_CODE_A:c=e.CODE_CODE_A;break;case e.CODE_CODE_C:c=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_C:if(m<100)m<10&&(h+="0"),h+=m;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_CODE_A:c=e.CODE_CODE_A;break;case e.CODE_CODE_B:c=e.CODE_CODE_B;break;case e.CODE_STOP:d=!0;break}break}P&&(c=c===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var $=g-p;if(g=n.getNextUnset(g),!n.isRange(g,Math.min(n.getSize(),g+(g-p)/2),!1))throw new I;if(A-=y*_,A%103!==_)throw new ye;var M=h.length;if(M===0)throw new I;M>0&&C&&(c===e.CODE_CODE_C?h=h.substring(0,M-2):h=h.substring(0,M-1));for(var le=(o[1]+o[0])/2,H=p+$/2,ee=u.length,be=new Uint8Array(ee),He=0;He<ee;He++)be[He]=u[He];var hr=[new k(le,r),new k(H,r)];return new Be(h,be,0,hr,F.CODE_128,new Date().getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e}(we),Zu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),cn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_i=function(t){Zu(e,t);function e(r,n){r===void 0&&(r=!1),n===void 0&&(n=!1);var i=t.call(this)||this;return i.usingCheckDigit=r,i.extendedMode=n,i.decodeRowResult="",i.counters=new Int32Array(9),i}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,u=this.counters;u.fill(0),this.decodeRowResult="";var c=e.findAsteriskPattern(n,u),d=n.getNextSet(c[1]),v=n.getSize(),h,p;do{e.recordPattern(n,d,u);var g=e.toNarrowWidePattern(u);if(g<0)throw new I;h=e.patternToChar(g),this.decodeRowResult+=h,p=d;try{for(var w=(a=void 0,cn(u)),_=w.next();!_.done;_=w.next()){var m=_.value;d+=m}}catch(ee){a={error:ee}}finally{try{_&&!_.done&&(o=w.return)&&o.call(w)}finally{if(a)throw a.error}}d=n.getNextSet(d)}while(h!=="*");this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var A=0;try{for(var y=cn(u),C=y.next();!C.done;C=y.next()){var m=C.value;A+=m}}catch(ee){s={error:ee}}finally{try{C&&!C.done&&(l=y.return)&&l.call(y)}finally{if(s)throw s.error}}var b=d-p-A;if(d!==v&&b*2<A)throw new I;if(this.usingCheckDigit){for(var O=this.decodeRowResult.length-1,P=0,$=0;$<O;$++)P+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt($));if(this.decodeRowResult.charAt(O)!==e.ALPHABET_STRING.charAt(P%43))throw new ye;this.decodeRowResult=this.decodeRowResult.substring(0,O)}if(this.decodeRowResult.length===0)throw new I;var M;this.extendedMode?M=e.decodeExtended(this.decodeRowResult):M=this.decodeRowResult;var le=(c[1]+c[0])/2,H=p+A/2;return new Be(M,null,0,[new k(le,r),new k(H,r)],F.CODE_39,new Date().getTime())},e.findAsteriskPattern=function(r,n){for(var i=r.getSize(),a=r.getNextSet(0),o=0,s=a,l=!1,u=n.length,c=a;c<i;c++)if(r.get(c)!==l)n[o]++;else{if(o===u-1){if(this.toNarrowWidePattern(n)===e.ASTERISK_ENCODING&&r.isRange(Math.max(0,s-Math.floor((c-s)/2)),s,!1))return[s,c];s+=n[0]+n[1],n.copyWithin(0,2,2+o-1),n[o-1]=0,n[o]=0,o--}else o++;n[o]=1,l=!l}throw new I},e.toNarrowWidePattern=function(r){var n,i,a=r.length,o=0,s;do{var l=2147483647;try{for(var u=(n=void 0,cn(r)),c=u.next();!c.done;c=u.next()){var d=c.value;d<l&&d>o&&(l=d)}}catch(g){n={error:g}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}o=l,s=0;for(var v=0,h=0,p=0;p<a;p++){var d=r[p];d>o&&(h|=1<<a-1-p,s++,v+=d)}if(s===3){for(var p=0;p<a&&s>0;p++){var d=r[p];if(d>o&&(s--,d*2>=v))return-1}return h}}while(s>3);return-1},e.patternToChar=function(r){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===r)return e.ALPHABET_STRING.charAt(n);if(r===e.ASTERISK_ENCODING)return"*";throw new I},e.decodeExtended=function(r){for(var n=r.length,i="",a=0;a<n;a++){var o=r.charAt(a);if(o==="+"||o==="$"||o==="%"||o==="/"){var s=r.charAt(a+1),l="\0";switch(o){case"+":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)+32);else throw new R;break;case"$":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)-64);else throw new R;break;case"%":if(s>="A"&&s<="E")l=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")l=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")l=String.fromCharCode(s.charCodeAt(0)+43);else if(s==="U")l="\0";else if(s==="V")l="@";else if(s==="W")l="`";else if(s==="X"||s==="Y"||s==="Z")l="";else throw new R;break;case"/":if(s>="A"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)-32);else if(s==="Z")l=":";else throw new R;break}i+=l,a++}else i+=o}return i},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e}(we),qu=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ei=function(t){qu(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.narrowLineWidth=-1,r}return e.prototype.decodeRow=function(r,n,i){var a,o,s=this.decodeStart(n),l=this.decodeEnd(n),u=new Q;e.decodeMiddle(n,s[1],l[0],u);var c=u.toString(),d=null;i!=null&&(d=i.get(se.ALLOWED_LENGTHS)),d==null&&(d=e.DEFAULT_ALLOWED_LENGTHS);var v=c.length,h=!1,p=0;try{for(var g=Qu(d),w=g.next();!w.done;w=g.next()){var _=w.value;if(v===_){h=!0;break}_>p&&(p=_)}}catch(y){a={error:y}}finally{try{w&&!w.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}if(!h&&v>p&&(h=!0),!h)throw new R;var m=[new k(s[1],r),new k(l[0],r)],A=new Be(c,null,0,m,F.ITF,new Date().getTime());return A},e.decodeMiddle=function(r,n,i,a){var o=new Int32Array(10),s=new Int32Array(5),l=new Int32Array(5);for(o.fill(0),s.fill(0),l.fill(0);n<i;){we.recordPattern(r,n,o);for(var u=0;u<5;u++){var c=2*u;s[u]=o[c],l[u]=o[c+1]}var d=e.decodeDigit(s);a.append(d.toString()),d=this.decodeDigit(l),a.append(d.toString()),o.forEach(function(v){n+=v})}},e.prototype.decodeStart=function(r){var n=e.skipWhiteSpace(r),i=e.findGuardPattern(r,n,e.START_PATTERN);return this.narrowLineWidth=(i[1]-i[0])/4,this.validateQuietZone(r,i[0]),i},e.prototype.validateQuietZone=function(r,n){var i=this.narrowLineWidth*10;i=i<n?i:n;for(var a=n-1;i>0&&a>=0&&!r.get(a);a--)i--;if(i!==0)throw new I},e.skipWhiteSpace=function(r){var n=r.getSize(),i=r.getNextSet(0);if(i===n)throw new I;return i},e.prototype.decodeEnd=function(r){r.reverse();try{var n=e.skipWhiteSpace(r),i=void 0;try{i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof I&&(i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(r,i[0]);var a=i[0];return i[0]=r.getSize()-i[1],i[1]=r.getSize()-a,i}finally{r.reverse()}},e.findGuardPattern=function(r,n,i){var a=i.length,o=new Int32Array(a),s=r.getSize(),l=!1,u=0,c=n;o.fill(0);for(var d=n;d<s;d++)if(r.get(d)!==l)o[u]++;else{if(u===a-1){if(we.patternMatchVariance(o,i,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[c,d];c+=o[0]+o[1],re.arraycopy(o,2,o,0,u-1),o[u-1]=0,o[u]=0,u--}else u++;o[u]=1,l=!l}throw new I},e.decodeDigit=function(r){for(var n=e.MAX_AVG_VARIANCE,i=-1,a=e.PATTERNS.length,o=0;o<a;o++){var s=e.PATTERNS[o],l=we.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);l<n?(n=l,i=o):l===n&&(i=-1)}if(i>=0)return i%10;throw new I},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e}(we),Ju=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),kt=function(t){Ju(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.decodeRowStringBuffer="",r}return e.findStartGuardPattern=function(r){for(var n=!1,i,a=0,o=Int32Array.from([0,0,0]);!n;){o=Int32Array.from([0,0,0]),i=e.findGuardPattern(r,a,!1,this.START_END_PATTERN,o);var s=i[0];a=i[1];var l=s-(a-s);l>=0&&(n=r.isRange(l,s,!1))}return i},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(r,n,i,a){return this.findGuardPattern(r,n,i,a,new Int32Array(a.length))},e.findGuardPattern=function(r,n,i,a,o){var s=r.getSize();n=i?r.getNextUnset(n):r.getNextSet(n);for(var l=0,u=n,c=a.length,d=i,v=n;v<s;v++)if(r.get(v)!==d)o[l]++;else{if(l===c-1){if(we.patternMatchVariance(o,a,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([u,v]);u+=o[0]+o[1];for(var h=o.slice(2,o.length-1),p=0;p<l-1;p++)o[p]=h[p];o[l-1]=0,o[l]=0,l--}else l++;o[l]=1,d=!d}throw new I},e.decodeDigit=function(r,n,i,a){this.recordPattern(r,i,n);for(var o=this.MAX_AVG_VARIANCE,s=-1,l=a.length,u=0;u<l;u++){var c=a[u],d=we.patternMatchVariance(n,c,e.MAX_INDIVIDUAL_VARIANCE);d<o&&(o=d,s=u)}if(s>=0)return s;throw new I},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e}(we),e1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},t1=function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new k((n[0]+n[1])/2,e),new k(a,e)],u=new Be(o,null,0,l,F.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],u=0,c=0;c<5&&l<s;c++){var d=kt.decodeDigit(e,o,l,kt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var v=(i=void 0,e1(o)),h=v.next();!h.done;h=v.next()){var p=h.value;l+=p}}catch(w){i={error:w}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}d>=10&&(u|=1<<4-c),c!==4&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==5)throw new I;var g=this.determineCheckDigit(u);if(t.extensionChecksum(n.toString())!==g)throw new I;return l},t.extensionChecksum=function(e){for(var r=e.length,n=0,i=r-2;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;n*=3;for(var i=r-1;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;return n*=3,n%10},t.prototype.determineCheckDigit=function(e){for(var r=0;r<10;r++)if(e===this.CHECK_DIGIT_ENCODINGS[r])return r;throw new I},t.parseExtensionString=function(e){if(e.length!==5)return null;var r=t.parseExtension5String(e);return r==null?null:new Map([[me.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(e){var r;switch(e.charAt(0)){case"0":r="£";break;case"5":r="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}r="";break;default:r="";break}var n=parseInt(e.substring(1)),i=(n/100).toString(),a=n%100,o=a<10?"0"+a:a.toString();return r+i+"."+o},t}(),r1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n1=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new k((n[0]+n[1])/2,e),new k(a,e)],u=new Be(o,null,0,l,F.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&u.putAllMetadata(s),u},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],u=0,c=0;c<2&&l<s;c++){var d=kt.decodeDigit(e,o,l,kt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var v=(i=void 0,r1(o)),h=v.next();!h.done;h=v.next()){var p=h.value;l+=p}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}d>=10&&(u|=1<<1-c),c!==1&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==2)throw new I;if(parseInt(n.toString())%4!==u)throw new I;return l},t.parseExtensionString=function(e){return e.length!==2?null:new Map([[me.ISSUE_NUMBER,parseInt(e)]])},t}(),i1=function(){function t(){}return t.decodeRow=function(e,r,n){var i=kt.findGuardPattern(r,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{var a=new t1;return a.decodeRow(e,r,i)}catch{var o=new n1;return o.decodeRow(e,r,i)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),a1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ce=function(t){a1(e,t);function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map(function(s){return Int32Array.from(s)});for(var n=10;n<20;n++){for(var i=e.L_PATTERNS[n-10],a=new Int32Array(i.length),o=0;o<i.length;o++)a[o]=i[i.length-o-1];e.L_AND_G_PATTERNS[n]=a}return r}return e.prototype.decodeRow=function(r,n,i){var a=e.findStartGuardPattern(n),o=i==null?null:i.get(se.NEED_RESULT_POINT_CALLBACK);if(o!=null){var s=new k((a[0]+a[1])/2,r);o.foundPossibleResultPoint(s)}var l=this.decodeMiddle(n,a,this.decodeRowStringBuffer),u=l.rowOffset,c=l.resultString;if(o!=null){var d=new k(u,r);o.foundPossibleResultPoint(d)}var v=e.decodeEnd(n,u);if(o!=null){var h=new k((v[0]+v[1])/2,r);o.foundPossibleResultPoint(h)}var p=v[1],g=p+(p-v[0]);if(g>=n.getSize()||!n.isRange(p,g,!1))throw new I;var w=c.toString();if(w.length<8)throw new R;if(!e.checkChecksum(w))throw new ye;var _=(a[1]+a[0])/2,m=(v[1]+v[0])/2,A=this.getBarcodeFormat(),y=[new k(_,r),new k(m,r)],C=new Be(w,null,0,y,A,new Date().getTime()),b=0;try{var O=i1.decodeRow(r,n,v[1]);C.putMetadata(me.UPC_EAN_EXTENSION,O.getText()),C.putAllMetadata(O.getResultMetadata()),C.addResultPoints(O.getResultPoints()),b=O.getText().length}catch{}var P=i==null?null:i.get(se.ALLOWED_EAN_EXTENSIONS);if(P!=null){var $=!1;for(var M in P)if(b.toString()===M){$=!0;break}if(!$)throw new I}return A===F.EAN_13||F.UPC_A,C},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(kt),o1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ai=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bn=function(t){o1(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=r.getSize(),d=n[1],v=0,h=0;h<6&&d<c;h++){var p=ce.decodeDigit(r,u,d,ce.L_AND_G_PATTERNS);i+=String.fromCharCode(48+p%10);try{for(var g=(a=void 0,Ai(u)),w=g.next();!w.done;w=g.next()){var _=w.value;d+=_}}catch(C){a={error:C}}finally{try{w&&!w.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}p>=10&&(v|=1<<5-h)}i=e.determineFirstDigit(i,v);var m=ce.findGuardPattern(r,d,!0,ce.MIDDLE_PATTERN,new Int32Array(ce.MIDDLE_PATTERN.length).fill(0));d=m[1];for(var h=0;h<6&&d<c;h++){var p=ce.decodeDigit(r,u,d,ce.L_PATTERNS);i+=String.fromCharCode(48+p);try{for(var A=(s=void 0,Ai(u)),y=A.next();!y.done;y=A.next()){var _=y.value;d+=_}}catch(O){s={error:O}}finally{try{y&&!y.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return F.EAN_13},e.determineFirstDigit=function(r,n){for(var i=0;i<10;i++)if(n===this.FIRST_DIGIT_ENCODINGS[i])return r=String.fromCharCode(48+i)+r,r;throw new I},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(ce),s1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ci=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bi=function(t){s1(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var c=r.getSize(),d=n[1],v=0;v<4&&d<c;v++){var h=ce.decodeDigit(r,u,d,ce.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var p=(a=void 0,Ci(u)),g=p.next();!g.done;g=p.next()){var w=g.value;d+=w}}catch(y){a={error:y}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(a)throw a.error}}}var _=ce.findGuardPattern(r,d,!0,ce.MIDDLE_PATTERN,new Int32Array(ce.MIDDLE_PATTERN.length).fill(0));d=_[1];for(var v=0;v<4&&d<c;v++){var h=ce.decodeDigit(r,u,d,ce.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var m=(s=void 0,Ci(u)),A=m.next();!A.done;A=m.next()){var w=A.value;d+=w}}catch(b){s={error:b}}finally{try{A&&!A.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return F.EAN_8},e}(ce),l1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Si=function(t){l1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ean13Reader=new Bn,r}return e.prototype.getBarcodeFormat=function(){return F.UPC_A},e.prototype.decode=function(r,n){return this.maybeReturnResult(this.ean13Reader.decode(r))},e.prototype.decodeRow=function(r,n,i){return this.maybeReturnResult(this.ean13Reader.decodeRow(r,n,i))},e.prototype.decodeMiddle=function(r,n,i){return this.ean13Reader.decodeMiddle(r,n,i)},e.prototype.maybeReturnResult=function(r){var n=r.getText();if(n.charAt(0)==="0"){var i=new Be(n.substring(1),null,null,r.getResultPoints(),F.UPC_A);return r.getResultMetadata()!=null&&i.putAllMetadata(r.getResultMetadata()),i}else throw new I},e.prototype.reset=function(){this.ean13Reader.reset()},e}(ce),u1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),f1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ii=function(t){u1(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=new Int32Array(4),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s=this.decodeMiddleCounters.map(function(w){return w});s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var l=r.getSize(),u=n[1],c=0,d=0;d<6&&u<l;d++){var v=e.decodeDigit(r,s,u,e.L_AND_G_PATTERNS);i+=String.fromCharCode(48+v%10);try{for(var h=(a=void 0,f1(s)),p=h.next();!p.done;p=h.next()){var g=p.value;u+=g}}catch(w){a={error:w}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}v>=10&&(c|=1<<5-d)}return e.determineNumSysAndCheckDigit(new Q(i),c),u},e.prototype.decodeEnd=function(r,n){return e.findGuardPatternWithoutCounters(r,n,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(r){return ce.checkChecksum(e.convertUPCEtoUPCA(r))},e.determineNumSysAndCheckDigit=function(r,n){for(var i=0;i<=1;i++)for(var a=0;a<10;a++)if(n===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[i][a]){r.insert(0,"0"+i),r.append("0"+a);return}throw I.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return F.UPC_E},e.convertUPCEtoUPCA=function(r){var n=r.slice(1,7).split("").map(function(o){return o.charCodeAt(0)}),i=new Q;i.append(r.charAt(0));var a=n[5];switch(a){case 0:case 1:case 2:i.appendChars(n,0,2),i.append(a),i.append("0000"),i.appendChars(n,2,3);break;case 3:i.appendChars(n,0,3),i.append("00000"),i.appendChars(n,3,2);break;case 4:i.appendChars(n,0,4),i.append("00000"),i.append(n[4]);break;default:i.appendChars(n,0,5),i.append("0000"),i.append(a);break}return r.length>=8&&i.append(r.charAt(7)),i.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e}(ce),c1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Oi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dn=function(t){c1(e,t);function e(r){var n=t.call(this)||this,i=r==null?null:r.get(se.POSSIBLE_FORMATS),a=[];return i!=null&&(i.indexOf(F.EAN_13)>-1&&a.push(new Bn),i.indexOf(F.UPC_A)>-1&&a.push(new Si),i.indexOf(F.EAN_8)>-1&&a.push(new bi),i.indexOf(F.UPC_E)>-1&&a.push(new Ii)),a.length===0&&(a.push(new Bn),a.push(new Si),a.push(new bi),a.push(new Ii)),n.readers=a,n}return e.prototype.decodeRow=function(r,n,i){var a,o;try{for(var s=Oi(this.readers),l=s.next();!l.done;l=s.next()){var u=l.value;try{var c=u.decodeRow(r,n,i),d=c.getBarcodeFormat()===F.EAN_13&&c.getText().charAt(0)==="0",v=i==null?null:i.get(se.POSSIBLE_FORMATS),h=v==null||v.includes(F.UPC_A);if(d&&h){var p=c.getRawBytes(),g=new Be(c.getText().substring(1),p,p?p.length:null,c.getResultPoints(),F.UPC_A);return g.putAllMetadata(c.getResultMetadata()),g}return c}catch{}}}catch(w){a={error:w}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(a)throw a.error}}throw new I},e.prototype.reset=function(){var r,n;try{for(var i=Oi(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;o.reset()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e}(we),d1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),h1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xt=function(t){d1(e,t);function e(){var r=t.call(this)||this;return r.decodeFinderCounters=new Int32Array(4),r.dataCharacterCounters=new Int32Array(8),r.oddRoundingErrors=new Array(4),r.evenRoundingErrors=new Array(4),r.oddCounts=new Array(r.dataCharacterCounters.length/2),r.evenCounts=new Array(r.dataCharacterCounters.length/2),r}return e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(r,n){for(var i=0;i<n.length;i++)if(we.patternMatchVariance(r,n[i],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return i;throw new I},e.count=function(r){return W.sum(new Int32Array(r))},e.increment=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]>a&&(a=n[o],i=o);r[i]++},e.decrement=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]<a&&(a=n[o],i=o);r[i]--},e.isFinderPattern=function(r){var n,i,a=r[0]+r[1],o=a+r[2]+r[3],s=a/o;if(s>=e.MIN_FINDER_PATTERN_RATIO&&s<=e.MAX_FINDER_PATTERN_RATIO){var l=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;try{for(var c=h1(r),d=c.next();!d.done;d=c.next()){var v=d.value;v>u&&(u=v),v<l&&(l=v)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return u<10*l}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e}(we),Mr=function(){function t(e,r){this.value=e,this.checksumPortion=r}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),da=function(){function t(e,r,n,i,a){this.value=e,this.startEnd=r,this.value=e,this.startEnd=r,this.resultPoints=new Array,this.resultPoints.push(new k(n,a)),this.resultPoints.push(new k(i,a))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t}(),v1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bt=function(){function t(){}return t.getRSSvalue=function(e,r,n){var i,a,o=0;try{for(var s=v1(e),l=s.next();!l.done;l=s.next()){var u=l.value;o+=u}}catch(m){i={error:m}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}for(var c=0,d=0,v=e.length,h=0;h<v-1;h++){var p=void 0;for(p=1,d|=1<<h;p<e[h];p++,d&=~(1<<h)){var g=t.combins(o-p-1,v-h-2);if(n&&d===0&&o-p-(v-h-1)>=v-h-1&&(g-=t.combins(o-p-(v-h),v-h-2)),v-h-1>1){for(var w=0,_=o-p-(v-h-2);_>r;_--)w+=t.combins(o-p-_-1,v-h-3);g-=w*(v-1-h)}else o-p>r&&g--;c+=g}o-=p}return c},t.combins=function(e,r){var n,i;e-r>r?(i=r,n=e-r):(i=e-r,n=r);for(var a=1,o=1,s=e;s>n;s--)a*=s,o<=i&&(a/=o,o++);for(;o<=i;)a/=o,o++;return a},t}(),p1=function(){function t(){}return t.buildBitArray=function(e){var r=e.length*2-1;e[e.length-1].getRightChar()==null&&(r-=1);for(var n=12*r,i=new ve(n),a=0,o=e[0],s=o.getRightChar().getValue(),l=11;l>=0;--l)(s&1<<l)!=0&&i.set(a),a++;for(var l=1;l<e.length;++l){for(var u=e[l],c=u.getLeftChar().getValue(),d=11;d>=0;--d)(c&1<<d)!=0&&i.set(a),a++;if(u.getRightChar()!=null)for(var v=u.getRightChar().getValue(),d=11;d>=0;--d)(v&1<<d)!=0&&i.set(a),a++}return i},t}(),pt=function(){function t(e,r){r?this.decodedInformation=null:(this.finished=e,this.decodedInformation=r)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),Yn=function(){function t(e){this.newPosition=e}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),g1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Le=function(t){g1(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=n,i}return e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(Yn),x1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gt=function(t){x1(e,t);function e(r,n,i){var a=t.call(this,r)||this;return i?(a.remaining=!0,a.remainingValue=a.remainingValue):(a.remaining=!1,a.remainingValue=0),a.newString=n,a}return e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(Yn),y1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),At=function(t){y1(e,t);function e(r,n,i){var a=t.call(this,r)||this;if(n<0||n>10||i<0||i>10)throw new R;return a.firstDigit=n,a.secondDigit=i,a}return e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return this.firstDigit*10+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(Yn),wr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},m1=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,i,a,o,s,l,u;if(!e)return null;if(e.length<2)throw new I;var c=e.substring(0,2);try{for(var d=wr(t.TWO_DIGIT_DATA_LENGTH),v=d.next();!v.done;v=d.next()){var h=v.value;if(h[0]===c)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,h[2],e):t.processFixedAI(2,h[1],e)}}catch(b){r={error:b}}finally{try{v&&!v.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new I;var p=e.substring(0,3);try{for(var g=wr(t.THREE_DIGIT_DATA_LENGTH),w=g.next();!w.done;w=g.next()){var h=w.value;if(h[0]===p)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,h[2],e):t.processFixedAI(3,h[1],e)}}catch(b){i={error:b}}finally{try{w&&!w.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}try{for(var _=wr(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),m=_.next();!m.done;m=_.next()){var h=m.value;if(h[0]===p)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(b){o={error:b}}finally{try{m&&!m.done&&(s=_.return)&&s.call(_)}finally{if(o)throw o.error}}if(e.length<4)throw new I;var A=e.substring(0,4);try{for(var y=wr(t.FOUR_DIGIT_DATA_LENGTH),C=y.next();!C.done;C=y.next()){var h=C.value;if(h[0]===A)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(b){l={error:b}}finally{try{C&&!C.done&&(u=y.return)&&u.call(y)}finally{if(l)throw l.error}}throw new I},t.processFixedAI=function(e,r,n){if(n.length<e)throw new I;var i=n.substring(0,e);if(n.length<e+r)throw new I;var a=n.substring(e,e+r),o=n.substring(e+r),s="("+i+")"+a,l=t.parseFieldsInGeneralPurpose(o);return l==null?s:s+l},t.processVariableAI=function(e,r,n){var i=n.substring(0,e),a;n.length<e+r?a=n.length:a=e+r;var o=n.substring(e,a),s=n.substring(a),l="("+i+")"+o,u=t.parseFieldsInGeneralPurpose(s);return u==null?l:l+u},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t}(),Nr=function(){function t(e){this.buffer=new Q,this.information=e}return t.prototype.decodeAllCodes=function(e,r){var n=r,i=null;do{var a=this.decodeGeneralPurposeField(n,i),o=m1.parseFieldsInGeneralPurpose(a.getNewString());if(o!=null&&e.append(o),a.isRemaining()?i=""+a.getRemainingValue():i=null,n===a.getNewPosition())break;n=a.getNewPosition()}while(!0);return e.toString()},t.prototype.isStillNumeric=function(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(var r=e;r<e+3;++r)if(this.information.get(r))return!0;return this.information.get(e+3)},t.prototype.decodeNumeric=function(e){if(e+7>this.information.getSize()){var r=this.extractNumericValueFromBitArray(e,4);return r===0?new At(this.information.getSize(),At.FNC1,At.FNC1):new At(this.information.getSize(),r-1,At.FNC1)}var n=this.extractNumericValueFromBitArray(e,7),i=(n-8)/11,a=(n-8)%11;return new At(e+7,i,a)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(e,r,n){for(var i=0,a=0;a<n;++a)e.get(r+a)&&(i|=1<<n-a-1);return i},t.prototype.decodeGeneralPurposeField=function(e,r){this.buffer.setLengthToZero(),r!=null&&this.buffer.append(r),this.current.setPosition(e);var n=this.parseBlocks();return n!=null&&n.isRemaining()?new gt(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new gt(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var e,r;do{var n=this.current.getPosition();this.current.isAlpha()?(r=this.parseAlphaBlock(),e=r.isFinished()):this.current.isIsoIec646()?(r=this.parseIsoIec646Block(),e=r.isFinished()):(r=this.parseNumericBlock(),e=r.isFinished());var i=n!==this.current.getPosition();if(!i&&!e)break}while(!e);return r.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var e=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFirstDigitFNC1()){var r=void 0;return e.isSecondDigitFNC1()?r=new gt(this.current.getPosition(),this.buffer.toString()):r=new gt(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new pt(!0,r)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new pt(!0,r)}this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new pt(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var e=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new pt(!0,r)}this.buffer.append(e.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 pt(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var e=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new pt(!0,r)}this.buffer.append(e.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 pt(!1)},t.prototype.isStillIsoIec646=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<116)return!0;if(e+8>this.information.getSize())return!1;var i=this.extractNumericValueFromBitArray(e,8);return i>=232&&i<253},t.prototype.decodeIsoIec646=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new Le(e+7,""+(n+1));if(n>=90&&n<116)return new Le(e+7,""+(n+7));var i=this.extractNumericValueFromBitArray(e,8),a;switch(i){case 232:a="!";break;case 233:a='"';break;case 234:a="%";break;case 235:a="&";break;case 236:a="'";break;case 237:a="(";break;case 238:a=")";break;case 239:a="*";break;case 240:a="+";break;case 241:a=",";break;case 242:a="-";break;case 243:a=".";break;case 244:a="/";break;case 245:a=":";break;case 246:a=";";break;case 247:a="<";break;case 248:a="=";break;case 249:a=">";break;case 250:a="?";break;case 251:a="_";break;case 252:a=" ";break;default:throw new R}return new Le(e+8,a)},t.prototype.isStillAlpha=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+6>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,6);return n>=16&&n<63},t.prototype.decodeAlphanumeric=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new Le(e+6,""+(n+33));var i;switch(n){case 58:i="*";break;case 59:i=",";break;case 60:i="-";break;case 61:i=".";break;case 62:i="/";break;default:throw new dr("Decoding invalid alphanumeric value: "+n)}return new Le(e+6,i)},t.prototype.isAlphaTo646ToAlphaLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<5&&r+e<this.information.getSize();++r)if(r===2){if(!this.information.get(e+2))return!1}else if(this.information.get(e+r))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(e){if(e+3>this.information.getSize())return!1;for(var r=e;r<e+3;++r)if(this.information.get(r))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<4&&r+e<this.information.getSize();++r)if(this.information.get(e+r))return!1;return!0},t}(),ha=function(){function t(e){this.information=e,this.generalDecoder=new Nr(e)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),w1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ue=function(t){w1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedGtin=function(r,n){r.append("(01)");var i=r.length();r.append("9"),this.encodeCompressedGtinWithoutAI(r,n,i)},e.prototype.encodeCompressedGtinWithoutAI=function(r,n,i){for(var a=0;a<4;++a){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*a,10);o/100===0&&r.append("0"),o/10===0&&r.append("0"),r.append(o)}e.appendCheckDigit(r,i)},e.appendCheckDigit=function(r,n){for(var i=0,a=0;a<13;a++){var o=r.charAt(a+n).charCodeAt(0)-48;i+=(a&1)===0?3*o:o}i=10-i%10,i===10&&(i=0),r.append(i)},e.GTIN_SIZE=40,e}(ha),_1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),E1=function(t){_1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new Q;r.append("(01)");var n=r.length(),i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return r.append(i),this.encodeCompressedGtinWithoutAI(r,e.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(Ue),A1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),C1=function(t){A1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new Q;return this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(ha),b1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dr=function(t){b1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedWeight=function(r,n,i){var a=this.getGeneralDecoder().extractNumericValueFromBitArray(n,i);this.addWeightCode(r,a);for(var o=this.checkWeight(a),s=1e5,l=0;l<5;++l)o/s===0&&r.append("0"),s/=10;r.append(o)},e}(Ue),S1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),va=function(t){S1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+Dr.GTIN_SIZE+e.WEIGHT_SIZE)throw new I;var r=new Q;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+Dr.GTIN_SIZE,e.WEIGHT_SIZE),r.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(Dr),I1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),O1=function(t){I1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){r.append("(3103)")},e.prototype.checkWeight=function(r){return r},e}(va),T1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),N1=function(t){T1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){n<1e4?r.append("(3202)"):r.append("(3203)")},e.prototype.checkWeight=function(r){return r<1e4?r:r-1e4},e}(va),D1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),B1=function(t){D1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new I;var r=new Q;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(392"),r.append(n),r.append(")");var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return r.append(i.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(Ue),R1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),P1=function(t){R1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new I;var r=new Q;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(393"),r.append(n),r.append(")");var i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);i/100==0&&r.append("0"),i/10==0&&r.append("0"),r.append(i);var a=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return r.append(a.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(Ue),k1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),at=function(t){k1(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.dateCode=i,a.firstAIdigits=n,a}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new I;var r=new Q;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(r,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),r.toString()},e.prototype.encodeCompressedDate=function(r,n){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n,e.DATE_SIZE);if(i!=38400){r.append("("),r.append(this.dateCode),r.append(")");var a=i%32;i/=32;var o=i%12+1;i/=12;var s=i;s/10==0&&r.append("0"),r.append(s),o/10==0&&r.append("0"),r.append(o),a/10==0&&r.append("0"),r.append(a)}},e.prototype.addWeightCode=function(r,n){r.append("("),r.append(this.firstAIdigits),r.append(n/1e5),r.append(")")},e.prototype.checkWeight=function(r){return r%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(Dr);function M1(t){try{if(t.get(1))return new E1(t);if(!t.get(2))return new C1(t);var e=Nr.extractNumericValueFromBitArray(t,1,4);switch(e){case 4:return new O1(t);case 5:return new N1(t)}var r=Nr.extractNumericValueFromBitArray(t,1,5);switch(r){case 12:return new B1(t);case 13:return new P1(t)}var n=Nr.extractNumericValueFromBitArray(t,1,7);switch(n){case 56:return new at(t,"310","11");case 57:return new at(t,"320","11");case 58:return new at(t,"310","13");case 59:return new at(t,"320","13");case 60:return new at(t,"310","15");case 61:return new at(t,"320","15");case 62:return new at(t,"310","17");case 63:return new at(t,"320","17")}}catch(i){throw console.log(i),new dr("unknown decoder: "+t)}}var Ti=function(){function t(e,r,n,i){this.leftchar=e,this.rightchar=r,this.finderpattern=n,this.maybeLast=i}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return this.rightchar==null},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(this.finderpattern==null?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t?t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern):!1},t.equalsOrNull=function(e,r){return e===null?r===null:t.equals(e,r)},t.prototype.hashCode=function(){var e=this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue();return e},t}(),L1=function(){function t(e,r,n){this.pairs=e,this.rowNumber=r,this.wasReversed=n}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(e){return this.checkEqualitity(this,e)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t?this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed:!1},t.prototype.checkEqualitity=function(e,r){if(!(!e||!r)){var n;return e.forEach(function(i,a){r.forEach(function(o){i.getLeftChar().getValue()===o.getLeftChar().getValue()&&i.getRightChar().getValue()===o.getRightChar().getValue()&&i.getFinderPatter().getValue()===o.getFinderPatter().getValue()&&(n=!0)})}),n}},t}(),F1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ot=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},V1=function(t){F1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return e.prototype.decodeRow=function(r,n,i){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(r,n))}catch{}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(r,n))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(r,n){for(var i=!1;!i;)try{this.pairs.push(this.retrieveNextPair(n,this.pairs,r))}catch(s){if(s instanceof I){if(!this.pairs.length)throw new I;i=!0}}if(this.checkChecksum())return this.pairs;var a;if(this.rows.length?a=!0:a=!1,this.storeRow(r,!1),a){var o=this.checkRowsBoolean(!1);if(o!=null||(o=this.checkRowsBoolean(!0),o!=null))return o}throw new I},e.prototype.checkRowsBoolean=function(r){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,r&&(this.rows=this.rows.reverse());var n=null;try{n=this.checkRows(new Array,0)}catch(i){console.log(i)}return r&&(this.rows=this.rows.reverse()),n},e.prototype.checkRows=function(r,n){for(var i,a,o=n;o<this.rows.length;o++){var s=this.rows[o];this.pairs.length=0;try{for(var l=(i=void 0,ot(r)),u=l.next();!u.done;u=l.next()){var c=u.value;this.pairs.push(c.getPairs())}}catch(v){i={error:v}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}if(this.pairs.push(s.getPairs()),!!e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var d=new Array(r);d.push(s);try{return this.checkRows(d,o+1)}catch(v){console.log(v)}}}throw new I},e.isValidSequence=function(r){var n,i;try{for(var a=ot(e.FINDER_PATTERN_SEQUENCES),o=a.next();!o.done;o=a.next()){var s=o.value;if(!(r.length>s.length)){for(var l=!0,u=0;u<r.length;u++)if(r[u].getFinderPattern().getValue()!=s[u]){l=!1;break}if(l)return!0}}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!1},e.prototype.storeRow=function(r,n){for(var i=0,a=!1,o=!1;i<this.rows.length;){var s=this.rows[i];if(s.getRowNumber()>r){o=s.isEquivalent(this.pairs);break}a=s.isEquivalent(this.pairs),i++}o||a||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(i,new L1(this.pairs,r,n)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(r,n){var i,a,o,s,l,u;try{for(var c=ot(n),d=c.next();!d.done;d=c.next()){var v=d.value;if(v.getPairs().length!==r.length){var h=!0;try{for(var p=(o=void 0,ot(v.getPairs())),g=p.next();!g.done;g=p.next()){var w=g.value,_=!1;try{for(var m=(l=void 0,ot(r)),A=m.next();!A.done;A=m.next()){var y=A.value;if(Ti.equals(w,y)){_=!0;break}}}catch(C){l={error:C}}finally{try{A&&!A.done&&(u=m.return)&&u.call(m)}finally{if(l)throw l.error}}_||(h=!1)}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}}}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}},e.isPartialRow=function(r,n){var i,a,o,s,l,u;try{for(var c=ot(n),d=c.next();!d.done;d=c.next()){var v=d.value,h=!0;try{for(var p=(o=void 0,ot(r)),g=p.next();!g.done;g=p.next()){var w=g.value,_=!1;try{for(var m=(l=void 0,ot(v.getPairs())),A=m.next();!A.done;A=m.next()){var y=A.value;if(w.equals(y)){_=!0;break}}}catch(C){l={error:C}}finally{try{A&&!A.done&&(u=m.return)&&u.call(m)}finally{if(l)throw l.error}}if(!_){h=!1;break}}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}if(h)return!0}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(r){var n=p1.buildBitArray(r),i=M1(n),a=i.parseInformation(),o=r[0].getFinderPattern().getResultPoints(),s=r[r.length-1].getFinderPattern().getResultPoints(),l=[o[0],o[1],s[0],s[1]];return new Be(a,null,null,l,F.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var r=this.pairs.get(0),n=r.getLeftChar(),i=r.getRightChar();if(i==null)return!1;for(var a=i.getChecksumPortion(),o=2,s=1;s<this.pairs.size();++s){var l=this.pairs.get(s);a+=l.getLeftChar().getChecksumPortion(),o++;var u=l.getRightChar();u!=null&&(a+=u.getChecksumPortion(),o++)}a%=211;var c=211*(o-4)+a;return c==n.getValue()},e.getNextSecondBar=function(r,n){var i;return r.get(n)?(i=r.getNextUnset(n),i=r.getNextSet(i)):(i=r.getNextSet(n),i=r.getNextUnset(i)),i},e.prototype.retrieveNextPair=function(r,n,i){var a=n.length%2==0;this.startFromEven&&(a=!a);var o,s=!0,l=-1;do this.findNextPair(r,n,l),o=this.parseFoundFinderPattern(r,i,a),o==null?l=e.getNextSecondBar(r,this.startEnd[0]):s=!1;while(s);var u=this.decodeDataCharacter(r,o,a,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new I;var c;try{c=this.decodeDataCharacter(r,o,a,!1)}catch(d){c=null,console.log(d)}return new Ti(u,c,o,!0)},e.prototype.isEmptyPair=function(r){return r.length===0},e.prototype.findNextPair=function(r,n,i){var a=this.getDecodeFinderCounters();a[0]=0,a[1]=0,a[2]=0,a[3]=0;var o=r.getSize(),s;if(i>=0)s=i;else if(this.isEmptyPair(n))s=0;else{var l=n[n.length-1];s=l.getFinderPattern().getStartEnd()[1]}var u=n.length%2!=0;this.startFromEven&&(u=!u);for(var c=!1;s<o&&(c=!r.get(s),!!c);)s++;for(var d=0,v=s,h=s;h<o;h++)if(r.get(h)!=c)a[d]++;else{if(d==3){if(u&&e.reverseCounters(a),e.isFinderPattern(a)){this.startEnd[0]=v,this.startEnd[1]=h;return}u&&e.reverseCounters(a),v+=a[0]+a[1],a[0]=a[2],a[1]=a[3],a[2]=0,a[3]=0,d--}else d++;a[d]=1,c=!c}throw new I},e.reverseCounters=function(r){for(var n=r.length,i=0;i<n/2;++i){var a=r[i];r[i]=r[n-i-1],r[n-i-1]=a}},e.prototype.parseFoundFinderPattern=function(r,n,i){var a,o,s;if(i){for(var l=this.startEnd[0]-1;l>=0&&!r.get(l);)l--;l++,a=this.startEnd[0]-l,o=l,s=this.startEnd[1]}else o=this.startEnd[0],s=r.getNextUnset(this.startEnd[1]+1),a=s-this.startEnd[1];var u=this.getDecodeFinderCounters();re.arraycopy(u,0,u,1,u.length-1),u[0]=a;var c;try{c=this.parseFinderValue(u,e.FINDER_PATTERNS)}catch{return null}return new da(c,[o,s],o,s,n)},e.prototype.decodeDataCharacter=function(r,n,i,a){for(var o=this.getDataCharacterCounters(),s=0;s<o.length;s++)o[s]=0;if(a)e.recordPatternInReverse(r,n.getStartEnd()[0],o);else{e.recordPattern(r,n.getStartEnd()[1],o);for(var l=0,u=o.length-1;l<u;l++,u--){var c=o[l];o[l]=o[u],o[u]=c}}var d=17,v=W.sum(new Int32Array(o))/d,h=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(v-h)/h>.3)throw new I;for(var p=this.getOddCounts(),g=this.getEvenCounts(),w=this.getOddRoundingErrors(),_=this.getEvenRoundingErrors(),l=0;l<o.length;l++){var m=1*o[l]/v,A=m+.5;if(A<1){if(m<.3)throw new I;A=1}else if(A>8){if(m>8.7)throw new I;A=8}var y=l/2;(l&1)==0?(p[y]=A,w[y]=m-A):(g[y]=A,_[y]=m-A)}this.adjustOddEvenCounts(d);for(var C=4*n.getValue()+(i?0:2)+(a?0:1)-1,b=0,O=0,l=p.length-1;l>=0;l--){if(e.isNotA1left(n,i,a)){var P=e.WEIGHTS[C][2*l];O+=p[l]*P}b+=p[l]}for(var $=0,l=g.length-1;l>=0;l--)if(e.isNotA1left(n,i,a)){var P=e.WEIGHTS[C][2*l+1];$+=g[l]*P}var M=O+$;if((b&1)!=0||b>13||b<4)throw new I;var le=(13-b)/2,H=e.SYMBOL_WIDEST[le],ee=9-H,be=bt.getRSSvalue(p,H,!0),He=bt.getRSSvalue(g,ee,!1),hr=e.EVEN_TOTAL_SUBSET[le],rt=e.GSUM[le],nt=be*hr+He+rt;return new Mr(nt,M)},e.isNotA1left=function(r,n,i){return!(r.getValue()==0&&n&&i)},e.prototype.adjustOddEvenCounts=function(r){var n=W.sum(new Int32Array(this.getOddCounts())),i=W.sum(new Int32Array(this.getEvenCounts())),a=!1,o=!1;n>13?o=!0:n<4&&(a=!0);var s=!1,l=!1;i>13?l=!0:i<4&&(s=!0);var u=n+i-r,c=(n&1)==1,d=(i&1)==0;if(u==1)if(c){if(d)throw new I;o=!0}else{if(!d)throw new I;l=!0}else if(u==-1)if(c){if(d)throw new I;a=!0}else{if(!d)throw new I;s=!0}else if(u==0){if(c){if(!d)throw new I;n<i?(a=!0,l=!0):(o=!0,s=!0)}else if(d)throw new I}else throw new I;if(a){if(o)throw new I;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(o&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(l)throw new I;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}l&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e}(xt),U1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),$1=function(t){U1(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.count=0,a.finderPattern=i,a}return e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(Mr),H1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ni=function(t){H1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.possibleLeftPairs=[],r.possibleRightPairs=[],r}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,u=this.decodePair(n,!1,r,i);e.addOrTally(this.possibleLeftPairs,u),n.reverse();var c=this.decodePair(n,!0,r,i);e.addOrTally(this.possibleRightPairs,c),n.reverse();try{for(var d=hn(this.possibleLeftPairs),v=d.next();!v.done;v=d.next()){var h=v.value;if(h.getCount()>1)try{for(var p=(s=void 0,hn(this.possibleRightPairs)),g=p.next();!g.done;g=p.next()){var w=g.value;if(w.getCount()>1&&e.checkChecksum(h,w))return e.constructResult(h,w)}}catch(_){s={error:_}}finally{try{g&&!g.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}}}catch(_){a={error:_}}finally{try{v&&!v.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}throw new I},e.addOrTally=function(r,n){var i,a;if(n!=null){var o=!1;try{for(var s=hn(r),l=s.next();!l.done;l=s.next()){var u=l.value;if(u.getValue()===n.getValue()){u.incrementCount(),o=!0;break}}}catch(c){i={error:c}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}o||r.push(n)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(r,n){for(var i=4537077*r.getValue()+n.getValue(),a=new String(i).toString(),o=new Q,s=13-a.length;s>0;s--)o.append("0");o.append(a);for(var l=0,s=0;s<13;s++){var u=o.charAt(s).charCodeAt(0)-48;l+=(s&1)===0?3*u:u}l=10-l%10,l===10&&(l=0),o.append(l.toString());var c=r.getFinderPattern().getResultPoints(),d=n.getFinderPattern().getResultPoints();return new Be(o.toString(),null,0,[c[0],c[1],d[0],d[1]],F.RSS_14,new Date().getTime())},e.checkChecksum=function(r,n){var i=(r.getChecksumPortion()+16*n.getChecksumPortion())%79,a=9*r.getFinderPattern().getValue()+n.getFinderPattern().getValue();return a>72&&a--,a>8&&a--,i===a},e.prototype.decodePair=function(r,n,i,a){try{var o=this.findFinderPattern(r,n),s=this.parseFoundFinderPattern(r,i,n,o),l=a==null?null:a.get(se.NEED_RESULT_POINT_CALLBACK);if(l!=null){var u=(o[0]+o[1])/2;n&&(u=r.getSize()-1-u),l.foundPossibleResultPoint(new k(u,i))}var c=this.decodeDataCharacter(r,s,!0),d=this.decodeDataCharacter(r,s,!1);return new $1(1597*c.getValue()+d.getValue(),c.getChecksumPortion()+4*d.getChecksumPortion(),s)}catch{return null}},e.prototype.decodeDataCharacter=function(r,n,i){for(var a=this.getDataCharacterCounters(),o=0;o<a.length;o++)a[o]=0;if(i)we.recordPatternInReverse(r,n.getStartEnd()[0],a);else{we.recordPattern(r,n.getStartEnd()[1]+1,a);for(var s=0,l=a.length-1;s<l;s++,l--){var u=a[s];a[s]=a[l],a[l]=u}}for(var c=i?16:15,d=W.sum(new Int32Array(a))/c,v=this.getOddCounts(),h=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors(),s=0;s<a.length;s++){var w=a[s]/d,_=Math.floor(w+.5);_<1?_=1:_>8&&(_=8);var m=Math.floor(s/2);(s&1)===0?(v[m]=_,p[m]=w-_):(h[m]=_,g[m]=w-_)}this.adjustOddEvenCounts(i,c);for(var A=0,y=0,s=v.length-1;s>=0;s--)y*=9,y+=v[s],A+=v[s];for(var C=0,b=0,s=h.length-1;s>=0;s--)C*=9,C+=h[s],b+=h[s];var O=y+3*C;if(i){if((A&1)!==0||A>12||A<4)throw new I;var P=(12-A)/2,$=e.OUTSIDE_ODD_WIDEST[P],M=9-$,le=bt.getRSSvalue(v,$,!1),H=bt.getRSSvalue(h,M,!0),ee=e.OUTSIDE_EVEN_TOTAL_SUBSET[P],be=e.OUTSIDE_GSUM[P];return new Mr(le*ee+H+be,O)}else{if((b&1)!==0||b>10||b<4)throw new I;var P=(10-b)/2,$=e.INSIDE_ODD_WIDEST[P],M=9-$,le=bt.getRSSvalue(v,$,!0),H=bt.getRSSvalue(h,M,!1),He=e.INSIDE_ODD_TOTAL_SUBSET[P],be=e.INSIDE_GSUM[P];return new Mr(H*He+le+be,O)}},e.prototype.findFinderPattern=function(r,n){var i=this.getDecodeFinderCounters();i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=r.getSize(),o=!1,s=0;s<a&&(o=!r.get(s),n!==o);)s++;for(var l=0,u=s,c=s;c<a;c++)if(r.get(c)!==o)i[l]++;else{if(l===3){if(xt.isFinderPattern(i))return[u,c];u+=i[0]+i[1],i[0]=i[2],i[1]=i[3],i[2]=0,i[3]=0,l--}else l++;i[l]=1,o=!o}throw new I},e.prototype.parseFoundFinderPattern=function(r,n,i,a){for(var o=r.get(a[0]),s=a[0]-1;s>=0&&o!==r.get(s);)s--;s++;var l=a[0]-s,u=this.getDecodeFinderCounters(),c=new Int32Array(u.length);re.arraycopy(u,0,c,1,u.length-1),c[0]=l;var d=this.parseFinderValue(c,e.FINDER_PATTERNS),v=s,h=a[1];return i&&(v=r.getSize()-1-v,h=r.getSize()-1-h),new da(d,[s,a[1]],v,h,n)},e.prototype.adjustOddEvenCounts=function(r,n){var i=W.sum(new Int32Array(this.getOddCounts())),a=W.sum(new Int32Array(this.getEvenCounts())),o=!1,s=!1,l=!1,u=!1;r?(i>12?s=!0:i<4&&(o=!0),a>12?u=!0:a<4&&(l=!0)):(i>11?s=!0:i<5&&(o=!0),a>10?u=!0:a<4&&(l=!0));var c=i+a-n,d=(i&1)===(r?1:0),v=(a&1)===1;if(c===1)if(d){if(v)throw new I;s=!0}else{if(!v)throw new I;u=!0}else if(c===-1)if(d){if(v)throw new I;o=!0}else{if(!v)throw new I;l=!0}else if(c===0){if(d){if(!v)throw new I;i<a?(o=!0,u=!0):(s=!0,l=!0)}else if(v)throw new I}else throw new I;if(o){if(s)throw new I;xt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&xt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),l){if(u)throw new I;xt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}u&&xt.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e}(xt),G1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),tr=function(t){G1(e,t);function e(r){var n=t.call(this)||this;n.readers=[];var i=r?r.get(se.POSSIBLE_FORMATS):null,a=r&&r.get(se.ASSUME_CODE_39_CHECK_DIGIT)!==void 0;return i&&((i.includes(F.EAN_13)||i.includes(F.UPC_A)||i.includes(F.EAN_8)||i.includes(F.UPC_E))&&n.readers.push(new dn(r)),i.includes(F.CODE_39)&&n.readers.push(new _i(a)),i.includes(F.CODE_128)&&n.readers.push(new wi),i.includes(F.ITF)&&n.readers.push(new Ei),i.includes(F.RSS_14)&&n.readers.push(new Ni),i.includes(F.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new V1))),n.readers.length===0&&(n.readers.push(new dn(r)),n.readers.push(new _i),n.readers.push(new dn(r)),n.readers.push(new wi),n.readers.push(new Ei),n.readers.push(new Ni)),n}return e.prototype.decodeRow=function(r,n,i){for(var a=0;a<this.readers.length;a++)try{return this.readers[a].decodeRow(r,n,i)}catch{}throw new I},e.prototype.reset=function(){this.readers.forEach(function(r){return r.reset()})},e}(we),z1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){z1(e,t);function e(r,n){return r===void 0&&(r=500),t.call(this,new tr(n),r,n)||this}return e})(Ft);var Di=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},j=function(){function t(e,r,n){this.ecCodewords=e,this.ecBlocks=[r],n&&this.ecBlocks.push(n)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),X=function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),W1=function(){function t(e,r,n,i,a,o){var s,l;this.versionNumber=e,this.symbolSizeRows=r,this.symbolSizeColumns=n,this.dataRegionSizeRows=i,this.dataRegionSizeColumns=a,this.ecBlocks=o;var u=0,c=o.getECCodewords(),d=o.getECBlocks();try{for(var v=Di(d),h=v.next();!h.done;h=v.next()){var p=h.value;u+=p.getCount()*(p.getDataCodewords()+c)}}catch(g){s={error:g}}finally{try{h&&!h.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}this.totalCodewords=u}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,i;if((e&1)!==0||(r&1)!==0)throw new R;try{for(var a=Di(t.VERSIONS),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}throw new R},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new j(5,new X(1,3))),new t(2,12,12,10,10,new j(7,new X(1,5))),new t(3,14,14,12,12,new j(10,new X(1,8))),new t(4,16,16,14,14,new j(12,new X(1,12))),new t(5,18,18,16,16,new j(14,new X(1,18))),new t(6,20,20,18,18,new j(18,new X(1,22))),new t(7,22,22,20,20,new j(20,new X(1,30))),new t(8,24,24,22,22,new j(24,new X(1,36))),new t(9,26,26,24,24,new j(28,new X(1,44))),new t(10,32,32,14,14,new j(36,new X(1,62))),new t(11,36,36,16,16,new j(42,new X(1,86))),new t(12,40,40,18,18,new j(48,new X(1,114))),new t(13,44,44,20,20,new j(56,new X(1,144))),new t(14,48,48,22,22,new j(68,new X(1,174))),new t(15,52,52,24,24,new j(42,new X(2,102))),new t(16,64,64,14,14,new j(56,new X(2,140))),new t(17,72,72,16,16,new j(36,new X(4,92))),new t(18,80,80,18,18,new j(48,new X(4,114))),new t(19,88,88,20,20,new j(56,new X(4,144))),new t(20,96,96,22,22,new j(68,new X(4,174))),new t(21,104,104,24,24,new j(56,new X(6,136))),new t(22,120,120,18,18,new j(68,new X(6,175))),new t(23,132,132,20,20,new j(62,new X(8,163))),new t(24,144,144,22,22,new j(62,new X(8,156),new X(2,155))),new t(25,8,18,6,16,new j(7,new X(1,5))),new t(26,8,32,6,14,new j(11,new X(1,10))),new t(27,12,26,10,24,new j(14,new X(1,16))),new t(28,12,36,10,16,new j(18,new X(1,22))),new t(29,16,36,14,16,new j(24,new X(1,32))),new t(30,16,48,14,22,new j(28,new X(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),X1=function(){function t(e){var r=e.getHeight();if(r<8||r>144||(r&1)!==0)throw new R;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new Ze(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(e){var r=e.getHeight(),n=e.getWidth();return W1.getVersionForDimensions(r,n)},t.prototype.readCodewords=function(){var e=new Int8Array(this.version.getTotalCodewords()),r=0,n=4,i=0,a=this.mappingBitMatrix.getHeight(),o=this.mappingBitMatrix.getWidth(),s=!1,l=!1,u=!1,c=!1;do if(n===a&&i===0&&!s)e[r++]=this.readCorner1(a,o)&255,n-=2,i+=2,s=!0;else if(n===a-2&&i===0&&(o&3)!==0&&!l)e[r++]=this.readCorner2(a,o)&255,n-=2,i+=2,l=!0;else if(n===a+4&&i===2&&(o&7)===0&&!u)e[r++]=this.readCorner3(a,o)&255,n-=2,i+=2,u=!0;else if(n===a-2&&i===0&&(o&7)===4&&!c)e[r++]=this.readCorner4(a,o)&255,n-=2,i+=2,c=!0;else{do n<a&&i>=0&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n-=2,i+=2;while(n>=0&&i<o);n+=1,i+=3;do n>=0&&i<o&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n+=2,i-=2;while(n<a&&i>=0);n+=3,i+=1}while(n<a||i<o);if(r!==this.version.getTotalCodewords())throw new R;return e},t.prototype.readModule=function(e,r,n,i){return e<0&&(e+=n,r+=4-(n+4&7)),r<0&&(r+=i,e+=4-(i+4&7)),this.readMappingMatrix.set(r,e),this.mappingBitMatrix.get(r,e)},t.prototype.readUtah=function(e,r,n,i){var a=0;return this.readModule(e-2,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-2,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r,n,i)&&(a|=1),a<<=1,this.readModule(e,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e,r,n,i)&&(a|=1),a},t.prototype.readCorner1=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,1,e,r)&&(n|=1),n<<=1,this.readModule(e-1,2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.readCorner2=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-4,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner3=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-3,e,r)&&(n|=1),n<<=1,this.readModule(1,r-2,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner4=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.extractDataRegion=function(e){var r=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(e.getHeight()!==r)throw new L("Dimension of bitMatrix must match the version size");for(var i=this.version.getDataRegionSizeRows(),a=this.version.getDataRegionSizeColumns(),o=r/i|0,s=n/a|0,l=o*i,u=s*a,c=new Ze(u,l),d=0;d<o;++d)for(var v=d*i,h=0;h<s;++h)for(var p=h*a,g=0;g<i;++g)for(var w=d*(i+2)+1+g,_=v+g,m=0;m<a;++m){var A=h*(a+2)+1+m;if(e.get(A,w)){var y=p+m;c.set(y,_)}}return c},t}(),Bi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},j1=function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r){var n,i,a,o,s=r.getECBlocks(),l=0,u=s.getECBlocks();try{for(var c=Bi(u),d=c.next();!d.done;d=c.next()){var v=d.value;l+=v.getCount()}}catch(be){n={error:be}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}var h=new Array(l),p=0;try{for(var g=Bi(u),w=g.next();!w.done;w=g.next())for(var v=w.value,_=0;_<v.getCount();_++){var m=v.getDataCodewords(),A=s.getECCodewords()+m;h[p++]=new t(m,new Uint8Array(A))}}catch(be){a={error:be}}finally{try{w&&!w.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}for(var y=h[0].codewords.length,C=y-s.getECCodewords(),b=C-1,O=0,_=0;_<b;_++)for(var P=0;P<p;P++)h[P].codewords[_]=e[O++];for(var $=r.getVersionNumber()===24,M=$?8:p,P=0;P<M;P++)h[P].codewords[C-1]=e[O++];for(var le=h[0].codewords.length,_=C;_<le;_++)for(var P=0;P<p;P++){var H=$?(P+8)%p:P,ee=$&&H>7?_-1:_;h[H].codewords[ee]=e[O++]}if(O!==e.length)throw new L;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),pa=function(){function t(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new L(""+e);var r=0,n=this.bitOffset,i=this.byteOffset,a=this.bytes;if(n>0){var o=8-n,s=e<o?e:o,l=o-s,u=255>>8-s<<l;r=(a[i]&u)>>l,e-=s,n+=s,n===8&&(n=0,i++)}if(e>0){for(;e>=8;)r=r<<8|a[i]&255,i++,e-=8;if(e>0){var l=8-e,u=255>>l<<l;r=r<<e|(a[i]&u)>>l,n+=e}}return this.bitOffset=n,this.byteOffset=i,r},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}(),fe;(function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"})(fe||(fe={}));var Y1=function(){function t(){}return t.decode=function(e){var r=new pa(e),n=new Q,i=new Q,a=new Array,o=fe.ASCII_ENCODE;do if(o===fe.ASCII_ENCODE)o=this.decodeAsciiSegment(r,n,i);else{switch(o){case fe.C40_ENCODE:this.decodeC40Segment(r,n);break;case fe.TEXT_ENCODE:this.decodeTextSegment(r,n);break;case fe.ANSIX12_ENCODE:this.decodeAnsiX12Segment(r,n);break;case fe.EDIFACT_ENCODE:this.decodeEdifactSegment(r,n);break;case fe.BASE256_ENCODE:this.decodeBase256Segment(r,n,a);break;default:throw new R}o=fe.ASCII_ENCODE}while(o!==fe.PAD_ENCODE&&r.available()>0);return i.length()>0&&n.append(i.toString()),new Wr(e,n.toString(),a.length===0?null:a,null)},t.decodeAsciiSegment=function(e,r,n){var i=!1;do{var a=e.readBits(8);if(a===0)throw new R;if(a<=128)return i&&(a+=128),r.append(String.fromCharCode(a-1)),fe.ASCII_ENCODE;if(a===129)return fe.PAD_ENCODE;if(a<=229){var o=a-130;o<10&&r.append("0"),r.append(""+o)}else switch(a){case 230:return fe.C40_ENCODE;case 231:return fe.BASE256_ENCODE;case 232:r.append("");break;case 233:case 234:break;case 235:i=!0;break;case 236:r.append("[)>05"),n.insert(0,"");break;case 237:r.append("[)>06"),n.insert(0,"");break;case 238:return fe.ANSIX12_ENCODE;case 239:return fe.TEXT_ENCODE;case 240:return fe.EDIFACT_ENCODE;case 241:break;default:if(a!==254||e.available()!==0)throw new R;break}}while(e.available()>0);return fe.ASCII_ENCODE},t.decodeC40Segment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.C40_BASIC_SET_CHARS.length){var u=this.C40_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.C40_SHIFT2_SET_CHARS.length){var u=this.C40_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:n?(r.append(String.fromCharCode(l+224)),n=!1):r.append(String.fromCharCode(l+96)),a=0;break;default:throw new R}}}while(e.available()>0)},t.decodeTextSegment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.TEXT_BASIC_SET_CHARS.length){var u=this.TEXT_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.TEXT_SHIFT2_SET_CHARS.length){var u=this.TEXT_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:if(l<this.TEXT_SHIFT3_SET_CHARS.length){var u=this.TEXT_SHIFT3_SET_CHARS[l];n?(r.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):r.append(u),a=0}else throw new R;break;default:throw new R}}}while(e.available()>0)},t.decodeAnsiX12Segment=function(e,r){var n=[];do{if(e.available()===8)return;var i=e.readBits(8);if(i===254)return;this.parseTwoBytes(i,e.readBits(8),n);for(var a=0;a<3;a++){var o=n[a];switch(o){case 0:r.append("\r");break;case 1:r.append("*");break;case 2:r.append(">");break;case 3:r.append(" ");break;default:if(o<14)r.append(String.fromCharCode(o+44));else if(o<40)r.append(String.fromCharCode(o+51));else throw new R;break}}}while(e.available()>0)},t.parseTwoBytes=function(e,r,n){var i=(e<<8)+r-1,a=Math.floor(i/1600);n[0]=a,i-=a*1600,a=Math.floor(i/40),n[1]=a,n[2]=i-a*40},t.decodeEdifactSegment=function(e,r){do{if(e.available()<=16)return;for(var n=0;n<4;n++){var i=e.readBits(6);if(i===31){var a=8-e.getBitOffset();a!==8&&e.readBits(a);return}(i&32)===0&&(i|=64),r.append(String.fromCharCode(i))}}while(e.available()>0)},t.decodeBase256Segment=function(e,r,n){var i=1+e.getByteOffset(),a=this.unrandomize255State(e.readBits(8),i++),o;if(a===0?o=e.available()/8|0:a<250?o=a:o=250*(a-249)+this.unrandomize255State(e.readBits(8),i++),o<0)throw new R;for(var s=new Uint8Array(o),l=0;l<o;l++){if(e.available()<8)throw new R;s[l]=this.unrandomize255State(e.readBits(8),i++)}n.push(s);try{r.append(Ye.decode(s,te.ISO88591))}catch(u){throw new dr("Platform does not support required encoding: "+u.message)}},t.unrandomize255State=function(e,r){var n=149*r%255+1,i=e-n;return i>=0?i:i+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",""],t}(),K1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Z1=function(){function t(){this.rsDecoder=new Xr(Ne.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(e){var r,n,i=new X1(e),a=i.getVersion(),o=i.readCodewords(),s=j1.getDataBlocks(o,a),l=0;try{for(var u=K1(s),c=u.next();!c.done;c=u.next()){var d=c.value;l+=d.getNumDataCodewords()}}catch(A){r={error:A}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}for(var v=new Uint8Array(l),h=s.length,p=0;p<h;p++){var g=s[p],w=g.getCodewords(),_=g.getNumDataCodewords();this.correctErrors(w,_);for(var m=0;m<_;m++)v[m*h+p]=w[m]}return Y1.decode(v)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new ye}for(var i=0;i<r;i++)e[i]=n[i]},t}(),q1=function(){function t(e){this.image=e,this.rectangleDetector=new Nn(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if(r=this.detectSolid2(r),r[3]=this.correctTopRight(r),!r[3])throw new I;r=this.shiftToModuleCenter(r);var n=r[0],i=r[1],a=r[2],o=r[3],s=this.transitionsBetween(n,o)+1,l=this.transitionsBetween(a,o)+1;(s&1)===1&&(s+=1),(l&1)===1&&(l+=1),4*s<7*l&&4*l<7*s&&(s=l=Math.max(s,l));var u=t.sampleGrid(this.image,n,i,a,o,s,l);return new Xn(u,[n,i,a,o])},t.shiftPoint=function(e,r,n){var i=(r.getX()-e.getX())/(n+1),a=(r.getY()-e.getY())/(n+1);return new k(e.getX()+i,e.getY()+a)},t.moveAway=function(e,r,n){var i=e.getX(),a=e.getY();return i<r?i-=1:i+=1,a<n?a-=1:a+=1,new k(i,a)},t.prototype.detectSolid1=function(e){var r=e[0],n=e[1],i=e[3],a=e[2],o=this.transitionsBetween(r,n),s=this.transitionsBetween(n,i),l=this.transitionsBetween(i,a),u=this.transitionsBetween(a,r),c=o,d=[a,r,n,i];return c>s&&(c=s,d[0]=r,d[1]=n,d[2]=i,d[3]=a),c>l&&(c=l,d[0]=n,d[1]=i,d[2]=a,d[3]=r),c>u&&(d[0]=i,d[1]=a,d[2]=r,d[3]=n),d},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=t.shiftPoint(n,i,(o+1)*4),l=t.shiftPoint(i,n,(o+1)*4),u=this.transitionsBetween(s,r),c=this.transitionsBetween(l,a);return u<c?(e[0]=r,e[1]=n,e[2]=i,e[3]=a):(e[0]=n,e[1]=i,e[2]=a,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=this.transitionsBetween(n,a),l=t.shiftPoint(r,n,(s+1)*4),u=t.shiftPoint(i,n,(o+1)*4);o=this.transitionsBetween(l,a),s=this.transitionsBetween(u,a);var c=new k(a.getX()+(i.getX()-n.getX())/(o+1),a.getY()+(i.getY()-n.getY())/(o+1)),d=new k(a.getX()+(r.getX()-n.getX())/(s+1),a.getY()+(r.getY()-n.getY())/(s+1));if(!this.isValid(c))return this.isValid(d)?d:null;if(!this.isValid(d))return c;var v=this.transitionsBetween(l,c)+this.transitionsBetween(u,c),h=this.transitionsBetween(l,d)+this.transitionsBetween(u,d);return v>h?c:d},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a)+1,s=this.transitionsBetween(i,a)+1,l=t.shiftPoint(r,n,s*4),u=t.shiftPoint(i,n,o*4);o=this.transitionsBetween(l,a)+1,s=this.transitionsBetween(u,a)+1,(o&1)===1&&(o+=1),(s&1)===1&&(s+=1);var c=(r.getX()+n.getX()+i.getX()+a.getX())/4,d=(r.getY()+n.getY()+i.getY()+a.getY())/4;r=t.moveAway(r,c,d),n=t.moveAway(n,c,d),i=t.moveAway(i,c,d),a=t.moveAway(a,c,d);var v,h;return l=t.shiftPoint(r,n,s*4),l=t.shiftPoint(l,a,o*4),v=t.shiftPoint(n,r,s*4),v=t.shiftPoint(v,i,o*4),u=t.shiftPoint(i,a,s*4),u=t.shiftPoint(u,n,o*4),h=t.shiftPoint(a,i,s*4),h=t.shiftPoint(h,r,o*4),[l,v,u,h]},t.prototype.isValid=function(e){return e.getX()>=0&&e.getX()<this.image.getWidth()&&e.getY()>0&&e.getY()<this.image.getHeight()},t.sampleGrid=function(e,r,n,i,a,o,s){var l=jn.getInstance();return l.sampleGrid(e,o,s,.5,.5,o-.5,.5,o-.5,s-.5,.5,s-.5,r.getX(),r.getY(),a.getX(),a.getY(),i.getX(),i.getY(),n.getX(),n.getY())},t.prototype.transitionsBetween=function(e,r){var n=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.trunc(r.getX()),o=Math.trunc(r.getY()),s=Math.abs(o-i)>Math.abs(a-n);if(s){var l=n;n=i,i=l,l=a,a=o,o=l}for(var u=Math.abs(a-n),c=Math.abs(o-i),d=-u/2,v=i<o?1:-1,h=n<a?1:-1,p=0,g=this.image.get(s?i:n,s?n:i),w=n,_=i;w!==a;w+=h){var m=this.image.get(s?_:w,s?w:_);if(m!==g&&(p++,g=m),d+=c,d>0){if(_===o)break;_+=v,d-=u}}return p},t}(),Rn=function(){function t(){this.decoder=new Z1}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n,i;if(r!=null&&r.has(se.PURE_BARCODE)){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(a),i=t.NO_POINTS}else{var o=new q1(e.getBlackMatrix()).detect();n=this.decoder.decode(o.getBits()),i=o.getPoints()}var s=n.getRawBytes(),l=new Be(n.getText(),s,8*s.length,i,F.DATA_MATRIX,re.currentTimeMillis()),u=n.getByteSegments();u!=null&&l.putMetadata(me.BYTE_SEGMENTS,u);var c=n.getECLevel();return c!=null&&l.putMetadata(me.ERROR_CORRECTION_LEVEL,c),l},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r==null||n==null)throw new I;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0],u=(l-s+1)/i,c=(o-a+1)/i;if(u<=0||c<=0)throw new I;var d=i/2;a+=d,s+=d;for(var v=new Ze(u,c),h=0;h<c;h++)for(var p=a+h*i,g=0;g<u;g++)e.get(s+g*i,p)&&v.set(g,h);return v},t.moduleSize=function(e,r){for(var n=r.getWidth(),i=e[0],a=e[1];i<n&&r.get(i,a);)i++;if(i===n)throw new I;var o=i-e[0];if(o===0)throw new I;return o},t.NO_POINTS=[],t}(),Q1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){Q1(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Rn,r)||this}return e})(Ft);var St;(function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"})(St||(St={}));var J1=function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Fe(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new L;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(St.L,"L",1),t.M=new t(St.M,"M",0),t.Q=new t(St.Q,"Q",3),t.H=new t(St.H,"H",2),t}(),ef=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ga=function(){function t(e){this.errorCorrectionLevel=J1.forBits(e>>3&3),this.dataMask=e&7}return t.numBitsDiffering=function(e,r){return G.bitCount(e^r)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return n!==null?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,i,a=Number.MAX_SAFE_INTEGER,o=0;try{for(var s=ef(t.FORMAT_INFO_DECODE_LOOKUP),l=s.next();!l.done;l=s.next()){var u=l.value,c=u[0];if(c===e||c===r)return new t(u[1]);var d=t.numBitsDiffering(e,c);d<a&&(o=u[1],a=d),e!==r&&(d=t.numBitsDiffering(r,c),d<a&&(o=u[1],a=d))}}catch(v){n={error:v}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a<=3?new t(o):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t}(),tf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},E=function(){function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.ecCodewordsPerBlock=e,this.ecBlocks=r}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var e,r,n=0,i=this.ecBlocks;try{for(var a=tf(i),o=a.next();!o.done;o=a.next()){var s=o.value;n+=s.getCount()}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),x=function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),rf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wt=function(){function t(e,r){for(var n,i,a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];this.versionNumber=e,this.alignmentPatternCenters=r,this.ecBlocks=a;var s=0,l=a[0].getECCodewordsPerBlock(),u=a[0].getECBlocks();try{for(var c=rf(u),d=c.next();!d.done;d=c.next()){var v=d.value;s+=v.getCount()*(v.getDataCodewords()+l)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}this.totalCodewords=s}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(e){return this.ecBlocks[e.getValue()]},t.getProvisionalVersionForDimension=function(e){if(e%4!==1)throw new R;try{return this.getVersionForNumber((e-17)/4)}catch{throw new R}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new L;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,i=0;i<t.VERSION_DECODE_INFO.length;i++){var a=t.VERSION_DECODE_INFO[i];if(a===e)return t.getVersionForNumber(i+7);var o=ga.numBitsDiffering(e,a);o<r&&(n=i+7,r=o)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var e=this.getDimensionForVersion(),r=new Ze(e);r.setRegion(0,0,9,9),r.setRegion(e-8,0,8,9),r.setRegion(0,e-8,9,8);for(var n=this.alignmentPatternCenters.length,i=0;i<n;i++)for(var a=this.alignmentPatternCenters[i]-2,o=0;o<n;o++)i===0&&(o===0||o===n-1)||i===n-1&&o===0||r.setRegion(this.alignmentPatternCenters[o]-2,a,5,5);return r.setRegion(6,9,1,e-17),r.setRegion(9,6,e-17,1),this.versionNumber>6&&(r.setRegion(e-11,0,3,6),r.setRegion(0,e-11,6,3)),r},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new E(7,new x(1,19)),new E(10,new x(1,16)),new E(13,new x(1,13)),new E(17,new x(1,9))),new t(2,Int32Array.from([6,18]),new E(10,new x(1,34)),new E(16,new x(1,28)),new E(22,new x(1,22)),new E(28,new x(1,16))),new t(3,Int32Array.from([6,22]),new E(15,new x(1,55)),new E(26,new x(1,44)),new E(18,new x(2,17)),new E(22,new x(2,13))),new t(4,Int32Array.from([6,26]),new E(20,new x(1,80)),new E(18,new x(2,32)),new E(26,new x(2,24)),new E(16,new x(4,9))),new t(5,Int32Array.from([6,30]),new E(26,new x(1,108)),new E(24,new x(2,43)),new E(18,new x(2,15),new x(2,16)),new E(22,new x(2,11),new x(2,12))),new t(6,Int32Array.from([6,34]),new E(18,new x(2,68)),new E(16,new x(4,27)),new E(24,new x(4,19)),new E(28,new x(4,15))),new t(7,Int32Array.from([6,22,38]),new E(20,new x(2,78)),new E(18,new x(4,31)),new E(18,new x(2,14),new x(4,15)),new E(26,new x(4,13),new x(1,14))),new t(8,Int32Array.from([6,24,42]),new E(24,new x(2,97)),new E(22,new x(2,38),new x(2,39)),new E(22,new x(4,18),new x(2,19)),new E(26,new x(4,14),new x(2,15))),new t(9,Int32Array.from([6,26,46]),new E(30,new x(2,116)),new E(22,new x(3,36),new x(2,37)),new E(20,new x(4,16),new x(4,17)),new E(24,new x(4,12),new x(4,13))),new t(10,Int32Array.from([6,28,50]),new E(18,new x(2,68),new x(2,69)),new E(26,new x(4,43),new x(1,44)),new E(24,new x(6,19),new x(2,20)),new E(28,new x(6,15),new x(2,16))),new t(11,Int32Array.from([6,30,54]),new E(20,new x(4,81)),new E(30,new x(1,50),new x(4,51)),new E(28,new x(4,22),new x(4,23)),new E(24,new x(3,12),new x(8,13))),new t(12,Int32Array.from([6,32,58]),new E(24,new x(2,92),new x(2,93)),new E(22,new x(6,36),new x(2,37)),new E(26,new x(4,20),new x(6,21)),new E(28,new x(7,14),new x(4,15))),new t(13,Int32Array.from([6,34,62]),new E(26,new x(4,107)),new E(22,new x(8,37),new x(1,38)),new E(24,new x(8,20),new x(4,21)),new E(22,new x(12,11),new x(4,12))),new t(14,Int32Array.from([6,26,46,66]),new E(30,new x(3,115),new x(1,116)),new E(24,new x(4,40),new x(5,41)),new E(20,new x(11,16),new x(5,17)),new E(24,new x(11,12),new x(5,13))),new t(15,Int32Array.from([6,26,48,70]),new E(22,new x(5,87),new x(1,88)),new E(24,new x(5,41),new x(5,42)),new E(30,new x(5,24),new x(7,25)),new E(24,new x(11,12),new x(7,13))),new t(16,Int32Array.from([6,26,50,74]),new E(24,new x(5,98),new x(1,99)),new E(28,new x(7,45),new x(3,46)),new E(24,new x(15,19),new x(2,20)),new E(30,new x(3,15),new x(13,16))),new t(17,Int32Array.from([6,30,54,78]),new E(28,new x(1,107),new x(5,108)),new E(28,new x(10,46),new x(1,47)),new E(28,new x(1,22),new x(15,23)),new E(28,new x(2,14),new x(17,15))),new t(18,Int32Array.from([6,30,56,82]),new E(30,new x(5,120),new x(1,121)),new E(26,new x(9,43),new x(4,44)),new E(28,new x(17,22),new x(1,23)),new E(28,new x(2,14),new x(19,15))),new t(19,Int32Array.from([6,30,58,86]),new E(28,new x(3,113),new x(4,114)),new E(26,new x(3,44),new x(11,45)),new E(26,new x(17,21),new x(4,22)),new E(26,new x(9,13),new x(16,14))),new t(20,Int32Array.from([6,34,62,90]),new E(28,new x(3,107),new x(5,108)),new E(26,new x(3,41),new x(13,42)),new E(30,new x(15,24),new x(5,25)),new E(28,new x(15,15),new x(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new E(28,new x(4,116),new x(4,117)),new E(26,new x(17,42)),new E(28,new x(17,22),new x(6,23)),new E(30,new x(19,16),new x(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new E(28,new x(2,111),new x(7,112)),new E(28,new x(17,46)),new E(30,new x(7,24),new x(16,25)),new E(24,new x(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new E(30,new x(4,121),new x(5,122)),new E(28,new x(4,47),new x(14,48)),new E(30,new x(11,24),new x(14,25)),new E(30,new x(16,15),new x(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new E(30,new x(6,117),new x(4,118)),new E(28,new x(6,45),new x(14,46)),new E(30,new x(11,24),new x(16,25)),new E(30,new x(30,16),new x(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new E(26,new x(8,106),new x(4,107)),new E(28,new x(8,47),new x(13,48)),new E(30,new x(7,24),new x(22,25)),new E(30,new x(22,15),new x(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new E(28,new x(10,114),new x(2,115)),new E(28,new x(19,46),new x(4,47)),new E(28,new x(28,22),new x(6,23)),new E(30,new x(33,16),new x(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new E(30,new x(8,122),new x(4,123)),new E(28,new x(22,45),new x(3,46)),new E(30,new x(8,23),new x(26,24)),new E(30,new x(12,15),new x(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new E(30,new x(3,117),new x(10,118)),new E(28,new x(3,45),new x(23,46)),new E(30,new x(4,24),new x(31,25)),new E(30,new x(11,15),new x(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new E(30,new x(7,116),new x(7,117)),new E(28,new x(21,45),new x(7,46)),new E(30,new x(1,23),new x(37,24)),new E(30,new x(19,15),new x(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new E(30,new x(5,115),new x(10,116)),new E(28,new x(19,47),new x(10,48)),new E(30,new x(15,24),new x(25,25)),new E(30,new x(23,15),new x(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new E(30,new x(13,115),new x(3,116)),new E(28,new x(2,46),new x(29,47)),new E(30,new x(42,24),new x(1,25)),new E(30,new x(23,15),new x(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new E(30,new x(17,115)),new E(28,new x(10,46),new x(23,47)),new E(30,new x(10,24),new x(35,25)),new E(30,new x(19,15),new x(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new E(30,new x(17,115),new x(1,116)),new E(28,new x(14,46),new x(21,47)),new E(30,new x(29,24),new x(19,25)),new E(30,new x(11,15),new x(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new E(30,new x(13,115),new x(6,116)),new E(28,new x(14,46),new x(23,47)),new E(30,new x(44,24),new x(7,25)),new E(30,new x(59,16),new x(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new E(30,new x(12,121),new x(7,122)),new E(28,new x(12,47),new x(26,48)),new E(30,new x(39,24),new x(14,25)),new E(30,new x(22,15),new x(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new E(30,new x(6,121),new x(14,122)),new E(28,new x(6,47),new x(34,48)),new E(30,new x(46,24),new x(10,25)),new E(30,new x(2,15),new x(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new E(30,new x(17,122),new x(4,123)),new E(28,new x(29,46),new x(14,47)),new E(30,new x(49,24),new x(10,25)),new E(30,new x(24,15),new x(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new E(30,new x(4,122),new x(18,123)),new E(28,new x(13,46),new x(32,47)),new E(30,new x(48,24),new x(14,25)),new E(30,new x(42,15),new x(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new E(30,new x(20,117),new x(4,118)),new E(28,new x(40,47),new x(7,48)),new E(30,new x(43,24),new x(22,25)),new E(30,new x(10,15),new x(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new E(30,new x(19,118),new x(6,119)),new E(28,new x(18,47),new x(31,48)),new E(30,new x(34,24),new x(34,25)),new E(30,new x(20,15),new x(61,16)))],t}(),he;(function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"})(he||(he={}));var Ri=function(){function t(e,r){this.value=e,this.isMasked=r}return t.prototype.unmaskBitMatrix=function(e,r){for(var n=0;n<r;n++)for(var i=0;i<r;i++)this.isMasked(n,i)&&e.flip(i,n)},t.values=new Map([[he.DATA_MASK_000,new t(he.DATA_MASK_000,function(e,r){return(e+r&1)===0})],[he.DATA_MASK_001,new t(he.DATA_MASK_001,function(e,r){return(e&1)===0})],[he.DATA_MASK_010,new t(he.DATA_MASK_010,function(e,r){return r%3===0})],[he.DATA_MASK_011,new t(he.DATA_MASK_011,function(e,r){return(e+r)%3===0})],[he.DATA_MASK_100,new t(he.DATA_MASK_100,function(e,r){return(Math.floor(e/2)+Math.floor(r/3)&1)===0})],[he.DATA_MASK_101,new t(he.DATA_MASK_101,function(e,r){return e*r%6===0})],[he.DATA_MASK_110,new t(he.DATA_MASK_110,function(e,r){return e*r%6<3})],[he.DATA_MASK_111,new t(he.DATA_MASK_111,function(e,r){return(e+r+e*r%3&1)===0})]]),t}(),nf=function(){function t(e){var r=e.getHeight();if(r<21||(r&3)!==1)throw new R;this.bitMatrix=e}return t.prototype.readFormatInformation=function(){if(this.parsedFormatInfo!==null&&this.parsedFormatInfo!==void 0)return this.parsedFormatInfo;for(var e=0,r=0;r<6;r++)e=this.copyBit(r,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(var n=5;n>=0;n--)e=this.copyBit(8,n,e);for(var i=this.bitMatrix.getHeight(),a=0,o=i-7,n=i-1;n>=o;n--)a=this.copyBit(8,n,a);for(var r=i-8;r<i;r++)a=this.copyBit(r,8,a);if(this.parsedFormatInfo=ga.decodeFormatInformation(e,a),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new R},t.prototype.readVersion=function(){if(this.parsedVersion!==null&&this.parsedVersion!==void 0)return this.parsedVersion;var e=this.bitMatrix.getHeight(),r=Math.floor((e-17)/4);if(r<=6)return wt.getVersionForNumber(r);for(var n=0,i=e-11,a=5;a>=0;a--)for(var o=e-9;o>=i;o--)n=this.copyBit(o,a,n);var s=wt.decodeVersionInformation(n);if(s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;n=0;for(var o=5;o>=0;o--)for(var a=e-9;a>=i;a--)n=this.copyBit(o,a,n);if(s=wt.decodeVersionInformation(n),s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;throw new R},t.prototype.copyBit=function(e,r,n){var i=this.isMirror?this.bitMatrix.get(r,e):this.bitMatrix.get(e,r);return i?n<<1|1:n<<1},t.prototype.readCodewords=function(){var e=this.readFormatInformation(),r=this.readVersion(),n=Ri.values.get(e.getDataMask()),i=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,i);for(var a=r.buildFunctionPattern(),o=!0,s=new Uint8Array(r.getTotalCodewords()),l=0,u=0,c=0,d=i-1;d>0;d-=2){d===6&&d--;for(var v=0;v<i;v++)for(var h=o?i-1-v:v,p=0;p<2;p++)a.get(d-p,h)||(c++,u<<=1,this.bitMatrix.get(d-p,h)&&(u|=1),c===8&&(s[l++]=u,c=0,u=0));o=!o}if(l!==r.getTotalCodewords())throw new R;return s},t.prototype.remask=function(){if(this.parsedFormatInfo!==null){var e=Ri.values[this.parsedFormatInfo.getDataMask()],r=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,r)}},t.prototype.setMirror=function(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e},t.prototype.mirror=function(){for(var e=this.bitMatrix,r=0,n=e.getWidth();r<n;r++)for(var i=r+1,a=e.getHeight();i<a;i++)e.get(r,i)!==e.get(i,r)&&(e.flip(i,r),e.flip(r,i))},t}(),Pi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},af=function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r,n){var i,a,o,s;if(e.length!==r.getTotalCodewords())throw new L;var l=r.getECBlocksForLevel(n),u=0,c=l.getECBlocks();try{for(var d=Pi(c),v=d.next();!v.done;v=d.next()){var h=v.value;u+=h.getCount()}}catch(ee){i={error:ee}}finally{try{v&&!v.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}var p=new Array(u),g=0;try{for(var w=Pi(c),_=w.next();!_.done;_=w.next())for(var h=_.value,m=0;m<h.getCount();m++){var A=h.getDataCodewords(),y=l.getECCodewordsPerBlock()+A;p[g++]=new t(A,new Uint8Array(y))}}catch(ee){o={error:ee}}finally{try{_&&!_.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}for(var C=p[0].codewords.length,b=p.length-1;b>=0;){var O=p[b].codewords.length;if(O===C)break;b--}b++;for(var P=C-l.getECCodewordsPerBlock(),$=0,m=0;m<P;m++)for(var M=0;M<g;M++)p[M].codewords[m]=e[$++];for(var M=b;M<g;M++)p[M].codewords[P]=e[$++];for(var le=p[0].codewords.length,m=P;m<le;m++)for(var M=0;M<g;M++){var H=M<b?m:m+1;p[M].codewords[H]=e[$++]}return p},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),Pe;(function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"})(Pe||(Pe={}));var ie=function(){function t(e,r,n,i){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=i,t.FOR_BITS.set(i,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(r===void 0)throw new L;return r},t.prototype.getCharacterCountBits=function(e){var r=e.getVersionNumber(),n;return r<=9?n=0:r<=26?n=1:n=2,this.characterCountBitsForVersions[n]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(Pe.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Pe.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Pe.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Pe.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Pe.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Pe.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Pe.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Pe.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Pe.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Pe.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),of=function(){function t(){}return t.decode=function(e,r,n,i){var a=new pa(e),o=new Q,s=new Array,l=-1,u=-1;try{var c=null,d=!1,v=void 0;do{if(a.available()<4)v=ie.TERMINATOR;else{var h=a.readBits(4);v=ie.forBits(h)}switch(v){case ie.TERMINATOR:break;case ie.FNC1_FIRST_POSITION:case ie.FNC1_SECOND_POSITION:d=!0;break;case ie.STRUCTURED_APPEND:if(a.available()<16)throw new R;l=a.readBits(8),u=a.readBits(8);break;case ie.ECI:var p=t.parseECIValue(a);if(c=de.getCharacterSetECIByValue(p),c===null)throw new R;break;case ie.HANZI:var g=a.readBits(4),w=a.readBits(v.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(a,o,w);break;default:var _=a.readBits(v.getCharacterCountBits(r));switch(v){case ie.NUMERIC:t.decodeNumericSegment(a,o,_);break;case ie.ALPHANUMERIC:t.decodeAlphanumericSegment(a,o,_,d);break;case ie.BYTE:t.decodeByteSegment(a,o,_,c,s,i);break;case ie.KANJI:t.decodeKanjiSegment(a,o,_);break;default:throw new R}break}}while(v!==ie.TERMINATOR)}catch{throw new R}return new Wr(e,o.toString(),s.length===0?null:s,n===null?null:n.toString(),l,u)},t.decodeHanziSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/96<<8&4294967295|o%96;s<959?s+=41377:s+=42657,i[a]=s>>8&255,i[a+1]=s&255,a+=2,n--}try{r.append(Ye.decode(i,te.GB2312))}catch(l){throw new R(l)}},t.decodeKanjiSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/192<<8&4294967295|o%192;s<7936?s+=33088:s+=49472,i[a]=s>>8,i[a+1]=s,a+=2,n--}try{r.append(Ye.decode(i,te.SHIFT_JIS))}catch(l){throw new R(l)}},t.decodeByteSegment=function(e,r,n,i,a,o){if(8*n>e.available())throw new R;for(var s=new Uint8Array(n),l=0;l<n;l++)s[l]=e.readBits(8);var u;i===null?u=te.guessEncoding(s,o):u=i.getName();try{r.append(Ye.decode(s,u))}catch(c){throw new R(c)}a.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new R;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,i){for(var a=r.length();n>1;){if(e.available()<11)throw new R;var o=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(o/45))),r.append(t.toAlphaNumericChar(o%45)),n-=2}if(n===1){if(e.available()<6)throw new R;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(i)for(var s=a;s<r.length();s++)r.charAt(s)==="%"&&(s<r.length()-1&&r.charAt(s+1)==="%"?r.deleteCharAt(s+1):r.setCharAt(s,""))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new R;var i=e.readBits(10);if(i>=1e3)throw new R;r.append(t.toAlphaNumericChar(Math.floor(i/100))),r.append(t.toAlphaNumericChar(Math.floor(i/10)%10)),r.append(t.toAlphaNumericChar(i%10)),n-=3}if(n===2){if(e.available()<7)throw new R;var a=e.readBits(7);if(a>=100)throw new R;r.append(t.toAlphaNumericChar(Math.floor(a/10))),r.append(t.toAlphaNumericChar(a%10))}else if(n===1){if(e.available()<4)throw new R;var o=e.readBits(4);if(o>=10)throw new R;r.append(t.toAlphaNumericChar(o))}},t.parseECIValue=function(e){var r=e.readBits(8);if((r&128)===0)return r&127;if((r&192)===128){var n=e.readBits(8);return(r&63)<<8&4294967295|n}if((r&224)===192){var i=e.readBits(16);return(r&31)<<16&4294967295|i}throw new R},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),xa=function(){function t(e){this.mirrored=e}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(e){if(!(!this.mirrored||e===null||e.length<3)){var r=e[0];e[0]=e[2],e[2]=r}},t}(),ki=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sf=function(){function t(){this.rsDecoder=new Xr(Ne.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(e,r){return this.decodeBitMatrix(Ze.parseFromBooleanArray(e),r)},t.prototype.decodeBitMatrix=function(e,r){var n=new nf(e),i=null;try{return this.decodeBitMatrixParser(n,r)}catch(o){i=o}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var a=this.decodeBitMatrixParser(n,r);return a.setOther(new xa(!0)),a}catch(o){throw i!==null?i:o}},t.prototype.decodeBitMatrixParser=function(e,r){var n,i,a,o,s=e.readVersion(),l=e.readFormatInformation().getErrorCorrectionLevel(),u=e.readCodewords(),c=af.getDataBlocks(u,s,l),d=0;try{for(var v=ki(c),h=v.next();!h.done;h=v.next()){var p=h.value;d+=p.getNumDataCodewords()}}catch(b){n={error:b}}finally{try{h&&!h.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}var g=new Uint8Array(d),w=0;try{for(var _=ki(c),m=_.next();!m.done;m=_.next()){var p=m.value,A=p.getCodewords(),y=p.getNumDataCodewords();this.correctErrors(A,y);for(var C=0;C<y;C++)g[w++]=A[C]}}catch(b){a={error:b}}finally{try{m&&!m.done&&(o=_.return)&&o.call(_)}finally{if(a)throw a.error}}return of.decode(g,s,l,r)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new ye}for(var i=0;i<r;i++)e[i]=n[i]},t}(),lf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),uf=function(t){lf(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.estimatedModuleSize=i,a}return e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=(this.getX()+n)/2,o=(this.getY()+r)/2,s=(this.estimatedModuleSize+i)/2;return new e(a,o,s)},e}(k),ff=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cf=function(){function t(e,r,n,i,a,o,s){this.image=e,this.startX=r,this.startY=n,this.width=i,this.height=a,this.moduleSize=o,this.resultPointCallback=s,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var e=this.startX,r=this.height,n=this.width,i=e+n,a=this.startY+r/2,o=new Int32Array(3),s=this.image,l=0;l<r;l++){var u=a+((l&1)===0?Math.floor((l+1)/2):-Math.floor((l+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var c=e;c<i&&!s.get(c,u);)c++;for(var d=0;c<i;){if(s.get(c,u))if(d===1)o[1]++;else if(d===2){if(this.foundPatternCross(o)){var v=this.handlePossibleCenter(o,u,c);if(v!==null)return v}o[0]=o[2],o[1]=1,o[2]=0,d=1}else o[++d]++;else d===1&&d++,o[d]++;c++}if(this.foundPatternCross(o)){var v=this.handlePossibleCenter(o,u,i);if(v!==null)return v}}if(this.possibleCenters.length!==0)return this.possibleCenters[0];throw new I},t.centerFromEnd=function(e,r){return r-e[2]-e[1]/2},t.prototype.foundPatternCross=function(e){for(var r=this.moduleSize,n=r/2,i=0;i<3;i++)if(Math.abs(r-e[i])>=n)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,i){var a=this.image,o=a.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var l=e;l>=0&&a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&!a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l)&&s[1]<=n;)s[1]++,l++;if(l===o||s[1]>n)return NaN;for(;l<o&&!a.get(r,l)&&s[2]<=n;)s[2]++,l++;if(s[2]>n)return NaN;var u=s[0]+s[1]+s[2];return 5*Math.abs(u-i)>=2*i?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var i,a,o=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),l=this.crossCheckVertical(r,s,2*e[1],o);if(!isNaN(l)){var u=(e[0]+e[1]+e[2])/3;try{for(var c=ff(this.possibleCenters),d=c.next();!d.done;d=c.next()){var v=d.value;if(v.aboutEquals(u,l,s))return v.combineEstimate(l,s,u)}}catch(p){i={error:p}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var h=new uf(s,l,u);this.possibleCenters.push(h),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},t}(),df=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hf=function(t){df(e,t);function e(r,n,i,a){var o=t.call(this,r,n)||this;return o.estimatedModuleSize=i,o.count=a,a===void 0&&(o.count=1),o}return e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=this.count+1,o=(this.count*this.getX()+n)/a,s=(this.count*this.getY()+r)/a,l=(this.count*this.estimatedModuleSize+i)/a;return new e(o,s,l,a)},e}(k),vf=function(){function t(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t}(),jt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pf=function(){function t(e,r){this.image=e,this.resultPointCallback=r,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=r}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=e!=null&&e.get(se.TRY_HARDER)!==void 0,n=e!=null&&e.get(se.PURE_BARCODE)!==void 0,i=this.image,a=i.getHeight(),o=i.getWidth(),s=Math.floor(3*a/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var l=!1,u=new Int32Array(5),c=s-1;c<a&&!l;c+=s){u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0;for(var d=0,v=0;v<o;v++)if(i.get(v,c))(d&1)===1&&d++,u[d]++;else if((d&1)===0)if(d===4)if(t.foundPatternCross(u)){var h=this.handlePossibleCenter(u,c,v,n);if(h===!0)if(s=2,this.hasSkipped===!0)l=this.haveMultiplyConfirmedCenters();else{var p=this.findRowSkip();p>u[2]&&(c+=p-u[2]-s,v=o-1)}else{u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,d=3;continue}d=0,u[0]=0,u[1]=0,u[2]=0,u[3]=0,u[4]=0}else u[0]=u[2],u[1]=u[3],u[2]=u[4],u[3]=1,u[4]=0,d=3;else u[++d]++;else u[d]++;if(t.foundPatternCross(u)){var h=this.handlePossibleCenter(u,c,o,n);h===!0&&(s=u[0],this.hasSkipped&&(l=this.haveMultiplyConfirmedCenters()))}}var g=this.selectBestPatterns();return k.orderBestPatterns(g),new vf(g)},t.centerFromEnd=function(e,r){return r-e[4]-e[3]-e[2]/2},t.foundPatternCross=function(e){for(var r=0,n=0;n<5;n++){var i=e[n];if(i===0)return!1;r+=i}if(r<7)return!1;var a=r/7,o=a/2;return Math.abs(a-e[0])<o&&Math.abs(a-e[1])<o&&Math.abs(3*a-e[2])<3*o&&Math.abs(a-e[3])<o&&Math.abs(a-e[4])<o},t.prototype.getCrossCheckStateCount=function(){var e=this.crossCheckStateCount;return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e},t.prototype.crossCheckDiagonal=function(e,r,n,i){for(var a=this.getCrossCheckStateCount(),o=0,s=this.image;e>=o&&r>=o&&s.get(r-o,e-o);)a[2]++,o++;if(e<o||r<o)return!1;for(;e>=o&&r>=o&&!s.get(r-o,e-o)&&a[1]<=n;)a[1]++,o++;if(e<o||r<o||a[1]>n)return!1;for(;e>=o&&r>=o&&s.get(r-o,e-o)&&a[0]<=n;)a[0]++,o++;if(a[0]>n)return!1;var l=s.getHeight(),u=s.getWidth();for(o=1;e+o<l&&r+o<u&&s.get(r+o,e+o);)a[2]++,o++;if(e+o>=l||r+o>=u)return!1;for(;e+o<l&&r+o<u&&!s.get(r+o,e+o)&&a[3]<n;)a[3]++,o++;if(e+o>=l||r+o>=u||a[3]>=n)return!1;for(;e+o<l&&r+o<u&&s.get(r+o,e+o)&&a[4]<n;)a[4]++,o++;if(a[4]>=n)return!1;var c=a[0]+a[1]+a[2]+a[3]+a[4];return Math.abs(c-i)<2*i&&t.foundPatternCross(a)},t.prototype.crossCheckVertical=function(e,r,n,i){for(var a=this.image,o=a.getHeight(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(r,l);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(r,l)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(r,l)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-i)>=2*i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,i){for(var a=this.image,o=a.getWidth(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(l,r);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(l,r)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(l,r)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(l,r);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(l,r)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(l,r)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var u=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(u-i)>=i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n,i){var a=e[0]+e[1]+e[2]+e[3]+e[4],o=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(o),e[2],a);if(!isNaN(s)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(s),e[2],a),!isNaN(o)&&(!i||this.crossCheckDiagonal(Math.floor(s),Math.floor(o),e[2],a)))){for(var l=a/7,u=!1,c=this.possibleCenters,d=0,v=c.length;d<v;d++){var h=c[d];if(h.aboutEquals(l,s,o)){c[d]=h.combineEstimate(s,o,l),u=!0;break}}if(!u){var p=new hf(o,s,l);c.push(p),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r,n=this.possibleCenters.length;if(n<=1)return 0;var i=null;try{for(var a=jt(this.possibleCenters),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.getCount()>=t.CENTER_QUORUM)if(i==null)i=s;else return this.hasSkipped=!0,Math.floor((Math.abs(i.getX()-s.getX())-Math.abs(i.getY()-s.getY()))/2)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,i,a=0,o=0,s=this.possibleCenters.length;try{for(var l=jt(this.possibleCenters),u=l.next();!u.done;u=l.next()){var c=u.value;c.getCount()>=t.CENTER_QUORUM&&(a++,o+=c.getEstimatedModuleSize())}}catch(g){e={error:g}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}if(a<3)return!1;var d=o/s,v=0;try{for(var h=jt(this.possibleCenters),p=h.next();!p.done;p=h.next()){var c=p.value;v+=Math.abs(c.getEstimatedModuleSize()-d)}}catch(g){n={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return v<=.05*o},t.prototype.selectBestPatterns=function(){var e,r,n,i,a=this.possibleCenters.length;if(a<3)throw new I;var o=this.possibleCenters,s;if(a>3){var l=0,u=0;try{for(var c=jt(this.possibleCenters),d=c.next();!d.done;d=c.next()){var v=d.value,h=v.getEstimatedModuleSize();l+=h,u+=h*h}}catch(C){e={error:C}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}s=l/a;var p=Math.sqrt(u/a-s*s);o.sort(function(C,b){var O=Math.abs(b.getEstimatedModuleSize()-s),P=Math.abs(C.getEstimatedModuleSize()-s);return O<P?-1:O>P?1:0});for(var g=Math.max(.2*s,p),w=0;w<o.length&&o.length>3;w++){var _=o[w];Math.abs(_.getEstimatedModuleSize()-s)>g&&(o.splice(w,1),w--)}}if(o.length>3){var l=0;try{for(var m=jt(o),A=m.next();!A.done;A=m.next()){var y=A.value;l+=y.getEstimatedModuleSize()}}catch(b){n={error:b}}finally{try{A&&!A.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}s=l/o.length,o.sort(function(b,O){if(O.getCount()===b.getCount()){var P=Math.abs(O.getEstimatedModuleSize()-s),$=Math.abs(b.getEstimatedModuleSize()-s);return P<$?1:P>$?-1:0}else return O.getCount()-b.getCount()}),o.splice(3)}return[o[0],o[1],o[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),gf=function(){function t(e){this.image=e}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(e){this.resultPointCallback=e==null?null:e.get(se.NEED_RESULT_POINT_CALLBACK);var r=new pf(this.image,this.resultPointCallback),n=r.find(e);return this.processFinderPatternInfo(n)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),i=e.getBottomLeft(),a=this.calculateModuleSize(r,n,i);if(a<1)throw new I("No pattern found in proccess finder.");var o=t.computeDimension(r,n,i,a),s=wt.getProvisionalVersionForDimension(o),l=s.getDimensionForVersion()-7,u=null;if(s.getAlignmentPatternCenters().length>0)for(var c=n.getX()-r.getX()+i.getX(),d=n.getY()-r.getY()+i.getY(),v=1-3/l,h=Math.floor(r.getX()+v*(c-r.getX())),p=Math.floor(r.getY()+v*(d-r.getY())),g=4;g<=16;g<<=1)try{u=this.findAlignmentInRegion(a,h,p,g);break}catch(A){if(!(A instanceof I))throw A}var w=t.createTransform(r,n,i,u,o),_=t.sampleGrid(this.image,w,o),m;return u===null?m=[i,r,n]:m=[i,r,n,u],new Xn(_,m)},t.createTransform=function(e,r,n,i,a){var o=a-3.5,s,l,u,c;return i!==null?(s=i.getX(),l=i.getY(),u=o-3,c=u):(s=r.getX()-e.getX()+n.getX(),l=r.getY()-e.getY()+n.getY(),u=o,c=o),ca.quadrilateralToQuadrilateral(3.5,3.5,o,3.5,u,c,3.5,o,e.getX(),e.getY(),r.getX(),r.getY(),s,l,n.getX(),n.getY())},t.sampleGrid=function(e,r,n){var i=jn.getInstance();return i.sampleGridWithTransform(e,n,n,r)},t.computeDimension=function(e,r,n,i){var a=W.round(k.distance(e,r)/i),o=W.round(k.distance(e,n)/i),s=Math.floor((a+o)/2)+7;switch(s&3){case 0:s++;break;case 2:s--;break;case 3:throw new I("Dimensions could be not found.")}return s},t.prototype.calculateModuleSize=function(e,r,n){return(this.calculateModuleSizeOneWay(e,r)+this.calculateModuleSizeOneWay(e,n))/2},t.prototype.calculateModuleSizeOneWay=function(e,r){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(r.getX()),Math.floor(r.getY())),i=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(r.getX()),Math.floor(r.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(n)?i/7:isNaN(i)?n/7:(n+i)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(e,r,n,i){var a=this.sizeOfBlackWhiteBlackRun(e,r,n,i),o=1,s=e-(n-e);s<0?(o=e/(e-s),s=0):s>=this.image.getWidth()&&(o=(this.image.getWidth()-1-e)/(s-e),s=this.image.getWidth()-1);var l=Math.floor(r-(i-r)*o);return o=1,l<0?(o=r/(r-l),l=0):l>=this.image.getHeight()&&(o=(this.image.getHeight()-1-r)/(l-r),l=this.image.getHeight()-1),s=Math.floor(e+(s-e)*o),a+=this.sizeOfBlackWhiteBlackRun(e,r,s,l),a-1},t.prototype.sizeOfBlackWhiteBlackRun=function(e,r,n,i){var a=Math.abs(i-r)>Math.abs(n-e);if(a){var o=e;e=r,r=o,o=n,n=i,i=o}for(var s=Math.abs(n-e),l=Math.abs(i-r),u=-s/2,c=e<n?1:-1,d=r<i?1:-1,v=0,h=n+c,p=e,g=r;p!==h;p+=c){var w=a?g:p,_=a?p:g;if(v===1===this.image.get(w,_)){if(v===2)return W.distance(p,g,e,r);v++}if(u+=l,u>0){if(g===i)break;g+=d,u-=s}}return v===2?W.distance(n+c,i,e,r):NaN},t.prototype.findAlignmentInRegion=function(e,r,n,i){var a=Math.floor(i*e),o=Math.max(0,r-a),s=Math.min(this.image.getWidth()-1,r+a);if(s-o<e*3)throw new I("Alignment top exceeds estimated module size.");var l=Math.max(0,n-a),u=Math.min(this.image.getHeight()-1,n+a);if(u-l<e*3)throw new I("Alignment bottom exceeds estimated module size.");var c=new cf(this.image,o,l,s-o,u-l,e,this.resultPointCallback);return c.find()},t}(),Pn=function(){function t(){this.decoder=new sf}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,i;if(r!=null&&r.get(se.PURE_BARCODE)!==void 0){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(a,r),i=t.NO_POINTS}else{var o=new gf(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(o.getBits(),r),i=o.getPoints()}n.getOther()instanceof xa&&n.getOther().applyMirroredCorrection(i);var s=new Be(n.getText(),n.getRawBytes(),void 0,i,F.QR_CODE,void 0),l=n.getByteSegments();l!==null&&s.putMetadata(me.BYTE_SEGMENTS,l);var u=n.getECLevel();return u!==null&&s.putMetadata(me.ERROR_CORRECTION_LEVEL,u),n.hasStructuredAppend()&&(s.putMetadata(me.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(me.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r===null||n===null)throw new I;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0];if(s>=l||a>=o)throw new I;if(o-a!==l-s&&(l=s+(o-a),l>=e.getWidth()))throw new I;var u=Math.round((l-s+1)/i),c=Math.round((o-a+1)/i);if(u<=0||c<=0)throw new I;if(c!==u)throw new I;var d=Math.floor(i/2);a+=d,s+=d;var v=s+Math.floor((u-1)*i)-l;if(v>0){if(v>d)throw new I;s-=v}var h=a+Math.floor((c-1)*i)-o;if(h>0){if(h>d)throw new I;a-=h}for(var p=new Ze(u,c),g=0;g<c;g++)for(var w=a+Math.floor(g*i),_=0;_<u;_++)e.get(s+Math.floor(_*i),w)&&p.set(_,g);return p},t.moduleSize=function(e,r){for(var n=r.getHeight(),i=r.getWidth(),a=e[0],o=e[1],s=!0,l=0;a<i&&o<n;){if(s!==r.get(a,o)){if(++l===5)break;s=!s}a++,o++}if(a===i||o===n)throw new I;return(a-e[0])/7},t.NO_POINTS=new Array,t}(),xf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(e){return W.sum(e)},t.toIntArray=function(e){var r,n;if(e==null||!e.length)return t.EMPTY_INT_ARRAY;var i=new Int32Array(e.length),a=0;try{for(var o=xf(e),s=o.next();!s.done;s=o.next()){var l=s.value;i[a++]=l}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},t.getCodeword=function(e){var r=De.binarySearch(t.SYMBOL_TABLE,e&262143);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t}(),yf=function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),mf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wf=function(){function t(){}return t.detectMultiple=function(e,r,n){var i=e.getBlackMatrix(),a=t.detect(n,i);return a.length||(i=i.clone(),i.rotate180(),a=t.detect(n,i)),new yf(i,a)},t.detect=function(e,r){for(var n,i,a=new Array,o=0,s=0,l=!1;o<r.getHeight();){var u=t.findVertices(r,o,s);if(u[0]==null&&u[3]==null){if(!l)break;l=!1,s=0;try{for(var c=(n=void 0,mf(a)),d=c.next();!d.done;d=c.next()){var v=d.value;v[1]!=null&&(o=Math.trunc(Math.max(o,v[1].getY()))),v[3]!=null&&(o=Math.max(o,Math.trunc(v[3].getY())))}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}o+=t.ROW_STEP;continue}if(l=!0,a.push(u),!e)break;u[2]!=null?(s=Math.trunc(u[2].getX()),o=Math.trunc(u[2].getY())):(s=Math.trunc(u[4].getX()),o=Math.trunc(u[4].getY()))}return a},t.findVertices=function(e,r,n){var i=e.getHeight(),a=e.getWidth(),o=new Array(8);return t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),o[4]!=null&&(n=Math.trunc(o[4].getX()),r=Math.trunc(o[4].getY())),t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),o},t.copyToResult=function(e,r,n){for(var i=0;i<n.length;i++)e[n[i]]=r[i]},t.findRowsWithPattern=function(e,r,n,i,a,o){for(var s=new Array(4),l=!1,u=new Int32Array(o.length);i<r;i+=t.ROW_STEP){var c=t.findGuardPattern(e,a,i,n,!1,o,u);if(c!=null){for(;i>0;){var d=t.findGuardPattern(e,a,--i,n,!1,o,u);if(d!=null)c=d;else{i++;break}}s[0]=new k(c[0],i),s[1]=new k(c[1],i),l=!0;break}}var v=i+1;if(l){for(var h=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);v<r;v++){var c=t.findGuardPattern(e,d[0],v,n,!1,o,u);if(c!=null&&Math.abs(d[0]-c[0])<t.MAX_PATTERN_DRIFT&&Math.abs(d[1]-c[1])<t.MAX_PATTERN_DRIFT)d=c,h=0;else{if(h>t.SKIPPED_ROW_COUNT_MAX)break;h++}}v-=h+1,s[2]=new k(d[0],v),s[3]=new k(d[1],v)}return v-i<t.BARCODE_MIN_HEIGHT&&De.fill(s,null),s},t.findGuardPattern=function(e,r,n,i,a,o,s){De.fillWithin(s,0,s.length,0);for(var l=r,u=0;e.get(l,n)&&l>0&&u++<t.MAX_PIXEL_DRIFT;)l--;for(var c=l,d=0,v=o.length,h=a;c<i;c++){var p=e.get(c,n);if(p!==h)s[d]++;else{if(d===v-1){if(t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([l,c]);l+=s[0]+s[1],re.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,h=!h}}return d===v-1&&t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([l,c-1]):null},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return 1/0;var l=a/o;n*=l;for(var u=0,c=0;c<i;c++){var d=e[c],v=r[c]*l,h=d>v?d-v:v-d;if(h>n)return 1/0;u+=h}return u/a},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t}(),_f=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mt=function(){function t(e,r){if(r.length===0)throw new L;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-i),re.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){var r,n;if(e===0)return this.getCoefficient(0);if(e===1){var i=0;try{for(var a=_f(this.coefficients),o=a.next();!o.done;o=a.next()){var s=o.value;i=this.field.add(i,s)}}catch(d){r={error:d}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}for(var l=this.coefficients[0],u=this.coefficients.length,c=1;c<u;c++)l=this.field.add(this.field.multiply(e,l),this.coefficients[c]);return l},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new L("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;re.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=this.field.add(r[s-o],n[s]);return new t(this.field,a)},t.prototype.subtract=function(e){if(!this.field.equals(e.field))throw new L("ModulusPolys do not have same ModulusGF field");return e.isZero()?this:this.add(e.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new L("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=0;s<n;s++)for(var l=r[s],u=0;u<a;u++)o[s+u]=this.field.add(o[s+u],this.field.multiply(l,i[u]));return new t(this.field,o)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(e===0)return new t(this.field,new Int32Array([0]));if(e===1)return this;for(var r=this.coefficients.length,n=new Int32Array(r),i=0;i<r;i++)n[i]=this.field.multiply(this.coefficients[i],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new L;if(r===0)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,i=new Int32Array(n+e),a=0;a<n;a++)i[a]=this.field.multiply(this.coefficients[a],r);return new t(this.field,i)},t.prototype.toString=function(){for(var e=new Q,r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);n!==0&&(n<0?(e.append(" - "),n=-n):e.length()>0&&e.append(" + "),(r===0||n!==1)&&e.append(n),r!==0&&(r===1?e.append("x"):(e.append("x^"),e.append(r))))}return e.toString()},t}(),Ef=function(){function t(){}return t.prototype.add=function(e,r){return(e+r)%this.modulus},t.prototype.subtract=function(e,r){return(this.modulus+e-r)%this.modulus},t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new L;return this.logTable[e]},t.prototype.inverse=function(e){if(e===0)throw new fa;return this.expTable[this.modulus-this.logTable[e]-1]},t.prototype.multiply=function(e,r){return e===0||r===0?0:this.expTable[(this.logTable[e]+this.logTable[r])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(e){return e===this},t}(),Af=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cf=function(t){Af(e,t);function e(r,n){var i=t.call(this)||this;i.modulus=r,i.expTable=new Int32Array(r),i.logTable=new Int32Array(r);for(var a=1,o=0;o<r;o++)i.expTable[o]=a,a=a*n%r;for(var o=0;o<r-1;o++)i.logTable[i.expTable[o]]=o;return i.zero=new mt(i,new Int32Array([0])),i.one=new mt(i,new Int32Array([1])),i}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new L;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new mt(this,i)},e.PDF417_GF=new e(z.NUMBER_OF_CODEWORDS,3),e}(Ef),bf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Sf=function(){function t(){this.field=Cf.PDF417_GF}return t.prototype.decode=function(e,r,n){for(var i,a,o=new mt(this.field,e),s=new Int32Array(r),l=!1,u=r;u>0;u--){var c=o.evaluateAt(this.field.exp(u));s[r-u]=c,c!==0&&(l=!0)}if(!l)return 0;var d=this.field.getOne();if(n!=null)try{for(var v=bf(n),h=v.next();!h.done;h=v.next()){var p=h.value,g=this.field.exp(e.length-1-p),w=new mt(this.field,new Int32Array([this.field.subtract(0,g),1]));d=d.multiply(w)}}catch(P){i={error:P}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(var _=new mt(this.field,s),m=this.runEuclideanAlgorithm(this.field.buildMonomial(r,1),_,r),A=m[0],y=m[1],C=this.findErrorLocations(A),b=this.findErrorMagnitudes(y,A,C),u=0;u<C.length;u++){var O=e.length-1-this.field.log(C[u]);if(O<0)throw ye.getChecksumInstance();e[O]=this.field.subtract(e[O],b[u])}return C.length},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=e,o=r,s=this.field.getZero(),l=this.field.getOne();o.getDegree()>=Math.round(n/2);){var u=a,c=s;if(a=o,s=l,a.isZero())throw ye.getChecksumInstance();o=u;for(var d=this.field.getZero(),v=a.getCoefficient(a.getDegree()),h=this.field.inverse(v);o.getDegree()>=a.getDegree()&&!o.isZero();){var p=o.getDegree()-a.getDegree(),g=this.field.multiply(o.getCoefficient(o.getDegree()),h);d=d.add(this.field.buildMonomial(p,g)),o=o.subtract(a.multiplyByMonomial(p,g))}l=d.multiply(s).subtract(c).negative()}var w=l.getCoefficient(0);if(w===0)throw ye.getChecksumInstance();var _=this.field.inverse(w),m=l.multiply(_),A=o.multiply(_);return[m,A]},t.prototype.findErrorLocations=function(e){for(var r=e.getDegree(),n=new Int32Array(r),i=0,a=1;a<this.field.getSize()&&i<r;a++)e.evaluateAt(a)===0&&(n[i]=this.field.inverse(a),i++);if(i!==r)throw ye.getChecksumInstance();return n},t.prototype.findErrorMagnitudes=function(e,r,n){for(var i=r.getDegree(),a=new Int32Array(i),o=1;o<=i;o++)a[i-o]=this.field.multiply(o,r.getCoefficient(o));for(var s=new mt(this.field,a),l=n.length,u=new Int32Array(l),o=0;o<l;o++){var c=this.field.inverse(n[o]),d=this.field.subtract(0,e.evaluateAt(c)),v=this.field.inverse(s.evaluateAt(c));u[o]=this.field.multiply(d,v)}return u},t}(),kn=function(){function t(e,r,n,i,a){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,i,a)}return t.prototype.constructor_1=function(e,r,n,i,a){var o=r==null||n==null,s=i==null||a==null;if(o&&s)throw new I;o?(r=new k(0,i.getY()),n=new k(0,a.getY())):s&&(i=new k(e.getWidth()-1,r.getY()),a=new k(e.getWidth()-1,n.getY())),this.image=e,this.topLeft=r,this.bottomLeft=n,this.topRight=i,this.bottomRight=a,this.minX=Math.trunc(Math.min(r.getX(),n.getX())),this.maxX=Math.trunc(Math.max(i.getX(),a.getX())),this.minY=Math.trunc(Math.min(r.getY(),i.getY())),this.maxY=Math.trunc(Math.max(n.getY(),a.getY()))},t.prototype.constructor_2=function(e){this.image=e.image,this.topLeft=e.getTopLeft(),this.bottomLeft=e.getBottomLeft(),this.topRight=e.getTopRight(),this.bottomRight=e.getBottomRight(),this.minX=e.getMinX(),this.maxX=e.getMaxX(),this.minY=e.getMinY(),this.maxY=e.getMaxY()},t.merge=function(e,r){return e==null?r:r==null?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var i=this.topLeft,a=this.bottomLeft,o=this.topRight,s=this.bottomRight;if(e>0){var l=n?this.topLeft:this.topRight,u=Math.trunc(l.getY()-e);u<0&&(u=0);var c=new k(l.getX(),u);n?i=c:o=c}if(r>0){var d=n?this.bottomLeft:this.bottomRight,v=Math.trunc(d.getY()+r);v>=this.image.getHeight()&&(v=this.image.getHeight()-1);var h=new k(d.getX(),v);n?a=h:s=h}return new t(this.image,i,a,o,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),If=function(){function t(e,r,n,i){this.columnCount=e,this.errorCorrectionLevel=i,this.rowCountUpperPart=r,this.rowCountLowerPart=n,this.rowCount=r+n}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),Kn=function(){function t(){this.buffer=""}return t.form=function(e,r){var n=-1;function i(o,s,l,u,c,d){if(o==="%%")return"%";if(r[++n]!==void 0){o=u?parseInt(u.substr(1)):void 0;var v=c?parseInt(c.substr(1)):void 0,h;switch(d){case"s":h=r[n];break;case"c":h=r[n][0];break;case"f":h=parseFloat(r[n]).toFixed(o);break;case"p":h=parseFloat(r[n]).toPrecision(o);break;case"e":h=parseFloat(r[n]).toExponential(o);break;case"x":h=parseInt(r[n]).toString(v||16);break;case"d":h=parseFloat(parseInt(r[n],v||10).toPrecision(o)).toFixed(0);break}h=typeof h=="object"?JSON.stringify(h):(+h).toString(v);for(var p=parseInt(l),g=l&&l[0]+""=="0"?"0":" ";h.length<p;)h=s!==void 0?h+g:g+h;return h}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(a,i)},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t}(),Of=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ya=function(){function t(e){this.boundingBox=new kn(e),this.codewords=new Array(e.getMaxY()-e.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(r!=null)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var i=this.imageRowToCodewordIndex(e)-n;if(i>=0&&(r=this.codewords[i],r!=null)||(i=this.imageRowToCodewordIndex(e)+n,i<this.codewords.length&&(r=this.codewords[i],r!=null)))return r}return null},t.prototype.imageRowToCodewordIndex=function(e){return e-this.boundingBox.getMinY()},t.prototype.setCodeword=function(e,r){this.codewords[this.imageRowToCodewordIndex(e)]=r},t.prototype.getCodeword=function(e){return this.codewords[this.imageRowToCodewordIndex(e)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var e,r,n=new Kn,i=0;try{for(var a=Of(this.codewords),o=a.next();!o.done;o=a.next()){var s=o.value;if(s==null){n.format("%3d: | %n",i++);continue}n.format("%3d: %3d|%3d%n",i++,s.getRowNumber(),s.getValue())}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),Tf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},rr=function(){function t(){this.values=new Map}return t.prototype.setValue=function(e){e=Math.trunc(e);var r=this.values.get(e);r==null&&(r=0),r++,this.values.set(e,r)},t.prototype.getValue=function(){var e,r,n=-1,i=new Array,a=function(d,v){var h={getKey:function(){return d},getValue:function(){return v}};h.getValue()>n?(n=h.getValue(),i=[],i.push(h.getKey())):h.getValue()===n&&i.push(h.getKey())};try{for(var o=Tf(this.values.entries()),s=o.next();!s.done;s=o.next()){var l=Nf(s.value,2),u=l[0],c=l[1];a(u,c)}}catch(d){e={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return z.toIntArray(i)},t.prototype.getConfidence=function(e){return this.values.get(e)},t}(),Df=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mi=function(t){Df(e,t);function e(r,n){var i=t.call(this,r)||this;return i._isLeft=n,i}return e.prototype.setRowNumbers=function(){var r,n;try{for(var i=vn(this.getCodewords()),a=i.next();!a.done;a=i.next()){var o=a.value;o?.setRowNumberAsRowIndicatorColumn()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(r){var n=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(n,r);for(var i=this.getBoundingBox(),a=this._isLeft?i.getTopLeft():i.getTopRight(),o=this._isLeft?i.getBottomLeft():i.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.imageRowToCodewordIndex(Math.trunc(o.getY())),u=-1,c=1,d=0,v=s;v<l;v++)if(n[v]!=null){var h=n[v],p=h.getRowNumber()-u;if(p===0)d++;else if(p===1)c=Math.max(c,d),d=1,u=h.getRowNumber();else if(p<0||h.getRowNumber()>=r.getRowCount()||p>v)n[v]=null;else{var g=void 0;c>2?g=(c-2)*p:g=p;for(var w=g>=v,_=1;_<=g&&!w;_++)w=n[v-_]!=null;w?n[v]=null:(u=h.getRowNumber(),d=1)}}},e.prototype.getRowHeights=function(){var r,n,i=this.getBarcodeMetadata();if(i==null)return null;this.adjustIncompleteIndicatorColumnRowNumbers(i);var a=new Int32Array(i.getRowCount());try{for(var o=vn(this.getCodewords()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!=null){var u=l.getRowNumber();if(u>=a.length)continue;a[u]++}}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(r){for(var n=this.getBoundingBox(),i=this._isLeft?n.getTopLeft():n.getTopRight(),a=this._isLeft?n.getBottomLeft():n.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(i.getY())),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.getCodewords(),u=-1,c=o;c<s;c++)if(l[c]!=null){var d=l[c];d.setRowNumberAsRowIndicatorColumn();var v=d.getRowNumber()-u;v===0||(v===1?u=d.getRowNumber():d.getRowNumber()>=r.getRowCount()?l[c]=null:u=d.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var r,n,i=this.getCodewords(),a=new rr,o=new rr,s=new rr,l=new rr;try{for(var u=vn(i),c=u.next();!c.done;c=u.next()){var d=c.value;if(d!=null){d.setRowNumberAsRowIndicatorColumn();var v=d.getValue()%30,h=d.getRowNumber();switch(this._isLeft||(h+=2),h%3){case 0:o.setValue(v*3+1);break;case 1:l.setValue(v/3),s.setValue(v%3);break;case 2:a.setValue(v+1);break}}}}catch(g){r={error:g}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(a.getValue().length===0||o.getValue().length===0||s.getValue().length===0||l.getValue().length===0||a.getValue()[0]<1||o.getValue()[0]+s.getValue()[0]<z.MIN_ROWS_IN_BARCODE||o.getValue()[0]+s.getValue()[0]>z.MAX_ROWS_IN_BARCODE)return null;var p=new If(a.getValue()[0],o.getValue()[0],s.getValue()[0],l.getValue()[0]);return this.removeIncorrectCodewords(i,p),p},e.prototype.removeIncorrectCodewords=function(r,n){for(var i=0;i<r.length;i++){var a=r[i];if(r[i]!=null){var o=a.getValue()%30,s=a.getRowNumber();if(s>n.getRowCount()){r[i]=null;continue}switch(this._isLeft||(s+=2),s%3){case 0:o*3+1!==n.getRowCountUpperPart()&&(r[i]=null);break;case 1:(Math.trunc(o/3)!==n.getErrorCorrectionLevel()||o%3!==n.getRowCountLowerPart())&&(r[i]=null);break;case 2:o+1!==n.getColumnCount()&&(r[i]=null);break}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+`
18
+ `+t.prototype.toString.call(this)},e}(ya),Bf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rf=function(){function t(e,r){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=r,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var e=z.MAX_CODEWORDS_IN_BARCODE,r;do r=e,e=this.adjustRowNumbersAndGetCount();while(e>0&&e<r);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(e){e?.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var e=this.adjustRowNumbersByRow();if(e===0)return 0;for(var r=1;r<this.barcodeColumnCount+1;r++)for(var n=this.detectionResultColumns[r].getCodewords(),i=0;i<n.length;i++)n[i]!=null&&(n[i].hasValidRowNumber()||this.adjustRowNumbers(r,i,n));return e},t.prototype.adjustRowNumbersByRow=function(){this.adjustRowNumbersFromBothRI();var e=this.adjustRowNumbersFromLRI();return e+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(!(this.detectionResultColumns[0]==null||this.detectionResultColumns[this.barcodeColumnCount+1]==null)){for(var e=this.detectionResultColumns[0].getCodewords(),r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<e.length;n++)if(e[n]!=null&&r[n]!=null&&e[n].getRowNumber()===r[n].getRowNumber())for(var i=1;i<=this.barcodeColumnCount;i++){var a=this.detectionResultColumns[i].getCodewords()[n];a!=null&&(a.setRowNumber(e[n].getRowNumber()),a.hasValidRowNumber()||(this.detectionResultColumns[i].getCodewords()[n]=null))}}},t.prototype.adjustRowNumbersFromRRI=function(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=this.barcodeColumnCount+1;o>0&&a<this.ADJUST_ROW_NUMBER_SKIP;o--){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(this.detectionResultColumns[0]==null)return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=1;o<this.barcodeColumnCount+1&&a<this.ADJUST_ROW_NUMBER_SKIP;o++){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(e,r,n){return n==null||n.hasValidRowNumber()||(n.isValidRowNumber(e)?(n.setRowNumber(e),r=0):++r),r},t.prototype.adjustRowNumbers=function(e,r,n){var i,a;if(this.detectionResultColumns[e-1]!=null){var o=n[r],s=this.detectionResultColumns[e-1].getCodewords(),l=s;this.detectionResultColumns[e+1]!=null&&(l=this.detectionResultColumns[e+1].getCodewords());var u=new Array(14);u[2]=s[r],u[3]=l[r],r>0&&(u[0]=n[r-1],u[4]=s[r-1],u[5]=l[r-1]),r>1&&(u[8]=n[r-2],u[10]=s[r-2],u[11]=l[r-2]),r<n.length-1&&(u[1]=n[r+1],u[6]=s[r+1],u[7]=l[r+1]),r<n.length-2&&(u[9]=n[r+2],u[12]=s[r+2],u[13]=l[r+2]);try{for(var c=Bf(u),d=c.next();!d.done;d=c.next()){var v=d.value;if(t.adjustRowNumber(o,v))return}}catch(h){i={error:h}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}}},t.adjustRowNumber=function(e,r){return r==null?!1:r.hasValidRowNumber()&&r.getBucket()===e.getBucket()?(e.setRowNumber(r.getRowNumber()),!0):!1},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(e){this.boundingBox=e},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(e,r){this.detectionResultColumns[e]=r},t.prototype.getDetectionResultColumn=function(e){return this.detectionResultColumns[e]},t.prototype.toString=function(){var e=this.detectionResultColumns[0];e==null&&(e=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var r=new Kn,n=0;n<e.getCodewords().length;n++){r.format("CW %3d:",n);for(var i=0;i<this.barcodeColumnCount+2;i++){if(this.detectionResultColumns[i]==null){r.format(" | ");continue}var a=this.detectionResultColumns[i].getCodewords()[n];if(a==null){r.format(" | ");continue}r.format(" %3d|%3d",a.getRowNumber(),a.getValue())}r.format("%n")}return r.toString()},t}(),Pf=function(){function t(e,r,n,i){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(i)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(Math.trunc(this.value/30)*3+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(e){this.rowNumber=e},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),kf=function(){function t(){}return t.initialize=function(){for(var e=0;e<z.SYMBOL_TABLE.length;e++)for(var r=z.SYMBOL_TABLE[e],n=r&1,i=0;i<z.BARS_IN_MODULE;i++){for(var a=0;(r&1)===n;)a+=1,r>>=1;n=r&1,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(z.BARS_IN_MODULE)),t.RATIOS_TABLE[e][z.BARS_IN_MODULE-i-1]=Math.fround(a/z.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return r!==-1?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(e){for(var r=W.sum(e),n=new Int32Array(z.BARS_IN_MODULE),i=0,a=0,o=0;o<z.MODULES_IN_CODEWORD;o++){var s=r/(2*z.MODULES_IN_CODEWORD)+o*r/z.MODULES_IN_CODEWORD;a+e[i]<=s&&(a+=e[i],i++),n[i]++}return n},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return z.getCodeword(r)===-1?-1:r},t.getBitValue=function(e){for(var r=0,n=0;n<e.length;n++)for(var i=0;i<e[n];i++)r=r<<1|(n%2===0?1:0);return Math.trunc(r)},t.getClosestDecodedValue=function(e){var r=W.sum(e),n=new Array(z.BARS_IN_MODULE);if(r>1)for(var i=0;i<n.length;i++)n[i]=Math.fround(e[i]/r);var a=Tn.MAX_VALUE,o=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var l=0,u=t.RATIOS_TABLE[s],c=0;c<z.BARS_IN_MODULE;c++){var d=Math.fround(u[c]-n[c]);if(l+=Math.fround(d*d),l>=a)break}l<a&&(a=l,o=z.SYMBOL_TABLE[s])}return o},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(z.SYMBOL_TABLE.length).map(function(e){return new Array(z.BARS_IN_MODULE)}),t}(),Mf=function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(e){this.segmentIndex=e},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(e){this.fileId=e},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(e){this.optionalData=e},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(e){this.lastSegment=e},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(e){this.segmentCount=e},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(e){this.sender=e},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(e){this.addressee=e},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(e){this.fileName=e},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(e){this.fileSize=e},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(e){this.checksum=e},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(e){this.timestamp=e},t}(),Li=function(){function t(){}return t.parseLong=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t}(),Lf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ff=function(t){Lf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="NullPointerException",e}(Ce),Vf=function(){function t(){}return t.prototype.writeBytes=function(e){this.writeBytesOffset(e,0,e.length)},t.prototype.writeBytesOffset=function(e,r,n){if(e==null)throw new Ff;if(r<0||r>e.length||n<0||r+n>e.length||r+n<0)throw new zn;if(n===0)return;for(var i=0;i<n;i++)this.write(e[r+i])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),Uf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),$f=function(t){Uf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ce),Hf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gf=function(t){Hf(e,t);function e(r){r===void 0&&(r=32);var n=t.call(this)||this;if(n.count=0,r<0)throw new L("Negative initial size: "+r);return n.buf=new Uint8Array(r),n}return e.prototype.ensureCapacity=function(r){r-this.buf.length>0&&this.grow(r)},e.prototype.grow=function(r){var n=this.buf.length,i=n<<1;if(i-r<0&&(i=r),i<0){if(r<0)throw new $f;i=G.MAX_VALUE}this.buf=De.copyOfUint8Array(this.buf,i)},e.prototype.write=function(r){this.ensureCapacity(this.count+1),this.buf[this.count]=r,this.count+=1},e.prototype.writeBytesOffset=function(r,n,i){if(n<0||n>r.length||i<0||n+i-r.length>0)throw new zn;this.ensureCapacity(this.count+i),re.arraycopy(r,n,this.buf,this.count,i),this.count+=i},e.prototype.writeTo=function(r){r.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return De.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(r){return r?typeof r=="string"?this.toString_string(r):this.toString_number(r):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(r){return new String(this.buf).toString()},e.prototype.toString_number=function(r){return new String(this.buf).toString()},e.prototype.close=function(){},e}(Vf),q;(function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"})(q||(q={}));function ma(){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!")}var _r;function st(t){if(typeof _r>"u"&&(_r=ma()),_r===null)throw new Error("BigInt is not supported!");return _r(t)}function zf(){var t=[];t[0]=st(1);var e=st(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}var Wf=function(){function t(){}return t.decode=function(e,r){var n=new Q(""),i=de.ISO8859_1;n.enableDecoding(i);for(var a=1,o=e[a++],s=new Mf;a<e[0];){switch(o){case t.TEXT_COMPACTION_MODE_LATCH:a=t.textCompaction(e,a,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:a=t.byteCompaction(o,e,i,a,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:a=t.numericCompaction(e,a,n);break;case t.ECI_CHARSET:de.getCharacterSetECIByValue(e[a++]);break;case t.ECI_GENERAL_PURPOSE:a+=2;break;case t.ECI_USER_DEFINED:a++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:a=t.decodeMacroBlock(e,a,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new R;default:a--,a=t.textCompaction(e,a,n);break}if(a<e.length)o=e[a++];else throw R.getFormatInstance()}if(n.length()===0)throw R.getFormatInstance();var l=new Wr(null,n.toString(),null,r);return l.setOther(s),l},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw R.getFormatInstance();for(var i=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),a=0;a<t.NUMBER_OF_SEQUENCE_CODEWORDS;a++,r++)i[a]=e[r];n.setSegmentIndex(G.parseInt(t.decodeBase900toBase10(i,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var o=new Q;r=t.textCompaction(e,r,o),n.setFileId(o.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(r++,e[r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var l=new Q;r=t.textCompaction(e,r+1,l),n.setFileName(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var u=new Q;r=t.textCompaction(e,r+1,u),n.setSender(u.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var c=new Q;r=t.textCompaction(e,r+1,c),n.setAddressee(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new Q;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(G.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var v=new Q;r=t.numericCompaction(e,r+1,v),n.setTimestamp(Li.parseLong(v.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new Q;r=t.numericCompaction(e,r+1,h),n.setChecksum(G.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new Q;r=t.numericCompaction(e,r+1,p),n.setFileSize(Li.parseLong(p.toString()));break;default:throw R.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw R.getFormatInstance()}if(s!==-1){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(De.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var i=new Int32Array((e[0]-r)*2),a=new Int32Array((e[0]-r)*2),o=0,s=!1;r<e[0]&&!s;){var l=e[r++];if(l<t.TEXT_COMPACTION_MODE_LATCH)i[o]=l/30,i[o+1]=l%30,o+=2;else switch(l){case t.TEXT_COMPACTION_MODE_LATCH:i[o++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i[o]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,l=e[r++],a[o]=l,o++;break}}return t.decodeTextCompaction(i,a,o,n),r},t.decodeTextCompaction=function(e,r,n,i){for(var a=q.ALPHA,o=q.ALPHA,s=0;s<n;){var l=e[s],u="";switch(a){case q.ALPHA:if(l<26)u=String.fromCharCode(65+l);else switch(l){case 26:u=" ";break;case t.LL:a=q.LOWER;break;case t.ML:a=q.MIXED;break;case t.PS:o=a,a=q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.LOWER:if(l<26)u=String.fromCharCode(97+l);else switch(l){case 26:u=" ";break;case t.AS:o=a,a=q.ALPHA_SHIFT;break;case t.ML:a=q.MIXED;break;case t.PS:o=a,a=q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.MIXED:if(l<t.PL)u=t.MIXED_CHARS[l];else switch(l){case t.PL:a=q.PUNCT;break;case 26:u=" ";break;case t.LL:a=q.LOWER;break;case t.AL:a=q.ALPHA;break;case t.PS:o=a,a=q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.PUNCT:if(l<t.PAL)u=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.ALPHA_SHIFT:if(a=o,l<26)u=String.fromCharCode(65+l);else switch(l){case 26:u=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break;case q.PUNCT_SHIFT:if(a=o,l<t.PAL)u=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=q.ALPHA;break}break}u!==""&&i.append(u),s++}},t.byteCompaction=function(e,r,n,i,a){var o=new Gf,s=0,l=0,u=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var c=new Int32Array(6),d=r[i++];i<r[0]&&!u;)switch(c[s++]=d,l=900*l+d,d=r[i++],d){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,u=!0;break;default:if(s%5===0&&s>0){for(var v=0;v<6;++v)o.write(Number(st(l)>>st(8*(5-v))));l=0,s=0}break}i===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(c[s++]=d);for(var h=0;h<s;h++)o.write(c[h]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;i<r[0]&&!u;){var p=r[i++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,l=900*l+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,u=!0;break}if(s%5===0&&s>0){for(var v=0;v<6;++v)o.write(Number(st(l)>>st(8*(5-v))));l=0,s=0}}break}return a.append(Ye.decode(o.toByteArray(),n)),i},t.numericCompaction=function(e,r,n){for(var i=0,a=!1,o=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!a;){var s=e[r++];if(r===e[0]&&(a=!0),s<t.TEXT_COMPACTION_MODE_LATCH)o[i]=s,i++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,a=!0;break}(i%t.MAX_NUMERIC_CODEWORDS===0||s===t.NUMERIC_COMPACTION_MODE_LATCH||a)&&i>0&&(n.append(t.decodeBase900toBase10(o,i)),i=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=st(0),i=0;i<r;i++)n+=t.EXP900[r-i-1]*st(e[i]);var a=n.toString();if(a.charAt(0)!=="1")throw new R;return a.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=`;<>@[\\]_\`~!\r ,:
19
+ -.$/"|*()?{}'`,t.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",t.EXP900=ma()?zf():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),Yt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xf=function(){function t(){}return t.decode=function(e,r,n,i,a,o,s){for(var l=new kn(e,r,n,i,a),u=null,c=null,d,v=!0;;v=!1){if(r!=null&&(u=t.getRowIndicatorColumn(e,l,r,!0,o,s)),i!=null&&(c=t.getRowIndicatorColumn(e,l,i,!1,o,s)),d=t.merge(u,c),d==null)throw I.getNotFoundInstance();var h=d.getBoundingBox();if(v&&h!=null&&(h.getMinY()<l.getMinY()||h.getMaxY()>l.getMaxY()))l=h;else break}d.setBoundingBox(l);var p=d.getBarcodeColumnCount()+1;d.setDetectionResultColumn(0,u),d.setDetectionResultColumn(p,c);for(var g=u!=null,w=1;w<=p;w++){var _=g?w:p-w;if(d.getDetectionResultColumn(_)===void 0){var m=void 0;_===0||_===p?m=new Mi(l,_===0):m=new ya(l),d.setDetectionResultColumn(_,m);for(var A=-1,y=A,C=l.getMinY();C<=l.getMaxY();C++){if(A=t.getStartColumn(d,_,C,g),A<0||A>l.getMaxX()){if(y===-1)continue;A=y}var b=t.detectCodeword(e,l.getMinX(),l.getMaxX(),g,A,C,o,s);b!=null&&(m.setCodeword(C,b),y=A,o=Math.min(o,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(d)},t.merge=function(e,r){if(e==null&&r==null)return null;var n=t.getBarcodeMetadata(e,r);if(n==null)return null;var i=kn.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new Rf(n,i)},t.adjustBoundingBox=function(e){var r,n;if(e==null)return null;var i=e.getRowHeights();if(i==null)return null;var a=t.getMax(i),o=0;try{for(var s=Yt(i),l=s.next();!l.done;l=s.next()){var u=l.value;if(o+=a-u,u>0)break}}catch(h){r={error:h}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var c=e.getCodewords(),d=0;o>0&&c[d]==null;d++)o--;for(var v=0,d=i.length-1;d>=0&&(v+=a-i[d],!(i[d]>0));d--);for(var d=c.length-1;v>0&&c[d]==null;d--)v--;return e.getBoundingBox().addMissingRows(o,v,e.isLeft())},t.getMax=function(e){var r,n,i=-1;try{for(var a=Yt(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=Math.max(i,s)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.getBarcodeMetadata=function(e,r){var n;if(e==null||(n=e.getBarcodeMetadata())==null)return r==null?null:r.getBarcodeMetadata();var i;return r==null||(i=r.getBarcodeMetadata())==null?n:n.getColumnCount()!==i.getColumnCount()&&n.getErrorCorrectionLevel()!==i.getErrorCorrectionLevel()&&n.getRowCount()!==i.getRowCount()?null:n},t.getRowIndicatorColumn=function(e,r,n,i,a,o){for(var s=new Mi(r,i),l=0;l<2;l++)for(var u=l===0?1:-1,c=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=u){var v=t.detectCodeword(e,0,e.getWidth(),i,c,d,a,o);v!=null&&(s.setCodeword(d,v),i?c=v.getStartX():c=v.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],i=n.getValue(),a=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(i.length===0){if(a<1||a>z.MAX_CODEWORDS_IN_BARCODE)throw I.getNotFoundInstance();n.setValue(a)}else i[0]!==a&&n.setValue(a)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,i=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),a=[],o=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var l=0;l<e.getBarcodeColumnCount();l++){var u=r[s][l+1].getValue(),c=s*e.getBarcodeColumnCount()+l;u.length===0?n.push(c):u.length===1?i[c]=u[0]:(o.push(c),a.push(u))}for(var d=new Array(a.length),v=0;v<d.length;v++)d[v]=a[v];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),i,z.toIntArray(n),z.toIntArray(o),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,i,a){for(var o=new Int32Array(i.length),s=100;s-- >0;){for(var l=0;l<o.length;l++)r[i[l]]=a[l][o[l]];try{return t.decodeCodewords(r,e,n)}catch(c){var u=c instanceof ye;if(!u)throw c}if(o.length===0)throw ye.getChecksumInstance();for(var l=0;l<o.length;l++)if(o[l]<a[l].length-1){o[l]++;break}else if(o[l]=0,l===o.length-1)throw ye.getChecksumInstance()}throw ye.getChecksumInstance()},t.createBarcodeMatrix=function(e){for(var r,n,i,a,o=Array.from({length:e.getBarcodeRowCount()},function(){return new Array(e.getBarcodeColumnCount()+2)}),s=0;s<o.length;s++)for(var l=0;l<o[s].length;l++)o[s][l]=new rr;var u=0;try{for(var c=Yt(e.getDetectionResultColumns()),d=c.next();!d.done;d=c.next()){var v=d.value;if(v!=null)try{for(var h=(i=void 0,Yt(v.getCodewords())),p=h.next();!p.done;p=h.next()){var g=p.value;if(g!=null){var w=g.getRowNumber();if(w>=0){if(w>=o.length)continue;o[w][u].setValue(g.getValue())}}}}catch(_){i={error:_}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}u++}}catch(_){r={error:_}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return o},t.isValidBarcodeColumn=function(e,r){return r>=0&&r<=e.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,i){var a,o,s=i?1:-1,l=null;if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodeword(n)),l!=null)return i?l.getEndX():l.getStartX();if(l=e.getDetectionResultColumn(r).getCodewordNearby(n),l!=null)return i?l.getStartX():l.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),l!=null)return i?l.getEndX():l.getStartX();for(var u=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var c=(a=void 0,Yt(e.getDetectionResultColumn(r).getCodewords())),d=c.next();!d.done;d=c.next()){var v=d.value;if(v!=null)return(i?v.getEndX():v.getStartX())+s*u*(v.getEndX()-v.getStartX())}}catch(h){a={error:h}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}u++}return i?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,i,a,o,s,l){a=t.adjustCodewordStartColumn(e,r,n,i,a,o);var u=t.getModuleBitCount(e,r,n,i,a,o);if(u==null)return null;var c,d=W.sum(u);if(i)c=a+d;else{for(var v=0;v<u.length/2;v++){var h=u[v];u[v]=u[u.length-1-v],u[u.length-1-v]=h}c=a,a=c-d}if(!t.checkCodewordSkew(d,s,l))return null;var p=kf.getDecodedValue(u),g=z.getCodeword(p);return g===-1?null:new Pf(a,c,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(e,r,n,i,a,o){for(var s=a,l=new Int32Array(8),u=0,c=i?1:-1,d=i;(i?s<n:s>=r)&&u<l.length;)e.get(s,o)===d?(l[u]++,s+=c):(u++,d=!d);return u===l.length||s===(i?n:r)&&u===l.length-1?l:null},t.getNumberOfECCodeWords=function(e){return 2<<e},t.adjustCodewordStartColumn=function(e,r,n,i,a,o){for(var s=a,l=i?-1:1,u=0;u<2;u++){for(;(i?s>=r:s<n)&&i===e.get(s,o);){if(Math.abs(a-s)>t.CODEWORD_SKEW_SIZE)return a;s+=l}l=-l,i=!i}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(e.length===0)throw R.getFormatInstance();var i=1<<r+1,a=t.correctErrors(e,n,i);t.verifyCodewordCount(e,i);var o=Wf.decode(e,""+r);return o.setErrorsCorrected(a),o.setErasures(n.length),o},t.correctErrors=function(e,r,n){if(r!=null&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw ye.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(e,r){if(e.length<4)throw R.getFormatInstance();var n=e[0];if(n>e.length)throw R.getFormatInstance();if(n===0)if(r<e.length)e[0]=e.length-r;else throw R.getFormatInstance()},t.getBitCountForCodeword=function(e){for(var r=new Int32Array(8),n=0,i=r.length-1;!((e&1)!==n&&(n=e&1,i--,i<0));)r[i]++,e>>=1;return r},t.getCodewordBucketNumber=function(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(e){return(e[0]-e[2]+e[4]-e[6]+9)%9},t.toString=function(e){for(var r=new Kn,n=0;n<e.length;n++){r.format("Row %2d: ",n);for(var i=0;i<e[n].length;i++){var a=e[n][i];a.getValue().length===0?r.format(" ",null):r.format("%4d(%2d)",a.getValue()[0],a.getConfidence(a.getValue()[0]))}r.format("%n")}return r.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new Sf,t}(),jf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mn=function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=t.decode(e,r,!1);if(n==null||n.length===0||n[0]==null)throw I.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){r===void 0&&(r=null);try{return t.decode(e,r,!0)}catch(n){throw n instanceof R||n instanceof ye?I.getNotFoundInstance():n}},t.decode=function(e,r,n){var i,a,o=new Array,s=wf.detectMultiple(e,r,n);try{for(var l=jf(s.getPoints()),u=l.next();!u.done;u=l.next()){var c=u.value,d=Xf.decode(s.getBits(),c[4],c[5],c[6],c[7],t.getMinCodewordWidth(c),t.getMaxCodewordWidth(c)),v=new Be(d.getText(),d.getRawBytes(),void 0,c,F.PDF_417);v.putMetadata(me.ERROR_CORRECTION_LEVEL,d.getECLevel());var h=d.getOther();h!=null&&v.putMetadata(me.PDF417_EXTRA_METADATA,h),o.push(v)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return o.map(function(p){return p})},t.getMaxWidth=function(e,r){return e==null||r==null?0:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMinWidth=function(e,r){return e==null||r==null?G.MAX_VALUE:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*z.MODULES_IN_CODEWORD/z.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),Yf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fi=function(t){Yf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReaderException",e}(Ce),Vi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Kf=function(){function t(){}return t.prototype.decode=function(e,r){return this.setHints(r),this.decodeInternal(e)},t.prototype.decodeWithState=function(e){return(this.readers===null||this.readers===void 0)&&this.setHints(null),this.decodeInternal(e)},t.prototype.setHints=function(e){this.hints=e;var r=e!=null&&e.get(se.TRY_HARDER)!==void 0,n=e==null?null:e.get(se.POSSIBLE_FORMATS),i=new Array;if(n!=null){var a=n.some(function(o){return o===F.UPC_A||o===F.UPC_E||o===F.EAN_13||o===F.EAN_8||o===F.CODABAR||o===F.CODE_39||o===F.CODE_93||o===F.CODE_128||o===F.ITF||o===F.RSS_14||o===F.RSS_EXPANDED});a&&!r&&i.push(new tr(e)),n.includes(F.QR_CODE)&&i.push(new Pn),n.includes(F.DATA_MATRIX)&&i.push(new Rn),n.includes(F.AZTEC)&&i.push(new Dn),n.includes(F.PDF_417)&&i.push(new Mn),a&&r&&i.push(new tr(e))}i.length===0&&(r||i.push(new tr(e)),i.push(new Pn),i.push(new Rn),i.push(new Dn),i.push(new Mn),r&&i.push(new tr(e))),this.readers=i},t.prototype.reset=function(){var e,r;if(this.readers!==null)try{for(var n=Vi(this.readers),i=n.next();!i.done;i=n.next()){var a=i.value;a.reset()}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.decodeInternal=function(e){var r,n;if(this.readers===null)throw new Fi("No readers where selected, nothing can be read.");try{for(var i=Vi(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;try{return o.decode(e,this.hints)}catch(s){if(s instanceof Fi)continue}}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}throw new I("No MultiFormat Readers were able to detect the code.")},t}(),Zf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),qf=function(t){Zf(e,t);function e(r,n){r===void 0&&(r=null),n===void 0&&(n=500);var i=this,a=new Kf;return a.setHints(r),i=t.call(this,a,n)||this,i}return e.prototype.decodeBitmap=function(r){return this.reader.decodeWithState(r)},e}(Ft),Qf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){Qf(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Mn,r)||this}return e})(Ft);var Jf=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){Jf(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Pn,r)||this}return e})(Ft);var Ln;(function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"})(Ln||(Ln={}));const Er=Ln;var wa=function(){function t(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new ft(e,Int32Array.from([1])))}return t.prototype.buildGenerator=function(e){var r=this.cachedGenerators;if(e>=r.length)for(var n=r[r.length-1],i=this.field,a=r.length;a<=e;a++){var o=n.multiply(new ft(i,Int32Array.from([1,i.exp(a-1+i.getGeneratorBase())])));r.push(o),n=o}return r[e]},t.prototype.encode=function(e,r){if(r===0)throw new L("No error correction bytes");var n=e.length-r;if(n<=0)throw new L("No data bytes provided");var i=this.buildGenerator(r),a=new Int32Array(n);re.arraycopy(e,0,a,0,n);var o=new ft(this.field,a);o=o.multiplyByMonomial(r,1);for(var s=o.divide(i)[1],l=s.getCoefficients(),u=r-l.length,c=0;c<u;c++)e[n+c]=0;re.arraycopy(l,0,e,n+u,l.length)},t}(),nr=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a-1;o++)for(var s=n[o],l=0;l<i-1;l++){var u=s[l];u===s[l+1]&&u===n[o+1][l]&&u===n[o+1][l+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=0;s<i;s++){var l=n[o];s+6<i&&l[s]===1&&l[s+1]===0&&l[s+2]===1&&l[s+3]===1&&l[s+4]===1&&l[s+5]===0&&l[s+6]===1&&(t.isWhiteHorizontal(l,s-4,s)||t.isWhiteHorizontal(l,s+7,s+11))&&r++,o+6<a&&n[o][s]===1&&n[o+1][s]===0&&n[o+2][s]===1&&n[o+3][s]===1&&n[o+4][s]===1&&n[o+5][s]===0&&n[o+6][s]===1&&(t.isWhiteVertical(n,s,o-4,o)||t.isWhiteVertical(n,s,o+7,o+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(e,r,n){r=Math.max(r,0),n=Math.min(n,e.length);for(var i=r;i<n;i++)if(e[i]===1)return!1;return!0},t.isWhiteVertical=function(e,r,n,i){n=Math.max(n,0),i=Math.min(i,e.length);for(var a=n;a<i;a++)if(e[a][r]===1)return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=n[o],l=0;l<i;l++)s[l]===1&&r++;var u=e.getHeight()*e.getWidth(),c=Math.floor(Math.abs(r*2-u)*10/u);return c*t.N4},t.getDataMaskBit=function(e,r,n){var i,a;switch(e){case 0:i=n+r&1;break;case 1:i=n&1;break;case 2:i=r%3;break;case 3:i=(n+r)%3;break;case 4:i=Math.floor(n/2)+Math.floor(r/3)&1;break;case 5:a=n*r,i=(a&1)+a%3;break;case 6:a=n*r,i=(a&1)+a%3&1;break;case 7:a=n*r,i=a%3+(n+r&1)&1;break;default:throw new L("Invalid mask pattern: "+e)}return i===0},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,i=r?e.getHeight():e.getWidth(),a=r?e.getWidth():e.getHeight(),o=e.getArray(),s=0;s<i;s++){for(var l=0,u=-1,c=0;c<a;c++){var d=r?o[s][c]:o[c][s];d===u?l++:(l>=5&&(n+=t.N1+(l-5)),l=1,u=d)}l>=5&&(n+=t.N1+(l-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),ec=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tc=function(){function t(e,r){this.width=e,this.height=r;for(var n=new Array(r),i=0;i!==r;i++)n[i]=new Uint8Array(e);this.bytes=n}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(e,r){return this.bytes[r][e]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(e,r,n){this.bytes[r][e]=n},t.prototype.setBoolean=function(e,r,n){this.bytes[r][e]=n?1:0},t.prototype.clear=function(e){var r,n;try{for(var i=ec(this.bytes),a=i.next();!a.done;a=i.next()){var o=a.value;De.fill(o,e)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width||this.height!==r.height)return!1;for(var n=0,i=this.height;n<i;++n)for(var a=this.bytes[n],o=r.bytes[n],s=0,l=this.width;s<l;++s)if(a[s]!==o[s])return!1;return!0},t.prototype.toString=function(){for(var e=new Q,r=0,n=this.height;r<n;++r){for(var i=this.bytes[r],a=0,o=this.width;a<o;++a)switch(i[a]){case 0:e.append(" 0");break;case 1:e.append(" 1");break;default:e.append(" ");break}e.append(`
20
20
  `)}return e.toString()},t}(),Fn=function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var e=new Q;return e.append(`<<
21
21
  `),e.append(" mode: "),e.append(this.mode?this.mode.toString():"null"),e.append(`
22
22
  ecLevel: `),e.append(this.ecLevel?this.ecLevel.toString():"null"),e.append(`
@@ -26,6 +26,6 @@
26
26
  `),e.append(this.matrix.toString())):e.append(`
27
27
  matrix: null
28
28
  `),e.append(`>>
29
- `),e.toString()},t.prototype.setMode=function(e){this.mode=e},t.prototype.setECLevel=function(e){this.ecLevel=e},t.prototype.setVersion=function(e){this.version=e},t.prototype.setMaskPattern=function(e){this.maskPattern=e},t.prototype.setMatrix=function(e){this.matrix=e},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),nc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),re=function(t){nc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="WriterException",e}(Ce),Ui=function(){function t(){}return t.clearMatrix=function(e){e.clear(255)},t.buildMatrix=function(e,r,n,i,a){t.clearMatrix(a),t.embedBasicPatterns(n,a),t.embedTypeInfo(r,i,a),t.maybeEmbedVersionInfo(n,a),t.embedDataBits(e,i,a)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var i=new ve;t.makeTypeInfoBits(e,r,i);for(var a=0,o=i.getSize();a<o;++a){var s=i.get(i.getSize()-1-a),l=t.TYPE_INFO_COORDINATES[a],u=l[0],c=l[1];if(n.setBoolean(u,c,s),a<8){var d=n.getWidth()-a-1,v=8;n.setBoolean(d,v,s)}else{var d=8,v=n.getHeight()-7+(a-8);n.setBoolean(d,v,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new ve;t.makeVersionInfoBits(e,n);for(var i=6*3-1,a=0;a<6;++a)for(var o=0;o<3;++o){var s=n.get(i);i--,r.setBoolean(a,r.getHeight()-11+o,s),r.setBoolean(r.getHeight()-11+o,a,s)}}},t.embedDataBits=function(e,r,n){for(var i=0,a=-1,o=n.getWidth()-1,s=n.getHeight()-1;o>0;){for(o===6&&(o-=1);s>=0&&s<n.getHeight();){for(var l=0;l<2;++l){var u=o-l;if(t.isEmpty(n.get(u,s))){var c=void 0;i<e.getSize()?(c=e.get(i),++i):c=!1,r!==255&&tr.getDataMaskBit(r,u,s)&&(c=!c),n.setBoolean(u,s,c)}}s+=a}a=-a,s+=a,o-=2}if(i!==e.getSize())throw new re("Not all bits consumed: "+i+"/"+e.getSize())},t.findMSBSet=function(e){return 32-H.numberOfLeadingZeros(e)},t.calculateBCHCode=function(e,r){if(r===0)throw new M("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Fn.isValidMaskPattern(r))throw new re("Invalid mask pattern");var i=e.getBits()<<3|r;n.appendBits(i,5);var a=t.calculateBCHCode(i,t.TYPE_INFO_POLY);n.appendBits(a,10);var o=new ve;if(o.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(o),n.getSize()!==15)throw new re("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),r.getSize()!==18)throw new re("should not happen but we got: "+r.getSize())},t.isEmpty=function(e){return e===255},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(e){if(e.get(8,e.getHeight()-8)===0)throw new re;e.setNumber(8,e.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var i=0;i<8;++i){if(!t.isEmpty(n.get(e+i,r)))throw new re;n.setNumber(e+i,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var i=0;i<7;++i){if(!t.isEmpty(n.get(e,r+i)))throw new re;n.setNumber(e,r+i,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var i=0;i<5;++i)for(var a=t.POSITION_ADJUSTMENT_PATTERN[i],o=0;o<5;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPattern=function(e,r,n){for(var i=0;i<7;++i)for(var a=t.POSITION_DETECTION_PATTERN[i],o=0;o<7;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);var n=8;t.embedHorizontalSeparationPattern(0,n-1,e),t.embedHorizontalSeparationPattern(e.getWidth()-n,n-1,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-n,e);var i=7;t.embedVerticalSeparationPattern(i,0,e),t.embedVerticalSeparationPattern(e.getHeight()-i-1,0,e),t.embedVerticalSeparationPattern(i,e.getHeight()-i,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,i=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],a=0,o=i.length;a!==o;a++){var s=i[a];if(s>=0)for(var l=0;l!==o;l++){var u=i[l];u>=0&&t.isEmpty(r.get(u,s))&&t.embedPositionAdjustmentPattern(u-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),ic=function(){function t(e,r){this.dataBytes=e,this.errorCorrectionBytes=r}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),$i=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.calculateMaskPenalty=function(e){return tr.applyMaskPenaltyRule1(e)+tr.applyMaskPenaltyRule2(e)+tr.applyMaskPenaltyRule3(e)+tr.applyMaskPenaltyRule4(e)},t.encode=function(e,r,n){n===void 0&&(n=null);var i=t.DEFAULT_BYTE_MODE_ENCODING,a=n!==null&&n.get(mr.CHARACTER_SET)!==void 0;a&&(i=n.get(mr.CHARACTER_SET).toString());var o=this.chooseMode(e,i),s=new ve;if(o===ne.BYTE&&(a||t.DEFAULT_BYTE_MODE_ENCODING!==i)){var l=de.getCharacterSetECIByName(i);l!==void 0&&this.appendECI(l,s)}this.appendModeInfo(o,s);var u=new ve;this.appendBytes(e,o,u,i);var c;if(n!==null&&n.get(mr.QR_VERSION)!==void 0){var d=Number.parseInt(n.get(mr.QR_VERSION).toString(),10);c=yt.getVersionForNumber(d);var v=this.calculateBitsNeeded(o,s,u,c);if(!this.willFit(v,c,r))throw new re("Data too big for requested version")}else c=this.recommendVersion(r,o,s,u);var h=new ve;h.appendBitArray(s);var p=o===ne.BYTE?u.getSizeInBytes():e.length;this.appendLengthInfo(p,c,o,h),h.appendBitArray(u);var g=c.getECBlocksForLevel(r),m=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(m,h);var w=this.interleaveWithECBytes(h,c.getTotalCodewords(),m,g.getNumBlocks()),y=new Fn;y.setECLevel(r),y.setMode(o),y.setVersion(c);var _=c.getDimensionForVersion(),A=new rc(_,_),C=this.chooseMaskPattern(w,r,c,A);return y.setMaskPattern(C),Ui.buildMatrix(w,r,c,C,A),y.setMatrix(A),y},t.recommendVersion=function(e,r,n,i){var a=this.calculateBitsNeeded(r,n,i,yt.getVersionForNumber(1)),o=this.chooseVersion(a,e),s=this.calculateBitsNeeded(r,n,i,o);return this.chooseVersion(s,e)},t.calculateBitsNeeded=function(e,r,n,i){return r.getSize()+e.getCharacterCountBits(i)+n.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(r===void 0&&(r=null),de.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return ne.KANJI;for(var n=!1,i=!1,a=0,o=e.length;a<o;++a){var s=e.charAt(a);if(t.isDigit(s))n=!0;else if(this.getAlphanumericCode(s.charCodeAt(0))!==-1)i=!0;else return ne.BYTE}return i?ne.ALPHANUMERIC:n?ne.NUMERIC:ne.BYTE},t.isOnlyDoubleByteKanji=function(e){var r;try{r=je.encode(e,de.SJIS)}catch{return!1}var n=r.length;if(n%2!==0)return!1;for(var i=0;i<n;i+=2){var a=r[i]&255;if((a<129||a>159)&&(a<224||a>235))return!1}return!0},t.chooseMaskPattern=function(e,r,n,i){for(var a=Number.MAX_SAFE_INTEGER,o=-1,s=0;s<Fn.NUM_MASK_PATTERNS;s++){Ui.buildMatrix(e,r,n,s,i);var l=this.calculateMaskPenalty(i);l<a&&(a=l,o=s)}return o},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var i=yt.getVersionForNumber(n);if(t.willFit(e,i,r))return i}throw new re("Data too big")},t.willFit=function(e,r,n){var i=r.getTotalCodewords(),a=r.getECBlocksForLevel(n),o=a.getTotalECCodewords(),s=i-o,l=(e+7)/8;return s>=l},t.terminateBits=function(e,r){var n=e*8;if(r.getSize()>n)throw new re("data bits cannot fit in the QR Code"+r.getSize()+" > "+n);for(var i=0;i<4&&r.getSize()<n;++i)r.appendBit(!1);var a=r.getSize()&7;if(a>0)for(var i=a;i<8;i++)r.appendBit(!1);for(var o=e-r.getSizeInBytes(),i=0;i<o;++i)r.appendBits((i&1)===0?236:17,8);if(r.getSize()!==n)throw new re("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(e,r,n,i,a,o){if(i>=n)throw new re("Block ID too large");var s=e%n,l=n-s,u=Math.floor(e/n),c=u+1,d=Math.floor(r/n),v=d+1,h=u-d,p=c-v;if(h!==p)throw new re("EC bytes mismatch");if(n!==l+s)throw new re("RS blocks mismatch");if(e!==(d+h)*l+(v+p)*s)throw new re("Total bytes mismatch");i<l?(a[0]=d,o[0]=h):(a[0]=v,o[0]=p)},t.interleaveWithECBytes=function(e,r,n,i){var a,o,s,l;if(e.getSizeInBytes()!==n)throw new re("Number of bits and data bytes does not match");for(var u=0,c=0,d=0,v=new Array,h=0;h<i;++h){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,i,h,p,g);var m=p[0],w=new Uint8Array(m);e.toBytes(8*u,w,0,m);var y=t.generateECBytes(w,g[0]);v.push(new ic(w,y)),c=Math.max(c,m),d=Math.max(d,y.length),u+=p[0]}if(n!==u)throw new re("Data bytes does not match offset");for(var _=new ve,h=0;h<c;++h)try{for(var A=(a=void 0,$i(v)),C=A.next();!C.done;C=A.next()){var D=C.value,w=D.getDataBytes();h<w.length&&_.appendBits(w[h],8)}}catch(L){a={error:L}}finally{try{C&&!C.done&&(o=A.return)&&o.call(A)}finally{if(a)throw a.error}}for(var h=0;h<d;++h)try{for(var B=(s=void 0,$i(v)),k=B.next();!k.done;k=B.next()){var D=k.value,y=D.getErrorCorrectionBytes();h<y.length&&_.appendBits(y[h],8)}}catch(L){s={error:L}}finally{try{k&&!k.done&&(l=B.return)&&l.call(B)}finally{if(s)throw s.error}}if(r!==_.getSizeInBytes())throw new re("Interleaving error: "+r+" and "+_.getSizeInBytes()+" differ.");return _},t.generateECBytes=function(e,r){for(var n=e.length,i=new Int32Array(n+r),a=0;a<n;a++)i[a]=e[a]&255;new wa(Te.QR_CODE_FIELD_256).encode(i,r);for(var o=new Uint8Array(r),a=0;a<r;a++)o[a]=i[n+a];return o},t.appendModeInfo=function(e,r){r.appendBits(e.getBits(),4)},t.appendLengthInfo=function(e,r,n,i){var a=n.getCharacterCountBits(r);if(e>=1<<a)throw new re(e+" is bigger than "+((1<<a)-1));i.appendBits(e,a)},t.appendBytes=function(e,r,n,i){switch(r){case ne.NUMERIC:t.appendNumericBytes(e,n);break;case ne.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case ne.BYTE:t.append8BitBytes(e,n,i);break;case ne.KANJI:t.appendKanjiBytes(e,n);break;default:throw new re("Invalid mode: "+r)}},t.getDigit=function(e){return e.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getDigit(e.charAt(i));if(i+2<n){var o=t.getDigit(e.charAt(i+1)),s=t.getDigit(e.charAt(i+2));r.appendBits(a*100+o*10+s,10),i+=3}else if(i+1<n){var o=t.getDigit(e.charAt(i+1));r.appendBits(a*10+o,7),i+=2}else r.appendBits(a,4),i++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getAlphanumericCode(e.charCodeAt(i));if(a===-1)throw new re;if(i+1<n){var o=t.getAlphanumericCode(e.charCodeAt(i+1));if(o===-1)throw new re;r.appendBits(a*45+o,11),i+=2}else r.appendBits(a,6),i++}},t.append8BitBytes=function(e,r,n){var i;try{i=je.encode(e,n)}catch(l){throw new re(l)}for(var a=0,o=i.length;a!==o;a++){var s=i[a];r.appendBits(s,8)}},t.appendKanjiBytes=function(e,r){var n;try{n=je.encode(e,de.SJIS)}catch(d){throw new re(d)}for(var i=n.length,a=0;a<i;a+=2){var o=n[a]&255,s=n[a+1]&255,l=o<<8&4294967295|s,u=-1;if(l>=33088&&l<=40956?u=l-33088:l>=57408&&l<=60351&&(u=l-49472),u===-1)throw new re("Invalid byte sequence");var c=(u>>8)*192+(u&255);r.appendBits(c,13)}},t.appendECI=function(e,r){r.appendBits(ne.ECI.getBits(),4),r.appendBits(e.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=de.UTF8.getName(),t})();var ac=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){ac(e,t);function e(r,n,i,a,o,s,l,u){var c=t.call(this,s,l)||this;if(c.yuvData=r,c.dataWidth=n,c.dataHeight=i,c.left=a,c.top=o,a+s>n||o+l>i)throw new M("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(s,l),c}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new M("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return te.arraycopy(this.yuvData,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.yuvData;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return te.arraycopy(this.yuvData,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;te.arraycopy(this.yuvData,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+r,this.top+n,i,a,!1)},e.prototype.renderThumbnail=function(){for(var r=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,i=new Int32Array(r*n),a=this.yuvData,o=this.top*this.dataWidth+this.left,s=0;s<n;s++){for(var l=s*r,u=0;u<r;u++){var c=a[o+u*e.THUMBNAIL_SCALE_FACTOR]&255;i[l+u]=4278190080|c*65793}o+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return i},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(r,n){for(var i=this.yuvData,a=0,o=this.top*this.dataWidth+this.left;a<n;a++,o+=this.dataWidth)for(var s=o+r/2,l=o,u=o+r-1;l<s;l++,u--){var c=i[l];i[l]=i[u],i[u]=c}},e.prototype.invert=function(){return new Wn(this)},e.THUMBNAIL_SCALE_FACTOR=2,e})($r);var oc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){oc(e,t);function e(r,n,i,a,o,s,l){var u=t.call(this,n,i)||this;if(u.dataWidth=a,u.dataHeight=o,u.left=s,u.top=l,r.BYTES_PER_ELEMENT===4){for(var c=n*i,d=new Uint8ClampedArray(c),v=0;v<c;v++){var h=r[v],p=h>>16&255,g=h>>7&510,m=h&255;d[v]=(p+g+m)/4&255}u.luminances=d}else u.luminances=r;if(a===void 0&&(u.dataWidth=n),o===void 0&&(u.dataHeight=i),s===void 0&&(u.left=0),l===void 0&&(u.top=0),u.left+n>u.dataWidth||u.top+i>u.dataHeight)throw new M("Crop rectangle does not fit within image data.");return u}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new M("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return te.arraycopy(this.luminances,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.luminances;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return te.arraycopy(this.luminances,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;te.arraycopy(this.luminances,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.luminances,i,a,this.dataWidth,this.dataHeight,this.left+r,this.top+n)},e.prototype.invert=function(){return new Wn(this)},e})($r);var sc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){sc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.forName=function(r){return this.getCharacterSetECIByName(r)},e})(de);(function(){function t(){}return t.ISO_8859_1=de.ISO8859_1,t})();var lc=function(){function t(){}return t.prototype.isCompact=function(){return this.compact},t.prototype.setCompact=function(e){this.compact=e},t.prototype.getSize=function(){return this.size},t.prototype.setSize=function(e){this.size=e},t.prototype.getLayers=function(){return this.layers},t.prototype.setLayers=function(e){this.layers=e},t.prototype.getCodeWords=function(){return this.codeWords},t.prototype.setCodeWords=function(e){this.codeWords=e},t.prototype.getMatrix=function(){return this.matrix},t.prototype.setMatrix=function(e){this.matrix=e},t}(),Hi=function(){function t(){}return t.singletonList=function(e){return[e]},t.min=function(e,r){return e.sort(r)[0]},t}(),uc=function(){function t(e){this.previous=e}return t.prototype.getPrevious=function(){return this.previous},t}(),fc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zn=function(t){fc(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.value=n,a.bitCount=i,a}return e.prototype.appendTo=function(r,n){r.appendBits(this.value,this.bitCount)},e.prototype.add=function(r,n){return new e(this,r,n)},e.prototype.addBinaryShift=function(r,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,r,n)},e.prototype.toString=function(){var r=this.value&(1<<this.bitCount)-1;return r|=1<<this.bitCount,"<"+H.toBinaryString(r|1<<this.bitCount).substring(1)+">"},e}(uc),cc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),dc=function(t){cc(e,t);function e(r,n,i){var a=t.call(this,r,0,0)||this;return a.binaryShiftStart=n,a.binaryShiftByteCount=i,a}return e.prototype.appendTo=function(r,n){for(var i=0;i<this.binaryShiftByteCount;i++)(i===0||i===31&&this.binaryShiftByteCount<=62)&&(r.appendBits(31,5),this.binaryShiftByteCount>62?r.appendBits(this.binaryShiftByteCount-31,16):i===0?r.appendBits(Math.min(this.binaryShiftByteCount,31),5):r.appendBits(this.binaryShiftByteCount-31,5)),r.appendBits(n[this.binaryShiftStart+i],8)},e.prototype.addBinaryShift=function(r,n){return new e(this,r,n)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"},e}(Zn);function hc(t,e,r){return new dc(t,e,r)}function jt(t,e,r){return new Zn(t,e,r)}var vc=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],ut=0,Pr=1,Me=2,_a=3,Xe=4,pc=new Zn(null,0,0),pn=[Int32Array.from([0,(5<<16)+28,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(9<<16)+480+14,0,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(4<<16)+14,(9<<16)+448+28,0,(9<<16)+448+29,932798]),Int32Array.from([(5<<16)+29,(5<<16)+28,656318,0,(5<<16)+30]),Int32Array.from([(5<<16)+31,656380,656382,656381,0])],gc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function xc(t){var e,r;try{for(var n=gc(t),i=n.next();!i.done;i=n.next()){var a=i.value;Ne.fill(a,-1)}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return t[ut][Xe]=0,t[Pr][Xe]=0,t[Pr][ut]=28,t[_a][Xe]=0,t[Me][Xe]=0,t[Me][ut]=15,t}var Ea=xc(Ne.createInt32Array(6,6)),yc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mc=function(){function t(e,r,n,i){this.token=e,this.mode=r,this.binaryShiftByteCount=n,this.bitCount=i}return t.prototype.getMode=function(){return this.mode},t.prototype.getToken=function(){return this.token},t.prototype.getBinaryShiftByteCount=function(){return this.binaryShiftByteCount},t.prototype.getBitCount=function(){return this.bitCount},t.prototype.latchAndAppend=function(e,r){var n=this.bitCount,i=this.token;if(e!==this.mode){var a=pn[this.mode][e];i=jt(i,a&65535,a>>16),n+=a>>16}var o=e===Me?4:5;return i=jt(i,r,o),new t(i,e,0,n+o)},t.prototype.shiftAndAppend=function(e,r){var n=this.token,i=this.mode===Me?4:5;return n=jt(n,Ea[this.mode][e],i),n=jt(n,r,5),new t(n,this.mode,0,this.bitCount+i+5)},t.prototype.addBinaryShiftChar=function(e){var r=this.token,n=this.mode,i=this.bitCount;if(this.mode===Xe||this.mode===Me){var a=pn[n][ut];r=jt(r,a&65535,a>>16),i+=a>>16,n=ut}var o=this.binaryShiftByteCount===0||this.binaryShiftByteCount===31?18:this.binaryShiftByteCount===62?9:8,s=new t(r,n,this.binaryShiftByteCount+1,i+o);return s.binaryShiftByteCount===2078&&(s=s.endBinaryShift(e+1)),s},t.prototype.endBinaryShift=function(e){if(this.binaryShiftByteCount===0)return this;var r=this.token;return r=hc(r,e-this.binaryShiftByteCount,this.binaryShiftByteCount),new t(r,this.mode,0,this.bitCount)},t.prototype.isBetterThanOrEqualTo=function(e){var r=this.bitCount+(pn[this.mode][e.mode]>>16);return this.binaryShiftByteCount<e.binaryShiftByteCount?r+=t.calculateBinaryShiftCost(e)-t.calculateBinaryShiftCost(this):this.binaryShiftByteCount>e.binaryShiftByteCount&&e.binaryShiftByteCount>0&&(r+=10),r<=e.bitCount},t.prototype.toBitArray=function(e){for(var r,n,i=[],a=this.endBinaryShift(e.length).token;a!==null;a=a.getPrevious())i.unshift(a);var o=new ve;try{for(var s=yc(i),l=s.next();!l.done;l=s.next()){var u=l.value;u.appendTo(o,e)}}catch(c){r={error:c}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t.prototype.toString=function(){return ee.format("%s bits=%d bytes=%d",vc[this.mode],this.bitCount,this.binaryShiftByteCount)},t.calculateBinaryShiftCost=function(e){return e.binaryShiftByteCount>62?21:e.binaryShiftByteCount>31?20:e.binaryShiftByteCount>0?10:0},t.INITIAL_STATE=new t(pc,ut,0,0),t}();function wc(t){var e=ee.getCharCode(" "),r=ee.getCharCode("."),n=ee.getCharCode(",");t[ut][e]=1;for(var i=ee.getCharCode("Z"),a=ee.getCharCode("A"),o=a;o<=i;o++)t[ut][o]=o-a+2;t[Pr][e]=1;for(var s=ee.getCharCode("z"),l=ee.getCharCode("a"),o=l;o<=s;o++)t[Pr][o]=o-l+2;t[Me][e]=1;for(var u=ee.getCharCode("9"),c=ee.getCharCode("0"),o=c;o<=u;o++)t[Me][o]=o-c+2;t[Me][n]=12,t[Me][r]=13;for(var d=["\0"," ","","","","","","","\x07","\b"," ",`
30
- `,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""],v=0;v<d.length;v++)t[_a][ee.getCharCode(d[v])]=v;for(var h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"],v=0;v<h.length;v++)ee.getCharCode(h[v])>0&&(t[Xe][ee.getCharCode(h[v])]=v);return t}var gn=wc(Ne.createInt32Array(5,256)),wr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_c=function(){function t(e){this.text=e}return t.prototype.encode=function(){for(var e=ee.getCharCode(" "),r=ee.getCharCode(`
31
- `),n=Hi.singletonList(mc.INITIAL_STATE),i=0;i<this.text.length;i++){var a=void 0,o=i+1<this.text.length?this.text[i+1]:0;switch(this.text[i]){case ee.getCharCode("\r"):a=o===r?2:0;break;case ee.getCharCode("."):a=o===e?3:0;break;case ee.getCharCode(","):a=o===e?4:0;break;case ee.getCharCode(":"):a=o===e?5:0;break;default:a=0}a>0?(n=t.updateStateListForPair(n,i,a),i++):n=this.updateStateListForChar(n,i)}var s=Hi.min(n,function(l,u){return l.getBitCount()-u.getBitCount()});return s.toBitArray(this.text)},t.prototype.updateStateListForChar=function(e,r){var n,i,a=[];try{for(var o=wr(e),s=o.next();!s.done;s=o.next()){var l=s.value;this.updateStateForChar(l,r,a)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return t.simplifyStates(a)},t.prototype.updateStateForChar=function(e,r,n){for(var i=this.text[r]&255,a=gn[e.getMode()][i]>0,o=null,s=0;s<=Xe;s++){var l=gn[s][i];if(l>0){if(o==null&&(o=e.endBinaryShift(r)),!a||s===e.getMode()||s===Me){var u=o.latchAndAppend(s,l);n.push(u)}if(!a&&Ea[e.getMode()][s]>=0){var c=o.shiftAndAppend(s,l);n.push(c)}}}if(e.getBinaryShiftByteCount()>0||gn[e.getMode()][i]===0){var d=e.addBinaryShiftChar(r);n.push(d)}},t.updateStateListForPair=function(e,r,n){var i,a,o=[];try{for(var s=wr(e),l=s.next();!l.done;l=s.next()){var u=l.value;this.updateStateForPair(u,r,n,o)}}catch(c){i={error:c}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}return this.simplifyStates(o)},t.updateStateForPair=function(e,r,n,i){var a=e.endBinaryShift(r);if(i.push(a.latchAndAppend(Xe,n)),e.getMode()!==Xe&&i.push(a.shiftAndAppend(Xe,n)),n===3||n===4){var o=a.latchAndAppend(Me,16-n).latchAndAppend(Me,1);i.push(o)}if(e.getBinaryShiftByteCount()>0){var s=e.addBinaryShiftChar(r).addBinaryShiftChar(r+1);i.push(s)}},t.simplifyStates=function(e){var r,n,i,a,o=[];try{for(var s=wr(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=!0,d=function(m){if(m.isBetterThanOrEqualTo(u))return c=!1,"break";u.isBetterThanOrEqualTo(m)&&(o=o.filter(function(w){return w!==m}))};try{for(var v=(i=void 0,wr(o)),h=v.next();!h.done;h=v.next()){var p=h.value,g=d(p);if(g==="break")break}}catch(m){i={error:m}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}c&&o.push(u)}}catch(m){r={error:m}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t}(),Ec=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.encodeBytes=function(e){return t.encode(e,t.DEFAULT_EC_PERCENT,t.DEFAULT_AZTEC_LAYERS)},t.encode=function(e,r,n){var i=new _c(e).encode(),a=H.truncDivision(i.getSize()*r,100)+11,o=i.getSize()+a,s,l,u,c,d;if(n!==t.DEFAULT_AZTEC_LAYERS){if(s=n<0,l=Math.abs(n),l>(s?t.MAX_NB_BITS_COMPACT:t.MAX_NB_BITS))throw new M(ee.format("Illegal value %s for layers",n));u=t.totalBitsInLayer(l,s),c=t.WORD_SIZE[l];var v=u-u%c;if(d=t.stuffBits(i,c),d.getSize()+a>v)throw new M("Data to large for user specified layer");if(s&&d.getSize()>c*64)throw new M("Data to large for user specified layer")}else{c=0,d=null;for(var h=0;;h++){if(h>t.MAX_NB_BITS)throw new M("Data too large for an Aztec code");if(s=h<=3,l=s?h+1:h,u=t.totalBitsInLayer(l,s),!(o>u)){(d==null||c!==t.WORD_SIZE[l])&&(c=t.WORD_SIZE[l],d=t.stuffBits(i,c));var v=u-u%c;if(!(s&&d.getSize()>c*64)&&d.getSize()+a<=v)break}}}var p=t.generateCheckWords(d,u,c),g=d.getSize()/c,m=t.generateModeMessage(s,l,g),w=(s?11:14)+l*4,y=new Int32Array(w),_;if(s){_=w;for(var h=0;h<y.length;h++)y[h]=h}else{_=w+1+2*H.truncDivision(H.truncDivision(w,2)-1,15);for(var A=H.truncDivision(w,2),C=H.truncDivision(_,2),h=0;h<A;h++){var D=h+H.truncDivision(h,15);y[A-h-1]=C-D-1,y[A+h]=C+D+1}}for(var B=new Ke(_),h=0,k=0;h<l;h++){for(var $=(l-h)*4+(s?9:12),L=0;L<$;L++)for(var le=L*2,G=0;G<2;G++)p.get(k+le+G)&&B.set(y[h*2+G],y[h*2+L]),p.get(k+$*2+le+G)&&B.set(y[h*2+L],y[w-1-h*2-G]),p.get(k+$*4+le+G)&&B.set(y[w-1-h*2-G],y[w-1-h*2-L]),p.get(k+$*6+le+G)&&B.set(y[w-1-h*2-L],y[h*2+G]);k+=$*8}if(t.drawModeMessage(B,s,_,m),s)t.drawBullsEye(B,H.truncDivision(_,2),5);else{t.drawBullsEye(B,H.truncDivision(_,2),7);for(var h=0,L=0;h<H.truncDivision(w,2)-1;h+=15,L+=16)for(var G=H.truncDivision(_,2)&1;G<_;G+=2)B.set(H.truncDivision(_,2)-L,G),B.set(H.truncDivision(_,2)+L,G),B.set(G,H.truncDivision(_,2)-L),B.set(G,H.truncDivision(_,2)+L)}var ae=new lc;return ae.setCompact(s),ae.setSize(_),ae.setLayers(l),ae.setCodeWords(g),ae.setMatrix(B),ae},t.drawBullsEye=function(e,r,n){for(var i=0;i<n;i+=2)for(var a=r-i;a<=r+i;a++)e.set(a,r-i),e.set(a,r+i),e.set(r-i,a),e.set(r+i,a);e.set(r-n,r-n),e.set(r-n+1,r-n),e.set(r-n,r-n+1),e.set(r+n,r-n),e.set(r+n,r-n+1),e.set(r+n,r+n-1)},t.generateModeMessage=function(e,r,n){var i=new ve;return e?(i.appendBits(r-1,2),i.appendBits(n-1,6),i=t.generateCheckWords(i,28,4)):(i.appendBits(r-1,5),i.appendBits(n-1,11),i=t.generateCheckWords(i,40,4)),i},t.drawModeMessage=function(e,r,n,i){var a=H.truncDivision(n,2);if(r)for(var o=0;o<7;o++){var s=a-3+o;i.get(o)&&e.set(s,a-5),i.get(o+7)&&e.set(a+5,s),i.get(20-o)&&e.set(s,a+5),i.get(27-o)&&e.set(a-5,s)}else for(var o=0;o<10;o++){var s=a-5+o+H.truncDivision(o,5);i.get(o)&&e.set(s,a-7),i.get(o+10)&&e.set(a+7,s),i.get(29-o)&&e.set(s,a+7),i.get(39-o)&&e.set(a-7,s)}},t.generateCheckWords=function(e,r,n){var i,a,o=e.getSize()/n,s=new wa(t.getGF(n)),l=H.truncDivision(r,n),u=t.bitsToWords(e,n,l);s.encode(u,l-o);var c=r%n,d=new ve;d.appendBits(0,c);try{for(var v=Ec(Array.from(u)),h=v.next();!h.done;h=v.next()){var p=h.value;d.appendBits(p,n)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}return d},t.bitsToWords=function(e,r,n){var i=new Int32Array(n),a,o;for(a=0,o=e.getSize()/r;a<o;a++){for(var s=0,l=0;l<r;l++)s|=e.get(a*r+l)?1<<r-l-1:0;i[a]=s}return i},t.getGF=function(e){switch(e){case 4:return Te.AZTEC_PARAM;case 6:return Te.AZTEC_DATA_6;case 8:return Te.AZTEC_DATA_8;case 10:return Te.AZTEC_DATA_10;case 12:return Te.AZTEC_DATA_12;default:throw new M("Unsupported word size "+e)}},t.stuffBits=function(e,r){for(var n=new ve,i=e.getSize(),a=(1<<r)-2,o=0;o<i;o+=r){for(var s=0,l=0;l<r;l++)(o+l>=i||e.get(o+l))&&(s|=1<<r-1-l);(s&a)===a?(n.appendBits(s&a,r),o--):(s&a)===0?(n.appendBits(s|1,r),o--):n.appendBits(s,r)}return n},t.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.DEFAULT_EC_PERCENT=33,t.DEFAULT_AZTEC_LAYERS=0,t.MAX_NB_BITS=32,t.MAX_NB_BITS_COMPACT=4,t.WORD_SIZE=Int32Array.from([4,6,6,8,8,8,8,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,12,12,12,12,12,12,12,12,12]),t})();const Ac={name:"stream-barcode-reader",data(){return{isLoading:!0,codeReader:new Qf,isMediaStreamAPISupported:navigator&&navigator.mediaDevices&&"enumerateDevices"in navigator.mediaDevices}},mounted(){if(!this.isMediaStreamAPISupported)throw new Ce("Media Stream API is not supported");this.start(),this.$refs.scanner.oncanplay=t=>{this.isLoading=!1,this.$emit("loaded")}},beforeUnmount(){this.codeReader.reset()},methods:{start(){this.codeReader.decodeFromVideoDevice(void 0,this.$refs.scanner,(t,e)=>{t&&(this.$emit("decode",t.text),this.$emit("result",t))})}}},Cc={class:"scanner-container"},bc={poster:"data:image/gif,AAAA",ref:"scanner"};function Sc(t,e,r,n,i,a){return f.openBlock(),f.createElementBlock("div",Cc,[f.withDirectives(f.createElementVNode("div",null,[f.createElementVNode("video",bc,null,512),e[0]||(e[0]=f.createElementVNode("div",{class:"overlay-element"},null,-1)),e[1]||(e[1]=f.createElementVNode("div",{class:"laser"},null,-1))],512),[[f.vShow,!i.isLoading]])])}const Ic=kr(Ac,[["render",Sc],["__scopeId","data-v-3b725b25"]]),Oc={key:0,class:"dsg-barcode"},Tc={class:"dsg-barcode__header"},Nc={class:"dsg-barcode__title"},Dc={key:0,class:"dsg-barcode__subtitle"},Bc={class:"dsg-barcode__body"},Rc={class:"dsg-barcode__scanner-wrapper"},Pc={class:"dsg-barcode__manual-toggle"},kc={key:0,class:"dsg-barcode__manual-input-group"},Mc={key:1},Lc={key:0,class:"dsg-barcode__manual-text"},Fc=f.defineComponent({__name:"DsgBarcodeScanner",setup(t,{expose:e}){const r=f.ref(!1),n=f.ref(""),i=f.ref(""),a=f.ref(null),o=f.ref(""),s=f.ref(!1);function l(h){n.value=h.title,i.value=h.subtitle??"",a.value=h.onClose,o.value="",s.value=!1,r.value=!0}function u(h){v({type:"scanned",value:h})}function c(){o.value.trim()&&v({type:"manual",value:o.value.trim()})}function d(){v({type:"cancelled"})}function v(h){r.value=!1,a.value&&(a.value(h),a.value=null)}return e({scan:l}),(h,p)=>(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[f.createVNode(f.Transition,{name:"dsg-barcode-fade"},{default:f.withCtx(()=>[r.value?(f.openBlock(),f.createElementBlock("div",Oc,[f.createElementVNode("div",Tc,[f.createElementVNode("div",null,[f.createElementVNode("h2",Nc,f.toDisplayString(n.value),1),i.value?(f.openBlock(),f.createElementBlock("p",Dc,f.toDisplayString(i.value),1)):f.createCommentVNode("",!0)]),f.createElementVNode("button",{onClick:d,"aria-label":"Close",class:"dsg-barcode__close"},"×")]),f.createElementVNode("div",Bc,[f.createElementVNode("div",Rc,[f.createVNode(f.unref(Ic),{class:"dsg-barcode__scanner",onDecode:u}),p[2]||(p[2]=f.createElementVNode("div",{class:"dsg-barcode__overlay"},null,-1))]),f.createElementVNode("div",Pc,[s.value?(f.openBlock(),f.createElementBlock("div",kc,[f.withDirectives(f.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=g=>o.value=g),type:"text",class:"dsg-barcode__manual-input",placeholder:"Enter barcode manually",onKeyup:f.withKeys(c,["enter"])},null,544),[[f.vModelText,o.value]]),f.createElementVNode("button",{onClick:c,class:"dsg-barcode__manual-submit"}," Submit ")])):(f.openBlock(),f.createElementBlock("div",Mc,[s.value?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",Lc," No barcode? ")),s.value?f.createCommentVNode("",!0):(f.openBlock(),f.createBlock(V._sfc_main$3,{key:1,label:"Input manually",onClick:p[1]||(p[1]=g=>s.value=!s.value),class:"dsg-barcode__manual-toggle-button"}))]))])])])):f.createCommentVNode("",!0)]),_:1})]))}}),Vc=kr(Fc,[["__scopeId","data-v-55e130b8"]]),Aa=f.defineComponent({__name:"DsgCard",props:{variant:{default:"default"},hoverable:{type:Boolean,default:!1},classes:{default:""}},setup(t){return(e,r)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-card",[`dsg-card--${e.variant}`,{"dsg-card--hoverable":e.hoverable},e.classes]])},[f.renderSlot(e.$slots,"default")],2))}}),Uc=f.defineComponent({__name:"DsgCardContainer",props:{columns:{default:1},gap:{},items:{},itemKey:{default:null},cardProps:{default:()=>({})}},setup(t){return(e,r)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-card-container",`dsg-card-container--cols-${e.columns} dsg-card-container--gap-${e.gap}`])},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(e.items,(n,i)=>(f.openBlock(),f.createBlock(Aa,f.mergeProps({key:e.itemKey?n[e.itemKey]:i},{ref_for:!0},e.cardProps),{default:f.withCtx(()=>[f.renderSlot(e.$slots,"default",{item:n,index:i})]),_:2},1040))),128))],2))}}),$c={key:1},Hc=f.defineComponent({__name:"DsgBreadcrumb",props:{breadcrumbs:{default:()=>[]},divider:{default:()=>({icon:"slash-divider",size:"sm",classes:""})},theme:{default:"text"}},setup(t){return(e,r)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-breadcrumbs","dsg-breadcrumbs"])},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(e.breadcrumbs,(n,i)=>(f.openBlock(),f.createElementBlock(f.Fragment,{key:`breadcrumb-item-${i}`},[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(n.url??!1?"a":"span"),{href:n.url??null,disabled:n.disabled,class:f.normalizeClass(["dsg-breadcrumbs__button-base",`dsg-breadcrumbs__button-base--${e.theme}`,`${n.active??i===e.breadcrumbs.length-1?"dsg-breadcrumbs__button-base--active":""}`].join(" "))},{default:f.withCtx(()=>[n.icon&&n.useIcon?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:n.icon,size:"sm",classes:"dsg-breadcrumbs__icon"},null,8,["icon"])):(f.openBlock(),f.createElementBlock("span",$c,f.toDisplayString(n.label),1))]),_:2},1032,["href","disabled","class"])),i<e.breadcrumbs.length-1?(f.openBlock(),f.createBlock(V._sfc_main,f.mergeProps({key:0,ref_for:!0},e.divider,{class:"dsg-breadcrumbs__divider"}),null,16)):f.createCommentVNode("",!0)],64))),128))]))}}),Gc=kr(Hc,[["__scopeId","data-v-8f108e12"]]),zc={class:"dsg-tab--mobile"},Wc={"aria-label":"Select a tab",class:"dsg-tab--mobile-select"},Xc=["selected","textContent"],jc={class:"dsg-tab--desktop"},Yc={class:"dsg-tab--desktop-wrapper"},Kc=["href","onClick","aria-current"],Zc=["textContent"],qc={key:0,class:"dsg-tab--content"},Qc=f.defineComponent({__name:"DsgTab",props:{tabs:{default:()=>[]},style:{default:"tabs"},preventVisits:{type:Boolean,default:!0},useWindowLocation:{type:Boolean,default:!1},replaceState:{type:Boolean,default:!1},replaceStrategy:{default:"window"},useSlots:{type:Boolean,default:!1},selfUpdate:{type:Boolean,default:!0},teleportSlotTo:{}},emits:["tab-clicked"],setup(t,{emit:e}){const r=e,n=a=>{t.tabs.forEach(o=>{o.current=a.name===o.name})},i=a=>{if(t.preventVisits&&r("tab-clicked",a),t.useWindowLocation&&a.href&&(window.location.href=a.href),t.replaceState){const o=new URL(window.location.href),s=new URLSearchParams(o.search);s.set("tab",a.key);const l=`${o.origin}${o.pathname}?${s.toString()}`;t.replaceStrategy==="window"&&window.history.replaceState({},"",l)}t.selfUpdate&&n(a)};return(a,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-tab",`dsg-tab--${a.style}`])},[f.createElementVNode("div",zc,[f.createElementVNode("select",Wc,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.tabs,s=>(f.openBlock(),f.createElementBlock("option",{key:s.name,selected:s.current,textContent:f.toDisplayString(s.name)},null,8,Xc))),128))]),f.createVNode(V._sfc_main,{class:"dsg-tab--mobile-select-icon",icon:"chevron-down","aria-hidden":"true",size:"sm"})]),f.createElementVNode("div",jc,[f.createElementVNode("div",Yc,[f.createElementVNode("div",{class:f.normalizeClass(["dsg-tab--desktop-nav",a.style==="pills"?"dsg-tab--pills-nav":""]),"aria-label":"Tabs"},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.tabs,s=>(f.openBlock(),f.createElementBlock("a",{key:s.name,href:s.href,onClick:f.withModifiers(l=>i(s),["prevent"]),class:f.normalizeClass(["dsg-tab--desktop-link",[a.style==="pills"?s.current?"pills-active":"pills-inactive":s.current?"link-active":"link-inactive"]]),"aria-current":s.current?"page":void 0},[f.createElementVNode("span",{class:"dsg-tab--desktop-link-label",textContent:f.toDisplayString(s.name)},null,8,Zc),s.badge?(f.openBlock(),f.createBlock(ea,{key:0,label:s.badge.label,"theme-color":s.current?"brand":"gray",theme:"pill-color",size:"sm"},null,8,["label","theme-color"])):f.createCommentVNode("",!0)],10,Kc))),128))],2)])]),a.useSlots?(f.openBlock(),f.createElementBlock("div",qc,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.tabs,(s,l)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[s.current?f.renderSlot(a.$slots,`dsg-tab--content--${String(s.key).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{key:0,data:s}):f.createCommentVNode("",!0)],64))),256))])):f.createCommentVNode("",!0)],2))}}),Ca=V._sfc_main,ba=Et,Sa=V._sfc_main$4,Ia=ns,Oa=Ji,Ta=ir,Na=ea,Da=V._sfc_main$3,Ba=V._sfc_main$2,Ra=Is,Pa=cl,ka=V._sfc_main$5,Ma=Fl,La=Hl,Fa=V._sfc_main$6,Va=Gi._sfc_main,Ua=Wl,$a=Zl,Ha=t1,Ga=s1,za=V._sfc_main$1,Wa=V._sfc_main$7,Jc=gs,e0=h1,t0=Vc,r0=Aa,n0=Uc,Xa=Gc,ja=Qc,i0={DsgIcon:Ca,DsgMiscIcon:ba,DsgCreditCardIcon:Sa,DsgAlert:Ia,DsgAnnouncement:Oa,DsgAvatar:Ta,DsgBadge:Na,DsgButton:Da,DsgCheckbox:Ba,DsgCheckboxGroup:Ra,DsgDropdown:Pa,DsgInput:ka,DsgInputSelect:Ma,DsgInputDropdown:La,DsgDatepicker:Fa,DsgLabel:Va,DsgLink:Ua,DsgModal:$a,DsgTag:Ha,DsgToggle:Ga,DsgTooltip:za,DsgBreadcrumb:Xa,DsgTab:ja,DsgFilter:Wa};exports.DsgAlert=Ia;exports.DsgAnnouncement=Oa;exports.DsgAvatar=Ta;exports.DsgBadge=Na;exports.DsgBarcodeScanner=t0;exports.DsgBreadcrumb=Xa;exports.DsgButton=Da;exports.DsgCard=r0;exports.DsgCardContainer=n0;exports.DsgCheckbox=Ba;exports.DsgCheckboxGroup=Ra;exports.DsgCreditCardIcon=Sa;exports.DsgDatepicker=Fa;exports.DsgDropdown=Pa;exports.DsgFilter=Wa;exports.DsgIcon=Ca;exports.DsgInput=ka;exports.DsgInputDropdown=La;exports.DsgInputNumber=Jc;exports.DsgInputSelect=Ma;exports.DsgLabel=Va;exports.DsgLink=Ua;exports.DsgMiscIcon=ba;exports.DsgModal=$a;exports.DsgProgress=e0;exports.DsgTab=ja;exports.DsgTag=Ha;exports.DsgToggle=Ga;exports.DsgTooltip=za;exports.default=i0;
29
+ `),e.toString()},t.prototype.setMode=function(e){this.mode=e},t.prototype.setECLevel=function(e){this.ecLevel=e},t.prototype.setVersion=function(e){this.version=e},t.prototype.setMaskPattern=function(e){this.maskPattern=e},t.prototype.setMatrix=function(e){this.matrix=e},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t}(),rc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ne=function(t){rc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="WriterException",e}(Ce),Ui=function(){function t(){}return t.clearMatrix=function(e){e.clear(255)},t.buildMatrix=function(e,r,n,i,a){t.clearMatrix(a),t.embedBasicPatterns(n,a),t.embedTypeInfo(r,i,a),t.maybeEmbedVersionInfo(n,a),t.embedDataBits(e,i,a)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var i=new ve;t.makeTypeInfoBits(e,r,i);for(var a=0,o=i.getSize();a<o;++a){var s=i.get(i.getSize()-1-a),l=t.TYPE_INFO_COORDINATES[a],u=l[0],c=l[1];if(n.setBoolean(u,c,s),a<8){var d=n.getWidth()-a-1,v=8;n.setBoolean(d,v,s)}else{var d=8,v=n.getHeight()-7+(a-8);n.setBoolean(d,v,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new ve;t.makeVersionInfoBits(e,n);for(var i=17,a=0;a<6;++a)for(var o=0;o<3;++o){var s=n.get(i);i--,r.setBoolean(a,r.getHeight()-11+o,s),r.setBoolean(r.getHeight()-11+o,a,s)}}},t.embedDataBits=function(e,r,n){for(var i=0,a=-1,o=n.getWidth()-1,s=n.getHeight()-1;o>0;){for(o===6&&(o-=1);s>=0&&s<n.getHeight();){for(var l=0;l<2;++l){var u=o-l;if(t.isEmpty(n.get(u,s))){var c=void 0;i<e.getSize()?(c=e.get(i),++i):c=!1,r!==255&&nr.getDataMaskBit(r,u,s)&&(c=!c),n.setBoolean(u,s,c)}}s+=a}a=-a,s+=a,o-=2}if(i!==e.getSize())throw new ne("Not all bits consumed: "+i+"/"+e.getSize())},t.findMSBSet=function(e){return 32-G.numberOfLeadingZeros(e)},t.calculateBCHCode=function(e,r){if(r===0)throw new L("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Fn.isValidMaskPattern(r))throw new ne("Invalid mask pattern");var i=e.getBits()<<3|r;n.appendBits(i,5);var a=t.calculateBCHCode(i,t.TYPE_INFO_POLY);n.appendBits(a,10);var o=new ve;if(o.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(o),n.getSize()!==15)throw new ne("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),r.getSize()!==18)throw new ne("should not happen but we got: "+r.getSize())},t.isEmpty=function(e){return e===255},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(e){if(e.get(8,e.getHeight()-8)===0)throw new ne;e.setNumber(8,e.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var i=0;i<8;++i){if(!t.isEmpty(n.get(e+i,r)))throw new ne;n.setNumber(e+i,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var i=0;i<7;++i){if(!t.isEmpty(n.get(e,r+i)))throw new ne;n.setNumber(e,r+i,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var i=0;i<5;++i)for(var a=t.POSITION_ADJUSTMENT_PATTERN[i],o=0;o<5;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPattern=function(e,r,n){for(var i=0;i<7;++i)for(var a=t.POSITION_DETECTION_PATTERN[i],o=0;o<7;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);var n=8;t.embedHorizontalSeparationPattern(0,n-1,e),t.embedHorizontalSeparationPattern(e.getWidth()-n,n-1,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-n,e);var i=7;t.embedVerticalSeparationPattern(i,0,e),t.embedVerticalSeparationPattern(e.getHeight()-i-1,0,e),t.embedVerticalSeparationPattern(i,e.getHeight()-i,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,i=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],a=0,o=i.length;a!==o;a++){var s=i[a];if(s>=0)for(var l=0;l!==o;l++){var u=i[l];u>=0&&t.isEmpty(r.get(u,s))&&t.embedPositionAdjustmentPattern(u-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t}(),nc=function(){function t(e,r){this.dataBytes=e,this.errorCorrectionBytes=r}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t}(),$i=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.calculateMaskPenalty=function(e){return nr.applyMaskPenaltyRule1(e)+nr.applyMaskPenaltyRule2(e)+nr.applyMaskPenaltyRule3(e)+nr.applyMaskPenaltyRule4(e)},t.encode=function(e,r,n){n===void 0&&(n=null);var i=t.DEFAULT_BYTE_MODE_ENCODING,a=n!==null&&n.get(Er.CHARACTER_SET)!==void 0;a&&(i=n.get(Er.CHARACTER_SET).toString());var o=this.chooseMode(e,i),s=new ve;if(o===ie.BYTE&&(a||t.DEFAULT_BYTE_MODE_ENCODING!==i)){var l=de.getCharacterSetECIByName(i);l!==void 0&&this.appendECI(l,s)}this.appendModeInfo(o,s);var u=new ve;this.appendBytes(e,o,u,i);var c;if(n!==null&&n.get(Er.QR_VERSION)!==void 0){var d=Number.parseInt(n.get(Er.QR_VERSION).toString(),10);c=wt.getVersionForNumber(d);var v=this.calculateBitsNeeded(o,s,u,c);if(!this.willFit(v,c,r))throw new ne("Data too big for requested version")}else c=this.recommendVersion(r,o,s,u);var h=new ve;h.appendBitArray(s);var p=o===ie.BYTE?u.getSizeInBytes():e.length;this.appendLengthInfo(p,c,o,h),h.appendBitArray(u);var g=c.getECBlocksForLevel(r),w=c.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(w,h);var _=this.interleaveWithECBytes(h,c.getTotalCodewords(),w,g.getNumBlocks()),m=new Fn;m.setECLevel(r),m.setMode(o),m.setVersion(c);var A=c.getDimensionForVersion(),y=new tc(A,A),C=this.chooseMaskPattern(_,r,c,y);return m.setMaskPattern(C),Ui.buildMatrix(_,r,c,C,y),m.setMatrix(y),m},t.recommendVersion=function(e,r,n,i){var a=this.calculateBitsNeeded(r,n,i,wt.getVersionForNumber(1)),o=this.chooseVersion(a,e),s=this.calculateBitsNeeded(r,n,i,o);return this.chooseVersion(s,e)},t.calculateBitsNeeded=function(e,r,n,i){return r.getSize()+e.getCharacterCountBits(i)+n.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(r===void 0&&(r=null),de.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return ie.KANJI;for(var n=!1,i=!1,a=0,o=e.length;a<o;++a){var s=e.charAt(a);if(t.isDigit(s))n=!0;else if(this.getAlphanumericCode(s.charCodeAt(0))!==-1)i=!0;else return ie.BYTE}return i?ie.ALPHANUMERIC:n?ie.NUMERIC:ie.BYTE},t.isOnlyDoubleByteKanji=function(e){var r;try{r=Ye.encode(e,de.SJIS)}catch{return!1}var n=r.length;if(n%2!==0)return!1;for(var i=0;i<n;i+=2){var a=r[i]&255;if((a<129||a>159)&&(a<224||a>235))return!1}return!0},t.chooseMaskPattern=function(e,r,n,i){for(var a=Number.MAX_SAFE_INTEGER,o=-1,s=0;s<Fn.NUM_MASK_PATTERNS;s++){Ui.buildMatrix(e,r,n,s,i);var l=this.calculateMaskPenalty(i);l<a&&(a=l,o=s)}return o},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var i=wt.getVersionForNumber(n);if(t.willFit(e,i,r))return i}throw new ne("Data too big")},t.willFit=function(e,r,n){var i=r.getTotalCodewords(),a=r.getECBlocksForLevel(n),o=a.getTotalECCodewords(),s=i-o,l=(e+7)/8;return s>=l},t.terminateBits=function(e,r){var n=e*8;if(r.getSize()>n)throw new ne("data bits cannot fit in the QR Code"+r.getSize()+" > "+n);for(var i=0;i<4&&r.getSize()<n;++i)r.appendBit(!1);var a=r.getSize()&7;if(a>0)for(var i=a;i<8;i++)r.appendBit(!1);for(var o=e-r.getSizeInBytes(),i=0;i<o;++i)r.appendBits((i&1)===0?236:17,8);if(r.getSize()!==n)throw new ne("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(e,r,n,i,a,o){if(i>=n)throw new ne("Block ID too large");var s=e%n,l=n-s,u=Math.floor(e/n),c=u+1,d=Math.floor(r/n),v=d+1,h=u-d,p=c-v;if(h!==p)throw new ne("EC bytes mismatch");if(n!==l+s)throw new ne("RS blocks mismatch");if(e!==(d+h)*l+(v+p)*s)throw new ne("Total bytes mismatch");i<l?(a[0]=d,o[0]=h):(a[0]=v,o[0]=p)},t.interleaveWithECBytes=function(e,r,n,i){var a,o,s,l;if(e.getSizeInBytes()!==n)throw new ne("Number of bits and data bytes does not match");for(var u=0,c=0,d=0,v=new Array,h=0;h<i;++h){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,i,h,p,g);var w=p[0],_=new Uint8Array(w);e.toBytes(8*u,_,0,w);var m=t.generateECBytes(_,g[0]);v.push(new nc(_,m)),c=Math.max(c,w),d=Math.max(d,m.length),u+=p[0]}if(n!==u)throw new ne("Data bytes does not match offset");for(var A=new ve,h=0;h<c;++h)try{for(var y=(a=void 0,$i(v)),C=y.next();!C.done;C=y.next()){var b=C.value,_=b.getDataBytes();h<_.length&&A.appendBits(_[h],8)}}catch(M){a={error:M}}finally{try{C&&!C.done&&(o=y.return)&&o.call(y)}finally{if(a)throw a.error}}for(var h=0;h<d;++h)try{for(var O=(s=void 0,$i(v)),P=O.next();!P.done;P=O.next()){var b=P.value,m=b.getErrorCorrectionBytes();h<m.length&&A.appendBits(m[h],8)}}catch(M){s={error:M}}finally{try{P&&!P.done&&(l=O.return)&&l.call(O)}finally{if(s)throw s.error}}if(r!==A.getSizeInBytes())throw new ne("Interleaving error: "+r+" and "+A.getSizeInBytes()+" differ.");return A},t.generateECBytes=function(e,r){for(var n=e.length,i=new Int32Array(n+r),a=0;a<n;a++)i[a]=e[a]&255;new wa(Ne.QR_CODE_FIELD_256).encode(i,r);for(var o=new Uint8Array(r),a=0;a<r;a++)o[a]=i[n+a];return o},t.appendModeInfo=function(e,r){r.appendBits(e.getBits(),4)},t.appendLengthInfo=function(e,r,n,i){var a=n.getCharacterCountBits(r);if(e>=1<<a)throw new ne(e+" is bigger than "+((1<<a)-1));i.appendBits(e,a)},t.appendBytes=function(e,r,n,i){switch(r){case ie.NUMERIC:t.appendNumericBytes(e,n);break;case ie.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case ie.BYTE:t.append8BitBytes(e,n,i);break;case ie.KANJI:t.appendKanjiBytes(e,n);break;default:throw new ne("Invalid mode: "+r)}},t.getDigit=function(e){return e.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getDigit(e.charAt(i));if(i+2<n){var o=t.getDigit(e.charAt(i+1)),s=t.getDigit(e.charAt(i+2));r.appendBits(a*100+o*10+s,10),i+=3}else if(i+1<n){var o=t.getDigit(e.charAt(i+1));r.appendBits(a*10+o,7),i+=2}else r.appendBits(a,4),i++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getAlphanumericCode(e.charCodeAt(i));if(a===-1)throw new ne;if(i+1<n){var o=t.getAlphanumericCode(e.charCodeAt(i+1));if(o===-1)throw new ne;r.appendBits(a*45+o,11),i+=2}else r.appendBits(a,6),i++}},t.append8BitBytes=function(e,r,n){var i;try{i=Ye.encode(e,n)}catch(l){throw new ne(l)}for(var a=0,o=i.length;a!==o;a++){var s=i[a];r.appendBits(s,8)}},t.appendKanjiBytes=function(e,r){var n;try{n=Ye.encode(e,de.SJIS)}catch(d){throw new ne(d)}for(var i=n.length,a=0;a<i;a+=2){var o=n[a]&255,s=n[a+1]&255,l=o<<8&4294967295|s,u=-1;if(l>=33088&&l<=40956?u=l-33088:l>=57408&&l<=60351&&(u=l-49472),u===-1)throw new ne("Invalid byte sequence");var c=(u>>8)*192+(u&255);r.appendBits(c,13)}},t.appendECI=function(e,r){r.appendBits(ie.ECI.getBits(),4),r.appendBits(e.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=de.UTF8.getName(),t})();var ic=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){ic(e,t);function e(r,n,i,a,o,s,l,u){var c=t.call(this,s,l)||this;if(c.yuvData=r,c.dataWidth=n,c.dataHeight=i,c.left=a,c.top=o,a+s>n||o+l>i)throw new L("Crop rectangle does not fit within image data.");return u&&c.reverseHorizontal(s,l),c}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new L("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return re.arraycopy(this.yuvData,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.yuvData;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return re.arraycopy(this.yuvData,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;re.arraycopy(this.yuvData,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+r,this.top+n,i,a,!1)},e.prototype.renderThumbnail=function(){for(var r=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,i=new Int32Array(r*n),a=this.yuvData,o=this.top*this.dataWidth+this.left,s=0;s<n;s++){for(var l=s*r,u=0;u<r;u++){var c=a[o+u*e.THUMBNAIL_SCALE_FACTOR]&255;i[l+u]=4278190080|c*65793}o+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return i},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(r,n){for(var i=this.yuvData,a=0,o=this.top*this.dataWidth+this.left;a<n;a++,o+=this.dataWidth)for(var s=o+r/2,l=o,u=o+r-1;l<s;l++,u--){var c=i[l];i[l]=i[u],i[u]=c}},e.prototype.invert=function(){return new Wn(this)},e.THUMBNAIL_SCALE_FACTOR=2,e})(zr);var ac=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){ac(e,t);function e(r,n,i,a,o,s,l){var u=t.call(this,n,i)||this;if(u.dataWidth=a,u.dataHeight=o,u.left=s,u.top=l,r.BYTES_PER_ELEMENT===4){for(var c=n*i,d=new Uint8ClampedArray(c),v=0;v<c;v++){var h=r[v],p=h>>16&255,g=h>>7&510,w=h&255;d[v]=(p+g+w)/4&255}u.luminances=d}else u.luminances=r;if(a===void 0&&(u.dataWidth=n),o===void 0&&(u.dataHeight=i),s===void 0&&(u.left=0),l===void 0&&(u.top=0),u.left+n>u.dataWidth||u.top+i>u.dataHeight)throw new L("Crop rectangle does not fit within image data.");return u}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new L("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return re.arraycopy(this.luminances,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.luminances;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return re.arraycopy(this.luminances,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;re.arraycopy(this.luminances,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.luminances,i,a,this.dataWidth,this.dataHeight,this.left+r,this.top+n)},e.prototype.invert=function(){return new Wn(this)},e})(zr);var oc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){oc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.forName=function(r){return this.getCharacterSetECIByName(r)},e})(de);(function(){function t(){}return t.ISO_8859_1=de.ISO8859_1,t})();var sc=function(){function t(){}return t.prototype.isCompact=function(){return this.compact},t.prototype.setCompact=function(e){this.compact=e},t.prototype.getSize=function(){return this.size},t.prototype.setSize=function(e){this.size=e},t.prototype.getLayers=function(){return this.layers},t.prototype.setLayers=function(e){this.layers=e},t.prototype.getCodeWords=function(){return this.codeWords},t.prototype.setCodeWords=function(e){this.codeWords=e},t.prototype.getMatrix=function(){return this.matrix},t.prototype.setMatrix=function(e){this.matrix=e},t}(),Hi=function(){function t(){}return t.singletonList=function(e){return[e]},t.min=function(e,r){return e.sort(r)[0]},t}(),lc=function(){function t(e){this.previous=e}return t.prototype.getPrevious=function(){return this.previous},t}(),uc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zn=function(t){uc(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.value=n,a.bitCount=i,a}return e.prototype.appendTo=function(r,n){r.appendBits(this.value,this.bitCount)},e.prototype.add=function(r,n){return new e(this,r,n)},e.prototype.addBinaryShift=function(r,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,r,n)},e.prototype.toString=function(){var r=this.value&(1<<this.bitCount)-1;return r|=1<<this.bitCount,"<"+G.toBinaryString(r|1<<this.bitCount).substring(1)+">"},e}(lc),fc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),cc=function(t){fc(e,t);function e(r,n,i){var a=t.call(this,r,0,0)||this;return a.binaryShiftStart=n,a.binaryShiftByteCount=i,a}return e.prototype.appendTo=function(r,n){for(var i=0;i<this.binaryShiftByteCount;i++)(i===0||i===31&&this.binaryShiftByteCount<=62)&&(r.appendBits(31,5),this.binaryShiftByteCount>62?r.appendBits(this.binaryShiftByteCount-31,16):i===0?r.appendBits(Math.min(this.binaryShiftByteCount,31),5):r.appendBits(this.binaryShiftByteCount-31,5)),r.appendBits(n[this.binaryShiftStart+i],8)},e.prototype.addBinaryShift=function(r,n){return new e(this,r,n)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"},e}(Zn);function dc(t,e,r){return new cc(t,e,r)}function Kt(t,e,r){return new Zn(t,e,r)}var hc=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],ct=0,Lr=1,Me=2,_a=3,je=4,vc=new Zn(null,0,0),pn=[Int32Array.from([0,(5<<16)+28,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(9<<16)+480+14,0,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(4<<16)+14,(9<<16)+448+28,0,(9<<16)+448+29,932798]),Int32Array.from([(5<<16)+29,(5<<16)+28,656318,0,(5<<16)+30]),Int32Array.from([(5<<16)+31,656380,656382,656381,0])],pc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function gc(t){var e,r;try{for(var n=pc(t),i=n.next();!i.done;i=n.next()){var a=i.value;De.fill(a,-1)}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return t[ct][je]=0,t[Lr][je]=0,t[Lr][ct]=28,t[_a][je]=0,t[Me][je]=0,t[Me][ct]=15,t}var Ea=gc(De.createInt32Array(6,6)),xc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yc=function(){function t(e,r,n,i){this.token=e,this.mode=r,this.binaryShiftByteCount=n,this.bitCount=i}return t.prototype.getMode=function(){return this.mode},t.prototype.getToken=function(){return this.token},t.prototype.getBinaryShiftByteCount=function(){return this.binaryShiftByteCount},t.prototype.getBitCount=function(){return this.bitCount},t.prototype.latchAndAppend=function(e,r){var n=this.bitCount,i=this.token;if(e!==this.mode){var a=pn[this.mode][e];i=Kt(i,a&65535,a>>16),n+=a>>16}var o=e===Me?4:5;return i=Kt(i,r,o),new t(i,e,0,n+o)},t.prototype.shiftAndAppend=function(e,r){var n=this.token,i=this.mode===Me?4:5;return n=Kt(n,Ea[this.mode][e],i),n=Kt(n,r,5),new t(n,this.mode,0,this.bitCount+i+5)},t.prototype.addBinaryShiftChar=function(e){var r=this.token,n=this.mode,i=this.bitCount;if(this.mode===je||this.mode===Me){var a=pn[n][ct];r=Kt(r,a&65535,a>>16),i+=a>>16,n=ct}var o=this.binaryShiftByteCount===0||this.binaryShiftByteCount===31?18:this.binaryShiftByteCount===62?9:8,s=new t(r,n,this.binaryShiftByteCount+1,i+o);return s.binaryShiftByteCount===2078&&(s=s.endBinaryShift(e+1)),s},t.prototype.endBinaryShift=function(e){if(this.binaryShiftByteCount===0)return this;var r=this.token;return r=dc(r,e-this.binaryShiftByteCount,this.binaryShiftByteCount),new t(r,this.mode,0,this.bitCount)},t.prototype.isBetterThanOrEqualTo=function(e){var r=this.bitCount+(pn[this.mode][e.mode]>>16);return this.binaryShiftByteCount<e.binaryShiftByteCount?r+=t.calculateBinaryShiftCost(e)-t.calculateBinaryShiftCost(this):this.binaryShiftByteCount>e.binaryShiftByteCount&&e.binaryShiftByteCount>0&&(r+=10),r<=e.bitCount},t.prototype.toBitArray=function(e){for(var r,n,i=[],a=this.endBinaryShift(e.length).token;a!==null;a=a.getPrevious())i.unshift(a);var o=new ve;try{for(var s=xc(i),l=s.next();!l.done;l=s.next()){var u=l.value;u.appendTo(o,e)}}catch(c){r={error:c}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t.prototype.toString=function(){return te.format("%s bits=%d bytes=%d",hc[this.mode],this.bitCount,this.binaryShiftByteCount)},t.calculateBinaryShiftCost=function(e){return e.binaryShiftByteCount>62?21:e.binaryShiftByteCount>31?20:e.binaryShiftByteCount>0?10:0},t.INITIAL_STATE=new t(vc,ct,0,0),t}();function mc(t){var e=te.getCharCode(" "),r=te.getCharCode("."),n=te.getCharCode(",");t[ct][e]=1;for(var i=te.getCharCode("Z"),a=te.getCharCode("A"),o=a;o<=i;o++)t[ct][o]=o-a+2;t[Lr][e]=1;for(var s=te.getCharCode("z"),l=te.getCharCode("a"),o=l;o<=s;o++)t[Lr][o]=o-l+2;t[Me][e]=1;for(var u=te.getCharCode("9"),c=te.getCharCode("0"),o=c;o<=u;o++)t[Me][o]=o-c+2;t[Me][n]=12,t[Me][r]=13;for(var d=["\0"," ","","","","","","","\x07","\b"," ",`
30
+ `,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""],v=0;v<d.length;v++)t[_a][te.getCharCode(d[v])]=v;for(var h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"],v=0;v<h.length;v++)te.getCharCode(h[v])>0&&(t[je][te.getCharCode(h[v])]=v);return t}var gn=mc(De.createInt32Array(5,256)),Ar=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wc=function(){function t(e){this.text=e}return t.prototype.encode=function(){for(var e=te.getCharCode(" "),r=te.getCharCode(`
31
+ `),n=Hi.singletonList(yc.INITIAL_STATE),i=0;i<this.text.length;i++){var a=void 0,o=i+1<this.text.length?this.text[i+1]:0;switch(this.text[i]){case te.getCharCode("\r"):a=o===r?2:0;break;case te.getCharCode("."):a=o===e?3:0;break;case te.getCharCode(","):a=o===e?4:0;break;case te.getCharCode(":"):a=o===e?5:0;break;default:a=0}a>0?(n=t.updateStateListForPair(n,i,a),i++):n=this.updateStateListForChar(n,i)}var s=Hi.min(n,function(l,u){return l.getBitCount()-u.getBitCount()});return s.toBitArray(this.text)},t.prototype.updateStateListForChar=function(e,r){var n,i,a=[];try{for(var o=Ar(e),s=o.next();!s.done;s=o.next()){var l=s.value;this.updateStateForChar(l,r,a)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return t.simplifyStates(a)},t.prototype.updateStateForChar=function(e,r,n){for(var i=this.text[r]&255,a=gn[e.getMode()][i]>0,o=null,s=0;s<=je;s++){var l=gn[s][i];if(l>0){if(o==null&&(o=e.endBinaryShift(r)),!a||s===e.getMode()||s===Me){var u=o.latchAndAppend(s,l);n.push(u)}if(!a&&Ea[e.getMode()][s]>=0){var c=o.shiftAndAppend(s,l);n.push(c)}}}if(e.getBinaryShiftByteCount()>0||gn[e.getMode()][i]===0){var d=e.addBinaryShiftChar(r);n.push(d)}},t.updateStateListForPair=function(e,r,n){var i,a,o=[];try{for(var s=Ar(e),l=s.next();!l.done;l=s.next()){var u=l.value;this.updateStateForPair(u,r,n,o)}}catch(c){i={error:c}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}return this.simplifyStates(o)},t.updateStateForPair=function(e,r,n,i){var a=e.endBinaryShift(r);if(i.push(a.latchAndAppend(je,n)),e.getMode()!==je&&i.push(a.shiftAndAppend(je,n)),n===3||n===4){var o=a.latchAndAppend(Me,16-n).latchAndAppend(Me,1);i.push(o)}if(e.getBinaryShiftByteCount()>0){var s=e.addBinaryShiftChar(r).addBinaryShiftChar(r+1);i.push(s)}},t.simplifyStates=function(e){var r,n,i,a,o=[];try{for(var s=Ar(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=!0,d=function(w){if(w.isBetterThanOrEqualTo(u))return c=!1,"break";u.isBetterThanOrEqualTo(w)&&(o=o.filter(function(_){return _!==w}))};try{for(var v=(i=void 0,Ar(o)),h=v.next();!h.done;h=v.next()){var p=h.value,g=d(p);if(g==="break")break}}catch(w){i={error:w}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}c&&o.push(u)}}catch(w){r={error:w}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t}(),_c=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.encodeBytes=function(e){return t.encode(e,t.DEFAULT_EC_PERCENT,t.DEFAULT_AZTEC_LAYERS)},t.encode=function(e,r,n){var i=new wc(e).encode(),a=G.truncDivision(i.getSize()*r,100)+11,o=i.getSize()+a,s,l,u,c,d;if(n!==t.DEFAULT_AZTEC_LAYERS){if(s=n<0,l=Math.abs(n),l>(s?t.MAX_NB_BITS_COMPACT:t.MAX_NB_BITS))throw new L(te.format("Illegal value %s for layers",n));u=t.totalBitsInLayer(l,s),c=t.WORD_SIZE[l];var v=u-u%c;if(d=t.stuffBits(i,c),d.getSize()+a>v)throw new L("Data to large for user specified layer");if(s&&d.getSize()>c*64)throw new L("Data to large for user specified layer")}else{c=0,d=null;for(var h=0;;h++){if(h>t.MAX_NB_BITS)throw new L("Data too large for an Aztec code");if(s=h<=3,l=s?h+1:h,u=t.totalBitsInLayer(l,s),!(o>u)){(d==null||c!==t.WORD_SIZE[l])&&(c=t.WORD_SIZE[l],d=t.stuffBits(i,c));var v=u-u%c;if(!(s&&d.getSize()>c*64)&&d.getSize()+a<=v)break}}}var p=t.generateCheckWords(d,u,c),g=d.getSize()/c,w=t.generateModeMessage(s,l,g),_=(s?11:14)+l*4,m=new Int32Array(_),A;if(s){A=_;for(var h=0;h<m.length;h++)m[h]=h}else{A=_+1+2*G.truncDivision(G.truncDivision(_,2)-1,15);for(var y=G.truncDivision(_,2),C=G.truncDivision(A,2),h=0;h<y;h++){var b=h+G.truncDivision(h,15);m[y-h-1]=C-b-1,m[y+h]=C+b+1}}for(var O=new Ze(A),h=0,P=0;h<l;h++){for(var $=(l-h)*4+(s?9:12),M=0;M<$;M++)for(var le=M*2,H=0;H<2;H++)p.get(P+le+H)&&O.set(m[h*2+H],m[h*2+M]),p.get(P+$*2+le+H)&&O.set(m[h*2+M],m[_-1-h*2-H]),p.get(P+$*4+le+H)&&O.set(m[_-1-h*2-H],m[_-1-h*2-M]),p.get(P+$*6+le+H)&&O.set(m[_-1-h*2-M],m[h*2+H]);P+=$*8}if(t.drawModeMessage(O,s,A,w),s)t.drawBullsEye(O,G.truncDivision(A,2),5);else{t.drawBullsEye(O,G.truncDivision(A,2),7);for(var h=0,M=0;h<G.truncDivision(_,2)-1;h+=15,M+=16)for(var H=G.truncDivision(A,2)&1;H<A;H+=2)O.set(G.truncDivision(A,2)-M,H),O.set(G.truncDivision(A,2)+M,H),O.set(H,G.truncDivision(A,2)-M),O.set(H,G.truncDivision(A,2)+M)}var ee=new sc;return ee.setCompact(s),ee.setSize(A),ee.setLayers(l),ee.setCodeWords(g),ee.setMatrix(O),ee},t.drawBullsEye=function(e,r,n){for(var i=0;i<n;i+=2)for(var a=r-i;a<=r+i;a++)e.set(a,r-i),e.set(a,r+i),e.set(r-i,a),e.set(r+i,a);e.set(r-n,r-n),e.set(r-n+1,r-n),e.set(r-n,r-n+1),e.set(r+n,r-n),e.set(r+n,r-n+1),e.set(r+n,r+n-1)},t.generateModeMessage=function(e,r,n){var i=new ve;return e?(i.appendBits(r-1,2),i.appendBits(n-1,6),i=t.generateCheckWords(i,28,4)):(i.appendBits(r-1,5),i.appendBits(n-1,11),i=t.generateCheckWords(i,40,4)),i},t.drawModeMessage=function(e,r,n,i){var a=G.truncDivision(n,2);if(r)for(var o=0;o<7;o++){var s=a-3+o;i.get(o)&&e.set(s,a-5),i.get(o+7)&&e.set(a+5,s),i.get(20-o)&&e.set(s,a+5),i.get(27-o)&&e.set(a-5,s)}else for(var o=0;o<10;o++){var s=a-5+o+G.truncDivision(o,5);i.get(o)&&e.set(s,a-7),i.get(o+10)&&e.set(a+7,s),i.get(29-o)&&e.set(s,a+7),i.get(39-o)&&e.set(a-7,s)}},t.generateCheckWords=function(e,r,n){var i,a,o=e.getSize()/n,s=new wa(t.getGF(n)),l=G.truncDivision(r,n),u=t.bitsToWords(e,n,l);s.encode(u,l-o);var c=r%n,d=new ve;d.appendBits(0,c);try{for(var v=_c(Array.from(u)),h=v.next();!h.done;h=v.next()){var p=h.value;d.appendBits(p,n)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}return d},t.bitsToWords=function(e,r,n){var i=new Int32Array(n),a,o;for(a=0,o=e.getSize()/r;a<o;a++){for(var s=0,l=0;l<r;l++)s|=e.get(a*r+l)?1<<r-l-1:0;i[a]=s}return i},t.getGF=function(e){switch(e){case 4:return Ne.AZTEC_PARAM;case 6:return Ne.AZTEC_DATA_6;case 8:return Ne.AZTEC_DATA_8;case 10:return Ne.AZTEC_DATA_10;case 12:return Ne.AZTEC_DATA_12;default:throw new L("Unsupported word size "+e)}},t.stuffBits=function(e,r){for(var n=new ve,i=e.getSize(),a=(1<<r)-2,o=0;o<i;o+=r){for(var s=0,l=0;l<r;l++)(o+l>=i||e.get(o+l))&&(s|=1<<r-1-l);(s&a)===a?(n.appendBits(s&a,r),o--):(s&a)===0?(n.appendBits(s|1,r),o--):n.appendBits(s,r)}return n},t.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.DEFAULT_EC_PERCENT=33,t.DEFAULT_AZTEC_LAYERS=0,t.MAX_NB_BITS=32,t.MAX_NB_BITS_COMPACT=4,t.WORD_SIZE=Int32Array.from([4,6,6,8,8,8,8,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,12,12,12,12,12,12,12,12,12]),t})();const Ec={name:"stream-barcode-reader",data(){return{isLoading:!0,codeReader:new qf,isMediaStreamAPISupported:navigator&&navigator.mediaDevices&&"enumerateDevices"in navigator.mediaDevices}},mounted(){if(!this.isMediaStreamAPISupported)throw new Ce("Media Stream API is not supported");this.start(),this.$refs.scanner.oncanplay=t=>{this.isLoading=!1,this.$emit("loaded")}},beforeUnmount(){this.codeReader.reset()},methods:{start(){this.codeReader.decodeFromVideoDevice(void 0,this.$refs.scanner,(t,e)=>{t&&(this.$emit("decode",t.text),this.$emit("result",t))})}}},Ac={class:"scanner-container"},Cc={poster:"data:image/gif,AAAA",ref:"scanner"};function bc(t,e,r,n,i,a){return f.openBlock(),f.createElementBlock("div",Ac,[f.withDirectives(f.createElementVNode("div",null,[f.createElementVNode("video",Cc,null,512),e[0]||(e[0]=f.createElementVNode("div",{class:"overlay-element"},null,-1)),e[1]||(e[1]=f.createElementVNode("div",{class:"laser"},null,-1))],512),[[f.vShow,!i.isLoading]])])}const Sc=Fr(Ec,[["render",bc],["__scopeId","data-v-3b725b25"]]),Ic={key:0,class:"dsg-barcode"},Oc={class:"dsg-barcode__header"},Tc={class:"dsg-barcode__title"},Nc={key:0,class:"dsg-barcode__subtitle"},Dc={class:"dsg-barcode__body"},Bc={class:"dsg-barcode__scanner-wrapper"},Rc={class:"dsg-barcode__manual-toggle"},Pc={key:0,class:"dsg-barcode__manual-input-group"},kc={key:1},Mc={key:0,class:"dsg-barcode__manual-text"},Lc=f.defineComponent({__name:"DsgBarcodeScanner",setup(t,{expose:e}){const r=f.ref(!1),n=f.ref(""),i=f.ref(""),a=f.ref(null),o=f.ref(""),s=f.ref(!1);function l(h){n.value=h.title,i.value=h.subtitle??"",a.value=h.onClose,o.value="",s.value=!1,r.value=!0}function u(h){v({type:"scanned",value:h})}function c(){o.value.trim()&&v({type:"manual",value:o.value.trim()})}function d(){v({type:"cancelled"})}function v(h){r.value=!1,a.value&&(a.value(h),a.value=null)}return e({scan:l}),(h,p)=>(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[f.createVNode(f.Transition,{name:"dsg-barcode-fade"},{default:f.withCtx(()=>[r.value?(f.openBlock(),f.createElementBlock("div",Ic,[f.createElementVNode("div",Oc,[f.createElementVNode("div",null,[f.createElementVNode("h2",Tc,f.toDisplayString(n.value),1),i.value?(f.openBlock(),f.createElementBlock("p",Nc,f.toDisplayString(i.value),1)):f.createCommentVNode("",!0)]),f.createElementVNode("button",{onClick:d,"aria-label":"Close",class:"dsg-barcode__close"},"×")]),f.createElementVNode("div",Dc,[f.createElementVNode("div",Bc,[f.createVNode(f.unref(Sc),{class:"dsg-barcode__scanner",onDecode:u}),p[2]||(p[2]=f.createElementVNode("div",{class:"dsg-barcode__overlay"},null,-1))]),f.createElementVNode("div",Rc,[s.value?(f.openBlock(),f.createElementBlock("div",Pc,[f.withDirectives(f.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=g=>o.value=g),type:"text",class:"dsg-barcode__manual-input",placeholder:"Enter barcode manually",onKeyup:f.withKeys(c,["enter"])},null,544),[[f.vModelText,o.value]]),f.createElementVNode("button",{onClick:c,class:"dsg-barcode__manual-submit"}," Submit ")])):(f.openBlock(),f.createElementBlock("div",kc,[s.value?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("span",Mc," No barcode? ")),s.value?f.createCommentVNode("",!0):(f.openBlock(),f.createBlock(V._sfc_main$3,{key:1,label:"Input manually",onClick:p[1]||(p[1]=g=>s.value=!s.value),class:"dsg-barcode__manual-toggle-button"}))]))])])])):f.createCommentVNode("",!0)]),_:1})]))}}),Fc=Fr(Lc,[["__scopeId","data-v-55e130b8"]]),Aa=f.defineComponent({__name:"DsgCard",props:{variant:{default:"default"},hoverable:{type:Boolean,default:!1},classes:{default:""}},setup(t){return(e,r)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-card",[`dsg-card--${e.variant}`,{"dsg-card--hoverable":e.hoverable},e.classes]])},[f.renderSlot(e.$slots,"default")],2))}}),Vc=f.defineComponent({__name:"DsgCardContainer",props:{columns:{default:1},gap:{},items:{},itemKey:{default:null},cardProps:{default:()=>({})}},setup(t){return(e,r)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-card-container",`dsg-card-container--cols-${e.columns} dsg-card-container--gap-${e.gap}`])},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(e.items,(n,i)=>(f.openBlock(),f.createBlock(Aa,f.mergeProps({key:e.itemKey?n[e.itemKey]:i},{ref_for:!0},e.cardProps),{default:f.withCtx(()=>[f.renderSlot(e.$slots,"default",{item:n,index:i})]),_:2},1040))),128))],2))}}),Uc={key:1},$c=f.defineComponent({__name:"DsgBreadcrumb",props:{breadcrumbs:{default:()=>[]},divider:{default:()=>({icon:"slash-divider",size:"sm",classes:""})},theme:{default:"text"}},setup(t){return(e,r)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-breadcrumbs","dsg-breadcrumbs"])},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(e.breadcrumbs,(n,i)=>(f.openBlock(),f.createElementBlock(f.Fragment,{key:`breadcrumb-item-${i}`},[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(n.url??!1?"a":"span"),{href:n.url??null,disabled:n.disabled,class:f.normalizeClass(["dsg-breadcrumbs__button-base",`dsg-breadcrumbs__button-base--${e.theme}`,`${n.active??i===e.breadcrumbs.length-1?"dsg-breadcrumbs__button-base--active":""}`].join(" "))},{default:f.withCtx(()=>[n.icon&&n.useIcon?(f.openBlock(),f.createBlock(V._sfc_main,{key:0,icon:n.icon,size:"sm",classes:"dsg-breadcrumbs__icon"},null,8,["icon"])):(f.openBlock(),f.createElementBlock("span",Uc,f.toDisplayString(n.label),1))]),_:2},1032,["href","disabled","class"])),i<e.breadcrumbs.length-1?(f.openBlock(),f.createBlock(V._sfc_main,f.mergeProps({key:0,ref_for:!0},e.divider,{class:"dsg-breadcrumbs__divider"}),null,16)):f.createCommentVNode("",!0)],64))),128))]))}}),Hc=Fr($c,[["__scopeId","data-v-8f108e12"]]),Gc={class:"dsg-tab--mobile"},zc={"aria-label":"Select a tab",class:"dsg-tab--mobile-select"},Wc=["selected","textContent"],Xc={class:"dsg-tab--desktop"},jc={class:"dsg-tab--desktop-wrapper"},Yc=["href","onClick","aria-current"],Kc=["textContent"],Zc={key:0,class:"dsg-tab--content"},qc=f.defineComponent({__name:"DsgTab",props:{tabs:{default:()=>[]},style:{default:"tabs"},preventVisits:{type:Boolean,default:!0},useWindowLocation:{type:Boolean,default:!1},replaceState:{type:Boolean,default:!1},replaceStrategy:{default:"window"},useSlots:{type:Boolean,default:!1},selfUpdate:{type:Boolean,default:!0},teleportSlotTo:{}},emits:["tab-clicked"],setup(t,{emit:e}){const r=e,n=a=>{t.tabs.forEach(o=>{o.current=a.name===o.name})},i=a=>{if(t.preventVisits&&r("tab-clicked",a),t.useWindowLocation&&a.href&&(window.location.href=a.href),t.replaceState){const o=new URL(window.location.href),s=new URLSearchParams(o.search);s.set("tab",a.key);const l=`${o.origin}${o.pathname}?${s.toString()}`;t.replaceStrategy==="window"&&window.history.replaceState({},"",l)}t.selfUpdate&&n(a)};return(a,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["dsg-tab",`dsg-tab--${a.style}`])},[f.createElementVNode("div",Gc,[f.createElementVNode("select",zc,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.tabs,s=>(f.openBlock(),f.createElementBlock("option",{key:s.name,selected:s.current,textContent:f.toDisplayString(s.name)},null,8,Wc))),128))]),f.createVNode(V._sfc_main,{class:"dsg-tab--mobile-select-icon",icon:"chevron-down","aria-hidden":"true",size:"sm"})]),f.createElementVNode("div",Xc,[f.createElementVNode("div",jc,[f.createElementVNode("div",{class:f.normalizeClass(["dsg-tab--desktop-nav",a.style==="pills"?"dsg-tab--pills-nav":""]),"aria-label":"Tabs"},[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.tabs,s=>(f.openBlock(),f.createElementBlock("a",{key:s.name,href:s.href,onClick:f.withModifiers(l=>i(s),["prevent"]),class:f.normalizeClass(["dsg-tab--desktop-link",[a.style==="pills"?s.current?"pills-active":"pills-inactive":s.current?"link-active":"link-inactive"]]),"aria-current":s.current?"page":void 0},[f.createElementVNode("span",{class:"dsg-tab--desktop-link-label",textContent:f.toDisplayString(s.name)},null,8,Kc),s.badge?(f.openBlock(),f.createBlock(ea,{key:0,label:s.badge.label,"theme-color":s.current?"brand":"gray",theme:"pill-color",size:"sm"},null,8,["label","theme-color"])):f.createCommentVNode("",!0)],10,Yc))),128))],2)])]),a.useSlots?(f.openBlock(),f.createElementBlock("div",Zc,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.tabs,(s,l)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[s.current?f.renderSlot(a.$slots,`dsg-tab--content--${String(s.key).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{key:0,data:s}):f.createCommentVNode("",!0)],64))),256))])):f.createCommentVNode("",!0)],2))}}),Ca=V._sfc_main,ba=Ct,Sa=V._sfc_main$4,Ia=ns,Oa=Ji,Ta=or,Na=ea,Da=V._sfc_main$3,Ba=V._sfc_main$2,Ra=Ss,Pa=fl,ka=V._sfc_main$5,Ma=Ll,La=$l,Fa=V._sfc_main$6,Va=Gi._sfc_main,Ua=zl,$a=Kl,Ha=eu,Ga=ou,za=V._sfc_main$1,Wa=V._sfc_main$7,Qc=gs,Jc=du,e0=Fc,t0=Aa,r0=Vc,Xa=Hc,ja=qc,n0={DsgIcon:Ca,DsgMiscIcon:ba,DsgCreditCardIcon:Sa,DsgAlert:Ia,DsgAnnouncement:Oa,DsgAvatar:Ta,DsgBadge:Na,DsgButton:Da,DsgCheckbox:Ba,DsgCheckboxGroup:Ra,DsgDropdown:Pa,DsgInput:ka,DsgInputSelect:Ma,DsgInputDropdown:La,DsgDatepicker:Fa,DsgLabel:Va,DsgLink:Ua,DsgModal:$a,DsgTag:Ha,DsgToggle:Ga,DsgTooltip:za,DsgBreadcrumb:Xa,DsgTab:ja,DsgFilter:Wa};exports.DsgAlert=Ia;exports.DsgAnnouncement=Oa;exports.DsgAvatar=Ta;exports.DsgBadge=Na;exports.DsgBarcodeScanner=e0;exports.DsgBreadcrumb=Xa;exports.DsgButton=Da;exports.DsgCard=t0;exports.DsgCardContainer=r0;exports.DsgCheckbox=Ba;exports.DsgCheckboxGroup=Ra;exports.DsgCreditCardIcon=Sa;exports.DsgDatepicker=Fa;exports.DsgDropdown=Pa;exports.DsgFilter=Wa;exports.DsgIcon=Ca;exports.DsgInput=ka;exports.DsgInputDropdown=La;exports.DsgInputNumber=Qc;exports.DsgInputSelect=Ma;exports.DsgLabel=Va;exports.DsgLink=Ua;exports.DsgMiscIcon=ba;exports.DsgModal=$a;exports.DsgProgress=Jc;exports.DsgTab=ja;exports.DsgTag=Ha;exports.DsgToggle=Ga;exports.DsgTooltip=za;exports.default=n0;